dweb-transports/dist/dweb-transports-bundle.js

543 lines
4.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=737)}([function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=n(742),i=n(387),o=n(51);function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=l.prototype):(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,n,r):"string"==typeof t?d(e,t,n):y(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t,n,r){return f(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}function p(e,t){if(f(t),e=u(e,t<0?0:0|b(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|w(t,n);e=u(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function m(e,t){var n=t.length<0?0:0|b(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function g(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),l.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=l.prototype):e=m(e,t),e}function y(e,t){if(l.isBuffer(t)){var n=0|b(t.length);return e=u(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||te(t.length)?u(e,0):m(e,t);if("Buffer"===t.type&&o(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),l.alloc(+e)}function w(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(r)return J(e).length;t=(""+t).toLowerCase(),r=!0}}function _(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,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function k(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(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),n=+n,isNaN(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=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,i){var o=1,s=e.length,a=t.length,u;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(u=n;u<s;u++)if(l(e,u)===l(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===a)return c*o}else-1!==c&&(u-=u-c),c=-1}else for(n+a>s&&(n=s-a),u=n;u>=0;u--){for(var f=!0,h=0;h<a;h++)if(l(e,u+h)!==l(t,h)){f=!1;break}if(f)return u}return-1}function x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function C(e,t,n,r){return ee(J(t,e.length-n),e,n,r)}function A(e,t,n,r){return ee(Z(t),e,n,r)}function I(e,t,n,r){return A(e,t,n,r)}function T(e,t,n,r){return ee(Q(t),e,n,r)}function j(e,t,n,r){return ee(X(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1,u,l,c,f;if(i+a<=n)switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128==(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&f<1114112&&(s=f))}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}t.Buffer=l,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return h(null,e,t,n)},l.allocUnsafe=function(e){return p(null,e)},l.allocUnsafeSlow=function(e){return p(null,e)},l.isBuffer=function e(t){return!(null==t||!t._isBuffer)},l.compare=function e(t,n){if(!l.isBuffer(t)||!l.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==n[o]){r=t[o],i=n[o];break}return r<i?-1:i<r?1:0},l.isEncoding=function e(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}},l.concat=function e(t,n){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var r;if(void 0===n)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var i=l.allocUnsafe(n),s=0;for(r=0;r<t.length;++r){var a=t[r];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,s),s+=a.length}return i},l.byteLength=w,l.prototype._isBuffer=!0,l.prototype.swap16=function e(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)k(this,n,n+1);return this},l.prototype.swap32=function e(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)k(this,n,n+3),k(this,n+1,n+2);return this},l.prototype.swap64=function e(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)k(this,n,n+7),k(this,n+1,n+6),k(this,n+2,n+5),k(this,n+3,n+4);return this},l.prototype.toString=function e(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):_.apply(this,arguments)},l.prototype.equals=function e(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function e(){var n="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(n+=" ... ")),"<Buffer "+n+">"},l.prototype.compare=function e(t,n,r,i,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),f=t.slice(n,r),h=0;h<u;++h)if(c[h]!==f[h]){s=c[h],a=f[h];break}return s<a?-1:a<s?1:0},l.prototype.includes=function e(t,n,r){return-1!==this.indexOf(t,n,r)},l.prototype.indexOf=function e(t,n,r){return S(this,t,n,r,!0)},l.prototype.lastIndexOf=function e(t,n,r){return S(this,t,n,r,!1)},l.prototype.write=function e(t,n,r,i){if(void 0===n)i="utf8",r=this.length,n=0;else if(void 0===r&&"string"==typeof n)i=n,r=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var o=this.length-n;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return x(this,t,n,r);case"utf8":case"utf-8":return C(this,t,n,r);case"ascii":return A(this,t,n,r);case"latin1":case"binary":return I(this,t,n,r);case"base64":return T(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function R(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=B));return n}function N(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 M(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 L(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+=Y(e[o]);return i}function F(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 D(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 U(e,t,n,r,i,o){if(!l.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 z(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function q(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function K(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 H(e,t,n,r,o){return o||K(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),i.write(e,t,n,r,23,4),n+4}function V(e,t,n,r,o){return o||K(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function e(t,n){var r=this.length,i;if(t=~~t,n=void 0===n?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t),l.TYPED_ARRAY_SUPPORT)i=this.subarray(t,n),i.__proto__=l.prototype;else{var o=n-t;i=new l(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i},l.prototype.readUIntLE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t],o=1,s=0;++s<n&&(o*=256);)i+=this[t+s]*o;return i},l.prototype.readUIntBE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t+--n],o=1;n>0&&(o*=256);)i+=this[t+--n]*o;return i},l.prototype.readUInt8=function e(t,n){return n||D(t,1,this.length),this[t]},l.prototype.readUInt16LE=function e(t,n){return n||D(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function e(t,n){return n||D(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function e(t,n){return n||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function e(t,n){return n||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t],o=1,s=0;++s<n&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*n)),i},l.prototype.readIntBE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=n,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*n)),s},l.prototype.readInt8=function e(t,n){return n||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function e(t,n){n||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function e(t,n){n||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function e(t,n){return n||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function e(t,n){return n||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function e(t,n){return n||D(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function e(t,n){return n||D(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function e(t,n){return n||D(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function e(t,n){return n||D(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function e(t,n,r,i){if(t=+t,n|=0,r|=0,!i){var o=Math.pow(2,8*r)-1;U(this,t,n,r,o,0)}var s=1,a=0;for(this[n]=255&t;++a<r&&(s*=256);)this[n+a]=t/s&255;return n+r},l.prototype.writeUIntBE=function e(t,n,r,i){if(t=+t,n|=0,r|=0,!i){var o=Math.pow(2,8*r)-1;U(this,t,n,r,o,0)}var s=r-1,a=1;for(this[n+s]=255&t;--s>=0&&(a*=256);)this[n+s]=t/a&255;return n+r},l.prototype.writeUInt8=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},l.prototype.writeUInt16LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):z(this,t,n,!0),n+2},l.prototype.writeUInt16BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):z(this,t,n,!1),n+2},l.prototype.writeUInt32LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):q(this,t,n,!0),n+4},l.prototype.writeUInt32BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):q(this,t,n,!1),n+4},l.prototype.writeIntLE=function e(t,n,r,i){if(t=+t,n|=0,!i){var o=Math.pow(2,8*r-1);U(this,t,n,r,o-1,-o)}var s=0,a=1,u=0;for(this[n]=255&t;++s<r&&(a*=256);)t<0&&0===u&&0!==this[n+s-1]&&(u=1),this[n+s]=(t/a>>0)-u&255;return n+r},l.prototype.writeIntBE=function e(t,n,r,i){if(t=+t,n|=0,!i){var o=Math.pow(2,8*r-1);U(this,t,n,r,o-1,-o)}var s=r-1,a=1,u=0;for(this[n+s]=255&t;--s>=0&&(a*=256);)t<0&&0===u&&0!==this[n+s+1]&&(u=1),this[n+s]=(t/a>>0)-u&255;return n+r},l.prototype.writeInt8=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=255&t,n+1},l.prototype.writeInt16LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):z(this,t,n,!0),n+2},l.prototype.writeInt16BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):z(this,t,n,!1),n+2},l.prototype.writeInt32LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):q(this,t,n,!0),n+4},l.prototype.writeInt32BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):q(this,t,n,!1),n+4},l.prototype.writeFloatLE=function e(t,n,r){return H(this,t,n,!0,r)},l.prototype.writeFloatBE=function e(t,n,r){return H(this,t,n,!1,r)},l.prototype.writeDoubleLE=function e(t,n,r){return V(this,t,n,!0,r)},l.prototype.writeDoubleBE=function e(t,n,r){return V(this,t,n,!1,r)},l.prototype.copy=function e(t,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-n<i-r&&(i=t.length-n+r);var o=i-r,s;if(this===t&&r<n&&n<i)for(s=o-1;s>=0;--s)t[s+n]=this[s+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+n]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),n);return o},l.prototype.fill=function e(t,n,r,i){if("string"==typeof t){if("string"==typeof n?(i=n,n=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;var s;if(n>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=n;s<r;++s)this[s]=t;else{var a=l.isBuffer(t)?t:J(new l(t,i).toString()),u=a.length;for(s=0;s<r-n;++s)this[s+n]=a[s%u]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function $(e){if(e=G(e).replace(W,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function J(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),n>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 Z(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function X(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function Q(e){return r.toByteArray($(e))}function ee(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 te(e){return e!=e}}).call(this,n(8))},function(e,t){"function"==typeof Object.create?e.exports=function e(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function e(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,t){var n=e.exports={},r,i;function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}function u(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l=[],c=!1,f,h=-1;function p(){c&&f&&(c=!1,f.length?l=f.concat(l):h=-1,l.length&&d())}function d(){if(!c){var e=a(p);c=!0;for(var t=l.length;t;){for(f=l,l=[];++h<t;)f&&f[h].run();h=-1,t=l.length}f=null,c=!1,u(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||c||a(d)},m.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=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,n){
/** PROMISIFY CALLBACK-STYLE FUNCTIONS TO ES6 PROMISES
*
* EXAMPLE:
* const fn = promisify( (callback) => callback(null, "Hello world!") );
* fn((err, str) => console.log(str));
* fn().then((str) => console.log(str));
* //Both functions, will log 'Hello world!'
*
* Note: The function you pass, may have any arguments you want, but the latest
* have to be the callback, which you will call with: next(err, value)
*
* @param method: Function/Array/Map = The function(s) to promisify
* @param options: Map =
* "context" (default is function): The context which to apply the called function
* "replace" (default is falsy): When passed an array/map, if to replace the original object
*
* @return: A promise if passed a function, otherwise the object with the promises
*
* @license: MIT
* @version: 1.0.3
* @author: Manuel Di Iorio
**/
var r=function(e,t){return function(){var n=Array.prototype.slice.call(arguments),r=n.length-1,i=n&&n.length>0?n[r]:null,o="function"==typeof i?i:null;return o?e.apply(t,n):new Promise(function(r,i){n.push(function(e,t){if(e)return i(e);r(t)}),e.apply(t,n)})}};e.exports=function(e,t){t=t||{};var n=Object.prototype.toString.call(e);if("[object Object]"===n||"[object Array]"===n){var i=t.replace?e:{};for(var o in e)e.hasOwnProperty(o)&&(i[o]=r(e[o]));return i}return r(e,t.context||e)}},function(e,t,n){var r=n(0),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}function s(...e){return"object"==typeof console&&console.log&&console.log(...e)}function a(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function u(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return localStorage}catch(e){}}t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage=l(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(741)(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";var r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function e(t,n,r){return Function.prototype.apply.call(t,n,r)},o;function s(e){console&&console.warn&&console.warn(e)}o=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function e(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function e(t){return t!=t};function u(){u.init.call(this)}e.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var l=10;function c(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(o=e._events,void 0===o?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=c(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s(u)}return e}function h(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,e))}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?b(i):g(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),u.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},u.prototype.setMaxListeners=function e(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},u.prototype.getMaxListeners=function e(){return c(this)},u.prototype.emit=function e(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var o="error"===t,s=this._events;if(void 0!==s)o=o&&void 0===s.error;else if(!o)return!1;if(o){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,n);else for(var c=l.length,f=g(l,c),r=0;r<c;++r)i(f[r],this,n);return!0},u.prototype.addListener=function e(t,n){return f(this,t,n,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function e(t,n){return f(this,t,n,!0)},u.prototype.once=function e(t,n){if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);return this.on(t,p(this,t,n)),this},u.prototype.prependOnceListener=function e(t,n){if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);return this.prependListener(t,p(this,t,n)),this},u.prototype.removeListener=function e(t,n){var r,i,o,s,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(i=this._events,void 0===i)return this;if(r=i[t],void 0===r)return this;if(r===n||r.listener===n)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if("function"!=typeof r){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():y(r,o),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,a||n)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function e(t){var n,r,i;if(r=this._events,void 0===r)return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var o=Object.keys(r),s;for(i=0;i<o.length;++i)s=o[i],"removeListener"!==s&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],"function"==typeof n)this.removeListener(t,n);else if(void 0!==n)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this},u.prototype.listeners=function e(t){return d(this,t,!0)},u.prototype.rawListeners=function e(t){return d(this,t,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},u.prototype.listenerCount=m,u.prototype.eventNames=function e(){return this._eventsCount>0?o(this._events):[]}},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function l(e){return void 0===e}function c(e){return"[object RegExp]"===g(e)}function f(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===g(e)}function p(e){return"[object Error]"===g(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function g(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=s,t.isString=a,t.isSymbol=u,t.isUndefined=l,t.isRegExp=c,t.isObject=f,t.isDate=h,t.isError=p,t.isFunction=d,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(this,n(0).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){const r=n(35),i=n(88),o=n(295),s=n(175),a=n(797),u=n(53);class l{constructor(n,s,a){if(e.exports.isCID(n)){let e=n;return this.version=e.version,this.codec=e.codec,void(this.multihash=t.from(e.multihash))}if("string"==typeof n)if(i.isEncoded(n)){const e=i.decode(n);n=parseInt(e.slice(0,1).toString("hex"),16),s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=r.fromB58String(n),n=0;else if(t.isBuffer(n)){const e=n.slice(0,1),t=parseInt(e.toString("hex"),16);if(0===t||1===t){const e=n;n=t,s=o.getCodec(e.slice(1)),a=o.rmPrefix(e.slice(1))}else s="dag-pb",a=n,n=0}this.codec=s,this.version=n,this.multihash=a,l.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),r.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=r.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new c(0,this.codec,this.multihash)}toV1(){return new c(1,this.codec,this.multihash)}toBaseEncodedString(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");return r.toB58String(this.multihash);case 1:return i.encode(e,this.buffer).toString();default:throw new Error("Unsupported version")}}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const c=u(l,{className:"CID",symbolName:"@ipld/js-cid/CID"});c.codecs=s,e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){function n(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o=arguments.length,s,a;switch(o){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function t(){e.call(null,n)});case 3:return t.nextTick(function t(){e.call(null,n,r)});case 4:return t.nextTick(function t(){e.call(null,n,r,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return t.nextTick(function t(){e.apply(null,s)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:n}:e.exports=t}).call(this,n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t=(0,u.default)(t||s.default),!(0,i.default)(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){var r=(0,d.default)(e[n++]);t.push((0,h.default)(o)),r.apply(null,t)}function o(i){if(i||n===e.length)return t.apply(null,arguments);r((0,c.default)(arguments,1))}r([])};var r=n(68),i=m(r),o=n(67),s=m(o),a=n(216),u=m(a),l=n(105),c=m(l),f=n(133),h=m(f),p=n(42),d=m(p);function m(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";e.exports=function e(t){var n=arguments.length;if("function"==typeof t&&1===t.length){for(var r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(t){if(null==r)throw new TypeError("partial sink should only be called once!");var i=r;switch(r=null,n){case 1:return e(t,i[0]);case 2:return e(t,i[0],i[1]);case 3:return e(t,i[0],i[1],i[2]);case 4:return e(t,i[0],i[1],i[2],i[3]);default:return i.unshift(t),e.apply(null,i)}}}var o=t;o&&"function"==typeof o.source&&(o=o.source);for(var i=1;i<n;i++){var s=arguments[i];"function"==typeof s?o=s(o):s&&"object"==typeof s&&(s.sink(o),o=s.source)}return o}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function e(t){for(var n=Object.keys(t),r={},i=0;i<n.length;i++)r[n[i]]=Object.getOwnPropertyDescriptor(t,n[i]);return r},i=/%[sdj%]/g;t.format=function(e){if(!k(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),u=r[n];n<o;u=r[++n])v(u)||!C(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;function o(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}return o};var o={},s;function a(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(n)?r.showHidden=n:n&&t._extend(r,n),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),f(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function l(e,t){return e}function c(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function f(e,n,r){if(e.customInspect&&n&&T(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return k(i)||(i=f(e,i,r)),i}var o=h(e,n);if(o)return o;var s=Object.keys(n),a=c(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),I(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(n);if(0===s.length){if(T(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(x(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return e.stylize(Date.prototype.toString.call(n),"date");if(I(n))return p(n)}var l="",b=!1,v=["{","}"],w;if(y(n)&&(b=!0,v=["[","]"]),T(n)){var _=n.name?": "+n.name:"";l=" [Function"+_+"]"}return x(n)&&(l=" "+RegExp.prototype.toString.call(n)),A(n)&&(l=" "+Date.prototype.toUTCString.call(n)),I(n)&&(l=" "+p(n)),0!==s.length||b&&0!=n.length?r<0?x(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),w=b?d(e,n,r,a,s):s.map(function(t){return m(e,n,r,a,t,b)}),e.seen.pop(),g(w,l,v)):v[0]+l+v[1]}function h(e,t){if(E(t))return e.stylize("undefined","undefined");if(k(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return _(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)N(t,String(s))?o.push(m(e,t,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(m(e,t,n,r,i,!0))}),o}function m(e,t,n,r,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),N(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=v(n)?f(e,u.value,null):f(e,u.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),E(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function g(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function y(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function v(e){return null===e}function w(e){return null==e}function _(e){return"number"==typeof e}function k(e){return"string"==typeof e}function S(e){return"symbol"==typeof e}function E(e){return void 0===e}function x(e){return C(e)&&"[object RegExp]"===O(e)}function C(e){return"object"==typeof e&&null!==e}function A(e){return C(e)&&"[object Date]"===O(e)}function I(e){return C(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function j(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function O(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(E(s)&&(s=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=e.pid;o[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else o[n]=function(){};return o[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=y,t.isBoolean=b,t.isNull=v,t.isNullOrUndefined=w,t.isNumber=_,t.isString=k,t.isSymbol=S,t.isUndefined=E,t.isRegExp=x,t.isObject=C,t.isDate=A,t.isError=I,t.isFunction=T,t.isPrimitive=j,t.isBuffer=n(800);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",R(),t.format.apply(t,arguments))},t.inherits=n(1),t._extend=function(e,t){if(!t||!C(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var M="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}function F(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,n).then(function(t){e.nextTick(s,null,t)},function(t){e.nextTick(L,t,s)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}t.promisify=function e(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(M&&t[M]){var n=t[M];if("function"!=typeof n)throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(n,M,{value:n,enumerable:!1,writable:!1,configurable:!0}),n}function n(){for(var e,n,r=new Promise(function(t,r){e=t,n=r}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,r){t?n(t):e(r)});try{t.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),M&&Object.defineProperty(n,M,{value:n,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(n,r(t))},t.promisify.custom=M,t.callbackify=F}).call(this,n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(218),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}t.default=i.default,e.exports=t.default},function(e,t){},function(e,t,n){"use strict";var r=n(4).Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.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(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function s(e){var t=o(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){var t;switch(this.encoding=s(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=g,this.end=y,t=3;break;default:return this.write=b,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e,t,n){var r=t.length-1;if(r<n)return 0;var i=u(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=u(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=u(t[r]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}function f(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function h(e,t){var n=l(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function g(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=p,a.prototype.text=h,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){(function(e,r){var i;
/**
* @license
* lodash 3.10.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern -d -o ./index.js`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/(function(){var o,s="3.10.1",a=1,u=2,l=4,c=8,f=16,h=32,p=64,d=128,m=256,g=30,y="...",b=150,v=16,w=200,_=1,k=2,S="Expected a function",E="__lodash_placeholder__",x="[object Arguments]",C="[object Array]",A="[object Boolean]",I="[object Date]",T="[object Error]",j="[object Function]",O="[object Map]",P="[object Number]",B="[object Object]",R="[object RegExp]",N="[object Set]",M="[object String]",L="[object WeakMap]",F="[object ArrayBuffer]",D="[object Float32Array]",U="[object Float64Array]",z="[object Int8Array]",q="[object Int16Array]",K="[object Int32Array]",H="[object Uint8Array]",V="[object Uint8ClampedArray]",W="[object Uint16Array]",$="[object Uint32Array]",G=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39|#96);/g,X=/[&<>"'`]/g,Q=RegExp(Z.source),ee=RegExp(X.source),te=/<%-([\s\S]+?)%>/g,ne=/<%([\s\S]+?)%>/g,re=/<%=([\s\S]+?)%>/g,ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,oe=/^\w*$/,se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,ae=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,ue=RegExp(ae.source),le=/[\u0300-\u036f\ufe20-\ufe23]/g,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,pe=/^0[xX]/,de=/^\[object .+?Constructor\]$/,me=/^\d+$/,ge=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,ve=(we="[A-Z\\xc0-\\xd6\\xd8-\\xde]",_e="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(we+"+(?="+we+_e+")|"+we+"?"+_e+"|"+we+"+|[0-9]+","g")),we,_e,ke=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Se=-1,Ee={};Ee[D]=Ee[U]=Ee[z]=Ee[q]=Ee[K]=Ee[H]=Ee[V]=Ee[W]=Ee[$]=!0,Ee[x]=Ee[C]=Ee[F]=Ee[A]=Ee[I]=Ee[T]=Ee[j]=Ee[O]=Ee[P]=Ee[B]=Ee[R]=Ee[N]=Ee[M]=Ee[L]=!1;var xe={};xe[x]=xe[C]=xe[F]=xe[A]=xe[I]=xe[D]=xe[U]=xe[z]=xe[q]=xe[K]=xe[P]=xe[B]=xe[R]=xe[M]=xe[H]=xe[V]=xe[W]=xe[$]=!0,xe[T]=xe[j]=xe[O]=xe[N]=xe[L]=!1;var Ce={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Ie={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Te={function:!0,object:!0},je={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pe=Te[typeof t]&&t&&!t.nodeType&&t,Be=Te[typeof e]&&e&&!e.nodeType&&e,Re=Pe&&Be&&"object"==typeof r&&r&&r.Object&&r,Ne=Te[typeof self]&&self&&self.Object&&self,Me=Te[typeof window]&&window&&window.Object&&window,Le=Be&&Be.exports===Pe&&Pe,Fe=Re||Me!==(this&&this.window)&&Me||Ne||this;function De(e,t){if(e!==t){var n=null===e,r=e===o,i=e==e,s=null===t,a=t===o,u=t==t;if(e>t&&!s||!i||n&&!a&&u||r&&u)return 1;if(e<t&&!n||!u||s&&!r&&i||a&&i)return-1}return 0}function Ue(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function ze(e,t,n){if(t!=t)return Xe(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function qe(e){return"function"==typeof e||!1}function Ke(e){return null==e?"":e+""}function He(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function Ve(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function We(e,t){return De(e.criteria,t.criteria)||e.index-t.index}function $e(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=De(i[r],o[r]);if(u){if(r>=a)return u;var l=n[r];return u*("asc"===l||!0===l?1:-1)}}return e.index-t.index}function Ge(e){return Ce[e]}function Ye(e){return Ae[e]}function Je(e,t,n){return t?e=je[e]:n&&(e=Oe[e]),"\\"+e}function Ze(e){return"\\"+Oe[e]}function Xe(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!=o)return i}return-1}function Qe(e){return!!e&&"object"==typeof e}function et(e){return e<=160&&e>=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function tt(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;)e[n]===t&&(e[n]=E,o[++i]=n);return o}function nt(e,t){for(var n,r=-1,i=e.length,o=-1,s=[];++r<i;){var a=e[r],u=t?t(a,r,e):a;r&&n===u||(n=u,s[++o]=a)}return s}function rt(e){for(var t=-1,n=e.length;++t<n&&et(e.charCodeAt(t)););return t}function it(e){for(var t=e.length;t--&&et(e.charCodeAt(t)););return t}function ot(e){return Ie[e]}function st(e){e=e?at.defaults(Fe.Object(),e,at.pick(Fe,ke)):Fe;var t=e.Array,n=e.Date,r=e.Error,i=e.Function,O=e.Math,N=e.Number,L=e.Object,we=e.RegExp,_e=e.String,Ce=e.TypeError,Ae=t.prototype,Ie=L.prototype,Te=_e.prototype,je=i.prototype.toString,Oe=Ie.hasOwnProperty,Pe=0,Be=Ie.toString,Re=Fe._,Ne=we("^"+je.call(Oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Me=e.ArrayBuffer,Le=e.clearTimeout,et=e.parseFloat,ut=O.pow,lt=Ie.propertyIsEnumerable,ct=Gr(e,"Set"),ft=e.setTimeout,ht=Ae.splice,pt=e.Uint8Array,dt=Gr(e,"WeakMap"),mt=O.ceil,gt=Gr(L,"create"),yt=O.floor,bt=Gr(t,"isArray"),vt=e.isFinite,wt=Gr(L,"keys"),_t=O.max,kt=O.min,St=Gr(n,"now"),Et=e.parseInt,xt=O.random,Ct=N.NEGATIVE_INFINITY,At=N.POSITIVE_INFINITY,It=4294967295,Tt=It-1,jt=It>>>1,Ot=9007199254740991,Pt=dt&&new dt,Bt={};function Rt(e){if(Qe(e)&&!bs(e)&&!(e instanceof Ft)){if(e instanceof Mt)return e;if(Oe.call(e,"__chain__")&&Oe.call(e,"__wrapped__"))return vi(e)}return new Mt(e)}function Nt(){}function Mt(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}var Lt=Rt.support={};function Ft(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=At,this.__views__=[]}function Dt(){var e=new Ft(this.__wrapped__);return e.__actions__=Zt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Zt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Zt(this.__views__),e}function Ut(){if(this.__filtered__){var e=new Ft(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function zt(){var e=this.__wrapped__.value(),t=this.__dir__,n=bs(e),r=t<0,i=n?e.length:0,o=Yr(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,f=c.length,h=0,p=kt(u,this.__takeCount__);if(!n||i<w||i==u&&p==u)return ir(r&&n?e.reverse():e,this.__actions__);var d=[];e:for(;u--&&h<p;){l+=t;for(var m=-1,g=e[l];++m<f;){var y=c[m],b=y.iteratee,v=y.type,S=b(g);if(v==k)g=S;else if(!S){if(v==_)continue e;break e}}d[h++]=g}return d}function qt(){this.__data__={}}function Kt(e){return this.has(e)&&delete this.__data__[e]}function Ht(e){return"__proto__"==e?o:this.__data__[e]}function Vt(e){return"__proto__"!=e&&Oe.call(this.__data__,e)}function Wt(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function $t(e){var t=e?e.length:0;for(this.data={hash:gt(null),set:new ct};t--;)this.push(e[t])}function Gt(e,t){var n=e.data,r="string"==typeof t||As(t)?n.set.has(t):n.hash[t];return r?0:-1}function Yt(e){var t=this.data;"string"==typeof e||As(e)?t.set.add(e):t.hash[e]=!0}function Jt(e,n){for(var r=-1,i=e.length,o=-1,s=n.length,a=t(i+s);++r<i;)a[r]=e[r];for(;++o<s;)a[r++]=n[o];return a}function Zt(e,n){var r=-1,i=e.length;for(n||(n=t(i));++r<i;)n[r]=e[r];return n}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}function Qt(e,t){for(var n=e.length;n--&&!1!==t(e[n],n,e););return e}function en(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function tn(e,t,n,r){for(var i=-1,o=e.length,s=r,a=s;++i<o;){var u=e[i],l=+t(u);n(l,s)&&(s=l,a=u)}return a}function nn(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[++i]=s)}return o}function rn(e,n){for(var r=-1,i=e.length,o=t(i);++r<i;)o[r]=n(e[r],r,e);return o}function on(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function sn(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function an(e,t,n,r){var i=e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function un(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ln(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}function cn(e,t){return e===o?t:e}function fn(e,t,n,r){return e!==o&&Oe.call(r,n)?e:t}function hn(e,t,n){for(var r=-1,i=ra(t),s=i.length;++r<s;){var a=i[r],u=e[a],l=n(u,t[a],a,e,t);(l==l?l===u:u!=u)&&(u!==o||a in e)||(e[a]=l)}return e}function pn(e,t){return null==t?e:mn(t,ra(t),e)}function dn(e,n){for(var r=-1,i=null==e,s=!i&&ei(e),a=s?e.length:0,u=n.length,l=t(u);++r<u;){var c=n[r];l[r]=s?ti(c,a)?e[c]:o:i?o:e[c]}return l}function mn(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}function gn(e,t,n){var r=typeof e;return"function"==r?t===o?e:ar(e,t,n):null==e?qa:"object"==r?Un(e):t===o?Ja(e):zn(e,t)}function yn(e,t,n,r,i,s,a){var u;if(n&&(u=i?n(e,r,i):n(e)),u!==o)return u;if(!As(e))return e;var l=bs(e);if(l){if(u=Jr(e),!t)return Zt(e,u)}else{var c=Be.call(e),f=c==j;if(c!=B&&c!=x&&(!f||i))return xe[c]?Xr(e,c,t):i?e:{};if(u=Zr(f?{}:e),!t)return pn(u,e)}s||(s=[]),a||(a=[]);for(var h=s.length;h--;)if(s[h]==e)return a[h];return s.push(e),a.push(u),(l?Xt:Pn)(e,function(r,i){u[i]=yn(r,t,n,i,e,s,a)}),u}Rt.templateSettings={escape:te,evaluate:ne,interpolate:re,variable:"",imports:{_:Rt}};var bn=function(){function e(){}return function(t){if(As(t)){e.prototype=t;var n=new e;e.prototype=o}return n||{}}}();function vn(e,t,n){if("function"!=typeof e)throw new Ce(S);return ft(function(){e.apply(o,n)},t)}function wn(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=Vr(),s=o==ze,a=s&&t.length>=w?gr(t):null,u=t.length;a&&(o=Gt,s=!1,t=a);e:for(;++i<n;){var l=e[i];if(s&&l==l){for(var c=u;c--;)if(t[c]===l)continue e;r.push(l)}else o(t,l,0)<0&&r.push(l)}return r}var _n=pr(Pn),kn=pr(Bn,!0);function Sn(e,t){var n=!0;return _n(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function En(e,t,n,r){var i=r,o=i;return _n(e,function(e,s,a){var u=+t(e,s,a);(n(u,i)||u===r&&u===o)&&(i=u,o=e)}),o}function xn(e,t,n,r){var i=e.length;for(n=null==n?0:+n||0,n<0&&(n=-n>i?0:i+n),r=r===o||r>i?i:+r||0,r<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;n<i;)e[n++]=t;return e}function Cn(e,t){var n=[];return _n(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function An(e,t,n,r){var i;return n(e,function(e,n,o){if(t(e,n,o))return i=r?n:e,!1}),i}function In(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var s=e[i];Qe(s)&&ei(s)&&(n||bs(s)||ys(s))?t?In(s,t,n,r):on(r,s):n||(r[r.length]=s)}return r}var Tn=dr(),jn=dr(!0);function On(e,t){return Tn(e,t,ia)}function Pn(e,t){return Tn(e,t,ra)}function Bn(e,t){return jn(e,t,ra)}function Rn(e,t){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var s=t[n];Cs(e[s])&&(o[++i]=s)}return o}function Nn(e,t,n){if(null!=e){n!==o&&n in yi(e)&&(t=[n]);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:o}}function Mn(e,t,n,r,i,o){return e===t||(null==e||null==t||!As(e)&&!Qe(t)?e!=e&&t!=t:Ln(e,t,Mn,n,r,i,o))}function Ln(e,t,n,r,i,o,s){var a=bs(e),u=bs(t),l=C,c=C;a||(l=Be.call(e),l==x?l=B:l!=B&&(a=Ms(e))),u||(c=Be.call(t),c==x?c=B:c!=B&&(u=Ms(t)));var f=l==B,h=c==B,p=l==c;if(p&&!a&&!f)return Ur(e,t,l);if(!i){var d=f&&Oe.call(e,"__wrapped__"),m=h&&Oe.call(t,"__wrapped__");if(d||m)return n(d?e.value():e,m?t.value():t,r,i,o,s)}if(!p)return!1;o||(o=[]),s||(s=[]);for(var g=o.length;g--;)if(o[g]==e)return s[g]==t;o.push(e),s.push(t);var y=(a?Dr:zr)(e,t,n,r,i,o,s);return o.pop(),s.pop(),y}function Fn(e,t,n){var r=t.length,i=r,s=!n;if(null==e)return!i;for(e=yi(e);r--;){var a=t[r];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<i;){a=t[r];var u=a[0],l=e[u],c=a[1];if(s&&a[2]){if(l===o&&!(u in e))return!1}else{var f=n?n(l,c,u):o;if(!(f===o?Mn(c,l,n,!0):f))return!1}}return!0}function Dn(e,n){var r=-1,i=ei(e)?t(e.length):[];return _n(e,function(e,t,o){i[++r]=n(e,t,o)}),i}function Un(e){var t=$r(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(r!==o||n in yi(e)))}}return function(e){return Fn(e,t)}}function zn(e,t){var n=bs(e),r=ri(e)&&si(t),i=e+"";return e=bi(e),function(s){if(null==s)return!1;var a=i;if(s=yi(s),(n||!r)&&!(a in s)){if(s=1==e.length?s:Nn(s,Jn(e,0,-1)),null==s)return!1;a=Mi(e),s=yi(s)}return s[a]===t?t!==o||a in s:Mn(t,s[a],o,!0)}}function qn(e,t,n,r,i){if(!As(e))return e;var s=ei(t)&&(bs(t)||Ms(t)),a=s?o:ra(t);return Xt(a||t,function(u,l){if(a&&(l=u,u=t[l]),Qe(u))r||(r=[]),i||(i=[]),Kn(e,t,l,qn,n,r,i);else{var c=e[l],f=n?n(c,u,l,e,t):o,h=f===o;h&&(f=u),f===o&&(!s||l in e)||!h&&(f==f?f===c:c!=c)||(e[l]=f)}}),e}function Kn(e,t,n,r,i,s,a){for(var u=s.length,l=t[n];u--;)if(s[u]==l)return void(e[n]=a[u]);var c=e[n],f=i?i(c,l,n,e,t):o,h=f===o;h&&(f=l,ei(l)&&(bs(l)||Ms(l))?f=bs(c)?c:ei(c)?Zt(c):[]:Bs(l)||ys(l)?f=ys(c)?zs(c):Bs(c)?c:{}:h=!1),s.push(l),a.push(f),h?e[n]=r(f,l,i,s,a):(f==f?f!==c:c==c)&&(e[n]=f)}function Hn(e){return function(t){return null==t?o:t[e]}}function Vn(e){var t=e+"";return e=bi(e),function(n){return Nn(n,e,t)}}function Wn(e,t){for(var n=e?t.length:0;n--;){var r=t[n];if(r!=i&&ti(r)){var i=r;ht.call(e,r,1)}}return e}function $n(e,t){return e+yt(xt()*(t-e+1))}function Gn(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}var Yn=Pt?function(e,t){return Pt.set(e,t),e}:qa;function Jn(e,n,r){var i=-1,s=e.length;n=null==n?0:+n||0,n<0&&(n=-n>s?0:s+n),r=r===o||r>s?s:+r||0,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var a=t(s);++i<s;)a[i]=e[i+n];return a}function Zn(e,t){var n;return _n(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function Xn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Qn(e,t,n){var r=qr(),i=-1;t=rn(t,function(e){return r(e)});var o=Dn(e,function(e){var n=rn(t,function(t){return t(e)});return{criteria:n,index:++i,value:e}});return Xn(o,function(e,t){return $e(e,t,n)})}function er(e,t){var n=0;return _n(e,function(e,r,i){n+=+t(e,r,i)||0}),n}function tr(e,t){var n=-1,r=Vr(),i=e.length,o=r==ze,s=o&&i>=w,a=s?gr():null,u=[];a?(r=Gt,o=!1):(s=!1,a=t?[]:u);e:for(;++n<i;){var l=e[n],c=t?t(l,n,e):l;if(o&&l==l){for(var f=a.length;f--;)if(a[f]===c)continue e;t&&a.push(c),u.push(l)}else r(a,c,0)<0&&((t||s)&&a.push(c),u.push(l))}return u}function nr(e,n){for(var r=-1,i=n.length,o=t(i);++r<i;)o[r]=e[n[r]];return o}function rr(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Jn(e,r?0:o,r?o+1:i):Jn(e,r?o+1:0,r?i:o)}function ir(e,t){var n=e;n instanceof Ft&&(n=n.value());for(var r=-1,i=t.length;++r<i;){var o=t[r];n=o.func.apply(o.thisArg,on([n],o.args))}return n}function or(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t==t&&i<=jt){for(;r<i;){var o=r+i>>>1,s=e[o];(n?s<=t:s<t)&&null!==s?r=o+1:i=o}return i}return sr(e,t,qa,n)}function sr(e,t,n,r){t=n(t);for(var i=0,s=e?e.length:0,a=t!=t,u=null===t,l=t===o;i<s;){var c=yt((i+s)/2),f=n(e[c]),h=f!==o,p=f==f;if(a)var d=p||r;else d=u?p&&h&&(r||null!=f):l?p&&(r||h):null!=f&&(r?f<=t:f<t);d?i=c+1:s=c}return kt(s,Tt)}function ar(e,t,n){if("function"!=typeof e)return qa;if(t===o)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,s){return e.call(t,n,r,i,o,s)}}return function(){return e.apply(t,arguments)}}function ur(e){var t=new Me(e.byteLength),n=new pt(t);return n.set(new pt(e)),t}function lr(e,n,r){for(var i=r.length,o=-1,s=_t(e.length-i,0),a=-1,u=n.length,l=t(u+s);++a<u;)l[a]=n[a];for(;++o<i;)l[r[o]]=e[o];for(;s--;)l[a++]=e[o++];return l}function cr(e,n,r){for(var i=-1,o=r.length,s=-1,a=_t(e.length-o,0),u=-1,l=n.length,c=t(a+l);++s<a;)c[s]=e[s];for(var f=s;++u<l;)c[f+u]=n[u];for(;++i<o;)c[f+r[i]]=e[s++];return c}function fr(e,t){return function(n,r,i){var o=t?t():{};if(r=qr(r,i,3),bs(n))for(var s=-1,a=n.length;++s<a;){var u=n[s];e(o,u,r(u,s,n),n)}else _n(n,function(t,n,i){e(o,t,r(t,n,i),i)});return o}}function hr(e){return ls(function(t,n){var r=-1,i=null==t?0:n.length,s=i>2?n[i-2]:o,a=i>2?n[2]:o,u=i>1?n[i-1]:o;for("function"==typeof s?(s=ar(s,u,5),i-=2):(s="function"==typeof u?u:o,i-=s?1:0),a&&ni(n[0],n[1],a)&&(s=i<3?o:s,i=1);++r<i;){var l=n[r];l&&e(t,l,s)}return t})}function pr(e,t){return function(n,r){var i=n?Wr(n):0;if(!oi(i))return e(n,r);for(var o=t?i:-1,s=yi(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function dr(e){return function(t,n,r){for(var i=yi(t),o=r(t),s=o.length,a=e?s:-1;e?a--:++a<s;){var u=o[a];if(!1===n(i[u],u,i))break}return t}}function mr(e,t){var n=br(e);function r(){var i=this&&this!==Fe&&this instanceof r?n:e;return i.apply(t,arguments)}return r}function gr(e){return gt&&ct?new $t(e):null}function yr(e){return function(t){for(var n=-1,r=Fa(va(t)),i=r.length,o="";++n<i;)o=e(o,r[n],n);return o}}function br(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=bn(e.prototype),r=e.apply(n,t);return As(r)?r:n}}function vr(e){function t(n,r,i){i&&ni(n,r,i)&&(r=o);var s=Fr(n,e,o,o,o,o,o,r);return s.placeholder=t.placeholder,s}return t}function wr(e,t){return ls(function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(o,n))})}function _r(e,t){return function(n,r,i){if(i&&ni(n,r,i)&&(r=o),r=qr(r,i,3),1==r.length){n=bs(n)?n:gi(n);var s=tn(n,r,e,t);if(!n.length||s!==t)return s}return En(n,r,e,t)}}function kr(e,t){return function(n,r,i){if(r=qr(r,i,3),bs(n)){var s=Ue(n,r,t);return s>-1?n[s]:o}return An(n,r,e)}}function Sr(e){return function(t,n,r){return t&&t.length?(n=qr(n,r,3),Ue(t,n,e)):-1}}function Er(e){return function(t,n,r){return n=qr(n,r,3),An(t,n,e,!0)}}function xr(e){return function(){for(var n,r=arguments.length,i=e?r:-1,s=0,a=t(r);e?i--:++i<r;){var u=a[s++]=arguments[i];if("function"!=typeof u)throw new Ce(S);!n&&Mt.prototype.thru&&"wrapper"==Hr(u)&&(n=new Mt([],!0))}for(i=n?-1:r;++i<r;){u=a[i];var l=Hr(u),f="wrapper"==l?Kr(u):o;n=f&&ii(f[0])&&f[1]==(d|c|h|m)&&!f[4].length&&1==f[9]?n[Hr(f[0])].apply(n,f[3]):1==u.length&&ii(u)?n[l]():n.thru(u)}return function(){var e=arguments,t=e[0];if(n&&1==e.length&&bs(t)&&t.length>=w)return n.plant(t).value();for(var i=0,o=r?a[i].apply(this,e):t;++i<r;)o=a[i].call(this,o);return o}}}function Cr(e,t){return function(n,r,i){return"function"==typeof r&&i===o&&bs(n)?e(n,r):t(n,ar(r,i,3))}}function Ar(e){return function(t,n,r){return"function"==typeof n&&r===o||(n=ar(n,r,3)),e(t,n,ia)}}function Ir(e){return function(t,n,r){return"function"==typeof n&&r===o||(n=ar(n,r,3)),e(t,n)}}function Tr(e){return function(t,n,r){var i={};return n=qr(n,r,3),Pn(t,function(t,r,o){var s=n(t,r,o);r=e?s:r,t=e?t:s,i[r]=t}),i}}function jr(e){return function(t,n,r){return t=Ke(t),(e?t:"")+Rr(t,n,r)+(e?"":t)}}function Or(e){var t=ls(function(n,r){var i=tt(r,t.placeholder);return Fr(n,e,o,r,i)});return t}function Pr(e,t){return function(n,r,i,s){var a=arguments.length<3;return"function"==typeof r&&s===o&&bs(n)?e(n,r,i,a):Gn(n,qr(r,s,4),i,a,t)}}function Br(e,n,r,i,s,m,g,y,b,v){var w=n&d,_=n&a,k=n&u,S=n&c,E=n&l,x=n&f,C=k?o:br(e);function A(){for(var l=arguments.length,c=l,f=t(l);c--;)f[c]=arguments[c];if(i&&(f=lr(f,i,s)),m&&(f=cr(f,m,g)),S||x){var d=A.placeholder,I=tt(f,d);if(l-=I.length,l<v){var T=y?Zt(y):o,j=_t(v-l,0),O=S?I:o,P=S?o:I,B=S?f:o,R=S?o:f;n|=S?h:p,n&=~(S?p:h),E||(n&=~(a|u));var N=[e,n,r,B,O,R,P,T,b,j],M=Br.apply(o,N);return ii(e)&&hi(M,N),M.placeholder=d,M}}var L=_?r:this,F=k?L[e]:e;return y&&(f=fi(f,y)),w&&b<f.length&&(f.length=b),this&&this!==Fe&&this instanceof A&&(F=C||br(e)),F.apply(L,f)}return A}function Rr(e,t,n){var r=e.length;if(t=+t,r>=t||!vt(t))return"";var i=t-r;return n=null==n?" ":n+"",Ia(n,mt(i/n.length)).slice(0,i)}function Nr(e,n,r,i){var o=n&a,s=br(e);function u(){for(var n=-1,a=arguments.length,l=-1,c=i.length,f=t(c+a);++l<c;)f[l]=i[l];for(;a--;)f[l++]=arguments[++n];var h=this&&this!==Fe&&this instanceof u?s:e;return h.apply(o?r:this,f)}return u}function Mr(e){var t=O[e];return function(e,n){return n=n===o?0:+n||0,n?(n=ut(10,n),t(e*n)/n):t(e)}}function Lr(e){return function(t,n,r,i){var o=qr(r);return null==r&&o===gn?or(t,n,e):sr(t,n,o(r,i,1),e)}}function Fr(e,t,n,r,i,s,l,c){var f=t&u;if(!f&&"function"!=typeof e)throw new Ce(S);var d=r?r.length:0;if(d||(t&=~(h|p),r=i=o),d-=i?i.length:0,t&p){var m=r,g=i;r=i=o}var y=f?o:Kr(e),b=[e,t,n,r,i,m,g,s,l,c];if(y&&(ai(b,y),t=b[1],c=b[9]),b[9]=null==c?f?0:e.length:_t(c-d,0)||0,t==a)var v=mr(b[0],b[2]);else v=t!=h&&t!=(a|h)||b[4].length?Br.apply(o,b):Nr.apply(o,b);var w=y?Yn:hi;return w(v,b)}function Dr(e,t,n,r,i,s,a){var u=-1,l=e.length,c=t.length;if(l!=c&&!(i&&c>l))return!1;for(;++u<l;){var f=e[u],h=t[u],p=r?r(i?h:f,i?f:h,u):o;if(p!==o){if(p)continue;return!1}if(i){if(!un(t,function(e){return f===e||n(f,e,r,i,s,a)}))return!1}else if(f!==h&&!n(f,h,r,i,s,a))return!1}return!0}function Ur(e,t,n){switch(n){case A:case I:return+e==+t;case T:return e.name==t.name&&e.message==t.message;case P:return e!=+e?t!=+t:e==+t;case R:case M:return e==t+""}return!1}function zr(e,t,n,r,i,s,a){var u=ra(e),l=u.length,c=ra(t),f=c.length;if(l!=f&&!i)return!1;for(var h=l;h--;){var p=u[h];if(!(i?p in t:Oe.call(t,p)))return!1}for(var d=i;++h<l;){p=u[h];var m=e[p],g=t[p],y=r?r(i?g:m,i?m:g,p):o;if(!(y===o?n(m,g,r,i,s,a):y))return!1;d||(d="constructor"==p)}if(!d){var b=e.constructor,v=t.constructor;if(b!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v))return!1}return!0}function qr(e,t,n){var r=Rt.callback||Ua;return r=r===Ua?gn:r,n?r(e,t,n):r}var Kr=Pt?function(e){return Pt.get(e)}:Ya;function Hr(e){for(var t=e.name,n=Bt[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Vr(e,t,n){var r=Rt.indexOf||Bi;return r=r===Bi?ze:r,e?r(e,t,n):r}var Wr=Hn("length");function $r(e){for(var t=ua(e),n=t.length;n--;)t[n][2]=si(t[n][1]);return t}function Gr(e,t){var n=null==e?o:e[t];return js(n)?n:o}function Yr(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=kt(t,e+s);break;case"takeRight":e=_t(e,t-s)}}return{start:e,end:t}}function Jr(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Zr(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=L),new t}function Xr(e,t,n){var r=e.constructor;switch(t){case F:return ur(e);case A:case I:return new r(+e);case D:case U:case z:case q:case K:case H:case V:case W:case $:var i=e.buffer;return new r(n?ur(i):i,e.byteOffset,e.length);case P:case M:return new r(e);case R:var o=new r(e.source,he.exec(e));o.lastIndex=e.lastIndex}return o}function Qr(e,t,n){null==e||ri(t,e)||(t=bi(t),e=1==t.length?e:Nn(e,Jn(t,0,-1)),t=Mi(t));var r=null==e?e:e[t];return null==r?o:r.apply(e,n)}function ei(e){return null!=e&&oi(Wr(e))}function ti(e,t){return e="number"==typeof e||me.test(e)?+e:-1,t=null==t?Ot:t,e>-1&&e%1==0&&e<t}function ni(e,t,n){if(!As(n))return!1;var r=typeof t;if("number"==r?ei(n)&&ti(t,n.length):"string"==r&&t in n){var i=n[t];return e==e?e===i:i!=i}return!1}function ri(e,t){var n=typeof e;if("string"==n&&oe.test(e)||"number"==n)return!0;if(bs(e))return!1;var r=!ie.test(e);return r||null!=t&&e in yi(t)}function ii(e){var t=Hr(e);if(!(t in Ft.prototype))return!1;var n=Rt[t];if(e===n)return!0;var r=Kr(n);return!!r&&e===r[0]}function oi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ot}function si(e){return e==e&&!As(e)}function ai(e,t){var n=e[1],r=t[1],i=n|r,o=i<d,s=r==d&&n==c||r==d&&n==m&&e[7].length<=t[8]||r==(d|m)&&n==c;if(!o&&!s)return e;r&a&&(e[2]=t[2],i|=n&a?0:l);var u=t[3];if(u){var f=e[3];e[3]=f?lr(f,u,t[4]):Zt(u),e[4]=f?tt(e[3],E):Zt(t[4])}return u=t[5],u&&(f=e[5],e[5]=f?cr(f,u,t[6]):Zt(u),e[6]=f?tt(e[5],E):Zt(t[6])),u=t[7],u&&(e[7]=Zt(u)),r&d&&(e[8]=null==e[8]?t[8]:kt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ui(e,t){return e===o?t:qs(e,t,ui)}function li(e,t){e=yi(e);for(var n=-1,r=t.length,i={};++n<r;){var o=t[n];o in e&&(i[o]=e[o])}return i}function ci(e,t){var n={};return On(e,function(e,r,i){t(e,r,i)&&(n[r]=e)}),n}function fi(e,t){for(var n=e.length,r=kt(t.length,n),i=Zt(e);r--;){var s=t[r];e[r]=ti(s,n)?i[s]:o}return e}var hi=(pi=0,di=0,function(e,t){var n=qo(),r=v-(n-di);if(di=n,r>0){if(++pi>=b)return e}else pi=0;return Yn(e,t)}),pi,di;function mi(e){for(var t=ia(e),n=t.length,r=n&&e.length,i=!!r&&oi(r)&&(bs(e)||ys(e)),o=-1,s=[];++o<n;){var a=t[o];(i&&ti(a,r)||Oe.call(e,a))&&s.push(a)}return s}function gi(e){return null==e?[]:ei(e)?As(e)?e:L(e):pa(e)}function yi(e){return As(e)?e:L(e)}function bi(e){if(bs(e))return e;var t=[];return Ke(e).replace(se,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t}function vi(e){return e instanceof Ft?e.clone():new Mt(e.__wrapped__,e.__chain__,Zt(e.__actions__))}function wi(e,n,r){n=(r?ni(e,n,r):null==n)?1:_t(yt(n)||1,1);for(var i=0,o=e?e.length:0,s=-1,a=t(mt(o/n));i<o;)a[++s]=Jn(e,i,i+=n);return a}function _i(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i}var ki=ls(function(e,t){return Qe(e)&&ei(e)?wn(e,In(t,!1,!0)):[]});function Si(e,t,n){var r=e?e.length:0;return r?((n?ni(e,t,n):null==t)&&(t=1),Jn(e,t<0?0:t)):[]}function Ei(e,t,n){var r=e?e.length:0;return r?((n?ni(e,t,n):null==t)&&(t=1),t=r-(+t||0),Jn(e,0,t<0?0:t)):[]}function xi(e,t,n){return e&&e.length?rr(e,qr(t,n,3),!0,!0):[]}function Ci(e,t,n){return e&&e.length?rr(e,qr(t,n,3),!0):[]}function Ai(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&ni(e,t,n)&&(n=0,r=i),xn(e,t,n,r)):[]}var Ii=Sr(),Ti=Sr(!0);function ji(e){return e?e[0]:o}function Oi(e,t,n){var r=e?e.length:0;return n&&ni(e,t,n)&&(t=!1),r?In(e,t):[]}function Pi(e){var t=e?e.length:0;return t?In(e,!0):[]}function Bi(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?_t(r+n,0):n;else if(n){var i=or(e,t);return i<r&&(t==t?t===e[i]:e[i]!=e[i])?i:-1}return ze(e,t,n||0)}function Ri(e){return Ei(e,1)}var Ni=ls(function(e){for(var n=e.length,r=n,i=t(f),o=Vr(),s=o==ze,a=[];r--;){var u=e[r]=ei(u=e[r])?u:[];i[r]=s&&u.length>=120?gr(r&&u):null}var l=e[0],c=-1,f=l?l.length:0,h=i[0];e:for(;++c<f;)if(u=l[c],(h?Gt(h,u):o(a,u,0))<0){for(var r=n;--r;){var p=i[r];if((p?Gt(p,u):o(e[r],u,0))<0)continue e}h&&h.push(u),a.push(u)}return a});function Mi(e){var t=e?e.length:0;return t?e[t-1]:o}function Li(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?_t(r+n,0):kt(n||0,r-1))+1;else if(n){i=or(e,t,!0)-1;var o=e[i];return(t==t?t===o:o!=o)?i:-1}if(t!=t)return Xe(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Fi(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=Vr(),i=e.length;++n<i;)for(var o=0,s=e[n];(o=r(t,s,o))>-1;)ht.call(t,o,1);return t}var Di=ls(function(e,t){t=In(t);var n=dn(e,t);return Wn(e,t.sort(De)),n});function Ui(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],s=e.length;for(t=qr(t,n,3);++i<s;){var a=e[i];t(a,i,e)&&(r.push(a),o.push(i))}return Wn(e,o),r}function zi(e){return Si(e,1)}function qi(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&ni(e,t,n)&&(t=0,n=r),Jn(e,t,n)):[]}var Ki=Lr(),Hi=Lr(!0);function Vi(e,t,n){var r=e?e.length:0;return r?((n?ni(e,t,n):null==t)&&(t=1),Jn(e,0,t<0?0:t)):[]}function Wi(e,t,n){var r=e?e.length:0;return r?((n?ni(e,t,n):null==t)&&(t=1),t=r-(+t||0),Jn(e,t<0?0:t)):[]}function $i(e,t,n){return e&&e.length?rr(e,qr(t,n,3),!1,!0):[]}function Gi(e,t,n){return e&&e.length?rr(e,qr(t,n,3)):[]}var Yi=ls(function(e){return tr(In(e,!1,!0))});function Ji(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=ni(e,t,r)?o:t,t=!1);var s=qr();return null==n&&s===gn||(n=s(n,r,3)),t&&Vr()==ze?nt(e,n):tr(e,n)}function Zi(e){if(!e||!e.length)return[];var n=-1,r=0;e=nn(e,function(e){if(ei(e))return r=_t(e.length,r),!0});for(var i=t(r);++n<r;)i[n]=rn(e,Hn(n));return i}function Xi(e,t,n){var r=e?e.length:0;if(!r)return[];var i=Zi(e);return null==t?i:(t=ar(t,n,4),rn(i,function(e){return sn(e,t,o,!0)}))}var Qi=ls(function(e,t){return ei(e)?wn(e,t):[]});function eo(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(ei(n))var r=r?on(wn(r,n),wn(n,r)):n}return r?tr(r):[]}var to=ls(Zi);function no(e,t){var n=-1,r=e?e.length:0,i={};for(!r||t||bs(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}var ro=ls(function(e){var t=e.length,n=t>2?e[t-2]:o,r=t>1?e[t-1]:o;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):o,r=o),e.length=t,Xi(e,n,r)});function io(e){var t=Rt(e);return t.__chain__=!0,t}function oo(e,t,n){return t.call(n,e),e}function so(e,t,n){return t.call(n,e)}function ao(){return io(this)}function uo(){return new Mt(this.value(),this.__chain__)}var lo=ls(function(e){return e=In(e),this.thru(function(t){return Jt(bs(t)?t:[yi(t)],e)})});function co(e){for(var t,n=this;n instanceof Nt;){var r=vi(n);t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function fo(){var e=this.__wrapped__,t=function(e){return n&&n.__dir__<0?e:e.reverse()};if(e instanceof Ft){var n=e;return this.__actions__.length&&(n=new Ft(this)),n=n.reverse(),n.__actions__.push({func:so,args:[t],thisArg:o}),new Mt(n,this.__chain__)}return this.thru(t)}function ho(){return this.value()+""}function po(){return ir(this.__wrapped__,this.__actions__)}var mo=ls(function(e,t){return dn(e,In(t))}),go=fr(function(e,t,n){Oe.call(e,n)?++e[n]:e[n]=1});function yo(e,t,n){var r=bs(e)?en:Sn;return n&&ni(e,t,n)&&(t=o),"function"==typeof t&&n===o||(t=qr(t,n,3)),r(e,t)}function bo(e,t,n){var r=bs(e)?nn:Cn;return t=qr(t,n,3),r(e,t)}var vo=kr(_n),wo=kr(kn,!0);function _o(e,t){return vo(e,Un(t))}var ko=Cr(Xt,_n),So=Cr(Qt,kn),Eo=fr(function(e,t,n){Oe.call(e,n)?e[n].push(t):e[n]=[t]});function xo(e,t,n,r){var i=e?Wr(e):0;return oi(i)||(e=pa(e),i=e.length),n="number"!=typeof n||r&&ni(t,n,r)?0:n<0?_t(i+n,0):n||0,"string"==typeof e||!bs(e)&&Ns(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Vr(e,t,n)>-1}var Co=fr(function(e,t,n){e[n]=t}),Ao=ls(function(e,n,r){var i=-1,s="function"==typeof n,a=ri(n),u=ei(e)?t(e.length):[];return _n(e,function(e){var t=s?n:a&&null!=e?e[n]:o;u[++i]=t?t.apply(e,r):Qr(e,n,r)}),u});function Io(e,t,n){var r=bs(e)?rn:Dn;return t=qr(t,n,3),r(e,t)}var To=fr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function jo(e,t){return Io(e,Ja(t))}var Oo=Pr(sn,_n),Po=Pr(an,kn);function Bo(e,t,n){var r=bs(e)?nn:Cn;return t=qr(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Ro(e,t,n){if(n?ni(e,t,n):null==t){e=gi(e);var r=e.length;return r>0?e[$n(0,r-1)]:o}var i=-1,s=Us(e),r=s.length,a=r-1;for(t=kt(t<0?0:+t||0,r);++i<t;){var u=$n(i,a),l=s[u];s[u]=s[i],s[i]=l}return s.length=t,s}function No(e){return Ro(e,At)}function Mo(e){var t=e?Wr(e):0;return oi(t)?t:ra(e).length}function Lo(e,t,n){var r=bs(e)?un:Zn;return n&&ni(e,t,n)&&(t=o),"function"==typeof t&&n===o||(t=qr(t,n,3)),r(e,t)}function Fo(e,t,n){if(null==e)return[];n&&ni(e,t,n)&&(t=o);var r=-1;t=qr(t,n,3);var i=Dn(e,function(e,n,i){return{criteria:t(e,n,i),index:++r,value:e}});return Xn(i,We)}var Do=ls(function(e,t){if(null==e)return[];var n=t[2];return n&&ni(t[0],t[1],n)&&(t.length=1),Qn(e,In(t),[])});function Uo(e,t,n,r){return null==e?[]:(r&&ni(t,n,r)&&(n=o),bs(t)||(t=null==t?[]:[t]),bs(n)||(n=null==n?[]:[n]),Qn(e,t,n))}function zo(e,t){return bo(e,Un(t))}var qo=St||function(){return(new n).getTime()};function Ko(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new Ce(S);var n=e;e=t,t=n}return e=vt(e=+e)?e:0,function(){if(--e<1)return t.apply(this,arguments)}}function Ho(e,t,n){return n&&ni(e,t,n)&&(t=o),t=e&&null==t?e.length:_t(+t||0,0),Fr(e,d,o,o,o,o,t)}function Vo(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new Ce(S);var r=e;e=t,t=r}return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Wo=ls(function(e,t,n){var r=a;if(n.length){var i=tt(n,Wo.placeholder);r|=h}return Fr(e,r,t,n,i)}),$o=ls(function(e,t){t=t.length?In(t):Qs(e);for(var n=-1,r=t.length;++n<r;){var i=t[n];e[i]=Fr(e[i],a,e)}return e}),Go=ls(function(e,t,n){var r=a|u;if(n.length){var i=tt(n,Go.placeholder);r|=h}return Fr(t,r,e,n,i)}),Yo=vr(c),Jo=vr(f);function Zo(e,t,n){var r,i,s,a,u,l,c,f=0,h=!1,p=!0;if("function"!=typeof e)throw new Ce(S);if(t=t<0?0:+t||0,!0===n){var d=!0;p=!1}else As(n)&&(d=!!n.leading,h="maxWait"in n&&_t(+n.maxWait||0,t),p="trailing"in n?!!n.trailing:p);function m(){l&&Le(l),i&&Le(i),f=0,i=l=c=o}function g(t,n){n&&Le(n),i=l=c=o,t&&(f=qo(),s=e.apply(u,r),l||i||(r=u=o))}function y(){var e=t-(qo()-a);e<=0||e>t?g(c,i):l=ft(y,e)}function b(){g(p,l)}function v(){if(r=arguments,a=qo(),u=this,c=p&&(l||!d),!1===h)var n=d&&!l;else{i||d||(f=a);var m=h-(a-f),g=m<=0||m>h;g?(i&&(i=Le(i)),f=a,s=e.apply(u,r)):i||(i=ft(b,m))}return g&&l?l=Le(l):l||t===h||(l=ft(y,t)),n&&(g=!0,s=e.apply(u,r)),!g||l||i||(r=u=o),s}return v.cancel=m,v}var Xo=ls(function(e,t){return vn(e,1,t)}),Qo=ls(function(e,t,n){return vn(e,t,n)}),es=xr(),ts=xr(!0);function ns(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Ce(S);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new ns.Cache,n}var rs=ls(function(e,t){if(t=In(t),"function"!=typeof e||!en(t,qe))throw new Ce(S);var n=t.length;return ls(function(r){for(var i=kt(r.length,n);i--;)r[i]=t[i](r[i]);return e.apply(this,r)})});function is(e){if("function"!=typeof e)throw new Ce(S);return function(){return!e.apply(this,arguments)}}function os(e){return Vo(2,e)}var ss=Or(h),as=Or(p),us=ls(function(e,t){return Fr(e,m,o,o,o,In(t))});function ls(e,n){if("function"!=typeof e)throw new Ce(S);return n=_t(n===o?e.length-1:+n||0,0),function(){for(var r=arguments,i=-1,o=_t(r.length-n,0),s=t(o);++i<o;)s[i]=r[n+i];switch(n){case 0:return e.call(this,s);case 1:return e.call(this,r[0],s);case 2:return e.call(this,r[0],r[1],s)}var a=t(n+1);for(i=-1;++i<n;)a[i]=r[i];return a[n]=s,e.apply(this,a)}}function cs(e){if("function"!=typeof e)throw new Ce(S);return function(t){return e.apply(this,t)}}function fs(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ce(S);return!1===n?r=!1:As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Zo(e,t,{leading:r,maxWait:+t,trailing:i})}function hs(e,t){return t=null==t?qa:t,Fr(t,h,o,[e],[])}function ps(e,t,n,r){return t&&"boolean"!=typeof t&&ni(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?yn(e,t,ar(n,r,1)):yn(e,t)}function ds(e,t,n){return"function"==typeof t?yn(e,!0,ar(t,n,1)):yn(e,!0)}function ms(e,t){return e>t}function gs(e,t){return e>=t}function ys(e){return Qe(e)&&ei(e)&&Oe.call(e,"callee")&&!lt.call(e,"callee")}var bs=bt||function(e){return Qe(e)&&oi(e.length)&&Be.call(e)==C};function vs(e){return!0===e||!1===e||Qe(e)&&Be.call(e)==A}function ws(e){return Qe(e)&&Be.call(e)==I}function _s(e){return!!e&&1===e.nodeType&&Qe(e)&&!Bs(e)}function ks(e){return null==e||(ei(e)&&(bs(e)||Ns(e)||ys(e)||Qe(e)&&Cs(e.splice))?!e.length:!ra(e).length)}function Ss(e,t,n,r){n="function"==typeof n?ar(n,r,3):o;var i=n?n(e,t):o;return i===o?Mn(e,t,n):!!i}function Es(e){return Qe(e)&&"string"==typeof e.message&&Be.call(e)==T}function xs(e){return"number"==typeof e&&vt(e)}function Cs(e){return As(e)&&Be.call(e)==j}function As(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Is(e,t,n,r){return n="function"==typeof n?ar(n,r,3):o,Fn(e,$r(t),n)}function Ts(e){return Ps(e)&&e!=+e}function js(e){return null!=e&&(Cs(e)?Ne.test(je.call(e)):Qe(e)&&de.test(e))}function Os(e){return null===e}function Ps(e){return"number"==typeof e||Qe(e)&&Be.call(e)==P}function Bs(e){var t,n;return!(!Qe(e)||Be.call(e)!=B||ys(e)||!(Oe.call(e,"constructor")||(t=e.constructor,"function"!=typeof t||t instanceof t)))&&(On(e,function(e,t){n=t}),n===o||Oe.call(e,n))}function Rs(e){return As(e)&&Be.call(e)==R}function Ns(e){return"string"==typeof e||Qe(e)&&Be.call(e)==M}function Ms(e){return Qe(e)&&oi(e.length)&&!!Ee[Be.call(e)]}function Ls(e){return e===o}function Fs(e,t){return e<t}function Ds(e,t){return e<=t}function Us(e){var t=e?Wr(e):0;return oi(t)?t?Zt(e):[]:pa(e)}function zs(e){return mn(e,ia(e))}var qs=hr(qn),Ks=hr(function(e,t,n){return n?hn(e,t,n):pn(e,t)});function Hs(e,t,n){var r=bn(e);return n&&ni(e,t,n)&&(t=o),t?pn(r,t):r}var Vs=wr(Ks,cn),Ws=wr(qs,ui),$s=Er(Pn),Gs=Er(Bn),Ys=Ar(Tn),Js=Ar(jn),Zs=Ir(Pn),Xs=Ir(Bn);function Qs(e){return Rn(e,ia(e))}function ea(e,t,n){var r=null==e?o:Nn(e,bi(t),t+"");return r===o?n:r}function ta(e,t){if(null==e)return!1;var n=Oe.call(e,t);if(!n&&!ri(t)){if(t=bi(t),e=1==t.length?e:Nn(e,Jn(t,0,-1)),null==e)return!1;t=Mi(t),n=Oe.call(e,t)}return n||oi(e.length)&&ti(t,e.length)&&(bs(e)||ys(e))}function na(e,t,n){n&&ni(e,t,n)&&(t=o);for(var r=-1,i=ra(e),s=i.length,a={};++r<s;){var u=i[r],l=e[u];t?Oe.call(a,l)?a[l].push(u):a[l]=[u]:a[l]=u}return a}var ra=wt?function(e){var t=null==e?o:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&ei(e)?mi(e):As(e)?wt(e):[]}:mi;function ia(e){if(null==e)return[];As(e)||(e=L(e));var n=e.length;n=n&&oi(n)&&(bs(e)||ys(e))&&n||0;for(var r=e.constructor,i=-1,o="function"==typeof r&&r.prototype===e,s=t(n),a=n>0;++i<n;)s[i]=i+"";for(var u in e)a&&ti(u,n)||"constructor"==u&&(o||!Oe.call(e,u))||s.push(u);return s}var oa=Tr(!0),sa=Tr(),aa=ls(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=rn(In(t),_e);return li(e,wn(ia(e),t))}var n=ar(t[0],t[1],3);return ci(e,function(e,t,r){return!n(e,t,r)})});function ua(e){e=yi(e);for(var n=-1,r=ra(e),i=r.length,o=t(i);++n<i;){var s=r[n];o[n]=[s,e[s]]}return o}var la=ls(function(e,t){return null==e?{}:"function"==typeof t[0]?ci(e,ar(t[0],t[1],3)):li(e,In(t))});function ca(e,t,n){var r=null==e?o:e[t];return r===o&&(null==e||ri(t,e)||(t=bi(t),e=1==t.length?e:Nn(e,Jn(t,0,-1)),r=null==e?o:e[Mi(t)]),r=r===o?n:r),Cs(r)?r.call(e):r}function fa(e,t,n){if(null==e)return e;var r=t+"";t=null!=e[r]||ri(t,e)?[r]:bi(t);for(var i=-1,o=t.length,s=o-1,a=e;null!=a&&++i<o;){var u=t[i];As(a)&&(i==s?a[u]=n:null==a[u]&&(a[u]=ti(t[i+1])?[]:{})),a=a[u]}return e}function ha(e,t,n,r){var i=bs(e)||Ms(e);if(t=qr(t,r,4),null==n)if(i||As(e)){var s=e.constructor;n=i?bs(e)?new s:[]:bn(Cs(s)?s.prototype:o)}else n={};return(i?Xt:Pn)(e,function(e,r,i){return t(n,e,r,i)}),n}function pa(e){return nr(e,ra(e))}function da(e){return nr(e,ia(e))}function ma(e,t,n){return t=+t||0,n===o?(n=t,t=0):n=+n||0,e>=kt(t,n)&&e<_t(t,n)}function ga(e,t,n){n&&ni(e,t,n)&&(t=n=o);var r=null==e,i=null==t;if(null==n&&(i&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,i=!0)),r&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var s=xt();return kt(e+s*(t-e+et("1e-"+((s+"").length-1))),t)}return $n(e,t)}var ya=yr(function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)});function ba(e){return e=Ke(e),e&&e.charAt(0).toUpperCase()+e.slice(1)}function va(e){return e=Ke(e),e&&e.replace(ge,Ge).replace(le,"")}function wa(e,t,n){e=Ke(e),t+="";var r=e.length;return n=n===o?r:kt(n<0?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function _a(e){return e=Ke(e),e&&ee.test(e)?e.replace(X,Ye):e}function ka(e){return e=Ke(e),e&&ue.test(e)?e.replace(ae,Je):e||"(?:)"}var Sa=yr(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});function Ea(e,t,n){e=Ke(e),t=+t;var r=e.length;if(r>=t||!vt(t))return e;var i=(t-r)/2,o=yt(i),s=mt(i);return n=Rr("",s,n),n.slice(0,o)+e+n}var xa=jr(),Ca=jr(!0);function Aa(e,t,n){return(n?ni(e,t,n):null==t)?t=0:t&&(t=+t),e=Ba(e),Et(e,t||(pe.test(e)?16:10))}function Ia(e,t){var n="";if(e=Ke(e),t=+t,t<1||!e||!vt(t))return n;do{t%2&&(n+=e),t=yt(t/2),e+=e}while(t);return n}var Ta=yr(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),ja=yr(function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))});function Oa(e,t,n){return e=Ke(e),n=null==n?0:kt(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function Pa(e,t,n){var r=Rt.templateSettings;n&&ni(e,t,n)&&(t=n=o),e=Ke(e),t=hn(pn({},n||t),r,fn);var s=hn(pn({},t.imports),r.imports,fn),a=ra(s),u=nr(s,a),l,c,f=0,h=t.interpolate||ye,p="__p += '",d=we((t.escape||ye).source+"|"+h.source+"|"+(h===re?fe:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),m="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Se+"]")+"\n";e.replace(d,function(t,n,r,i,o,s){return r||(r=i),p+=e.slice(f,s).replace(be,Ze),n&&(l=!0,p+="' +\n__e("+n+") +\n'"),o&&(c=!0,p+="';\n"+o+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=s+t.length,t}),p+="';\n";var g=t.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(c?p.replace(G,""):p).replace(Y,"$1").replace(J,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Da(function(){return i(a,m+"return "+p).apply(o,u)});if(y.source=p,Es(y))throw y;return y}function Ba(e,t,n){var r=e;return e=Ke(e),e?(n?ni(r,t,n):null==t)?e.slice(rt(e),it(e)+1):(t+="",e.slice(He(e,t),Ve(e,t)+1)):e}function Ra(e,t,n){var r=e;return e=Ke(e),e?(n?ni(r,t,n):null==t)?e.slice(rt(e)):e.slice(He(e,t+"")):e}function Na(e,t,n){var r=e;return e=Ke(e),e?(n?ni(r,t,n):null==t)?e.slice(0,it(e)+1):e.slice(0,Ve(e,t+"")+1):e}function Ma(e,t,n){n&&ni(e,t,n)&&(t=o);var r=g,i=y;if(null!=t)if(As(t)){var s="separator"in t?t.separator:s;r="length"in t?+t.length||0:r,i="omission"in t?Ke(t.omission):i}else r=+t||0;if(e=Ke(e),r>=e.length)return e;var a=r-i.length;if(a<1)return i;var u=e.slice(0,a);if(null==s)return u+i;if(Rs(s)){if(e.slice(a).search(s)){var l,c,f=e.slice(0,a);for(s.global||(s=we(s.source,(he.exec(s)||"")+"g")),s.lastIndex=0;l=s.exec(f);)c=l.index;u=u.slice(0,null==c?a:c)}}else if(e.indexOf(s,a)!=a){var h=u.lastIndexOf(s);h>-1&&(u=u.slice(0,h))}return u+i}function La(e){return e=Ke(e),e&&Q.test(e)?e.replace(Z,ot):e}function Fa(e,t,n){return n&&ni(e,t,n)&&(t=o),e=Ke(e),e.match(t||ve)||[]}var Da=ls(function(e,t){try{return e.apply(o,t)}catch(e){return Es(e)?e:new r(e)}});function Ua(e,t,n){return n&&ni(e,t,n)&&(t=o),Qe(e)?Ka(e):gn(e,t)}function za(e){return function(){return e}}function qa(e){return e}function Ka(e){return Un(yn(e,!0))}function Ha(e,t){return zn(e,yn(t,!0))}var Va=ls(function(e,t){return function(n){return Qr(n,e,t)}}),Wa=ls(function(e,t){return function(n){return Qr(e,n,t)}});function $a(e,t,n){if(null==n){var r=As(t),i=r?ra(t):o,s=i&&i.length?Rn(t,i):o;(s?s.length:r)||(s=!1,n=t,t=e,e=this)}s||(s=Rn(t,ra(t)));var a=!0,u=-1,l=Cs(e),c=s.length;!1===n?a=!1:As(n)&&"chain"in n&&(a=n.chain);for(;++u<c;){var f=s[u],h=t[f];e[f]=h,l&&(e.prototype[f]=function(t){return function(){var n=this.__chain__;if(a||n){var r=e(this.__wrapped__),i=r.__actions__=Zt(this.__actions__);return i.push({func:t,args:arguments,thisArg:e}),r.__chain__=n,r}return t.apply(e,on([this.value()],arguments))}}(h))}return e}function Ga(){return Fe._=Re,this}function Ya(){}function Ja(e){return ri(e)?Hn(e):Vn(e)}function Za(e){return function(t){return Nn(e,bi(t),t+"")}}function Xa(e,n,r){r&&ni(e,n,r)&&(n=r=o),e=+e||0,r=null==r?1:+r||0,null==n?(n=e,e=0):n=+n||0;for(var i=-1,s=_t(mt((n-e)/(r||1)),0),a=t(s);++i<s;)a[i]=e,e+=r;return a}function Qa(e,n,r){if(e=yt(e),e<1||!vt(e))return[];var i=-1,o=t(kt(e,It));for(n=ar(n,r,1);++i<e;)i<It?o[i]=n(i):n(i);return o}function eu(e){var t=++Pe;return Ke(e)+t}function tu(e,t){return(+e||0)+(+t||0)}var nu=Mr("ceil"),ru=Mr("floor"),iu=_r(ms,Ct),ou=_r(Fs,At),su=Mr("round"),au;function uu(e,t,n){return n&&ni(e,t,n)&&(t=o),t=qr(t,n,3),1==t.length?ln(bs(e)?e:gi(e),t):er(e,t)}return Rt.prototype=Nt.prototype,Mt.prototype=bn(Nt.prototype),Mt.prototype.constructor=Mt,Ft.prototype=bn(Nt.prototype),Ft.prototype.constructor=Ft,qt.prototype.delete=Kt,qt.prototype.get=Ht,qt.prototype.has=Vt,qt.prototype.set=Wt,$t.prototype.push=Yt,ns.Cache=qt,Rt.after=Ko,Rt.ary=Ho,Rt.assign=Ks,Rt.at=mo,Rt.before=Vo,Rt.bind=Wo,Rt.bindAll=$o,Rt.bindKey=Go,Rt.callback=Ua,Rt.chain=io,Rt.chunk=wi,Rt.compact=_i,Rt.constant=za,Rt.countBy=go,Rt.create=Hs,Rt.curry=Yo,Rt.curryRight=Jo,Rt.debounce=Zo,Rt.defaults=Vs,Rt.defaultsDeep=Ws,Rt.defer=Xo,Rt.delay=Qo,Rt.difference=ki,Rt.drop=Si,Rt.dropRight=Ei,Rt.dropRightWhile=xi,Rt.dropWhile=Ci,Rt.fill=Ai,Rt.filter=bo,Rt.flatten=Oi,Rt.flattenDeep=Pi,Rt.flow=es,Rt.flowRight=ts,Rt.forEach=ko,Rt.forEachRight=So,Rt.forIn=Ys,Rt.forInRight=Js,Rt.forOwn=Zs,Rt.forOwnRight=Xs,Rt.functions=Qs,Rt.groupBy=Eo,Rt.indexBy=Co,Rt.initial=Ri,Rt.intersection=Ni,Rt.invert=na,Rt.invoke=Ao,Rt.keys=ra,Rt.keysIn=ia,Rt.map=Io,Rt.mapKeys=oa,Rt.mapValues=sa,Rt.matches=Ka,Rt.matchesProperty=Ha,Rt.memoize=ns,Rt.merge=qs,Rt.method=Va,Rt.methodOf=Wa,Rt.mixin=$a,Rt.modArgs=rs,Rt.negate=is,Rt.omit=aa,Rt.once=os,Rt.pairs=ua,Rt.partial=ss,Rt.partialRight=as,Rt.partition=To,Rt.pick=la,Rt.pluck=jo,Rt.property=Ja,Rt.propertyOf=Za,Rt.pull=Fi,Rt.pullAt=Di,Rt.range=Xa,Rt.rearg=us,Rt.reject=Bo,Rt.remove=Ui,Rt.rest=zi,Rt.restParam=ls,Rt.set=fa,Rt.shuffle=No,Rt.slice=qi,Rt.sortBy=Fo,Rt.sortByAll=Do,Rt.sortByOrder=Uo,Rt.spread=cs,Rt.take=Vi,Rt.takeRight=Wi,Rt.takeRightWhile=$i,Rt.takeWhile=Gi,Rt.tap=oo,Rt.throttle=fs,Rt.thru=so,Rt.times=Qa,Rt.toArray=Us,Rt.toPlainObject=zs,Rt.transform=ha,Rt.union=Yi,Rt.uniq=Ji,Rt.unzip=Zi,Rt.unzipWith=Xi,Rt.values=pa,Rt.valuesIn=da,Rt.where=zo,Rt.without=Qi,Rt.wrap=hs,Rt.xor=eo,Rt.zip=to,Rt.zipObject=no,Rt.zipWith=ro,Rt.backflow=ts,Rt.collect=Io,Rt.compose=ts,Rt.each=ko,Rt.eachRight=So,Rt.extend=Ks,Rt.iteratee=Ua,Rt.methods=Qs,Rt.object=no,Rt.select=bo,Rt.tail=zi,Rt.unique=Ji,$a(Rt,Rt),Rt.add=tu,Rt.attempt=Da,Rt.camelCase=ya,Rt.capitalize=ba,Rt.ceil=nu,Rt.clone=ps,Rt.cloneDeep=ds,Rt.deburr=va,Rt.endsWith=wa,Rt.escape=_a,Rt.escapeRegExp=ka,Rt.every=yo,Rt.find=vo,Rt.findIndex=Ii,Rt.findKey=$s,Rt.findLast=wo,Rt.findLastIndex=Ti,Rt.findLastKey=Gs,Rt.findWhere=_o,Rt.first=ji,Rt.floor=ru,Rt.get=ea,Rt.gt=ms,Rt.gte=gs,Rt.has=ta,Rt.identity=qa,Rt.includes=xo,Rt.indexOf=Bi,Rt.inRange=ma,Rt.isArguments=ys,Rt.isArray=bs,Rt.isBoolean=vs,Rt.isDate=ws,Rt.isElement=_s,Rt.isEmpty=ks,Rt.isEqual=Ss,Rt.isError=Es,Rt.isFinite=xs,Rt.isFunction=Cs,Rt.isMatch=Is,Rt.isNaN=Ts,Rt.isNative=js,Rt.isNull=Os,Rt.isNumber=Ps,Rt.isObject=As,Rt.isPlainObject=Bs,Rt.isRegExp=Rs,Rt.isString=Ns,Rt.isTypedArray=Ms,Rt.isUndefined=Ls,Rt.kebabCase=Sa,Rt.last=Mi,Rt.lastIndexOf=Li,Rt.lt=Fs,Rt.lte=Ds,Rt.max=iu,Rt.min=ou,Rt.noConflict=Ga,Rt.noop=Ya,Rt.now=qo,Rt.pad=Ea,Rt.padLeft=xa,Rt.padRight=Ca,Rt.parseInt=Aa,Rt.random=ga,Rt.reduce=Oo,Rt.reduceRight=Po,Rt.repeat=Ia,Rt.result=ca,Rt.round=su,Rt.runInContext=st,Rt.size=Mo,Rt.snakeCase=Ta,Rt.some=Lo,Rt.sortedIndex=Ki,Rt.sortedLastIndex=Hi,Rt.startCase=ja,Rt.startsWith=Oa,Rt.sum=uu,Rt.template=Pa,Rt.trim=Ba,Rt.trimLeft=Ra,Rt.trimRight=Na,Rt.trunc=Ma,Rt.unescape=La,Rt.uniqueId=eu,Rt.words=Fa,Rt.all=yo,Rt.any=Lo,Rt.contains=xo,Rt.eq=Ss,Rt.detect=vo,Rt.foldl=Oo,Rt.foldr=Po,Rt.head=ji,Rt.include=xo,Rt.inject=Oo,$a(Rt,(au={},Pn(Rt,function(e,t){Rt.prototype[t]||(au[t]=e)}),au),!1),Rt.sample=Ro,Rt.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return Ro(t,e)}):Ro(this.value())},Rt.VERSION=s,Xt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Rt[e].placeholder=Rt}),Xt(["drop","take"],function(e,t){Ft.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new Ft(this);n=null==n?1:_t(yt(n)||0,0);var i=this.clone();return r?i.__takeCount__=kt(i.__takeCount__,n):i.__views__.push({size:n,type:e+(i.__dir__<0?"Right":"")}),i},Ft.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Xt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n!=k;Ft.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:qr(e,t,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),Xt(["first","last"],function(e,t){var n="take"+(t?"Right":"");Ft.prototype[e]=function(){return this[n](1).value()[0]}}),Xt(["initial","rest"],function(e,t){var n="drop"+(t?"":"Right");Ft.prototype[e]=function(){return this.__filtered__?new Ft(this):this[n](1)}}),Xt(["pluck","where"],function(e,t){var n=t?"filter":"map",r=t?Un:Ja;Ft.prototype[e]=function(e){return this[n](r(e))}}),Ft.prototype.compact=function(){return this.filter(qa)},Ft.prototype.reject=function(e,t){return e=qr(e,t,1),this.filter(function(t){return!e(t)})},Ft.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=this;return n.__filtered__&&(e>0||t<0)?new Ft(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=+t||0,n=t<0?n.dropRight(-t):n.take(t-e)),n)},Ft.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},Ft.prototype.toArray=function(){return this.take(At)},Pn(Ft.prototype,function(e,t){var n=/^(?:filter|map|reject)|While$/.test(t),r=/^(?:first|last)$/.test(t),i=Rt[r?"take"+("last"==t?"Right":""):t];i&&(Rt.prototype[t]=function(){var t=r?[1]:arguments,s=this.__chain__,a=this.__wrapped__,u=!!this.__actions__.length,l=a instanceof Ft,c=t[0],f=l||bs(a);f&&n&&"function"==typeof c&&1!=c.length&&(l=f=!1);var h=function(e){return r&&s?i(e,1)[0]:i.apply(o,on([e],t))},p={func:so,args:[h],thisArg:o},d=l&&!u;if(r&&!s)return d?(a=a.clone(),a.__actions__.push(p),e.call(a)):i.call(o,this.value())[0];if(!r&&f){a=d?a:new Ft(this);var m=e.apply(a,t);return m.__actions__.push(p),new Mt(m,s)}return this.thru(h)})}),Xt(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var t=(/^(?:replace|split)$/.test(e)?Te:Ae)[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(e);Rt.prototype[e]=function(){var e=arguments;return r&&!this.__chain__?t.apply(this.value(),e):this[n](function(n){return t.apply(n,e)})}}),Pn(Ft.prototype,function(e,t){var n=Rt[t];if(n){var r=n.name,i=Bt[r]||(Bt[r]=[]);i.push({name:t,func:n})}}),Bt[Br(o,u).name]=[{name:"wrapper",func:o}],Ft.prototype.clone=Dt,Ft.prototype.reverse=Ut,Ft.prototype.value=zt,Rt.prototype.chain=ao,Rt.prototype.commit=uo,Rt.prototype.concat=lo,Rt.prototype.plant=co,Rt.prototype.reverse=fo,Rt.prototype.toString=ho,Rt.prototype.run=Rt.prototype.toJSON=Rt.prototype.valueOf=Rt.prototype.value=po,Rt.prototype.collect=Rt.prototype.map,Rt.prototype.head=Rt.prototype.first,Rt.prototype.select=Rt.prototype.filter,Rt.prototype.tail=Rt.prototype.rest,Rt}var at=st();Fe._=at,i=function(){return at}.call(t,n,t,e),i===o||(e.exports=i)}).call(this)}).call(this,n(75)(e),n(8))},function(e,t,n){"use strict";(function(t){var r=n(799);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function i(e,t){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}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=n(13),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function e(){}.name;function c(e){return Object.prototype.toString.call(e)}function f(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=e.exports=v,p=/\s*function\s+([^\(\s]*)\s*/;function d(e){if(s.isFunction(e)){if(l)return e.name;var t=e.toString(),n=t.match(p);return n&&n[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(l||!s.isFunction(e))return s.inspect(e);var t=d(e),n=t?": "+t:"";return"[Function"+n+"]"}function y(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}function b(e,t,n,r,i){throw new h.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function v(e,t){e||b(e,!0,t,"==",h.ok)}function w(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;r=r||{actual:[],expected:[]};var a=r.actual.indexOf(e);return-1!==a&&a===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),k(e,t,n,r))}return n?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=_(e),o=_(t);if(i&&!o||!i&&o)return!1;if(i)return e=u.call(e),t=u.call(t),w(e,t,n);var a=I(e),l=I(t),c,f;if(a.length!==l.length)return!1;for(a.sort(),l.sort(),f=a.length-1;f>=0;f--)if(a[f]!==l[f])return!1;for(f=a.length-1;f>=0;f--)if(c=a[f],!w(e[c],t[c],n,r))return!1;return!0}function S(e,t,n){w(e,t,!0)&&b(e,t,n,"notDeepStrictEqual",S)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e){var t;try{e()}catch(e){t=e}return t}function C(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=x(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&b(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&s.isError(i),u=!e&&i&&!n;if((a&&o&&E(i,n)||u)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!E(i,n)||!e&&i)throw i}function A(e,t){e||b(e,!0,t,"==",A)}h.AssertionError=function e(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=y(this),this.generatedMessage=!0);var n=t.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,o=d(n),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},s.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function e(t,n,r){t!=n&&b(t,n,r,"==",h.equal)},h.notEqual=function e(t,n,r){t==n&&b(t,n,r,"!=",h.notEqual)},h.deepEqual=function e(t,n,r){w(t,n,!1)||b(t,n,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function e(t,n,r){w(t,n,!0)||b(t,n,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function e(t,n,r){w(t,n,!1)&&b(t,n,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=S,h.strictEqual=function e(t,n,r){t!==n&&b(t,n,r,"===",h.strictEqual)},h.notStrictEqual=function e(t,n,r){t===n&&b(t,n,r,"!==",h.notStrictEqual)},h.throws=function(e,t,n){C(!0,e,t,n)},h.doesNotThrow=function(e,t,n){C(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r(A,h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var I=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(8))},function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,n){t=e.exports=n(395),t.Stream=t,t.Readable=t,t.Writable=n(399),t.Duplex=n(136),t.Transform=n(400),t.PassThrough=n(765),t.finished=n(294),t.pipeline=n(766)},function(e,t,n){"use strict";const r=n(633),i=n(634),o=n(24);e.exports=(e=>{const t=r();if("function"==typeof e)return e;if("object"==typeof e)return i(e);if("string"==typeof e){const n=o(e).nodeAddress();return t.host=n.address,t.port=n.port,i(t)}throw new Error("Argument must be a send function or a config object.")})},function(e,t,n){"use strict";function r(e,t,n){var r=e instanceof Error?e:new Error(e),i;if("object"==typeof t?n=t:null!=t&&(r.code=t),n)for(i in n)r[i]=n[i];return r}e.exports=r},function(e,t,n){"use strict";(function(r){const i=n(35),o=n(456),s=n(18),a=n(11),u=n(53);class l{constructor(e,t,n){s(r.isBuffer(e),"invalid id provided"),t&&n&&s(t.public.bytes.equals(n.bytes),"inconsistent arguments"),this._id=e,this._idB58String=i.toB58String(this.id),this._privKey=t,this._pubKey=n}get id(){return this._id}set id(e){throw new Error("Id is immutable")}get privKey(){return this._privKey}set privKey(e){this._privKey=e}get pubKey(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0}set pubKey(e){this._pubKey=e}marshalPubKey(){if(this.pubKey)return o.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return o.marshalPrivateKey(this.privKey)}toPrint(){let e=this.toB58String();e.startsWith("Qm")&&(e=e.slice(2));let t=6;return e.length<t&&(t=e.length),"<peer.ID "+e.substr(0,t)+">"}toJSON(){return{id:this.toB58String(),privKey:f(this.marshalPrivKey()),pubKey:f(this.marshalPubKey())}}toHexString(){return i.toHexString(this.id)}toBytes(){return this.id}toB58String(){return this._idB58String}isEqual(e){if(r.isBuffer(e))return this.id.equals(e);if(e.id)return this.id.equals(e.id);throw new Error("not valid Id")}isValid(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&r.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}}const c=u(l,{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"});function f(e){if(e)return e.toString("base64")}t=e.exports=c,t.create=function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{},e.bits=e.bits||2048,a([t=>o.generateKeyPair("RSA",e.bits,t),(e,t)=>e.public.hash((n,r)=>{t(n,r,e)})],(e,n,r)=>{if(e)return t(e);t(null,new c(n,r))})},t.createFromHexString=function(e){return new c(i.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(i.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let n;try{let i=e;if("string"==typeof i&&(i=r.from(e,"base64")),!r.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer");n=o.unmarshalPublicKey(i)}catch(e){return t(e)}n.hash((e,r)=>{if(e)return t(e);t(null,new c(r,null,n))})},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let n=e;try{if("string"==typeof n&&(n=r.from(e,"base64")),!r.isBuffer(n))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}a([e=>o.unmarshalPrivateKey(n,e),(e,t)=>e.public.hash((n,r)=>{t(n,r,e)})],(e,n,r)=>{if(e)return t(e);t(null,new c(n,r,r.public))})},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required");let n,s,u,l;try{n=i.fromB58String(e.id),s=e.privKey&&r.from(e.privKey,"base64"),u=e.pubKey&&r.from(e.pubKey,"base64"),l=u&&o.unmarshalPublicKey(u)}catch(e){return t(e)}s?a([e=>o.unmarshalPrivateKey(s,e),(e,t)=>e.public.hash((n,r)=>{t(n,r,e)}),(e,t,n)=>{l?l.hash((r,i)=>{n(r,e,t,i)}):n(null,e,t)}],(e,r,i,o)=>e?t(e):l&&!r.equals(o)?t(new Error("Public and private key do not match")):n&&!r.equals(n)?t(new Error("Id and private key do not match")):void t(null,new c(n,i,l))):t(null,new c(n,null,l))},t.isPeerId=function(e){return Boolean("object"==typeof e&&e._id&&e._idB58String)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(937),o=n(320),s=n(39),a=n(76),u=n(53),l=u.proto(function(e){if(!(this instanceof l))return new l(e);if(null==e&&(e=""),e instanceof r)this.buffer=i.fromBuffer(e);else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error(`multiaddr "${e}" must start with a "/"`);this.buffer=i.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=i.fromBuffer(e.buffer)}},{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"});l.prototype.toString=function e(){return i.bufferToString(this.buffer)},l.prototype.toJSON=l.prototype.toString,l.prototype.toOptions=function e(){const t={},n=this.toString().split("/");return t.family="ip4"===n[1]?"ipv4":"ipv6",t.host=n[2],t.transport=n[3],t.port=n[4],t},l.prototype.inspect=function e(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+i.bufferToString(this.buffer)+">"},l.prototype.protos=function e(){return this.protoCodes().map(e=>Object.assign({},o(e)))},l.prototype.protoCodes=function e(){const t=[],n=this.buffer;let r=0;for(;r<n.length;){const e=s.decode(n,r),a=s.decode.bytes,u=o(e),l=i.sizeForAddr(u,n.slice(r+a));r+=l+a,t.push(e)}return t},l.prototype.protoNames=function e(){return this.protos().map(e=>e.name)},l.prototype.tuples=function e(){return i.bufferToTuples(this.buffer)},l.prototype.stringTuples=function e(){const t=i.bufferToTuples(this.buffer);return i.tuplesToStringTuples(t)},l.prototype.encapsulate=function e(t){return t=l(t),l(this.toString()+t.toString())},l.prototype.decapsulate=function e(t){t=t.toString();const n=this.toString(),r=n.lastIndexOf(t);if(r<0)throw new Error("Address "+this+" does not contain subaddress: "+t);return l(n.slice(0,r))},l.prototype.getPeerId=function e(){let t=null;try{t=this.stringTuples().filter(e=>{if(e[0]===o.names.ipfs.code)return!0})[0][1],a.decode(t)}catch(e){t=null}return t},l.prototype.getPath=function e(){let t=null;try{t=this.stringTuples().filter(e=>{const t=o(e[0]);if(t.path)return!0})[0][1]}catch(e){t=null}return t},l.prototype.equals=function e(t){return this.buffer.equals(t.buffer)},l.prototype.nodeAddress=function e(){const t=this.protoCodes(),n=this.protoNames(),r=this.toString().split("/").slice(1);if(r.length<4)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".');if(4!==t[0]&&41!==t[0]&&54!==t[0]&&55!==t[0])throw new Error(`no protocol with name: "'${n[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`);if("tcp"!==r[2]&&"udp"!==r[2])throw new Error(`no protocol with name: "'${n[1]}'". Must have a valid transport protocol: "{tcp, udp}".`);return{family:41===t[0]||55===t[0]?6:4,address:r[1],port:r[3]}},l.fromNodeAddress=function e(t,n){if(!t)throw new Error("requires node address object");if(!n)throw new Error("requires transport protocol");const r="IPv6"===t.family?"ip6":"ip4";return l("/"+[r,t.address,n,t.port].join("/"))},l.prototype.isThinWaistAddress=function e(t){const n=(t||this).protos();return 2===n.length&&((4===n[0].code||41===n[0].code)&&(6===n[1].code||273===n[1].code))},l.protocols=o,l.isName=function e(t){return!!l.isMultiaddr(t)&&t.protos().some(e=>e.resolvable)},l.resolve=function e(t,n){return l.isMultiaddr(t)&&l.isName(t)?n(new Error("not implemented yet")):n(new Error("not a valid name"))},t=e.exports=l}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(84),i=n(17);e.exports={checkState:function(e,t){if(!e)throw new r.InvalidState(t)},checkArgument:function(e,t,n,i){if(!e)throw new r.InvalidArgument(t,n,i)},checkArgumentType:function(e,t,o){if(o=o||"(unknown name)",i.isString(t)){if("Buffer"===t){var s=n(30);if(!s.isBuffer(e))throw new r.InvalidArgumentType(e,t,o)}else if(typeof e!==t)throw new r.InvalidArgumentType(e,t,o)}else if(!(e instanceof t))throw new r.InvalidArgumentType(e,t.name,o)}}},function(e,t,n){"use strict";var r=n(786),i=n(790),o=n(794);for(var s in t=e.exports=n(12),t.pull=t,r)t[s]=r[s];for(var s in o)t[s]=o[s];for(var s in i)t[s]=i[s]},function(e,t,n){(function(t,r){var i=n(18),o=n(57).Stream,s=n(13),a=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function u(e){return e.charAt(0).toUpperCase()+e.slice(1)}function l(e,t,n,r,o){throw new i.AssertionError({message:s.format("%s (%s) is required",e,t),actual:void 0===o?typeof r:o(r),expected:t,operator:n||"===",stackStartFunction:l.caller})}function c(e){return Object.prototype.toString.call(e).slice(8,-1)}function f(){}var h={bool:{check:function(e){return"boolean"==typeof e}},func:{check:function(e){return"function"==typeof e}},string:{check:function(e){return"string"==typeof e}},object:{check:function(e){return"object"==typeof e&&null!==e}},number:{check:function(e){return"number"==typeof e&&!isNaN(e)}},finite:{check:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return t.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof o},operator:"instanceof",actual:c},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:c},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:c},uuid:{check:function(e){return"string"==typeof e&&a.test(e)},operator:"isUUID"}};function p(e){var t=Object.keys(h),n;return n=r.env.NODE_NDEBUG?f:function(e,t){e||l(t,"true",e)},t.forEach(function(t){if(e)n[t]=f;else{var r=h[t];n[t]=function(e,n){r.check(e)||l(n,t,r.operator,e,r.actual)}}}),t.forEach(function(t){var r="optional"+u(t);if(e)n[r]=f;else{var i=h[t];n[r]=function(e,n){void 0!==e&&null!==e&&(i.check(e)||l(n,t,i.operator,e,i.actual))}}}),t.forEach(function(t){var r="arrayOf"+u(t);if(e)n[r]=f;else{var i=h[t],o="["+t+"]";n[r]=function(e,t){var n;for(Array.isArray(e)||l(t,o,i.operator,e,i.actual),n=0;n<e.length;n++)i.check(e[n])||l(t,o,i.operator,e,i.actual)}}}),t.forEach(function(t){var r="optionalArrayOf"+u(t);if(e)n[r]=f;else{var i=h[t],o="["+t+"]";n[r]=function(e,t){var n;if(void 0!==e&&null!==e)for(Array.isArray(e)||l(t,o,i.operator,e,i.actual),n=0;n<e.length;n++)i.check(e[n])||l(t,o,i.operator,e,i.actual)}}}),Object.keys(i).forEach(function(t){n[t]="AssertionError"!==t&&e?f:i[t]}),n._setExports=p,n}e.exports=p(r.env.NODE_NDEBUG)}).call(this,n(0).Buffer,n(2))},function(e,t,n){var r=n(1092);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},function(e,t,n){const r=n(4).Buffer,i=n(316),o=n(124),s=n(1352),a=n(45),u=n(93),l=n(579),c=n(36),f=n(1354),h=c.OP_RESERVED;function p(e){return u.Number(e)&&(e===c.OP_0||e>=c.OP_1&&e<=c.OP_16||e===c.OP_1NEGATE)}function d(e){return u.Buffer(e)||p(e)}function m(e){return u.Array(e)&&e.every(d)}function g(e){return 0===e.length?c.OP_0:1===e.length?e[0]>=1&&e[0]<=16?h+e[0]:129===e[0]?c.OP_1NEGATE:void 0:void 0}function y(e){if(r.isBuffer(e))return e;a(u.Array,e);const t=e.reduce(function(e,t){return r.isBuffer(t)?1===t.length&&void 0!==g(t)?e+1:e+s.encodingLength(t.length)+t.length:e+1},0),n=r.allocUnsafe(t);let i=0;if(e.forEach(function(e){if(r.isBuffer(e)){const t=g(e);if(void 0!==t)return n.writeUInt8(t,i),void(i+=1);i+=s.encode(n,e.length,i),e.copy(n,i),i+=e.length}else n.writeUInt8(e,i),i+=1}),i!==n.length)throw new Error("Could not decode chunks");return n}function b(e){if(u.Array(e))return e;a(u.Buffer,e);const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r>c.OP_0&&r<=c.OP_PUSHDATA4){const r=s.decode(e,n);if(null===r)return null;if(n+=r.size,n+r.number>e.length)return null;const i=e.slice(n,n+r.number);n+=r.number;const o=g(i);void 0!==o?t.push(o):t.push(i)}else t.push(r),n+=1}return t}function v(e){return r.isBuffer(e)&&(e=b(e)),e.map(function(e){if(r.isBuffer(e)){const t=g(e);if(void 0===t)return e.toString("hex");e=t}return f[e]}).join(" ")}function w(e){return a(u.String,e),y(e.split(" ").map(function(e){return void 0!==c[e]?c[e]:(a(u.Hex,e),r.from(e,"hex"))}))}function _(e){return e=b(e),a(m,e),e.map(function(e){return r.isBuffer(e)?e:e===c.OP_0?r.allocUnsafe(0):l.encode(e-h)})}function k(e){return o.isPoint(e)}function S(e){const t=-129&e;return t>0&&t<4}function E(e){return!!r.isBuffer(e)&&(!!S(e[e.length-1])&&i.check(e.slice(0,-1)))}e.exports={compile:y,decompile:b,fromASM:w,toASM:v,toStack:_,number:n(579),signature:n(1355),isCanonicalPubKey:k,isCanonicalScriptSignature:E,isPushOnly:m,isDefinedHashType:S}},function(e,t,n){"use strict";(function(t){var r=n(0),i=n(18),o=n(41),s=n(25);function a(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}e.exports={fill:function e(t,n){s.checkArgumentType(t,"Buffer","buffer"),s.checkArgumentType(n,"number","value");for(var r=t.length,i=0;i<r;i++)t[i]=n;return t},copy:function(e){var n=new t(e.length);return e.copy(n),n},isBuffer:function e(t){return r.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function e(t){s.checkArgumentType(t,"number","bytes");for(var n=new r.Buffer(t),i=0;i<t;i++)n.write("\0",i);return n},concat:r.Buffer.concat,equals:a,equal:a,integerAsSingleByteBuffer:function e(t){return s.checkArgumentType(t,"number","integer"),new r.Buffer([255&t])},integerAsBuffer:function e(n){s.checkArgumentType(n,"number","integer");var r=[];return r.push(n>>24&255),r.push(n>>16&255),r.push(n>>8&255),r.push(255&n),new t(r)},integerFromBuffer:function e(t){return s.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function e(t){return s.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function e(t){return s.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function e(t){for(var n=new r.Buffer(t.length),i=0;i<t.length;i++)n[i]=t[t.length-i-1];return n},hexToBuffer:function e(t){return i(o.isHexa(t)),new r.Buffer(t,"hex")}},e.exports.NULL_HASH=e.exports.fill(new t(32),0),e.exports.EMPTY_BUFFER=new t(0)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(0),i=r.Buffer,o={},s;for(s in r)r.hasOwnProperty(s)&&"SlowBuffer"!==s&&"Buffer"!==s&&(o[s]=r[s]);var a=o.Buffer={};for(s in i)i.hasOwnProperty(s)&&"allocUnsafe"!==s&&"allocUnsafeSlow"!==s&&(a[s]=i[s]);if(o.Buffer.prototype=i.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return i(e,t,n)}),a.alloc||(a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=i(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!o.kStringMaxLength)try{o.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),e.exports=o}).call(this,n(2))},function(e,t,n){"use strict";var r=n(213),i=n(738);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=_,t.resolve=S,t.resolveObject=E,t.format=k,t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r","\n","\t"],c=["{","}","|","\\","^","`"].concat(l),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],d=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=n(169);function _(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}function k(e){return i.isString(e)&&(e=_(e)),e instanceof o?e.format():o.prototype.format.call(e)}function S(e,t){return _(e,!1,!0).resolve(t)}function E(e,t){return e?_(e,!1,!0).resolveObject(t):t}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",l=e.split(a),c=/\\/g;l[0]=l[0].replace(c,"/"),e=l.join(a);var d=e;if(d=d.trim(),!n&&1===e.split("#").length){var _=u.exec(d);if(_)return this.path=d,this.href=d,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?w.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var k=s.exec(d);if(k){k=k[0];var S=k.toLowerCase();this.protocol=S,d=d.substr(k.length)}if(n||k||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===d.substr(0,2);!E||k&&b[k]||(d=d.substr(2),this.slashes=!0)}if(!b[k]&&(E||k&&!v[k])){for(var x=-1,C=0,A,I;C<p.length;C++){var T=d.indexOf(p[C]);-1!==T&&(-1===x||T<x)&&(x=T)}I=-1===x?d.lastIndexOf("@"):d.lastIndexOf("@",x),-1!==I&&(A=d.slice(0,I),d=d.slice(I+1),this.auth=decodeURIComponent(A)),x=-1;for(var C=0;C<h.length;C++){var T=d.indexOf(h[C]);-1!==T&&(-1===x||T<x)&&(x=T)}-1===x&&(x=d.length),this.host=d.slice(0,x),d=d.slice(x),this.parseHost(),this.hostname=this.hostname||"";var j="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!j)for(var O=this.hostname.split(/\./),C=0,P=O.length;C<P;C++){var B=O[C];if(B&&!B.match(m)){for(var R="",N=0,M=B.length;N<M;N++)B.charCodeAt(N)>127?R+="x":R+=B[N];if(!R.match(m)){var L=O.slice(0,C),F=O.slice(C+1),D=B.match(g);D&&(L.push(D[1]),F.unshift(D[2])),F.length&&(d="/"+F.join(".")+d),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+U,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==d[0]&&(d="/"+d))}if(!y[S])for(var C=0,P=f.length;C<P;C++){var q=f[C];if(-1!==d.indexOf(q)){var K=encodeURIComponent(q);K===q&&(K=escape(q)),d=d.split(q).join(K)}}var H=d.indexOf("#");-1!==H&&(this.hash=d.substr(H),d=d.slice(0,H));var V=d.indexOf("?");if(-1!==V?(this.search=d.substr(V),this.query=d.substr(V+1),t&&(this.query=w.parse(this.query)),d=d.slice(0,V)):t&&(this.search="",this.query={}),d&&(this.pathname=d),v[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",W=this.search||"";this.path=U+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=w.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+o+n+a+r},o.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(n[c]=e[c])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||b[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",g=n.search||"";n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||y||n.host&&e.pathname,k=_,S=n.pathname&&n.pathname.split("/")||[],d=e.pathname&&e.pathname.split("/")||[],E=n.protocol&&!v[n.protocol];if(E&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),_=_&&(""===d[0]||""===S[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=d;else if(d.length)S||(S=[]),S.pop(),S=S.concat(d),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E){n.hostname=n.host=S.shift();var x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");x&&(n.auth=x.shift(),n.host=n.hostname=x.shift())}return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=S.slice(-1)[0],A=(n.host||e.host||S.length>1)&&("."===C||".."===C)||""===C,I=0,T=S.length;T>=0;T--)C=S[T],"."===C?S.splice(T,1):".."===C?(S.splice(T,1),I++):I&&(S.splice(T,1),I--);if(!_&&!k)for(;I--;I)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var j=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(E){n.hostname=n.host=j?"":S.length?S.shift():"";var x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");x&&(n.auth=x.shift(),n.host=n.hostname=x.shift())}return _=_||n.host&&S.length,_&&!j&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";const r=n(412),i=n(803),o=n(298),s=n(415);t.Key=r,t.MemoryDatastore=i,t.utils=o,t.Errors=s},function(e,t,n){(function(t,r){var i=n(19),o=n(890),s=e.exports=i.util=i.util||{};function a(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function u(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(s.isArrayBuffer(e)||s.isArrayBufferView(e))if(void 0!==r&&e instanceof r)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var n=0;n<t.length;++n)this.putByte(t[n])}}else(e instanceof u||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==t&&t.nextTick&&!t.browser)return s.nextTick=t.nextTick,void("function"==typeof setImmediate?s.setImmediate=setImmediate:s.setImmediate=s.nextTick);if("function"==typeof setImmediate)return s.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(s.nextTick=function(e){return setImmediate(e)});if(s.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",n=[];function r(t){if(t.source===window&&t.data===e){t.stopPropagation();var r=n.slice();n.length=0,r.forEach(function(e){e()})}}s.setImmediate=function(t){n.push(t),1===n.length&&window.postMessage(e,"*")},window.addEventListener("message",r,!0)}if("undefined"!=typeof MutationObserver){var i=Date.now(),o=!0,a=document.createElement("div"),n=[];new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})}).observe(a,{attributes:!0});var u=s.setImmediate;s.setImmediate=function(e){Date.now()-i>15?(i=Date.now(),u(e)):(n.push(e),1===n.length&&a.setAttribute("a",o=!o))}}s.nextTick=s.setImmediate}(),s.isNodejs=void 0!==t&&t.versions&&t.versions.node,s.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},s.isArrayBufferView=function(e){return e&&s.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},s.ByteBuffer=u,s.ByteStringBuffer=u;var l=4096;function c(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var n=s.isArrayBuffer(e),r=s.isArrayBufferView(e);if(n||r)return this.data=n?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==e&&void 0!==e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}s.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},s.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)1&t&&(n+=e),t>>>=1,t>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this},s.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},s.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(s.encodeUtf8(e))},s.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},s.ByteStringBuffer.prototype.putInt=function(e,t){a(t);var n="";do{t-=8,n+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(n)},s.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},s.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},s.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},s.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},s.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},s.ByteStringBuffer.prototype.getInt=function(e){a(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},s.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t},s.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},s.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},s.ByteStringBuffer.prototype.copy=function(){var e=s.createBuffer(this.data);return e.read=this.read,e},s.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var n=this.data.charCodeAt(t);n<16&&(e+="0"),e+=n.toString(16)}return e},s.ByteStringBuffer.prototype.toString=function(){return s.decodeUtf8(this.bytes())},s.DataBuffer=c,s.DataBuffer.prototype.length=function(){return this.write-this.read},s.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},s.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(n),this.data=new DataView(r.buffer),this},s.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},s.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var n=0;n<t;++n)this.data.setUint8(e);return this},s.DataBuffer.prototype.putBytes=function(e,t){if(s.isArrayBufferView(e)){var n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=n.byteLength-n.byteOffset;this.accommodate(r);var i=new Uint8Array(this.data.buffer,this.write);return i.set(n),this.write+=r,this}if(s.isArrayBuffer(e)){var n=new Uint8Array(e);this.accommodate(n.byteLength);var i=new Uint8Array(this.data.buffer);return i.set(n,this.write),this.write+=n.byteLength,this}if(e instanceof s.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&s.isArrayBufferView(e.data)){var n=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(n.byteLength);var i=new Uint8Array(e.data.byteLength,this.write);return i.set(n),this.write+=n.byteLength,this}if(e instanceof s.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var o;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.hex.decode(e,o,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.base64.decode(e,o,this.write),this;if("utf8"===t&&(e=s.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.raw.decode(o),this;if("utf16"===t)return this.accommodate(2*e.length),o=new Uint16Array(this.data.buffer,this.write),this.write+=s.text.utf16.encode(o),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},s.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},s.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},s.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},s.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(e,t){a(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},s.DataBuffer.prototype.putSignedInt=function(e,t){return a(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},s.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},s.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},s.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},s.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},s.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},s.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},s.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},s.DataBuffer.prototype.getInt=function(e){a(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},s.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t},s.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},s.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var n=this.data.getUint8(t);n<16&&(e+="0"),e+=n.toString(16)}return e},s.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8","binary"===e||"raw"===e)return s.binary.raw.encode(t);if("hex"===e)return s.binary.hex.encode(t);if("base64"===e)return s.binary.base64.encode(t);if("utf8"===e)return s.text.utf8.decode(t);if("utf16"===e)return s.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},s.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=s.encodeUtf8(e)),new s.ByteBuffer(e)},s.fillString=function(e,t){for(var n="";t>0;)1&t&&(n+=e),t>>>=1,t>0&&(e+=e);return n},s.xorBytes=function(e,t,n){for(var r="",i="",o="",s=0,a=0;n>0;--n,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(r+=o,o="",a=0),o+=String.fromCharCode(i),++a;return r+=o,r},s.hexToBytes=function(e){var t="",n=0;for(!0&e.length&&(n=1,t+=String.fromCharCode(parseInt(e[0],16)));n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return t},s.bytesToHex=function(e){return s.createBuffer(e).toHex()},s.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],p="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";s.encode64=function(e,t){for(var n="",r="",i,o,s,a=0;a<e.length;)i=e.charCodeAt(a++),o=e.charCodeAt(a++),s=e.charCodeAt(a++),n+=f.charAt(i>>2),n+=f.charAt((3&i)<<4|o>>4),isNaN(o)?n+="==":(n+=f.charAt((15&o)<<2|s>>6),n+=isNaN(s)?"=":f.charAt(63&s)),t&&n.length>t&&(r+=n.substr(0,t)+"\r\n",n=n.substr(t));return r+=n,r},s.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",n,r,i,o,s=0;s<e.length;)n=h[e.charCodeAt(s++)-43],r=h[e.charCodeAt(s++)-43],i=h[e.charCodeAt(s++)-43],o=h[e.charCodeAt(s++)-43],t+=String.fromCharCode(n<<2|r>>4),64!==i&&(t+=String.fromCharCode((15&r)<<4|i>>2),64!==o&&(t+=String.fromCharCode((3&i)<<6|o)));return t},s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},s.decodeUtf8=function(e){return decodeURIComponent(escape(e))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:o.encode,decode:o.decode}},s.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},s.binary.raw.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var i=n,o=0;o<e.length;++o)r[i++]=e.charCodeAt(o);return t?i-n:r},s.binary.hex.encode=s.bytesToHex,s.binary.hex.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),n=n||0;var i=0,o=n;for(1&e.length&&(i=1,r[o++]=parseInt(e[0],16));i<e.length;i+=2)r[o++]=parseInt(e.substr(i,2),16);return t?o-n:r},s.binary.base64.encode=function(e,t){for(var n="",r="",i,o,s,a=0;a<e.byteLength;)i=e[a++],o=e[a++],s=e[a++],n+=f.charAt(i>>2),n+=f.charAt((3&i)<<4|o>>4),isNaN(o)?n+="==":(n+=f.charAt((15&o)<<2|s>>6),n+=isNaN(s)?"=":f.charAt(63&s)),t&&n.length>t&&(r+=n.substr(0,t)+"\r\n",n=n.substr(t));return r+=n,r},s.binary.base64.decode=function(e,t,n){var r=t,i,o,s,a;r||(r=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),n=n||0;for(var u=0,l=n;u<e.length;)i=h[e.charCodeAt(u++)-43],o=h[e.charCodeAt(u++)-43],s=h[e.charCodeAt(u++)-43],a=h[e.charCodeAt(u++)-43],r[l++]=i<<2|o>>4,64!==s&&(r[l++]=(15&o)<<4|s>>2,64!==a&&(r[l++]=(3&s)<<6|a));return t?l-n:r.subarray(0,l)},s.binary.base58.encode=function(e,t){return s.binary.baseN.encode(e,p,t)},s.binary.base58.decode=function(e,t){return s.binary.baseN.decode(e,p,t)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(e,t,n){e=s.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var i=n,o=0;o<e.length;++o)r[i++]=e.charCodeAt(o);return t?i-n:r},s.text.utf8.decode=function(e){return s.decodeUtf8(String.fromCharCode.apply(null,e))},s.text.utf16.encode=function(e,t,n){var r=t;r||(r=new Uint8Array(2*e.length));var i=new Uint16Array(r.buffer);n=n||0;for(var o=n,s=n,a=0;a<e.length;++a)i[s++]=e.charCodeAt(a),o+=2;return t?o-n:r},s.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},s.deflate=function(e,t,n){if(t=s.decode64(e.deflate(s.encode64(t)).rval),n){var r=2,i=t.charCodeAt(1);32&i&&(r=6),t=t.substring(r,t.length-4)}return t},s.inflate=function(e,t,n){var r=e.inflate(s.encode64(t)).rval;return null===r?null:s.decode64(r)};var d=function(e,t,n){if(!e)throw new Error("WebStorage not available.");var r;if(null===n?r=e.removeItem(t):(n=s.encode64(JSON.stringify(n)),r=e.setItem(t,n)),void 0!==r&&!0!==r.rval){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}},m=function(e,t){if(!e)throw new Error("WebStorage not available.");var n=e.getItem(t);if(e.init)if(null===n.rval){if(n.error){var r=new Error(n.error.message);throw r.id=n.error.id,r.name=n.error.name,r}n=null}else n=n.rval;return null!==n&&(n=JSON.parse(s.decode64(n))),n},g=function(e,t,n,r){var i=m(e,t);null===i&&(i={}),i[n]=r,d(e,t,i)},y=function(e,t,n){var r=m(e,t);return null!==r&&(r=n in r?r[n]:null),r},b=function(e,t,n){var r=m(e,t);if(null!==r&&n in r){delete r[n];var i=!0;for(var o in r){i=!1;break}i&&(r=null),d(e,t,r)}},v=function(e,t){d(e,t,null)},w=function(e,t,n){var r=null,i;void 0===n&&(n=["web","flash"]);var o=!1,s=null;for(var a in n){i=n[a];try{if("flash"===i||"both"===i){if(null===t[0])throw new Error("Flash local storage not available.");r=e.apply(this,t),o="flash"===i}"web"!==i&&"both"!==i||(t[0]=localStorage,r=e.apply(this,t),o=!0)}catch(e){s=e}if(o)break}if(!o)throw s;return r};s.setItem=function(e,t,n,r,i){w(g,arguments,i)},s.getItem=function(e,t,n,r){return w(y,arguments,r)},s.removeItem=function(e,t,n,r){w(b,arguments,r)},s.clearItems=function(e,t,n){w(v,arguments,n)},s.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var n=t.exec(e),r=null===n?null:{full:e,scheme:n[1],host:n[2],port:n[3],path:n[4]};return r&&(r.fullHost=r.host,r.port?80!==r.port&&"http"===r.scheme?r.fullHost+=":"+r.port:443!==r.port&&"https"===r.scheme&&(r.fullHost+=":"+r.port):"http"===r.scheme?r.port=80:"https"===r.scheme&&(r.port=443),r.full=r.scheme+"://"+r.fullHost),r};var _=null;s.getQueryVariables=function(e){var t=function(e){for(var t={},n=e.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),o,s;i>0?(o=n[r].substring(0,i),s=n[r].substring(i+1)):(o=n[r],s=null),o in t||(t[o]=[]),o in Object.prototype||null===s||t[o].push(unescape(s))}return t},n;return void 0===e?(null===_&&(_="undefined"!=typeof window&&window.location&&window.location.search?t(window.location.search.substring(1)):{}),n=_):n=t(e),n},s.parseFragment=function(e){var t=e,n="",r=e.indexOf("?");r>0&&(t=e.substring(0,r),n=e.substring(r+1));var i=t.split("/");i.length>0&&""===i[0]&&i.shift();var o=""===n?{}:s.getQueryVariables(n);return{pathString:t,queryString:n,path:i,query:o}},s.makeRequest=function(e){var t=s.parseFragment(e),n={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,n){var r;return void 0===e?r=t.query:(r=t.query[e],r&&void 0!==n&&(r=r[n])),r},getQueryLast:function(e,t){var r,i=n.getQuery(e);return r=i?i[i.length-1]:t,r}};return n},s.makeLink=function(e,t,n){e=jQuery.isArray(e)?e.join("/"):e;var r=jQuery.param(t||{});return n=n||"",e+(r.length>0?"?"+r:"")+(n.length>0?"#"+n:"")},s.setPath=function(e,t,n){if("object"==typeof e&&null!==e)for(var r=0,i=t.length;r<i;){var o=t[r++];if(r==i)e[o]=n;else{var s=o in e;(!s||s&&"object"!=typeof e[o]||s&&null===e[o])&&(e[o]={}),e=e[o]}}},s.getPath=function(e,t,n){for(var r=0,i=t.length,o=!0;o&&r<i&&"object"==typeof e&&null!==e;){var s=t[r++];o=s in e,o&&(e=e[s])}return o?e:n},s.deletePath=function(e,t){if("object"==typeof e&&null!==e)for(var n=0,r=t.length;n<r;){var i=t[n++];if(n==r)delete e[i];else{if(!(i in e)||"object"!=typeof e[i]||null===e[i])break;e=e[i]}}},s.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},s.format=function(e){for(var t=/%./g,n,r,i=0,o=[],s=0;n=t.exec(e);){r=e.substring(s,t.lastIndex-2),r.length>0&&o.push(r),s=t.lastIndex;var a=n[0][1];switch(a){case"s":case"o":i<arguments.length?o.push(arguments[1+i++]):o.push("<?>");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},s.formatNumber=function(e,t,n,r){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===n?",":n,a=void 0===r?".":r,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+a:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-l).toFixed(o).slice(2):"")},s.formatSize=function(e){return e=e>=1073741824?s.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?s.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?s.formatNumber(e/1024,0)+" KiB":s.formatNumber(e,0)+" bytes",e},s.bytesFromIP=function(e){return-1!==e.indexOf(".")?s.bytesFromIPv4(e):-1!==e.indexOf(":")?s.bytesFromIPv6(e):null},s.bytesFromIPv4=function(e){if(e=e.split("."),4!==e.length)return null;for(var t=s.createBuffer(),n=0;n<e.length;++n){var r=parseInt(e[n],10);if(isNaN(r))return null;t.putByte(r)}return t.getBytes()},s.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(e){return 0===e.length&&++t,!0});for(var n=2*(8-e.length+t),r=s.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var o=s.hexToBytes(e[i]);o.length<2&&r.putByte(0),r.putBytes(o)}else r.fillWithByte(0,n),n=0;return r.getBytes()},s.bytesToIP=function(e){return 4===e.length?s.bytesToIPv4(e):16===e.length?s.bytesToIPv6(e):null},s.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t.join(".")},s.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],n=[],r=0,i=0;i<e.length;i+=2){for(var o=s.bytesToHex(e[i]+e[i+1]);"0"===o[0]&&"0"!==o;)o=o.substr(1);if("0"===o){var a=n[n.length-1],u=t.length;a&&u===a.end+1?(a.end=u,a.end-a.start>n[r].end-n[r].start&&(r=n.length-1)):n.push({start:u,end:u})}t.push(o)}if(n.length>0){var l=n[r];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),0===l.start&&t.unshift(""),7===l.end&&t.push(""))}return t.join(":")},s.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in s&&!e.update)return t(null,s.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,t(null,s.cores);if("undefined"==typeof Worker)return s.cores=1,t(null,s.cores);if("undefined"==typeof Blob)return s.cores=2,t(null,s.cores);var n=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),n=t+4;Date.now()<n;);self.postMessage({st:t,et:n})})}.toString(),")()"],{type:"application/javascript"}));function r(e,a,u){if(0===a){var l=Math.floor(e.reduce(function(e,t){return e+t},0)/e.length);return s.cores=Math.max(1,l),URL.revokeObjectURL(n),t(null,s.cores)}i(u,function(t,n){e.push(o(u,n)),r(e,a-1,u)})}function i(e,t){for(var r=[],i=[],o=0;o<e;++o){var s=new Worker(n);s.addEventListener("message",function(n){if(i.push(n.data),i.length===e){for(var o=0;o<e;++o)r[o].terminate();t(null,i)}}),r.push(s)}for(var o=0;o<e;++o)r[o].postMessage(o)}function o(e,t){for(var n=[],r=0;r<e;++r)for(var i=t[r],o=n[r]=[],s=0;s<e;++s)if(r!==s){var a=t[s];(i.st>a.st&&i.st<a.et||a.st>i.st&&a.st<i.et)&&o.push(s)}return n.reduce(function(e,t){return Math.max(e,t.length)},0)}r([],5,16)}}).call(this,n(2),n(0).Buffer)},function(e,t,n){"use strict";(function(e){const r=n(76),i=n(403);t.names=i.names,t.codes=i.codes,t.defaultLengths=i.defaultLengths;const o=n(39);function s(e){t.decode(e)}t.toHexString=function t(n){if(!e.isBuffer(n))throw new Error("must be passed a buffer");return n.toString("hex")},t.fromHexString=function t(n){return e.from(n,"hex")},t.toB58String=function t(n){if(!e.isBuffer(n))throw new Error("must be passed a buffer");return r.encode(n)},t.fromB58String=function t(n){let i=n;return e.isBuffer(n)&&(i=n.toString()),e.from(r.decode(i))},t.decode=function n(r){if(!e.isBuffer(r))throw new Error("multihash must be a Buffer");if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.");let s=o.decode(r);if(!t.isValidCode(s))throw new Error(`multihash unknown function code: 0x${s.toString(16)}`);r=r.slice(o.decode.bytes);let a=o.decode(r);if(a<1)throw new Error(`multihash invalid length: 0x${a.toString(16)}`);if(r=r.slice(o.decode.bytes),r.length!==a)throw new Error(`multihash length inconsistent: 0x${r.toString("hex")}`);return{code:s,name:i.codes[s],length:a,digest:r}},t.encode=function n(r,i,s){if(!r||!i)throw new Error("multihash encode requires at least two args: digest, code");const a=t.coerceCode(i);if(!e.isBuffer(r))throw new Error("digest should be a Buffer");if(null==s&&(s=r.length),s&&r.length!==s)throw new Error("digest length should be equal to specified length.");return e.concat([e.from(o.encode(a)),e.from(o.encode(s)),r])},t.coerceCode=function e(n){let r=n;if("string"==typeof n){if(!i.names[n])throw new Error(`Unrecognized hash function named: ${n}`);r=i.names[n]}if("number"!=typeof r)throw new Error(`Hash function code should be a number. Got: ${r}`);if(!i.codes[r]&&!t.isAppCode(r))throw new Error(`Unrecognized function code: ${r}`);return r},t.isAppCode=function e(t){return t>0&&t<16},t.isValidCode=function e(n){return!!t.isAppCode(n)||!!i.codes[n]},t.validate=s,t.prefix=function e(t){return s(t),t.slice(0,2)}}).call(this,n(0).Buffer)},function(e){e.exports={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}},function(e,t,n){"use strict";var r=n(221);e.exports=function e(t){return r(function(e,t){return e.push(t),e},[],t)}},function(e,t,n){"use strict";t.DAGNode=n(233),t.DAGLink=n(117),t.resolver=n(455),t.util=n(235)},function(e,t,n){e.exports={encode:n(772),decode:n(773),encodingLength:n(774)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(410),i=a(r),o=n(297),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(0,i.default)(s.default,e,t)}e.exports=t.default},function(e,t,n){"use strict";var r=n(17),i=function e(t){return!!r.isString(t)&&/^[0-9a-fA-F]+$/.test(t)};e.exports={isValidJSON:function e(t){var n;if(!r.isString(t))return!1;try{n=JSON.parse(t)}catch(e){return!1}return"object"==typeof n},isHexa:i,isHexaString:i,cloneArray:function(e){return[].concat(e)},defineImmutable:function e(t,n){return Object.keys(n).forEach(function(e){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,value:n[e]})}),t},isNaturalNumber:function e(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&t>=0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var r=n(217),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}var s="function"==typeof Symbol;function a(e){return s&&"AsyncFunction"===e[Symbol.toStringTag]}function u(e){return a(e)?(0,i.default)(e):e}t.default=u,t.isAsync=a},function(e,t,n){"use strict";var r=n(405);e.exports=function e(t,n){if(!t)return function(e,t){return e?r(t,e,n):t(!0)};Array.isArray(t)||(t=Object.keys(t).map(function(e){return t[e]}));var i=0;return function(e,o){if(e)return r(o,e,n);i>=t.length?o(!0):o(null,t[i++])}}},function(e,t,n){"use strict";const r=n(23),{ensureMultiaddr:i}=n(476),o=n(943),s=n(18);class a{constructor(e){s(e,"Missing peerId. Use Peer.create(cb) to create one"),this.id=e,this.multiaddrs=new o,this.protocols=new Set,this._connectedMultiaddr=void 0}connect(e){if(e=i(e),!this.multiaddrs.has(e)&&e.toString()!==`/ipfs/${this.id.toB58String()}`)throw new Error("can't be connected to missing multiaddr from set");this._connectedMultiaddr=e}disconnect(){this._connectedMultiaddr=void 0}isConnected(){return this._connectedMultiaddr}}a.create=((e,t)=>{if("function"==typeof e)return t=e,e=null,void r.create((e,n)=>{if(e)return t(e);t(null,new a(n))});"function"==typeof e.toJSON?t(null,new a(e)):r.createFromJSON(e,(e,n)=>t(e,new a(n)))}),a.isPeerInfo=(e=>Boolean("object"==typeof e&&e.id&&e.multiaddrs)),e.exports=a},function(e,t,n){var r=n(578),i=n(348),o=r.tfJSON,s=r.TfTypeError,a=r.TfPropertyTypeError,u=r.tfSubError,l=r.getValueTypeName,c={arrayOf:function e(t,n){function r(e,r){return!!i.Array(e)&&(!i.Nil(e)&&(!(void 0!==n.minLength&&e.length<n.minLength)&&(!(void 0!==n.maxLength&&e.length>n.maxLength)&&((void 0===n.length||e.length===n.length)&&e.every(function(e,n){try{return h(t,e,r)}catch(e){throw u(e,n)}})))))}return t=f(t),n=n||{},r.toJSON=function(){var e="["+o(t)+"]";return void 0!==n.length?e+="{"+n.length+"}":void 0===n.minLength&&void 0===n.maxLength||(e+="{"+(void 0===n.minLength?0:n.minLength)+","+(void 0===n.maxLength?1/0:n.maxLength)+"}"),e},r},maybe:function e(t){function n(n,r){return i.Nil(n)||t(n,r,e)}return t=f(t),n.toJSON=function(){return"?"+o(t)},n},map:function e(t,n){function r(e,r){if(!i.Object(e))return!1;if(i.Nil(e))return!1;for(var o in e){try{n&&h(n,o,r)}catch(e){throw u(e,o,"key")}try{var s=e[o];h(t,s,r)}catch(e){throw u(e,o)}}return!0}return t=f(t),n&&(n=f(n)),r.toJSON=n?function(){return"{"+o(n)+": "+o(t)+"}"}:function(){return"{"+o(t)+"}"},r},object:function e(t){var n={};for(var r in t)n[r]=f(t[r]);function s(e,t){if(!i.Object(e))return!1;if(i.Nil(e))return!1;var r;try{for(r in n){var o=n[r],s=e[r];h(o,s,t)}}catch(e){throw u(e,r)}if(t)for(r in e)if(!n[r])throw new a(void 0,r);return!0}return s.toJSON=function(){return o(n)},s},anyOf:function e(){var t=[].slice.call(arguments).map(f);function n(e,n){return t.some(function(t){try{return h(t,e,n)}catch(e){return!1}})}return n.toJSON=function(){return t.map(o).join("|")},n},allOf:function e(){var t=[].slice.call(arguments).map(f);function n(e,n){return t.every(function(t){try{return h(t,e,n)}catch(e){return!1}})}return n.toJSON=function(){return t.map(o).join(" & ")},n},quacksLike:function e(t){function n(e){return t===l(e)}return n.toJSON=function(){return t},n},tuple:function e(){var t=[].slice.call(arguments).map(f);function n(e,n){return!i.Nil(e)&&(!i.Nil(e.length)&&((!n||e.length===t.length)&&t.every(function(t,r){try{return h(t,e[r],n)}catch(e){throw u(e,r)}})))}return n.toJSON=function(){return"("+t.map(o).join(", ")+")"},n},value:function e(t){function n(e){return e===t}return n.toJSON=function(){return t},n}};function f(e){if(i.String(e))return"?"===e[0]?c.maybe(e.slice(1)):i[e]||c.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return c.arrayOf(e[0])}return c.object(e)}return i.Function(e)?e:c.value(e)}function h(e,t,n,r){if(i.Function(e)){if(e(t,n))return!0;throw new s(r||e,t)}return h(f(e),t,n)}for(var p in c.oneOf=c.anyOf,i)h[p]=i[p];for(p in c)h[p]=c[p];var d=n(1353);for(p in d)h[p]=d[p];h.compile=f,h.TfTypeError=s,h.TfPropertyTypeError=a,e.exports=h},function(e,t,n){(function(t){e.exports=g;var r=n(27),i=n(55),o=n(15),s=n(206),a=n(102),u=n(379).DiffieHellman,l=n(96),c=n(47),f=n(50),h;try{h=n(712)}catch(e){}var p=l.InvalidAlgorithmError,d=l.KeyParseError,m={};function g(e){r.object(e,"options"),r.arrayOfObject(e.parts,"options.parts"),r.string(e.type,"options.type"),r.optionalString(e.comment,"options.comment");var t=i.info[e.type];if("object"!=typeof t)throw new p(e.type);for(var n={},o=0,s;o<e.parts.length;++o){var a=e.parts[o];n[a.name]=a}if(this.type=e.type,this.parts=e.parts,this.part=n,this.comment=void 0,this.source=e.source,this._rfc4253Cache=e._rfc4253Cache,this._hashCache={},this.curve=void 0,"ecdsa"===this.type){var u=this.part.curve.data.toString();this.curve=u,s=i.curves[u].size}else if("ed25519"===this.type||"curve25519"===this.type)s=256,this.curve="curve25519";else{var l=this.part[t.sizePart];s=l.data.length,s=8*s-c.countZeros(l.data)}this.size=s}m.auto=n(713),m.pem=n(113),m.pkcs1=n(380),m.pkcs8=n(210),m.rfc4253=n(114),m.ssh=n(715),m["ssh-private"]=n(287),m.openssh=m["ssh-private"],m.dnssec=n(381),m.putty=n(716),m.ppk=m.putty,g.formats=m,g.prototype.toBuffer=function(e,t){return void 0===e&&(e="ssh"),r.string(e,"format"),r.object(m[e],"formats[format]"),r.optionalObject(t,"options"),"rfc4253"===e?(void 0===this._rfc4253Cache&&(this._rfc4253Cache=m.rfc4253.write(this)),this._rfc4253Cache):m[e].write(this,t)},g.prototype.toString=function(e,t){return this.toBuffer(e,t).toString()},g.prototype.hash=function(e,t){if(r.string(e,"algorithm"),r.optionalString(t,"type"),void 0===t&&(t="ssh"),e=e.toLowerCase(),void 0===i.hashAlgs[e])throw new p(e);var n=e+"||"+t,s;if(this._hashCache[n])return this._hashCache[n];if("ssh"===t)s=this.toBuffer("rfc4253");else{if("spki"!==t)throw new Error("Hash type "+t+" not supported");s=m.pkcs8.pkcs8ToBuffer(this)}var a=o.createHash(e).update(s).digest();return this._hashCache[n]=a,a},g.prototype.fingerprint=function(e,t){void 0===e&&(e="sha256"),void 0===t&&(t="ssh"),r.string(e,"algorithm"),r.string(t,"type");var n={type:"key",hash:this.hash(e,t),algorithm:e,hashType:t};return new s(n)},g.prototype.defaultHashAlgorithm=function(){var e="sha1";return"rsa"===this.type&&(e="sha256"),"dsa"===this.type&&this.size>1024&&(e="sha256"),"ed25519"===this.type&&(e="sha512"),"ecdsa"===this.type&&(e=this.size<=256?"sha256":this.size<=384?"sha384":"sha512"),e},g.prototype.createVerify=function(e){if(void 0===e&&(e=this.defaultHashAlgorithm()),r.string(e,"hash algorithm"),"ed25519"===this.type&&void 0!==h)return new h.Verifier(this,e);if("curve25519"===this.type)throw new Error("Curve25519 keys are not suitable for signing or verification");var n,i,s;try{i=e.toUpperCase(),n=o.createVerify(i)}catch(e){s=e}(void 0===n||s instanceof Error&&s.message.match(/Unknown message digest/))&&(i="RSA-",i+=e.toUpperCase(),n=o.createVerify(i)),r.ok(n,"failed to create verifier");var u=n.verify.bind(n),l=this.toBuffer("pkcs8"),c=this.curve,f=this;return n.verify=function(n,r){if(a.isSignature(n,[2,0]))return n.type===f.type&&((!n.hashAlgorithm||n.hashAlgorithm===e)&&((!n.curve||"ecdsa"!==f.type||n.curve===c)&&u(l,n.toBuffer("asn1"))));if("string"==typeof n||t.isBuffer(n))return u(l,n,r);throw a.isSignature(n,[1,0])?new Error("signature was created by too old a version of sshpk and cannot be verified"):new TypeError("signature must be a string, Buffer, or Signature object")},n},g.prototype.createDiffieHellman=function(){if("rsa"===this.type)throw new Error("RSA keys do not support Diffie-Hellman");return new u(this)},g.prototype.createDH=g.prototype.createDiffieHellman,g.parse=function(e,t,n){"string"!=typeof e&&r.buffer(e,"data"),void 0===t&&(t="auto"),r.string(t,"format"),"string"==typeof n&&(n={filename:n}),r.optionalObject(n,"options"),void 0===n&&(n={}),r.optionalString(n.filename,"options.filename"),void 0===n.filename&&(n.filename="(unnamed)"),r.object(m[t],"formats[format]");try{var i=m[t].read(e,n);return i instanceof f&&(i=i.toPublic()),i.comment||(i.comment=n.filename),i}catch(e){if("KeyEncryptedError"===e.name)throw e;throw new d(n.filename,t,e)}},g.isKey=function(e,t){return c.isCompatible(e,g,t)},g.prototype._sshpkApiVersion=[1,7],g._oldVersionDetect=function(e){return r.func(e.toBuffer),r.func(e.fingerprint),e.createDH?[1,4]:e.defaultHashAlgorithm?[1,3]:e.formats.auto?[1,2]:e.formats.pkcs1?[1,1]:[1,0]}}).call(this,n(0).Buffer)},function(e,t,n){e.exports={bufferSplit:_,addRSAMissing:P,calculateDSAPublic:T,calculateED25519Public:j,calculateX25519Public:O,mpNormalize:x,mpDenormalize:C,ecNormalize:k,countZeros:w,assertCompatible:m,isCompatible:d,opensslKeyDeriv:b,opensshCipherInfo:R,publicFromPrivateECDSA:B,zeroPadToLength:A,writeBitString:E,readBitString:S,pbkdf2:v};var r=n(27),i=n(31).Buffer,o=n(50),s=n(46),a=n(15),u=n(55),l=n(103),c=n(286),f=n(207).BigInteger,h=n(208),p=3;function d(e,t,n){if(null===e||"object"!=typeof e)return!1;if(void 0===n&&(n=t.prototype._sshpkApiVersion),e instanceof t&&t.prototype._sshpkApiVersion[0]==n[0])return!0;for(var r=Object.getPrototypeOf(e),i=0;r.constructor.name!==t.name;)if(r=Object.getPrototypeOf(r),!r||++i>p)return!1;if(r.constructor.name!==t.name)return!1;var o=r._sshpkApiVersion;return void 0===o&&(o=t._oldVersionDetect(e)),!(o[0]!=n[0]||o[1]<n[1])}function m(e,t,n,i){if(void 0===i&&(i="object"),r.ok(e,i+" must not be null"),r.object(e,i+" must be an object"),void 0===n&&(n=t.prototype._sshpkApiVersion),!(e instanceof t&&t.prototype._sshpkApiVersion[0]==n[0])){for(var o=Object.getPrototypeOf(e),s=0;o.constructor.name!==t.name;)o=Object.getPrototypeOf(o),r.ok(o&&++s<=p,i+" must be a "+t.name+" instance");r.strictEqual(o.constructor.name,t.name,i+" must be a "+t.name+" instance");var a=o._sshpkApiVersion;void 0===a&&(a=t._oldVersionDetect(e)),r.ok(a[0]==n[0]&&a[1]>=n[1],i+" must be compatible with "+t.name+" klass version "+n[0]+"."+n[1])}}var g={"des-ede3-cbc":{key:24,iv:8},"aes-128-cbc":{key:16,iv:16},"aes-256-cbc":{key:32,iv:16}},y=8;function b(e,t,n,o){r.buffer(t,"salt"),r.buffer(n,"passphrase"),r.number(o,"iteration count");var s=g[e],u,l,c;r.object(s,"supported cipher"),t=t.slice(0,y);for(var f=i.alloc(0);f.length<s.key+s.iv;){c=[],l&&c.push(l),c.push(n),c.push(t),u=i.concat(c);for(var h=0;h<o;++h)u=a.createHash("md5").update(u).digest();f=i.concat([f,u]),l=u}return{key:f.slice(0,s.key),iv:f.slice(s.key,s.key+s.iv)}}function v(e,t,n,r,o){var s=i.alloc(t.length+4);t.copy(s);for(var u=0,l=[],c=1;u<r;){var f=h(c++);u+=f.length,l.push(f)}return i.concat(l).slice(0,r);function h(t){s.writeUInt32BE(t,s.length-4);var r=a.createHmac(e,o);r.update(s);for(var i=r.digest(),u=i,l=1;l++<n;){r=a.createHmac(e,o),r.update(u),u=r.digest();for(var c=0;c<i.length;++c)i[c]^=u[c]}return i}}function w(e){for(var t=0,n=8;t<e.length;){var r=1<<n;if((e[t]&r)===r)break;n--,n<0&&(t++,n=8)}return 8*t+(8-n)-1}function _(e,t){r.buffer(e),r.string(t);for(var n=[],i=0,o=0,s=0;s<e.length;++s)if(e[s]===t.charCodeAt(o)?++o:o=e[s]===t.charCodeAt(0)?1:0,o>=t.length){var a=s+1;n.push(e.slice(i,a-o)),i=a,o=0}return i<=e.length&&n.push(e.slice(i,e.length)),n}function k(e,t){if(r.buffer(e),0===e[0]&&4===e[1])return t?e:e.slice(1);if(4===e[0]){if(!t)return e}else{for(;0===e[0];)e=e.slice(1);if(2===e[0]||3===e[0])throw new Error("Compressed elliptic curve points are not supported");if(4!==e[0])throw new Error("Not a valid elliptic curve point");if(!t)return e}var n=i.alloc(e.length+1);return n[0]=0,e.copy(n,1),n}function S(e,t){void 0===t&&(t=l.Ber.BitString);var n=e.readString(t,!0);return r.strictEqual(n[0],0,"bit strings with unused bits are not supported (0x"+n[0].toString(16)+")"),n.slice(1)}function E(e,t,n){void 0===n&&(n=l.Ber.BitString);var r=i.alloc(t.length+1);r[0]=0,t.copy(r,1),e.writeBuffer(r,n)}function x(e){for(r.buffer(e);e.length>1&&0===e[0]&&0==(128&e[1]);)e=e.slice(1);if(128==(128&e[0])){var t=i.alloc(e.length+1);t[0]=0,e.copy(t,1),e=t}return e}function C(e){for(r.buffer(e);e.length>1&&0===e[0];)e=e.slice(1);return e}function A(e,t){for(r.buffer(e),r.number(t);e.length>t;)r.equal(e[0],0),e=e.slice(1);for(;e.length<t;){var n=i.alloc(e.length+1);n[0]=0,e.copy(n,1),e=n}return e}function I(e){var t=i.from(e.toByteArray());return t=x(t),t}function T(e,t,n){r.buffer(e),r.buffer(t),r.buffer(n),e=new f(e),t=new f(t),n=new f(n);var i=e.modPow(n,t),o=I(i);return o}function j(e){r.buffer(e);var t=h.sign.keyPair.fromSeed(new Uint8Array(e));return i.from(t.publicKey)}function O(e){r.buffer(e);var t=h.box.keyPair.fromSeed(new Uint8Array(e));return i.from(t.publicKey)}function P(e){r.object(e),m(e,o,[1,1]);var t=new f(e.part.d.data),n;if(!e.part.dmodp){var i=new f(e.part.p.data),s=t.mod(i.subtract(1));n=I(s),e.part.dmodp={name:"dmodp",data:n},e.parts.push(e.part.dmodp)}if(!e.part.dmodq){var a=new f(e.part.q.data),u=t.mod(a.subtract(1));n=I(u),e.part.dmodq={name:"dmodq",data:n},e.parts.push(e.part.dmodq)}}function B(e,t){r.string(e,"curveName"),r.buffer(t);var n=u.curves[e],o=new f(n.p),a=new f(n.a),l=new f(n.b),h=new c.ECCurveFp(o,a,l),p=h.decodePointHex(n.G.toString("hex")),d=new f(x(t)),m=p.multiply(d);m=i.from(h.encodePointHex(m),"hex");var g=[];g.push({name:"curve",data:i.from(e)}),g.push({name:"Q",data:m});var y=new s({type:"ecdsa",curve:h,parts:g});return y}function R(e){var t={};switch(e){case"3des-cbc":t.keySize=24,t.blockSize=8,t.opensslName="des-ede3-cbc";break;case"blowfish-cbc":t.keySize=16,t.blockSize=8,t.opensslName="bf-cbc";break;case"aes128-cbc":case"aes128-ctr":case"aes128-gcm@openssh.com":t.keySize=16,t.blockSize=16,t.opensslName="aes-128-"+e.slice(7,10);break;case"aes192-cbc":case"aes192-ctr":case"aes192-gcm@openssh.com":t.keySize=24,t.blockSize=16,t.opensslName="aes-192-"+e.slice(7,10);break;case"aes256-cbc":case"aes256-ctr":case"aes256-gcm@openssh.com":t.keySize=32,t.blockSize=16,t.opensslName="aes-256-"+e.slice(7,10);break;default:throw new Error('Unsupported openssl cipher "'+e+'"')}return t}},function(e,t,n){"use strict";const r=n(71),i=r(n(1184)),o=i.Data,s=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],a=["directory","hamt-sharded-directory"];function u(e,t){if(!(this instanceof u))return new u(e,t);if(-1===s.indexOf(e))throw new Error("Type: "+e+" is not valid");this.type=e,this.data=t,this.blockSizes=[],this.addBlockSize=(e=>{this.blockSizes.push(e)}),this.removeBlockSize=(e=>{this.blockSizes.splice(e,1)}),this.fileSize=(()=>{if(a.indexOf(this.type)>=0)return;let e=0;return this.blockSizes.forEach(t=>{e+=t}),t&&(e+=t.length),e}),this.marshal=(()=>{let e;switch(this.type){case"raw":e=o.DataType.Raw;break;case"directory":e=o.DataType.Directory;break;case"file":e=o.DataType.File;break;case"metadata":e=o.DataType.Metadata;break;case"symlink":e=o.DataType.Symlink;break;case"hamt-sharded-directory":e=o.DataType.HAMTShard;break;default:throw new Error(`Unkown type: "${this.type}"`)}let t=this.fileSize(),n=this.data;this.data&&this.data.length||(n=void 0);let r=this.blockSizes;return this.blockSizes&&this.blockSizes.length||(r=void 0),o.encode({Type:e,Data:n,filesize:t,blocksizes:r,hashType:this.hashType,fanout:this.fanout})})}u.unmarshal=(e=>{const t=o.decode(e);t.Data||(t.Data=void 0);const n=new u(s[t.Type],t.Data);return n.blockSizes=t.blocksizes,n}),t=e.exports=u},function(e,t,n){"use strict";(function(t){var r=n(597),i=n(25),o=n(17),s=function(e){for(var n=new t(e.length),r=0;r<e.length;r++)n[r]=e[e.length-1-r];return n};r.Zero=new r(0),r.One=new r(1),r.Minus1=new r(-1),r.fromNumber=function(e){return i.checkArgument(o.isNumber(e)),new r(e)},r.fromString=function(e,t){return i.checkArgument(o.isString(e)),new r(e,t)},r.fromBuffer=function(e,t){void 0!==t&&"little"===t.endian&&(e=s(e));var n=e.toString("hex"),i=new r(n,16);return i},r.fromSM=function(e,n){var i;if(0===e.length)return r.fromBuffer(new t([0]));var o="big";return n&&(o=n.endian),"little"===o&&(e=s(e)),128&e[0]?(e[0]=127&e[0],i=r.fromBuffer(e),i.neg().copy(i)):i=r.fromBuffer(e),i},r.prototype.toNumber=function(){return parseInt(this.toString(10),10)},r.prototype.toBuffer=function(e){var n,i;if(e&&e.size){i=this.toString(16,2);var o=i.length/2;n=new t(i,"hex"),o===e.size?n=n:o>e.size?n=r.trim(n,o):o<e.size&&(n=r.pad(n,o,e.size))}else i=this.toString(16,2),n=new t(i,"hex");return void 0!==e&&"little"===e.endian&&(n=s(n)),n},r.prototype.toSMBigEndian=function(){var e;return-1===this.cmp(r.Zero)?(e=this.neg().toBuffer(),128&e[0]?e=t.concat([new t([128]),e]):e[0]=128|e[0]):(e=this.toBuffer(),128&e[0]&&(e=t.concat([new t([0]),e]))),1===e.length&0===e[0]&&(e=new t([])),e},r.prototype.toSM=function(e){var t=e?e.endian:"big",n=this.toSMBigEndian();return"little"===t&&(n=s(n)),n},r.fromScriptNumBuffer=function(e,t,n){var o=n||4;if(i.checkArgument(e.length<=o,new Error("script number overflow")),t&&e.length>0&&0==(127&e[e.length-1])&&(e.length<=1||0==(128&e[e.length-2])))throw new Error("non-minimally encoded script number");return r.fromSM(e,{endian:"little"})},r.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},r.prototype.gt=function(e){return this.cmp(e)>0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.lt=function(e){return this.cmp(e)<0},r.trim=function(e,t){return e.slice(t-e.length,e.length)},r.pad=function(e,n,r){for(var i=new t(r),o=0;o<e.length;o++)i[i.length-1-o]=e[e.length-1-o];for(o=0;o<r-n;o++)i[o]=0;return i},e.exports=r}).call(this,n(0).Buffer)},function(e,t,n){e.exports=k;var r=n(27),i=n(31).Buffer,o=n(55),s=n(15),a=n(206),u=n(102),l=n(96),c=n(13),f=n(47),h=n(379),p=h.generateECDSA,d=h.generateED25519,m=n(712),g=n(208),y=n(46),b=l.InvalidAlgorithmError,v=l.KeyParseError,w=l.KeyEncryptedError,_={};function k(e){r.object(e,"options"),y.call(this,e),this._pubCache=void 0}_.auto=n(713),_.pem=n(113),_.pkcs1=n(380),_.pkcs8=n(210),_.rfc4253=n(114),_["ssh-private"]=n(287),_.openssh=_["ssh-private"],_.ssh=_["ssh-private"],_.dnssec=n(381),c.inherits(k,y),k.formats=_,k.prototype.toBuffer=function(e,t){return void 0===e&&(e="pkcs1"),r.string(e,"format"),r.object(_[e],"formats[format]"),r.optionalObject(t,"options"),_[e].write(this,t)},k.prototype.hash=function(e,t){return this.toPublic().hash(e,t)},k.prototype.fingerprint=function(e,t){return this.toPublic().fingerprint(e,t)},k.prototype.toPublic=function(){if(this._pubCache)return this._pubCache;for(var e=o.info[this.type],t=[],n=0;n<e.parts.length;++n){var r=e.parts[n];t.push(this.part[r])}return this._pubCache=new y({type:this.type,source:this,parts:t}),this.comment&&(this._pubCache.comment=this.comment),this._pubCache},k.prototype.derive=function(e){var t,n,o;if(r.string(e,"type"),"ed25519"===this.type&&"curve25519"===e)return t=this.part.k.data,0===t[0]&&(t=t.slice(1)),o=g.box.keyPair.fromSecretKey(new Uint8Array(t)),n=i.from(o.publicKey),new k({type:"curve25519",parts:[{name:"A",data:f.mpNormalize(n)},{name:"k",data:f.mpNormalize(t)}]});if("curve25519"===this.type&&"ed25519"===e)return t=this.part.k.data,0===t[0]&&(t=t.slice(1)),o=g.sign.keyPair.fromSeed(new Uint8Array(t)),n=i.from(o.publicKey),new k({type:"ed25519",parts:[{name:"A",data:f.mpNormalize(n)},{name:"k",data:f.mpNormalize(t)}]});throw new Error("Key derivation not supported from "+this.type+" to "+e)},k.prototype.createVerify=function(e){return this.toPublic().createVerify(e)},k.prototype.createSign=function(e){if(void 0===e&&(e=this.defaultHashAlgorithm()),r.string(e,"hash algorithm"),"ed25519"===this.type&&void 0!==m)return new m.Signer(this,e);if("curve25519"===this.type)throw new Error("Curve25519 keys are not suitable for signing or verification");var t,n,o;try{n=e.toUpperCase(),t=s.createSign(n)}catch(e){o=e}(void 0===t||o instanceof Error&&o.message.match(/Unknown message digest/))&&(n="RSA-",n+=e.toUpperCase(),t=s.createSign(n)),r.ok(t,"failed to create verifier");var a=t.sign.bind(t),l=this.toBuffer("pkcs1"),c=this.type,f=this.curve;return t.sign=function(){var t=a(l);return"string"==typeof t&&(t=i.from(t,"binary")),t=u.parse(t,c,"asn1"),t.hashAlgorithm=e,t.curve=f,t},t},k.parse=function(e,t,n){"string"!=typeof e&&r.buffer(e,"data"),void 0===t&&(t="auto"),r.string(t,"format"),"string"==typeof n&&(n={filename:n}),r.optionalObject(n,"options"),void 0===n&&(n={}),r.optionalString(n.filename,"options.filename"),void 0===n.filename&&(n.filename="(unnamed)"),r.object(_[t],"formats[format]");try{var i=_[t].read(e,n);return r.ok(i instanceof k,"key is not a private key"),i.comment||(i.comment=n.filename),i}catch(e){if("KeyEncryptedError"===e.name)throw e;throw new v(n.filename,t,e)}},k.isPrivateKey=function(e,t){return f.isCompatible(e,k,t)},k.generate=function(e,t){switch(void 0===t&&(t={}),r.object(t,"options"),e){case"ecdsa":return void 0===t.curve&&(t.curve="nistp256"),r.string(t.curve,"options.curve"),p(t.curve);case"ed25519":return d();default:throw new Error('Key generation not supported with key type "'+e+'"')}},k.prototype._sshpkApiVersion=[1,6],k._oldVersionDetect=function(e){return r.func(e.toPublic),r.func(e.createSign),e.derive?[1,3]:e.defaultHashAlgorithm?[1,2]:e.formats.auto?[1,1]:[1,0]}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){function n(e,t){if(r("noDeprecation"))return e;var n=!1;function i(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=n}).call(this,n(8))},function(e,t,n){"use strict";function r(e,{className:t,symbolName:n}){const r=Symbol.for(n),i={[t]:class extends e{constructor(...e){super(...e),Object.defineProperty(this,r,{value:!0})}get[Symbol.toStringTag](){return t}}}[t];return i[`is${t}`]=(e=>!(!e||!e[r])),i}function i(e,{className:t,symbolName:n,withoutNew:r}){const i=Symbol.for(n),o={[t]:function(...t){if(r&&!(this instanceof o))return new o(...t);const n=e.call(this,...t)||this;return n&&!n[i]&&Object.defineProperty(n,i,{value:!0}),n}}[t];return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>t}),o[`is${t}`]=(e=>!(!e||!e[i])),o}e.exports=r,e.exports.proto=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(214),i=a(r),o=n(410),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(0,s.default)(i.default,e,t)}e.exports=t.default},function(e,t,n){var r=n(31).Buffer,i={dsa:{parts:["p","q","g","y"],sizePart:"p"},rsa:{parts:["e","n"],sizePart:"n"},ecdsa:{parts:["curve","Q"],sizePart:"Q"},ed25519:{parts:["A"],sizePart:"A"}};i.curve25519=i.ed25519;var o={dsa:{parts:["p","q","g","y","x"]},rsa:{parts:["n","e","d","iqmp","p","q"]},ecdsa:{parts:["curve","Q","d"]},ed25519:{parts:["A","k"]}};o.curve25519=o.ed25519;var s={md5:!0,sha1:!0,sha256:!0,sha384:!0,sha512:!0},a={nistp256:{size:256,pkcs8oid:"1.2.840.10045.3.1.7",p:r.from("00ffffffff 00000001 00000000 0000000000000000 ffffffff ffffffff ffffffff".replace(/ /g,""),"hex"),a:r.from("00FFFFFFFF 00000001 00000000 0000000000000000 FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:r.from("5ac635d8 aa3a93e7 b3ebbd55 769886bc651d06b0 cc53b0f6 3bce3c3e 27d2604b".replace(/ /g,""),"hex"),s:r.from("00c49d3608 86e70493 6a6678e1 139d26b7819f7e90".replace(/ /g,""),"hex"),n:r.from("00ffffffff 00000000 ffffffff ffffffffbce6faad a7179e84 f3b9cac2 fc632551".replace(/ /g,""),"hex"),G:r.from("046b17d1f2 e12c4247 f8bce6e5 63a440f277037d81 2deb33a0 f4a13945 d898c2964fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e162bce3357 6b315ece cbb64068 37bf51f5".replace(/ /g,""),"hex")},nistp384:{size:384,pkcs8oid:"1.3.132.0.34",p:r.from("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffeffffffff 00000000 00000000 ffffffff".replace(/ /g,""),"hex"),a:r.from("00FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFEFFFFFFFF 00000000 00000000 FFFFFFFC".replace(/ /g,""),"hex"),b:r.from("b3312fa7 e23ee7e4 988e056b e3f82d19181d9c6e fe814112 0314088f 5013875ac656398d 8a2ed19d 2a85c8ed d3ec2aef".replace(/ /g,""),"hex"),s:r.from("00a335926a a319a27a 1d00896a 6773a4827acdac73".replace(/ /g,""),"hex"),n:r.from("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff c7634d81 f4372ddf581a0db2 48b0a77a ecec196a ccc52973".replace(/ /g,""),"hex"),G:r.from("04aa87ca22 be8b0537 8eb1c71e f320ad746e1d3b62 8ba79b98 59f741e0 82542a385502f25d bf55296c 3a545e38 72760ab73617de4a 96262c6f 5d9e98bf 9292dc29f8f41dbd 289a147c e9da3113 b5f0b8c00a60b1ce 1d7e819d 7a431d7c 90ea0e5f".replace(/ /g,""),"hex")},nistp521:{size:521,pkcs8oid:"1.3.132.0.35",p:r.from("01ffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffff".replace(/ /g,""),"hex"),a:r.from("01FFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:r.from("51953eb961 8e1c9a1f 929a21a0 b68540eea2da725b 99b315f3 b8b48991 8ef109e156193951 ec7e937b 1652c0bd 3bb1bf073573df88 3d2c34f1 ef451fd4 6b503f00".replace(/ /g,""),"hex"),s:r.from("00d09e8800 291cb853 96cc6717 393284aaa0da64ba".replace(/ /g,""),"hex"),n:r.from("01ffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffa51868783 bf2f966b 7fcc0148 f709a5d03bb5c9b8 899c47ae bb6fb71e 91386409".replace(/ /g,""),"hex"),G:r.from("0400c6 858e06b7 0404e9cd 9e3ecb66 2395b4429c648139 053fb521 f828af60 6b4d3dbaa14b5e77 efe75928 fe1dc127 a2ffa8de3348b3c1 856a429b f97e7e31 c2e5bd660118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd998f54449 579b4468 17afbd17 273e662c97ee7299 5ef42640 c550b901 3fad0761353c7086 a272c240 88be9476 9fd16650".replace(/ /g,""),"hex")}};e.exports={info:i,privInfo:o,hashAlgs:s,curves:a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(214),i=l(r),o=n(394),s=l(o),a=n(42),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){(0,i.default)(e,(0,s.default)((0,u.default)(t)),n)}e.exports=t.default},function(e,t,n){e.exports=o;var r=n(6).EventEmitter,i=n(1);function o(){r.call(this)}i(o,r),o.Readable=n(302),o.Writable=n(850),o.Duplex=n(851),o.Transform=n(852),o.PassThrough=n(853),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t,n){"use strict";(function(t){const r=n(35),i=n(863);function o(e,t,n,i){if("function"==typeof n&&(i=n,n=void 0),!i)throw new Error("Missing callback");o.digest(e,t,n,(e,o)=>{if(e)return i(e);i(null,r.encode(o,t,n))})}e.exports=o,o.Buffer=t,o.multihash=r,o.digest=function(e,t,n,r){if("function"==typeof n&&(r=n,n=void 0),!r)throw new Error("Missing callback");let i=r,s;n&&(i=((e,t)=>{if(e)return r(e);r(null,t.slice(0,n))}));try{s=o.createHash(t)}catch(e){return i(e)}s(e,i)},o.createHash=function(e){if(e=r.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var r=n(28),i=n(255),o=n(1109),s=function(){},a=/^v?\.0/.test(t.version),u=function(e){return"function"==typeof e},l=function(e){return!!a&&(!!o&&((e instanceof(o.ReadStream||s)||e instanceof(o.WriteStream||s))&&u(e.close)))},c=function(e){return e.setHeader&&u(e.abort)},f=function(e,t,n,o){o=r(o);var a=!1;e.on("close",function(){a=!0}),i(e,{readable:t,writable:n},function(e){if(e)return o(e);a=!0,o()});var f=!1;return function(t){if(!a&&!f)return f=!0,l(e)?e.close(s):c(e)?e.abort():u(e.destroy)?e.destroy():void o(t||new Error("stream was destroyed"))}},h=function(e){e()},p=function(e,t){return e.pipe(t)},d=function(){var e=Array.prototype.slice.call(arguments),t=u(e[e.length-1]||s)&&e.pop()||s,n;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map(function(i,o){var s=o<e.length-1,a=o>0;return f(i,s,a,function(e){n||(n=e),e&&r.forEach(h),s||(r.forEach(h),t(n))})});return e.reduce(p)};e.exports=d}).call(this,n(2))},function(e,t,n){"use strict";(function(t){var r=n(15),i=n(30),o=n(25),s=e.exports;s.sha1=function(e){return o.checkArgument(i.isBuffer(e)),r.createHash("sha1").update(e).digest()},s.sha1.blocksize=512,s.sha256=function(e){return o.checkArgument(i.isBuffer(e)),r.createHash("sha256").update(e).digest()},s.sha256.blocksize=512,s.sha256sha256=function(e){return o.checkArgument(i.isBuffer(e)),s.sha256(s.sha256(e))},s.ripemd160=function(e){return o.checkArgument(i.isBuffer(e)),r.createHash("ripemd160").update(e).digest()},s.sha256ripemd160=function(e){return o.checkArgument(i.isBuffer(e)),s.ripemd160(s.sha256(e))},s.sha512=function(e){return o.checkArgument(i.isBuffer(e)),r.createHash("sha512").update(e).digest()},s.sha512.blocksize=1024,s.hmac=function(e,n,r){o.checkArgument(i.isBuffer(n)),o.checkArgument(i.isBuffer(r)),o.checkArgument(e.blocksize);var s=e.blocksize/8;if(r.length>s)r=e(r);else if(r<s){var a=new t(s);a.fill(0),r.copy(a),r=a}var u=new t(s);u.fill(92);var l=new t(s);l.fill(54);for(var c=new t(s),f=new t(s),h=0;h<s;h++)c[h]=u[h]^r[h],f[h]=l[h]^r[h];return e(t.concat([c,e(t.concat([f,n]))]))},s.sha256hmac=function(e,t){return s.hmac(s.sha256,e,t)},s.sha512hmac=function(e,t){return s.hmac(s.sha512,e,t)}}).call(this,n(0).Buffer)},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e){"string"!=typeof e&&(e+="");var t=0,n=-1,r=!0,i;for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!r){t=i+1;break}}else-1===n&&(r=!1,n=i+1);return-1===n?"":e.slice(t,n)}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,r="/"===s.charAt(0))}return t=n(i(t.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),s="/"===o(e,-1);return e=n(i(e.split("/"),function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&s&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}for(var l=[],u=a;u<i.length;u++)l.push("..");return l=l.concat(o.slice(a)),l.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),47===t){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=r(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(2))},function(e,t,n){var r;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,u=Math.ceil,l=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",h=1e14,p=14,d=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function b(e){var t,n,r,i=H.prototype={constructor:H,toString:null,valueOf:null},o=new H(1),C=20,A=4,I=-7,T=21,j=-1e7,O=1e7,P=!1,B=1,R=0,N={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz",L,F,D,U,z,q,K;function H(e,t){var i,o,a,u,c,h,m,g,y=this;if(!(y instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>O?y.c=y.e=null:e.e<j?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,c=e;c>=10;c/=10,u++);return void(u>O?y.c=y.e=null:(y.e=u,y.c=[e]))}g=String(e)}else{if(!s.test(g=String(e)))return r(y,g,h);y.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(c=g.search(/e/i))>0?(u<0&&(u=c),u+=+g.slice(c+1),g=g.substring(0,c)):u<0&&(u=g.length)}else{if(k(t,2,M.length,"Base"),10==t)return y=new H(e),G(y,C+y.e+1,A);if(g=String(e),h="number"==typeof e){if(0*e!=0)return r(y,g,h,t);if(y.s=1/e<0?(g=g.slice(1),-1):1,H.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else y.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(i=M.slice(0,t),u=c=0,m=g.length;c<m;c++)if(i.indexOf(o=g.charAt(c))<0){if("."==o){if(c>u){u=m;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,c=-1,u=0;continue}return r(y,String(e),h,t)}h=!1,g=n(g,t,10,y.s),(u=g.indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(c=0;48===g.charCodeAt(c);c++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(c,++m)){if(m-=c,h&&H.DEBUG&&m>15&&(e>d||e!==l(e)))throw Error(f+y.s*e);if((u=u-c-1)>O)y.c=y.e=null;else if(u<j)y.c=[y.e=0];else{if(y.e=u,y.c=[],c=(u+1)%p,u<0&&(c+=p),c<m){for(c&&y.c.push(+g.slice(0,c)),m-=p;c<m;)y.c.push(+g.slice(c,c+=p));c=p-(g=g.slice(c)).length}else c-=m;for(;c--;g+="0");y.c.push(+g)}}else y.c=[y.e=0]}function V(e,t,n,r){var i,o,s,a,u;if(null==n?n=A:k(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=w(e.c),u=1==r||2==r&&(s<=I||s>=T)?E(u,s):x(u,s,"0");else if(e=G(new H(e),t,n),o=e.e,u=w(e.c),a=u.length,1==r||2==r&&(t<=o||o<=I)){for(;a<t;u+="0",a++);u=E(u,o)}else if(t-=s,u=x(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if(t+=o-a,t>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function W(e,t){for(var n,r=1,i=new H(e[0]);r<e.length;r++){if(n=new H(e[r]),!n.s){i=n;break}t.call(i,n)&&(i=n)}return i}function $(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*p-1)>O?e.c=e.e=null:n<j?e.c=[e.e=0]:(e.e=n,e.c=t),e}function G(e,t,n,r){var i,o,s,a,c,f,d,g=e.c,y=m;if(g){e:{for(i=1,a=g[0];a>=10;a/=10,i++);if(o=t-i,o<0)o+=p,s=t,c=g[f=0],d=c/y[i-s-1]%10|0;else if(f=u((o+1)/p),f>=g.length){if(!r)break e;for(;g.length<=f;g.push(0));c=d=0,i=1,o%=p,s=o-p+1}else{for(c=a=g[f],i=1;a>=10;a/=10,i++);o%=p,s=o-p+i,d=s<0?0:c/y[i-s-1]%10|0}if(r=r||t<0||null!=g[f+1]||(s<0?c:c%y[i-s-1]),r=n<4?(d||r)&&(0==n||n==(e.s<0?3:2)):d>5||5==d&&(4==n||r||6==n&&(o>0?s>0?c/y[i-s]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=y[(p-t%p)%p],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=f,a=1,f--):(g.length=f+1,a=y[p-o],g[f]=s>0?l(c/y[i-s]%y[s])*a:0),r)for(;;){if(0==f){for(o=1,s=g[0];s>=10;s/=10,o++);for(s=g[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,g[0]==h&&(g[0]=1));break}if(g[f]+=a,g[f]!=h)break;g[f--]=0,a=1}for(o=g.length;0===g[--o];g.pop());}e.e>O?e.c=e.e=null:e.e<j&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=w(e.c),t=n<=I||n>=T?E(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return H.clone=b,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(n=e[t],k(n,0,y,t),C=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(n=e[t],k(n,0,8,t),A=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&(n=e[t],n&&n.pop?(k(n[0],-y,0,t),k(n[1],0,y,t),I=n[0],T=n[1]):(k(n,-y,y,t),I=-(T=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if(n=e[t],n&&n.pop)k(n[0],-y,-1,t),k(n[1],1,y,t),j=n[0],O=n[1];else{if(k(n,-y,y,t),!n)throw Error(c+t+" cannot be zero: "+n);j=-(O=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if(n=e[t],n!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!n,Error(c+"crypto unavailable");P=n}else P=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(n=e[t],k(n,0,9,t),B=n),e.hasOwnProperty(t="POW_PRECISION")&&(n=e[t],k(n,0,y,t),R=n),e.hasOwnProperty(t="FORMAT")){if(n=e[t],"object"!=typeof n)throw Error(c+t+" not an object: "+n);N=n}if(e.hasOwnProperty(t="ALPHABET")){if(n=e[t],"string"!=typeof n||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);M=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:A,EXPONENTIAL_AT:[I,T],RANGE:[j,O],CRYPTO:P,MODULO_MODE:B,POW_PRECISION:R,FORMAT:N,ALPHABET:M}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-y&&i<=y&&i===l(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if(t=(i+1)%p,t<1&&(t+=p),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=h||n!==l(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return W(arguments,i.lt)},H.minimum=H.min=function(){return W(arguments,i.gt)},H.random=(L=9007199254740992,F=Math.random()*L&2097151?function(){return l(Math.random()*L)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,s,a=0,f=[],h=new H(o);if(null==e?e=C:k(e,0,y),i=u(e/p),P)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)s=131072*t[a]+(t[a+1]>>>11),s>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[a]=n[0],t[a+1]=n[1]):(f.push(s%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw P=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)s=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6],s>=9e15?crypto.randomBytes(7).copy(t,a):(f.push(s%1e14),a+=7);a=i/7}if(!P)for(;a<i;)s=F(),s<9e15&&(f[a++]=s%1e14);for(i=f[--a],e%=p,i&&e&&(s=m[p-e],f[a]=l(i/s)*s);0===f[a];f.pop(),a--);if(a<0)f=[r=0];else{for(r=-1;0===f[0];f.splice(0,1),r-=p);for(a=1,s=f[0];s>=10;s/=10,a++);a<p&&(r-=p-a)}return h.e=r,h.c=f,h}),H.sum=function(){for(var e=1,t=arguments,n=new H(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=function(){var e="0123456789";function n(e,t,n,r){for(var i,o=[0],s,a=0,u=e.length;a<u;){for(s=o.length;s--;o[s]*=t);for(o[0]+=r.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,o,s,a){var u,l,c,f,h,p,d,m,g=r.indexOf("."),y=C,b=A;for(g>=0&&(f=R,R=0,r=r.replace(".",""),m=new H(i),p=m.pow(r.length-g),R=f,m.c=n(x(w(p.c),p.e,"0"),10,o,e),m.e=m.c.length),d=n(r,i,o,a?(u=M,e):(u=e,M)),c=f=d.length;0==d[--f];d.pop());if(!d[0])return u.charAt(0);if(g<0?--c:(p.c=d,p.e=c,p.s=s,p=t(p,m,y,b,o),d=p.c,h=p.r,c=p.e),l=c+y+1,g=d[l],f=o/2,h=h||l<0||null!=d[l+1],h=b<4?(null!=g||h)&&(0==b||b==(p.s<0?3:2)):g>f||g==f&&(4==b||h||6==b&&1&d[l-1]||b==(p.s<0?8:7)),l<1||!d[0])r=h?x(u.charAt(1),-y,u.charAt(0)):u.charAt(0);else{if(d.length=l,h)for(--o;++d[--l]>o;)d[l]=0,l||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(g=0,r="";g<=f;r+=u.charAt(d[g++]));r=x(r,c,u.charAt(0))}return r}}(),t=function(){function e(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%g,c=t/g|0;for(e=e.slice();u--;)o=e[u]%g,s=e[u]/g|0,r=c*o+s*l,i=l*o+r%g*g+a,a=(i/n|0)+(r/g|0)+c*s,e[u]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,s,a){var u,c,f,d,m,g,y,b,w,_,k,S,E,x,C,A,I,T=r.s==i.s?1:-1,j=r.c,O=i.c;if(!(j&&j[0]&&O&&O[0]))return new H(r.s&&i.s&&(j?!O||j[0]!=O[0]:O)?j&&0==j[0]||!O?0*T:T/0:NaN);for(b=new H(T),w=b.c=[],c=r.e-i.e,T=o+c+1,a||(a=h,c=v(r.e/p)-v(i.e/p),T=T/p|0),f=0;O[f]==(j[f]||0);f++);if(O[f]>(j[f]||0)&&c--,T<0)w.push(1),d=!0;else{for(x=j.length,A=O.length,f=0,T+=2,m=l(a/(O[0]+1)),m>1&&(O=e(O,m,a),j=e(j,m,a),A=O.length,x=j.length),E=A,_=j.slice(0,A),k=_.length;k<A;_[k++]=0);I=O.slice(),I=[0].concat(I),C=O[0],O[1]>=a/2&&C++;do{if(m=0,u=t(O,_,A,k),u<0){if(S=_[0],A!=k&&(S=S*a+(_[1]||0)),m=l(S/C),m>1)for(m>=a&&(m=a-1),g=e(O,m,a),y=g.length,k=_.length;1==t(g,_,y,k);)m--,n(g,A<y?I:O,y,a),y=g.length,u=1;else 0==m&&(u=m=1),g=O.slice(),y=g.length;if(y<k&&(g=[0].concat(g)),n(_,g,k,a),k=_.length,-1==u)for(;t(O,_,A,k)<1;)m++,n(_,A<k?I:O,k,a),k=_.length}else 0===u&&(m++,_=[0]);w[f++]=m,_[0]?_[k++]=j[E]||0:(_=[j[E]],k=1)}while((E++<x||null!=_[0])&&T--);d=null!=_[0],w[0]||w.splice(0,1)}if(a==h){for(f=1,T=w[0];T>=10;T/=10,f++);G(b,o+(b.e=f+c*p-1)+1,s,d)}else b.e=c,b.r=+d;return b}}(),D=/^(-?)0([xbo])(?=\w[\w.]*$)/i,U=/^([^.]+)\.$/,z=/^\.([^.]+)$/,q=/^-?(Infinity|NaN)$/,K=/^\s*\+(?=[\w.])|^\s+|\s+$/g,r=function(e,t,n,r){var i,o=n?t:t.replace(K,"");if(q.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(D,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(U,"$1").replace(z,"0.$1")),t!=o))return new H(o,i);if(H.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},i.absoluteValue=i.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return _(this,new H(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,o=this;if(null!=e)return k(e,0,y),null==t?t=A:k(t,0,8),G(new H(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-v(this.e/p))*p,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new H(e,n),C,A)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new H(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,s,a,f,h,d,m,g=this;if(e=new H(e),e.c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new H(t)),f=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return m=new H(Math.pow(+Y(g),f?2-S(e):+Y(e))),t?m.mod(t):m;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);r=!h&&g.isInteger()&&t.isInteger(),r&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||f&&g.c[1]>=24e7:g.c[0]<8e13||f&&g.c[0]<=9999975e7)))return s=g.s<0&&S(e)?-0:0,g.e>-1&&(s=1/s),new H(h?1/s:s);R&&(s=u(R/p+2))}for(f?(n=new H(.5),h&&(e.s=1),d=S(e)):(i=Math.abs(+Y(e)),d=i%2),m=new H(o);;){if(d){if(m=m.times(g),!m.c)break;s?m.c.length>s&&(m.c.length=s):r&&(m=m.mod(t))}if(i){if(i=l(i/2),0===i)break;d=i%2}else if(e=e.times(n),G(e,e.e+1,1),e.e>14)d=S(e);else{if(i=+Y(e),0===i)break;d=i%2}g=g.times(g),s?g.c&&g.c.length>s&&(g.c.length=s):r&&(g=g.mod(t))}return r?m:(h&&(m=o.div(m)),t?m.mod(t):s?G(m,R,A,a):m)},i.integerValue=function(e){var t=new H(this);return null==e?e=A:k(e,0,8),G(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return 0===_(this,new H(e,t))},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return _(this,new H(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return 1===(t=_(this,new H(e,t)))||0===t},i.isInteger=function(){return!!this.c&&v(this.e/p)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return _(this,new H(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return-1===(t=_(this,new H(e,t)))||0===t},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&0==this.c[0]},i.minus=function(e,t){var n,r,i,o,s=this,a=s.s;if(e=new H(e,t),t=e.s,!a||!t)return new H(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/p,l=e.e/p,c=s.c,f=e.c;if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new H(f?s:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new H(c[0]?s:3==A?-0:0)}if(u=v(u),l=v(l),c=c.slice(),a=u-l){for((o=a<0)?(a=-a,i=c):(l=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=f.length))?a:t,a=t=0;t<r;t++)if(c[t]!=f[t]){o=c[t]<f[t];break}if(o&&(i=c,c=f,f=i,e.s=-e.s),t=(r=f.length)-(n=c.length),t>0)for(;t--;c[n++]=0);for(t=h-1;r>a;){if(c[--r]<f[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=h}c[r]-=f[r]}for(;0==c[0];c.splice(0,1),--l);return c[0]?$(e,c,l):(e.s=3==A?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,o=this;return e=new H(e,n),!o.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||o.c&&!o.c[0]?new H(o):(9==B?(i=e.s,e.s=1,r=t(o,e,0,3),e.s=i,r.s*=i):r=t(o,e,0,B),e=o.minus(r.times(e)),e.c[0]||1!=B||(e.s=o.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,o,s,a,u,l,c,f,d,m,y,b,w,_=this,k=_.c,S=(e=new H(e,t)).c;if(!(k&&S&&k[0]&&S[0]))return!_.s||!e.s||k&&!k[0]&&!S||S&&!S[0]&&!k?e.c=e.e=e.s=null:(e.s*=_.s,k&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(_.e/p)+v(e.e/p),e.s*=_.s,u=k.length,f=S.length,u<f&&(y=k,k=S,S=y,i=u,u=f,f=i),i=u+f,y=[];i--;y.push(0));for(b=h,w=g,i=f;--i>=0;){for(n=0,d=S[i]%w,m=S[i]/w|0,s=u,o=i+s;o>i;)l=k[--s]%w,c=k[s]/w|0,a=m*l+c*d,l=d*l+a%w*w+y[o]+n,n=(l/b|0)+(a/w|0)+m*c,y[o--]=l%b;y[o]=n}return n?++r:y.splice(0,1),$(e,y,r)},i.negated=function(){var e=new H(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new H(e,t),t=e.s,!i||!t)return new H(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/p,s=e.e/p,a=r.c,u=e.c;if(!o||!s){if(!a||!u)return new H(i/0);if(!a[0]||!u[0])return u[0]?e:new H(a[0]?r:0*i)}if(o=v(o),s=v(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for(i=a.length,t=u.length,i-t<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]=h===a[t]?0:a[t]%h;return i&&(a=[i].concat(a),++s),$(e,a,s)},i.precision=i.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return k(e,1,y),null==t?t=A:k(t,0,8),G(new H(o),e,t);if(!(n=o.c))return null;if(i=n.length-1,r=i*p+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},i.shiftedBy=function(e){return k(e,-d,d),this.times("1e"+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,o,s=this,a=s.c,u=s.s,l=s.e,c=C+4,f=new H("0.5");if(1!==u||!a||!a[0])return new H(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(u=Math.sqrt(+Y(s)),0==u||u==1/0?(n=w(a),(n.length+l)%2==0&&(n+="0"),u=Math.sqrt(+n),l=v((l+1)/2)-(l<0||l%2),u==1/0?n="1e"+l:(n=u.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new H(n)):r=new H(u+""),r.c[0])for(l=r.e,u=l+c,u<3&&(u=0);;)if(o=r,r=f.times(o.plus(t(s,o,c,1))),w(o.c).slice(0,u)===(n=w(r.c)).slice(0,u)){if(r.e<l&&--u,n=n.slice(u-3,u+1),"9999"!=n&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(G(r,r.e+C+2,1),e=!r.times(r).eq(s));break}if(!i&&(G(o,o.e+C+2,0),o.times(o).eq(s))){r=o;break}c+=4,u+=4,i=1}return G(r,r.e+C+1,A,e)},i.toExponential=function(e,t){return null!=e&&(k(e,0,y),e++),V(this,e,t,1)},i.toFixed=function(e,t){return null!=e&&(k(e,0,y),e=e+this.e+1),V(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=N;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var o,s=r.split("."),a=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",f=s[0],h=s[1],p=i.s<0,d=p?f.slice(1):f,m=d.length;if(u&&(o=a,a=u,u=o,m-=o),a>0&&m>0){for(o=m%a||a,f=d.substr(0,o);o<m;o+=a)f+=l+d.substr(o,a);u>0&&(f+=l+d.slice(o)),p&&(f="-"+f)}r=h?f+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):f}return(n.prefix||"")+r+(n.suffix||"")},i.toFraction=function(e){var n,r,i,s,a,u,l,f,h,d,g,y,b=this,v=b.c;if(null!=e&&(l=new H(e),!l.isInteger()&&(l.c||1!==l.s)||l.lt(o)))throw Error(c+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Y(l));if(!v)return new H(b);for(n=new H(o),h=r=new H(o),i=f=new H(o),y=w(v),a=n.e=y.length-b.e-1,n.c[0]=m[(u=a%p)<0?p+u:u],e=!e||l.comparedTo(n)>0?a>0?n:h:l,u=O,O=1/0,l=new H(y),f.c[0]=0;d=t(l,n,0,1),s=r.plus(d.times(i)),1!=s.comparedTo(e);)r=i,i=s,h=f.plus(d.times(s=h)),f=s,n=l.minus(d.times(s=n)),l=s;return s=t(e.minus(r),i,0,1),f=f.plus(s.times(h)),r=r.plus(s.times(i)),f.s=h.s=b.s,a*=2,g=t(h,i,a,A).minus(b).abs().comparedTo(t(f,r,a,A).minus(b).abs())<1?[h,i]:[f,r],O=u,g},i.toNumber=function(){return+Y(this)},i.toPrecision=function(e,t){return null!=e&&k(e,1,y),V(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=I||o>=T?E(w(r.c),o):x(w(r.c),o,"0"):10===e?(r=G(new H(r),C+o+1,A),t=x(w(r.c),r.e,"0")):(k(e,2,M.length,"Base"),t=n(x(w(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},i.valueOf=i.toJSON=function(){return Y(this)},i._isBigNumber=!0,a&&(i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf),null!=e&&H.set(e),H}function v(e){var t=0|e;return e>0||e===t?t:t-1}function w(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=p-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function k(e,t,n,r){if(e<t||e>n||e!==l(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function S(e){var t=e.c.length-1;return v(e.e/p)==t&&e.c[t]%2!=0}function E(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}o=b(),o.default=o.BigNumber=o,r=function(){return o}.call(t,n,t,e),void 0===r||(e.exports=r)}(this)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=n(902).Buffer}catch(e){}function a(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function e(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function e(t,n){return t.cmp(n)>0?t:n},o.min=function e(t,n){return t.cmp(n)<0?t:n},o.prototype._init=function e(t,n,i){if("number"==typeof t)return this._initNumber(t,n,i);if("object"==typeof t)return this._initArray(t,n,i);"hex"===n&&(n=16),r(n===(0|n)&&n>=2&&n<=36),t=t.toString().replace(/\s+/g,"");var o=0;"-"===t[0]&&o++,16===n?this._parseHex(t,o):this._parseBase(t,n,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),n,i)},o.prototype._initNumber=function e(t,n,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(),n,i)},o.prototype._initArray=function e(t,n,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 o=0;o<this.length;o++)this.words[o]=0;var s,a,u=0;if("be"===i)for(o=t.length-1,s=0;o>=0;o-=3)a=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[s]|=a<<u&67108863,this.words[s+1]=a>>>26-u&67108863,u+=24,u>=26&&(u-=26,s++);else if("le"===i)for(o=0,s=0;o<t.length;o+=3)a=t[o]|t[o+1]<<8|t[o+2]<<16,this.words[s]|=a<<u&67108863,this.words[s+1]=a>>>26-u&67108863,u+=24,u>=26&&(u-=26,s++);return this.strip()},o.prototype._parseHex=function e(t,n){this.length=Math.ceil((t.length-n)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o,s=0;for(r=t.length-6,i=0;r>=n;r-=6)o=a(t,r,r+6),this.words[i]|=o<<s&67108863,this.words[i+1]|=o>>>26-s&4194303,s+=24,s>=26&&(s-=26,i++);r+6!==n&&(o=a(t,n,r+6),this.words[i]|=o<<s&67108863,this.words[i+1]|=o>>>26-s&4194303),this.strip()},o.prototype._parseBase=function e(t,n,r){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=n)i++;i--,o=o/n|0;for(var s=t.length-r,a=s%i,l=Math.min(s,s-a)+r,c=0,f=r;f<l;f+=i)c=u(t,f,f+i,n),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var h=1;for(c=u(t,f,t.length,n),f=0;f<a;f++)h*=n;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function e(t){t.words=new Array(this.length);for(var n=0;n<this.length;n++)t.words[n]=this.words[n];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function e(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function e(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function e(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function e(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function e(){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"],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],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 h(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var c=u>>>26,f=67108863&u,h=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=h;p++){var d=l-p|0;i=0|e.words[d],o=0|t.words[p],s=i*o+f,c+=s/67108864|0,f=67108863&s}n.words[l]=0|f,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function e(t,n){var i;if(t=t||10,n=0|n||1,16===t||"hex"===t){i="";for(var o=0,s=0,a=0;a<this.length;a++){var u=this.words[a],h=(16777215&(u<<o|s)).toString(16);s=u>>>24-o&16777215,i=0!==s||a!==this.length-1?l[6-h.length]+h+i:h+i,o+=2,o>=26&&(o-=26,a--)}for(0!==s&&(i=s.toString(16)+i);i.length%n!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var p=c[t],d=f[t];i="";var m=this.clone();for(m.negative=0;!m.isZero();){var g=m.modn(d).toString(t);m=m.idivn(d),i=m.isZero()?g+i:l[p-g.length]+g+i}for(this.isZero()&&(i="0"+i);i.length%n!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function e(){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 e(){return this.toString(16)},o.prototype.toBuffer=function e(t,n){return r(void 0!==s),this.toArrayLike(s,t,n)},o.prototype.toArray=function e(t,n){return this.toArrayLike(Array,t,n)},o.prototype.toArrayLike=function e(t,n,i){var o=this.byteLength(),s=i||Math.max(1,o);r(o<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var a="le"===n,u=new t(s),l,c,f=this.clone();if(a){for(c=0;!f.isZero();c++)l=f.andln(255),f.iushrn(8),u[c]=l;for(;c<s;c++)u[c]=0}else{for(c=0;c<s-o;c++)u[c]=0;for(c=0;!f.isZero();c++)l=f.andln(255),f.iushrn(8),u[s-c-1]=l}return u},Math.clz32?o.prototype._countBits=function e(t){return 32-Math.clz32(t)}:o.prototype._countBits=function e(t){var n=t,r=0;return n>=4096&&(r+=13,n>>>=13),n>=64&&(r+=7,n>>>=7),n>=8&&(r+=4,n>>>=4),n>=2&&(r+=2,n>>>=2),r+n},o.prototype._zeroBits=function e(t){if(0===t)return 26;var n=t,r=0;return 0==(8191&n)&&(r+=13,n>>>=13),0==(127&n)&&(r+=7,n>>>=7),0==(15&n)&&(r+=4,n>>>=4),0==(3&n)&&(r+=2,n>>>=2),0==(1&n)&&r++,r},o.prototype.bitLength=function e(){var t=this.words[this.length-1],n=this._countBits(t);return 26*(this.length-1)+n},o.prototype.zeroBits=function e(){if(this.isZero())return 0;for(var t=0,n=0;n<this.length;n++){var r=this._zeroBits(this.words[n]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function e(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function e(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function e(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function e(){return 0!==this.negative},o.prototype.neg=function e(){return this.clone().ineg()},o.prototype.ineg=function e(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function e(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]|t.words[n];return this.strip()},o.prototype.ior=function e(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function e(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function e(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function e(t){var n;n=this.length>t.length?t:this;for(var r=0;r<n.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=n.length,this.strip()},o.prototype.iand=function e(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function e(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function e(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function e(t){var n,r;this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=n.words[i]^r.words[i];if(this!==n)for(;i<n.length;i++)this.words[i]=n.words[i];return this.length=n.length,this.strip()},o.prototype.ixor=function e(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function e(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function e(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function e(t){r("number"==typeof t&&t>=0);var n=0|Math.ceil(t/26),i=t%26;this._expand(n),i>0&&n--;for(var o=0;o<n;o++)this.words[o]=67108863&~this.words[o];return i>0&&(this.words[o]=~this.words[o]&67108863>>26-i),this.strip()},o.prototype.notn=function e(t){return this.clone().inotn(t)},o.prototype.setn=function e(t,n){r("number"==typeof t&&t>=0);var i=t/26|0,o=t%26;return this._expand(i+1),this.words[i]=n?this.words[i]|1<<o:this.words[i]&~(1<<o),this.strip()},o.prototype.iadd=function e(t){var n,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,n=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,n=this.isub(t),t.negative=1,n._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s<i.length;s++)n=(0|r.words[s])+(0|i.words[s])+o,this.words[s]=67108863&n,o=n>>>26;for(;0!==o&&s<r.length;s++)n=(0|r.words[s])+o,this.words[s]=67108863&n,o=n>>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},o.prototype.add=function e(t){var n;return 0!==t.negative&&0===this.negative?(t.negative=0,n=this.sub(t),t.negative^=1,n):0===t.negative&&0!==this.negative?(this.negative=0,n=t.sub(this),this.negative=1,n):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function e(t){if(0!==t.negative){t.negative=0;var n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t),i,o;if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,o=t):(i=t,o=this);for(var s=0,a=0;a<o.length;a++)n=(0|i.words[a])-(0|o.words[a])+s,s=n>>26,this.words[a]=67108863&n;for(;0!==s&&a<i.length;a++)n=(0|i.words[a])+s,s=n>>26,this.words[a]=67108863&n;if(0===s&&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 e(t){return this.clone().isub(t)};var d=function e(t,n,r){var i=t.words,o=n.words,s=r.words,a=0,u,l,c,f=0|i[0],h=8191&f,p=f>>>13,d=0|i[1],m=8191&d,g=d>>>13,y=0|i[2],b=8191&y,v=y>>>13,w=0|i[3],_=8191&w,k=w>>>13,S=0|i[4],E=8191&S,x=S>>>13,C=0|i[5],A=8191&C,I=C>>>13,T=0|i[6],j=8191&T,O=T>>>13,P=0|i[7],B=8191&P,R=P>>>13,N=0|i[8],M=8191&N,L=N>>>13,F=0|i[9],D=8191&F,U=F>>>13,z=0|o[0],q=8191&z,K=z>>>13,H=0|o[1],V=8191&H,W=H>>>13,$=0|o[2],G=8191&$,Y=$>>>13,J=0|o[3],Z=8191&J,X=J>>>13,Q=0|o[4],ee=8191&Q,te=Q>>>13,ne=0|o[5],re=8191&ne,ie=ne>>>13,oe=0|o[6],se=8191&oe,ae=oe>>>13,ue=0|o[7],le=8191&ue,ce=ue>>>13,fe=0|o[8],he=8191&fe,pe=fe>>>13,de=0|o[9],me=8191&de,ge=de>>>13;r.negative=t.negative^n.negative,r.length=19,u=Math.imul(h,q),l=Math.imul(h,K),l=l+Math.imul(p,q)|0,c=Math.imul(p,K);var ye=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(ye>>>26)|0,ye&=67108863,u=Math.imul(m,q),l=Math.imul(m,K),l=l+Math.imul(g,q)|0,c=Math.imul(g,K),u=u+Math.imul(h,V)|0,l=l+Math.imul(h,W)|0,l=l+Math.imul(p,V)|0,c=c+Math.imul(p,W)|0;var be=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(be>>>26)|0,be&=67108863,u=Math.imul(b,q),l=Math.imul(b,K),l=l+Math.imul(v,q)|0,c=Math.imul(v,K),u=u+Math.imul(m,V)|0,l=l+Math.imul(m,W)|0,l=l+Math.imul(g,V)|0,c=c+Math.imul(g,W)|0,u=u+Math.imul(h,G)|0,l=l+Math.imul(h,Y)|0,l=l+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(ve>>>26)|0,ve&=67108863,u=Math.imul(_,q),l=Math.imul(_,K),l=l+Math.imul(k,q)|0,c=Math.imul(k,K),u=u+Math.imul(b,V)|0,l=l+Math.imul(b,W)|0,l=l+Math.imul(v,V)|0,c=c+Math.imul(v,W)|0,u=u+Math.imul(m,G)|0,l=l+Math.imul(m,Y)|0,l=l+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,u=u+Math.imul(h,Z)|0,l=l+Math.imul(h,X)|0,l=l+Math.imul(p,Z)|0,c=c+Math.imul(p,X)|0;var we=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(we>>>26)|0,we&=67108863,u=Math.imul(E,q),l=Math.imul(E,K),l=l+Math.imul(x,q)|0,c=Math.imul(x,K),u=u+Math.imul(_,V)|0,l=l+Math.imul(_,W)|0,l=l+Math.imul(k,V)|0,c=c+Math.imul(k,W)|0,u=u+Math.imul(b,G)|0,l=l+Math.imul(b,Y)|0,l=l+Math.imul(v,G)|0,c=c+Math.imul(v,Y)|0,u=u+Math.imul(m,Z)|0,l=l+Math.imul(m,X)|0,l=l+Math.imul(g,Z)|0,c=c+Math.imul(g,X)|0,u=u+Math.imul(h,ee)|0,l=l+Math.imul(h,te)|0,l=l+Math.imul(p,ee)|0,c=c+Math.imul(p,te)|0;var _e=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(_e>>>26)|0,_e&=67108863,u=Math.imul(A,q),l=Math.imul(A,K),l=l+Math.imul(I,q)|0,c=Math.imul(I,K),u=u+Math.imul(E,V)|0,l=l+Math.imul(E,W)|0,l=l+Math.imul(x,V)|0,c=c+Math.imul(x,W)|0,u=u+Math.imul(_,G)|0,l=l+Math.imul(_,Y)|0,l=l+Math.imul(k,G)|0,c=c+Math.imul(k,Y)|0,u=u+Math.imul(b,Z)|0,l=l+Math.imul(b,X)|0,l=l+Math.imul(v,Z)|0,c=c+Math.imul(v,X)|0,u=u+Math.imul(m,ee)|0,l=l+Math.imul(m,te)|0,l=l+Math.imul(g,ee)|0,c=c+Math.imul(g,te)|0,u=u+Math.imul(h,re)|0,l=l+Math.imul(h,ie)|0,l=l+Math.imul(p,re)|0,c=c+Math.imul(p,ie)|0;var ke=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(ke>>>26)|0,ke&=67108863,u=Math.imul(j,q),l=Math.imul(j,K),l=l+Math.imul(O,q)|0,c=Math.imul(O,K),u=u+Math.imul(A,V)|0,l=l+Math.imul(A,W)|0,l=l+Math.imul(I,V)|0,c=c+Math.imul(I,W)|0,u=u+Math.imul(E,G)|0,l=l+Math.imul(E,Y)|0,l=l+Math.imul(x,G)|0,c=c+Math.imul(x,Y)|0,u=u+Math.imul(_,Z)|0,l=l+Math.imul(_,X)|0,l=l+Math.imul(k,Z)|0,c=c+Math.imul(k,X)|0,u=u+Math.imul(b,ee)|0,l=l+Math.imul(b,te)|0,l=l+Math.imul(v,ee)|0,c=c+Math.imul(v,te)|0,u=u+Math.imul(m,re)|0,l=l+Math.imul(m,ie)|0,l=l+Math.imul(g,re)|0,c=c+Math.imul(g,ie)|0,u=u+Math.imul(h,se)|0,l=l+Math.imul(h,ae)|0,l=l+Math.imul(p,se)|0,c=c+Math.imul(p,ae)|0;var Se=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Se>>>26)|0,Se&=67108863,u=Math.imul(B,q),l=Math.imul(B,K),l=l+Math.imul(R,q)|0,c=Math.imul(R,K),u=u+Math.imul(j,V)|0,l=l+Math.imul(j,W)|0,l=l+Math.imul(O,V)|0,c=c+Math.imul(O,W)|0,u=u+Math.imul(A,G)|0,l=l+Math.imul(A,Y)|0,l=l+Math.imul(I,G)|0,c=c+Math.imul(I,Y)|0,u=u+Math.imul(E,Z)|0,l=l+Math.imul(E,X)|0,l=l+Math.imul(x,Z)|0,c=c+Math.imul(x,X)|0,u=u+Math.imul(_,ee)|0,l=l+Math.imul(_,te)|0,l=l+Math.imul(k,ee)|0,c=c+Math.imul(k,te)|0,u=u+Math.imul(b,re)|0,l=l+Math.imul(b,ie)|0,l=l+Math.imul(v,re)|0,c=c+Math.imul(v,ie)|0,u=u+Math.imul(m,se)|0,l=l+Math.imul(m,ae)|0,l=l+Math.imul(g,se)|0,c=c+Math.imul(g,ae)|0,u=u+Math.imul(h,le)|0,l=l+Math.imul(h,ce)|0,l=l+Math.imul(p,le)|0,c=c+Math.imul(p,ce)|0;var Ee=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,u=Math.imul(M,q),l=Math.imul(M,K),l=l+Math.imul(L,q)|0,c=Math.imul(L,K),u=u+Math.imul(B,V)|0,l=l+Math.imul(B,W)|0,l=l+Math.imul(R,V)|0,c=c+Math.imul(R,W)|0,u=u+Math.imul(j,G)|0,l=l+Math.imul(j,Y)|0,l=l+Math.imul(O,G)|0,c=c+Math.imul(O,Y)|0,u=u+Math.imul(A,Z)|0,l=l+Math.imul(A,X)|0,l=l+Math.imul(I,Z)|0,c=c+Math.imul(I,X)|0,u=u+Math.imul(E,ee)|0,l=l+Math.imul(E,te)|0,l=l+Math.imul(x,ee)|0,c=c+Math.imul(x,te)|0,u=u+Math.imul(_,re)|0,l=l+Math.imul(_,ie)|0,l=l+Math.imul(k,re)|0,c=c+Math.imul(k,ie)|0,u=u+Math.imul(b,se)|0,l=l+Math.imul(b,ae)|0,l=l+Math.imul(v,se)|0,c=c+Math.imul(v,ae)|0,u=u+Math.imul(m,le)|0,l=l+Math.imul(m,ce)|0,l=l+Math.imul(g,le)|0,c=c+Math.imul(g,ce)|0,u=u+Math.imul(h,he)|0,l=l+Math.imul(h,pe)|0,l=l+Math.imul(p,he)|0,c=c+Math.imul(p,pe)|0;var xe=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(xe>>>26)|0,xe&=67108863,u=Math.imul(D,q),l=Math.imul(D,K),l=l+Math.imul(U,q)|0,c=Math.imul(U,K),u=u+Math.imul(M,V)|0,l=l+Math.imul(M,W)|0,l=l+Math.imul(L,V)|0,c=c+Math.imul(L,W)|0,u=u+Math.imul(B,G)|0,l=l+Math.imul(B,Y)|0,l=l+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,u=u+Math.imul(j,Z)|0,l=l+Math.imul(j,X)|0,l=l+Math.imul(O,Z)|0,c=c+Math.imul(O,X)|0,u=u+Math.imul(A,ee)|0,l=l+Math.imul(A,te)|0,l=l+Math.imul(I,ee)|0,c=c+Math.imul(I,te)|0,u=u+Math.imul(E,re)|0,l=l+Math.imul(E,ie)|0,l=l+Math.imul(x,re)|0,c=c+Math.imul(x,ie)|0,u=u+Math.imul(_,se)|0,l=l+Math.imul(_,ae)|0,l=l+Math.imul(k,se)|0,c=c+Math.imul(k,ae)|0,u=u+Math.imul(b,le)|0,l=l+Math.imul(b,ce)|0,l=l+Math.imul(v,le)|0,c=c+Math.imul(v,ce)|0,u=u+Math.imul(m,he)|0,l=l+Math.imul(m,pe)|0,l=l+Math.imul(g,he)|0,c=c+Math.imul(g,pe)|0,u=u+Math.imul(h,me)|0,l=l+Math.imul(h,ge)|0,l=l+Math.imul(p,me)|0,c=c+Math.imul(p,ge)|0;var Ce=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u=Math.imul(D,V),l=Math.imul(D,W),l=l+Math.imul(U,V)|0,c=Math.imul(U,W),u=u+Math.imul(M,G)|0,l=l+Math.imul(M,Y)|0,l=l+Math.imul(L,G)|0,c=c+Math.imul(L,Y)|0,u=u+Math.imul(B,Z)|0,l=l+Math.imul(B,X)|0,l=l+Math.imul(R,Z)|0,c=c+Math.imul(R,X)|0,u=u+Math.imul(j,ee)|0,l=l+Math.imul(j,te)|0,l=l+Math.imul(O,ee)|0,c=c+Math.imul(O,te)|0,u=u+Math.imul(A,re)|0,l=l+Math.imul(A,ie)|0,l=l+Math.imul(I,re)|0,c=c+Math.imul(I,ie)|0,u=u+Math.imul(E,se)|0,l=l+Math.imul(E,ae)|0,l=l+Math.imul(x,se)|0,c=c+Math.imul(x,ae)|0,u=u+Math.imul(_,le)|0,l=l+Math.imul(_,ce)|0,l=l+Math.imul(k,le)|0,c=c+Math.imul(k,ce)|0,u=u+Math.imul(b,he)|0,l=l+Math.imul(b,pe)|0,l=l+Math.imul(v,he)|0,c=c+Math.imul(v,pe)|0,u=u+Math.imul(m,me)|0,l=l+Math.imul(m,ge)|0,l=l+Math.imul(g,me)|0,c=c+Math.imul(g,ge)|0;var Ae=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,u=Math.imul(D,G),l=Math.imul(D,Y),l=l+Math.imul(U,G)|0,c=Math.imul(U,Y),u=u+Math.imul(M,Z)|0,l=l+Math.imul(M,X)|0,l=l+Math.imul(L,Z)|0,c=c+Math.imul(L,X)|0,u=u+Math.imul(B,ee)|0,l=l+Math.imul(B,te)|0,l=l+Math.imul(R,ee)|0,c=c+Math.imul(R,te)|0,u=u+Math.imul(j,re)|0,l=l+Math.imul(j,ie)|0,l=l+Math.imul(O,re)|0,c=c+Math.imul(O,ie)|0,u=u+Math.imul(A,se)|0,l=l+Math.imul(A,ae)|0,l=l+Math.imul(I,se)|0,c=c+Math.imul(I,ae)|0,u=u+Math.imul(E,le)|0,l=l+Math.imul(E,ce)|0,l=l+Math.imul(x,le)|0,c=c+Math.imul(x,ce)|0,u=u+Math.imul(_,he)|0,l=l+Math.imul(_,pe)|0,l=l+Math.imul(k,he)|0,c=c+Math.imul(k,pe)|0,u=u+Math.imul(b,me)|0,l=l+Math.imul(b,ge)|0,l=l+Math.imul(v,me)|0,c=c+Math.imul(v,ge)|0;var Ie=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,u=Math.imul(D,Z),l=Math.imul(D,X),l=l+Math.imul(U,Z)|0,c=Math.imul(U,X),u=u+Math.imul(M,ee)|0,l=l+Math.imul(M,te)|0,l=l+Math.imul(L,ee)|0,c=c+Math.imul(L,te)|0,u=u+Math.imul(B,re)|0,l=l+Math.imul(B,ie)|0,l=l+Math.imul(R,re)|0,c=c+Math.imul(R,ie)|0,u=u+Math.imul(j,se)|0,l=l+Math.imul(j,ae)|0,l=l+Math.imul(O,se)|0,c=c+Math.imul(O,ae)|0,u=u+Math.imul(A,le)|0,l=l+Math.imul(A,ce)|0,l=l+Math.imul(I,le)|0,c=c+Math.imul(I,ce)|0,u=u+Math.imul(E,he)|0,l=l+Math.imul(E,pe)|0,l=l+Math.imul(x,he)|0,c=c+Math.imul(x,pe)|0,u=u+Math.imul(_,me)|0,l=l+Math.imul(_,ge)|0,l=l+Math.imul(k,me)|0,c=c+Math.imul(k,ge)|0;var Te=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Te>>>26)|0,Te&=67108863,u=Math.imul(D,ee),l=Math.imul(D,te),l=l+Math.imul(U,ee)|0,c=Math.imul(U,te),u=u+Math.imul(M,re)|0,l=l+Math.imul(M,ie)|0,l=l+Math.imul(L,re)|0,c=c+Math.imul(L,ie)|0,u=u+Math.imul(B,se)|0,l=l+Math.imul(B,ae)|0,l=l+Math.imul(R,se)|0,c=c+Math.imul(R,ae)|0,u=u+Math.imul(j,le)|0,l=l+Math.imul(j,ce)|0,l=l+Math.imul(O,le)|0,c=c+Math.imul(O,ce)|0,u=u+Math.imul(A,he)|0,l=l+Math.imul(A,pe)|0,l=l+Math.imul(I,he)|0,c=c+Math.imul(I,pe)|0,u=u+Math.imul(E,me)|0,l=l+Math.imul(E,ge)|0,l=l+Math.imul(x,me)|0,c=c+Math.imul(x,ge)|0;var je=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(je>>>26)|0,je&=67108863,u=Math.imul(D,re),l=Math.imul(D,ie),l=l+Math.imul(U,re)|0,c=Math.imul(U,ie),u=u+Math.imul(M,se)|0,l=l+Math.imul(M,ae)|0,l=l+Math.imul(L,se)|0,c=c+Math.imul(L,ae)|0,u=u+Math.imul(B,le)|0,l=l+Math.imul(B,ce)|0,l=l+Math.imul(R,le)|0,c=c+Math.imul(R,ce)|0,u=u+Math.imul(j,he)|0,l=l+Math.imul(j,pe)|0,l=l+Math.imul(O,he)|0,c=c+Math.imul(O,pe)|0,u=u+Math.imul(A,me)|0,l=l+Math.imul(A,ge)|0,l=l+Math.imul(I,me)|0,c=c+Math.imul(I,ge)|0;var Oe=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,u=Math.imul(D,se),l=Math.imul(D,ae),l=l+Math.imul(U,se)|0,c=Math.imul(U,ae),u=u+Math.imul(M,le)|0,l=l+Math.imul(M,ce)|0,l=l+Math.imul(L,le)|0,c=c+Math.imul(L,ce)|0,u=u+Math.imul(B,he)|0,l=l+Math.imul(B,pe)|0,l=l+Math.imul(R,he)|0,c=c+Math.imul(R,pe)|0,u=u+Math.imul(j,me)|0,l=l+Math.imul(j,ge)|0,l=l+Math.imul(O,me)|0,c=c+Math.imul(O,ge)|0;var Pe=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,u=Math.imul(D,le),l=Math.imul(D,ce),l=l+Math.imul(U,le)|0,c=Math.imul(U,ce),u=u+Math.imul(M,he)|0,l=l+Math.imul(M,pe)|0,l=l+Math.imul(L,he)|0,c=c+Math.imul(L,pe)|0,u=u+Math.imul(B,me)|0,l=l+Math.imul(B,ge)|0,l=l+Math.imul(R,me)|0,c=c+Math.imul(R,ge)|0;var Be=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Be>>>26)|0,Be&=67108863,u=Math.imul(D,he),l=Math.imul(D,pe),l=l+Math.imul(U,he)|0,c=Math.imul(U,pe),u=u+Math.imul(M,me)|0,l=l+Math.imul(M,ge)|0,l=l+Math.imul(L,me)|0,c=c+Math.imul(L,ge)|0;var Re=(a+u|0)+((8191&l)<<13)|0;a=(c+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,u=Math.imul(D,me),l=Math.imul(D,ge),l=l+Math.imul(U,me)|0,c=Math.imul(U,ge);var Ne=(a+u|0)+((8191&l)<<13)|0;return a=(c+(l>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s[0]=ye,s[1]=be,s[2]=ve,s[3]=we,s[4]=_e,s[5]=ke,s[6]=Se,s[7]=Ee,s[8]=xe,s[9]=Ce,s[10]=Ae,s[11]=Ie,s[12]=Te,s[13]=je,s[14]=Oe,s[15]=Pe,s[16]=Be,s[17]=Re,s[18]=Ne,0!==a&&(s[19]=a,r.length++),r};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=o-l,f=0|e.words[c],h=0|t.words[l],p=f*h,d=67108863&p;s=s+(p/67108864|0)|0,d=d+a|0,a=67108863&d,s=s+(d>>>26)|0,i+=s>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}function g(e,t,n){var r=new y;return r.mulp(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(d=p),o.prototype.mulTo=function e(t,n){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,n):i<63?p(this,t,n):i<1024?m(this,t,n):g(this,t,n),r},y.prototype.makeRBT=function e(t){for(var n=new Array(t),r=o.prototype._countBits(t)-1,i=0;i<t;i++)n[i]=this.revBin(i,r,t);return n},y.prototype.revBin=function e(t,n,r){if(0===t||t===r-1)return t;for(var i=0,o=0;o<n;o++)i|=(1&t)<<n-o-1,t>>=1;return i},y.prototype.permute=function e(t,n,r,i,o,s){for(var a=0;a<s;a++)i[a]=n[t[a]],o[a]=r[t[a]]},y.prototype.transform=function e(t,n,r,i,o,s){this.permute(s,t,n,r,i,o);for(var a=1;a<o;a<<=1)for(var u=a<<1,l=Math.cos(2*Math.PI/u),c=Math.sin(2*Math.PI/u),f=0;f<o;f+=u)for(var h=l,p=c,d=0;d<a;d++){var m=r[f+d],g=i[f+d],y=r[f+d+a],b=i[f+d+a],v=h*y-p*b;b=h*b+p*y,y=v,r[f+d]=m+y,i[f+d]=g+b,r[f+d+a]=m-y,i[f+d+a]=g-b,d!==u&&(v=l*h-c*p,p=l*p+c*h,h=v)}},y.prototype.guessLen13b=function e(t,n){var r=1|Math.max(n,t),i=1&r,o=0;for(r=r/2|0;r;r>>>=1)o++;return 1<<o+1+i},y.prototype.conjugate=function e(t,n,r){if(!(r<=1))for(var i=0;i<r/2;i++){var o=t[i];t[i]=t[r-i-1],t[r-i-1]=o,o=n[i],n[i]=-n[r-i-1],n[r-i-1]=-o}},y.prototype.normalize13b=function e(t,n){for(var r=0,i=0;i<n/2;i++){var o=8192*Math.round(t[2*i+1]/n)+Math.round(t[2*i]/n)+r;t[i]=67108863&o,r=o<67108864?0:o/67108864|0}return t},y.prototype.convert13b=function e(t,n,i,o){for(var s=0,a=0;a<n;a++)s+=0|t[a],i[2*a]=8191&s,s>>>=13,i[2*a+1]=8191&s,s>>>=13;for(a=2*n;a<o;++a)i[a]=0;r(0===s),r(0==(-8192&s))},y.prototype.stub=function e(t){for(var n=new Array(t),r=0;r<t;r++)n[r]=0;return n},y.prototype.mulp=function e(t,n,r){var i=2*this.guessLen13b(t.length,n.length),o=this.makeRBT(i),s=this.stub(i),a=new Array(i),u=new Array(i),l=new Array(i),c=new Array(i),f=new Array(i),h=new Array(i),p=r.words;p.length=i,this.convert13b(t.words,t.length,a,i),this.convert13b(n.words,n.length,c,i),this.transform(a,s,u,l,i,o),this.transform(c,s,f,h,i,o);for(var d=0;d<i;d++){var m=u[d]*f[d]-l[d]*h[d];l[d]=u[d]*h[d]+l[d]*f[d],u[d]=m}return this.conjugate(u,l,i),this.transform(u,l,p,s,i,o),this.conjugate(p,s,i),this.normalize13b(p,i),r.negative=t.negative^n.negative,r.length=t.length+n.length,r.strip()},o.prototype.mul=function e(t){var n=new o(null);return n.words=new Array(this.length+t.length),this.mulTo(t,n)},o.prototype.mulf=function e(t){var n=new o(null);return n.words=new Array(this.length+t.length),g(this,t,n)},o.prototype.imul=function e(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function e(t){r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),this},o.prototype.muln=function e(t){return this.clone().imuln(t)},o.prototype.sqr=function e(){return this.mul(this)},o.prototype.isqr=function e(){return this.imul(this.clone())},o.prototype.pow=function e(t){var n=h(t);if(0===n.length)return new o(1);for(var r=this,i=0;i<n.length&&0===n[i];i++,r=r.sqr());if(++i<n.length)for(var s=r.sqr();i<n.length;i++,s=s.sqr())0!==n[i]&&(r=r.mul(s));return r},o.prototype.iushln=function e(t){r("number"==typeof t&&t>=0);var n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n,s;if(0!==n){var a=0;for(s=0;s<this.length;s++){var u=this.words[s]&o,l=(0|this.words[s])-u<<n;this.words[s]=l|a,a=u>>>26-n}a&&(this.words[s]=a,this.length++)}if(0!==i){for(s=this.length-1;s>=0;s--)this.words[s+i]=this.words[s];for(s=0;s<i;s++)this.words[s]=0;this.length+=i}return this.strip()},o.prototype.ishln=function e(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function e(t,n,i){var o;r("number"==typeof t&&t>=0),o=n?(n-n%26)/26:0;var s=t%26,a=Math.min((t-s)/26,this.length),u=67108863^67108863>>>s<<s,l=i;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=o);c--){var h=0|this.words[c];this.words[c]=f<<26-s|h>>>s,f=h&u}return l&&0!==f&&(l.words[l.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function e(t,n,i){return r(0===this.negative),this.iushrn(t,n,i)},o.prototype.shln=function e(t){return this.clone().ishln(t)},o.prototype.ushln=function e(t){return this.clone().iushln(t)},o.prototype.shrn=function e(t){return this.clone().ishrn(t)},o.prototype.ushrn=function e(t){return this.clone().iushrn(t)},o.prototype.testn=function e(t){r("number"==typeof t&&t>=0);var n=t%26,i=(t-n)/26,o=1<<n;if(this.length<=i)return!1;var s=this.words[i];return!!(s&o)},o.prototype.imaskn=function e(t){r("number"==typeof t&&t>=0);var n=t%26,i=(t-n)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==n&&i++,this.length=Math.min(i,this.length),0!==n){var o=67108863^67108863>>>n<<n;this.words[this.length-1]&=o}return this.strip()},o.prototype.maskn=function e(t){return this.clone().imaskn(t)},o.prototype.iaddn=function e(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 e(t){this.words[0]+=t;for(var n=0;n<this.length&&this.words[n]>=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},o.prototype.isubn=function e(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 n=0;n<this.length&&this.words[n]<0;n++)this.words[n]+=67108864,this.words[n+1]-=1;return this.strip()},o.prototype.addn=function e(t){return this.clone().iaddn(t)},o.prototype.subn=function e(t){return this.clone().isubn(t)},o.prototype.iabs=function e(){return this.negative=0,this},o.prototype.abs=function e(){return this.clone().iabs()},o.prototype._ishlnsubmul=function e(t,n,i){var o=t.length+i,s,a;this._expand(o);var u=0;for(s=0;s<t.length;s++){a=(0|this.words[s+i])+u;var l=(0|t.words[s])*n;a-=67108863&l,u=(a>>26)-(l/67108864|0),this.words[s+i]=67108863&a}for(;s<this.length-i;s++)a=(0|this.words[s+i])+u,u=a>>26,this.words[s+i]=67108863&a;if(0===u)return this.strip();for(r(-1===u),u=0,s=0;s<this.length;s++)a=-(0|this.words[s])+u,u=a>>26,this.words[s]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function e(t,n){var r=this.length-t.length,i=this.clone(),s=t,a=0|s.words[s.length-1],u=this._countBits(a);r=26-u,0!==r&&(s=s.ushln(r),i.iushln(r),a=0|s.words[s.length-1]);var l=i.length-s.length,c;if("mod"!==n){c=new o(null),c.length=l+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=i.clone()._ishlnsubmul(s,1,l);0===h.negative&&(i=h,c&&(c.words[l]=1));for(var p=l-1;p>=0;p--){var d=67108864*(0|i.words[s.length+p])+(0|i.words[s.length+p-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(s,d,p);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(s,1,p),i.isZero()||(i.negative^=1);c&&(c.words[p]=d)}return c&&c.strip(),i.strip(),"div"!==n&&0!==r&&i.iushrn(r),{div:c||null,mod:i}},o.prototype.divmod=function e(t,n,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(u=this.neg().divmod(t,n),"mod"!==n&&(s=u.div.neg()),"div"!==n&&(a=u.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:s,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),n),"mod"!==n&&(s=u.div.neg()),{div:s,mod:u.mod}):0!=(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),n),"div"!==n&&(a=u.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:u.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===n?{div:this.divn(t.words[0]),mod:null}:"mod"===n?{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,n);var s,a,u},o.prototype.div=function e(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function e(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function e(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function e(t){var n=this.divmod(t);if(n.mod.isZero())return n.div;var r=0!==n.div.negative?n.mod.isub(t):n.mod,i=t.ushrn(1),o=t.andln(1),s=r.cmp(i);return s<0||1===o&&0===s?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},o.prototype.modn=function e(t){r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return i},o.prototype.idivn=function e(t){r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this.strip()},o.prototype.divn=function e(t){return this.clone().idivn(t)},o.prototype.egcd=function e(t){r(0===t.negative),r(!t.isZero());var n=this,i=t.clone();n=0!==n.negative?n.umod(t):n.clone();for(var s=new o(1),a=new o(0),u=new o(0),l=new o(1),c=0;n.isEven()&&i.isEven();)n.iushrn(1),i.iushrn(1),++c;for(var f=i.clone(),h=n.clone();!n.isZero();){for(var p=0,d=1;0==(n.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(f),a.isub(h)),s.iushrn(1),a.iushrn(1);for(var m=0,g=1;0==(i.words[0]&g)&&m<26;++m,g<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(f),l.isub(h)),u.iushrn(1),l.iushrn(1);n.cmp(i)>=0?(n.isub(i),s.isub(u),a.isub(l)):(i.isub(n),u.isub(s),l.isub(a))}return{a:u,b:l,gcd:i.iushln(c)}},o.prototype._invmp=function e(t){r(0===t.negative),r(!t.isZero());var n=this,i=t.clone();n=0!==n.negative?n.umod(t):n.clone();for(var s=new o(1),a=new o(0),u=i.clone(),l;n.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,f=1;0==(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,p=1;0==(i.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(i.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);n.cmp(i)>=0?(n.isub(i),s.isub(a)):(i.isub(n),a.isub(s))}return l=0===n.cmpn(1)?s:a,l.cmpn(0)<0&&l.iadd(t),l},o.prototype.gcd=function e(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var n=this.clone(),r=t.clone();n.negative=0,r.negative=0;for(var i=0;n.isEven()&&r.isEven();i++)n.iushrn(1),r.iushrn(1);for(;;){for(;n.isEven();)n.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=n.cmp(r);if(o<0){var s=n;n=r,r=s}else if(0===o||0===r.cmpn(1))break;n.isub(r)}return r.iushln(i)},o.prototype.invm=function e(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function e(){return 0==(1&this.words[0])},o.prototype.isOdd=function e(){return 1==(1&this.words[0])},o.prototype.andln=function e(t){return this.words[0]&t},o.prototype.bincn=function e(t){r("number"==typeof t);var n=t%26,i=(t-n)/26,o=1<<n;if(this.length<=i)return this._expand(i+1),this.words[i]|=o,this;for(var s=o,a=i;0!==s&&a<this.length;a++){var u=0|this.words[a];u+=s,s=u>>>26,u&=67108863,this.words[a]=u}return 0!==s&&(this.words[a]=s,this.length++),this},o.prototype.isZero=function e(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function e(t){var n=t<0,i;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)i=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var o=0|this.words[0];i=o===t?0:o<t?-1:1}return 0!==this.negative?0|-i:i},o.prototype.cmp=function e(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var n=this.ucmp(t);return 0!==this.negative?0|-n:n},o.prototype.ucmp=function e(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var n=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],o=0|t.words[r];if(i!==o){i<o?n=-1:i>o&&(n=1);break}}return n},o.prototype.gtn=function e(t){return 1===this.cmpn(t)},o.prototype.gt=function e(t){return 1===this.cmp(t)},o.prototype.gten=function e(t){return this.cmpn(t)>=0},o.prototype.gte=function e(t){return this.cmp(t)>=0},o.prototype.ltn=function e(t){return-1===this.cmpn(t)},o.prototype.lt=function e(t){return-1===this.cmp(t)},o.prototype.lten=function e(t){return this.cmpn(t)<=0},o.prototype.lte=function e(t){return this.cmp(t)<=0},o.prototype.eqn=function e(t){return 0===this.cmpn(t)},o.prototype.eq=function e(t){return 0===this.cmp(t)},o.red=function e(t){return new E(t)},o.prototype.toRed=function e(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 e(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function e(t){return this.red=t,this},o.prototype.forceRed=function e(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function e(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function e(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function e(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function e(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function e(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function e(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 e(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 e(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function e(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function e(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function e(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function e(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function e(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){E.call(this,e),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)}v.prototype._tmp=function e(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function e(t){var n=t,r;do{this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),r=n.bitLength()}while(r>this.n);var i=r<this.n?-1:n.ucmp(this.p);return 0===i?(n.words[0]=0,n.length=1):i>0?n.isub(this.p):n.strip(),n},v.prototype.split=function e(t,n){t.iushrn(this.n,0,n)},v.prototype.imulK=function e(t){return t.imul(this.k)},i(w,v),w.prototype.split=function e(t,n){for(var r=4194303,i=Math.min(t.length,9),o=0;o<i;o++)n.words[o]=t.words[o];if(n.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];for(n.words[n.length++]=s&r,o=10;o<t.length;o++){var a=0|t.words[o];t.words[o-10]=(a&r)<<4|s>>>22,s=a}s>>>=22,t.words[o-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function e(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var n=0,r=0;r<t.length;r++){var i=0|t.words[r];n+=977*i,t.words[r]=67108863&n,n=64*i+(n/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,v),i(k,v),i(S,v),S.prototype.imulK=function e(t){for(var n=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+n,o=67108863&i;i>>>=26,t.words[r]=o,n=i}return 0!==n&&(t.words[t.length++]=n),t},o._prime=function e(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new _;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function e(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function e(t,n){r(0==(t.negative|n.negative),"red works only with positives"),r(t.red&&t.red===n.red,"red works only with red numbers")},E.prototype.imod=function e(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function e(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function e(t,n){this._verify2(t,n);var r=t.add(n);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function e(t,n){this._verify2(t,n);var r=t.iadd(n);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function e(t,n){this._verify2(t,n);var r=t.sub(n);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function e(t,n){this._verify2(t,n);var r=t.isub(n);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function e(t,n){return this._verify1(t),this.imod(t.ushln(n))},E.prototype.imul=function e(t,n){return this._verify2(t,n),this.imod(t.imul(n))},E.prototype.mul=function e(t,n){return this._verify2(t,n),this.imod(t.mul(n))},E.prototype.isqr=function e(t){return this.imul(t,t.clone())},E.prototype.sqr=function e(t){return this.mul(t,t)},E.prototype.sqrt=function e(t){if(t.isZero())return t.clone();var n=this.m.andln(3);if(r(n%2==1),3===n){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);r(!s.isZero());var u=new o(1).toRed(this),l=u.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(l);)f.redIAdd(l);for(var h=this.pow(f,s),p=this.pow(t,s.addn(1).iushrn(1)),d=this.pow(t,s),m=a;0!==d.cmp(u);){for(var g=d,y=0;0!==g.cmp(u);y++)g=g.redSqr();r(y<m);var b=this.pow(h,new o(1).iushln(m-y-1));p=p.redMul(b),h=b.redSqr(),d=d.redMul(h),m=y}return p},E.prototype.invm=function e(t){var n=t._invmp(this.m);return 0!==n.negative?(n.negative=0,this.imod(n).redNeg()):this.imod(n)},E.prototype.pow=function e(t,n){if(n.isZero())return new o(1).toRed(this);if(0===n.cmpn(1))return t.clone();var r=4,i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var s=2;s<i.length;s++)i[s]=this.mul(i[s-1],t);var a=i[0],u=0,l=0,c=n.bitLength()%26;for(0===c&&(c=26),s=n.length-1;s>=0;s--){for(var f=n.words[s],h=c-1;h>=0;h--){var p=f>>h&1;a!==i[0]&&(a=this.sqr(a)),0!==p||0!==u?(u<<=1,u|=p,l++,(4===l||0===s&&0===h)&&(a=this.mul(a,i[u]),l=0,u=0)):l=0}c=26}return a},E.prototype.convertTo=function e(t){var n=t.umod(this.m);return n===t?n.clone():n},E.prototype.convertFrom=function e(t){var n=t.clone();return n.red=null,n},o.mont=function e(t){return new x(t)},i(x,E),x.prototype.convertTo=function e(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function e(t){var n=this.imod(t.mul(this.rinv));return n.red=null,n},x.prototype.imul=function e(t,n){if(t.isZero()||n.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(n),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function e(t,n){if(t.isZero()||n.isZero())return new o(0)._forceRed(this);var r=t.mul(n),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(i).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function e(t){var n=this.imod(t._invmp(this.m).mul(this.r2));return n._forceRed(this)}}(e,this)}).call(this,n(75)(e))},function(e,t,n){"use strict";const r=n(475),i=n(945),o=n(456);t=e.exports,t.aes=i,t.hmac=r,t.keys=o,t.randomBytes=n(315),t.pbkdf2=n(957)},function(e,t,n){"use strict";(function(t){const r=n(76),i=n(35),o=n(88),s=n(9),a=/^https?:\/\/[^/]+\/(ip(f|n)s)\/((\w+).*)/,u=/^\/(ip(f|n)s)\/((\w+).*)/,l=1,c=4,f=/^https?:\/\/([^/]+)\.(ip(?:f|n)s)\.[^/]+/,h=1,p=2;function d(e){const n=v(e);try{const e=t.from(r.decode(n));return i.decode(e),!0}catch(e){return!1}}function m(e){try{return o.isEncoded(e)}catch(e){return!1}}function g(e){try{return s.isCID(new s(e))}catch(e){return!1}}function y(e,t,n=l,r=c){const i=v(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipfs"!==o[n])return!1;let s=o[r];return s&&t===f&&(s=s.toLowerCase()),g(s)}function b(e,t,n=l,r){const i=v(e);if(!i)return!1;const o=i.match(t);if(!o)return!1;if("ipns"!==o[n])return!1;if(r&&t===f){let e=o[r];return e=e.toLowerCase(),g(e)}return!0}function v(e){return t.isBuffer(e)?r.encode(e):"string"==typeof e&&e}const w=e=>y(e,f,2,1),_=e=>b(e,f,2,1);e.exports={multihash:d,cid:g,base32cid:e=>"base32"===m(e)&&g(e),ipfsSubdomain:w,ipnsSubdomain:_,subdomain:e=>w(e)||_(e),subdomainPattern:f,ipfsUrl:e=>y(e,a),ipnsUrl:e=>b(e,a),url:e=>y(e,a)||b(e,a),urlPattern:a,ipfsPath:e=>y(e,u),ipnsPath:e=>b(e,u),path:e=>y(e,u)||b(e,u),pathPattern:u,urlOrPath:e=>y(e,a)||b(e,a)||y(e,u)||b(e,u)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";t.Connection=n(1058)},function(e,t){function n(){}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=r;var n=Object.prototype.hasOwnProperty;function r(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e}},function(e,t,n){t.source=n(225),t.through=n(857),t.sink=n(436),t.duplex=n(437)},function(e,t,n){"use strict";(function(t){var r=n(873),i=n(877),o=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(n){t[n]=e[n].value}),t};e.exports=function(e,n){if(n||(n={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var s="object"!=typeof e||t.isBuffer(e)?r.parse(e):e,a=function(){var e=this;i(s,n.encodings||{}).forEach(function(t){e[t.name]=o(t.values)||t})};return a.prototype.toString=function(){return r.stringify(s)},a.prototype.toJSON=function(){return s},new a}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(990),i=n(991);t.encode=r,t.decode=i.decode,t.decodeFromReader=i.decodeFromReader},function(e,t){function n(e,t){"function"==typeof e&&(t=e,e=!1);var n=[],r,i,o;function s(e,t){e&&(r=e,i&&c(r)),i=t,l()}function a(e){o=o||e||!0,l()}function u(e){o||(i?c(r,e):n.push(e))}return e?{push:u,end:a,source:s,buffer:n}:(s.push=u,s.end=a,s.buffer=n,s);function l(){i&&(r?c(r):!n.length&&o?c(o):n.length&&c(null,n.shift()))}function c(e,n){var r=i;if(e&&t){var o=t;t=null,o(!0===e?null:e)}i=null,r(e,n)}}e.exports=n},function(e,t,n){"use strict";var r=t;r.version=n(1329).version,r.utils=n(1330),r.rand=n(574),r.curve=n(268),r.curves=n(1336),r.ec=n(1344),r.eddsa=n(1348)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],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}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(771),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.exports=r(i)},function(e,t,n){"use strict";function r(e){return e}var i=n(177);e.exports=function e(t){return t?(t=i(t),function(e){return function(n,r){e(n,function(n,i){try{i=n?null:t(i)}catch(t){return e(t,function(){return r(t)})}r(n,i)})}}):r}},function(e,t,n){"use strict";var r=n(407);e.exports=function e(t){return t=r(t),function(e){return function n(r,i){for(var o,s=!0;s;)s=!1,o=!0,e(r,function(e,r){if(!e&&!t(r))return o?s=!0:n(e,i);i(e,r)}),o=!1}}}},function(e,t,n){(function(r){var i=n(12),o=n(525);function s(e){e.destroy?e.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function a(e,t,n){var i,a=!1,u;function l(){u||(u=!0,n&&n(!0===i?null:i))}function c(){a||(a=!0,h(),i?l():e(i=!0,l))}function f(t){h(),i||e(i=t,l)}function h(){t.on("finish",c),t.removeListener("close",c),t.removeListener("error",f)}t.on("close",c),t.on("finish",c),t.on("error",f),r.nextTick(function(){o(function(n){e(null,function(e,r){if(i=i||e,!0===e)return t._isStdio?l():t.end();if(i=i||e)return s(t),l(i);if(t._isStdio)t.write(r,function(){n()});else{var o=t.write(r);!1===o?t.once("drain",n):n()}})})})}function u(e,t,n){function r(i){t.forEach(function(t){e.removeListener(t,r)}),n(i)}return t.forEach(function(t){e.on(t,r)}),e}function l(e){var t=!1,n=!1,r;function i(){var t=e.read();if(null!==t&&r){var n=r;r=null,n(null,t)}}return e.on("readable",function(){n=!0,r&&i()}).on("end",function(){t=!0,r&&r(t)}).on("error",function(e){t=e,r&&r(t)}),function(e,o){r=o,t?o(t):n&&i()}}function c(e){var t=[],n=[],r,i=!1,o;function a(){for(;(t.length||r)&&n.length;)n.shift()(t.length?null:r,t.shift());!t.length&&i&&(i=!1,e.resume())}return e.on("data",function(n){t.push(n),a(),t.length&&e.pause&&(i=!0,e.pause())}),e.on("end",function(){r=!0,a()}),e.on("close",function(){r=!0,a()}),e.on("error",function(e){r=e,a()}),function(t,i){if(!i)throw new Error("*must* provide cb");if(t){function o(){for(;n.length;)n.shift()(t);i(t)}if(r)return o();e.once("close",o),s(e)}else n.push(i),a()}}var f=c,h=function(e,t){return function(n){return a(n,e,t)}},p=function(e){return c(e)};t=e.exports=function(e,t){return e.writable&&e.write?e.readable?function(n){return a(n,e,t),c(e)}:h(e,t):p(e)},t.sink=h,t.source=p,t.read=f,t.read1=c,t.read2=l,t.duplex=function(e,t){return{source:p(e),sink:h(e,t)}},t.transform=function(e){return function(t){var n=p(e);return h(e)(t),n}}}).call(this,n(2))},function(e,t,n){"use strict";(function(t){var r=n(30),i=n(18),o=function e(t){if(!(this instanceof e))return new e(t);t?this.set(t):this.bufs=[]};o.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this},o.prototype.toBuffer=function(){return this.concat()},o.prototype.concat=function(){return t.concat(this.bufs)},o.prototype.write=function(e){return i(r.isBuffer(e)),this.bufs.push(e),this},o.prototype.writeReverse=function(e){return i(r.isBuffer(e)),this.bufs.push(r.reverse(e)),this},o.prototype.writeUInt8=function(e){var n=new t(1);return n.writeUInt8(e,0),this.write(n),this},o.prototype.writeUInt16BE=function(e){var n=new t(2);return n.writeUInt16BE(e,0),this.write(n),this},o.prototype.writeUInt16LE=function(e){var n=new t(2);return n.writeUInt16LE(e,0),this.write(n),this},o.prototype.writeUInt32BE=function(e){var n=new t(4);return n.writeUInt32BE(e,0),this.write(n),this},o.prototype.writeInt32LE=function(e){var n=new t(4);return n.writeInt32LE(e,0),this.write(n),this},o.prototype.writeUInt32LE=function(e){var n=new t(4);return n.writeUInt32LE(e,0),this.write(n),this},o.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this},o.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this},o.prototype.writeVarintNum=function(e){var t=o.varintBufNum(e);return this.write(t),this},o.prototype.writeVarintBN=function(e){var t=o.varintBufBN(e);return this.write(t),this},o.varintBufNum=function(e){var n=void 0;return e<253?(n=new t(1),n.writeUInt8(e,0)):e<65536?(n=new t(3),n.writeUInt8(253,0),n.writeUInt16LE(e,1)):e<4294967296?(n=new t(5),n.writeUInt8(254,0),n.writeUInt32LE(e,1)):(n=new t(9),n.writeUInt8(255,0),n.writeInt32LE(-1&e,1),n.writeUInt32LE(Math.floor(e/4294967296),5)),n},o.varintBufBN=function(e){var n=void 0,r=e.toNumber();if(r<253)n=new t(1),n.writeUInt8(r,0);else if(r<65536)n=new t(3),n.writeUInt8(253,0),n.writeUInt16LE(r,1);else if(r<4294967296)n=new t(5),n.writeUInt8(254,0),n.writeUInt32LE(r,1);else{var i=new o;i.writeUInt8(255),i.writeUInt64LEBN(e);var n=i.concat()}return n},e.exports=o}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=function e(t){return function(e,n){n(t)}}},function(e,t,n){"use strict";const r=n(265);e.exports={addLink:n(553),countStreamBytes:n(1264),createLock:n(1265),createNode:n(1281),formatCid:n(1282),limitStreamBytes:n(1283),loadNode:n(1284),removeLink:n(1285),toMfsPath:n(558),toPathComponents:n(343),toPullSource:n(1286),toSourcesAndDestination:n(1295),toSources:n(567),toTrail:n(1296),updateMfsRoot:n(1297),updateTree:n(1298),withMfsRoot:n(559),zeros:n(1301),FILE_SEPARATOR:r.FILE_SEPARATOR,MAX_CHUNK_SIZE:r.MAX_CHUNK_SIZE,MAX_LINKS:r.MAX_LINKS,FILE_TYPES:r.FILE_TYPES}},function(e,t){e.exports={bitcoin:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},regtest:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},testnet:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}}},function(e,t,n){"use strict";var r=n(17);function i(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var o=function(e,t){var n=function(){if(r.isString(t.message))this.message=i(t.message,arguments);else{if(!r.isFunction(t.message))throw new Error("Invalid error definition for "+t.name);this.message=t.message.apply(null,arguments)}this.stack=this.message+"\n"+(new Error).stack};return n.prototype=Object.create(e.prototype),n.prototype.name=e.prototype.name+t.name,e[t.name]=n,t.errors&&s(n,t.errors),n},s=function(e,t){r.each(t,function(t){o(e,t)})},a=function(e,t){return s(e,t),e},u={Error:function(){this.message="Internal error",this.stack=this.message+"\n"+(new Error).stack}};u.Error.prototype=Object.create(Error.prototype),u.Error.prototype.name="bitcore.Error";var l=n(1433);a(u.Error,l),e.exports=u.Error,e.exports.extend=function(e){return o(u.Error,e)}},function(e,t,n){"use strict";(function(t){var r=n(49),i=n(17),o=n(25),s=n(30),a=n(41),u=function e(t,n){if(!(this instanceof e))return new e(t,n);if(t instanceof r)this.set({r:t,s:n});else if(t){var i=t;this.set(i)}};u.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=void 0!==e.i?e.i:this.i,this.compressed=void 0!==e.compressed?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this},u.fromCompact=function(e){o.checkArgument(s.isBuffer(e),"Argument is expected to be a Buffer");var t=new u,n=!0,i=e.slice(0,1)[0]-27-4;i<0&&(n=!1,i+=4);var a=e.slice(1,33),l=e.slice(33,65);return o.checkArgument(0===i||1===i||2===i||3===i,new Error("i must be 0, 1, 2, or 3")),o.checkArgument(32===a.length,new Error("r must be 32 bytes")),o.checkArgument(32===l.length,new Error("s must be 32 bytes")),t.compressed=n,t.i=i,t.r=r.fromBuffer(a),t.s=r.fromBuffer(l),t},u.fromDER=u.fromBuffer=function(e,t){var n=u.parseDER(e,t),r=new u;return r.r=n.r,r.s=n.s,r},u.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),n=e.slice(0,e.length-1),r=new u.fromDER(n,!1);return r.nhashtype=t,r},u.fromString=function(e){var n=new t(e,"hex");return u.fromDER(n)},u.parseDER=function(e,t){o.checkArgument(s.isBuffer(e),new Error("DER formatted signature should be a buffer")),i.isUndefined(t)&&(t=!0);var n=e[0];o.checkArgument(48===n,new Error("Header byte should be 0x30"));var a=e[1],u=e.slice(2).length;o.checkArgument(!t||a===u,new Error("Length byte should length of what follows")),a=a<u?a:u;var l=e[2];o.checkArgument(2===l,new Error("Integer byte for r should be 0x02"));var c=e[3],f=e.slice(4,4+c),h=r.fromBuffer(f),p=0===e[4];o.checkArgument(c===f.length,new Error("Length of r incorrect"));var d=e[4+c+0];o.checkArgument(2===d,new Error("Integer byte for s should be 0x02"));var m=e[4+c+1],g=e.slice(4+c+2,4+c+2+m),y=r.fromBuffer(g),b=0===e[4+c+2+2];o.checkArgument(m===g.length,new Error("Length of s incorrect"));var v=4+c+2+m;o.checkArgument(a===v-2,new Error("Length of signature incorrect"));var w={header:n,length:a,rheader:l,rlength:c,rneg:p,rbuf:f,r:h,sheader:d,slength:m,sneg:b,sbuf:g,s:y};return w},u.prototype.toCompact=function(e,n){if(e="number"==typeof e?e:this.i,n="boolean"==typeof n?n:this.compressed,0!==e&&1!==e&&2!==e&&3!==e)throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;!1===n&&(r-=4);var i=new t([r]),o=this.r.toBuffer({size:32}),s=this.s.toBuffer({size:32});return t.concat([i,o,s])},u.prototype.toBuffer=u.prototype.toDER=function(){var e=this.r.toBuffer(),n=this.s.toBuffer(),r=!!(128&e[0]),i=!!(128&n[0]),o=r?t.concat([new t([0]),e]):e,s=i?t.concat([new t([0]),n]):n,a=o.length,u=s.length,l=2+a+2+u,c=2,f=2,h=48,p=t.concat([new t([48,l,2,a]),o,new t([2,u]),s]);return p},u.prototype.toString=function(){var e=this.toDER();return e.toString("hex")},u.isTxDER=function(e){if(e.length<9)return!1;if(e.length>73)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var n=e[5+t];if(t+n+7!==e.length)return!1;var r=e.slice(4);if(2!==e[2])return!1;if(0===t)return!1;if(128&r[0])return!1;if(t>1&&0===r[0]&&!(128&r[1]))return!1;var i=e.slice(6+t);return 2===e[6+t-2]&&(0!==n&&(!(128&i[0])&&!(n>1&&0===i[0]&&!(128&i[1]))))},u.prototype.hasLowS=function(){return!this.s.lt(new r(1))&&!this.s.gt(new r("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))},u.prototype.hasDefinedHashtype=function(){if(!a.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~u.SIGHASH_ANYONECANPAY;return!(e<u.SIGHASH_ALL||e>u.SIGHASH_SINGLE)},u.prototype.toTxFormat=function(){var e=this.toDER(),n=new t(1);return n.writeUInt8(this.nhashtype,0),t.concat([e,n])},u.SIGHASH_ALL=1,u.SIGHASH_NONE=2,u.SIGHASH_SINGLE=3,u.SIGHASH_ANYONECANPAY=128,e.exports=u}).call(this,n(0).Buffer)},function(e,t,n){e.exports=n(600),e.exports.Interpreter=n(1446)},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=7*o,a=365.25*o;function u(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var u=parseFloat(t[1]),l=(t[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function l(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=i?Math.round(e/i)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function c(e){var t=Math.abs(e);return t>=o?f(e,t,o,"day"):t>=i?f(e,t,i,"hour"):t>=r?f(e,t,r,"minute"):t>=n?f(e,t,n,"second"):e+" ms"}function f(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return u(e);if("number"===n&&isFinite(e))return t.long?c(e):l(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";(function(r){const i=n(775);t=e.exports=s,t.encode=a,t.decode=u,t.isEncoded=l,t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));const o=new Error("Unsupported encoding");function s(e,t){if(!t)throw new Error("requires an encoded buffer");const n=f(e),i=r.from(n.code),o=n.name;return c(o,t),r.concat([i,t])}function a(e,t){const n=f(e),i=n.name;return s(i,r.from(n.encode(t)))}function u(e){r.isBuffer(e)&&(e=e.toString());const t=e.substring(0,1);e=e.substring(1,e.length),"string"==typeof e&&(e=r.from(e));const n=f(t);return r.from(n.decode(e.toString()))}function l(e){if(r.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1;const t=e.substring(0,1);try{const e=f(t);return e.name}catch(e){return!1}}function c(e,t){const n=f(e);n.decode(t.toString())}function f(e){let t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";function r(e){return e}var i=n(177);e.exports=function e(t){if(!t)return r;t=i(t);var n=!1,o,s;return function(e){return function r(i,a){if(s)return a(s);i?(s=i,e(i,n?function(e){n?o=a:a(i)}:function(e){a(i)})):e(null,function(e,i){e?a(e):s?a(s):(n=!0,t(i,function(e,t){n=!1,s?(a(s),o&&o(s)):e?r(e,a):a(null,t)}))})}}}},function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=n(218),o;o=i.hasNextTick?r.nextTick:i.hasSetImmediate?setImmediate:i.fallback,t.default=(0,i.wrap)(o),e.exports=t.default}).call(this,n(2))},function(e,t,n){"use strict";const r=n(24),i=T("dns4"),o=T("dns6"),s=I(T("dnsaddr"),i,o),a=I(T("ip4"),T("ip6")),u=I(A(a,T("tcp")),A(s,T("tcp"))),l=A(a,T("udp")),c=A(l,T("utp")),f=I(A(s,T("tcp")),s),h=I(A(u,T("ws")),A(f,T("ws"))),p=I(A(u,T("wss")),A(f,T("wss"))),d=I(A(u,T("http")),A(a,T("http")),A(f,T("http")),A(f)),m=I(A(u,T("https")),A(a,T("https")),A(f,T("https"))),g=I(A(h,T("p2p-webrtc-star"),T("ipfs")),A(p,T("p2p-webrtc-star"),T("ipfs"))),y=I(A(h,T("p2p-websocket-star"),T("ipfs")),A(p,T("p2p-websocket-star"),T("ipfs")),A(h,T("p2p-websocket-star")),A(p,T("p2p-websocket-star"))),b=I(A(d,T("p2p-webrtc-direct")),A(m,T("p2p-webrtc-direct"))),v=I(h,p,d,m,g,b,u,c),w=I(A(v,T("p2p-stardust"),T("ipfs")),A(v,T("p2p-stardust")));let _=I(A(v,T("ipfs")),g,T("ipfs"));const k=I(A(_,T("p2p-circuit"),_),A(_,T("p2p-circuit")),A(T("p2p-circuit"),_),A(v,T("p2p-circuit")),A(T("p2p-circuit"),v),T("p2p-circuit")),S=()=>I(A(k,S),k),E=S(),x=I(A(E,_,E),A(_,E),A(E,_),E,_);function C(e){return function t(n){if(!r.isMultiaddr(n))try{n=r(n)}catch(e){return!1}let i=e(n.protoNames());return null!==i&&0===i.length}}function A(){const e=Array.from(arguments);function t(t){return t.length<e.length?null:(e.some(e=>{if(t="function"==typeof e?e().partialMatch(t):e.partialMatch(t),null===t)return!0}),t)}return{toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:C(t),partialMatch:t}}function I(){const e=Array.from(arguments);function t(t){let n=null;return e.some(e=>{const r="function"==typeof e?e().partialMatch(t):e.partialMatch(t);if(r)return n=r,!0}),n}const n={toString:function(){return"{ "+e.join(" ")+" }"},input:e,matches:C(t),partialMatch:t};return n}function T(e){const t=e;function n(e){if("string"==typeof e)try{e=r(e)}catch(e){return!1}const n=e.protoNames();return 1===n.length&&n[0]===t}function i(e){return 0===e.length?null:e[0]===t?e.slice(1):null}return{toString:function(){return t},matches:n,partialMatch:i}}t.DNS=f,t.DNS4=i,t.DNS6=o,t.IP=a,t.TCP=u,t.UDP=l,t.UTP=c,t.HTTP=d,t.HTTPS=m,t.WebSockets=h,t.WebSocketsSecure=p,t.WebSocketStar=y,t.WebRTCStar=g,t.WebRTCDirect=b,t.Reliable=v,t.Stardust=w,t.Circuit=E,t.IPFS=x},function(e,t,n){"use strict";var r=n(107),i=n(1);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for(e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n}function a(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t}function u(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function l(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=u(i)),n+=f(i.toString(16))}return n}function c(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function h(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),a=0,u=t;a<s.length;a++,u+=4){var l;l="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=l>>>0}return s}function p(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n}function d(e,t){return e>>>t|e<<32-t}function m(e,t){return e<<t|e>>>32-t}function g(e,t){return e+t>>>0}function y(e,t,n){return e+t+n>>>0}function b(e,t,n,r){return e+t+n+r>>>0}function v(e,t,n,r,i){return e+t+n+r+i>>>0}function w(e,t,n,r){var i=e[t],o=e[t+1],s=r+o>>>0,a=(s<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=s}function _(e,t,n,r){var i=t+r>>>0,o=(i<t?1:0)+e+n;return o>>>0}function k(e,t,n,r){var i=t+r;return i>>>0}function S(e,t,n,r,i,o,s,a){var u=0,l=t;l=l+r>>>0,u+=l<t?1:0,l=l+o>>>0,u+=l<o?1:0,l=l+a>>>0,u+=l<a?1:0;var c=e+n+i+s+u;return c>>>0}function E(e,t,n,r,i,o,s,a){var u=t+r+o+a;return u>>>0}function x(e,t,n,r,i,o,s,a,u,l){var c=0,f=t;f=f+r>>>0,c+=f<t?1:0,f=f+o>>>0,c+=f<o?1:0,f=f+a>>>0,c+=f<a?1:0,f=f+l>>>0,c+=f<l?1:0;var h=e+n+i+s+u+c;return h>>>0}function C(e,t,n,r,i,o,s,a,u,l){var c=t+r+o+a+l;return c>>>0}function A(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}function I(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}function T(e,t,n){return e>>>n}function j(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}t.inherits=i,t.toArray=s,t.toHex=a,t.htonl=u,t.toHex32=l,t.zero2=c,t.zero8=f,t.join32=h,t.split32=p,t.rotr32=d,t.rotl32=m,t.sum32=g,t.sum32_3=y,t.sum32_4=b,t.sum32_5=v,t.sum64=w,t.sum64_hi=_,t.sum64_lo=k,t.sum64_4_hi=S,t.sum64_4_lo=E,t.sum64_5_hi=x,t.sum64_5_lo=C,t.rotr64_hi=A,t.rotr64_lo=I,t.shr64_hi=T,t.shr64_lo=j},function(e,t,n){const r=n(45),i=Math.pow(2,31)-1;function o(e){return r.UInt32(e)&&e<=i}function s(e){return r.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}s.toJSON=function(){return"BIP32 derivation path"};const a=21e14;function u(e){return r.UInt53(e)&&e<=a}const l=r.quacksLike("Point"),c=r.compile({messagePrefix:r.oneOf(r.Buffer,r.String),bip32:{public:r.UInt32,private:r.UInt32},pubKeyHash:r.UInt8,scriptHash:r.UInt8,wif:r.UInt8}),f={BIP32Path:s,Buffer256bit:r.BufferN(32),ECPoint:l,Hash160bit:r.BufferN(20),Hash256bit:r.BufferN(32),Network:c,Satoshi:u,UInt31:o};for(var h in r)f[h]=r[h];e.exports=f},function(e,t,n){"use strict";var r=t;r.version=n(1434).version,r.utils=n(1435),r.rand=n(574),r.hmacDRBG=n(1436),r.curve=n(272),r.curves=n(1441),r.ec=n(1443)},function(e,t,n){"use strict";(function(t){var r=n(49),i=n(152),o=n(60),s=n(41),a=n(128),u=n(17),l=n(25);function c(e,t){if(!(this instanceof c))return new c(e,t);if(l.checkArgument(e,"First argument is required, please include public key data."),e instanceof c)return e;t=t||{};var n=this._classifyArgs(e,t);return n.point.validate(),s.defineImmutable(this,{point:n.point,compressed:n.compressed,network:n.network||a.defaultNetwork}),this}c.prototype._classifyArgs=function(e,n){var r={compressed:u.isUndefined(n.compressed)||n.compressed};if(e instanceof i)r.point=e;else if(e.x&&e.y)r=c._transformObject(e);else if("string"==typeof e)r=c._transformDER(new t(e,"hex"));else if(c._isBuffer(e))r=c._transformDER(e);else{if(!c._isPrivateKey(e))throw new TypeError("First argument is an unrecognized data format.");r=c._transformPrivateKey(e)}return r.network||(r.network=u.isUndefined(n.network)?void 0:a.get(n.network)),r},c._isPrivateKey=function(e){var t=n(273);return e instanceof t},c._isBuffer=function(e){return e instanceof t||e instanceof Uint8Array},c._transformPrivateKey=function(e){l.checkArgument(c._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=i.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t},c._transformDER=function(e,t){l.checkArgument(c._isBuffer(e),"Must be a hex buffer of DER encoded public key");var n={},o,s,a,f;if(t=!!u.isUndefined(t)||t,4!==e[0]&&(t||6!==e[0]&&7!==e[0]))if(3===e[0])a=e.slice(1),o=new r(a),n=c._transformX(!0,o),n.compressed=!0;else{if(2!==e[0])throw new TypeError("Invalid DER format public key");a=e.slice(1),o=new r(a),n=c._transformX(!1,o),n.compressed=!0}else{if(a=e.slice(1,33),f=e.slice(33,65),32!==a.length||32!==f.length||65!==e.length)throw new TypeError("Length of x and y must be 32 bytes");o=new r(a),s=new r(f),n.point=new i(o,s),n.compressed=!1}return n},c._transformX=function(e,t){l.checkArgument("boolean"==typeof e,"Must specify whether y is odd or not (true or false)");var n={};return n.point=i.fromX(e,t),n},c._transformObject=function(e){var t=new r(e.x,"hex"),n=new r(e.y,"hex"),o=new i(t,n);return new c(o,{compressed:e.compressed})},c.fromPrivateKey=function(e){l.checkArgument(c._isPrivateKey(e),"Must be an instance of PrivateKey");var t=c._transformPrivateKey(e);return new c(t.point,{compressed:t.compressed,network:t.network})},c.fromDER=c.fromBuffer=function(e,t){l.checkArgument(c._isBuffer(e),"Must be a hex buffer of DER encoded public key");var n=c._transformDER(e,t);return new c(n.point,{compressed:n.compressed})},c.fromPoint=function(e,t){return l.checkArgument(e instanceof i,"First argument must be an instance of Point."),new c(e,{compressed:t})},c.fromString=function(e,n){var r=new t(e,n||"hex"),i=c._transformDER(r);return new c(i.point,{compressed:i.compressed})},c.fromX=function(e,t){var n=c._transformX(e,t);return new c(n.point,{compressed:n.compressed})},c.getValidationError=function(e){var t;try{new c(e)}catch(e){t=e}return t},c.isValid=function(e){return!c.getValidationError(e)},c.prototype.toObject=c.prototype.toJSON=function e(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},c.prototype.toBuffer=c.prototype.toDER=function(){var e=this.point.getX(),n=this.point.getY(),r=e.toBuffer({size:32}),i=n.toBuffer({size:32}),o;if(this.compressed){var s=i[i.length-1]%2;return o=new t(s?[3]:[2]),t.concat([o,r])}return o=new t([4]),t.concat([o,r,i])},c.prototype._getID=function e(){return o.sha256ripemd160(this.toBuffer())},c.prototype.toAddress=function(e){var t=n(129);return t.fromPublicKey(this,e||this.network)},c.prototype.toString=function(){return this.toDER().toString("hex")},c.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"},e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){var r=n(27),i=n(13);function o(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,o),this.name="FingerprintFormatError",this.fingerprint=e,this.format=t,this.message="Fingerprint format is not supported, or is invalid: ",void 0!==e&&(this.message+=" fingerprint = "+e),void 0!==t&&(this.message+=" format = "+t)}function s(e){Error.captureStackTrace&&Error.captureStackTrace(this,s),this.name="InvalidAlgorithmError",this.algorithm=e,this.message='Algorithm "'+e+'" is not supported'}function a(e,t,n){Error.captureStackTrace&&Error.captureStackTrace(this,a),this.name="KeyParseError",this.format=t,this.keyName=e,this.innerErr=n,this.message="Failed to parse "+e+" as a valid "+t+" format key: "+n.message}function u(e,t,n){Error.captureStackTrace&&Error.captureStackTrace(this,u),this.name="SignatureParseError",this.type=e,this.format=t,this.innerErr=n,this.message="Failed to parse the given data as a "+e+" signature in "+t+" format: "+n.message}function l(e,t,n){Error.captureStackTrace&&Error.captureStackTrace(this,l),this.name="CertificateParseError",this.format=t,this.certName=e,this.innerErr=n,this.message="Failed to parse "+e+" as a valid "+t+" format certificate: "+n.message}function c(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,c),this.name="KeyEncryptedError",this.format=t,this.keyName=e,this.message="The "+t+" format key "+e+" is encrypted (password-protected), and no passphrase was provided in `options`"}i.inherits(o,Error),i.inherits(s,Error),i.inherits(a,Error),i.inherits(u,Error),i.inherits(l,Error),i.inherits(c,Error),e.exports={FingerprintFormatError:o,InvalidAlgorithmError:s,KeyParseError:a,SignatureParseError:u,KeyEncryptedError:c,CertificateParseError:l}},function(e,t){errors={};class n extends Error{constructor(e){super(e||"Coding Error"),this.name="CodingError"}}errors.CodingError=n;class r extends Error{constructor(e){super("To be implemented: "+e),this.name="ToBeImplementedError"}}errors.ToBeImplementedError=r;class i extends Error{constructor(e){super(e||"Transport failure"),this.name="TransportError"}}errors.TransportError=i;class o extends Error{constructor(e){super(e||"Timed out"),this.name="TimeoutError"}}errors.TimeoutError=o;class s extends Error{constructor(e){super(e||"Intentionally Unimplemented Function"),this.name="IntentionallyUnimplementedError"}}errors.IntentionallyUnimplementedError=s,t=e.exports=errors},function(e,t,n){var r=n(388),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(174),i=a(r),o=n(402),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(s.default),e.exports=t.default},function(e,t,n){(function(t){var r=n(57);e.exports=o,e.exports.source=function(e){return o(null,e)},e.exports.sink=function(e){return o(e,null)};var i="undefined"==typeof setImmediate?t.nextTick:setImmediate;function o(e,t){e&&"object"==typeof e&&(t=e.source,e=e.sink);var n=[],o=[],s,a,u=new r,l;u.writable=u.readable=!0,u.write=function(e){return n.length?n.shift()(null,e):o.push(e),n.length||(a=!0),!!n.length},u.end=function(){t?o.length?g():t(s=!0,n.length?n.shift():function(){}):n.length&&n.shift()(!0)},u.source=function(e,t){o.length?(t(null,o.shift()),o.length||u.emit("drain")):((s=s||e)?t(s):n.push(t),a&&(a=!1,u.emit("drain")))},e&&(l=e(u.source)),l&&!t&&(t=l);var c=[],f=[],h=!1,p=!1,d=!1;if(u.sink=function(e){t=e,i(g)},t){u.sink(t);var m=u.pipe.bind(u);u.pipe=function(e,t){var n=m(e,t);return u.paused&&u.resume(),n}}function g(){if(p=!1,t&&!d){for(;c.length&&!u.paused;)u.emit("data",c.shift());if(!u.paused){if(h)return u.emit("end");d=!0,t(null,function e(n,r){d=!1,u.paused?(!0===n?h=n:n?u.emit("error",n):c.push(r),p=!0):n&&!0!==(s=n)?u.emit("error",n):(s=s||n)?u.emit("end"):(u.emit("data",r),d=!0,t(null,e))})}}}return u.pause=function(){return u.paused=!0,u},u.resume=function(){return u.paused=!1,g(),u},u.destroy=function(){!s&&t&&t(s=!0,function(){}),s=!0,n.length&&n.shift()(!0),u.emit("close")},u}}).call(this,n(2))},function(e,t,n){"use strict";(function(t){const r=n(9);e.exports=function(e){if(t.isBuffer(e))return new r(e).toString();if(r.isCID(e))return e.toString();if("string"!=typeof e)throw new Error("unexpected cid type: "+typeof e);return new r(e.split("/")[0]),e}}).call(this,n(0).Buffer)},function(e,t,n){e.exports=p;var r=n(27),i=n(31).Buffer,o=n(55),s=n(15),a=n(96),u=n(47),l=n(103),c=n(209),f=a.InvalidAlgorithmError,h=a.SignatureParseError;function p(e){r.object(e,"options"),r.arrayOfObject(e.parts,"options.parts"),r.string(e.type,"options.type");for(var t={},n=0;n<e.parts.length;++n){var i=e.parts[n];t[i.name]=i}this.type=e.type,this.hashAlgorithm=e.hashAlgo,this.curve=e.curve,this.parts=e.parts,this.part=t}function d(e,t,n,i){if("ssh"===n){try{var o=new c({buffer:e}),s=o.readString()}catch(e){}if(void 0!==o){var a="SSH signature does not match expected type (expected "+t+", got "+s+")";switch(s){case"ssh-rsa":r.strictEqual(t,"rsa",a),i.hashAlgo="sha1";break;case"rsa-sha2-256":r.strictEqual(t,"rsa",a),i.hashAlgo="sha256";break;case"rsa-sha2-512":r.strictEqual(t,"rsa",a),i.hashAlgo="sha512";break;case"ssh-ed25519":r.strictEqual(t,"ed25519",a),i.hashAlgo="sha512";break;default:throw new Error("Unknown SSH signature type: "+s)}var u=o.readPart();return r.ok(o.atEnd(),"extra trailing bytes"),u.name="sig",i.parts.push(u),new p(i)}}return i.parts.push({name:"sig",data:e}),new p(i)}function m(e,t,n,r){var i=new l.BerReader(e);i.readSequence();var o=i.readString(l.Ber.Integer,!0),s=i.readString(l.Ber.Integer,!0);return r.parts.push({name:"r",data:u.mpNormalize(o)}),r.parts.push({name:"s",data:u.mpNormalize(s)}),new p(r)}function g(e,t,n,i){if(40!=e.length){var o=new c({buffer:e}),s=o.readBuffer();"ssh-dss"===s.toString("ascii")&&(s=o.readBuffer()),r.ok(o.atEnd(),"extra trailing bytes"),r.strictEqual(s.length,40,"invalid inner length"),e=s}return i.parts.push({name:"r",data:e.slice(0,20)}),i.parts.push({name:"s",data:e.slice(20,40)}),new p(i)}function y(e,t,n,i){var o=new c({buffer:e}),s,a,u=o.readBuffer(),l=u.toString("ascii");if("ecdsa-"===l.slice(0,6)){var f=l.split("-");switch(r.strictEqual(f[0],"ecdsa"),r.strictEqual(f[1],"sha2"),i.curve=f[2],i.curve){case"nistp256":i.hashAlgo="sha256";break;case"nistp384":i.hashAlgo="sha384";break;case"nistp521":i.hashAlgo="sha512";break;default:throw new Error("Unsupported ECDSA curve: "+i.curve)}u=o.readBuffer(),r.ok(o.atEnd(),"extra trailing bytes on outer"),o=new c({buffer:u}),s=o.readPart()}else s={data:u};return a=o.readPart(),r.ok(o.atEnd(),"extra trailing bytes"),s.name="r",a.name="s",i.parts.push(s),i.parts.push(a),new p(i)}p.prototype.toBuffer=function(e){var t;void 0===e&&(e="asn1"),r.string(e,"format");var n="ssh-"+this.type;switch(this.type){case"rsa":switch(this.hashAlgorithm){case"sha256":n="rsa-sha2-256";break;case"sha512":n="rsa-sha2-512";break;case"sha1":case void 0:break;default:throw new Error("SSH signature format does not support hash algorithm "+this.hashAlgorithm)}return"ssh"===e?(t=new c({}),t.writeString(n),t.writePart(this.part.sig),t.toBuffer()):this.part.sig.data;case"ed25519":return"ssh"===e?(t=new c({}),t.writeString(n),t.writePart(this.part.sig),t.toBuffer()):this.part.sig.data;case"dsa":case"ecdsa":var o,s;if("asn1"===e){var a=new l.BerWriter;return a.startSequence(),o=u.mpNormalize(this.part.r.data),s=u.mpNormalize(this.part.s.data),a.writeBuffer(o,l.Ber.Integer),a.writeBuffer(s,l.Ber.Integer),a.endSequence(),a.buffer}if("ssh"===e&&"dsa"===this.type){if(t=new c({}),t.writeString("ssh-dss"),o=this.part.r.data,o.length>20&&0===o[0]&&(o=o.slice(1)),s=this.part.s.data,s.length>20&&0===s[0]&&(s=s.slice(1)),this.hashAlgorithm&&"sha1"!==this.hashAlgorithm||o.length+s.length!==40)throw new Error("OpenSSH only supports DSA signatures with SHA1 hash");return t.writeBuffer(i.concat([o,s])),t.toBuffer()}if("ssh"===e&&"ecdsa"===this.type){var f=new c({}),h;o=this.part.r.data,f.writeBuffer(o),f.writePart(this.part.s),t=new c({}),0===o[0]&&(o=o.slice(1));var p=8*o.length;return 256===p?h="nistp256":384===p?h="nistp384":528===p&&(h="nistp521"),t.writeString("ecdsa-sha2-"+h),t.writeBuffer(f.toBuffer()),t.toBuffer()}throw new Error("Invalid signature format");default:throw new Error("Invalid signature data")}},p.prototype.toString=function(e){return r.optionalString(e,"format"),this.toBuffer(e).toString("base64")},p.parse=function(e,t,n){"string"==typeof e&&(e=i.from(e,"base64")),r.buffer(e,"data"),r.string(n,"format"),r.string(t,"type");var o={};o.type=t.toLowerCase(),o.parts=[];try{switch(r.ok(e.length>0,"signature must not be empty"),o.type){case"rsa":case"ed25519":return d(e,t,n,o);case"dsa":case"ecdsa":return"asn1"===n?m(e,t,n,o):"dsa"===o.type?g(e,t,n,o):y(e,t,n,o);default:throw new f(t)}}catch(e){if(e instanceof f)throw e;throw new h(t,n,e)}},p.isSignature=function(e,t){return u.isCompatible(e,p,t)},p.prototype._sshpkApiVersion=[2,1],p._oldVersionDetect=function(e){return r.func(e.toBuffer),e.hasOwnProperty("hashAlgorithm")?[2,0]:[1,0]}},function(e,t,n){var r=n(1853);e.exports={Ber:r,BerReader:r.Reader,BerWriter:r.Writer}},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e,t){t|=0;for(var n=Math.max(e.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=e[t+i];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function e(){return function(e,t){t(!0)}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function e(t,n,r){if(t!=n)throw new Error(r||"Assertion failed: "+t+" != "+n)}},function(e,t,n){const r=n(143);function i(e){try{return r("rmd160").update(e).digest()}catch(t){return r("ripemd160").update(e).digest()}}function o(e){return r("sha1").update(e).digest()}function s(e){return r("sha256").update(e).digest()}function a(e){return i(s(e))}function u(e){return s(s(e))}e.exports={hash160:a,hash256:u,ripemd160:i,sha1:o,sha256:s}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(30),s=n(49),a=function e(n){if(!(this instanceof e))return new e(n);if(!r.isUndefined(n))if(t.isBuffer(n))this.set({buf:n});else if(r.isString(n))this.set({buf:new t(n,"hex")});else{if(!r.isObject(n))throw new TypeError("Unrecognized argument for BufferReader");var i=n;this.set(i)}};a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this},a.prototype.eof=function(){return this.pos>=this.buf.length},a.prototype.finished=a.prototype.eof,a.prototype.read=function(e){i.checkArgument(!r.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t},a.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e},a.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e},a.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e},a.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e},a.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e},a.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e},a.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=s.fromBuffer(e);return this.pos=this.pos+8,t},a.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),n=4294967296*t+e,r;if(n<=9007199254740991)r=new s(n);else{var i=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);r=new s(i,10,"le")}return this.pos=this.pos+8,r},a.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),n=t.toNumber();if(n<=Math.pow(2,53))return n;throw new Error("number too large to retain precision - use readVarintBN");default:return e}},a.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return i.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t},a.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}},a.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new s(this.readUInt16LE());case 254:return new s(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new s(e)}},a.prototype.reverse=function(){for(var e=new t(this.buf.length),n=0;n<e.length;n++)e[n]=this.buf[this.buf.length-1-n];return this.buf=e,this},a.prototype.readReverse=function(e){r.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,o.reverse(t)},e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(0),i=n(85),o=n(86),s=n(111),a=n(109),u=n(80),l=n(49),c=n(60),f=n(598),h=n(25),p=n(17),d="0000000000000000000000000000000000000000000000000000000000000001",m="ffffffffffffffff",g=function e(f,h,p,g){var y=n(359),b=n(360),v,w=y.shallowCopy(f);for(g=new o(g),g.removeCodeseparators(),v=0;v<w.inputs.length;v++)w.inputs[v]=new b(w.inputs[v]).setScript(o.empty());if(w.inputs[p]=new b(w.inputs[p]).setScript(g),(31&h)===i.SIGHASH_NONE||(31&h)===i.SIGHASH_SINGLE)for(v=0;v<w.inputs.length;v++)v!==p&&(w.inputs[v].sequenceNumber=0);if((31&h)===i.SIGHASH_NONE)w.outputs=[];else if((31&h)===i.SIGHASH_SINGLE){if(p>=w.outputs.length)return new t(d,"hex");for(w.outputs.length=p+1,v=0;v<p;v++)w.outputs[v]=new s({satoshis:l.fromBuffer(new r.Buffer(m,"hex")),script:o.empty()})}h&i.SIGHASH_ANYONECANPAY&&(w.inputs=[w.inputs[p]]);var _=(new u).write(w.toBuffer()).writeInt32LE(h).toBuffer(),k=c.sha256sha256(_);return k=new a(k).readReverse(),k};function y(e,t,n,r,i){var o=g(e,n,r,i),s=f.sign(o,t,"little").set({nhashtype:n});return s}function b(e,t,n,r,i){h.checkArgument(!p.isUndefined(e)),h.checkArgument(!p.isUndefined(t)&&!p.isUndefined(t.nhashtype));var o=g(e,t.nhashtype,r,i);return f.verify(o,t,n,"little")}e.exports={sighash:g,sign:y,verify:b}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(17),i=n(49),o=n(0),s=n(30),a=n(41),u=n(80),l=n(86),c=n(25),f=n(84),h=9007199254740991;function p(e){if(!(this instanceof p))return new p(e);if(!r.isObject(e))throw new TypeError("Unrecognized argument for Output");var t;this.satoshis=e.satoshis,s.isBuffer(e.script)?this._scriptBuffer=e.script:(t=r.isString(e.script)&&a.isHexa(e.script)?new o.Buffer(e.script,"hex"):e.script,this.setScript(t))}Object.defineProperty(p.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}}),Object.defineProperty(p.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof i?(this._satoshisBN=e,this._satoshis=e.toNumber()):r.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=i.fromNumber(this._satoshis)):(c.checkArgument(a.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=i.fromNumber(e),this._satoshis=e),c.checkState(a.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}}),p.prototype.invalidSatoshis=function(){return this._satoshis>9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0&&"transaction txout negative"},p.prototype.toObject=p.prototype.toJSON=function e(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t},p.fromObject=function(e){return new p(e)},p.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=l.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(e){if(!(e instanceof f.Script.InvalidBuffer))throw e;this._script=null}},p.prototype.setScript=function(e){if(e instanceof l)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(r.isString(e))this._script=l.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else{if(!s.isBuffer(e))throw new TypeError("Invalid argument type: script");this.setScriptFromBuffer(e)}return this},p.prototype.inspect=function(){var e;return e=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"},p.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var n=e.readVarintNum();return t.script=0!==n?e.read(n):new o.Buffer([]),new p(t)},p.prototype.toBufferWriter=function(e){e||(e=new u),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e},e.exports=p},function(e,t,n){"use strict";const r=n(59),i=n(199);function o(e,t){r(e,i(e=>t(null,e)),e=>{e&&t(e)})}e.exports=o},function(e,t,n){e.exports={read:k,write:S};var r=n(27),i=n(103),o=n(15),s=n(31).Buffer,a=n(55),u=n(47),l=n(46),c=n(50),f=n(380),h=n(210),p=n(287),d=n(114),m=n(96),g="1.2.840.113549.1.5.13",y="1.2.840.113549.1.5.12",b={"1.2.840.113549.3.7":"3des-cbc","2.16.840.1.101.3.4.1.2":"aes128-cbc","2.16.840.1.101.3.4.1.42":"aes256-cbc"},v={};Object.keys(b).forEach(function(e){v[b[e]]=e});var w={"1.2.840.113549.2.7":"sha1","1.2.840.113549.2.9":"sha256","1.2.840.113549.2.11":"sha512"},_={};function k(e,t,n){var a=e;"string"!=typeof e&&(r.buffer(e,"buf"),e=e.toString("ascii"));for(var l=e.trim().split(/[\r\n]+/g),c,v=-1,_;!c&&v<l.length;)c=l[++v].match(/[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);r.ok(c,"invalid PEM header");for(var k=l.length;!_&&k>0;)_=l[--k].match(/[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);r.ok(_,"invalid PEM footer"),r.equal(c[2],_[2]);var S=c[2].toLowerCase(),E;c[1]&&(r.equal(c[1],_[1],"PEM header and footer mismatch"),E=c[1].trim()),l=l.slice(v,k+1);for(var x={},C,A,I;l=l.slice(1),c=l[0].match(/^([A-Za-z0-9-]+): (.+)$/),c;)x[c[1].toLowerCase()]=c[2];if(l=l.slice(0,-1).join(""),e=s.from(l,"base64"),x["proc-type"]){var T=x["proc-type"].split(",");if("4"===T[0]&&"ENCRYPTED"===T[1]){if("string"==typeof t.passphrase&&(t.passphrase=s.from(t.passphrase,"utf-8")),!s.isBuffer(t.passphrase))throw new m.KeyEncryptedError(t.filename,"PEM");T=x["dek-info"].split(","),r.ok(2===T.length),C=T[0].toLowerCase(),I=s.from(T[1],"hex"),A=u.opensslKeyDeriv(C,I,t.passphrase,1).key}}if(E&&"encrypted"===E.toLowerCase()){var j=new i.BerReader(e),O;j.readSequence(),j.readSequence(),O=j.offset+j.length;var P=j.readOID();if(P!==g)throw new Error("Unsupported PEM/PKCS8 encryption scheme: "+P);j.readSequence(),j.readSequence();var B=j.offset+j.length,R=j.readOID();if(R!==y)throw new Error("Unsupported PBES2 KDF: "+R);j.readSequence();var N=j.readString(i.Ber.OctetString,!0),M=j.readInt(),L="sha1";if(j.offset<B){j.readSequence();var F=j.readOID();if(L=w[F],void 0===L)throw new Error("Unsupported PBKDF2 hash: "+F)}j._offset=B,j.readSequence();var D=j.readOID();if(C=b[D],void 0===C)throw new Error("Unsupported PBES2 cipher: "+D);if(I=j.readString(i.Ber.OctetString,!0),j._offset=O,e=j.readString(i.Ber.OctetString,!0),"string"==typeof t.passphrase&&(t.passphrase=s.from(t.passphrase,"utf-8")),!s.isBuffer(t.passphrase))throw new m.KeyEncryptedError(t.filename,"PEM");var U=u.opensshCipherInfo(C);C=U.opensslName,A=u.pbkdf2(L,N,M,U.keySize,t.passphrase),E=void 0}if(C&&A&&I){var z=o.createDecipheriv(C,A,I),q,K=[];for(z.once("error",function(e){if(-1!==e.toString().indexOf("bad decrypt"))throw new Error("Incorrect passphrase supplied, could not decrypt key");throw e}),z.write(e),z.end();null!==(q=z.read());)K.push(q);e=s.concat(K)}if(E&&"openssh"===E.toLowerCase())return p.readSSHPrivate(S,e,t);if(E&&"ssh2"===E.toLowerCase())return d.readType(S,e,t);var H=new i.BerReader(e);return H.originalInput=a,H.readSequence(),E?(n&&r.strictEqual(n,"pkcs1"),f.readPkcs1(E,S,H)):(n&&r.strictEqual(n,"pkcs8"),h.readPkcs8(E,S,H))}function S(e,t,n){r.object(e);var o={ecdsa:"EC",rsa:"RSA",dsa:"DSA",ed25519:"EdDSA"}[e.type],a,u=new i.BerWriter;if(c.isPrivateKey(e))n&&"pkcs8"===n?(a="PRIVATE KEY",h.writePkcs8(u,e)):(n&&r.strictEqual(n,"pkcs1"),a=o+" PRIVATE KEY",f.writePkcs1(u,e));else{if(!l.isKey(e))throw new Error("key is not a Key or PrivateKey");n&&"pkcs1"===n?(a=o+" PUBLIC KEY",f.writePkcs1(u,e)):(n&&r.strictEqual(n,"pkcs8"),a="PUBLIC KEY",h.writePkcs8(u,e))}var p=u.buffer.toString("base64"),d=p.length+p.length/64+18+16+2*a.length+10,m=s.alloc(d),g=0;g+=m.write("-----BEGIN "+a+"-----\n",g);for(var y=0;y<p.length;){var b=y+64;b>p.length&&(b=p.length),g+=m.write(p.slice(y,b),g),m[g++]=10,y=b}return g+=m.write("-----END "+a+"-----\n",g),m.slice(0,g)}Object.keys(w).forEach(function(e){_[w[e]]=e})},function(e,t,n){e.exports={read:h.bind(void 0,!1,void 0),readType:h.bind(void 0,!1),write:p,readPartial:h.bind(void 0,!0),readInternal:h,keyTypeToAlg:f,algToKeyType:c};var r=n(27),i=n(31).Buffer,o=n(55),s=n(47),a=n(46),u=n(50),l=n(209);function c(e){if(r.string(e),"ssh-dss"===e)return"dsa";if("ssh-rsa"===e)return"rsa";if("ssh-ed25519"===e)return"ed25519";if("ssh-curve25519"===e)return"curve25519";if(e.match(/^ecdsa-sha2-/))return"ecdsa";throw new Error("Unknown algorithm "+e)}function f(e){if(r.object(e),"dsa"===e.type)return"ssh-dss";if("rsa"===e.type)return"ssh-rsa";if("ed25519"===e.type)return"ssh-ed25519";if("curve25519"===e.type)return"ssh-curve25519";if("ecdsa"===e.type)return"ecdsa-sha2-"+e.part.curve.data.toString();throw new Error("Unknown key type "+e.type)}function h(e,t,n,f){"string"==typeof n&&(n=i.from(n)),r.buffer(n,"buf");var h={},p=h.parts=[],d=new l({buffer:n}),m=d.readString();r.ok(!d.atEnd(),"key must have at least one part"),h.type=c(m);var g=o.info[h.type].parts.length;for(t&&"private"===t&&(g=o.privInfo[h.type].parts.length);!d.atEnd()&&p.length<g;)p.push(d.readPart());for(;!e&&!d.atEnd();)p.push(d.readPart());r.ok(p.length>=1,"key must have at least one part"),r.ok(e||d.atEnd(),"leftover bytes at end of key");var y=a,b=o.info[h.type];if("private"!==t&&b.parts.length===p.length||(b=o.privInfo[h.type],y=u),r.strictEqual(b.parts.length,p.length),"ecdsa"===h.type){var v=/^ecdsa-sha2-(.+)$/.exec(m);r.ok(null!==v),r.strictEqual(v[1],p[0].data.toString())}for(var w=!0,_=0;_<b.parts.length;++_){var k=p[_],S;if(k.name=b.parts[_],"ed25519"===h.type&&"k"===k.name&&(k.data=k.data.slice(0,32)),"curve"!==k.name&&!1!==b.normalize)S="ed25519"===h.type?s.zeroPadToLength(k.data,32):s.mpNormalize(k.data),S.toString("binary")!==k.data.toString("binary")&&(k.data=S,w=!1)}return w&&(h._rfc4253Cache=d.toBuffer()),e&&"object"==typeof e&&(e.remainder=d.remainder(),e.consumed=d._offset),new y(h)}function p(e,t){r.object(e);var n=f(e),a,c=o.info[e.type];u.isPrivateKey(e)&&(c=o.privInfo[e.type]);var h=c.parts,p=new l({});for(p.writeString(n),a=0;a<h.length;++a){var d=e.part[h[a]].data;!1!==c.normalize&&(d="ed25519"===e.type?s.zeroPadToLength(d,32):s.mpNormalize(d)),"ed25519"===e.type&&"k"===h[a]&&(d=i.concat([d,e.part.A.data])),p.writeBuffer(d)}return p.toBuffer()}},function(e,t,n){const r=n(32),i=n(97),o=n(170),s=n(5)("dweb-transports"),a=n(289),u=n(56);class l{constructor(e){}static _connected(){return this._transports.filter(e=>!e.status)}static p_connectedNames(e){const t=this._connected().map(e=>e.name);if(!e)return new Promise((e,n)=>e(t));e(null,t)}static async p_connectedNamesParm(){return(await this.p_connectedNames()).map(e=>"transport="+e).join("&")}static p_statuses(e){const t=this._transports.map(e=>({name:e.name,status:e.status}));if(!e)return new Promise((e,n)=>e(t));e(null,t)}static validFor(e,t,n){return"string"==typeof e&&(e=[e]),e&&e[0]||["store","newlisturls","newdatabase","newtable","seed"].includes(t)?e&&e.length>0?[].concat(...e.map(e=>"string"==typeof e?r.parse(e):e).map(e=>this._transports.filter(r=>r.validFor(e,t,n)).map(t=>[e,t]))):this._transports.filter(e=>e.validFor(void 0,t,n)).map(e=>[void 0,e]):(console.error("Transports.validFor called with invalid arguments: urls=",e,"func=",t),[])}static async p_urlsValidFor(e,t,n){return this.validFor(e,t,n).map(e=>e[0])}static http(){return l._connected().find(e=>"HTTP"===e.name)}static wolk(){return l._connected().find(e=>"WOLK"===e.name)}static ipfs(){return l._connected().find(e=>"IPFS"===e.name)}static webtorrent(){return l._connected().find(e=>"WEBTORRENT"===e.name)}static gun(){return l._connected().find(e=>"GUN"===e.name)}static async p_resolveNames(e){return this.mirror?Array.isArray(e)?this.gatewayUrls(e):this.gatewayUrl(url):this.namingcb?await this.namingcb(e):e}static resolveNamesWith(e){this.namingcb=e}static togglePaused(e,t){const n=this._transports.find(t=>t.name===e);n?n.togglePaused(e=>t(null,e.status)):t(void 0)}static async _p_rawstore(e,t){let n=[],r=await Promise.all(e.map(async function(e){try{s("Storing %d bytes to %s",t.length,e.name);let r=await e.p_rawstore(t);return s("Storing %d bytes to %s succeeded: %s",t.length,e.name,r),r}catch(r){return s("Storing %d bytes to %s failed: %s",t.length,e.name,r.message),void n.push(r)}}));if(r=r.filter(e=>!!e),!r.length)throw s("Storing %d bytes failed on all transports",t.length),new i.TransportError(n.map(e=>e.message).join(", "));return r}static async p_rawstore(e){let t=this.validFor(void 0,"store").map(([e,t])=>t);if(!t.length)throw s("Storing %d bytes failed: no transports available",e.length),new i.TransportError("Transports.p_rawstore: Cant find transport for store");return this._p_rawstore(t,e)}static async p_rawfetch(e,t={}){if(!e.length)throw new i.TransportError("Transports.p_rawfetch given an empty list of urls");let n=await this.p_resolveNames(e);if(!n.length)throw new i.TransportError("Transports.p_rawfetch none of the urls resolved: "+e);let r=this.validFor(n,"fetch",{noCache:t.noCache});if(!r.length)throw new i.TransportError("Transports.p_rawfetch cant find any transport for urls: "+n);let o=[],a=[];for(const[e,n]of r)try{s("Fetching %s via %s",e.href,n.name);let r=await n.p_rawfetch(e,t);return s("Fetching %s via %s succeeded %d bytes",e.href,n.name,r.length),t.relay&&a.length&&(s("Fetching attempting relay of %d bytes from %s to %o",r.length,e.href,a.map(e=>e.name)),this._p_rawstore(a,r).then(e=>s("Fetching relayed %d bytes to %o",r.length,e))),r}catch(t){a.push(n),o.push(t),s("Fetching %s via %s failed: %s",e.href,n.name,t.message)}throw s("Fetching %o failed on all transports",e),new i.TransportError(o.map(e=>e.message).join(", "))}static fetch(e,t={},n){"function"==typeof t&&(n=t,t={});const r=this.p_rawfetch(e,t);if(!n)return r;r.then(e=>{try{n(null,e)}catch(e){s("Uncaught error in fetch %O",e)}}).catch(e=>n(e))}static seed({directoryPath:e,fileRelativePath:t,ipfsHash:n,urlToFile:r,torrentRelativePath:i},o){if(!o)return new Promise((e,t)=>{try{a.call(this,(n,r)=>{n?t(n):e(r)})}catch(e){t(e)}});try{a.call(this,o)}catch(e){o(e)}function a(o){let a=this.validFor(void 0,"seed").map(([e,t])=>t);if(a.length){const s={};u(a,(o,a)=>o.seed({directoryPath:e,torrentRelativePath:i,fileRelativePath:t,ipfsHash:n,urlToFile:r},(e,t)=>{s[o.name]=e?{err:e.message}:t,a(null)}),e=>o(null,s))}else s("Seeding: no transports available"),o(null)}}static async p_rawlist(e){e=await this.p_resolveNames(e);let t=this.validFor(e,"list");if(!t.length)throw new i.TransportError('Transports.p_rawlist: Cant find transport to "list" urls:'+e.join(","));let n=[],r=await Promise.all(t.map(async function([e,t]){try{s("Listing %s via %s",e,t.name);let r=await t.p_rawlist(e);return s("Listing %s via %s retrieved %d items",e,t.name,r.length),r}catch(r){return s("Listing %s via %s failed: %s",e,t.name,r.message),n.push(r),[]}}));if(n.length>=t.length)throw s("Listing %o failed on all transports",e),new i.TransportError(n.map(e=>e.message).join(", "));let o={};return[].concat(...r).filter(e=>!o[e.signature]&&(o[e.signature]=!0))}static async p_rawadd(e,t){e=await this.p_resolveNames(e);let n=this.validFor(e,"add");if(!n.length)throw s("Adding to %o failed: no transports available",e),new i.TransportError("Transports.p_rawstore: Cant find transport for urls:"+e.join(","));let r=[];if(await Promise.all(n.map(async function([e,n]){try{return s("Adding to %s via %s",e,n.name),await n.p_rawadd(e,t),void s("Adding to %s via %s succeeded",e,n.name)}catch(t){return s("Adding to %s via %s failed: %s",e,n.name,t.message),void r.push(t)}})),r.length>=n.length)throw s("Adding to %o failed on all transports",e),new i.TransportError(r.map(e=>e.message).join(", "))}static listmonitor(e,t,n={}){this.validFor(e,"listmonitor").map(([e,r])=>{r.listmonitor(e,t,n),s("Monitoring list %s via %s",e,r.name)})}static async p_newlisturls(e){let t=await Promise.all(this.validFor(void 0,"newlisturls").map(([t,n])=>n.p_newlisturls(e)));return[t.map(e=>e[0]),t.map(e=>e[1])]}static async p_f_createReadStream(e,{wanturl:t=!1,preferredTransports:n=[]}={}){let r=this.validFor(e,"createReadStream",{});if(!r.length)throw s("Opening stream from %o failed: no transports available",e),new i.TransportError("Transports.p_createReadStream cant find any transport for urls: "+e);let o=[];r.sort((e,t)=>(n.indexOf(e[1].name)+1||999+Math.random())-(n.indexOf(t[1].name)+1||999+Math.random()));for(const[e,n]of r)try{s("Opening stream from %s via %s",e.href,n.name);let r=await n.p_f_createReadStream(e,{wanturl:t});return s("Opening stream from %s via %s succeeded",e.href,n.name),r}catch(t){o.push(t),s("Opening stream from %s via %s failed: %s",e.href,n.name,t.message)}throw s("Opening stream from %o failed on all transports",e),new i.TransportError(o.map(e=>e.message).join(", "))}static createReadStream(e,t,n){"function"==typeof t&&(n=t,t={start:0}),DwebTransports.p_f_createReadStream(e,{preferredTransports:t.preferredTransports||[]}).then(e=>{let r=e(t);if(!n)return r;n(null,r)}).catch(e=>{e instanceof i.TransportError?console.warn("Transports.createReadStream caught",e.message):console.error("Transports.createReadStream caught",e),n?n(e):reject(e)})}static async p_get(e,t){let n=this.validFor(e,"get"),r=Array.isArray(t)?`${t.length} keys`:t;if(!n.length)throw s("Getting %s from %o failed: no transports available",r,e),new i.TransportError("Transports.p_get cant find any transport to get keys from urls: "+e);let o=[];for(const[e,i]of n)try{s("Getting %s from %s via %s",r,e.href,i.name);let n=await i.p_get(e,t);return s("Getting %s from %s via %s succeeded length=%d",r,e.href,i.name,n.length),n}catch(t){o.push(t),s("Getting %s from %s via %s failed: %s",r,e.href,i.name,t.message)}throw s("Getting %s from %o failed on all transports",r,e),new i.TransportError(o.map(e=>e.message).join(", "))}static async p_set(e,t,n){e=await this.p_resolveNames(e);let r="object"==typeof t?`${t.length} keys`:t,o=this.validFor(e,"set");if(!o.length)throw s("Setting %s on %o failed: no transports available",r,e),new i.TransportError("Transports.p_set cant find any transport for urls: "+e);let a=[],u=!1;if(await Promise.all(o.map(async function([e,i]){try{s("Setting %s on %s via %s",r,e.href,i.name),await i.p_set(e,t,n),s("Setting %s on %s via %s succeeded",r,e.href,i.name),u=!0}catch(t){s("Setting %s on %s via %s failed: %s",r,e.href,i.name,t.message),a.push(t)}})),!u)throw s("Setting %s on %o failed on all transports",r,e),new i.TransportError(a.map(e=>e.message).join(", "))}static async p_delete(e,t){e=await this.p_resolveNames(e);let n=Array.isArray(t)?`${t.length} keys`:t,r=this.validFor(e,"set");if(!r.length)throw s("Deleting %s on %o failed: no transports available",n,e),new i.TransportError("Transports.p_set cant find any transport for urls: "+e);let o=[],a=!1;if(await Promise.all(r.map(async function([e,r]){try{s("Deleting %s on %s via %s",n,e.href,r.name),await r.p_delete(e,t),s("Deleting %s on %s via %s succeeded",n,e.href,r.name),a=!0}catch(t){s("Deleting %s on %s via %s failed: %s",n,e.href,r.name,t.message),o.push(t)}})),!a)throw s("Deleting %s on %o failed on all transports",n,e),new i.TransportError(o.map(e=>e.message).join(", "))}static async p_keys(e){e=await this.p_resolveNames(e);let t=this.validFor(e,"keys");if(!t.length)throw s("Getting all keys on %o failed: no transports available",e),new i.TransportError("Transports.p_keys cant find any transport for urls: "+e);let n=[];for(const[e,r]of t)try{s("Getting all keys on %s via %s",e.href,r.name);let t=await r.p_keys(e);return s("Getting all keys on %s via %s succeeded with %d keys",e.href,r.name,t.length),t}catch(t){n.push(t),s("Getting all keys on %s via %s failed: %s",e.href,r.name,t.message)}throw s("Getting all keys on %o failed on all transports",e),new i.TransportError(n.map(e=>e.message).join(", "))}static async p_getall(e){e=await this.p_resolveNames(e);let t=this.validFor(e,"getall");if(!t.length)throw s("Getting all values on %o failed: no transports available",e),new i.TransportError("Transports.p_getall cant find any transport for urls: "+e);let n=[];for(const[e,r]of t)try{s("Getting all values on %s via %s",e.href,r.name);let t=await r.p_getall(e);return s("Getting all values on %s via %s succeeded with %d values",e.href,r.name,t.length),t}catch(t){n.push(t),s("Getting all values on %s via %s failed: %s",e.href,r.name,t.message)}throw s("Getting all keys on %o failed on all transports",e),new i.TransportError(n.map(e=>e.message).join(", "))}static async p_newdatabase(e){let t=await Promise.all(this.validFor(void 0,"newdatabase").map(([t,n])=>n.p_newdatabase(e)));return{privateurls:t.map(e=>e.privateurl),publicurls:t.map(e=>e.publicurl)}}static async p_newtable(e,t){let n=await Promise.all(this.validFor(void 0,"newtable").map(([n,r])=>r.p_newtable(e,t)));return{privateurls:n.map(e=>e.privateurl),publicurls:n.map(e=>e.publicurl)}}static async p_connection(e){e=await this.p_resolveNames(e),await Promise.all(this.validFor(e,"connection").map(([e,t])=>t.p_connection(e)))}static monitor(e,t,{current:n=!1}={}){this.validFor(e,"monitor").map(([e,r])=>{s("Monitoring table %s via %s",e,r.name),r.monitor(e,t,{current:n})})}static addtransport(e){l._transports.push(e)}static setup0(e,t,n){let r={http:{urlbase:"http://localhost:4244"}};return e.map(e=>{let n=this._transportclasses["LOCAL"===e?"HTTP":e];return n?(s("Setting up connection to %s with options %o",e,t),n.setup0("LOCAL"===e?r:t)):void s("Connection to %s unavailable",e)}).filter(e=>!!e)}static p_setup1(e,t){const n=Promise.all(this._transports.filter(e=>!this._optionspaused.includes(e.name)).map(t=>(s("Connection stage 1 to %s",t.name),t.p_setup1(e))));if(!t)return n;n.catch(e=>t(e)).then(e=>t(null,e))}static p_setup2(e,t){const n=Promise.all(this._transports.filter(e=>!this._optionspaused.includes(e.name)).map(t=>(s("Connection stage 2 to %s",t.name),t.p_setup2(e))));if(!t)return n;n.catch(e=>t(e)).then(e=>t(null,e))}static p_stop(e,t){const n=Promise.all(this._connected().map(t=>(s("Stopping %s",t.name),t.p_stop(e))));if(!t)return n;n.catch(e=>t(e)).then(e=>t(null,e))}static async refreshstatus(e){let t=["transportstatus0","transportstatus1","transportstatus2","transportstatus3","transportstatus4"],n=e.statuselement;n&&(n.classList.remove(...t),n.classList.add(t[e.status])),l.statuscb&&l.statuscb(e)}static connect(e,t){const n=this.p_connect(e);if(!t)return n;n.catch(e=>t(e)).then(e=>t(null,e))}static async p_connect(e){try{e=e||{};let t=e.transports;this._optionspaused=(e.paused||[]).map(e=>e.toUpperCase()),t&&t.length||(t=e.defaulttransports||[]),t.length||(t=["HTTP","YJS","IPFS","WEBTORRENT"]),t=t.map(e=>e.toUpperCase());let n=this.setup0(t,e);if(["statuscb","mirror"].forEach(t=>{e[t]&&(this[t]=e[t])}),e.statuselement){let t=e.statuselement;for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(o.createElement("UL",{},n.map(e=>{let t=o.createElement("LI",{onclick:"this.source.togglePaused(DwebTransports.refreshstatus);",source:e,name:e.name},e.name);return e.statuselement=t,t})))}await this.p_setup1(this.refreshstatus),await this.p_setup2(this.refreshstatus),s("Connection completed to %o",this._connected().map(e=>e.name))}catch(e){throw console.error("ERROR in p_connect:",e.message),e}}static async p_urlsFrom(e){if("string"==typeof e&&(e="["===e[0]?JSON.parse(e):e.includes(",")?e.split(","):[e]),!Array.isArray(e))throw new Error(`Unparsable url: ${e}`);return e}static async p_httpfetchurl(e){return l.http()._url(e.find(e=>e.startsWith("contenthash")||e.startsWith("http")),"content/rawfetch")}static canonicalName(e,t={}){"string"!=typeof e&&(e=r.parse(e).href);const n=["dweb.me","ipfs.io"],i=["ipfs","gun","magnet","yjs","wolk","arc","contenthash","http","https"],o=["arc","http","https"],s=[/^http[s]?:[/]+([^/]+)[/](\w+)[/](.*)/i],a=[/^dweb:[/]+(\w+)[/]+(.*)/i,/^\w+:[/]+(\w+)[/](.*)/i,/^(\w+):[/]*(.*)/i,/^[/]*(\w+)[/](.*)/i,/^[/]*dweb[/]*(\w+)[/](.*)/i],u=[/^http[s]?:[/]+[^/]+[/](archive).(org)[/]*(.*)/i,/^http[s]?:[/]+[^/]+[/]arc[/](archive).(org)[/]*(.*)/i,/^http[s]?:[/]+dweb.(\w+)[.]([^/]+)[/]*(.*)/i,/^(http[s])?:[/]+([^/]+)[/]+(.*)/i];for(let t of s){let r=e.match(t);if(r&&n.includes(r[1])&&i.includes(r[2]))return{proto:r[2],internal:r[3]}}for(let t of u){let n=e.match(t);if(n)return i.includes(n[1])?{proto:n[1],internal:o.includes(n[1])?[n[2],n[3]].join("/"):n[3]}:{proto:"arc",internal:[[n[1],n[2]].join("."),n[3]].join("/")}}for(let t of a){let n=e.match(t);if(n&&i.includes(n[1]))return{proto:n[1],internal:n[2]}}}static canonicalUrl(e,t={}){let n=this.canonicalName(e,t);return n.protocol+":/"+n.internal}static _o2url(e){return["http","https"].includes(e.proto)?[e.proto,e.internal].join("://"):e.proto?[this.mirror,e.proto,e.internal].join("/"):e.internal}static gatewayUrl(e){let t=l.canonicalName(e);return t?this._o2url(t):e}static gatewayUrls(e){const t=e.map(e=>l.canonicalName(e)||{proto:void 0,internal:e}),n=t.filter(e=>["arc"].includes(e.proto));return(n.length?n:t).map(e=>this._o2url(e))}}l._transports=[],l.namingcb=void 0,l._transportclasses={},l.httptools=a,t=e.exports=l},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(431),a=n(303);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";(function(r){const i=n(9),o=n(18),s=n(53);class a{constructor(e,t,n){o(n,"A link requires a cid to point to"),this._name=e||"",this._nameBuf=null,this._size=t,this._cid=new i(n)}toString(){return`DAGLink <${this._cid.toBaseEncodedString()} - name: "${this.name}", size: ${this.size}>`}toJSON(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,cid:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}get name(){return this._name}get nameAsBuffer(){return null!==this._nameBuf?this._nameBuf:(this._nameBuf=r.from(this._name),this._nameBuf)}set name(e){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}get cid(){return this._cid}set cid(e){throw new Error("Can't set property: 'cid' is immutable")}}t=e.exports=s(a,{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"}),t.create=n(884),t.util=n(885)}).call(this,n(0).Buffer)},function(e,t,n){var r=n(19);e.exports=r.md=r.md||{},r.md.algorithms=r.md.algorithms||{}},function(e,t,n){var r=n(4).Buffer,i=n(57).Transform,o=n(16).StringDecoder,s=n(1);function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}s(a,i),a.prototype.update=function(e,t,n){"string"==typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},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(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){"use strict";const r=n(5),i=(e,t)=>{const n=["bitswap"];t&&n.push(t),e&&n.push(`${e.toB58String().slice(0,8)}`);const i=r(n.join(":"));return i.error=r(n.concat(["error"]).join(":")),i},o=(e,t,n)=>{let r=0;const i=n.length;for(;r<i;){if(e(t,n[r]))return!0;r+=1}return!1},s=(e,t)=>{let n=0;const r=t.length,i=[];let s;for(;n<r;)s=t[n],o(e,s,i)||(i[i.length]=s),n+=1;return i},a=(e,t)=>t.reduce((t,n)=>{const r=e(n);return t[r]?t[r].push(n):t[r]=[n],t},{}),u=(e,t,n)=>t.filter(t=>!o(e,t,n)),l=(e,t)=>Array.prototype.slice.call(t,0).sort((t,n)=>{const r=e(t),i=e(n);return r<i?-1:r>i?1:0});e.exports={logger:i,includesWith:o,uniqWith:s,groupBy:a,pullAllWith:u,sortBy:l}},function(e,t,n){var r=n(1004),i=n(1007);function o(e,t){var n=i(e,t);return r(n)?n:void 0}e.exports=o},function(e,t,n){var r=n(490),i=n(73),o=n(256),s=n(257);function a(e){var t=0;return function(n,r,i){t++||e(n,r,i)}}function u(e){return"function"==typeof e}e.exports=function(e,t){u(e)&&(t=e,e={}),t=a(t||function e(){});var n=r(e&&e.timeout||5e3),l=i(function(e){e&&t(e)}),c=s();return{handshake:{read:n.read,abort:function(e){l.end(e),n.abort(e,function(e){}),t(e)},write:l.push,rest:function(){return l.end(),{source:n.read(),sink:c.sink}}},sink:n,source:o([l,c.source])}}},function(e,t,n){"use strict";(function(t){const r=n(12),i=n(43),o=n(81),s=n(78),a=n(77),u=n(9),l=n(1245).createResolver;function c(e){let n=e,r="/";if(t.isBuffer(e)&&(n=new u(e).toBaseEncodedString()),"string"==typeof e){0===e.indexOf("/ipfs/")&&(e=n=e.substring(6));const t=e.indexOf("/");t>0&&(n=e.substring(0,t),r=e.substring(t))}else u.isCID(n)&&(n=n.toBaseEncodedString());return n=new u(n).toBaseEncodedString(),{base:n,rest:p(r)}}const f={maxDepth:1/0,offset:void 0,length:void 0,fullPath:!1};function h(e){return e.reduce((e,t)=>(e.length&&(e+="/"),e+t),"")}e.exports=((e,t,n)=>{let p;n=Object.assign({},f,n);try{p=c(e)}catch(e){return o(e)}const d=h([p.base].concat(p.rest.slice(0,p.rest.length-1))).length,m=new u(p.base);return r(i([{multihash:m.buffer,name:p.base,path:p.base,pathRest:p.rest,depth:0}]),l(t,n),s(Boolean),a(e=>({depth:e.depth,name:e.name,path:n.fullPath?e.path:g(e),size:e.size,hash:e.multihash,content:e.content,type:e.type})));function g(e){if(!p.rest.length)return e.path;let t=e.path.substring(d);return"/"===t.charAt(0)&&(t=t.substring(1)),t||(t=p.rest[p.rest.length-1]||p.base),t}});const p=(e="")=>(e.trim().match(/([^\\^/]|\\\/)+/g)||[]).filter(Boolean)}).call(this,n(0).Buffer)},function(e,t,n){(function(t){const r=n(63),i=n(74).ec,o=new i("secp256k1"),s=n(1351),a=t.alloc(32,0),u=t.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),l=t.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),c=o.curve.n,f=c.shrn(1),h=o.curve.g,p="Expected Private",d="Expected Point",m="Expected Tweak",g="Expected Hash",y="Expected Signature",b="Expected Extra Data (32 bytes)";function v(e){return t.isBuffer(e)&&32===e.length}function w(e){return!!v(e)&&e.compare(u)<0}function _(e){if(!t.isBuffer(e))return!1;if(e.length<33)return!1;const n=e[0],r=e.slice(1,33);if(0===r.compare(a))return!1;if(r.compare(l)>=0)return!1;if((2===n||3===n)&&33===e.length){try{T(e)}catch(e){return!1}return!0}const i=e.slice(33);return 0!==i.compare(a)&&(!(i.compare(l)>=0)&&(4===n&&65===e.length))}function k(e){return 4!==e[0]}function S(e){return!!_(e)&&k(e)}function E(e){return!!v(e)&&(e.compare(a)>0&&e.compare(u)<0)}function x(e){const n=e.slice(0,32),r=e.slice(32,64);return t.isBuffer(e)&&64===e.length&&n.compare(u)<0&&r.compare(u)<0}function C(e,t){return void 0===e&&void 0!==t?k(t):void 0===e||e}function A(e){return new r(e)}function I(e){return e.toArrayLike(t,"be",32)}function T(e){return o.curve.decodePoint(e)}function j(e,n){return t.from(e._encode(n))}function O(e,t,n){if(!_(e))throw new TypeError(d);if(!_(t))throw new TypeError(d);const r=T(e),i=T(t),o=r.add(i);if(o.isInfinity())return null;const s=C(n,e);return j(o,s)}function P(e,t,n){if(!_(e))throw new TypeError(d);if(!w(t))throw new TypeError(m);const r=C(n,e),i=T(e);if(0===t.compare(a))return j(i,r);const o=A(t),s=h.mul(o),u=i.add(s);return u.isInfinity()?null:j(u,r)}function B(e,t){if(!_(e))throw new TypeError(d);const n=T(e);if(n.isInfinity())throw new TypeError(d);return j(n,t)}function R(e,t){if(!E(e))throw new TypeError(p);const n=A(e),r=h.mul(n);if(r.isInfinity())return null;const i=C(t);return j(r,i)}function N(e,t,n){if(!_(e))throw new TypeError(d);if(!w(t))throw new TypeError(m);const r=C(n,e),i=T(e),o=A(t),s=i.mul(o);return s.isInfinity()?null:j(s,r)}function M(e,t){if(!E(e))throw new TypeError(p);if(!w(t))throw new TypeError(m);const n=A(e),r=A(t),i=I(n.add(r).umod(c));return E(i)?i:null}function L(e,t){if(!E(e))throw new TypeError(p);if(!w(t))throw new TypeError(m);const n=A(e),r=A(t),i=I(n.sub(r).umod(c));return E(i)?i:null}function F(e,t){return U(e,t)}function D(e,t,n){return U(e,t,n)}function U(e,n,r){if(!v(e))throw new TypeError(g);if(!E(n))throw new TypeError(p);if(void 0!==r&&!v(r))throw new TypeError(b);const i=A(n),o=A(e);let a,u;const l=function(e){const t=A(e),n=h.mul(t);return!n.isInfinity()&&(a=n.x.umod(c),0!==a.isZero()&&(u=t.invm(c).mul(o.add(i.mul(a))).umod(c),0!==u.isZero()))};s(e,n,l,E,r),u.cmp(f)>0&&(u=c.sub(u));const d=t.allocUnsafe(64);return I(a).copy(d,0),I(u).copy(d,32),d}function z(e,t,n){if(!v(e))throw new TypeError(g);if(!_(t))throw new TypeError(d);if(!x(n))throw new TypeError(y);const r=T(t),i=A(n.slice(0,32)),o=A(n.slice(32,64));if(i.gtn(0)<=0)return!1;if(o.gtn(0)<=0)return!1;const s=A(e),a=o.invm(c),u=s.mul(a).umod(c),l=i.mul(a).umod(c),f=h.mulAdd(u,r,l);if(f.isInfinity())return!1;const p=f.x,m=p.umod(c);return m.eq(i)}e.exports={isPoint:_,isPointCompressed:S,isPrivate:E,pointAdd:O,pointAddScalar:P,pointCompress:B,pointFromScalar:R,pointMultiply:N,privateAdd:M,privateSub:L,sign:F,signWithEntropy:D,verify:z}}).call(this,n(0).Buffer)},function(e,t){function n(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){let e=n.call(this);return this[t]=e,e},set:function(e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})}})}function r(e){let t;return function(){return void 0!==t?t:(t=e(),t)}}e.exports={prop:n,value:r}},function(e,t,n){"use strict";t.ethAccountSnapshot=n(586),t.ethBlock=n(591),t.ethBlockList=n(1416),t.ethStateTrie=n(1417),t.ethStorageTrie=n(1420),t.ethTx=n(593),t.ethTxTrie=n(1423)},function(e,t,n){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(null!==e&&"object"==typeof e&&Array.isArray(e.words))return e;this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(n=t,t=10),null!==e&&this._init(e||0,t||10,n||"be")}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function s(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.prototype._init=function e(t,r,i){if("number"==typeof t)return this._initNumber(t,r,i);if("object"==typeof t)return this._initArray(t,r,i);"hex"===r&&(r=16),n(r===(0|r)&&r>=2&&r<=36),t=t.toString().replace(/\s+/g,"");var o=0;"-"===t[0]&&o++,16===r?this._parseHex(t,o):this._parseBase(t,r,o),"-"===t[0]&&(this.sign=!0),this.strip(),"le"===i&&this._initArray(this.toArray(),r,i)},i.prototype._initNumber=function e(t,r,i){t<0&&(this.sign=!0,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),r,i)},i.prototype._initArray=function e(t,r,i){if(n("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 o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===i)for(var o=t.length-1,a=0;o>=0;o-=3){var u=t[o]|t[o-1]<<8|t[o-2]<<16;this.words[a]|=u<<s&67108863,this.words[a+1]=u>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++)}else if("le"===i)for(var o=0,a=0;o<t.length;o+=3){var u=t[o]|t[o+1]<<8|t[o+2]<<16;this.words[a]|=u<<s&67108863,this.words[a+1]=u>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++)}return this.strip()},i.prototype._parseHex=function e(t,n){this.length=Math.ceil((t.length-n)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var i=0,r=t.length-6,s=0;r>=n;r-=6){var a=o(t,r,r+6);this.words[s]|=a<<i&67108863,this.words[s+1]|=a>>>26-i&4194303,i+=24,i>=26&&(i-=26,s++)}if(r+6!==n){var a=o(t,n,r+6);this.words[s]|=a<<i&67108863,this.words[s+1]|=a>>>26-i&4194303}this.strip()},i.prototype._parseBase=function e(t,n,r){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=n)i++;i--,o=o/n|0;for(var a=t.length-r,u=a%i,l=Math.min(a,a-u)+r,c=0,f=r;f<l;f+=i)c=s(t,f,f+i,n),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==u){for(var h=1,c=s(t,f,t.length,n),f=0;f<u;f++)h*=n;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},i.prototype.copy=function e(t){t.words=new Array(this.length);for(var n=0;n<this.length;n++)t.words[n]=this.words[n];t.length=this.length,t.sign=this.sign,t.red=this.red},i.prototype.clone=function e(){var t=new i(null);return this.copy(t),t},i.prototype.strip=function e(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function e(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function e(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var a=["","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"],u=[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],l=[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];i.prototype.toString=function e(t,r){if(t=t||10,16===t||"hex"===t){for(var i="",o=0,r=0|r||1,s=0,c=0;c<this.length;c++){var f=this.words[c],h=(16777215&(f<<o|s)).toString(16);s=f>>>24-o&16777215,i=0!==s||c!==this.length-1?a[6-h.length]+h+i:h+i,o+=2,o>=26&&(o-=26,c--)}for(0!==s&&(i=s.toString(16)+i);i.length%r!=0;)i="0"+i;return this.sign&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var p=u[t],d=l[t],i="",m=this.clone();for(m.sign=!1;0!==m.cmpn(0);){var g=m.modn(d).toString(t);m=m.idivn(d),i=0!==m.cmpn(0)?a[p-g.length]+g+i:g+i}return 0===this.cmpn(0)&&(i="0"+i),this.sign&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function e(){return this.toString(16)},i.prototype.toArray=function e(t){this.strip();var n=new Array(this.byteLength());n[0]=0;var r=this.clone();if("le"!==t)for(var i=0;0!==r.cmpn(0);i++){var o=r.andln(255);r.ishrn(8),n[n.length-i-1]=o}else for(var i=0;0!==r.cmpn(0);i++){var o=r.andln(255);r.ishrn(8),n[i]=o}return n},Math.clz32?i.prototype._countBits=function e(t){return 32-Math.clz32(t)}:i.prototype._countBits=function e(t){var n=t,r=0;return n>=4096&&(r+=13,n>>>=13),n>=64&&(r+=7,n>>>=7),n>=8&&(r+=4,n>>>=4),n>=2&&(r+=2,n>>>=2),r+n},i.prototype._zeroBits=function e(t){if(0===t)return 26;var n=t,r=0;return 0==(8191&n)&&(r+=13,n>>>=13),0==(127&n)&&(r+=7,n>>>=7),0==(15&n)&&(r+=4,n>>>=4),0==(3&n)&&(r+=2,n>>>=2),0==(1&n)&&r++,r},i.prototype.bitLength=function e(){var t=0,n=this.words[this.length-1],t=this._countBits(n);return 26*(this.length-1)+t},i.prototype.zeroBits=function e(){if(0===this.cmpn(0))return 0;for(var t=0,n=0;n<this.length;n++){var r=this._zeroBits(this.words[n]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function e(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function e(){if(0===this.cmpn(0))return this.clone();var t=this.clone();return t.sign=!this.sign,t},i.prototype.ior=function e(t){for(this.sign=this.sign||t.sign;this.length<t.length;)this.words[this.length++]=0;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]|t.words[n];return this.strip()},i.prototype.or=function e(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.iand=function e(t){var n;this.sign=this.sign&&t.sign,n=this.length>t.length?t:this;for(var r=0;r<n.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=n.length,this.strip()},i.prototype.and=function e(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.ixor=function e(t){var n,r;this.sign=this.sign||t.sign,this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=n.words[i]^r.words[i];if(this!==n)for(;i<n.length;i++)this.words[i]=n.words[i];return this.length=n.length,this.strip()},i.prototype.xor=function e(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.setn=function e(t,r){n("number"==typeof t&&t>=0);for(var i=t/26|0,o=t%26;this.length<=i;)this.words[this.length++]=0;return this.words[i]=r?this.words[i]|1<<o:this.words[i]&~(1<<o),this.strip()},i.prototype.iadd=function e(t){if(this.sign&&!t.sign){this.sign=!1;var n=this.isub(t);return this.sign=!this.sign,this._normSign()}if(!this.sign&&t.sign){t.sign=!1;var n=this.isub(t);return t.sign=!0,n._normSign()}var r,i;this.length>t.length?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s<i.length;s++){var n=r.words[s]+i.words[s]+o;this.words[s]=67108863&n,o=n>>>26}for(;0!==o&&s<r.length;s++){var n=r.words[s]+o;this.words[s]=67108863&n,o=n>>>26}if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},i.prototype.add=function e(t){if(t.sign&&!this.sign){t.sign=!1;var n=this.sub(t);return t.sign=!0,n}if(!t.sign&&this.sign){this.sign=!1;var n=t.sub(this);return this.sign=!0,n}return this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function e(t){if(t.sign){t.sign=!1;var n=this.iadd(t);return t.sign=!0,n._normSign()}if(this.sign)return this.sign=!1,this.iadd(t),this.sign=!0,this._normSign();var r=this.cmp(t),i,o;if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;r>0?(i=this,o=t):(i=t,o=this);for(var s=0,a=0;a<o.length;a++){var n=i.words[a]-o.words[a]+s;s=n>>26,this.words[a]=67108863&n}for(;0!==s&&a<i.length;a++){var n=i.words[a]+s;s=n>>26,this.words[a]=67108863&n}if(0===s&&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.sign=!0),this.strip()},i.prototype.sub=function e(t){return this.clone().isub(t)},i.prototype._smallMulTo=function e(t,n){n.sign=t.sign!==this.sign,n.length=this.length+t.length;for(var r=0,i=0;i<n.length-1;i++){for(var o=r>>>26,s=67108863&r,a=Math.min(i,t.length-1),u=Math.max(0,i-this.length+1);u<=a;u++){var l=i-u,c=0|this.words[l],f=0|t.words[u],h=c*f,p=67108863&h;o=o+(h/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0}n.words[i]=s,r=o}return 0!==r?n.words[i]=r:n.length--,n.strip()},i.prototype._bigMulTo=function e(t,n){n.sign=t.sign!==this.sign,n.length=this.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-this.length+1);l<=u;l++){var c=o-l,f=0|this.words[c],h=0|t.words[l],p=f*h,d=67108863&p;s=s+(p/67108864|0)|0,d=d+a|0,a=67108863&d,s=s+(d>>>26)|0,i+=s>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()},i.prototype.mulTo=function e(t,n){var r;return r=this.length+t.length<63?this._smallMulTo(t,n):this._bigMulTo(t,n),r},i.prototype.mul=function e(t){var n=new i(null);return n.words=new Array(this.length+t.length),this.mulTo(t,n)},i.prototype.imul=function e(t){if(0===this.cmpn(0)||0===t.cmpn(0))return this.words[0]=0,this.length=1,this;var n=this.length,r=t.length;this.sign=t.sign!==this.sign,this.length=this.length+t.length,this.words[this.length-1]=0;for(var i=this.length-2;i>=0;i--){for(var o=0,s=0,a=Math.min(i,r-1),u=Math.max(0,i-n+1);u<=a;u++){var l=i-u,c=this.words[l],f=t.words[u],h=c*f,p=67108863&h;o+=h/67108864|0,p+=s,s=67108863&p,o+=p>>>26}this.words[i]=s,this.words[i+1]+=o,o=0}for(var o=0,l=1;l<this.length;l++){var d=this.words[l]+o;this.words[l]=67108863&d,o=d>>>26}return this.strip()},i.prototype.imuln=function e(t){n("number"==typeof t);for(var r=0,i=0;i<this.length;i++){var o=this.words[i]*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this},i.prototype.muln=function e(t){return this.clone().imuln(t)},i.prototype.sqr=function e(){return this.mul(this)},i.prototype.isqr=function e(){return this.mul(this)},i.prototype.ishln=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){for(var s=0,a=0;a<this.length;a++){var u=this.words[a]&o,l=this.words[a]-u<<r;this.words[a]=l|s,s=u>>>26-r}s&&(this.words[a]=s,this.length++)}if(0!==i){for(var a=this.length-1;a>=0;a--)this.words[a+i]=this.words[a];for(var a=0;a<i;a++)this.words[a]=0;this.length+=i}return this.strip()},i.prototype.ishrn=function e(t,r,i){var o;n("number"==typeof t&&t>=0),o=r?(r-r%26)/26:0;var s=t%26,a=Math.min((t-s)/26,this.length),u=67108863^67108863>>>s<<s,l=i;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a){this.length-=a;for(var c=0;c<this.length;c++)this.words[c]=this.words[c+a]}else this.words[0]=0,this.length=1;for(var f=0,c=this.length-1;c>=0&&(0!==f||c>=o);c--){var h=this.words[c];this.words[c]=f<<26-s|h>>>s,f=h&u}return l&&0!==f&&(l.words[l.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.shln=function e(t){return this.clone().ishln(t)},i.prototype.shrn=function e(t){return this.clone().ishrn(t)},i.prototype.testn=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,o=1<<r;if(this.length<=i)return!1;var s=this.words[i];return!!(s&o)},i.prototype.imaskn=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26;if(n(!this.sign,"imaskn works only with positive numbers"),0!==r&&i++,this.length=Math.min(i,this.length),0!==r){var o=67108863^67108863>>>r<<r;this.words[this.length-1]&=o}return this.strip()},i.prototype.maskn=function e(t){return this.clone().imaskn(t)},i.prototype.iaddn=function e(t){return n("number"==typeof t),t<0?this.isubn(-t):this.sign?1===this.length&&this.words[0]<t?(this.words[0]=t-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(t),this.sign=!0,this):this._iaddn(t)},i.prototype._iaddn=function e(t){this.words[0]+=t;for(var n=0;n<this.length&&this.words[n]>=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},i.prototype.isubn=function e(t){if(n("number"==typeof t),t<0)return this.iaddn(-t);if(this.sign)return this.sign=!1,this.iaddn(t),this.sign=!0,this;this.words[0]-=t;for(var r=0;r<this.length&&this.words[r]<0;r++)this.words[r]+=67108864,this.words[r+1]-=1;return this.strip()},i.prototype.addn=function e(t){return this.clone().iaddn(t)},i.prototype.subn=function e(t){return this.clone().isubn(t)},i.prototype.iabs=function e(){return this.sign=!1,this},i.prototype.abs=function e(){return this.clone().iabs()},i.prototype._ishlnsubmul=function e(t,r,i){var o=t.length+i,s;if(this.words.length<o){for(var a=new Array(o),s=0;s<this.length;s++)a[s]=this.words[s];this.words=a}else s=this.length;for(this.length=Math.max(this.length,o);s<this.length;s++)this.words[s]=0;for(var u=0,s=0;s<t.length;s++){var l=this.words[s+i]+u,c=t.words[s]*r;l-=67108863&c,u=(l>>26)-(c/67108864|0),this.words[s+i]=67108863&l}for(;s<this.length-i;s++){var l=this.words[s+i]+u;u=l>>26,this.words[s+i]=67108863&l}if(0===u)return this.strip();n(-1===u),u=0;for(var s=0;s<this.length;s++){var l=-this.words[s]+u;u=l>>26,this.words[s]=67108863&l}return this.sign=!0,this.strip()},i.prototype._wordDiv=function e(t,n){var r=this.length-t.length,o=this.clone(),s=t,a=s.words[s.length-1],u=this._countBits(a);r=26-u,0!==r&&(s=s.shln(r),o.ishln(r),a=s.words[s.length-1]);var l=o.length-s.length,c;if("mod"!==n){c=new i(null),c.length=l+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=o.clone()._ishlnsubmul(s,1,l);h.sign||(o=h,c&&(c.words[l]=1));for(var p=l-1;p>=0;p--){var d=67108864*o.words[s.length+p]+o.words[s.length+p-1];for(d=Math.min(d/a|0,67108863),o._ishlnsubmul(s,d,p);o.sign;)d--,o.sign=!1,o._ishlnsubmul(s,1,p),0!==o.cmpn(0)&&(o.sign=!o.sign);c&&(c.words[p]=d)}return c&&c.strip(),o.strip(),"div"!==n&&0!==r&&o.ishrn(r),{div:c||null,mod:o}},i.prototype.divmod=function e(t,r){if(n(0!==t.cmpn(0)),this.sign&&!t.sign){var o=this.neg().divmod(t,r),s,a;return"mod"!==r&&(s=o.div.neg()),"div"!==r&&(a=0===o.mod.cmpn(0)?o.mod:t.sub(o.mod)),{div:s,mod:a}}if(!this.sign&&t.sign){var o=this.divmod(t.neg(),r),s;return"mod"!==r&&(s=o.div.neg()),{div:s,mod:o.mod}}return this.sign&&t.sign?this.neg().divmod(t.neg(),r):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,r)},i.prototype.div=function e(t){return this.divmod(t,"div").div},i.prototype.mod=function e(t){return this.divmod(t,"mod").mod},i.prototype.divRound=function e(t){var n=this.divmod(t);if(0===n.mod.cmpn(0))return n.div;var r=n.div.sign?n.mod.isub(t):n.mod,i=t.shrn(1),o=t.andln(1),s=r.cmp(i);return s<0||1===o&&0===s?n.div:n.div.sign?n.div.isubn(1):n.div.iaddn(1)},i.prototype.modn=function e(t){n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+this.words[o])%t;return i},i.prototype.idivn=function e(t){n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=this.words[i]+67108864*r;this.words[i]=o/t|0,r=o%t}return this.strip()},i.prototype.divn=function e(t){return this.clone().idivn(t)},i.prototype.egcd=function e(t){n(!t.sign),n(0!==t.cmpn(0));var r=this,o=t.clone();r=r.sign?r.mod(t):r.clone();for(var s=new i(1),a=new i(0),u=new i(0),l=new i(1),c=0;r.isEven()&&o.isEven();)r.ishrn(1),o.ishrn(1),++c;for(var f=o.clone(),h=r.clone();0!==r.cmpn(0);){for(;r.isEven();)r.ishrn(1),s.isEven()&&a.isEven()?(s.ishrn(1),a.ishrn(1)):(s.iadd(f).ishrn(1),a.isub(h).ishrn(1));for(;o.isEven();)o.ishrn(1),u.isEven()&&l.isEven()?(u.ishrn(1),l.ishrn(1)):(u.iadd(f).ishrn(1),l.isub(h).ishrn(1));r.cmp(o)>=0?(r.isub(o),s.isub(u),a.isub(l)):(o.isub(r),u.isub(s),l.isub(a))}return{a:u,b:l,gcd:o.ishln(c)}},i.prototype._invmp=function e(t){n(!t.sign),n(0!==t.cmpn(0));var r=this,o=t.clone();r=r.sign?r.mod(t):r.clone();for(var s=new i(1),a=new i(0),u=o.clone();r.cmpn(1)>0&&o.cmpn(1)>0;){for(;r.isEven();)r.ishrn(1),s.isEven()?s.ishrn(1):s.iadd(u).ishrn(1);for(;o.isEven();)o.ishrn(1),a.isEven()?a.ishrn(1):a.iadd(u).ishrn(1);r.cmp(o)>=0?(r.isub(o),s.isub(a)):(o.isub(r),a.isub(s))}return 0===r.cmpn(1)?s:a},i.prototype.gcd=function e(t){if(0===this.cmpn(0))return t.clone();if(0===t.cmpn(0))return this.clone();var n=this.clone(),r=t.clone();n.sign=!1,r.sign=!1;for(var i=0;n.isEven()&&r.isEven();i++)n.ishrn(1),r.ishrn(1);for(;;){for(;n.isEven();)n.ishrn(1);for(;r.isEven();)r.ishrn(1);var o=n.cmp(r);if(o<0){var s=n;n=r,r=s}else if(0===o||0===r.cmpn(1))break;n.isub(r)}return r.ishln(i)},i.prototype.invm=function e(t){return this.egcd(t).a.mod(t)},i.prototype.isEven=function e(){return 0==(1&this.words[0])},i.prototype.isOdd=function e(){return 1==(1&this.words[0])},i.prototype.andln=function e(t){return this.words[0]&t},i.prototype.bincn=function e(t){n("number"==typeof t);var r=t%26,i=(t-r)/26,o=1<<r;if(this.length<=i){for(var s=this.length;s<i+1;s++)this.words[s]=0;return this.words[i]|=o,this.length=i+1,this}for(var a=o,s=i;0!==a&&s<this.length;s++){var u=this.words[s];u+=a,a=u>>>26,u&=67108863,this.words[s]=u}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.cmpn=function e(t){var n=t<0,r;if(n&&(t=-t),this.sign&&!n)return-1;if(!this.sign&&n)return 1;if(t&=67108863,this.strip(),this.length>1)r=1;else{var i=this.words[0];r=i===t?0:i<t?-1:1}return this.sign&&(r=-r),r},i.prototype.cmp=function e(t){if(this.sign&&!t.sign)return-1;if(!this.sign&&t.sign)return 1;var n=this.ucmp(t);return this.sign?-n:n},i.prototype.ucmp=function e(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var n=0,r=this.length-1;r>=0;r--){var i=this.words[r],o=t.words[r];if(i!==o){i<o?n=-1:i>o&&(n=1);break}}return n},i.red=function e(t){return new g(t)},i.prototype.toRed=function e(t){return n(!this.red,"Already a number in reduction context"),n(!this.sign,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function e(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function e(t){return this.red=t,this},i.prototype.forceRed=function e(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function e(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function e(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function e(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function e(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function e(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function e(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function e(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function e(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function e(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function e(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function e(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function e(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function e(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var c={k256:null,p224:null,p192:null,p25519:null};function f(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).ishln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function d(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function y(e){g.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).ishln(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.sign=!0,this.minv=this.minv.mod(this.r)}f.prototype._tmp=function e(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function e(t){var n=t,r;do{this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),r=n.bitLength()}while(r>this.n);var i=r<this.n?-1:n.ucmp(this.p);return 0===i?(n.words[0]=0,n.length=1):i>0?n.isub(this.p):n.strip(),n},f.prototype.split=function e(t,n){t.ishrn(this.n,0,n)},f.prototype.imulK=function e(t){return t.imul(this.k)},r(h,f),h.prototype.split=function e(t,n){for(var r=4194303,i=Math.min(t.length,9),o=0;o<i;o++)n.words[o]=t.words[o];if(n.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];n.words[n.length++]=s&r;for(var o=10;o<t.length;o++){var a=t.words[o];t.words[o-10]=(a&r)<<4|s>>>22,s=a}t.words[o-10]=s>>>22,t.length-=9},h.prototype.imulK=function e(t){var n;t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var r=0,i=0;i<t.length;i++){var o=t.words[i];n=64*o,r+=977*o,n+=r/67108864|0,r&=67108863,t.words[i]=r,r=n}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(p,f),r(d,f),r(m,f),m.prototype.imulK=function e(t){for(var n=0,r=0;r<t.length;r++){var i=19*t.words[r]+n,o=67108863&i;i>>>=26,t.words[r]=o,n=i}return 0!==n&&(t.words[t.length++]=n),t},i._prime=function e(t){if(c[t])return c[t];var e;if("k256"===t)e=new h;else if("p224"===t)e=new p;else if("p192"===t)e=new d;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new m}return c[t]=e,e},g.prototype._verify1=function e(t){n(!t.sign,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function e(t,r){n(!t.sign&&!r.sign,"red works only with positives"),n(t.red&&t.red===r.red,"red works only with red numbers")},g.prototype.imod=function e(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.mod(this.m)._forceRed(this)},g.prototype.neg=function e(t){var n=t.clone();return n.sign=!n.sign,n.iadd(this.m)._forceRed(this)},g.prototype.add=function e(t,n){this._verify2(t,n);var r=t.add(n);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function e(t,n){this._verify2(t,n);var r=t.iadd(n);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function e(t,n){this._verify2(t,n);var r=t.sub(n);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function e(t,n){this._verify2(t,n);var r=t.isub(n);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function e(t,n){return this._verify1(t),this.imod(t.shln(n))},g.prototype.imul=function e(t,n){return this._verify2(t,n),this.imod(t.imul(n))},g.prototype.mul=function e(t,n){return this._verify2(t,n),this.imod(t.mul(n))},g.prototype.isqr=function e(t){return this.imul(t,t)},g.prototype.sqr=function e(t){return this.mul(t,t)},g.prototype.sqrt=function e(t){if(0===t.cmpn(0))return t.clone();var r=this.m.andln(3);if(n(r%2==1),3===r){var o=this.m.add(new i(1)).ishrn(2),s=this.pow(t,o);return s}for(var a=this.m.subn(1),u=0;0!==a.cmpn(0)&&0===a.andln(1);)u++,a.ishrn(1);n(0!==a.cmpn(0));var l=new i(1).toRed(this),c=l.redNeg(),f=this.m.subn(1).ishrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(c);)h.redIAdd(c);for(var p=this.pow(h,a),s=this.pow(t,a.addn(1).ishrn(1)),d=this.pow(t,a),m=u;0!==d.cmp(l);){for(var g=d,y=0;0!==g.cmp(l);y++)g=g.redSqr();n(y<m);var b=this.pow(p,new i(1).ishln(m-y-1));s=s.redMul(b),p=b.redSqr(),d=d.redMul(p),m=y}return s},g.prototype.invm=function e(t){var n=t._invmp(this.m);return n.sign?(n.sign=!1,this.imod(n).redNeg()):this.imod(n)},g.prototype.pow=function e(t,n){var r=[];if(0===n.cmpn(0))return new i(1);for(var o=n.clone();0!==o.cmpn(0);)r.push(o.andln(1)),o.ishrn(1);for(var s=t,a=0;a<r.length&&0===r[a];a++,s=this.sqr(s));if(++a<r.length)for(var o=this.sqr(s);a<r.length;a++,o=this.sqr(o))0!==r[a]&&(s=this.mul(s,o));return s},g.prototype.convertTo=function e(t){var n=t.mod(this.m);return n===t?n.clone():n},g.prototype.convertFrom=function e(t){var n=t.clone();return n.red=null,n},i.mont=function e(t){return new y(t)},r(y,g),y.prototype.convertTo=function e(t){return this.imod(t.shln(this.shift))},y.prototype.convertFrom=function e(t){var n=this.imod(t.mul(this.rinv));return n.red=null,n},y.prototype.imul=function e(t,n){if(0===t.cmpn(0)||0===n.cmpn(0))return t.words[0]=0,t.length=1,t;var r=t.imul(n),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).ishrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},y.prototype.mul=function e(t,n){if(0===t.cmpn(0)||0===n.cmpn(0))return new i(0)._forceRed(this);var r=t.mul(n),o=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(o).ishrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},y.prototype.invm=function e(t){var n=this.imod(t._invmp(this.m).mul(this.r2));return n._forceRed(this)}}(e,this)}).call(this,n(75)(e))},function(e,t,n){"use strict";var r=n(17),i=n(30),o=n(41),s=[],a={};function u(){}function l(e,t){if(~s.indexOf(e))return e;if(!t)return a[e];r.isArray(t)||(t=[t]);var n=function(t){return s[i][t]===e};for(var i in s)if(r.any(t,n))return s[i]}function c(e){var t=new u;return o.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey,zaddr:e.zaddr,zkey:e.zkey}),e.networkMagic&&o.defineImmutable(t,{networkMagic:i.integerAsBuffer(e.networkMagic)}),e.port&&o.defineImmutable(t,{port:e.port}),e.dnsSeeds&&o.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),r.each(t,function(e){r.isUndefined(e)||r.isObject(e)||(a[e]=t)}),s.push(t),t}function f(e){for(var t=0;t<s.length;t++)s[t]===e&&s.splice(t,1);for(var n in a)a[n]===e&&delete a[n]}u.prototype.toString=function e(){return this.name},c({name:"livenet",alias:"mainnet",pubkeyhash:7352,privatekey:128,scripthash:7357,xpubkey:76067358,xprivkey:76066276,zaddr:5786,zkey:43830,networkMagic:4179340459,port:8233,dnsSeeds:[]});var h=l("livenet");c({name:"testnet",alias:"regtest",pubkeyhash:7461,privatekey:239,scripthash:7354,xpubkey:70617039,xprivkey:70615956,zaddr:5814,zkey:44040});var p=l("testnet"),d={PORT:18233,NETWORK_MAGIC:i.integerAsBuffer(4187956406),DNS_SEEDS:["dnsseed.testnet.z.cash"]};for(var m in d)r.isObject(d[m])||(a[d[m]]=p);var g={PORT:18444,NETWORK_MAGIC:i.integerAsBuffer(2867347295),DNS_SEEDS:[]};for(var m in g)r.isObject(g[m])||(a[g[m]]=p);function y(){p.regtestEnabled=!0}function b(){p.regtestEnabled=!1}Object.defineProperty(p,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.PORT:d.PORT}}),Object.defineProperty(p,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.NETWORK_MAGIC:d.NETWORK_MAGIC}}),Object.defineProperty(p,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?g.DNS_SEEDS:d.DNS_SEEDS}}),e.exports={add:c,remove:f,defaultNetwork:h,livenet:h,mainnet:h,testnet:p,get:l,enableRegtest:y,disableRegtest:b}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(84),s=n(195),a=n(128),u=n(60),l=n(41),c=n(95);function f(e,t,n){if(!(this instanceof f))return new f(e,t,n);if(r.isArray(e)&&r.isNumber(t))return f.createMultisig(e,t,n);if(e instanceof f)return e;if(i.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!a.get(t))throw new TypeError('Second argument must be "livenet" or "testnet".');if(n&&n!==f.PayToPublicKeyHash&&n!==f.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var o=this._classifyArguments(e,t,n);return o.network=o.network||a.get(t)||a.defaultNetwork,o.type=o.type||n||f.PayToPublicKeyHash,l.defineImmutable(this,{hashBuffer:o.hashBuffer,network:o.network,type:o.type}),this}f.prototype._classifyArguments=function(e,n,i){if((e instanceof t||e instanceof Uint8Array)&&20===e.length)return f._transformHash(e);if((e instanceof t||e instanceof Uint8Array)&&21===e.length)return f._transformBuffer(e,n,i);if(e instanceof c)return f._transformPublicKey(e);if(e instanceof h)return f._transformScript(e,n);if("string"==typeof e)return f._transformString(e,n,i);if(r.isObject(e))return f._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")},f.PayToPublicKeyHash="pubkeyhash",f.PayToScriptHash="scripthash",f._transformHash=function(e){var n={};if(!(e instanceof t||e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(20!==e.length)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return n.hashBuffer=e,n},f._transformObject=function(e){return i.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),i.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?new t(e.hash,"hex"):e.hashBuffer,network:a.get(e.network)||a.defaultNetwork,type:e.type}},f._classifyFromVersion=function(e){var t={},n=256*e[0]+e[1],r=a.get(n,"pubkeyhash"),i=a.get(n,"scripthash");return r?(t.network=r,t.type=f.PayToPublicKeyHash):i&&(t.network=i,t.type=f.PayToScriptHash),t},f._transformBuffer=function(e,n,r){var i={};if(!(e instanceof t||e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(22!==e.length)throw new TypeError("Address buffers must be exactly 22 bytes.");n=a.get(n);var o=f._classifyFromVersion(e);if(!o.network||n&&n!==o.network)throw new TypeError("Address has mismatched network type.");if(!o.type||r&&r!==o.type)throw new TypeError("Address has mismatched type.");return i.hashBuffer=e.slice(2),i.network=o.network,i.type=o.type,i},f._transformPublicKey=function(e){var t={};if(!(e instanceof c))throw new TypeError("Address must be an instance of PublicKey.");return t.hashBuffer=u.sha256ripemd160(e.toBuffer()),t.type=f.PayToPublicKeyHash,t},f._transformScript=function(e,t){i.checkArgument(e instanceof h,"script must be a Script instance");var n=e.getAddressInfo(t);if(!n)throw new o.Script.CantDeriveAddress(e);return n},f.createMultisig=function(e,t,n){return n=n||e[0].network||a.defaultNetwork,f.payingTo(h.buildMultisigOut(e,t),n)},f._transformString=function(e,t,n){if("string"!=typeof e)throw new TypeError("data parameter supplied is not a string.");e=e.trim();var r=s.decode(e),i=f._transformBuffer(r,t,n);return i},f.fromPublicKey=function(e,t){var n=f._transformPublicKey(e);return t=t||a.defaultNetwork,new f(n.hashBuffer,t,n.type)},f.fromPublicKeyHash=function(e,t){var n=f._transformHash(e);return new f(n.hashBuffer,t,f.PayToPublicKeyHash)},f.fromScriptHash=function(e,t){i.checkArgument(e,"hash parameter is required");var n=f._transformHash(e);return new f(n.hashBuffer,t,f.PayToScriptHash)},f.payingTo=function(e,t){return i.checkArgument(e,"script is required"),i.checkArgument(e instanceof h,"script must be instance of Script"),f.fromScriptHash(u.sha256ripemd160(e.toBuffer()),t)},f.fromScript=function(e,t){i.checkArgument(e instanceof h,"script must be a Script instance");var n=f._transformScript(e,t);return new f(n.hashBuffer,t,n.type)},f.fromBuffer=function(e,t,n){var r=f._transformBuffer(e,t,n);return new f(r.hashBuffer,r.network,r.type)},f.fromString=function(e,t,n){var r=f._transformString(e,t,n);return new f(r.hashBuffer,r.network,r.type)},f.fromObject=function e(n){i.checkState(l.isHexa(n.hash),'Unexpected hash property, "'+n.hash+'", expected to be hex.');var r=new t(n.hash,"hex");return new f(r,n.network,n.type)},f.getValidationError=function(e,t,n){var r;try{new f(e,t,n)}catch(e){r=e}return r},f.isValid=function(e,t,n){return!f.getValidationError(e,t,n)},f.prototype.isPayToPublicKeyHash=function(){return this.type===f.PayToPublicKeyHash},f.prototype.isPayToScriptHash=function(){return this.type===f.PayToScriptHash},f.prototype.toBuffer=function(){var e=new t(this.network[this.type].toString(16),"hex"),n=t.concat([e,this.hashBuffer]);return n},f.prototype.toObject=f.prototype.toJSON=function e(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},f.prototype.toString=function(){return s.encode(this.toBuffer())},f.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"},e.exports=f;var h=n(86)}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var r=n(1497),i=n(1498);e.exports=function e(n,o,s){if("number"!=typeof n)throw new TypeError('"size" argument must be a number');if(n<0)throw new RangeError('"size" argument must not be negative');if(t.alloc)return t.alloc(n,o,s);var a=i(n);return 0===n?a:void 0===o?r(a,0):("string"!=typeof s&&(s=void 0),r(a,o,s))}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(173),i=n(744),o=n(745),s="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;function l(e){return null==e?void 0===e?a:s:u&&u in Object(e)?i(e):o(e)}e.exports=l},function(e,t,n){var r=n(748),i=n(755),o=n(171);function s(e){return o(e)?r(e):i(e)}e.exports=s},function(e,t,n){"use strict";function r(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){const r=n(32),i=n(20),o=n(97);function s(e,t){return new Promise(n=>{setTimeout(()=>{n(t)},e)})}class a{constructor(e){}static setup0(e){throw new o.IntentionallyUnimplementedError("Intentionally undefined function Transport.setup0 should have been subclassed")}p_setup1(e){return this}p_setup2(e){return this}static async p_setup(e,t){let n=await this.setup0(e).p_setup1(t);return n.p_setup2(t)}p_stop(e){return new Promise((t,n)=>{this.status=a.STATUS_FAILED,e&&e(this),t()})}togglePaused(e){switch(this.status){case a.STATUS_CONNECTED:this.status=a.STATUS_PAUSED;break;case a.STATUS_PAUSED:this.status=a.STATUS_CONNECTED;break;case a.STATUS_LOADED:this.p_setup1(e).then(t=>t.p_setup2(e))}e&&e(this)}async p_status(){return this.status}connected(){return!this.status}supports(e,t,{noCache:n}={}){if("string"==typeof e&&(e=r.parse(e)),e&&!e.protocol)throw new Error("URL failed to specific a scheme (before :) "+e.href);return(!e||this.supportURLs.includes(e.protocol.slice(0,-1)))&&(!t||this.supportFunctions.includes(t))&&(!n||this.supportFeatures.includes("noCache"))}validFor(e,t,n){return this.connected()&&this.supports(e,t,n)}p_rawstore(e,t){throw new o.ToBeImplementedError("Intentionally undefined function Transport.p_rawstore should have been subclassed")}async p_rawstoreCaught(e){try{return await this.p_rawstore(e)}catch(e){}}p_store(){throw new o.ToBeImplementedError("Undefined function Transport.p_store - may define higher level semantics here (see Python)")}p_rawfetch(e,{timeoutMS:t,start:n,end:r,relay:i=!1}={}){return console.assert(!1,"Intentionally undefined function Transport.p_rawfetch should have been subclassed"),"UNIMPLEMENTED"}p_fetch(){throw new o.ToBeImplementedError("Undefined function Transport.p_fetch - may define higher level semantics here (see Python)")}p_rawadd(e,t){throw new o.ToBeImplementedError("Undefined function Transport.p_rawadd")}p_rawlist(e){throw new o.ToBeImplementedError("Undefined function Transport.p_rawlist")}p_list(){throw new Error("Undefined function Transport.p_list")}p_newlisturls(e){throw new Error("undefined function Transport.p_newlisturls")}p_rawreverse(e){throw new o.ToBeImplementedError("Undefined function Transport.p_rawreverse")}listmonitor(e,t,{current:n=!1}={}){console.log("Undefined function Transport.listmonitor")}async p_newdatabase(e){throw new o.ToBeImplementedError("Undefined function Transport.p_newdatabase")}async p_newtable(e,t){throw new o.ToBeImplementedError("Undefined function Transport.p_newtable")}async p_set(e,t,n){throw new o.ToBeImplementedError("Undefined function Transport.p_set")}async p_get(e,t){throw new o.ToBeImplementedError("Undefined function Transport.p_get")}async p_delete(e,t){throw new o.ToBeImplementedError("Undefined function Transport.p_delete")}async p_keys(e){throw new o.ToBeImplementedError("Undefined function Transport.p_keys")}async p_getall(e){throw new o.ToBeImplementedError("Undefined function Transport.p_keys")}static async p_f_createReadStream(e,{wanturl:t=!1}){}static mergeoptions(e){let t={};for(let n=0;n<arguments.length;n++){let r=arguments[n];for(let n in r){let i=r[n];null!==i&&("object"==typeof i&&!Array.isArray(i)&&t[n]?t[n]=a.mergeoptions(e[n],r[n]):t[n]=r[n])}}return t}async p_test_list({urlexpectedsubstring:e}={}){console.log(this.name,"p_test_kvt");try{let t=await this.p_newlisturls("NACL VERIFY:1234567LIST"),n=t.publicurl;console.log("newlisturls=",n),console.assert(!e||n.includes(e)),await this.p_rawadd(n,"testvalue");let r=await this.p_rawlist(n);console.assert(1===r.length&&"testvalue"===r[0]),await this.p_rawadd(n,{foo:"bar"}),r=await this.p_rawlist(n),console.assert(2===r.length&&"bar"===r[1].foo),await this.p_rawadd(n,[1,2,3]),r=await this.p_rawlist(n),console.assert(2===r.length&&3===r[2].length&&2===r[2][1]),await s(200),console.log(this.name,"p_test_list complete")}catch(e){throw console.log("Exception thrown in ",this.name,"p_test_list:",e.message),e}}async p_test_kvt(e){console.log(this.name,"p_test_kvt");try{let t=await this.p_newtable("NACL VERIFY:1234567KVT","mytable"),n=t.publicurl;console.log("newtable=",n),console.assert(n.includes(e)),await this.p_set(n,"testkey","testvalue");let r=await this.p_get(n,"testkey");console.assert("testvalue"===r),await this.p_set(n,"testkey2",{foo:"bar"}),r=await this.p_get(n,"testkey2"),console.assert("bar"===r.foo),await this.p_set(n,"testkey3",[1,2,3]),r=await this.p_get(n,"testkey3"),console.assert(2===r[1]),r=await this.p_keys(n),console.assert(r.includes("testkey")&&r.includes("testkey3")&&3===r.length),await this.p_delete(n,["testkey"]),r=await this.p_getall(n),console.log("getall=>",r),console.assert("bar"===r.testkey2.foo&&2===r.testkey3[1]&&!r.testkey),await s(200),console.log(this.name,"p_test_kvt complete")}catch(e){throw console.log("Exception thrown in ",this.name,"p_test_kvt:",e.message),e}}}a.STATUS_CONNECTED=0,a.STATUS_FAILED=1,a.STATUS_STARTING=2,a.STATUS_LOADED=3,a.STATUS_PAUSED=4,a.STATUSTEXT=["Connected","Failed","Starting","Loaded","Paused"],t=e.exports=a},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i={};function o(e,t,n){function o(e,n,r){return"string"==typeof t?t:t(e,n,r)}n||(n=Error);var s=function(e){function t(t,n,r){return e.call(this,o(t,n,r))||this}return r(t,e),t}(n);s.prototype.name=n.name,s.prototype.code=e,i[e]=s}function s(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function a(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function u(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function l(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,n){var r,i;if("string"==typeof t&&a(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",u(e," argument"))i="The ".concat(e," ").concat(r," ").concat(s(t,"type"));else{var o=l(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat(s(t,"type"))}return i+=". Received type ".concat(typeof n),i},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var i=n(395),o=n(399);n(1)(l,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];l.prototype[u]||(l.prototype[u]=o.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||t.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function e(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function e(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function e(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function e(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function e(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n(2))},function(e,t,n){"use strict";(function(t){const r=n(770),i=n(53);class o{constructor(e,n){if(!e||!t.isBuffer(e))throw new Error("first argument must be a buffer");if(!n||!r.isCID(n))throw new Error("second argument must be a CID");this._data=e,this._cid=n}get data(){return this._data}set data(e){throw new Error("Tried to change an immutable block")}get cid(){return this._cid}set cid(e){throw new Error("Tried to change an immutable block")}}e.exports=i(o,{className:"Block",symbolName:"@ipfs/js-ipfs-block/block"})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(405);e.exports=function e(t,n){return function(e,i){if(e)return r(i,e,n);if(null!=t){var o=t;t=null,i(null,o)}else i(!0)}}},function(e,t,n){var r=n(413),i=n(414);function o(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}e.exports=o},function(e,t,n){var r=n(19);n(34),n(178);var i=e.exports=r.asn1=r.asn1||{};function o(e,t,n){if(n>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=n,r}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,n,o,s){if(r.util.isArray(o)){for(var a=[],u=0;u<o.length;++u)void 0!==o[u]&&a.push(o[u]);o=a}var l={tagClass:e,type:t,constructed:n,composed:n||r.util.isArray(o),value:o};return s&&"bitStringContents"in s&&(l.bitStringContents=s.bitStringContents,l.original=i.copy(l)),l},i.copy=function(e,t){var n;if(r.util.isArray(e)){n=[];for(var o=0;o<e.length;++o)n.push(i.copy(e[o],t));return n}return"string"==typeof e?e:(n={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(n.bitStringContents=e.bitStringContents),n)},i.equals=function(e,t,n){if(r.util.isArray(e)){if(!r.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(!i.equals(e[o],t[o]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var s=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return n&&n.includeBitStringContents&&(s=s&&e.bitStringContents===t.bitStringContents),s},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t){var n,r=128&t;return n=r?e.getInt((127&t)<<3):t,n}};var s=function(e,t){var n=e.getByte();if(t--,128!==n){var r,i=128&n;if(i){var s=127&n;o(e,t,s),r=e.getInt(s<<3)}else r=n;if(r<0)throw new Error("Negative length: "+r);return r}};function a(e,t,n,r){var u;o(e,t,2);var l=e.getByte();t--;var c=192&l,f=31&l;u=e.length();var h=s(e,t),p,d;if(t-=u-e.length(),void 0!==h&&h>t){if(r.strict){var m=new Error("Too few bytes to read ASN.1 value.");throw m.available=e.length(),m.remaining=t,m.requested=h,m}h=t}var g=32==(32&l);if(g)if(p=[],void 0===h)for(;;){if(o(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}u=e.length(),p.push(a(e,t,n+1,r)),t-=u-e.length()}else for(;h>0;)u=e.length(),p.push(a(e,h,n+1,r)),t-=u-e.length(),h-=u-e.length();if(void 0===p&&c===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&(d=e.bytes(h)),void 0===p&&r.decodeBitStrings&&c===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&h>1){var y=e.read,b=t,v=0;if(f===i.Type.BITSTRING&&(o(e,t,1),v=e.getByte(),t--),0===v)try{u=e.length();var w={verbose:r.verbose,strict:!0,decodeBitStrings:!0},_=a(e,t,n+1,w),k=u-e.length();t-=k,f==i.Type.BITSTRING&&k++;var S=_.tagClass;k!==h||S!==i.Class.UNIVERSAL&&S!==i.Class.CONTEXT_SPECIFIC||(p=[_])}catch(e){}void 0===p&&(e.read=y,t=b)}if(void 0===p){if(void 0===h){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=t}if(f===i.Type.BMPSTRING)for(p="";h>0;h-=2)o(e,t,2),p+=String.fromCharCode(e.getInt16()),t-=2;else p=e.getBytes(h)}var E=void 0===d?null:{bitStringContents:d};return i.create(c,f,g,p,E)}i.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=r.util.createBuffer(e)),a(e,e.length(),0,t)},i.toDer=function(e){var t=r.util.createBuffer(),n=e.tagClass|e.type,o=r.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=i.equals(e,e.original))),s)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?n|=32:o.putByte(0);for(var a=0;a<e.value.length;++a)void 0!==e.value[a]&&o.putBuffer(i.toDer(e.value[a]))}else if(e.type===i.Type.BMPSTRING)for(var a=0;a<e.value.length;++a)o.putInt16(e.value.charCodeAt(a));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(n),o.length()<=127)t.putByte(127&o.length());else{var u=o.length(),l="";do{l+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|l.length);for(var a=l.length-1;a>=0;--a)t.putByte(l.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t=e.split("."),n=r.util.createBuffer(),i,o,s,a;n.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var u=2;u<t.length;++u){i=!0,o=[],s=parseInt(t[u],10);do{a=127&s,s>>>=7,i||(a|=128),o.push(a),i=!1}while(s>0);for(var l=o.length-1;l>=0;--l)n.putByte(o[l])}return n},i.derToOid=function(e){var t;"string"==typeof e&&(e=r.util.createBuffer(e));var n=e.getByte();t=Math.floor(n/40)+"."+n%40;for(var i=0;e.length()>0;)n=e.getByte(),i<<=7,128&n?i+=127&n:(t+="."+(i+n),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var u=e.charAt(10),l=10;"+"!==u&&"-"!==u&&(a=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(n,r,i),t.setUTCHours(o,s,a,0),l&&(u=e.charAt(l),"+"===u||"-"===u)){var c=parseInt(e.substr(l+1,2),10),f=parseInt(e.substr(l+4,2),10),h=60*c+f;h*=6e4,"+"===u?t.setTime(+t-h):t.setTime(+t+h)}return t},i.generalizedTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),u=0,l=0,c=!1;"Z"===e.charAt(e.length-1)&&(c=!0);var f=e.length-5,h=e.charAt(f);if("+"===h||"-"===h){var p=parseInt(e.substr(f+1,2),10),d=parseInt(e.substr(f+4,2),10);l=60*p+d,l*=6e4,"+"===h&&(l*=-1),c=!0}return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),c?(t.setUTCFullYear(n,r,i),t.setUTCHours(o,s,a,u),t.setTime(+t+l)):(t.setFullYear(n,r,i),t.setHours(o,s,a,u)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",n=[];n.push((""+e.getUTCFullYear()).substr(2)),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t},i.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",n=[];n.push(""+e.getUTCFullYear()),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t},i.integerToDer=function(e){var t=r.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=e,n},i.derToInteger=function(e){"string"==typeof e&&(e=r.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,n,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&r.util.isArray(t.value))for(var a=0,u=0;s&&u<t.value.length;++u)s=t.value[u].optional||!1,e.value[a]&&(s=i.validate(e.value[a],t.value[u],n,o),s?++a:t.value[u].optional&&(s=!0)),!s&&o&&o.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');var l;if(s&&n)if(t.capture&&(n[t.capture]=e.value),t.captureAsn1&&(n[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(n[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)n[t.captureBitStringValue]="";else{var c=e.bitStringContents.charCodeAt(0);if(0!==c)throw new Error("captureBitStringValue only supported for zero unused bits");n[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else o&&o.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return s};var u=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,n){var o="";t=t||0,n=n||2,t>0&&(o+="\n");for(var s="",a=0;a<t*n;++a)s+=" ";switch(o+=s+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:o+="Universal:";break;case i.Class.APPLICATION:o+="Application:";break;case i.Class.CONTEXT_SPECIFIC:o+="Context-Specific:";break;case i.Class.PRIVATE:o+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(o+=e.type,e.type){case i.Type.NONE:o+=" (None)";break;case i.Type.BOOLEAN:o+=" (Boolean)";break;case i.Type.INTEGER:o+=" (Integer)";break;case i.Type.BITSTRING:o+=" (Bit string)";break;case i.Type.OCTETSTRING:o+=" (Octet string)";break;case i.Type.NULL:o+=" (Null)";break;case i.Type.OID:o+=" (Object Identifier)";break;case i.Type.ODESC:o+=" (Object Descriptor)";break;case i.Type.EXTERNAL:o+=" (External or Instance of)";break;case i.Type.REAL:o+=" (Real)";break;case i.Type.ENUMERATED:o+=" (Enumerated)";break;case i.Type.EMBEDDED:o+=" (Embedded PDV)";break;case i.Type.UTF8:o+=" (UTF8)";break;case i.Type.ROID:o+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:o+=" (Sequence)";break;case i.Type.SET:o+=" (Set)";break;case i.Type.PRINTABLESTRING:o+=" (Printable String)";break;case i.Type.IA5String:o+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:o+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:o+=" (Generalized time)";break;case i.Type.BMPSTRING:o+=" (BMP String)"}else o+=e.type;if(o+="\n",o+=s+"Constructed: "+e.constructed+"\n",e.composed){for(var l=0,c="",a=0;a<e.value.length;++a)void 0!==e.value[a]&&(l+=1,c+=i.prettyPrint(e.value[a],t+1,n),a+1<e.value.length&&(c+=","));o+=s+"Sub values: "+l+c}else{if(o+=s+"Value: ",e.type===i.Type.OID){var f=i.derToOid(e.value);o+=f,r.pki&&r.pki.oids&&f in r.pki.oids&&(o+=" ("+r.pki.oids[f]+") ")}if(e.type===i.Type.INTEGER)try{o+=i.derToInteger(e.value)}catch(t){o+="0x"+r.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?o+="0x"+r.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?o+=" (1 unused bit shown)":h>1&&(o+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(u.test(e.value)||(o+="("+e.value+") "),o+="0x"+r.util.bytesToHex(e.value)):e.type===i.Type.UTF8?o+=r.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:u.test(e.value)?o+="0x"+r.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},function(e,t,n){var r=n(19);n(237),n(892),n(893),n(34),r.random&&r.random.getBytes?e.exports=r.random:function(t){var n={},i=new Array(4),o=r.util.createBuffer();function s(){var e=r.prng.create(n);return e.getBytes=function(t,n){return e.generate(t,n)},e.getBytesSync=function(t){return e.generate(t)},e}n.formatKey=function(e){var t=r.util.createBuffer(e);return e=new Array(4),e[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),r.aes._expandKey(e,!1)},n.formatSeed=function(e){var t=r.util.createBuffer(e);return e=new Array(4),e[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},n.cipher=function(e,t){return r.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},n.increment=function(e){return++e[3],e},n.md=r.md.sha256;var a=s(),u=null;if("undefined"!=typeof window){var l=window.crypto||window.msCrypto;l&&l.getRandomValues&&(u=function(e){return l.getRandomValues(e)})}if(r.options.usePureJavaScript||!r.util.isNodejs&&!u){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var c="";for(var f in navigator)try{"string"==typeof navigator[f]&&(c+=navigator[f])}catch(e){}a.collect(c),c=null}t&&(t().mousemove(function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)}),t().keypress(function(e){a.collectInt(e.charCode,8)}))}if(r.random)for(var f in a)r.random[f]=a[f];else r.random=a;r.random.createInstance=s,e.exports=r.random}("undefined"!=typeof jQuery?jQuery:null)},function(e,t,n){"use strict";const r=t;r.bignum=n(63),r.define=n(903).define,r.base=n(179),r.constants=n(463),r.decoders=n(908),r.encoders=n(910)},function(e,t,n){"use strict";var r=n(1),i=n(318),o=n(469),s=n(470),a=n(119);function u(e){a.call(this,"digest"),this._hash=e}r(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function e(t){return t=t.toLowerCase(),"md5"===t?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(e,t,n){var r=n(4).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%i,l=Math.min(o-a,i-u),c=0;c<l;c++)n[u+c]=e[a+c];s+=l,a+=l,s%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(491),i=a(r),o=n(219),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.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=this._callbacks["$"+e],r;if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.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}},function(e,t,n){var r=n(1072),i=n(514),o=n(1074),s=n(1075),a=n(1076),u;"undefined"!=typeof ArrayBuffer&&(u=n(1077));var l="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),c="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),f=l||c;t.protocol=3;var h=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=r(h),d={type:"error",data:"parser error"},m=n(1078);function g(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}function y(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),s=new Uint8Array(1+i.byteLength);s[0]=h[e.type];for(var a=0;a<o.length;a++)s[a+1]=o[a];return r(s.buffer)}function b(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){t.encodePacket({type:e.type,data:i.result},n,!0,r)},i.readAsArrayBuffer(e.data)}function v(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(f)return b(e,n,r);var i=new Uint8Array(1);i[0]=h[e.type];var o=new m([i.buffer,e.data]);return r(o)}function w(e){try{e=a.decode(e,{strict:!1})}catch(e){return!1}return e}function _(e,t,n){for(var r=new Array(e.length),i=s(e.length,n),o=function(e,n,i){t(n,function(t,n){r[e]=n,i(t,r)})},a=0;a<e.length;a++)o(a,e[a],i)}t.encodePacket=function(e,t,n,r){"function"==typeof t&&(r=t,t=!1),"function"==typeof n&&(r=n,n=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return y(e,t,r);if(void 0!==m&&i instanceof m)return v(e,t,r);if(i&&i.base64)return g(e,r);var o=h[e.type];return void 0!==e.data&&(o+=n?a.encode(String(e.data),{strict:!1}):String(e.data)),r(""+o)},t.encodeBase64Packet=function(e,n){var r="b"+t.packets[e.type],i;if(void 0!==m&&e.data instanceof m){var o=new FileReader;return o.onload=function(){var e=o.result.split(",")[1];n(r+e)},o.readAsDataURL(e.data)}try{i=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),u=0;u<s.length;u++)a[u]=s[u];i=String.fromCharCode.apply(null,a)}return r+=btoa(i),n(r)},t.decodePacket=function(e,n,r){if(void 0===e)return d;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&(e=w(e),!1===e))return d;var i=e.charAt(0);return Number(i)==i&&p[i]?e.length>1?{type:p[i],data:e.substring(1)}:{type:p[i]}:d}var s=new Uint8Array(e),i=s[0],a=o(e,1);return m&&"blob"===n&&(a=new m([a])),{type:p[i],data:a}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!u)return{type:n,data:{base64:!0,data:e.substr(1)}};var r=u.decode(e.substr(1));return"blob"===t&&m&&(r=new m([r])),{type:n,data:r}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=i(e);if(n&&o)return m&&!f?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");function s(e){return e.length+":"+e}function a(e,r){t.encodePacket(e,!!o&&n,!1,function(e){r(null,s(e))})}_(e,a,function(e,t){return r(t.join(""))})},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var o="",s,a,u=0,l=e.length;u<l;u++){var c=e.charAt(u);if(":"===c){if(""===o||o!=(s=Number(o)))return r(d,0,1);if(a=e.substr(u+1,s),o!=a.length)return r(d,0,1);if(a.length){if(i=t.decodePacket(a,n,!1),d.type===i.type&&d.data===i.data)return r(d,0,1);var f=r(i,u+s,l);if(!1===f)return}u+=s,o=""}else o+=c}return""!==o?r(d,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}_(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),i=new Uint8Array(r),o=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}i[o++]=t?0:1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)i[o++]=parseInt(a[s]);i[o++]=255;for(var r=new Uint8Array(n),s=0;s<r.length;s++)i[o++]=r[s]}),n(i.buffer)})},t.encodePayloadAsBlob=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}for(var o=e instanceof ArrayBuffer?e.byteLength:e.size,s=o.toString(),a=new Uint8Array(s.length+1),i=0;i<s.length;i++)a[i]=parseInt(s[i]);if(a[s.length]=255,m){var u=new m([t.buffer,a.buffer,e]);n(null,u)}})}_(e,r,function(e,t){return n(new m(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var i=e,s=[];i.byteLength>0;){for(var a=new Uint8Array(i),u=0===a[0],l="",c=1;255!==a[c];c++){if(l.length>310)return r(d,0,1);l+=a[c]}i=o(i,2+l.length),l=parseInt(l);var f=o(i,0,l);if(u)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(e){var h=new Uint8Array(f);f="";for(var c=0;c<h.length;c++)f+=String.fromCharCode(h[c])}s.push(f),i=o(i,l)}var p=s.length;s.forEach(function(e,i){r(t.decodePacket(e,n,!0),i,p)})}},function(e,t,n){"use strict";(function(t,r){var i=65536,o=4294967295;function s(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var a=n(4).Buffer,u=t.crypto||t.msCrypto;function l(e,t){if(e>o)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s<e;s+=i)u.getRandomValues(n.slice(s,s+i));else u.getRandomValues(n);return"function"==typeof t?r.nextTick(function(){t(null,n)}):n}u&&u.getRandomValues?e.exports=l:e.exports=s}).call(this,n(8),n(2))},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(520),a=n(523);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=e.exports=function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe};r.writable=function(e){return r(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState},r.readable=function(e){return r(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState},r.duplex=function(e){return r.writable(e)&&r.readable(e)},r.transform=function(e){return r.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(560),a=n(563);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";(function(t){var r=n(49),i=n(30),o=n(94).curves.secp256k1,s=o.curve.point.bind(o.curve),a=o.curve.pointFromX.bind(o.curve),u=function e(t,n,r){var i=s(t,n,r);return i.validate(),i};u.prototype=Object.getPrototypeOf(o.curve.point()),u.fromX=function e(t,n){var r=a(t,n);return r.validate(),r},u.getG=function e(){return o.curve.g},u.getN=function e(){return new r(o.curve.n.toArray())},u.prototype._getX=u.prototype.getX,u.prototype.getX=function e(){return new r(this._getX().toArray())},u.prototype._getY=u.prototype.getY,u.prototype.getY=function e(){return new r(this._getY().toArray())},u.prototype.validate=function e(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");if(0===this.getX().cmp(r.Zero)||0===this.getY().cmp(r.Zero))throw new Error("Invalid x,y value for curve, cannot equal 0.");var t=a(this.getY().isOdd(),this.getX());if(0!==t.y.cmp(this.y))throw new Error("Invalid y value for curve.");var n=this.getX().gt(r.Minus1)&&this.getX().lt(u.getN()),i=this.getY().gt(r.Minus1)&&this.getY().lt(u.getN());if(!n||!i)throw new Error("Point does not lie on the curve");if(!this.mul(u.getN()).isInfinity())throw new Error("Point times N must be infinity");return this},u.pointToCompressed=function e(n){var r=n.getX().toBuffer({size:32}),o=n.getY().toBuffer({size:32}),s,a=o[o.length-1]%2;return s=new t(a?[3]:[2]),i.concat([s,r])},e.exports=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(20).Transform;class i extends r{constructor(e){const t=Object.assign({},e||{},{objectMode:!0});super(t)}_transform(e,t,n){if(!e.Hash)return n();n(null,{path:e.Name,hash:e.Hash,size:parseInt(e.Size,10)})}}e.exports=i},function(e,t,n){(function(e){var r=n(1473),i=n(611),o=n(69),s=n(609),a=n(32),u=t;u.request=function(t,n){t="string"==typeof t?a.parse(t):o(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new r(t);return n&&f.on("response",n),f},u.get=function e(t,n){var r=u.request(t,n);return r.end(),r},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(8))},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(613),a=n(616);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(619),a=n(622);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(628),a=n(631);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(637),a=n(640);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";const r=n(363);e.exports=((e,t)=>{const n=r(e,t);return(e,t,r)=>{n(e,t,(e,t)=>{if(e)return r(e);r(null,t[0])})}})},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(657),a=n(660);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(662),a=n(665);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(668),a=n(671);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(674),a=n(677);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(680),a=n(683);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(689),a=n(692);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(697),a=n(700);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";function r(e,t){for(var n in t=t||{},e)t[n]=e[n];return t}function i(e,t,n){var r=n?" !== ":" === ",i=n?" || ":" && ",o=n?"!":"",s=n?"":"!";switch(e){case"null":return t+r+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+i+"typeof "+t+r+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+i+s+"("+t+" % 1)"+i+t+r+t+")";default:return"typeof "+t+r+'"'+e+'"'}}function o(e,t){switch(e.length){case 1:return i(e[0],t,!0);default:var n="",r=u(e);for(var o in r.array&&r.object&&(n=r.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete r.null,delete r.array,delete r.object),r.number&&delete r.integer,r)n+=(n?" && ":"")+i(o,t,!0);return n}}e.exports={copy:r,checkDataType:i,checkDataTypes:o,coerceToTypes:a,toHash:u,getProperty:f,escapeQuotes:h,equal:n(384),ucs2length:n(1882),varOccurences:p,varReplace:d,cleanUpCode:b,finalCleanUpCode:I,schemaHasRules:T,schemaHasRulesExcept:j,schemaUnknownRules:O,toQuotedString:P,getPathExpr:B,getPath:R,getData:L,unescapeFragment:D,unescapeJsonPointer:q,escapeFragment:U,escapeJsonPointer:z};var s=u(["string","number","integer","boolean","null"]);function a(e,t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++){var i=t[r];s[i]?n[n.length]=i:"array"===e&&"array"===i&&(n[n.length]=i)}if(n.length)return n}else{if(s[t])return[t];if("array"===e&&"array"===t)return["array"]}}function u(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function f(e){return"number"==typeof e?"["+e+"]":l.test(e)?"."+e:"['"+h(e)+"']"}function h(e){return e.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function p(e,t){t+="[^0-9]";var n=e.match(new RegExp(t,"g"));return n?n.length:0}function d(e,t,n){return t+="([^0-9])",n=n.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),n+"$1")}var m=/else\s*{\s*}/g,g=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,y=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;function b(e){return e.replace(m,"").replace(g,"").replace(y,"if (!($1))")}var v=/[^v.]errors/g,w=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,_=/var errors = 0;|var vErrors = null;/g,k="return errors === 0;",S="validate.errors = null; return true;",E=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,x="return data;",C=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,A=/if \(rootData === undefined\) rootData = data;/;function I(e,t){var n=e.match(v);return n&&2==n.length&&(e=t?e.replace(_,"").replace(E,x):e.replace(w,"").replace(k,S)),n=e.match(C),n&&3===n.length?e.replace(A,""):e}function T(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0}function j(e,t,n){if("boolean"==typeof e)return!e&&"not"!=n;for(var r in e)if(r!=n&&t[r])return!0}function O(e,t){if("boolean"!=typeof e)for(var n in e)if(!t[n])return n}function P(e){return"'"+h(e)+"'"}function B(e,t,n,r){var i=n?"'/' + "+t+(r?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):r?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return F(e,i)}function R(e,t,n){var r=P(n?"/"+z(t):f(t));return F(e,r)}var N=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function L(e,t,n){var r,i,o,s;if(""===e)return"rootData";if("/"==e[0]){if(!N.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,o="rootData"}else{if(s=e.match(M),!s)throw new Error("Invalid JSON-pointer: "+e);if(r=+s[1],i=s[2],"#"==i){if(r>=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var a=o,u=i.split("/"),l=0;l<u.length;l++){var c=u[l];c&&(o+=f(q(c)),a+=" && "+o)}return a}function F(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}function D(e){return q(decodeURIComponent(e))}function U(e){return encodeURIComponent(z(e))}function z(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function q(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},function(e,t,n){(function(e,t){!function(){var r;"undefined"!=typeof window&&(r=window),void 0!==e&&(r=e),r=r||{};var i=r.console||{log:function(){}};function o(e,t){return t?n(1985)(e):e.slice?o[r(e)]:function(t,n){e(t={exports:{}}),o[r(n)]=t.exports};function r(e){return e.split("/").slice(-1).toString().replace(".js","")}}var s=t;o(function(e){var t={fn:{is:function(e){return!!e&&"function"==typeof e}}};t.bi={is:function(e){return e instanceof Boolean||"boolean"==typeof e}},t.num={is:function(e){return!r(e)&&(e-parseFloat(e)+1>=0||1/0===e||-1/0===e)}},t.text={is:function(e){return"string"==typeof e}},t.text.ify=function(e){return t.text.is(e)?e:"undefined"!=typeof JSON?JSON.stringify(e):e&&e.toString?e.toString():e},t.text.random=function(e,t){var n="";for(e=e||24,t=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";e>0;)n+=t.charAt(Math.floor(Math.random()*t.length)),e--;return n},t.text.match=function(e,t){var n,r;return"string"==typeof e&&("string"==typeof t&&(t={"=":t}),t=t||{},n=t["="]||t["*"]||t[">"]||t["<"],e===n||r===t["="]&&(n=t["*"]||t[">"]||t["<"],e.slice(0,(n||"").length)===n||r===t["*"]&&(r!==t[">"]&&r!==t["<"]?e>=t[">"]&&e<=t["<"]:r!==t[">"]&&e>=t[">"]||r!==t["<"]&&e<=t["<"])))},t.list={is:function(e){return e instanceof Array}},t.list.slit=Array.prototype.slice,t.list.sort=function(e){return function(t,n){return t&&n?(t=t[e],n=n[e],t<n?-1:t>n?1:0):0}},t.list.map=function(e,t,n){return a(e,t,n)},t.list.index=1,t.obj={is:function(e){return!!e&&(e instanceof Object&&e.constructor===Object||"Object"===Object.prototype.toString.call(e).match(/^\[object (\w+)\]$/)[1])}},t.obj.put=function(e,t,n){return(e||{})[t]=n,e},t.obj.has=function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)},t.obj.del=function(e,t){if(e)return e[t]=null,delete e[t],e},t.obj.as=function(e,t,n,r){return e[t]=e[t]||(r===n?{}:n)},t.obj.ify=function(e){if(o(e))return e;try{e=JSON.parse(e)}catch(t){e={}}return e},function(){var e;function n(t,n){s(this,n)&&e!==this[n]||(this[n]=t)}t.obj.to=function(e,t){return t=t||{},a(e,n,t),t}}(),t.obj.copy=function(e){return e?JSON.parse(JSON.stringify(e)):e},function(){function e(e,t){var n=this.n;if(!n||!(t===n||o(n)&&s(n,t)))return!!t||void 0}t.obj.empty=function(t,n){return!t||!a(t,e,{n:n})}}(),function(){function e(t,n){if(2===arguments.length)return e.r=e.r||{},void(e.r[t]=n);e.r=e.r||[],e.r.push(t)}var i=Object.keys;t.obj.map=function(a,u,l){var c,f=0,h,p,d,m,g=n(u);if(e.r=null,i&&o(a)&&(d=i(a),m=!0),r(a)||d)for(h=(d||a).length;f<h;f++){var y=f+t.list.index;if(g){if(p=m?u.call(l||this,a[d[f]],d[f],e):u.call(l||this,a[f],y,e),p!==c)return p}else if(u===a[m?d[f]:f])return d?d[f]:y}else for(f in a)if(g){if(s(a,f)&&(p=l?u.call(l,a[f],f,e):u(a[f],f,e),p!==c))return p}else if(u===a[f])return f;return g?e.r:t.list.index?0:-1}}(),t.time={},t.time.is=function(e){return e?e instanceof Date:+(new Date).getTime()};var n=t.fn.is,r=t.list.is,i=t.obj,o=i.is,s=i.has,a=i.map;e.exports=t})(o,"./type"),o(function(e){e.exports=function e(t,n,r){if(!t)return{to:e};var i,t=(this.tag||(this.tag={}))[t]||(this.tag[t]={tag:t,to:e._={next:function(e){var t;(t=this.to)&&t.next(e)}}});if(n instanceof Function){var o={off:e.off||(e.off=function(){if(this.next===e._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=e._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:e._,next:n,the:t,on:this,as:r};return(o.back=t.last||t).to=o,t.last=o}return(t=t.to)&&i!==n&&t.next(n),t}})(o,"./onto"),o(function(e){function t(e,t,r,i,o){if(e<t)return{defer:!0};if(t<r)return{historical:!0};if(r<t)return{converge:!0,incoming:!0};if(t===r){if(i=n(i)||"",o=n(o)||"",i===o)return{state:!0};if(i<o)return{converge:!0,current:!0};if(o<i)return{converge:!0,incoming:!0}}return{err:"Invalid CRDT Data: "+i+" to "+o+" at "+t+" to "+r+"!"}}if("undefined"==typeof JSON)throw new Error("JSON is not included in this browser. Please load it first: ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js");var n=JSON.stringify,r;e.exports=t})(o,"./HAM"),o(function(e){var t=o("./type"),n={is:function(e){return e!==i&&(null===e||e!==1/0&&(!!(u(e)||s(e)||a(e))||(n.link.is(e)||!1)))}};n.link=n.rel={_:"#"},function(){function e(e,t){var n=this;return n.id?n.id=!1:t==r&&u(e)?void(n.id=e):n.id=!1}n.link.is=function(t){if(t&&t[r]&&!t._&&c(t)){var n={};if(h(t,e,n),n.id)return n.id}return!1}}(),n.link.ify=function(e){return f({},r,e)},t.obj.has._=".";var r=n.link._,i,s=t.bi.is,a=t.num.is,u=t.text.is,l=t.obj,c=l.is,f=l.put,h=l.map;e.exports=n})(o,"./val"),o(function(e){var t=o("./type"),n=o("./val"),r={_:"_",soul:function(e,t){return e&&e._&&e._[t||f]}};r.soul.ify=function(e,t){return t="string"==typeof t?{soul:t}:t||{},e=e||{},e._=e._||{},e._[f]=t.soul||e._[f]||c(),e},r.soul._=n.link._,function(){function e(e,t){if(t!==r._)return!n.is(e)||void(this.cb&&this.cb.call(this.as,e,t,this.n,this.s))}r.is=function(t,n,i){var o;return!!s(t)&&(!!(o=r.soul(t))&&!u(t,e,{as:i,cb:n,s:o,n:t}))}}(),function(){function e(e,t){var r=this.o,i,o;if(r.map)return i=r.map.call(this.as,e,""+t,r.node),void(o===i?a(r.node,t):r.node&&(r.node[t]=i));n.is(e)&&(r.node[t]=e)}r.ify=function(t,n,i){return n?"string"==typeof n?n={soul:n}:n instanceof Function&&(n={map:n}):n={},n.map&&(n.node=n.map.call(i,t,h,n.node||{})),(n.node=r.soul.ify(n.node||{},n))&&u(t,e,{o:n,as:i}),n.node}}();var i=t.obj,s=i.is,a=i.del,u=i.map,l=t.text,c=l.random,f=r.soul._,h;e.exports=r})(o,"./node"),o(function(e){var t=o("./type"),n=o("./node");function r(){var e;return e=i(),s<e?(a=0,s=e+r.drift):s=e+(a+=1)/u+r.drift}var i=t.time.is,s=-1/0,a=0,u=1e3,l="undefined"!=typeof performance&&(performance.timing&&performance),c=l&&l.timing&&l.timing.navigationStart||(l=!1);r._=">",r.drift=0,r.is=function(e,t,n){var i=t&&e&&e[_]&&e[_][r._]||n;if(i)return b(i=i[t])?i:-1/0},r.lex=function(){return r().toString(36).replace(".","")},r.ify=function(e,t,i,o,s){if(!e||!e[_]){if(!s)return;e=n.soul.ify(e,s)}var a=h(e[_],r._);return k!==t&&t!==_&&(b(i)&&(a[t]=i),k!==o&&(e[t]=o)),e},r.to=function(e,t,i){var o=(e||{})[t];return d(o)&&(o=g(o)),r.ify(i,t,r.is(e,t),o,n.soul(e))},function(){function e(e,t){_!==t&&r.ify(this.o,t,this.s)}r.map=function(t,n,i){var o,s=d(s=t||n)?s:null;return t=w(t=t||n)?t:null,s&&!t?(n=b(n)?n:r(),s[_]=s[_]||{},m(s,e,{o:s,s:n}),s):(i=i||d(n)?n:o,n=b(n)?n:r(),function(r,s,a,u){if(!t)return e.call({o:a,s:n},r,s),r;t.call(i||this||{},r,s,a,u),p(a,s)&&o===a[s]||e.call({o:a,s:n},r,s)})}}();var f=t.obj,h=f.as,p=f.has,d=f.is,m=f.map,g=f.copy,y=t.num,b=y.is,v=t.fn,w=v.is,_=n._,k;e.exports=r})(o,"./state"),o(function(e){var t=o("./type"),n=o("./val"),r=o("./node"),i={};!function(){function e(e,n){if(!e||n!==r.soul(e)||!r.is(e,this.fn,this.as))return!0;this.cb&&(t.n=e,t.as=this.as,this.cb.call(t.as,e,n,t))}function t(e){e&&r.is(t.n,e,t.as)}i.is=function(t,n,r,i){return!(!t||!u(t)||f(t))&&!p(t,e,{cb:n,fn:r,as:i})}}(),function(){function e(e,t){var i;return(i=f(e,t))?i:(t.env=e,t.soul=s,r.ify(t.obj,o,t)&&(t.link=t.link||n.link.ify(r.soul(t.node)),t.obj!==e.shell&&(e.graph[n.link.is(t.link)]=t.node)),t)}function o(t,i,o){var s=this,u=s.env,f,h;if(r._===i&&c(t,n.link._))return o._;if(f=a(t,i,o,s,u)){if(i||(s.node=s.node||o||{},c(t,r._)&&r.soul(t)&&(s.node._=d(t._)),s.node=r.soul.ify(s.node,n.link.is(s.link)),s.link=s.link||n.link.ify(r.soul(s.node))),(h=u.map)&&(h.call(u.as||{},t,i,o,s),c(o,i))){if(t=o[i],m===t)return void l(o,i);if(!(f=a(t,i,o,s,u)))return}if(!i)return s.node;if(!0===f)return t;if(h=e(u,{obj:t,path:s.path.concat(i)}),h.node)return h.link}}function s(e){var t=this,i=n.link.is(t.link),o=t.env.graph;t.link=t.link||n.link.ify(e),t.link[n.link._]=e,t.node&&t.node[r._]&&(t.node[r._][n.link._]=e),c(o,i)&&(o[e]=o[i],l(o,i))}function a(e,r,i,o,s){var l;return!!n.is(e)||(u(e)?1:(l=s.invalid)?(e=l.call(s.as||{},e,r,i),a(e,r,i,o,s)):(s.err="Invalid value at '"+o.path.concat(r).join(".")+"'!",void(t.list.is(e)&&(s.err+=" Use `.set(item)` instead of an Array."))))}function f(e,t){for(var n=e.seen,r=n.length,i;r--;)if(i=n[r],t.obj===i.obj)return i;n.push(t)}i.ify=function(t,r,i){var o={path:[],obj:t};return r?"string"==typeof r?r={soul:r}:r instanceof Function&&(r.map=r):r={},r.soul&&(o.link=n.link.ify(r.soul)),r.shell=(i||{}).shell,r.graph=r.graph||{},r.seen=r.seen||[],r.as=r.as||i,e(r,o),r.root=o.node,r.graph}}(),i.node=function(e){var t=r.soul(e);if(t)return h({},t,e)},function(){function e(e,t){var o,s;if(r._!==t)(o=n.link.is(e))?(s=this.opt.seen[o])?this.obj[t]=s:this.obj[t]=this.opt.seen[o]=i.to(this.graph,o,this.opt):this.obj[t]=e;else{if(f(e,n.link._))return;this.obj[t]=d(e)}}i.to=function(t,n,r){if(t){var i={};return r=r||{seen:{}},p(t[n],e,{obj:i,graph:t,opt:r}),i}}}();var s=t.fn.is,a=t.obj,u=a.is,l=a.del,c=a.has,f=a.empty,h=a.put,p=a.map,d=a.copy,m;e.exports=i})(o,"./graph"),o(function(e){o("./onto"),e.exports=function e(t,n){if(this.on){if(!(t instanceof Function)){if(!t||!n)return;var r=t["#"]||t,i=(this.tag||empty)[r];if(!i)return;return i=this.on(r,n),clearTimeout(i.err),!0}var r=n&&n["#"]||Math.random().toString(36).slice(2);if(!t)return r;var o=this.on(r,t,n);return o.err=o.err||setTimeout(function(){o.next({err:"Error: No ACK received yet.",lack:!0}),o.off()},(this.opt||{}).lack||9e3),r}}})(o,"./ask"),o(function(e){var t=o("./type");function n(e){var n={s:{}};return e=e||{max:1e3,age:9e3},n.check=function(e){var t;return!!(t=n.s[e])&&(t.pass?t.pass=!1:n.track(e))},n.track=function(i,o){var s=n.s[i]||(n.s[i]={});return s.was=r(),o&&(s.pass=!0),n.to||(n.to=setTimeout(function(){var i=r();t.obj.map(n.s,function(r,o){r&&e.age>i-r.was||t.obj.del(n.s,o)}),n.to=null},e.age+9)),s},n}var r=t.time.is;e.exports=n})(o,"./dup"),o(function(e){function t(e){return e instanceof t?(this._={gun:this,$:this}).$:this instanceof t?t.create(this._={gun:this,$:this,opt:e}):new t(e)}t.is=function(e){return e instanceof t||e&&e._&&e===e._.$||!1},t.version=.9,t.chain=t.prototype,t.chain.toJSON=function(){};var n=o("./type");n.obj.to(n,t),t.HAM=o("./HAM"),t.val=o("./val"),t.node=o("./node"),t.state=o("./state"),t.graph=o("./graph"),t.on=o("./onto"),t.ask=o("./ask"),t.dup=o("./dup"),function(){function e(n){var r=this,i=r.as,o=i.at||i,s=o.$,a,u;(u=n["#"])||(u=n["#"]=l(9)),(a=o.dup).check(u)?i.out===n.out&&(n.out=k,r.to.next(n)):(a.track(u),o.ask(n["@"],n)||(n.get&&t.on.get(n,s),n.put&&t.on.put(n,s)),r.to.next(n),i.out||(n.out=e,o.on("out",n)))}t.create=function(n){n.root=n.root||n,n.graph=n.graph||{},n.on=n.on||t.on,n.ask=n.ask||t.ask,n.dup=n.dup||t.dup();var r=n.$.opt(n.opt);return n.once||(n.on("in",e,n),n.on("out",e,{at:n,out:e}),t.on("create",n),n.on("create",n)),n.once=1,r}}(),function(){function e(e,n,r,i){var o=this,s=t.state.is(r,n),a;if(!s)return o.err="Error: No state on '"+n+"' in node '"+i+"'!";var u=o.graph[i]||_,l=t.state.is(u,n,!0),c=u[n],f=t.HAM(o.machine,s,l,e,c);f.incoming?(o.put[i]=t.state.to(r,n,o.put[i]),(o.diff||(o.diff={}))[i]=t.state.to(r,n,o.diff[i]),o.souls[i]=!0):f.defer&&(o.defer=s<(o.defer||1/0)?s:o.defer)}function n(e,t){var n=this,s=n.$._,a=(s.next||_)[t];if(!a){if(!(s.opt||_).super)return void(n.souls[t]=!1);a=n.$.get(t)._}var u=n.map[t]={put:e,get:t,$:a.$},l={ctx:n,msg:u};n.async=!!s.tag.node,n.ack&&(u["@"]=n.ack),d(e,r,l),n.async&&(n.and||s.on("node",function(e){this.to.next(e),e===n.map[e.get]&&(n.souls[e.get]=!1,d(e.put,i,e),d(n.souls,function(e){if(e)return e})||n.c||(n.c=1,this.off(),d(n.map,o,n)))}),n.and=!0,s.on("node",u))}function r(e,n){var r=this.ctx,i=r.graph,o=this.msg,s=o.get,a=o.put,u=o.$._,l;i[s]=t.state.to(a,n,i[s]),r.async||(u.put=t.state.to(a,n,u.put))}function i(e,n){var r=this,i=r.put,o=r.$._;o.put=t.state.to(i,n,o.put)}function o(e,t){e.$&&(this.cat.stop=this.stop,e.$._.on("in",e),this.cat.stop=null)}t.on.put=function(r,i){var s=i._,a={$:i,graph:s.graph,put:{},map:{},souls:{},machine:t.state(),ack:r["@"],cat:s,stop:{}};if(t.graph.is(r.put,null,e,a)||(a.err="Error: Invalid graph!"),a.err)return s.on("in",{"@":r["#"],err:t.log(a.err)});d(a.put,n,a),a.async||d(a.map,o,a),k!==a.defer&&setTimeout(function(){t.on.put(r,i)},a.defer-a.machine),a.diff&&s.on("put",p(r,{put:a.diff}))},t.on.get=function(e,n){var r=n._,i=e.get,o=i[y],s=r.graph[o],a=i[b],u,l=r.next||(r.next={}),c=l[o];if(!s)return r.on("get",e);if(a){if("string"!=typeof a||!h(s,a))return r.on("get",e);s=t.state.to(s,a)}else s=t.obj.copy(s);s=t.graph.node(s),u=(c||_).ack,r.on("in",{"@":e["#"],how:"mem",put:s,$:n}),r.on("get",e)}}(),t.chain.opt=function(e){e=e||{};var n=this,i=n._,o=e.peers||e;return f(e)||(e={}),f(i.opt)||(i.opt=e),u(o)&&(o=[o]),r(o)&&(o=d(o,function(e,t,n){n(e,{url:e})}),f(i.opt.peers)||(i.opt.peers={}),i.opt.peers=p(o,i.opt.peers)),i.opt.peers=i.opt.peers||{},p(e,i.opt),t.on("opt",i),i.opt.uuid=i.opt.uuid||function(){return g()+l(12)},n};var r=t.list.is,a=t.text,u=a.is,l=a.random,c=t.obj,f=c.is,h=c.has,p=c.to,d=c.map,m=c.copy,g=t.state.lex,y=t.val.link._,b=".",v=t.node._,w=t.val.link.is,_={},k;i.debug=function(e,t){return i.debug.i&&e===i.debug.i&&i.debug.i++&&(i.log.apply(i,arguments)||t)},t.log=function(){return!t.log.off&&i.log.apply(i,arguments),[].slice.call(arguments).join(" ")},t.log.once=function(e,n,r){return(r=t.log.once)[e]=r[e]||0,r[e]++||t.log(n)},t.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask StackOverflow questions tagged with 'gun'!"),"undefined"!=typeof window&&((window.GUN=window.Gun=t).window=window);try{void 0!==s&&(s.exports=t)}catch(e){}e.exports=t})(o,"./root"),o(function(e){var t=o("./root");t.chain.back=function(e,i){var o;if(e=e||1,-1===e||1/0===e)return this._.root.$;if(1===e)return(this._.back||this._).$;var s=this,a=s._;if("string"==typeof e&&(e=e.split(".")),e instanceof Array){for(var u=0,l=e.length,o=a;u<l;u++)o=(o||n)[e[u]];return r!==o?i?s:o:(o=a.back)?o.$.back(e,i):void 0}if(e instanceof Function){for(var c,o={back:a};(o=o.back)&&r===(c=e(o,i)););return c}return t.num.is(e)?(a.back||a).$.back(e-1):this};var n={},r})(o,"./back"),o(function(e){var t=o("./root");function n(e){var n,r,i=this.as,o=i.back,s=i.root,a;if(e.$||(e.$=i.$),this.to.next(e),r=e.get){if(i.lex&&(e.get=b(i.lex,e.get)),r["#"]||i.soul){if(r["#"]=r["#"]||i.soul,e["#"]||(e["#"]=w(9)),o=s.$.get(r["#"])._,r=r["."]){if(m(o.put,r)){if(n=o.$.get(r)._,(a=n.ack)||(n.ack=-1),o.on("in",{$:o.$,put:t.state.to(o.put,r),get:o.get}),a)return}else if("string"!=typeof r){var n={},u=(o.put||{})._;t.obj.map(o.put,function(e,i){t.text.match(i,r)&&(n[i]=e)}),t.obj.empty(n)||(n._=u,o.on("in",{$:o.$,put:n,get:o.get}))}}else{if(a=o.ack,a||(o.ack=-1),m(o,"put")&&o.on("in",o),a)return;e.$=o.$}return s.ask(f,e),s.on("in",e)}if(s.now&&(s.now[i.id]=s.now[i.id]||!0,i.pass={}),r["."])return i.get?(e={get:{".":i.get},$:i.$},o.ask||(o.ask={}),o.ask[i.get]=e.$._,o.on("out",e)):(e={get:{},$:i.$},o.on("out",e));if(i.ack=i.ack||-1,i.get)return e.$=i.$,r["."]=i.get,(o.ask||(o.ask={}))[i.get]=e.$._,o.on("out",e)}return o.on("out",e)}function r(e){var n=this,r=n.as,o=r.root,a=e.$,c=(a||h)._||h,f=e.put,d,g;if(r.get&&e.get!==r.get&&(e=b(e,{get:r.get})),r.has&&c!==r&&(e=b(e,{$:r.$}),c.ack&&(r.ack=c.ack)),p===f){if(g=c.put,n.to.next(e),r.soul)return;if(p===g&&p!==c.put)return;return s(r,e,n),r.has&&l(r,e),y(c.echo,r.id),void y(r.map,c.id)}if(r.soul)return n.to.next(e),s(r,e,n),void(r.next&&v(f,u,{msg:e,cat:r}));if(!(d=t.val.link.is(f)))return t.val.is(f)?(r.has||r.soul?l(r,e):(c.has||c.soul)&&((c.echo||(c.echo={}))[r.id]=c.echo[c.id]||r,(r.map||(r.map={}))[c.id]=r.map[c.id]||{at:c}),n.to.next(e),void s(r,e,n)):(r.has&&c!==r&&m(c,"put")&&(r.put=c.put),(d=t.node.soul(f))&&c.has&&(c.put=r.root.$.get(d)._.put),g=(o.stop||{})[c.id],n.to.next(e),i(r,e,c,d),s(r,e,n),void(r.next&&v(f,u,{msg:e,cat:r})));var w=o.stop;g=o.stop||{},g=g[c.id]||(g[c.id]={}),g.is=g.is||c.put,g[r.id]=c.put||!0,n.to.next(e),i(r,e,c,d),s(r,e,n)}function i(e,n,r,o){if(o&&k!==e.get){var s=e.root.$.get(o)._;e.has?r=s:r.has&&i(r,n,r,o),r!==e&&(r.$||(r={}),(r.echo||(r.echo={}))[e.id]=r.echo[e.id]||e,e.has&&!(e.map||h)[r.id]&&l(e,n),s=r.id?(e.map||(e.map={}))[r.id]=e.map[r.id]||{at:r}:{},(o!==s.link||s.pass||e.pass)&&(e.pass&&(t.obj.map(e.map,function(e){e.pass=!0}),y(e,"pass")),s.pass&&y(s,"pass"),e.has&&(e.link=o),c(e,s.link=o)))}}function s(e,t,n){e.echo&&v(e.echo,a,t)}function a(e){e&&e.on&&e.on("in",this)}function u(e,n){var r=this.cat,i=r.next||h,o=this.msg,s,a,u;(k!==n||i[n])&&(a=i[n])&&(a.has?(p!==a.put&&t.val.link.is(e)||(a.put=e),s=a.$):(u=o.$)&&(u=(s=o.$.get(n))._,p!==u.put&&t.val.link.is(e)||(u.put=e)),a.on("in",{put:e,get:n,$:s,via:o}))}function l(e,n){if(e.has||e.soul){var r=e.map,i=e.root;e.map=null,e.has&&(e.dub&&e.root.stop&&(e.dub=null),e.link=null),(e.pass||n["@"]||null!==r)&&(p===r&&t.val.link.is(e.put)||(v(r,function(t){(t=t.at)&&y(t.echo,e.id)}),r=e.put,v(e.next,function(t,n){if(p===r&&p!==e.put)return!0;t.put=p,t.ack&&(t.ack=-1),t.on("in",{get:n,$:t.$,put:p})})))}}function c(e,n){var r=e.root.$.get(n)._,i=e.lex;(!e.ack&&!i||((i=i||{})["#"]=n,r.on("out",{get:i}),e.ask))&&(r=e.ask,t.obj.del(e,"ask"),v(r||e.next,function(e,t){var r=e.lex||{};r["#"]=n,r["."]=r["."]||t,e.on("out",{get:r})}),t.obj.del(e,"ask"))}function f(e,n){var r=this.as,i=r.get||h,o=r.$._,s=(e.put||h)[i["#"]];if(o.ack&&(o.ack=o.ack+1||1),e.put&&("string"!=typeof i["."]||m(s,o.get)))k!=i["."]?t.on.put(e,o.root.$):o.on("in",{get:o.get,put:t.val.link.ify(i["#"]),$:o.$,"@":e["@"]});else{if(o.put!==p)return;o.on("in",{get:o.get,put:o.put=p,$:o.$,"@":e["@"]})}}t.chain.chain=function(e){var i=this,o=i._,s=new(e||i).constructor(i),a=s._,u;return a.root=u=o.root,a.id=++u.once,a.back=i._,a.on=t.on,a.on("in",r,a),a.on("out",n,a),s};var h={},p,d=t.obj,m=d.has,g=d.put,y=d.del,b=d.to,v=d.map,w=t.text.random,_=t.val.link._,k=t.node._})(o,"./chain"),o(function(e){var t=o("./root");function n(e,t){var n=t._,r=n.next,i=t.chain(),o=i._;return r||(r=n.next={}),r[o.get=e]=o,t===n.root.$?o.soul=e:(n.soul||n.has)&&(o.has=e),o}function r(e,t,n,r){var i=e._,o=0,s;return(s=i.soul||i.link||i.dub)?(t(s,r,i),e):(e.get(function(e,n){if(!(g===e.put&&(s=(u(i.root.opt.peers,function(e,t,n){n(t)})||[]).length)&&++o<s)){n.rid(e);var a=(a=e.$)&&a._||{};s=a.link||a.soul||h.is(e.put)||p(e.put)||a.dub,t(s,r,e,n)}},{out:{get:{".":!0}}}),e)}function i(e){var n=this,r=n.as,i=r.at,o=i.root,s=e.$,a=(s||{})._||{},u=e.put||a.put,l;if((l=o.now)&&n!==l[r.now])return n.to.next(e);if(n.seen&&a.id&&n.seen[a.id])return n.to.next(e);if((l=u)&&l[h._]&&(l=h.is(l))&&(l=(e.$$=a.root.gun.get(l))._,g!==l.put&&(e=c(e,{put:u=l.put}))),(l=o.mum)&&a.id){var f=a.id+(n.id||(n.id=t.text.random(9)));if(l[f])return;g===u||h.is(u)||(l[f]=!0)}r.use(e,n),n.stun?n.stun=null:n.to.next(e)}function s(e){var t=this.on;if(!e||t.soul||t.has)return this.off();if(e=(e=(e=e.$||e)._||e).id){var n=t.map,r,i;if(r=(i=this.seen||(this.seen={}))[e])return!0;i[e]=!0}}t.chain.get=function(e,o,u){var l,c;if("string"!=typeof e){if(e instanceof Function){if(!0===o)return r(this,e,o,u);l=this;var p=l._,d=p.root,c=d.now,g;u=o||{},u.at=p,u.use=e,u.out=u.out||{},u.out.get=u.out.get||{},(g=p.on("in",i,u)).rid=s,(d.now={$:1})[u.now=p.id]=g;var y=d.mum;return d.mum={},p.on("out",u.out),d.mum=y,d.now=c,l}return f(e)?this.get(""+e,o,u):(c=h.is(e))?this.get(c,o,u):a.is(e)?(l=this,(c=((c=e["#"])||m)["="]||c)&&(l=l.get(c)),l._.lex=e,l):((u=this.chain())._.err={err:t.log("Invalid get request!",e)},o&&o.call(u,u._.err),u)}var b=this,v=this._,w=v.next||m;return(l=w[e])||(l=n(e,this)),l=l.$,(c=this._.stun)&&(l._.stun=l._.stun||c),o&&o instanceof Function&&l.get(o,u),l};var a=t.obj,u=a.map,l=a.has,c=t.obj.to,f=t.num.is,h=t.val.link,p=t.node.soul,d=t.node._,m={},g})(o,"./get"),o(function(e){var t=o("./root");function n(e){e.batch=s;var n=e.opt||{},r=e.env=t.state.map(u,n.state);if(r.soul=e.soul,e.graph=t.graph.ify(e.data,r,e),r.err)return(e.ack||b).call(e,e.out={err:t.log(r.err)}),void(e.res&&e.res());e.batch()}function r(e){var t;e&&e()}function s(){var e=this;e.graph&&!m(e.stun,a)&&(e.res=e.res||function(e){e&&e()},e.res(function(){var n=e.$.back(-1)._,r=n.ask(function(r){n.root.on("ack",r),r.err&&t.log(r),r.lack||this.off(),e.ack&&e.ack(r,this)},e.opt),i=n.root.now;h.del(n.root,"now");var o=n.root.mum;n.root.mum={},e.ref._.on("out",{$:e.ref,put:e.out=e.env.graph,opt:e.opt,"#":r}),n.root.mum=o?h.to(o,n.root.mum):o,n.root.now=i},e),e.res&&e.res())}function a(e,t){if(e)return!0}function u(e,n,r,i){var o=this,s=t.is(e);!n&&i.path.length&&(o.res||v)(function(){for(var n=i.path,r=o.ref,a=o.opt,u=0,c=n.length;u<c;u++)r=r.get(n[u]);s&&(r=e);var f=r._.dub;if(f||(f=t.node.soul(i.obj)))return r.back(-1).get(f),void i.soul(f);(o.stun=o.stun||{})[n]=!0,r.get(l,!0,{as:{at:i,as:o,p:n}})},{as:o,at:i})}function l(e,n,r,i){var n=n.as,o=n.at;n=n.as;var s=((r||{}).$||{})._||{};e=s.dub=s.dub||e||t.node.soul(o.obj)||t.node.soul(r.put||s.put)||t.val.link.is(r.put||s.put)||(n.via.back("opt.uuid")||t.text.random)(),i&&(i.stun=!0),e?c(s,s.dub=e,o,n):s.via.back("opt.uuid")(function(e,r){if(e)return t.log(e);c(s,s.dub=s.dub||r,o,n)})}function c(e,t,n,r){e.$.back(-1).get(t),n.soul(t),r.stun[n.path]=!1,r.batch()}function f(e,n,r,o){if(n=n.as,r.$&&r.$._)if(r.err)i.log("Please report this as an issue! Put.any.err");else{var s=r.$._,a=s.put,u=n.opt||{},l,c;if(!(c=n.ref)||!c._.now){if(o&&(o.stun=!0),n.ref!==n.$){if(c=n.$._.get||s.get,!c)return void i.log("Please report this as an issue! Put.no.get");n.data=d({},c,n.data),c=null}if(g===a){if(!s.get)return;e||(c=s.$.back(function(e){if(e.link||e.soul)return e.link||e.soul;n.data=d({},e.get,n.data)})),c=c||s.soul||s.link||s.dub,s=c?s.root.$.get(c)._:s,n.soul=c,a=n.data}n.not||(n.soul=n.soul||e)||(n.path&&p(n.data)?n.soul=(u.uuid||n.via.back("opt.uuid")||t.text.random)():(w==s.get&&(n.soul=(s.put||y)["#"]||s.dub),n.soul=n.soul||s.soul||s.link||(u.uuid||n.via.back("opt.uuid")||t.text.random)()),n.soul)?n.ref.put(n.data,n.soul,n):n.via.back("opt.uuid")(function(e,r){if(e)return t.log(e);n.ref.put(n.data,n.soul=r,n)})}}}t.chain.put=function(e,i,o){var s=this,a=s._,u=a.root.$,l=u._,c=100,h;if(!l.puta)if(h=l.puts){if(h>c){if((l.stack||(l.stack=[])).push([s,e,i,o]),l.puto)return;return l.puto=setTimeout(function e(){var t=l.stack.splice(0,c),n=0,r;for(l.puta=!0;r=t[n++];)r[0].put(r[1],r[2],r[3]);if(delete l.puta,l.stack.length)return l.puto=setTimeout(e,0);l.stack=l.puts=l.puto=null},0),s}++l.puts}else l.puts=1;return o=o||{},o.data=e,o.via=o.$=o.via||o.$||s,"string"==typeof i?o.soul=i:o.ack=o.ack||i,a.soul&&(o.soul=a.soul),o.soul||u===s?p(o.data)?(o.soul=o.soul||(o.not=t.node.soul(o.data)||(o.via.back("opt.uuid")||t.text.random)()),o.soul?(o.$=u.get(o.soul),o.ref=o.$,n(o),s):(o.via.back("opt.uuid")(function(e,n){if(e)return t.log(e);(o.ref||o.$).put(o.data,o.soul=n,o)}),s)):((o.ack||b).call(o,o.out={err:t.log("Data saved to the root level of the graph must be a node (an object), not a",typeof o.data,'of "'+o.data+'"!')}),o.res&&o.res(),s):t.is(e)?(e.get(function(e,n,r){if(!e)return t.log("The reference you are saving is a",typeof r.put,'"'+r.put+'", not a node (object)!');s.put(t.val.link.ify(e),i,o)},!0),s):(a.has&&(h=t.val.link.is(e))&&(a.dub=h),o.ref=o.ref||u._===(h=a.back)?s:h.$,o.ref._.soul&&t.val.is(o.data)&&a.get?(o.data=d({},a.get,o.data),o.ref.put(o.data,o.soul,o),s):(o.ref.get(f,!0,{as:o}),o.out||(o.res=o.res||r,o.$._.stun=o.ref._.stun),s))};var h=t.obj,p=h.is,d=h.put,m=h.map,g,y={},b=function(){},v=function(e,t){e.call(t||y)},w=t.node._})(o,"./put"),o(function(e){var t=o("./root");o("./chain"),o("./back"),o("./put"),o("./get"),e.exports=t})(o,"./index"),o(function(e){var t=o("./index");function n(e,t){var n=this,r=e.$,i=(r||{})._||{},o=i.put||e.put,s=n.at,a;if(h!==o){if(a=e.$$){if(a=e.$$._,h===a.put)return;o=a.put}n.change&&(o=e.put),n.as?n.ok.call(n.as,e,t):n.ok.call(r,o,e.get,e,t)}}function r(e,n,i){if(e.$){var o=this.as,a=o.at,u=e.$,l=u._,f=l.put||e.put,p,d;(d=e.$$)&&(p=d=e.$$._,h!==p.put&&(f=p.put)),(d=n.wait)&&(d=d[l.id])&&clearTimeout(d),!i&&(h===f||l.soul||l.link||p&&!(0<p.ack))||h===f&&(d=(s(l.root.opt.peers,function(e,t,n){n(t)})||[]).length)&&!i&&(p||l).ack<=d?d=(n.wait={})[l.id]=setTimeout(function(){r.call({as:o},e,n,d||1)},o.wait||99):(p&&h===p.put&&(d=c.is(f))&&(f=t.node.ify({},d)),n.rid(e),o.ok.call(u||o.$,f,e.get))}else n.off()}t.chain.on=function(e,t,r,i){var o=this,s=o._,a,u,l;if("string"==typeof e)return t?(u=s.on(e,t,r||s,i),r&&r.$&&(r.subs||(r.subs=[])).push(u),o):s.on(e);var c=t;return c=!0===c?{change:!0}:c||{},c.at=s,c.ok=e,o.get(n,c),o},t.chain.val=function(e,n){return t.log.once("onceval","Future Breaking API Change: .val -> .once, apologies unexpected."),this.once(e,n)},t.chain.once=function(e,n){var i=this,o=i._,s=o.put;if(0<o.ack&&h!==s)return(e||f).call(i,s,o.get),i;if(!e){t.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it.");var a=i.chain();return a._.nix=i.once(function(){a._.on("in",i._)}),a}return(n=n||{}).ok=e,n.at=o,n.out={"#":t.text.random(9)},i.get(r,{as:n}),n.async=!0,i},t.chain.off=function(){var e=this,t=e._,n,r=t.back;if(r)return(n=r.next)&&n[t.get]&&u(n,t.get),(n=r.ask)&&u(n,t.get),(n=r.put)&&u(n,t.get),(n=t.soul)&&u(r.root.graph,n),(n=t.map)&&s(n,function(e){e.link&&r.root.$.get(e.link).off()}),(n=t.next)&&s(n,function(e){e.$.off()}),t.on("off",{}),e};var i=t.obj,s=i.map,a=i.has,u=i.del,l=i.to,c=t.val.link,f=function(){},h})(o,"./on"),o(function(e){var t=o("./index");function n(e){if(!e.put||t.val.is(e.put))return this.to.next(e);this.as.nix&&this.off(),i(e.put,r,{at:this.as,msg:e}),this.to.next(e)}function r(e,n){if(l!==n){var r=this.msg,i=r.$,o=i._,s=this.at,a=o.lex;a&&!t.text.match(n,a["."]||a["#"]||a)||(((a=i.get(n)._).echo||(a.echo={}))[s.id]=a.echo[s.id]||s)}}t.chain.map=function(e,r,i){var o=this,a=o._,u;return e?(t.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),u=o.chain(),o.map().on(function(n,r,i,o){var a=(e||s).call(this,n,r,i,o);if(c!==a)return n===a?u._.on("in",i):t.is(a)?u._.on("in",a._):void u._.on("in",{get:r,put:a})}),u):(u=a.each)?u:(a.each=u=o.chain(),u._.nix=o.back("nix"),o.on("in",n,u._),u)};var i=t.obj.map,s=function(){},a=s,u=s,l=t.node._,c})(o,"./map"),o(function(e){var t=o("./index");t.chain.set=function(e,n,r){var i=this,o;return n=n||function(){},r=r||{},r.item=r.item||e,(o=t.node.soul(e))&&(e=t.obj.put({},o,t.val.link.ify(o))),t.is(e)?(e.get(function(e,o,s){if(!e)return n.call(i,{err:t.log('Only a node can be linked! Not "'+s.put+'"!')});i.put(t.obj.put({},e,t.val.link.ify(e)),n,r)},!0),e):(t.obj.is(e)&&(e=i.back(-1).get(o=o||t.node.soul(e)||i.back("opt.uuid")()).put(e)),i.get(o||t.state.lex()+t.text.random(7)).put(e,n,r))}})(o,"./set"),o(function(e){if("undefined"!=typeof Gun){var t,n=function(){},r,o;try{r=(Gun.window||n).localStorage}catch(e){}r||(i.log("Warning: No localStorage exists to persist data to!"),r={setItem:function(e,t){this[e]=t},removeItem:function(e){delete this[e]},getItem:function(e){return this[e]}}),Gun.on("create",function(e){var t=this.to,n=e.opt;if(e.once)return t.next(e);n.prefix=n.file||"gun/";var i=Gun.obj.ify(r.getItem("gap/"+n.prefix))||{},o=Gun.obj.empty,s,a,u;if(!o(i)){var l=Gun.obj.ify(r.getItem(n.prefix))||{},c={};Gun.obj.map(i,function(e,t){Gun.obj.map(e,function(e,n){c[t]=Gun.state.to(l[t],n,c[t])})}),setTimeout(function(){e.on("out",{put:c,"#":e.ask(f)})},1)}function f(e){if(!e.err&&e.ok){var t=e["@"];setTimeout(function(){Gun.obj.map(i,function(e,n){Gun.obj.map(e,function(n,r){t===n&&delete e[r]}),o(e)&&delete i[n]}),p()},n.wait||1)}}e.on("out",function(e){e.lS||(Gun.is(e.$)&&e.put&&!e["@"]&&!o(n.peers)&&(s=e["#"],Gun.graph.is(e.put,null,h),a||(a=setTimeout(p,n.wait||1))),this.to.next(e))}),e.on("ack",f),t.next(e);var h=function(e,t,n,r){(i[r]||(i[r]={}))[t]=s},p=function(){clearTimeout(a),a=!1;try{r.setItem("gap/"+n.prefix,JSON.stringify(i))}catch(e){Gun.log(err=e||"localStorage failure")}}}),Gun.on("create",function(e){this.to.next(e);var t=e.opt;if(!e.once&&!1!==t.localStorage){t.prefix=t.file||"gun/";var n=e.graph,i={},o=0,s,a=Gun.obj.ify(r.getItem(t.prefix))||{},u=function(){},l;e.on("localStorage",a),e.on("put",function(e){if(this.to.next(e),Gun.graph.is(e.put,null,c),e["@"]||(i[e["#"]]=!0),o+=1,o>=(t.batch||1e3))return f();s||(s=setTimeout(f,t.wait||1))}),e.on("get",function(n){this.to.next(n);var r=n.get,i,o,s;function u(){if(r&&(i=r["#"])){var u=r["."];o=a[i]||s,o&&u&&(o=Gun.state.to(o,u)),(o||Gun.obj.empty(t.peers))&&e.on("in",{"@":n["#"],put:Gun.graph.node(o),how:"lS",lS:n.$||e.$})}}Gun.debug?setTimeout(u,1):u()});var c=function(e,t,n,r){a[r]=Gun.state.to(n,t,a[r])},f=function(n){var u;o=0,clearTimeout(s),s=!1;var l=i;i={},n&&(a=n);try{r.setItem(t.prefix,JSON.stringify(a))}catch(n){Gun.log(u=(n||"localStorage failure")+" Consider using GUN's IndexedDB plugin for RAD for more storage space, temporary example at https://github.com/amark/gun/blob/master/test/tmp/indexedDB.html ."),e.on("localStorage:error",{err:u,file:t.prefix,flush:a,retry:f})}(u||Gun.obj.empty(t.peers))&&Gun.obj.map(l,function(t,n){e.on("in",{"@":n,err:u,ok:0})})}}})}})(o,"./adapters/localStorage"),o(function(e){var t=o("../index"),n=o("../type");function r(e){var o=function(){},u=e.opt||{};u.log=u.log||i.log,u.gap=u.gap||u.wait||1,u.pack=u.pack||.3*(u.memory?1e3*u.memory*1e3:1399e6),o.out=function(n){var r;if(this.to&&this.to.next(n),(r=n["@"])&&(r=e.dup.s[r])&&(r=r.it)&&r._)return o.say(n,r._.via,1),void(r["##"]=n["##"]);t.AXE?t.AXE.say(n,o.say,this):o.say(n)},e.on("create",function(t){t.opt.pid=t.opt.pid||n.text.random(9),this.to.next(t),e.on("out",o.out)}),o.hear=function(t,r){if(t){var i=e.dup,s,a,c,f=t[0];if(u.pack<=t.length)return o.say({dam:"!",err:"Message too big!"},r);if("{"===f){try{c=JSON.parse(t)}catch(e){u.log("DAM JSON parse error",e)}if(!c)return;if(i.check(s=c["#"]))return;if(i.track(s,!0).it=c,(f=c["@"])&&c.put&&(a=c["##"]||(c["##"]=o.hash(c)),(f+=a)!=s)){if(i.check(f))return;(f=i.s)[a]=f[s]}return(c._=function(){}).via=r,(f=c["><"])&&(c._.to=n.obj.map(f.split(","),l)),c.dam?void((f=o.hear[c.dam])&&f(c,r,e)):void e.on("in",c)}if("["!==f);else{try{c=JSON.parse(t)}catch(e){u.log("DAM JSON parse error",e)}if(!c)return;for(var h=0,p;p=c[h++];)o.hear(p,r)}}};var l=function(e,t,n){n(e,!0)};return function(){function t(e){var t=e.batch;if(t&&(e.batch=e.tail=null,t.length))try{r(JSON.stringify(t),e)}catch(e){u.log("DAM JSON stringify error",e)}}function r(e,t){var n=t.wire;try{t.say?t.say(e):n.send&&n.send(e)}catch(n){(t.queue=t.queue||[]).push(e)}}o.say=function(i,a,l){if(a){var c,f=a.wire||u.wire&&u.wire(a),h,p;if(f&&(h=i._||s,a!==h.via&&((p=h.raw)||(p=o.raw(i)),!((c=i["@"])&&(c=e.dup.s[c])&&(c=c.it)&&c.get&&c["##"]&&c["##"]===i["##"])&&(!(c=h.to)||!c[a.url]&&!c[a.id]||l)))){if(a.batch){if(a.tail=(a.tail||0)+p.length,a.tail<=u.pack)return void a.batch.push(p);t(a)}a.batch=[],setTimeout(function(){t(a)},u.gap),r(p,a)}}else n.obj.map(u.peers,function(e){o.say(i,e)})}}(),function(){function t(e,t){var r;return t instanceof Object?(n.obj.map(Object.keys(t).sort(),i,{to:r={},on:t}),r):t}function i(e){this.to[e]=this.on[e]}o.raw=function(r){if(!r)return"";var i=e.dup,c=r._||{},f,h,p;if(p=c.raw)return p;if("string"==typeof r)return r;r["@"]&&(p=r.put)&&((h=r["##"])||(f=s(p,t)||"",h=o.hash(r,f),r["##"]=h),(p=i.s)[h=r["@"]+h]=p[r["#"]],r["#"]=h||r["#"],f&&((r=n.obj.to(r)).put=l));var d=0,m=[];n.obj.map(u.peers,function(e){if(m.push(e.url||e.id),++d>9)return!0}),r["><"]=m.join();var g=s(r);return a!==f&&(p=g.indexOf(l,g.indexOf("put")),g=g.slice(0,p-1)+f+g.slice(p+l.length+1)),c&&(c.raw=g),g},o.hash=function(e,i){return r.hash(i||s(e.put,t)||"")||e["#"]||n.text.random(9)};var s=JSON.stringify,l=":])([:"}(),o.hi=function(t){var r=t.wire||{};t.id||t.url?(n.obj.del(u.peers,r.pid),u.peers[t.url||t.id]=t):(r=t.id=t.id||n.text.random(9),o.say({dam:"?"},u.peers[r]=t)),r.hied||e.on(r.hied="hi",t),r=t.queue,t.queue=[],n.obj.map(r,function(e){o.say(e,t)})},o.bye=function(t){n.obj.del(u.peers,t.id),e.on("bye",t)},o.hear["!"]=function(e,t){u.log("Error:",e.err)},o.hear["?"]=function(e,t){e.pid?t.wire&&(t.wire.pid||(t.id=t.wire.pid=e.pid,o.hi(t))):o.say({dam:"?",pid:u.pid,"@":e["#"]},t)},o}r.hash=function(e){if("string"!=typeof e)return{err:1};var t=0;if(!e.length)return t;for(var n=0,r=e.length,i;n<r;++n)i=e.charCodeAt(n),t=(t<<5)-t+i,t|=0;return t};var s={},a;Object.keys=Object.keys||function(e){return map(e,function(e,t,n){n(t)})};try{e.exports=r}catch(e){}})(o,"./adapters/mesh"),o(function(t){var n=o("../index");n.Mesh=o("./mesh"),n.on("opt",function(t){this.to.next(t);var r=t.opt;if(!t.once&&!1!==r.WebSocket){var i;"undefined"!=typeof window&&(i=window),void 0!==e&&(i=e),i=i||{};var o=r.WebSocket||i.WebSocket||i.webkitWebSocket||i.mozWebSocket;if(o){r.WebSocket=o;var s=r.mesh=r.mesh||n.Mesh(t),a=r.wire;r.wire=u}}function u(e){try{if(!e||!e.url)return n&&n(e);var t=e.url.replace("http","ws"),n=e.wire=new r.WebSocket(t);return n.onclose=function(){r.mesh.bye(e),l(e)},n.onerror=function(t){l(e),t&&t.code},n.onopen=function(){r.mesh.hi(e)},n.onmessage=function(t){t&&r.mesh.hear(t.data||t,e)},n}catch(e){}}function l(e){clearTimeout(e.defer),e.defer=setTimeout(function(){u(e)},2e3)}});var r=function(){}})(o,"./adapters/websocket")}()}).call(this,n(8),n(75)(e))},function(e,t,n){"use strict";t.decode=t.parse=n(739),t.encode=t.stringify=n(740)},function(e,t,n){const r=n(97);utils={},utils.consolearr=(e=>e&&e.length>0?[e.length+" items inc:",e[e.length-1]]:e),utils.stringfrom=function(e,t={}){try{return"Url"===e.constructor.name?e.href:"string"==typeof e?e:e.toString()}catch(t){throw new r.CodingError(`Unable to turn ${e} into a string ${t.message}`)}},utils.p_timeout=function(e,t,n){let i=null;return Promise.race([new Promise((e,o)=>{i=setTimeout(o,t,new r.TimeoutError(n||`Timed out in ${t}ms`))}),e.then(e=>(clearTimeout(i),e))])},utils.createElement=function(e,t,n){var r=document.createElement(e);for(let e in t){let n="classname"===e.toLowerCase()?"class":e;if("dangerouslySetInnerHTML"===e&&(r.innerHTML=t[e].__html,delete t.dangerouslySetInnerHTML),t.hasOwnProperty(e)){let i=t[e];if(!0===i)r.setAttribute(n,e);else if("object"!=typeof i||Array.isArray(i))!1!==i&&null!=i&&r.setAttribute(n,i.toString());else if(["style"].includes(n))for(let e in i)r[n][e]=i[e];else r[n]=i}}for(let e=2;e<arguments.length;e++){let t=arguments[e];t&&(Array.isArray(t)?t.map(e=>r.appendChild(null==e.nodeType?document.createTextNode(e.toString()):e)):r.appendChild(null==t.nodeType?document.createTextNode(t.toString()):t))}return r},t=e.exports=utils},function(e,t,n){var r=n(172),i=n(290);function o(e){return null!=e&&i(e.length)&&!r(e)}e.exports=o},function(e,t,n){var r=n(131),i=n(215),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";function l(e){if(!i(e))return!1;var t=r(e);return t==s||t==a||t==o||t==u}e.exports=l},function(e,t,n){var r=n(98),i=r.Symbol;e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(214),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(t,n,r){return e(i.default,t,(0,s.default)(n),r)}}e.exports=t.default},function(e,t,n){"use strict";(function(e){t.protobuf=e.from("50","hex"),t.cbor=e.from("51","hex"),t.rlp=e.from("60","hex"),t.bencode=e.from("63","hex"),t.multicodec=e.from("30","hex"),t.multihash=e.from("31","hex"),t.multiaddr=e.from("32","hex"),t.multibase=e.from("33","hex"),t.identity=e.from("00","hex"),t.sha1=e.from("11","hex"),t["sha2-256"]=e.from("12","hex"),t["sha2-512"]=e.from("13","hex"),t["sha3-512"]=e.from("14","hex"),t["sha3-384"]=e.from("15","hex"),t["sha3-256"]=e.from("16","hex"),t["sha3-224"]=e.from("17","hex"),t["shake-128"]=e.from("18","hex"),t["shake-256"]=e.from("19","hex"),t["keccak-224"]=e.from("1a","hex"),t["keccak-256"]=e.from("1b","hex"),t["keccak-384"]=e.from("1c","hex"),t["keccak-512"]=e.from("1d","hex"),t["murmur3-128"]=e.from("22","hex"),t["murmur3-32"]=e.from("23","hex"),t["dbl-sha2-256"]=e.from("56","hex"),t.md4=e.from("d4","hex"),t.md5=e.from("d5","hex"),t.bmt=e.from("d6","hex"),t.x11=e.from("1100","hex"),t["blake2b-8"]=e.from("b201","hex"),t["blake2b-16"]=e.from("b202","hex"),t["blake2b-24"]=e.from("b203","hex"),t["blake2b-32"]=e.from("b204","hex"),t["blake2b-40"]=e.from("b205","hex"),t["blake2b-48"]=e.from("b206","hex"),t["blake2b-56"]=e.from("b207","hex"),t["blake2b-64"]=e.from("b208","hex"),t["blake2b-72"]=e.from("b209","hex"),t["blake2b-80"]=e.from("b20a","hex"),t["blake2b-88"]=e.from("b20b","hex"),t["blake2b-96"]=e.from("b20c","hex"),t["blake2b-104"]=e.from("b20d","hex"),t["blake2b-112"]=e.from("b20e","hex"),t["blake2b-120"]=e.from("b20f","hex"),t["blake2b-128"]=e.from("b210","hex"),t["blake2b-136"]=e.from("b211","hex"),t["blake2b-144"]=e.from("b212","hex"),t["blake2b-152"]=e.from("b213","hex"),t["blake2b-160"]=e.from("b214","hex"),t["blake2b-168"]=e.from("b215","hex"),t["blake2b-176"]=e.from("b216","hex"),t["blake2b-184"]=e.from("b217","hex"),t["blake2b-192"]=e.from("b218","hex"),t["blake2b-200"]=e.from("b219","hex"),t["blake2b-208"]=e.from("b21a","hex"),t["blake2b-216"]=e.from("b21b","hex"),t["blake2b-224"]=e.from("b21c","hex"),t["blake2b-232"]=e.from("b21d","hex"),t["blake2b-240"]=e.from("b21e","hex"),t["blake2b-248"]=e.from("b21f","hex"),t["blake2b-256"]=e.from("b220","hex"),t["blake2b-264"]=e.from("b221","hex"),t["blake2b-272"]=e.from("b222","hex"),t["blake2b-280"]=e.from("b223","hex"),t["blake2b-288"]=e.from("b224","hex"),t["blake2b-296"]=e.from("b225","hex"),t["blake2b-304"]=e.from("b226","hex"),t["blake2b-312"]=e.from("b227","hex"),t["blake2b-320"]=e.from("b228","hex"),t["blake2b-328"]=e.from("b229","hex"),t["blake2b-336"]=e.from("b22a","hex"),t["blake2b-344"]=e.from("b22b","hex"),t["blake2b-352"]=e.from("b22c","hex"),t["blake2b-360"]=e.from("b22d","hex"),t["blake2b-368"]=e.from("b22e","hex"),t["blake2b-376"]=e.from("b22f","hex"),t["blake2b-384"]=e.from("b230","hex"),t["blake2b-392"]=e.from("b231","hex"),t["blake2b-400"]=e.from("b232","hex"),t["blake2b-408"]=e.from("b233","hex"),t["blake2b-416"]=e.from("b234","hex"),t["blake2b-424"]=e.from("b235","hex"),t["blake2b-432"]=e.from("b236","hex"),t["blake2b-440"]=e.from("b237","hex"),t["blake2b-448"]=e.from("b238","hex"),t["blake2b-456"]=e.from("b239","hex"),t["blake2b-464"]=e.from("b23a","hex"),t["blake2b-472"]=e.from("b23b","hex"),t["blake2b-480"]=e.from("b23c","hex"),t["blake2b-488"]=e.from("b23d","hex"),t["blake2b-496"]=e.from("b23e","hex"),t["blake2b-504"]=e.from("b23f","hex"),t["blake2b-512"]=e.from("b240","hex"),t["blake2s-8"]=e.from("b241","hex"),t["blake2s-16"]=e.from("b242","hex"),t["blake2s-24"]=e.from("b243","hex"),t["blake2s-32"]=e.from("b244","hex"),t["blake2s-40"]=e.from("b245","hex"),t["blake2s-48"]=e.from("b246","hex"),t["blake2s-56"]=e.from("b247","hex"),t["blake2s-64"]=e.from("b248","hex"),t["blake2s-72"]=e.from("b249","hex"),t["blake2s-80"]=e.from("b24a","hex"),t["blake2s-88"]=e.from("b24b","hex"),t["blake2s-96"]=e.from("b24c","hex"),t["blake2s-104"]=e.from("b24d","hex"),t["blake2s-112"]=e.from("b24e","hex"),t["blake2s-120"]=e.from("b24f","hex"),t["blake2s-128"]=e.from("b250","hex"),t["blake2s-136"]=e.from("b251","hex"),t["blake2s-144"]=e.from("b252","hex"),t["blake2s-152"]=e.from("b253","hex"),t["blake2s-160"]=e.from("b254","hex"),t["blake2s-168"]=e.from("b255","hex"),t["blake2s-176"]=e.from("b256","hex"),t["blake2s-184"]=e.from("b257","hex"),t["blake2s-192"]=e.from("b258","hex"),t["blake2s-200"]=e.from("b259","hex"),t["blake2s-208"]=e.from("b25a","hex"),t["blake2s-216"]=e.from("b25b","hex"),t["blake2s-224"]=e.from("b25c","hex"),t["blake2s-232"]=e.from("b25d","hex"),t["blake2s-240"]=e.from("b25e","hex"),t["blake2s-248"]=e.from("b25f","hex"),t["blake2s-256"]=e.from("b260","hex"),t["skein256-8"]=e.from("b301","hex"),t["skein256-16"]=e.from("b302","hex"),t["skein256-24"]=e.from("b303","hex"),t["skein256-32"]=e.from("b304","hex"),t["skein256-40"]=e.from("b305","hex"),t["skein256-48"]=e.from("b306","hex"),t["skein256-56"]=e.from("b307","hex"),t["skein256-64"]=e.from("b308","hex"),t["skein256-72"]=e.from("b309","hex"),t["skein256-80"]=e.from("b30a","hex"),t["skein256-88"]=e.from("b30b","hex"),t["skein256-96"]=e.from("b30c","hex"),t["skein256-104"]=e.from("b30d","hex"),t["skein256-112"]=e.from("b30e","hex"),t["skein256-120"]=e.from("b30f","hex"),t["skein256-128"]=e.from("b310","hex"),t["skein256-136"]=e.from("b311","hex"),t["skein256-144"]=e.from("b312","hex"),t["skein256-152"]=e.from("b313","hex"),t["skein256-160"]=e.from("b314","hex"),t["skein256-168"]=e.from("b315","hex"),t["skein256-176"]=e.from("b316","hex"),t["skein256-184"]=e.from("b317","hex"),t["skein256-192"]=e.from("b318","hex"),t["skein256-200"]=e.from("b319","hex"),t["skein256-208"]=e.from("b31a","hex"),t["skein256-216"]=e.from("b31b","hex"),t["skein256-224"]=e.from("b31c","hex"),t["skein256-232"]=e.from("b31d","hex"),t["skein256-240"]=e.from("b31e","hex"),t["skein256-248"]=e.from("b31f","hex"),t["skein256-256"]=e.from("b320","hex"),t["skein512-8"]=e.from("b321","hex"),t["skein512-16"]=e.from("b322","hex"),t["skein512-24"]=e.from("b323","hex"),t["skein512-32"]=e.from("b324","hex"),t["skein512-40"]=e.from("b325","hex"),t["skein512-48"]=e.from("b326","hex"),t["skein512-56"]=e.from("b327","hex"),t["skein512-64"]=e.from("b328","hex"),t["skein512-72"]=e.from("b329","hex"),t["skein512-80"]=e.from("b32a","hex"),t["skein512-88"]=e.from("b32b","hex"),t["skein512-96"]=e.from("b32c","hex"),t["skein512-104"]=e.from("b32d","hex"),t["skein512-112"]=e.from("b32e","hex"),t["skein512-120"]=e.from("b32f","hex"),t["skein512-128"]=e.from("b330","hex"),t["skein512-136"]=e.from("b331","hex"),t["skein512-144"]=e.from("b332","hex"),t["skein512-152"]=e.from("b333","hex"),t["skein512-160"]=e.from("b334","hex"),t["skein512-168"]=e.from("b335","hex"),t["skein512-176"]=e.from("b336","hex"),t["skein512-184"]=e.from("b337","hex"),t["skein512-192"]=e.from("b338","hex"),t["skein512-200"]=e.from("b339","hex"),t["skein512-208"]=e.from("b33a","hex"),t["skein512-216"]=e.from("b33b","hex"),t["skein512-224"]=e.from("b33c","hex"),t["skein512-232"]=e.from("b33d","hex"),t["skein512-240"]=e.from("b33e","hex"),t["skein512-248"]=e.from("b33f","hex"),t["skein512-256"]=e.from("b340","hex"),t["skein512-264"]=e.from("b341","hex"),t["skein512-272"]=e.from("b342","hex"),t["skein512-280"]=e.from("b343","hex"),t["skein512-288"]=e.from("b344","hex"),t["skein512-296"]=e.from("b345","hex"),t["skein512-304"]=e.from("b346","hex"),t["skein512-312"]=e.from("b347","hex"),t["skein512-320"]=e.from("b348","hex"),t["skein512-328"]=e.from("b349","hex"),t["skein512-336"]=e.from("b34a","hex"),t["skein512-344"]=e.from("b34b","hex"),t["skein512-352"]=e.from("b34c","hex"),t["skein512-360"]=e.from("b34d","hex"),t["skein512-368"]=e.from("b34e","hex"),t["skein512-376"]=e.from("b34f","hex"),t["skein512-384"]=e.from("b350","hex"),t["skein512-392"]=e.from("b351","hex"),t["skein512-400"]=e.from("b352","hex"),t["skein512-408"]=e.from("b353","hex"),t["skein512-416"]=e.from("b354","hex"),t["skein512-424"]=e.from("b355","hex"),t["skein512-432"]=e.from("b356","hex"),t["skein512-440"]=e.from("b357","hex"),t["skein512-448"]=e.from("b358","hex"),t["skein512-456"]=e.from("b359","hex"),t["skein512-464"]=e.from("b35a","hex"),t["skein512-472"]=e.from("b35b","hex"),t["skein512-480"]=e.from("b35c","hex"),t["skein512-488"]=e.from("b35d","hex"),t["skein512-496"]=e.from("b35e","hex"),t["skein512-504"]=e.from("b35f","hex"),t["skein512-512"]=e.from("b360","hex"),t["skein1024-8"]=e.from("b361","hex"),t["skein1024-16"]=e.from("b362","hex"),t["skein1024-24"]=e.from("b363","hex"),t["skein1024-32"]=e.from("b364","hex"),t["skein1024-40"]=e.from("b365","hex"),t["skein1024-48"]=e.from("b366","hex"),t["skein1024-56"]=e.from("b367","hex"),t["skein1024-64"]=e.from("b368","hex"),t["skein1024-72"]=e.from("b369","hex"),t["skein1024-80"]=e.from("b36a","hex"),t["skein1024-88"]=e.from("b36b","hex"),t["skein1024-96"]=e.from("b36c","hex"),t["skein1024-104"]=e.from("b36d","hex"),t["skein1024-112"]=e.from("b36e","hex"),t["skein1024-120"]=e.from("b36f","hex"),t["skein1024-128"]=e.from("b370","hex"),t["skein1024-136"]=e.from("b371","hex"),t["skein1024-144"]=e.from("b372","hex"),t["skein1024-152"]=e.from("b373","hex"),t["skein1024-160"]=e.from("b374","hex"),t["skein1024-168"]=e.from("b375","hex"),t["skein1024-176"]=e.from("b376","hex"),t["skein1024-184"]=e.from("b377","hex"),t["skein1024-192"]=e.from("b378","hex"),t["skein1024-200"]=e.from("b379","hex"),t["skein1024-208"]=e.from("b37a","hex"),t["skein1024-216"]=e.from("b37b","hex"),t["skein1024-224"]=e.from("b37c","hex"),t["skein1024-232"]=e.from("b37d","hex"),t["skein1024-240"]=e.from("b37e","hex"),t["skein1024-248"]=e.from("b37f","hex"),t["skein1024-256"]=e.from("b380","hex"),t["skein1024-264"]=e.from("b381","hex"),t["skein1024-272"]=e.from("b382","hex"),t["skein1024-280"]=e.from("b383","hex"),t["skein1024-288"]=e.from("b384","hex"),t["skein1024-296"]=e.from("b385","hex"),t["skein1024-304"]=e.from("b386","hex"),t["skein1024-312"]=e.from("b387","hex"),t["skein1024-320"]=e.from("b388","hex"),t["skein1024-328"]=e.from("b389","hex"),t["skein1024-336"]=e.from("b38a","hex"),t["skein1024-344"]=e.from("b38b","hex"),t["skein1024-352"]=e.from("b38c","hex"),t["skein1024-360"]=e.from("b38d","hex"),t["skein1024-368"]=e.from("b38e","hex"),t["skein1024-376"]=e.from("b38f","hex"),t["skein1024-384"]=e.from("b390","hex"),t["skein1024-392"]=e.from("b391","hex"),t["skein1024-400"]=e.from("b392","hex"),t["skein1024-408"]=e.from("b393","hex"),t["skein1024-416"]=e.from("b394","hex"),t["skein1024-424"]=e.from("b395","hex"),t["skein1024-432"]=e.from("b396","hex"),t["skein1024-440"]=e.from("b397","hex"),t["skein1024-448"]=e.from("b398","hex"),t["skein1024-456"]=e.from("b399","hex"),t["skein1024-464"]=e.from("b39a","hex"),t["skein1024-472"]=e.from("b39b","hex"),t["skein1024-480"]=e.from("b39c","hex"),t["skein1024-488"]=e.from("b39d","hex"),t["skein1024-496"]=e.from("b39e","hex"),t["skein1024-504"]=e.from("b39f","hex"),t["skein1024-512"]=e.from("b3a0","hex"),t["skein1024-520"]=e.from("b3a1","hex"),t["skein1024-528"]=e.from("b3a2","hex"),t["skein1024-536"]=e.from("b3a3","hex"),t["skein1024-544"]=e.from("b3a4","hex"),t["skein1024-552"]=e.from("b3a5","hex"),t["skein1024-560"]=e.from("b3a6","hex"),t["skein1024-568"]=e.from("b3a7","hex"),t["skein1024-576"]=e.from("b3a8","hex"),t["skein1024-584"]=e.from("b3a9","hex"),t["skein1024-592"]=e.from("b3aa","hex"),t["skein1024-600"]=e.from("b3ab","hex"),t["skein1024-608"]=e.from("b3ac","hex"),t["skein1024-616"]=e.from("b3ad","hex"),t["skein1024-624"]=e.from("b3ae","hex"),t["skein1024-632"]=e.from("b3af","hex"),t["skein1024-640"]=e.from("b3b0","hex"),t["skein1024-648"]=e.from("b3b1","hex"),t["skein1024-656"]=e.from("b3b2","hex"),t["skein1024-664"]=e.from("b3b3","hex"),t["skein1024-672"]=e.from("b3b4","hex"),t["skein1024-680"]=e.from("b3b5","hex"),t["skein1024-688"]=e.from("b3b6","hex"),t["skein1024-696"]=e.from("b3b7","hex"),t["skein1024-704"]=e.from("b3b8","hex"),t["skein1024-712"]=e.from("b3b9","hex"),t["skein1024-720"]=e.from("b3ba","hex"),t["skein1024-728"]=e.from("b3bb","hex"),t["skein1024-736"]=e.from("b3bc","hex"),t["skein1024-744"]=e.from("b3bd","hex"),t["skein1024-752"]=e.from("b3be","hex"),t["skein1024-760"]=e.from("b3bf","hex"),t["skein1024-768"]=e.from("b3c0","hex"),t["skein1024-776"]=e.from("b3c1","hex"),t["skein1024-784"]=e.from("b3c2","hex"),t["skein1024-792"]=e.from("b3c3","hex"),t["skein1024-800"]=e.from("b3c4","hex"),t["skein1024-808"]=e.from("b3c5","hex"),t["skein1024-816"]=e.from("b3c6","hex"),t["skein1024-824"]=e.from("b3c7","hex"),t["skein1024-832"]=e.from("b3c8","hex"),t["skein1024-840"]=e.from("b3c9","hex"),t["skein1024-848"]=e.from("b3ca","hex"),t["skein1024-856"]=e.from("b3cb","hex"),t["skein1024-864"]=e.from("b3cc","hex"),t["skein1024-872"]=e.from("b3cd","hex"),t["skein1024-880"]=e.from("b3ce","hex"),t["skein1024-888"]=e.from("b3cf","hex"),t["skein1024-896"]=e.from("b3d0","hex"),t["skein1024-904"]=e.from("b3d1","hex"),t["skein1024-912"]=e.from("b3d2","hex"),t["skein1024-920"]=e.from("b3d3","hex"),t["skein1024-928"]=e.from("b3d4","hex"),t["skein1024-936"]=e.from("b3d5","hex"),t["skein1024-944"]=e.from("b3d6","hex"),t["skein1024-952"]=e.from("b3d7","hex"),t["skein1024-960"]=e.from("b3d8","hex"),t["skein1024-968"]=e.from("b3d9","hex"),t["skein1024-976"]=e.from("b3da","hex"),t["skein1024-984"]=e.from("b3db","hex"),t["skein1024-992"]=e.from("b3dc","hex"),t["skein1024-1000"]=e.from("b3dd","hex"),t["skein1024-1008"]=e.from("b3de","hex"),t["skein1024-1016"]=e.from("b3df","hex"),t["skein1024-1024"]=e.from("b3e0","hex"),t.ip4=e.from("04","hex"),t.tcp=e.from("06","hex"),t.dccp=e.from("21","hex"),t.ip6=e.from("29","hex"),t.ip6zone=e.from("2a","hex"),t.dns=e.from("35","hex"),t.dns4=e.from("36","hex"),t.dns6=e.from("37","hex"),t.dnsaddr=e.from("38","hex"),t.sctp=e.from("84","hex"),t.udp=e.from("0111","hex"),t["p2p-webrtc-star"]=e.from("0113","hex"),t["p2p-webrtc-direct"]=e.from("0114","hex"),t["p2p-stardust"]=e.from("0115","hex"),t["p2p-circuit"]=e.from("0122","hex"),t.udt=e.from("012d","hex"),t.utp=e.from("012e","hex"),t.unix=e.from("0190","hex"),t.p2p=e.from("01a5","hex"),t.ipfs=e.from("01a5","hex"),t.https=e.from("01bb","hex"),t.onion=e.from("01bc","hex"),t.onion3=e.from("01bd","hex"),t.garlic64=e.from("01be","hex"),t.garlic32=e.from("01bf","hex"),t.quic=e.from("01cc","hex"),t.ws=e.from("01dd","hex"),t.wss=e.from("01de","hex"),t["p2p-websocket-star"]=e.from("01df","hex"),t.http=e.from("01e0","hex"),t.raw=e.from("55","hex"),t["dag-pb"]=e.from("70","hex"),t["dag-cbor"]=e.from("71","hex"),t["libp2p-key"]=e.from("72","hex"),t["git-raw"]=e.from("78","hex"),t["torrent-info"]=e.from("7b","hex"),t["torrent-file"]=e.from("7c","hex"),t["leofcoin-block"]=e.from("81","hex"),t["leofcoin-tx"]=e.from("82","hex"),t["leofcoin-pr"]=e.from("83","hex"),t["eth-block"]=e.from("90","hex"),t["eth-block-list"]=e.from("91","hex"),t["eth-tx-trie"]=e.from("92","hex"),t["eth-tx"]=e.from("93","hex"),t["eth-tx-receipt-trie"]=e.from("94","hex"),t["eth-tx-receipt"]=e.from("95","hex"),t["eth-state-trie"]=e.from("96","hex"),t["eth-account-snapshot"]=e.from("97","hex"),t["eth-storage-trie"]=e.from("98","hex"),t["bitcoin-block"]=e.from("b0","hex"),t["bitcoin-tx"]=e.from("b1","hex"),t["zcash-block"]=e.from("c0","hex"),t["zcash-tx"]=e.from("c1","hex"),t["stellar-block"]=e.from("d0","hex"),t["stellar-tx"]=e.from("d1","hex"),t["decred-block"]=e.from("e0","hex"),t["decred-tx"]=e.from("e1","hex"),t["dash-block"]=e.from("f0","hex"),t["dash-tx"]=e.from("f1","hex"),t["swarm-manifest"]=e.from("fa","hex"),t["swarm-feed"]=e.from("fb","hex"),t["dag-json"]=e.from("0129","hex"),t.path=e.from("2f","hex"),t["ipld-ns"]=e.from("e2","hex"),t["ipfs-ns"]=e.from("e3","hex"),t["swarm-ns"]=e.from("e4","hex"),t["ed25519-pub"]=e.from("ed","hex"),t["holochain-adr-v0"]=e.from("807124","hex"),t["holochain-adr-v1"]=e.from("817124","hex"),t["holochain-key-v0"]=e.from("947124","hex"),t["holochain-key-v1"]=e.from("957124","hex"),t["holochain-sig-v0"]=e.from("a27124","hex"),t["holochain-sig-v1"]=e.from("a37124","hex")}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=function e(t,n){var r,i;function o(e){if(r=e,i)return o.abort();!function e(){for(var o=!0,s=!1;o;)if(s=!1,r(null,function(a,u){if(s=!0,a=a||i){if(o=!1,n)n(!0===a?null:a);else if(a&&!0!==a)throw a}else t&&!1===t(u)||i?(o=!1,r(i||!0,n||function(){})):o||e()}),!s)return void(o=!1)}()}return o.abort=function(e,t){if("function"==typeof e&&(t=e,e=!0),i=e||!0,r)return r(i,t||function(){})},o}},function(e,t){e.exports=function e(t){return t&&("string"==typeof t?function(e){return e[t]}:"object"==typeof t&&"function"==typeof t.exec?function(e){var n=t.exec(e);return n&&n[0]}:t)}},function(e,t,n){var r=n(19);r.pki=r.pki||{};var i=e.exports=r.pki.oids=r.oids=r.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,n){"use strict";const r=t;r.Reporter=n(905).Reporter,r.DecoderBuffer=n(462).DecoderBuffer,r.EncoderBuffer=n(462).EncoderBuffer,r.Node=n(906)},function(e,t,n){(function(t){e.exports=function e(n,r){for(var i=Math.min(n.length,r.length),o=new t(i),s=0;s<i;++s)o[s]=n[s]^r[s];return o}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(958);e.exports=function(){var e={};return r.toArray(arguments).reverse().forEach(function(t){r.mergeWith(e,t,function(e,t){return r.isArray(t)?t:void 0})}),e}},function(e,t,n){"use strict";(function(t){const r=n(1025),i=n(1026),{Key:o}=n(33),s=n(64),a=n(23),u=n(35),l=n(5),c=l("jsipns");c.error=l("jsipns:error");const f=n(1027),{parseRFC3339:h}=n(1028),p=n(1029),d=u.names.id,m="/ipns/",g=(e,t,n,r,o)=>{const s=new i(Date.now()+Number(r)).toString(),a=f.ValidityType.EOL;b(e,t,n,s,a,o)},y=(e,t,n,r,i)=>{const o=f.ValidityType.EOL;b(e,t,n,r,o,i)},b=(e,t,n,r,i,o)=>{x(e,t,i,r,(e,s)=>{if(e)return c.error("record signature creation failed"),o(Object.assign(new Error("record signature verification failed"),{code:p.ERR_SIGNATURE_CREATION}));const a={value:t,signature:s,validityType:i,validity:r,sequence:n};return c(`ipns entry for ${t} created`),o(null,a)})},v=(e,t,n)=>{const{value:r,validityType:i,validity:o}=t,s=A(r,i,o);e.verify(s,t.signature,(e,t)=>{if(e||!t)return c.error("record signature verification failed"),n(Object.assign(new Error("record signature verification failed"),{code:p.ERR_SIGNATURE_VERIFICATION}));if(i===f.ValidityType.EOL){let e;try{e=h(o.toString())}catch(e){return c.error("unrecognized validity format (not an rfc3339 format)"),n(Object.assign(new Error("unrecognized validity format (not an rfc3339 format)"),{code:p.ERR_UNRECOGNIZED_FORMAT}))}if(e<Date.now())return c.error("record has expired"),n(Object.assign(new Error("record has expired"),{code:p.ERR_IPNS_EXPIRED_RECORD}))}else if(i)return c.error("unrecognized validity type"),n(Object.assign(new Error("unrecognized validity type"),{code:p.ERR_UNRECOGNIZED_VALIDITY}));return c(`ipns entry for ${r} is valid`),n(null,null)})},w=(e,t,n)=>{if(!e||!e.bytes||!t){const e="one or more of the provided parameters are not defined";return c.error(e),n(Object.assign(new Error(e),{code:p.ERR_UNDEFINED_PARAMETER}))}a.createFromPubKey(e.bytes,(r,i)=>{if(r)return c.error(r),n(Object.assign(new Error(r),{code:p.ERR_PEER_ID_FROM_PUBLIC_KEY}));let o;try{o=I(i)}catch(r){return c.error(r),n(Object.assign(new Error(r),{code:p.ERR_PUBLIC_KEY_FROM_ID}))}if(o)return n(null,null);try{t.pubKey=s.keys.marshalPublicKey(e)}catch(r){return c.error(r),n(r)}n(null,t)})},_=(e,t,n)=>{if(!t||!e){const e="one or more of the provided parameters are not defined";return c.error(e),n(Object.assign(new Error(e),{code:p.ERR_UNDEFINED_PARAMETER}))}if(t.pubKey){let e;try{e=s.keys.unmarshalPublicKey(t.pubKey)}catch(e){return c.error(e),n(e)}return n(null,e)}e.pubKey?n(null,e.pubKey):n(Object.assign(new Error("no public key is available"),{code:p.ERR_UNDEFINED_PARAMETER}))},k=e=>r(e,"RFC4648",{padding:!1}),S=e=>new o(`/ipns/${k(e)}`),E=e=>{const n=t.from("/pk/"),r=t.from("/ipns/");return{routingPubKey:new o(t.concat([n,e])),pkKey:new o(k(t.concat([n,e]))),routingKey:new o(t.concat([r,e])),ipnsKey:new o(k(t.concat([r,e])))}},x=(e,t,n,r,i)=>{const o=A(t,n,r);e.sign(o,(e,t)=>e?i(e):i(null,t))},C=e=>{if("0"===e.toString())return"EOL";{const t=`unrecognized validity type ${e.toString()}`;throw c.error(t),Object.assign(new Error(t),{code:p.ERR_UNRECOGNIZED_VALIDITY})}},A=(e,n,r)=>{const i=t.from(e),o=t.from(C(n)),s=t.from(r);return t.concat([i,s,o])},I=e=>{const t=u.decode(e.id);return t.code!==d?null:s.keys.unmarshalPublicKey(t.digest)},T=f.encode,j=f.decode,O={validate:(e,t,n)=>{const r=j(e),i=t.slice("/ipns/".length);let o;try{o=a.createFromBytes(i)}catch(e){return n(e)}_(o,r,(e,t)=>{if(e)return n(e);v(t,r,e=>{if(e)return n(e);n(null,!0)})})},select:(e,t,n)=>{const r=j(e),i=j(t),o=r.sequence>i.sequence?0:1;if("function"!=typeof n)return o;n(null,o)}};e.exports={create:g,createWithExpiration:y,validate:v,embedPublicKey:w,extractPublicKey:_,getLocalKey:S,getIdKeys:E,marshal:T,unmarshal:j,validator:O,namespace:"/ipns/",namespaceLength:"/ipns/".length}}).call(this,n(0).Buffer)},function(e,t,n){const r=n(6).EventEmitter,i=n(18),o=n(1120);function s(e,t){"object"==typeof e&&(t=e,e="START"),i.equal(typeof e,"string"),i.equal(typeof t,"object"),i.ok(t[e],"invalid starting state "+e),i.ok(o.validate(t));const n=new r;return u._graph=o.reachable(t),u._emitter=n,u._events=t,u._state=e,u.emit=u,u.on=s,u;function s(e,t){n.on(e,t)}function u(e){const t=u._events[u._state][e];if(!a(u._state,t,u._graph)){const t="invalid transition: "+u._state+" -> "+e;return n.emit("error",t)}const r=u._state+":leave",i=t+":enter";return u._state?o():s();function o(){n._events[r]?n.emit(r,s):s()}function s(){n._events[i]?n.emit(i,l):l()}function l(){u._state=t,n.emit(t),n.emit("done")}}}function a(e,t,n){if(!t)return!1;if(!e)return!0;const r=n[e];return!(!r||!r[t])&&1===r[t].length}e.exports=s},function(e,t,n){"use strict";const r=n(24),i=n(44),o=n(23),s=n(185);e.exports=function(e){function t(e){let t=null;if(r.isMultiaddr(e)){const n=r(e);t=n.getPeerId()}else i.isPeerInfo(e)&&(t=e.id.toB58String());return t}function n(t){let n;if(i.isPeerInfo(t))n=t;else if(r.isMultiaddr(t)){const r=t.getPeerId();try{n=e._peerBook.get(r)}catch(e){n=new i(o.createFromB58String(r))}n.multiaddrs.add(t)}else if(o.isPeerId(t)){const r=t.toB58String();n=e._peerBook.has(r)?e._peerBook.get(r):t}return n}function a(t){return e.muxedConns[t]||e.conns[t]}function u(e,t,n){return n=n||(()=>{}),e.write(s.CircuitRelay.encode({type:s.CircuitRelay.Type.STATUS,code:t})),n()}function l(e,t,n,i){try{e.dstPeer.addrs.forEach(e=>r(e))}catch(e){return u(t,n===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_DST_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_DST_MULTIADDR_INVALID),i(e)}try{e.srcPeer.addrs.forEach(e=>r(e))}catch(e){return u(t,n===s.CircuitRelay.Type.HOP?s.CircuitRelay.Status.HOP_SRC_MULTIADDR_INVALID:s.CircuitRelay.Status.STOP_SRC_MULTIADDR_INVALID),i(e)}return i(null)}function c(e){return"string"==typeof e?o.createFromB58String(e):o.createFromBytes(e)}return{getB58String:t,peerInfoFromMa:n,isPeerConnected:a,validateAddrs:l,writeResponse:u,peerIdFromId:c}}},function(e,t,n){"use strict";const r=n(71);e.exports=r("\nmessage CircuitRelay {\n\n enum Status {\n SUCCESS = 100;\n HOP_SRC_ADDR_TOO_LONG = 220;\n HOP_DST_ADDR_TOO_LONG = 221;\n HOP_SRC_MULTIADDR_INVALID = 250;\n HOP_DST_MULTIADDR_INVALID = 251;\n HOP_NO_CONN_TO_DST = 260;\n HOP_CANT_DIAL_DST = 261;\n HOP_CANT_OPEN_DST_STREAM = 262;\n HOP_CANT_SPEAK_RELAY = 270;\n HOP_CANT_RELAY_TO_SELF = 280;\n STOP_SRC_ADDR_TOO_LONG = 320;\n STOP_DST_ADDR_TOO_LONG = 321;\n STOP_SRC_MULTIADDR_INVALID = 350;\n STOP_DST_MULTIADDR_INVALID = 351;\n STOP_RELAY_REFUSED = 390;\n MALFORMED_MESSAGE = 400;\n }\n\n enum Type { // RPC identifier, either HOP, STOP or STATUS\n HOP = 1;\n STOP = 2;\n STATUS = 3;\n CAN_HOP = 4;\n }\n\n message Peer {\n required bytes id = 1; // peer id\n repeated bytes addrs = 2; // peer's known addresses\n }\n\n optional Type type = 1; // Type of the message\n\n optional Peer srcPeer = 2; // srcPeer and dstPeer are used when Type is HOP or STATUS\n optional Peer dstPeer = 3;\n\n optional Status code = 4; // Status code, used when Type is STATUS\n}\n")},function(e,t,n){"use strict";const r=n(3),i=n(99),o=n(65),s=n(9),a="ERR_BAD_PATH";function u(e){const t=new Error("invalid ipfs ref path");e=e.replace(/^\/ipfs\//,"");const n=e.match(/([^/]+(?:\/[^/]+)*)\/?$/);if(!n)throw t;const[r,...i]=n[1].split("/");if(o.cid(r))return{hash:r,links:i};throw t}t.OFFLINE_ERROR="This command must be run in online mode. Try running 'ipfs daemon' first.";const l=e=>{if(o.cid(e))return`/ipfs/${e}`;if(o.path(e))return e;throw Object.assign(new Error(`invalid ${e} path`),{code:a})},c=r(function(e,n,r){Array.isArray(n)||(n=[n]),i(n,(n,r)=>{if("string"!=typeof n){let e;try{e=new s(n)}catch(e){return r(e)}return r(null,e.buffer)}let i;try{i=t.parseIpfsPath(n)}catch(e){return r(e)}const o=new s(i.hash),a=i.links;if(!a.length)return r(null,o.buffer);function u(t,n,i,o){if(i)return r(i);if(!n.length)return r(null,t.buffer);const s=n[0],a=o.links.find(e=>e.name===s);if(!a)return r(new Error(`no link named "${s}" under ${t.toBaseEncodedString()}`));e.get(a.cid,u.bind(null,a.cid,n.slice(1)))}e.get(o,u.bind(null,o,a))},r)});t.normalizePath=l,t.parseIpfsPath=u,t.resolvePath=c},function(e,t){function n(e){return"function"==typeof e}function r(e){return"object"==typeof e&&i(e.source)&&o(e.sink)}function i(e){return n(e)&&2===e.length}function o(e){return n(e)&&1===e.length}t.isDuplex=r,t.isSource=i,t.isSink=o},function(e,t,n){var r=n(525);e.exports=function(e,t){return function(n){var i=[],o,s;function a(e){i.push(e)}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var u={emit:function(e,t){"data"==e&&a(t),"end"==e&&(o=!0,a(null)),"error"==e&&(s=t)},queue:a},l;return function(a,c){if(o=o||a,a)return n(a,function(){if(l){var e=l;l=null,e(a)}c(a)});l=c,r(function r(a){if(l)if(c=l,s)l=null,c(s);else if(i.length){var f=i.shift();l=null,c(null===f,f)}else n(o,function(i,f){if(i&&!0!==i)return s=i,a();if(o=o||i)t.call(u);else if(null!==f&&(e.call(u,f),s||o))return n(s||o,function(){l=null,c(s||o)});a(r)})})}}}},function(e,t,n){var r=t;r.utils=n(92),r.common=n(190),r.sha=n(1337),r.ripemd=n(1341),r.hmac=n(1342),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(e,t,n){"use strict";var r=n(92),i=n(107);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}t.BlockHash=o,o.prototype.update=function e(t,n){if(t=r.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.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 o=0;o<t.length;o+=this._delta32)this._update(t,o,o+this._delta32)}return this},o.prototype.digest=function e(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function e(){var t=this.pendingTotal,n=this._delta8,r=n-(t+this.padLength)%n,i=new Array(r+this.padLength);i[0]=128;for(var o=1;o<r;o++)i[o]=0;if(t<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)i[o++]=0;i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=t>>>24&255,i[o++]=t>>>16&255,i[o++]=t>>>8&255,i[o++]=255&t}else for(i[o++]=255&t,i[o++]=t>>>8&255,i[o++]=t>>>16&255,i[o++]=t>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,s=8;s<this.padLength;s++)i[o++]=0;return i}},function(e,t,n){"use strict";var r=n(143),i=n(1359);function o(e){var t=r("sha256").update(e).digest();return r("sha256").update(t).digest()}e.exports=i(o)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(63);function i(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)n.push(i(t[r]));var o=e.concat(n);return e.concat([s(o.length,192),o])}var a=m(t);return 1===a.length&&a[0]<128?a:e.concat([s(a.length,128),a])}function o(e,t){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function s(t,n){if(t<56)return e.from([t+n]);var r=h(t),i=r.length/2,o=h(n+55+i);return e.from(o+r,"hex")}function a(t,n){if(void 0===n&&(n=!1),!t||0===t.length)return e.from([]);var r=m(t),i=l(r);if(n)return i;if(0!==i.remainder.length)throw new Error("invalid remainder");return i.data}function u(t){if(!t||0===t.length)return e.from([]);var n=m(t),r=n[0];if(r<=127)return n.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var i=r-246,s=o(n.slice(1,i).toString("hex"),16);return i+s}function l(t){var n,r,i,s,a,u=[],c=t[0];if(c<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(c<=183){if(n=c-127,i=128===c?e.from([]):t.slice(1,n),2===n&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:t.slice(n)}}if(c<=191){if(r=c-182,n=o(t.slice(1,r).toString("hex"),16),i=t.slice(r,n+r),i.length<n)throw new Error("invalid RLP");return{data:i,remainder:t.slice(n+r)}}if(c<=247){for(n=c-191,s=t.slice(1,n);s.length;)a=l(s),u.push(a.data),s=a.remainder;return{data:u,remainder:t.slice(n)}}r=c-246,n=o(t.slice(1,r).toString("hex"),16);var f=r+n;if(f>t.length)throw new Error("invalid rlp: total length is larger than the data");if(s=t.slice(r,f),0===s.length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)a=l(s),u.push(a.data),s=a.remainder;return{data:u,remainder:t.slice(f)}}function c(e){return"0x"===e.slice(0,2)}function f(e){return"string"!=typeof e?e:c(e)?e.slice(2):e}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function p(e){return e.length%2?"0"+e:e}function d(t){var n=h(t);return e.from(n,"hex")}function m(t){if(!e.isBuffer(t)){if("string"==typeof t)return c(t)?e.from(p(f(t)),"hex"):e.from(t);if("number"==typeof t)return t?d(t):e.from([]);if(null===t||void 0===t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(r.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}return t}t.encode=i,t.decode=a,t.getLength=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(9),i=n(35);function o(e,t,n){n=n||{};const o=n.hashAlg||"keccak-256",s=void 0===n.version?1:n.version,a=i.encode(t,o);return new r(s,e,a)}e.exports=o},function(e,t,n){"use strict";const r=n(11),i=n(588),o=n(589);function s(e,t,n){const s=o(e,t),a={multicodec:e,defaultHashAlg:"keccak-256",resolve:c,tree:u,isLink:i(c),_resolveFromEthObject:f,_treeFromEthObject:l,_mapFromEthObject:n};return{resolver:a,util:s};function u(e,t,n){"function"==typeof t&&(n=t,t=void 0),t||(t={}),r([t=>s.deserialize(e,t),(e,n)=>l(e,t,n)],n)}function l(e,t,i){r([r=>n(e,t,r),(e,t)=>t(null,e.map(e=>e.path))],i)}function c(e,t,n){r([t=>s.deserialize(e,t),(e,n)=>f(e,t,n)],n)}function f(e,t,r){if(!t||"/"===t){const t={value:e,remainderPath:""};return r(null,t)}n(e,{},(e,n)=>{if(e)return r(e);const i=t.split("/");let o=n.filter(e=>e.path===t.slice(0,e.path.length));o=o.filter(e=>e.path.split("/").every((e,t)=>e===i[t]));const s=o.sort((e,t)=>t.path.length-e.path.length),a=s[0];if(!a){let e=new Error('Path not found ("'+t+'").');return r(e)}const u=t.slice(a.path.length+1),l={value:a.value,remainderPath:u};return r(null,l)})}}e.exports=s},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(274),o=n(0),s=n(60).sha256sha256,a=function e(n){if(!(this instanceof e))return new e(n);if(t.isBuffer(n)){var r=n;this.fromBuffer(r)}else if("string"==typeof n){var i=n;this.fromString(i)}else n&&this.set(n)};a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this},a.validChecksum=function e(t,n){return r.isString(t)&&(t=new o.Buffer(i.decode(t))),r.isString(n)&&(n=new o.Buffer(i.decode(n))),n||(n=t.slice(-4),t=t.slice(0,-4)),a.checksum(t).toString("hex")===n.toString("hex")},a.decode=function(e){if("string"!=typeof e)throw new Error("Input must be a string");var n=new t(i.decode(e));if(n.length<4)throw new Error("Input string too short");var r=n.slice(0,-4),o=n.slice(-4),a=s(r),u=a.slice(0,4);if(o.toString("hex")!==u.toString("hex"))throw new Error("Checksum mismatch");return r},a.checksum=function(e){return s(e).slice(0,4)},a.encode=function(e){if(!t.isBuffer(e))throw new Error("Input must be a buffer");var n=new t(e.length+4),r=a.checksum(e);return e.copy(n),r.copy(n,e.length),i.encode(n)},a.prototype.fromBuffer=function(e){return this.buf=e,this},a.prototype.fromString=function(e){var t=a.decode(e);return this.buf=t,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(17),i=n(25),o=n(84),s=n(80),a=n(0),u=n(30),l=n(41),c=n(86),f=n(110),h=n(111),p=4294967295,d=p-2,m=p,g=p-1;function y(e){return this instanceof y?e?this._fromObject(e):void 0:new y(e)}y.MAXINT=p,y.DEFAULT_SEQNUMBER=4294967295,y.DEFAULT_LOCKTIME_SEQNUMBER=4294967294,y.DEFAULT_RBF_SEQNUMBER=4294967293,Object.defineProperty(y.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new c(this._scriptBuffer),this._script._isInput=!0),this._script)}}),y.fromObject=function(e){i.checkArgument(r.isObject(e));var t=new y;return t._fromObject(e)},y.prototype._fromObject=function(e){var t;if(t=r.isString(e.prevTxId)&&l.isHexa(e.prevTxId)?new a.Buffer(e.prevTxId,"hex"):e.prevTxId,this.output=e.output?e.output instanceof h?e.output:new h(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=r.isUndefined(e.outputIndex)?e.txoutnum:e.outputIndex,this.sequenceNumber=r.isUndefined(e.sequenceNumber)?r.isUndefined(e.seqnum)?4294967295:e.seqnum:e.sequenceNumber,r.isUndefined(e.script)&&r.isUndefined(e.scriptBuffer))throw new o.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this},y.prototype.toObject=y.prototype.toJSON=function e(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t},y.fromBufferReader=function(e){var t=new y;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t},y.prototype.toBufferWriter=function(e){e||(e=new s),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e},y.prototype.setScript=function(e){if(this._script=null,e instanceof c)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(l.isHexa(e))this._scriptBuffer=new a.Buffer(e,"hex");else if(r.isString(e))this._script=new c(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else{if(!u.isBuffer(e))throw new TypeError("Invalid argument type: script");this._scriptBuffer=new a.Buffer(e)}return this},y.prototype.getSignatures=function(){throw new o.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))},y.prototype.isFullySigned=function(){throw new o.AbstractMethodInvoked("Input#isFullySigned")},y.prototype.isFinal=function(){return 4294967295!==this.sequenceNumber},y.prototype.addSignature=function(){throw new o.AbstractMethodInvoked("Input#addSignature")},y.prototype.clearSignatures=function(){throw new o.AbstractMethodInvoked("Input#clearSignatures")},y.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,f.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script)},y.prototype.isNull=function(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.prevTxId.toString("hex")&&4294967295===this.outputIndex},y.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length},e.exports=y},function(e,t){"function"==typeof Object.create?e.exports=function e(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function e(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(197),s=n(30),a=n(41),u=n(95),l=n(84),c=n(85);function f(e){if(!(this instanceof f))return new f(e);if(e instanceof f)return e;if(r.isObject(e))return this._fromObject(e);throw new l.InvalidArgument("TransactionSignatures must be instantiated from an object")}o(f,c),f.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new u(e.publicKey),this.prevTxId=s.isBuffer(e.prevTxId)?e.prevTxId:new t(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof c?e.signature:s.isBuffer(e.signature)?c.fromBuffer(e.signature):c.fromString(e.signature),this.sigtype=e.sigtype,this},f.prototype._checkObjectArgs=function(e){i.checkArgument(u(e.publicKey),"publicKey"),i.checkArgument(!r.isUndefined(e.inputIndex),"inputIndex"),i.checkArgument(!r.isUndefined(e.outputIndex),"outputIndex"),i.checkState(r.isNumber(e.inputIndex),"inputIndex must be a number"),i.checkState(r.isNumber(e.outputIndex),"outputIndex must be a number"),i.checkArgument(e.signature,"signature"),i.checkArgument(e.prevTxId,"prevTxId"),i.checkState(e.signature instanceof c||s.isBuffer(e.signature)||a.isHexa(e.signature),"signature must be a buffer or hexa value"),i.checkState(s.isBuffer(e.prevTxId)||a.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),i.checkArgument(e.sigtype,"sigtype"),i.checkState(r.isNumber(e.sigtype),"sigtype must be a number")},f.prototype.toObject=f.prototype.toJSON=function e(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}},f.fromObject=function(e){return i.checkArgument(e),new f(e)},e.exports=f}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var r=n(20).Writable,i=n(1),o=n(278);if("undefined"==typeof Uint8Array)var s=n(1461).Uint8Array;else var s=Uint8Array;function a(e,t){if(!(this instanceof a))return new a(e,t);"function"==typeof e&&(t=e,e={}),e||(e={});var n=e.encoding,i=!1;n?(n=String(n).toLowerCase(),"u8"!==n&&"uint8"!==n||(n="uint8array")):i=!0,r.call(this,{objectMode:!0}),this.encoding=n,this.shouldInferEncoding=i,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}e.exports=a,i(a,r),a.prototype._write=function(e,t,n){this.body.push(e),n()},a.prototype.inferEncoding=function(e){var n=void 0===e?this.body[0]:e;return t.isBuffer(n)?"buffer":"undefined"!=typeof Uint8Array&&n instanceof Uint8Array?"uint8array":Array.isArray(n)?"array":"string"==typeof n?"string":"[object Object]"===Object.prototype.toString.call(n)?"object":"buffer"},a.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?p(this.body):"string"===this.encoding?f(this.body):"buffer"===this.encoding?h(this.body):"uint8array"===this.encoding?d(this.body):this.body):[]};var u=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)};function l(e){return/Array\]$/.test(Object.prototype.toString.call(e))}function c(e){return"string"==typeof e||l(e)||e&&"function"==typeof e.subarray}function f(e){for(var n=[],r=!1,i=0;i<e.length;i++){var s=e[i];"string"==typeof s?n.push(s):t.isBuffer(s)?n.push(s):c(s)?n.push(o(s)):n.push(o(String(s)))}return t.isBuffer(e[0])?(n=t.concat(n),n=n.toString("utf8")):n=n.join(""),n}function h(e){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.isBuffer(i)?n.push(i):c(i)?n.push(o(i)):n.push(o(String(i)))}return t.concat(n)}function p(e){for(var t=[],n=0;n<e.length;n++)t.push.apply(t,e[n]);return t}function d(e){for(var t=0,n=0;n<e.length;n++)"string"==typeof e[n]&&(e[n]=o(e[n])),t+=e[n].length;for(var r=new s(t),n=0,i=0;n<e.length;n++)for(var a=e[n],u=0;u<a.length;u++)r[i++]=a[u];return r}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(20).Duplex,i=n(145),o=n(150),s=n(28),a=n(1462),u=n(1466);function l(e){const t=e.path?encodeURIComponent(e.path):"",n={"Content-Disposition":`file; filename="${t}"`};return e.content?e.symlink?n["Content-Type"]="application/symlink":n["Content-Type"]="application/octet-stream":n["Content-Type"]="application/x-directory",n}function c(e,t,n){return t in e?e[t]:n in e?e[n]:void 0}e.exports=((e,t)=>n=>{let f,h=!1,p=!1;n=n?Object.assign({},n,n.qs):{};const d=new u,m=new r({objectMode:!0});m._read=(e=>{}),m._write=((e,t,r)=>{const o=s(r);try{const r=a(e,n).map(e=>Object.assign({headers:l(e)},e));p=!0,i(r,(e,n)=>d.write(e,t,n),e=>{if(p=!1,e)return o(e);h&&d.end(),o()})}catch(e){o(e)}}),m.once("finish",()=>{h||(h=!0,p||d.end())});const g=n.qs||{};g["cid-version"]=c(n,"cid-version","cidVersion"),g["raw-leaves"]=c(n,"raw-leaves","rawLeaves"),g["only-hash"]=c(n,"only-hash","onlyHash"),g["wrap-with-directory"]=c(n,"wrap-with-directory","wrapWithDirectory"),g.hash=c(n,"hash","hashAlg");const y={path:t,qs:g,args:n.args,multipart:!0,multipartBoundary:d._boundary,stream:!0,recursive:!0,progress:n.progress};return d.on("error",e=>{m.emit("error",e)}),f=e(y,(e,t)=>{if(e)return m.emit("error",e);if(!t)return m.push(null);if(!o(t))return m.push(t),void m.push(null);if(t.on("error",e=>m.emit("error",e)),n.converter){t.on("data",e=>{e.Bytes&&n.progress&&n.progress(e.Bytes)});const e=n.converter,r=new e;r.once("end",()=>m.push(null)),r.on("data",e=>m.push(e)),t.pipe(r)}else t.on("data",e=>{e.Bytes&&n.progress&&n.progress(e.Bytes),m.push(e)}),t.once("end",()=>m.push(null))}),f.on("drain",()=>d.emit("drain")),d.pipe(f),m})},function(e,t){e.exports=!1},function(e,t,n){var r=n(154),i=n(32),o=e.exports;for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);function a(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),r.request.call(this,e,t)},o.get=function(e,t){return e=a(e),r.get.call(this,e,t)}},function(e,t,n){"use strict";var r=n(10),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(7);o.inherits=n(1);var s=n(1492),a=n(1496);o.inherits(f,s);for(var u=i(a.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=a.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){(function(t){function n(e,n){var r,i,o,s=!0;function a(e){function i(){n&&n(e,r),n=null}s?t.nextTick(i):i()}function u(e,t,n){r[e]=n,(0==--i||t)&&a(t)}Array.isArray(e)?(r=[],i=e.length):(o=Object.keys(e),r={},i=o.length),i?o?o.forEach(function(t){e[t](function(e,n){u(t,e,n)})}):e.forEach(function(e,t){e(function(e,n){u(t,e,n)})}):a(null),s=!1}e.exports=n}).call(this,n(2))},function(e,t,n){var r=n(1750),i=new r,o="undefined"!=typeof window?window:self,s=o.crypto||o.msCrypto||{},a=s.subtle||s.webkitSubtle;function u(e){return i.digest(e)}try{a.digest({name:"sha-1"},new Uint8Array).catch(function(){a=!1})}catch(e){a=!1}function l(e,t){a?("string"==typeof e&&(e=c(e)),a.digest({name:"sha-1"},e).then(function e(n){t(f(new Uint8Array(n)))},function n(r){t(u(e))})):setTimeout(t,0,u(e))}function c(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function f(e){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")}e.exports=l,e.exports.sync=u},function(e,t,n){e.exports=d;var r=n(27),i=n(31).Buffer,o=n(55),s=n(15),a=n(96),u=n(46),l=n(50),c=n(211),f=n(47),h=a.FingerprintFormatError,p=a.InvalidAlgorithmError;function d(e){if(r.object(e,"options"),r.string(e.type,"options.type"),r.buffer(e.hash,"options.hash"),r.string(e.algorithm,"options.algorithm"),this.algorithm=e.algorithm.toLowerCase(),!0!==o.hashAlgs[this.algorithm])throw new p(this.algorithm);this.hash=e.hash,this.type=e.type,this.hashType=e.hashType}d.prototype.toString=function(e){switch(void 0===e&&(e="md5"===this.algorithm||"spki"===this.hashType?"hex":"base64"),r.string(e),e){case"hex":return"spki"===this.hashType?this.hash.toString("hex"):y(this.hash.toString("hex"));case"base64":return"spki"===this.hashType?this.hash.toString("base64"):v(this.algorithm,this.hash.toString("base64"));default:throw new h(void 0,e)}},d.prototype.matches=function(e){r.object(e,"key or certificate"),"key"===this.type&&"ssh"!==this.hashType?(f.assertCompatible(e,u,[1,7],"key with spki"),l.isPrivateKey(e)&&f.assertCompatible(e,l,[1,6],"privatekey with spki support")):"key"===this.type?f.assertCompatible(e,u,[1,0],"key"):f.assertCompatible(e,c,[1,0],"certificate");var t=e.hash(this.algorithm,this.hashType),n=s.createHash(this.algorithm).update(t).digest("base64");return void 0===this.hash2&&(this.hash2=s.createHash(this.algorithm).update(this.hash).digest("base64")),this.hash2===n};var m=/^[A-Za-z0-9+\/=]+$/,g=/^[a-fA-F0-9]+$/;function y(e){return e.replace(/(.{2})(?=.)/g,"$1:")}function b(e){return e.replace(/=*$/,"")}function v(e,t){return e.toUpperCase()+":"+b(t)}d.parse=function(e,t){var n,s,a;r.string(e,"fingerprint"),Array.isArray(t)&&(a=t,t={}),r.optionalObject(t,"options"),void 0===t&&(t={}),void 0!==t.enAlgs&&(a=t.enAlgs),void 0!==t.algorithms&&(a=t.algorithms),r.optionalArrayOfString(a,"algorithms");var u="ssh";void 0!==t.hashType&&(u=t.hashType),r.string(u,"options.hashType");var l=e.split(":");if(2==l.length){if(n=l[0].toLowerCase(),!m.test(l[1]))throw new h(e);try{s=i.from(l[1],"base64")}catch(t){throw new h(e)}}else if(l.length>2){if(n="md5","md5"===l[0].toLowerCase()&&(l=l.slice(1)),l=l.map(function(t){for(;t.length<2;)t="0"+t;if(t.length>2)throw new h(e);return t}),l=l.join(""),!g.test(l)||l.length%2!=0)throw new h(e);try{s=i.from(l,"hex")}catch(t){throw new h(e)}}else{if(g.test(e))s=i.from(e,"hex");else{if(!m.test(e))throw new h(e);s=i.from(e,"base64")}switch(s.length){case 32:n="sha256";break;case 16:n="md5";break;case 20:n="sha1";break;case 64:n="sha512";break;default:throw new h(e)}void 0===t.hashType&&(u="spki")}if(void 0===n)throw new h(e);if(void 0===o.hashAlgs[n])throw new p(n);if(void 0!==a&&(a=a.map(function(e){return e.toLowerCase()}),-1===a.indexOf(n)))throw new p(n);return new d({algorithm:n,hash:s,type:t.type||"key",hashType:u})},d.isFingerprint=function(e,t){return f.isCompatible(e,d,t)},d.prototype._sshpkApiVersion=[1,2],d._oldVersionDetect=function(e){return r.func(e.toString),r.func(e.matches),[1,0]}},function(e,t,n){(function(){var n,r=0xdeadbeefcafe,i=!0;function o(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,n,r,i,o){for(;--o>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i}function u(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],l=this[e++]>>15,c=a*u+l*s;u=s*u+((32767&c)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(c>>>15)+a*l+(i>>>30),n[r++]=1073741823&u}return i}function l(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],l=this[e++]>>14,c=a*u+l*s;u=s*u+((16383&c)<<14)+n[r]+i,i=(u>>28)+(c>>14)+a*l,n[r++]=268435455&u}return i}var c="undefined"!=typeof navigator;c&&"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=u,n=30):c&&"Netscape"!=navigator.appName?(o.prototype.am=a,n=26):(o.prototype.am=l,n=28),o.prototype.DB=n,o.prototype.DM=(1<<n)-1,o.prototype.DV=1<<n;var f=52;o.prototype.FV=Math.pow(2,52),o.prototype.F1=52-n,o.prototype.F2=2*n-52;var h="0123456789abcdefghijklmnopqrstuvwxyz",p=new Array,d,m;for(d="0".charCodeAt(0),m=0;m<=9;++m)p[d++]=m;for(d="a".charCodeAt(0),m=10;m<36;++m)p[d++]=m;for(d="A".charCodeAt(0),m=10;m<36;++m)p[d++]=m;function g(e){return h.charAt(e)}function y(e,t){var n=p[e.charCodeAt(t)];return null==n?-1:n}function b(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function v(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function w(e){var t=s();return t.fromInt(e),t}function _(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,s=0;--r>=0;){var a=8==n?255&e[r]:y(e,r);a<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,s+=n,s>=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&o.ZERO.subTo(this,this)}function k(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function S(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n=(1<<t)-1,r,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=g(r));s>=0;)a<t?(r=(this[s]&(1<<a)-1)<<t-a,r|=this[--s]>>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=g(r));return i?o:"0"}function E(){var e=s();return o.ZERO.subTo(this,e),e}function x(){return this.s<0?this.negate():this}function C(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function A(e){var t=1,n;return 0!=(n=e>>>16)&&(e=n,t+=16),0!=(n=e>>8)&&(e=n,t+=8),0!=(n=e>>4)&&(e=n,t+=4),0!=(n=e>>2)&&(e=n,t+=2),0!=(n=e>>1)&&(e=n,t+=1),t}function I(){return this.t<=0?0:this.DB*(this.t-1)+A(this[this.t-1]^this.s&this.DM)}function T(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function j(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function O(e,t){var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),s=this.s<<n&this.DM,a;for(a=this.t-1;a>=0;--a)t[a+o+1]=this[a]>>r|s,s=(this[a]&i)<<n;for(a=o-1;a>=0;--a)t[a]=0;t[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()}function P(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&o)<<i,t[s-n]=this[s]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}}function B(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()}function R(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&o.ZERO.subTo(t,t)}function N(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function M(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=s());var a=s(),u=this.s,l=e.s,c=this.DB-A(r[r.t-1]);c>0?(r.lShiftTo(c,a),i.lShiftTo(c,n)):(r.copyTo(a),i.copyTo(n));var f=a.t,h=a[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),d=this.FV/p,m=(1<<this.F1)/p,g=1<<this.F2,y=n.t,b=y-f,v=null==t?s():t;for(a.dlShiftTo(b,v),n.compareTo(v)>=0&&(n[n.t++]=1,n.subTo(v,n)),o.ONE.dlShiftTo(f,v),v.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--b>=0;){var w=n[--y]==h?this.DM:Math.floor(n[y]*d+(n[y-1]+g)*m);if((n[y]+=a.am(0,w,n,b,0,f))<w)for(a.dlShiftTo(b,v),n.subTo(v,n);n[y]<--w;)n.subTo(v,n)}null!=t&&(n.drShiftTo(f,t),u!=l&&o.ZERO.subTo(t,t)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),u<0&&o.ZERO.subTo(n,n)}}}function L(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t}function F(e){this.m=e}function D(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function U(e){return e}function z(e){e.divRemTo(this.m,null,e)}function q(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function K(e,t){e.squareTo(t),this.reduce(t)}function H(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function V(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function W(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t}function $(e){var t=s();return e.copyTo(t),this.reduce(t),t}function G(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function Y(e,t){e.squareTo(t),this.reduce(t)}function J(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function Z(){return 0==(this.t>0?1&this[0]:this.s)}function X(e,t){if(e>4294967295||e<1)return o.ONE;var n=s(),r=s(),i=t.convert(this),a=A(e)-1;for(i.copyTo(n);--a>=0;)if(t.sqrTo(n,r),(e&1<<a)>0)t.mulTo(r,i,n);else{var u=n;n=r,r=u}return t.revert(n)}function Q(e,t){var n;return n=e<256||t.isEven()?new F(t):new V(t),this.exp(e,n)}function ee(){var e=s();return this.copyTo(e),e}function te(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function ne(){return 0==this.t?this.s:this[0]<<24>>24}function re(){return 0==this.t?this.s:this[0]<<16>>16}function ie(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function oe(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function se(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=w(n),i=s(),o=s(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(e).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(e)+a}function ae(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,s=0,a=0,u=0;u<e.length;++u){var l=y(e,u);l<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(a=t*a+l,++s>=n&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)}function ue(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),ge,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),t.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}}function le(){var e=this.t,t=new Array;t[0]=this.s;var n=this.DB-e*this.DB%8,r,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t}function ce(e){return 0==this.compareTo(e)}function fe(e){return this.compareTo(e)<0?this:e}function he(e){return this.compareTo(e)>0?this:e}function pe(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function de(e,t){return e&t}function me(e){var t=s();return this.bitwiseTo(e,de,t),t}function ge(e,t){return e|t}function ye(e){var t=s();return this.bitwiseTo(e,ge,t),t}function be(e,t){return e^t}function ve(e){var t=s();return this.bitwiseTo(e,be,t),t}function we(e,t){return e&~t}function _e(e){var t=s();return this.bitwiseTo(e,we,t),t}function ke(){for(var e=s(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function Se(e){var t=s();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function Ee(e){var t=s();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function xe(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function Ce(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+xe(this[e]);return this.s<0?this.t*this.DB:-1}function Ae(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function Ie(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=Ae(this[n]^t);return e}function Te(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)}function je(e,t){var n=o.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function Oe(e){return this.changeBit(e,ge)}function Pe(e){return this.changeBit(e,we)}function Be(e){return this.changeBit(e,be)}function Re(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()}function Ne(e){var t=s();return this.addTo(e,t),t}function Me(e){var t=s();return this.subTo(e,t),t}function Le(e){var t=s();return this.multiplyTo(e,t),t}function Fe(){var e=s();return this.squareTo(e),e}function De(e){var t=s();return this.divRemTo(e,t,null),t}function Ue(e){var t=s();return this.divRemTo(e,null,t),t}function ze(e){var t=s(),n=s();return this.divRemTo(e,t,n),new Array(t,n)}function qe(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Ke(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function He(){}function Ve(e){return e}function We(e,t,n){e.multiplyTo(t,n)}function $e(e,t){e.squareTo(t)}function Ge(e){return this.exp(e,new He)}function Ye(e,t,n){var r=Math.min(this.t+e.t,t),i;for(n.s=0,n.t=r;r>0;)n[--r]=0;for(i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()}function Je(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)}function Ze(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Xe(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t}function Qe(e){return e}function et(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function tt(e,t){e.squareTo(t),this.reduce(t)}function nt(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function rt(e,t){var n=e.bitLength(),r,i=w(1),o;if(n<=0)return i;r=n<18?1:n<48?3:n<144?4:n<768?5:6,o=n<8?new F(t):t.isEven()?new Ze(t):new V(t);var a=new Array,u=3,l=r-1,c=(1<<r)-1;if(a[1]=o.convert(this),r>1){var f=s();for(o.sqrTo(a[1],f);u<=c;)a[u]=s(),o.mulTo(f,a[u-2],a[u]),u+=2}var h=e.t-1,p,d=!0,m=s(),g;for(n=A(e[h])-1;h>=0;){for(n>=l?p=e[h]>>n-l&c:(p=(e[h]&(1<<n+1)-1)<<l-n,h>0&&(p|=e[h-1]>>this.DB+n-l)),u=r;0==(1&p);)p>>=1,--u;if((n-=u)<0&&(n+=this.DB,--h),d)a[p].copyTo(i),d=!1;else{for(;u>1;)o.sqrTo(i,m),o.sqrTo(m,i),u-=2;u>0?o.sqrTo(i,m):(g=i,i=m,m=g),o.mulTo(m,a[p],i)}for(;h>=0&&0==(e[h]&1<<n);)o.sqrTo(i,m),g=i,i=m,m=g,--n<0&&(n=this.DB-1,--h)}return o.revert(i)}function it(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n}function ot(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n}function st(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return o.ZERO;for(var n=e.clone(),r=this.clone(),i=w(1),s=w(0),a=w(0),u=w(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(e,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),t?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(e,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);n.compareTo(r)>=0?(n.subTo(r,n),t&&i.subTo(a,i),s.subTo(u,s)):(r.subTo(n,r),t&&a.subTo(i,a),u.subTo(s,u))}return 0!=r.compareTo(o.ONE)?o.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u}F.prototype.convert=D,F.prototype.revert=U,F.prototype.reduce=z,F.prototype.mulTo=q,F.prototype.sqrTo=K,V.prototype.convert=W,V.prototype.revert=$,V.prototype.reduce=G,V.prototype.mulTo=J,V.prototype.sqrTo=Y,o.prototype.copyTo=b,o.prototype.fromInt=v,o.prototype.fromString=_,o.prototype.clamp=k,o.prototype.dlShiftTo=T,o.prototype.drShiftTo=j,o.prototype.lShiftTo=O,o.prototype.rShiftTo=P,o.prototype.subTo=B,o.prototype.multiplyTo=R,o.prototype.squareTo=N,o.prototype.divRemTo=M,o.prototype.invDigit=H,o.prototype.isEven=Z,o.prototype.exp=X,o.prototype.toString=S,o.prototype.negate=E,o.prototype.abs=x,o.prototype.compareTo=C,o.prototype.bitLength=I,o.prototype.mod=L,o.prototype.modPowInt=Q,o.ZERO=w(0),o.ONE=w(1),He.prototype.convert=Ve,He.prototype.revert=Ve,He.prototype.mulTo=We,He.prototype.sqrTo=$e,Ze.prototype.convert=Xe,Ze.prototype.revert=Qe,Ze.prototype.reduce=et,Ze.prototype.mulTo=nt,Ze.prototype.sqrTo=tt;var at=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ut=(1<<26)/at[at.length-1],lt,ct,ft;function ht(e){var t,n=this.abs();if(1==n.t&&n[0]<=at[at.length-1]){for(t=0;t<at.length;++t)if(n[0]==at[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<at.length;){for(var r=at[t],i=t+1;i<at.length&&r<ut;)r*=at[i++];for(r=n.modInt(r);t<i;)if(r%at[t++]==0)return!1}return n.millerRabin(e)}function pt(e){var t=this.subtract(o.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var r=t.shiftRight(n);e=e+1>>1,e>at.length&&(e=at.length);for(var i=s(),a=0;a<e;++a){i.fromInt(at[Math.floor(Math.random()*at.length)]);var u=i.modPow(r,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<n&&0!=u.compareTo(t);)if(u=u.modPowInt(2,this),0==u.compareTo(o.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0}function dt(e){ct[ft++]^=255&e,ct[ft++]^=e>>8&255,ct[ft++]^=e>>16&255,ct[ft++]^=e>>24&255,ft>=Ct&&(ft-=Ct)}function mt(){dt((new Date).getTime())}if(o.prototype.chunkSize=ie,o.prototype.toRadix=se,o.prototype.fromRadix=ae,o.prototype.fromNumber=ue,o.prototype.bitwiseTo=pe,o.prototype.changeBit=je,o.prototype.addTo=Re,o.prototype.dMultiply=qe,o.prototype.dAddOffset=Ke,o.prototype.multiplyLowerTo=Ye,o.prototype.multiplyUpperTo=Je,o.prototype.modInt=ot,o.prototype.millerRabin=pt,o.prototype.clone=ee,o.prototype.intValue=te,o.prototype.byteValue=ne,o.prototype.shortValue=re,o.prototype.signum=oe,o.prototype.toByteArray=le,o.prototype.equals=ce,o.prototype.min=fe,o.prototype.max=he,o.prototype.and=me,o.prototype.or=ye,o.prototype.xor=ve,o.prototype.andNot=_e,o.prototype.not=ke,o.prototype.shiftLeft=Se,o.prototype.shiftRight=Ee,o.prototype.getLowestSetBit=Ce,o.prototype.bitCount=Ie,o.prototype.testBit=Te,o.prototype.setBit=Oe,o.prototype.clearBit=Pe,o.prototype.flipBit=Be,o.prototype.add=Ne,o.prototype.subtract=Me,o.prototype.multiply=Le,o.prototype.divide=De,o.prototype.remainder=Ue,o.prototype.divideAndRemainder=ze,o.prototype.modPow=rt,o.prototype.modInverse=st,o.prototype.pow=Ge,o.prototype.gcd=it,o.prototype.isProbablePrime=ht,o.prototype.square=Fe,o.prototype.Barrett=Ze,null==ct){var gt;if(ct=new Array,ft=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var yt=new Uint8Array(32);for(window.crypto.getRandomValues(yt),gt=0;gt<32;++gt)ct[ft++]=yt[gt]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var bt=window.crypto.random(32);for(gt=0;gt<bt.length;++gt)ct[ft++]=255&bt.charCodeAt(gt)}for(;ft<Ct;)gt=Math.floor(65536*Math.random()),ct[ft++]=gt>>>8,ct[ft++]=255&gt;ft=0,mt()}function vt(){if(null==lt){for(mt(),lt=xt(),lt.init(ct),ft=0;ft<ct.length;++ft)ct[ft]=0;ft=0}return lt.next()}function wt(e){var t;for(t=0;t<e.length;++t)e[t]=vt()}function _t(){}function kt(){this.i=0,this.j=0,this.S=new Array}function St(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0}function Et(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]}function xt(){return new kt}_t.prototype.nextBytes=wt,kt.prototype.init=St,kt.prototype.next=Et;var Ct=256;o.SecureRandom=_t,o.BigInteger=o,t=e.exports=o}).call(this)},function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=t(),a=t([1]),u=t([56129,1]),l=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function m(e,t,n,r,i){var o,s=0;for(o=0;o<i;o++)s|=e[t+o]^n[r+o];return(1&s-1>>>8)-1}function g(e,t,n,r){return m(e,t,n,r,16)}function y(e,t,n,r){return m(e,t,n,r,32)}function b(e,t,n,r){for(var i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=i,_=o,k=s,S=a,E=u,x=l,C=c,A=f,I=h,T=p,j=d,O=m,P=g,B=y,R=b,N=v,M,L=0;L<20;L+=2)M=w+P|0,E^=M<<7|M>>>25,M=E+w|0,I^=M<<9|M>>>23,M=I+E|0,P^=M<<13|M>>>19,M=P+I|0,w^=M<<18|M>>>14,M=x+_|0,T^=M<<7|M>>>25,M=T+x|0,B^=M<<9|M>>>23,M=B+T|0,_^=M<<13|M>>>19,M=_+B|0,x^=M<<18|M>>>14,M=j+C|0,R^=M<<7|M>>>25,M=R+j|0,k^=M<<9|M>>>23,M=k+R|0,C^=M<<13|M>>>19,M=C+k|0,j^=M<<18|M>>>14,M=N+O|0,S^=M<<7|M>>>25,M=S+N|0,A^=M<<9|M>>>23,M=A+S|0,O^=M<<13|M>>>19,M=O+A|0,N^=M<<18|M>>>14,M=w+S|0,_^=M<<7|M>>>25,M=_+w|0,k^=M<<9|M>>>23,M=k+_|0,S^=M<<13|M>>>19,M=S+k|0,w^=M<<18|M>>>14,M=x+E|0,C^=M<<7|M>>>25,M=C+x|0,A^=M<<9|M>>>23,M=A+C|0,E^=M<<13|M>>>19,M=E+A|0,x^=M<<18|M>>>14,M=j+T|0,O^=M<<7|M>>>25,M=O+j|0,I^=M<<9|M>>>23,M=I+O|0,T^=M<<13|M>>>19,M=T+I|0,j^=M<<18|M>>>14,M=N+R|0,P^=M<<7|M>>>25,M=P+N|0,B^=M<<9|M>>>23,M=B+P|0,R^=M<<13|M>>>19,M=R+B|0,N^=M<<18|M>>>14;w=w+i|0,_=_+o|0,k=k+s|0,S=S+a|0,E=E+u|0,x=x+l|0,C=C+c|0,A=A+f|0,I=I+h|0,T=T+p|0,j=j+d|0,O=O+m|0,P=P+g|0,B=B+y|0,R=R+b|0,N=N+v|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=j>>>0&255,e[41]=j>>>8&255,e[42]=j>>>16&255,e[43]=j>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=B>>>0&255,e[53]=B>>>8&255,e[54]=B>>>16&255,e[55]=B>>>24&255,e[56]=R>>>0&255,e[57]=R>>>8&255,e[58]=R>>>16&255,e[59]=R>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}function v(e,t,n,r){for(var i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=i,_=o,k=s,S=a,E=u,x=l,C=c,A=f,I=h,T=p,j=d,O=m,P=g,B=y,R=b,N=v,M,L=0;L<20;L+=2)M=w+P|0,E^=M<<7|M>>>25,M=E+w|0,I^=M<<9|M>>>23,M=I+E|0,P^=M<<13|M>>>19,M=P+I|0,w^=M<<18|M>>>14,M=x+_|0,T^=M<<7|M>>>25,M=T+x|0,B^=M<<9|M>>>23,M=B+T|0,_^=M<<13|M>>>19,M=_+B|0,x^=M<<18|M>>>14,M=j+C|0,R^=M<<7|M>>>25,M=R+j|0,k^=M<<9|M>>>23,M=k+R|0,C^=M<<13|M>>>19,M=C+k|0,j^=M<<18|M>>>14,M=N+O|0,S^=M<<7|M>>>25,M=S+N|0,A^=M<<9|M>>>23,M=A+S|0,O^=M<<13|M>>>19,M=O+A|0,N^=M<<18|M>>>14,M=w+S|0,_^=M<<7|M>>>25,M=_+w|0,k^=M<<9|M>>>23,M=k+_|0,S^=M<<13|M>>>19,M=S+k|0,w^=M<<18|M>>>14,M=x+E|0,C^=M<<7|M>>>25,M=C+x|0,A^=M<<9|M>>>23,M=A+C|0,E^=M<<13|M>>>19,M=E+A|0,x^=M<<18|M>>>14,M=j+T|0,O^=M<<7|M>>>25,M=O+j|0,I^=M<<9|M>>>23,M=I+O|0,T^=M<<13|M>>>19,M=T+I|0,j^=M<<18|M>>>14,M=N+R|0,P^=M<<7|M>>>25,M=P+N|0,B^=M<<9|M>>>23,M=B+P|0,R^=M<<13|M>>>19,M=R+B|0,N^=M<<18|M>>>14;e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=j>>>0&255,e[9]=j>>>8&255,e[10]=j>>>16&255,e[11]=j>>>24&255,e[12]=N>>>0&255,e[13]=N>>>8&255,e[14]=N>>>16&255,e[15]=N>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=I>>>0&255,e[25]=I>>>8&255,e[26]=I>>>16&255,e[27]=I>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255}function w(e,t,n,r){b(e,t,n,r)}function _(e,t,n,r){v(e,t,n,r)}var k=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,n,r,i,o,s){var a=new Uint8Array(16),u=new Uint8Array(64),l,c;for(c=0;c<16;c++)a[c]=0;for(c=0;c<8;c++)a[c]=o[c];for(;i>=64;){for(w(u,a,s,k),c=0;c<64;c++)e[t+c]=n[r+c]^u[c];for(l=1,c=8;c<16;c++)l=l+(255&a[c])|0,a[c]=255&l,l>>>=8;i-=64,t+=64,r+=64}if(i>0)for(w(u,a,s,k),c=0;c<i;c++)e[t+c]=n[r+c]^u[c];return 0}function E(e,t,n,r,i){var o=new Uint8Array(16),s=new Uint8Array(64),a,u;for(u=0;u<16;u++)o[u]=0;for(u=0;u<8;u++)o[u]=r[u];for(;n>=64;){for(w(s,o,i,k),u=0;u<64;u++)e[t+u]=s[u];for(a=1,u=8;u<16;u++)a=a+(255&o[u])|0,o[u]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(w(s,o,i,k),u=0;u<n;u++)e[t+u]=s[u];return 0}function x(e,t,n,r,i){var o=new Uint8Array(32);_(o,r,i,k);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=r[a+16];return E(e,t,n,s,o)}function C(e,t,n,r,i,o,s){var a=new Uint8Array(32);_(a,o,s,k);for(var u=new Uint8Array(8),l=0;l<8;l++)u[l]=o[l+16];return S(e,t,n,r,i,u,a)}var A=function(e){var t,n,r,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function I(e,t,n,r,i,o){var s=new A(o);return s.update(n,r,i),s.finish(e,t),0}function T(e,t,n,r,i,o){var s=new Uint8Array(16);return I(s,0,n,r,i,o),g(e,t,s,0)}function j(e,t,n,r,i){var o;if(n<32)return-1;for(C(e,0,t,0,n,r,i),I(e,16,e,32,n-32,e),o=0;o<16;o++)e[o]=0;return 0}function O(e,t,n,r,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(x(s,0,32,r,i),0!==T(t,16,t,32,n-32,s))return-1;for(C(e,0,t,0,n,r,i),o=0;o<32;o++)e[o]=0;return 0}function P(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function B(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function R(e,t,n){for(var r,i=~(n-1),o=0;o<16;o++)r=i&(e[o]^t[o]),e[o]^=r,t[o]^=r}function N(e,n){var r,i,o,s=t(),a=t();for(r=0;r<16;r++)a[r]=n[r];for(B(a),B(a),B(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,R(a,s,1-o)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function M(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return N(n,e),N(r,t),y(n,0,r,0)}function L(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function F(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function z(e,t,n){var r,i,o=0,s=0,a=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,b=0,v=0,w=0,_=0,k=0,S=0,E=0,x=0,C=0,A=0,I=0,T=0,j=0,O=0,P=0,B=0,R=0,N=0,M=n[0],L=n[1],F=n[2],D=n[3],U=n[4],z=n[5],q=n[6],K=n[7],H=n[8],V=n[9],W=n[10],$=n[11],G=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],o+=r*M,s+=r*L,a+=r*F,u+=r*D,l+=r*U,c+=r*z,f+=r*q,h+=r*K,p+=r*H,d+=r*V,m+=r*W,g+=r*$,y+=r*G,b+=r*Y,v+=r*J,w+=r*Z,r=t[1],s+=r*M,a+=r*L,u+=r*F,l+=r*D,c+=r*U,f+=r*z,h+=r*q,p+=r*K,d+=r*H,m+=r*V,g+=r*W,y+=r*$,b+=r*G,v+=r*Y,w+=r*J,_+=r*Z,r=t[2],a+=r*M,u+=r*L,l+=r*F,c+=r*D,f+=r*U,h+=r*z,p+=r*q,d+=r*K,m+=r*H,g+=r*V,y+=r*W,b+=r*$,v+=r*G,w+=r*Y,_+=r*J,k+=r*Z,r=t[3],u+=r*M,l+=r*L,c+=r*F,f+=r*D,h+=r*U,p+=r*z,d+=r*q,m+=r*K,g+=r*H,y+=r*V,b+=r*W,v+=r*$,w+=r*G,_+=r*Y,k+=r*J,S+=r*Z,r=t[4],l+=r*M,c+=r*L,f+=r*F,h+=r*D,p+=r*U,d+=r*z,m+=r*q,g+=r*K,y+=r*H,b+=r*V,v+=r*W,w+=r*$,_+=r*G,k+=r*Y,S+=r*J,E+=r*Z,r=t[5],c+=r*M,f+=r*L,h+=r*F,p+=r*D,d+=r*U,m+=r*z,g+=r*q,y+=r*K,b+=r*H,v+=r*V,w+=r*W,_+=r*$,k+=r*G,S+=r*Y,E+=r*J,x+=r*Z,r=t[6],f+=r*M,h+=r*L,p+=r*F,d+=r*D,m+=r*U,g+=r*z,y+=r*q,b+=r*K,v+=r*H,w+=r*V,_+=r*W,k+=r*$,S+=r*G,E+=r*Y,x+=r*J,C+=r*Z,r=t[7],h+=r*M,p+=r*L,d+=r*F,m+=r*D,g+=r*U,y+=r*z,b+=r*q,v+=r*K,w+=r*H,_+=r*V,k+=r*W,S+=r*$,E+=r*G,x+=r*Y,C+=r*J,A+=r*Z,r=t[8],p+=r*M,d+=r*L,m+=r*F,g+=r*D,y+=r*U,b+=r*z,v+=r*q,w+=r*K,_+=r*H,k+=r*V,S+=r*W,E+=r*$,x+=r*G,C+=r*Y,A+=r*J,I+=r*Z,r=t[9],d+=r*M,m+=r*L,g+=r*F,y+=r*D,b+=r*U,v+=r*z,w+=r*q,_+=r*K,k+=r*H,S+=r*V,E+=r*W,x+=r*$,C+=r*G,A+=r*Y,I+=r*J,T+=r*Z,r=t[10],m+=r*M,g+=r*L,y+=r*F,b+=r*D,v+=r*U,w+=r*z,_+=r*q,k+=r*K,S+=r*H,E+=r*V,x+=r*W,C+=r*$,A+=r*G,I+=r*Y,T+=r*J,j+=r*Z,r=t[11],g+=r*M,y+=r*L,b+=r*F,v+=r*D,w+=r*U,_+=r*z,k+=r*q,S+=r*K,E+=r*H,x+=r*V,C+=r*W,A+=r*$,I+=r*G,T+=r*Y,j+=r*J,O+=r*Z,r=t[12],y+=r*M,b+=r*L,v+=r*F,w+=r*D,_+=r*U,k+=r*z,S+=r*q,E+=r*K,x+=r*H,C+=r*V,A+=r*W,I+=r*$,T+=r*G,j+=r*Y,O+=r*J,P+=r*Z,r=t[13],b+=r*M,v+=r*L,w+=r*F,_+=r*D,k+=r*U,S+=r*z,E+=r*q,x+=r*K,C+=r*H,A+=r*V,I+=r*W,T+=r*$,j+=r*G,O+=r*Y,P+=r*J,B+=r*Z,r=t[14],v+=r*M,w+=r*L,_+=r*F,k+=r*D,S+=r*U,E+=r*z,x+=r*q,C+=r*K,A+=r*H,I+=r*V,T+=r*W,j+=r*$,O+=r*G,P+=r*Y,B+=r*J,R+=r*Z,r=t[15],w+=r*M,_+=r*L,k+=r*F,S+=r*D,E+=r*U,x+=r*z,C+=r*q,A+=r*K,I+=r*H,T+=r*V,j+=r*W,O+=r*$,P+=r*G,B+=r*Y,R+=r*J,N+=r*Z,o+=38*_,s+=38*k,a+=38*S,u+=38*E,l+=38*x,c+=38*C,f+=38*A,h+=38*I,p+=38*T,d+=38*j,m+=38*O,g+=38*P,y+=38*B,b+=38*R,v+=38*N,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function q(e,t){z(e,t,t)}function K(e,n){var r=t(),i;for(i=0;i<16;i++)r[i]=n[i];for(i=253;i>=0;i--)q(r,r),2!==i&&4!==i&&z(r,r,n);for(i=0;i<16;i++)e[i]=r[i]}function H(e,n){var r=t(),i;for(i=0;i<16;i++)r[i]=n[i];for(i=250;i>=0;i--)q(r,r),1!==i&&z(r,r,n);for(i=0;i<16;i++)e[i]=r[i]}function V(e,n,r){var i=new Uint8Array(32),o=new Float64Array(80),s,a,l=t(),c=t(),f=t(),h=t(),p=t(),d=t();for(a=0;a<31;a++)i[a]=n[a];for(i[31]=127&n[31]|64,i[0]&=248,F(o,r),a=0;a<16;a++)c[a]=o[a],h[a]=l[a]=f[a]=0;for(l[0]=h[0]=1,a=254;a>=0;--a)s=i[a>>>3]>>>(7&a)&1,R(l,c,s),R(f,h,s),D(p,l,f),U(l,l,f),D(f,c,h),U(c,c,h),q(h,p),q(d,l),z(l,f,l),z(f,c,p),D(p,l,f),U(l,l,f),q(c,l),U(f,h,d),z(l,f,u),D(l,l,h),z(f,f,l),z(l,h,d),z(h,c,o),q(c,p),R(l,c,s),R(f,h,s);for(a=0;a<16;a++)o[a+16]=l[a],o[a+32]=f[a],o[a+48]=c[a],o[a+64]=h[a];var m=o.subarray(32),g=o.subarray(16);return K(m,m),z(g,g,m),N(e,g),0}function W(e,t){return V(e,t,o)}function $(e,t){return r(t,32),W(e,t)}function G(e,t,n){var r=new Uint8Array(32);return V(r,n,t),_(e,i,r,k)}A.prototype.blocks=function(e,t,n){for(var r=this.fin?0:2048,i,o,s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S=this.h[0],E=this.h[1],x=this.h[2],C=this.h[3],A=this.h[4],I=this.h[5],T=this.h[6],j=this.h[7],O=this.h[8],P=this.h[9],B=this.r[0],R=this.r[1],N=this.r[2],M=this.r[3],L=this.r[4],F=this.r[5],D=this.r[6],U=this.r[7],z=this.r[8],q=this.r[9];n>=16;)i=255&e[t+0]|(255&e[t+1])<<8,S+=8191&i,o=255&e[t+2]|(255&e[t+3])<<8,E+=8191&(i>>>13|o<<3),s=255&e[t+4]|(255&e[t+5])<<8,x+=8191&(o>>>10|s<<6),a=255&e[t+6]|(255&e[t+7])<<8,C+=8191&(s>>>7|a<<9),u=255&e[t+8]|(255&e[t+9])<<8,A+=8191&(a>>>4|u<<12),I+=u>>>1&8191,l=255&e[t+10]|(255&e[t+11])<<8,T+=8191&(u>>>14|l<<2),c=255&e[t+12]|(255&e[t+13])<<8,j+=8191&(l>>>11|c<<5),f=255&e[t+14]|(255&e[t+15])<<8,O+=8191&(c>>>8|f<<8),P+=f>>>5|r,h=0,p=h,p+=S*B,p+=E*(5*q),p+=x*(5*z),p+=C*(5*U),p+=A*(5*D),h=p>>>13,p&=8191,p+=I*(5*F),p+=T*(5*L),p+=j*(5*M),p+=O*(5*N),p+=P*(5*R),h+=p>>>13,p&=8191,d=h,d+=S*R,d+=E*B,d+=x*(5*q),d+=C*(5*z),d+=A*(5*U),h=d>>>13,d&=8191,d+=I*(5*D),d+=T*(5*F),d+=j*(5*L),d+=O*(5*M),d+=P*(5*N),h+=d>>>13,d&=8191,m=h,m+=S*N,m+=E*R,m+=x*B,m+=C*(5*q),m+=A*(5*z),h=m>>>13,m&=8191,m+=I*(5*U),m+=T*(5*D),m+=j*(5*F),m+=O*(5*L),m+=P*(5*M),h+=m>>>13,m&=8191,g=h,g+=S*M,g+=E*N,g+=x*R,g+=C*B,g+=A*(5*q),h=g>>>13,g&=8191,g+=I*(5*z),g+=T*(5*U),g+=j*(5*D),g+=O*(5*F),g+=P*(5*L),h+=g>>>13,g&=8191,y=h,y+=S*L,y+=E*M,y+=x*N,y+=C*R,y+=A*B,h=y>>>13,y&=8191,y+=I*(5*q),y+=T*(5*z),y+=j*(5*U),y+=O*(5*D),y+=P*(5*F),h+=y>>>13,y&=8191,b=h,b+=S*F,b+=E*L,b+=x*M,b+=C*N,b+=A*R,h=b>>>13,b&=8191,b+=I*B,b+=T*(5*q),b+=j*(5*z),b+=O*(5*U),b+=P*(5*D),h+=b>>>13,b&=8191,v=h,v+=S*D,v+=E*F,v+=x*L,v+=C*M,v+=A*N,h=v>>>13,v&=8191,v+=I*R,v+=T*B,v+=j*(5*q),v+=O*(5*z),v+=P*(5*U),h+=v>>>13,v&=8191,w=h,w+=S*U,w+=E*D,w+=x*F,w+=C*L,w+=A*M,h=w>>>13,w&=8191,w+=I*N,w+=T*R,w+=j*B,w+=O*(5*q),w+=P*(5*z),h+=w>>>13,w&=8191,_=h,_+=S*z,_+=E*U,_+=x*D,_+=C*F,_+=A*L,h=_>>>13,_&=8191,_+=I*M,_+=T*N,_+=j*R,_+=O*B,_+=P*(5*q),h+=_>>>13,_&=8191,k=h,k+=S*q,k+=E*z,k+=x*U,k+=C*D,k+=A*F,h=k>>>13,k&=8191,k+=I*L,k+=T*M,k+=j*N,k+=O*R,k+=P*B,h+=k>>>13,k&=8191,h=(h<<2)+h|0,h=h+p|0,p=8191&h,h>>>=13,d+=h,S=p,E=d,x=m,C=g,A=y,I=b,T=v,j=w,O=_,P=k,t+=16,n-=16;this.h[0]=S,this.h[1]=E,this.h[2]=x,this.h[3]=C,this.h[4]=A,this.h[5]=I,this.h[6]=T,this.h[7]=j,this.h[8]=O,this.h[9]=P},A.prototype.finish=function(e,t){var n=new Uint16Array(10),r,i,o,s;if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=r,r=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,n[0]=this.h[0]+5,r=n[0]>>>13,n[0]&=8191,s=1;s<10;s++)n[s]=this.h[s]+r,r=n[s]>>>13,n[s]&=8191;for(n[9]-=8192,i=(1^r)-1,s=0;s<10;s++)n[s]&=i;for(i=~i,s=0;s<10;s++)this.h[s]=this.h[s]&i|n[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,s=1;s<8;s++)o=(this.h[s]+this.pad[s]|0)+(o>>>16)|0,this.h[s]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,n){var r,i;if(this.leftover){for(i=16-this.leftover,i>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var Y=j,J=O;function Z(e,t,n,r,i,o){var s=new Uint8Array(32);return G(s,i,o),Y(e,t,n,r,s)}function X(e,t,n,r,i,o){var s=new Uint8Array(32);return G(s,i,o),J(e,t,n,r,s)}var Q=[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 ee(e,t,n,r){for(var i=new Int32Array(16),o=new Int32Array(16),s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S,E,x,C,A,I,T,j,O,P=e[0],B=e[1],R=e[2],N=e[3],M=e[4],L=e[5],F=e[6],D=e[7],U=t[0],z=t[1],q=t[2],K=t[3],H=t[4],V=t[5],W=t[6],$=t[7],G=0;r>=128;){for(E=0;E<16;E++)x=8*E+G,i[E]=n[x+0]<<24|n[x+1]<<16|n[x+2]<<8|n[x+3],o[E]=n[x+4]<<24|n[x+5]<<16|n[x+6]<<8|n[x+7];for(E=0;E<80;E++)if(s=P,a=B,u=R,l=N,c=M,f=L,h=F,p=D,d=U,m=z,g=q,y=K,b=H,v=V,w=W,_=$,C=D,A=$,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=(M>>>14|H<<18)^(M>>>18|H<<14)^(H>>>9|M<<23),A=(H>>>14|M<<18)^(H>>>18|M<<14)^(M>>>9|H<<23),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=M&L^~M&F,A=H&V^~H&W,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=Q[2*E],A=Q[2*E+1],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=i[E%16],A=o[E%16],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,k=65535&j|O<<16,S=65535&I|T<<16,C=k,A=S,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=(P>>>28|U<<4)^(U>>>2|P<<30)^(U>>>7|P<<25),A=(U>>>28|P<<4)^(P>>>2|U<<30)^(P>>>7|U<<25),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=P&B^P&R^B&R,A=U&z^U&q^z&q,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,p=65535&j|O<<16,_=65535&I|T<<16,C=l,A=y,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=k,A=S,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,l=65535&j|O<<16,y=65535&I|T<<16,B=s,R=a,N=u,M=l,L=c,F=f,D=h,P=p,z=d,q=m,K=g,H=y,V=b,W=v,$=w,U=_,E%16==15)for(x=0;x<16;x++)C=i[x],A=o[x],I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=i[(x+9)%16],A=o[(x+9)%16],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,k=i[(x+1)%16],S=o[(x+1)%16],C=(k>>>1|S<<31)^(k>>>8|S<<24)^k>>>7,A=(S>>>1|k<<31)^(S>>>8|k<<24)^(S>>>7|k<<25),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,k=i[(x+14)%16],S=o[(x+14)%16],C=(k>>>19|S<<13)^(S>>>29|k<<3)^k>>>6,A=(S>>>19|k<<13)^(k>>>29|S<<3)^(S>>>6|k<<26),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,i[x]=65535&j|O<<16,o[x]=65535&I|T<<16;C=P,A=U,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[0],A=t[0],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[0]=P=65535&j|O<<16,t[0]=U=65535&I|T<<16,C=B,A=z,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[1],A=t[1],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[1]=B=65535&j|O<<16,t[1]=z=65535&I|T<<16,C=R,A=q,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[2],A=t[2],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[2]=R=65535&j|O<<16,t[2]=q=65535&I|T<<16,C=N,A=K,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[3],A=t[3],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[3]=N=65535&j|O<<16,t[3]=K=65535&I|T<<16,C=M,A=H,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[4],A=t[4],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[4]=M=65535&j|O<<16,t[4]=H=65535&I|T<<16,C=L,A=V,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[5],A=t[5],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[5]=L=65535&j|O<<16,t[5]=V=65535&I|T<<16,C=F,A=W,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[6],A=t[6],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[6]=F=65535&j|O<<16,t[6]=W=65535&I|T<<16,C=D,A=$,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[7],A=t[7],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[7]=D=65535&j|O<<16,t[7]=$=65535&I|T<<16,G+=128,r-=128}return r}function te(e,t,n){var r=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),s,a=n;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,ee(r,i,t,n),n%=128,s=0;s<n;s++)o[s]=t[a-n+s];for(o[n]=128,n=256-128*(n<112?1:0),o[n-9]=0,d(o,n-8,a/536870912|0,a<<3),ee(r,i,o,n),s=0;s<8;s++)d(e,8*s,r[s],i[s]);return 0}function ne(e,n){var r=t(),i=t(),o=t(),s=t(),a=t(),u=t(),l=t(),f=t(),h=t();U(r,e[1],e[0]),U(h,n[1],n[0]),z(r,r,h),D(i,e[0],e[1]),D(h,n[0],n[1]),z(i,i,h),z(o,e[3],n[3]),z(o,o,c),z(s,e[2],n[2]),D(s,s,s),U(a,i,r),U(u,s,o),D(l,s,o),D(f,i,r),z(e[0],a,u),z(e[1],f,l),z(e[2],l,u),z(e[3],a,f)}function re(e,t,n){var r;for(r=0;r<4;r++)R(e[r],t[r],n)}function ie(e,n){var r=t(),i=t(),o=t();K(o,n[2]),z(r,n[0],o),z(i,n[1],o),N(e,i),e[31]^=L(r)<<7}function oe(e,t,n){var r,i;for(P(e[0],s),P(e[1],a),P(e[2],a),P(e[3],s),i=255;i>=0;--i)r=n[i/8|0]>>(7&i)&1,re(e,t,r),ne(t,e),ne(e,e),re(e,t,r)}function se(e,n){var r=[t(),t(),t(),t()];P(r[0],f),P(r[1],h),P(r[2],a),z(r[3],f,h),oe(e,r,n)}function ae(e,n,i){var o=new Uint8Array(64),s=[t(),t(),t(),t()],a;for(i||r(n,32),te(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,se(s,o),ie(e,s),a=0;a<32;a++)n[a+32]=e[a];return 0}var ue=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function le(e,t){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*ue[i-(r-32)],n=t[i]+128>>8,t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ue[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ue[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ce(e){var t=new Float64Array(64),n;for(n=0;n<64;n++)t[n]=e[n];for(n=0;n<64;n++)e[n]=0;le(e,t)}function fe(e,n,r,i){var o=new Uint8Array(64),s=new Uint8Array(64),a=new Uint8Array(64),u,l,c=new Float64Array(64),f=[t(),t(),t(),t()];te(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var h=r+64;for(u=0;u<r;u++)e[64+u]=n[u];for(u=0;u<32;u++)e[32+u]=o[32+u];for(te(a,e.subarray(32),r+32),ce(a),se(f,a),ie(e,f),u=32;u<64;u++)e[u]=i[u];for(te(s,e,r+64),ce(s),u=0;u<64;u++)c[u]=0;for(u=0;u<32;u++)c[u]=a[u];for(u=0;u<32;u++)for(l=0;l<32;l++)c[u+l]+=s[u]*o[l];return le(e.subarray(32),c),h}function he(e,n){var r=t(),i=t(),o=t(),u=t(),c=t(),f=t(),h=t();return P(e[2],a),F(e[1],n),q(o,e[1]),z(u,o,l),U(o,o,e[2]),D(u,e[2],u),q(c,u),q(f,c),z(h,f,c),z(r,h,o),z(r,r,u),H(r,r),z(r,r,o),z(r,r,u),z(r,r,u),z(e[0],r,u),q(i,e[0]),z(i,i,u),M(i,o)&&z(e[0],e[0],p),q(i,e[0]),z(i,i,u),M(i,o)?-1:(L(e[0])===n[31]>>7&&U(e[0],s,e[0]),z(e[3],e[0],e[1]),0)}function pe(e,n,r,i){var o,s,a=new Uint8Array(32),u=new Uint8Array(64),l=[t(),t(),t(),t()],c=[t(),t(),t(),t()];if(s=-1,r<64)return-1;if(he(c,i))return-1;for(o=0;o<r;o++)e[o]=n[o];for(o=0;o<32;o++)e[o+32]=i[o];if(te(u,e,r),ce(u),oe(l,c,u),se(c,n.subarray(32)),ne(l,c),ie(a,l),r-=64,y(n,0,a,0)){for(o=0;o<r;o++)e[o]=0;return-1}for(o=0;o<r;o++)e[o]=n[o+64];return s=r,s}var de=32,me=24,ge=32,ye=16,be=32,ve=32,we=32,_e=32,ke=32,Se=me,Ee=32,xe=16,Ce=64,Ae=32,Ie=64,Te=32,je=64;function Oe(e,t){if(e.length!==de)throw new Error("bad key size");if(t.length!==me)throw new Error("bad nonce size")}function Pe(e,t){if(e.length!==we)throw new Error("bad public key size");if(t.length!==_e)throw new Error("bad secret key size")}function Be(){var e,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(e=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+e+", use Uint8Array")}function Re(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:_,crypto_stream_xor:C,crypto_stream:x,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:E,crypto_onetimeauth:I,crypto_onetimeauth_verify:T,crypto_verify_16:g,crypto_verify_32:y,crypto_secretbox:j,crypto_secretbox_open:O,crypto_scalarmult:V,crypto_scalarmult_base:W,crypto_box_beforenm:G,crypto_box_afternm:Y,crypto_box:Z,crypto_box_open:X,crypto_box_keypair:$,crypto_hash:te,crypto_sign:fe,crypto_sign_keypair:ae,crypto_sign_open:pe,crypto_secretbox_KEYBYTES:de,crypto_secretbox_NONCEBYTES:me,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:we,crypto_box_SECRETKEYBYTES:_e,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:Se,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},e.util||(e.util={},e.util.decodeUTF8=e.util.encodeUTF8=e.util.encodeBase64=e.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){Be(e,t,n),Oe(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),o=0;o<e.length;o++)r[o+32]=e[o];return j(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){Be(e,t,n),Oe(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),o=0;o<e.length;o++)r[o+16]=e[o];return!(r.length<32)&&(0===O(i,r,r.length,t,n)&&i.subarray(32))},e.secretbox.keyLength=de,e.secretbox.nonceLength=me,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(Be(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return V(n,e,t),n},e.scalarMult.base=function(e){if(Be(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return W(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var o=e.box.before(r,i);return e.secretbox(t,n,o)},e.box.before=function(e,t){Be(e,t),Pe(e,t);var n=new Uint8Array(32);return G(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var o=e.box.before(r,i);return e.secretbox.open(t,n,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(we),t=new Uint8Array(_e);return $(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(Be(e),e.length!==_e)throw new Error("bad secret key size");var t=new Uint8Array(we);return W(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=we,e.box.secretKeyLength=_e,e.box.sharedKeyLength=32,e.box.nonceLength=Se,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(Be(e,t),64!==t.length)throw new Error("bad secret key size");var n=new Uint8Array(64+e.length);return fe(n,e,e.length,t),n},e.sign.open=function(e,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Be(e,t),32!==t.length)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=pe(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached.verify=function(e,t,n){if(Be(e,t,n),64!==t.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");var r=new Uint8Array(64+e.length),i=new Uint8Array(64+e.length),o;for(o=0;o<64;o++)r[o]=t[o];for(o=0;o<e.length;o++)r[o+64]=e[o];return pe(i,r,r.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ae(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(Be(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(Be(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),n=new Uint8Array(64),r=0;r<32;r++)n[r]=e[r];return ae(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){Be(e);var t=new Uint8Array(64);return te(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return Be(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===m(e,0,t,0,e.length))},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var r=65536;e.setPRNG(function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];Re(i)})}else t=n(1856),t&&t.randomBytes&&e.setPRNG(function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];Re(i)})}()}(e.exports?e.exports:self.nacl=self.nacl||{})},function(e,t,n){e.exports=o;var r=n(27),i=n(31).Buffer;function o(e){r.object(e,"options"),void 0!==e.buffer&&r.buffer(e.buffer,"options.buffer"),this._size=e.buffer?e.buffer.length:1024,this._buffer=e.buffer||i.alloc(this._size),this._offset=0}o.prototype.toBuffer=function(){return this._buffer.slice(0,this._offset)},o.prototype.atEnd=function(){return this._offset>=this._buffer.length},o.prototype.remainder=function(){return this._buffer.slice(this._offset)},o.prototype.skip=function(e){this._offset+=e},o.prototype.expand=function(){this._size*=2;var e=i.alloc(this._size);this._buffer.copy(e,0),this._buffer=e},o.prototype.readPart=function(){return{data:this.readBuffer()}},o.prototype.readBuffer=function(){var e=this._buffer.readUInt32BE(this._offset);this._offset+=4,r.ok(this._offset+e<=this._buffer.length,"length out of bounds at +0x"+this._offset.toString(16)+" (data truncated?)");var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},o.prototype.readString=function(){return this.readBuffer().toString()},o.prototype.readCString=function(){for(var e=this._offset;e<this._buffer.length&&0!==this._buffer[e];)e++;r.ok(e<this._buffer.length,"c string does not terminate");var t=this._buffer.slice(this._offset,e).toString();return this._offset=e+1,t},o.prototype.readInt=function(){var e=this._buffer.readUInt32BE(this._offset);return this._offset+=4,e},o.prototype.readInt64=function(){r.ok(this._offset+8<this._buffer.length,"buffer not long enough to read Int64");var e=this._buffer.slice(this._offset,this._offset+8);return this._offset+=8,e},o.prototype.readChar=function(){var e=this._buffer[this._offset++];return e},o.prototype.writeBuffer=function(e){for(;this._offset+4+e.length>this._size;)this.expand();this._buffer.writeUInt32BE(e.length,this._offset),this._offset+=4,e.copy(this._buffer,this._offset),this._offset+=e.length},o.prototype.writeString=function(e){this.writeBuffer(i.from(e,"utf8"))},o.prototype.writeCString=function(e){for(;this._offset+1+e.length>this._size;)this.expand();this._buffer.write(e,this._offset),this._offset+=e.length,this._buffer[this._offset++]=0},o.prototype.writeInt=function(e){for(;this._offset+4>this._size;)this.expand();this._buffer.writeUInt32BE(e,this._offset),this._offset+=4},o.prototype.writeInt64=function(e){if(r.buffer(e,"value"),e.length>8){for(var t=e.slice(0,e.length-8),n=0;n<t.length;++n)r.strictEqual(t[n],0,"must fit in 64 bits of precision");e=e.slice(e.length-8,e.length)}for(;this._offset+8>this._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=8},o.prototype.writeChar=function(e){for(;this._offset+1>this._size;)this.expand();this._buffer[this._offset++]=e},o.prototype.writePart=function(e){this.writeBuffer(e.data)},o.prototype.write=function(e){for(;this._offset+e.length>this._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=e.length}},function(e,t,n){e.exports={read:f,readPkcs8:d,write:h,writePkcs8:A,pkcs8ToBuffer:C,readECDSACurve:v,writeECDSACurve:P};var r=n(27),i=n(103),o=n(31).Buffer,s=n(55),a=n(47),u=n(46),l=n(50),c=n(113);function f(e,t){return c.read(e,t,"pkcs8")}function h(e,t){return c.write(e,t,"pkcs8")}function p(e,t){return r.strictEqual(e.peek(),i.Ber.Integer,t+" is not an Integer"),a.mpNormalize(e.readString(i.Ber.Integer,!0))}function d(e,t,n){n.peek()===i.Ber.Integer&&(r.strictEqual(t,"private","unexpected Integer at start of public key"),n.readString(i.Ber.Integer,!0)),n.readSequence();var o=n.offset+n.length,s=n.readOID();switch(s){case"1.2.840.113549.1.1.1":return n._offset=o,"public"===t?m(n):g(n);case"1.2.840.10040.4.1":return"public"===t?y(n):b(n);case"1.2.840.10045.2.1":return"public"===t?_(n):w(n);case"1.3.101.112":return"public"===t?k(n):E(n);case"1.3.101.110":return"public"===t?S(n):x(n);default:throw new Error("Unknown key type OID "+s)}}function m(e){e.readSequence(i.Ber.BitString),e.readByte(),e.readSequence();var t=p(e,"modulus"),n=p(e,"exponent"),r={type:"rsa",source:e.originalInput,parts:[{name:"e",data:n},{name:"n",data:t}]};return new u(r)}function g(e){e.readSequence(i.Ber.OctetString),e.readSequence();var t=p(e,"version");r.equal(t[0],0,"unknown RSA private key version");var n=p(e,"modulus"),o=p(e,"public exponent"),s=p(e,"private exponent"),a=p(e,"prime1"),u=p(e,"prime2"),c=p(e,"exponent1"),f=p(e,"exponent2"),h=p(e,"iqmp"),d={type:"rsa",parts:[{name:"n",data:n},{name:"e",data:o},{name:"d",data:s},{name:"iqmp",data:h},{name:"p",data:a},{name:"q",data:u},{name:"dmodp",data:c},{name:"dmodq",data:f}]};return new l(d)}function y(e){e.readSequence();var t=p(e,"p"),n=p(e,"q"),r=p(e,"g");e.readSequence(i.Ber.BitString),e.readByte();var o=p(e,"y"),s={type:"dsa",parts:[{name:"p",data:t},{name:"q",data:n},{name:"g",data:r},{name:"y",data:o}]};return new u(s)}function b(e){e.readSequence();var t=p(e,"p"),n=p(e,"q"),r=p(e,"g");e.readSequence(i.Ber.OctetString);var o=p(e,"x"),s=a.calculateDSAPublic(r,t,o),u={type:"dsa",parts:[{name:"p",data:t},{name:"q",data:n},{name:"g",data:r},{name:"y",data:s},{name:"x",data:o}]};return new l(u)}function v(e){var t,n,u,l,c;if(e.peek()===i.Ber.OID){var f=e.readOID();for(n=Object.keys(s.curves),u=0;u<n.length;++u)if(l=n[u],c=s.curves[l],c.pkcs8oid===f){t=l;break}}else{e.readSequence();var h=e.readString(i.Ber.Integer,!0);r.strictEqual(h[0],1,"ECDSA key not version 1");var p={};e.readSequence();var d=e.readOID();r.strictEqual(d,"1.2.840.10045.1.1","ECDSA key is not from a prime-field");var m=p.p=a.mpNormalize(e.readString(i.Ber.Integer,!0));p.size=8*m.length-a.countZeros(m),e.readSequence(),p.a=a.mpNormalize(e.readString(i.Ber.OctetString,!0)),p.b=a.mpNormalize(e.readString(i.Ber.OctetString,!0)),e.peek()===i.Ber.BitString&&(p.s=e.readString(i.Ber.BitString,!0)),p.G=e.readString(i.Ber.OctetString,!0),r.strictEqual(p.G[0],4,"uncompressed G is required"),p.n=a.mpNormalize(e.readString(i.Ber.Integer,!0)),p.h=a.mpNormalize(e.readString(i.Ber.Integer,!0)),r.strictEqual(p.h[0],1,"a cofactor=1 curve is required"),n=Object.keys(s.curves);var g=Object.keys(p);for(u=0;u<n.length;++u){l=n[u],c=s.curves[l];for(var y=!0,b=0;b<g.length;++b){var v=g[b];if(void 0!==c[v])if("object"==typeof c[v]&&void 0!==c[v].equals){if(!c[v].equals(p[v])){y=!1;break}}else if(o.isBuffer(c[v])){if(c[v].toString("binary")!==p[v].toString("binary")){y=!1;break}}else if(c[v]!==p[v]){y=!1;break}}if(y){t=l;break}}}return t}function w(e){var t=v(e);r.string(t,"a known elliptic curve"),e.readSequence(i.Ber.OctetString),e.readSequence();var n=p(e,"version");r.equal(n[0],1,"unknown version of ECDSA key");var s=e.readString(i.Ber.OctetString,!0),u;if(160==e.peek()&&(e.readSequence(160),e._offset+=e.length),161==e.peek()&&(e.readSequence(161),u=e.readString(i.Ber.BitString,!0),u=a.ecNormalize(u)),void 0===u){var c=a.publicFromPrivateECDSA(t,s);u=c.part.Q.data}var f={type:"ecdsa",parts:[{name:"curve",data:o.from(t)},{name:"Q",data:u},{name:"d",data:s}]};return new l(f)}function _(e){var t=v(e);r.string(t,"a known elliptic curve");var n=e.readString(i.Ber.BitString,!0);n=a.ecNormalize(n);var s={type:"ecdsa",parts:[{name:"curve",data:o.from(t)},{name:"Q",data:n}]};return new u(s)}function k(e){0===e.peek()&&e.readByte();var t=a.readBitString(e),n={type:"ed25519",parts:[{name:"A",data:a.zeroPadToLength(t,32)}]};return new u(n)}function S(e){var t=a.readBitString(e),n={type:"curve25519",parts:[{name:"A",data:a.zeroPadToLength(t,32)}]};return new u(n)}function E(e){0===e.peek()&&e.readByte(),e.readSequence(i.Ber.OctetString);var t=e.readString(i.Ber.OctetString,!0),n;t=a.zeroPadToLength(t,32),e.peek()===i.Ber.BitString?(n=a.readBitString(e),n=a.zeroPadToLength(n,32)):n=a.calculateED25519Public(t);var r={type:"ed25519",parts:[{name:"A",data:a.zeroPadToLength(n,32)},{name:"k",data:a.zeroPadToLength(t,32)}]};return new l(r)}function x(e){0===e.peek()&&e.readByte(),e.readSequence(i.Ber.OctetString);var t=e.readString(i.Ber.OctetString,!0);t=a.zeroPadToLength(t,32);var n=a.calculateX25519Public(t),r={type:"curve25519",parts:[{name:"A",data:a.zeroPadToLength(n,32)},{name:"k",data:a.zeroPadToLength(t,32)}]};return new l(r)}function C(e){var t=new i.BerWriter;return A(t,e),t.buffer}function A(e,t){if(e.startSequence(),l.isPrivateKey(t)){var n=o.from([0]);e.writeBuffer(n,i.Ber.Integer)}switch(e.startSequence(),t.type){case"rsa":e.writeOID("1.2.840.113549.1.1.1"),l.isPrivateKey(t)?I(t,e):T(t,e);break;case"dsa":e.writeOID("1.2.840.10040.4.1"),l.isPrivateKey(t)?j(t,e):O(t,e);break;case"ecdsa":e.writeOID("1.2.840.10045.2.1"),l.isPrivateKey(t)?R(t,e):B(t,e);break;case"ed25519":if(e.writeOID("1.3.101.112"),l.isPrivateKey(t))throw new Error("Ed25519 private keys in pkcs8 format are not supported");N(t,e);break;default:throw new Error("Unsupported key type: "+t.type)}e.endSequence()}function I(e,t){t.writeNull(),t.endSequence(),t.startSequence(i.Ber.OctetString),t.startSequence();var n=o.from([0]);t.writeBuffer(n,i.Ber.Integer),t.writeBuffer(e.part.n.data,i.Ber.Integer),t.writeBuffer(e.part.e.data,i.Ber.Integer),t.writeBuffer(e.part.d.data,i.Ber.Integer),t.writeBuffer(e.part.p.data,i.Ber.Integer),t.writeBuffer(e.part.q.data,i.Ber.Integer),e.part.dmodp&&e.part.dmodq||a.addRSAMissing(e),t.writeBuffer(e.part.dmodp.data,i.Ber.Integer),t.writeBuffer(e.part.dmodq.data,i.Ber.Integer),t.writeBuffer(e.part.iqmp.data,i.Ber.Integer),t.endSequence(),t.endSequence()}function T(e,t){t.writeNull(),t.endSequence(),t.startSequence(i.Ber.BitString),t.writeByte(0),t.startSequence(),t.writeBuffer(e.part.n.data,i.Ber.Integer),t.writeBuffer(e.part.e.data,i.Ber.Integer),t.endSequence(),t.endSequence()}function j(e,t){t.startSequence(),t.writeBuffer(e.part.p.data,i.Ber.Integer),t.writeBuffer(e.part.q.data,i.Ber.Integer),t.writeBuffer(e.part.g.data,i.Ber.Integer),t.endSequence(),t.endSequence(),t.startSequence(i.Ber.OctetString),t.writeBuffer(e.part.x.data,i.Ber.Integer),t.endSequence()}function O(e,t){t.startSequence(),t.writeBuffer(e.part.p.data,i.Ber.Integer),t.writeBuffer(e.part.q.data,i.Ber.Integer),t.writeBuffer(e.part.g.data,i.Ber.Integer),t.endSequence(),t.endSequence(),t.startSequence(i.Ber.BitString),t.writeByte(0),t.writeBuffer(e.part.y.data,i.Ber.Integer),t.endSequence()}function P(e,t){var n=s.curves[e.curve];if(n.pkcs8oid)t.writeOID(n.pkcs8oid);else{t.startSequence();var r=o.from([1]);t.writeBuffer(r,i.Ber.Integer),t.startSequence(),t.writeOID("1.2.840.10045.1.1"),t.writeBuffer(n.p,i.Ber.Integer),t.endSequence(),t.startSequence();var a=n.p;0===a[0]&&(a=a.slice(1)),t.writeBuffer(a,i.Ber.OctetString),t.writeBuffer(n.b,i.Ber.OctetString),t.writeBuffer(n.s,i.Ber.BitString),t.endSequence(),t.writeBuffer(n.G,i.Ber.OctetString),t.writeBuffer(n.n,i.Ber.Integer);var u=n.h;u||(u=o.from([1])),t.writeBuffer(u,i.Ber.Integer),t.endSequence()}}function B(e,t){P(e,t),t.endSequence();var n=a.ecNormalize(e.part.Q.data,!0);t.writeBuffer(n,i.Ber.BitString)}function R(e,t){P(e,t),t.endSequence(),t.startSequence(i.Ber.OctetString),t.startSequence();var n=o.from([1]);t.writeBuffer(n,i.Ber.Integer),t.writeBuffer(e.part.d.data,i.Ber.OctetString),t.startSequence(161);var r=a.ecNormalize(e.part.Q.data,!0);t.writeBuffer(r,i.Ber.BitString),t.endSequence(),t.endSequence(),t.endSequence()}function N(e,t){t.endSequence(),a.writeBitString(t,e.part.A.data)}function M(e,t){t.endSequence();var n=a.mpNormalize(e.part.k.data,!0);t.startSequence(i.Ber.OctetString),t.writeBuffer(n,i.Ber.OctetString),t.endSequence()}},function(e,t,n){e.exports=b;var r=n(27),i=n(31).Buffer,o=n(55),s=n(15),a=n(206),u=n(102),l=n(96),c=n(13),f=n(47),h=n(46),p=n(50),d=n(212),m={};m.openssh=n(1859),m.x509=n(717),m.pem=n(1860);var g=l.CertificateParseError,y=l.InvalidAlgorithmError;function b(e){r.object(e,"options"),r.arrayOfObject(e.subjects,"options.subjects"),f.assertCompatible(e.subjects[0],d,[1,0],"options.subjects"),f.assertCompatible(e.subjectKey,h,[1,0],"options.subjectKey"),f.assertCompatible(e.issuer,d,[1,0],"options.issuer"),void 0!==e.issuerKey&&f.assertCompatible(e.issuerKey,h,[1,0],"options.issuerKey"),r.object(e.signatures,"options.signatures"),r.buffer(e.serial,"options.serial"),r.date(e.validFrom,"options.validFrom"),r.date(e.validUntil,"optons.validUntil"),r.optionalArrayOfString(e.purposes,"options.purposes"),this._hashCache={},this.subjects=e.subjects,this.issuer=e.issuer,this.subjectKey=e.subjectKey,this.issuerKey=e.issuerKey,this.signatures=e.signatures,this.serial=e.serial,this.validFrom=e.validFrom,this.validUntil=e.validUntil,this.purposes=e.purposes}b.formats=m,b.prototype.toBuffer=function(e,t){return void 0===e&&(e="x509"),r.string(e,"format"),r.object(m[e],"formats[format]"),r.optionalObject(t,"options"),m[e].write(this,t)},b.prototype.toString=function(e,t){return void 0===e&&(e="pem"),this.toBuffer(e,t).toString()},b.prototype.fingerprint=function(e){void 0===e&&(e="sha256"),r.string(e,"algorithm");var t={type:"certificate",hash:this.hash(e),algorithm:e};return new a(t)},b.prototype.hash=function(e){if(r.string(e,"algorithm"),e=e.toLowerCase(),void 0===o.hashAlgs[e])throw new y(e);if(this._hashCache[e])return this._hashCache[e];var t=s.createHash(e).update(this.toBuffer("x509")).digest();return this._hashCache[e]=t,t},b.prototype.isExpired=function(e){return void 0===e&&(e=new Date),!(e.getTime()>=this.validFrom.getTime()&&e.getTime()<this.validUntil.getTime())},b.prototype.isSignedBy=function(e){return f.assertCompatible(e,b,[1,0],"issuer"),!!this.issuer.equals(e.subjects[0])&&(!(this.issuer.purposes&&this.issuer.purposes.length>0&&-1===this.issuer.purposes.indexOf("ca"))&&this.isSignedByKey(e.subjectKey))},b.prototype.getExtension=function(e){r.string(e,"keyOrOid");var t=this.getExtensions().filter(function(t){return"x509"===t.format?t.oid===e:"openssh"===t.format&&t.name===e})[0];return t},b.prototype.getExtensions=function(){var e=[],t=this.signatures.x509;t&&t.extras&&t.extras.exts&&t.extras.exts.forEach(function(t){t.format="x509",e.push(t)});var n=this.signatures.openssh;return n&&n.exts&&n.exts.forEach(function(t){t.format="openssh",e.push(t)}),e},b.prototype.isSignedByKey=function(e){if(f.assertCompatible(e,h,[1,2],"issuerKey"),void 0!==this.issuerKey)return this.issuerKey.fingerprint("sha512").matches(e);var t=Object.keys(this.signatures)[0],n=m[t].verify(this,e);return n&&(this.issuerKey=e),n},b.prototype.signWith=function(e){f.assertCompatible(e,p,[1,2],"key");for(var t=Object.keys(m),n=!1,r=0;r<t.length;++r)if("pem"!==t[r]){var i=m[t[r]].sign(this,e);!0===i&&(n=!0)}if(!n)throw new Error("Failed to sign the certificate for any available certificate formats")},b.createSelfSigned=function(e,t,n){var o;o=Array.isArray(e)?e:[e],r.arrayOfObject(o),o.forEach(function(e){f.assertCompatible(e,d,[1,0],"subject")}),f.assertCompatible(t,p,[1,2],"private key"),r.optionalObject(n,"options"),void 0===n&&(n={}),r.optionalObject(n.validFrom,"options.validFrom"),r.optionalObject(n.validUntil,"options.validUntil");var s=n.validFrom,a=n.validUntil;if(void 0===s&&(s=new Date),void 0===a){r.optionalNumber(n.lifetime,"options.lifetime");var u=n.lifetime;void 0===u&&(u=31536e4),a=new Date,a.setTime(a.getTime()+1e3*u)}r.optionalBuffer(n.serial,"options.serial");var l=n.serial;void 0===l&&(l=i.from("0000000000000001","hex"));var c=n.purposes;if(void 0===c&&(c=[]),-1===c.indexOf("signature")&&c.push("signature"),-1===c.indexOf("ca")&&c.push("ca"),-1===c.indexOf("crl")&&c.push("crl"),c.length<=3){var h=o.filter(function(e){return"host"===e.type}),m=o.filter(function(e){return"user"===e.type});h.length>0&&-1===c.indexOf("serverAuth")&&c.push("serverAuth"),m.length>0&&-1===c.indexOf("clientAuth")&&c.push("clientAuth"),(m.length>0||h.length>0)&&(-1===c.indexOf("keyAgreement")&&c.push("keyAgreement"),"rsa"===t.type&&-1===c.indexOf("encryption")&&c.push("encryption"))}var g=new b({subjects:o,issuer:o[0],subjectKey:t.toPublic(),issuerKey:t.toPublic(),signatures:{},serial:l,validFrom:s,validUntil:a,purposes:c});return g.signWith(t),g},b.create=function(e,t,n,o,s){var a;a=Array.isArray(e)?e:[e],r.arrayOfObject(a),a.forEach(function(e){f.assertCompatible(e,d,[1,0],"subject")}),f.assertCompatible(t,h,[1,0],"key"),p.isPrivateKey(t)&&(t=t.toPublic()),f.assertCompatible(n,d,[1,0],"issuer"),f.assertCompatible(o,p,[1,2],"issuer key"),r.optionalObject(s,"options"),void 0===s&&(s={}),r.optionalObject(s.validFrom,"options.validFrom"),r.optionalObject(s.validUntil,"options.validUntil");var u=s.validFrom,l=s.validUntil;if(void 0===u&&(u=new Date),void 0===l){r.optionalNumber(s.lifetime,"options.lifetime");var c=s.lifetime;void 0===c&&(c=31536e4),l=new Date,l.setTime(l.getTime()+1e3*c)}r.optionalBuffer(s.serial,"options.serial");var m=s.serial;void 0===m&&(m=i.from("0000000000000001","hex"));var g=s.purposes;void 0===g&&(g=[]),-1===g.indexOf("signature")&&g.push("signature"),!0===s.ca&&(-1===g.indexOf("ca")&&g.push("ca"),-1===g.indexOf("crl")&&g.push("crl"));var y=a.filter(function(e){return"host"===e.type}),v=a.filter(function(e){return"user"===e.type});y.length>0&&-1===g.indexOf("serverAuth")&&g.push("serverAuth"),v.length>0&&-1===g.indexOf("clientAuth")&&g.push("clientAuth"),(v.length>0||y.length>0)&&(-1===g.indexOf("keyAgreement")&&g.push("keyAgreement"),"rsa"===t.type&&-1===g.indexOf("encryption")&&g.push("encryption"));var w=new b({subjects:a,issuer:n,subjectKey:t,issuerKey:o.toPublic(),signatures:{},serial:m,validFrom:u,validUntil:l,purposes:g});return w.signWith(o),w},b.parse=function(e,t,n){"string"!=typeof e&&r.buffer(e,"data"),void 0===t&&(t="auto"),r.string(t,"format"),"string"==typeof n&&(n={filename:n}),r.optionalObject(n,"options"),void 0===n&&(n={}),r.optionalString(n.filename,"options.filename"),void 0===n.filename&&(n.filename="(unnamed)"),r.object(m[t],"formats[format]");try{var i=m[t].read(e,n);return i}catch(e){throw new g(n.filename,t,e)}},b.isCertificate=function(e,t){return f.isCompatible(e,b,t)},b.prototype._sshpkApiVersion=[1,1],b._oldVersionDetect=function(e){return[1,0]}},function(e,t,n){e.exports=g;var r=n(27),i=n(55),o=n(15),s=n(206),a=n(102),u=n(96),l=n(13),c=n(47),f=n(103),h=n(31).Buffer,p=/^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i,d={cn:"2.5.4.3",o:"2.5.4.10",ou:"2.5.4.11",l:"2.5.4.7",s:"2.5.4.8",c:"2.5.4.6",sn:"2.5.4.4",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",street:"2.5.4.9",x500UniqueIdentifier:"2.5.4.45",role:"2.5.4.72",telephoneNumber:"2.5.4.20",description:"2.5.4.13",dc:"0.9.2342.19200300.100.1.25",uid:"0.9.2342.19200300.100.1.1",mail:"0.9.2342.19200300.100.1.3",title:"2.5.4.12",gn:"2.5.4.42",initials:"2.5.4.43",pseudonym:"2.5.4.65",emailAddress:"1.2.840.113549.1.9.1"},m={};function g(e){var t=this;if(r.object(e,"options"),r.arrayOfObject(e.components,"options.components"),this.components=e.components,this.componentLookup={},this.components.forEach(function(e){e.name&&!e.oid&&(e.oid=d[e.name]),e.oid&&!e.name&&(e.name=m[e.oid]),void 0===t.componentLookup[e.name]&&(t.componentLookup[e.name]=[]),t.componentLookup[e.name].push(e)}),this.componentLookup.cn&&this.componentLookup.cn.length>0&&(this.cn=this.componentLookup.cn[0].value),r.optionalString(e.type,"options.type"),void 0===e.type)1===this.components.length&&this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(p)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.dc&&this.components.length===this.componentLookup.dc.length?(this.type="host",this.hostname=this.componentLookup.dc.map(function(e){return e.value}).join(".")):this.componentLookup.uid&&this.components.length===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(p)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.uid&&1===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.mail&&1===this.componentLookup.mail.length?(this.type="email",this.email=this.componentLookup.mail[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length?(this.type="user",this.uid=this.componentLookup.cn[0].value):this.type="unknown";else if(this.type=e.type,"host"===this.type)this.hostname=e.hostname;else if("user"===this.type)this.uid=e.uid;else{if("email"!==this.type)throw new Error("Unknown type "+this.type);this.email=e.email}}Object.keys(d).forEach(function(e){m[d[e]]=e}),g.prototype.toString=function(){return this.components.map(function(e){var t=e.name.toUpperCase();t=t.replace(/=/g,"\\=");var n=e.value;return n=n.replace(/,/g,"\\,"),t+"="+n}).join(", ")},g.prototype.get=function(e,t){r.string(e,"name");var n=this.componentLookup[e];if(void 0!==n&&0!==n.length){if(!t&&n.length>1)throw new Error("Multiple values for attribute "+e);return t?n.map(function(e){return e.value}):n[0].value}},g.prototype.toArray=function(e){return this.components.map(function(e){return{name:e.name,value:e.value}})};var y=/[^a-zA-Z0-9 '(),+.\/:=?-]/,b=/[^\x00-\x7f]/;function v(e,t){if("**"===e||"**"===t)return!0;var n=e.split("."),r=t.split(".");if(n.length!==r.length)return!1;for(var i=0;i<n.length;++i)if("*"!==n[i]&&"*"!==r[i]&&n[i]!==r[i])return!1;return!0}g.prototype.toAsn1=function(e,t){e.startSequence(t),this.components.forEach(function(t){if(e.startSequence(f.Ber.Constructor|f.Ber.Set),e.startSequence(),e.writeOID(t.oid),t.asn1type===f.Ber.Utf8String||t.value.match(b)){var n=h.from(t.value,"utf8");e.writeBuffer(n,f.Ber.Utf8String)}else if(t.asn1type===f.Ber.IA5String||t.value.match(y))e.writeString(t.value,f.Ber.IA5String);else{var r=f.Ber.PrintableString;void 0!==t.asn1type&&(r=t.asn1type),e.writeString(t.value,r)}e.endSequence(),e.endSequence()}),e.endSequence()},g.prototype.equals=function(e){if(!g.isIdentity(e,[1,0]))return!1;if(e.components.length!==this.components.length)return!1;for(var t=0;t<this.components.length;++t){if(this.components[t].oid!==e.components[t].oid)return!1;if(!v(this.components[t].value,e.components[t].value))return!1}return!0},g.forHost=function(e){return r.string(e,"hostname"),new g({type:"host",hostname:e,components:[{name:"cn",value:e}]})},g.forUser=function(e){return r.string(e,"uid"),new g({type:"user",uid:e,components:[{name:"uid",value:e}]})},g.forEmail=function(e){return r.string(e,"email"),new g({type:"email",email:e,components:[{name:"mail",value:e}]})},g.parseDN=function(e){r.string(e,"dn");for(var t=[""],n=0,i=e;i.length>0;){var o;if(null!==(o=/^,/.exec(i)))t[++n]="",i=i.slice(o[0].length);else if(null!==(o=/^\\,/.exec(i)))t[n]+=",",i=i.slice(o[0].length);else if(null!==(o=/^\\./.exec(i)))t[n]+=o[0],i=i.slice(o[0].length);else{if(null===(o=/^[^\\,]+/.exec(i)))throw new Error("Failed to parse DN");t[n]+=o[0],i=i.slice(o[0].length)}}var s=t.map(function(e){e=e.trim();for(var t=e.indexOf("=");t>0&&"\\"===e.charAt(t-1);)t=e.indexOf("=",t+1);if(-1===t)throw new Error("Failed to parse DN");var n=e.slice(0,t).toLowerCase().replace(/\\=/g,"="),r=e.slice(t+1);return{name:n,value:r}});return new g({components:s})},g.fromArray=function(e){return r.arrayOfObject(e,"components"),e.forEach(function(e){if(r.object(e,"component"),r.string(e.name,"component.name"),!h.isBuffer(e.value)&&"string"!=typeof e.value)throw new Error("Invalid component value")}),new g({components:e})},g.parseAsn1=function(e,t){var n=[];e.readSequence(t);for(var r=e.offset+e.length;e.offset<r;){e.readSequence(f.Ber.Constructor|f.Ber.Set);var i=e.offset+e.length;e.readSequence();var o=e.readOID(),s=e.peek(),a;switch(s){case f.Ber.PrintableString:case f.Ber.IA5String:case f.Ber.OctetString:case f.Ber.T61String:a=e.readString(s);break;case f.Ber.Utf8String:a=e.readString(s,!0),a=a.toString("utf8");break;case f.Ber.CharacterString:case f.Ber.BMPString:a=e.readString(s,!0),a=a.toString("utf16le");break;default:throw new Error("Unknown asn1 type "+s)}n.push({oid:o,asn1type:s,value:a}),e._offset=i}return e._offset=r,new g({components:n})},g.isIdentity=function(e,t){return c.isCompatible(e,g,t)},g.prototype._sshpkApiVersion=[1,0],g._oldVersionDetect=function(e){return[1,0]}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){var s=t&&!t.nodeType&&t,a=e&&!e.nodeType&&e,u="object"==typeof r&&r;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var l,c=2147483647,f=36,h=1,p=26,d=38,m=700,g=72,y=128,b="-",v=/^xn--/,w=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=f-h,E=Math.floor,x=String.fromCharCode,C;function A(e){throw new RangeError(k[e])}function I(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function T(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(_,".");var i=e.split("."),o=I(i,t).join(".");return r+o}function j(e){for(var t=[],n=0,r=e.length,i,o;n<r;)i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<r?(o=e.charCodeAt(n++),56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)):t.push(i);return t}function O(e){return I(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e),t}).join("")}function P(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:f}function B(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,n){var r=0;for(e=n?E(e/m):e>>1,e+=E(e/t);e>S*p>>1;r+=f)e=E(e/S);return E(r+(S+1)*e/(e+d))}function N(e){var t=[],n=e.length,r,i=0,o=y,s=g,a,u,l,d,m,v,w,_,k;for(a=e.lastIndexOf(b),a<0&&(a=0),u=0;u<a;++u)e.charCodeAt(u)>=128&&A("not-basic"),t.push(e.charCodeAt(u));for(l=a>0?a+1:0;l<n;){for(d=i,m=1,v=f;l>=n&&A("invalid-input"),w=P(e.charCodeAt(l++)),(w>=f||w>E((c-i)/m))&&A("overflow"),i+=w*m,_=v<=s?h:v>=s+p?p:v-s,!(w<_);v+=f)k=f-_,m>E(c/k)&&A("overflow"),m*=k;r=t.length+1,s=R(i-d,r,0==d),E(i/r)>c-o&&A("overflow"),o+=E(i/r),i%=r,t.splice(i++,0,o)}return O(t)}function M(e){var t,n,r,i,o,s,a,u,l,d,m,v=[],w,_,k,S;for(e=j(e),w=e.length,t=y,n=0,o=g,s=0;s<w;++s)m=e[s],m<128&&v.push(x(m));for(r=i=v.length,i&&v.push(b);r<w;){for(a=c,s=0;s<w;++s)m=e[s],m>=t&&m<a&&(a=m);for(_=r+1,a-t>E((c-n)/_)&&A("overflow"),n+=(a-t)*_,t=a,s=0;s<w;++s)if(m=e[s],m<t&&++n>c&&A("overflow"),m==t){for(u=n,l=f;d=l<=o?h:l>=o+p?p:l-o,!(u<d);l+=f)S=u-d,k=f-d,v.push(x(B(d+S%k,0))),u=E(S/k);v.push(x(B(u,0))),o=R(n,_,r==i),n=0,++r}++n,++t}return v.join("")}function L(e){return T(e,function(e){return v.test(e)?N(e.slice(4).toLowerCase()):e})}function F(e){return T(e,function(e){return w.test(e)?"xn--"+M(e):e})}l={version:"1.4.1",ucs2:{decode:j,encode:O},decode:N,encode:M,toASCII:F,toUnicode:L},i=function(){return l}.call(t,n,t,e),void 0===i||(e.exports=i)}(this)}).call(this,n(75)(e),n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=(0,i.default)(e)?w:_;r(e,(0,b.default)(t),n)};var r=n(171),i=v(r),o=n(291),s=v(o),a=n(389),u=v(a),l=n(219),c=v(l),f=n(67),h=v(f),p=n(216),d=v(p),m=n(133),g=v(m),y=n(42),b=v(y);function v(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){n=(0,d.default)(n||h.default);var r=0,i=0,o=e.length;function a(e,t){e?n(e):++i!==o&&t!==s.default||n(null)}for(0===o&&n(null);r<o;r++)t(e[r],r,(0,g.default)(a))}var _=(0,c.default)(u.default,1/0);e.exports=t.default},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";function r(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(215),i=l(r),o=n(393),s=l(o),a=n(218),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function c(e){return(0,s.default)(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}(0,i.default)(r)&&"function"==typeof r.then?r.then(function(e){f(n,null,e)},function(e){f(n,e.message?e:new Error(e))}):n(null,r)})}function f(e,t,n){try{e(t,n)}catch(e){(0,u.default)(h,e)}}function h(e){throw e}e.exports=t.default},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=l,t.wrap=c;var r=n(105),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}var s=t.hasSetImmediate="function"==typeof setImmediate&&setImmediate,a=t.hasNextTick="object"==typeof e&&"function"==typeof e.nextTick,u;function l(e){setTimeout(e,0)}function c(e){return function(t){var n=(0,i.default)(arguments,1);e(function(){t.apply(null,n)})}}u=s?setImmediate:a?e.nextTick:l,t.default=c(u)}).call(this,n(2))},function(e,t,n){"use strict";function r(e,t){return function(n,r,i){return e(n,t,r,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t){function n(e){return e<10?"0"+e:e}var r=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o,s,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},u;function l(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function c(e,t){var n,r,i,a,f=o,h,p=t[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),"function"==typeof u&&(p=u.call(t,e,p)),typeof p){case"string":return l(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(o+=s,h=[],"[object Array]"===Object.prototype.toString.apply(p)){for(a=p.length,n=0;n<a;n+=1)h[n]=c(n,p)||"null";return i=0===h.length?"[]":o?"[\n"+o+h.join(",\n"+o)+"\n"+f+"]":"["+h.join(",")+"]",o=f,i}if(u&&"object"==typeof u)for(a=u.length,n=0;n<a;n+=1)"string"==typeof u[n]&&(r=u[n],i=c(r,p),i&&h.push(l(r)+(o?": ":":")+i));else{var d=Object.keys(p).sort();for(n in d)r=d[n],Object.prototype.hasOwnProperty.call(p,r)&&(i=c(r,p),i&&h.push(l(r)+(o?": ":":")+i))}return i=0===h.length?"{}":o?"{\n"+o+h.join(",\n"+o)+"\n"+f+"}":"{"+h.join(",")+"}",o=f,i}}var f=function(e,t,n){var r;if(o="",s="","number"==typeof n)for(r=0;r<n;r+=1)s+=" ";else"string"==typeof n&&(s=n);if(u=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return c("",{"":e})};e.exports=f},function(e,t,n){"use strict";var r=n(176);e.exports=function e(t,n,i){i||(i=n,n=null);var o=r(function(e){n=t(n,e)},function(e){i(e,n)});return 2===arguments.length?function(e){e(null,function(t,r){if(t)return i(!0===t?null:t);n=r,o(e)})}:o}},function(e,t,n){"use strict";e.exports=function e(t,n){var r=!1;function i(e){!r&&n&&(r=!0,n(!0===e?null:e))}return function(e){return function(n,r){return n&&i(n),e(n,function(e,n){e?i(e):t&&t(n),r(e,n)})}}}},function(e,t,n){"use strict";var r=n(43),i=n(138);e.exports=function e(){return function(e){var t;return function(n,o){function s(){t(null,function(t,n){!0===t?a():t?e(!0,function(e){o(t)}):o(null,n)})}function a(){t=null,e(null,function(e,n){if(e)return o(e);Array.isArray(n)||n&&"object"==typeof n?n=r(n):"function"!=typeof n&&(n=i(n)),t=n,s()})}n?t?t(n,function(t){e(t||n,o)}):e(n,o):t?s():a()}}}},function(e,t,n){"use strict";const r=n(11),i=n(40),o=n(54),s=n(56),a=n(411),u=n(18),l=n(61),c=n(5),f=n(62),h=n(12),p=n(221),d=n(801),m=n(802),g=n(804),y=n(812),b=n(814),v=n(815),w=n(827),_=n(854),k=n(855),S=c("repo"),E=Number.MAX_SAFE_INTEGER,x={memory:n(435),fs:n(435)},C=n(856).repoVersion;class A{constructor(e,t){u.strictEqual(typeof e,"string","missing repoPath"),this.options=P(t),this.closed=!0,this.path=e,this._locker=this._getLocker(),this.root=d.create("root",this.path,this.options),this.version=m(this.root),this.config=g(this.root),this.spec=y(this.root),this.apiAddr=b(this.root)}init(e,t){S("initializing at: %s",this.path),i([e=>this.root.open(j(e)),t=>this.config.set(B(e),t),t=>this.spec.set(R(e),t),e=>this.version.set(C,e)],t)}open(e){this.closed?(S("opening at: %s",this.path),r([e=>this.root.open(j(e)),e=>this._isInitialized(e),e=>this._openLock(this.path,e),(e,t)=>{S("aquired repo.lock"),this.lockfile=e,t()},e=>{S("creating datastore"),this.datastore=d.create("datastore",l.join(this.path,"datastore"),this.options),S("creating blocks");const t=d.create("blocks",l.join(this.path,"blocks"),this.options);v(t,this.options.storageBackendOptions.blocks,e)},(e,t)=>{this.blocks=e,t()},e=>{S("creating keystore"),this.keys=d.create("keys",l.join(this.path,"keys"),this.options),e()},e=>{this.closed=!1,S("all opened"),e()}],t=>{t&&this.lockfile?this._closeLock(n=>{n?S("error removing lock",n):this.lockfile=null,e(t)}):e(t)})):setImmediate(()=>e(new Error("repo is already open")))}_getLocker(){return"string"==typeof this.options.lock?(u(x[this.options.lock],"Unknown lock type: "+this.options.lock),x[this.options.lock]):(u(this.options.lock,"No lock provided"),this.options.lock)}_openLock(e,t){this._locker.lock(e,(e,n)=>{if(e)return t(e,null);u.strictEqual(typeof n.close,"function","Locks must have a close method"),t(null,n)})}_closeLock(e){if(this.lockfile)return this.lockfile.close(e);e()}_isInitialized(e){S("init check"),o({config:e=>this.config.exists(e),spec:e=>this.spec.exists(e),version:e=>this.version.check(C,e)},(t,n)=>{if(S("init",t,n),t&&!n.config)return e(Object.assign(new Error("repo is not initialized yet"),{code:k.ERR_REPO_NOT_INITIALIZED,path:this.path}));e(t)})}close(e){if(this.closed)return e(new Error("repo is already closed"));S("closing at: %s",this.path),i([e=>this.apiAddr.delete(O(e)),e=>{s([this.blocks,this.keys,this.datastore],(e,t)=>e.close(t),e)},e=>{S("unlocking"),this.closed=!0,this._closeLock(e)},e=>{this.lockfile=null,e()}],t=>e(t))}exists(e){this.version.exists(e)}stat(e,t){"function"==typeof e&&(t=e,e={}),e=Object.assign({},{human:!1},e),o({storageMax:e=>this.config.get("Datastore.StorageMax",(t,n)=>{e(null,new f(t?E:n))}),version:e=>this.version.get(e),blocks:e=>this.blocks.query({},(t,n)=>{n=n||[];const r=new f(n.length);let i=new f(0);n.forEach(e=>{i=i.plus(e.value.byteLength).plus(e.key._buf.byteLength)}),e(t,{count:r,size:i})}),datastore:e=>I(this.datastore,e),keys:e=>I(this.keys,e)},(n,r)=>{if(n)return t(n);let i=r.blocks.size.plus(r.datastore).plus(r.keys);e.human&&(i=i.div(1048576)),t(null,{repoPath:this.path,storageMax:r.storageMax,version:r.version,numObjects:r.blocks.count,repoSize:i})})}}function I(e,t){h(e.query({}),p((e,t)=>e.plus(t.value.byteLength).plus(t.key._buf.byteLength),new f(0),t))}function T(e,t){return n=>{t(n&&!e(n)?n:null)}}function j(e){return T(e=>"Already open"===e.message,e)}function O(e){return T(e=>e&&(e.code===k.ERR_REPO_NOT_INITIALIZED||e.message.startsWith("ENOENT")),e)}function P(e){const t=Object.assign({},w,e);return t.storageBackends=Object.assign({},w.storageBackends,t.storageBackends),t.storageBackendOptions=Object.assign({},w.storageBackendOptions,t.storageBackendOptions),t}function B(e){return e.datastore=Object.assign({},_,a(e,"datastore",{})),e}function R(e){const t=Object.assign({},_.Spec,a(e,"datastore.Spec",{}));return{type:t.type,mounts:t.mounts.map(e=>({mountpoint:e.mountpoint,type:e.child.type,path:e.child.path,shardFunc:e.child.shardFunc}))}}e.exports=A,e.exports.repoVersion=C,e.exports.errors=k},function(e,t){e.exports=function(){var e,t,n,r,i=function(i,o){e?e(i,o):i?(r=i,n=o):t=o};return i.resolve=function(i){if(e)throw new Error("already resolved");if(e=i,!e)throw new Error("no read cannot resolve!"+e);t&&i(null,t),n&&i(r,n)},i.abort=function(e){i.resolve(function(t,n){n(e||!0)})},i}},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,s.default)(e);return(0,i.default)(function(e,t){n(e[0],t)},t,1)};var r=n(805),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";const r=n(26);class i{constructor(e,t){this.child=e,this.transform=t}open(e){this.child.open(e)}put(e,t,n){this.child.put(this.transform.convert(e),t,n)}get(e,t){this.child.get(this.transform.convert(e),t)}has(e,t){this.child.has(this.transform.convert(e),t)}delete(e,t){this.child.delete(this.transform.convert(e),t)}batch(){const e=this.child.batch();return{put:(t,n)=>{e.put(this.transform.convert(t),n)},delete:t=>{e.delete(this.transform.convert(t))},commit:t=>{e.commit(t)}}}query(e){return r(this.child.query(e),r.map(e=>(e.key=this.transform.invert(e.key),e)))}close(e){this.child.close(e)}}e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=n(67),i=f(r),o=n(105),s=f(o),a=n(133),u=f(a),l=n(42),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){n=(0,u.default)(n||i.default);var r=(0,c.default)(t);if(!e())return n(null);var o=function(t){if(t)return n(t);if(e())return r(o);var i=(0,s.default)(arguments,1);n.apply(null,[null].concat(i))};r(o)}e.exports=t.default},function(e,t,n){"use strict";(function(t){const r=n(26),i=n(828),o=n(33).utils.asyncFilter,s=n(33).utils.asyncSort,a=n(33).Key,u=n(33).Errors,l=n(837);class c{constructor(e,t){let r;t&&t.db?(r=t.db,delete t.db):r=n(841),this.db=i(l(r(e),{valueEncoding:"binary"}),Object.assign({},t,{compression:!1}),e=>{if(e)throw e})}open(e){this.db.open(t=>{if(t)return e(u.dbOpenFailedError(t));e()})}put(e,t,n){this.db.put(e.toString(),t,e=>{if(e)return n(u.dbWriteFailedError(e));n()})}get(e,t){this.db.get(e.toString(),(e,n)=>{if(e)return t(u.notFoundError(e));t(null,n)})}has(e,t){this.db.get(e.toString(),(e,n)=>{if(e)return e.notFound?void t(null,!1):void t(e);t(null,!0)})}delete(e,t){this.db.del(e.toString(),e=>{if(e)return t(u.dbDeleteFailedError(e));t()})}close(e){this.db.close(e)}batch(){const e=[];return{put:(t,n)=>{e.push({type:"put",key:t.toString(),value:n})},delete:t=>{e.push({type:"del",key:t.toString()})},commit:t=>{this.db.batch(e,t)}}}query(e){let n=!0;null!=e.keysOnly&&(n=!e.keysOnly);const i=this.db.db.iterator({keys:!0,values:n,keyAsBuffer:!0}),u=(e,r)=>{if(e)return i.end(t=>{r(t||e)});i.next((e,o,s)=>{if(e)return r(e);if(null==e&&null==o&&null==s)return i.end(e=>{r(e||!0)});const u={key:new a(o,!1)};n&&(u.value=t.from(s)),r(null,u)})};let l=[u],c=[];if(null!=e.prefix){const t=e.prefix;c.push((e,n)=>n(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(c=c.concat(e.filters)),l=l.concat(c.map(e=>o(e))),null!=e.orders&&(l=l.concat(e.orders.map(e=>s(e)))),null!=e.offset){let t=0;l.push(r.filter(()=>t++>=e.offset))}return null!=e.limit&&l.push(r.take(e.limit)),r.apply(null,l)}}e.exports=c}).call(this,n(0).Buffer)},function(e,t){t.getCallback=function(e,t){return"function"==typeof e?e:t},t.getOptions=function(e){return"object"==typeof e&&null!==e?e:{}}},function(e,t,n){"use strict";const r=n(62);t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},t.SHIFT32=Math.pow(2,32),t.SHIFT16=Math.pow(2,16),t.MAX_SAFE_HIGH=2097151,t.NEG_ONE=new r(-1),t.TEN=new r(10),t.TWO=new r(2),t.PARENT={ARRAY:0,OBJECT:1,MAP:2,TAG:3,BYTE_STRING:4,UTF8_STRING:5}},function(e,t,n){"use strict";(function(r){const i=n(18),o=n(53);class s{constructor(e,t,n){0!==n&&i(n,"A DAGNode requires it's serialized size"),this._data=e||r.alloc(0),this._links=t||[],this._serializedSize=n}toJSON(){return this._json||(this._json=Object.freeze({data:this.data,links:this.links.map(e=>e.toJSON()),size:this.size})),Object.assign({},this._json)}toString(){return`DAGNode <data: "${this.data.toString("base64")}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(e){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(e){throw new Error("Can't set property: 'links' is immutable")}get size(){return void 0===this._size&&(this._size=this.links.reduce((e,t)=>e+t.size,this._serializedSize)),this._size}set size(e){throw new Error("Can't set property: 'size' is immutable")}}t=e.exports=o(s,{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"}),t.create=n(234),t.clone=n(886),t.addLink=n(887),t.rmLink=n(888)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(872),{serialize:i}=n(235),o=n(236),s=o.linkSort,a=n(233),u=n(117);function l(e,n,o){if("function"==typeof e?(o=e,e=void 0):"string"==typeof e&&(e=t.from(e)),"function"==typeof n&&(o=n,n=[]),!t.isBuffer(e))return o(new Error("Passed 'data' is not a buffer or a string!"));n=n.map(e=>u.isDAGLink(e)?e:u.util.createDagLinkFromB58EncodedHash(e)),n=r(n,s),i({data:e,links:n},(t,r)=>t?o(t):o(null,new a(e,n,r.length)))}e.exports=l}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(9),o=n(71),s=o(n(883)),a=n(455),u=n(117),l=n(233),c=n(58),f=n(11),h=n(14);function p(e,t,n){"function"==typeof t&&(n=t,t={}),t=t||{};const o=t.hashAlg||a.defaultHashAlg;let s=t.version;void 0===s&&(s="sha2-256"===o?0:1),f([t=>{if(r.isBuffer(e))return t(null,e);d(e,t)},(e,t)=>c(e,o,t),(e,t)=>t(null,new i(s,a.multicodec,e))],n)}function d(e,t){let n,{data:r,links:i=[]}=e;!l.isDAGNode(e)&&i&&(i=i.map(e=>u.isDAGLink(e)?e:u.util.createDagLinkFromB58EncodedHash(e)));try{n=s.PBNode.encode(g({data:r,links:i}))}catch(e){return t(e)}t(null,n)}function m(e,t){const n=s.PBNode.decode(e),i=n.Links.map(e=>new u(e.Name,e.Tsize,e.Hash)),o=null==n.Data?r.alloc(0):n.Data;h(()=>t(null,new l(o,i,e.length)))}function g(e){const t={};return e.data&&e.data.length>0?t.Data=e.data:t.Data=null,e.links&&e.links.length>0?t.Links=e.links.map(e=>({Hash:e.cid.buffer,Name:e.name,Tsize:e.size})):t.Links=null,t}t=e.exports,t.serialize=d,t.deserialize=m,t.cid=p}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(117),{cid:o}=n(235);function s(e){let t;return e.data&&e.data.length>0?(t=r.alloc(e.data.length),e.data.copy(t)):t=r.alloc(0),t}function a(e){return e.links.slice()}function u(e,t){return r.compare(e.nameAsBuffer,t.nameAsBuffer)}function l(e,t,n){"function"==typeof t&&(n=t,t={}),o(e,t,(r,o)=>{if(r)return n(r);n(null,new i(t.name||"",e.size,o))})}t=e.exports,t.cloneData=s,t.cloneLinks=a,t.linkSort=u,t.toDAGLink=l}).call(this,n(0).Buffer)},function(e,t,n){var r=n(19);function i(e,t){var n=function(){return new r.aes.Algorithm(e,t)};r.cipher.registerAlgorithm(e,n)}n(458),n(459),n(34),e.exports=r.aes=r.aes||{},r.aes.startEncrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!1,mode:r});return i.start(t),i},r.aes.createEncryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!1,mode:t})},r.aes.startDecrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!0,mode:r});return i.start(t),i},r.aes.createDecryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!0,mode:t})},r.aes.Algorithm=function(e,t){o||h();var n=this;n.name=e,n.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return d(n._w,e,t,!1)},decrypt:function(e,t){return d(n._w,e,t,!0)}}}),n._init=!1},r.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,n;if("string"!=typeof t||16!==t.length&&24!==t.length&&32!==t.length){if(r.util.isArray(t)&&(16===t.length||24===t.length||32===t.length)){n=t,t=r.util.createBuffer();for(var i=0;i<n.length;++i)t.putByte(n[i])}}else t=r.util.createBuffer(t);if(!r.util.isArray(t)){n=t,t=[];var o=n.length();if(16===o||24===o||32===o){o>>>=2;for(var i=0;i<o;++i)t.push(n.getInt32())}}if(!r.util.isArray(t)||4!==t.length&&6!==t.length&&8!==t.length)throw new Error("Invalid key parameter.");var s=this.mode.name,a=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=p(t,e.decrypt&&!a),this._init=!0}},r.aes._expandKey=function(e,t){return o||h(),p(e,t)},r.aes._updateBlock=d,i("AES-ECB",r.cipher.modes.ecb),i("AES-CBC",r.cipher.modes.cbc),i("AES-CFB",r.cipher.modes.cfb),i("AES-OFB",r.cipher.modes.ofb),i("AES-CTR",r.cipher.modes.ctr),i("AES-GCM",r.cipher.modes.gcm);var o=!1,s=4,a,u,l,c,f;function h(){o=!0,l=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;a=new Array(256),u=new Array(256),c=new Array(4),f=new Array(4);for(var t=0;t<4;++t)c[t]=new Array(256),f[t]=new Array(256);for(var n=0,r=0,i,s,h,p,d,m,g,t=0;t<256;++t){p=r^r<<1^r<<2^r<<3^r<<4,p=p>>8^255&p^99,a[n]=p,u[p]=n,d=e[p],i=e[n],s=e[i],h=e[s],m=d<<24^p<<16^p<<8^p^d,g=(i^s^h)<<24^(n^h)<<16^(n^s^h)<<8^n^i^h;for(var y=0;y<4;++y)c[y][n]=m,f[y][p]=g,m=m<<24|m>>>8,g=g<<24|g>>>8;0===n?n=r=1:(n=i^e[e[e[i^h]]],r^=e[e[r]])}}function p(e,t){for(var n=e.slice(0),r,i=1,o=n.length,u=o+6+1,c=s*u,h=o;h<c;++h)r=n[h-1],h%o==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^l[i]<<24,i++):o>6&&h%o==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[h]=n[h-o]^r;if(t){var p,d=f[0],m=f[1],g=f[2],y=f[3],b=n.slice(0);c=n.length;for(var h=0,v=c-s;h<c;h+=s,v-=s)if(0===h||h===c-s)b[h]=n[v],b[h+1]=n[v+3],b[h+2]=n[v+2],b[h+3]=n[v+1];else for(var w=0;w<s;++w)p=n[v+w],b[h+(3&-w)]=d[a[p>>>24]]^m[a[p>>>16&255]]^g[a[p>>>8&255]]^y[a[255&p]];n=b}return n}function d(e,t,n,r){var i=e.length/4-1,o,s,l,h,p,d,m,g,y,b,v,w;r?(o=f[0],s=f[1],l=f[2],h=f[3],p=u):(o=c[0],s=c[1],l=c[2],h=c[3],p=a),d=t[0]^e[0],m=t[r?3:1]^e[1],g=t[2]^e[2],y=t[r?1:3]^e[3];for(var _=3,k=1;k<i;++k)b=o[d>>>24]^s[m>>>16&255]^l[g>>>8&255]^h[255&y]^e[++_],v=o[m>>>24]^s[g>>>16&255]^l[y>>>8&255]^h[255&d]^e[++_],w=o[g>>>24]^s[y>>>16&255]^l[d>>>8&255]^h[255&m]^e[++_],y=o[y>>>24]^s[d>>>16&255]^l[m>>>8&255]^h[255&g]^e[++_],d=b,m=v,g=w;n[0]=p[d>>>24]<<24^p[m>>>16&255]<<16^p[g>>>8&255]<<8^p[255&y]^e[++_],n[r?3:1]=p[m>>>24]<<24^p[g>>>16&255]<<16^p[y>>>8&255]<<8^p[255&d]^e[++_],n[2]=p[g>>>24]<<24^p[y>>>16&255]<<16^p[d>>>8&255]<<8^p[255&m]^e[++_],n[r?1:3]=p[y>>>24]<<24^p[d>>>16&255]<<16^p[m>>>8&255]<<8^p[255&g]^e[++_]}function m(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="AES-"+t,i;i=e.decrypt?r.cipher.createDecipher(n,e.key):r.cipher.createCipher(n,e.key);var o=i.start;return i.start=function(e,t){var n=null;t instanceof r.util.ByteBuffer&&(n=t,t={}),t=t||{},t.output=n,t.iv=e,o.call(i,t)},i}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(931),o;function s(){this.negative=0,this.words=null,this.length=0}s.fromNumber=function(e){var t=new s;return t.words=[67108863&e],t.length=1,t},s.fromBuffer=function(e){var t=new s;return t.words=new Array(10),t.words[0]=(3&e[28])<<24|e[29]<<16|e[30]<<8|e[31],t.words[1]=(15&e[25])<<22|e[26]<<14|e[27]<<6|e[28]>>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},s.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0;return r.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},s.prototype.clone=function(){var e=new s;e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];return e.length=this.length,e.negative=this.negative,e},s.prototype.strip=function(){for(;this.length>1&&0==(0|this.words[this.length-1]);)this.length--;return this},s.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1;for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1;return 0},s.prototype.gtOne=function(){return this.length>1||this.words[0]>1},s.prototype.isOverflow=function(){return this.ucmp(s.n)>=0},s.prototype.isHigh=function(){return 1===this.ucmp(s.nh)},s.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},s.prototype.iuaddn=function(e){this.words[0]+=e;for(var t=0;this.words[t]>67108863&&t<this.length;++t)this.words[t]-=67108864,this.words[t+1]+=1;return t===this.length&&(this.words[t]=1,this.length+=1),this},s.prototype.iadd=function(e){if(this.negative!==e.negative)return 0!==this.negative?(this.negative=0,this.isub(e),this.negative^=1):(e.negative=0,this.isub(e),e.negative=1),this.normSign();var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0,i=0;r<n.length;++r){var o=t.words[r]+n.words[r]+i;this.words[r]=67108863&o,i=o>>>26}for(;0!==i&&r<t.length;++r)o=t.words[r]+i,this.words[r]=67108863&o,i=o>>>26;if(this.length=t.length,0!==i)this.words[this.length++]=i;else if(t!==this)for(;r<t.length;++r)this.words[r]=t.words[r];return this},s.prototype.add=function(e){return this.clone().iadd(e)},s.prototype.isub=function(e){if(this.negative!==e.negative)return 0!==this.negative?(this.negative=0,this.iadd(e),this.negative=1):(e.negative=0,this.iadd(e),e.negative=1),this.normSign();var t=this.ucmp(e),n,r;if(0===t)return this.negative=0,this.words[0]=0,this.length=1,this;t>0?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;i<r.length;++i){var s=n.words[i]-r.words[i]+o;o=s>>26,this.words[i]=67108863&s}for(;0!==o&&i<n.length;++i)s=n.words[i]+o,o=s>>26,this.words[i]=67108863&s;if(0===o&&i<n.length&&n!==this)for(;i<n.length;++i)this.words[i]=n.words[i];return this.length=Math.max(this.length,i),n!==this&&(this.negative^=1),this.strip().normSign()},s.prototype.sub=function(e){return this.clone().isub(e)},s.umulTo=function(e,t,n){n.length=e.length+t.length-1;var r=e.words[0],i=t.words[0],o=r*i,s=o/67108864|0;n.words[0]=67108863&o;for(var a=1,u=n.length;a<u;a++){for(var l=s>>>26,c=67108863&s,f=Math.max(0,a-e.length+1),h=Math.min(a,t.length-1);f<=h;f++){var p=a-f,d=e.words[p],m=t.words[f],g=d*m+c;l+=g/67108864|0,c=67108863&g}n.words[a]=c,s=l}return 0!==s&&(n.words[n.length++]=s),n.strip()},s.umulTo10x10=Math.imul?i.umulTo10x10:s.umulTo,s.umulnTo=function(e,t,n){if(0===t)return n.words=[0],n.length=1,n;for(var r=0,i=0;r<e.length;++r){var o=e.words[r]*t+i;n.words[r]=67108863&o,i=o/67108864|0}return i>0?(n.words[r]=i,n.length=e.length+1):n.length=e.length,n},s.prototype.umul=function(e){var t=new s;return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?s.umulTo10x10(this,e,t):1===this.length?s.umulnTo(e,this.words[0],t):1===e.length?s.umulnTo(this,e.words[0],t):s.umulTo(this,e,t)},s.prototype.isplit=function(e){e.length=Math.min(this.length,9);for(var t=0;t<e.length;++t)e.words[t]=this.words[t];if(this.length<=9)return this.words[0]=0,this.length=1,this;var n=this.words[9];for(e.words[e.length++]=4194303&n,t=10;t<this.length;++t){var r=this.words[t];this.words[t-10]=(4194303&r)<<4|n>>>22,n=r}return n>>>=22,this.words[t-10]=n,0===n&&this.length>10?this.length-=10:this.length-=9,this},s.prototype.fireduce=function(){return this.isOverflow()&&this.isub(s.n),this},s.prototype.ureduce=function(){var e=this.clone().isplit(s.tmp).umul(s.nc).iadd(s.tmp);return e.bitLengthGT256()&&(e=e.isplit(s.tmp).umul(s.nc).iadd(s.tmp),e.bitLengthGT256()&&(e=e.isplit(s.tmp).umul(s.nc).iadd(s.tmp))),e.fireduce()},s.prototype.ishrn=function(e){for(var t=(1<<e)-1,n=26-e,r=this.length-1,i=0;r>=0;--r){var o=this.words[r];this.words[r]=i<<n|o>>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},s.prototype.uinvm=function(){for(var e=this.clone(),t=s.n.clone(),n=s.fromNumber(1),r=s.fromNumber(0),i=s.fromNumber(0),o=s.fromNumber(1);e.isEven()&&t.isEven();){for(var a=1,u=1;0==(e.words[0]&u)&&0==(t.words[0]&u)&&a<26;++a,u<<=1);e.ishrn(a),t.ishrn(a)}for(var l=t.clone(),c=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.ishrn(f);f-- >0;)(n.isOdd()||r.isOdd())&&(n.iadd(l),r.isub(c)),n.ishrn(1),r.ishrn(1);for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.ishrn(p);p-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(c)),i.ishrn(1),o.ishrn(1);e.ucmp(t)>=0?(e.isub(t),n.isub(i),r.isub(o)):(t.isub(e),i.isub(n),o.isub(r))}if(1===i.negative){i.negative=0;var m=i.ureduce();return m.negative^=1,m.normSign().iadd(s.n)}return i.ureduce()},s.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2;for(var e=0,t=0;e<this.length;++e){var n=0|this.words[e];t+=977*n,this.words[e]=67108863&t,t=64*n+(t/67108864|0)}return 0===this.words[this.length-1]&&(this.length-=1,0===this.words[this.length-1]&&(this.length-=1)),this},s.prototype.redIReduce=function(){this.isplit(s.tmp).imulK().iadd(s.tmp),this.bitLengthGT256()&&this.isplit(s.tmp).imulK().iadd(s.tmp);var e=this.ucmp(s.p);return 0===e?(this.words[0]=0,this.length=1):e>0?this.isub(s.p):this.strip(),this},s.prototype.redNeg=function(){return this.isZero()?s.fromNumber(0):s.p.sub(this)},s.prototype.redAdd=function(e){return this.clone().redIAdd(e)},s.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(s.p)>=0&&this.isub(s.p),this},s.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(s.p)>=0&&this.isub(s.p),this},s.prototype.redSub=function(e){return this.clone().redISub(e)},s.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(s.p),this},s.prototype.redMul=function(e){return this.umul(e).redIReduce()},s.prototype.redSqr=function(){return this.umul(this).redIReduce()},s.prototype.redSqrt=function(){if(this.isZero())return this.clone();for(var e=this.redSqr(),t=e.redSqr(),n=t.redSqr().redMul(t),r=n.redMul(e),i=r.redMul(this),o=i,s=0;s<54;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r),s=0;s<5;++s)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i);return o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),o=o.redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(n),0===o.redSqr().ucmp(this)?o:null},s.prototype.redInvm=function(){for(var e=this.clone(),t=s.p.clone(),n=s.fromNumber(1),r=s.fromNumber(0),i;e.gtOne()&&t.gtOne();){for(var o=0,a=1;0==(e.words[0]&a)&&o<26;++o,a<<=1);if(o>0)for(e.ishrn(o);o-- >0;)n.isOdd()&&n.iadd(s.p),n.ishrn(1);for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.ishrn(u);u-- >0;)r.isOdd()&&r.iadd(s.p),r.ishrn(1);e.ucmp(t)>=0?(e.isub(t),n.isub(r)):(t.isub(e),r.isub(n))}return i=1===e.length&&1===e.words[0]?n:r,0!==i.negative&&i.iadd(s.p),0!==i.negative?(i.negative=0,i.redIReduce().redNeg()):i.redIReduce()},s.prototype.getNAF=function(e){for(var t=[],n=1<<e+1,r=n-1,i=n>>1,o=this.clone();!o.isZero();){for(var s=0,a=1;0==(o.words[0]&a)&&s<26;++s,a<<=1)t.push(0);if(0!==s)o.ishrn(s);else{var u=o.words[0]&r;if(u>=i)t.push(i-u),o.iuaddn(u-i).ishrn(1);else if(t.push(u),o.words[0]-=u,!o.isZero()){for(s=e-1;s>0;--s)t.push(0);o.ishrn(e)}}}return t},s.prototype.inspect=function(){if(this.isZero())return"0";for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},s.n=s.fromBuffer(r.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),s.nh=s.n.clone().ishrn(1),s.nc=s.fromBuffer(r.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),s.p=s.fromBuffer(r.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),s.psn=s.p.sub(s.n),s.tmp=new s,s.tmp.words=new Array(10),o=s.fromNumber(1),o.words[3]=0,e.exports=s},function(e,t,n){var r=n(4).Buffer;function i(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function o(e){for(var t=0;0<e.length;e++)e[0]=0}function s(e,t,n,r,i){for(var o=n[0],s=n[1],a=n[2],u=n[3],l=e[0]^t[0],c=e[1]^t[1],f=e[2]^t[2],h=e[3]^t[3],p,d,m,g,y=4,b=1;b<i;b++)p=o[l>>>24]^s[c>>>16&255]^a[f>>>8&255]^u[255&h]^t[y++],d=o[c>>>24]^s[f>>>16&255]^a[h>>>8&255]^u[255&l]^t[y++],m=o[f>>>24]^s[h>>>16&255]^a[l>>>8&255]^u[255&c]^t[y++],g=o[h>>>24]^s[l>>>16&255]^a[c>>>8&255]^u[255&f]^t[y++],l=p,c=d,f=m,h=g;return p=(r[l>>>24]<<24|r[c>>>16&255]<<16|r[f>>>8&255]<<8|r[255&h])^t[y++],d=(r[c>>>24]<<24|r[f>>>16&255]<<16|r[h>>>8&255]<<8|r[255&l])^t[y++],m=(r[f>>>24]<<24|r[h>>>16&255]<<16|r[l>>>8&255]<<8|r[255&c])^t[y++],g=(r[h>>>24]<<24|r[l>>>16&255]<<16|r[c>>>8&255]<<8|r[255&f])^t[y++],p>>>=0,d>>>=0,m>>>=0,g>>>=0,[p,d,m,g]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,n[s]=l,r[l]=s;var c=e[s],f=e[c],h=e[f],p=257*e[l]^16843008*l;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*f^257*c^16843008*s,o[0][l]=p<<24|p>>>8,o[1][l]=p<<16|p>>>16,o[2][l]=p<<8|p>>>24,o[3][l]=p,0===s?s=a=1:(s=c^e[e[e[h^c]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function l(e){this._key=i(e),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var s=i[o-1];o%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var l=[],c=0;c<r;c++){var f=r-c,h=i[f-(c%4?0:4)];l[c]=c<4||f<=4?h:u.INV_SUB_MIX[0][u.SBOX[h>>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(e){return e=i(e),s(e,this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},l.prototype.decryptBlock=function(e){e=i(e);var t=e[1];e[1]=e[3],e[3]=t;var n=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},l.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=l},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(67),i=a(r),o=n(291),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return function(n,r,o,a){a=a||i.default;var u=!1,l;n(r,function(n,r,i){o(n,function(r,o){r?i(r):e(o)&&!l?(u=!0,l=t(!0,n),i(null,s.default)):i()})},function(e){e?a(e):a(null,u?l:t(!1))})}}e.exports=t.default},function(e,t,n){"use strict";const r=n(71),i=n(137),o=n(981),s=n(18),a=n(56),u=n(90),l=n(9),c=n(982),f=n(984),h=n(58),p=r(n(985)),d=n(986);class m{constructor(e){this.full=e,this.wantlist=new Map,this.blocks=new Map}get empty(){return 0===this.blocks.size&&0===this.wantlist.size}addEntry(e,t,n){s(e&&l.isCID(e),"must be a valid cid");const r=e.buffer.toString(),i=this.wantlist.get(r);i?(i.priority=t,i.cancel=Boolean(n)):this.wantlist.set(r,new d(e,t,n))}addBlock(e){s(i.isBlock(e),"must be a valid cid");const t=e.cid.buffer.toString();this.blocks.set(t,e)}cancel(e){s(l.isCID(e),"must be a valid cid");const t=e.buffer.toString();this.wantlist.delete(t),this.addEntry(e,0,!0)}serializeToBitswap100(){const e={wantlist:{entries:Array.from(this.wantlist.values()).map(e=>({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},blocks:Array.from(this.blocks.values()).map(e=>e.data)};return this.full&&(e.wantlist.full=!0),p.Message.encode(e)}serializeToBitswap110(){const e={wantlist:{entries:Array.from(this.wantlist.values()).map(e=>({block:e.cid.buffer,priority:Number(e.priority),cancel:Boolean(e.cancel)}))},payload:[]};return this.full&&(e.wantlist.full=!0),this.blocks.forEach(t=>{e.payload.push({prefix:t.cid.prefix,data:t.data})}),p.Message.encode(e)}equals(e){const t=(e,t)=>{if(e.equals&&"function"==typeof e.equals)return e.equals(t)};return!(this.full!==e.full||!o(this.wantlist,e.wantlist,t)||!o(this.blocks,e.blocks,t))}get[Symbol.toStringTag](){const e=Array.from(this.wantlist.keys()),t=Array.from(this.blocks.keys());return`BitswapMessage <full: ${this.full}, list: ${e}, blocks: ${t}>`}}m.deserialize=((e,t)=>{let n;try{n=p.Message.decode(e)}catch(e){return u(()=>t(e))}const r=n.wantlist&&n.wantlist.full||!1,o=new m(r);return n.wantlist&&n.wantlist.entries.forEach(e=>{let n;try{n=new l(e.block)}catch(e){return t(e)}o.addEntry(n,e.priority,e.cancel)}),n.blocks.length>0?a(n.blocks,(e,n)=>{h(e,"sha2-256",(r,s)=>{if(r)return n(r);let a;try{a=new l(s)}catch(r){return t(r)}o.addBlock(new i(e,a)),n()})},e=>{if(e)return t(e);t(null,o)}):n.payload.length>0?a(n.payload,(e,t)=>{if(!e.prefix||!e.data)return u(t);const n=f(e.prefix),r=n[0],s=n[1],a=n[2];h(e.data,a,(n,a)=>{if(n)return t(n);let u;try{u=new l(r,c[s.toString("16")],a)}catch(n){return t(n)}o.addBlock(new i(e.data,u)),t()})},e=>{if(e)return t(e);t(null,o)}):void t(null,o)}),m.Entry=d,e.exports=m},function(e,t,n){"use strict";const{sortBy:r}=n(120),i=n(987);class o{constructor(e){this.set=new Map,this._stats=e}get length(){return this.set.size}add(e,t){const n=e.buffer.toString(),r=this.set.get(n);r?(r.inc(),r.priority=t):(this.set.set(n,new i(e,t)),this._stats&&this._stats.push(null,"wantListSize",1))}remove(e){const t=e.buffer.toString(),n=this.set.get(t);n&&(n.dec(),n.hasRefs()||(this.set.delete(t),this._stats&&this._stats.push(null,"wantListSize",-1)))}removeForce(e){this.set.has(e)&&this.set.delete(e)}forEach(e){return this.set.forEach(e)}entries(){return this.set.entries()}sortedEntries(){return new Map(r(e=>e[1].key,Array.from(this.set.entries())))}contains(e){const t=e.buffer.toString();return this.set.get(t)}}o.Entry=i,e.exports=o},function(e,t,n){var r=n(493);function i(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}e.exports=i},function(e,t,n){var r=n(121),i=r(Object,"create");e.exports=i},function(e,t,n){var r=n(1012),i=n(1013),o=n(1014),s=n(1015),a=n(1016);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,n){var r=n(496);function i(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}e.exports=i},function(e,t,n){var r=n(1018);function i(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}e.exports=i},function(e,t,n){var r=n(323),i=1/0;function o(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}e.exports=o},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1062),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1079),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t,n){(function(t){e.exports=f;var r=n(5)("simple-peer"),i=n(1086),o=n(1),s=n(148),a=n(1087),u=65536,l=5e3,c=5e3;function f(e){var t=this;if(!(t instanceof f))return new f(e);if(t._id=s(4).toString("hex").slice(0,7),t._debug("new peer %o",e),e=Object.assign({allowHalfOpen:!1},e),a.Duplex.call(t,e),t.channelName=e.initiator?e.channelName||s(20).toString("hex"):null,t.initiator=e.initiator||!1,t.channelConfig=e.channelConfig||f.channelConfig,t.config=Object.assign({},f.config,e.config),t.offerOptions=e.offerOptions||{},t.answerOptions=e.answerOptions||{},t.sdpTransform=e.sdpTransform||function(e){return e},t.streams=e.streams||(e.stream?[e.stream]:[]),t.trickle=void 0===e.trickle||e.trickle,t.allowHalfTrickle=void 0!==e.allowHalfTrickle&&e.allowHalfTrickle,t.iceCompleteTimeout=e.iceCompleteTimeout||l,t.destroyed=!1,t.connected=!1,t.remoteAddress=void 0,t.remoteFamily=void 0,t.remotePort=void 0,t.localAddress=void 0,t.localFamily=void 0,t.localPort=void 0,t._wrtc=e.wrtc&&"object"==typeof e.wrtc?e.wrtc:i(),!t._wrtc)throw"undefined"==typeof window?p("No WebRTC support: Specify `opts.wrtc` option in this environment","ERR_WEBRTC_SUPPORT"):p("No WebRTC support: Not a supported browser","ERR_WEBRTC_SUPPORT");t._pcReady=!1,t._channelReady=!1,t._iceComplete=!1,t._iceCompleteTimer=null,t._channel=null,t._pendingCandidates=[],t._isNegotiating=!t.initiator,t._batchedNegotiation=!1,t._queuedNegotiation=!1,t._sendersAwaitingStable=[],t._senderMap=new Map,t._firstStable=!0,t._closingInterval=null,t._remoteTracks=[],t._remoteStreams=[],t._chunk=null,t._cb=null,t._interval=null;try{t._pc=new t._wrtc.RTCPeerConnection(t.config)}catch(e){t.destroy(e)}t._isReactNativeWebrtc="number"==typeof t._pc._peerConnectionId,t._pc.oniceconnectionstatechange=function(){t._onIceStateChange()},t._pc.onicegatheringstatechange=function(){t._onIceStateChange()},t._pc.onsignalingstatechange=function(){t._onSignalingStateChange()},t._pc.onicecandidate=function(e){t._onIceCandidate(e)},t.initiator?t._setupData({channel:t._pc.createDataChannel(t.channelName,t.channelConfig)}):t._pc.ondatachannel=function(e){t._setupData(e)},t.streams&&t.streams.forEach(function(e){t.addStream(e)}),t._pc.ontrack=function(e){t._onTrack(e)},t.initiator&&t._needsNegotiation(),t._onFinishBound=function(){t._onFinish()},t.once("finish",t._onFinishBound)}function h(e){return e.replace(/a=ice-options:trickle\s\n/g,"")}function p(e,t){var n=new Error(e);return n.code=t,n}o(f,a.Duplex),f.WEBRTC_SUPPORT=!!i(),f.config={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:global.stun.twilio.com:3478?transport=udp"}],sdpSemantics:"unified-plan"},f.channelConfig={},Object.defineProperty(f.prototype,"bufferSize",{get:function(){var e=this;return this._channel&&this._channel.bufferedAmount||0}}),f.prototype.address=function(){var e=this;return{port:this.localPort,family:this.localFamily,address:this.localAddress}},f.prototype.signal=function(e){var t=this;if(t.destroyed)throw p("cannot signal after peer is destroyed","ERR_SIGNALING");if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}t._debug("signal()"),e.renegotiate&&t.initiator&&(t._debug("got request to renegotiate"),t._needsNegotiation()),e.transceiverRequest&&t.initiator&&(t._debug("got request for transceiver"),t.addTransceiver(e.transceiverRequest.kind,e.transceiverRequest.init)),e.candidate&&(t._pc.localDescription&&t._pc.localDescription.type&&t._pc.remoteDescription&&t._pc.remoteDescription.type?t._addIceCandidate(e.candidate):t._pendingCandidates.push(e.candidate)),e.sdp&&t._pc.setRemoteDescription(new t._wrtc.RTCSessionDescription(e)).then(function(){t.destroyed||(t._pendingCandidates.forEach(function(e){t._addIceCandidate(e)}),t._pendingCandidates=[],"offer"===t._pc.remoteDescription.type&&t._createAnswer())}).catch(function(e){t.destroy(p(e,"ERR_SET_REMOTE_DESCRIPTION"))}),e.sdp||e.candidate||e.renegotiate||e.transceiverRequest||t.destroy(p("signal() called with invalid signal data","ERR_SIGNALING"))},f.prototype._addIceCandidate=function(e){var t=this;t._pc.addIceCandidate(new t._wrtc.RTCIceCandidate(e)).catch(function(e){if("closed"!==t._pc.signalingState&&"Failed to set ICE candidate; RTCPeerConnection is closed."===e.message)return t._debug("ignoring incorrect wrtc error");t.destroy(p(e,"ERR_ADD_ICE_CANDIDATE"))})},f.prototype.send=function(e){var t=this;this._channel.send(e)},f.prototype.addTransceiver=function(e,t){var n=this;if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(e,t),this._needsNegotiation()}catch(e){this.destroy(e)}else this.emit("signal",{transceiverRequest:{kind:e,init:t}})},f.prototype.addStream=function(e){var t=this;t._debug("addStream()"),e.getTracks().forEach(function(n){t.addTrack(n,e)})},f.prototype.addTrack=function(e,t){var n=this;this._debug("addTrack()");var r=this._senderMap.get(e)||new Map,i=r.get(t);i?i.removed?this.destroy(p("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):this.destroy(p("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED"):(i=this._pc.addTrack(e,t),r.set(t,i),this._senderMap.set(e,r),this._needsNegotiation())},f.prototype.replaceTrack=function(e,t,n){var r=this;this._debug("replaceTrack()");var i=this._senderMap.get(e),o=i?i.get(n):null;o||this.destroy(p("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED"),t&&this._senderMap.set(t,i),null!=o.replaceTrack?o.replaceTrack(t):this.destroy(p("replaceTrack is not supported in this browser","ERR_UNSUPPORTED_REPLACETRACK"))},f.prototype.removeTrack=function(e,t){var n=this;this._debug("removeSender()");var r=this._senderMap.get(e),i=r?r.get(t):null;i||this.destroy(p("Cannot remove track that was never added.","ERR_TRACK_NOT_ADDED"));try{i.removed=!0,this._pc.removeTrack(i)}catch(e){"NS_ERROR_UNEXPECTED"===e.name?this._sendersAwaitingStable.push(i):this.destroy(e)}this._needsNegotiation()},f.prototype.removeStream=function(e){var t=this;t._debug("removeSenders()"),e.getTracks().forEach(function(n){t.removeTrack(n,e)})},f.prototype._needsNegotiation=function(){var e=this;e._debug("_needsNegotiation"),e._batchedNegotiation||(e._batchedNegotiation=!0,setTimeout(function(){e._batchedNegotiation=!1,e._debug("starting batched negotiation"),e.negotiate()},0))},f.prototype.negotiate=function(){var e=this;e.initiator?e._isNegotiating?(e._queuedNegotiation=!0,e._debug("already negotiating, queueing")):(e._debug("start negotiation"),setTimeout(()=>{e._createOffer()},0)):e._isNegotiating||(e._debug("requesting negotiation from initiator"),e.emit("signal",{renegotiate:!0})),e._isNegotiating=!0},f.prototype.destroy=function(e){var t=this;this._destroy(e,function(){})},f.prototype._destroy=function(e,t){var n=this;if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.destroyed=!0,this.connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch(e){}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch(e){}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,e&&this.emit("error",e),this.emit("close"),t()}},f.prototype._setupData=function(e){var t=this;if(!e.channel)return t.destroy(p("Data channel event is missing `channel` property","ERR_DATA_CHANNEL"));t._channel=e.channel,t._channel.binaryType="arraybuffer","number"==typeof t._channel.bufferedAmountLowThreshold&&(t._channel.bufferedAmountLowThreshold=65536),t.channelName=t._channel.label,t._channel.onmessage=function(e){t._onChannelMessage(e)},t._channel.onbufferedamountlow=function(){t._onChannelBufferedAmountLow()},t._channel.onopen=function(){t._onChannelOpen()},t._channel.onclose=function(){t._onChannelClose()},t._channel.onerror=function(e){t.destroy(p(e,"ERR_DATA_CHANNEL"))};var n=!1;t._closingInterval=setInterval(function(){t._channel&&"closing"===t._channel.readyState?(n&&t._onChannelClose(),n=!0):n=!1},5e3)},f.prototype._read=function(){},f.prototype._write=function(e,t,n){var r=this;if(this.destroyed)return n(p("cannot write after peer is destroyed","ERR_DATA_CHANNEL"));if(this.connected){try{this.send(e)}catch(e){return this.destroy(p(e,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n},f.prototype._onFinish=function(){var e=this;function t(){setTimeout(function(){e.destroy()},1e3)}e.destroyed||(e.connected?t():e.once("connect",t))},f.prototype._startIceCompleteTimeout=function(){var e=this;e.destroyed||e._iceCompleteTimer||(e._debug("started iceComplete timeout"),e._iceCompleteTimer=setTimeout(function(){e._iceComplete||(e._iceComplete=!0,e._debug("iceComplete timeout completed"),e.emit("iceTimeout"),e.emit("_iceComplete"))},e.iceCompleteTimeout))},f.prototype._createOffer=function(){var e=this;e.destroyed||e._pc.createOffer(e.offerOptions).then(function(t){function n(){e._debug("createOffer success"),e.destroyed||(e.trickle||e._iceComplete?i():e.once("_iceComplete",i))}function r(t){e.destroy(p(t,"ERR_SET_LOCAL_DESCRIPTION"))}function i(){if(!e.destroyed){var n=e._pc.localDescription||t;e._debug("signal"),e.emit("signal",{type:n.type,sdp:n.sdp})}}e.destroyed||(e.trickle||e.allowHalfTrickle||(t.sdp=h(t.sdp)),t.sdp=e.sdpTransform(t.sdp),e._pc.setLocalDescription(t).then(n).catch(r))}).catch(function(t){e.destroy(p(t,"ERR_CREATE_OFFER"))})},f.prototype._requestMissingTransceivers=function(){var e=this;e._pc.getTransceivers&&e._pc.getTransceivers().forEach(t=>{!t.mid&&t.sender.track&&e.addTransceiver(t.sender.track.kind)})},f.prototype._createAnswer=function(){var e=this;e.destroyed||e._pc.createAnswer(e.answerOptions).then(function(t){function n(){e.destroyed||(e.trickle||e._iceComplete?i():e.once("_iceComplete",i))}function r(t){e.destroy(p(t,"ERR_SET_LOCAL_DESCRIPTION"))}function i(){if(!e.destroyed){var n=e._pc.localDescription||t;e._debug("signal"),e.emit("signal",{type:n.type,sdp:n.sdp}),e.initiator||e._requestMissingTransceivers()}}e.destroyed||(e.trickle||e.allowHalfTrickle||(t.sdp=h(t.sdp)),t.sdp=e.sdpTransform(t.sdp),e._pc.setLocalDescription(t).then(n).catch(r))}).catch(function(t){e.destroy(p(t,"ERR_CREATE_ANSWER"))})},f.prototype._onIceStateChange=function(){var e=this;if(!this.destroyed){var t=this._pc.iceConnectionState,n=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",t,n),this.emit("iceStateChange",t,n),"connected"!==t&&"completed"!==t||(this._pcReady=!0,this._maybeReady()),"failed"===t&&this.destroy(p("Ice connection failed.","ERR_ICE_CONNECTION_FAILURE")),"closed"===t&&this.destroy(p("Ice connection closed.","ERR_ICE_CONNECTION_CLOSED"))}},f.prototype.getStats=function(e){var t=this;function n(e){return"[object Array]"===Object.prototype.toString.call(e.values)&&e.values.forEach(function(t){Object.assign(e,t)}),e}0===t._pc.getStats.length?t._pc.getStats().then(function(t){var r=[];t.forEach(function(e){r.push(n(e))}),e(null,r)},function(t){e(t)}):t._isReactNativeWebrtc?t._pc.getStats(null,function(t){var r=[];t.forEach(function(e){r.push(n(e))}),e(null,r)},function(t){e(t)}):t._pc.getStats.length>0?t._pc.getStats(function(r){if(!t.destroyed){var i=[];r.result().forEach(function(e){var t={};e.names().forEach(function(n){t[n]=e.stat(n)}),t.id=e.id,t.type=e.type,t.timestamp=e.timestamp,i.push(n(t))}),e(null,i)}},function(t){e(t)}):e(null,[])},f.prototype._maybeReady=function(){var e=this;function t(){e.destroyed||e.getStats(function(n,r){if(!e.destroyed){n&&(r=[]);var i={},o={},s={},a=!1;if(r.forEach(function(e){"remotecandidate"!==e.type&&"remote-candidate"!==e.type||(i[e.id]=e),"localcandidate"!==e.type&&"local-candidate"!==e.type||(o[e.id]=e),"candidatepair"!==e.type&&"candidate-pair"!==e.type||(s[e.id]=e)}),r.forEach(function(e){"transport"===e.type&&e.selectedCandidatePairId&&l(s[e.selectedCandidatePairId]),("googCandidatePair"===e.type&&"true"===e.googActiveConnection||("candidatepair"===e.type||"candidate-pair"===e.type)&&e.selected)&&l(e)}),a||Object.keys(s).length&&!Object.keys(o).length){if(e._connecting=!1,e.connected=!0,e._chunk){try{e.send(e._chunk)}catch(n){return e.destroy(p(n,"ERR_DATA_CHANNEL"))}e._chunk=null,e._debug('sent chunk from "write before connect"');var u=e._cb;e._cb=null,u(null)}"number"!=typeof e._channel.bufferedAmountLowThreshold&&(e._interval=setInterval(function(){e._onInterval()},150),e._interval.unref&&e._interval.unref()),e._debug("connect"),e.emit("connect")}else setTimeout(t,100)}function l(t){a=!0;var n=o[t.localCandidateId];n&&(n.ip||n.address)?(e.localAddress=n.ip||n.address,e.localPort=Number(n.port)):n&&n.ipAddress?(e.localAddress=n.ipAddress,e.localPort=Number(n.portNumber)):"string"==typeof t.googLocalAddress&&(n=t.googLocalAddress.split(":"),e.localAddress=n[0],e.localPort=Number(n[1])),e.localAddress&&(e.localFamily=e.localAddress.includes(":")?"IPv6":"IPv4");var r=i[t.remoteCandidateId];r&&(r.ip||r.address)?(e.remoteAddress=r.ip||r.address,e.remotePort=Number(r.port)):r&&r.ipAddress?(e.remoteAddress=r.ipAddress,e.remotePort=Number(r.portNumber)):"string"==typeof t.googRemoteAddress&&(r=t.googRemoteAddress.split(":"),e.remoteAddress=r[0],e.remotePort=Number(r[1])),e.remoteAddress&&(e.remoteFamily=e.remoteAddress.includes(":")?"IPv6":"IPv4"),e._debug("connect local: %s:%s remote: %s:%s",e.localAddress,e.localPort,e.remoteAddress,e.remotePort)}})}e._debug("maybeReady pc %s channel %s",e._pcReady,e._channelReady),!e.connected&&!e._connecting&&e._pcReady&&e._channelReady&&(e._connecting=!0,t())},f.prototype._onInterval=function(){var e=this;!this._cb||!this._channel||this._channel.bufferedAmount>65536||this._onChannelBufferedAmountLow()},f.prototype._onSignalingStateChange=function(){var e=this;e.destroyed||("stable"!==e._pc.signalingState||e._firstStable||(e._isNegotiating=!1,e._debug("flushing sender queue",e._sendersAwaitingStable),e._sendersAwaitingStable.forEach(function(t){e._pc.removeTrack(t),e._queuedNegotiation=!0}),e._sendersAwaitingStable=[],e._queuedNegotiation&&(e._debug("flushing negotiation queue"),e._queuedNegotiation=!1,e._needsNegotiation()),e._debug("negotiate"),e.emit("negotiate")),e._firstStable=!1,e._debug("signalingStateChange %s",e._pc.signalingState),e.emit("signalingStateChange",e._pc.signalingState))},f.prototype._onIceCandidate=function(e){var t=this;this.destroyed||(e.candidate&&this.trickle?this.emit("signal",{candidate:{candidate:e.candidate.candidate,sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid}}):e.candidate||this._iceComplete||(this._iceComplete=!0,this.emit("_iceComplete")),e.candidate&&this._startIceCompleteTimeout())},f.prototype._onChannelMessage=function(e){var n=this;if(!this.destroyed){var r=e.data;r instanceof ArrayBuffer&&(r=t.from(r)),this.push(r)}},f.prototype._onChannelBufferedAmountLow=function(){var e=this;if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);var t=this._cb;this._cb=null,t(null)}},f.prototype._onChannelOpen=function(){var e=this;this.connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())},f.prototype._onChannelClose=function(){var e=this;this.destroyed||(this._debug("on channel close"),this.destroy())},f.prototype._onTrack=function(e){var t=this;t.destroyed||e.streams.forEach(function(n){t._debug("on track"),t.emit("track",e.track,n),t._remoteTracks.push({track:e.track,stream:n}),t._remoteStreams.some(function(e){return e.id===n.id})||(t._remoteStreams.push(n),setTimeout(function(){t.emit("stream",n)},0))})},f.prototype._debug=function(){var e=this,t=[].slice.call(arguments);t[0]="["+this._id+"] "+t[0],r.apply(null,t)}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(28),i=function(){},o=function(e){return e.setHeader&&"function"==typeof e.abort},s=function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length},a=function(e,t,n){if("function"==typeof t)return a(e,null,t);t||(t={}),n=r(n||i);var u=e._writableState,l=e._readableState,c=t.readable||!1!==t.readable&&e.readable,f=t.writable||!1!==t.writable&&e.writable,h=function(){e.writable||p()},p=function(){f=!1,c||n.call(e)},d=function(){c=!1,f||n.call(e)},m=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){n.call(e,t)},y=function(){return(!c||l&&l.ended)&&(!f||u&&u.ended)?void 0:n.call(e,new Error("premature close"))},b=function(){e.req.on("finish",p)};return o(e)?(e.on("complete",p),e.on("abort",y),e.req?b():e.on("request",b)):f&&!u&&(e.on("end",h),e.on("close",h)),s(e)&&e.on("exit",m),e.on("end",d),e.on("finish",p),!1!==t.error&&e.on("error",g),e.on("close",y),function(){e.removeListener("complete",p),e.removeListener("abort",y),e.removeListener("request",b),e.req&&e.req.removeListener("finish",p),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("exit",m),e.removeListener("end",d),e.removeListener("error",g),e.removeListener("close",y)}};e.exports=a},function(e,t){var n=function(){};function r(e,t,n){var r=e.length;if(!r)return n(t);function i(){--r||n(t)}e.forEach(function(e){e?e(t,i):i()}),r||i()}e.exports=function(e){return function(t,n){!function i(){t?r(e,t,n):e.length?e[0]?e[0](null,function(t,o){t?(e.shift(),!0===t?i():r(e,t,n)):n(null,o)}):(e.shift(),i()):n(!0)}()}}},function(e,t,n){"use strict";e.exports=function(){var e,t;function n(n){if("function"!=typeof n)throw new Error("read must be function");if(e)throw new Error("already piped");if(e=n,t){var r=t;t=null,e.apply(null,r)}}function r(n,r){e?e(n,r):t=[n,r]}return{source:r,sink:n}}},function(e,t,n){"use strict";t.Listener=t.listener=n(1129),t.Dialer=t.dialer=n(1132),t.matchSemver=n(1133),t.matchExact=n(532)},function(e,t,n){"use strict";(function(r){const i=n(12),o=n(43),s=n(37),a=n(72),u=n(5);function l(){return(~~(1e9*Math.random())).toString(36)}function c(e,t){i(o(r.isBuffer(e)?[e]:[r.from(e)]),a.encode(),s((e,n)=>{if(e)return t(e);t(null,n[0])}))}function f(e){const t=l();function n(e){return n=>{Array.isArray(n)&&(n=n.join(" ")),e("(%s) %s",t,n)}}const r=n(u("mss:"+e));return r.error=n(u("mss:"+e+":error")),r}t=e.exports,t.writeEncoded=((e,t,n)=>{c(t,(t,r)=>{if(t)return n(t);e.write(r)})}),t.log={},t.log.dialer=(()=>f("dialer\t")),t.log.listener=(()=>f("listener\t"))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";t.importer=t.Importer=n(550),t.exporter=t.Exporter=n(123)},function(e,t,n){var r=n(1216);function i(e,t){return(e=e||[]).push(t),e}e.exports=function(e,t,n,o){var s,a,u;function l(i){var c=null,f=!1,h=0;if(u=i,s)return i(!!s.abort||s,function(e){o(e),a&&a()});var p=!1,d=r(function(){p||s||(p=!0,i(null,function(e,r){p=!1,function(e,r){s||(s=e,s?f||o(!0===s?null:s):(c=t(c,r),h=c&&c.length||0,null!=c&&m(),h<n&&d()))}(e,r)}))});function m(){if(!f){var t=c;c=null,f=!0,h=0,e(t,function(e){f=!1,!0!==s||h?s&&!0!==s?(o(s),a&&a()):e?i(s=!!e.abort||e,o):h?m():d():o(e)})}}l.abort=function(e){a=function(t){e&&e()};var t=new Error("aborted");t.abort=!0,i(s=t,function(e){e=!0===e?null:e,f||(o&&o(e),a&&a(e))})},d()}return t=t||i,l.abort=function(e){s=new Error("aborted before connecting"),a=function(t){e&&e()}},l}},function(e,t,n){"use strict";(function(t){const{util:{cid:r}}=n(38),i=0,o="sha2-256",s="dag-pb",a=(e,n,a,u)=>{let l=a.cidVersion||i,c=a.hashAlg||o,f=a.codec||s;if(t.isBuffer(e)&&(l=1,f="raw"),"sha2-256"!==c&&(l=1),a.onlyHash)return r(e,{version:l,hashAlg:c},(t,n)=>{u(t,{cid:n,node:e})});n.put(e,{version:l,hashAlg:c,format:f},(t,n)=>{u(t,{cid:n,node:e})})};e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(1231),i=n(229),o=n(11),s=n(38),a=n(48),u=s.DAGLink,l=s.DAGNode,c=n(58),f=n(341),h=n(262),p=n(1232),d=n(12),m=n(406),g=n(89),y=n(1235),b=function(e){return new Promise((n,r)=>{c(e,"murmur3-128",(e,i)=>{if(e)r(e);else{const e=i.slice(2,10),r=e.length,o=t.alloc(r);for(let t=0;t<r;t++)o[r-t-1]=e[t];n(o)}})})};b.code=34;const v={hashFn:b};class w extends f{constructor(e,t){const n=Object.assign({},v,t);super(e,n),this._bucket=y(n)}async put(e,t,n){try{return await this._bucket.put(e,t),n()}catch(e){return n(e)}}async get(e,t){try{return t(null,await this._bucket.get(e))}catch(e){return t(e)}}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(e){try{return e(null,this._bucket.onlyChild())}catch(t){return e(t)}}eachChildSeries(e,t){d(p(this._bucket.eachLeafSeries()),g((t,n)=>{e(t.key,t.value,n)}),m(t))}flush(e,t,n,r){k(this._options,this._bucket,e,t,n,(e,t)=>{if(e)return r(e);this.multihash=t.cid.buffer,this.size=t.node.size,r(null,t)})}}function _(e,t){return new w(e,t)}function k(e,n,s,c,f,p){const d=n._children;let m=0;const g=[];function b(t,n,i){const o=r(n.toString(16).toUpperCase(),2,"0");if(y.isBucket(t))k(e,t,s,c,null,(e,{cid:t,node:n})=>{e?i(e):(g.push(new u(o,n.size,t)),i())});else{const e=t.value,n=o+t.key;g.push(new u(n,e.size,e.multihash)),i()}}function v(r,i){const u=t.from(d.bitField().reverse()),p=new a("hamt-sharded-directory",u);p.fanout=n.tableSize(),p.hashType=e.hashFn.code,o([e=>l.create(p.marshal(),r,e),(t,n)=>h(t,c,e,n),({cid:e,node:t},n)=>{const r={path:s,size:t.size,multihash:e.buffer};f&&f.push(r),n(null,{cid:e,node:t})}],i)}i(()=>m<d.length,e=>{const t=d.get(m);t?b(t,m,t=>{m++,e(t)}):(m++,e())},e=>{e?p(e):v(g,p)})}e.exports=_,e.exports.hashFn=b}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(e){const r=n(9);function i(e){const t={},n=e.split("-");switch(n.length){case 1:t.avgChunkSize=262144;break;case 2:t.avgChunkSize=o(n[1],"avg");break;case 4:t.minChunkSize=o(n[1],"min"),t.avgChunkSize=o(n[2],"avg"),t.maxChunkSize=o(n[3],"max");break;default:throw new Error('Incorrect chunker format (expected "rabin" "rabin-[avg]" or "rabin-[min]-[avg]-[max]"')}return t}function o(e,t){let n=parseInt(e);if(isNaN(n))throw new Error(`Chunker parameter ${t} must be an integer`);return n}t.normalizePath=(t=>e.isBuffer(t)?new r(t).toString():r.isCID(t)?t.toString():(0===t.indexOf("/ipfs/")&&(t=t.substring("/ipfs/".length)),"/"===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t)),t.parseChunkerString=(e=>{if(e){if(e.startsWith("size-")){const t=e.split("-")[1],n=parseInt(t);if(isNaN(n))throw new Error("Chunker parameter size must be an integer");return{chunker:"fixed",chunkerOptions:{maxChunkSize:n}}}if(e.startsWith("rabin"))return{chunker:"rabin",chunkerOptions:i(e)};throw new Error(`Unrecognized chunker option: ${e}`)}return{chunker:"fixed"}})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(33).Key,i={file:0,directory:1,"hamt-sharded-directory":1};e.exports={FILE_SEPARATOR:"/",MFS_ROOT_KEY:new r("/local/filesroot"),MAX_CHUNK_SIZE:262144,MAX_LINKS:174,FILE_TYPES:i}},function(e,t,n){"use strict";var r=n(1269),i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",o,s,a;function u(){a=!1}function l(e){if(e){if(e!==o){if(e.length!==i.length)throw new Error("Custom alphabet for shortid must be "+i.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter(function(e,t,n){return t!==n.lastIndexOf(e)});if(t.length)throw new Error("Custom alphabet for shortid must be "+i.length+" unique characters. These characters were not unique: "+t.join(", "));o=e,u()}}else o!==i&&(o=i,u())}function c(e){return l(e),o}function f(e){r.seed(e),s!==e&&(u(),s=e)}function h(){o||l(i);for(var e=o.split(""),t=[],n=r.nextValue(),s;e.length>0;)n=r.nextValue(),s=Math.floor(n*e.length),t.push(e.splice(s,1)[0]);return t.join("")}function p(){return a||(a=h(),a)}function d(e){var t=p();return t[e]}function m(){return o||i}e.exports={get:m,characters:c,seed:f,lookup:d,shuffled:p}},function(e,t,n){"use strict";const r=n(48).unmarshal,{formatCid:i,toMfsPath:o,loadNode:s}=n(82),a=n(11),u=n(12),l=n(37),c=n(89),f=n(123),h=n(9),p=n(5)("ipfs:mfs:stat"),d={hash:!1,size:!1,withLocal:!1,cidBase:"base58btc"};e.exports=(e=>(function t(n,m,g){"function"==typeof m&&(g=m,m={}),m=Object.assign({},d,m),p(`Fetching stats for ${n}`),a([t=>o(e,n,t),({mfsPath:t,depth:o},a)=>{u(f(t,e.ipld,{maxDepth:o}),c((t,n)=>m.hash?n(null,{hash:i(new h(t.hash),m.cidBase)}):m.size?n(null,{size:t.size}):void s(e,{cid:t.hash},(e,t)=>{if(e)return n(e);const{node:o,cid:s}=t,a=r(o.data);let u=o.links.length;"file"===a.type&&(u=a.blockSizes.length),n(null,{hash:i(s,m.cidBase),size:a.fileSize()||0,cumulativeSize:o.size,blocks:u,type:a.type,local:void 0,sizeLocal:void 0,withLocality:!1})})),l((e,t)=>e?a(e):t.length?(p(`Stats for ${n}`,t[0]),a(null,t[0])):a(new Error(`${n} does not exist`))))}],g)}))},function(e,t,n){"use strict";var r=t;r.base=n(1332),r.short=n(1333),r.mont=n(1334),r.edwards=n(1335)},function(e,t,n){"use strict";var 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},i=n(1388),o=n(1394),s=n(18),a=n(192),u=n(63),l=n(143),c=n(4).Buffer;Object.assign(t,n(1396)),t.MAX_INTEGER=new u("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new u("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=c.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=c.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=c.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=u,t.rlp=a,t.secp256k1=o,t.zeros=function(e){return c.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=20,n=t.zeros(20);return t.bufferToHex(n)},t.setLengthLeft=t.setLength=function(e,n,r){var i=t.zeros(n);return e=t.toBuffer(e),r?e.length<n?(e.copy(i),i):e.slice(0,n):e.length<n?(e.copy(i,n-e.length),i):e.slice(-n)},t.setLengthRight=function(e,n){return t.setLength(e,n,!0)},t.unpad=t.stripZeros=function(e){e=t.stripHexPrefix(e);for(var n=e[0];e.length>0&&"0"===n.toString();)e=e.slice(1),n=e[0];return e},t.toBuffer=function(e){if(!c.isBuffer(e))if(Array.isArray(e))e=c.from(e);else if("string"==typeof e)e=t.isHexString(e)?c.from(t.padToEven(t.stripHexPrefix(e)),"hex"):c.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null===e||void 0===e)e=c.allocUnsafe(0);else if(u.isBN(e))e=e.toArrayLike(c);else{if(!e.toArray)throw new Error("invalid type");e=c.from(e.toArray())}return e},t.bufferToInt=function(e){return new u(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return e=t.toBuffer(e),"0x"+e.toString("hex")},t.fromSigned=function(e){return new u(e).fromTwos(256)},t.toUnsigned=function(e){return c.from(e.toTwos(256).toArray())},t.keccak=function(e,n){return e=t.toBuffer(e),n||(n=256),i("keccak"+n).update(e).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),l("sha256").update(e).digest()},t.ripemd160=function(e,n){e=t.toBuffer(e);var r=l("rmd160").update(e).digest();return!0===n?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(a.encode(e))},t.isValidPrivate=function(e){return o.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?o.publicKeyVerify(c.concat([c.from([4]),e])):!!t&&o.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,n){return e=t.toBuffer(e),n&&64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var f=t.privateToPublic=function(e){return e=t.toBuffer(e),o.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return e=t.toBuffer(e),64!==e.length&&(e=o.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var n=o.sign(e,t),r={};return r.r=n.signature.slice(0,32),r.s=n.signature.slice(32,64),r.v=n.recovery+27,r},t.hashPersonalMessage=function(e){var n=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(c.concat([n,e]))},t.ecrecover=function(e,n,r,i){var s=c.concat([t.setLength(r,32),t.setLength(i,32)],64),a=n-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var u=o.recover(e,s,a);return o.publicKeyConvert(u,!1).slice(1)},t.toRpcSig=function(e,n,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(c.concat([t.setLengthLeft(n,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(e=t.toBuffer(e),65!==e.length)throw new Error("Invalid signature length");var n=e[64];return n<27&&(n+=27),{v:n,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(f(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){var n=t.zeroAddress();return n===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var n=t.keccak(e).toString("hex"),r="0x",i=0;i<e.length;i++)parseInt(n[i],16)>=8?r+=e[i].toUpperCase():r+=e[i];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,n){return e=t.toBuffer(e),n=new u(n),n=n.isZero()?null:c.from(n.toArray()),t.rlphash([e,n]).slice(-20)},t.isPrecompiled=function(e){var n=t.unpad(e);return 1===n.length&&n[0]>=1&&n[0]<=8},t.addHexPrefix=function(e){return"string"!=typeof e?e:t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,n,r){var i=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new u("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===n.length&&((27===e||28===e)&&(t=new u(t),n=new u(n),!(t.isZero()||t.gt(o)||n.isZero()||n.gt(o))&&(!1!==r||1!==new u(n).cmp(i))))},t.baToJSON=function(e){if(c.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],r=0;r<e.length;r++)n.push(t.baToJSON(e[r]));return n}},t.defineProperties=function(e,n,i){if(e.raw=[],e._fields=[],e.toJSON=function(n){if(n){var r={};return e._fields.forEach(function(t){r[t]="0x"+e[t].toString("hex")}),r}return t.baToJSON(this.raw)},e.serialize=function t(){return a.encode(e.raw)},n.forEach(function(n,r){function i(){return e.raw[r]}function o(i){i=t.toBuffer(i),"00"!==i.toString("hex")||n.allowZero||(i=c.allocUnsafe(0)),n.allowLess&&n.length?(i=t.stripZeros(i),s(n.length>=i.length,"The field "+n.name+" must not have more "+n.length+" bytes")):n.allowZero&&0===i.length||!n.length||s(n.length===i.length,"The field "+n.name+" must have byte length of "+n.length),e.raw[r]=i}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:i,set:o}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:o,get:i})}),i)if("string"==typeof i&&(i=c.from(t.stripHexPrefix(i),"hex")),c.isBuffer(i)&&(i=a.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach(function(n,r){e[e._fields[r]]=t.toBuffer(n)})}else{if("object"!==(void 0===i?"undefined":r(i)))throw new Error("invalid data");var o=Object.keys(i);n.forEach(function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])})}}},function(e,t,n){"use strict";const r=n(271).SmartBuffer,i=n(403),o=n(1426),s=n(35),a=n(9);t=e.exports,t.SHA1_LENGTH=i.defaultLengths[i.names.sha1],t.find=((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}),t.parsePersonLine=(e=>{let t=e.match(/^(([^<]+)\s)?\s?<([^>]+)>\s?(\d+\s[+\-\d]+)?$/);return null===t?null:{name:t[2],email:t[3],date:t[4]}}),t.serializePersonLine=(e=>{let t=[];return e.name&&t.push(e.name),t.push("<"+e.email+">"),e.date&&t.push(e.date),t.join(" ")}),t.shaToCid=(e=>{let n=new r;return n.writeUInt8(1),n.writeBuffer(o["git-raw"]),n.writeUInt8(i.names.sha1),n.writeUInt8(t.SHA1_LENGTH),n.writeBuffer(e),n.toBuffer()}),t.cidToSha=(e=>{let t=s.decode(new a(e).multihash);return"sha1"!==t.name?null:t.digest})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const r=n(1425),i=4096,o="utf8";class s{constructor(t){if(this.length=0,this._encoding=o,this._writeOffset=0,this._readOffset=0,s.isSmartBufferOptions(t))if(t.encoding&&(r.checkEncoding(t.encoding),this._encoding=t.encoding),t.size){if(!(r.isFiniteInteger(t.size)&&t.size>0))throw new Error(r.ERRORS.INVALID_SMARTBUFFER_SIZE);this._buff=e.allocUnsafe(t.size)}else if(t.buff){if(!(t.buff instanceof e))throw new Error(r.ERRORS.INVALID_SMARTBUFFER_BUFFER);this._buff=t.buff,this.length=t.buff.length}else this._buff=e.allocUnsafe(i);else{if(void 0!==t)throw new Error(r.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=e.allocUnsafe(i)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const t=e;return t&&(void 0!==t.encoding||void 0!==t.size||void 0!==t.buff)}readInt8(t){return this._readNumberValue(e.prototype.readInt8,1,t)}readInt16BE(t){return this._readNumberValue(e.prototype.readInt16BE,2,t)}readInt16LE(t){return this._readNumberValue(e.prototype.readInt16LE,2,t)}readInt32BE(t){return this._readNumberValue(e.prototype.readInt32BE,4,t)}readInt32LE(t){return this._readNumberValue(e.prototype.readInt32LE,4,t)}writeInt8(t,n){return this._writeNumberValue(e.prototype.writeInt8,1,t,n),this}insertInt8(t,n){return this._insertNumberValue(e.prototype.writeInt8,1,t,n)}writeInt16BE(t,n){return this._writeNumberValue(e.prototype.writeInt16BE,2,t,n)}insertInt16BE(t,n){return this._insertNumberValue(e.prototype.writeInt16BE,2,t,n)}writeInt16LE(t,n){return this._writeNumberValue(e.prototype.writeInt16LE,2,t,n)}insertInt16LE(t,n){return this._insertNumberValue(e.prototype.writeInt16LE,2,t,n)}writeInt32BE(t,n){return this._writeNumberValue(e.prototype.writeInt32BE,4,t,n)}insertInt32BE(t,n){return this._insertNumberValue(e.prototype.writeInt32BE,4,t,n)}writeInt32LE(t,n){return this._writeNumberValue(e.prototype.writeInt32LE,4,t,n)}insertInt32LE(t,n){return this._insertNumberValue(e.prototype.writeInt32LE,4,t,n)}readUInt8(t){return this._readNumberValue(e.prototype.readUInt8,1,t)}readUInt16BE(t){return this._readNumberValue(e.prototype.readUInt16BE,2,t)}readUInt16LE(t){return this._readNumberValue(e.prototype.readUInt16LE,2,t)}readUInt32BE(t){return this._readNumberValue(e.prototype.readUInt32BE,4,t)}readUInt32LE(t){return this._readNumberValue(e.prototype.readUInt32LE,4,t)}writeUInt8(t,n){return this._writeNumberValue(e.prototype.writeUInt8,1,t,n)}insertUInt8(t,n){return this._insertNumberValue(e.prototype.writeUInt8,1,t,n)}writeUInt16BE(t,n){return this._writeNumberValue(e.prototype.writeUInt16BE,2,t,n)}insertUInt16BE(t,n){return this._insertNumberValue(e.prototype.writeUInt16BE,2,t,n)}writeUInt16LE(t,n){return this._writeNumberValue(e.prototype.writeUInt16LE,2,t,n)}insertUInt16LE(t,n){return this._insertNumberValue(e.prototype.writeUInt16LE,2,t,n)}writeUInt32BE(t,n){return this._writeNumberValue(e.prototype.writeUInt32BE,4,t,n)}insertUInt32BE(t,n){return this._insertNumberValue(e.prototype.writeUInt32BE,4,t,n)}writeUInt32LE(t,n){return this._writeNumberValue(e.prototype.writeUInt32LE,4,t,n)}insertUInt32LE(t,n){return this._insertNumberValue(e.prototype.writeUInt32LE,4,t,n)}readFloatBE(t){return this._readNumberValue(e.prototype.readFloatBE,4,t)}readFloatLE(t){return this._readNumberValue(e.prototype.readFloatLE,4,t)}writeFloatBE(t,n){return this._writeNumberValue(e.prototype.writeFloatBE,4,t,n)}insertFloatBE(t,n){return this._insertNumberValue(e.prototype.writeFloatBE,4,t,n)}writeFloatLE(t,n){return this._writeNumberValue(e.prototype.writeFloatLE,4,t,n)}insertFloatLE(t,n){return this._insertNumberValue(e.prototype.writeFloatLE,4,t,n)}readDoubleBE(t){return this._readNumberValue(e.prototype.readDoubleBE,8,t)}readDoubleLE(t){return this._readNumberValue(e.prototype.readDoubleLE,8,t)}writeDoubleBE(t,n){return this._writeNumberValue(e.prototype.writeDoubleBE,8,t,n)}insertDoubleBE(t,n){return this._insertNumberValue(e.prototype.writeDoubleBE,8,t,n)}writeDoubleLE(t,n){return this._writeNumberValue(e.prototype.writeDoubleLE,8,t,n)}insertDoubleLE(t,n){return this._insertNumberValue(e.prototype.writeDoubleLE,8,t,n)}readString(e,t){let n;"number"==typeof e?(r.checkLengthValue(e),n=Math.min(e,this.length-this._readOffset)):(t=e,n=this.length-this._readOffset),void 0!==t&&r.checkEncoding(t);const i=this._buff.slice(this._readOffset,this._readOffset+n).toString(t||this._encoding);return this._readOffset+=n,i}insertString(e,t,n){return r.checkOffsetValue(t),this._handleString(e,!0,t,n)}writeString(e,t,n){return this._handleString(e,!1,t,n)}readStringNT(e){void 0!==e&&r.checkEncoding(e);let t=this.length;for(let e=this._readOffset;e<this.length;e++)if(0===this._buff[e]){t=e;break}const n=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,n.toString(e||this._encoding)}insertStringNT(e,t,n){return r.checkOffsetValue(t),this.insertString(e,t,n),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,n){return this.writeString(e,t,n),this.writeUInt8(0,"number"==typeof t?t+e.length:this.writeOffset),this}readBuffer(e){void 0!==e&&r.checkLengthValue(e);const t="number"==typeof e?e:this.length,n=Math.min(this.length,this._readOffset+t),i=this._buff.slice(this._readOffset,n);return this._readOffset=n,i}insertBuffer(e,t){return r.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let t=this._readOffset;t<this.length;t++)if(0===this._buff[t]){e=t;break}const t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return r.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return void 0!==t&&r.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,"number"==typeof t?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){r.checkOffsetValue(e),r.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){r.checkOffsetValue(e),r.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){r.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){const t="string"==typeof e?e:this._encoding;return r.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(t,n,i,o){let s=this._writeOffset,a=this._encoding;"number"==typeof i?s=i:"string"==typeof i&&(r.checkEncoding(i),a=i),"string"==typeof o&&(r.checkEncoding(o),a=o);const u=e.byteLength(t,a);return n?this.ensureInsertable(u,s):this._ensureWriteable(u,s),this._buff.write(t,s,u,a),n?this._writeOffset+=u:"number"==typeof i?this._writeOffset=Math.max(this._writeOffset,s+u):this._writeOffset+=u,this}_handleBuffer(e,t,n){const r="number"==typeof n?n:this._writeOffset;return t?this.ensureInsertable(e.length,r):this._ensureWriteable(e.length,r),e.copy(this._buff,r),t?this._writeOffset+=e.length:"number"==typeof n?this._writeOffset=Math.max(this._writeOffset,r+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let n=this._readOffset;if(void 0!==t&&(r.checkOffsetValue(t),n=t),n<0||n+e>this.length)throw new Error(r.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){r.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){const n="number"==typeof t?t:this._writeOffset;this._ensureCapacity(n+e),n+e>this.length&&(this.length=n+e)}_ensureCapacity(t){const n=this._buff.length;if(t>n){let r=this._buff,i=3*n/2+1;i<t&&(i=t),this._buff=e.allocUnsafe(i),r.copy(this._buff,0,0,n)}}_readNumberValue(e,t,n){this.ensureReadable(t,n);const r=e.call(this._buff,"number"==typeof n?n:this._readOffset);return void 0===n&&(this._readOffset+=t),r}_insertNumberValue(e,t,n,i){return r.checkOffsetValue(i),this.ensureInsertable(t,i),e.call(this._buff,n,i),this._writeOffset+=t,this}_writeNumberValue(e,t,n,i){if("number"==typeof i){if(i<0)throw new Error(r.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);r.checkOffsetValue(i)}const o="number"==typeof i?i:this._writeOffset;return this._ensureWriteable(t,o),e.call(this._buff,n,o),"number"==typeof i?this._writeOffset=Math.max(this._writeOffset,o+t):this._writeOffset+=t,this}}t.SmartBuffer=s}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=t;r.base=n(1437),r.short=n(1438),r.mont=n(1439),r.edwards=n(1440)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(129),o=n(195),s=n(49),a=n(41),u=n(128),l=n(152),c=n(95),f=n(276),h=n(25);function p(e,t){if(!(this instanceof p))return new p(e,t);if(e instanceof p)return e;var n=this._classifyArguments(e,t);if(!n.bn||0===n.bn.cmp(new s(0)))throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!n.bn.lt(l.getN()))throw new TypeError("Number must be less than N");if(void 0===n.network)throw new TypeError('Must specify the network ("livenet" or "testnet")');return a.defineImmutable(this,{bn:n.bn,compressed:n.compressed,network:n.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}p.prototype._classifyArguments=function(e,n){var i={compressed:!0,network:n?u.get(n):u.defaultNetwork};if(r.isUndefined(e)||r.isNull(e))i.bn=p._getRandomBN();else if(e instanceof s)i.bn=e;else if(e instanceof t||e instanceof Uint8Array)i=p._transformBuffer(e,n);else if(e.bn&&e.network)i=p._transformObject(e);else if(!n&&u.get(e))i.bn=p._getRandomBN(),i.network=u.get(e);else{if("string"!=typeof e)throw new TypeError("First argument is an unrecognized data type.");a.isHexa(e)?i.bn=new s(new t(e,"hex")):i=p._transformWIF(e,n)}return i},p._getRandomBN=function(){var e,t;do{var n=f.getRandomBuffer(32);t=s.fromBuffer(n),e=t.lt(l.getN())}while(!e);return t},p._transformBuffer=function(e,t){var n={};if(32===e.length)return p._transformBNBuffer(e,t);if(n.network=u.get(e[0],"privatekey"),!n.network)throw new Error("Invalid network");if(t&&n.network!==u.get(t))throw new TypeError("Private key network mismatch");if(34===e.length&&1===e[33])n.compressed=!0;else{if(33!==e.length)throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");n.compressed=!1}return n.bn=s.fromBuffer(e.slice(1,33)),n},p._transformBNBuffer=function(e,t){var n={};return n.network=u.get(t)||u.defaultNetwork,n.bn=s.fromBuffer(e),n.compressed=!1,n},p._transformWIF=function(e,t){return p._transformBuffer(o.decode(e),t)},p.fromBuffer=function(e,t){return new p(e,t)},p._transformObject=function(e){var t=new s(e.bn,"hex"),n=u.get(e.network);return{bn:t,network:n,compressed:e.compressed}},p.fromString=p.fromWIF=function(e){return h.checkArgument(r.isString(e),"First argument is expected to be a string."),new p(e)},p.fromObject=function(e){return h.checkArgument(r.isObject(e),"First argument is expected to be an object."),new p(e)},p.fromRandom=function(e){var t=p._getRandomBN();return new p(t,e)},p.getValidationError=function(e,t){var n;try{new p(e,t)}catch(e){n=e}return n},p.isValid=function(e,t){return!!e&&!p.getValidationError(e,t)},p.prototype.toString=function(){return this.toBuffer().toString("hex")},p.prototype.toWIF=function(){var e=this.network,n=this.compressed,r;return r=n?t.concat([new t([e.privatekey]),this.bn.toBuffer({size:32}),new t([1])]):t.concat([new t([e.privatekey]),this.bn.toBuffer({size:32})]),o.encode(r)},p.prototype.toBigNumber=function(){return this.bn},p.prototype.toBuffer=function(){return this.bn.toBuffer()},p.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=c.fromPrivateKey(this)),this._pubkey},p.prototype.toAddress=function(e){var t=this.toPublicKey();return i.fromPublicKey(t,e||this.network)},p.prototype.toObject=p.prototype.toJSON=function e(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}},p.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"},e.exports=p}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(599),o=n(0),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),a=function e(n){if(!(this instanceof e))return new e(n);if(t.isBuffer(n)){var r=n;this.fromBuffer(r)}else if("string"==typeof n){var i=n;this.fromString(i)}else n&&this.set(n)};a.validCharacters=function e(t){return o.Buffer.isBuffer(t)&&(t=t.toString()),r.all(r.map(t,function(e){return r.contains(s,e)}))},a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this},a.encode=function(e){if(!o.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return i.encode(e)},a.decode=function(e){if("string"!=typeof e)throw new Error("Input should be a string");return new t(i.decode(e))},a.prototype.fromBuffer=function(e){return this.buf=e,this},a.prototype.fromString=function(e){var t=a.decode(e);return this.buf=t,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){e.exports=n(359),e.exports.Input=n(360),e.exports.Output=n(111),e.exports.UnspentOutput=n(601),e.exports.Signature=n(198),e.exports.Sighash=n(110)},function(e,t,n){"use strict";(function(t,r){function i(){}i.getRandomBuffer=function(e){return t.browser?i.getRandomBufferBrowser(e):i.getRandomBufferNode(e)},i.getRandomBufferNode=function(e){var t=n(15);return t.randomBytes(e)},i.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else{if(!window.msCrypto||!window.msCrypto.getRandomValues)throw new Error("window.crypto.getRandomValues not available");var t=window.msCrypto}var n=new Uint8Array(e);t.getRandomValues(n);var i=new r(n);return i},i.getPseudoRandomBuffer=function(e){for(var t=4294967296,n=new r(e),i,o=0;o<=e;o++){var s=Math.floor(o/4),a=o-4*s;0===a?(i=Math.random()*t,n[o]=255&i):n[o]=255&(i>>>=8)}return n},e.exports=i}).call(this,n(2),n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(49),o=n(30),s=n(109),a=n(80),u=n(60),l=n(41),c=n(25),f=537133055,h=function e(t){if(!(this instanceof e))return new e(t);var n=e._from(t);return this.version=n.version,this.prevHash=n.prevHash,this.merkleRoot=n.merkleRoot,this.reserved=n.reserved,this.time=n.time,this.timestamp=n.time,this.bits=n.bits,this.nonce=n.nonce,this.solution=n.solution,n.hash&&c.checkState(this.hash===n.hash,"Argument object hash property does not match block hash."),this};h._from=function e(t){var n={};if(o.isBuffer(t))n=h._fromBufferReader(s(t));else{if(!r.isObject(t))throw new TypeError("Unrecognized argument for BlockHeader");n=h._fromObject(t)}return n},h._fromObject=function e(n){c.checkArgument(n,"data is required");var i=n.prevHash,s=n.merkleRoot,a=n.reserved,u=n.nonce,l=n.solution;r.isString(n.prevHash)&&(i=o.reverse(new t(n.prevHash,"hex"))),r.isString(n.merkleRoot)&&(s=o.reverse(new t(n.merkleRoot,"hex"))),r.isString(n.reserved)&&(a=o.reverse(new t(n.reserved,"hex"))),r.isString(n.nonce)&&(u=o.reverse(new t(n.nonce,"hex"))),r.isString(n.solution)&&(l=new t(n.solution,"hex"));var f={hash:n.hash,version:n.version,prevHash:i,merkleRoot:s,reserved:a,time:n.time,timestamp:n.time,bits:n.bits,nonce:u,solution:l};return f},h.fromObject=function e(t){var n=h._fromObject(t);return new h(n)},h.fromRawBlock=function e(n){o.isBuffer(n)||(n=new t(n,"binary"));var r=s(n);r.pos=h.Constants.START_OF_HEADER;var i=h._fromBufferReader(r);return new h(i)},h.fromBuffer=function e(t){var n=h._fromBufferReader(s(t));return new h(n)},h.fromString=function e(n){var r=new t(n,"hex");return h.fromBuffer(r)},h._fromBufferReader=function e(t){var n={};n.version=t.readUInt32LE(),n.prevHash=t.read(32),n.merkleRoot=t.read(32),n.reserved=t.read(32),n.time=t.readUInt32LE(),n.bits=t.readUInt32LE(),n.nonce=t.read(32);var r=t.readVarintNum();return n.solution=t.read(r),n},h.fromBufferReader=function e(t){var n=h._fromBufferReader(t);return new h(n)},h.prototype.toObject=h.prototype.toJSON=function e(){return{hash:this.hash,version:this.version,prevHash:o.reverse(this.prevHash).toString("hex"),merkleRoot:o.reverse(this.merkleRoot).toString("hex"),reserved:o.reverse(this.reserved).toString("hex"),time:this.time,bits:this.bits,nonce:o.reverse(this.nonce).toString("hex"),solution:this.solution.toString("hex")}},h.prototype.toBuffer=function e(){return this.toBufferWriter().concat()},h.prototype.toString=function e(){return this.toBuffer().toString("hex")},h.prototype.toBufferWriter=function e(t){return t||(t=new a),t.writeUInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.write(this.reserved),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.write(this.nonce),t.writeVarintNum(this.solution.length),t.write(this.solution),t},h.prototype.getTargetDifficulty=function e(t){t=t||this.bits;for(var n=new i(16777215&t),r=8*((t>>>24)-3);r-- >0;)n=n.mul(new i(2));return n},h.prototype.getDifficulty=function e(){var t=this.getTargetDifficulty(537133055).mul(new i(Math.pow(10,8))),n=this.getTargetDifficulty(),r=t.div(n).toString(10),o=r.length-8;return r=r.slice(0,o)+"."+r.slice(o),parseFloat(r)},h.prototype._getHash=function e(){var t=this.toBuffer();return u.sha256sha256(t)};var p={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=s(this._getHash()).readReverse().toString("hex")),this._id},set:r.noop};Object.defineProperty(h.prototype,"id",p),Object.defineProperty(h.prototype,"hash",p),h.prototype.validTimestamp=function e(){var t=Math.round((new Date).getTime()/1e3);return!(this.time>t+h.Constants.MAX_TIME_OFFSET)},h.prototype.validProofOfWork=function e(){var t=new i(this.id,"hex"),n=this.getTargetDifficulty();return!(t.cmp(n)>0)},h.prototype.inspect=function e(){return"<BlockHeader "+this.id+">"},h.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new i("10000000000000000000000000000000000000000000000000000000000000000","hex")},e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var n=Object.prototype.toString,r="function"==typeof t.alloc&&"function"==typeof t.allocUnsafe&&"function"==typeof t.from;function i(e){return"ArrayBuffer"===n.call(e).slice(8,-1)}function o(e,n,i){n>>>=0;var o=e.byteLength-n;if(o<0)throw new RangeError("'offset' is out of bounds");if(void 0===i)i=o;else if(i>>>=0,i>o)throw new RangeError("'length' is out of bounds");return r?t.from(e.slice(n,n+i)):new t(new Uint8Array(e.slice(n,n+i)))}function s(e,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return r?t.from(e,n):new t(e,n)}function a(e,n,a){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return i(e)?o(e,n,a):"string"==typeof e?s(e,n):r?t.from(e):new t(e)}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){t=e.exports=n(628),t.Stream=t,t.Readable=t,t.Writable=n(631),t.Duplex=n(157),t.Transform=n(632),t.PassThrough=n(1502)},function(e,t,n){var r=e.exports;r.encode=n(1726),r.decode=n(1727),r.byteLength=r.encodingLength=function(e){return r.encode(e).length}},function(e,t,n){"use strict";function r(e,t){for(var n=1,r=e.length,i=e[0],o=e[0],s=1;s<r;++s)if(o=i,i=e[s],t(i,o)){if(s===n){n++;continue}e[n++]=i}return e.length=n,e}function i(e){for(var t=1,n=e.length,r=e[0],i=e[0],o=1;o<n;++o,i=r)if(i=r,r=e[o],r!==i){if(o===t){t++;continue}e[t++]=r}return e.length=t,e}function o(e,t,n){return 0===e.length?e:t?(n||e.sort(t),r(e,t)):(n||e.sort(),i(e))}e.exports=o},function(e,t,n){(function(t){var n=void 0!==t?t:Uint8Array;function r(e,t){if(!(this instanceof r))return new r(e,t);0===arguments.length&&(e=0),this.grow=t&&(isFinite(t.grow)&&i(t.grow)||t.grow)||0,"number"!=typeof e&&void 0!==e||(e=new n(i(e)),e.fill&&!e._isBuffer&&e.fill(0)),this.buffer=e}function i(e){var t=e>>3;return e%8!=0&&t++,t}r.prototype.get=function(e){var t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)},r.prototype.set=function(e,t){var n=e>>3;t||1===arguments.length?(this.buffer.length<n+1&&this._grow(Math.max(n+1,Math.min(2*this.buffer.length,this.grow))),this.buffer[n]|=128>>e%8):n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))},r.prototype._grow=function(e){if(this.buffer.length<e&&e<=this.grow){var t=new n(e);if(t.fill&&t.fill(0),this.buffer.copy)this.buffer.copy(t,0);else for(var r=0;r<this.buffer.length;r++)t[r]=this.buffer[r];this.buffer=t}},e.exports=r}).call(this,n(0).Buffer)},function(e,t,n){var r=n(694),i=n(130),o=n(278),s=n(1814),a=4294967295,u=t,l=t.containers={moov:["mvhd","meta","traks","mvex"],trak:["tkhd","tref","trgr","edts","meta","mdia","udta"],edts:["elst"],mdia:["mdhd","hdlr","elng","minf"],minf:["vmhd","smhd","hmhd","sthd","nmhd","dinf","stbl"],dinf:["dref"],stbl:["stsd","stts","ctts","cslg","stsc","stsz","stz2","stco","co64","stss","stsh","padb","stdp","sdtp","sbgps","sgpds","subss","saizs","saios"],mvex:["mehd","trexs","leva"],moof:["mfhd","meta","trafs"],traf:["tfhd","tfdt","trun","sbgps","sgpds","subss","saizs","saios","meta"]};u.encode=function(e,t,n){return u.encodingLength(e),n=n||0,t=t||i(e.length),u._encode(e,t,n)},u._encode=function(e,t,n){var i=e.type,o=e.length;o>4294967295&&(o=1),t.writeUInt32BE(o,n),t.write(e.type,n+4,4,"ascii");var a=n+8;if(1===o&&(r.encode(e.length,t,a),a+=8),s.fullBoxes[i]&&(t.writeUInt32BE(e.flags||0,a),t.writeUInt8(e.version||0,a),a+=4),l[i]){var c=l[i];c.forEach(function(n){if(5===n.length){var r=e[n]||[];n=n.substr(0,4),r.forEach(function(e){u._encode(e,t,a),a+=u.encode.bytes})}else e[n]&&(u._encode(e[n],t,a),a+=u.encode.bytes)}),e.otherBoxes&&e.otherBoxes.forEach(function(e){u._encode(e,t,a),a+=u.encode.bytes})}else if(s[i]){var f=s[i].encode;f(e,t,a),a+=f.bytes}else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+i+"') or `buffer` must be set");var h=e.buffer;h.copy(t,a),a+=e.buffer.length}return u.encode.bytes=a-n,t},u.readHeaders=function(e,t,n){if(t=t||0,n=n||e.length,n-t<8)return 8;var i=e.readUInt32BE(t),o=e.toString("ascii",t+4,t+8),a=t+8,u,l;if(1===i){if(n-t<16)return 16;i=r.decode(e,a),a+=8}return s.fullBoxes[o]&&(u=e.readUInt8(a),l=16777215&e.readUInt32BE(a),a+=4),{length:i,headersLen:a-t,contentLen:i-(a-t),type:o,version:u,flags:l}},u.decode=function(e,t,n){t=t||0,n=n||e.length;var r=u.readHeaders(e,t,n);if(!r||r.length>n-t)throw new Error("Data too short");return u.decodeWithoutHeaders(r,e,t+r.headersLen,t+r.length)},u.decodeWithoutHeaders=function(e,t,n,r){n=n||0,r=r||t.length;var i=e.type,a={};if(l[i]){a.otherBoxes=[];for(var c=l[i],f=n;r-f>=8;){var h=u.decode(t,f,r);if(f+=h.length,c.indexOf(h.type)>=0)a[h.type]=h;else if(c.indexOf(h.type+"s")>=0){var p=h.type+"s",d=a[p]=a[p]||[];d.push(h)}else a.otherBoxes.push(h)}}else if(s[i]){var m=s[i].decode;a=m(t,n,r)}else a.buffer=o(t.slice(n,r));return a.length=e.length,a.contentLen=e.contentLen,a.type=e.type,a.version=e.version,a.flags=e.flags,a},u.encodingLength=function(e){var t=e.type,n=8;if(s.fullBoxes[t]&&(n+=4),l[t]){var r=l[t];r.forEach(function(t){if(5===t.length){var r=e[t]||[];t=t.substr(0,4),r.forEach(function(e){e.type=t,n+=u.encodingLength(e)})}else if(e[t]){var i=e[t];i.type=t,n+=u.encodingLength(i)}}),e.otherBoxes&&e.otherBoxes.forEach(function(e){n+=u.encodingLength(e)})}else if(s[t])n+=s[t].encodingLength(e);else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+t+"') or `buffer` must be set");n+=e.buffer.length}return n>4294967295&&(n+=8),e.length=n,n}},function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,s;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(s=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],s.set(o,i),i+=o.length;return s}},s={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},function(e,t,n){var r=n(27),i=n(376),o=n(13),s={sha1:!0,sha256:!0,sha512:!0},a={rsa:!0,dsa:!0,ecdsa:!0};function u(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,t||u),this.message=e,this.name=t.name}function l(e){u.call(this,e,l)}function c(e){var t=e.toLowerCase().split("-");if(2!==t.length)throw new l(t[0].toUpperCase()+" is not a valid algorithm");if("hmac"!==t[0]&&!a[t[0]])throw new l(t[0].toUpperCase()+" type keys are not supported");if(!s[t[1]])throw new l(t[1].toUpperCase()+" is not a supported hash algorithm");return t}o.inherits(u,Error),o.inherits(l,u),e.exports={HASH_ALGOS:s,PK_ALGOS:a,HttpSignatureError:u,InvalidAlgorithmError:l,validateAlgorithm:c,sshKeyToPEM:function e(t){r.string(t,"ssh_key");var n=i.parseKey(t,"ssh");return n.toString("pem")},fingerprint:function e(t){r.string(t,"ssh_key");var n=i.parseKey(t,"ssh");return n.fingerprint("md5").toString("hex")},pemToRsaSSHKey:function e(t,n){r.equal("string",typeof t,"typeof pem");var o=i.parseKey(t,"pem");return o.comment=n,o.toString("ssh")}}},function(e,t,n){var r=n(207).BigInteger,i=r.prototype.Barrett;function o(e,t){this.x=t,this.q=e}function s(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)}function a(){return this.x}function u(){return new o(this.q,this.x.negate().mod(this.q))}function l(e){return new o(this.q,this.x.add(e.toBigInteger()).mod(this.q))}function c(e){return new o(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))}function f(e){return new o(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))}function h(){return new o(this.q,this.x.square().mod(this.q))}function p(e){return new o(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))}function d(e,t,n,i){this.curve=e,this.x=t,this.y=n,this.z=null==i?r.ONE:i,this.zinv=null}function m(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function g(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function y(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():(t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),!!t.equals(r.ZERO)&&(n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q),n.equals(r.ZERO))));var t,n}function b(){return null==this.x&&null==this.y||this.z.equals(r.ZERO)&&!this.y.toBigInteger().equals(r.ZERO)}function v(){return new d(this.curve,this.x,this.y.negate(),this.z)}function w(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(r.ZERO.equals(n))return r.ZERO.equals(t)?this.twice():this.curve.getInfinity();var i=new r("3"),o=this.x.toBigInteger(),s=this.y.toBigInteger(),a=e.x.toBigInteger(),u=e.y.toBigInteger(),l=n.square(),c=l.multiply(n),f=o.multiply(l),h=t.square().multiply(this.z),p=h.subtract(f.shiftLeft(1)).multiply(e.z).subtract(c).multiply(n).mod(this.curve.q),m=f.multiply(i).multiply(t).subtract(s.multiply(c)).subtract(h.multiply(t)).multiply(e.z).add(t.multiply(c)).mod(this.curve.q),g=c.multiply(this.z).multiply(e.z).mod(this.curve.q);return new d(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(m),g)}function _(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new r("3"),t=this.x.toBigInteger(),n=this.y.toBigInteger(),i=n.multiply(this.z),o=i.multiply(n).mod(this.curve.q),s=this.curve.a.toBigInteger(),a=t.square().multiply(e);r.ZERO.equals(s)||(a=a.add(this.z.square().multiply(s))),a=a.mod(this.curve.q);var u=a.square().subtract(t.shiftLeft(3).multiply(o)).shiftLeft(1).multiply(i).mod(this.curve.q),l=a.multiply(e).multiply(t).subtract(o.shiftLeft(1)).shiftLeft(2).multiply(o).subtract(a.square().multiply(a)).mod(this.curve.q),c=i.square().multiply(i).shiftLeft(3).mod(this.curve.q);return new d(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(l),c)}function k(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t=e,n=t.multiply(new r("3")),i=this.negate(),o=this,s;for(s=n.bitLength()-2;s>0;--s){o=o.twice();var a=n.testBit(s),u=t.testBit(s);a!=u&&(o=o.add(a?this:i))}return o}function S(e,t,n){var r;r=e.bitLength()>n.bitLength()?e.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(t);r>=0;)i=i.twice(),e.testBit(r)?i=n.testBit(r)?i.add(o):i.add(this):n.testBit(r)&&(i=i.add(t)),--r;return i}function E(e,t,n){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(n),this.infinity=new d(this,null,null),this.reducer=new i(this.q)}function x(){return this.q}function C(){return this.a}function A(){return this.b}function I(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)}function T(){return this.infinity}function j(e){return new o(this.q,e)}function O(e){this.reducer.reduce(e)}function P(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,n=e.substr(2,t),i=e.substr(t+2,t);return new d(this,this.fromBigInteger(new r(n,16)),this.fromBigInteger(new r(i,16)));default:return null}}function B(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),n=e.getY().toBigInteger().toString(16),r=this.getQ().toString(16).length;for(r%2!=0&&r++;t.length<r;)t="0"+t;for(;n.length<r;)n="0"+n;return"04"+t+n}o.prototype.equals=s,o.prototype.toBigInteger=a,o.prototype.negate=u,o.prototype.add=l,o.prototype.subtract=c,o.prototype.multiply=f,o.prototype.square=h,o.prototype.divide=p,d.prototype.getX=m,d.prototype.getY=g,d.prototype.equals=y,d.prototype.isInfinity=b,d.prototype.negate=v,d.prototype.add=w,d.prototype.twice=_,d.prototype.multiply=k,d.prototype.multiplyTwo=S,E.prototype.getQ=x,E.prototype.getA=C,E.prototype.getB=A,E.prototype.equals=I,E.prototype.getInfinity=T,E.prototype.fromBigInteger=j,E.prototype.reduce=O,E.prototype.encodePointHex=B,E.prototype.decodePointHex=function(e){var t;switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:t=!1;case 3:void 0==t&&(t=!0);var n=e.length-2,i=e.substr(2,n),o=this.fromBigInteger(new r(i,16)),s=o.multiply(o.square().add(this.getA())).add(this.getB()),a=s.sqrt();if(null==a)throw"Invalid point compression";var u=a.toBigInteger();return u.testBit(0)!=t&&(a=this.fromBigInteger(this.getQ().subtract(u))),new d(this,o,a);case 4:case 6:case 7:var n=(e.length-2)/2,i=e.substr(2,n),l=e.substr(n+2,n);return new d(this,this.fromBigInteger(new r(i,16)),this.fromBigInteger(new r(l,16)));default:return null}},E.prototype.encodeCompressedPointHex=function(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),n=this.getQ().toString(16).length,r;for(n%2!=0&&n++;t.length<n;)t="0"+t;return r=e.getY().toBigInteger().isEven()?"02":"03",r+t},o.prototype.getR=function(){if(void 0!=this.r)return this.r;this.r=null;var e=this.q.bitLength();if(e>128){var t=this.q.shiftRight(e-64);-1==t.intValue()&&(this.r=r.ONE.shiftLeft(e).subtract(this.q))}return this.r},o.prototype.modMult=function(e,t){return this.modReduce(e.multiply(t))},o.prototype.modReduce=function(e){if(null!=this.getR()){for(var t=q.bitLength();e.bitLength()>t+1;){var n=e.shiftRight(t),i=e.subtract(n.shiftLeft(t));this.getR().equals(r.ONE)||(n=n.multiply(this.getR())),e=n.add(i)}for(;e.compareTo(q)>=0;)e=e.subtract(q)}else e=e.mod(q);return e},o.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var e=new o(this.q,this.x.modPow(this.q.shiftRight(2).add(r.ONE),this.q));return e.square().equals(this)?e:null}var t=this.q.subtract(r.ONE),n=t.shiftRight(1);if(!this.x.modPow(n,this.q).equals(r.ONE))return null;var i=t.shiftRight(2),s=i.shiftLeft(1).add(r.ONE),a=this.x,u=modDouble(modDouble(a)),l,c;do{var f;do{f=new r(this.q.bitLength(),new SecureRandom)}while(f.compareTo(this.q)>=0||!f.multiply(f).subtract(u).modPow(n,this.q).equals(t));var h=this.lucasSequence(f,a,s);if(l=h[0],c=h[1],this.modMult(c,c).equals(u))return c.testBit(0)&&(c=c.add(q)),c=c.shiftRight(1),new o(q,c)}while(l.equals(r.ONE)||l.equals(t));return null},o.prototype.lucasSequence=function(e,t,n){for(var i=n.bitLength(),o=n.getLowestSetBit(),s=r.ONE,a=r.TWO,u=e,l=r.ONE,c=r.ONE,f=i-1;f>=o+1;--f)l=this.modMult(l,c),n.testBit(f)?(c=this.modMult(l,t),s=this.modMult(s,u),a=this.modReduce(u.multiply(a).subtract(e.multiply(l))),u=this.modReduce(u.multiply(u).subtract(c.shiftLeft(1)))):(c=l,s=this.modReduce(s.multiply(a).subtract(l)),u=this.modReduce(u.multiply(a).subtract(e.multiply(l))),a=this.modReduce(a.multiply(a).subtract(l.shiftLeft(1))));l=this.modMult(l,c),c=this.modMult(l,t),s=this.modReduce(s.multiply(a).subtract(l)),a=this.modReduce(u.multiply(a).subtract(e.multiply(l))),l=this.modMult(l,c);for(var f=1;f<=o;++f)s=this.modMult(s,a),a=this.modReduce(a.multiply(a).subtract(l.shiftLeft(1))),l=this.modMult(l,l);return[s,a]};var t={ECCurveFp:E,ECPointFp:d,ECFieldElementFp:o};e.exports=t},function(e,t,n){e.exports={read:g,readSSHPrivate:b,write:v};var r=n(27),i=n(103),o=n(31).Buffer,s=n(55),a=n(47),u=n(15),l=n(46),c=n(50),f=n(113),h=n(114),p=n(209),d=n(96),m;function g(e,t){return f.read(e,t)}var y="openssh-key-v1";function b(e,t,i){t=new p({buffer:t});var s=t.readCString();r.strictEqual(s,y,"bad magic string");var l=t.readString(),c=t.readString(),f=t.readBuffer(),g=t.readInt();if(1!==g)throw new Error("OpenSSH-format key file contains multiple keys: this is unsupported.");var b=t.readBuffer();if("public"===e)return r.ok(t.atEnd(),"excess bytes left after key"),h.read(b);var v=t.readBuffer();r.ok(t.atEnd(),"excess bytes left after key");var w=new p({buffer:f});switch(c){case"none":if("none"!==l)throw new Error('OpenSSH-format key uses KDF "none" but specifies a cipher other than "none"');break;case"bcrypt":var _=w.readBuffer(),k=w.readInt(),S=a.opensshCipherInfo(l);if(void 0===m&&(m=n(714)),"string"==typeof i.passphrase&&(i.passphrase=o.from(i.passphrase,"utf-8")),!o.isBuffer(i.passphrase))throw new d.KeyEncryptedError(i.filename,"OpenSSH");var E=new Uint8Array(i.passphrase),x=new Uint8Array(_),C=new Uint8Array(S.keySize+S.blockSize),A=m.pbkdf(E,E.length,x,x.length,C,C.length,k);if(0!==A)throw new Error("bcrypt_pbkdf function returned failure, parameters invalid");C=o.from(C);var I=C.slice(0,S.keySize),T=C.slice(S.keySize,S.keySize+S.blockSize),j=u.createDecipheriv(S.opensslName,I,T);j.setAutoPadding(!1);var O,P=[];for(j.once("error",function(e){if(-1!==e.toString().indexOf("bad decrypt"))throw new Error("Incorrect passphrase supplied, could not decrypt key");throw e}),j.write(v),j.end();null!==(O=j.read());)P.push(O);v=o.concat(P);break;default:throw new Error('OpenSSH-format key uses unknown KDF "'+c+'"')}t=new p({buffer:v});var B=t.readInt(),R=t.readInt();if(B!==R)throw new Error("Incorrect passphrase supplied, could not decrypt key");var N={},M=h.readInternal(N,"private",t.remainder());t.skip(N.consumed);var L=t.readString();return M.comment=L,M}function v(e,t){var i;i=c.isPrivateKey(e)?e.toPublic():e;var s="none",l="none",f=o.alloc(0),h={blockSize:8},d,g;if(void 0!==t&&(d=t.passphrase,"string"==typeof d&&(d=o.from(d,"utf-8")),void 0!==d&&(r.buffer(d,"options.passphrase"),r.optionalString(t.cipher,"options.cipher"),s=t.cipher,void 0===s&&(s="aes128-ctr"),h=a.opensshCipherInfo(s),l="bcrypt")),c.isPrivateKey(e)){g=new p({});var b=u.randomBytes(4).readUInt32BE(0);g.writeInt(b),g.writeInt(b),g.write(e.toBuffer("rfc4253")),g.writeString(e.comment||"");for(var v=1;g._offset%h.blockSize!=0;)g.writeChar(v++);g=g.toBuffer()}switch(l){case"none":break;case"bcrypt":var w=u.randomBytes(16),_=16,k=new p({});k.writeBuffer(w),k.writeInt(16),f=k.toBuffer(),void 0===m&&(m=n(714));var S=new Uint8Array(d),E=new Uint8Array(w),x=new Uint8Array(h.keySize+h.blockSize),C=m.pbkdf(S,S.length,E,E.length,x,x.length,16);if(0!==C)throw new Error("bcrypt_pbkdf function returned failure, parameters invalid");x=o.from(x);var A=x.slice(0,h.keySize),I=x.slice(h.keySize,h.keySize+h.blockSize),T=u.createCipheriv(h.opensslName,A,I);T.setAutoPadding(!1);var j,O=[];for(T.once("error",function(e){throw e}),T.write(g),T.end();null!==(j=T.read());)O.push(j);g=o.concat(O);break;default:throw new Error("Unsupported kdf "+l)}var P=new p({}),B;P.writeCString(y),P.writeString(s),P.writeString(l),P.writeBuffer(f),P.writeInt(1),P.writeBuffer(i.toBuffer("rfc4253")),g&&P.writeBuffer(g),P=P.toBuffer(),B=c.isPrivateKey(e)?"OPENSSH PRIVATE KEY":"OPENSSH PUBLIC KEY";var R=P.toString("base64"),N=R.length+R.length/70+18+16+2*B.length+10;P=o.alloc(N);var M=0;M+=P.write("-----BEGIN "+B+"-----\n",M);for(var L=0;L<R.length;){var F=L+70;F>R.length&&(F=R.length),M+=P.write(R.slice(L,F),M),P[M++]=10,L=F}return M+=P.write("-----END "+B+"-----\n",M),P.slice(0,M)}},function(e,t,n){e.exports={DataError:n(1966),InvalidAccessError:n(1967),KeyFormatNotSupportedError:n(1968),CurrentlyNotSupportedError:n(1969),NotSupportedError:n(386),OperationError:n(1970),QuotaExceededError:n(1971),TypeMismatchError:n(1972)}},function(e,t,n){(function(r){const i=n(743),o=n(97),s=n(5)("dweb-transports:httptools");async function a(e,t,n,r){let i,o="undefined"!=typeof window&&window.loopguard;for(n=n||1;n--&&o===("undefined"!=typeof window&&window.loopguard);)try{return await fetch(e)}catch(e){i=e,s("Delaying %s by %d ms because %s",r,t,e.message),await new Promise(e=>{setTimeout(()=>{e()},t)}),t=Math.floor(t*(1+Math.random()))}throw console.warn("loopfetch of",r,"failed"),o!==("undefined"!=typeof window&&window.loopguard)?(s("Looping exited because of page change %s",r),new Error("Looping exited because of page change "+r)):i}"undefined"==typeof fetch&&(fetch=i,Headers=fetch.Headers,Request=fetch.Request),httptools={},httptools.p_httpfetch=async function(e,t,{wantstream:n=!1,retries:i}={}){try{s("p_httpfetch: %s %o",e,t.headers.range||"");let u=new Request(e,t),l=await a(u,500,i,"fetching "+e);if(l.ok){let e=l.headers.get("Content-Type");return n?l.body:void 0!==e&&e.startsWith("application/json")?l.json():void 0!==e&&e.startsWith("text")?l.text():new r(await l.arrayBuffer())}throw new o.TransportError(`Transport Error ${e} ${l.status}: ${l.statusText}`)}catch(t){throw s("p_httpfetch failed: %s",t.message),t instanceof o.TransportError?t:new o.TransportError(`Transport error thrown by ${e}: ${t.message}`)}},httptools.p_GET=function(e,t={},n){"function"==typeof t&&(n=t,t={});let r=new Headers;(t.start||t.end)&&r.append("range",`bytes=${t.start||0}-${t.end<1/0?t.end:""}`);const i=void 0===t.retries?12:t.retries;let o={method:"GET",headers:r,mode:"cors",cache:t.noCache?"no-cache":"default",redirect:"follow",keepalive:!0};const a=httptools.p_httpfetch(e,o,{retries:i,wantstream:t.wantstream});if(!n)return a;a.then(e=>{try{n(null,e)}catch(e){s("Uncaught error %O",e)}}).catch(e=>n(e))},httptools.p_POST=function(e,t={},n){"function"==typeof t&&(n=t,t={});const r=void 0===t.retries?0:t.retries;let i={method:"POST",headers:{},body:t.data,mode:"cors",cache:"default",redirect:"follow",keepalive:!1};t.contenttype&&(i.headers["Content-Type"]=t.contenttype);const o=httptools.p_httpfetch(e,i,{retries:r});if(!n)return o;o.then(e=>n(null,e)).catch(e=>n(e))},t=e.exports=httptools}).call(this,n(0).Buffer)},function(e,t){var n=9007199254740991;function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r=n(67),i=p(r),o=n(216),s=p(o),a=n(746),u=p(a),l=n(133),c=p(l),f=n(291),h=p(f);function p(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(t,n,r){if(r=(0,s.default)(r||i.default),e<=0||!t)return r(null);var o=(0,u.default)(t),a=!1,l=0,f=!1;function p(e,t){if(l-=1,e)a=!0,r(e);else{if(t===h.default||a&&l<=0)return a=!0,r(null);f||d()}}function d(){for(f=!0;l<e&&!a;){var t=o();if(null===t)return a=!0,void(l<=0&&r(null));l+=1,n(t.value,t.key,(0,c.default)(p))}f=!1}d()}}e.exports=t.default},function(e,t,n){var r=n(750),i=n(104),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},function(e,t,n){"use strict";var r=n(135).codes.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}function o(){}function s(e){return e.setHeader&&"function"==typeof e.abort}function a(e,t,n){if("function"==typeof t)return a(e,null,t);t||(t={}),n=i(n||o);var u=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,c=function t(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function t(){l=!1,f=!0,u||n.call(e)},p=e._readableState&&e._readableState.endEmitted,d=function t(){u=!1,p=!0,l||n.call(e)},m=function t(r){n.call(e,r)},g=function t(){var i;return u&&!p?(e._readableState&&e._readableState.ended||(i=new r),n.call(e,i)):l&&!f?(e._writableState&&e._writableState.ended||(i=new r),n.call(e,i)):void 0},y=function t(){e.req.on("finish",h)};return s(e)?(e.on("complete",h),e.on("abort",g),e.req?y():e.on("request",y)):l&&!e._writableState&&(e.on("end",c),e.on("close",c)),e.on("end",d),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",g),function(){e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",y),e.req&&e.req.removeListener("finish",h),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",h),e.removeListener("end",d),e.removeListener("error",m),e.removeListener("close",g)}}e.exports=a},function(e,t,n){"use strict";(function(r){const i=n(39),o=n(781),s=n(782),a=n(404);t=e.exports,t.addPrefix=((e,t)=>{let n;if(r.isBuffer(e))n=a.varintBufferEncode(e);else{if(!o[e])throw new Error("multicodec not recognized");n=o[e]}return r.concat([n,t])}),t.rmPrefix=(e=>(i.decode(e),e.slice(i.decode.bytes))),t.getCodec=(e=>{const t=a.varintBufferDecode(e),n=s[t.toString("hex")];if(void 0===n)throw new Error("Code `0x"+t.toString("hex")+"` not found");return n}),t.getName=(e=>s[e.toString(16)]),t.getNumber=(e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return a.varintBufferDecode(t)[0]}),t.getCode=(e=>i.decode(e)),t.getCodeVarint=(e=>{const t=o[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t}),t.getVarint=(e=>i.encode(e));const u=n(783);Object.assign(t,u),t.print=n(784)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=function e(t,n){n=n||{};var r=n.last||!1,i=!1;if("number"==typeof t){r=!0;var o=t;t=function(){return--o}}return function(e){function n(t){e(!0,function(e){r=!1,t(e||!0)})}return function(o,s){i&&!o?r?n(s):s(i):(i=o)?e(i,s):e(null,function(e,o){(i=i||e)?s(i):t(o)?s(null,o):(i=!0,r?s(null,o):n(s))})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(389),i=a(r),o=n(219),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";const r=n(26),i=n(225),o=n(61),s=n(226),a=n(139);t.asyncFilter=function(e){let t=!1,n,r;return function(i){return function o(s,a){if(r)return a(r);s?(r=s,i(s,t?()=>{t?n=a:a(s)}:a)):i(null,(i,s)=>{i?a(i):r?a(r):(t=!0,e(s,(e,i)=>{t=!1,r?(a(r),n(r)):e?o(e,a):i?a(null,s):o(null,a)}))})}}},t.asyncSort=function(e){const t=i(),n=r.collect((n,i)=>{if(n)return t.abort(n);e(i,(e,n)=>{if(e)return t.abort(e);t.resolve(r.values(i))})});return function(e){return n(e),t}},t.replaceStartWith=function(e,t){const n=new RegExp("^"+t);return e.replace(n,"")},t.tmpdir=(()=>o.join(s.tmpdir(),a()))},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e.exports=n},function(e,t,n){var r=n(834).create,i=r("LevelUPError"),o=r("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,e.exports={LevelUPError:i,InitializationError:r("InitializationError",i),OpenError:r("OpenError",i),ReadError:r("ReadError",i),WriteError:r("WriteError",i),NotFoundError:o,EncodingError:r("EncodingError",i)}},function(e,t,n){t.AbstractLevelDOWN=n(838),t.AbstractIterator=n(425),t.AbstractChainedBatch=n(426)},function(e,t,n){t=e.exports=n(431),t.Stream=t,t.Readable=t,t.Writable=n(303),t.Duplex=n(116),t.Transform=n(434),t.PassThrough=n(849)},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(432),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(433),y;function b(){}function v(e,t){u=u||n(116),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(116),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";t.util=n(440),t.resolver=n(453)},function(e,t,n){"use strict";(function(e){const r=n(62),i=n(232),o=i.SHIFT32,s=i.SHIFT16,a=2097151;function u(e){return e<16?"0"+e.toString(16):e.toString(16)}t.parseHalf=function e(t){var n,r,i;return i=128&t[0]?-1:1,n=(124&t[0])>>2,r=(3&t[0])<<8|t[1],n?31===n?i*(r?NaN:Infinity):i*Math.pow(2,n-25)*(1024+r):5.960464477539063e-8*i*r},t.arrayBufferToBignumber=function(e){const t=e.byteLength;let n="";for(let r=0;r<t;r++)n+=u(e[r]);return new r(n,16)},t.buildMap=(e=>{const t=new Map,n=Object.keys(e),r=n.length;for(let i=0;i<r;i++)t.set(n[i],e[n[i]]);return t}),t.buildInt32=((e,t)=>e*s+t),t.buildInt64=((e,n,i,s)=>{const a=t.buildInt32(e,n),u=t.buildInt32(i,s);return a>2097151?new r(a).times(o).plus(u):a*o+u}),t.writeHalf=function t(n,r){const i=e.allocUnsafe(4);i.writeFloatBE(r,0);const o=i.readUInt32BE(0);if(0!=(8191&o))return!1;var s=o>>16&32768;const a=o>>23&255,u=8388607&o;if(a>=113&&a<=142)s+=(a-112<<10)+(u>>13);else{if(!(a>=103&&a<113))return!1;if(u&(1<<126-a)-1)return!1;s+=u+8388608>>126-a}return n.writeUInt16BE(s,0),!0},t.keySorter=function(e,t){var n=e[0].byteLength,r=t[0].byteLength;return n>r?1:r>n?-1:e[0].compare(t[0])},t.isNegativeZero=(e=>0===e&&1/e<0),t.nextPowerOf2=(e=>{let t=0;if(e&&!(e&e-1))return e;for(;0!==e;)e>>=1,t+=1;return 1<<t})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const{URLWithLegacySupport:r,format:i,URLSearchParams:o,defaultBase:s}=n(444),a=n(861);e.exports={URL:r,URLSearchParams:o,format:i,relative:a,defaultBase:s}},function(e,t,n){"use strict";t.defined=function(e){return null!==e&&void 0!==e&&("number"!=typeof e||!isNaN(e))}},function(e,t,n){"use strict";e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,n){var r=n(19);if(n(140),n(457),n(178),n(891),n(895),n(141),n(34),void 0===i)var i=r.jsbn.BigInteger;var o=r.asn1;r.pki=r.pki||{},e.exports=r.pki.rsa=r.rsa=r.rsa||{};var s=r.pki,a=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},c={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},f=r.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},h=function(e){var t;if(!(e.algorithm in s.oids)){var n=new Error("Unknown message digest algorithm.");throw n.algorithm=e.algorithm,n}t=s.oids[e.algorithm];var r=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,r)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var u=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(u),o.toDer(i).getBytes()},p=function(e,t,n){if(n)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(r.util.bytesToHex(r.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));e=e.multiply(o.modPow(t.e,t.n)).mod(t.n);for(var s=e.mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var u=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return u=u.multiply(o.modInverse(t.n)).mod(t.n),u};function d(e,t,n){var i=r.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(n);var a=o-3-e.length,u;if(0===n||1===n){u=0===n?0:255;for(var l=0;l<a;++l)i.putByte(u)}else for(;a>0;){for(var c=0,f=r.random.getBytes(a),l=0;l<a;++l)u=f.charCodeAt(l),0===u?++c:i.putByte(u);a=c}return i.putByte(0),i.putBytes(e),i}function m(e,t,n,i){var o=Math.ceil(t.n.bitLength()/8),s=r.util.createBuffer(e),a=s.getByte(),u=s.getByte();if(0!==a||n&&0!==u&&1!==u||!n&&2!=u||n&&0===u&&void 0===i)throw new Error("Encryption block is invalid.");var l=0;if(0===u){l=o-3-i;for(var c=0;c<l;++c)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(l=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++l}else if(2===u)for(l=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++l}var f=s.getByte();if(0!==f||l!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function g(e,t,n){"function"==typeof t&&(n=t,t={}),t=t||{};var o={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function a(){u(e.pBits,function(t,r){return t?n(t):(e.p=r,null!==e.q?l(t,e.q):void u(e.qBits,l))})}function u(e,t){r.prime.generateProbablePrime(e,o,t)}function l(t,r){if(t)return n(t);if(e.q=r,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void a();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void u(e.qBits,l);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void a();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void u(e.qBits,l);var c=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},n(null,e.keys)}"prng"in t&&(o.prng=t.prng),a()}function y(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=r.util.hexToBytes(t);return n.length>1&&(0===n.charCodeAt(0)&&0==(128&n.charCodeAt(1))||255===n.charCodeAt(0)&&128==(128&n.charCodeAt(1)))?n.substr(1):n}function b(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function v(e){return"undefined"!=typeof window&&"object"==typeof window.crypto&&"object"==typeof window.crypto.subtle&&"function"==typeof window.crypto.subtle[e]}function w(e){return"undefined"!=typeof window&&"object"==typeof window.msCrypto&&"object"==typeof window.msCrypto.subtle&&"function"==typeof window.msCrypto.subtle[e]}function _(e){for(var t=r.util.hexToBytes(e.toString(16)),n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}function k(e){if("RSA"!==e.kty)throw new Error('Unsupported key algorithm "'+e.kty+'"; algorithm must be "RSA".');return s.setRsaPrivateKey(E(e.n),E(e.e),E(e.d),E(e.p),E(e.q),E(e.dp),E(e.dq),E(e.qi))}function S(e){if("RSA"!==e.kty)throw new Error('Key algorithm must be "RSA".');return s.setRsaPublicKey(E(e.n),E(e.e))}function E(e){return new i(r.util.bytesToHex(r.util.decode64(e)),16)}s.rsa.encrypt=function(e,t,n){var o=n,s,a=Math.ceil(t.n.bitLength()/8);!1!==n&&!0!==n?(o=2===n,s=d(e,t,n)):(s=r.util.createBuffer(),s.putBytes(e));for(var u=new i(s.toHex(),16),l=p(u,t,o),c=l.toString(16),f=r.util.createBuffer(),h=a-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(r.util.hexToBytes(c)),f.getBytes()},s.rsa.decrypt=function(e,t,n,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var u=new i(r.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=p(u,t,n),c=l.toString(16),f=r.util.createBuffer(),h=s-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(r.util.hexToBytes(c)),!1!==o?m(f.getBytes(),t,n):f.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,n){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048,n=n||{};var o=n.prng||r.random,s={nextBytes:function(e){for(var t=o.getBytesSync(e.length),n=0;n<e.length;++n)e[n]=t.charCodeAt(n)}},a=n.algorithm||"PRIMEINC",u;if("PRIMEINC"!==a)throw new Error("Invalid key generation algorithm: "+a);return u={algorithm:a,state:0,bits:e,rng:s,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},u.e.fromInt(u.eInt),u},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var n=new i(null);n.fromInt(30);for(var r=0,o=function(e,t){return e|t},u=+new Date,l,c=0;null===e.keys&&(t<=0||c<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,h=f-1;0===e.pqState?(e.num=new i(f,e.rng),e.num.testBit(h)||e.num.bitwiseTo(i.ONE.shiftLeft(h),o,e.num),e.num.dAddOffset(31-e.num.mod(n).byteValue(),0),r=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(b(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(a[r++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}l=+new Date,c+=l-u,u=l}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,n,i){if(1===arguments.length?"object"==typeof e?(n=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(i=t,t=void 0):"number"!=typeof t&&(n=t,t=void 0):(n=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof n&&(i=n,n=void 0):(i=n,n=t,t=void 0)),n=n||{},void 0===e&&(e=n.bits||2048),void 0===t&&(t=n.e||65537),!r.options.usePureJavaScript&&i&&e>=256&&e<=16384&&(65537===t||3===t)){if(v("generateKey")&&v("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){i(e)}).then(function(e){if(e){var t=s.privateKeyFromAsn1(o.fromDer(r.util.createBuffer(e)));i(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}});if(w("generateKey")&&w("exportKey")){var a=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:_(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return a.oncomplete=function(e){var t=e.target.result,n=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey);n.oncomplete=function(e){var t=e.target.result,n=s.privateKeyFromAsn1(o.fromDer(r.util.createBuffer(t)));i(null,{privateKey:n,publicKey:s.setRsaPublicKey(n.n,n.e)})},n.onerror=function(e){i(e)}},void(a.onerror=function(e){i(e)})}}var u=s.rsa.createKeyPairGenerationState(e,t,n);if(!i)return s.rsa.stepKeyPairGenerationState(u,0),u.keys;g(u,n,i)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var n={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,n){return d(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return r.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,n,!0);return s.rsa.encrypt(o,n,!0)},verify:function(e,t,r){"string"==typeof r?r=r.toUpperCase():void 0===r&&(r="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===r?r={verify:function(e,t){t=m(t,n,!0);var r=o.fromDer(t);return e===r.value[1].value}}:"NONE"!==r&&"NULL"!==r&&null!==r||(r={verify:function(e,t){return t=m(t,n,!0),e===t}});var i=s.rsa.decrypt(t,n,!0,!1);return r.verify(e,i,n.n.bitLength())}};return n},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,n,i,o,a,u,l){var c={n:e,e:t,d:n,p:i,q:o,dP:a,dQ:u,qInv:l,decrypt:function(e,t,n){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=s.rsa.decrypt(e,c,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return r.pkcs1.decode_rsa_oaep(t,e,n)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,c,!1)},sign:function(e,t){var n=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:h},n=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},n=1);var r=t.encode(e,c.n.bitLength());return s.rsa.encrypt(r,c,n)}};return c},s.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t={},n=[],a,c,f,h,p,d,m,g;if(o.validate(e,u,t,n)&&(e=o.fromDer(r.util.createBuffer(t.privateKey))),t={},n=[],!o.validate(e,l,t,n)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=n,y}return a=r.util.createBuffer(t.privateKeyModulus).toHex(),c=r.util.createBuffer(t.privateKeyPublicExponent).toHex(),f=r.util.createBuffer(t.privateKeyPrivateExponent).toHex(),h=r.util.createBuffer(t.privateKeyPrime1).toHex(),p=r.util.createBuffer(t.privateKeyPrime2).toHex(),d=r.util.createBuffer(t.privateKeyExponent1).toHex(),m=r.util.createBuffer(t.privateKeyExponent2).toHex(),g=r.util.createBuffer(t.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new i(a,16),new i(c,16),new i(f,16),new i(h,16),new i(p,16),new i(d,16),new i(m,16),new i(g,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},n=[];if(o.validate(e,f,t,n)){var a=o.derToOid(t.publicKeyOid);if(a!==s.oids.rsaEncryption){var u=new Error("Cannot read public key. Unknown OID.");throw u.oid=a,u}e=t.rsaPublicKey}if(n=[],!o.validate(e,c,t,n)){var u=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw u.errors=n,u}var l=r.util.createBuffer(t.publicKeyModulus).toHex(),h=r.util.createBuffer(t.publicKeyExponent).toHex();return s.setRsaPublicKey(new i(l,16),new i(h,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,y(e.e))])}},function(e,t,n){var r=n(19);if(n(237),n(140),n(311),n(118),n(178),n(461),n(312),n(141),n(897),n(309),n(34),void 0===i)var i=r.jsbn.BigInteger;var o=r.asn1,s=r.pki=r.pki||{};e.exports=s.pbe=r.pbe=r.pbe||{};var a=s.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},l={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},c={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(t=s.oids[o.derToOid(e)],!t){var n=new Error("Unsupported PRF OID.");throw n.oid=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}}else t="hmacWithSHA1";return p(t)}function p(e){var t=r.md;switch(e){case"hmacWithSHA224":t=r.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var n=new Error("Unsupported PRF algorithm.");throw n.algorithm=e,n.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],n}if(!(t&&e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function d(e,t,n,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);return"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,r.util.hexToBytes(n.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])),a}s.encryptPrivateKeyInfo=function(e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||"aes128",n.prfAlgorithm=n.prfAlgorithm||"sha1";var i=r.random.getBytesSync(n.saltSize),u=n.count,l=o.integerToDer(u),c,f,h;if(0===n.algorithm.indexOf("aes")||"des"===n.algorithm){var m,g,y;switch(n.algorithm){case"aes128":c=16,m=16,g=a["aes128-CBC"],y=r.aes.createEncryptionCipher;break;case"aes192":c=24,m=16,g=a["aes192-CBC"],y=r.aes.createEncryptionCipher;break;case"aes256":c=32,m=16,g=a["aes256-CBC"],y=r.aes.createEncryptionCipher;break;case"des":c=8,m=8,g=a.desCBC,y=r.des.createEncryptionCipher;break;default:var b=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw b.algorithm=n.algorithm,b}var v="hmacWith"+n.prfAlgorithm.toUpperCase(),w=p(v),_=r.pkcs5.pbkdf2(t,i,u,c,w),k=r.random.getBytesSync(m),S=y(_);S.start(k),S.update(o.toDer(e)),S.finish(),h=S.output.getBytes();var E=d(i,l,c,v);f=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),E]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(g).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,k)])])])}else{if("3des"!==n.algorithm){var b=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw b.algorithm=n.algorithm,b}c=24;var x=new r.util.ByteBuffer(i),_=s.pbe.generatePkcs12Key(t,x,1,u,c),k=s.pbe.generatePkcs12Key(t,x,2,u,c),S=r.des.createEncryptionCipher(_);S.start(k),S.update(o.toDer(e)),S.finish(),h=S.output.getBytes(),f=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,i),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,l.getBytes())])])}var C=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[f,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,h)]);return C},s.decryptPrivateKeyInfo=function(e,t){var n=null,i={},a=[];if(!o.validate(e,u,i,a)){var l=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=a,l}var c=o.derToOid(i.encryptionOid),f=s.pbe.getCipher(c,i.encryptionParams,t),h=r.util.createBuffer(i.encryptedData);return f.update(h),f.finish()&&(n=o.fromDer(f.output)),n},s.encryptedPrivateKeyToPem=function(e,t){var n={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return r.pem.encode(n,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var n=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,n){if(n=n||{},!n.legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,n),s.encryptedPrivateKeyToPem(i)}var a,u,l,c;switch(n.algorithm){case"aes128":a="AES-128-CBC",l=16,u=r.random.getBytesSync(16),c=r.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",l=24,u=r.random.getBytesSync(16),c=r.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",l=32,u=r.random.getBytesSync(16),c=r.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",l=24,u=r.random.getBytesSync(8),c=r.des.createEncryptionCipher;break;case"des":a="DES-CBC",l=8,u=r.random.getBytesSync(8),c=r.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+n.algorithm+'".');throw f.algorithm=n.algorithm,f}var h=r.pbe.opensslDeriveBytes(t,u.substr(0,8),l),p=c(h);p.start(u),p.update(o.toDer(s.privateKeyToAsn1(e))),p.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:r.util.bytesToHex(u).toUpperCase()},body:p.output.getBytes()};return r.pem.encode(d)},s.decryptRsaPrivateKey=function(e,t){var n=null,i=r.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(i.procType&&"ENCRYPTED"===i.procType.type){var u,l;switch(i.dekInfo.algorithm){case"DES-CBC":u=8,l=r.des.createDecryptionCipher;break;case"DES-EDE3-CBC":u=24,l=r.des.createDecryptionCipher;break;case"AES-128-CBC":u=16,l=r.aes.createDecryptionCipher;break;case"AES-192-CBC":u=24,l=r.aes.createDecryptionCipher;break;case"AES-256-CBC":u=32,l=r.aes.createDecryptionCipher;break;case"RC2-40-CBC":u=5,l=function(e){return r.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":u=8,l=function(e){return r.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":u=16,l=function(e){return r.rc2.createDecryptionCipher(e,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".');throw a.algorithm=i.dekInfo.algorithm,a}var c=r.util.hexToBytes(i.dekInfo.parameters),f=r.pbe.opensslDeriveBytes(t,c.substr(0,8),u),h=l(f);if(h.start(c),h.update(r.util.createBuffer(i.body)),!h.finish())return n;n=h.output.getBytes()}else n=i.body;return n="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(n),t):o.fromDer(n),null!==n&&(n=s.privateKeyFromAsn1(n)),n},s.pbe.generatePkcs12Key=function(e,t,n,i,o,s){var a,u;if(void 0===s||null===s){if(!("sha1"in r.md))throw new Error('"sha1" hash algorithm unavailable.');s=r.md.sha1.create()}var l=s.digestLength,c=s.blockLength,f=new r.util.ByteBuffer,h=new r.util.ByteBuffer;if(null!==e&&void 0!==e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u));h.putInt16(0)}var p=h.length(),d=t.length(),m=new r.util.ByteBuffer;m.fillWithByte(n,c);var g=c*Math.ceil(d/c),y=new r.util.ByteBuffer;for(u=0;u<g;u++)y.putByte(t.at(u%d));var b=c*Math.ceil(p/c),v=new r.util.ByteBuffer;for(u=0;u<b;u++)v.putByte(h.at(u%p));var w=y;w.putBuffer(v);for(var _=Math.ceil(o/l),k=1;k<=_;k++){var S=new r.util.ByteBuffer;S.putBytes(m.bytes()),S.putBytes(w.bytes());for(var E=0;E<i;E++)s.start(),s.update(S.getBytes()),S=s.digest();var x=new r.util.ByteBuffer;for(u=0;u<c;u++)x.putByte(S.at(u%l));var C=Math.ceil(d/c)+Math.ceil(p/c),A=new r.util.ByteBuffer;for(a=0;a<C;a++){var I=new r.util.ByteBuffer(w.getBytes(c)),T=511;for(u=x.length()-1;u>=0;u--)T>>=8,T+=x.at(u)+I.at(u),I.setAt(u,255&T);A.putBuffer(I)}w=A,f.putBuffer(S)}return f.truncate(f.length()-o),f},s.pbe.getCipher=function(e,t,n){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,n);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,n);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}},s.pbe.getCipherForPBES2=function(e,t,n){var i={},a=[];if(!o.validate(t,l,i,a)){var u=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=a,u}if(e=o.derToOid(i.kdfOid),e!==s.oids.pkcs5PBKDF2){var u=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw u.oid=e,u.supportedOids=["pkcs5PBKDF2"],u}if(e=o.derToOid(i.encOid),e!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC){var u=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw u.oid=e,u.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],u}var c=i.kdfSalt,f=r.util.createBuffer(i.kdfIterationCount),p,d;switch(f=f.getInt(f.length()<<3),s.oids[e]){case"aes128-CBC":p=16,d=r.aes.createDecryptionCipher;break;case"aes192-CBC":p=24,d=r.aes.createDecryptionCipher;break;case"aes256-CBC":p=32,d=r.aes.createDecryptionCipher;break;case"des-EDE3-CBC":p=24,d=r.des.createDecryptionCipher;break;case"desCBC":p=8,d=r.des.createDecryptionCipher}var m=h(i.prfOid),g=r.pkcs5.pbkdf2(n,c,f,p,m),y=i.encIv,b=d(g);return b.start(y),b},s.pbe.getCipherForPKCS12PBE=function(e,t,n){var i={},a=[];if(!o.validate(t,c,i,a)){var u=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=a,u}var l=r.util.createBuffer(i.salt),f=r.util.createBuffer(i.iterations),p,d,m;switch(f=f.getInt(f.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24,d=8,m=r.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5,d=8,m=function(e,t){var n=r.rc2.createDecryptionCipher(e,40);return n.start(t,null),n};break;default:var u=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw u.oid=e,u}var g=h(i.prfOid),y=s.pbe.generatePkcs12Key(n,l,1,f,p,g);g.start();var b=s.pbe.generatePkcs12Key(n,l,2,f,d,g);return m(y,b)},s.pbe.opensslDeriveBytes=function(e,t,n,i){if(void 0===i||null===i){if(!("md5"in r.md))throw new Error('"md5" hash algorithm unavailable.');i=r.md.md5.create()}null===t&&(t="");for(var o=[f(i,e+t)],s=16,a=1;s<n;++a,s+=16)o.push(f(i,o[a-1]+e+t));return o.join("").substr(0,n)}},function(e,t,n){var r=n(19);function i(e,t){var n=function(){return new r.des.Algorithm(e,t)};r.cipher.registerAlgorithm(e,n)}n(458),n(459),n(34),e.exports=r.des=r.des||{},r.des.startEncrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!1,mode:r||(null===t?"ECB":"CBC")});return i.start(t),i},r.des.createEncryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!1,mode:t})},r.des.startDecrypting=function(e,t,n,r){var i=m({key:e,output:n,decrypt:!0,mode:r||(null===t?"ECB":"CBC")});return i.start(t),i},r.des.createDecryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!0,mode:t})},r.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return d(n._keys,e,t,!1)},decrypt:function(e,t){return d(n._keys,e,t,!0)}}}),n._init=!1},r.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=r.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=p(t),this._init=!0}},i("DES-ECB",r.cipher.modes.ecb),i("DES-CBC",r.cipher.modes.cbc),i("DES-CFB",r.cipher.modes.cfb),i("DES-OFB",r.cipher.modes.ofb),i("DES-CTR",r.cipher.modes.ctr),i("3DES-ECB",r.cipher.modes.ecb),i("3DES-CBC",r.cipher.modes.cbc),i("3DES-CFB",r.cipher.modes.cfb),i("3DES-OFB",r.cipher.modes.ofb),i("3DES-CTR",r.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],l=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],a=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],d=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],m=e.length()>8?3:1,g=[],y=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,v,w=0;w<m;w++){var _=e.getInt32(),k=e.getInt32();v=252645135&(_>>>4^k),k^=v,_^=v<<4,v=65535&(k>>>-16^_),_^=v,k^=v<<-16,v=858993459&(_>>>2^k),k^=v,_^=v<<2,v=65535&(k>>>-16^_),_^=v,k^=v<<-16,v=1431655765&(_>>>1^k),k^=v,_^=v<<1,v=16711935&(k>>>8^_),_^=v,k^=v<<8,v=1431655765&(_>>>1^k),k^=v,_^=v<<1,v=_<<8|k>>>20&240,_=k<<24|k<<8&16711680|k>>>8&65280|k>>>24&240,k=v;for(var S=0;S<y.length;++S){y[S]?(_=_<<2|_>>>26,k=k<<2|k>>>26):(_=_<<1|_>>>27,k=k<<1|k>>>27),_&=-15,k&=-15;var E=t[_>>>28]|n[_>>>24&15]|r[_>>>20&15]|i[_>>>16&15]|o[_>>>12&15]|s[_>>>8&15]|a[_>>>4&15],x=u[k>>>28]|l[k>>>24&15]|c[k>>>20&15]|f[k>>>16&15]|h[k>>>12&15]|p[k>>>8&15]|d[k>>>4&15];v=65535&(x>>>16^E),g[b++]=E^v,g[b++]=x^v<<16}}return g}function d(e,t,n,r){var i=32===e.length?3:9,p,d;p=3===i?r?[30,-2,-2]:[0,32,2]:r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var m=t[0],g=t[1];d=252645135&(m>>>4^g),g^=d,m^=d<<4,d=65535&(m>>>16^g),g^=d,m^=d<<16,d=858993459&(g>>>2^m),m^=d,g^=d<<2,d=16711935&(g>>>8^m),m^=d,g^=d<<8,d=1431655765&(m>>>1^g),g^=d,m^=d<<1,m=m<<1|m>>>31,g=g<<1|g>>>31;for(var y=0;y<i;y+=3){for(var b=p[y+1],v=p[y+2],w=p[y];w!=b;w+=v){var _=g^e[w],k=(g>>>4|g<<28)^e[w+1];d=m,m=g,g=d^(s[_>>>24&63]|u[_>>>16&63]|c[_>>>8&63]|h[63&_]|o[k>>>24&63]|a[k>>>16&63]|l[k>>>8&63]|f[63&k])}d=m,m=g,g=d}m=m>>>1|m<<31,g=g>>>1|g<<31,d=1431655765&(m>>>1^g),g^=d,m^=d<<1,d=16711935&(g>>>8^m),m^=d,g^=d<<8,d=858993459&(g>>>2^m),m^=d,g^=d<<2,d=65535&(m>>>16^g),g^=d,m^=d<<16,d=252645135&(m>>>4^g),g^=d,m^=d<<4,n[0]=m,n[1]=g}function m(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="DES-"+t,i;i=e.decrypt?r.cipher.createDecipher(n,e.key):r.cipher.createCipher(n,e.key);var o=i.start;return i.start=function(e,t){var n=null;t instanceof r.util.ByteBuffer&&(n=t,t={}),t=t||{},t.output=n,t.iv=e,o.call(i,t)},i}},function(e,t,n){var r=n(19);n(34);var i=e.exports=r.pem=r.pem||{};function o(e){for(var t=e.name+": ",n=[],r=function(e,t){return" "+t},i=0;i<e.values.length;++i)n.push(e.values[i].replace(/^(\S+\r\n)/,r));t+=n.join(",")+"\r\n";for(var o=0,s=-1,i=0;i<t.length;++i,++o)if(o>65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var n="-----BEGIN "+e.type+"-----\r\n",i;if(e.procType&&(i={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},n+=o(i)),e.contentDomain&&(i={name:"Content-Domain",values:[e.contentDomain]},n+=o(i)),e.dekInfo&&(i={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&i.values.push(e.dekInfo.parameters),n+=o(i)),e.headers)for(var s=0;s<e.headers.length;++s)n+=o(e.headers[s]);return e.procType&&(n+="\r\n"),n+=r.util.encode64(e.body,t.maxline||64)+"\r\n",n+="-----END "+e.type+"-----\r\n",n},i.decode=function(e){for(var t=[],n=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,i=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/,a;a=n.exec(e),a;){var u={type:a[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:r.util.decode64(a[3])};if(t.push(u),a[2]){for(var l=a[2].split(o),c=0;a&&c<l.length;){for(var f=l[c].replace(/\s+$/,""),h=c+1;h<l.length;++h){var p=l[h];if(!/\s/.test(p[0]))break;f+=p,c=h}if(a=f.match(i),a){for(var d={name:a[1],values:[]},m=a[2].split(","),g=0;g<m.length;++g)d.values.push(s(m[g]));if(u.procType)if(u.contentDomain||"Content-Domain"!==d.name)if(u.dekInfo||"DEK-Info"!==d.name)u.headers.push(d);else{if(0===d.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:m[0],parameters:m[1]||null}}else u.contentDomain=m[0]||"";else{if("Proc-Type"!==d.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==d.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:m[0],type:m[1]}}}++c}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===t.length)throw new Error("Invalid PEM formatted message.");return t}},function(e,t,n){"use strict";e.exports=function e(t,n){return t.then(e=>{n(null,e)},e=>{n(e)})}},function(e,t,n){"use strict";e.exports=self.crypto||self.msCrypto},function(e,t,n){"use strict";const r=n(900);e.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0");return r(e)}},function(e,t,n){var r=n(4).Buffer;function i(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var n=e[5+t];return 0!==n&&(6+t+n===e.length&&(!(128&e[4])&&(!(t>1&&0===e[4]&&!(128&e[5]))&&(!(128&e[t+6])&&!(n>1&&0===e[t+6]&&!(128&e[t+7]))))))}function o(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var n=e[5+t];if(0===n)throw new Error("S length is zero");if(6+t+n!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(n>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}}function s(e,t){var n=e.length,i=t.length;if(0===n)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(n>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(n>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=r.allocUnsafe(6+n+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+n]=2,o[5+n]=t.length,t.copy(o,6+n),o}e.exports={check:i,decode:o,encode:s}},function(e){e.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(e,t,n){"use strict";var r=n(1),i=n(468),o=n(4).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function l(e,t,n,r,i,o,s){return u(e+(t&n|~t&r)+i+o|0,s)+t|0}function c(e,t,n,r,i,o,s){return u(e+(t&r|n&~r)+i+o|0,s)+t|0}function f(e,t,n,r,i,o,s){return u(e+(t^n^r)+i+o|0,s)+t|0}function h(e,t,n,r,i,o,s){return u(e+(n^(t|~r))+i+o|0,s)+t|0}r(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=l(n,r,i,o,e[0],3614090360,7),o=l(o,n,r,i,e[1],3905402710,12),i=l(i,o,n,r,e[2],606105819,17),r=l(r,i,o,n,e[3],3250441966,22),n=l(n,r,i,o,e[4],4118548399,7),o=l(o,n,r,i,e[5],1200080426,12),i=l(i,o,n,r,e[6],2821735955,17),r=l(r,i,o,n,e[7],4249261313,22),n=l(n,r,i,o,e[8],1770035416,7),o=l(o,n,r,i,e[9],2336552879,12),i=l(i,o,n,r,e[10],4294925233,17),r=l(r,i,o,n,e[11],2304563134,22),n=l(n,r,i,o,e[12],1804603682,7),o=l(o,n,r,i,e[13],4254626195,12),i=l(i,o,n,r,e[14],2792965006,17),r=l(r,i,o,n,e[15],1236535329,22),n=c(n,r,i,o,e[1],4129170786,5),o=c(o,n,r,i,e[6],3225465664,9),i=c(i,o,n,r,e[11],643717713,14),r=c(r,i,o,n,e[0],3921069994,20),n=c(n,r,i,o,e[5],3593408605,5),o=c(o,n,r,i,e[10],38016083,9),i=c(i,o,n,r,e[15],3634488961,14),r=c(r,i,o,n,e[4],3889429448,20),n=c(n,r,i,o,e[9],568446438,5),o=c(o,n,r,i,e[14],3275163606,9),i=c(i,o,n,r,e[3],4107603335,14),r=c(r,i,o,n,e[8],1163531501,20),n=c(n,r,i,o,e[13],2850285829,5),o=c(o,n,r,i,e[2],4243563512,9),i=c(i,o,n,r,e[7],1735328473,14),r=c(r,i,o,n,e[12],2368359562,20),n=f(n,r,i,o,e[5],4294588738,4),o=f(o,n,r,i,e[8],2272392833,11),i=f(i,o,n,r,e[11],1839030562,16),r=f(r,i,o,n,e[14],4259657740,23),n=f(n,r,i,o,e[1],2763975236,4),o=f(o,n,r,i,e[4],1272893353,11),i=f(i,o,n,r,e[7],4139469664,16),r=f(r,i,o,n,e[10],3200236656,23),n=f(n,r,i,o,e[13],681279174,4),o=f(o,n,r,i,e[0],3936430074,11),i=f(i,o,n,r,e[3],3572445317,16),r=f(r,i,o,n,e[6],76029189,23),n=f(n,r,i,o,e[9],3654602809,4),o=f(o,n,r,i,e[12],3873151461,11),i=f(i,o,n,r,e[15],530742520,16),r=f(r,i,o,n,e[2],3299628645,23),n=h(n,r,i,o,e[0],4096336452,6),o=h(o,n,r,i,e[7],1126891415,10),i=h(i,o,n,r,e[14],2878612391,15),r=h(r,i,o,n,e[5],4237533241,21),n=h(n,r,i,o,e[12],1700485571,6),o=h(o,n,r,i,e[3],2399980690,10),i=h(i,o,n,r,e[10],4293915773,15),r=h(r,i,o,n,e[1],2240044497,21),n=h(n,r,i,o,e[8],1873313359,6),o=h(o,n,r,i,e[15],4264355552,10),i=h(i,o,n,r,e[6],2734768916,15),r=h(r,i,o,n,e[13],1309151649,21),n=h(n,r,i,o,e[4],4149444226,6),o=h(o,n,r,i,e[11],3174756917,10),i=h(i,o,n,r,e[2],718787259,15),r=h(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},a.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 e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,n){"use strict";var r=n(1),i=n(928),o=n(119),s=n(4).Buffer,a=n(929),u=n(469),l=n(470),c=s.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>n){var r="rmd160"===e?new u:l(e);t=r.update(t).digest()}else t.length<n&&(t=s.concat([t,c],n));for(var i=this._ipad=s.allocUnsafe(n),a=this._opad=s.allocUnsafe(n),f=0;f<n;f++)i[f]=54^t[f],a[f]=92^t[f];this._hash="rmd160"===e?new u:l(e),this._hash.update(i)}r(f,o),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest(),t="rmd160"===this._alg?new u:l(this._alg);return t.update(this._opad).update(e).digest()},e.exports=function e(t,n){return t=t.toLowerCase(),"rmd160"===t||"ripemd160"===t?new f("rmd160",n):"md5"===t?new i(a,n):new f(t,n)}},function(e,t,n){"use strict";function r(e){if("number"==typeof e){if(r.codes[e])return r.codes[e];throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(r.names[e])return r.names[e];throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}const i=-1;function o(e,t,n,r,i){return{code:e,size:t,name:n,resolvable:Boolean(r),path:Boolean(i)}}r.lengthPrefixedVarSize=i,r.V=i,r.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,i,"ip6zone"],[53,i,"dns","resolvable"],[54,i,"dns4","resolvable"],[55,i,"dns6","resolvable"],[56,i,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,i,"unix",!1,"path"],[421,i,"p2p"],[421,i,"ipfs"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,i,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"]],r.names={},r.codes={},r.table.map(e=>{const t=o.apply(null,e);r.codes[t.code]=t,r.names[t.name]=t}),r.object=o,e.exports=r},function(e,t,n){"use strict";const r=1e3;e.exports={maxProvidersPerRequest:3,providerRequestTimeout:1e4,hasBlockTimeout:15e3,provideTimeout:15e3,kMaxPriority:Math.pow(2,31)-1,rebroadcastDelay:1e4,maxListeners:1e3}},function(e,t,n){var r=n(68),i=n(323),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function a(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}e.exports=a},function(e,t,n){var r=n(131),i=n(104),o="[object Symbol]";function s(e){return"symbol"==typeof e||i(e)&&r(e)==o}e.exports=s},function(e,t,n){var r=n(1001),i=n(1017),o=n(1019),s=n(1020),a=n(1021);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,n){var r=n(121),i=n(98),o=r(i,"Map");e.exports=o},function(e,t,n){var r=n(1022);function i(e){return null==e?"":r(e)}e.exports=i},function(e,t,n){var r=n(1064)("socket.io-parser"),i=n(146),o=n(1067),s=n(509),a=n(510);function u(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=p;var l=t.ERROR+'"encode error"';function c(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var i=f(e.data);if(!1===i)return l;n+=i}return r("encoded %j as %s",e,n),n}function f(e){try{return JSON.stringify(e)}catch(e){return!1}}function h(e,t){function n(e){var n=o.deconstructPacket(e),r=c(n.packet),i=n.buffers;i.unshift(r),t(i)}o.removeBlobs(e,n)}function p(){this.reconstructor=null}function d(e){var n=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return y("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o="";"-"!==e.charAt(++n)&&(o+=e.charAt(n),n!=e.length););if(o!=Number(o)||"-"!==e.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(o)}if("/"===e.charAt(n+1))for(i.nsp="";++n;){var a=e.charAt(n);if(","===a)break;if(i.nsp+=a,n===e.length)break}else i.nsp="/";var u=e.charAt(n+1);if(""!==u&&Number(u)==u){for(i.id="";++n;){var a=e.charAt(n);if(null==a||Number(a)!=a){--n;break}if(i.id+=e.charAt(n),n===e.length)break}i.id=Number(i.id)}if(e.charAt(++n)){var l=m(e.substr(n)),c=!1!==l&&(i.type===t.ERROR||s(l));if(!c)return y("invalid payload");i.data=l}return r("decoded %s as %j",e,i),i}function m(e){try{return JSON.parse(e)}catch(e){return!1}}function g(e){this.reconPack=e,this.buffers=[]}function y(e){return{type:t.ERROR,data:"parser error: "+e}}u.prototype.encode=function(e,n){if(r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)h(e,n);else{var i=c(e);n([i])}},i(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=d(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new g(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},g.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},g.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){var r=n(1070);e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t,n){var r=n(147),i=n(146);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";(function(e){const r=n(58),i=n(72),o=n(12),s=n(43),a=n(37),u=n(64),l=n(54);function c(e,t,n){u.hmac.create(e,t,n)}function f(e,t,n,r){if("AES-128"===e||"AES-256"===e)return u.aes.create(n,t,r);r(new Error(`unrecognized cipher type: ${e}`))}t.exchanges=["P-256","P-384","P-521"],t.ciphers=["AES-256","AES-128"],t.hashes=["SHA256","SHA512"],t.theBest=((e,t,n)=>{let r,i;if(e<0)r=n,i=t;else{if(!(e>0))return t[0];r=t,i=n}for(let e of r)for(let t of i)if(e===t)return e;throw new Error("No algorithms in common!")}),t.makeMacAndCipher=((e,t)=>{l([t=>c(e.hashT,e.keys.macKey,t),t=>f(e.cipherT,e.keys.iv,e.keys.cipherKey,t)],(n,r)=>{if(n)return t(n);e.mac=r[0],e.cipher=r[1],t()})}),t.selectBest=((n,r,i)=>{t.digest(e.concat([r.pubKeyBytes,n.nonce]),(o,s)=>{if(o)return i(o);t.digest(e.concat([n.pubKeyBytes,r.nonce]),(o,a)=>{if(o)return i(o);const u=e.compare(s,a);if(0===u)return i(new Error("you are trying to talk to yourself"));i(null,{curveT:t.theBest(u,n.exchanges,r.exchanges),cipherT:t.theBest(u,n.ciphers,r.ciphers),hashT:t.theBest(u,n.hashes,r.hashes),order:u})})})}),t.digest=((e,t)=>{r.digest(e,"sha2-256",e.length,t)}),t.write=function e(t,n,r){r=r||(()=>{}),o(s([n]),i.encode({fixed:!0,bytes:4}),a((e,n)=>{if(e)return r(e);t.shake.write(n[0]),r()}))},t.read=function e(t,n){i.decodeFromReader(t,{fixed:!0,bytes:4},n)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(e){const r=n(71),i=n(23),o=n(64),s=n(54),a=n(11),u=n(5),l=u("libp2p:secio");l.error=u("libp2p:secio:error");const c=r(n(1113)),f=n(330),h=16;t.createProposal=(e=>(e.proposal.out={rand:o.randomBytes(16),pubkey:e.key.local.public.bytes,exchanges:f.exchanges.join(","),ciphers:f.ciphers.join(","),hashes:f.hashes.join(",")},e.proposalEncoded.out=c.Propose.encode(e.proposal.out),e.proposalEncoded.out)),t.createExchange=((t,n)=>{o.keys.generateEphemeralKeyPair(t.protocols.local.curveT,(r,i)=>{if(r)return n(r);t.ephemeralKey.local=i.key,t.shared.generate=i.genSharedKey;const o=e.concat([t.proposalEncoded.out,t.proposalEncoded.in,t.ephemeralKey.local]);t.key.local.sign(o,(e,r)=>{if(e)return n(e);t.exchange.out={epubkey:t.ephemeralKey.local,signature:r},n(null,c.Exchange.encode(t.exchange.out))})})}),t.identify=((e,t,n)=>{l("1.1 identify"),e.proposalEncoded.in=t,e.proposal.in=c.Propose.decode(t);const r=e.proposal.in.pubkey;e.key.remote=o.keys.unmarshalPublicKey(r),i.createFromPubKey(r.toString("base64"),(t,r)=>{if(t)return n(t);if(e.id.remote){if(e.id.remote.toB58String()!==r.toB58String())return n(new Error("dialed to the wrong peer, Ids do not match"))}else e.id.remote=r;l("1.1 identify - %s - identified remote peer as %s",e.id.local.toB58String(),e.id.remote.toB58String()),n()})}),t.selectProtocols=((e,t)=>{l("1.2 selection");const n={pubKeyBytes:e.key.local.public.bytes,exchanges:f.exchanges,hashes:f.hashes,ciphers:f.ciphers,nonce:e.proposal.out.rand},r={pubKeyBytes:e.proposal.in.pubkey,exchanges:e.proposal.in.exchanges.split(","),hashes:e.proposal.in.hashes.split(","),ciphers:e.proposal.in.ciphers.split(","),nonce:e.proposal.in.rand};f.selectBest(n,r,(n,r)=>{if(n)return t(n);e.protocols.remote={order:r.order,curveT:r.curveT,cipherT:r.cipherT,hashT:r.hashT},e.protocols.local={order:r.order,curveT:r.curveT,cipherT:r.cipherT,hashT:r.hashT},t()})}),t.verify=((t,n,r)=>{l("2.1. verify"),t.exchange.in=c.Exchange.decode(n),t.ephemeralKey.remote=t.exchange.in.epubkey;const i=e.concat([t.proposalEncoded.in,t.proposalEncoded.out,t.ephemeralKey.remote]);t.key.remote.verify(i,t.exchange.in.signature,(e,t)=>e?r(e):t?(l("2.1. verify - signature verified"),void r()):r(new Error("Bad signature")))}),t.generateKeys=((e,t)=>{l("2.2. keys"),a([t=>e.shared.generate(e.exchange.in.epubkey,t),(t,n)=>{e.shared.secret=t,o.keys.keyStretcher(e.protocols.local.cipherT,e.protocols.local.hashT,e.shared.secret,n)},(t,n)=>{if(e.protocols.local.order>0)e.protocols.local.keys=t.k1,e.protocols.remote.keys=t.k2;else{if(!(e.protocols.local.order<0))return n(new Error("you are trying to talk to yourself"));e.protocols.local.keys=t.k2,e.protocols.remote.keys=t.k1}l("2.3. mac + cipher"),s([t=>f.makeMacAndCipher(e.protocols.local,t),t=>f.makeMacAndCipher(e.protocols.remote,t)],n)}],t)}),t.verifyNonce=((e,t)=>{const n=e.proposal.out.rand;if(!n.equals(t))throw new Error(`Failed to read our encrypted nonce: ${n.toString("hex")} != ${t.toString("hex")}`)})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=n(67),i=f(r),o=n(145),s=f(o),a=n(42),u=f(a),l=n(105),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=null,r;t=t||i.default,(0,s.default)(e,function(e,t){(0,u.default)(e)(function(e,i){r=arguments.length>2?(0,c.default)(arguments,1):i,n=e,t(!e)})},function(){t(n,r)})}e.exports=t.default},function(e,t,n){"use strict";const r=n(71),i="\nmessage Identify {\n // protocolVersion determines compatibility between peers\n optional string protocolVersion = 5; // e.g. ipfs/1.0.0\n\n // agentVersion is like a UserAgent string in browsers, or client version in bittorrent\n // includes the client name and client.\n optional string agentVersion = 6; // e.g. go-ipfs/0.1.0\n\n // publicKey is this node's public key (which also gives its node.ID)\n // - may not need to be sent, as secure channel implies it has been sent.\n // - then again, if we change / disable secure channel, may still want it.\n optional bytes publicKey = 1;\n\n // listenAddrs are the multiaddrs the sender node listens for open connections on\n repeated bytes listenAddrs = 2;\n\n // oservedAddr is the multiaddr of the remote endpoint that the sender node perceives\n // this is useful information to convey to the other side, as it helps the remote endpoint\n // determine whether its connection to the local peer goes through NAT.\n optional bytes observedAddr = 4;\n\n repeated string protocols = 3;\n}\n";e.exports=r(i).Identify},function(e,t,n){"use strict";const r=n(43),i=n(37),o=n(106),s=n(12),a=n(72),u=n(122),l=n(5),c=l("libp2p:circuit:stream-handler");c.err=l("libp2p:circuit:error:stream-handler");class f{constructor(e,t,n,r){this.conn=e,this.stream=null,this.shake=null,this.timeout=t||6e4,this.maxLength=r||4096,"function"==typeof t&&(this.timeout=n||6e4),this.stream=u({timeout:this.timeout},t),this.shake=this.stream.handshake,s(this.stream,e,this.stream)}isValid(){return this.conn&&this.shake&&this.stream}read(e){if(!this.isValid())return e(new Error("handler is not in a valid state"));a.decodeFromReader(this.shake,{maxLength:this.maxLength},(t,n)=>t?(c.err(t),e(t)):e(null,n))}write(e,t){if(t=t||(()=>{}),!this.isValid())return t(new Error("handler is not in a valid state"));s(r([e]),a.encode(),i((e,n)=>{if(e)return c.err(e),this.shake.abort(e),t(e);n.forEach(e=>this.shake.write(e)),t()}))}getRawConn(){return this.conn}rest(){const e=this.shake.rest();return this.conn=null,this.stream=null,this.shake=null,e}close(){this.isValid()&&s(o(),this.rest())}}e.exports=f},function(e,t,n){"use strict";e.exports={relay:"/libp2p/circuit/relay/0.1.0"}},function(e,t,n){"use strict";const r=n(66).Connection,i=n(12);e.exports=((e,t,n,o)=>{const s=new Promise((e,t)=>{n.getPeerInfo((t,r)=>{if(!t&&r)return void e(r);const i=n.setPeerInfo;n.setPeerInfo=(t=>{i.call(n,t),e(t)})})}),a={source:i(n,o.incoming(e,t,s)),sink:i(o.outgoing(e,t,s),n)};return new r(a,n)})},function(e,t,n){"use strict";e.exports={PROTOCOL:"/ipfs/ping/1.0.0",PING_LENGTH:32}},function(e,t,n){var r=n(131),i=n(68),o=n(104),s="[object String]";function a(e){return"string"==typeof e||!i(e)&&o(e)&&r(e)==s}e.exports=a},function(e,t,n){var r=n(1221);e.exports=function(e,t,n){n=void 0===n||n;var i=!1,o;return function(s){var a=0,u=0,l=0,c=[],f=!1,h=!1,p,d;function m(){if(p){var e=p;if(d)return p=null,e(d);if(Object.hasOwnProperty.call(c,u)){p=null;var n=c[u];delete c[u],u++,e(null,n),t&&g()}else u>=l&&h&&(p=null,e(h))}}var g=r(function(){if(f=!0,h)return m();i||t&&a-t>=u||(i=!0,s(o,function(t,r){if(i=!1,t)l=a,h=t,m();else{var o=a++;e(r,function(e,t){n?c[o]=t:c.push(t),e&&(d=e),m()}),h||g()}}))});return function(e,t){e?s(h=o=e,function(e){if(t)return t(e)}):(p=t,f||g(),m())}}}},function(e,t,n){"use strict";const r=n(188),i=100;e.exports=function e(t){const n=t||100;var i=[];return r(function e(t){for(i=i.concat(t);i.length>=n;){const e=n,t=i.slice(0,e);i=i.slice(e),this.queue(t)}},function e(t){i.length&&(this.queue(i),i=[]),this.queue(null)})}},function(e,t,n){"use strict";e.exports=class e{constructor(e,t){this._options=t||{},Object.assign(this,e)}}},function(e,t,n){"use strict";const r=n(1236),i=n(1237),o={bits:8};class s{constructor(e,t,n){if(this._options=Object.assign({},o,e),this._popCount=0,this._parent=t,this._posAtParent=n,!this._options.hashFn)throw new Error("please define an options.hashFn");this._options.hash||(this._options.hash=i(this._options.hashFn)),this._children=new r}static isBucket(e){return e instanceof s}async put(e,t){const n=await this._findNewBucketAndPos(e);await n.bucket._putAt(n,e,t)}async get(e){const t=await this._findChild(e);if(t)return t.value}async del(e){const t=await this._findPlace(e),n=t.bucket._at(t.pos);n&&n.key===e&&t.bucket._delAt(t.pos)}leafCount(){return this._children.compactArray().reduce((e,t)=>t instanceof s?e+t.leafCount():e+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){const e=this._children.compactArray();for(const t of e)if(t instanceof s)for(const e of t.eachLeafSeries())yield e;else yield t}serialize(e,t){return t(this._children.reduce((n,r,i)=>(r&&(r instanceof s?n.push(r.serialize(e,t)):n.push(e(r,i))),n),[]))}async asyncTransform(e,t){return c(this,e,t)}toJSON(){return this.serialize(u,l)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(e){const t=await this._findPlace(e),n=t.bucket._at(t.pos);if(n&&n.key===e)return n}async _findPlace(e){const t=this._options.hash(e),n=await t.take(this._options.bits),r=this._children.get(n);return r instanceof s?r._findPlace(t):{bucket:this,pos:n,hash:t}}async _findNewBucketAndPos(e){const t=await this._findPlace(e),n=t.bucket._at(t.pos);if(n&&n.key!==e){const e=new s(this._options,t.bucket,t.pos);t.bucket._putObjectAt(t.pos,e);const r=await e._findPlace(n.hash);return r.bucket._putAt(r,n.key,n.value),e._findNewBucketAndPos(t.hash)}return t}_putAt(e,t,n){this._putObjectAt(e.pos,{key:t,value:n,hash:e.hash})}_putObjectAt(e,t){this._children.get(e)||this._popCount++,this._children.set(e,t)}_delAt(e){this._children.get(e)&&this._popCount--,this._children.unset(e),this._level()}_level(){if(this._parent&&this._popCount<=1)if(1===this._popCount){const e=this._children.find(a);if(!(e instanceof s)){const t=e.hash;t.untake(this._options.bits);const n={pos:this._posAtParent,hash:t};this._parent._putAt(n,e.key,e.value)}}else this._parent._delAt(this._posAtParent)}_at(e){return this._children.get(e)}}function a(e){return Boolean(e)}function u(e,t){return e.key}function l(e){return e}async function c(e,t,n){const r=[];for(const i of e._children.compactArray()){if(i instanceof s)await c(i,t,n);else{const n=await t(i);r.push({bitField:e._children.bitField(),children:n})}return n(r)}}e.exports=s},function(e,t,n){"use strict";const r=(e="")=>(e.trim().match(/([^\\^/]|\\\/)+/g)||[]).filter(Boolean);e.exports=r},function(e,t,n){"use strict";const r=n(11),i=n(48),o=n(123),{loadNode:s,formatCid:a,toMfsPath:u,FILE_SEPARATOR:l,FILE_TYPES:c}=n(82),f=n(12),h=n(37),p=n(89),d=n(78),m=n(138),g=n(81),y=n(70),b={long:!1,cidBase:"base58btc"};e.exports=(e=>(function t(n,v={}){"object"==typeof n&&(v=n,n=l),void 0===n&&(n=l),v=Object.assign({},b,v),v.long=v.l||v.long;const w=y.source();return r([t=>u(e,n,t),({mfsPath:t,depth:r},i)=>{f(o(t,e.ipld,{maxDepth:r}),h((s,a)=>{if(s)return i(s);if(a.length>1)return i(new Error(`Path ${n} had ${a.length} roots`));const u=a[0];if(!u)return i(new Error(`${n} does not exist`));if("dir"!==u.type)return i(null,m(u));let l=!0;return i(null,f(o(t,e.ipld,{maxDepth:r+1}),d(()=>!l||(l=!1,!1))))}))},(t,n)=>{n(null,f(t,p((t,n)=>{if(!v.long)return n(null,{name:t.name,type:0,size:0,hash:""});s(e,{cid:t.hash},(e,r)=>{if(e)return n(e);const o=i.unmarshal(r.node.data);n(null,{name:t.name,type:c[o.type],hash:a(t.hash,v.cidBase),size:o.fileSize()||0})})})))}],(e,t)=>{if(e)return w.resolve(g(e));w.resolve(t)}),w}))},function(e,t,n){"use strict";const r=n(11),i=n(99),o=n(5)("ipfs:mfs:mkdir"),s=n(123),a=n(12),u=n(78),l=n(77),c=n(37),f=n(9),{createNode:h,toMfsPath:p,toPathComponents:d,updateMfsRoot:m,updateTree:g,FILE_SEPARATOR:y}=n(82),b={parents:!1,hashAlg:"sha2-256",cidVersion:0,shardSplitThreshold:1e3,format:"dag-pb",flush:!0};e.exports=(e=>(function t(n,v,w){if("function"==typeof v&&(w=v,v={}),v=Object.assign({},b,v),v.parents=v.p||v.parents,v.cidVersion=v.cidVersion||0,!n)return w(new Error("no path given to Mkdir"));if(n=n.trim(),n===y)return w(v.parents?null:new Error(`cannot create directory '${y}': Already exists`));o(`Creating ${n}`);const _=d(n);r([t=>p(e,n,t),({mfsDirectory:t,mfsPath:n,root:r},i)=>{const o=d(n).slice(1);let h=0,p="";a(s(n,e.ipld,{fullPath:!0}),u(e=>e.name===o[h]&&(h++,!0)),l(e=>{const t=`${p}${p?"/":""}${o[e.depth]}`;if("dir"!==e.type)throw new Error(`cannot access ${t}: Not a directory`);return p=t,{cid:new f(e.hash),name:e.name}}),c(i))},(t,n)=>{if(_.unshift("/"),t.length===_.length)return n(new Error("file already exists"));i(_.map((e,t)=>({part:e,index:t})),({part:n,index:i},o)=>t[i]?o(null,{name:n,...t[i]}):i===_.length-1||v.parents?void r([t=>h(e,"directory",v,t),({cid:e,node:t},r)=>{r(null,{cid:e,size:t.size,name:n})}],o):o(new Error("file does not exist")),n)},(t,n)=>g(e,t,v,n),({cid:t},n)=>m(e,t,n)],e=>{e&&e.message.includes("file already exists")&&v.parents&&(e=null),w(e)})}))},function(e,t,n){"use strict";const r=n(123),i=n(12),o=n(138),s=n(89),a=n(223),u=n(78),l=n(70),c=n(37),{toMfsPath:f}=n(82),h=n(5)("ipfs:mfs:read-pull-stream"),p={offset:0,length:void 0};e.exports=(e=>(function t(n,d={}){d=Object.assign({},p,d),d.length=d.length||d.count,h(`Reading ${n}`);const m=l.source();return i(o(n),s((t,n)=>f(e,t,n)),s(({mfsPath:t,root:n},o)=>(h(`Exporting ${t}`),i(r(t,e.ipld,{offset:d.offset,length:d.length}),c(o)))),a(),u(),c((e,t)=>{if(e)return m.abort(e);if(!t||!t.length)return m.abort(new Error(`${n} does not exist`));const r=t[0];return"file"!==r.type?m.abort(new Error(`${n} was not a file`)):r.content?(h(`Got ${n} content`),void m.resolve(t[0].content)):m.abort(new Error(`Could not load content stream from ${n}`))})),m}))},function(e,t,n){"use strict";const r=n(572),i=(e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),r.deserialize(e,(e,r)=>{if(e)return n(e);if(!t)return n(null,{value:r,remainderPath:""});const i=t.split("/"),o=s(r,i[0]);if(null===o)return n(new Error("No such path"),null);let a=i.slice(1).join("/");return void 0!==o["/"]?n(null,{value:o,remainderPath:a}):a.length>0?n(new Error("No such path"),null):n(null,{value:o,remainderPath:""})})},o=(e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),t=t||{},r.deserialize(e,(e,r)=>{if(e)return n(e);const i=["version","timestamp","difficulty","nonce","parent","tx"];if(!0===t.values){const e={};for(let t of i)e[t]=s(r,t);return n(null,e)}return n(null,i)})},s=(e,t)=>{switch(t){case"version":return e.version;case"timestamp":return e.timestamp;case"difficulty":return e.bits;case"nonce":return e.nonce;case"parent":return{"/":r.hashToCid(e.prevHash)};case"tx":return{"/":r.hashToCid(e.merkleRoot)};default:return null}};e.exports={multicodec:"bitcoin-block",defaultHashAlg:"dbl-sha2-256",resolve:i,tree:o}},function(e,t){var n={Array:function(e){return null!==e&&void 0!==e&&e.constructor===Array},Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return void 0===e||null===e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==typeof e},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var r in n.Null=n.Nil,n)n[r].toJSON=function(e){return e}.bind(null,r);e.exports=n},function(e,t,n){const r=n(4).Buffer,i=n(108),o=n(29),s=n(1358),a=n(36),u=n(45),l=n(93),c=n(580);function f(e){const t=e.length;return c.encodingLength(t)+t}function h(e){const t=e.length;return c.encodingLength(t)+e.reduce(function(e,t){return e+f(t)},0)}function p(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}p.DEFAULT_SEQUENCE=4294967295,p.SIGHASH_ALL=1,p.SIGHASH_NONE=2,p.SIGHASH_SINGLE=3,p.SIGHASH_ANYONECANPAY=128,p.ADVANCED_TRANSACTION_MARKER=0,p.ADVANCED_TRANSACTION_FLAG=1;const d=r.allocUnsafe(0),m=[],g=r.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),y=r.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),b=r.from("ffffffffffffffff","hex"),v={script:d,valueBuffer:b};p.fromBuffer=function(e,t){let n=0;function r(t){return n+=t,e.slice(n-t,n)}function i(){const t=e.readUInt32LE(n);return n+=4,t}function o(){const t=e.readInt32LE(n);return n+=4,t}function a(){const t=s.readUInt64LE(e,n);return n+=8,t}function u(){const t=c.decode(e,n);return n+=c.decode.bytes,t}function l(){return r(u())}function f(){const e=u(),t=[];for(var n=0;n<e;n++)t.push(l());return t}const h=new p;h.version=o();const d=e.readUInt8(n),g=e.readUInt8(n+1);let y=!1;d===p.ADVANCED_TRANSACTION_MARKER&&g===p.ADVANCED_TRANSACTION_FLAG&&(n+=2,y=!0);const b=u();for(var v=0;v<b;++v)h.ins.push({hash:r(32),index:i(),script:l(),sequence:i(),witness:m});const w=u();for(v=0;v<w;++v)h.outs.push({value:a(),script:l()});if(y){for(v=0;v<b;++v)h.ins[v].witness=f();if(!h.hasWitnesses())throw new Error("Transaction has superfluous witness data")}if(h.locktime=i(),t)return h;if(n!==e.length)throw new Error("Transaction has unexpected data");return h},p.fromHex=function(e){return p.fromBuffer(r.from(e,"hex"))},p.isCoinbaseHash=function(e){u(l.Hash256bit,e);for(var t=0;t<32;++t)if(0!==e[t])return!1;return!0},p.prototype.isCoinbase=function(){return 1===this.ins.length&&p.isCoinbaseHash(this.ins[0].hash)},p.prototype.addInput=function(e,t,n,r){return u(l.tuple(l.Hash256bit,l.UInt32,l.maybe(l.UInt32),l.maybe(l.Buffer)),arguments),l.Null(n)&&(n=p.DEFAULT_SEQUENCE),this.ins.push({hash:e,index:t,script:r||d,sequence:n,witness:m})-1},p.prototype.addOutput=function(e,t){return u(l.tuple(l.Buffer,l.Satoshi),arguments),this.outs.push({script:e,value:t})-1},p.prototype.hasWitnesses=function(){return this.ins.some(function(e){return 0!==e.witness.length})},p.prototype.weight=function(){const e=this.__byteLength(!1),t=this.__byteLength(!0);return 3*e+t},p.prototype.virtualSize=function(){return Math.ceil(this.weight()/4)},p.prototype.byteLength=function(){return this.__byteLength(!0)},p.prototype.__byteLength=function(e){const t=e&&this.hasWitnesses();return(t?10:8)+c.encodingLength(this.ins.length)+c.encodingLength(this.outs.length)+this.ins.reduce(function(e,t){return e+40+f(t.script)},0)+this.outs.reduce(function(e,t){return e+8+f(t.script)},0)+(t?this.ins.reduce(function(e,t){return e+h(t.witness)},0):0)},p.prototype.clone=function(){const e=new p;return e.version=this.version,e.locktime=this.locktime,e.ins=this.ins.map(function(e){return{hash:e.hash,index:e.index,script:e.script,sequence:e.sequence,witness:e.witness}}),e.outs=this.outs.map(function(e){return{script:e.script,value:e.value}}),e},p.prototype.hashForSignature=function(e,t,n){if(u(l.tuple(l.UInt32,l.Buffer,l.Number),arguments),e>=this.ins.length)return y;const s=o.compile(o.decompile(t).filter(function(e){return e!==a.OP_CODESEPARATOR})),c=this.clone();if((31&n)===p.SIGHASH_NONE)c.outs=[],c.ins.forEach(function(t,n){n!==e&&(t.sequence=0)});else if((31&n)===p.SIGHASH_SINGLE){if(e>=this.outs.length)return y;c.outs.length=e+1;for(var f=0;f<e;f++)c.outs[f]=v;c.ins.forEach(function(t,n){n!==e&&(t.sequence=0)})}n&p.SIGHASH_ANYONECANPAY?(c.ins=[c.ins[e]],c.ins[0].script=s):(c.ins.forEach(function(e){e.script=d}),c.ins[e].script=s);const h=r.allocUnsafe(c.__byteLength(!1)+4);return h.writeInt32LE(n,h.length-4),c.__toBuffer(h,0,!1),i.hash256(h)},p.prototype.hashForWitnessV0=function(e,t,n,o){let a,h;function d(e){h+=e.copy(a,h)}function m(e){h=a.writeUInt32LE(e,h)}function y(e){h=s.writeUInt64LE(a,e,h)}function b(e){c.encode(e,a,h),h+=c.encode.bytes}function v(e){b(e.length),d(e)}u(l.tuple(l.UInt32,l.Buffer,l.Satoshi,l.UInt32),arguments);let w=g,_=g,k=g;if(o&p.SIGHASH_ANYONECANPAY||(a=r.allocUnsafe(36*this.ins.length),h=0,this.ins.forEach(function(e){d(e.hash),m(e.index)}),_=i.hash256(a)),o&p.SIGHASH_ANYONECANPAY||(31&o)===p.SIGHASH_SINGLE||(31&o)===p.SIGHASH_NONE||(a=r.allocUnsafe(4*this.ins.length),h=0,this.ins.forEach(function(e){m(e.sequence)}),k=i.hash256(a)),(31&o)!==p.SIGHASH_SINGLE&&(31&o)!==p.SIGHASH_NONE){const e=this.outs.reduce(function(e,t){return e+8+f(t.script)},0);a=r.allocUnsafe(e),h=0,this.outs.forEach(function(e){y(e.value),v(e.script)}),w=i.hash256(a)}else if((31&o)===p.SIGHASH_SINGLE&&e<this.outs.length){const t=this.outs[e];a=r.allocUnsafe(8+f(t.script)),h=0,y(t.value),v(t.script),w=i.hash256(a)}a=r.allocUnsafe(156+f(t)),h=0;const S=this.ins[e];return m(this.version),d(_),d(k),d(S.hash),m(S.index),v(t),y(n),m(S.sequence),d(w),m(this.locktime),m(o),i.hash256(a)},p.prototype.getHash=function(){return i.hash256(this.__toBuffer(void 0,void 0,!1))},p.prototype.getId=function(){return this.getHash().reverse().toString("hex")},p.prototype.toBuffer=function(e,t){return this.__toBuffer(e,t,!0)},p.prototype.__toBuffer=function(e,t,n){e||(e=r.allocUnsafe(this.__byteLength(n)));let i=t||0;function o(t){i+=t.copy(e,i)}function a(t){i=e.writeUInt8(t,i)}function u(t){i=e.writeUInt32LE(t,i)}function l(t){i=e.writeInt32LE(t,i)}function f(t){i=s.writeUInt64LE(e,t,i)}function h(t){c.encode(t,e,i),i+=c.encode.bytes}function d(e){h(e.length),o(e)}function m(e){h(e.length),e.forEach(d)}l(this.version);const g=n&&this.hasWitnesses();return g&&(a(p.ADVANCED_TRANSACTION_MARKER),a(p.ADVANCED_TRANSACTION_FLAG)),h(this.ins.length),this.ins.forEach(function(e){o(e.hash),u(e.index),d(e.script),u(e.sequence)}),h(this.outs.length),this.outs.forEach(function(e){e.valueBuffer?o(e.valueBuffer):f(e.value),d(e.script)}),g&&this.ins.forEach(function(e){m(e.witness)}),u(this.locktime),void 0!==t?e.slice(t,i):e},p.prototype.toHex=function(){return this.toBuffer().toString("hex")},p.prototype.setInputScript=function(e,t){u(l.tuple(l.Number,l.Buffer),arguments),this.ins[e].script=t},p.prototype.setWitness=function(e,t){u(l.tuple(l.Number,[l.Buffer]),arguments),this.ins[e].witness=t},e.exports=p},function(e,t,n){"use strict";for(var r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={},o=0;o<r.length;o++){var s=r.charAt(o);if(void 0!==i[s])throw new TypeError(s+" is ambiguous");i[s]=o}function a(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function u(e){for(var t=1,n=0;n<e.length;++n){var r=e.charCodeAt(n);if(r<33||r>126)throw new Error("Invalid prefix ("+e+")");t=a(t)^r>>5}for(t=a(t),n=0;n<e.length;++n){var i=e.charCodeAt(n);t=a(t)^31&i}return t}function l(e,t,n){if(n=n||90,e.length+7+t.length>n)throw new TypeError("Exceeds length limit");e=e.toLowerCase();for(var i=u(e),o=e+"1",s=0;s<t.length;++s){var l=t[s];if(l>>5!=0)throw new Error("Non 5-bit word");i=a(i)^l,o+=r.charAt(l)}for(s=0;s<6;++s)i=a(i);for(i^=1,s=0;s<6;++s){var c=i>>5*(5-s)&31;o+=r.charAt(c)}return o}function c(e,t){if(t=t||90,e.length<8)throw new TypeError(e+" too short");if(e.length>t)throw new TypeError("Exceeds length limit");var n=e.toLowerCase(),r=e.toUpperCase();if(e!==n&&e!==r)throw new Error("Mixed-case string "+e);e=n;var o=e.lastIndexOf("1");if(-1===o)throw new Error("No separator character for "+e);if(0===o)throw new Error("Missing prefix for "+e);var s=e.slice(0,o),l=e.slice(o+1);if(l.length<6)throw new Error("Data too short");for(var c=u(s),f=[],h=0;h<l.length;++h){var p=l.charAt(h),d=i[p];if(void 0===d)throw new Error("Unknown character "+p);c=a(c)^d,h+6>=l.length||f.push(d)}if(1!==c)throw new Error("Invalid checksum for "+e);return{prefix:s,words:f}}function f(e,t,n,r){for(var i=0,o=0,s=(1<<n)-1,a=[],u=0;u<e.length;++u)for(i=i<<t|e[u],o+=t;o>=n;)o-=n,a.push(i>>o&s);if(r)o>0&&a.push(i<<n-o&s);else{if(o>=t)throw new Error("Excess padding");if(i<<n-o&s)throw new Error("Non-zero padding")}return a}function h(e){return f(e,8,5,!0)}function p(e){return f(e,5,8,!1)}e.exports={decode:c,encode:l,toWords:h,fromWords:p}},function(e,t,n){const r=n(1361),i=n(1362),o=n(1363),s=n(1364),a=n(1365),u=n(1366),l=n(1367);e.exports={embed:r,p2ms:i,p2pk:o,p2pkh:s,p2sh:a,p2wpkh:u,p2wsh:l}},function(e,t,n){e.exports={input:n(1369),output:n(1370)}},function(e,t,n){e.exports={input:n(1372),output:n(1373)}},function(e,t,n){e.exports={input:n(1374),output:n(1375)}},function(e,t,n){"use strict";(function(t){const r=n(56),i=n(11),o=n(217),s=n(192),a=n(1418),u=n(193),l=n(194),c=n(1419),f=n(589),h=n(588),p=n(590);function d(e,n){const c=l(e,a,f);return c.util.deserialize=o(e=>{const t=s.decode(e),n=new a(t);return n}),c;function f(e,o,s){h(e,o,(e,a)=>{if(e)return s(e);if(!n)return s(null,a);let u=a.slice();const l=a.filter(e=>t.isBuffer(e.value));r(l,(e,t)=>i([t=>n.util.deserialize(e.value,t),(e,t)=>n.resolver._mapFromEthObject(e,o,t)],(n,r)=>{if(n)return t(n);r.forEach(t=>{u.push({path:e.path+"/"+t.path,value:t.value})}),t()}),e=>{if(e)return s(e);s(null,u)})})}function h(t,n,i){let o=[];"leaf"===t.type&&o.push({path:m(t.getKey()),value:t.getValue()}),r(t.getChildren(),(t,r)=>{const i=m(t[0]),s=t[1];if(a.isRawNode(s)){const e=new a(s);o.push({path:i,value:e}),h(e,n,(e,t)=>{if(e)return r(e);t.forEach(e=>{e.path=i+"/"+e.path}),o=o.concat(t),r()})}else{let t={"/":u(e,s).toBaseEncodedString()};o.push({path:i,value:t}),r()}},e=>{if(e)return i(e);i(null,o)})}}function m(e){return e.map(e=>e.toString(16)).join("/")}e.exports=d}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(596),i=(e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),r.deserialize(e,(e,r)=>{if(e)return n(e);if(!t)return n(null,{value:r,remainderPath:""});const i=t.split("/"),o=s(r,i[0]);if(null===o)return n(new Error("No such path"),null);let a=i.slice(1).join("/");return void 0!==o["/"]?n(null,{value:o,remainderPath:a}):a.length>0?n(new Error("No such path"),null):n(null,{value:o,remainderPath:""})})},o=(e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),t=t||{},r.deserialize(e,(e,r)=>{if(e)return n(e);const i=["version","timestamp","difficulty","nonce","solution","reserved","parent","tx"];if(!0===t.values){const e={};for(let t of i)e[t]=s(r,t);return n(null,e)}return n(null,i)})},s=(e,t)=>{switch(t){case"version":return e.version;case"timestamp":return e.time;case"difficulty":return e.bits;case"nonce":return e.nonce;case"solution":return e.solution;case"reserved":return e.reserved;case"parent":return{"/":r.hashToCid(e.prevHash)};case"tx":return{"/":r.hashToCid(e.merkleRoot)};default:return null}};e.exports={multicodec:"zcash-block",defaultHashAlg:"dbl-sha2-256",resolve:i,tree:o}},function(e,t){"function"==typeof Object.create?e.exports=function e(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function e(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(30),s=n(41);function a(e){if(!(this instanceof a))return new a(e);var t;if(r.isNumber(e))t=e;else{if(!r.isString(e))throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');t=a.map[e]}return s.defineImmutable(this,{num:t}),this}for(var u in a.fromBuffer=function(e){return i.checkArgument(o.isBuffer(e)),new a(Number("0x"+e.toString("hex")))},a.fromNumber=function(e){return i.checkArgument(r.isNumber(e)),new a(e)},a.fromString=function(e){i.checkArgument(r.isString(e));var t=a.map[e];if(void 0===t)throw new TypeError("Invalid opcodestr");return new a(t)},a.prototype.toHex=function(){return this.num.toString(16)},a.prototype.toBuffer=function(){return new t(this.toHex(),"hex")},a.prototype.toNumber=function(){return this.num},a.prototype.toString=function(){var e=a.reverseMap[this.num];if(void 0===e)throw new Error("Opcode does not have a string representation");return e},a.smallInt=function(e){return i.checkArgument(r.isNumber(e),"Invalid Argument: n should be number"),i.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),0===e?a("OP_0"):new a(a.map.OP_1+e-1)},a.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},a.reverseMap=[],a.map)a.reverseMap[a.map[u]]=u;r.extend(a,a.map),a.isSmallIntOp=function(e){return e instanceof a&&(e=e.toNumber()),e===a.map.OP_0||e>=a.map.OP_1&&e<=a.map.OP_16},a.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"},e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(0),s=t.compare||n(1447),a=n(84),u=n(30),l=n(41),c=n(109),f=n(80),h=n(60),p=n(85),d=n(110),m=n(129),g=n(601),y=n(360),b=y.PublicKeyHash,v=y.PublicKey,w=y.MultiSigScriptHash,_=y.MultiSig,k=n(111),S=n(86),E=n(273),x=n(49),C=n(1452);function A(e){if(!(this instanceof A))return new A(e);if(this.inputs=[],this.outputs=[],this.joinSplits=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof A)return A.shallowCopy(e);if(l.isHexa(e))this.fromString(e);else if(u.isBuffer(e))this.fromBuffer(e);else{if(!r.isObject(e))throw new a.InvalidArgument("Must provide an object or string to deserialize a transaction");this.fromObject(e)}}else this._newTransaction()}var I=1,T=0,j=1e6;A.DUST_AMOUNT=546,A.FEE_SECURITY_MARGIN=15,A.MAX_MONEY=21e14,A.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8,A.NLOCKTIME_MAX_VALUE=4294967295,A.FEE_PER_KB=1e4,A.CHANGE_OUTPUT_MAX_SIZE=62,A.MAXIMUM_EXTRA_SIZE=26,A.shallowCopy=function(e){var t=new A(e.toBuffer());return t};var O={configurable:!1,enumerable:!0,get:function(){return new c(this._getHash()).readReverse().toString("hex")}};Object.defineProperty(A.prototype,"hash",O),Object.defineProperty(A.prototype,"id",O);var P={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(A.prototype,"inputAmount",P),P.get=function(){return this._getOutputAmount()},Object.defineProperty(A.prototype,"outputAmount",P),A.prototype._getHash=function(){return h.sha256sha256(this.toBuffer())},A.prototype.serialize=function(e){return!0===e||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)},A.prototype.uncheckedSerialize=A.prototype.toString=function(){return this.toBuffer().toString("hex")},A.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" Use Transaction#uncheckedSerialize if you want to skip security checks. See http://bitcore.io/guide/transaction.html#Serialization for more info.",t;return this.uncheckedSerialize()},A.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e},A.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new a.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),n;return t<0?e.disableMoreOutputThanInput||(n=new a.Transaction.InvalidOutputAmountSum):n=this._hasFeeError(e,t),n||this._hasDustOutputs(e)||this._isMissingSignatures(e)},A.prototype._hasFeeError=function(e,t){if(!r.isUndefined(this._fee)&&this._fee!==t)return new a.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var n=Math.floor(A.FEE_SECURITY_MARGIN*this._estimateFee());if(t>n)return this._missingChange()?new a.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new a.Transaction.FeeError.TooLarge("expected less than "+n+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/A.FEE_SECURITY_MARGIN);if(t<i)return new a.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}},A.prototype._missingChange=function(){return!this._changeScript},A.prototype._hasDustOutputs=function(e){var t,n;if(!e.disableDustOutputs)for(t in this.outputs)if(n=this.outputs[t],n.satoshis<A.DUST_AMOUNT&&!n.script.isDataOut())return new a.Transaction.DustOutputs},A.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned)return this.isFullySigned()?void 0:new a.Transaction.MissingSignatures},A.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"},A.prototype.toBuffer=function(){var e=new f;return this.toBufferWriter(e).toBuffer()},A.prototype.toBufferWriter=function(e){return e.writeUInt32LE(this.version),e.writeVarintNum(this.inputs.length),r.each(this.inputs,function(t){t.toBufferWriter(e)}),e.writeVarintNum(this.outputs.length),r.each(this.outputs,function(t){t.toBufferWriter(e)}),e.writeUInt32LE(this.nLockTime),this.version>=2&&(e.writeVarintNum(this.joinSplits.length),r.each(this.joinSplits,function(t){t.toBufferWriter(e)}),this.joinSplits.length>0&&(e.write(this.joinSplitPubKey),e.write(this.joinSplitSig))),e},A.prototype.fromBuffer=function(e){var t=new c(e);return this.fromBufferReader(t)},A.prototype.fromBufferReader=function(e){var t,n,r,o;for(i.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readUInt32LE(),n=e.readVarintNum(),t=0;t<n;t++){var s=y.fromBufferReader(e);this.inputs.push(s)}for(r=e.readVarintNum(),t=0;t<r;t++)this.outputs.push(k.fromBufferReader(e));if(this.nLockTime=e.readUInt32LE(),this.version>=2){for(o=e.readVarintNum(),t=0;t<o;t++)this.joinSplits.push(C.fromBufferReader(e));o>0&&(this.joinSplitPubKey=e.read(32),this.joinSplitSig=e.read(64))}return this},A.prototype.toObject=A.prototype.toJSON=function e(){var t=[];this.inputs.forEach(function(e){t.push(e.toObject())});var n=[];this.outputs.forEach(function(e){n.push(e.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:n,nLockTime:this.nLockTime};if(this.version>=2){var o=[];this.joinSplits.forEach(function(e){o.push(e.toObject())}),i.joinSplits=o,this.joinSplits.length>0&&(i.joinSplitPubKey=u.reverse(this.joinSplitPubKey).toString("hex"),i.joinSplitSig=this.joinSplitSig.toString("hex"))}return this._changeScript&&(i.changeScript=this._changeScript.toString()),r.isUndefined(this._changeIndex)||(i.changeIndex=this._changeIndex),r.isUndefined(this._fee)||(i.fee=this._fee),i},A.prototype.fromObject=function e(n){i.checkArgument(r.isObject(n)||n instanceof A);var o=this,s;return s=n instanceof A?s.toObject():n,r.each(s.inputs,function(e){if(e.output&&e.output.script){var t=new S(e.output.script),n;if(t.isPublicKeyHashOut())n=new y.PublicKeyHash(e);else if(t.isScriptHashOut()&&e.publicKeys&&e.threshold)n=new y.MultiSigScriptHash(e,e.publicKeys,e.threshold,e.signatures);else{if(!t.isPublicKeyOut())throw new a.Transaction.Input.UnsupportedScript(e.output.script);n=new y.PublicKey(e)}o.addInput(n)}else o.uncheckedAddInput(new y(e))}),r.each(s.outputs,function(e){o.addOutput(new k(e))}),s.changeIndex&&(this._changeIndex=s.changeIndex),s.changeScript&&(this._changeScript=new S(s.changeScript)),s.fee&&(this._fee=s.fee),this.nLockTime=s.nLockTime,this.version=s.version,this.version>=2&&(r.each(s.joinSplits,function(e){o.joinSplits.push(new C(e))}),o.joinSplits.length>0&&(o.joinSplitPubKey=u.reverse(new t(s.joinSplitPubKey,"hex")),o.joinSplitSig=new t(s.joinSplitSig,"hex"))),this._checkConsistency(n),this},A.prototype._checkConsistency=function(e){r.isUndefined(this._changeIndex)||(i.checkState(this._changeScript),i.checkState(this.outputs[this._changeIndex]),i.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString())),e&&e.hash&&i.checkState(e.hash===this.hash,"Hash in object does not match transaction hash")},A.prototype.lockUntilDate=function(e){if(i.checkArgument(e),r.isNumber(e)&&e<A.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new a.Transaction.LockTimeTooEarly;r.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===y.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=y.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this},A.prototype.lockUntilBlockHeight=function(e){if(i.checkArgument(r.isNumber(e)),e>=A.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new a.Transaction.BlockHeightTooHigh;if(e<0)throw new a.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===y.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=y.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this},A.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<A.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null},A.prototype.fromString=function(e){this.fromBuffer(new o.Buffer(e,"hex"))},A.prototype._newTransaction=function(){this.version=1,this.nLockTime=0},A.prototype.from=function(e,t,n){if(r.isArray(e)){var i=this;return r.each(e,function(e){i.from(e,t,n)}),this}var o=r.any(this.inputs,function(t){return t.prevTxId.toString("hex")===e.txId&&t.outputIndex===e.outputIndex});return o?this:(t&&n?this._fromMultisigUtxo(e,t,n):this._fromNonP2SH(e),this)},A.prototype._fromNonP2SH=function(e){var t;e=new g(e),t=e.script.isPublicKeyHashOut()?b:e.script.isPublicKeyOut()?v:y,this.addInput(new t({output:new k({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:S.empty()}))},A.prototype._fromMultisigUtxo=function(e,t,n){var r;if(i.checkArgument(n<=t.length,"Number of required signatures must be greater than the number of public keys"),e=new g(e),e.script.isMultisigOut())r=_;else{if(!e.script.isScriptHashOut())throw new Error("@TODO");r=w}this.addInput(new r({output:new k({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:S.empty()},t,n))},A.prototype.addInput=function(e,t,n){if(i.checkArgumentType(e,y,"input"),!e.output&&(r.isUndefined(t)||r.isUndefined(n)))throw new a.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return e.output||!t||r.isUndefined(n)||(t=t instanceof S?t:new S(t),i.checkArgumentType(n,"number","satoshis"),e.output=new k({script:t,satoshis:n})),this.uncheckedAddInput(e)},A.prototype.uncheckedAddInput=function(e){return i.checkArgumentType(e,y,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this},A.prototype.hasAllUtxoInfo=function(){return r.all(this.inputs.map(function(e){return!!e.output}))},A.prototype.fee=function(e){return i.checkArgument(r.isNumber(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this},A.prototype.feePerKb=function(e){return i.checkArgument(r.isNumber(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this},A.prototype.change=function(e){return i.checkArgument(e,"address is required"),this._changeScript=S.fromAddress(e),this._updateChangeOutput(),this},A.prototype.getChangeOutput=function(){return r.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]},A.prototype.to=function(e,t){if(r.isArray(e)){var n=this;return r.each(e,function(e){n.to(e.address,e.satoshis)}),this}return i.checkArgument(l.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new k({script:S(new m(e)),satoshis:t})),this},A.prototype.addData=function(e){return this.addOutput(new k({script:S.buildDataOut(e),satoshis:0})),this},A.prototype.addOutput=function(e){return i.checkArgumentType(e,k,"output"),this._addOutput(e),this._updateChangeOutput(),this},A.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this},A.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0},A.prototype._getOutputAmount=function(){if(r.isUndefined(this._outputAmount)){var e=this;this._outputAmount=0,r.each(this.outputs,function(t){e._outputAmount+=t.satoshis})}return this._outputAmount},A.prototype._getInputAmount=function(){if(r.isUndefined(this._inputAmount)){var e=this;this._inputAmount=0,r.each(this.inputs,function(t){if(r.isUndefined(t.output))throw new a.Transaction.Input.MissingPreviousOutput;e._inputAmount+=t.output.satoshis})}return this._inputAmount},A.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),r.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex);var e=this._getUnspentValue(),t=this.getFee(),n=e-t;n>0?(this._changeIndex=this.outputs.length,this._addOutput(new k({script:this._changeScript,satoshis:n}))):this._changeIndex=void 0}},A.prototype.getFee=function(){return this.isCoinbase()?0:r.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},A.prototype._estimateFee=function(){var e=this._estimateSize(),t=this._getUnspentValue();return A._estimateFee(e,t,this._feePerKb)},A.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},A.prototype._clearSignatures=function(){r.each(this.inputs,function(e){e.clearSignatures()})},A._estimateFee=function(e,t,n){var r=Math.ceil(e/1e3)*(n||A.FEE_PER_KB);return t>r&&(e+=A.CHANGE_OUTPUT_MAX_SIZE),Math.ceil(e/1e3)*(n||A.FEE_PER_KB)},A.prototype._estimateSize=function(){var e=A.MAXIMUM_EXTRA_SIZE;return r.each(this.inputs,function(t){e+=t._estimateSize()}),r.each(this.outputs,function(t){e+=t.script.toBuffer().length+9}),e},A.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=r.without(this.outputs,t),this._outputAmount=void 0},A.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()},A.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return s(e.prevTxId,t.prevTxId)||e.outputIndex-t.outputIndex}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return e.satoshis-t.satoshis||s(e.script.toBuffer(),t.script.toBuffer())}),t}),this},A.prototype.shuffleOutputs=function(){return this.sortOutputs(r.shuffle)},A.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)},A.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this},A.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||0!==r.difference(this.outputs,e).length;if(t)throw new a.Transaction.InvalidSorting;if(!r.isUndefined(this._changeIndex)){var n=this.outputs[this._changeIndex];this._changeIndex=r.findIndex(e,n)}return this.outputs=e,this},A.prototype.removeInput=function(e,t){var n;if(n=!t&&r.isNumber(e)?e:r.findIndex(this.inputs,function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),n<0||n>=this.inputs.length)throw new a.Transaction.InvalidIndex(n,this.inputs.length);var i=this.inputs[n];this.inputs=r.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()},A.prototype.sign=function(e,t){i.checkState(this.hasAllUtxoInfo());var n=this;return r.isArray(e)?(r.each(e,function(e){n.sign(e,t)}),this):(r.each(this.getSignatures(e,t),function(e){n.applySignature(e)}),this)},A.prototype.getSignatures=function(e,t){e=new E(e),t=t||p.SIGHASH_ALL;var n=this,i=[],o=h.sha256ripemd160(e.publicKey.toBuffer());return r.each(this.inputs,function s(a,u){r.each(a.getSignatures(n,e,u,t,o),function(e){i.push(e)})}),i},A.prototype.applySignature=function(e){return this.inputs[e.inputIndex].addSignature(this,e),this},A.prototype.isFullySigned=function(){return r.each(this.inputs,function(e){if(e.isFullySigned===y.prototype.isFullySigned)throw new a.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),r.all(r.map(this.inputs,function(e){return e.isFullySigned()}))},A.prototype.isValidSignature=function(e){var t=this;if(this.inputs[e.inputIndex].isValidSignature===y.prototype.isValidSignature)throw new a.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e)},A.prototype.verifySignature=function(e,t,n,r){return d.verify(this,e,t,n,r)},A.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var e=new x(0),t=0;t<this.outputs.length;t++){var n=this.outputs[t];if(n.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(n._satoshisBN.gt(new x(A.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(n._satoshisBN),e.gt(new x(A.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>1e6)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var o=this.inputs[t],s=o.prevTxId+":"+o.outputIndex;if(!r.isUndefined(i[s]))return"transaction input "+t+" duplicate input";i[s]=!0}var a=this.isCoinbase();if(a){var u=this.inputs[0]._scriptBuffer;if(u.length<2||u.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0},A.prototype.isCoinbase=function(){return 1===this.inputs.length&&this.inputs[0].isNull()},A.prototype.isRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];if(t.sequenceNumber<y.MAXINT-1)return!0}return!1},A.prototype.enableRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];t.sequenceNumber>=y.MAXINT-1&&(t.sequenceNumber=y.DEFAULT_RBF_SEQNUMBER)}return this},e.exports=A}).call(this,n(0).Buffer)},function(e,t,n){e.exports=n(196),e.exports.PublicKey=n(1448),e.exports.PublicKeyHash=n(1449),e.exports.MultiSig=n(1450),e.exports.MultiSigScriptHash=n(1451)},function(e,t,n){"use strict";var r=n(17),i=n(84),o=n(25),s={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function a(e,t){if(!(this instanceof a))return new a(e,t);if(r.isNumber(t)){if(t<=0)throw new i.Unit.InvalidRate(t);e/=t,t=a.BTC}this._value=this._from(e,t);var n=this,o=function(e){Object.defineProperty(n,e,{get:function(){return n.to(e)},enumerable:!0})};Object.keys(s).forEach(o)}Object.keys(s).forEach(function(e){a[e]=e}),a.fromObject=function e(t){return o.checkArgument(r.isObject(t),"Argument is expected to be an object"),new a(t.amount,t.code)},a.fromBTC=function(e){return new a(e,a.BTC)},a.fromMillis=a.fromMilis=function(e){return new a(e,a.mBTC)},a.fromMicros=a.fromBits=function(e){return new a(e,a.bits)},a.fromSatoshis=function(e){return new a(e,a.satoshis)},a.fromFiat=function(e,t){return new a(e,t)},a.prototype._from=function(e,t){if(!s[t])throw new i.Unit.UnknownCode(t);return parseInt((e*s[t][0]).toFixed())},a.prototype.to=function(e){if(r.isNumber(e)){if(e<=0)throw new i.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!s[e])throw new i.Unit.UnknownCode(e);var t=this._value/s[e][0];return parseFloat(t.toFixed(s[e][1]))},a.prototype.toBTC=function(){return this.to(a.BTC)},a.prototype.toMillis=a.prototype.toMilis=function(){return this.to(a.mBTC)},a.prototype.toMicros=a.prototype.toBits=function(){return this.to(a.bits)},a.prototype.toSatoshis=function(){return this.to(a.satoshis)},a.prototype.atRate=function(e){return this.to(e)},a.prototype.toString=function(){return this.satoshis+" satoshis"},a.prototype.toObject=a.prototype.toJSON=function e(){return{amount:this.BTC,code:a.BTC}},a.prototype.inspect=function(){return"<Unit: "+this.toString()+">"},e.exports=a},function(e,t,n){"use strict";e.exports={_cache:{},_count:0,_eraseIndex:0,_usedList:{},_usedIndex:{},_CACHE_SIZE:5e3,get:function(e,t,n){n=!!n;var r=e+"/"+t+"/"+n;if(this._cache[r])return this._cacheHit(r),this._cache[r]},set:function(e,t,n,r){n=!!n;var i=e+"/"+t+"/"+n;this._cache[i]=r,this._cacheHit(i)},_cacheHit:function(e){this._usedIndex[e]&&delete this._usedList[this._usedIndex[e]],this._usedList[this._count]=e,this._usedIndex[e]=this._count,this._count++,this._cacheRemove()},_cacheRemove:function(){for(;this._eraseIndex<this._count-this._CACHE_SIZE;){if(this._usedList[this._eraseIndex]){var e=this._usedList[this._eraseIndex];delete this._usedIndex[e],delete this._cache[e]}delete this._usedList[this._eraseIndex],this._eraseIndex++}}}},function(e,t,n){"use strict";const r=n(28),i=n(199),o=n(200);e.exports=((e,t)=>{const n=o(e,t);return(e,t,o)=>{const s=r(o),a=n(t),u=i(e=>s(null,e));a.once("error",s),a.pipe(u),a.write(e),a.end()}})},function(e,t,n){"use strict";const r=n(59),i=n(1488),o=n(20).Readable;class s extends o{constructor(e){const t=Object.assign(e||{},{objectMode:!0});super(t)}_read(){}}const a=(e,t)=>{let n=new s,o=i.extract();o.on("entry",(e,t,r)=>{t.on("end",r),"directory"!==e.type?n.push({path:e.name,content:t}):(n.push({path:e.name}),t.resume())}).on("finish",()=>n.push(null)),r(e,o),t(null,n)};e.exports=a},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function e(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(i(r)){for(var o=[],s=0;s<r.length;++s)void 0!==r[s]&&o.push(r[s]);n.obj[n.prop]=o}}},a=function e(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)void 0!==t[i]&&(r[i]=t[i]);return r},u=function e(t,n,o){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return i(t)&&!i(n)&&(s=a(t,o)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var s=t[i];s&&"object"==typeof s&&n&&"object"==typeof n?t[i]=e(s,n,o):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var s=n[i];return r.call(t,i)?t[i]=e(t[i],s,o):t[i]=s,t},s)},l=function e(t,n){return Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},t)},c=function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},f=function e(t,n,r){if(0===t.length)return t;var i="string"==typeof t?t:String(t);if("iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var s="",a=0;a<i.length;++a){var u=i.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?s+=i.charAt(a):u<128?s+=o[u]:u<2048?s+=o[192|u>>6]+o[128|63&u]:u<55296||u>=57344?s+=o[224|u>>12]+o[128|u>>6&63]+o[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(a)),s+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|63&u])}return s},h=function e(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var o=n[i],a=o.obj[o.prop],u=Object.keys(a),l=0;l<u.length;++l){var c=u[l],f=a[c];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(n.push({obj:a,prop:c}),r.push(f))}return s(n),t},p=function e(t){return"[object RegExp]"===Object.prototype.toString.call(t)},d=function e(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},m=function e(t,n){return[].concat(t,n)};e.exports={arrayToObject:a,assign:l,combine:m,compact:h,decode:c,encode:f,isBuffer:d,isRegExp:p,merge:u}},function(e,t,n){var r=n(636),i=n(1519),o=n(226).EOL,s=n(642);function a(e){function t(t){try{if(t)return JSON.parse(t)}catch(n){e.strict&&this.emit("error",new Error("Could not parse row "+t.slice(0,50)+"..."))}}return e=e||{},e.strict=!1!==e.strict,i(t,e)}function u(e){return r.obj(e,function(e,t,n){n(null,s(e)+o)})}e.exports=a,e.exports.serialize=e.exports.stringify=u,e.exports.parse=a},function(e,t,n){"use strict";const r=n(1535),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),l=Symbol("dispose"),c=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=()=>1;class m{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||1/0,n=e.length||d;if(this[s]="function"!=typeof n?d:n,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[l]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[o]=0,this[f].forEach(e=>{e.length=this[s](e.value,e.key),this[o]+=e.length})),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;_(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;_(this,e,n,t),n=r}}keys(){return this[f].toArray().map(e=>e.key)}values(){return this[f].toArray().map(e=>e.value)}reset(){this[l]&&this[f]&&this[f].length&&this[f].forEach(e=>this[l](e.key,e.value)),this[h]=new Map,this[f]=new r,this[o]=0}dump(){return this[f].map(e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[f]}set(e,t,n){if(n=n||this[u],n&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[i])return v(this,this[h].get(e)),!1;const s=this[h].get(e),u=s.value;return this[l]&&(this[c]||this[l](e,u.value)),u.now=r,u.maxAge=n,u.value=t,this[o]+=a-u.length,u.length=a,this.get(e),b(this),!0}const p=new w(e,t,a,r,n);return p.length>this[i]?(this[l]&&this[l](e,t),!1):(this[o]+=p.length,this[f].unshift(p),this[h].set(e,this[f].head),b(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[h].forEach((e,t)=>g(this,t,!1))}}const g=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(y(e,t)){if(v(e,r),!e[a])return}else n&&(e[p]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},b=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[l]&&e[l](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[f].removeNode(t)}};class w{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const _=(e,t,n,r)=>{let i=n.value;y(e,i)&&(v(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=m},function(e,t,n){"use strict";const r=n(112);function i(e,t,n){"function"==typeof e.pipe?r(e,(e,r)=>{if(e)return n(e);t(r,n)}):t(e,n)}e.exports=i},function(e,t,n){"use strict";const r=n(20).Transform,i=n(1569);class o extends r{constructor(e){const t=Object.assign(e||{},{objectMode:!0});super(t)}_transform(e,t,n){try{const t=i(e);if(this.push(t),!t.success)throw new Error(t.text)}catch(e){return n(e)}n()}}e.exports=o},function(e,t,n){"use strict";const r=n(62);e.exports=(e=>({totalIn:new r(e.TotalIn),totalOut:new r(e.TotalOut),rateIn:new r(e.RateIn),rateOut:new r(e.RateOut)}))},function(e,t,n){(function(t){e.exports=f;const r=n(655),i=n(1754),o=n(154),s=n(202),a=n(28),u=n(169),l=n(32),c=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function f(e,n){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),n=a(n),e.url){const{hostname:t,port:n,protocol:r,auth:i,path:o}=l.parse(e.url);delete e.url,t||n||r||i?Object.assign(e,{hostname:t,port:n,protocol:r,auth:i,path:o}):e.path=o}const r={"accept-encoding":"gzip, deflate"};let h;e.headers&&Object.keys(e.headers).forEach(t=>r[t.toLowerCase()]=e.headers[t]),e.headers=r,e.body?h=e.json&&!c(e.body)?JSON.stringify(e.body):e.body:e.form&&(h="string"==typeof e.form?e.form:u.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),h&&(e.method||(e.method="POST"),c(h)||(e.headers["content-length"]=t.byteLength(h)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const p="https:"===e.protocol?s:o,d=p.request(e,t=>{if(t.statusCode>=300&&t.statusCode<400&&t.headers.location)return e.url=t.headers.location,delete e.headers.host,t.resume(),"POST"===e.method&&[301,302].includes(t.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?n(new Error("too many redirects")):f(e,n);const r="function"==typeof i&&"HEAD"!==e.method;n(null,r?i(t):t)});return d.on("timeout",()=>{d.abort(),n(new Error("Request timed out"))}),d.on("error",n),c(h)?h.on("error",n).pipe(d):d.end(h),d}f.concat=((e,t)=>f(e,(n,i)=>{if(n)return t(n);r(i,(n,r)=>{if(n)return t(n);if(e.json)try{r=JSON.parse(r.toString())}catch(n){return t(n,i,r)}t(null,i,r)})})),["get","post","put","patch","head","delete"].forEach(e=>{f[e]=((t,n)=>("string"==typeof t&&(t={url:t}),f(Object.assign({method:e.toUpperCase()},t),n)))})}).call(this,n(0).Buffer)},function(e,t){var n=1,r=65535,i=4,o,s=function(){n=n+1&65535};e.exports=function(e){o||(o=setInterval(s,250),o.unref&&o.unref());var t=4*(e||5),r=[0],i=1,a=n-1&65535;return function(e){var o=n-a&65535;for(o>t&&(o=t),a=n;o--;)i===t&&(i=0),r[i]=r[0===i?t-1:i-1],i++;e&&(r[i-1]+=e);var s=r[i-1],u=r.length<t?0:r[i===t?0:i];return r.length<4?s:4*(s-u)/r.length}}},function(e){e.exports={name:"webtorrent",description:"Streaming torrent client",version:"0.103.1",author:{name:"WebTorrent, LLC",email:"feross@webtorrent.io",url:"https://webtorrent.io"},browser:{"./lib/server.js":!1,"./lib/tcp-pool.js":!1,"bittorrent-dht/client":!1,"fs-chunk-store":"memory-chunk-store","load-ip-set":!1,net:!1,os:!1,ut_pex:!1},browserify:{transform:["package-json-versionify"]},bugs:{url:"https://github.com/webtorrent/webtorrent/issues"},dependencies:{"addr-to-ip-port":"^1.4.2",bitfield:"^2.0.0","bittorrent-dht":"^9.0.0","bittorrent-protocol":"^3.0.0","chunk-store-stream":"^3.0.1","create-torrent":"^3.33.0",debug:"^4.1.0","end-of-stream":"^1.1.0","fs-chunk-store":"^1.6.2","immediate-chunk-store":"^2.0.0","load-ip-set":"^2.1.0","memory-chunk-store":"^1.2.0",mime:"^2.4.0",multistream:"^2.0.5","package-json-versionify":"^1.0.2","parse-numeric-range":"^0.0.2","parse-torrent":"^6.1.2",pump:"^3.0.0","random-iterate":"^1.0.1",randombytes:"^2.0.3","range-parser":"^1.2.0","readable-stream":"^3.0.6","render-media":"^3.0.0","run-parallel":"^1.1.6","run-parallel-limit":"^1.0.3","safe-buffer":"^5.0.1","simple-concat":"^1.0.0","simple-get":"^3.0.1","simple-peer":"^9.0.0","simple-sha1":"^2.0.8",speedometer:"^1.0.0","stream-to-blob":"^1.0.0","stream-to-blob-url":"^2.1.0","stream-with-known-length-to-buffer":"^1.0.0","torrent-discovery":"^9.1.1","torrent-piece":"^2.0.0",uniq:"^1.0.1","unordered-array-remove":"^1.0.2",ut_metadata:"^3.3.0",ut_pex:"^1.1.1"},devDependencies:{airtap:"2.0.2","babel-minify":"^0.5.0","bittorrent-tracker":"^9.4.0",brfs:"^2.0.0",browserify:"^16.2.3","cross-spawn":"^6.0.3",electron:"^4.0.0",finalhandler:"^1.0.0","network-address":"^1.1.0","run-series":"^1.1.4","serve-static":"^1.11.1",standard:"*",tape:"^4.6.0","webtorrent-fixtures":"^1.5.0"},engines:{node:">=4"},homepage:"https://webtorrent.io",keywords:["bittorrent","bittorrent client","download","mad science","p2p","peer-to-peer","peers","streaming","swarm","torrent","web torrent","webrtc","webrtc data","webtorrent"],license:"MIT",main:"index.js",repository:{type:"git",url:"git://github.com/webtorrent/webtorrent.git"},scripts:{build:"browserify -s WebTorrent -e ./ | minify > webtorrent.min.js","build-debug":"browserify -s WebTorrent -e ./ > webtorrent.debug.js",size:"npm run build && cat webtorrent.min.js | gzip | wc -c",test:"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js test/browser/*.js","test-browser-local":"airtap --local -- test/*.js test/browser/*.js","test-node":"tape test/*.js test/node/*.js","update-authors":"./scripts/update-authors.sh"}}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function e(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},u=function e(t){if(!t||"[object Object]"!==i.call(t))return!1;var n=r.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&r.call(t.constructor.prototype,"isPrototypeOf"),s;if(t.constructor&&!n&&!o)return!1;for(s in t);return void 0===s||r.call(t,s)},l=function e(t,n){o&&"__proto__"===n.name?o(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},c=function e(t,n){if("__proto__"===n){if(!r.call(t,n))return;if(s)return s(t,n).value}return t[n]};e.exports=function e(){var t,n,r,i,o,s,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h<p;++h)if(t=arguments[h],null!=t)for(n in t)r=c(f,n),i=c(t,n),f!==i&&(d&&i&&(u(i)||(o=a(i)))?(o?(o=!1,s=r&&a(r)?r:[]):s=r&&u(r)?r:{},l(f,{name:n,newValue:e(d,s,i)})):void 0!==i&&l(f,{name:n,newValue:i}));return f}},function(e,t,n){"use strict";(function(e){var r=n(642),i=n(15),o=n(4).Buffer,s="undefined"==typeof setImmediate?e.nextTick:setImmediate;function a(e){return e.body||e.requestBodyStream||e.json&&"boolean"!=typeof e.json||e.multipart}function u(e,t){var n;try{n=JSON.stringify(e,t)}catch(i){n=r(e,t)}return n}function l(e){return i.createHash("md5").update(e).digest("hex")}function c(e){return e.readable&&e.path&&e.mode}function f(e){return o.from(e||"","utf8").toString("base64")}function h(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function p(){var t=e.version.replace("v","").split(".");return{major:parseInt(t[0],10),minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}t.paramsHaveRequestBody=a,t.safeStringify=u,t.md5=l,t.isReadStream=c,t.toBase64=f,t.copy=h,t.version=p,t.defer=s}).call(this,n(2))},function(e,t,n){var r=n(46),i=n(206),o=n(102),s=n(50),a=n(211),u=n(212),l=n(96);e.exports={Key:r,parseKey:r.parse,Fingerprint:i,parseFingerprint:i.parse,Signature:o,parseSignature:o.parse,PrivateKey:s,parsePrivateKey:s.parse,generatePrivateKey:s.generate,Certificate:a,parseCertificate:a.parse,createSelfSignedCertificate:a.createSelfSigned,createCertificate:a.create,Identity:u,identityFromDN:u.parseDN,identityForHost:u.forHost,identityForUser:u.forUser,identityForEmail:u.forEmail,identityFromArray:u.fromArray,FingerprintFormatError:l.FingerprintFormatError,InvalidAlgorithmError:l.InvalidAlgorithmError,KeyParseError:l.KeyParseError,SignatureParseError:l.SignatureParseError,KeyEncryptedError:l.KeyEncryptedError,CertificateParseError:l.CertificateParseError}},function(e,t){e.exports={newInvalidAsn1Error:function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t}}},function(e,t){e.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},function(e,t,n){e.exports={DiffieHellman:m,generateECDSA:w,generateED25519:v};var r=n(27),i=n(15),o=n(31).Buffer,s=n(55),a=n(47),u=n(208),l=n(46),c=n(50),f=void 0!==i.createECDH,h=n(1857),p=n(286),d=n(207).BigInteger;function m(e){if(a.assertCompatible(e,l,[1,4],"key"),this._isPriv=c.isPrivateKey(e,[1,3]),this._algo=e.type,this._curve=e.curve,this._key=e,"dsa"===e.type){if(!f)throw new Error("Due to bugs in the node 0.10 crypto API, node 0.12.x or later is required to use DH");this._dh=i.createDiffieHellman(e.part.p.data,void 0,e.part.g.data,void 0),this._p=e.part.p,this._g=e.part.g,this._isPriv&&this._dh.setPrivateKey(e.part.x.data),this._dh.setPublicKey(e.part.y.data)}else if("ecdsa"===e.type){if(!f)return this._ecParams=new g(this._curve),void(this._isPriv&&(this._priv=new b(this._ecParams,e.part.d.data)));var t={nistp256:"prime256v1",nistp384:"secp384r1",nistp521:"secp521r1"}[e.curve];if(this._dh=i.createECDH(t),"object"!=typeof this._dh||"function"!=typeof this._dh.setPrivateKey)return f=!1,void m.call(this,e);this._isPriv&&this._dh.setPrivateKey(e.part.d.data),this._dh.setPublicKey(e.part.Q.data)}else{if("curve25519"!==e.type)throw new Error("DH not supported for "+e.type+" keys");this._isPriv&&(a.assertCompatible(e,c,[1,5],"key"),this._priv=e.part.k.data)}}function g(e){var t=s.curves[e];r.object(t);var n=new d(t.p),i=new d(t.a),o=new d(t.b),a=new d(t.n),u=d.ONE,l=new p.ECCurveFp(n,i,o),c=l.decodePointHex(t.G.toString("hex"));this.curve=l,this.g=c,this.n=a,this.h=u}function y(e,t){this._params=e,0===t[0]&&(t=t.slice(1)),this._pub=e.getCurve().decodePointHex(t.toString("hex"))}function b(e,t){this._params=e,this._priv=new d(a.mpNormalize(t))}function v(){var e=u.sign.keyPair(),t=o.from(e.secretKey),n=o.from(e.publicKey);r.strictEqual(t.length,64),r.strictEqual(n.length,32);var i=[];i.push({name:"A",data:n}),i.push({name:"k",data:t.slice(0,32)});var s=new c({type:"ed25519",parts:i});return s}function w(e){var t=[],n;if(f){var r={nistp256:"prime256v1",nistp384:"secp384r1",nistp521:"secp521r1"}[e],s=i.createECDH(r);return s.generateKeys(),t.push({name:"curve",data:o.from(e)}),t.push({name:"Q",data:s.getPublicKey()}),t.push({name:"d",data:s.getPrivateKey()}),n=new c({type:"ecdsa",curve:e,parts:t}),n}var a=new g(e),u=a.getN(),l=Math.ceil((u.bitLength()+64)/8),h=new d(i.randomBytes(l)),p=u.subtract(d.ONE),m=h.mod(p).add(d.ONE),y=a.getG().multiply(m);return m=o.from(m.toByteArray()),y=o.from(a.getCurve().encodePointHex(y),"hex"),t.push({name:"curve",data:o.from(e)}),t.push({name:"Q",data:y}),t.push({name:"d",data:m}),n=new c({type:"ecdsa",curve:e,parts:t}),n}m.prototype.getPublicKey=function(){return this._isPriv?this._key.toPublic():this._key},m.prototype.getPrivateKey=function(){return this._isPriv?this._key:void 0},m.prototype.getKey=m.prototype.getPrivateKey,m.prototype._keyCheck=function(e,t){if(r.object(e,"key"),t||a.assertCompatible(e,c,[1,3],"key"),a.assertCompatible(e,l,[1,4],"key"),e.type!==this._algo)throw new Error("A "+e.type+" key cannot be used in "+this._algo+" Diffie-Hellman");if(e.curve!==this._curve)throw new Error("A key from the "+e.curve+" curve cannot be used with a "+this._curve+" Diffie-Hellman");"dsa"===e.type&&(r.deepEqual(e.part.p,this._p,"DSA key prime does not match"),r.deepEqual(e.part.g,this._g,"DSA key generator does not match"))},m.prototype.setKey=function(e){if(this._keyCheck(e),"dsa"===e.type)this._dh.setPrivateKey(e.part.x.data),this._dh.setPublicKey(e.part.y.data);else if("ecdsa"===e.type)f?(this._dh.setPrivateKey(e.part.d.data),this._dh.setPublicKey(e.part.Q.data)):this._priv=new b(this._ecParams,e.part.d.data);else if("curve25519"===e.type){var t=e.part.k;e.part.k||(t=e.part.r),this._priv=t.data,0===this._priv[0]&&(this._priv=this._priv.slice(1)),this._priv=this._priv.slice(0,32)}this._key=e,this._isPriv=!0},m.prototype.setPrivateKey=m.prototype.setKey,m.prototype.computeSecret=function(e){if(this._keyCheck(e,!0),!this._isPriv)throw new Error("DH exchange has not been initialized with a private key yet");var t;if("dsa"===this._algo)return this._dh.computeSecret(e.part.y.data);if("ecdsa"===this._algo)return f?this._dh.computeSecret(e.part.Q.data):(t=new y(this._ecParams,e.part.Q.data),this._priv.deriveSharedSecret(t));if("curve25519"===this._algo){for(t=e.part.A.data;0===t[0]&&t.length>32;)t=t.slice(1);var n=this._priv;r.strictEqual(t.length,32),r.strictEqual(n.length,32);var i=u.box.before(new Uint8Array(t),new Uint8Array(n));return o.from(i)}throw new Error("Invalid algorithm: "+this._algo)},m.prototype.generateKey=function(){var e=[],t,n;if("dsa"===this._algo)return this._dh.generateKeys(),e.push({name:"p",data:this._p.data}),e.push({name:"q",data:this._key.part.q.data}),e.push({name:"g",data:this._g.data}),e.push({name:"y",data:this._dh.getPublicKey()}),e.push({name:"x",data:this._dh.getPrivateKey()}),this._key=new c({type:"dsa",parts:e}),this._isPriv=!0,this._key;if("ecdsa"===this._algo){if(f)return this._dh.generateKeys(),e.push({name:"curve",data:o.from(this._curve)}),e.push({name:"Q",data:this._dh.getPublicKey()}),e.push({name:"d",data:this._dh.getPrivateKey()}),this._key=new c({type:"ecdsa",curve:this._curve,parts:e}),this._isPriv=!0,this._key;var s=this._ecParams.getN(),a=new d(i.randomBytes(s.bitLength())),l=s.subtract(d.ONE);return t=a.mod(l).add(d.ONE),n=this._ecParams.getG().multiply(t),t=o.from(t.toByteArray()),n=o.from(this._ecParams.getCurve().encodePointHex(n),"hex"),this._priv=new b(this._ecParams,t),e.push({name:"curve",data:o.from(this._curve)}),e.push({name:"Q",data:n}),e.push({name:"d",data:t}),this._key=new c({type:"ecdsa",curve:this._curve,parts:e}),this._isPriv=!0,this._key}if("curve25519"===this._algo){var h=u.box.keyPair();return t=o.from(h.secretKey),n=o.from(h.publicKey),t=o.concat([t,n]),r.strictEqual(t.length,64),r.strictEqual(n.length,32),e.push({name:"A",data:n}),e.push({name:"k",data:t}),this._key=new c({type:"curve25519",parts:e}),this._isPriv=!0,this._key}throw new Error("Invalid algorithm: "+this._algo)},m.prototype.generateKeys=m.prototype.generateKey,g.prototype.getCurve=function(){return this.curve},g.prototype.getG=function(){return this.g},g.prototype.getN=function(){return this.n},g.prototype.getH=function(){return this.h},b.prototype.deriveSharedSecret=function(e){r.ok(e instanceof y);var t=e._pub.multiply(this._priv);return o.from(t.getX().toBigInteger().toByteArray())}},function(e,t,n){e.exports={read:p,readPkcs1:g,write:d,writePkcs1:E};var r=n(27),i=n(103),o=n(31).Buffer,s=n(55),a=n(47),u=n(46),l=n(50),c=n(113),f=n(210),h=f.readECDSACurve;function p(e,t){return c.read(e,t,"pkcs1")}function d(e,t){return c.write(e,t,"pkcs1")}function m(e,t){return r.strictEqual(e.peek(),i.Ber.Integer,t+" is not an Integer"),a.mpNormalize(e.readString(i.Ber.Integer,!0))}function g(e,t,n){switch(e){case"RSA":if("public"===t)return y(n);if("private"===t)return b(n);throw new Error("Unknown key type: "+t);case"DSA":if("public"===t)return _(n);if("private"===t)return v(n);throw new Error("Unknown key type: "+t);case"EC":case"ECDSA":if("private"===t)return S(n);if("public"===t)return k(n);throw new Error("Unknown key type: "+t);case"EDDSA":case"EdDSA":if("private"===t)return w(n);throw new Error(t+" keys not supported with EdDSA");default:throw new Error("Unknown key algo: "+e)}}function y(e){var t=m(e,"modulus"),n=m(e,"exponent"),r={type:"rsa",parts:[{name:"e",data:n},{name:"n",data:t}]};return new u(r)}function b(e){var t=m(e,"version");r.strictEqual(t[0],0);var n=m(e,"modulus"),i=m(e,"public exponent"),o=m(e,"private exponent"),s=m(e,"prime1"),a=m(e,"prime2"),u=m(e,"exponent1"),c=m(e,"exponent2"),f=m(e,"iqmp"),h={type:"rsa",parts:[{name:"n",data:n},{name:"e",data:i},{name:"d",data:o},{name:"iqmp",data:f},{name:"p",data:s},{name:"q",data:a},{name:"dmodp",data:u},{name:"dmodq",data:c}]};return new l(h)}function v(e){var t=m(e,"version");r.strictEqual(t.readUInt8(0),0);var n=m(e,"p"),i=m(e,"q"),o=m(e,"g"),s=m(e,"y"),a=m(e,"x"),u={type:"dsa",parts:[{name:"p",data:n},{name:"q",data:i},{name:"g",data:o},{name:"y",data:s},{name:"x",data:a}]};return new l(u)}function w(e){var t=m(e,"version");r.strictEqual(t.readUInt8(0),1);var n=e.readString(i.Ber.OctetString,!0);e.readSequence(160);var o=e.readOID();r.strictEqual(o,"1.3.101.112","the ed25519 curve identifier"),e.readSequence(161);var s=a.readBitString(e),u={type:"ed25519",parts:[{name:"A",data:a.zeroPadToLength(s,32)},{name:"k",data:n}]};return new l(u)}function _(e){var t=m(e,"y"),n=m(e,"p"),r=m(e,"q"),i=m(e,"g"),o={type:"dsa",parts:[{name:"y",data:t},{name:"p",data:n},{name:"q",data:r},{name:"g",data:i}]};return new u(o)}function k(e){e.readSequence();var t=e.readOID();r.strictEqual(t,"1.2.840.10045.2.1","must be ecPublicKey");for(var n=e.readOID(),l,c=Object.keys(s.curves),f=0;f<c.length;++f){var h=c[f],p=s.curves[h];if(p.pkcs8oid===n){l=h;break}}r.string(l,"a known ECDSA named curve");var d=e.readString(i.Ber.BitString,!0);d=a.ecNormalize(d);var m={type:"ecdsa",parts:[{name:"curve",data:o.from(l)},{name:"Q",data:d}]};return new u(m)}function S(e){var t=m(e,"version");r.strictEqual(t.readUInt8(0),1);var n=e.readString(i.Ber.OctetString,!0);e.readSequence(160);var s=h(e);r.string(s,"a known elliptic curve"),e.readSequence(161);var u=e.readString(i.Ber.BitString,!0);u=a.ecNormalize(u);var c={type:"ecdsa",parts:[{name:"curve",data:o.from(s)},{name:"Q",data:u},{name:"d",data:n}]};return new l(c)}function E(e,t){switch(e.startSequence(),t.type){case"rsa":l.isPrivateKey(t)?C(e,t):x(e,t);break;case"dsa":l.isPrivateKey(t)?A(e,t):I(e,t);break;case"ecdsa":l.isPrivateKey(t)?j(e,t):T(e,t);break;case"ed25519":l.isPrivateKey(t)?O(e,t):P(e,t);break;default:throw new Error("Unknown key algo: "+t.type)}e.endSequence()}function x(e,t){e.writeBuffer(t.part.n.data,i.Ber.Integer),e.writeBuffer(t.part.e.data,i.Ber.Integer)}function C(e,t){var n=o.from([0]);e.writeBuffer(n,i.Ber.Integer),e.writeBuffer(t.part.n.data,i.Ber.Integer),e.writeBuffer(t.part.e.data,i.Ber.Integer),e.writeBuffer(t.part.d.data,i.Ber.Integer),e.writeBuffer(t.part.p.data,i.Ber.Integer),e.writeBuffer(t.part.q.data,i.Ber.Integer),t.part.dmodp&&t.part.dmodq||a.addRSAMissing(t),e.writeBuffer(t.part.dmodp.data,i.Ber.Integer),e.writeBuffer(t.part.dmodq.data,i.Ber.Integer),e.writeBuffer(t.part.iqmp.data,i.Ber.Integer)}function A(e,t){var n=o.from([0]);e.writeBuffer(n,i.Ber.Integer),e.writeBuffer(t.part.p.data,i.Ber.Integer),e.writeBuffer(t.part.q.data,i.Ber.Integer),e.writeBuffer(t.part.g.data,i.Ber.Integer),e.writeBuffer(t.part.y.data,i.Ber.Integer),e.writeBuffer(t.part.x.data,i.Ber.Integer)}function I(e,t){e.writeBuffer(t.part.y.data,i.Ber.Integer),e.writeBuffer(t.part.p.data,i.Ber.Integer),e.writeBuffer(t.part.q.data,i.Ber.Integer),e.writeBuffer(t.part.g.data,i.Ber.Integer)}function T(e,t){e.startSequence(),e.writeOID("1.2.840.10045.2.1");var n=t.part.curve.data.toString(),o=s.curves[n].pkcs8oid;r.string(o,"a known ECDSA named curve"),e.writeOID(o),e.endSequence();var u=a.ecNormalize(t.part.Q.data,!0);e.writeBuffer(u,i.Ber.BitString)}function j(e,t){var n=o.from([1]);e.writeBuffer(n,i.Ber.Integer),e.writeBuffer(t.part.d.data,i.Ber.OctetString),e.startSequence(160);var u=t.part.curve.data.toString(),l=s.curves[u].pkcs8oid;r.string(l,"a known ECDSA named curve"),e.writeOID(l),e.endSequence(),e.startSequence(161);var c=a.ecNormalize(t.part.Q.data,!0);e.writeBuffer(c,i.Ber.BitString),e.endSequence()}function O(e,t){var n=o.from([1]);e.writeBuffer(n,i.Ber.Integer),e.writeBuffer(t.part.k.data,i.Ber.OctetString),e.startSequence(160),e.writeOID("1.3.101.112"),e.endSequence(),e.startSequence(161),a.writeBitString(e,t.part.A.data),e.endSequence()}function P(e,t){throw new Error("Public keys are not supported for EdDSA PKCS#1")}},function(e,t,n){e.exports={read:h,write:_};var r=n(27),i=n(31).Buffer,o=n(46),s=n(50),a=n(47),u=n(209),l=n(379),c={"rsa-sha1":5,"rsa-sha256":8,"rsa-sha512":10,"ecdsa-p256-sha256":13,"ecdsa-p384-sha384":14},f={};function h(e,t){"string"!=typeof e&&(r.buffer(e,"buf"),e=e.toString("ascii"));var n=e.split("\n");if(n[0].match(/^Private-key-format\: v1/)){var i=n[1].split(" "),o=parseInt(i[1],10),s=i[2];if(!f[o])throw new Error("Unsupported algorithm: "+s);return g(o,n.slice(2))}for(var a=0;n[a].match(/^\;/);)a++;if((n[a].match(/\. IN KEY /)||n[a].match(/\. IN DNSKEY /))&&0===n[a+1].length)return p(n[a]);throw new Error("Cannot parse dnssec key")}function p(e){var t=e.split(" "),n=parseInt(t[5],10);if(!f[n])throw new Error("Unsupported algorithm: "+n);var r=t.slice(6,t.length).join(),s=i.from(r,"base64");if(f[n].match(/^RSA-/)){var u=s.readUInt8(0);if(3!=u&&1!=u)throw new Error("Cannot parse dnssec key: unsupported exponent length");var l=s.slice(1,u+1);l=a.mpNormalize(l);var c=s.slice(1+u);c=a.mpNormalize(c);var h={type:"rsa",parts:[]};return h.parts.push({name:"e",data:l}),h.parts.push({name:"n",data:c}),new o(h)}if("ECDSA-P384-SHA384"===f[n]||"ECDSA-P256-SHA256"===f[n]){var p="nistp384",d=384;f[n].match(/^ECDSA-P256-SHA256/)&&(p="nistp256",d=256);var m={type:"ecdsa",curve:p,size:d,parts:[{name:"curve",data:i.from(p)},{name:"Q",data:a.ecNormalize(s)}]};return new o(m)}throw new Error("Unsupported algorithm: "+f[n])}function d(e){return i.from(e.split(" ")[1],"base64")}function m(e){var t={};e.forEach(function(e){"Modulus:"===e.split(" ")[0]?t.n=d(e):"PublicExponent:"===e.split(" ")[0]?t.e=d(e):"PrivateExponent:"===e.split(" ")[0]?t.d=d(e):"Prime1:"===e.split(" ")[0]?t.p=d(e):"Prime2:"===e.split(" ")[0]?t.q=d(e):"Exponent1:"===e.split(" ")[0]?t.dmodp=d(e):"Exponent2:"===e.split(" ")[0]?t.dmodq=d(e):"Coefficient:"===e.split(" ")[0]&&(t.iqmp=d(e))});var n={type:"rsa",parts:[{name:"e",data:a.mpNormalize(t.e)},{name:"n",data:a.mpNormalize(t.n)},{name:"d",data:a.mpNormalize(t.d)},{name:"p",data:a.mpNormalize(t.p)},{name:"q",data:a.mpNormalize(t.q)},{name:"dmodp",data:a.mpNormalize(t.dmodp)},{name:"dmodq",data:a.mpNormalize(t.dmodq)},{name:"iqmp",data:a.mpNormalize(t.iqmp)}]};return new s(n)}function g(e,t){if(f[e].match(/^RSA-/))return m(t);if("ECDSA-P384-SHA384"===f[e]||"ECDSA-P256-SHA256"===f[e]){var n=i.from(t[0].split(" ")[1],"base64"),r="nistp384",o=384;"ECDSA-P256-SHA256"===f[e]&&(r="nistp256",o=256);var u=a.publicFromPrivateECDSA(r,n),l=u.part.Q.data,c={type:"ecdsa",curve:r,size:o,parts:[{name:"curve",data:i.from(r)},{name:"d",data:n},{name:"Q",data:l}]};return new s(c)}throw new Error("Unsupported algorithm: "+f[e])}function y(e){var t=e.getFullYear()+"",n=e.getMonth()+1,r=t+n+e.getUTCDate();return r+=""+e.getUTCHours()+e.getUTCMinutes(),r+=e.getUTCSeconds(),r}function b(e){if(e&&e.hashAlgo&&"sha1"!==e.hashAlgo){if("sha256"===e.hashAlgo)return"8 (RSASHA256)";if("sha512"===e.hashAlgo)return"10 (RSASHA512)";throw new Error("Unknown or unsupported hash: "+e.hashAlgo)}return"5 (RSASHA1)"}function v(e,t){e.part.dmodp&&e.part.dmodq||a.addRSAMissing(e);var n="";n+="Private-key-format: v1.3\n",n+="Algorithm: "+b(t)+"\n";var r=a.mpDenormalize(e.part.n.data);n+="Modulus: "+r.toString("base64")+"\n";var o=a.mpDenormalize(e.part.e.data);n+="PublicExponent: "+o.toString("base64")+"\n";var s=a.mpDenormalize(e.part.d.data);n+="PrivateExponent: "+s.toString("base64")+"\n";var u=a.mpDenormalize(e.part.p.data);n+="Prime1: "+u.toString("base64")+"\n";var l=a.mpDenormalize(e.part.q.data);n+="Prime2: "+l.toString("base64")+"\n";var c=a.mpDenormalize(e.part.dmodp.data);n+="Exponent1: "+c.toString("base64")+"\n";var f=a.mpDenormalize(e.part.dmodq.data);n+="Exponent2: "+f.toString("base64")+"\n";var h=a.mpDenormalize(e.part.iqmp.data);n+="Coefficient: "+h.toString("base64")+"\n";var p=new Date;return n+="Created: "+y(p)+"\n",n+="Publish: "+y(p)+"\n",n+="Activate: "+y(p)+"\n",i.from(n,"ascii")}function w(e,t){var n="";if(n+="Private-key-format: v1.3\n","nistp256"===e.curve)n+="Algorithm: 13 (ECDSAP256SHA256)\n";else{if("nistp384"!==e.curve)throw new Error("Unsupported curve");n+="Algorithm: 14 (ECDSAP384SHA384)\n"}var r=e.part.d.data.toString("base64");n+="PrivateKey: "+r+"\n";var o=new Date;return n+="Created: "+y(o)+"\n",n+="Publish: "+y(o)+"\n",n+="Activate: "+y(o)+"\n",i.from(n,"ascii")}function _(e,t){if(s.isPrivateKey(e)){if("rsa"===e.type)return v(e,t);if("ecdsa"===e.type)return w(e,t);throw new Error("Unsupported algorithm: "+e.type)}throw o.isKey(e)?new Error('Format "dnssec" only supports writing private keys'):new Error("key is not a Key or PrivateKey")}Object.keys(c).forEach(function(e){f[c[e]]=e.toUpperCase()})},function(e,t){function n(e){this.dict=e||{}}n.prototype.set=function(e,t,n){if("object"!=typeof e){void 0===n&&(n=!0);var r=this.has(e);return!n&&r?this.dict[r]=this.dict[r]+","+t:this.dict[r||e]=t,r}for(var i in e)this.set(i,e[i],t)},n.prototype.has=function(e){for(var t=Object.keys(this.dict),e=e.toLowerCase(),n=0;n<t.length;n++)if(t[n].toLowerCase()===e)return t[n];return!1},n.prototype.get=function(e){var t,n;e=e.toLowerCase();var r=this.dict;return Object.keys(r).forEach(function(i){n=i.toLowerCase(),e===n&&(t=r[i])}),t},n.prototype.swap=function(e){var t=this.has(e);if(t!==e){if(!t)throw new Error('There is no header than matches "'+e+'"');this.dict[e]=this.dict[t],delete this.dict[t]}},n.prototype.del=function(e){var t=this.has(e);return delete this.dict[t||e]},e.exports=function(e){return new n(e)},e.exports.httpify=function(e,t){var r=new n(t);return e.setHeader=function(e,t,n){if(void 0!==t)return r.set(e,t,n)},e.hasHeader=function(e){return r.has(e)},e.getHeader=function(e){return r.get(e)},e.removeHeader=function(e){return r.del(e)},e.headers=r.dict,r}},function(e,t,n){"use strict";var r=n(1881),i=n(384),o=n(167),s=n(722),a=n(1883);function u(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return u.call(this,e,t,r);r=this._refs[r]}if(r=r||this._schemas[n],r instanceof s)return d(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i=l.call(this,t,n),o,a,c;return i&&(o=i.schema,t=i.root,c=i.baseId),o instanceof s?a=o.validate||e.call(this,o.schema,t,void 0,c):void 0!==o&&(a=d(o,this._opts.inlineRefs)?o:e.call(this,o,t,void 0,c)),a}function l(e,t){var n=r.parse(t),i=b(n),o=y(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==o){var a=w(i),u=this._refs[a];if("string"==typeof u)return c.call(this,e,u,n);if(u instanceof s)u.validate||this._compile(u),e=u;else{if(u=this._schemas[a],!(u instanceof s))return;if(u.validate||this._compile(u),a==w(t))return{schema:u,root:e,baseId:o};e=u}if(!e.schema)return;o=y(this._getId(e.schema))}return h.call(this,n,o,e.schema,e)}function c(e,t,n){var r=l.call(this,e,t);if(r){var i=r.schema,o=r.baseId;e=r.root;var s=this._getId(i);return s&&(o=_(o,s)),h.call(this,n,o,i,e)}}e.exports=u,u.normalizeId=w,u.fullPath=y,u.url=_,u.ids=k,u.inlineRef=d,u.schema=l;var f=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,n,r){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),s=1;s<i.length;s++){var a=i[s];if(a){if(a=o.unescapeFragment(a),n=n[a],void 0===n)break;var u;if(!f[a]&&(u=this._getId(n),u&&(t=_(t,u)),n.$ref)){var c=_(t,n.$ref),h=l.call(this,r,c);h&&(n=h.schema,r=h.root,t=h.baseId)}}}return void 0!==n&&n!==r.schema?{schema:n,root:r,baseId:t}:void 0}}var p=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,t){return!1!==t&&(void 0===t||!0===t?m(e):t?g(e)<=t:void 0)}function m(e){var t;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(t=e[n],"object"==typeof t&&!m(t))return!1}else for(var r in e){if("$ref"==r)return!1;if(t=e[r],"object"==typeof t&&!m(t))return!1}return!0}function g(e){var t=0,n;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(n=e[r],"object"==typeof n&&(t+=g(n)),t==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(p[i])t++;else if(n=e[i],"object"==typeof n&&(t+=g(n)+1),t==1/0)return 1/0}return t}function y(e,t){!1!==t&&(e=w(e));var n=r.parse(e);return b(n)}function b(e){return r.serialize(e).split("#")[0]+"#"}var v=/#\/?$/;function w(e){return e?e.replace(v,""):""}function _(e,t){return t=w(t),r.resolve(e,t)}function k(e){var t=w(this._getId(e)),n={"":t},s={"":y(t,!1)},u={},l=this;return a(e,{allKeys:!0},function(e,t,a,c,f,h,p){if(""!==t){var d=l._getId(e),m=n[c],g=s[c]+"/"+f;if(void 0!==p&&(g+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof d){d=m=w(m?r.resolve(m,d):d);var y=l._refs[d];if("string"==typeof y&&(y=l._refs[y]),y&&y.schema){if(!i(e,y.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=w(g))if("#"==d[0]){if(u[d]&&!i(e,u[d]))throw new Error('id "'+d+'" resolves to more than one schema');u[d]=e}else l._refs[d]=g}n[t]=m,s[t]=g}}),u}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s=r(t),a=r(n),u,l,c;if(s&&a){if(l=t.length,l!=n.length)return!1;for(u=l;0!=u--;)if(!e(t[u],n[u]))return!1;return!0}if(s!=a)return!1;var f=t instanceof Date,h=n instanceof Date;if(f!=h)return!1;if(f&&h)return t.getTime()==n.getTime();var p=t instanceof RegExp,d=n instanceof RegExp;if(p!=d)return!1;if(p&&d)return t.toString()==n.toString();var m=i(t);if(l=m.length,l!==i(n).length)return!1;for(u=l;0!=u--;)if(!o.call(n,m[u]))return!1;for(u=l;0!=u--;)if(c=m[u],!e(t[c],n[c]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";var r=n(383);function i(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0}function o(e,t,n){this.message=n||o.message(e,t),this.missingRef=r.url(e,t),this.missingSchema=r.normalizeId(r.fullPath(this.missingRef))}function s(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:s(i),MissingRef:s(o)},o.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},function(e,t){class n extends Error{constructor(e){super(),this.message=`${e} is not a supported algorithm`}}e.exports=n},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+p]=255&s,p+=d,s/=256,l-=8);e[n+p-d]|=128*m}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(292),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r){(0,i.default)(t)(e,(0,s.default)(n),r)}e.exports=t.default},function(e,t,n){(function(e){var r=n(98),i=n(751),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?r.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||i;e.exports=c}).call(this,n(75)(e))},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t=null==t?n:t,!!t&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}e.exports=i},function(e,t,n){var r=n(752),i=n(753),o=n(754),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,i.default)(arguments),n=t.pop();e.call(this,t,n)}};var r=n(105),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t,n,r){return e(t,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";(function(t,r){var i;e.exports=j,j.ReadableState=T;var o=n(6).EventEmitter,s=function e(t,n){return t.listeners(n).length},a=n(396),u=n(0).Buffer,l=t.Uint8Array||function(){};function c(e){return u.from(e)}function f(e){return u.isBuffer(e)||e instanceof l}var h=n(760),p;p=h&&h.debuglog?h.debuglog("stream"):function e(){};var d=n(761),m=n(397),g=n(398),y=g.getHighWaterMark,b=n(135).codes,v=b.ERR_INVALID_ARG_TYPE,w=b.ERR_STREAM_PUSH_AFTER_EOF,_=b.ERR_METHOD_NOT_IMPLEMENTED,k=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,S=n(763),E=S.emitExperimentalWarning,x,C;n(1)(j,a);var A=["error","close","destroy","pause","resume"];function I(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function T(e,t,r){i=i||n(136),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",r),this.buffer=new d,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!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(x||(x=n(16).StringDecoder),this.decoder=new x(e.encoding),this.encoding=e.encoding)}function j(e){if(i=i||n(136),!(this instanceof j))return new j(e);var t=this instanceof i;this._readableState=new T(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function O(e,t,n,r,i){p("readableAddChunk",t);var o=e._readableState,s;if(null===t)o.reading=!1,L(e,o);else if(i||(s=B(o,t)),s)e.emit("error",s);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=c(t)),r)o.endEmitted?e.emit("error",new k):P(e,o,t,!0);else if(o.ended)e.emit("error",new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?P(e,o,t,!1):U(e,o)):P(e,o,t,!1)}else r||(o.reading=!1,U(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function P(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&F(e)),U(e,t)}function B(e,t){var n;return f(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t)),n}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function e(){return void 0!==this._readableState&&this._readableState.destroyed},set:function e(t){this._readableState&&(this._readableState.destroyed=t)}}),j.prototype.destroy=m.destroy,j.prototype._undestroy=m.undestroy,j.prototype._destroy=function(e,t){t(e)},j.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=u.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},j.prototype.unshift=function(e){return O(this,e,null,!0,!1)},j.prototype.isPaused=function(){return!1===this._readableState.flowing},j.prototype.setEncoding=function(e){return x||(x=n(16).StringDecoder),this._readableState.decoder=new x(e),this._readableState.encoding=this._readableState.decoder.encoding,this};var R=8388608;function N(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=N(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?F(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,D(e)))}}function F(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(D,e))}function D(e){var t=e._readableState;p("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function U(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(z,e,t))}function z(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(p("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function q(e){return function t(){var n=e._readableState;p("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&s(e,"data")&&(n.flowing=!0,$(e))}}function K(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function H(e){p("readable nexttick read 0"),e.read(0)}function V(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(W,e,t))}function W(e,t){p("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function G(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function Y(e){var t=e._readableState;p("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(J,t,e))}function J(e,t){p("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Z(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}j.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Y(this):F(this),null;if(e=M(e,t),0===e&&t.ended)return 0===t.length&&Y(this),null;var r=t.needReadable,i;return p("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,p("length less than watermark",r)),t.ended||t.reading?(r=!1,p("reading or ended",r)):r&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(n,t))),i=e>0?G(e,t):null,null===i?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Y(this)),null!==i&&this.emit("data",i),i},j.prototype._read=function(e){this.emit("error",new _("_read()"))},j.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=o?l:b;function u(e,t){p("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,h())}function l(){p("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",u);var c=q(n);e.on("drain",c);var f=!1;function h(){p("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",b),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function d(t){p("ondata");var r=e.write(t);p("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==Z(i.pipes,e))&&!f&&(p("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function m(t){p("onerror",t),b(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),b()}function y(){p("onfinish"),e.removeListener("close",g),b()}function b(){p("unpipe"),n.unpipe(e)}return n.on("data",d),I(e,"error",m),e.once("close",g),e.once("finish",y),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Z(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},j.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,p("on readable",i.length,i.reading),i.length?F(this):i.reading||r.nextTick(H,this))),n},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(K,this),n},j.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(K,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!e.readableListening,V(this,e)),e.paused=!1,this},j.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function t(n){return function t(){return e[n].apply(e,arguments)}}(i));for(var o=0;o<A.length;o++)e.on(A[o],this.emit.bind(this,A[o]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(j.prototype[Symbol.asyncIterator]=function(){return E("Readable[Symbol.asyncIterator]"),void 0===C&&(C=n(764)),C(this)}),Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function e(){return this._readableState.highWaterMark}}),Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function e(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function e(){return this._readableState.flowing},set:function e(t){this._readableState&&(this._readableState.flowing=t)}}),j._fromList=G,Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function e(){return this._readableState.length}})}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,n){var o=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(n?n(e):!e||this._writableState&&this._writableState.errorEmitted||t.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!n&&e?(t.nextTick(r,o,e),o._writableState&&(o._writableState.errorEmitted=!0)):n?(t.nextTick(i,o),n(e)):t.nextTick(i,o)}),this)}function r(e,t){s(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(){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)}function s(e,t){e.emit("error",t)}e.exports={destroy:n,undestroy:o}}).call(this,n(2))},function(e,t,n){"use strict";var r=n(135).codes.ERR_INVALID_OPT_VALUE;function i(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}function o(e,t,n,o){var s=i(t,o,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?n:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},function(e,t,n){"use strict";(function(t,r){function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){V(t,e)}}var s;e.exports=I,I.WritableState=A;var a={deprecate:n(52)},u=n(396),l=n(0).Buffer,c=t.Uint8Array||function(){};function f(e){return l.from(e)}function h(e){return l.isBuffer(e)||e instanceof c}var p=n(397),d=n(398),m=d.getHighWaterMark,g=n(135).codes,y=g.ERR_INVALID_ARG_TYPE,b=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_MULTIPLE_CALLBACK,w=g.ERR_STREAM_CANNOT_PIPE,_=g.ERR_STREAM_DESTROYED,k=g.ERR_STREAM_NULL_VALUES,S=g.ERR_STREAM_WRITE_AFTER_END,E=g.ERR_UNKNOWN_ENCODING,x;function C(){}function A(e,t,r){s=s||n(136),e=e||{},"boolean"!=typeof r&&(r=t instanceof s),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=m(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){M(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function I(e){s=s||n(136);var t=this instanceof s;if(!t&&!x.call(I,this))return new I(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function T(e,t){var n=new S;e.emit("error",n),r.nextTick(t,n)}function j(e,t,n,i){var o;return null===n?o=new k:"string"==typeof n||t.objectMode||(o=new y("chunk",["string","Buffer"],n)),!o||(e.emit("error",o),r.nextTick(i,o),!1)}function O(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}function P(e,t,n,r,i,o){if(!n){var s=O(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else B(e,t,!1,a,r,i,o);return u}function B(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new _("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function R(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(K,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),K(e,t))}function N(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function M(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new v;if(N(n),t)R(e,n,i,t,o);else{var s=U(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),i?r.nextTick(L,e,n,s,o):L(e,n,s,o)}}function L(e,t,n,r){n||F(e,t),t.pendingcb--,r(),K(e,t)}function F(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,B(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(B(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function U(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function z(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),K(e,t)})}function q(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(z,e,t)))}function K(e,t){var n=U(t);return n&&(q(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function H(e,t,n){t.ending=!0,K(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function V(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}n(1)(I,u),A.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(A.prototype,"buffer",{get:a.deprecate(function e(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function e(t){return!!x.call(this,t)||this===I&&(t&&t._writableState instanceof A)}})):x=function e(t){return t instanceof this},I.prototype.pipe=function(){this.emit("error",new w)},I.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&h(e);return o&&!l.isBuffer(e)&&(e=f(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=C),r.ending?T(this,n):(o||j(this,r,e,n))&&(r.pendingcb++,i=P(this,r,o,e,t,n)),i},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},I.prototype.setDefaultEncoding=function e(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 E(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function e(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function e(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new b("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||H(this,r,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function e(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function e(){return void 0!==this._writableState&&this._writableState.destroyed},set:function e(t){this._writableState&&(this._writableState.destroyed=t)}}),I.prototype.destroy=p.destroy,I.prototype._undestroy=p.undestroy,I.prototype._destroy=function(e,t){t(e)}}).call(this,n(8),n(2))},function(e,t,n){"use strict";e.exports=c;var r=n(135).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(136);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,n){h(e,t,n)})}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}n(1)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},function(e,t,n){"use strict";const r=n(99);class i{constructor(e){this._repo=e,this._bitswap=null}setExchange(e){this._bitswap=e}unsetExchange(){this._bitswap=null}hasExchange(){return null!=this._bitswap}put(e,t){this.hasExchange()?this._bitswap.put(e,t):this._repo.blocks.put(e,t)}putMany(e,t){this.hasExchange()?this._bitswap.putMany(e,t):this._repo.blocks.putMany(e,t)}get(e,t){this.hasExchange()?this._bitswap.get(e,t):this._repo.blocks.get(e,t)}getMany(e,t){Array.isArray(e)?this.hasExchange()?this._bitswap.getMany(e,t):r(e,(e,t)=>this._repo.blocks.get(e,t),t):t(new Error("first arg must be an array of cids"))}delete(e,t){this._repo.blocks.delete(e,t)}}e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(67),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r){r=r||i.default,t=t||[];var o=[],a=0,u=(0,s.default)(n);e(t,function(e,t,n){var r=a++;u(e,function(e,t){o[r]=t,n(e)})},function(e){r(e,o)})}e.exports=t.default},function(e,t,n){"use strict";t.names=Object.freeze({id:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46000:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46000:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},function(e,t,n){"use strict";(function(t){const r=n(39);function i(e){return parseInt(e.toString("hex"),16)}function o(e){let n=e.toString(16);return n.length%2==1&&(n="0"+n),t.from(n,"hex")}function s(e){return t.from(r.encode(i(e)))}function a(e){return o(r.decode(e))}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:s,varintBufferDecode:a}}).call(this,n(0).Buffer)},function(e,t){e.exports=function e(t,n,r){t(n),r&&r(!0===n?null:n)}},function(e,t,n){"use strict";var r=n(176);e.exports=function e(t){return r(null,t)}},function(e,t,n){var r=n(177);function i(e){return e}e.exports=function e(t){return"object"==typeof t&&"function"==typeof t.test?function(e){return t.test(e)}:r(t)||i}},function(e,t,n){"use strict";function r(e){return e}var i=n(177),o=n(78);e.exports=function e(t,n){t=i(t)||r;var s={};return o(function(e){var r=t(e);return s[r]?!!n:(s[r]=!0,!n)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=n(798),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){(0,i.default)(e,function(){return!t.apply(this,arguments)},n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=n(67),i=f(r),o=n(171),s=f(o),a=n(105),u=f(a),l=n(42),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){n=n||i.default;var r=(0,s.default)(t)?[]:{};e(t,function(e,t,n){(0,c.default)(e)(function(e,i){arguments.length>2&&(i=(0,u.default)(arguments,1)),r[t]=i,n(e)})},function(e){n(e,r)})}e.exports=t.default},function(e,t,n){var r,i;r=this,e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},function(e,t,n){"use strict";(function(t){const r=n(139),i=n(53),o="/",s=t.from(o),a=s[0];class u{constructor(e,n){if("string"==typeof e?this._buf=t.from(e):t.isBuffer(e)&&(this._buf=e),null==n&&(n=!0),n&&this.clean(),0===this._buf.length||this._buf[0]!==a)throw new Error(`Invalid key: ${this.toString()}`)}toString(e){return this._buf.toString(e||"utf8")}toBuffer(){return this._buf}get[Symbol.toStringTag](){return`[Key ${this.toString()}]`}static withNamespaces(e){return new f(e.join(o))}static random(){return new f(r().replace(/-/g,""))}clean(){for(this._buf&&0!==this._buf.length||(this._buf=t.from(o)),this._buf[0]!==a&&(this._buf=t.concat([s,this._buf]));this._buf.length>1&&this._buf[this._buf.length-1]===a;)this._buf=this._buf.slice(0,-1)}less(e){const t=this.list(),n=e.list();for(let e=0;e<t.length;e++){if(n.length<e+1)return!1;const r=t[e],i=n[e];if(r<i)return!0;if(r>i)return!1}return t.length<n.length}reverse(){return u.withNamespaces(this.list().slice().reverse())}namespaces(){return this.list()}baseNamespace(){const e=this.namespaces();return e[e.length-1]}list(){return this.toString().split(o).slice(1)}type(){return l(this.baseNamespace())}name(){return c(this.baseNamespace())}instance(e){return new f(this.toString()+":"+e)}path(){let e=this.parent().toString();return e.endsWith(o)||(e+=o),e+=this.type(),new f(e)}parent(){const e=this.list();return 1===e.length?new f(o):new f(e.slice(0,-1).join(o))}child(e){return this.toString()===o?e:e.toString()===o?this:new f(this.toString()+e.toString(),!1)}isAncestorOf(e){return e.toString()!==this.toString()&&e.toString().startsWith(this.toString())}isDecendantOf(e){return e.toString()!==this.toString()&&this.toString().startsWith(e.toString())}isTopLevel(){return 1===this.list().length}}function l(e){const t=e.split(":");return t.length<2?"":t.slice(0,-1).join(":")}function c(e){const t=e.split(":");return t[t.length-1]}const f=i(u,{className:"Key",symbolName:"@ipfs/interface-datastore/key"});e.exports=f}).call(this,n(0).Buffer)},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function e(){return n(r),r}}else{var i=new Array(16);e.exports=function e(){for(var t=0,n;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),i[t]=n>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);function i(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}e.exports=i},function(e,t,n){"use strict";const r=n(22);e.exports.dbOpenFailedError=(e=>(e=e||new Error("Cannot open database"),r(e,"ERR_DB_OPEN_FAILED"))),e.exports.dbDeleteFailedError=(e=>(e=e||new Error("Delete failed"),r(e,"ERR_DB_DELETE_FAILED"))),e.exports.dbWriteFailedError=(e=>(e=e||new Error("Write failed"),r(e,"ERR_DB_WRITE_FAILED"))),e.exports.notFoundError=(e=>(e=e||new Error("Not Found"),r(e,"ERR_NOT_FOUND")))},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t;return"[object Object]"===r.call(e)&&(t=Object.getPrototypeOf(e),null===t||t===Object.getPrototypeOf({}))}},function(e,t,n){"use strict";const r=n(228),i=n(816),o=n(818),s=n(820),a=n(821),u=n(418);t.KeytransformDatastore=r,t.ShardingDatastore=i,t.MountDatastore=o,t.TieredDatastore=s,t.NamespaceDatastore=a,t.shard=u},function(e,t,n){"use strict";const r=n(33).Key,i=n(817),o=t.PREFIX="/repo/flatfs/shard/",s=t.SHARDING_FN="SHARDING";t.README_FN="_README";class a{constructor(e){this.param=e}fun(e){throw new Error("implement me")}toString(){return`${o}v1/${this.name}/${this.param}`}}class u extends a{constructor(e){super(e),this._padding="".padStart(e,"_"),this.name="prefix"}fun(e){return(e+this._padding).slice(0,this.param)}}class l extends a{constructor(e){super(e),this._padding="".padStart(e,"_"),this.name="suffix"}fun(e){const t=this._padding+e;return t.slice(t.length-this.param)}}class c extends a{constructor(e){super(e),this._padding="".padStart(e+1,"_"),this.name="next-to-last"}fun(e){const t=this._padding+e,n=t.length-this.param-1;return t.slice(n,n+this.param)}}function f(e){if(e=e.trim(),0===e.length)throw new Error("empty shard string");if(!e.startsWith(o))throw new Error(`invalid or no path prefix: ${e}`);const t=e.slice(o.length).split("/"),n=t[0];if("v1"!==n)throw new Error(`expect 'v1' version, got '${n}'`);const r=t[1];if(!t[2])throw new Error("missing param");const i=parseInt(t[2],10);switch(r){case"prefix":return new u(i);case"suffix":return new l(i);case"next-to-last":return new c(i);default:throw new Error(`unkown sharding function: ${r}`)}}t.readShardFun=((e,t,n)=>{const i=new r(e).child(new r(s)),o="function"==typeof t.getRaw?t.getRaw.bind(t):t.get.bind(t);o(i,(e,t)=>{if(e)return n(e);let r;try{r=f((t||"").toString().trim())}catch(e){return n(e)}n(null,r)})}),t.readme=i,t.parseShardFun=f,t.Prefix=u,t.Suffix=l,t.NextToLast=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(823),i=a(r),o=n(174),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)(i.default),e.exports=t.default},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){t.AbstractLevelDOWN=n(830),t.AbstractIterator=n(422),t.AbstractChainedBatch=n(423)},function(e,t,n){(function(t){function n(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(e){var n=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return n._ended?(t.nextTick(e,new Error("cannot call next() after end()")),n):n._nexting?(t.nextTick(e,new Error("cannot call next() before previous next() has completed")),n):(n._nexting=!0,n._next(function(){n._nexting=!1,e.apply(null,arguments)}),n)},n.prototype._next=function(e){t.nextTick(e)},n.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},n.prototype._seek=function(e){},n.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return t.nextTick(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},n.prototype._end=function(e){t.nextTick(e)},e.exports=n}).call(this,n(2))},function(e,t){function n(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this.db._checkKey(e)||this.db._checkValue(t);if(n)throw n;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},n.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},n.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},n.prototype._del=function(e){this._operations.push({type:"del",key:e})},n.prototype.clear=function(){return this._checkWritten(),this._clear(),this},n.prototype._clear=function(){this._operations=[]},n.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},n.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},e.exports=n},function(e,t){function n(){var e,t=new Promise(function(t,n){e=function e(r,i){r?n(r):t(i)}});return e.promise=t,e}e.exports=n},function(e,t,n){(function(t){function n(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(e){var n=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return n._ended?(t.nextTick(e,new Error("cannot call next() after end()")),n):n._nexting?(t.nextTick(e,new Error("cannot call next() before previous next() has completed")),n):(n._nexting=!0,n._next(function(){n._nexting=!1,e.apply(null,arguments)}),n)},n.prototype._next=function(e){t.nextTick(e)},n.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},n.prototype._seek=function(e){},n.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return t.nextTick(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},n.prototype._end=function(e){t.nextTick(e)},e.exports=n}).call(this,n(2))},function(e,t){function n(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this.db._checkKey(e)||this.db._checkValue(t);if(n)throw n;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},n.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},n.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},n.prototype._del=function(e){this._operations.push({type:"del",key:e})},n.prototype.clear=function(){return this._checkWritten(),this._clear(),this},n.prototype._clear=function(){this._operations=[]},n.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},n.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},e.exports=n},function(e,t,n){t.AbstractLevelDOWN=n(428),t.AbstractIterator=n(429),t.AbstractChainedBatch=n(430),t.isLevelDOWN=n(842)},function(e,t,n){(function(t,r){var i=n(69),o=n(429),s=n(430);function a(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}a.prototype.open=function(e,n){var r=this,i=this.status;if("function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=0!=e.createIfMissing,e.errorIfExists=!!e.errorIfExists,"function"==typeof this._open?(this.status="opening",this._open(e,function(e){if(e)return r.status=i,n(e);r.status="open",n()})):(this.status="open",t.nextTick(n))},a.prototype.close=function(e){var n=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");"function"==typeof this._close?(this.status="closing",this._close(function(t){if(t)return n.status=r,e(t);n.status="closed",e()})):(this.status="closed",t.nextTick(e))},a.prototype.get=function(e,n,r){var i;if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("get() requires a callback argument");return(i=this._checkKey(e,"key",this._isBuffer))?r(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof n&&(n={}),n.asBuffer=0!=n.asBuffer,"function"==typeof this._get?this._get(e,n,r):void t.nextTick(function(){r(new Error("NotFound"))}))},a.prototype.put=function(e,n,r,i){var o;if("function"==typeof r&&(i=r),"function"!=typeof i)throw new Error("put() requires a callback argument");return(o=this._checkKey(e,"key",this._isBuffer))?i(o):(this._isBuffer(e)||(e=String(e)),null==n||this._isBuffer(n)||t.browser||(n=String(n)),"object"!=typeof r&&(r={}),"function"==typeof this._put?this._put(e,n,r,i):void t.nextTick(i))},a.prototype.del=function(e,n,r){var i;if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("del() requires a callback argument");return(i=this._checkKey(e,"key",this._isBuffer))?r(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof n&&(n={}),"function"==typeof this._del?this._del(e,n,r):void t.nextTick(r))},a.prototype.batch=function(e,n,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof n&&(r=n),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return r(new Error("batch(array) requires an array argument"));n&&"object"==typeof n||(n={});for(var i=0,o=e.length,s,a;i<o;i++)if(s=e[i],"object"==typeof s){if(a=this._checkKey(s.type,"type",this._isBuffer))return r(a);if(a=this._checkKey(s.key,"key",this._isBuffer))return r(a)}if("function"==typeof this._batch)return this._batch(e,n,r);t.nextTick(r)},a.prototype.approximateSize=function(e,n,r){if(null==e||null==n||"function"==typeof e||"function"==typeof n)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof r)throw new Error("approximateSize() requires a callback argument");if(this._isBuffer(e)||(e=String(e)),this._isBuffer(n)||(n=String(n)),"function"==typeof this._approximateSize)return this._approximateSize(e,n,r);t.nextTick(function(){r(null,0)})},a.prototype._setupIteratorOptions=function(e){var t=this;return e=i(e),["start","end","gt","gte","lt","lte"].forEach(function(n){e[n]&&t._isBuffer(e[n])&&0===e[n].length&&delete e[n]}),e.reverse=!!e.reverse,e.keys=0!=e.keys,e.values=0!=e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=0!=e.keyAsBuffer,e.valueAsBuffer=0!=e.valueAsBuffer,e},a.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new o(this)},a.prototype._chainedBatch=function(){return new s(this)},a.prototype._isBuffer=function(e){return r.isBuffer(e)},a.prototype._checkKey=function(e,t){if(null===e||void 0===e)return new Error(t+" cannot be `null` or `undefined`");if(this._isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")},e.exports=a}).call(this,n(2),n(0).Buffer)},function(e,t,n){(function(t){function n(e){this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(e){var n=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return n._ended?e(new Error("cannot call next() after end()")):n._nexting?e(new Error("cannot call next() before previous next() has completed")):(n._nexting=!0,"function"==typeof n._next?n._next(function(){n._nexting=!1,e.apply(null,arguments)}):void t.nextTick(function(){n._nexting=!1,e()}))},n.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");return this._ended?e(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(e):void t.nextTick(e))},e.exports=n}).call(this,n(2))},function(e,t,n){(function(t){function n(e){this._db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this._db._checkKey(e,"key",this._db._isBuffer);if(n)throw n;return this._db._isBuffer(e)||(e=String(e)),this._db._isBuffer(t)||(t=String(t)),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},n.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key",this._db._isBuffer);if(t)throw t;return this._db._isBuffer(e)||(e=String(e)),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},n.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},n.prototype.write=function(e,n){if(this._checkWritten(),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("write() requires a callback argument");return"object"!=typeof e&&(e={}),this._written=!0,"function"==typeof this._write?this._write(n):"function"==typeof this._db._batch?this._db._batch(this._operations,e,n):void t.nextTick(n)},e.exports=n}).call(this,n(2))},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(432),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(846),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(847),b=n(433),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(116),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(116),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";e.exports=s;var r=n(116),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";const r=n(5),i=n(14),o=r("repo:lock"),s="repo.lock",a={};t.lock=((e,t)=>{const n=e+"/"+s;o("locking %s",n),a[n]=!0;const r={close(e){a[n]&&delete a[n],i(e)}};i(()=>{t(null,r)})}),t.locked=((e,t)=>{const n=e+"/"+s;o("checking lock: %s");const r=a[n];i(()=>{t(null,r)})})},function(e,t){e.exports=function(e){var t,n=!1;function r(r){if(!r)throw new Error("must be passed a readable");t=r,n&&e(t)}return r.resolve=r.ready=r.start=function(i){return n=!0,e=i||e,t&&e(t),r},r}},function(e,t,n){var r=n(225),i=n(436);e.exports=function(){var e=r(),t=i();return{source:e,sink:t,resolve:function(n){e.resolve(n.source),t.resolve(n.sink)}}}},function(e,t){var n=t.once=function(e){return function(t,n){if(t)return n(t);if(null!=e){var r=e;e=null,n(null,r)}else n(!0)}},r=t.depthFirst=function(e,t){var r=[],i;return r.unshift(n(e)),function e(n,o){return r.length?i?o(i):void r[0](n,function(n,s){if(n){if(!0!==n){for(i=n,r.shift();r.length;)r.shift()(n,function(){});return o(n)}return r.shift(),e(null,o)}r.unshift(t(s)),o(n,s)}):o(!0)}},i=t.widthFirst=function(e,t){var r=[];return r.push(n(e)),function e(n,i){if(!r.length)return i(!0);r[0](n,function(n,o){if(n)return r.shift(),e(null,i);r.push(t(o)),i(n,o)})}},o=t.leafFirst=function(e,t){var r=[],i=[];return r.push(n(e)),function e(n,o){r[0](n,function(n,s){if(n)return r.shift(),i.length?o(null,i.shift()):o(!0);r.unshift(t(s)),i.unshift(s),e(null,o)})}}},function(e,t,n){"use strict";const r=n(416),i=Object.prototype.hasOwnProperty,o=Object.propertyIsEnumerable,s=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}),a=this,u={concatArrays:!1},l=e=>{const t=[];for(const n in e)i.call(e,n)&&t.push(n);if(Object.getOwnPropertySymbols){const n=Object.getOwnPropertySymbols(e);for(let r=0;r<n.length;r++)o.call(e,n[r])&&t.push(n[r])}return t};function c(e){return Array.isArray(e)?f(e):r(e)?h(e):e}function f(e){const t=e.slice(0,0);return l(e).forEach(n=>{s(t,n,c(e[n]))}),t}function h(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return l(e).forEach(n=>{s(t,n,c(e[n]))}),t}const p=(e,t,n,r)=>(n.forEach(n=>{n in e&&e[n]!==Object.getPrototypeOf(e)?s(e,n,m(e[n],t[n],r)):s(e,n,c(t[n]))}),e),d=(e,t,n)=>{let r=e.slice(0,0),o=0;return[e,t].forEach(t=>{const a=[];for(let n=0;n<t.length;n++)i.call(t,n)&&(a.push(String(n)),s(r,o++,t===e?t[n]:c(t[n])));r=p(r,t,l(t).filter(e=>-1===a.indexOf(e)),n)}),r};function m(e,t,n){return n.concatArrays&&Array.isArray(e)&&Array.isArray(t)?d(e,t,n):r(t)&&r(e)?p(e,t,l(t),n):c(t)}e.exports=function(){const e=m(c(u),this!==a&&this||{},u);let t={foobar:{}};for(let n=0;n<arguments.length;n++){const i=arguments[n];if(void 0!==i){if(!r(i))throw new TypeError("`"+i+"` is not an Option Object");t=m(t,{foobar:i},e)}}return t.foobar}},function(e,t,n){"use strict";(function(r){const i=n(858),o=n(58),s=n(9),a=n(870),u=n(453),l=42;function c(e){return"string"==typeof e?e=new s(e).buffer:s.isCID(e)&&(e=e.buffer),new i.Tagged(l,r.concat([r.from("00","hex"),e]))}const f=new i.Decoder({tags:{[l]:e=>(e=e.slice(1),new s(e))}});function h(e){let t;try{t=a(e)}catch(e){t=!1}if(t)throw new Error("The object passed has circular references");function n(e){if(!e||r.isBuffer(e)||"string"==typeof e)return e;if(Array.isArray(e))return e.map(n);if(s.isCID(e))return c(e);const t=Object.keys(e);if(1===t.length&&"/"===t[0])return c(e["/"]);if(t.length>0){const r={};return t.forEach(t=>{"object"==typeof e[t]?r[t]=n(e[t]):r[t]=e[t]}),r}return e}return n(e)}t=e.exports,t.serialize=((e,t)=>{let n;try{const r=h(e);n=i.encode(r)}catch(e){return setImmediate(()=>t(e))}setImmediate(()=>t(null,n))}),t.deserialize=((e,t)=>{let n;try{n=f.decodeFirst(e)}catch(e){return setImmediate(()=>t(e))}setImmediate(()=>t(null,n))}),t.cid=((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};const i=n.hashAlg||u.defaultHashAlg,a=n.hashLen,l=void 0===n.version?1:n.version;t.serialize(e,(e,t)=>{if(e)return r(e);o(t,i,a,(e,t)=>{if(e)return r(e);r(null,new s(l,u.multicodec,t))})})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t,r){const i=n(387),o=n(62),s=n(860),a=n(305),u=n(232),l=n(442),c=n(443),{URL:f}=n(306);class h{constructor(e){e=e||{},!e.size||e.size<65536?e.size=65536:e.size=a.nextPowerOf2(e.size),this._heap=new ArrayBuffer(e.size),this._heap8=new Uint8Array(this._heap),this._buffer=t.from(this._heap),this._reset(),this._knownTags=Object.assign({0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>a.arrayBufferToBignumber(e),3:e=>u.NEG_ONE.minus(a.arrayBufferToBignumber(e)),4:e=>u.TEN.pow(e[0]).times(e[1]),5:e=>u.TWO.pow(e[0]).times(e[1]),32:e=>new f(e),35:e=>new RegExp(e)},e.tags),this.parser=s(r,{log:console.log.bind(console),pushInt:this.pushInt.bind(this),pushInt32:this.pushInt32.bind(this),pushInt32Neg:this.pushInt32Neg.bind(this),pushInt64:this.pushInt64.bind(this),pushInt64Neg:this.pushInt64Neg.bind(this),pushFloat:this.pushFloat.bind(this),pushFloatSingle:this.pushFloatSingle.bind(this),pushFloatDouble:this.pushFloatDouble.bind(this),pushTrue:this.pushTrue.bind(this),pushFalse:this.pushFalse.bind(this),pushUndefined:this.pushUndefined.bind(this),pushNull:this.pushNull.bind(this),pushInfinity:this.pushInfinity.bind(this),pushInfinityNeg:this.pushInfinityNeg.bind(this),pushNaN:this.pushNaN.bind(this),pushNaNNeg:this.pushNaNNeg.bind(this),pushArrayStart:this.pushArrayStart.bind(this),pushArrayStartFixed:this.pushArrayStartFixed.bind(this),pushArrayStartFixed32:this.pushArrayStartFixed32.bind(this),pushArrayStartFixed64:this.pushArrayStartFixed64.bind(this),pushObjectStart:this.pushObjectStart.bind(this),pushObjectStartFixed:this.pushObjectStartFixed.bind(this),pushObjectStartFixed32:this.pushObjectStartFixed32.bind(this),pushObjectStartFixed64:this.pushObjectStartFixed64.bind(this),pushByteString:this.pushByteString.bind(this),pushByteStringStart:this.pushByteStringStart.bind(this),pushUtf8String:this.pushUtf8String.bind(this),pushUtf8StringStart:this.pushUtf8StringStart.bind(this),pushSimpleUnassigned:this.pushSimpleUnassigned.bind(this),pushTagUnassigned:this.pushTagUnassigned.bind(this),pushTagStart:this.pushTagStart.bind(this),pushTagStart4:this.pushTagStart4.bind(this),pushTagStart8:this.pushTagStart8.bind(this),pushBreak:this.pushBreak.bind(this)},this._heap)}get _depth(){return this._parents.length}get _currentParent(){return this._parents[this._depth-1]}get _ref(){return this._currentParent.ref}_closeParent(){var e=this._parents.pop();if(e.length>0)throw new Error(`Missing ${e.length} elements`);switch(e.type){case u.PARENT.TAG:this._push(this.createTag(e.ref[0],e.ref[1]));break;case u.PARENT.BYTE_STRING:this._push(this.createByteString(e.ref,e.length));break;case u.PARENT.UTF8_STRING:this._push(this.createUtf8String(e.ref,e.length));break;case u.PARENT.MAP:if(e.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createMap(e.ref,e.length));break;case u.PARENT.OBJECT:if(e.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createObject(e.ref,e.length));break;case u.PARENT.ARRAY:this._push(this.createArray(e.ref,e.length))}this._currentParent&&this._currentParent.type===u.PARENT.TAG&&this._dec()}_dec(){const e=this._currentParent;e.length<0||(e.length--,0===e.length&&this._closeParent())}_push(e,t){const n=this._currentParent;switch(n.values++,n.type){case u.PARENT.ARRAY:case u.PARENT.BYTE_STRING:case u.PARENT.UTF8_STRING:n.length>-1?this._ref[this._ref.length-n.length]=e:this._ref.push(e),this._dec();break;case u.PARENT.OBJECT:null!=n.tmpKey?(this._ref[n.tmpKey]=e,n.tmpKey=null,this._dec()):(n.tmpKey=e,"string"!=typeof n.tmpKey&&(n.type=u.PARENT.MAP,n.ref=a.buildMap(n.ref)));break;case u.PARENT.MAP:null!=n.tmpKey?(this._ref.set(n.tmpKey,e),n.tmpKey=null,this._dec()):n.tmpKey=e;break;case u.PARENT.TAG:this._ref.push(e),t||this._dec();break;default:throw new Error("Unknown parent type")}}_createParent(e,t,n){this._parents[this._depth]={type:t,length:n,ref:e,values:0,tmpKey:null}}_reset(){this._res=[],this._parents=[{type:u.PARENT.ARRAY,length:-1,ref:this._res,values:0,tmpKey:null}]}createTag(e,t){const n=this._knownTags[e];return n?n(t):new c(e,t)}createMap(e,t){return e}createObject(e,t){return e}createArray(e,t){return e}createByteString(e,n){return t.concat(e)}createByteStringFromHeap(e,n){return e===n?t.alloc(0):t.from(this._heap.slice(e,n))}createInt(e){return e}createInt32(e,t){return a.buildInt32(e,t)}createInt64(e,t,n,r){return a.buildInt64(e,t,n,r)}createFloat(e){return e}createFloatSingle(e,t,n,r){return i.read([e,t,n,r],0,!1,23,4)}createFloatDouble(e,t,n,r,o,s,a,u){return i.read([e,t,n,r,o,s,a,u],0,!1,52,8)}createInt32Neg(e,t){return-1-a.buildInt32(e,t)}createInt64Neg(e,t,n,r){const i=a.buildInt32(e,t),s=a.buildInt32(n,r);return i>u.MAX_SAFE_HIGH?u.NEG_ONE.minus(new o(i).times(u.SHIFT32).plus(s)):-1-(i*u.SHIFT32+s)}createTrue(){return!0}createFalse(){return!1}createNull(){return null}createUndefined(){}createInfinity(){return 1/0}createInfinityNeg(){return-1/0}createNaN(){return NaN}createNaNNeg(){return NaN}createUtf8String(e,t){return e.join("")}createUtf8StringFromHeap(e,t){return e===t?"":this._buffer.toString("utf8",e,t)}createSimpleUnassigned(e){return new l(e)}pushInt(e){this._push(this.createInt(e))}pushInt32(e,t){this._push(this.createInt32(e,t))}pushInt64(e,t,n,r){this._push(this.createInt64(e,t,n,r))}pushFloat(e){this._push(this.createFloat(e))}pushFloatSingle(e,t,n,r){this._push(this.createFloatSingle(e,t,n,r))}pushFloatDouble(e,t,n,r,i,o,s,a){this._push(this.createFloatDouble(e,t,n,r,i,o,s,a))}pushInt32Neg(e,t){this._push(this.createInt32Neg(e,t))}pushInt64Neg(e,t,n,r){this._push(this.createInt64Neg(e,t,n,r))}pushTrue(){this._push(this.createTrue())}pushFalse(){this._push(this.createFalse())}pushNull(){this._push(this.createNull())}pushUndefined(){this._push(this.createUndefined())}pushInfinity(){this._push(this.createInfinity())}pushInfinityNeg(){this._push(this.createInfinityNeg())}pushNaN(){this._push(this.createNaN())}pushNaNNeg(){this._push(this.createNaNNeg())}pushArrayStart(){this._createParent([],u.PARENT.ARRAY,-1)}pushArrayStartFixed(e){this._createArrayStartFixed(e)}pushArrayStartFixed32(e,t){const n=a.buildInt32(e,t);this._createArrayStartFixed(n)}pushArrayStartFixed64(e,t,n,r){const i=a.buildInt64(e,t,n,r);this._createArrayStartFixed(i)}pushObjectStart(){this._createObjectStartFixed(-1)}pushObjectStartFixed(e){this._createObjectStartFixed(e)}pushObjectStartFixed32(e,t){const n=a.buildInt32(e,t);this._createObjectStartFixed(n)}pushObjectStartFixed64(e,t,n,r){const i=a.buildInt64(e,t,n,r);this._createObjectStartFixed(i)}pushByteStringStart(){this._parents[this._depth]={type:u.PARENT.BYTE_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushByteString(e,t){this._push(this.createByteStringFromHeap(e,t))}pushUtf8StringStart(){this._parents[this._depth]={type:u.PARENT.UTF8_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushUtf8String(e,t){this._push(this.createUtf8StringFromHeap(e,t))}pushSimpleUnassigned(e){this._push(this.createSimpleUnassigned(e))}pushTagStart(e){this._parents[this._depth]={type:u.PARENT.TAG,length:1,ref:[e]}}pushTagStart4(e,t){this.pushTagStart(a.buildInt32(e,t))}pushTagStart8(e,t,n,r){this.pushTagStart(a.buildInt64(e,t,n,r))}pushTagUnassigned(e){this._push(this.createTag(e))}pushBreak(){if(this._currentParent.length>-1)throw new Error("Unexpected break");this._closeParent()}_createObjectStartFixed(e){0!==e?this._createParent({},u.PARENT.OBJECT,e):this._push(this.createObject({}))}_createArrayStartFixed(e){0!==e?this._createParent(new Array(e),u.PARENT.ARRAY,e):this._push(this.createArray([]))}_decode(e){if(0===e.byteLength)throw new Error("Input too short");this._reset(),this._heap8.set(e);const t=this.parser.parse(e.byteLength);if(this._depth>1){for(;0===this._currentParent.length;)this._closeParent();if(this._depth>1)throw new Error("Undeterminated nesting")}if(t>0)throw new Error("Failed to parse");if(0===this._res.length)throw new Error("No valid result")}decodeFirst(e){return this._decode(e),this._res[0]}decodeAll(e){return this._decode(e),this._res}static decode(e,n){"string"==typeof e&&(e=t.from(e,n||"hex"));const r=new h({size:e.length});return r.decodeFirst(e)}static decodeAll(e,n){"string"==typeof e&&(e=t.from(e,n||"hex"));const r=new h({size:e.length});return r.decodeAll(e)}}h.decodeFirst=h.decode,e.exports=h}).call(this,n(0).Buffer,n(8))},function(e,t,n){"use strict";const r=n(232),i=r.MT,o=r.SIMPLE,s=r.SYMS;class a{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error("value must be a small positive integer: "+e);this.value=e}toString(){return"simple("+this.value+")"}inspect(){return"simple("+this.value+")"}encodeCBOR(e){return e._pushInt(this.value,i.SIMPLE_FLOAT)}static isSimple(e){return e instanceof a}static decode(e,t){switch(null==t&&(t=!0),e){case o.FALSE:return!1;case o.TRUE:return!0;case o.NULL:return t?null:s.NULL;case o.UNDEFINED:return t?void 0:s.UNDEFINED;case-1:if(!t)throw new Error("Invalid BREAK");return s.BREAK;default:return new a(e)}}}e.exports=a},function(e,t,n){"use strict";class r{constructor(e,t,n){if(this.tag=e,this.value=t,this.err=n,"number"!=typeof this.tag)throw new Error("Invalid tag type ("+typeof this.tag+")");if(this.tag<0||(0|this.tag)!==this.tag)throw new Error("Tag must be a positive integer: "+this.tag)}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(e){return e._pushTag(this.tag),e.pushAny(this.value)}convert(e){var t,n;if(n=null!=e?e[this.tag]:void 0,"function"!=typeof n&&(n=r["_tag"+this.tag],"function"!=typeof n))return this;try{return n.call(r,this.value)}catch(e){return t=e,this.err=t,this}}}e.exports=r},function(e,t,n){"use strict";const r=self.location?self.location.protocol+"//"+self.location.host:"",i=self.URL;class o{constructor(e,t=r){this.super=new i(e,t),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(e){this.super.hash=e}set host(e){this.super.host=e}set hostname(e){this.super.hostname=e}set href(e){this.super.href=e}set origin(e){this.super.origin=e}set password(e){this.super.password=e}set pathname(e){this.super.pathname=e}set port(e){this.super.port=e}set protocol(e){this.super.protocol=e}set search(e){this.super.search=e}set searchParams(e){this.super.searchParams=e}set username(e){this.super.username=e}createObjectURL(e){return this.super.createObjectURL(e)}revokeObjectURL(e){this.super.revokeObjectURL(e)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}}function s(e){if("string"==typeof e){const t=new i(e);return t.toString()}if(!(e instanceof i)){const t=e.username&&e.password?`${e.username}:${e.password}@`:"",n=e.auth?e.auth+"@":"",r=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",o=e.host||"",s=e.hostname||"",a=e.search||(e.query?"?"+e.query:""),u=e.hash||"",l=e.pathname||"",c=e.path||l+a;return`${i}${t||n}${o||s+r}${c}${u}`}}e.exports={URLWithLegacySupport:o,URLSearchParams:self.URLSearchParams,defaultBase:r,format:s}},function(e,t,n){(function(r,i){var o;
/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.8.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/
/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.8.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/
!function(){"use strict";var s="input is invalid type",a="finalize already called",u="object"==typeof window,l=u?window:{};l.JS_SHA3_NO_WINDOW&&(u=!1);var c=!u&&"object"==typeof self,f=!l.JS_SHA3_NO_NODE_JS&&"object"==typeof r&&r.versions&&r.versions.node;f?l=i:c&&(l=self);var h=!l.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,p=n(446),d=!l.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,m="0123456789abcdef".split(""),g=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],b=[1,256,65536,16777216],v=[6,1536,393216,100663296],w=[0,8,16,24],_=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],k=[224,256,384,512],S=[128,256],E=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};!l.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var C=function(e,t,n){return function(r){return new H(e,t,e).update(r)[n]()}},A=function(e,t,n){return function(r,i){return new H(e,t,i).update(r)[n]()}},I=function(e,t,n){return function(t,r,i,o){return M["cshake"+e].update(t,r,i,o)[n]()}},T=function(e,t,n){return function(t,r,i,o){return M["kmac"+e].update(t,r,i,o)[n]()}},j=function(e,t,n,r){for(var i=0;i<E.length;++i){var o=E[i];e[o]=t(n,r,o)}return e},O=function(e,t){var n=C(e,t,"hex");return n.create=function(){return new H(e,t,e)},n.update=function(e){return n.create().update(e)},j(n,C,e,t)},P=function(e,t){var n=A(e,t,"hex");return n.create=function(n){return new H(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},j(n,A,e,t)},B=function(e,t){var n=x[e],r=I(e,t,"hex");return r.create=function(r,i,o){return i||o?new H(e,t,r).bytepad([i,o],n):M["shake"+e].create(r)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},j(r,I,e,t)},R=function(e,t){var n=x[e],r=T(e,t,"hex");return r.create=function(r,i,o){return new V(e,t,i).bytepad(["KMAC",o],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},j(r,T,e,t)},N=[{name:"keccak",padding:b,bits:k,createMethod:O},{name:"sha3",padding:v,bits:k,createMethod:O},{name:"shake",padding:g,bits:S,createMethod:P},{name:"cshake",padding:y,bits:S,createMethod:B},{name:"kmac",padding:y,bits:S,createMethod:R}],M={},L=[],F=0;F<N.length;++F)for(var D=N[F],U=D.bits,z=0;z<U.length;++z){var q=D.name+"_"+U[z];if(L.push(q),M[q]=D.createMethod(U[z],D.padding),"sha3"!==D.name){var K=D.name+U[z];L.push(K),M[K]=M[q]}}function H(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function V(e,t,n){H.call(this,e,t,n)}H.prototype.update=function(e){if(this.finalized)throw new Error(a);var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(s);if(null===e)throw new Error(s);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var r=this.blocks,i=this.byteCount,o=e.length,u=this.blockCount,l=0,c=this.s,f,h;l<o;){if(this.reset)for(this.reset=!1,r[0]=this.block,f=1;f<u+1;++f)r[f]=0;if(t)for(f=this.start;l<o&&f<i;++l)r[f>>2]|=e[l]<<w[3&f++];else for(f=this.start;l<o&&f<i;++l)h=e.charCodeAt(l),h<128?r[f>>2]|=h<<w[3&f++]:h<2048?(r[f>>2]|=(192|h>>6)<<w[3&f++],r[f>>2]|=(128|63&h)<<w[3&f++]):h<55296||h>=57344?(r[f>>2]|=(224|h>>12)<<w[3&f++],r[f>>2]|=(128|h>>6&63)<<w[3&f++],r[f>>2]|=(128|63&h)<<w[3&f++]):(h=65536+((1023&h)<<10|1023&e.charCodeAt(++l)),r[f>>2]|=(240|h>>18)<<w[3&f++],r[f>>2]|=(128|h>>12&63)<<w[3&f++],r[f>>2]|=(128|h>>6&63)<<w[3&f++],r[f>>2]|=(128|63&h)<<w[3&f++]);if(this.lastByteIndex=f,f>=i){for(this.start=f-i,this.block=r[u],f=0;f<u;++f)c[f]^=r[f];W(c),this.reset=!0}else this.start=f}return this},H.prototype.encode=function(e,t){var n=255&e,r=1,i=[n];for(e>>=8,n=255&e;n>0;)i.unshift(n),e>>=8,n=255&e,++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},H.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(s);if(null===e)throw new Error(s);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var r=0,i=e.length;if(t)r=i;else for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),r+=4)}return r+=this.encode(8*r),this.update(e),r},H.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,o=[];return o.length=i,this.update(o),this},H.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];W(r)}},H.prototype.toString=H.prototype.hex=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,o=0,s="",a;o<n;){for(i=0;i<e&&o<n;++i,++o)a=t[i],s+=m[a>>4&15]+m[15&a]+m[a>>12&15]+m[a>>8&15]+m[a>>20&15]+m[a>>16&15]+m[a>>28&15]+m[a>>24&15];o%e==0&&(W(t),i=0)}return r&&(a=t[i],s+=m[a>>4&15]+m[15&a],r>1&&(s+=m[a>>12&15]+m[a>>8&15]),r>2&&(s+=m[a>>20&15]+m[a>>16&15])),s},H.prototype.arrayBuffer=function(){this.finalize();var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,o=0,s=this.outputBits>>3,a;a=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(a);o<n;){for(i=0;i<e&&o<n;++i,++o)u[o]=t[i];o%e==0&&W(t)}return r&&(u[i]=t[i],a=a.slice(0,s)),a},H.prototype.buffer=H.prototype.arrayBuffer,H.prototype.digest=H.prototype.array=function(){this.finalize();for(var e=this.blockCount,t=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,o=0,s=[],a,u;o<n;){for(i=0;i<e&&o<n;++i,++o)a=o<<2,u=t[i],s[a]=255&u,s[a+1]=u>>8&255,s[a+2]=u>>16&255,s[a+3]=u>>24&255;o%e==0&&W(t)}return r&&(a=o<<2,u=t[i],s[a]=255&u,r>1&&(s[a+1]=u>>8&255),r>2&&(s[a+2]=u>>16&255)),s},V.prototype=new H,V.prototype.finalize=function(){return this.encode(this.outputBits,!0),H.prototype.finalize.call(this)};var W=function(e){var t,n,r,i,o,s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,k,S,E,x,C,A,I,T,j,O,P,B,R,N,M,L,F,D,U,z,q,K,H,V,W,$,G,Y,J,Z,X,Q,ee,te,ne,re,ie,oe,se,ae,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],p=e[9]^e[19]^e[29]^e[39]^e[49],t=h^(s<<1|a>>>31),n=p^(a<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|l>>>31),n=o^(l<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(c<<1|f>>>31),n=a^(f<<1|c>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(h<<1|p>>>31),n=l^(p<<1|h>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=c^(i<<1|o>>>31),n=f^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,d=e[0],m=e[1],$=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,j=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,K=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,M=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=d^~g&b,e[1]=m^~y&v,e[10]=x^~A&T,e[11]=C^~I&j,e[20]=N^~L&D,e[21]=M^~F&U,e[30]=V^~$&Y,e[31]=W^~G&J,e[40]=te^~re&oe,e[41]=ne^~ie&se,e[2]=g^~b&w,e[3]=y^~v&k,e[12]=A^~T&O,e[13]=I^~j&P,e[22]=L^~D&z,e[23]=F^~U&q,e[32]=$^~Y&Z,e[33]=G^~J&X,e[42]=re^~oe&ae,e[43]=ie^~se&ue,e[4]=b^~w&S,e[5]=v^~k&E,e[14]=T^~O&B,e[15]=j^~P&R,e[24]=D^~z&K,e[25]=U^~q&H,e[34]=Y^~Z&Q,e[35]=J^~X&ee,e[44]=oe^~ae&le,e[45]=se^~ue&ce,e[6]=w^~S&d,e[7]=k^~E&m,e[16]=O^~B&x,e[17]=P^~R&C,e[26]=z^~K&N,e[27]=q^~H&M,e[36]=Z^~Q&V,e[37]=X^~ee&W,e[46]=ae^~le&te,e[47]=ue^~ce&ne,e[8]=S^~d&g,e[9]=E^~m&y,e[18]=B^~x&A,e[19]=R^~C&I,e[28]=K^~N&L,e[29]=H^~M&F,e[38]=Q^~V&$,e[39]=ee^~W&G,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=_[r],e[1]^=_[r+1]};if(h)e.exports=M;else{for(F=0;F<L.length;++F)l[L[F]]=M[L[F]];p&&(o=function(){return M}.call(t,n,t,e),void 0===o||(e.exports=o))}}()}).call(this,n(2),n(8))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){e.exports=n(864)},function(e,t,n){"use strict";(function(e,n){t.toCallback=(t=>(function(n,r){let i;try{i=t(n)}catch(t){return void e.nextTick(r,t)}e.nextTick(r,null,i)})),t.toBuf=((e,t)=>r=>{let i=e(r,t);return n.from(i,"hex")}),t.fromString=((e,t)=>r=>{const i=n.isBuffer(r)?r.toString():r;return e(i,t)}),t.fromNumberTo32BitBuf=((e,t)=>r=>{let i=e(r,t);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return n.from(o)})}).call(this,n(2),n(0).Buffer)},function(e,t,n){(function(t){var r=n(866),i=n(450),o;function s(e,t){return"function"!=typeof t?e:e.then(function(e){o(function(){t(null,e)})},function(e){o(function(){t(e)})})}function a(e){return s(this,e)}function u(e){if(e&&i(e)){e.nodeify=a;var t=e.then;return e.then=function(){return u(t.apply(this,arguments))},e}"function"==typeof e?e.prototype.nodeify=a:r.prototype.nodeify=a}function l(e){if(!(this instanceof l))return new l(e);r.call(this,e),u(this)}o="function"==typeof setImmediate?setImmediate:"object"==typeof t&&t&&t.nextTick?t.nextTick:function(e){setTimeout(e,0)},e.exports=s,s.extend=u,s.Promise=l,l.prototype=Object.create(r.prototype),l.prototype.constructor=l}).call(this,n(2))},function(e,t){function n(e){return e&&"function"==typeof e.then}e.exports=n},function(e,t,n){var r=n(868),i=n(869);e.exports={blake2b:r.blake2b,blake2bHex:r.blake2bHex,blake2bInit:r.blake2bInit,blake2bUpdate:r.blake2bUpdate,blake2bFinal:r.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},function(e,t,n){(function(t){var n="Input must be an string, Buffer or Uint8Array";function r(e){var r;if(e instanceof Uint8Array)r=e;else if(e instanceof t)r=new Uint8Array(e);else{if("string"!=typeof e)throw new Error(n);r=new Uint8Array(t.from(e,"utf8"))}return r}function i(e){return Array.prototype.map.call(e,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}function o(e){return(4294967296+e).toString(16).substring(1)}function s(e,t,n){for(var r="\n"+e+" = ",i=0;i<t.length;i+=2){if(32===n)r+=o(t[i]).toUpperCase(),r+=" ",r+=o(t[i+1]).toUpperCase();else{if(64!==n)throw new Error("Invalid size "+n);r+=o(t[i+1]).toUpperCase(),r+=o(t[i]).toUpperCase()}i%6==4?r+="\n"+new Array(e.length+4).join(" "):i<t.length-2&&(r+=" ")}console.log(r)}function a(e,t,n){for(var r=(new Date).getTime(),i=new Uint8Array(t),o=0;o<t;o++)i[o]=o%256;var s=(new Date).getTime();for(console.log("Generated random input in "+(s-r)+"ms"),r=s,o=0;o<n;o++){var a=e(i),u=(new Date).getTime(),l=u-r;r=u,console.log("Hashed in "+l+"ms: "+a.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(l/1e3)*100)/100+" MB PER SECOND")}}e.exports={normalizeInput:r,toHex:i,debugPrint:s,testSpeed:a}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(440),o=n(454),s=n(9);function a(e,t){return t=t||"/",0===Object.keys(e).length?[]:o(e).reduce(function(e,n){s.isCID(n)&&this.update(void 0);const r=this.path.join(t);return""!==r&&e.push({path:r,value:n}),e},[])}t=e.exports,t.multicodec="dag-cbor",t.defaultHashAlg="sha2-256",t.resolve=((e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),i.deserialize(e,(e,i)=>{if(e)return n(e);if(!t||"/"===t)return n(null,{value:i,remainderPath:""});const s=t.split("/"),a=o(i).get(s);if(void 0!==a)return n(null,{value:a,remainderPath:""});let u;const l=s.length;for(let e=0;e<l;e++){const e=s.shift();if(Array.isArray(i)&&!r.isBuffer(i)&&(u=i[Number(e)]),!i[e])return u?(s.unshift(e),n(null,{value:u,remainderPath:s.join("/")})):n(new Error("path not available at root"));u=i[e],i=u}})}),t.tree=((e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),t=t||{},i.deserialize(e,(e,t)=>{if(e)return n(e);const r=a(t),i=r.map(e=>e.path);n(null,i)})}),t.isLink=((e,n,r)=>{t.resolve(e,n,(e,t)=>e?r(e):t.remainderPath.length>0?r(new Error("path out of scope")):void(s.isCID(t.value)?r(null,t.value):r(null,!1)))})}).call(this,n(0).Buffer)},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function i(e,t,n){var r=[],i=[],a=!0;return function e(u){var l=n?o(u):u,c={},f=!0,h={node:l,node_:u,path:[].concat(r),parent:i[i.length-1],parents:i,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){d(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){c.before=e},after:function(e){c.after=e},pre:function(e){c.pre=e},post:function(e){c.post=e},stop:function(){a=!1},block:function(){f=!1}};if(!a)return h;function p(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=s(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===u){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}p();var y=t.call(h,h.node);return void 0!==y&&h.update&&h.update(y),c.before&&c.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),p(),m(h.keys,function(t,i){r.push(t),c.pre&&c.pre.call(h,h.node[t],t);var o=e(h.node[t]);n&&g.call(h.node,t)&&(h.node[t]=o.node),o.isLast=i==h.keys.length-1,o.isFirst=0==i,c.post&&c.post.call(h,o),r.pop()}),i.pop()),c.after&&c.after.call(h,h.node),h):h}(e).node}function o(e){if("object"==typeof e&&null!==e){var t;if(d(e))t=[];else if(u(e))t=new Date(e.getTime?e.getTime():e);else if(l(e))t=new RegExp(e);else if(c(e))t={message:e.message};else if(f(e))t=new Boolean(e);else if(h(e))t=new Number(e);else if(p(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return m(s(e),function(n){t[n]=e[n]}),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!g.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!g.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var i=e[r];g.call(n,i)||(n[i]={}),n=n[i]}return n[e[r]]=t,t},r.prototype.map=function(e){return i(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=i(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach(function(t){this.isRoot&&n||(r=e.call(this,r,t))}),r},r.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},r.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var i=0;i<e.length;i++)if(e[i]===r)return t[i];if("object"==typeof r&&null!==r){var a=o(r);return e.push(r),t.push(a),m(s(r),function(e){a[e]=n(r[e])}),e.pop(),t.pop(),a}return r}(this.value)};var s=Object.keys||function e(t){var n=[];for(var r in t)n.push(r);return n};function a(e){return Object.prototype.toString.call(e)}function u(e){return"[object Date]"===a(e)}function l(e){return"[object RegExp]"===a(e)}function c(e){return"[object Error]"===a(e)}function f(e){return"[object Boolean]"===a(e)}function h(e){return"[object Number]"===a(e)}function p(e){return"[object String]"===a(e)}var d=Array.isArray||function e(t){return"[object Array]"===Object.prototype.toString.call(t)},m=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};m(s(r.prototype),function(e){n[e]=function(t){var n=[].slice.call(arguments,1),i=new r(t);return i[e].apply(i,n)}});var g=Object.hasOwnProperty||function(e,t){return t in e}},function(e,t,n){"use strict";const r=n(11),i=n(9),o=n(235);t=e.exports,t.multicodec="dag-pb",t.defaultHashAlg="sha2-256",t.resolve=((e,t,n)=>{r([t=>o.deserialize(e,t),(e,r)=>{if(!t)return n(null,{value:e,remainderPath:""});const i=t.split("/");if("Links"===i[0]){let t="";if(!i[1])return r(null,{value:e.links.map(e=>e.toJSON()),remainderPath:""});const n={};e.links.forEach((e,t)=>{const r=e.toJSON();n[t]=n[r.name]={cid:r.cid,name:r.name,size:r.size}});let o=n[i[1]];"Hash"===i[2]?o={"/":o.cid}:"Tsize"===i[2]?o=o.size:"Name"===i[2]&&(o=o.name),t=i.slice(3).join("/"),r(null,{value:o,remainderPath:t})}else if("Data"===i[0])r(null,{value:e.data,remainderPath:""});else{const t={};e.links.forEach((e,n)=>{const r=e.toJSON();t[r.name]={cid:r.cid,name:r.name,size:r.size}});const n=t[i[0]];if(n)return r(null,{value:{"/":n.cid},remainderPath:i.slice(1).join("/")});r(new Error("path not available"))}}],n)}),t.tree=((e,t,n)=>{"function"==typeof t&&(n=t,t={}),t=t||{},o.deserialize(e,(e,t)=>{if(e)return n(e);const r=[];r.push("Links"),t.links.forEach((e,t)=>{r.push(`Links/${t}/Name`),r.push(`Links/${t}/Tsize`),r.push(`Links/${t}/Hash`)}),r.push("Data"),n(null,r)})}),t.isLink=((e,n,r)=>{t.resolve(e,n,(e,t)=>{if(e)return r(e);if(t.remainderPath.length>0)return r(new Error("path out of scope"));if("object"==typeof t.value&&t.value["/"]){let n;try{n=i.isCID(new i(t.value["/"]))}catch(e){n=!1}if(n)return r(null,t.value)}r(null,!1)})})},function(e,t,n){"use strict";(function(r){const i=n(71),o=i(n(308));n(140),n(309),n(310);const s=n(19);t=e.exports;const a={rsa:n(898),ed25519:n(913),secp256k1:n(917)(o,n(315))};function u(e){const t=a[e.toLowerCase()];return void 0!==t}t.supportedKeys=a,t.keysPBM=o,t.keyStretcher=n(933),t.generateEphemeralKeyPair=n(935),t.generateKeyPair=((e,t,n)=>{let r=a[e.toLowerCase()];if(!r)return n(new Error("invalid or unsupported key type"));r.generateKeyPair(t,n)}),t.generateKeyPairFromSeed=((e,t,n,r)=>{let i=a[e.toLowerCase()];return i?"ed25519"!==e.toLowerCase()?r(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,n,r):r(new Error("invalid or unsupported key type"))}),t.unmarshalPublicKey=(e=>{const t=o.PublicKey.decode(e),n=t.Data;switch(t.Type){case o.KeyType.RSA:return a.rsa.unmarshalRsaPublicKey(n);case o.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PublicKey(n);case o.KeyType.Secp256k1:if(a.secp256k1)return a.secp256k1.unmarshalSecp256k1PublicKey(n);throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package");default:throw new Error("invalid or unsupported key type")}}),t.marshalPublicKey=((e,t)=>{if(t=(t||"rsa").toLowerCase(),!u(t))throw new Error("invalid or unsupported key type");return e.bytes}),t.unmarshalPrivateKey=((e,t)=>{let n;try{n=o.PrivateKey.decode(e)}catch(e){return t(e)}const r=n.Data;switch(n.Type){case o.KeyType.RSA:return a.rsa.unmarshalRsaPrivateKey(r,t);case o.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PrivateKey(r,t);case o.KeyType.Secp256k1:return a.secp256k1?a.secp256k1.unmarshalSecp256k1PrivateKey(r,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"));default:t(new Error("invalid or unsupported key type"))}}),t.marshalPrivateKey=((e,t)=>{if(t=(t||"rsa").toLowerCase(),!u(t))throw new Error("invalid or unsupported key type");return e.bytes}),t.import=((e,t,n)=>{try{const i=s.pki.decryptRsaPrivateKey(e,t);if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key");let o=s.asn1.toDer(s.pki.privateKeyToAsn1(i));return o=r.from(o.getBytes(),"binary"),a.rsa.unmarshalRsaPrivateKey(o,n)}catch(e){n(e)}})}).call(this,n(0).Buffer)},function(e,t,n){var r=n(19),i;e.exports=r.jsbn=r.jsbn||{};var o=0xdeadbeefcafe,s=!0;function a(e,t,n){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function u(){return new a(null)}function l(e,t,n,r,i,o){for(;--o>=0;){var s=t*this.data[e++]+n.data[r]+i;i=Math.floor(s/67108864),n.data[r++]=67108863&s}return i}function c(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this.data[e],l=this.data[e++]>>15,c=a*u+l*s;u=s*u+((32767&c)<<15)+n.data[r]+(1073741823&i),i=(u>>>30)+(c>>>15)+a*l+(i>>>30),n.data[r++]=1073741823&u}return i}function f(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this.data[e],l=this.data[e++]>>14,c=a*u+l*s;u=s*u+((16383&c)<<14)+n.data[r]+i,i=(u>>28)+(c>>14)+a*l,n.data[r++]=268435455&u}return i}r.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=f,i=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=c,i=30):"Netscape"!=navigator.appName?(a.prototype.am=l,i=26):(a.prototype.am=f,i=28),a.prototype.DB=i,a.prototype.DM=(1<<i)-1,a.prototype.DV=1<<i;var h=52;a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-i,a.prototype.F2=2*i-52;var p="0123456789abcdefghijklmnopqrstuvwxyz",d=new Array,m,g;for(m="0".charCodeAt(0),g=0;g<=9;++g)d[m++]=g;for(m="a".charCodeAt(0),g=10;g<36;++g)d[m++]=g;for(m="A".charCodeAt(0),g=10;g<36;++g)d[m++]=g;function y(e){return p.charAt(e)}function b(e,t){var n=d[e.charCodeAt(t)];return null==n?-1:n}function v(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function w(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function _(e){var t=u();return t.fromInt(e),t}function k(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;--r>=0;){var s=8==n?255&e[r]:b(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+n>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this.data[this.t++]=s>>this.DB-o):this.data[this.t-1]|=s<<o,o+=n,o>=this.DB&&(o-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)}function S(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function E(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n=(1<<t)-1,r,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this.data[s]>>a)>0&&(i=!0,o=y(r));s>=0;)a<t?(r=(this.data[s]&(1<<a)-1)<<t-a,r|=this.data[--s]>>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=y(r));return i?o:"0"}function x(){var e=u();return a.ZERO.subTo(this,e),e}function C(){return this.s<0?this.negate():this}function A(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this.data[n]-e.data[n]))return t;return 0}function I(e){var t=1,n;return 0!=(n=e>>>16)&&(e=n,t+=16),0!=(n=e>>8)&&(e=n,t+=8),0!=(n=e>>4)&&(e=n,t+=4),0!=(n=e>>2)&&(e=n,t+=2),0!=(n=e>>1)&&(e=n,t+=1),t}function T(){return this.t<=0?0:this.DB*(this.t-1)+I(this.data[this.t-1]^this.s&this.DM)}function j(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s}function O(e,t){for(var n=e;n<this.t;++n)t.data[n-e]=this.data[n];t.t=Math.max(this.t-e,0),t.s=this.s}function P(e,t){var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),s=this.s<<n&this.DM,a;for(a=this.t-1;a>=0;--a)t.data[a+o+1]=this.data[a]>>r|s,s=(this.data[a]&i)<<n;for(a=o-1;a>=0;--a)t.data[a]=0;t.data[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()}function B(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t.data[0]=this.data[n]>>r;for(var s=n+1;s<this.t;++s)t.data[s-n-1]|=(this.data[s]&o)<<i,t.data[s-n]=this.data[s]>>r;r>0&&(t.data[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}}function R(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]-e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()}function N(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t.data[i]=0;for(i=0;i<r.t;++i)t.data[i+n.t]=n.am(0,r.data[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&a.ZERO.subTo(t,t)}function M(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e.data[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t.data[n],e,2*n,0,1);(e.data[n+t.t]+=t.am(n+1,2*t.data[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()}function L(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=u());var o=u(),s=this.s,l=e.s,c=this.DB-I(r.data[r.t-1]);c>0?(r.lShiftTo(c,o),i.lShiftTo(c,n)):(r.copyTo(o),i.copyTo(n));var f=o.t,h=o.data[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?o.data[f-2]>>this.F2:0),d=this.FV/p,m=(1<<this.F1)/p,g=1<<this.F2,y=n.t,b=y-f,v=null==t?u():t;for(o.dlShiftTo(b,v),n.compareTo(v)>=0&&(n.data[n.t++]=1,n.subTo(v,n)),a.ONE.dlShiftTo(f,v),v.subTo(o,o);o.t<f;)o.data[o.t++]=0;for(;--b>=0;){var w=n.data[--y]==h?this.DM:Math.floor(n.data[y]*d+(n.data[y-1]+g)*m);if((n.data[y]+=o.am(0,w,n,b,0,f))<w)for(o.dlShiftTo(b,v),n.subTo(v,n);n.data[y]<--w;)n.subTo(v,n)}null!=t&&(n.drShiftTo(f,t),s!=l&&a.ZERO.subTo(t,t)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&a.ZERO.subTo(n,n)}}}function F(e){var t=u();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t}function D(e){this.m=e}function U(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function z(e){return e}function q(e){e.divRemTo(this.m,null,e)}function K(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function H(e,t){e.squareTo(t),this.reduce(t)}function V(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function W(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function $(e){var t=u();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t}function G(e){var t=u();return e.copyTo(t),this.reduce(t),t}function Y(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e.data[t],r=n*this.mpl+((n*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);e.data[n]>=e.DV;)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function J(e,t){e.squareTo(t),this.reduce(t)}function Z(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function X(){return 0==(this.t>0?1&this.data[0]:this.s)}function Q(e,t){if(e>4294967295||e<1)return a.ONE;var n=u(),r=u(),i=t.convert(this),o=I(e)-1;for(i.copyTo(n);--o>=0;)if(t.sqrTo(n,r),(e&1<<o)>0)t.mulTo(r,i,n);else{var s=n;n=r,r=s}return t.revert(n)}function ee(e,t){var n;return n=e<256||t.isEven()?new D(t):new W(t),this.exp(e,n)}function te(){var e=u();return this.copyTo(e),e}function ne(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function re(){return 0==this.t?this.s:this.data[0]<<24>>24}function ie(){return 0==this.t?this.s:this.data[0]<<16>>16}function oe(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function se(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1}function ae(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=_(n),i=u(),o=u(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(e).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(e)+s}function ue(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,o=0,s=0,u=0;u<e.length;++u){var l=b(e,u);l<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(s=t*s+l,++o>=n&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)}function le(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(a.ONE.shiftLeft(e-1),ye,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(a.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),t.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}}function ce(){var e=this.t,t=new Array;t[0]=this.s;var n=this.DB-e*this.DB%8,r,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t}function fe(e){return 0==this.compareTo(e)}function he(e){return this.compareTo(e)<0?this:e}function pe(e){return this.compareTo(e)>0?this:e}function de(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n.data[r]=t(this.data[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n.data[r]=t(i,e.data[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function me(e,t){return e&t}function ge(e){var t=u();return this.bitwiseTo(e,me,t),t}function ye(e,t){return e|t}function be(e){var t=u();return this.bitwiseTo(e,ye,t),t}function ve(e,t){return e^t}function we(e){var t=u();return this.bitwiseTo(e,ve,t),t}function _e(e,t){return e&~t}function ke(e){var t=u();return this.bitwiseTo(e,_e,t),t}function Se(){for(var e=u(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function Ee(e){var t=u();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function xe(e){var t=u();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function Ce(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function Ae(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+Ce(this.data[e]);return this.s<0?this.t*this.DB:-1}function Ie(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function Te(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=Ie(this.data[n]^t);return e}function je(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)}function Oe(e,t){var n=a.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function Pe(e){return this.changeBit(e,ye)}function Be(e){return this.changeBit(e,_e)}function Re(e){return this.changeBit(e,ve)}function Ne(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this.data[n]+e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()}function Me(e){var t=u();return this.addTo(e,t),t}function Le(e){var t=u();return this.subTo(e,t),t}function Fe(e){var t=u();return this.multiplyTo(e,t),t}function De(e){var t=u();return this.divRemTo(e,t,null),t}function Ue(e){var t=u();return this.divRemTo(e,null,t),t}function ze(e){var t=u(),n=u();return this.divRemTo(e,t,n),new Array(t,n)}function qe(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Ke(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function He(){}function Ve(e){return e}function We(e,t,n){e.multiplyTo(t,n)}function $e(e,t){e.squareTo(t)}function Ge(e){return this.exp(e,new He)}function Ye(e,t,n){var r=Math.min(this.t+e.t,t),i;for(n.s=0,n.t=r;r>0;)n.data[--r]=0;for(i=n.t-this.t;r<i;++r)n.data[r+this.t]=this.am(0,e.data[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e.data[r],n,r,0,t-r);n.clamp()}function Je(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n.data[this.t+r-t]=this.am(t-r,e.data[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)}function Ze(e){this.r2=u(),this.q3=u(),a.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Xe(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=u();return e.copyTo(t),this.reduce(t),t}function Qe(e){return e}function et(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function tt(e,t){e.squareTo(t),this.reduce(t)}function nt(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function rt(e,t){var n=e.bitLength(),r,i=_(1),o;if(n<=0)return i;r=n<18?1:n<48?3:n<144?4:n<768?5:6,o=n<8?new D(t):t.isEven()?new Ze(t):new W(t);var s=new Array,a=3,l=r-1,c=(1<<r)-1;if(s[1]=o.convert(this),r>1){var f=u();for(o.sqrTo(s[1],f);a<=c;)s[a]=u(),o.mulTo(f,s[a-2],s[a]),a+=2}var h=e.t-1,p,d=!0,m=u(),g;for(n=I(e.data[h])-1;h>=0;){for(n>=l?p=e.data[h]>>n-l&c:(p=(e.data[h]&(1<<n+1)-1)<<l-n,h>0&&(p|=e.data[h-1]>>this.DB+n-l)),a=r;0==(1&p);)p>>=1,--a;if((n-=a)<0&&(n+=this.DB,--h),d)s[p].copyTo(i),d=!1;else{for(;a>1;)o.sqrTo(i,m),o.sqrTo(m,i),a-=2;a>0?o.sqrTo(i,m):(g=i,i=m,m=g),o.mulTo(m,s[p],i)}for(;h>=0&&0==(e.data[h]&1<<n);)o.sqrTo(i,m),g=i,i=m,m=g,--n<0&&(n=this.DB-1,--h)}return o.revert(i)}function it(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n}function ot(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n}function st(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return a.ZERO;for(var n=e.clone(),r=this.clone(),i=_(1),o=_(0),s=_(0),u=_(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);n.compareTo(r)>=0?(n.subTo(r,n),t&&i.subTo(s,i),o.subTo(u,o)):(r.subTo(n,r),t&&s.subTo(i,s),u.subTo(o,u))}return 0!=r.compareTo(a.ONE)?a.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u}D.prototype.convert=U,D.prototype.revert=z,D.prototype.reduce=q,D.prototype.mulTo=K,D.prototype.sqrTo=H,W.prototype.convert=$,W.prototype.revert=G,W.prototype.reduce=Y,W.prototype.mulTo=Z,W.prototype.sqrTo=J,a.prototype.copyTo=v,a.prototype.fromInt=w,a.prototype.fromString=k,a.prototype.clamp=S,a.prototype.dlShiftTo=j,a.prototype.drShiftTo=O,a.prototype.lShiftTo=P,a.prototype.rShiftTo=B,a.prototype.subTo=R,a.prototype.multiplyTo=N,a.prototype.squareTo=M,a.prototype.divRemTo=L,a.prototype.invDigit=V,a.prototype.isEven=X,a.prototype.exp=Q,a.prototype.toString=E,a.prototype.negate=x,a.prototype.abs=C,a.prototype.compareTo=A,a.prototype.bitLength=T,a.prototype.mod=F,a.prototype.modPowInt=ee,a.ZERO=_(0),a.ONE=_(1),He.prototype.convert=Ve,He.prototype.revert=Ve,He.prototype.mulTo=We,He.prototype.sqrTo=$e,Ze.prototype.convert=Xe,Ze.prototype.revert=Qe,Ze.prototype.reduce=et,Ze.prototype.mulTo=nt,Ze.prototype.sqrTo=tt;var at=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],ut=(1<<26)/at[at.length-1];function lt(e){var t,n=this.abs();if(1==n.t&&n.data[0]<=at[at.length-1]){for(t=0;t<at.length;++t)if(n.data[0]==at[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<at.length;){for(var r=at[t],i=t+1;i<at.length&&r<ut;)r*=at[i++];for(r=n.modInt(r);t<i;)if(r%at[t++]==0)return!1}return n.millerRabin(e)}function ct(e){var t=this.subtract(a.ONE),n=t.getLowestSetBit();if(n<=0)return!1;for(var r=t.shiftRight(n),i=ft(),o,s=0;s<e;++s){do{o=new a(this.bitLength(),i)}while(o.compareTo(a.ONE)<=0||o.compareTo(t)>=0);var u=o.modPow(r,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<n&&0!=u.compareTo(t);)if(u=u.modPowInt(2,this),0==u.compareTo(a.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0}function ft(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}}}a.prototype.chunkSize=oe,a.prototype.toRadix=ae,a.prototype.fromRadix=ue,a.prototype.fromNumber=le,a.prototype.bitwiseTo=de,a.prototype.changeBit=Oe,a.prototype.addTo=Ne,a.prototype.dMultiply=qe,a.prototype.dAddOffset=Ke,a.prototype.multiplyLowerTo=Ye,a.prototype.multiplyUpperTo=Je,a.prototype.modInt=ot,a.prototype.millerRabin=ct,a.prototype.clone=te,a.prototype.intValue=ne,a.prototype.byteValue=re,a.prototype.shortValue=ie,a.prototype.signum=se,a.prototype.toByteArray=ce,a.prototype.equals=fe,a.prototype.min=he,a.prototype.max=pe,a.prototype.and=ge,a.prototype.or=be,a.prototype.xor=we,a.prototype.andNot=ke,a.prototype.not=Se,a.prototype.shiftLeft=Ee,a.prototype.shiftRight=xe,a.prototype.getLowestSetBit=Ae,a.prototype.bitCount=Te,a.prototype.testBit=je,a.prototype.setBit=Pe,a.prototype.clearBit=Be,a.prototype.flipBit=Re,a.prototype.add=Me,a.prototype.subtract=Le,a.prototype.multiply=Fe,a.prototype.divide=De,a.prototype.remainder=Ue,a.prototype.divideAndRemainder=ze,a.prototype.modPow=rt,a.prototype.modInverse=st,a.prototype.pow=Ge,a.prototype.gcd=it,a.prototype.isProbablePrime=lt},function(e,t,n){var r=n(19);n(34),e.exports=r.cipher=r.cipher||{},r.cipher.algorithms=r.cipher.algorithms||{},r.cipher.createCipher=function(e,t){var n=e;if("string"==typeof n&&(n=r.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new r.cipher.BlockCipher({algorithm:n,key:t,decrypt:!1})},r.cipher.createDecipher=function(e,t){var n=e;if("string"==typeof n&&(n=r.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new r.cipher.BlockCipher({algorithm:n,key:t,decrypt:!0})},r.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),r.cipher.algorithms[e]=t},r.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in r.cipher.algorithms?r.cipher.algorithms[e]:null};var i=r.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var n in e)t[n]=e[n];t.decrypt=this._decrypt,this._finish=!1,this._input=r.util.createBuffer(),this.output=e.output||r.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,n){var r=n(19);n(34),r.cipher=r.cipher||{};var i=e.exports=r.cipher.modes=r.cipher.modes||{};function o(e){if("string"==typeof e&&(e=r.util.createBuffer(e)),r.util.isArray(e)&&e.length>4){var t=e;e=r.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}return r.util.isArray(e)||(e=[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]),e}function s(e){e[e.length-1]=e[e.length-1]+1&4294967295}function a(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},i.ecb.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},i.ecb.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return!(r>this.blockSize<<2)&&(e.truncate(r),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return!(r>this.blockSize<<2)&&(e.truncate(r),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,n){var r=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=r.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=r.util.createBuffer(e.iv),n;if(this._cipherLength=0,n="additionalData"in e?r.util.createBuffer(e.additionalData):r.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=r.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=t.length();if(12===i)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,n=r.util.createBuffer(n),this._aDataLength=a(8*n.length());var o=n.length()%this.blockSize;for(o&&n.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];n.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()])},i.gcm.prototype.encrypt=function(e,t,n){var r=e.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-r)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(0===o||n){if(n){var a=r%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!n)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,n){var r=e.length();if(r<this.blockSize&&!(n&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var n=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=r.util.createBuffer();var i=this._aDataLength.concat(a(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var o=[];this.cipher.encrypt(this._j0,o);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^o[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(n=!1),n},i.gcm.prototype.multiply=function(e,t){for(var n=[0,0,0,0],r=t.slice(0),i=0;i<128;++i){var o=e[i/32|0]&1<<31-i%32;o&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),this.pow(r,r)}return n},i.gcm.prototype.pow=function(e,t){for(var n=1&e[3],r=3;r>0;--r)t[r]=e[r]>>>1|(1&e[r-1])<<31;t[0]=e[0]>>>1,n&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],n=0;n<32;++n){var r=n/8|0,i=e[r]>>>4*(7-n%8)&15,o=this._m[n][i];t[0]^=o[0],t[1]^=o[1],t[2]^=o[2],t[3]^=o[3]}return t},i.gcm.prototype.ghash=function(e,t,n){return t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var n=8/t,r=4*n,i=16*n,o=new Array(i),s=0;s<i;++s){var a=[0,0,0,0],u=s/r|0,l=(r-1-s%r)*t;a[u]=1<<t-1<<l,o[s]=this.generateSubHashTable(this.multiply(a,e),t)}return o},i.gcm.prototype.generateSubHashTable=function(e,t){var n=1<<t,r=n>>>1,i=new Array(n);i[r]=e.slice(0);for(var o=r>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o<r;){for(var s=1;s<o;++s){var a=i[o],u=i[s];i[o+s]=[a[0]^u[0],a[1]^u[1],a[2]^u[2],a[3]^u[3]]}o*=2}for(i[0]=[0,0,0,0],o=r+1;o<n;++o){var l=i[o^r];i[o]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return i}},function(e,t){},function(e,t,n){(function(t){var r=n(19);n(896),n(118),n(34);var i=r.pkcs5=r.pkcs5||{},o;r.util.isNodejs&&!r.options.usePureJavaScript&&(o=n(460)),e.exports=r.pbkdf2=i.pbkdf2=function(e,n,i,s,a,u){if("function"==typeof a&&(u=a,a=null),r.util.isNodejs&&!r.options.usePureJavaScript&&o.pbkdf2&&(null===a||"object"!=typeof a)&&(o.pbkdf2Sync.length>4||!a||"sha1"===a))return"string"!=typeof a&&(a="sha1"),e=new t(e,"binary"),n=new t(n,"binary"),u?4===o.pbkdf2Sync.length?o.pbkdf2(e,n,i,s,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):o.pbkdf2(e,n,i,s,a,function(e,t){if(e)return u(e);u(null,t.toString("binary"))}):4===o.pbkdf2Sync.length?o.pbkdf2Sync(e,n,i,s).toString("binary"):o.pbkdf2Sync(e,n,i,s,a).toString("binary");if(void 0!==a&&null!==a||(a="sha1"),"string"==typeof a){if(!(a in r.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=r.md[a].create()}var l=a.digestLength;if(s>4294967295*l){var c=new Error("Derived key is too long.");if(u)return u(c);throw c}var f=Math.ceil(s/l),h=s-(f-1)*l,p=r.hmac.create();p.start(a,e);var d="",m,g,y;if(!u){for(var b=1;b<=f;++b){p.start(null,null),p.update(n),p.update(r.util.int32ToBytes(b)),m=y=p.digest().getBytes();for(var v=2;v<=i;++v)p.start(null,null),p.update(y),g=p.digest().getBytes(),m=r.util.xorBytes(m,g,l),y=g;d+=b<f?m:m.substr(0,h)}return d}var b=1,v;function w(){if(b>f)return u(null,d);p.start(null,null),p.update(n),p.update(r.util.int32ToBytes(b)),m=y=p.digest().getBytes(),v=2,_()}function _(){if(v<=i)return p.start(null,null),p.update(y),g=p.digest().getBytes(),m=r.util.xorBytes(m,g,l),y=g,++v,r.util.setImmediate(_);d+=b<f?m:m.substr(0,h),++b,w()}w()}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(1),i=n(179).Reporter,o=n(0).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,i),t.DecoderBuffer=s,s.prototype.save=function e(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function e(t){const n=new s(this.base);return n.offset=t.offset,n.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),n},s.prototype.isEmpty=function e(){return this.offset===this.length},s.prototype.readUInt8=function e(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function e(t,n){if(!(this.offset+t<=this.length))return this.error(n||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function e(t){return this.base.slice(t?t.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function e(t,n){return t||(t=new o(this.length)),n||(n=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(e){e.join(t,n),n+=e.length}):("number"==typeof this.value?t[n]=this.value:"string"==typeof this.value?t.write(this.value,n):o.isBuffer(this.value)&&this.value.copy(t,n),n+=this.length),t)}},function(e,t,n){"use strict";const r=t;r._reverse=function e(t){const n={};return Object.keys(t).forEach(function(e){(0|e)==e&&(e|=0);const r=t[e];n[r]=e}),n},r.der=n(907)},function(e,t,n){"use strict";const r=n(1),i=n(142),o=i.base,s=i.bignum,a=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.Node.call(this,"der",e)}function c(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=a.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;const o=a.tag[n];return{cls:r,primitive:i,tag:n,tagStr:o}}function f(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=u,u.prototype.decode=function e(t,n){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,n)),this.tree._decode(t,n)},r(l,o.Node),l.prototype._peekTag=function e(t,n,r){if(t.isEmpty())return!1;const i=t.save(),o=c(t,'Failed to peek tag: "'+n+'"');return t.isError(o)?o:(t.restore(i),o.tag===n||o.tagStr===n||o.tagStr+"of"===n||r)},l.prototype._decodeTag=function e(t,n,r){const i=c(t,'Failed to decode tag of "'+n+'"');if(t.isError(i))return i;let o=f(t,i.primitive,'Failed to get length of "'+n+'"');if(t.isError(o))return o;if(!r&&i.tag!==n&&i.tagStr!==n&&i.tagStr+"of"!==n)return t.error('Failed to match tag: "'+n+'"');if(i.primitive||null!==o)return t.skip(o,'Failed to match body of: "'+n+'"');const s=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(o=t.offset-s.offset,t.restore(s),t.skip(o,'Failed to match body of: "'+n+'"'))},l.prototype._skipUntilEnd=function e(t,n){for(;;){const e=c(t,n);if(t.isError(e))return e;const r=f(t,e.primitive,n);if(t.isError(r))return r;let i;if(i=e.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,n),t.isError(i))return i;if("end"===e.tagStr)break}},l.prototype._decodeList=function e(t,n,r,i){const o=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const n=r.decode(t,"der",i);if(t.isError(n)&&e)break;o.push(n)}return o},l.prototype._decodeStr=function e(t,n){if("bitstr"===n){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===n){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let n="";for(let t=0;t<e.length/2;t++)n+=String.fromCharCode(e.readUInt16BE(2*t));return n}if("numstr"===n){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===n)return t.raw();if("objDesc"===n)return t.raw();if("printstr"===n){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(n)?t.raw().toString():t.error("Decoding of string type: "+n+" unsupported")},l.prototype._decodeObjid=function e(t,n,r){let i;const o=[];let s=0,a=0;for(;!t.isEmpty();)a=t.readUInt8(),s<<=7,s|=127&a,0==(128&a)&&(o.push(s),s=0);128&a&&o.push(s);const u=o[0]/40|0,l=o[0]%40;if(i=r?o:[u,l].concat(o.slice(1)),n){let e=n[i.join(" ")];void 0===e&&(e=n[i.join(".")]),void 0!==e&&(i=e)}return i},l.prototype._decodeTime=function e(t,n){const r=t.raw().toString();let i,o,s,a,u,l;if("gentime"===n)i=0|r.slice(0,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),l=0|r.slice(12,14);else{if("utctime"!==n)return t.error("Decoding "+n+" time is not supported yet");i=0|r.slice(0,2),o=0|r.slice(2,4),s=0|r.slice(4,6),a=0|r.slice(6,8),u=0|r.slice(8,10),l=0|r.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,o-1,s,a,u,l,0)},l.prototype._decodeNull=function e(){return null},l.prototype._decodeBool=function e(t){const n=t.readUInt8();return t.isError(n)?n:0!==n},l.prototype._decodeInt=function e(t,n){const r=t.raw();let i=new s(r);return n&&(i=n[i.toString(10)]||i),i},l.prototype._use=function e(t,n){return"function"==typeof t&&(t=t(n)),t._getDecoder("der").tree}},function(e,t,n){"use strict";const r=n(1),i=n(0).Buffer,o=n(142),s=o.base,a=o.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.Node.call(this,"der",e)}function c(e){return e<10?"0"+e:e}function f(e,t,n,r){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}return i>=31?r.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[n||"universal"]<<6,i)}e.exports=u,u.prototype.encode=function e(t,n){return this.tree._encode(t,n).join()},r(l,s.Node),l.prototype._encodeComposite=function e(t,n,r,o){const s=f(t,n,r,this.reporter);if(o.length<128){const e=new i(2);return e[0]=s,e[1]=o.length,this._createEncoderBuffer([e,o])}let a=1;for(let e=o.length;e>=256;e>>=8)a++;const u=new i(2+a);u[0]=s,u[1]=128|a;for(let e=1+a,t=o.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,o])},l.prototype._encodeStr=function e(t,n){if("bitstr"===n)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===n){const e=new i(2*t.length);for(let n=0;n<t.length;n++)e.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(e)}return"numstr"===n?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===n?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(n)?this._createEncoderBuffer(t):"objDesc"===n?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+n+" unsupported")},l.prototype._encodeObjid=function e(t,n,r){if("string"==typeof t){if(!n)return this.reporter.error("string objid given, but no values map found");if(!n.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=n[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let o=0;for(let e=0;e<t.length;e++){let n=t[e];for(o++;n>=128;n>>=7)o++}const s=new i(o);let a=s.length-1;for(let e=t.length-1;e>=0;e--){let n=t[e];for(s[a--]=127&n;(n>>=7)>0;)s[a--]=128|127&n}return this._createEncoderBuffer(s)},l.prototype._encodeTime=function e(t,n){let r;const i=new Date(t);return"gentime"===n?r=[c(i.getUTCFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):"utctime"===n?r=[c(i.getUTCFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(r,"octstr")},l.prototype._encodeNull=function e(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function e(t,n){if("string"==typeof t){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=n[t]}if("number"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=new i(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const n=new i(e);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const o=new Array(r);for(let e=o.length-1;e>=0;e--)o[e]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},l.prototype._encodeBool=function e(t){return this._createEncoderBuffer(t?255:0)},l.prototype._use=function e(t,n){return"function"==typeof t&&(t=t(n)),t._getEncoder("der").tree},l.prototype._skipDefault=function e(t,n,r){const i=this._baseState;let o;if(null===i.default)return!1;const s=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,n,r).join()),s.length!==i.defaultBuffer.length)return!1;for(o=0;o<s.length;o++)if(s[o]!==i.defaultBuffer[o])return!1;return!0}},function(e,t,n){"use strict";(function(e){const r=n(142).bignum;t.toBase64=function t(n,r){let i=n.toArrayLike(e,"be",r).toString("base64");return i.replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},t.toBn=function t(n){return new r(e.from(n,"base64"))}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(920),i=n(921),o=n(317);function s(e,t){return void 0===e?t:(r.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}e.exports=function(e){return{privateKeyVerify:function(t){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,n){r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n=s(n,!0);var a=e.privateKeyExport(t,n);return i.privateKeyExport(t,a,n)},privateKeyImport:function(t){if(r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),t=i.privateKeyImport(t),t&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,n){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r.isBuffer(n,o.TWEAK_TYPE_INVALID),r.isBufferLength(n,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,n)},privateKeyTweakMul:function(t,n){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r.isBuffer(n,o.TWEAK_TYPE_INVALID),r.isBufferLength(n,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,n)},publicKeyCreate:function(t,n){return r.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n=s(n,!0),e.publicKeyCreate(t,n)},publicKeyConvert:function(t,n){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n=s(n,!0),e.publicKeyConvert(t,n)},publicKeyVerify:function(t){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,n,i){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r.isBuffer(n,o.TWEAK_TYPE_INVALID),r.isBufferLength(n,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakAdd(t,n,i)},publicKeyTweakMul:function(t,n,i){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r.isBuffer(n,o.TWEAK_TYPE_INVALID),r.isBufferLength(n,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakMul(t,n,i)},publicKeyCombine:function(t,n){r.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),r.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i<t.length;++i)r.isBuffer(t[i],o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t[i],33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID);return n=s(n,!0),e.publicKeyCombine(t,n)},signatureNormalize:function(t){return r.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isBufferLength(t,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),e.signatureNormalize(t)},signatureExport:function(t){r.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isBufferLength(t,64,o.ECDSA_SIGNATURE_LENGTH_INVALID);var n=e.signatureExport(t);return i.signatureExport(n)},signatureImport:function(t){r.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isLengthGTZero(t,o.ECDSA_SIGNATURE_LENGTH_INVALID);var n=i.signatureImport(t);if(n)return e.signatureImport(n);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(t){r.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isLengthGTZero(t,o.ECDSA_SIGNATURE_LENGTH_INVALID);var n=i.signatureImportLax(t);if(n)return e.signatureImport(n);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(t,n,i){r.isBuffer(t,o.MSG32_TYPE_INVALID),r.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),r.isBuffer(n,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(n,32,o.EC_PRIVATE_KEY_LENGTH_INVALID);var s=null,a=null;return void 0!==i&&(r.isObject(i,o.OPTIONS_TYPE_INVALID),void 0!==i.data&&(r.isBuffer(i.data,o.OPTIONS_DATA_TYPE_INVALID),r.isBufferLength(i.data,32,o.OPTIONS_DATA_LENGTH_INVALID),s=i.data),void 0!==i.noncefn&&(r.isFunction(i.noncefn,o.OPTIONS_NONCEFN_TYPE_INVALID),a=i.noncefn)),e.sign(t,n,a,s)},verify:function(t,n,i){return r.isBuffer(t,o.MSG32_TYPE_INVALID),r.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),r.isBuffer(n,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isBufferLength(n,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),r.isBuffer(i,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(i,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),e.verify(t,n,i)},recover:function(t,n,i,a){return r.isBuffer(t,o.MSG32_TYPE_INVALID),r.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),r.isBuffer(n,o.ECDSA_SIGNATURE_TYPE_INVALID),r.isBufferLength(n,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),r.isNumber(i,o.RECOVERY_ID_TYPE_INVALID),r.isNumberInInterval(i,-1,4,o.RECOVERY_ID_VALUE_INVALID),a=s(a,!0),e.recover(t,n,i,a)},ecdh:function(t,n){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r.isBuffer(n,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(n,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.ecdh(t,n)},ecdhUnsafe:function(t,n,i){return r.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),r.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r.isBuffer(n,o.EC_PRIVATE_KEY_TYPE_INVALID),r.isBufferLength(n,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),i=s(i,!0),e.ecdhUnsafe(t,n,i)}}}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(57).Transform,o=n(1);function s(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}function a(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}o(a,i),a.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(s(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)n[this._blockOffset++]=e[i++];for(var a=0,u=8*e.length;u>0;++a)this._length[a]+=u,u=this._length[a]/4294967296|0,u>0&&(this._length[a]-=4294967296*u);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,n){"use strict";var r=n(0).Buffer,i=n(1),o=n(468),s=new Array(16),a=[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],u=[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],l=[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],c=[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],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,i,o,s,a){return d(e+(t^n^r)+o+s|0,a)+i|0}function g(e,t,n,r,i,o,s,a){return d(e+(t&n|~t&r)+o+s|0,a)+i|0}function y(e,t,n,r,i,o,s,a){return d(e+((t|~n)^r)+o+s|0,a)+i|0}function b(e,t,n,r,i,o,s,a){return d(e+(t&r|n&~r)+o+s|0,a)+i|0}function v(e,t,n,r,i,o,s,a){return d(e+(t^(n|~r))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,S=0|this._d,E=0|this._e,x=0;x<80;x+=1){var C,A;x<16?(C=m(n,r,i,o,p,e[a[x]],f[0],l[x]),A=v(w,_,k,S,E,e[u[x]],h[0],c[x])):x<32?(C=g(n,r,i,o,p,e[a[x]],f[1],l[x]),A=b(w,_,k,S,E,e[u[x]],h[1],c[x])):x<48?(C=y(n,r,i,o,p,e[a[x]],f[2],l[x]),A=y(w,_,k,S,E,e[u[x]],h[2],c[x])):x<64?(C=b(n,r,i,o,p,e[a[x]],f[3],l[x]),A=g(w,_,k,S,E,e[u[x]],h[3],c[x])):(C=v(n,r,i,o,p,e[a[x]],f[4],l[x]),A=m(w,_,k,S,E,e[u[x]],h[4],c[x])),n=p,p=o,o=d(i,10),i=r,r=C,w=E,E=S,S=d(k,10),k=_,_=A}var I=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+p+w|0,this._d=this._e+n+_|0,this._e=this._a+r+k|0,this._a=I},p.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 e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,n){var t=e.exports=function e(n){n=n.toLowerCase();var r=t[n];if(!r)throw new Error(n+" is not supported (we accept pull requests)");return new r};t.sha=n(923),t.sha1=n(924),t.sha224=n(925),t.sha256=n(471),t.sha384=n(926),t.sha512=n(472)},function(e,t,n){var r=n(1),i=n(144),o=n(4).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function d(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}r(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=d(t[y-2])+t[y-7]+p(t[y-15])+t[y-16]|0;for(var b=0;b<64;++b){var v=g+h(a)+l(a,u,m)+s[b]+t[b]|0,w=f(n)+c(n,r,i)|0;g=m,m=u,u=a,a=o+v|0,o=i,i=r,r=n,n=v+w|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=u+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,n){var r=n(1),i=n(144),o=n(4).Buffer,s=[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],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function l(e,t,n){return n^e&(t^n)}function c(e,t,n){return e&t|n&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}r(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,E=0|this._el,x=0|this._fl,C=0|this._gl,A=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var T=t[I-30],j=t[I-30+1],O=p(T,j),P=d(j,T);T=t[I-4],j=t[I-4+1];var B=m(T,j),R=g(j,T),N=t[I-14],M=t[I-14+1],L=t[I-32],F=t[I-32+1],D=P+M|0,U=O+N+y(D,P)|0;D=D+R|0,U=U+B+y(D,R)|0,D=D+F|0,U=U+L+y(D,F)|0,t[I]=U,t[I+1]=D}for(var z=0;z<160;z+=2){U=t[z],D=t[z+1];var q=c(n,r,i),K=c(w,_,k),H=f(n,w),V=f(w,n),W=h(a,E),$=h(E,a),G=s[z],Y=s[z+1],J=l(a,u,b),Z=l(E,x,C),X=A+$|0,Q=v+W+y(X,A)|0;X=X+Z|0,Q=Q+J+y(X,Z)|0,X=X+Y|0,Q=Q+G+y(X,Y)|0,X=X+D|0,Q=Q+U+y(X,D)|0;var ee=V+K|0,te=H+q+y(ee,V)|0;v=b,A=C,b=u,C=x,u=a,x=E,E=S+X|0,a=o+Q+y(E,S)|0,o=i,S=k,i=r,k=_,r=n,_=w,w=X+ee|0,n=Q+te+y(w,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+x|0,this._gl=this._gl+C|0,this._hl=this._hl+A|0,this._ah=this._ah+n+y(this._al,w)|0,this._bh=this._bh+r+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,k)|0,this._dh=this._dh+o+y(this._dl,S)|0,this._eh=this._eh+a+y(this._el,E)|0,this._fh=this._fh+u+y(this._fl,x)|0,this._gh=this._gh+b+y(this._gl,C)|0,this._hh=this._hh+v+y(this._hl,A)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(238),o=n(474);function s(e,t){null===e&&null===t?(this.x=this.y=null,this.inf=!0):(this.x=e,this.y=t,this.inf=!1)}s.fromPublicKey=function(e){var t=e[0],n,r;return 33!==e.length||2!==t&&3!==t?65!==e.length||4!==t&&6!==t&&7!==t?null:(n=i.fromBuffer(e.slice(1,33)),r=i.fromBuffer(e.slice(33,65)),n.ucmp(i.p)>=0||r.ucmp(i.p)>=0?null:6!==t&&7!==t||r.isOdd()===(7===t)?0!==n.redSqr().redMul(n).redIAdd7().ucmp(r.redSqr())?null:new s(n,r):null):(n=i.fromBuffer(e.slice(1,33)),n.ucmp(i.p)>=0?null:(r=n.redSqr().redMul(n).redIAdd7().redSqrt(),null===r?null:(3===t!==r.isOdd()&&(r=r.redNeg()),new s(n,r))))},s.prototype.toPublicKey=function(e){var t=this.x,n=this.y,i;return e?(i=r.alloc(33),i[0]=n.isOdd()?3:2,t.toBuffer().copy(i,1)):(i=r.alloc(65),i[0]=4,t.toBuffer().copy(i,1),n.toBuffer().copy(i,33)),i},s.fromECJPoint=function(e){if(e.inf)return new s(null,null);var t=e.z.redInvm(),n=t.redSqr(),r=e.x.redMul(n),i=e.y.redMul(n).redMul(t);return new s(r,i)},s.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},s.prototype.neg=function(){return this.inf?this:new s(this.x,this.y.redNeg())},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new s(null,null);var t=this.y.redSub(e.y);t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return new s(n,r)},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.isZero())return new s(null,null);var t=this.x.redSqr(),n=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),r=n.redSqr().redISub(this.x.redAdd(this.x)),i=n.redMul(this.x.redSub(r)).redISub(this.y);return new s(r,i)},s.prototype.mul=function(e){for(var t=this._getNAFPoints(4),n=t.points,r=e.getNAF(t.wnd),i=new o(null,null,null),a=r.length-1;a>=0;a--){for(var u=0;a>=0&&0===r[a];a--,++u);if(a>=0&&(u+=1),i=i.dblp(u),a<0)break;var l=r[a];i=l>0?i.mixedAdd(n[l-1>>1]):i.mixedAdd(n[-l-1>>1].neg())}return s.fromECJPoint(i)},s.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},s.prototype._getNAFPoints=function(e){var t=new Array((1<<e)-1);t[0]=this;for(var n=this.dbl(),r=1;r<t.length;++r)t[r]=t[r-1].add(n);return{wnd:e,points:t}},e.exports=s},function(e,t,n){"use strict";var r=n(238);function i(e,t,n){null===e&&null===t&&null===n?(this.x=i.one,this.y=i.one,this.z=i.zero):(this.x=e,this.y=t,this.z=n),this.zOne=this.z===i.one}i.zero=r.fromNumber(0),i.one=r.fromNumber(1),i.prototype.neg=function(){return this.inf?this:new i(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),o=e.x.redMul(n),s=this.y.redMul(t).redMul(e.z),a=e.y.redMul(n).redMul(this.z),u=r.redSub(o),l=s.redSub(a);if(u.isZero())return l.isZero()?this.dbl():new i(null,null,null);var c=u.redSqr(),f=r.redMul(c),h=c.redMul(u),p=l.redSqr().redIAdd(h).redISub(f).redISub(f),d=l.redMul(f.redISub(p)).redISub(s.redMul(h)),m=this.z.redMul(e.z).redMul(u);return new i(p,d,m)},i.prototype.mixedAdd=function(e){if(this.inf)return e.toECJPoint();if(e.inf)return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),o=this.y,s=e.y.redMul(t).redMul(this.z),a=n.redSub(r),u=o.redSub(s);if(a.isZero())return u.isZero()?this.dbl():new i(null,null,null);var l=a.redSqr(),c=n.redMul(l),f=l.redMul(a),h=u.redSqr().redIAdd(f).redISub(c).redISub(c),p=u.redMul(c.redISub(h)).redISub(o.redMul(f)),d=this.z.redMul(a);return new i(h,p,d)},i.prototype.dbl=function(){if(this.inf)return this;var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(r).redISub(s);a=a.redIAdd(a);var u=r.redAdd(r).redIAdd(r),l=u.redSqr().redISub(a).redISub(a),c=s.redIAdd(s).redIAdd(s).redIAdd(s);e=l,t=u.redMul(a.redISub(l)).redISub(c),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),p=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(p);d=d.redIAdd(d);var m=f.redAdd(f).redIAdd(f),g=m.redSqr(),y=p.redIAdd(p).redIAdd(p).redIAdd(p);e=g.redISub(d).redISub(d),t=m.redMul(d.redISub(e)).redISub(y),n=this.y.redMul(this.z),n=n.redIAdd(n)}return new i(e,t,n)},i.prototype.dblp=function(e){if(0===e||this.inf)return this;for(var t=this,n=0;n<e;n++)t=t.dbl();return t},Object.defineProperty(i.prototype,"inf",{enumerable:!0,get:function(){return this.z.isZero()}}),e.exports=i},function(e,t,n){"use strict";(function(e){const r=n(313),i=n(314),o=n(934),s={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"},a=(t,n,o)=>{r(i.subtle.sign({name:"HMAC"},t,n).then(t=>e.from(t)),o)};t.create=function(e,t,n){const u=s[e];r(i.subtle.importKey("raw",t,{name:"HMAC",hash:{name:u}},!1,["sign"]).then(t=>({digest(e,n){a(t,e,n)},length:o[e]})),n)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(24);function i(e){return r.isMultiaddr(e)?e:r(e)}e.exports={ensureMultiaddr:i}},function(e,t,n){var r={ECB:n(949),CBC:n(950),CFB:n(951),CFB8:n(952),CFB1:n(953),OFB:n(954),CTR:n(478),GCM:n(478)},i=n(480);for(var o in i)i[o].module=r[i[o].mode];e.exports=i},function(e,t,n){var r=n(180),i=n(4).Buffer,o=n(479);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}var a=16;t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var u=s(e),l=o+16*a;e._cache.writeUInt32BE(u[0],l+0),e._cache.writeUInt32BE(u[1],l+4),e._cache.writeUInt32BE(u[2],l+8),e._cache.writeUInt32BE(u[3],l+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,c)}},function(e,t){function n(e){for(var t=e.length,n;t--;){if(n=e.readUInt8(t),255!==n){n++,e.writeUInt8(n,t);break}e.writeUInt8(0,t)}}e.exports=n},function(e){e.exports={"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(e,t,n){var r=n(239),i=n(4).Buffer,o=n(119),s=n(1),a=n(955),u=n(180),l=n(479);function c(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}function f(e,t,n){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var r=new a(n),o=t.length,s=o%16;r.update(t),s&&(s=16-s,r.update(i.alloc(s,0))),r.update(i.alloc(8,0));var u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),r.update(c),e._finID=r.state;var f=i.from(e._finID);return l(f),f}function h(e,t,n,s){o.call(this);var u=i.alloc(4,0);this._cipher=new r.AES(t);var l=this._cipher.encryptBlock(u);this._ghash=new a(l),n=f(this,n,l),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(h,o),h.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&c(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},h.prototype.getAuthTag=function e(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function e(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},h.prototype.setAAD=function e(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},e.exports=h},function(e,t,n){var r=n(239),i=n(4).Buffer,o=n(119),s=n(1);function a(e,t,n,s){o.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}s(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},function(e,t,n){var r=n(4).Buffer,i=n(318);function o(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=r.alloc(s),u=r.alloc(o||0),l=r.alloc(0);s>0||o>0;){var c=new i;c.update(l),c.update(e),t&&c.update(t),l=c.digest();var f=0;if(s>0){var h=a.length-s;f=Math.min(s,l.length),l.copy(a,h,0,f),s-=f}if(f<l.length&&o>0){var p=u.length-o,d=Math.min(o,l.length-f);l.copy(u,p,f,f+d),o-=d}}return l.fill(0),{key:a,iv:u}}e.exports=o},function(e,t,n){"use strict";(function(t){const r=n(76),i=n(23),o=n(44);function s(e){let n;if("string"==typeof e)n=e;else if(t.isBuffer(e))n=r.encode(e).toString();else if(i.isPeerId(e))n=e.toB58String();else{if(!o.isPeerInfo(e))throw new Error("not valid PeerId or PeerInfo, or B58Str");n=e.id.toB58String()}return n}class a{constructor(){this._peers={}}has(e){const t=s(e);return Boolean(this._peers[t])}put(e,t){const n=this._peers[e.id.toB58String()];if(!n||t)return this._peers[e.id.toB58String()]=e,e;e.multiaddrs.forEach(e=>n.multiaddrs.add(e));const r=e.isConnected();return r&&n.connect(r),e.protocols.forEach(e=>n.protocols.add(e)),!n.id.privKey&&e.id.privKey&&(n.id.privKey=e.id.privKey),!n.id.pubKey&&e.id.pubKey&&(n.id.pubKey=e.id.pubKey),n}get(e){const t=s(e),n=this._peers[t];if(n)return n;throw new Error("PeerInfo not found")}getAll(){return this._peers}getAllArray(){return Object.keys(this._peers).map(e=>this._peers[e])}getMultiaddrs(e){const t=this.get(e);return t.multiaddrs.toArray()}remove(e){const t=s(e);this._peers[t]&&delete this._peers[t]}}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){!function t(n,r){e.exports=r()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=32)}([function(e,t,n){"use strict";(function(e,r){var i="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},o=n(17),s=n(15),a=n(37),u=n(16),l=n(18),c={};t.clone=function(n,r){if("object"!==(void 0===n?"undefined":i(n))||null===n)return n;r=r||new Map;var o=r.get(n);if(o)return o;var s=void 0,a=!1;if(Array.isArray(n))s=[],a=!0;else if(e.isBuffer(n))s=e.from(n);else if(n instanceof Date)s=new Date(n.getTime());else if(n instanceof RegExp)s=new RegExp(n);else{var u=Object.getPrototypeOf(n);u&&u.isImmutable?s=n:(s=Object.create(u),a=!0)}if(r.set(n,s),a)for(var l=Object.getOwnPropertyNames(n),c=0;c<l.length;++c){var f=l[c],h=Object.getOwnPropertyDescriptor(n,f);h&&(h.get||h.set)?Object.defineProperty(s,f,h):s[f]=t.clone(n[f],r)}return s},t.merge=function(n,r,o,s){if(t.assert(n&&"object"===(void 0===n?"undefined":i(n)),"Invalid target value: must be an object"),t.assert(null===r||void 0===r||"object"===(void 0===r?"undefined":i(r)),"Invalid source value: must be null, undefined, or an object"),!r)return n;if(Array.isArray(r)){t.assert(Array.isArray(n),"Cannot merge array onto an object"),!1===s&&(n.length=0);for(var a=0;a<r.length;++a)n.push(t.clone(r[a]));return n}for(var u=Object.keys(r),l=0;l<u.length;++l){var c=u[l];if("__proto__"!==c){var f=r[c];f&&"object"===(void 0===f?"undefined":i(f))?!n[c]||"object"!==i(n[c])||Array.isArray(n[c])!==Array.isArray(f)||f instanceof Date||e.isBuffer(f)||f instanceof RegExp?n[c]=t.clone(f):t.merge(n[c],f,o,s):null!==f&&void 0!==f?n[c]=f:!1!==o&&(n[c]=f)}}return n},t.applyToDefaults=function(e,n,r){if(t.assert(e&&"object"===(void 0===e?"undefined":i(e)),"Invalid defaults value: must be an object"),t.assert(!n||!0===n||"object"===(void 0===n?"undefined":i(n)),"Invalid options value: must be true, falsy or an object"),!n)return null;var o=t.clone(e);return!0===n?o:t.merge(o,n,!0===r,!1)},t.cloneWithShallow=function(e,n){if(!e||"object"!==(void 0===e?"undefined":i(e)))return e;var r=c.store(e,n),o=t.clone(e);return c.restore(o,e,r),o},c.store=function(e,n){for(var r={},i=0;i<n.length;++i){var o=n[i],s=t.reach(e,o);void 0!==s&&(r[o]=s,c.reachSet(e,o,void 0))}return r},c.restore=function(e,t,n){for(var r=Object.keys(n),i=0;i<r.length;++i){var o=r[i];c.reachSet(e,o,n[o]),c.reachSet(t,o,n[o])}},c.reachSet=function(e,t,n){for(var r=t.split("."),i=e,o=0;o<r.length;++o){var s=r[o];o+1===r.length&&(i[s]=n),i=i[s]}},t.applyToDefaultsWithShallow=function(e,n,r){if(t.assert(e&&"object"===(void 0===e?"undefined":i(e)),"Invalid defaults value: must be an object"),t.assert(!n||!0===n||"object"===(void 0===n?"undefined":i(n)),"Invalid options value: must be true, falsy or an object"),t.assert(r&&Array.isArray(r),"Invalid keys"),!n)return null;var o=t.cloneWithShallow(e,r);if(!0===n)return o;var s=c.store(n,r);return t.merge(o,n,!1,!1),c.restore(o,n,s),o},t.deepEqual=function(n,r,o,s){o=o||{prototype:!0};var a=void 0===n?"undefined":i(n);if(a!==(void 0===r?"undefined":i(r)))return!1;if("object"!==a||null===n||null===r)return n===r?0!==n||1/n==1/r:n!=n&&r!=r;if(s=s||[],-1!==s.indexOf(n))return!0;if(s.push(n),Array.isArray(n)){if(!Array.isArray(r))return!1;if(!o.part&&n.length!==r.length)return!1;for(var u=0;u<n.length;++u){if(o.part){for(var l=!1,c=0;c<r.length;++c)if(t.deepEqual(n[u],r[c],o)){l=!0;break}return l}if(!t.deepEqual(n[u],r[u],o))return!1}return!0}if(e.isBuffer(n)){if(!e.isBuffer(r))return!1;if(n.length!==r.length)return!1;for(var f=0;f<n.length;++f)if(n[f]!==r[f])return!1;return!0}if(n instanceof Date)return r instanceof Date&&n.getTime()===r.getTime();if(n instanceof RegExp)return r instanceof RegExp&&n.toString()===r.toString();if(o.prototype&&Object.getPrototypeOf(n)!==Object.getPrototypeOf(r))return!1;var h=Object.getOwnPropertyNames(n);if(!o.part&&h.length!==Object.getOwnPropertyNames(r).length)return!1;for(var p=0;p<h.length;++p){var d=h[p],m=Object.getOwnPropertyDescriptor(n,d);if(m.get){if(!t.deepEqual(m,Object.getOwnPropertyDescriptor(r,d),o,s))return!1}else if(!t.deepEqual(n[d],r[d],o,s))return!1}return!0},t.unique=function(e,t){var n=void 0;if(t){n=[];var r=new Set;e.forEach(function(e){var i=e[t];r.has(i)||(r.add(i),n.push(e))})}else n=Array.from(new Set(e));return n},t.mapToObject=function(e,t){if(!e)return null;for(var n={},r=0;r<e.length;++r)t?e[r][t]&&(n[e[r][t]]=!0):n[e[r]]=!0;return n},t.intersect=function(e,n,r){if(!e||!n)return[];for(var i=[],o=Array.isArray(e)?t.mapToObject(e):e,s={},a=0;a<n.length;++a)if(o[n[a]]&&!s[n[a]]){if(r)return n[a];i.push(n[a]),s[n[a]]=!0}return r?null:i},t.contain=function(e,n,r){var o=null;"object"!==(void 0===e?"undefined":i(e))||"object"!==(void 0===n?"undefined":i(n))||Array.isArray(e)||Array.isArray(n)?n=[].concat(n):(o=n,n=Object.keys(n)),r=r||{},t.assert("string"==typeof e||"object"===(void 0===e?"undefined":i(e)),"Reference must be string or an object"),t.assert(n.length,"Values array cannot be empty");var s=void 0,a=void 0;if(r.deep){s=t.deepEqual;var u=r.hasOwnProperty("only"),l=r.hasOwnProperty("part");a={prototype:u?r.only:!!l&&!r.part,part:u?!r.only:!l||r.part}}else s=function e(t,n){return t===n};for(var c=!1,f=new Array(n.length),h=0;h<f.length;++h)f[h]=0;if("string"==typeof e){for(var p="(",d=0;d<n.length;++d){var m=n[d];t.assert("string"==typeof m,"Cannot compare string reference to non-string value"),p+=(d?"|":"")+t.escapeRegex(m)}var g=new RegExp(p+")","g"),y=e.replace(g,function(e,t){var r=n.indexOf(t);return++f[r],""});c=!!y}else if(Array.isArray(e))for(var b=0;b<e.length;++b){for(var v=!1,w=0;w<n.length&&!1===v;++w)v=s(n[w],e[b],a)&&w;!1!==v?++f[v]:c=!0}else for(var _=Object.getOwnPropertyNames(e),k=0;k<_.length;++k){var S=_[k],E=n.indexOf(S);if(-1!==E){if(o&&!s(o[S],e[S],a))return!1;++f[E]}else c=!0}for(var x=!1,C=0;C<f.length;++C)if(x=x||!!f[C],r.once&&f[C]>1||!r.part&&!f[C])return!1;return(!r.only||!c)&&x},t.flatten=function(e,n){for(var r=n||[],i=0;i<e.length;++i)Array.isArray(e[i])?t.flatten(e[i],r):r.push(e[i]);return r},t.reach=function(e,n,r){if(!1===n||null===n||void 0===n)return e;r=r||{},"string"==typeof r&&(r={separator:r});for(var o=n.split(r.separator||"."),s=e,a=0;a<o.length;++a){var u=o[a];if("-"===u[0]&&Array.isArray(s)&&(u=u.slice(1,u.length),u=s.length-u),!s||"object"!==(void 0===s?"undefined":i(s))&&"function"!=typeof s||!(u in s)||"object"!==(void 0===s?"undefined":i(s))&&!1===r.functions){t.assert(!r.strict||a+1===o.length,"Missing segment",u,"in reach path ",n),t.assert("object"===(void 0===s?"undefined":i(s))||!0===r.functions||"function"!=typeof s,"Invalid segment",u,"in reach path ",n),s=r.default;break}s=s[u]}return s},t.reachTemplate=function(e,n,r){return n.replace(/{([^}]+)}/g,function(n,i){var o=t.reach(e,i,r);return void 0===o||null===o?"":o})},t.formatStack=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];t.push([r.getFileName(),r.getLineNumber(),r.getColumnNumber(),r.getFunctionName(),r.isConstructor()])}return t},t.formatTrace=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];t.push((r[4]?"new ":"")+r[3]+" ("+r[0]+":"+r[1]+":"+r[2]+")")}return t},t.callStack=function(e){var n=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var r={};Error.captureStackTrace(r,this);var i=r.stack;Error.prepareStackTrace=n;var o=t.formatStack(i);return o.slice(1+e)},t.displayStack=function(e){var n=t.callStack(void 0===e?1:e+1);return t.formatTrace(n)},t.abortThrow=!1,t.abort=function(e,n){if("test"===r.env.NODE_ENV||!0===t.abortThrow)throw new Error(e||"Unknown error");var i="";n||(i=t.displayStack(1).join("\n\t")),console.log("ABORT: "+e+"\n\t"+i),r.exit(1)},t.assert=function(e){if(!e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(1===r.length&&r[0]instanceof Error)throw r[0];var s=r.filter(function(e){return""!==e}).map(function(e){return"string"==typeof e?e:e instanceof Error?e.message:t.stringify(e)});throw new o.AssertionError({message:s.join(" ")||"Unknown error",actual:!1,expected:!0,operator:"==",stackStartFunction:t.assert})}},t.Bench=function(){this.ts=0,this.reset()},t.Bench.prototype.reset=function(){this.ts=t.Bench.now()},t.Bench.prototype.elapsed=function(){return t.Bench.now()-this.ts},t.Bench.now=function(){var e=r.hrtime();return 1e3*e[0]+e[1]/1e6},t.escapeRegex=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")},t.base64urlEncode=function(n,r){t.assert("string"==typeof n||e.isBuffer(n),"value must be string or buffer");var i=e.isBuffer(n)?n:e.from(n,r||"binary");return i.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")},t.base64urlDecode=function(t,n){if("string"!=typeof t)throw new Error("Value not a string");if(!/^[\w\-]*$/.test(t))throw new Error("Invalid character");var r=e.from(t,"base64");return"buffer"===n?r:r.toString(n||"binary")},t.escapeHeaderAttribute=function(e){return t.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},t.escapeHtml=function(e){return l.escapeHtml(e)},t.escapeJavaScript=function(e){return l.escapeJavaScript(e)},t.escapeJson=function(e){return l.escapeJson(e)},t.once=function(e){if(e._hoekOnce)return e;var t=!1,n=function n(){if(!t){t=!0;for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];e.apply(null,i)}};return n._hoekOnce=!0,n},t.isInteger=Number.isSafeInteger,t.ignore=function(){},t.inherits=u.inherits,t.format=u.format,t.transform=function(e,n,r){t.assert(null===e||void 0===e||"object"===(void 0===e?"undefined":i(e))||Array.isArray(e),"Invalid source object: must be null, undefined, an object, or an array");var o="object"===(void 0===r?"undefined":i(r))&&null!==r&&r.separator||".";if(Array.isArray(e)){for(var s=[],a=0;a<e.length;++a)s.push(t.transform(e[a],n,r));return s}for(var u={},l=Object.keys(n),c=0;c<l.length;++c){var f=l[c],h=f.split(o),p=n[f];t.assert("string"==typeof p,'All mappings must be "." delineated strings');for(var d=void 0,m=u;h.length>1;)d=h.shift(),m[d]||(m[d]={}),m=m[d];d=h.shift(),m[d]=t.reach(e,p,r)}return u},t.uniqueFilename=function(e,t){t=t?"."!==t[0]?"."+t:t:"",e=a.resolve(e);var n=[Date.now(),r.pid,s.randomBytes(8).toString("hex")].join("-")+t;return a.join(e,n)},t.stringify=function(){try{for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return JSON.stringify.apply(null,t)}catch(e){return"[Cannot display object: "+e.message+"]"}},t.shallow=function(e){for(var t={},n=Object.keys(e),r=0;r<n.length;++r){var i=n[r];t[i]=e[i]}return t},t.wait=function(e){return new Promise(function(t){return setTimeout(t,e)})},t.block=function(){return new Promise(t.ignore)}}).call(t,n(3).Buffer,n(7))},function(e,t,n){"use strict";var r=n(0);t.create=function(e,t){r.assert("string"==typeof e,"Invalid reference key:",e);var n=r.clone(t),i=function e(t,i){return r.reach(e.isContext?i.context:t,e.key,n)};return i.isContext=e[0]===(n&&n.contextPrefix||"$"),i.key=i.isContext?e.slice(1):e,i.path=i.key.split(n&&n.separator||"."),i.depth=i.path.length,i.root=i.path[0],i.isJoi=!0,i.toString=function(){return(i.isContext?"context:":"ref:")+i.key},i},t.isRef=function(e){return"function"==typeof e&&e.isJoi},t.push=function(e,n){t.isRef(n)&&!n.isContext&&e.push(n.root)}},function(e,t,n){"use strict";var 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},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=n(0),a=n(11),u=n(1),l=n(6),c=null,f=null,h={Set:n(9),defaults:{abortEarly:!0,convert:!0,allowUnknown:!1,skipFunctions:!1,stripUnknown:!1,language:{},presence:"optional",strip:!1,noDefaults:!1,escapeHtml:!1}};e.exports=h.Any=function(){function e(){o(this,e),f=f||n(4),this.isJoi=!0,this._type="any",this._settings=null,this._valids=new h.Set,this._invalids=new h.Set,this._tests=[],this._refs=[],this._flags={},this._description=null,this._unit=null,this._notes=[],this._tags=[],this._examples=[],this._meta=[],this._inner={}}return e.prototype._init=function e(){return this},e.prototype.createError=function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this._flags;return l.create(t,n,r,i,o)},e.prototype.createOverrideError=function e(t,n,r,i,o,s){return l.create(t,n,r,i,this._flags,o,s)},e.prototype.checkOptions=function e(t){var r=n(21),i=r.options.validate(t);if(i.error)throw new Error(i.error.details[0].message)},e.prototype.clone=function e(){var t=Object.create(Object.getPrototypeOf(this));t.isJoi=!0,t._currentJoi=this._currentJoi,t._type=this._type,t._settings=this._settings,t._baseType=this._baseType,t._valids=this._valids.slice(),t._invalids=this._invalids.slice(),t._tests=this._tests.slice(),t._refs=this._refs.slice(),t._flags=s.clone(this._flags),t._description=this._description,t._unit=this._unit,t._notes=this._notes.slice(),t._tags=this._tags.slice(),t._examples=this._examples.slice(),t._meta=this._meta.slice(),t._inner={};for(var n=Object.keys(this._inner),r=0;r<n.length;++r){var i=n[r];t._inner[i]=this._inner[i]?this._inner[i].slice():null}return t},e.prototype.concat=function e(t){s.assert(t instanceof h.Any,"Invalid schema object"),s.assert("any"===this._type||"any"===t._type||t._type===this._type,"Cannot merge type",this._type,"with another type:",t._type);var n=this.clone();if("any"===this._type&&"any"!==t._type){for(var r=t.clone(),i=["_settings","_valids","_invalids","_tests","_refs","_flags","_description","_unit","_notes","_tags","_examples","_meta","_inner"],o=0;o<i.length;++o)r[i[o]]=n[i[o]];n=r}n._settings=n._settings?a.concat(n._settings,t._settings):t._settings,n._valids.merge(t._valids,t._invalids),n._invalids.merge(t._invalids,t._valids),n._tests=n._tests.concat(t._tests),n._refs=n._refs.concat(t._refs),s.merge(n._flags,t._flags),n._description=t._description||n._description,n._unit=t._unit||n._unit,n._notes=n._notes.concat(t._notes),n._tags=n._tags.concat(t._tags),n._examples=n._examples.concat(t._examples),n._meta=n._meta.concat(t._meta);for(var u=Object.keys(t._inner),l="object"===n._type,c=0;c<u.length;++c){var f=u[c],p=t._inner[f];if(p){var d=n._inner[f];if(d)if(l&&"children"===f){for(var m={},g=0;g<d.length;++g)m[d[g].key]=g;for(var y=0;y<p.length;++y){var b=p[y].key;m[b]>=0?d[m[b]]={key:b,schema:d[m[b]].schema.concat(p[y].schema)}:d.push(p[y])}}else n._inner[f]=n._inner[f].concat(p);else n._inner[f]=p.slice()}}return n},e.prototype._test=function e(t,n,r,i){var o=this.clone();return o._tests.push({func:r,name:t,arg:n,options:i}),o},e.prototype.options=function e(t){s.assert(!t.context,"Cannot override context"),this.checkOptions(t);var n=this.clone();return n._settings=a.concat(n._settings,t),n},e.prototype.strict=function e(t){var n=this.clone(),r=void 0!==t&&!t;return n._settings=a.concat(n._settings,{convert:r}),n},e.prototype.raw=function e(t){var n=void 0===t||t;if(this._flags.raw===n)return this;var r=this.clone();return r._flags.raw=n,r},e.prototype.error=function e(t){s.assert(t&&(t instanceof Error||"function"==typeof t),"Must provide a valid Error object or a function");var n=this.clone();return n._flags.error=t,n},e.prototype.allow=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=this.clone();n=s.flatten(n);for(var o=0;o<n.length;++o){var a=n[o];s.assert(void 0!==a,"Cannot call allow/valid/invalid with undefined"),i._invalids.remove(a),i._valids.add(a,i._refs)}return i},e.prototype.valid=function e(){var t=this.allow.apply(this,arguments);return t._flags.allowOnly=!0,t},e.prototype.invalid=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=this.clone();n=s.flatten(n);for(var o=0;o<n.length;++o){var a=n[o];s.assert(void 0!==a,"Cannot call allow/valid/invalid with undefined"),i._valids.remove(a),i._invalids.add(a,i._refs)}return i},e.prototype.required=function e(){if("required"===this._flags.presence)return this;var t=this.clone();return t._flags.presence="required",t},e.prototype.optional=function e(){if("optional"===this._flags.presence)return this;var t=this.clone();return t._flags.presence="optional",t},e.prototype.forbidden=function e(){if("forbidden"===this._flags.presence)return this;var t=this.clone();return t._flags.presence="forbidden",t},e.prototype.strip=function e(){if(this._flags.strip)return this;var t=this.clone();return t._flags.strip=!0,t},e.prototype.applyFunctionToChildren=function e(t,n,r,i){if(t=[].concat(t),1!==t.length||""!==t[0]){i=i?i+".":"";var o=(""===t[0]?t.slice(1):t).map(function(e){return i+e});throw new Error("unknown key(s) "+o.join(", "))}return this[n].apply(this,r)},e.prototype.default=function e(t,n){"function"!=typeof t||u.isRef(t)||(!t.description&&n&&(t.description=n),this._flags.func||s.assert("string"==typeof t.description&&t.description.length>0,"description must be provided when default value is a function"));var r=this.clone();return r._flags.default=t,u.push(r._refs,t),r},e.prototype.empty=function e(t){var n=this.clone();return void 0===t?delete n._flags.empty:n._flags.empty=f.schema(this._currentJoi,t),n},e.prototype.when=function e(t,i){s.assert(i&&"object"===(void 0===i?"undefined":r(i)),"Invalid options"),s.assert(void 0!==i.then||void 0!==i.otherwise,'options must have at least one of "then" or "otherwise"');var o=i.hasOwnProperty("then")?this.concat(f.schema(this._currentJoi,i.then)):void 0,a=i.hasOwnProperty("otherwise")?this.concat(f.schema(this._currentJoi,i.otherwise)):void 0;c=c||n(10);var u={then:o,otherwise:a};Object.prototype.hasOwnProperty.call(i,"is")&&(u.is=i.is);var l=c.when(t,u);return l._flags.presence="ignore",l._baseType=this,l},e.prototype.description=function e(t){s.assert(t&&"string"==typeof t,"Description must be a non-empty string");var n=this.clone();return n._description=t,n},e.prototype.notes=function e(t){s.assert(t&&("string"==typeof t||Array.isArray(t)),"Notes must be a non-empty string or array");var n=this.clone();return n._notes=n._notes.concat(t),n},e.prototype.tags=function e(t){s.assert(t&&("string"==typeof t||Array.isArray(t)),"Tags must be a non-empty string or array");var n=this.clone();return n._tags=n._tags.concat(t),n},e.prototype.meta=function e(t){s.assert(void 0!==t,"Meta cannot be undefined");var n=this.clone();return n._meta=n._meta.concat(t),n},e.prototype.example=function e(){s.assert(1===arguments.length,"Missing example");var t=arguments.length<=0?void 0:arguments[0],n=this.clone();return n._examples.push(t),n},e.prototype.unit=function e(t){s.assert(t&&"string"==typeof t,"Unit name must be a non-empty string");var n=this.clone();return n._unit=t,n},e.prototype._prepareEmptyValue=function e(t){return"string"==typeof t&&this._flags.trim?t.trim():t},e.prototype._validate=function e(t,n,r,i){var o=this,c=t;n=n||{key:"",path:[],parent:null,reference:i},this._settings&&(r=a.concat(r,this._settings));var f=[],p=function e(){var i=void 0;if(void 0!==t)i=o._flags.raw?c:t;else if(r.noDefaults)i=t;else if(u.isRef(o._flags.default))i=o._flags.default(n.parent,r);else if("function"!=typeof o._flags.default||o._flags.func&&!o._flags.default.description)i=s.clone(o._flags.default);else{var a=void 0;null!==n.parent&&o._flags.default.length>0&&(a=[s.clone(n.parent),r]);var l=h._try(o._flags.default,a);i=l.value,l.error&&f.push(o.createError("any.default",{error:l.error},n,r))}if(f.length&&"function"==typeof o._flags.error){var p=o._flags.error.call(o,f);f="string"==typeof p?[o.createOverrideError("override",{reason:f},n,r,p)]:[].concat(p).map(function(e){return e instanceof Error?e:o.createOverrideError(e.type||"override",e.context,n,r,e.message,e.template)})}return{value:o._flags.strip?void 0:i,finalValue:i,errors:f.length?f:null}};if(this._coerce){var d=this._coerce.call(this,t,n,r);if(d.errors)return t=d.value,f=f.concat(d.errors),p();t=d.value}this._flags.empty&&!this._flags.empty._validate(this._prepareEmptyValue(t),null,h.defaults).errors&&(t=void 0);var m=this._flags.presence||r.presence;if("optional"===m){if(void 0===t){var g=this._flags.hasOwnProperty("default")&&void 0===this._flags.default;if(!g||"object"!==this._type)return p();t={}}}else{if("required"===m&&void 0===t)return f.push(this.createError("any.required",null,n,r)),p();if("forbidden"===m)return void 0===t?p():(f.push(this.createError("any.unknown",null,n,r)),p())}if(this._valids.has(t,n,r,this._flags.insensitive))return p();if(this._invalids.has(t,n,r,this._flags.insensitive)&&(f.push(this.createError(""===t?"any.empty":"any.invalid",{value:t,invalids:this._invalids.values({stripUndefined:!0})},n,r)),r.abortEarly||void 0===t))return p();if(this._base){var y=this._base.call(this,t,n,r);if(y.errors)return t=y.value,f=f.concat(y.errors),p();if(y.value!==t){if(t=y.value,this._valids.has(t,n,r,this._flags.insensitive))return p();if(this._invalids.has(t,n,r,this._flags.insensitive)&&(f.push(this.createError(""===t?"any.empty":"any.invalid",{value:t,invalids:this._invalids.values({stripUndefined:!0})},n,r)),r.abortEarly))return p()}}if(this._flags.allowOnly&&(f.push(this.createError("any.allowOnly",{value:t,valids:this._valids.values({stripUndefined:!0})},n,r)),r.abortEarly))return p();for(var b=0;b<this._tests.length;++b){var v=this._tests[b],w=v.func.call(this,t,n,r);if(w instanceof l.Err){if(f.push(w),r.abortEarly)return p()}else t=w}return p()},e.prototype._validateWithOptions=function e(t,n,r){n&&this.checkOptions(n);var i=a.concat(h.defaults,n),o=this._validate(t,null,i),s=l.process(o.errors,t);return r?r(s,o.value):{error:s,value:o.value,then:function e(t,n){return s?Promise.reject(s).catch(n):Promise.resolve(o.value).then(t)},catch:function e(t){return s?Promise.reject(s).catch(t):Promise.resolve(o.value)}}},e.prototype.validate=function e(t,n,r){return"function"==typeof n?this._validateWithOptions(t,null,n):this._validateWithOptions(t,n,r)},e.prototype.describe=function e(){var t=this,n={type:this._type},r=Object.keys(this._flags);if(r.length)if(["empty","default","lazy","label"].some(function(e){return t._flags.hasOwnProperty(e)})){n.flags={};for(var i=0;i<r.length;++i){var o=r[i];"empty"===o?n.flags[o]=this._flags[o].describe():"default"===o?u.isRef(this._flags[o])?n.flags[o]=this._flags[o].toString():"function"==typeof this._flags[o]?n.flags[o]={description:this._flags[o].description,function:this._flags[o]}:n.flags[o]=this._flags[o]:"lazy"===o||"label"===o||(n.flags[o]=this._flags[o])}}else n.flags=this._flags;this._settings&&(n.options=s.clone(this._settings)),this._baseType&&(n.base=this._baseType.describe()),this._description&&(n.description=this._description),this._notes.length&&(n.notes=this._notes),this._tags.length&&(n.tags=this._tags),this._meta.length&&(n.meta=this._meta),this._examples.length&&(n.examples=this._examples),this._unit&&(n.unit=this._unit);var a=this._valids.values();a.length&&(n.valids=a.map(function(e){return u.isRef(e)?e.toString():e}));var l=this._invalids.values();l.length&&(n.invalids=l.map(function(e){return u.isRef(e)?e.toString():e})),n.rules=[];for(var c=0;c<this._tests.length;++c){var f=this._tests[c],h={name:f.name};void 0!==f.arg&&(h.arg=u.isRef(f.arg)?f.arg.toString():f.arg);var p=f.options;if(p){if(p.hasRef){h.arg={};for(var d=Object.keys(f.arg),m=0;m<d.length;++m){var g=d[m],y=f.arg[g];h.arg[g]=u.isRef(y)?y.toString():y}}"string"==typeof p.description?h.description=p.description:"function"==typeof p.description&&(h.description=p.description(h.arg))}n.rules.push(h)}n.rules.length||delete n.rules;var b=this._getLabel();return b&&(n.label=b),n},e.prototype.label=function e(t){s.assert(t&&"string"==typeof t,"Label name must be a non-empty string");var n=this.clone();return n._flags.label=t,n},e.prototype._getLabel=function e(t){return this._flags.label||t},i(e,[{key:"schemaType",get:function e(){return this._type}}]),e}(),h.Any.prototype.isImmutable=!0,h.Any.prototype.only=h.Any.prototype.equal=h.Any.prototype.valid,h.Any.prototype.disallow=h.Any.prototype.not=h.Any.prototype.invalid,h.Any.prototype.exist=h.Any.prototype.required,h._try=function(e,t){var n=void 0,r=void 0;try{r=e.apply(null,t)}catch(e){n=e}return{value:r,error:n}}},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=n(33),i=n(34),o=n(35);function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=l.prototype):(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,n,r):"string"==typeof t?d(e,t,n):y(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t,n,r){return f(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}function p(e,t){if(f(t),e=u(e,t<0?0:0|b(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|w(t,n);e=u(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function m(e,t){var n=t.length<0?0:0|b(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function g(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),l.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=l.prototype):e=m(e,t),e}function y(e,t){if(l.isBuffer(t)){var n=0|b(t.length);return e=u(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||te(t.length)?u(e,0):m(e,t);if("Buffer"===t.type&&o(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),l.alloc(+e)}function w(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(r)return J(e).length;t=(""+t).toLowerCase(),r=!0}}function _(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,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function k(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(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),n=+n,isNaN(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=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,i){var o=1,s=e.length,a=t.length,u;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(u=n;u<s;u++)if(l(e,u)===l(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===a)return c*o}else-1!==c&&(u-=u-c),c=-1}else for(n+a>s&&(n=s-a),u=n;u>=0;u--){for(var f=!0,h=0;h<a;h++)if(l(e,u+h)!==l(t,h)){f=!1;break}if(f)return u}return-1}function x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function C(e,t,n,r){return ee(J(t,e.length-n),e,n,r)}function A(e,t,n,r){return ee(Z(t),e,n,r)}function I(e,t,n,r){return A(e,t,n,r)}function T(e,t,n,r){return ee(Q(t),e,n,r)}function j(e,t,n,r){return ee(X(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function P(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1,u,l,c,f;if(i+a<=n)switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128==(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&f<1114112&&(s=f))}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}t.Buffer=l,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return h(null,e,t,n)},l.allocUnsafe=function(e){return p(null,e)},l.allocUnsafeSlow=function(e){return p(null,e)},l.isBuffer=function e(t){return!(null==t||!t._isBuffer)},l.compare=function e(t,n){if(!l.isBuffer(t)||!l.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,o=0,s=Math.min(r,i);o<s;++o)if(t[o]!==n[o]){r=t[o],i=n[o];break}return r<i?-1:i<r?1:0},l.isEncoding=function e(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}},l.concat=function e(t,n){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var r;if(void 0===n)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var i=l.allocUnsafe(n),s=0;for(r=0;r<t.length;++r){var a=t[r];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,s),s+=a.length}return i},l.byteLength=w,l.prototype._isBuffer=!0,l.prototype.swap16=function e(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)k(this,n,n+1);return this},l.prototype.swap32=function e(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)k(this,n,n+3),k(this,n+1,n+2);return this},l.prototype.swap64=function e(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)k(this,n,n+7),k(this,n+1,n+6),k(this,n+2,n+5),k(this,n+3,n+4);return this},l.prototype.toString=function e(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):_.apply(this,arguments)},l.prototype.equals=function e(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function e(){var n="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(n+=" ... ")),"<Buffer "+n+">"},l.prototype.compare=function e(t,n,r,i,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),f=t.slice(n,r),h=0;h<u;++h)if(c[h]!==f[h]){s=c[h],a=f[h];break}return s<a?-1:a<s?1:0},l.prototype.includes=function e(t,n,r){return-1!==this.indexOf(t,n,r)},l.prototype.indexOf=function e(t,n,r){return S(this,t,n,r,!0)},l.prototype.lastIndexOf=function e(t,n,r){return S(this,t,n,r,!1)},l.prototype.write=function e(t,n,r,i){if(void 0===n)i="utf8",r=this.length,n=0;else if(void 0===r&&"string"==typeof n)i=n,r=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var o=this.length-n;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return x(this,t,n,r);case"utf8":case"utf-8":return C(this,t,n,r);case"ascii":return A(this,t,n,r);case"latin1":case"binary":return I(this,t,n,r);case"base64":return T(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function R(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=B));return n}function N(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 M(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 L(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+=Y(e[o]);return i}function F(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 D(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 U(e,t,n,r,i,o){if(!l.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 z(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function q(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function K(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 H(e,t,n,r,o){return o||K(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),i.write(e,t,n,r,23,4),n+4}function V(e,t,n,r,o){return o||K(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function e(t,n){var r=this.length,i;if(t=~~t,n=void 0===n?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t),l.TYPED_ARRAY_SUPPORT)i=this.subarray(t,n),i.__proto__=l.prototype;else{var o=n-t;i=new l(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i},l.prototype.readUIntLE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t],o=1,s=0;++s<n&&(o*=256);)i+=this[t+s]*o;return i},l.prototype.readUIntBE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t+--n],o=1;n>0&&(o*=256);)i+=this[t+--n]*o;return i},l.prototype.readUInt8=function e(t,n){return n||D(t,1,this.length),this[t]},l.prototype.readUInt16LE=function e(t,n){return n||D(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function e(t,n){return n||D(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function e(t,n){return n||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function e(t,n){return n||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=this[t],o=1,s=0;++s<n&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*n)),i},l.prototype.readIntBE=function e(t,n,r){t|=0,n|=0,r||D(t,n,this.length);for(var i=n,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*n)),s},l.prototype.readInt8=function e(t,n){return n||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function e(t,n){n||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function e(t,n){n||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function e(t,n){return n||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function e(t,n){return n||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function e(t,n){return n||D(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function e(t,n){return n||D(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function e(t,n){return n||D(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function e(t,n){return n||D(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function e(t,n,r,i){if(t=+t,n|=0,r|=0,!i){var o=Math.pow(2,8*r)-1;U(this,t,n,r,o,0)}var s=1,a=0;for(this[n]=255&t;++a<r&&(s*=256);)this[n+a]=t/s&255;return n+r},l.prototype.writeUIntBE=function e(t,n,r,i){if(t=+t,n|=0,r|=0,!i){var o=Math.pow(2,8*r)-1;U(this,t,n,r,o,0)}var s=r-1,a=1;for(this[n+s]=255&t;--s>=0&&(a*=256);)this[n+s]=t/a&255;return n+r},l.prototype.writeUInt8=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},l.prototype.writeUInt16LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):z(this,t,n,!0),n+2},l.prototype.writeUInt16BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):z(this,t,n,!1),n+2},l.prototype.writeUInt32LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):q(this,t,n,!0),n+4},l.prototype.writeUInt32BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):q(this,t,n,!1),n+4},l.prototype.writeIntLE=function e(t,n,r,i){if(t=+t,n|=0,!i){var o=Math.pow(2,8*r-1);U(this,t,n,r,o-1,-o)}var s=0,a=1,u=0;for(this[n]=255&t;++s<r&&(a*=256);)t<0&&0===u&&0!==this[n+s-1]&&(u=1),this[n+s]=(t/a>>0)-u&255;return n+r},l.prototype.writeIntBE=function e(t,n,r,i){if(t=+t,n|=0,!i){var o=Math.pow(2,8*r-1);U(this,t,n,r,o-1,-o)}var s=r-1,a=1,u=0;for(this[n+s]=255&t;--s>=0&&(a*=256);)t<0&&0===u&&0!==this[n+s+1]&&(u=1),this[n+s]=(t/a>>0)-u&255;return n+r},l.prototype.writeInt8=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=255&t,n+1},l.prototype.writeInt16LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):z(this,t,n,!0),n+2},l.prototype.writeInt16BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):z(this,t,n,!1),n+2},l.prototype.writeInt32LE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):q(this,t,n,!0),n+4},l.prototype.writeInt32BE=function e(t,n,r){return t=+t,n|=0,r||U(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):q(this,t,n,!1),n+4},l.prototype.writeFloatLE=function e(t,n,r){return H(this,t,n,!0,r)},l.prototype.writeFloatBE=function e(t,n,r){return H(this,t,n,!1,r)},l.prototype.writeDoubleLE=function e(t,n,r){return V(this,t,n,!0,r)},l.prototype.writeDoubleBE=function e(t,n,r){return V(this,t,n,!1,r)},l.prototype.copy=function e(t,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-n<i-r&&(i=t.length-n+r);var o=i-r,s;if(this===t&&r<n&&n<i)for(s=o-1;s>=0;--s)t[s+n]=this[s+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+n]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),n);return o},l.prototype.fill=function e(t,n,r,i){if("string"==typeof t){if("string"==typeof n?(i=n,n=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;var s;if(n>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=n;s<r;++s)this[s]=t;else{var a=l.isBuffer(t)?t:J(new l(t,i).toString()),u=a.length;for(s=0;s<r-n;++s)this[s+n]=a[s%u]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function $(e){if(e=G(e).replace(W,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function J(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),n>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 Z(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function X(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function Q(e){return r.toByteArray($(e))}function ee(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 te(e){return e!=e}}).call(t,n(5))},function(e,t,n){"use strict";var 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},i=n(0),o=n(1);t.schema=function(e,t){return void 0!==t&&null!==t&&"object"===(void 0===t?"undefined":r(t))?t.isJoi?t:Array.isArray(t)?e.alternatives().try(t):t instanceof RegExp?e.string().regex(t):t instanceof Date?e.date().valid(t):e.object().keys(t):"string"==typeof t?e.string().valid(t):"number"==typeof t?e.number().valid(t):"boolean"==typeof t?e.boolean().valid(t):o.isRef(t)?e.valid(t):(i.assert(null===t,"Invalid schema content:",t),e.valid(null))},t.ref=function(e){return o.isRef(e)?e:o.create(e)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var 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};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),s=n(20),a={annotations:Symbol("joi-annotations"),stringify:function(e,n){var i=void 0===e?"undefined":r(e);if(null===e)return"null";if("string"===i)return e;if(e instanceof t.Err||"function"===i||"symbol"===i)return e.toString();if("object"===i){if(Array.isArray(e)){for(var o="",s=0;s<e.length;++s)o=o+(o.length?", ":"")+a.stringify(e[s],n);return n?"["+o+"]":o}return e.toString()}return JSON.stringify(e)}};t.Err=function(){function e(t,n,r,o,a,u,l){i(this,e),this.isJoi=!0,this.type=t,this.context=n||{},this.context.key=r.path[r.path.length-1],this.context.label=r.key,this.path=r.path,this.options=o,this.flags=a,this.message=u,this.template=l;var c=this.options.language;this.flags.label?this.context.label=this.flags.label:!c||""!==this.context.label&&null!==this.context.label||(this.context.label=c.root||s.errors.root)}return e.prototype.toString=function e(){var t=this;if(this.message)return this.message;var n=void 0;this.template&&(n=this.template);var r=this.options.language;if(n=n||o.reach(r,this.type)||o.reach(s.errors,this.type),void 0===n)return'Error code "'+this.type+'" is not defined, your custom type is missing the correct language definition';var i=o.reach(r,"messages.wrapArrays");if("boolean"!=typeof i&&(i=s.errors.messages.wrapArrays),null===n){var u=a.stringify(this.context.reason,i);return i?u.slice(1,-1):u}var l=/\{\{\!?label\}\}/.test(n),c=n.length>2&&"!"===n[0]&&"!"===n[1];if(c&&(n=n.slice(2)),!l&&!c){var f=o.reach(r,"key");n="string"==typeof f?f+n:o.reach(s.errors,"key")+n}return n.replace(/\{\{(\!?)([^}]+)\}\}/g,function(e,n,r){var s=o.reach(t.context,r),u=a.stringify(s,i);return n&&t.options.escapeHtml?o.escapeHtml(u):u})},e}(),t.create=function(e,n,r,i,o,s,a){return new t.Err(e,n,r,i,o,s,a)},t.process=function(e,t){if(!e||!e.length)return null;var n="",r=[],i=function e(t,i){for(var o=0;o<t.length;++o){var s=t[o];if(s instanceof Error)return s;if(s.flags.error&&"function"!=typeof s.flags.error)return s.flags.error;var a=void 0;if(void 0===i&&(a=s.toString(),n=n+(n?". ":"")+a),s.context.reason&&s.context.reason.length){var u=e(s.context.reason,s.path);if(u)return u}else r.push({message:a||s.toString(),path:s.path,type:s.type,context:s.context})}},o=i(e);if(o)return o;var s=new Error(n);return s.isJoi=!0,s.name="ValidationError",s.details=r,s._object=t,s.annotate=a.annotate,s},a.safeStringify=function(e,t){return JSON.stringify(e,a.serializer(),t)},a.serializer=function(){var e=[],t=[],n=function n(r,i){return t[0]===i?"[Circular ~]":"[Circular ~."+e.slice(0,t.indexOf(i)).join(".")+"]"};return function(i,o){if(t.length>0){var s=t.indexOf(this);~s?(t.length=s+1,e.length=s+1,e[s]=i):(t.push(this),e.push(i)),~t.indexOf(o)&&(o=n.call(this,i,o))}else t.push(o);if(o){var u=o[a.annotations];if(u){if(Array.isArray(o)){for(var l=[],c=0;c<o.length;++c)u.errors[c]&&l.push("_$idx$_"+u.errors[c].sort().join(", ")+"_$end$_"),l.push(o[c]);o=l}else{for(var f=Object.keys(u.errors),h=0;h<f.length;++h){var p=f[h];o[p+"_$key$_"+u.errors[p].sort().join(", ")+"_$end$_"]=o[p],o[p]=void 0}for(var d=Object.keys(u.missing),m=0;m<d.length;++m){var g=d[m];o["_$miss$_"+g+"|"+u.missing[g]+"_$end$_"]="__missing__"}}return o}}return o===1/0||o===-1/0||Number.isNaN(o)||"function"==typeof o||"symbol"===(void 0===o?"undefined":r(o))?"["+o.toString()+"]":o}},a.annotate=function(e){var t=e?"":"",n=e?"":"",i=e?"":"";if("object"!==r(this._object))return this.details[0].message;for(var s=o.clone(this._object||{}),u=this.details.length-1;u>=0;--u)for(var l=u+1,c=this.details[u],f=c.path,h=s,p=0;;++p){var d=f[p];if(h.isImmutable&&(h=h.clone()),!(p+1<f.length&&h[d]&&"string"!=typeof h[d])){var m=h[a.annotations]=h[a.annotations]||{errors:{},missing:{}},g=h[d],y=d||c.context.label;void 0!==g?(m.errors[y]=m.errors[y]||[],m.errors[y].push(l)):m.missing[y]=l;break}h=h[d]}var b=/_\$key\$_([, \d]+)_\$end\$_\"/g,v=/\"_\$miss\$_([^\|]+)\|(\d+)_\$end\$_\"\: \"__missing__\"/g,w=/\s*\"_\$idx\$_([, \d]+)_\$end\$_\",?\n(.*)/g,_=/"\[(NaN|Symbol.*|-?Infinity|function.*|\(.*)\]"/g,k=a.safeStringify(s,2).replace(b,function(e,n){return'" '+t+"["+n+"]"+i}).replace(v,function(e,r,o){return n+'"'+r+'"'+i+t+" ["+o+"]: -- missing --"+i}).replace(w,function(e,n,r){return"\n"+r+" "+t+"["+n+"]"+i}).replace(_,function(e,t){return t});k=k+"\n"+t;for(var S=0;S<this.details.length;++S){var E=S+1;k=k+"\n["+E+"] "+this.details[S].message}return k+=i,k}},function(e,t){var n=e.exports={},r,i;function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}function u(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l=[],c=!1,f,h=-1;function p(){c&&f&&(c=!1,f.length?l=f.concat(l):h=-1,l.length&&d())}function d(){if(!c){var e=a(p);c=!0;for(var t=l.length;t;){for(f=l,l=[];++h<t;)f&&f[h].run();h=-1,t=l.length}f=null,c=!1,u(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||c||a(d)},m.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=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}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}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}function l(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var c=n(0),f=n(2),h=n(4),p=n(6),d=n(26),m=n(1),g=n(11),y={alternatives:n(10),array:n(22),boolean:n(24),binary:n(23),date:n(12),func:n(25),number:n(27),object:n(13),string:n(28),callWithDefaults:function(e,t){var n;return c.assert(this,"Must be invoked on a Joi instance."),this._defaults&&(e=this._defaults(e)),e._currentJoi=this,(n=e)._init.apply(n,l(t))},root:function(){var e=new f,t=e.clone();return f.prototype._currentJoi=t,t._currentJoi=t,t.any=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return c.assert(0===n.length,"Joi.any() does not allow arguments."),y.callWithDefaults.call(this,e,n)},t.alternatives=t.alt=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.callWithDefaults.call(this,y.alternatives,t)},t.array=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.array() does not allow arguments."),y.callWithDefaults.call(this,y.array,t)},t.boolean=t.bool=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.boolean() does not allow arguments."),y.callWithDefaults.call(this,y.boolean,t)},t.binary=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.binary() does not allow arguments."),y.callWithDefaults.call(this,y.binary,t)},t.date=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.date() does not allow arguments."),y.callWithDefaults.call(this,y.date,t)},t.func=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.func() does not allow arguments."),y.callWithDefaults.call(this,y.func,t)},t.number=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.number() does not allow arguments."),y.callWithDefaults.call(this,y.number,t)},t.object=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.callWithDefaults.call(this,y.object,t)},t.string=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.assert(0===t.length,"Joi.string() does not allow arguments."),y.callWithDefaults.call(this,y.string,t)},t.ref=function(){return m.create.apply(m,arguments)},t.isRef=function(e){return m.isRef(e)},t.validate=function(n){var r,i=(r=(arguments.length<=1?0:arguments.length-1)-1+1,arguments.length<=r?void 0:arguments[r]),o="function"==typeof i?i:null,s=(arguments.length<=1?0:arguments.length-1)-(o?1:0);if(0===s)return e.validate(n,o);var a=2===s?arguments.length<=2?void 0:arguments[2]:{},u=t.compile(arguments.length<=1?void 0:arguments[1]);return u._validateWithOptions(n,a,o)},t.describe=function(){var n=arguments.length?t.compile(arguments.length<=0?void 0:arguments[0]):e;return n.describe()},t.compile=function(e){try{return h.schema(this,e)}catch(e){throw e.hasOwnProperty("path")&&(e.message=e.message+"("+e.path+")"),e}},t.assert=function(e,n,r){t.attempt(e,n,r)},t.attempt=function(e,n,r){var i=t.validate(e,n),o=i.error;if(o){if(!r)throw"function"==typeof o.annotate&&(o.message=o.annotate()),o;if(!(r instanceof Error))throw"function"==typeof o.annotate&&(o.message=r+" "+o.annotate()),o;throw r}return i.value},t.reach=function(e,t){c.assert(e&&e instanceof f,"you must provide a joi schema"),c.assert(Array.isArray(t)||"string"==typeof t,"path must be a string or an array of strings");var n=function e(t,n){if(!n.length)return t;var r=t._inner.children;if(r)for(var i=n.shift(),o=0;o<r.length;++o){var s=r[o];if(s.key===i)return e(s.schema,n)}},r="string"==typeof t?t?t.split("."):[]:t.slice();return n(e,r)},t.lazy=function(e){return d.set(e)},t.defaults=function(e){var t=this;c.assert("function"==typeof e,"Defaults must be a function");var n=Object.create(this.any());return n=e(n),c.assert(n&&n instanceof this.constructor,"defaults() must return a schema"),r(n,this,n.clone()),n._defaults=function(n){return t._defaults&&(n=t._defaults(n),c.assert(n instanceof t.constructor,"defaults() must return a schema")),n=e(n),c.assert(n instanceof t.constructor,"defaults() must return a schema"),n},n},t.extend=function(){for(var e=this,n=arguments.length,i=Array(n),l=0;l<n;l++)i[l]=arguments[l];var d=c.flatten(i);c.assert(d.length>0,"You need to provide at least one extension"),this.assert(d,t.extensionsSchema);var b=Object.create(this.any());r(b,this);for(var v=function n(i){var l=d[i];"function"==typeof l&&(l=l(b)),e.assert(l,t.extensionSchema);var v=(l.base||e.any()).clone(),w=v.constructor,_=function(e){function t(){s(this,t);var n=a(this,e.call(this));return l.base&&r(n,v),n._type=l.name,l.language&&(n._settings=g.concat(n._settings,{language:o({},l.name,l.language)})),n}return u(t,e),t}(w);if(l.coerce&&(_.prototype._coerce=function(e,t,n){if(w.prototype._coerce){var r=w.prototype._coerce.call(this,e,t,n);if(r.errors)return r;e=r.value}var i=l.coerce.call(this,e,t,n);return i instanceof p.Err?{value:e,errors:i}:{value:i}}),l.pre&&(_.prototype._base=function(e,t,n){if(w.prototype._base){var r=w.prototype._base.call(this,e,t,n);if(r.errors)return r;e=r.value}var i=l.pre.call(this,e,t,n);return i instanceof p.Err?{value:e,errors:i}:{value:i}}),l.rules)for(var k=function t(n){var r=l.rules[n],i=r.params?r.params instanceof f?r.params._inner.children.map(function(e){return e.key}):Object.keys(r.params):[],o=r.params?h.schema(e,r.params):null;_.prototype[r.name]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>i.length)throw new Error("Unexpected number of arguments");for(var s=!1,a={},u=0;u<i.length;++u)a[i[u]]=t[u],!s&&m.isRef(t[u])&&(s=!0);o&&(a=b.attempt(a,o));var l=void 0;if(r.validate){var h=function e(t,n,i){return r.validate.call(this,a,t,n,i)};l=this._test(r.name,a,h,{description:r.description,hasRef:s})}else l=this.clone();if(r.setup){var p=r.setup.call(l,a);void 0!==p&&(c.assert(p instanceof f,"Setup of extension Joi."+this._type+"()."+r.name+"() must return undefined or a Joi object"),l=p)}return l}},S=0;S<l.rules.length;++S)k(S);l.describe&&(_.prototype.describe=function(){var e=w.prototype.describe.call(this);return l.describe.call(this,e)});var E=new _;b[l.name]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.callWithDefaults.call(this,E,t)}},w=0;w<d.length;++w)v(w);return b},t.extensionSchema=y.object.keys({base:y.object.type(f,"Joi object"),name:y.string.required(),coerce:y.func.arity(3),pre:y.func.arity(3),language:y.object,describe:y.func.arity(1),rules:y.array.items(y.object.keys({name:y.string.required(),setup:y.func.arity(1),validate:y.func.arity(4),params:[y.object.pattern(/.*/,y.object.type(f,"Joi object")),y.object.type(y.object.constructor,"Joi object")],description:[y.string,y.func.arity(1)]}).or("setup","validate"))}).strict(),t.extensionsSchema=y.array.items([y.object,y.func.arity(1)]).strict(),t.version=n(36).version,t}};e.exports=y.root()},function(e,t,n){"use strict";(function(t){var 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};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=n(1),a={extendedCheckForValue:function(e,n){var i=void 0===e?"undefined":r(e);if("object"===i){if(e instanceof Date)return function(t){return t instanceof Date&&e.getTime()===t.getTime()};if(t.isBuffer(e))return function(n){return t.isBuffer(n)&&e.length===n.length&&e.toString("binary")===n.toString("binary")}}else if(n&&"string"===i){var o=e.toLowerCase();return function(e){return"string"==typeof e&&o===e.toLowerCase()}}return null}};e.exports=function(){function e(t){o(this,e),this._set=new Set(t),this._hasRef=!1}return e.prototype.add=function e(t,n){var r=s.isRef(t);return!r&&this.has(t,null,null,!1)?this:(void 0!==n&&s.push(n,t),this._set.add(t),this._hasRef|=r,this)},e.prototype.merge=function e(t,n){var r=!0,i=!1,o=void 0;try{for(var s=t._set[Symbol.iterator](),a;!(r=(a=s.next()).done);r=!0){var u=a.value;this.add(u)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}var l=!0,c=!1,f=void 0;try{for(var h=n._set[Symbol.iterator](),p;!(l=(p=h.next()).done);l=!0){var d=p.value;this.remove(d)}}catch(e){c=!0,f=e}finally{try{!l&&h.return&&h.return()}finally{if(c)throw f}}return this},e.prototype.remove=function e(t){return this._set.delete(t),this},e.prototype.has=function e(t,n,r,i){if(!this._set.size)return!1;var o=this._set.has(t);if(o)return o;var u=a.extendedCheckForValue(t,i);if(!u){if(n&&this._hasRef){var l=!0,c=!1,f=void 0;try{for(var h=this._set[Symbol.iterator](),p;!(l=(p=h.next()).done);l=!0){var d=p.value;if(s.isRef(d)&&(d=d(n.reference||n.parent,r),t===d||Array.isArray(d)&&d.includes(t)))return!0}}catch(e){c=!0,f=e}finally{try{!l&&h.return&&h.return()}finally{if(c)throw f}}}return!1}return this._has(t,n,r,u)},e.prototype._has=function e(t,n,r,i){var o=!(!n||!this._hasRef),a=function e(n){return t===n||i(n)},u=!0,l=!1,c=void 0;try{for(var f=this._set[Symbol.iterator](),h;!(u=(h=f.next()).done);u=!0){var p=h.value;if(o&&s.isRef(p)&&(p=p(n.reference||n.parent,r),Array.isArray(p))){if(p.find(a))return!0}else if(a(p))return!0}}catch(e){l=!0,c=e}finally{try{!u&&f.return&&f.return()}finally{if(l)throw c}}return!1},e.prototype.values=function e(t){if(t&&t.stripUndefined){var e=[],n=!0,r=!1,i=void 0;try{for(var o=this._set[Symbol.iterator](),s;!(n=(s=o.next()).done);n=!0){var a=s.value;void 0!==a&&e.push(a)}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return e}return Array.from(this._set)},e.prototype.slice=function t(){var n=new e(this._set);return n._hasRef=this._hasRef,n},e.prototype.concat=function t(n){var r=new e([].concat(i(this._set),i(n._set)));return r._hasRef=!!(this._hasRef|n._hasRef),r},e}()}).call(t,n(3).Buffer)},function(e,t,n){"use strict";var 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};function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}var u=n(0),l=n(2),c=n(4),f=n(1),h={};h.Alternatives=function(e){function t(){o(this,t);var n=s(this,e.call(this));return n._type="alternatives",n._invalids.remove(null),n._inner.matches=[],n}return a(t,e),t.prototype._init=function e(){return arguments.length?this.try.apply(this,arguments):this},t.prototype._base=function e(t,n,r){for(var i=[],o=this._inner.matches.length,s=this._baseType,a=0;a<o;++a){var u=this._inner.matches[a];if(u.schema){var l=u.schema._validate(t,n,r);if(!l.errors)return l;i=i.concat(l.errors)}else{var c=u.peek||u.is,f=u.is?u.ref(n.reference||n.parent,r):t,h=c._validate(f,null,r,n.parent).errors;if(h){if(u.otherwise)return u.otherwise._validate(t,n,r)}else if(u.then)return u.then._validate(t,n,r);if(a===o-1&&s)return s._validate(t,n,r)}}return i.length?{errors:this.createError("alternatives.child",{reason:i},n,r)}:{errors:this.createError("alternatives.base",null,n,r)}},t.prototype.try=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n=u.flatten(n),u.assert(n.length,"Cannot add other alternatives without at least one schema");for(var i=this.clone(),o=0;o<n.length;++o){var s=c.schema(this._currentJoi,n[o]);s._refs.length&&(i._refs=i._refs.concat(s._refs)),i._inner.matches.push({schema:s})}return i},t.prototype.when=function e(t,n){var i=!1;u.assert(f.isRef(t)||"string"==typeof t||(i=t instanceof l),"Invalid condition:",t),u.assert(n,"Missing options"),u.assert("object"===(void 0===n?"undefined":r(n)),"Invalid options"),i?u.assert(!n.hasOwnProperty("is"),'"is" can not be used with a schema condition'):u.assert(n.hasOwnProperty("is"),'Missing "is" directive'),u.assert(void 0!==n.then||void 0!==n.otherwise,'options must have at least one of "then" or "otherwise"');var o=this.clone(),s=void 0;i||(s=c.schema(this._currentJoi,n.is),null!==n.is&&(f.isRef(n.is)||n.is instanceof l)||(s=s.required()));var a={ref:i?null:c.ref(t),peek:i?t:null,is:s,then:void 0!==n.then?c.schema(this._currentJoi,n.then):void 0,otherwise:void 0!==n.otherwise?c.schema(this._currentJoi,n.otherwise):void 0};return o._baseType&&(a.then=a.then&&o._baseType.concat(a.then),a.otherwise=a.otherwise&&o._baseType.concat(a.otherwise)),i||(f.push(o._refs,a.ref),o._refs=o._refs.concat(a.is._refs)),a.then&&a.then._refs&&(o._refs=o._refs.concat(a.then._refs)),a.otherwise&&a.otherwise._refs&&(o._refs=o._refs.concat(a.otherwise._refs)),o._inner.matches.push(a),o},t.prototype.describe=function e(){for(var t=l.prototype.describe.call(this),n=[],r=0;r<this._inner.matches.length;++r){var i=this._inner.matches[r];if(i.schema)n.push(i.schema.describe());else{var o=i.is?{ref:i.ref.toString(),is:i.is.describe()}:{peek:i.peek.describe()};i.then&&(o.then=i.then.describe()),i.otherwise&&(o.otherwise=i.otherwise.describe()),n.push(o)}}return t.alternatives=n,t},t}(l),e.exports=new h.Alternatives},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0);t.concat=function(e,t){if(!t)return e;for(var n=r({},e),o=Object.keys(t),s=0;s<o.length;++s){var a=o[s];"language"===a&&n.hasOwnProperty(a)?n[a]=i.applyToDefaults(n[a],t[a]):n[a]=t[a]}return n}},function(e,t,n){"use strict";function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(2),u=n(1),l=n(0),c={},f;c.isoDate=/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/,c.invalidDate=new Date(""),c.isIsoDate=(f=c.isoDate.toString(),function(e){return e&&e.toString()===f}),c.Date=function(e){function t(){i(this,t);var n=o(this,e.call(this));return n._type="date",n}return s(t,e),t.prototype._base=function e(t,n,r){var i={value:r.convert&&c.Date.toDate(t,this._flags.format,this._flags.timestamp,this._flags.multiplier)||t};if(i.value instanceof Date&&!isNaN(i.value.getTime()))i.errors=null;else if(r.convert){var o=void 0;o=c.isIsoDate(this._flags.format)?"isoDate":this._flags.timestamp?"timestamp."+this._flags.timestamp:"base",i.errors=this.createError("date."+o,null,n,r)}else i.errors=this.createError("date.strict",null,n,r);return i},t.toDate=function e(t,n,r,i){if(t instanceof Date)return t;if("string"==typeof t||"number"==typeof t&&!isNaN(t)&&isFinite(t)){"string"==typeof t&&/^[+-]?\d+(\.\d+)?$/.test(t)&&(t=parseFloat(t));var o=void 0;if(o=n&&c.isIsoDate(n)?n.test(t)?new Date(t):c.invalidDate:r&&i?/^\s*$/.test(t)?c.invalidDate:new Date(t*i):new Date(t),!isNaN(o.getTime()))return o}return null},t.prototype.iso=function e(){if(this._flags.format===c.isoDate)return this;var t=this.clone();return t._flags.format=c.isoDate,t},t.prototype.timestamp=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript",n=["javascript","unix"];if(l.assert(n.includes(t),'"type" must be one of "'+n.join('", "')+'"'),this._flags.timestamp===t)return this;var r=this.clone();return r._flags.timestamp=t,r._flags.multiplier="unix"===t?1e3:1,r},t.prototype._isIsoDate=function e(t){return c.isoDate.test(t)},t}(a),c.compare=function(e,t){return function(n){var r="now"===n,i=u.isRef(n);return r||i||(n=c.Date.toDate(n)),l.assert(n,"Invalid date format"),this._test(e,n,function(o,s,a){var u=void 0;if(r)u=Date.now();else if(i){if(u=c.Date.toDate(n(s.reference||s.parent,a)),!u)return this.createError("date.ref",{ref:n.key},s,a);u=u.getTime()}else u=n.getTime();return t(o.getTime(),u)?o:this.createError("date."+e,{limit:new Date(u)},s,a)})}},c.Date.prototype.min=c.compare("min",function(e,t){return e>=t}),c.Date.prototype.max=c.compare("max",function(e,t){return e<=t}),c.Date.prototype.greater=c.compare("greater",function(e,t){return e>t}),c.Date.prototype.less=c.compare("less",function(e,t){return e<t}),e.exports=new c.Date},function(e,t,n){"use strict";var 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};function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}var u=n(0),l=n(31),c=n(2),f=n(6),h=n(4),p={};p.Object=function(e){function t(){o(this,t);var n=s(this,e.call(this));return n._type="object",n._inner.children=null,n._inner.renames=[],n._inner.dependencies=[],n._inner.patterns=[],n}return a(t,e),t.prototype._init=function e(){return arguments.length?this.keys.apply(this,arguments):this},t.prototype._base=function e(t,n,i){var o=t,s=[],a=function e(){return{value:o,errors:s.length?s:null}};"string"==typeof t&&i.convert&&(t=p.safeParse(t));var l=this._flags.func?"function":"object";if(!t||(void 0===t?"undefined":r(t))!==l||Array.isArray(t))return s.push(this.createError(l+".base",null,n,i)),a();if(!(this._inner.renames.length||this._inner.dependencies.length||this._inner.children||this._inner.patterns.length))return o=t,a();if(o===t){"object"===l?o=Object.create(Object.getPrototypeOf(t)):(o=function e(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.apply(this,r)},o.prototype=u.clone(t.prototype));for(var c=Object.keys(t),h=0;h<c.length;++h)o[c[h]]=t[c[h]]}else o=t;for(var d={},m=0;m<this._inner.renames.length;++m){var g=this._inner.renames[m];if(g.isRegExp){for(var y=Object.keys(o),b=[],v=0;v<y.length;++v)g.from.test(y[v])&&b.push(y[v]);var w=b.every(function(e){return void 0===o[e]});if(g.options.ignoreUndefined&&w)continue;if(!g.options.multiple&&d[g.to]&&(s.push(this.createError("object.rename.regex.multiple",{from:b,to:g.to},n,i)),i.abortEarly))return a();if(Object.prototype.hasOwnProperty.call(o,g.to)&&!g.options.override&&!d[g.to]&&(s.push(this.createError("object.rename.regex.override",{from:b,to:g.to},n,i)),i.abortEarly))return a();if(w?delete o[g.to]:o[g.to]=o[b[b.length-1]],d[g.to]=!0,!g.options.alias)for(var _=0;_<b.length;++_)delete o[b[_]]}else{if(g.options.ignoreUndefined&&void 0===o[g.from])continue;if(!g.options.multiple&&d[g.to]&&(s.push(this.createError("object.rename.multiple",{from:g.from,to:g.to},n,i)),i.abortEarly))return a();if(Object.prototype.hasOwnProperty.call(o,g.to)&&!g.options.override&&!d[g.to]&&(s.push(this.createError("object.rename.override",{from:g.from,to:g.to},n,i)),i.abortEarly))return a();void 0===o[g.from]?delete o[g.to]:o[g.to]=o[g.from],d[g.to]=!0,g.options.alias||delete o[g.from]}}if(!this._inner.children&&!this._inner.patterns.length&&!this._inner.dependencies.length)return a();var k=new Set(Object.keys(o));if(this._inner.children){for(var S=[],E=0;E<this._inner.children.length;++E){var x=this._inner.children[E],C=x.key,A=o[C];k.delete(C);var I={key:C,path:n.path.concat(C),parent:o,reference:n.reference},T=x.schema._validate(A,I,i);if(T.errors){if(s.push(this.createError("object.child",{key:C,child:x.schema._getLabel(C),reason:T.errors},I,i)),i.abortEarly)return a()}else x.schema._flags.strip||void 0===T.value&&T.value!==A?(S.push(C),o[C]=T.finalValue):void 0!==T.value&&(o[C]=T.value)}for(var j=0;j<S.length;++j)delete o[S[j]]}if(k.size&&this._inner.patterns.length){var O=!0,P=!1,B=void 0;try{for(var R=k[Symbol.iterator](),N;!(O=(N=R.next()).done);O=!0)for(var M=N.value,L={key:M,path:n.path.concat(M),parent:o,reference:n.reference},F=o[M],D=0;D<this._inner.patterns.length;++D){var U=this._inner.patterns[D];if(U.regex?U.regex.test(M):!U.schema.validate(M).error){k.delete(M);var z=U.rule._validate(F,L,i);if(z.errors&&(s.push(this.createError("object.child",{key:M,child:U.rule._getLabel(M),reason:z.errors},L,i)),i.abortEarly))return a();o[M]=z.value}}}catch(re){P=!0,B=re}finally{try{!O&&R.return&&R.return()}finally{if(P)throw B}}}if(k.size&&(this._inner.children||this._inner.patterns.length)){if(i.stripUnknown&&!0!==this._flags.allowUnknown||i.skipFunctions){var q=!!i.stripUnknown&&(!0===i.stripUnknown||!!i.stripUnknown.objects),K=!0,H=!1,V=void 0;try{for(var W=k[Symbol.iterator](),$;!(K=($=W.next()).done);K=!0){var G=$.value;q?(delete o[G],k.delete(G)):"function"==typeof o[G]&&k.delete(G)}}catch(re){H=!0,V=re}finally{try{!K&&W.return&&W.return()}finally{if(H)throw V}}}if(void 0!==this._flags.allowUnknown?!this._flags.allowUnknown:!i.allowUnknown){var Y=!0,J=!1,Z=void 0;try{for(var X=k[Symbol.iterator](),Q;!(Y=(Q=X.next()).done);Y=!0){var ee=Q.value;s.push(this.createError("object.allowUnknown",{child:ee},{key:ee,path:n.path.concat(ee)},i,{}))}}catch(re){J=!0,Z=re}finally{try{!Y&&X.return&&X.return()}finally{if(J)throw Z}}}}for(var te=0;te<this._inner.dependencies.length;++te){var ne=this._inner.dependencies[te],re=p[ne.type].call(this,null!==ne.key&&o[ne.key],ne.peers,o,{key:ne.key,path:null===ne.key?n.path:n.path.concat(ne.key)},i);if(re instanceof f.Err&&(s.push(re),i.abortEarly))return a()}return a()},t.prototype.keys=function e(t){u.assert(null===t||void 0===t||"object"===(void 0===t?"undefined":r(t)),"Object schema must be a valid object"),u.assert(!(t&&t instanceof c),"Object schema cannot be a joi schema");var n=this.clone();if(!t)return n._inner.children=null,n;var i=Object.keys(t);if(!i.length)return n._inner.children=[],n;var o=new l;if(n._inner.children)for(var s=0;s<n._inner.children.length;++s){var a=n._inner.children[s];i.includes(a.key)||o.add(a,{after:a._refs,group:a.key})}for(var f=0;f<i.length;++f){var p=i[f],d=t[p];try{var m=h.schema(this._currentJoi,d);o.add({key:p,schema:m},{after:m._refs,group:p})}catch(e){throw e.hasOwnProperty("path")?e.path=p+"."+e.path:e.path=p,e}}return n._inner.children=o.nodes,n},t.prototype.append=function e(t){return null===t||void 0===t||0===Object.keys(t).length?this:this.keys(t)},t.prototype.unknown=function e(t){var n=!1!==t;if(this._flags.allowUnknown===n)return this;var r=this.clone();return r._flags.allowUnknown=n,r},t.prototype.length=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("length",t,function(e,n,r){return Object.keys(e).length===t?e:this.createError("object.length",{limit:t},n,r)})},t.prototype.min=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("min",t,function(e,n,r){return Object.keys(e).length>=t?e:this.createError("object.min",{limit:t},n,r)})},t.prototype.max=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("max",t,function(e,n,r){return Object.keys(e).length<=t?e:this.createError("object.max",{limit:t},n,r)})},t.prototype.pattern=function e(t,n){var r=t instanceof RegExp;u.assert(r||t instanceof c,"pattern must be a regex or schema"),u.assert(void 0!==n,"Invalid rule"),r&&(t=new RegExp(t.source,t.ignoreCase?"i":void 0));try{n=h.schema(this._currentJoi,n)}catch(e){throw e.hasOwnProperty("path")&&(e.message=e.message+"("+e.path+")"),e}var i=this.clone();return r?i._inner.patterns.push({regex:t,rule:n}):i._inner.patterns.push({schema:t,rule:n}),i},t.prototype.schema=function e(){return this._test("schema",null,function(e,t,n){return e instanceof c?e:this.createError("object.schema",null,t,n)})},t.prototype.with=function e(t,n){return u.assert(2===arguments.length,"Invalid number of arguments, expected 2."),this._dependency("with",t,n)},t.prototype.without=function e(t,n){return u.assert(2===arguments.length,"Invalid number of arguments, expected 2."),this._dependency("without",t,n)},t.prototype.xor=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this._dependency("xor",null,n)},t.prototype.or=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this._dependency("or",null,n)},t.prototype.and=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this._dependency("and",null,n)},t.prototype.nand=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this._dependency("nand",null,n)},t.prototype.requiredKeys=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this.applyFunctionToChildren(n,"required")},t.prototype.optionalKeys=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this.applyFunctionToChildren(n,"optional")},t.prototype.forbiddenKeys=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=u.flatten(n),this.applyFunctionToChildren(n,"forbidden")},t.prototype.rename=function e(t,n,r){u.assert("string"==typeof t||t instanceof RegExp,"Rename missing the from argument"),u.assert("string"==typeof n,"Rename missing the to argument"),u.assert(n!==t,"Cannot rename key to same name:",t);for(var i=0;i<this._inner.renames.length;++i)u.assert(this._inner.renames[i].from!==t,"Cannot rename the same key multiple times");var o=this.clone();return o._inner.renames.push({from:t,to:n,options:u.applyToDefaults(p.renameDefaults,r||{}),isRegExp:t instanceof RegExp}),o},t.prototype.applyFunctionToChildren=function e(t,n,r,i){t=[].concat(t),u.assert(t.length>0,"expected at least one children");var o=p.groupChildren(t),s=void 0;if(""in o?(s=this[n].apply(this,r),delete o[""]):s=this.clone(),s._inner.children){i=i?i+".":"";for(var a=0;a<s._inner.children.length;++a){var l=s._inner.children[a],c=o[l.key];c&&(s._inner.children[a]={key:l.key,_refs:l._refs,schema:l.schema.applyFunctionToChildren(c,n,r,i+l.key)},delete o[l.key])}}var f=Object.keys(o);return u.assert(0===f.length,"unknown key(s)",f.join(", ")),s},t.prototype._dependency=function e(t,n,r){r=[].concat(r);for(var i=0;i<r.length;++i)u.assert("string"==typeof r[i],t,"peers must be a string or array of strings");var o=this.clone();return o._inner.dependencies.push({type:t,key:n,peers:r}),o},t.prototype.describe=function e(t){var n=c.prototype.describe.call(this);if(n.rules)for(var i=0;i<n.rules.length;++i){var o=n.rules[i];o.arg&&"object"===r(o.arg)&&o.arg.schema&&o.arg.ref&&(o.arg={schema:o.arg.schema.describe(),ref:o.arg.ref.toString()})}if(this._inner.children&&!t){n.children={};for(var s=0;s<this._inner.children.length;++s){var a=this._inner.children[s];n.children[a.key]=a.schema.describe()}}if(this._inner.dependencies.length&&(n.dependencies=u.clone(this._inner.dependencies)),this._inner.patterns.length){n.patterns=[];for(var l=0;l<this._inner.patterns.length;++l){var f=this._inner.patterns[l];f.regex?n.patterns.push({regex:f.regex.toString(),rule:f.rule.describe()}):n.patterns.push({schema:f.schema.describe(),rule:f.rule.describe()})}}return this._inner.renames.length>0&&(n.renames=u.clone(this._inner.renames)),n},t.prototype.assert=function e(t,n,r){t=h.ref(t),u.assert(t.isContext||t.depth>1,"Cannot use assertions for root level references - use direct key rules instead"),r=r||"pass the assertion test";try{n=h.schema(this._currentJoi,n)}catch(e){throw e.hasOwnProperty("path")&&(e.message=e.message+"("+e.path+")"),e}var i=t.path[t.path.length-1],o=t.path.join(".");return this._test("assert",{schema:n,ref:t},function(e,s,a){var l=n._validate(t(e),null,a,e);if(!l.errors)return e;var c=u.merge({},s);return c.key=i,c.path=t.path,this.createError("object.assert",{ref:o,message:r},c,a)})},t.prototype.type=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name;u.assert("function"==typeof t,"type must be a constructor function");var r={name:n,ctor:t};return this._test("type",r,function(e,n,i){return e instanceof t?e:this.createError("object.type",{type:r.name},n,i)})},t}(c),p.safeParse=function(e){try{return JSON.parse(e)}catch(e){}return e},p.renameDefaults={alias:!1,multiple:!1,override:!1},p.groupChildren=function(e){e.sort();for(var t={},n=0;n<e.length;++n){var r=e[n];u.assert("string"==typeof r,"children must be strings");var i=r.split(".")[0],o=t[i]=t[i]||[];o.push(r.substring(i.length+1))}return t},p.keysToLabels=function(e,t){var n=e._inner.children;if(!n)return t;var r=function e(t){var r=n.find(function(e){return e.key===t});return r?r.schema._getLabel(t):t};return Array.isArray(t)?t.map(r):r(t)},p.with=function(e,t,n,r,i){if(void 0===e)return e;for(var o=0;o<t.length;++o){var s=t[o];if(!Object.prototype.hasOwnProperty.call(n,s)||void 0===n[s])return this.createError("object.with",{main:r.key,mainWithLabel:p.keysToLabels(this,r.key),peer:s,peerWithLabel:p.keysToLabels(this,s)},r,i)}return e},p.without=function(e,t,n,r,i){if(void 0===e)return e;for(var o=0;o<t.length;++o){var s=t[o];if(Object.prototype.hasOwnProperty.call(n,s)&&void 0!==n[s])return this.createError("object.without",{main:r.key,mainWithLabel:p.keysToLabels(this,r.key),peer:s,peerWithLabel:p.keysToLabels(this,s)},r,i)}return e},p.xor=function(e,t,n,r,i){for(var o=[],s=0;s<t.length;++s){var a=t[s];Object.prototype.hasOwnProperty.call(n,a)&&void 0!==n[a]&&o.push(a)}if(1===o.length)return e;var u={peers:t,peersWithLabels:p.keysToLabels(this,t)};return 0===o.length?this.createError("object.missing",u,r,i):this.createError("object.xor",u,r,i)},p.or=function(e,t,n,r,i){for(var o=0;o<t.length;++o){var s=t[o];if(Object.prototype.hasOwnProperty.call(n,s)&&void 0!==n[s])return e}return this.createError("object.missing",{peers:t,peersWithLabels:p.keysToLabels(this,t)},r,i)},p.and=function(e,t,n,r,i){for(var o=[],s=[],a=t.length,u=0;u<a;++u){var l=t[u];Object.prototype.hasOwnProperty.call(n,l)&&void 0!==n[l]?s.push(l):o.push(l)}var c=o.length===a||s.length===a;if(!c)return this.createError("object.and",{present:s,presentWithLabels:p.keysToLabels(this,s),missing:o,missingWithLabels:p.keysToLabels(this,o)},r,i)},p.nand=function(e,t,n,r,i){for(var o=[],s=0;s<t.length;++s){var a=t[s];Object.prototype.hasOwnProperty.call(n,a)&&void 0!==n[a]&&o.push(a)}var l=u.clone(t),c=l.splice(0,1)[0],f=o.length===t.length;return f?this.createError("object.nand",{main:c,mainWithLabel:p.keysToLabels(this,c),peers:l,peersWithLabels:p.keysToLabels(this,l)},r,i):null},e.exports=new p.Object},function(e,t,n){"use strict";var r={rfc3986:{},generate:function(){var e="|",t="0?",n="0-9",i="[0-9]",o="a-zA-Z",s="[a-zA-Z]";r.rfc3986.ipv4Cidr="[0-9]|[1-2][0-9]|3[0-2]",r.rfc3986.ipv6Cidr="(?:0?0?[0-9]|0?[1-9][0-9]|1[01][0-9]|12[0-8])";var a="0-9A-Fa-f",u="[0-9A-Fa-f]",l="a-zA-Z0-9-\\._~",c="!\\$&'\\(\\)\\*\\+,;=",f="%0-9A-Fa-f",h=l+f+c+":@",p="["+h+"]",d="(?:0?0?[0-9]|0?[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";r.rfc3986.IPv4address="(?:"+d+"\\.){3}"+d;var m="[0-9A-Fa-f]{1,4}",g="(?:"+m+":"+m+"|"+r.rfc3986.IPv4address+")",y="(?:"+m+":){6}"+g,b="::(?:"+m+":){5}"+g,v="(?:"+m+")?::(?:"+m+":){4}"+g,w="(?:(?:"+m+":){0,1}"+m+")?::(?:"+m+":){3}"+g,_="(?:(?:"+m+":){0,2}"+m+")?::(?:"+m+":){2}"+g,k="(?:(?:"+m+":){0,3}"+m+")?::"+m+":"+g,S="(?:(?:"+m+":){0,4}"+m+")?::"+g,E="(?:(?:"+m+":){0,5}"+m+")?::"+m,x="(?:(?:"+m+":){0,6}"+m+")?::";r.rfc3986.IPv6address="(?:"+y+e+b+e+v+e+w+e+_+e+k+e+S+e+E+e+x+")",r.rfc3986.IPvFuture="v[0-9A-Fa-f]+\\.["+l+c+":]+",r.rfc3986.scheme="[a-zA-Z][a-zA-Z0-9+-\\.]*";var C="["+l+f+c+":]*",A="\\[(?:"+r.rfc3986.IPv6address+e+r.rfc3986.IPvFuture+")\\]",I="["+l+f+c+"]{0,255}",T="(?:"+A+e+r.rfc3986.IPv4address+e+I+")",j="[0-9]*",O="(?:"+C+"@)?"+T+"(?::"+j+")?",P=p+"*",B=p+"+",R="["+l+f+c+"@]+",N="",M="(?:\\/"+P+")*",L="\\/(?:"+B+M+")?",F=B+M,D=R+M;r.rfc3986.hierPart="(?:(?:\\/\\/"+O+M+")"+e+L+e+F+")",r.rfc3986.relativeRef="(?:(?:\\/\\/"+O+M+")"+e+L+e+D+e+")",r.rfc3986.query="["+h+"\\/\\?]*(?=#|$)",r.rfc3986.fragment="["+h+"\\/\\?]*"}};r.generate(),e.exports=r.rfc3986},function(e,t){},function(e,t,n){(function(e,r){var i=/%[sdj%]/g;t.format=function(e){if(!k(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),u=r[n];n<o;u=r[++n])v(u)||!C(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(n,i){if(E(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var o=!1;function s(){if(!o){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),o=!0}return n.apply(this,arguments)}return s};var o={},s;function a(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(n)?r.showHidden=n:n&&t._extend(r,n),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),f(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function l(e,t){return e}function c(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function f(e,n,r){if(e.customInspect&&n&&T(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return k(i)||(i=f(e,i,r)),i}var o=h(e,n);if(o)return o;var s=Object.keys(n),a=c(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),I(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(n);if(0===s.length){if(T(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(x(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return e.stylize(Date.prototype.toString.call(n),"date");if(I(n))return p(n)}var l="",b=!1,v=["{","}"],w;if(y(n)&&(b=!0,v=["[","]"]),T(n)){var _=n.name?": "+n.name:"";l=" [Function"+_+"]"}return x(n)&&(l=" "+RegExp.prototype.toString.call(n)),A(n)&&(l=" "+Date.prototype.toUTCString.call(n)),I(n)&&(l=" "+p(n)),0!==s.length||b&&0!=n.length?r<0?x(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),w=b?d(e,n,r,a,s):s.map(function(t){return m(e,n,r,a,t,b)}),e.seen.pop(),g(w,l,v)):v[0]+l+v[1]}function h(e,t){if(E(t))return e.stylize("undefined","undefined");if(k(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return _(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)N(t,String(s))?o.push(m(e,t,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(m(e,t,n,r,i,!0))}),o}function m(e,t,n,r,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),N(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=v(n)?f(e,u.value,null):f(e,u.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),E(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function g(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function y(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function v(e){return null===e}function w(e){return null==e}function _(e){return"number"==typeof e}function k(e){return"string"==typeof e}function S(e){return"symbol"==typeof e}function E(e){return void 0===e}function x(e){return C(e)&&"[object RegExp]"===O(e)}function C(e){return"object"==typeof e&&null!==e}function A(e){return C(e)&&"[object Date]"===O(e)}function I(e){return C(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function j(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function O(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(E(s)&&(s=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var n=r.pid;o[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else o[e]=function(){};return o[e]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=y,t.isBoolean=b,t.isNull=v,t.isNullOrUndefined=w,t.isNumber=_,t.isString=k,t.isSymbol=S,t.isUndefined=E,t.isRegExp=x,t.isObject=C,t.isDate=A,t.isError=I,t.isFunction=T,t.isPrimitive=j,t.isBuffer=n(40);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",R(),t.format.apply(t,arguments))},t.inherits=n(39),t._extend=function(e,t){if(!t||!C(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,n(5),n(7))},function(e,t,n){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
function r(e,t){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}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=n(16),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function e(){}.name;function l(e){return Object.prototype.toString.call(e)}function c(e){return!i(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=b,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(o.isFunction(e)){if(u)return e.name;var t=e.toString(),n=t.match(h);return n&&n[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(u||!o.isFunction(e))return o.inspect(e);var t=p(e),n=t?": "+t:"";return"[Function"+n+"]"}function g(e){return d(m(e.actual),128)+" "+e.operator+" "+d(m(e.expected),128)}function y(e,t,n,r,i){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function b(e,t){e||y(e,!0,t,"==",f.ok)}function v(e,t,n,s){if(e===t)return!0;if(i(e)&&i(t))return 0===r(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(c(e)&&c(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;s=s||{actual:[],expected:[]};var a=s.actual.indexOf(e);return-1!==a&&a===s.expected.indexOf(t)||(s.actual.push(e),s.expected.push(t),_(e,t,n,s))}return n?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t,n,r){if(null===e||void 0===e||null===t||void 0===t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=w(e),s=w(t);if(i&&!s||!i&&s)return!1;if(i)return e=a.call(e),t=a.call(t),v(e,t,n);var u=C(e),l=C(t),c,f;if(u.length!==l.length)return!1;for(u.sort(),l.sort(),f=u.length-1;f>=0;f--)if(u[f]!==l[f])return!1;for(f=u.length-1;f>=0;f--)if(c=u[f],!v(e[c],t[c],n,r))return!1;return!0}function k(e,t,n){v(e,t,!0)&&y(e,t,n,"notDeepStrictEqual",k)}function S(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e){var t;try{e()}catch(e){t=e}return t}function x(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=E(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&y(i,n,"Missing expected exception"+r);var s="string"==typeof r,a=!e&&o.isError(i),u=!e&&i&&!n;if((a&&s&&S(i,n)||u)&&y(i,n,"Got unwanted exception"+r),e&&i&&n&&!S(i,n)||!e&&i)throw i}f.AssertionError=function e(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);var n=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,o=p(n),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(f.AssertionError,Error),f.fail=y,f.ok=b,f.equal=function e(t,n,r){t!=n&&y(t,n,r,"==",f.equal)},f.notEqual=function e(t,n,r){t==n&&y(t,n,r,"!=",f.notEqual)},f.deepEqual=function e(t,n,r){v(t,n,!1)||y(t,n,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function e(t,n,r){v(t,n,!0)||y(t,n,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function e(t,n,r){v(t,n,!1)&&y(t,n,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=k,f.strictEqual=function e(t,n,r){t!==n&&y(t,n,r,"===",f.strictEqual)},f.notStrictEqual=function e(t,n,r){t===n&&y(t,n,r,"!==",f.notStrictEqual)},f.throws=function(e,t,n){x(!0,e,t,n)},f.doesNotThrow=function(e,t,n){x(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var C=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(t,n(5))},function(e,t,n){"use strict";(function(e){var n={};t.escapeJavaScript=function(e){if(!e)return"";for(var t="",r=0;r<e.length;++r){var i=e.charCodeAt(r);n.isSafe(i)?t+=e[r]:t+=n.escapeJavaScriptChar(i)}return t},t.escapeHtml=function(e){if(!e)return"";for(var t="",r=0;r<e.length;++r){var i=e.charCodeAt(r);n.isSafe(i)?t+=e[r]:t+=n.escapeHtmlChar(i)}return t},t.escapeJson=function(e){if(!e)return"";var t=60,n=62,r=38,i=8232,o=void 0;return e.replace(/[<>&\u2028\u2029]/g,function(e){return o=e.charCodeAt(0),60===o?"\\u003c":62===o?"\\u003e":38===o?"\\u0026":8232===o?"\\u2028":"\\u2029"})},n.escapeJavaScriptChar=function(t){if(t>=256)return"\\u"+n.padLeft(""+t,4);var r=e.from(String.fromCharCode(t),"ascii").toString("hex");return"\\x"+n.padLeft(r,2)},n.escapeHtmlChar=function(t){var r=n.namedHtml[t];if(void 0!==r)return r;if(t>=256)return"&#"+t+";";var i=e.from(String.fromCharCode(t),"ascii").toString("hex");return"&#x"+n.padLeft(i,2)+";"},n.padLeft=function(e,t){for(;e.length<t;)e="0"+e;return e},n.isSafe=function(e){return void 0!==n.safeCharCodes[e]},n.namedHtml={38:"&amp;",60:"&lt;",62:"&gt;",34:"&quot;",160:"&nbsp;",162:"&cent;",163:"&pound;",164:"&curren;",169:"&copy;",174:"&reg;"},n.safeCharCodes=function(){for(var e={},t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&(e[t]=null);return e}()}).call(t,n(3).Buffer)},function(e,t,n){"use strict";(function(e){var 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},i=n(38),o={hasOwn:Object.prototype.hasOwnProperty,indexOf:Array.prototype.indexOf,defaultThreshold:16,maxIPv6Groups:8,categories:{valid:1,dnsWarn:7,rfc5321:15,cfws:31,deprecated:63,rfc5322:127,error:255},diagnoses:{valid:0,rfc5321TLD:9,rfc5321TLDNumeric:10,rfc5321QuotedString:11,rfc5321AddressLiteral:12,cfwsComment:17,cfwsFWS:18,undesiredNonAscii:25,deprecatedLocalPart:33,deprecatedFWS:34,deprecatedQTEXT:35,deprecatedQP:36,deprecatedComment:37,deprecatedCTEXT:38,deprecatedIPv6:39,deprecatedCFWSNearAt:49,rfc5322Domain:65,rfc5322TooLong:66,rfc5322LocalTooLong:67,rfc5322DomainTooLong:68,rfc5322LabelTooLong:69,rfc5322DomainLiteral:70,rfc5322DomainLiteralOBSDText:71,rfc5322IPv6GroupCount:72,rfc5322IPv62x2xColon:73,rfc5322IPv6BadCharacter:74,rfc5322IPv6MaxGroups:75,rfc5322IPv6ColonStart:76,rfc5322IPv6ColonEnd:77,errExpectingDTEXT:129,errNoLocalPart:130,errNoDomain:131,errConsecutiveDots:132,errATEXTAfterCFWS:133,errATEXTAfterQS:134,errATEXTAfterDomainLiteral:135,errExpectingQPair:136,errExpectingATEXT:137,errExpectingQTEXT:138,errExpectingCTEXT:139,errBackslashEnd:140,errDotStart:141,errDotEnd:142,errDomainHyphenStart:143,errDomainHyphenEnd:144,errUnclosedQuotedString:145,errUnclosedComment:146,errUnclosedDomainLiteral:147,errFWSCRLFx2:148,errFWSCRLFEnd:149,errCRNoLF:150,errUnknownTLD:160,errDomainTooShort:161},components:{localpart:0,domain:1,literal:2,contextComment:3,contextFWS:4,contextQuotedString:5,contextQuotedPair:6}};o.specials=function(){var e='()<>[]:;@\\,."',t=new Array(256);t.fill(!1);for(var n=0;n<e.length;++n)t[e.codePointAt(n)]=!0;return function(e){return t[e]}}(),o.c0Controls=function(){var e=new Array(256);e.fill(!1);for(var t=0;t<33;++t)e[t]=!0;return function(t){return e[t]}}(),o.c1Controls=function(){var e=new Array(256);e.fill(!1);for(var t=127;t<160;++t)e[t]=!0;return function(t){return e[t]}}(),o.regex={ipV4:/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipV6:/^[a-fA-F\d]{0,4}$/},o.normalizeSupportsNul="\0"==="\0".normalize("NFC"),o.nulNormalize=function(e){return e.split("\0").map(function(e){return e.normalize("NFC")}).join("\0")},o.normalize=function(e){return!o.normalizeSupportsNul&&e.indexOf("\0")>=0?o.nulNormalize(e):e.normalize("NFC")},o.checkIpV6=function(e){return e.every(function(e){return o.regex.ipV6.test(e)})},o.validDomain=function(e,t){return t.tldBlacklist?Array.isArray(t.tldBlacklist)?-1===o.indexOf.call(t.tldBlacklist,e):!o.hasOwn.call(t.tldBlacklist,e):Array.isArray(t.tldWhitelist)?-1!==o.indexOf.call(t.tldWhitelist,e):o.hasOwn.call(t.tldWhitelist,e)},t.validate=o.validate=function(t,n,s){n=n||{},t=o.normalize(t),"function"==typeof n&&(s=n,n={}),"function"!=typeof s&&(s=null);var a=void 0,u=void 0;if("number"==typeof n.errorLevel?(a=!0,u=n.errorLevel):(a=!!n.errorLevel,u=o.diagnoses.valid),n.tldWhitelist)if("string"==typeof n.tldWhitelist)n.tldWhitelist=[n.tldWhitelist];else if("object"!==r(n.tldWhitelist))throw new TypeError("expected array or object tldWhitelist");if(n.tldBlacklist)if("string"==typeof n.tldBlacklist)n.tldBlacklist=[n.tldBlacklist];else if("object"!==r(n.tldBlacklist))throw new TypeError("expected array or object tldBlacklist");if(n.minDomainAtoms&&(n.minDomainAtoms!==(0|+n.minDomainAtoms)||n.minDomainAtoms<0))throw new TypeError("expected positive integer minDomainAtoms");var l=o.diagnoses.valid,c=function e(t){t>l&&(l=t)},f=void 0===n.allowUnicode||!!n.allowUnicode;!f&&/[^\x00-\x7f]/.test(t)&&c(o.diagnoses.undesiredNonAscii);for(var h={now:o.components.localpart,prev:o.components.localpart,stack:[o.components.localpart]},p="",d={local:"",domain:""},m={locals:[""],domains:[""]},g=0,y=0,b=0,v=void 0,w=!1,_=!1,k=t.length,S=void 0,E=0;E<k;E+=S.length){switch(S=String.fromCodePoint(t.codePointAt(E)),h.now){case o.components.localpart:switch(S){case"(":0===y?c(0===g?o.diagnoses.cfwsComment:o.diagnoses.deprecatedComment):(c(o.diagnoses.cfwsComment),_=!0),h.stack.push(h.now),h.now=o.components.contextComment;break;case".":0===y?c(0===g?o.diagnoses.errDotStart:o.diagnoses.errConsecutiveDots):(_&&c(o.diagnoses.deprecatedLocalPart),_=!1,y=0,++g,d.local+=S,m.locals[g]="");break;case'"':0===y?(c(0===g?o.diagnoses.rfc5321QuotedString:o.diagnoses.deprecatedLocalPart),d.local+=S,m.locals[g]+=S,y+=e.byteLength(S,"utf8"),_=!0,h.stack.push(h.now),h.now=o.components.contextQuotedString):c(o.diagnoses.errExpectingATEXT);break;case"\r":if(k===++E||"\n"!==t[E]){c(o.diagnoses.errCRNoLF);break}case" ":case"\t":0===y?c(0===g?o.diagnoses.cfwsFWS:o.diagnoses.deprecatedFWS):_=!0,h.stack.push(h.now),h.now=o.components.contextFWS,p=S;break;case"@":if(1!==h.stack.length)throw new Error("unexpected item on context stack");0===d.local.length?c(o.diagnoses.errNoLocalPart):0===y?c(o.diagnoses.errDotEnd):e.byteLength(d.local,"utf8")>64?c(o.diagnoses.rfc5322LocalTooLong):h.prev!==o.components.contextComment&&h.prev!==o.components.contextFWS||c(o.diagnoses.deprecatedCFWSNearAt),h.now=o.components.domain,h.stack[0]=o.components.domain,g=0,y=0,_=!1;break;default:if(_)switch(h.prev){case o.components.contextComment:case o.components.contextFWS:c(o.diagnoses.errATEXTAfterCFWS);break;case o.components.contextQuotedString:c(o.diagnoses.errATEXTAfterQS);break;default:throw new Error("more atext found where none is allowed, but unrecognized prev context: "+h.prev)}else h.prev=h.now,v=S.codePointAt(0),(o.specials(v)||o.c0Controls(v)||o.c1Controls(v))&&c(o.diagnoses.errExpectingATEXT),d.local+=S,m.locals[g]+=S,y+=e.byteLength(S,"utf8")}break;case o.components.domain:switch(S){case"(":0===y?c(0===g?o.diagnoses.deprecatedCFWSNearAt:o.diagnoses.deprecatedComment):(_=!0,c(o.diagnoses.cfwsComment)),h.stack.push(h.now),h.now=o.components.contextComment;break;case".":var x=i.encode(m.domains[g]).length;0===y?c(0===g?o.diagnoses.errDotStart:o.diagnoses.errConsecutiveDots):w?c(o.diagnoses.errDomainHyphenEnd):x>63&&c(o.diagnoses.rfc5322LabelTooLong),_=!1,y=0,++g,m.domains[g]="",d.domain+=S;break;case"[":0===d.domain.length?(_=!0,y+=e.byteLength(S,"utf8"),h.stack.push(h.now),h.now=o.components.literal,d.domain+=S,m.domains[g]+=S,d.literal=""):c(o.diagnoses.errExpectingATEXT);break;case"\r":if(k===++E||"\n"!==t[E]){c(o.diagnoses.errCRNoLF);break}case" ":case"\t":0===y?c(0===g?o.diagnoses.deprecatedCFWSNearAt:o.diagnoses.deprecatedFWS):(c(o.diagnoses.cfwsFWS),_=!0),h.stack.push(h.now),h.now=o.components.contextFWS,p=S;break;default:if(_)switch(h.prev){case o.components.contextComment:case o.components.contextFWS:c(o.diagnoses.errATEXTAfterCFWS);break;case o.components.literal:c(o.diagnoses.errATEXTAfterDomainLiteral);break;default:throw new Error("more atext found where none is allowed, but unrecognized prev context: "+h.prev)}v=S.codePointAt(0),w=!1,o.specials(v)||o.c0Controls(v)||o.c1Controls(v)?c(o.diagnoses.errExpectingATEXT):"-"===S?(0===y&&c(o.diagnoses.errDomainHyphenStart),w=!0):(v<48||v>122&&v<192||v>57&&v<65||v>90&&v<97)&&c(o.diagnoses.rfc5322Domain),d.domain+=S,m.domains[g]+=S,y+=e.byteLength(S,"utf8")}break;case o.components.literal:switch(S){case"]":if(l<o.categories.deprecated){var C=-1,A=d.literal,I=o.regex.ipV4.exec(A);if(I&&(C=I.index,0!==C&&(A=A.slice(0,C)+"0:0")),0===C)c(o.diagnoses.rfc5321AddressLiteral);else if("ipv6:"!==A.slice(0,5).toLowerCase())c(o.diagnoses.rfc5322DomainLiteral);else{var T=A.slice(5),j=o.maxIPv6Groups,O=T.split(":");C=T.indexOf("::"),~C?C!==T.lastIndexOf("::")?c(o.diagnoses.rfc5322IPv62x2xColon):(0!==C&&C!==T.length-2||++j,O.length>j?c(o.diagnoses.rfc5322IPv6MaxGroups):O.length===j&&c(o.diagnoses.deprecatedIPv6)):O.length!==j&&c(o.diagnoses.rfc5322IPv6GroupCount),":"===T[0]&&":"!==T[1]?c(o.diagnoses.rfc5322IPv6ColonStart):":"===T[T.length-1]&&":"!==T[T.length-2]?c(o.diagnoses.rfc5322IPv6ColonEnd):o.checkIpV6(O)?c(o.diagnoses.rfc5321AddressLiteral):c(o.diagnoses.rfc5322IPv6BadCharacter)}}else c(o.diagnoses.rfc5322DomainLiteral);d.domain+=S,m.domains[g]+=S,y+=e.byteLength(S,"utf8"),h.prev=h.now,h.now=h.stack.pop();break;case"\\":c(o.diagnoses.rfc5322DomainLiteralOBSDText),h.stack.push(h.now),h.now=o.components.contextQuotedPair;break;case"\r":if(k===++E||"\n"!==t[E]){c(o.diagnoses.errCRNoLF);break}case" ":case"\t":c(o.diagnoses.cfwsFWS),h.stack.push(h.now),h.now=o.components.contextFWS,p=S;break;default:if(v=S.codePointAt(0),127!==v&&o.c1Controls(v)||0===v||"["===S){c(o.diagnoses.errExpectingDTEXT);break}(o.c0Controls(v)||127===v)&&c(o.diagnoses.rfc5322DomainLiteralOBSDText),d.literal+=S,d.domain+=S,m.domains[g]+=S,y+=e.byteLength(S,"utf8")}break;case o.components.contextQuotedString:switch(S){case"\\":h.stack.push(h.now),h.now=o.components.contextQuotedPair;break;case"\r":if(k===++E||"\n"!==t[E]){c(o.diagnoses.errCRNoLF);break}case"\t":d.local+=" ",m.locals[g]+=" ",y+=e.byteLength(S,"utf8"),c(o.diagnoses.cfwsFWS),h.stack.push(h.now),h.now=o.components.contextFWS,p=S;break;case'"':d.local+=S,m.locals[g]+=S,y+=e.byteLength(S,"utf8"),h.prev=h.now,h.now=h.stack.pop();break;default:v=S.codePointAt(0),127!==v&&o.c1Controls(v)||0===v||10===v?c(o.diagnoses.errExpectingQTEXT):(o.c0Controls(v)||127===v)&&c(o.diagnoses.deprecatedQTEXT),d.local+=S,m.locals[g]+=S,y+=e.byteLength(S,"utf8")}break;case o.components.contextQuotedPair:v=S.codePointAt(0),127!==v&&o.c1Controls(v)?c(o.diagnoses.errExpectingQPair):(v<31&&9!==v||127===v)&&c(o.diagnoses.deprecatedQP),h.prev=h.now,h.now=h.stack.pop();var P="\\"+S;switch(h.now){case o.components.contextComment:break;case o.components.contextQuotedString:d.local+=P,m.locals[g]+=P,y+=2;break;case o.components.literal:d.domain+=P,m.domains[g]+=P,y+=2;break;default:throw new Error("quoted pair logic invoked in an invalid context: "+h.now)}break;case o.components.contextComment:switch(S){case"(":h.stack.push(h.now),h.now=o.components.contextComment;break;case")":h.prev=h.now,h.now=h.stack.pop();break;case"\\":h.stack.push(h.now),h.now=o.components.contextQuotedPair;break;case"\r":if(k===++E||"\n"!==t[E]){c(o.diagnoses.errCRNoLF);break}case" ":case"\t":c(o.diagnoses.cfwsFWS),h.stack.push(h.now),h.now=o.components.contextFWS,p=S;break;default:if(v=S.codePointAt(0),0===v||10===v||127!==v&&o.c1Controls(v)){c(o.diagnoses.errExpectingCTEXT);break}(o.c0Controls(v)||127===v)&&c(o.diagnoses.deprecatedCTEXT)}break;case o.components.contextFWS:if("\r"===p){if("\r"===S){c(o.diagnoses.errFWSCRLFx2);break}++b>1?c(o.diagnoses.deprecatedFWS):b=1}switch(S){case"\r":k!==++E&&"\n"===t[E]||c(o.diagnoses.errCRNoLF);break;case" ":case"\t":break;default:"\r"===p&&c(o.diagnoses.errFWSCRLFEnd),b=0,h.prev=h.now,h.now=h.stack.pop(),--E}p=S;break;default:throw new Error("unknown context: "+h.now)}if(l>o.categories.rfc5322)break}if(l<o.categories.rfc5322){var B=i.encode(d.domain).length;if(h.now===o.components.contextQuotedString)c(o.diagnoses.errUnclosedQuotedString);else if(h.now===o.components.contextQuotedPair)c(o.diagnoses.errBackslashEnd);else if(h.now===o.components.contextComment)c(o.diagnoses.errUnclosedComment);else if(h.now===o.components.literal)c(o.diagnoses.errUnclosedDomainLiteral);else if("\r"===S)c(o.diagnoses.errFWSCRLFEnd);else if(0===d.domain.length)c(o.diagnoses.errNoDomain);else if(0===y)c(o.diagnoses.errDotEnd);else if(w)c(o.diagnoses.errDomainHyphenEnd);else if(B>255)c(o.diagnoses.rfc5322DomainTooLong);else if(e.byteLength(d.local,"utf8")+B+1>254)c(o.diagnoses.rfc5322TooLong);else if(y>63)c(o.diagnoses.rfc5322LabelTooLong);else if(n.minDomainAtoms&&m.domains.length<n.minDomainAtoms)c(o.diagnoses.errDomainTooShort);else if(n.tldWhitelist||n.tldBlacklist){var R=m.domains[g];o.validDomain(R,n)||c(o.diagnoses.errUnknownTLD)}}if(l<o.categories.dnsWarn){var N=m.domains[g].codePointAt(0);N<=57&&c(o.diagnoses.rfc5321TLDNumeric)}l<u&&(l=o.diagnoses.valid);var M=a?l:l<o.defaultThreshold;return s&&s(M),M},t.diagnoses=o.validate.diagnoses=function(){for(var e={},t=Object.keys(o.diagnoses),n=0;n<t.length;++n){var r=t[n];e[r]=o.diagnoses[r]}return e}(),t.normalize=o.normalize}).call(t,n(3).Buffer)},function(e,t,n){"use strict";t.errors={root:"value",key:'"{{!label}}" ',messages:{wrapArrays:!0},any:{unknown:"is not allowed",invalid:"contains an invalid value",empty:"is not allowed to be empty",required:"is required",allowOnly:"must be one of {{valids}}",default:"threw an error when running default method"},alternatives:{base:"not matching any of the allowed alternatives",child:null},array:{base:"must be an array",includes:"at position {{pos}} does not match any of the allowed types",includesSingle:'single value of "{{!label}}" does not match any of the allowed types',includesOne:"at position {{pos}} fails because {{reason}}",includesOneSingle:'single value of "{{!label}}" fails because {{reason}}',includesRequiredUnknowns:"does not contain {{unknownMisses}} required value(s)",includesRequiredKnowns:"does not contain {{knownMisses}}",includesRequiredBoth:"does not contain {{knownMisses}} and {{unknownMisses}} other required value(s)",excludes:"at position {{pos}} contains an excluded value",excludesSingle:'single value of "{{!label}}" contains an excluded value',min:"must contain at least {{limit}} items",max:"must contain less than or equal to {{limit}} items",length:"must contain {{limit}} items",ordered:"at position {{pos}} fails because {{reason}}",orderedLength:"at position {{pos}} fails because array must contain at most {{limit}} items",ref:'references "{{ref}}" which is not a positive integer',sparse:"must not be a sparse array",unique:"position {{pos}} contains a duplicate value"},boolean:{base:"must be a boolean"},binary:{base:"must be a buffer or a string",min:"must be at least {{limit}} bytes",max:"must be less than or equal to {{limit}} bytes",length:"must be {{limit}} bytes"},date:{base:"must be a number of milliseconds or valid date string",format:"must be a string with one of the following formats {{format}}",strict:"must be a valid date",min:'must be larger than or equal to "{{limit}}"',max:'must be less than or equal to "{{limit}}"',less:'must be less than "{{limit}}"',greater:'must be greater than "{{limit}}"',isoDate:"must be a valid ISO 8601 date",timestamp:{javascript:"must be a valid timestamp or number of milliseconds",unix:"must be a valid timestamp or number of seconds"},ref:'references "{{ref}}" which is not a date'},function:{base:"must be a Function",arity:"must have an arity of {{n}}",minArity:"must have an arity greater or equal to {{n}}",maxArity:"must have an arity lesser or equal to {{n}}",ref:"must be a Joi reference",class:"must be a class"},lazy:{base:"!!schema error: lazy schema must be set",schema:"!!schema error: lazy schema function must return a schema"},object:{base:"must be an object",child:'!!child "{{!child}}" fails because {{reason}}',min:"must have at least {{limit}} children",max:"must have less than or equal to {{limit}} children",length:"must have {{limit}} children",allowUnknown:'!!"{{!child}}" is not allowed',with:'!!"{{mainWithLabel}}" missing required peer "{{peerWithLabel}}"',without:'!!"{{mainWithLabel}}" conflict with forbidden peer "{{peerWithLabel}}"',missing:"must contain at least one of {{peersWithLabels}}",xor:"contains a conflict between exclusive peers {{peersWithLabels}}",or:"must contain at least one of {{peersWithLabels}}",and:"contains {{presentWithLabels}} without its required peers {{missingWithLabels}}",nand:'!!"{{mainWithLabel}}" must not exist simultaneously with {{peersWithLabels}}',assert:'!!"{{ref}}" validation failed because "{{ref}}" failed to {{message}}',rename:{multiple:'cannot rename child "{{from}}" because multiple renames are disabled and another key was already renamed to "{{to}}"',override:'cannot rename child "{{from}}" because override is disabled and target "{{to}}" exists',regex:{multiple:'cannot rename children {{from}} because multiple renames are disabled and another key was already renamed to "{{to}}"',override:'cannot rename children {{from}} because override is disabled and target "{{to}}" exists'}},type:'must be an instance of "{{type}}"',schema:"must be a Joi instance"},number:{base:"must be a number",min:"must be larger than or equal to {{limit}}",max:"must be less than or equal to {{limit}}",less:"must be less than {{limit}}",greater:"must be greater than {{limit}}",float:"must be a float or double",integer:"must be an integer",negative:"must be a negative number",positive:"must be a positive number",precision:"must have no more than {{limit}} decimal places",ref:'references "{{ref}}" which is not a number',multiple:"must be a multiple of {{multiple}}",port:"must be a valid port"},string:{base:"must be a string",min:"length must be at least {{limit}} characters long",max:"length must be less than or equal to {{limit}} characters long",length:"length must be {{limit}} characters long",alphanum:"must only contain alpha-numeric characters",token:"must only contain alpha-numeric and underscore characters",regex:{base:'with value "{{!value}}" fails to match the required pattern: {{pattern}}',name:'with value "{{!value}}" fails to match the {{name}} pattern',invert:{base:'with value "{{!value}}" matches the inverted pattern: {{pattern}}',name:'with value "{{!value}}" matches the inverted {{name}} pattern'}},email:"must be a valid email",uri:"must be a valid uri",uriRelativeOnly:"must be a valid relative uri",uriCustomScheme:"must be a valid uri with a scheme matching the {{scheme}} pattern",isoDate:"must be a valid ISO 8601 date",guid:"must be a valid GUID",hex:"must only contain hexadecimal characters",hexAlign:"hex decoded representation must be byte aligned",base64:"must be a valid base64 string",hostname:"must be a valid hostname",normalize:"must be unicode normalized in the {{form}} form",lowercase:"must only contain lowercase characters",uppercase:"must only contain uppercase characters",trim:"must not have leading or trailing whitespace",creditCard:"must be a credit card",ref:'references "{{ref}}" which is not a number',ip:"must be a valid ip address with a {{cidr}} CIDR",ipVersion:"must be a valid ip address of one of the following versions {{version}} with a {{cidr}} CIDR"}}},function(e,t,n){"use strict";var r=n(8);t.options=r.object({abortEarly:r.boolean(),convert:r.boolean(),allowUnknown:r.boolean(),skipFunctions:r.boolean(),stripUnknown:[r.boolean(),r.object({arrays:r.boolean(),objects:r.boolean()}).or("arrays","objects")],language:r.object(),presence:r.string().only("required","optional","forbidden","ignore"),raw:r.boolean(),context:r.object(),strip:r.boolean(),noDefaults:r.boolean(),escapeHtml:r.boolean()}).strict()},function(e,t,n){"use strict";var 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};function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}var u=n(2),l=n(4),c=n(1),f=n(0),h={fastSplice:function(e,t){for(var n=t;n<e.length;)e[n++]=e[n];--e.length}};h.Array=function(e){function t(){o(this,t);var n=s(this,e.call(this));return n._type="array",n._inner.items=[],n._inner.ordereds=[],n._inner.inclusions=[],n._inner.exclusions=[],n._inner.requireds=[],n._flags.sparse=!1,n}return a(t,e),t.prototype._base=function e(t,n,r){var i={value:t};"string"==typeof t&&r.convert&&h.safeParse(t,i);var o=Array.isArray(i.value),s=o;if(r.convert&&this._flags.single&&!o&&(i.value=[i.value],o=!0),!o)return i.errors=this.createError("array.base",null,n,r),i;if((this._inner.inclusions.length||this._inner.exclusions.length||this._inner.requireds.length||this._inner.ordereds.length||!this._flags.sparse)&&(s&&(i.value=i.value.slice(0)),i.errors=this._checkItems.call(this,i.value,s,n,r),i.errors&&s&&r.convert&&this._flags.single)){var a=i.errors;i.value=[i.value],i.errors=this._checkItems.call(this,i.value,s,n,r),i.errors&&(i.errors=a,i.value=i.value[0])}return i},t.prototype._checkItems=function e(t,n,r,i){for(var o=[],s=void 0,a=this._inner.requireds.slice(),u=this._inner.ordereds.slice(),l=this._inner.inclusions.concat(a),c=t.length,f=0;f<c;++f){s=!1;var p=t[f],d=!1,m=n?f:r.key,g=n?r.path.concat(f):r.path,y={key:m,path:g,parent:r.parent,reference:r.reference},b=void 0;if(this._flags.sparse||void 0!==p){for(var v=0;v<this._inner.exclusions.length;++v)if(b=this._inner.exclusions[v]._validate(p,y,{}),!b.errors){if(o.push(this.createError(n?"array.excludes":"array.excludesSingle",{pos:f,value:p},{key:r.key,path:y.path},i)),s=!0,i.abortEarly)return o;u.shift();break}if(!s){if(this._inner.ordereds.length){if(u.length>0){var w=u.shift();if(b=w._validate(p,y,i),b.errors){if(o.push(this.createError("array.ordered",{pos:f,reason:b.errors,value:p},{key:r.key,path:y.path},i)),i.abortEarly)return o}else if(w._flags.strip)h.fastSplice(t,f),--f,--c;else{if(!this._flags.sparse&&void 0===b.value){if(o.push(this.createError("array.sparse",null,{key:r.key,path:y.path,pos:f},i)),i.abortEarly)return o;continue}t[f]=b.value}continue}if(!this._inner.items.length){if(o.push(this.createError("array.orderedLength",{pos:f,limit:this._inner.ordereds.length},{key:r.key,path:y.path},i)),i.abortEarly)return o;continue}}for(var _=[],k=a.length,S=0;S<k;++S)if(b=_[S]=a[S]._validate(p,y,i),!b.errors){if(t[f]=b.value,d=!0,h.fastSplice(a,S),--S,--k,!this._flags.sparse&&void 0===b.value&&(o.push(this.createError("array.sparse",null,{key:r.key,path:y.path,pos:f},i)),i.abortEarly))return o;break}if(!d){var E=!!i.stripUnknown&&(!0===i.stripUnknown||!!i.stripUnknown.arrays);k=l.length;for(var x=0;x<k;++x){var C=l[x],A=a.indexOf(C);if(-1!==A)b=_[A];else if(b=C._validate(p,y,i),!b.errors){C._flags.strip?(h.fastSplice(t,f),--f,--c):this._flags.sparse||void 0!==b.value?t[f]=b.value:(o.push(this.createError("array.sparse",null,{key:r.key,path:y.path,pos:f},i)),s=!0),d=!0;break}if(1===k){if(E){h.fastSplice(t,f),--f,--c,d=!0;break}if(o.push(this.createError(n?"array.includesOne":"array.includesOneSingle",{pos:f,reason:b.errors,value:p},{key:r.key,path:y.path},i)),s=!0,i.abortEarly)return o;break}}if(!s&&this._inner.inclusions.length&&!d){if(E){h.fastSplice(t,f),--f,--c;continue}if(o.push(this.createError(n?"array.includes":"array.includesSingle",{pos:f,value:p},{key:r.key,path:y.path},i)),i.abortEarly)return o}}}}else{if(o.push(this.createError("array.sparse",null,{key:r.key,path:y.path,pos:f},i)),i.abortEarly)return o;u.shift()}}return a.length&&this._fillMissedErrors.call(this,o,a,r,i),u.length&&this._fillOrderedErrors.call(this,o,u,r,i),o.length?o:null},t.prototype.describe=function e(){var t=u.prototype.describe.call(this);if(this._inner.ordereds.length){t.orderedItems=[];for(var n=0;n<this._inner.ordereds.length;++n)t.orderedItems.push(this._inner.ordereds[n].describe())}if(this._inner.items.length){t.items=[];for(var r=0;r<this._inner.items.length;++r)t.items.push(this._inner.items[r].describe())}return t},t.prototype.items=function e(){for(var t=this,n=this.clone(),r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return f.flatten(i).forEach(function(e,r){try{e=l.schema(t._currentJoi,e)}catch(e){throw e.hasOwnProperty("path")?e.path=r+"."+e.path:e.path=r,e.message=e.message+"("+e.path+")",e}n._inner.items.push(e),"required"===e._flags.presence?n._inner.requireds.push(e):"forbidden"===e._flags.presence?n._inner.exclusions.push(e.optional()):n._inner.inclusions.push(e)}),n},t.prototype.ordered=function e(){for(var t=this,n=this.clone(),r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return f.flatten(i).forEach(function(e,r){try{e=l.schema(t._currentJoi,e)}catch(e){throw e.hasOwnProperty("path")?e.path=r+"."+e.path:e.path=r,e.message=e.message+"("+e.path+")",e}n._inner.ordereds.push(e)}),n},t.prototype.min=function e(t){var n=c.isRef(t);return f.assert(Number.isSafeInteger(t)&&t>=0||n,"limit must be a positive integer or reference"),this._test("min",t,function(e,r,i){var o=void 0;if(n){if(o=t(r.reference||r.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:t.key},r,i)}else o=t;return e.length>=o?e:this.createError("array.min",{limit:t,value:e},r,i)})},t.prototype.max=function e(t){var n=c.isRef(t);return f.assert(Number.isSafeInteger(t)&&t>=0||n,"limit must be a positive integer or reference"),this._test("max",t,function(e,r,i){var o=void 0;if(n){if(o=t(r.reference||r.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:t.key},r,i)}else o=t;return e.length<=o?e:this.createError("array.max",{limit:t,value:e},r,i)})},t.prototype.length=function e(t){var n=c.isRef(t);return f.assert(Number.isSafeInteger(t)&&t>=0||n,"limit must be a positive integer or reference"),this._test("length",t,function(e,r,i){var o=void 0;if(n){if(o=t(r.reference||r.parent,i),!(Number.isSafeInteger(o)&&o>=0))return this.createError("array.ref",{ref:t.key},r,i)}else o=t;return e.length===o?e:this.createError("array.length",{limit:t,value:e},r,i)})},t.prototype.unique=function e(t){f.assert(void 0===t||"function"==typeof t||"string"==typeof t,"comparator must be a function or a string");var n={};return"string"==typeof t?n.path=t:"function"==typeof t&&(n.comparator=t),this._test("unique",n,function(e,t,i){for(var o={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},s=n.comparator||f.deepEqual,a=0;a<e.length;++a){var u=n.path?f.reach(e[a],n.path):e[a],l=n.comparator?o.custom:o[void 0===u?"undefined":r(u)];if(l)if(l instanceof Map){for(var c=l.entries(),h=void 0;!(h=c.next()).done;)if(s(h.value[0],u)){var p={key:t.key,path:t.path.concat(a),parent:t.parent,reference:t.reference},d={pos:a,value:e[a],dupePos:h.value[1],dupeValue:e[h.value[1]]};return n.path&&(d.path=n.path),this.createError("array.unique",d,p,i)}l.set(u,a)}else{if(void 0!==l[u]){var m={key:t.key,path:t.path.concat(a),parent:t.parent,reference:t.reference},g={pos:a,value:e[a],dupePos:l[u],dupeValue:e[l[u]]};return n.path&&(g.path=n.path),this.createError("array.unique",g,m,i)}l[u]=a}}return e})},t.prototype.sparse=function e(t){var n=void 0===t||!!t;if(this._flags.sparse===n)return this;var r=this.clone();return r._flags.sparse=n,r},t.prototype.single=function e(t){var n=void 0===t||!!t;if(this._flags.single===n)return this;var r=this.clone();return r._flags.single=n,r},t.prototype._fillMissedErrors=function e(t,n,r,i){for(var o=[],s=0,a=0;a<n.length;++a){var u=n[a]._getLabel();u?o.push(u):++s}o.length?s?t.push(this.createError("array.includesRequiredBoth",{knownMisses:o,unknownMisses:s},{key:r.key,path:r.path},i)):t.push(this.createError("array.includesRequiredKnowns",{knownMisses:o},{key:r.key,path:r.path},i)):t.push(this.createError("array.includesRequiredUnknowns",{unknownMisses:s},{key:r.key,path:r.path},i))},t.prototype._fillOrderedErrors=function e(t,n,r,i){for(var o=[],s=0;s<n.length;++s){var a=f.reach(n[s],"_flags.presence");"required"===a&&o.push(n[s])}o.length&&this._fillMissedErrors.call(this,t,o,r,i)},t}(u),h.safeParse=function(e,t){try{var n=JSON.parse(e);Array.isArray(n)&&(t.value=n)}catch(e){}},e.exports=new h.Array},function(e,t,n){"use strict";(function(t){function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(2),u=n(0),l={};l.Binary=function(e){function n(){i(this,n);var t=o(this,e.call(this));return t._type="binary",t}return s(n,e),n.prototype._base=function e(n,r,i){var o={value:n};if("string"==typeof n&&i.convert)try{o.value=t.from(n,this._flags.encoding)}catch(e){}return o.errors=t.isBuffer(o.value)?null:this.createError("binary.base",null,r,i),o},n.prototype.encoding=function e(n){if(u.assert(t.isEncoding(n),"Invalid encoding:",n),this._flags.encoding===n)return this;var r=this.clone();return r._flags.encoding=n,r},n.prototype.min=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("min",t,function(e,n,r){return e.length>=t?e:this.createError("binary.min",{limit:t,value:e},n,r)})},n.prototype.max=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("max",t,function(e,n,r){return e.length<=t?e:this.createError("binary.max",{limit:t,value:e},n,r)})},n.prototype.length=function e(t){return u.assert(Number.isSafeInteger(t)&&t>=0,"limit must be a positive integer"),this._test("length",t,function(e,n,r){return e.length===t?e:this.createError("binary.length",{limit:t,value:e},n,r)})},n}(a),e.exports=new l.Binary}).call(t,n(3).Buffer)},function(e,t,n){"use strict";function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(2),u=n(0),l={Set:n(9)};l.Boolean=function(e){function t(){i(this,t);var n=o(this,e.call(this));return n._type="boolean",n._flags.insensitive=!0,n._inner.truthySet=new l.Set,n._inner.falsySet=new l.Set,n}return s(t,e),t.prototype._base=function e(t,n,r){var i={value:t};if("string"==typeof t&&r.convert){var o=this._flags.insensitive?t.toLowerCase():t;i.value="true"===o||"false"!==o&&t}return"boolean"!=typeof i.value&&(i.value=!!this._inner.truthySet.has(t,null,null,this._flags.insensitive)||!this._inner.falsySet.has(t,null,null,this._flags.insensitive)&&t),i.errors="boolean"==typeof i.value?null:this.createError("boolean.base",null,n,r),i},t.prototype.truthy=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=this.clone();n=u.flatten(n);for(var o=0;o<n.length;++o){var s=n[o];u.assert(void 0!==s,"Cannot call truthy with undefined"),i._inner.truthySet.add(s)}return i},t.prototype.falsy=function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=this.clone();n=u.flatten(n);for(var o=0;o<n.length;++o){var s=n[o];u.assert(void 0!==s,"Cannot call falsy with undefined"),i._inner.falsySet.add(s)}return i},t.prototype.insensitive=function e(t){var e=void 0===t||!!t;if(this._flags.insensitive===e)return this;var n=this.clone();return n._flags.insensitive=e,n},t.prototype.describe=function e(){var t=a.prototype.describe.call(this);return t.truthy=[!0].concat(this._inner.truthySet.values()),t.falsy=[!1].concat(this._inner.falsySet.values()),t},t}(a),e.exports=new l.Boolean},function(e,t,n){"use strict";function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(0),u=n(13),l=n(1),c={};c.Func=function(e){function t(){i(this,t);var n=o(this,e.call(this));return n._flags.func=!0,n}return s(t,e),t.prototype.arity=function e(t){return a.assert(Number.isSafeInteger(t)&&t>=0,"n must be a positive integer"),this._test("arity",t,function(e,n,r){return e.length===t?e:this.createError("function.arity",{n:t},n,r)})},t.prototype.minArity=function e(t){return a.assert(Number.isSafeInteger(t)&&t>0,"n must be a strict positive integer"),this._test("minArity",t,function(e,n,r){return e.length>=t?e:this.createError("function.minArity",{n:t},n,r)})},t.prototype.maxArity=function e(t){return a.assert(Number.isSafeInteger(t)&&t>=0,"n must be a positive integer"),this._test("maxArity",t,function(e,n,r){return e.length<=t?e:this.createError("function.maxArity",{n:t},n,r)})},t.prototype.ref=function e(){return this._test("ref",null,function(e,t,n){return l.isRef(e)?e:this.createError("function.ref",null,t,n)})},t.prototype.class=function e(){return this._test("class",null,function(e,t,n){return/^\s*class\s/.test(e.toString())?e:this.createError("function.class",null,t,n)})},t}(u.constructor),e.exports=new c.Func},function(e,t,n){"use strict";function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(2),u=n(0),l={};l.Lazy=function(e){function t(){i(this,t);var n=o(this,e.call(this));return n._type="lazy",n}return s(t,e),t.prototype._base=function e(t,n,r){var i={value:t},o=this._flags.lazy;if(!o)return i.errors=this.createError("lazy.base",null,n,r),i;var s=o();return s instanceof a?s._validate(t,n,r):(i.errors=this.createError("lazy.schema",null,n,r),i)},t.prototype.set=function e(t){u.assert("function"==typeof t,"You must provide a function as first argument");var n=this.clone();return n._flags.lazy=t,n},t}(a),e.exports=new l.Lazy},function(e,t,n){"use strict";function r(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}var a=n(2),u=n(1),l=n(0),c={precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/};c.Number=function(e){function t(){i(this,t);var n=o(this,e.call(this));return n._type="number",n._invalids.add(1/0),n._invalids.add(-1/0),n}return s(t,e),t.prototype._base=function e(t,n,r){var i={errors:null,value:t};if("string"==typeof t&&r.convert){var o=parseFloat(t);i.value=isNaN(o)||!isFinite(t)?NaN:o}var s="number"==typeof i.value&&!isNaN(i.value);if(r.convert&&"precision"in this._flags&&s){var a=Math.pow(10,this._flags.precision);i.value=Math.round(i.value*a)/a}return i.errors=s?null:this.createError("number.base",null,n,r),i},t.prototype.multiple=function e(t){var n=u.isRef(t);return n||(l.assert("number"==typeof t&&isFinite(t),"multiple must be a number"),l.assert(t>0,"multiple must be greater than 0")),this._test("multiple",t,function(e,r,i){var o=n?t(r.reference||r.parent,i):t;return!n||"number"==typeof o&&isFinite(o)?e%o==0?e:this.createError("number.multiple",{multiple:t,value:e},r,i):this.createError("number.ref",{ref:t.key},r,i)})},t.prototype.integer=function e(){return this._test("integer",void 0,function(e,t,n){return Number.isSafeInteger(e)?e:this.createError("number.integer",{value:e},t,n)})},t.prototype.negative=function e(){return this._test("negative",void 0,function(e,t,n){return e<0?e:this.createError("number.negative",{value:e},t,n)})},t.prototype.positive=function e(){return this._test("positive",void 0,function(e,t,n){return e>0?e:this.createError("number.positive",{value:e},t,n)})},t.prototype.precision=function e(t){l.assert(Number.isSafeInteger(t),"limit must be an integer"),l.assert(!("precision"in this._flags),"precision already set");var n=this._test("precision",t,function(e,n,r){var i=e.toString().match(c.precisionRx),o=Math.max((i[1]?i[1].length:0)-(i[2]?parseInt(i[2],10):0),0);return o<=t?e:this.createError("number.precision",{limit:t,value:e},n,r)});return n._flags.precision=t,n},t.prototype.port=function e(){return this._test("port",void 0,function(e,t,n){return!Number.isSafeInteger(e)||e<0||e>65535?this.createError("number.port",{value:e},t,n):e})},t}(a),c.compare=function(e,t){return function(n){var r=u.isRef(n),i="number"==typeof n&&!isNaN(n);return l.assert(i||r,"limit must be a number or reference"),this._test(e,n,function(i,o,s){var a=void 0;if(r){if(a=n(o.reference||o.parent,s),"number"!=typeof a||isNaN(a))return this.createError("number.ref",{ref:n.key},o,s)}else a=n;return t(i,a)?i:this.createError("number."+e,{limit:a,value:i},o,s)})}},c.Number.prototype.min=c.compare("min",function(e,t){return e>=t}),c.Number.prototype.max=c.compare("max",function(e,t){return e<=t}),c.Number.prototype.greater=c.compare("greater",function(e,t){return e>t}),c.Number.prototype.less=c.compare("less",function(e,t){return e<t}),e.exports=new c.Number},function(e,t,n){"use strict";(function(t){var 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};function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}var u=n(15),l=n(0),c=void 0,f=n(2),h=n(1),p=n(12),d=n(30),m=n(29),g={uriRegex:d.createUriRegex(),ipRegex:m.createIpRegex(["ipv4","ipv6","ipvfuture"],"optional"),guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},cidrPresences:["required","optional","forbidden"],normalizationForms:["NFC","NFD","NFKC","NFKD"]};g.String=function(e){function t(){o(this,t);var n=s(this,e.call(this));return n._type="string",n._invalids.add(""),n}return a(t,e),t.prototype._base=function e(t,n,r){if("string"==typeof t&&r.convert){if(this._flags.normalize&&(t=t.normalize(this._flags.normalize)),this._flags.case&&(t="upper"===this._flags.case?t.toLocaleUpperCase():t.toLocaleLowerCase()),this._flags.trim&&(t=t.trim()),this._inner.replacements)for(var i=0;i<this._inner.replacements.length;++i){var o=this._inner.replacements[i];t=t.replace(o.pattern,o.replacement)}if(this._flags.truncate)for(var s=0;s<this._tests.length;++s){var a=this._tests[s];if("max"===a.name){t=t.slice(0,a.arg);break}}this._flags.byteAligned&&t.length%2!=0&&(t="0"+t)}return{value:t,errors:"string"==typeof t?null:this.createError("string.base",{value:t},n,r)}},t.prototype.insensitive=function e(){if(this._flags.insensitive)return this;var t=this.clone();return t._flags.insensitive=!0,t},t.prototype.creditCard=function e(){return this._test("creditCard",void 0,function(e,t,n){for(var r=e.length,i=0,o=1;r--;){var s=e.charAt(r)*o;i+=s-9*(s>9),o^=3}var a=i%10==0&&i>0;return a?e:this.createError("string.creditCard",{value:e},t,n)})},t.prototype.regex=function e(t,n){l.assert(t instanceof RegExp,"pattern must be a RegExp");var i={pattern:new RegExp(t.source,t.ignoreCase?"i":void 0)};"string"==typeof n?i.name=n:"object"===(void 0===n?"undefined":r(n))&&(i.invert=!!n.invert,n.name&&(i.name=n.name));var o=["string.regex",i.invert?".invert":"",i.name?".name":".base"].join("");return this._test("regex",i,function(e,t,n){var r=i.pattern.test(e);return r^i.invert?e:this.createError(o,{name:i.name,pattern:i.pattern,value:e},t,n)})},t.prototype.alphanum=function e(){return this._test("alphanum",void 0,function(e,t,n){return/^[a-zA-Z0-9]+$/.test(e)?e:this.createError("string.alphanum",{value:e},t,n)})},t.prototype.token=function e(){return this._test("token",void 0,function(e,t,n){return/^\w+$/.test(e)?e:this.createError("string.token",{value:e},t,n)})},t.prototype.email=function e(t){return t&&(l.assert("object"===(void 0===t?"undefined":r(t)),"email options must be an object"),l.assert(void 0===t.checkDNS,"checkDNS option is not supported"),l.assert(void 0===t.tldWhitelist||"object"===r(t.tldWhitelist),"tldWhitelist must be an array or object"),l.assert(void 0===t.minDomainAtoms||Number.isSafeInteger(t.minDomainAtoms)&&t.minDomainAtoms>0,"minDomainAtoms must be a positive integer"),l.assert(void 0===t.errorLevel||"boolean"==typeof t.errorLevel||Number.isSafeInteger(t.errorLevel)&&t.errorLevel>=0,"errorLevel must be a non-negative integer or boolean")),this._test("email",t,function(e,r,i){c=c||n(19);try{var o=c.validate(e,t);if(!0===o||0===o)return e}catch(e){}return this.createError("string.email",{value:e},r,i)})},t.prototype.ip=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=g.ipRegex;l.assert("object"===(void 0===t?"undefined":r(t)),"options must be an object"),t.cidr?(l.assert("string"==typeof t.cidr,"cidr must be a string"),t.cidr=t.cidr.toLowerCase(),l.assert(l.contain(g.cidrPresences,t.cidr),"cidr must be one of "+g.cidrPresences.join(", ")),t.version||"optional"===t.cidr||(n=m.createIpRegex(["ipv4","ipv6","ipvfuture"],t.cidr))):t.cidr="optional";var i=void 0;if(t.version){Array.isArray(t.version)||(t.version=[t.version]),l.assert(t.version.length>=1,"version must have at least 1 version specified"),i=[];for(var o=0;o<t.version.length;++o){var s=t.version[o];l.assert("string"==typeof s,"version at position "+o+" must be a string"),s=s.toLowerCase(),l.assert(m.versions[s],"version at position "+o+" must be one of "+Object.keys(m.versions).join(", ")),i.push(s)}i=l.unique(i),n=m.createIpRegex(i,t.cidr)}return this._test("ip",t,function(e,r,o){return n.test(e)?e:i?this.createError("string.ipVersion",{value:e,cidr:t.cidr,version:i},r,o):this.createError("string.ip",{value:e,cidr:t.cidr},r,o)})},t.prototype.uri=function e(t){var n="",i=!1,o=!1,s=g.uriRegex;if(t){if(l.assert("object"===(void 0===t?"undefined":r(t)),"options must be an object"),t.scheme){l.assert(t.scheme instanceof RegExp||"string"==typeof t.scheme||Array.isArray(t.scheme),"scheme must be a RegExp, String, or Array"),Array.isArray(t.scheme)||(t.scheme=[t.scheme]),l.assert(t.scheme.length>=1,"scheme must have at least 1 scheme specified");for(var a=0;a<t.scheme.length;++a){var u=t.scheme[a];l.assert(u instanceof RegExp||"string"==typeof u,"scheme at position "+a+" must be a RegExp or String"),n+=n?"|":"",u instanceof RegExp?n+=u.source:(l.assert(/[a-zA-Z][a-zA-Z0-9+-\.]*/.test(u),"scheme at position "+a+" must be a valid scheme"),n+=l.escapeRegex(u))}}t.allowRelative&&(i=!0),t.relativeOnly&&(o=!0)}return(n||i||o)&&(s=d.createUriRegex(n,i,o)),this._test("uri",t,function(e,t,r){return s.test(e)?e:o?this.createError("string.uriRelativeOnly",{value:e},t,r):n?this.createError("string.uriCustomScheme",{scheme:n,value:e},t,r):this.createError("string.uri",{value:e},t,r)})},t.prototype.isoDate=function e(){return this._test("isoDate",void 0,function(e,t,n){if(p._isIsoDate(e)){if(!n.convert)return e;var r=new Date(e);if(!isNaN(r.getTime()))return r.toISOString()}return this.createError("string.isoDate",{value:e},t,n)})},t.prototype.guid=function e(t){var n="";if(t&&t.version){Array.isArray(t.version)||(t.version=[t.version]),l.assert(t.version.length>=1,"version must have at least 1 valid version specified");for(var r=new Set,i=0;i<t.version.length;++i){var o=t.version[i];l.assert("string"==typeof o,"version at position "+i+" must be a string"),o=o.toLowerCase();var s=g.guidVersions[o];l.assert(s,"version at position "+i+" must be one of "+Object.keys(g.guidVersions).join(", ")),l.assert(!r.has(s),"version at position "+i+" must not be a duplicate."),n+=s,r.add(s)}}var a=new RegExp("^([\\[{\\(]?)[0-9A-F]{8}([:-]?)[0-9A-F]{4}\\2?["+(n||"0-9A-F")+"][0-9A-F]{3}\\2?["+(n?"89AB":"0-9A-F")+"][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$","i");return this._test("guid",t,function(e,t,n){var r=a.exec(e);return r?g.guidBrackets[r[1]]!==r[r.length-1]?this.createError("string.guid",{value:e},t,n):e:this.createError("string.guid",{value:e},t,n)})},t.prototype.hex=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.assert("object"===(void 0===t?"undefined":r(t)),"hex options must be an object"),l.assert(void 0===t.byteAligned||"boolean"==typeof t.byteAligned,"byteAligned must be boolean");var n=!0===t.byteAligned,i=/^[a-f0-9]+$/i,o=this._test("hex",i,function(e,t,r){return i.test(e)?n&&e.length%2!=0?this.createError("string.hexAlign",{value:e},t,r):e:this.createError("string.hex",{value:e},t,r)});return n&&(o._flags.byteAligned=!0),o},t.prototype.base64=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.assert("object"===(void 0===t?"undefined":r(t)),"base64 options must be an object"),l.assert(void 0===t.paddingRequired||"boolean"==typeof t.paddingRequired,"paddingRequired must be boolean");var n=!1===t.paddingRequired?t.paddingRequired:t.paddingRequired||!0,i=n?/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/:/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/;return this._test("base64",i,function(e,t,n){return i.test(e)?e:this.createError("string.base64",{value:e},t,n)})},t.prototype.hostname=function e(){var t=/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;return this._test("hostname",void 0,function(e,n,r){return e.length<=255&&t.test(e)||u.isIPv6(e)?e:this.createError("string.hostname",{value:e},n,r)})},t.prototype.normalize=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";l.assert(l.contain(g.normalizationForms,t),"normalization form must be one of "+g.normalizationForms.join(", "));var n=this._test("normalize",t,function(e,n,r){return r.convert||e===e.normalize(t)?e:this.createError("string.normalize",{value:e,form:t},n,r)});return n._flags.normalize=t,n},t.prototype.lowercase=function e(){var t=this._test("lowercase",void 0,function(e,t,n){return n.convert||e===e.toLocaleLowerCase()?e:this.createError("string.lowercase",{value:e},t,n)});return t._flags.case="lower",t},t.prototype.uppercase=function e(){var t=this._test("uppercase",void 0,function(e,t,n){return n.convert||e===e.toLocaleUpperCase()?e:this.createError("string.uppercase",{value:e},t,n)});return t._flags.case="upper",t},t.prototype.trim=function e(){var t=this._test("trim",void 0,function(e,t,n){return n.convert||e===e.trim()?e:this.createError("string.trim",{value:e},t,n)});return t._flags.trim=!0,t},t.prototype.replace=function e(t,n){"string"==typeof t&&(t=new RegExp(l.escapeRegex(t),"g")),l.assert(t instanceof RegExp,"pattern must be a RegExp"),l.assert("string"==typeof n,"replacement must be a String");var r=this.clone();return r._inner.replacements||(r._inner.replacements=[]),r._inner.replacements.push({pattern:t,replacement:n}),r},t.prototype.truncate=function e(t){var n=void 0===t||!!t;if(this._flags.truncate===n)return this;var r=this.clone();return r._flags.truncate=n,r},t}(f),g.compare=function(e,n){return function(r,i){var o=h.isRef(r);return l.assert(Number.isSafeInteger(r)&&r>=0||o,"limit must be a positive integer or reference"),l.assert(!i||t.isEncoding(i),"Invalid encoding:",i),this._test(e,r,function(t,s,a){var u=void 0;if(o){if(u=r(s.reference||s.parent,a),!Number.isSafeInteger(u))return this.createError("string.ref",{ref:r.key},s,a)}else u=r;return n(t,u,i)?t:this.createError("string."+e,{limit:u,value:t,encoding:i},s,a)})}},g.String.prototype.min=g.compare("min",function(e,n,r){var i=r?t.byteLength(e,r):e.length;return i>=n}),g.String.prototype.max=g.compare("max",function(e,n,r){var i=r?t.byteLength(e,r):e.length;return i<=n}),g.String.prototype.length=g.compare("length",function(e,n,r){var i=r?t.byteLength(e,r):e.length;return i===n}),g.String.prototype.uuid=g.String.prototype.guid,e.exports=new g.String}).call(t,n(3).Buffer)},function(e,t,n){"use strict";var r=n(14),i={Ip:{cidrs:{ipv4:{required:"\\/(?:"+r.ipv4Cidr+")",optional:"(?:\\/(?:"+r.ipv4Cidr+"))?",forbidden:""},ipv6:{required:"\\/"+r.ipv6Cidr,optional:"(?:\\/"+r.ipv6Cidr+")?",forbidden:""},ipvfuture:{required:"\\/"+r.ipv6Cidr,optional:"(?:\\/"+r.ipv6Cidr+")?",forbidden:""}},versions:{ipv4:r.IPv4address,ipv6:r.IPv6address,ipvfuture:r.IPvFuture}}};i.Ip.createIpRegex=function(e,t){for(var n=void 0,r=0;r<e.length;++r){var o=e[r];n?n+="|"+i.Ip.versions[o]+i.Ip.cidrs[o][t]:n="^(?:"+i.Ip.versions[o]+i.Ip.cidrs[o][t]}return new RegExp(n+")$")},e.exports=i.Ip},function(e,t,n){"use strict";var r=n(14),i={Uri:{createUriRegex:function e(t,n,i){var o=r.scheme,s=void 0;if(i)s="(?:"+r.relativeRef+")";else{t&&(o="(?:"+t+")");var a="(?:"+o+":"+r.hierPart+")";s=n?"(?:"+a+"|"+r.relativeRef+")":a}return new RegExp("^"+s+"(?:\\?"+r.query+")?(?:#"+r.fragment+")?$")}}};e.exports=i.Uri},function(e,t,n){"use strict";var r=n(0),i={};t=e.exports=i.Topo=function(){this._items=[],this.nodes=[]},i.Topo.prototype.add=function(e,t){var n=this;t=t||{};var i=[].concat(t.before||[]),o=[].concat(t.after||[]),s=t.group||"?",a=t.sort||0;r.assert(-1===i.indexOf(s),"Item cannot come before itself:",s),r.assert(-1===i.indexOf("?"),"Item cannot come before unassociated items"),r.assert(-1===o.indexOf(s),"Item cannot come after itself:",s),r.assert(-1===o.indexOf("?"),"Item cannot come after unassociated items"),[].concat(e).forEach(function(e,t){var r={seq:n._items.length,sort:a,before:i,after:o,group:s,node:e};n._items.push(r)});var u=this._sort();return r.assert(!u,"item","?"!==s?"added into group "+s:"","created a dependencies error"),this.nodes},i.Topo.prototype.merge=function(e){e=[].concat(e);for(var t=0;t<e.length;++t){var n=e[t];if(n)for(var o=0;o<n._items.length;++o){var s=r.shallow(n._items[o]);this._items.push(s)}}this._items.sort(i.mergeSort);for(var a=0;a<this._items.length;++a)this._items[a].seq=a;var u=this._sort();return r.assert(!u,"merge created a dependencies error"),this.nodes},i.mergeSort=function(e,t){return e.sort===t.sort?0:e.sort<t.sort?-1:1},i.Topo.prototype._sort=function(){for(var e={},t=Object.create(null),n=Object.create(null),r=0;r<this._items.length;++r){var i=this._items[r],o=i.seq,s=i.group;n[s]=n[s]||[],n[s].push(o),e[o]=i.before;for(var a=i.after,u=0;u<a.length;++u)t[a[u]]=(t[a[u]]||[]).concat(o)}for(var l=Object.keys(e),c=0;c<l.length;++c){for(var f=l[c],h=[],p=Object.keys(e[f]),d=0;d<p.length;++d){var m=e[f][p[d]];n[m]=n[m]||[];for(var g=0;g<n[m].length;++g)h.push(n[m][g])}e[f]=h}for(var y=Object.keys(t),b=0;b<y.length;++b){var v=y[b];if(n[v])for(var w=0;w<n[v].length;++w){var _=n[v][w];e[_]=e[_].concat(t[v])}}var k=void 0,S={};l=Object.keys(e);for(var E=0;E<l.length;++E){var x=l[E];k=e[x];for(var C=0;C<k.length;++C)S[k[C]]=(S[k[C]]||[]).concat(x)}for(var A={},I=[],T=0;T<this._items.length;++T){var j=T;if(S[T]){j=null;for(var O=0;O<this._items.length;++O)if(!0!==A[O]){S[O]||(S[O]=[]);for(var P=S[O].length,B=0,R=0;R<P;++R)A[S[O][R]]&&++B;if(B===P){j=O;break}}}null!==j&&(A[j]=!0,I.push(j))}if(I.length!==this._items.length)return new Error("Invalid dependencies");for(var N={},M=0;M<this._items.length;++M){var L=this._items[M];N[L.seq]=L}var F=[];this._items=I.map(function(e){var t=N[e];return F.push(t.node),t}),this.nodes=F}},function(e,t,n){"use strict";var r=n(8);e.exports=r},function(e,t,n){"use strict";t.byteLength=c,t.toByteArray=f,t.fromByteArray=d;for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function c(e){return 3*e.length/4-l(e)}function f(e){var t,n,r,s,a,u=e.length;s=l(e),a=new o(3*u/4-s),n=s>0?u-4:u;var c=0;for(t=0;t<n;t+=4)r=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],a[c++]=r>>16&255,a[c++]=r>>8&255,a[c++]=255&r;return 2===s?(r=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,a[c++]=255&r):1===s&&(r=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,a[c++]=r>>8&255,a[c++]=255&r),a}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(h(r));return i.join("")}function d(e){for(var t,n=e.length,i=n%3,o="",s=[],a=16383,u=0,l=n-i;u<l;u+=16383)s.push(p(e,u,u+16383>l?l:u+16383));return 1===i?(t=e[n-1],o+=r[t>>2],o+=r[t<<4&63],o+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],o+=r[t>>10],o+=r[t>>4&63],o+=r[t<<2&63],o+="="),s.push(o),s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+p]=255&s,p+=d,s/=256,l-=8);e[n+p-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports={_args:[["joi@13.4.0","/Users/jeff/projects/joi-browser"]],_development:!0,_from:"joi@13.4.0",_id:"joi@13.4.0",_inBundle:!1,_integrity:"sha512-JuK4GjEu6j7zr9FuVe2MAseZ6si/8/HaY0qMAejfDFHp7jcH4OKE937mIHM5VT4xDS0q7lpQbszbxKV9rm0yUg==",_location:"/joi",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"joi@13.4.0",name:"joi",escapedName:"joi",rawSpec:"13.4.0",saveSpec:null,fetchSpec:"13.4.0"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/joi/-/joi-13.4.0.tgz",_spec:"13.4.0",_where:"/Users/jeff/projects/joi-browser",bugs:{url:"https://github.com/hapijs/joi/issues"},dependencies:{hoek:"5.x.x",isemail:"3.x.x",topo:"3.x.x"},description:"Object schema validation",devDependencies:{code:"5.x.x",hapitoc:"1.x.x",lab:"15.x.x"},engines:{node:">=8.9.0"},homepage:"https://github.com/hapijs/joi",keywords:["hapi","schema","validation"],license:"BSD-3-Clause",main:"lib/index.js",name:"joi",repository:{type:"git",url:"git://github.com/hapijs/joi.git"},scripts:{test:"lab -t 100 -a code -L","test-cov-html":"lab -r html -o coverage.html -a code","test-debug":"lab -a code",toc:"hapitoc",version:"npm run toc && git add API.md README.md"},version:"13.4.0"}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return r.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,r="/"===s.charAt(0))}return t=n(o(t.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),i="/"===s(e,-1);return e=n(o(e.split("/"),function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&i&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}for(var l=[],u=a;u<i.length;u++)l.push("..");return l=l.concat(o.slice(a)),l.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},t.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(t,n(7))},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){var s="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e&&!e.nodeType&&e,u="object"==typeof r&&r;u.global!==u&&u.window!==u&&u.self!==u||(o=u);var l,c=2147483647,f=36,h=1,p=26,d=38,m=700,g=72,y=128,b="-",v=/^xn--/,w=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=f-h,E=Math.floor,x=String.fromCharCode,C;function A(e){throw new RangeError(k[e])}function I(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function T(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(_,".");var i=e.split("."),o=I(i,t).join(".");return r+o}function j(e){for(var t=[],n=0,r=e.length,i,o;n<r;)i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<r?(o=e.charCodeAt(n++),56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)):t.push(i);return t}function O(e){return I(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e),t}).join("")}function P(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:f}function B(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,n){var r=0;for(e=n?E(e/m):e>>1,e+=E(e/t);e>S*p>>1;r+=f)e=E(e/S);return E(r+(S+1)*e/(e+d))}function N(e){var t=[],n=e.length,r,i=0,o=y,s=g,a,u,l,d,m,v,w,_,k;for(a=e.lastIndexOf(b),a<0&&(a=0),u=0;u<a;++u)e.charCodeAt(u)>=128&&A("not-basic"),t.push(e.charCodeAt(u));for(l=a>0?a+1:0;l<n;){for(d=i,m=1,v=f;l>=n&&A("invalid-input"),w=P(e.charCodeAt(l++)),(w>=f||w>E((c-i)/m))&&A("overflow"),i+=w*m,_=v<=s?h:v>=s+p?p:v-s,!(w<_);v+=f)k=f-_,m>E(c/k)&&A("overflow"),m*=k;r=t.length+1,s=R(i-d,r,0==d),E(i/r)>c-o&&A("overflow"),o+=E(i/r),i%=r,t.splice(i++,0,o)}return O(t)}function M(e){var t,n,r,i,o,s,a,u,l,d,m,v=[],w,_,k,S;for(e=j(e),w=e.length,t=y,n=0,o=g,s=0;s<w;++s)m=e[s],m<128&&v.push(x(m));for(r=i=v.length,i&&v.push(b);r<w;){for(a=c,s=0;s<w;++s)m=e[s],m>=t&&m<a&&(a=m);for(_=r+1,a-t>E((c-n)/_)&&A("overflow"),n+=(a-t)*_,t=a,s=0;s<w;++s)if(m=e[s],m<t&&++n>c&&A("overflow"),m==t){for(u=n,l=f;d=l<=o?h:l>=o+p?p:l-o,!(u<d);l+=f)S=u-d,k=f-d,v.push(x(B(d+S%k,0))),u=E(S/k);v.push(x(B(u,0))),o=R(n,_,r==i),n=0,++r}++n,++t}return v.join("")}function L(e){return T(e,function(e){return v.test(e)?N(e.slice(4).toLowerCase()):e})}function F(e){return T(e,function(e){return w.test(e)?"xn--"+M(e):e})}l={version:"1.4.1",ucs2:{decode:j,encode:O},decode:N,encode:M,toASCII:F,toUnicode:L},i=function(){return l}.call(t,n,t,e),void 0===i||(e.exports=i)}(this)}).call(t,n(41)(e),n(5))},function(e,t){"function"==typeof Object.create?e.exports=function e(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function e(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,t){e.exports=function e(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],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}}),e.webpackPolyfill=1),e}}])})},function(e,t,n){"use strict";e.exports=n(964)},function(e,t,n){"use strict";function r(e,t){return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){var r=n(19);n(237),n(140),n(311),n(118),n(973),n(178),n(312),n(975),n(309),n(34);var i=r.asn1,o=e.exports=r.pki=r.pki||{},s=o.oids,a={};a.CN=s.commonName,a.commonName="CN",a.C=s.countryName,a.countryName="C",a.L=s.localityName,a.localityName="L",a.ST=s.stateOrProvinceName,a.stateOrProvinceName="ST",a.O=s.organizationName,a.organizationName="O",a.OU=s.organizationalUnitName,a.organizationalUnitName="OU",a.E=s.emailAddress,a.emailAddress="E";var u=r.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},c={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[f,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function p(e,t){"string"==typeof t&&(t={shortName:t});for(var n=null,r,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],t.type&&t.type===r.type?n=r:t.name&&t.name===r.name?n=r:t.shortName&&t.shortName===r.shortName&&(n=r);return n}o.RDNAttributesAsArray=function(e,t){for(var n=[],r,o,u,l=0;l<e.value.length;++l){r=e.value[l];for(var c=0;c<r.value.length;++c)u={},o=r.value[c],u.type=i.derToOid(o.value[0].value),u.value=o.value[1].value,u.valueTagClass=o.value[1].type,u.type in s&&(u.name=s[u.type],u.name in a&&(u.shortName=a[u.name])),t&&(t.update(u.type),t.update(u.value)),n.push(u)}return n},o.CRIAttributesAsArray=function(e){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],u=i.derToOid(r.value[0].value),l=r.value[1].value,c=0;c<l.length;++c){var f={};if(f.type=u,f.value=l[c].value,f.valueTagClass=l[c].type,f.type in s&&(f.name=s[f.type],f.name in a&&(f.shortName=a[f.name])),f.type===s.extensionRequest){f.extensions=[];for(var h=0;h<f.value.length;++h)f.extensions.push(o.certificateExtensionFromAsn1(f.value[h]))}t.push(f)}return t};var d=function(e,t,n){var r={};if(e!==s["RSASSA-PSS"])return r;n&&(r={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var o={},a=[];if(!i.validate(t,c,o,a)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=a,u}return void 0!==o.hashOid&&(r.hash=r.hash||{},r.hash.algorithmOid=i.derToOid(o.hashOid)),void 0!==o.maskGenOid&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=i.derToOid(o.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=i.derToOid(o.maskGenHashOid)),void 0!==o.saltLength&&(r.saltLength=o.saltLength.charCodeAt(0)),r};function m(e){for(var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),n,o,s=e.attributes,a=0;a<s.length;++a){n=s[a];var u=n.value,l=i.Type.PRINTABLESTRING;"valueTagClass"in n&&(l=n.valueTagClass,l===i.Type.UTF8&&(u=r.util.encodeUtf8(u))),o=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.type).getBytes()),i.create(i.Class.UNIVERSAL,l,!1,u)])]),t.value.push(o)}return t}function g(e){for(var t={},n=0;n<e.length;++n){var o=e[n];if(o.shortName&&(o.valueTagClass===i.Type.UTF8||o.valueTagClass===i.Type.PRINTABLESTRING||o.valueTagClass===i.Type.IA5STRING)){var s=o.value;o.valueTagClass===i.Type.UTF8&&(s=r.util.encodeUtf8(o.value)),o.shortName in t?r.util.isArray(t[o.shortName])?t[o.shortName].push(s):t[o.shortName]=[t[o.shortName],s]:t[o.shortName]=s}}return t}function y(e){for(var t,n=0;n<e.length;++n){if(t=e[n],void 0===t.name&&(t.type&&t.type in o.oids?t.name=o.oids[t.type]:t.shortName&&t.shortName in a&&(t.name=o.oids[a[t.shortName]])),void 0===t.type){if(!(t.name&&t.name in o.oids)){var r=new Error("Attribute type not specified.");throw r.attribute=t,r}t.type=o.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in a&&(t.shortName=a[t.name]),t.type===s.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=i.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var u=0;u<t.extensions.length;++u)t.value.push(o.certificateExtensionToAsn1(b(t.extensions[u])))}if(void 0===t.value){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function b(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in o.oids&&(e.name=o.oids[e.id]),void 0===e.id){if(!(e.name&&e.name in o.oids)){var n=new Error("Extension ID not specified.");throw n.extension=e,n}e.id=o.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var a=0,u=0,l=0;e.digitalSignature&&(u|=128,a=7),e.nonRepudiation&&(u|=64,a=6),e.keyEncipherment&&(u|=32,a=5),e.dataEncipherment&&(u|=16,a=4),e.keyAgreement&&(u|=8,a=3),e.keyCertSign&&(u|=4,a=2),e.cRLSign&&(u|=2,a=1),e.encipherOnly&&(u|=1,a=0),e.decipherOnly&&(l|=128,a=7);var c=String.fromCharCode(a);0!==l?c+=String.fromCharCode(u)+String.fromCharCode(l):0!==u&&(c+=String.fromCharCode(u)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var f=e.value.value;for(var h in e)!0===e[h]&&(h in s?f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s[h]).getBytes())):-1!==h.indexOf(".")&&f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(h).getBytes())))}else if("nsCertType"===e.name){var a=0,u=0;e.client&&(u|=128,a=7),e.server&&(u|=64,a=6),e.email&&(u|=32,a=5),e.objsign&&(u|=16,a=4),e.reserved&&(u|=8,a=3),e.sslCA&&(u|=4,a=2),e.emailCA&&(u|=2,a=1),e.objCA&&(u|=1,a=0);var c=String.fromCharCode(a);0!==u&&(c+=String.fromCharCode(u)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){var p;e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var d=0;d<e.altNames.length;++d){p=e.altNames[d];var c=p.value;if(7===p.type&&p.ip){if(c=r.util.bytesFromIP(p.ip),null===c){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else 8===p.type&&(c=p.oid?i.oidToDer(i.oidToDer(p.oid)):i.oidToDer(c));e.value.value.push(i.create(i.Class.CONTEXT_SPECIFIC,p.type,!1,c))}}else if("subjectKeyIdentifier"===e.name&&t.cert){var g=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=g.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,g.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var f=e.value.value;if(e.keyIdentifier){var y=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;f.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,y))}if(e.authorityCertIssuer){var b=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[m(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];f.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,b))}if(e.serialNumber){var v=r.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);f.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var f=e.value.value,w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),_=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]),p,d=0;d<e.altNames.length;++d){p=e.altNames[d];var c=p.value;if(7===p.type&&p.ip){if(c=r.util.bytesFromIP(p.ip),null===c){var n=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw n.extension=e,n}}else 8===p.type&&(c=p.oid?i.oidToDer(i.oidToDer(p.oid)):i.oidToDer(c));_.value.push(i.create(i.Class.CONTEXT_SPECIFIC,p.type,!1,c))}w.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[_])),f.push(w)}if(void 0===e.value){var n=new Error("Extension value not specified.");throw n.extension=e,n}return e}function v(e,t){switch(e){case s["RSASSA-PSS"]:var n=[];return void 0!==t.hash.algorithmOid&&n.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&n.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&n.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.saltLength).getBytes())])),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,n);default:return i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")}}function w(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var n=e.attributes,o=0;o<n.length;++o){var s=n[o],a=s.value,u=i.Type.UTF8;"valueTagClass"in s&&(u=s.valueTagClass),u===i.Type.UTF8&&(a=r.util.encodeUtf8(a));var l=!1;"valueConstructed"in s&&(l=s.valueConstructed);var c=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,u,l,a)])]);t.value.push(c)}return t}o.certificateFromPem=function(e,t,n){var s=r.pem.decode(e)[0];if("CERTIFICATE"!==s.type&&"X509 CERTIFICATE"!==s.type&&"TRUSTED CERTIFICATE"!==s.type){var a=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw a.headerType=s.type,a}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=i.fromDer(s.body,n);return o.certificateFromAsn1(u,t)},o.certificateToPem=function(e,t){var n={type:"CERTIFICATE",body:i.toDer(o.certificateToAsn1(e)).getBytes()};return r.pem.encode(n,{maxline:t})},o.publicKeyFromPem=function(e){var t=r.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var n=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw n.headerType=t.type,n}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var s=i.fromDer(t.body);return o.publicKeyFromAsn1(s)},o.publicKeyToPem=function(e,t){var n={type:"PUBLIC KEY",body:i.toDer(o.publicKeyToAsn1(e)).getBytes()};return r.pem.encode(n,{maxline:t})},o.publicKeyToRSAPublicKeyPem=function(e,t){var n={type:"RSA PUBLIC KEY",body:i.toDer(o.publicKeyToRSAPublicKey(e)).getBytes()};return r.pem.encode(n,{maxline:t})},o.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||r.md.sha1.create(),s=t.type||"RSAPublicKey",a;switch(s){case"RSAPublicKey":a=i.toDer(o.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":a=i.toDer(o.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}n.start(),n.update(a);var u=n.digest();if("hex"===t.encoding){var l=u.toHex();return t.delimiter?l.match(/.{2}/g).join(t.delimiter):l}if("binary"===t.encoding)return u.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return u},o.certificationRequestFromPem=function(e,t,n){var s=r.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==s.type){var a=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw a.headerType=s.type,a}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=i.fromDer(s.body,n);return o.certificationRequestFromAsn1(u,t)},o.certificationRequestToPem=function(e,t){var n={type:"CERTIFICATE REQUEST",body:i.toDer(o.certificationRequestToAsn1(e)).getBytes()};return r.pem.encode(n,{maxline:t})},o.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return p(e.issuer,t)},e.issuer.addField=function(t){y([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,n){y(t),e.subject.attributes=t,delete e.subject.uniqueId,n&&(e.subject.uniqueId=n),e.subject.hash=null},e.setIssuer=function(t,n){y(t),e.issuer.attributes=t,delete e.issuer.uniqueId,n&&(e.issuer.uniqueId=n),e.issuer.hash=null},e.setExtensions=function(t){for(var n=0;n<t.length;++n)b(t[n],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var n=null,r,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],t.id&&r.id===t.id?n=r:t.name&&r.name===t.name&&(n=r);return n},e.sign=function(t,n){e.md=n||r.md.sha1.create();var a=s[e.md.algorithm+"WithRSAEncryption"];if(!a){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=a,e.tbsCertificate=o.getTBSCertificate(e);var l=i.toDer(e.tbsCertificate);e.md.update(l.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var n=!1;if(!e.issued(t)){var a=t.issuer,u=e.subject,l=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw l.expectedIssuer=a.attributes,l.actualIssuer=u.attributes,l}var c=t.md;if(null===c){if(t.signatureOid in s){var f=s[t.signatureOid];switch(f){case"sha1WithRSAEncryption":c=r.md.sha1.create();break;case"md5WithRSAEncryption":c=r.md.md5.create();break;case"sha256WithRSAEncryption":c=r.md.sha256.create();break;case"sha384WithRSAEncryption":c=r.md.sha384.create();break;case"sha512WithRSAEncryption":c=r.md.sha512.create();break;case"RSASSA-PSS":c=r.md.sha256.create()}}if(null===c){var l=new Error("Could not compute certificate digest. Unknown signature OID.");throw l.signatureOid=t.signatureOid,l}var h=t.tbsCertificate||o.getTBSCertificate(t),p=i.toDer(h);c.update(p.getBytes())}if(null!==c){var d;switch(t.signatureOid){case s.sha1WithRSAEncryption:d=void 0;break;case s["RSASSA-PSS"]:var m,g;if(m=s[t.signatureParameters.mgf.hash.algorithmOid],void 0===m||void 0===r.md[m]){var l=new Error("Unsupported MGF hash function.");throw l.oid=t.signatureParameters.mgf.hash.algorithmOid,l.name=m,l}if(g=s[t.signatureParameters.mgf.algorithmOid],void 0===g||void 0===r.mgf[g]){var l=new Error("Unsupported MGF function.");throw l.oid=t.signatureParameters.mgf.algorithmOid,l.name=g,l}if(g=r.mgf[g].create(r.md[m].create()),m=s[t.signatureParameters.hash.algorithmOid],void 0===m||void 0===r.md[m])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:m};d=r.pss.create(r.md[m].create(),g,t.signatureParameters.saltLength)}n=e.publicKey.verify(c.digest().getBytes(),t.signature,d)}return n},e.isIssuer=function(t){var n=!1,r=e.issuer,i=t.subject;if(r.hash&&i.hash)n=r.hash===i.hash;else if(r.attributes.length===i.attributes.length){var o,s;n=!0;for(var a=0;n&&a<r.attributes.length;++a)o=r.attributes[a],s=i.attributes[a],o.type===s.type&&o.value===s.value||(n=!1)}return n},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return o.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=s.subjectKeyIdentifier,n=0;n<e.extensions.length;++n){var i=e.extensions[n];if(i.id===t){var o=e.generateSubjectKeyIdentifier().getBytes();return r.util.hexToBytes(i.subjectKeyIdentifier)===o}}return!1},e},o.certificateFromAsn1=function(e,t){var n={},a=[];if(!i.validate(e,l,n,a)){var u=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw u.errors=a,u}var c=i.derToOid(n.publicKeyOid);if(c!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var f=o.createCertificate();f.version=n.certVersion?n.certVersion.charCodeAt(0):0;var h=r.util.createBuffer(n.certSerialNumber);f.serialNumber=h.toHex(),f.signatureOid=r.asn1.derToOid(n.certSignatureOid),f.signatureParameters=d(f.signatureOid,n.certSignatureParams,!0),f.siginfo.algorithmOid=r.asn1.derToOid(n.certinfoSignatureOid),f.siginfo.parameters=d(f.siginfo.algorithmOid,n.certinfoSignatureParams,!1),f.signature=n.certSignature;var m=[];if(void 0!==n.certValidity1UTCTime&&m.push(i.utcTimeToDate(n.certValidity1UTCTime)),void 0!==n.certValidity2GeneralizedTime&&m.push(i.generalizedTimeToDate(n.certValidity2GeneralizedTime)),void 0!==n.certValidity3UTCTime&&m.push(i.utcTimeToDate(n.certValidity3UTCTime)),void 0!==n.certValidity4GeneralizedTime&&m.push(i.generalizedTimeToDate(n.certValidity4GeneralizedTime)),m.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(m.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(f.validity.notBefore=m[0],f.validity.notAfter=m[1],f.tbsCertificate=n.tbsCertificate,t){if(f.md=null,f.signatureOid in s){var c=s[f.signatureOid];switch(c){case"sha1WithRSAEncryption":f.md=r.md.sha1.create();break;case"md5WithRSAEncryption":f.md=r.md.md5.create();break;case"sha256WithRSAEncryption":f.md=r.md.sha256.create();break;case"sha384WithRSAEncryption":f.md=r.md.sha384.create();break;case"sha512WithRSAEncryption":f.md=r.md.sha512.create();break;case"RSASSA-PSS":f.md=r.md.sha256.create()}}if(null===f.md){var u=new Error("Could not compute certificate digest. Unknown signature OID.");throw u.signatureOid=f.signatureOid,u}var g=i.toDer(f.tbsCertificate);f.md.update(g.getBytes())}var b=r.md.sha1.create();f.issuer.getField=function(e){return p(f.issuer,e)},f.issuer.addField=function(e){y([e]),f.issuer.attributes.push(e)},f.issuer.attributes=o.RDNAttributesAsArray(n.certIssuer,b),n.certIssuerUniqueId&&(f.issuer.uniqueId=n.certIssuerUniqueId),f.issuer.hash=b.digest().toHex();var v=r.md.sha1.create();return f.subject.getField=function(e){return p(f.subject,e)},f.subject.addField=function(e){y([e]),f.subject.attributes.push(e)},f.subject.attributes=o.RDNAttributesAsArray(n.certSubject,v),n.certSubjectUniqueId&&(f.subject.uniqueId=n.certSubjectUniqueId),f.subject.hash=v.digest().toHex(),n.certExtensions?f.extensions=o.certificateExtensionsFromAsn1(n.certExtensions):f.extensions=[],f.publicKey=o.publicKeyFromAsn1(n.subjectPublicKeyInfo),f},o.certificateExtensionsFromAsn1=function(e){for(var t=[],n=0;n<e.value.length;++n)for(var r=e.value[n],i=0;i<r.value.length;++i)t.push(o.certificateExtensionFromAsn1(r.value[i]));return t},o.certificateExtensionFromAsn1=function(e){var t={};if(t.id=i.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===i.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in s)if(t.name=s[t.id],"keyUsage"===t.name){var n=i.fromDer(t.value),o=0,a=0;n.value.length>1&&(o=n.value.charCodeAt(1),a=n.value.length>2?n.value.charCodeAt(2):0),t.digitalSignature=128==(128&o),t.nonRepudiation=64==(64&o),t.keyEncipherment=32==(32&o),t.dataEncipherment=16==(16&o),t.keyAgreement=8==(8&o),t.keyCertSign=4==(4&o),t.cRLSign=2==(2&o),t.encipherOnly=1==(1&o),t.decipherOnly=128==(128&a)}else if("basicConstraints"===t.name){var n=i.fromDer(t.value);n.value.length>0&&n.value[0].type===i.Type.BOOLEAN?t.cA=0!==n.value[0].value.charCodeAt(0):t.cA=!1;var u=null;n.value.length>0&&n.value[0].type===i.Type.INTEGER?u=n.value[0].value:n.value.length>1&&(u=n.value[1].value),null!==u&&(t.pathLenConstraint=i.derToInteger(u))}else if("extKeyUsage"===t.name)for(var n=i.fromDer(t.value),l=0;l<n.value.length;++l){var c=i.derToOid(n.value[l].value);c in s?t[s[c]]=!0:t[c]=!0}else if("nsCertType"===t.name){var n=i.fromDer(t.value),o=0;n.value.length>1&&(o=n.value.charCodeAt(1)),t.client=128==(128&o),t.server=64==(64&o),t.email=32==(32&o),t.objsign=16==(16&o),t.reserved=8==(8&o),t.sslCA=4==(4&o),t.emailCA=2==(2&o),t.objCA=1==(1&o)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];for(var n=i.fromDer(t.value),h=0;h<n.value.length;++h){f=n.value[h];var p={type:f.type,value:f.value};switch(t.altNames.push(p),f.type){case 1:case 2:case 6:break;case 7:p.ip=r.util.bytesToIP(f.value);break;case 8:p.oid=i.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){var n=i.fromDer(t.value);t.subjectKeyIdentifier=r.util.bytesToHex(n.value)}return t},o.certificationRequestFromAsn1=function(e,t){var n={},a=[];if(!i.validate(e,h,n,a)){var u=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw u.errors=a,u}var l=i.derToOid(n.publicKeyOid);if(l!==o.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var c=o.createCertificationRequest();if(c.version=n.csrVersion?n.csrVersion.charCodeAt(0):0,c.signatureOid=r.asn1.derToOid(n.csrSignatureOid),c.signatureParameters=d(c.signatureOid,n.csrSignatureParams,!0),c.siginfo.algorithmOid=r.asn1.derToOid(n.csrSignatureOid),c.siginfo.parameters=d(c.siginfo.algorithmOid,n.csrSignatureParams,!1),c.signature=n.csrSignature,c.certificationRequestInfo=n.certificationRequestInfo,t){if(c.md=null,c.signatureOid in s){var l=s[c.signatureOid];switch(l){case"sha1WithRSAEncryption":c.md=r.md.sha1.create();break;case"md5WithRSAEncryption":c.md=r.md.md5.create();break;case"sha256WithRSAEncryption":c.md=r.md.sha256.create();break;case"sha384WithRSAEncryption":c.md=r.md.sha384.create();break;case"sha512WithRSAEncryption":c.md=r.md.sha512.create();break;case"RSASSA-PSS":c.md=r.md.sha256.create()}}if(null===c.md){var u=new Error("Could not compute certification request digest. Unknown signature OID.");throw u.signatureOid=c.signatureOid,u}var f=i.toDer(c.certificationRequestInfo);c.md.update(f.getBytes())}var m=r.md.sha1.create();return c.subject.getField=function(e){return p(c.subject,e)},c.subject.addField=function(e){y([e]),c.subject.attributes.push(e)},c.subject.attributes=o.RDNAttributesAsArray(n.certificationRequestInfoSubject,m),c.subject.hash=m.digest().toHex(),c.publicKey=o.publicKeyFromAsn1(n.subjectPublicKeyInfo),c.getAttribute=function(e){return p(c,e)},c.addAttribute=function(e){y([e]),c.attributes.push(e)},c.attributes=o.CRIAttributesAsArray(n.certificationRequestInfoAttributes||[]),c},o.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return p(e,t)},e.addAttribute=function(t){y([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){y(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){y(t),e.attributes=t},e.sign=function(t,n){e.md=n||r.md.sha1.create();var a=s[e.md.algorithm+"WithRSAEncryption"];if(!a){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=a,e.certificationRequestInfo=o.getCertificationRequestInfo(e);var l=i.toDer(e.certificationRequestInfo);e.md.update(l.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,n=e.md;if(null===n){if(e.signatureOid in s){var a=s[e.signatureOid];switch(a){case"sha1WithRSAEncryption":n=r.md.sha1.create();break;case"md5WithRSAEncryption":n=r.md.md5.create();break;case"sha256WithRSAEncryption":n=r.md.sha256.create();break;case"sha384WithRSAEncryption":n=r.md.sha384.create();break;case"sha512WithRSAEncryption":n=r.md.sha512.create();break;case"RSASSA-PSS":n=r.md.sha256.create()}}if(null===n){var u=new Error("Could not compute certification request digest. Unknown signature OID.");throw u.signatureOid=e.signatureOid,u}var l=e.certificationRequestInfo||o.getCertificationRequestInfo(e),c=i.toDer(l);n.update(c.getBytes())}if(null!==n){var f;switch(e.signatureOid){case s.sha1WithRSAEncryption:break;case s["RSASSA-PSS"]:var h,p;if(h=s[e.signatureParameters.mgf.hash.algorithmOid],void 0===h||void 0===r.md[h]){var u=new Error("Unsupported MGF hash function.");throw u.oid=e.signatureParameters.mgf.hash.algorithmOid,u.name=h,u}if(p=s[e.signatureParameters.mgf.algorithmOid],void 0===p||void 0===r.mgf[p]){var u=new Error("Unsupported MGF function.");throw u.oid=e.signatureParameters.mgf.algorithmOid,u.name=p,u}if(p=r.mgf[p].create(r.md[h].create()),h=s[e.signatureParameters.hash.algorithmOid],void 0===h||void 0===r.md[h]){var u=new Error("Unsupported RSASSA-PSS hash function.");throw u.oid=e.signatureParameters.hash.algorithmOid,u.name=h,u}f=r.pss.create(r.md[h].create(),p,e.signatureParameters.saltLength)}t=e.publicKey.verify(n.digest().getBytes(),e.signature,f)}return t},e},o.getTBSCertificate=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,r.util.hexToBytes(e.serialNumber)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.siginfo.algorithmOid).getBytes()),v(e.siginfo.algorithmOid,e.siginfo.parameters)]),m(e.issuer),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e.validity.notBefore)),i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e.validity.notAfter))]),m(e.subject),o.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&t.value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&t.value.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&t.value.push(o.certificateExtensionsToAsn1(e.extensions)),t},o.getCertificationRequestInfo=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),m(e.subject),o.publicKeyToAsn1(e.publicKey),w(e)]);return t},o.distinguishedNameToAsn1=function(e){return m(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),n=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(n);for(var r=0;r<e.length;++r)n.value.push(o.certificateExtensionToAsn1(e[r]));return t},o.certificateExtensionToAsn1=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.id).getBytes())),e.critical&&t.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255)));var n=e.value;return"string"!=typeof e.value&&(n=i.toDer(n).getBytes()),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,n)),t},o.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||o.getCertificationRequestInfo(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.createCaStore=function(e){var t={certs:{}};function n(e){return s(e),t.certs[e.hash]||null}function s(e){if(!e.hash){var t=r.md.sha1.create();e.attributes=o.RDNAttributesAsArray(m(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){var t=n(e.issuer);return t},t.addCertificate=function(e){if("string"==typeof e&&(e=r.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var n=t.certs[e.subject.hash];r.util.isArray(n)||(n=[n]),n.push(e),t.certs[e.subject.hash]=n}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=r.pki.certificateFromPem(e));var t=n(e.subject);if(!t)return!1;r.util.isArray(t)||(t=[t]);for(var s=i.toDer(o.certificateToAsn1(e)).getBytes(),a=0;a<t.length;++a){var u=i.toDer(o.certificateToAsn1(t[a])).getBytes();if(s===u)return!0}return!1},t.listAllCertificates=function(){var e=[];for(var n in t.certs)if(t.certs.hasOwnProperty(n)){var i=t.certs[n];if(r.util.isArray(i))for(var o=0;o<i.length;++o)e.push(i[o]);else e.push(i)}return e},t.removeCertificate=function(e){var a;if("string"==typeof e&&(e=r.pki.certificateFromPem(e)),s(e.subject),!t.hasCertificate(e))return null;var u=n(e.subject);if(!r.util.isArray(u))return a=t.certs[e.subject.hash],delete t.certs[e.subject.hash],a;for(var l=i.toDer(o.certificateToAsn1(e)).getBytes(),c=0;c<u.length;++c){var f=i.toDer(o.certificateToAsn1(u[c])).getBytes();l===f&&(a=u[c],u.splice(c,1))}return 0===u.length&&delete t.certs[e.subject.hash],a},e)for(var a=0;a<e.length;++a){var u=e[a];t.addCertificate(u)}return t},o.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},o.verifyCertificateChain=function(e,t,n){t=t.slice(0);var i=t.slice(0),s=new Date,a=!0,u=null,l=0;do{var c=t.shift(),f=null,h=!1;if((s<c.validity.notBefore||s>c.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:s}),null===u){if(f=t[0]||e.getIssuer(c),null===f&&c.isIssuer(c)&&(h=!0,f=c),f){var p=f;r.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){f=p.shift();try{d=f.verify(c)}catch(e){}}d||(u={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==u||f&&!h||e.hasCertificate(c)||(u={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===u&&f&&!c.isIssuer(f)&&(u={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===u)for(var m={keyUsage:!0,basicConstraints:!0},g=0;null===u&&g<c.extensions.length;++g){var y=c.extensions[g];!y.critical||y.name in m||(u={message:"Certificate has an unsupported critical extension.",error:o.certificateError.unsupported_certificate})}if(null===u&&(!a||0===t.length&&(!f||h))){var b=c.getExtension("basicConstraints"),v=c.getExtension("keyUsage");if(null!==v&&(v.keyCertSign&&null!==b||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:o.certificateError.bad_certificate})),null!==u||null===b||b.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:o.certificateError.bad_certificate}),null===u&&null!==v&&"pathLenConstraint"in b){var w=l-1;w>b.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}}var _=null===u||u.error,k=n?n(_,l,i):_;if(!0!==k)throw!0===_&&(u={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(k||0===k)&&("object"!=typeof k||r.util.isArray(k)?"string"==typeof k&&(u.error=k):(k.message&&(u.message=k.message),k.error&&(u.error=k.error))),u;u=null,a=!1,++l}while(t.length>0);return!0}},function(e,t){function n(e,t,n){var r;return function(){if(!t)return e.apply(this,arguments);var i=this,o=arguments,s=n&&!r;return clearTimeout(r),r=setTimeout(function(){if(r=null,!s)return e.apply(i,o)},t),s?e.apply(this,arguments):void 0}}e.exports=n},function(e,t,n){"use strict";var r=n(992);function i(e){return Number.isFinite(e)}function o(e){return"function"==typeof e}function s(e,t){return t?function(n,r){var i=setTimeout(function(){e(new Error("pull-reader: read exceeded timeout"),r)},t);e(n,function(e,t){clearTimeout(i),r(e,t)})}:e}e.exports=function(e){var t=[],n,a,u=!1,l=r(),c,f,h;function p(){for(;t.length;)if(null==t[0].length&&l.has(1))t.shift().cb(null,l.get());else if(l.has(t[0].length)){var e=t.shift();e.cb(null,l.get(e.length))}else if(1==c&&t[0].length&&l.length<t[0].length){var n="stream ended with:"+l.length+" but wanted:"+t[0].length;t.shift().cb(new Error(n))}else{if(!c)return!!t.length;t.shift().cb(c)}return t.length||!l.has(1)||h}function d(){var e=p();e&&!u&&(!n||u||f||(u=!0,a(null,function(e,t){if(u=!1,e)return c=e,p();l.add(t),d()})))}function m(r){if(h){for(;t.length;)t.shift().cb(h);return cb&&cb(h)}a=s(r,e),n=r,d()}return m.abort=function(e,r){h=e||!0,n?(u=!0,n(h,function(){for(;t.length;)t.shift().cb(h);r&&r(h)})):r()},m.read=function(r,a,c){if(o(a)&&(c=a,a=e),!o(c))return f=!0,function(e,r){if(u||l.has(1)){if(e)return n(e,r);t.push({length:null,cb:r}),d()}else s(n,a)(e,function(e,t){r(e,t)})};t.push({length:i(r)?r:null,cb:c}),d()},m}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(292),i=l(r),o=n(394),s=l(o),a=n(42),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r){(0,i.default)(t)(e,(0,s.default)((0,u.default)(n)),r)}e.exports=t.default},function(e,t,n){"use strict";const r=Math.exp;t=e.exports=function e(t){if("number"!=typeof t)throw new Error("must provide a timespan to the moving average constructor");if(t<=0)throw new Error("must provide a timespan > 0 to the moving average constructor");let n,i=0,o=0,s=0,a,u={};function l(e,n){return 1-r(-(e-n)/t)}return u.push=function e(t,r){if(a){const e=l(t,a),u=r-n,c=e*u;n=e*r+(1-e)*n,i=(1-e)*(i+u*c),o=Math.sqrt(i),s=n+e*u}else n=r;a=t},u.movingAverage=function e(){return n},u.variance=function e(){return i},u.deviation=function e(){return o},u.forecast=function e(){return s},u}},function(e,t,n){var r=n(494),i=n(249);function o(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}e.exports=o},function(e,t,n){var r=n(68),i=n(322),o=n(998),s=n(326);function a(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}e.exports=a},function(e,t){var n=Function.prototype,r=n.toString;function i(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}e.exports=i},function(e,t){function n(e,t){return e===t||e!=e&&t!=t}e.exports=n},function(e,t,n){"use strict";const{createFromPrivKey:r}=n(23),i=n(40),o=n(1023),s=n(22),a=n(5),u=a("jsipfs:ipns");u.error=a("jsipfs:ipns:error");const l=n(1024),c=n(1030),f=n(1031),h=n(498),p=6e4;class d{constructor(e,t,n,r,i){this.publisher=new l(e,t),this.republisher=new c(this.publisher,t,n,r,i),this.resolver=new f(e),this.cache=new o({max:1e3}),this.routing=e}publish(e,t,n,o){i([t=>r(e.bytes,t),r=>this.publisher.publishWithEOL(e,t,n,r)],(e,r)=>{if(e)return u.error(e),o(e);u(`IPNS value ${t} was published correctly`);const i=r[0].toB58String(),s=parseFloat(n),a=s<p?s:p;this.cache.set(i,t,{ttl:a}),u(`IPNS value ${t} was cached correctly`),o(null,{name:i,value:t})})}resolve(e,t,n){if("string"!=typeof e){const e="name received is not valid";return u.error(e),n(s(new Error(e),"ERR_INVALID_NAME"))}if("function"==typeof t&&(n=t,t={}),t=t||{},!t.nocache&&!t.recursive){const t=e.split("/")[2],r=this.cache.get(t);if(r)return n(null,{path:r})}this.resolver.resolve(e,t,(t,r)=>{if(t)return u.error(t),n(t);u(`IPNS record from ${e} was resolved correctly`),n(null,{path:r})})}initializeKeyspace(e,t,n){this.publisher.publish(e,t,n)}}t=e.exports=d,t.path=h},function(e,t,n){"use strict";const r=n(65),i=n(5),o=i("jsipfs:ipns:path");o.error=i("jsipfs:ipns:path:error");const s=(e,t,n)=>{if(r.ipnsPath(t))return o(`resolve ipns path ${t}`),e._ipns.resolve(t,n);e.dag.get(t.substring("/ipfs/".length),(e,t)=>e?n(e):n(null,t))};e.exports={resolvePath:s}},function(e,t,n){"use strict";(function(r){const i=n(182),{fromB58String:o,toB58String:s}=n(35),a=n(1032),u=n(53),l=n(22),c=n(5),f=c("jsipfs:ipns:pubsub");f.error=c("jsipfs:ipns:pubsub:error");class h{constructor(e,t,n){this._pubsub=e,this._subscriptions={},this._handleSubscriptionKey=this._handleSubscriptionKey.bind(this),this._pubsubDs=new a(e,t,n,i.validator,this._handleSubscriptionKey)}put(e,t,n){this._pubsubDs.put(e,t,n)}get(e,t){this._pubsubDs.get(e,(n,r)=>{const o=e.slice(0,i.namespaceLength);if(o.toString()===i.namespace){const t=e.toString(),n=s(e.slice(i.namespaceLength));this._subscriptions[t]=n,f(`subscribed pubsub ${t}: ${n}`)}if(n)return t(n);t(null,r)})}_handleSubscriptionKey(e,t){const n=this._subscriptions[e];if(!n){const n=`key ${e} does not correspond to a subscription`;return f.error(n),t(l(new Error(n),"ERR_INVALID_KEY"))}let r;try{r=i.getIdKeys(o(n))}catch(e){return f.error(e),t(e)}t(null,r.routingKey.toBuffer())}getSubscriptions(e){const t=Object.values(this._subscriptions).filter(Boolean);return e(null,t.map(e=>`${i.namespace}${e}`))}cancel(e,t){if("string"!=typeof e){const e="received subscription name is not valid";return f.error(e),t(l(new Error(e),"ERR_INVALID_SUBSCRIPTION_NAME"))}e.startsWith(i.namespace)&&(e=e.substring(i.namespaceLength));const n=Object.keys(this._subscriptions).find(t=>this._subscriptions[t]===e);if(!n)return t(null,{canceled:!1});try{const e=r.from(n);this._pubsubDs.unsubscribe(e)}catch(e){return t(e)}this._subscriptions[n]=void 0,f(`unsubscribed pubsub ${n}: ${e}`),t(null,{canceled:!0})}}t=e.exports=u(h,{className:"IpnsPubsubDatastore",symbolName:"@js-ipfs/ipns/IpnsPubsubDatastore"})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const{Key:i}=n(33),{Record:o}=n(1034),{encodeBase32:s}=n(503),a=n(22),u=n(5),l=u("jsipfs:ipns:offline-datastore");l.error=u("jsipfs:ipns:offline-datastore:error");class c{constructor(e){this._repo=e}put(e,t,n){if(!r.isBuffer(e)){const e="Offline datastore key must be a buffer";return l.error(e),n(a(new Error(e),"ERR_INVALID_KEY"))}if(!r.isBuffer(t)){const e="Offline datastore value must be a buffer";return l.error(e),n(a(new Error(e),"ERR_INVALID_VALUE"))}let i;try{i=this._routingKey(e)}catch(e){const t="Not possible to generate the routing key";return l.error(t),n(a(new Error(t),"ERR_GENERATING_ROUTING_KEY"))}const s=new o(e,t);this._repo.datastore.put(i,s.serialize(),n)}get(e,t){if(!r.isBuffer(e)){const e="Offline datastore key must be a buffer";return l.error(e),t(a(new Error(e),"ERR_INVALID_KEY"))}let n;try{n=this._routingKey(e)}catch(e){const n="Not possible to generate the routing key";return l.error(n),t(a(new Error(n),"ERR_GENERATING_ROUTING_KEY"))}this._repo.datastore.get(n,(e,n)=>{if(e)return t(e);let r;try{r=o.deserialize(n)}catch(e){return l.error(e),t(e)}t(null,r.value)})}_routingKey(e){return new i("/"+s(e),!1)}}t=e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){var r=n(1039);e.exports=function(e,t,n){for(var i=-1,o=[],s=n?t.length:0;(i=r(e,t))>-1;)o.push(e.slice(0,i+s)),e=e.slice(i+t.length,e.length);return o.push(e),o}},function(e,t,n){"use strict";(function(e,n){t.toCallback=(t=>(function(n,r){let i;try{i=t(n)}catch(t){return void e.nextTick(r,t)}e.nextTick(r,null,i)})),t.toBuf=((e,t)=>r=>{let i=e(r,t);return n.from(i,"hex")}),t.fromString=((e,t)=>r=>{const i=n.isBuffer(r)?r.toString():r;return e(i,t)}),t.fromNumberTo32BitBuf=((e,t)=>r=>{let i=e(r,t);const o=new Array(4);for(let e=0;e<4;e++)o[e]=255&i,i>>=8;return n.from(o)})}).call(this,n(2),n(0).Buffer)},function(e,t,n){"use strict";const r=n(88),i=n(182);e.exports={encodeBase32:e=>{const t=r.encode("base32",e).slice(1);return t.toString().toUpperCase()},validator:{func:(e,t,n)=>i.validator.validate(t,e,n)},selector:(e,t)=>i.validator.select(t[0],t[1])}},function(e,t,n){"use strict";const r=n(244),i=n(181),o=n(503);function s({datastore:e,peerInfo:t,peerBook:s,options:a,config:u}){const l={datastore:e,peerInfo:t,peerBook:s,config:{peerDiscovery:{mdns:{enabled:r(a,"config.Discovery.MDNS.Enabled",r(u,"Discovery.MDNS.Enabled",!0))},webRTCStar:{enabled:r(a,"config.Discovery.webRTCStar.Enabled",r(u,"Discovery.webRTCStar.Enabled",!0))},bootstrap:{list:r(a,"config.Bootstrap",r(u,"Bootstrap",[]))}},relay:{enabled:r(a,"relay.enabled",r(u,"relay.enabled",!1)),hop:{enabled:r(a,"relay.hop.enabled",r(u,"relay.hop.enabled",!1)),active:r(a,"relay.hop.active",r(u,"relay.hop.active",!1))}},dht:{validators:{ipns:o.validator},selectors:{ipns:o.selector}},EXPERIMENTAL:{dht:r(a,"EXPERIMENTAL.dht",!1),pubsub:r(a,"EXPERIMENTAL.pubsub",!1)}},connectionManager:r(a,"connectionManager",r(u,"connectionManager",{}))},c=i(r(a,"libp2p",{}),l),f=n(1049);return new f(c)}e.exports=function e(t,n){const r=t._options||{};n=n||{};const i="function"==typeof r.libp2p?r.libp2p:s,{datastore:o}=t._repo,a=t._peerInfo,u=t._peerInfoBook,e=i({options:r,config:n,datastore:o,peerInfo:a,peerBook:u});let l=[];const c=t=>{u.put(t),e.dial(t,()=>{})};return e.on("start",()=>{a.multiaddrs.forEach(e=>{t._print("Swarm listening on",e.toString())}),l.forEach(c),l=[]}),e.on("peer:discovery",e=>{t.isOnline()?c(e):l.push(e)}),e.on("peer:connect",e=>u.put(e)),e}},function(e,t,n){"use strict";const r=n(1050),i=n(91),o=n(53),s=n(66).Connection,a=n(506),u=n(5),l=u("libp2p:websockets:dialer"),c=n(1059);class f{dial(e,t,n){"function"==typeof t&&(n=t,t={}),n=n||function(){};const i=a(e);l("dialing %s",i);const o=r(i,{binary:!0,onConnect:e=>{n(e)}}),u=new s(o);return u.getObservedAddrs=(t=>t(null,[e])),u.close=(e=>o.close(e)),u}createListener(e,t){return"function"==typeof e&&(t=e,e={}),c(e,t)}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!e.protoNames().includes("p2p-circuit")&&(e.protoNames().includes("ipfs")&&(e=e.decapsulate("ipfs")),i.WebSockets.matches(e)||i.WebSocketsSecure.matches(e)))}}e.exports=o(f,{className:"WebSockets",symbolName:"@libp2p/js-libp2p-websockets/websockets"})},function(e,t,n){const r=n(24),i=(e,t)=>t,o={ip4:i,ip6:(e,t,n,r)=>1===r.length&&"ip6"===r[0].protocol?t:`[${t}]`,tcp:(e,t,n,r)=>r.some(e=>["http","https","ws","wss"].includes(e.protocol))?`${e}:${t}`:`tcp://${e}:${t}`,udp:(e,t)=>`udp://${e}:${t}`,dnsaddr:i,dns4:i,dns6:i,ipfs:(e,t)=>`${e}/ipfs/${t}`,p2p:(e,t)=>`${e}/p2p/${t}`,http:e=>`http://${e}`,https:e=>`https://${e}`,ws:e=>`ws://${e}`,wss:e=>`wss://${e}`,"p2p-websocket-star":e=>`${e}/p2p-websocket-star`,"p2p-webrtc-star":e=>`${e}/p2p-webrtc-star`,"p2p-webrtc-direct":e=>`${e}/p2p-webrtc-direct`};e.exports=(e=>r(e).stringTuples().map(e=>({protocol:r.protocols.codes[e[0]].name,content:e[1]})).reduce((e,t,n,r)=>{const i=o[t.protocol];if(!i)throw new Error(`Unsupported protocol ${t.protocol}`);return i(e,t.content,n,r)},""))},function(e,t,n){var r=n(1061),i=n(327),o=n(511),s=n(250)("socket.io-client");e.exports=t=u;var a=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n=r(e),i=n.source,u=n.id,l=n.path,c=a[u]&&l in a[u].nsps,f=t.forceNew||t["force new connection"]||!1===t.multiplex||c,h;return f?(s("ignoring socket cache for %s",i),h=o(i,t)):(a[u]||(s("new io instance for %s",i),a[u]=o(i,t)),h=a[u]),n.query&&!t.query&&(t.query=n.query),h.socket(n.path,t)}t.protocol=i.protocol,t.connect=u,t.Manager=n(511),t.Socket=n(517)},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function e(t){var i=t,o=t.indexOf("["),s=t.indexOf("]");-1!=o&&-1!=s&&(t=t.substring(0,o)+t.substring(o,s).replace(/:/g,";")+t.substring(s,t.length));for(var a=n.exec(t||""),u={},l=14;l--;)u[r[l]]=a[l]||"";return-1!=o&&-1!=s&&(u.source=i,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=o;var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer,i=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function o(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||i(e))}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(1068),i=n(517),o=n(146),s=n(327),a=n(518),u=n(519),l=n(250)("socket.io-client:manager"),c=n(516),f=n(1085),h=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",function(){i.onopen(),e&&e()}),s=a(n,"error",function(t){if(l("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var u=this._timeout;l("connect attempt will timeout after %d",u);var c=setTimeout(function(){l("connect attempt timed out after %d",u),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",u)},u);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(s),this},p.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",u(this,"ondata"))),this.subs.push(a(e,"ping",u(this,"onping"))),this.subs.push(a(e,"pong",u(this,"onpong"))),this.subs.push(a(e,"error",u(this,"onerror"))),this.subs.push(a(e,"close",u(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",u(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){l("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new i(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",o),n.on("connect",function(){n.id=r.generateId(e)}),this.autoConnect&&o()}function o(){~c(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=c(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){l("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){l("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();l("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(l("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(l("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(l("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(328),i=n(1071),o=n(1081),s=n(1082);function a(e){var t,n=!1,s=!1,a=!1!==e.jsonp;if("undefined"!=typeof location){var u="https:"===location.protocol,l=location.port;l||(l=u?443:80),n=e.hostname!==location.hostname||l!==e.port,s=e.secure!==u}if(e.xdomain=n,e.xscheme=s,t=new r(e),"open"in t&&!e.forceJSONP)return new i(e);if(!a)throw new Error("JSONP disabled");return new o(e)}t.polling=a,t.websocket=s},function(e,t,n){var r=n(329),i=n(251),o=n(147),s=n(252),a=n(515),u=n(253)("engine.io-client:polling");e.exports=h;var l=(c=n(328),f=new c({xdomain:!1}),null!=f.responseType),c,f;function h(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),r.call(this,e)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){u("pre-pause polling complete"),--r||n()})),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",function(){u("pre-pause writing complete"),--r||n()}))}else n()},h.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(e){var t=this;u("polling got data %s",e);var n=function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)};o.decodePayload(e,this.socket.binaryType,n),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},h.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e);var r=-1!==this.hostname.indexOf(":");return t+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(1073),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);function a(e){if(!e||"object"!=typeof e)return!1;if(r(e)){for(var n=0,i=e.length;n<i;n++)if(a(e[n]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(e)||"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||o&&e instanceof Blob||s&&e instanceof File)return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return a(e.toJSON(),!0);for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)&&a(e[u]))return!0;return!1}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,o={},s=0,a=0,u;function l(e){var t="";do{t=r[e%i]+t,e=Math.floor(e/i)}while(e>0);return t}function c(e){var t=0;for(a=0;a<e.length;a++)t=t*i+o[e.charAt(a)];return t}function f(){var e=l(+new Date);return e!==u?(s=0,u=e):e+"."+l(s++)}for(;a<i;a++)o[r[a]]=a;f.encode=l,f.decode=c,e.exports=f},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(327),i=n(146),o=n(1084),s=n(518),a=n(519),u=n(250)("socket.io-client:socket"),l=n(251),c=n(514);e.exports=t=p;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=i.prototype.emit;function p(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}i(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},p.prototype.send=function(){var e=o(arguments);return e.unshift("message"),this.emit.apply(this,e),this},p.prototype.emit=function(e){if(f.hasOwnProperty(e))return h.apply(this,arguments),this;var t=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:c(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},p.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},p.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?l.encode(this.query):this.query;u("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},p.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},p.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?h.apply(this,t):this.receiveBuffer.push(t)},p.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=o(arguments);u("sending ack %j",i),t.packet({type:c(i)?r.BINARY_ACK:r.ACK,id:e,data:i})}}},p.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)h.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(e){return this.flags.compress=e,this},p.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){function n(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}e.exports=n},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(521),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1088),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1089),b=n(522),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(149),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(149),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(521),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(522),y;function b(){}function v(e,t){u=u||n(149),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(149),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(149),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t){var n=e.exports=function(e){!function t(){var n=!0,r=!1,i=!1;do{i=!0,n=!1,e.call(this,function(){i?n=!0:t()}),i=!1}while(n)}()}},function(e,t,n){"use strict";(function(r){const i=n(24),o=n(23),s=n(64),a=n(91);function u(e){const t=e.protos(),n=t[0].name,r=t[1].name,i=t[2].name,o=e.stringTuples(),s=o[1][1];if("tcp"!==r||"ws"!==i&&"wss"!==i)throw new Error("invalid multiaddr: "+e.toString());let a=o[0][1];"ip6"===n&&(a="["+a+"]");let u="wss"===i?"https":"http",l="ws"===i&&80===s||"wss"===i&&443===s?"":s;return u+"://"+a+(l?":"+l:"")}const l={string:e=>"string"==typeof e,object:e=>"object"==typeof e,multiaddr:e=>{if(l.string(e))try{return i(e),!0}catch(e){return!1}},function:e=>"function"==typeof e};function c(e,t){if(!Array.isArray(t))throw new Error("Data is not an array");e.forEach((e,n)=>{if(!l[e])throw console.error("Type %s does not exist",e),new Error("Type "+e+" does not exist");if(!l[e](t[n]))throw new Error("Data at index "+n+" is invalid for type "+e)})}function f(e){e||(e=(()=>{}));const t=this;t.requests={},t.addRequest=((e,n,r)=>{t.requests[e]={def:n,handle:r}}),t.handleSocket=(n=>{n.r={},Object.keys(t.requests).forEach(r=>{const i=t.requests[r];n.on(r,function(){const t=[...arguments];try{c(i.def,t),t.unshift(n),i.handle.apply(null,t)}catch(i){e(i),e("peer %s has sent invalid data for request %s",n.id||"<server>",r,t)}})})})}function h(e,t,n){o.createFromPubKey(r.from(e,"hex"),(i,o)=>i?n(new Error("Crypto error")):o.toB58String()!==t?n(new Error("Id is not matching")):n(null,s.keys.unmarshalPublicKey(r.from(e,"hex"))))}t=e.exports,t.cleanUrlSIO=u,t.validate=c,t.Protocol=f,t.getIdAndValidate=h,t.validateMa=(e=>a.WebSocketStar.matches(i(e)))}).call(this,n(0).Buffer)},function(e,t,n){var r=n(1100),i=n(139),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";e.exports="/mplex/6.7.0"},function(e,t,n){"use strict";t=e.exports,t.multicodec="/ipfs/id/1.0.0",t.listener=n(1127),t.dialer=n(1128),t.message=n(333)},function(e,t,n){"use strict";(function(t){const r=n(122),i=n(72),o=n(259),s=o.writeEncoded;function a(e,n,o){const a=r({timeout:6e4},n),u=a.handshake;return o("writing multicodec: "+e),s(u,t.from(e+"\n"),n),i.decodeFromReader(u,(t,r)=>{if(t)return n(t);const i=r.toString().slice(0,-1);if(i!==e)return n(new Error(`"${e}" not supported`),u.rest());o("received ack: "+i),n(null,u.rest())}),a}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241),i=l(r),o=n(174),s=l(o),a=n(240),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)((0,i.default)(Boolean,u.default)),e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){const r=e===t;n(null,r)}e.exports=r},function(e,t,n){"use strict";t=e.exports,t.PROTOCOL_ID="/multistream/1.0.0"},function(e,t,n){"use strict";const r=n(183),i=n(535),o=n(258),s=n(53),a=n(536),u=n(336),{CONNECTION_FAILED:l,DIAL_SELF:c,INVALID_STATE_TRANSITION:f,NO_TRANSPORTS_REGISTERED:h,maybeUnexpectedEnd:p}=n(537);class d extends a{constructor({_switch:e,peerInfo:t,muxer:n,conn:i,type:o="out"}){super({_switch:e,name:`${o}:${e._peerInfo.id.toB58String().slice(0,8)}`}),this.theirPeerInfo=t,this.theirB58Id=this.theirPeerInfo.id.toB58String(),this.conn=i,this.muxer=n;let s="DISCONNECTED";this.muxer&&(s="MUXED"),this._state=r(s,{DISCONNECTED:{dial:"DIALING",disconnect:"DISCONNECTED",done:"DISCONNECTED"},DIALING:{abort:"ABORTED",done:"DIALED",error:"ERRORED",disconnect:"DISCONNECTING"},DIALED:{encrypt:"ENCRYPTING",privatize:"PRIVATIZING"},PRIVATIZING:{done:"PRIVATIZED",abort:"ABORTED",disconnect:"DISCONNECTING"},PRIVATIZED:{encrypt:"ENCRYPTING"},ENCRYPTING:{done:"ENCRYPTED",error:"ERRORED",disconnect:"DISCONNECTING"},ENCRYPTED:{upgrade:"UPGRADING",disconnect:"DISCONNECTING"},UPGRADING:{stop:"CONNECTED",done:"MUXED",error:"ERRORED"},MUXED:{disconnect:"DISCONNECTING"},CONNECTED:{disconnect:"DISCONNECTING"},DISCONNECTING:{done:"DISCONNECTED",disconnect:"DISCONNECTING"},ABORTED:{},ERRORED:{disconnect:"DISCONNECTING"}}),this._state.on("DISCONNECTED",()=>this._onDisconnected()),this._state.on("DIALING",()=>this._onDialing()),this._state.on("DIALED",()=>this._onDialed()),this._state.on("PRIVATIZING",()=>this._onPrivatizing()),this._state.on("PRIVATIZED",()=>this._onPrivatized()),this._state.on("ENCRYPTING",()=>this._onEncrypting()),this._state.on("ENCRYPTED",()=>{this.log("successfully encrypted connection to %s",this.theirB58Id),this.emit("encrypted",this.conn)}),this._state.on("UPGRADING",()=>this._onUpgrading()),this._state.on("MUXED",()=>{this.log("successfully muxed connection to %s",this.theirB58Id),delete this.switch.conns[this.theirB58Id],this.emit("muxed",this.muxer)}),this._state.on("CONNECTED",()=>{this.log("unmuxed connection opened to %s",this.theirB58Id),this.emit("unmuxed",this.conn)}),this._state.on("DISCONNECTING",()=>this._onDisconnecting()),this._state.on("ABORTED",()=>this._onAborted()),this._state.on("ERRORED",()=>this._onErrored()),this._state.on("error",e=>this._onStateError(e))}dial(){return this.theirB58Id===this.ourPeerInfo.id.toB58String()?this.emit("error",c()):"DIALING"===this.getState()?this.log("attempted to dial while already dialing, ignoring"):void this._state("dial")}shake(e,t){return e?this.muxer&&this.muxer.newStream?this.muxer.newStream((n,r)=>{if(n)return t(n,null);this.log("created new stream to %s",this.theirB58Id),this._protocolHandshake(e,r,t)}):void this._protocolHandshake(e,this.conn,t):t(null,null)}upgrade(){this._state("upgrade")}_onDialing(){if(this.log("dialing %s",this.theirB58Id),!this.switch.hasTransports())return this.close(h());const e=this.switch.availableTransports(this.theirPeerInfo),t=Boolean(this.switch.transports[i.tag]);t&&!e.includes(i.tag)&&e.push(i.tag);const n=r=>{let o=r;if(!o)return t?this.close(l(`No available transports to dial peer ${this.theirB58Id}!`)):this.close(l(`Circuit not enabled and all transports failed to dial peer ${this.theirB58Id}!`));o===i.tag&&this.theirPeerInfo.multiaddrs.add(`/p2p-circuit/p2p/${this.theirB58Id}`),this.log("dialing transport %s",o),this.switch.transport.dial(o,this.theirPeerInfo,(t,r)=>{if(t)return this.emit("error:connection_attempt_failed",t),this.log(t),n(e.shift());this.conn=u(o,null,r,this.switch.observer),this._state("done")})};n(e.shift())}_onDialed(){this.log("successfully dialed %s",this.theirB58Id),this.emit("connected",this.conn)}_onDisconnecting(){this.log("disconnecting from %s",this.theirB58Id),this.theirPeerInfo&&this.theirPeerInfo.disconnect(),this.switch.connection.remove(this),delete this.switch.conns[this.theirB58Id],this.muxer&&(this.muxer.end(),delete this.muxer,this.switch.emit("peer-mux-closed",this.theirPeerInfo)),this.conn?this.conn.source(!0,()=>{this._state("done"),delete this.conn}):this._state("done")}_onEncrypting(){const e=new o.Dialer;e.handle(this.conn,t=>{if(t)return this.close(p(t));this.log("selecting crypto %s to %s",this.switch.crypto.tag,this.theirB58Id),e.select(this.switch.crypto.tag,(e,t)=>{if(e)return this.close(p(e));const n=u(null,this.switch.crypto.tag,t,this.switch.observer);this.conn=this.switch.crypto.encrypt(this.ourPeerInfo.id,n,this.theirPeerInfo.id,e=>{if(e)return this.close(e);this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})})})}_onUpgrading(){const e=Object.keys(this.switch.muxers);if(this.log("upgrading connection to %s",this.theirB58Id),0===e.length)return this._state("stop");const t=new o.Dialer;t.handle(this.conn,n=>{if(n)return this._didUpgrade(n);const r=n=>{this.log("selecting %s",n),t.select(n,(t,i)=>{if(t)return 0===e.length?this._didUpgrade(t):r(e.shift());const o=u(null,n,i,this.switch.observer);this.muxer=this.switch.muxers[n].dialer(o),this.switch.connection.add(this),this.muxer.once("close",()=>{this.close()}),this.muxer.on("stream",e=>{this.log("new stream created via muxer to %s",this.theirB58Id),e.setPeerInfo(this.theirPeerInfo),this.switch.protocolMuxer(null)(e)}),this.switch.emit("peer-mux-established",this.theirPeerInfo),this._didUpgrade(null)})};r(e.shift())})}_didUpgrade(e){if(e)return this.log("Error upgrading connection:",e),this.switch.conns[this.theirB58Id]=this,this.emit("error:upgrade_failed",e),this._state("stop");this._state("done")}_protocolHandshake(e,t,n){const r=new o.Dialer;r.handle(t,t=>{if(t)return n(t,null);r.select(e,(t,r)=>{if(t)return this.log("could not perform protocol handshake:",t),n(t,null);const i=u(null,e,r,this.switch.observer);this.log("successfully performed handshake of %s to %s",e,this.theirB58Id),this.emit("connection",i),n(null,i)})})}_onStateError(e){this.emit("error",f(e)),this.log(e)}}e.exports=s(d,{className:"ConnectionFSM",symbolName:"libp2p-switch/ConnectionFSM"})},function(e,t,n){"use strict";e.exports=n(1135)},function(e,t,n){"use strict";const r=n(6).EventEmitter,i=n(5),o=n(53);class s extends r{constructor({_switch:e,name:t}){super(),this.switch=e,this.ourPeerInfo=this.switch._peerInfo,this.log=i(`libp2p:conn:${t}`),this.log.error=i(`libp2p:conn:${t}:error`)}close(e){"DISCONNECTING"!==this._state._state&&(this.log("closing connection to %s",this.theirB58Id),e&&this._events.error&&this.emit("error",e),this._state("disconnect"))}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):this.log.error(...t)}getState(){return this._state._state}encrypt(){this._state("encrypt")}protect(){this._state("privatize")}upgrade(){this._state("upgrade")}_onDisconnected(){this.log("disconnected from %s",this.theirB58Id),this.emit("close"),this.removeAllListeners()}_onPrivatized(){this.log("successfully privatized incoming connection"),this.emit("private",this.conn)}_onPrivatizing(){if(!this.switch.protector)return this._state("done");this.conn=this.switch.protector.protect(this.conn,e=>{if(e)return this.close(e);this.log("successfully privatized conn to %s",this.theirB58Id),this.conn.setPeerInfo(this.theirPeerInfo),this._state("done")})}}e.exports=o(s,{className:"BaseConnection",symbolName:"libp2p-switch/BaseConnection"})},function(e,t,n){"use strict";const r=n(22);e.exports.PROTECTOR_REQUIRED="No protector provided with private network enforced",e.exports.CONNECTION_FAILED=(e=>r(e,"CONNECTION_FAILED")),e.exports.DIAL_SELF=(()=>r(new Error("A node cannot dial itself"),"DIAL_SELF")),e.exports.NO_TRANSPORTS_REGISTERED=(()=>r(new Error("No transports registered, dial not possible"),"NO_TRANSPORTS_REGISTERED")),e.exports.UNEXPECTED_END=(()=>r(new Error("Unexpected end of input from reader."),"UNEXPECTED_END")),e.exports.INVALID_STATE_TRANSITION=(e=>r(e,"INVALID_STATE_TRANSITION")),e.exports.maybeUnexpectedEnd=(t=>!0===t?e.exports.UNEXPECTED_END():t)},function(e,t,n){"use strict";const r=n(14);e.exports={tag:"/plaintext/1.0.0",encrypt:(e,t,n,i)=>("function"==typeof n&&(i=n,n=void 0),r(()=>i()),t)}},function(e,t,n){"use strict";const r=n(23),i=n(44),o=n(24);function s(e,t){let n;if(i.isPeerInfo(e))return e;if(o.isMultiaddr(e)){const o=e.getPeerId();try{n=t.get(o)}catch(e){n=new i(r.createFromB58String(o))}return n.multiaddrs.add(e),n}if(r.isPeerId(e)){const n=e.toB58String();try{return t.get(n)}catch(e){throw new Error("Couldnt get PeerInfo")}}throw new Error("peer type not recognized")}e.exports=s},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1160),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t,n){"use strict";const r=n(1170);function i(e){if(!(this instanceof i))return new i(e);e=e||{};const t=e.validity||30,n=new Map,s=r(()=>{n.forEach((e,r)=>{const i=e.validity||t,s=o(e.timestamp);s>i&&n.delete(r)})},200);this.put=((e,t,r)=>{this.has(e)||n.set(e,{value:t,timestamp:new Date,validity:r}),s()}),this.get=(e=>{if(n.has(e))return n.get(e).value;throw new Error("key does not exist")}),this.has=(e=>n.has(e))}function o(e){const t=new Date,n=t.getTime()-e.getTime();return Math.floor(n/1e3)}t=e.exports=i},function(e,t,n){"use strict";const r=n(6),i=n(12),o=n(106),s=n(56),a=n(541),u=n(5),l=n(22),c=n(1171),f=n(543),h=n(1174),p=n(90);class d extends r{constructor(e,t,n){super(),this.log=u(e),this.log.err=u(`${e}:error`),this.multicodec=t,this.libp2p=n,this.started=!1,this.topics=new Map,this.seenCache=new a,this.peers=new Map,this._dials=new Set,this._onConnection=this._onConnection.bind(this),this._dialPeer=this._dialPeer.bind(this)}_addPeer(e){const t=e.info.id.toB58String();let n=this.peers.get(t);return n||(this.log("new peer",t),this.peers.set(t,e),n=e,e.once("close",()=>this._removePeer(e))),++n._references,n}_removePeer(e){const t=e.info.id.toB58String();return this.log("remove",t,e._references),0==--e._references&&(this.log("delete peer",t),this.peers.delete(t)),e}_dialPeer(e,t){t=t||function e(){};const n=e.id.toB58String(),r=this.peers.get(n);return r&&r.isConnected?p(()=>t()):this._dials.has(n)?(this.log("already dialing %s, ignoring dial attempt",n),p(()=>t())):(this._dials.add(n),this.log("dialing %s",n),void this.libp2p.dialProtocol(e,this.multicodec,(r,i)=>{this.log("dial to %s complete",n);const o=!this._dials.has(n);return this._dials.delete(n),r?(this.log.err(r),t()):o?(this.log("pubsub was stopped, not processing dial to %s",n),t()):void this._onDial(e,i,t)}))}_onDial(e,t,n){const r=e.id.toB58String();this.log("connected",r);const i=this._addPeer(new c(e));i.attachConnection(t),p(()=>n())}_onConnection(e,t){t.getPeerInfo((e,n)=>{if(e)return this.log.err("Failed to identify incomming conn",e),i(o(),t);const r=n.id.toB58String(),s=this._addPeer(new c(n));this._processConnection(r,t,s)})}_processConnection(e,t,n){throw l("_processConnection must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}_onConnectionEnd(e,t,n){n&&"socket hang up"!==n.message&&this.log.err(n),this.log("connection ended",e,n?n.message:""),this._removePeer(t)}publish(e,t){throw l("publish must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}subscribe(e){throw l("subscribe must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}unsubscribe(e){throw l("unsubscribe must be implemented by the subclass","ERR_NOT_IMPLEMENTED")}start(e){if(this.started)return p(()=>e(new Error("already started")));this.log("starting"),this.libp2p.handle(this.multicodec,this._onConnection),this.libp2p.on("peer:connect",this._dialPeer);const t=Object.values(this.libp2p.peerBook.getAll());s(t,(e,t)=>this._dialPeer(e,t),t=>{p(()=>{this.log("started"),this.started=!0,e(t)})})}stop(e){if(!this.started)return p(()=>e(new Error("not started yet")));this.libp2p.unhandle(this.multicodec),this.libp2p.removeListener("peer:connect",this._dialPeer),this._dials=new Set,this.log("stopping"),s(this.peers.values(),(e,t)=>e.close(t),t=>{if(t)return e(t);this.log("stopped"),this.peers=new Map,this.started=!1,e()})}}e.exports=d,e.exports.message=f,e.exports.utils=h},function(e,t,n){"use strict";const r=n(71),i=r(n(1172)),o=r(n(1173));t=e.exports,t.rpc=i,t.td=o},function(e){e.exports={name:"ipfs",version:"0.34.4",description:"JavaScript implementation of the IPFS specification",leadMaintainer:"Alan Shaw <alan@tableflip.io>",bin:{jsipfs:"src/cli/bin.js"},main:"src/core/index.js",browser:{"./src/core/components/init-assets.js":!1,"./src/core/runtime/add-from-fs-nodejs.js":"./src/core/runtime/add-from-fs-browser.js","./src/core/runtime/config-nodejs.js":"./src/core/runtime/config-browser.js","./src/core/runtime/dns-nodejs.js":"./src/core/runtime/dns-browser.js","./src/core/runtime/fetch-nodejs.js":"./src/core/runtime/fetch-browser.js","./src/core/runtime/libp2p-nodejs.js":"./src/core/runtime/libp2p-browser.js","./src/core/runtime/preload-nodejs.js":"./src/core/runtime/preload-browser.js","./src/core/runtime/repo-nodejs.js":"./src/core/runtime/repo-browser.js","./test/utils/create-repo-nodejs.js":"./test/utils/create-repo-browser.js",stream:"readable-stream",joi:"joi-browser"},engines:{node:">=10.0.0",npm:">=6.0.0"},scripts:{lint:"aegir lint",build:"aegir build",test:"aegir test -t node -t browser -t webworker --no-cors --timeout=10000","test:node":"aegir test -t node --timeout=10000","test:browser":"aegir test -t browser --no-cors --timeout=10000","test:webworker":"aegir test -t webworker --no-cors --timeout=10000","test:node:core":"aegir test -t node -f test/core/**/*.js --timeout=10000","test:node:http":"aegir test -t node -f test/http-api/index.js --timeout=10000","test:node:gateway":"aegir test -t node -f test/gateway/index.js --timeout=10000","test:node:cli":"aegir test -t node -f test/cli/index.js --timeout=10000","test:node:interface":"aegir test -t node -f test/core/interface.spec.js --timeout=10000","test:bootstrapers":"IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js --timeout=10000",benchmark:'echo "Error: no benchmarks yet" && exit 1',"benchmark:node":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:core":'echo "Error: no benchmarks yet" && exit 1',"benchmark:node:http":'echo "Error: no benchmarks yet" && exit 1',"benchmark:browser":'echo "Error: no benchmarks yet" && exit 1',release:"aegir release -t node -t browser","release-minor":"aegir release --type minor -t node -t browser","release-major":"aegir release --type major -t node -t browser",coverage:"aegir coverage","coverage-publish":"aegir-coverage publish","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},repository:{type:"git",url:"git+https://github.com/ipfs/js-ipfs.git"},keywords:["IPFS"],license:"MIT",bugs:{url:"https://github.com/ipfs/js-ipfs/issues"},homepage:"https://github.com/ipfs/js-ipfs#readme",devDependencies:{aegir:"^18.0.3",chai:"^4.2.0",delay:"^4.1.0","detect-node":"^2.0.4","dir-compare":"^1.4.0","dirty-chai":"^2.0.1",execa:"^1.0.0","form-data":"^2.3.3",hat:"0.0.3","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"~0.40.1",ncp:"^2.0.0",qs:"^6.5.2",rimraf:"^2.6.2",sinon:"^7.1.1","stream-to-promise":"^2.2.0"},dependencies:{"@nodeutils/defaults-deep":"^1.1.0",async:"^2.6.1","bignumber.js":"^8.0.2","binary-querystring":"~0.1.2",bl:"^2.1.2",boom:"^7.2.0",bs58:"^4.0.1",byteman:"^1.3.5","cid-tool":"~0.2.0",cids:"~0.5.5","class-is":"^1.1.0","datastore-core":"~0.6.0","datastore-pubsub":"~0.1.1",debug:"^4.1.0","err-code":"^1.1.2","file-type":"^10.2.0",fnv1a:"^1.0.1","fsm-event":"^2.1.0","get-folder-size":"^2.0.0",glob:"^7.1.3",hapi:"^16.6.2","hapi-set-header":"^1.0.2",hoek:"^6.1.2","human-to-milliseconds":"^1.0.0","interface-datastore":"~0.6.0","ipfs-bitswap":"~0.22.0","ipfs-block":"~0.8.0","ipfs-block-service":"~0.15.1","ipfs-http-client":"^29.0.0","ipfs-http-response":"~0.2.1","ipfs-mfs":"~0.8.0","ipfs-multipart":"~0.1.0","ipfs-repo":"~0.26.1","ipfs-unixfs":"~0.1.16","ipfs-unixfs-engine":"~0.35.3",ipld:"~0.20.1","ipld-bitcoin":"~0.1.8","ipld-dag-pb":"~0.15.0","ipld-ethereum":"^2.0.1","ipld-git":"~0.2.2","ipld-zcash":"~0.1.6",ipns:"~0.5.0","is-ipfs":"~0.4.8","is-pull-stream":"~0.0.0","is-stream":"^1.1.0",joi:"^14.3.0","joi-browser":"^13.4.0","joi-multiaddr":"^4.0.0",libp2p:"~0.24.1","libp2p-bootstrap":"~0.9.3","libp2p-crypto":"~0.16.0","libp2p-kad-dht":"~0.14.4","libp2p-keychain":"~0.3.3","libp2p-mdns":"~0.12.0","libp2p-mplex":"~0.8.4","libp2p-record":"~0.6.1","libp2p-secio":"~0.11.0","libp2p-tcp":"~0.13.0","libp2p-webrtc-star":"~0.15.5","libp2p-websocket-star-multi":"~0.4.0","libp2p-websockets":"~0.12.0",lodash:"^4.17.11",mafmt:"^6.0.2","mime-types":"^2.1.21",mkdirp:"~0.5.1",multiaddr:"^6.0.0","multiaddr-to-uri":"^4.0.0",multibase:"~0.6.0",multihashes:"~0.4.14","multihashing-async":"~0.5.1","node-fetch":"^2.3.0",once:"^1.4.0","peer-book":"~0.9.0","peer-id":"~0.12.0","peer-info":"~0.15.0",progress:"^2.0.1","promisify-es6":"^1.0.3",protons:"^1.0.1","pull-abortable":"^4.1.1","pull-cat":"^1.1.11","pull-defer":"~0.2.3","pull-file":"^1.1.0","pull-ndjson":"~0.1.1","pull-pushable":"^2.2.0","pull-sort":"^1.0.1","pull-stream":"^3.6.9","pull-stream-to-stream":"^1.3.4",pump:"^3.0.0","read-pkg-up":"^4.0.0","readable-stream":"^3.1.1",receptacle:"^1.3.2","stream-to-pull-stream":"^1.7.2","tar-stream":"^1.6.2",temp:"~0.9.0","update-notifier":"^2.5.0",varint:"^5.0.0",yargs:"^12.0.5","yargs-promise":"^1.1.0"},optionalDependencies:{"prom-client":"^11.1.3","prometheus-gc-stats":"~0.6.0"},contributors:["0xflotus <0xflotus@gmail.com>","A_A <21040751+Otto-AA@users.noreply.github.com>","Alan Shaw <alan.shaw@protocol.ai>","Alan Shaw <alan@tableflip.io>","Alex North <alex@alexnorth.me>","Alex Potsides <alex@achingbrain.net>","Andrew de Andrade <andrew@deandrade.com.br>","André Cruz <andremiguelcruz@msn.com>","Arkadiy Kukarkin <parkan@users.noreply.github.com>","Arpit Agarwal <93arpit@gmail.com>","Arpit Agarwal <atvanguard@users.noreply.github.com>","Bernard Mordan <bernard@tableflip.io>","Brian Vander Schaaf <bvs330@gmail.com>","Bruno Zell <bruno.zzell@gmail.com>","CHEVALAY JOSSELIN <josselin54.chevalay@gmail.com>","Caio Gondim <me@caiogondim.com>","Chance Hudson <jchancehud@gmail.com>","Christian Couder <chriscool@tuxfamily.org>","Dafeng <dfguo.joe@gmail.com>","Dan Ordille <dordille@gmail.com>","Daniel J. O'Quinn <danieljoquinn@gmail.com>","Daniela Borges Matos de Carvalho <alunassertiva@gmail.com>","David Dias <daviddias.p@gmail.com>","David Gilbertson <gilbertson.david@gmail.com>","David da Silva <dasilvacontin@gmail.com>","Diogo Silva <fsdiogo@gmail.com>","Dmitriy Ryajov <dryajov@gmail.com>","Dzmitry Das <dbachko@gmail.com>","Enrico Marino <enrico.marino@email.com>","Faheel Ahmad <faheel@live.in>","Felix Yan <felixonmars@archlinux.org>","Francisco Baio Dias <xicombd@gmail.com>","Francisco Baio Dias <francisco@typeform.com>","Friedel Ziegelmayer <dignifiedquire@gmail.com>","Gar <gar+gh@danger.computer>","Georgios Rassias <georassias@gmail.com>","Gorka Ludlow <gorka@aquigorka.com>","Greenkeeper <support@greenkeeper.io>","Haad <haadcode@users.noreply.github.com>","Haoliang Yu <haoliangyu@users.noreply.github.com>","Harsh Vakharia <harshjv@users.noreply.github.com>","Henrique Dias <hacdias@gmail.com>","Henry Rodrick <moshisushi@gmail.com>","Heo Sangmin <heo@mapiacompany.com>","Hugo Dias <mail@hugodias.me>","Hugo Dias <hugomrdias@gmail.com>","Jacob Heun <jacobheun@gmail.com>","Jacob Heun <jake@andyet.net>","Jade Meskill <jade.meskill@gmail.com>","Johannes Wikner <johannes.wikner@gmail.com>","Jon Schlinkert <dev@sellside.com>","Jonathan <jkrone@vt.edu>","João Antunes <j.goncalo.antunes@gmail.com>","João Santos <joaosantos15@users.noreply.github.com>","Kevin Wang <kevin@fossa.io>","Lars Gierth <larsg@systemli.org>","Lukas Drgon <lukas.drgon@gmail.com>","Maciej Krüger <mkg20001@gmail.com>","Marcin Rataj <lidel@lidel.org>","Marius Darila <marius.darila@gmail.com>","Mat Kelly <machawk1@gmail.com>","Michelle Lee <michelle@protocol.ai>","Mikeal Rogers <mikeal.rogers@gmail.com>","Mithgol <getgit@mithgol.ru>","Molly <momack2@users.noreply.github.com>","My9Bot <34904312+My9Bot@users.noreply.github.com>","Nuno Nogueira <nunofmn@gmail.com>","Oli Evans <oli@tableflip.io>","Oskar Nyberg <oskar@oskarnyberg.com>","Pascal Precht <pascal.precht@googlemail.com>","Pau Ramon Revilla <masylum@gmail.com>","Paulo Rodrigues <me@paulogr.com>","Pedro Teixeira <i@pgte.me>","Portia Burton <plburton@gmail.com>","Raoul Millais <raoul@raoulmillais.com>","RasmusErik Voel Jensen <github@solsort.com>","Richard Littauer <richard.littauer@gmail.com>","Richard Schneider <makaretu@gmail.com>","Rob Brackett <rob@robbrackett.com>","Rod Keys <rod@zokos.com>","Sangwon Hong <qpakzk@gmail.com>","Sid Harder <sideharder@gmail.com>","SidHarder <softwarenavigator@gmail.com>","Stephen Whitmore <stephen.whitmore@gmail.com>","Stephen Whitmore <noffle@users.noreply.github.com>","Terence Pae <terencepae@gmail.com>","Uroš Jurglič <jurglic@gmail.com>","Vasco Santos <vasco.santos@ua.pt>","Vasco Santos <vasco.santos@moxy.studio>","Volker Mische <volker.mische@gmail.com>","Xiao Liang <yxliang01@users.noreply.github.com>","Yahya <ya7yaz@gmail.com>","Yole <yole@ultiledger.io>","bitspill <bitspill+github@bitspill.net>","datafatmunger <jbg@peerparty.org>","haad <haad@headbanggames.com>","jbenet <juan@benet.ai>","jonahweissman <19804455+jonahweissman@users.noreply.github.com>","kevingzhang <kevin.zhang.canada@gmail.com>","kumavis <kumavis@users.noreply.github.com>","nginnever <ginneversource@gmail.com>","npmcdn-to-unpkg-bot <npmcdn-to-unpkg-bot@users.noreply.github.com>","robbsolter <35879806+robbsolter@users.noreply.github.com>","seungwon-kang <ksw3894@gmail.com>","tcme <hi@this-connect.me>","victorbjelkholm <victorbjelkholm@gmail.com>","Łukasz Magiera <magik6k@users.noreply.github.com>","Максим Ильин <negamaxi@gmail.com>"]}},function(e,t,n){"use strict";const r=n(3),i=n(224).repoVersion;e.exports=function e(t){return{init:(e,t,n)=>{},version:r(e=>{t._repo._isInitialized(n=>{if(n){const t=[/Key not found in database \[\/version\]/,/ENOENT/,/repo is not initialized yet/].some(e=>e.test(n.message));return t?e(null,i):e(n)}t._repo.version.get(e)})}),gc:r((e,t)=>{"function"==typeof e&&(t=e,e={}),t(new Error("Not implemented"))}),stat:r((e,n)=>{"function"==typeof e&&(n=e,e={}),t._repo.stat(e,(e,t)=>{if(e)return n(e);n(null,{numObjects:t.numObjects,repoSize:t.repoSize,repoPath:t.repoPath,version:t.version.toString(),storageMax:t.storageMax})})}),path:()=>t._repo.path}}},function(e,t,n){"use strict";e.exports=(()=>({Addresses:{Swarm:[],API:"",Gateway:""},Discovery:{MDNS:{Enabled:!1,Interval:10},webRTCStar:{Enabled:!0}},Bootstrap:["/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd","/dns4/lon-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3","/dns4/sfo-3.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM","/dns4/sgp-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu","/dns4/nyc-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm","/dns4/nyc-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64","/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic","/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6"]}))},function(e,t){function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(292),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(t,n,r,o){return e((0,i.default)(n),t,(0,s.default)(r),o)}}e.exports=t.default},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(26),o=n(1208),s=n(150),a=n(187).isSource,u=n(338);e.exports=function(e){const n=r((n,r,l)=>{"function"==typeof r&&(l=r,r={}),r=r||{};const c=e=>t.isBuffer(e)||s.readable(e)||a(e),f=e=>"object"==typeof e&&(e.content?c(e.content):Boolean(e.path)&&u(e.path)),h=e=>c(e)||f(e),p=h(n)||Array.isArray(n)&&n.every(h);if(!p)return l(new Error("invalid input: expected buffer, readable stream, pull stream, object or array of objects"));i(i.values([n]),e.addPullStream(r),o((e,t)=>e.path<t.path?1:e.path>t.path?-1:0),i.collect(l))});return function(){const e=Array.from(arguments);return 1===e.length&&a(e[0])&&e.push({}),n.apply(null,e)}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=n(1215)},function(e,t){e.exports=function(e){var t,n,r;function i(e){return n=e,function(e,i){r?t=[e,i]:n(e,i)}}return i.pause=function(){r||(r=!0,e&&e(r))},i.resume=function(){if(r&&(r=!1,e&&e(r),t)){var i=t;t=null,n(i[0],i[1])}},i}},function(e,t,n){"use strict";(function(t){e.exports=function e(n,r,i,o){const s=n.length,a=r+s;return i>=a||o<r?t.alloc(0):(o>=r&&o<a&&(n=n.slice(0,o-r)),i>=r&&i<a&&(n=n.slice(i-r)),n)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const{DAGNode:r,DAGLink:i}=n(38),o=n(9),s=n(11),a=n(263),u=n(40),l=n(5)("ipfs:mfs:core:utils:add-link"),c=n(48),{generatePath:f,updateHamtDirectory:h}=n(554),p={parent:void 0,cid:void 0,name:"",size:void 0,flush:!0,cidVersion:0,hashAlg:"sha2-256",codec:"dag-pb",shardSplitThreshold:1e3},d=(e,t,n)=>{if(t=Object.assign({},p,t),!t.parentCid)return n(new Error("No parent CID passed to addLink"));if(!o.isCID(t.parentCid))return n(new Error("Invalid CID passed to addLink"));if(!t.parent)return l("Loading parent node",t.parentCid.toBaseEncodedString()),s([n=>e.ipld.get(t.parentCid,n),(e,t)=>t(null,e.value),(n,r)=>d(e,{...t,parent:n},r)],n);if(!t.cid)return n(new Error("No child cid passed to addLink"));if(!t.name)return n(new Error("No child name passed to addLink"));if(o.isCID(t.cid)||(t.cid=new o(t.cid)),!t.size&&0!==t.size)return n(new Error("No child size passed to addLink"));const r=c.unmarshal(t.parent.data);return"hamt-sharded-directory"===r.type?(l("Adding link to sharded directory"),y(e,t,n)):t.parent.links.length>=t.shardSplitThreshold?(l("Converting directory to sharded directory"),m(e,t,n)):(l(`Adding ${t.name} to regular directory`),void g(e,t,n))},m=(e,t,n)=>{v(e,t.parent.links.map(e=>({name:e.name,size:e.size,multihash:e.cid.buffer})).concat({name:t.name,size:t.size,multihash:t.cid.buffer}),{},(e,t)=>{e||l("Converted directory to sharded directory",t.cid.toBaseEncodedString()),n(e,t)})},g=(e,t,n)=>{s([e=>r.rmLink(t.parent,t.name,e),(e,n)=>r.addLink(e,new i(t.name,t.size,t.cid),n),(n,r)=>{e.ipld.put(n,{version:t.cidVersion,format:t.codec,hashAlg:t.hashAlg,hashOnly:!t.flush},(e,t)=>r(e,{node:n,cid:t}))}],n)},y=(e,t,n)=>s([n=>f(e,t.name,t.parent,n),({rootBucket:n,path:r},i)=>{b(e,r,{name:t.name,cid:t.cid,size:t.size},t,(e,t={})=>i(e,{rootBucket:n,...t}))},({rootBucket:n,node:r},i)=>h(e,r.links,n,t,i)],n),b=(e,t,n,r,i)=>{const{bucket:o,prefix:a,node:u}=t.pop(),c=u.links.find(e=>e.name.substring(0,2)===a&&e.name!==`${a}${n.name}`);return s([i=>c&&c.name.length>2?(l(`Converting existing file ${c.name} into sub-shard for ${n.name}`),s([t=>v(e,[{name:c.name.substring(2),size:c.size,multihash:c.cid.buffer},{name:n.name,size:n.size,multihash:n.cid.buffer}],{},t),({node:{links:[t]}},n)=>e.ipld.get(t.cid,(e,r)=>{n(e,{cid:t.cid,node:r&&r.value})}),(t,n)=>w(e,o,u,c.name,t.node,t.cid,a,r,n)],i)):c&&2===c.name.length?(l(`Descending into sub-shard ${c.name} for ${n.name}`),s([i=>b(e,t,n,r,i),(t,n)=>w(e,o,u,c.name,t.node,t.cid,a,r,n)],i)):(l("Adding or replacing file",a+n.name),void w(e,o,u,a+n.name,n,n.cid,a+n.name,r,i))],i)},v=(e,t,n,r)=>{const i=new a({root:!0,dir:!0,parent:null,parentKey:null,path:"",dirty:!0,flat:!1,...n}),o=t.map(e=>t=>{i.put(e.name,{size:e.size,multihash:e.multihash},t)});return u(o,t=>{if(t)return r(t);i.flush("",e.ipld,null,r)})},w=(e,t,n,o,a,u,l,c,f)=>{s([e=>r.rmLink(n,o,e),(e,t)=>r.addLink(e,new i(l,a.size,u),t),(n,r)=>h(e,n.links,t,c,r)],f)};e.exports=d},function(e,t,n){"use strict";(function(t){const{DAGNode:r}=n(38),i=n(11),o=n(229),s=n(342),a=n(263),u=n(5)("ipfs:mfs:core:utils:hamt-utils"),l=n(48),c=(e,n,o,s,u)=>{i([e=>{const i=t.from(o._children.bitField().reverse()),s=new l("hamt-sharded-directory",i);s.fanout=o.tableSize(),s.hashType=a.hashFn.code,r.create(s.marshal(),n,e)},(t,n)=>{e.ipld.put(t,{version:s.cidVersion,format:s.codec,hashAlg:s.hashAlg,hashOnly:!s.flush},(e,r)=>n(e,{node:t,cid:r}))}],u)},f=(e,t,n,r,i)=>{const o=new s({hashFn:a.hashFn,hash:n?n._options.hash:void 0},n,r);n&&n._putObjectAt(r,o),h(e,o,t,i)},h=(e,t,n,r)=>{Promise.all(e.map(e=>{if(2===e.name.length){const n=parseInt(e.name,16);return t._putObjectAt(n,new s({hashFn:a.hashFn},t,n)),Promise.resolve()}return(n||t).put(e.name.substring(2),!0)})).catch(e=>{r(e),r=null}).then(()=>r&&r(null,t))},p=e=>e.toString("16").toUpperCase().padStart(2,"0").substring(0,2),d=(e,t,n,r)=>{f(n.links,null,null,null,async(i,s)=>{if(i)return r(i);const a=await s._findNewBucketAndPos(t);let l=[{bucket:a.bucket,prefix:p(a.pos)}],c=a.bucket;for(;c!==s;)l.push({bucket:c,prefix:p(c._posAtParent)}),c=c._parent;l[l.length-1].node=n;let d=l.length;o(()=>d>0,n=>{d--;const r=l[d],i=r.node.links.filter(e=>e.name.substring(0,2)===r.prefix).pop();return i?i.name===`${r.prefix}${t}`?(u(`Link ${r.prefix}${t} will be replaced`),n(null,l)):(u(`Found subshard ${r.prefix}`),void e.ipld.get(i.cid,(e,i)=>{if(e)return n(e);if(!l[d-1]){u(`Loaded new subshard ${r.prefix}`);const e=i.value;return f(e.links,s,r.bucket,parseInt(r.prefix,16),async(r,i)=>{if(r)return n(r);const o=await s._findNewBucketAndPos(t);d++,l.unshift({bucket:o.bucket,prefix:p(o.pos),node:e}),n()})}const o=l[d-1];h(i.value.links,o.bucket,s,e=>{o.node=i.value,n(e)})})):(u(`Link ${r.prefix}${t} will be added`),n(null,l))},async(e,n)=>{await s.put(t,!0),r(e,{rootBucket:s,path:n})})})};e.exports={generatePath:d,updateHamtDirectory:c,recreateHamtLevel:f,addLinksToHamtBucket:h,toPrefix:p}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=n(1268)},function(e,t){e.exports={WORKER_REQUEST_READ_LOCK:"lock:worker:request-read",WORKER_RELEASE_READ_LOCK:"lock:worker:release-read",MASTER_GRANT_READ_LOCK:"lock:master:grant-read",WORKER_REQUEST_WRITE_LOCK:"lock:worker:request-write",WORKER_RELEASE_WRITE_LOCK:"lock:worker:release-write",MASTER_GRANT_WRITE_LOCK:"lock:master:grant-write"}},function(e,t){const n={},r=e=>{e.addEventListener("message",t=>{r.dispatchEvent("message",e,t)}),e.port&&e.port.addEventListener("message",t=>{r.dispatchEvent("message",e,t)})};r.addEventListener=((e,t)=>{n[e]||(n[e]=[]),n[e].push(t)}),r.removeEventListener=((e,t)=>{n[e]&&(n[e]=n[e].filter(e=>e===t))}),r.dispatchEvent=function(){const e=Array.prototype.slice.call(arguments),t=e.shift();n[t]&&n[t].forEach(t=>t.apply(null,e))},e.exports=r},function(e,t,n){"use strict";const{FILE_SEPARATOR:r}=n(265),i=n(559),o=n(11),s=n(54),a=n(343),u="ipfs",l=(e,t,n)=>{let u=Array.isArray(t);const l=Array.isArray(t)?t:[t];o([t=>{s({paths:e=>{let t;try{t=l.map(e=>{if(e=(e||"").trim(),e=e.replace(/(\/\/+)/g,"/"),!e)throw new Error("paths must not be empty");if(e.substring(0,1)!==r)throw new Error(`paths must start with a leading ${r}`);return e.substring(e.length-r.length)===r&&(e=e.substring(0,e.length-r.length)),a(e)})}catch(t){return e(t)}e(null,t)},root:t=>i(e,t)},t)},({paths:e,root:t},n)=>{n(null,e.map(e=>{if("ipfs"===e[0]){let n;return n=2===e.length?`${r}${e.join(r)}`:`${r}${e.slice(0,e.length-1).join(r)}`,{type:"ipfs",depth:e.length-2,mfsPath:`${r}${e.join(r)}`,mfsDirectory:n,root:t,parts:e,path:`${r}${e.join(r)}`,name:e[e.length-1]}}const n=`/ipfs/${t.toBaseEncodedString()}/${e.join(r)}`,i=`/ipfs/${t.toBaseEncodedString()}/${e.slice(0,e.length-1).join(r)}`;return{type:"mfs",depth:e.length,mfsDirectory:i,mfsPath:n,root:t,parts:e,path:`${r}${e.join(r)}`,name:e[e.length-1]}}))},(e,t)=>{if(u)return t(null,e);t(null,e[0])}],n)};e.exports=l},function(e,t,n){"use strict";const r=n(9),i=n(48),{DAGNode:o}=n(38),s=n(5)("ipfs:mfs:utils:with-mfs-root"),a=n(11),{MFS_ROOT_KEY:u}=n(265),l=(e,t)=>{a([t=>e.repo.datastore.open(e=>t(e)),t=>{e.repo.datastore.get(u,(n,l)=>{if(n&&(n.notFound||"ERR_NOT_FOUND"===n.code))return s("Creating new MFS root"),a([e=>o.create(new i("directory").marshal(),e),(t,n)=>e.ipld.put(t,{version:0,hashAlg:"sha2-256",format:"dag-pb"},n),(t,n)=>e.repo.datastore.put(u,t.buffer,e=>n(e,t))],t);t(n,l?new r(l):null)})},(e,t)=>{s(`Fetched MFS root ${e.toBaseEncodedString()}`),t(null,e)}],t)};e.exports=l},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(561),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1290),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1291),b=n(562),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(151),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(151),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(561),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(562),y;function b(){}function v(e,t){u=u||n(151),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(151),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(151),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){(function(t){var r=n(566).strict;e.exports=function e(n){if(r(n)){var i=t.from(n.buffer);return n.byteLength!==n.buffer.byteLength&&(i=i.slice(n.byteOffset,n.byteOffset+n.byteLength)),i}return t.from(n)}}).call(this,n(0).Buffer)},function(e,t){e.exports=i,i.strict=o,i.loose=s;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return o(e)||s(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function s(e){return r[n.call(e)]}},function(e,t,n){"use strict";const r=n(558);function i(e,t,n,i){t=t.slice();const o=Object.assign({},n,t.filter(e=>"object"==typeof e).pop()||{});Array.isArray(t[0])&&(t=t[0]);const s=t.filter(e=>"string"==typeof e).map(e=>e.trim());r(e,s,(e,t)=>{i(e,{sources:t,options:o})})}e.exports=i},function(e,t,n){"use strict";const r=n(11),i=n(54),{addLink:o,updateTree:s,updateMfsRoot:a,toTrail:u,toSourcesAndDestination:l,toMfsPath:c}=n(82),f=n(267),h=n(345),p=n(5)("ipfs:mfs:cp"),d={parents:!1,flush:!0,format:"dag-pb",hashAlg:"sha2-256",shardSplitThreshold:1e3};e.exports=(e=>(function t(){const n=Array.from(arguments),i=n.pop();r([t=>l(e,n,d,t),({sources:e,destination:t,options:n},r)=>e.length?t?(n.parents=n.p||n.parents,void r(null,{sources:e,destination:t,options:n})):r(new Error("Please supply a destination")):r(new Error("Please supply at least one source")),({sources:t,destination:n,options:r},i)=>u(e,n.mfsPath,r,(o,s)=>{if(o)return i(o);if(s.length===n.parts.length)return p("Destination does not exist"),1===t.length?(p("Only one source, copying to a file"),m(e,t.pop(),n,s,r,i)):(p("Multiple sources, copying to a directory"),g(e,t,n,s,r,i));const a=s[s.length-1];if("dir"===a.type)return p("Destination is a directory"),g(e,t,n,s,r,i);i(new Error("directory already has entry by that name"))})],i)}));const m=(e,t,n,i,u,l)=>{r([n=>y(e,t,u,n),(t,s)=>{const a=i[i.length-1],u=t[t.length-1];r([t=>e.ipld.get(a.cid,t),(t,r)=>o(e,{parent:t.value,parentCid:a.cid,size:u.size,cid:u.cid,name:n.parts[n.parts.length-1]},r),({node:e,cid:t},n)=>{a.node=e,a.cid=t,a.size=e.size,n(null,i)}],s)},(t,n)=>s(e,t,u,n),({cid:t},n)=>a(e,t,n)],e=>l(e))},g=(e,t,n,l,d,m)=>{r([t=>{if(l.length!==n.parts.length+1)return p("Making destination directory",n.path),r([t=>h(e)(n.path,d,t),t=>c(e,n.path,t),(t,r)=>{n=t,u(e,n.mfsPath,d,r)}],(e,n)=>{if(e)return t(e);l=n,t()});t()},n=>i(t.map(t=>n=>y(e,t,d,n)),n),(u,c)=>{r([r=>{i(t.map(t=>r=>{f(e)(`${n.path}/${t.name}`,d,e=>{if(e)return e.message.includes("does not exist")?r():r(e);r(new Error("directory already has entry by that name"))})}),e=>r(e))},n=>{const i=l[l.length-1];r([t=>e.ipld.get(i.cid,t),(e,t)=>t(null,{cid:i.cid,node:e.value})].concat(u.map((n,r)=>(i,s)=>{const a=n[n.length-1];p(`Adding ${t[r].name} to ${i.cid.toBaseEncodedString()}`),o(e,{parent:i.node,parentCid:i.cid,size:a.size,cid:a.cid,name:t[r].name},(e,t)=>{if(e)return s(e);p(`New directory hash ${t.cid.toBaseEncodedString()}`),s(e,t)})})),n)},({node:e,cid:t},n)=>{const r=l[l.length-1];r.node=e,r.cid=t,r.size=e.size,n(null,l)},(t,n)=>s(e,t,d,n),({cid:t},n)=>a(e,t,n)],c)}],e=>m(e))},y=(e,t,n,r)=>{u(e,t.mfsPath,n,(e,n)=>e?r(e):"ipfs"===t.type?r(null,n):n.length!==t.parts.length+1?r(new Error(`${t.path} does not exist`)):void r(null,n))}},function(e,t,n){"use strict";const r=n(11),i=n(40),{updateTree:o,updateMfsRoot:s,toSources:a,removeLink:u,toMfsPath:l,toTrail:c,FILE_SEPARATOR:f}=n(82),h={recursive:!1,cidVersion:0,hashAlg:"sha2-256",format:"dag-pb"};e.exports=(e=>(function t(){const n=Array.from(arguments),o=n.pop();r([t=>a(e,n,h,t),({sources:t,options:n},r)=>{if(!t.length)return r(new Error("Please supply at least one path to remove"));i(t.map(t=>r=>p(e,t.path,n,r)),e=>r(e))}],o)}));const p=(e,t,n,i)=>{if(t===f)return i(new Error("Cannot delete root"));r([n=>l(e,t,n),({mfsPath:t,parts:r},i)=>c(e,t,n,(e,n)=>i(e,{mfsPath:t,parts:r,trail:n})),({trail:i},o)=>{const s=i.pop(),a=i[i.length-1];return a?"dir"!==s.type||n.recursive?void r([t=>u(e,{parentCid:a.cid,name:s.name},t),({cid:e},t)=>{a.cid=e,t(null,i)}],o):o(new Error(`${t} is a directory, use -r to remove directories`)):o(new Error(`${t} does not exist`))},(t,r)=>o(e,t,n,r),({cid:t},n)=>s(e,t,n)],i)}},function(e,t,n){"use strict";const r=n(186).OFFLINE_ERROR,i=n(3),o=n(14),s=n(62),a=n(9),u=n(23),l=n(22);function c(e,t){return Array.from(e).map(e=>({"/":e[1].cid.toBaseEncodedString()}))}e.exports=function e(t){return{wantlist:i((e,n)=>{if("function"==typeof e&&(n=e,e=null),!t.isOnline())return o(()=>n(new Error(r)));let i;if(e){try{e=u.createFromB58String(e)}catch(t){e=null}if(!e)return o(()=>n(new Error("Invalid peerId")));i=t._bitswap.wantlistForPeer(e)}else i=t._bitswap.getWantlist();o(()=>n(null,{Keys:c(i)}))}),stat:i(e=>{if(!t.isOnline())return o(()=>e(new Error(r)));const n=t._bitswap.stat().snapshot;o(()=>{e(null,{provideBufLen:parseInt(n.providesBufferLength.toString()),blocksReceived:new s(n.blocksReceived),wantlist:c(t._bitswap.getWantlist()),peers:t._bitswap.peers().map(e=>e.toB58String()),dupBlksReceived:new s(n.dupBlksReceived),dupDataReceived:new s(n.dupDataReceived),dataReceived:new s(n.dataReceived),blocksSent:new s(n.blocksSent),dataSent:new s(n.dataSent)})})}),unwant:i((e,n)=>{if(!t.isOnline())return o(()=>n(new Error(r)));Array.isArray(e)||(e=[e]);try{e=e.map(e=>a.isCID(e)?e:new a(e))}catch(e){return o(()=>n(l(e,"ERR_INVALID_CID")))}o(()=>n(null,t._bitswap.unwant(e)))})}}},function(e,t,n){"use strict";const r=n(3),i=/^((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))+$/,o=/((\d+(\.\d+)*)(ns|ms|us|µs|m|s|h))/g,s=/(ns|ms|us|µs|m|s|h)/g,a={ns:1e-6,us:.001,"µs":.001,ms:1,s:1e3,m:6e4,h:36e5};function u(e){let t=e.match(s)[0];return e=e.substring(0,e.length-t.length),parseFloat(e)*a[t]}e.exports=r(function(e,t){return"string"!=typeof e?t(new Error("the first argument must be a string")):i.test(e)?void t(null,e.match(o).reduce((e,t)=>e+u(t),0)):t(new Error("invalid time"))})},function(e,t,n){"use strict";const r=n(1328).Block,i=n(9),o=n(35),s=n(58),a=n(11),u=80,l=(e,t)=>{let n=null,r;try{r=e.toBuffer(!0)}catch(e){n=e}finally{t(n,r)}},c=(e,t)=>{if(80!==e.length){const e=new Error("Bitcoin block header needs to be 80 bytes");return t(e)}const n=r.fromBuffer(e);t(null,n)},f=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{};const o=t.hashAlg||n(347).defaultHashAlg,u=void 0===t.version?1:t.version;a([t=>{try{s(e.toBuffer(!0),o,t)}catch(e){t(e)}},(e,t)=>t(null,new i(u,"bitcoin-block",e))],r)},h=e=>{const t=n(347).defaultHashAlg,r=o.encode(e,t),s=1,a=new i(1,"bitcoin-block",r);return a};e.exports={hashToCid:h,BITCOIN_BLOCK_HEADER_SIZE:80,cid:f,deserialize:c,serialize:l}},function(e,t,n){"use strict";var r=t;function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n}function o(e){return 1===e.length?"0"+e:e}function s(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t}r.toArray=i,r.zero2=o,r.toHex=s,r.encode=function e(t,n){return"hex"===n?s(t):t}},function(e,t,n){var r;function i(e){this.rand=e}if(e.exports=function e(t){return r||(r=new i(null)),r.generate(t)},e.exports.Rand=i,i.prototype.generate=function e(t){return this._rand(t)},i.prototype._rand=function e(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var n=new Uint8Array(t),r=0;r<n.length;r++)n[r]=this.rand.getByte();return n},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function e(t){var n=new Uint8Array(t);return self.crypto.getRandomValues(n),n}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function e(t){var n=new Uint8Array(t);return self.msCrypto.getRandomValues(n),n}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(1331);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function e(t){return o.randomBytes(t)}}catch(e){}},function(e,t,n){"use strict";var r=n(92),i=r.rotr32;function o(e,t,n,r){return 0===e?s(t,n,r):1===e||3===e?u(t,n,r):2===e?a(t,n,r):void 0}function s(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function u(e,t,n){return e^t^n}function l(e){return i(e,2)^i(e,13)^i(e,22)}function c(e){return i(e,6)^i(e,11)^i(e,25)}function f(e){return i(e,7)^i(e,18)^e>>>3}function h(e){return i(e,17)^i(e,19)^e>>>10}t.ft_1=o,t.ch32=s,t.maj32=a,t.p32=u,t.s0_256=l,t.s1_256=c,t.g0_256=f,t.g1_256=h},function(e,t,n){"use strict";var r=n(92),i=n(190),o=n(575),s=n(107),a=r.sum32,u=r.sum32_4,l=r.sum32_5,c=o.ch32,f=o.maj32,h=o.s0_256,p=o.s1_256,d=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[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 b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function e(t,n){for(var r=this.W,i=0;i<16;i++)r[i]=t[n+i];for(;i<r.length;i++)r[i]=u(m(r[i-2]),r[i-7],d(r[i-15]),r[i-16]);var o=this.h[0],g=this.h[1],y=this.h[2],b=this.h[3],v=this.h[4],w=this.h[5],_=this.h[6],k=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var S=l(k,p(v),c(v,w,_),this.k[i],r[i]),E=a(h(o),f(o,g,y));k=_,_=w,w=v,v=a(b,S),b=y,y=g,g=o,o=a(S,E)}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],g),this.h[2]=a(this.h[2],y),this.h[3]=a(this.h[3],b),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],_),this.h[7]=a(this.h[7],k)},b.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(92),i=n(190),o=n(107),s=r.rotr64_hi,a=r.rotr64_lo,u=r.shr64_hi,l=r.shr64_lo,c=r.sum64,f=r.sum64_hi,h=r.sum64_lo,p=r.sum64_4_hi,d=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,y=i.BlockHash,b=[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 v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,n,r,i,o){var s=t&r^~t&o;return s<0&&(s+=4294967296),s}function k(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function S(e,t,n,r,i,o){var s=t&r^t&o^r&o;return s<0&&(s+=4294967296),s}function E(e,t){var n=s(e,t,28),r=s(t,e,2),i=s(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function x(e,t){var n=a(e,t,28),r=a(t,e,2),i=a(t,e,7),o=n^r^i;return o<0&&(o+=4294967296),o}function C(e,t){var n=s(e,t,14),r=s(e,t,18),i=s(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function A(e,t){var n=a(e,t,14),r=a(e,t,18),i=a(t,e,9),o=n^r^i;return o<0&&(o+=4294967296),o}function I(e,t){var n=s(e,t,1),r=s(e,t,8),i=u(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function T(e,t){var n=a(e,t,1),r=a(e,t,8),i=l(e,t,7),o=n^r^i;return o<0&&(o+=4294967296),o}function j(e,t){var n=s(e,t,19),r=s(t,e,29),i=u(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}function O(e,t){var n=a(e,t,19),r=a(t,e,29),i=l(e,t,6),o=n^r^i;return o<0&&(o+=4294967296),o}r.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function e(t,n){for(var r=this.W,i=0;i<32;i++)r[i]=t[n+i];for(;i<r.length;i+=2){var o=j(r[i-4],r[i-3]),s=O(r[i-4],r[i-3]),a=r[i-14],u=r[i-13],l=I(r[i-30],r[i-29]),c=T(r[i-30],r[i-29]),f=r[i-32],h=r[i-31];r[i]=p(o,s,a,u,l,c,f,h),r[i+1]=d(o,s,a,u,l,c,f,h)}},v.prototype._update=function e(t,n){this._prepareBlock(t,n);var r=this.W,i=this.h[0],s=this.h[1],a=this.h[2],u=this.h[3],l=this.h[4],p=this.h[5],d=this.h[6],y=this.h[7],b=this.h[8],v=this.h[9],I=this.h[10],T=this.h[11],j=this.h[12],O=this.h[13],P=this.h[14],B=this.h[15];o(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var N=P,M=B,L=C(b,v),F=A(b,v),D=w(b,v,I,T,j,O),U=_(b,v,I,T,j,O),z=this.k[R],q=this.k[R+1],K=r[R],H=r[R+1],V=m(N,M,L,F,D,U,z,q,K,H),W=g(N,M,L,F,D,U,z,q,K,H);N=E(i,s),M=x(i,s),L=k(i,s,a,u,l,p),F=S(i,s,a,u,l,p);var $=f(N,M,L,F),G=h(N,M,L,F);P=j,B=O,j=I,O=T,I=b,T=v,b=f(d,y,V,W),v=h(y,y,V,W),d=l,y=p,l=a,p=u,a=i,u=s,i=f(V,W,$,G),s=h(V,W,$,G)}c(this.h,0,i,s),c(this.h,2,a,u),c(this.h,4,l,p),c(this.h,6,d,y),c(this.h,8,b,v),c(this.h,10,I,T),c(this.h,12,j,O),c(this.h,14,P,B)},v.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){var r=n(348);function i(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function o(e){return r.Nil(e)?"":i(e.constructor)}function s(e){return r.Function(e)?"":r.String(e)?JSON.stringify(e):e&&r.Object(e)?"":e}function a(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function u(e){return r.Function(e)?e.toJSON?e.toJSON():i(e):r.Array(e)?"Array":e&&r.Object(e)?"Object":void 0!==e?e:""}function l(e,t,n){var r=s(t);return"Expected "+u(e)+", got"+(""!==n?" "+n:"")+(""!==r?" "+r:"")}function c(e,t,n){n=n||o(t),this.message=l(e,t,n),a(this,c),this.__type=e,this.__value=t,this.__valueTypeName=n}function f(e,t,n,r,i){var o='" of type ';return"key"===t&&(o='" with key type '),l('property "'+u(n)+o+u(e),r,i)}function h(e,t,n,r,i){e?(i=i||o(r),this.message=f(e,n,t,r,i)):this.message='Unexpected property "'+t+'"',a(this,c),this.__label=n,this.__property=t,this.__type=e,this.__value=r,this.__valueTypeName=i}function p(e,t){return new c(e,{},t)}function d(e,t,n){return e instanceof h?(t=t+"."+e.__property,e=new h(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof c&&(e=new h(e.__type,t,n,e.__value,e.__valueTypeName)),a(e),e}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,h.prototype=Object.create(Error.prototype),h.prototype.constructor=c,e.exports={TfTypeError:c,TfPropertyTypeError:h,tfCustomError:p,tfSubError:d,tfJSON:u,getValueTypeName:o}},function(e,t,n){const r=n(4).Buffer;function i(e,t,n){t=t||4,n=void 0===n||n;const r=e.length;if(0===r)return 0;if(r>t)throw new TypeError("Script number overflow");if(n&&0==(127&e[r-1])&&(r<=1||0==(128&e[r-2])))throw new Error("Non-minimally encoded script number");if(5===r){const t=e.readUInt32LE(0),n=e.readUInt8(4);return 128&n?-(4294967296*(-129&n)+t):4294967296*n+t}let i=0;for(var o=0;o<r;++o)i|=e[o]<<8*o;return 128&e[r-1]?-(i&~(128<<8*(r-1))):i}function o(e){return e>2147483647?5:e>8388607?4:e>32767?3:e>127?2:e>0?1:0}function s(e){let t=Math.abs(e);const n=o(t),i=r.allocUnsafe(n),s=e<0;for(var a=0;a<n;++a)i.writeUInt8(255&t,a),t>>=8;return 128&i[n-1]?i.writeUInt8(s?128:0,n-1):s&&(i[n-1]|=128),i}e.exports={decode:i,encode:s}},function(e,t,n){"use strict";var r=n(4).Buffer,i=9007199254740991;function o(e){if(e<0||e>i||e%1!=0)throw new RangeError("value out of range")}function s(e,t,n){if(o(e),t||(t=r.allocUnsafe(u(e))),!r.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");return n||(n=0),e<253?(t.writeUInt8(e,n),s.bytes=1):e<=65535?(t.writeUInt8(253,n),t.writeUInt16LE(e,n+1),s.bytes=3):e<=4294967295?(t.writeUInt8(254,n),t.writeUInt32LE(e,n+1),s.bytes=5):(t.writeUInt8(255,n),t.writeUInt32LE(e>>>0,n+1),t.writeUInt32LE(e/4294967296|0,n+5),s.bytes=9),t}function a(e,t){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");t||(t=0);var n=e.readUInt8(t);if(n<253)return a.bytes=1,n;if(253===n)return a.bytes=3,e.readUInt16LE(t+1);if(254===n)return a.bytes=5,e.readUInt32LE(t+1);a.bytes=9;var i=e.readUInt32LE(t+1),s=e.readUInt32LE(t+5),u=4294967296*s+i;return o(u),u}function u(e){return o(e),e<253?1:e<=65535?3:e<=4294967295?5:9}e.exports={encode:s,decode:a,encodingLength:u}},function(e,t,n){const r=n(124),i=n(148),o=n(45),s=n(93),a=n(582),u=n(83),l=o.maybe(o.compile({compressed:s.maybe(s.Boolean),network:s.maybe(s.Network)}));function c(e,t,n){n=n||{},this.compressed=void 0===n.compressed||n.compressed,this.network=n.network||u.bitcoin,this.__d=e||null,this.__Q=null,t&&(this.__Q=r.pointCompress(t,this.compressed))}function f(e,t){if(o(s.Buffer256bit,e),!r.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return o(l,t),new c(e,null,t)}function h(e,t){return o(r.isPoint,e),o(l,t),new c(null,e,t)}function p(e,t){const n=a.decode(e),r=n.version;if(s.Array(t)){if(t=t.filter(function(e){return r===e.wif}).pop(),!t)throw new Error("Unknown network version")}else if(t=t||u.bitcoin,r!==t.wif)throw new Error("Invalid network version");return f(n.privateKey,{compressed:n.compressed,network:t})}function d(e){o(l,e),e=e||{};const t=e.rng||i;let n;do{n=t(32),o(s.Buffer256bit,n)}while(!r.isPrivate(n));return f(n,e)}Object.defineProperty(c.prototype,"privateKey",{enumerable:!1,get:function(){return this.__d}}),Object.defineProperty(c.prototype,"publicKey",{get:function(){return this.__Q||(this.__Q=r.pointFromScalar(this.__d,this.compressed)),this.__Q}}),c.prototype.toWIF=function(){if(!this.__d)throw new Error("Missing private key");return a.encode(this.network.wif,this.__d,this.compressed)},c.prototype.sign=function(e){if(!this.__d)throw new Error("Missing private key");return r.sign(e,this.__d)},c.prototype.verify=function(e,t){return r.verify(e,this.publicKey,t)},e.exports={makeRandom:d,fromPrivateKey:f,fromPublicKey:h,fromWIF:p}},function(e,t,n){(function(t){var r=n(191);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function o(e,n,r){var i=new t(r?34:33);return i.writeUInt8(e,0),n.copy(i,1),r&&(i[33]=1),i}function s(e,t){return i(r.decode(e),t)}function a(e,t,n){return"number"==typeof e?r.encode(o(e,t,n)):r.encode(o(e.version,e.privateKey,e.compressed))}e.exports={decode:s,decodeRaw:i,encode:a,encodeRaw:o}}).call(this,n(0).Buffer)},function(e,t,n){const r=n(4).Buffer,i=n(350),o=n(191),s=n(29),a=n(83),u=n(45),l=n(93),c=n(351);function f(e){const t=o.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");const n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}function h(e){const t=i.decode(e),n=i.fromWords(t.words.slice(1));return{version:t.words[0],prefix:t.prefix,data:r.from(n)}}function p(e,t){u(l.tuple(l.Hash160bit,l.UInt8),arguments);const n=r.allocUnsafe(21);return n.writeUInt8(t,0),e.copy(n,1),o.encode(n)}function d(e,t,n){const r=i.toWords(e);return r.unshift(t),i.encode(n,r)}function m(e,t){t=t||a.bitcoin;try{return c.p2pkh({output:e,network:t}).address}catch(e){}try{return c.p2sh({output:e,network:t}).address}catch(e){}try{return c.p2wpkh({output:e,network:t}).address}catch(e){}try{return c.p2wsh({output:e,network:t}).address}catch(e){}throw new Error(s.toASM(e)+" has no matching Address")}function g(e,t){let n;t=t||a.bitcoin;try{n=f(e)}catch(e){}if(n){if(n.version===t.pubKeyHash)return c.p2pkh({hash:n.hash}).output;if(n.version===t.scriptHash)return c.p2sh({hash:n.hash}).output}else{try{n=h(e)}catch(e){}if(n){if(n.prefix!==t.bech32)throw new Error(e+" has an invalid prefix");if(0===n.version){if(20===n.data.length)return c.p2wpkh({hash:n.data}).output;if(32===n.data.length)return c.p2wsh({hash:n.data}).output}}}throw new Error(e+" has no matching Script")}e.exports={fromBase58Check:f,fromBech32:h,fromOutputScript:m,toBase58Check:p,toBech32:d,toOutputScript:g}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.compile(e);return 22===t.length&&t[0]===i.OP_0&&20===t[1]}o.toJSON=function(){return"Witness pubKeyHash output"},e.exports={check:o}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.compile(e);return 34===t.length&&t[0]===i.OP_0&&32===t[1]}o.toJSON=function(){return"Witness scriptHash output"},e.exports={check:o}},function(e,t,n){"use strict";(function(t){const r=n(1387),i=n(193),o=n(194),s=n(1398);function a(e,n,r){const o=[];o.push({path:"storage",value:{"/":i("eth-storage-trie",e.stateRoot).toBaseEncodedString()}}),s.equals(e.codeHash)?o.push({path:"code",value:t.from("")}):o.push({path:"code",value:{"/":i("raw",e.codeHash).toBaseEncodedString()}}),o.push({path:"stateRoot",value:e.stateRoot}),o.push({path:"codeHash",value:e.codeHash}),o.push({path:"nonce",value:e.nonce}),o.push({path:"balance",value:e.balance}),o.push({path:"isEmpty",value:e.isEmpty()}),o.push({path:"isContract",value:e.isContract()}),r(null,o)}e.exports=o("eth-account-snapshot",r,a)}).call(this,n(0).Buffer)},function(e,t){e.exports=function e(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(e,t){function n(e){return function t(n,r,i){e(n,r,(e,t)=>e?i(e):t.remainderPath.length>0?i(new Error("path out of scope")):void("object"==typeof t.value&&t.value["/"]?i(null,t.value):i(null,!1)))}}e.exports=n},function(e,t,n){const r=n(590),i=n(217);function o(e,t){return{deserialize:i(e=>new t(e)),serialize:i(e=>e.serialize()),cid:i((t,n)=>r(e,t,n))}}e.exports=o},function(e,t,n){"use strict";const r=n(193);function i(e,t,n){const i=t.hash(),o=r(e,i,n);return o}e.exports=i},function(e,t,n){"use strict";const r=n(592),i=n(193),o=n(194);function s(e,t,n){const r=[];r.push({path:"parent",value:{"/":i("eth-block",e.parentHash).toBaseEncodedString()}}),r.push({path:"ommers",value:{"/":i("eth-block-list",e.uncleHash).toBaseEncodedString()}}),r.push({path:"transactions",value:{"/":i("eth-tx-trie",e.transactionsTrie).toBaseEncodedString()}}),r.push({path:"transactionReceipts",value:{"/":i("eth-tx-receipt-trie",e.receiptTrie).toBaseEncodedString()}}),r.push({path:"state",value:{"/":i("eth-state-trie",e.stateRoot).toBaseEncodedString()}}),r.push({path:"parentHash",value:e.parentHash}),r.push({path:"ommerHash",value:e.uncleHash}),r.push({path:"transactionTrieRoot",value:e.transactionsTrie}),r.push({path:"transactionReceiptTrieRoot",value:e.receiptTrie}),r.push({path:"stateRoot",value:e.stateRoot}),r.push({path:"authorAddress",value:e.coinbase}),r.push({path:"bloom",value:e.bloom}),r.push({path:"difficulty",value:e.difficulty}),r.push({path:"number",value:e.number}),r.push({path:"gasLimit",value:e.gasLimit}),r.push({path:"gasUsed",value:e.gasUsed}),r.push({path:"timestamp",value:e.timestamp}),r.push({path:"extraData",value:e.extraData}),r.push({path:"mixHash",value:e.mixHash}),r.push({path:"nonce",value:e.nonce}),n(null,r)}e.exports=o("eth-block",r,s)},function(e,t,n){(function(t){const r=n(1399).default,i=n(269),o=i.BN;var s=e.exports=function(e,n){if(n=n||{},n.common){if(n.chain)throw new Error("Instantiation with both opts.common and opts.chain parameter not allowed!");this._common=n.common}else{let e=n.chain?n.chain:"mainnet",t=n.hardfork?n.hardfork:null;this._common=new r(e,t)}var o=[{name:"parentHash",length:32,default:i.zeros(32)},{name:"uncleHash",default:i.SHA3_RLP_ARRAY},{name:"coinbase",length:20,default:i.zeros(20)},{name:"stateRoot",length:32,default:i.zeros(32)},{name:"transactionsTrie",length:32,default:i.SHA3_RLP},{name:"receiptTrie",length:32,default:i.SHA3_RLP},{name:"bloom",default:i.zeros(256)},{name:"difficulty",default:t.from([])},{name:"number",default:i.intToBuffer(115e4)},{name:"gasLimit",default:t.from("ffffffffffffff","hex")},{name:"gasUsed",empty:!0,default:t.from([])},{name:"timestamp",default:t.from([])},{name:"extraData",allowZero:!0,empty:!0,default:t.from([])},{name:"mixHash",default:i.zeros(32)},{name:"nonce",default:i.zeros(8)}];i.defineProperties(this,o,e)};s.prototype.canonicalDifficulty=function(e){const t=this._common.hardfork()||this._common.activeHardfork(i.bufferToInt(this.number)),n=new o(this.timestamp),r=new o(e.header.timestamp),s=new o(e.header.difficulty),a=new o(this._common.param("pow","minimumDifficulty",t));var u=s.div(new o(this._common.param("pow","difficultyBoundDivisor",t))),l=new o(this.number),c,f,h;if(this._common.hardforkGteHardfork(t,"byzantium")){var p=e.header.uncleHash.equals(i.SHA3_RLP_ARRAY)?1:2;c=n.sub(r).idivn(9).ineg().iaddn(p),f=new o(-99),1===f.cmp(c)&&(c=f),h=s.add(u.mul(c))}this._common.hardforkGteHardfork(t,"constantinople")?(l.isubn(5e6),l.ltn(0)&&(l=new o(0))):this._common.hardforkGteHardfork(t,"byzantium")?(l.isubn(3e6),l.ltn(0)&&(l=new o(0))):this._common.hardforkGteHardfork(t,"homestead")?(c=n.sub(r).idivn(10).ineg().iaddn(1),f=new o(-99),1===f.cmp(c)&&(c=f),h=s.add(u.mul(c))):h=1===r.addn(this._common.param("pow","durationLimit",t)).cmp(n)?u.add(s):s.sub(u);var d=l.idivn(1e5).isubn(2);return d.isNeg()||h.iadd(new o(2).pow(d)),-1===h.cmp(a)&&(h=a),h},s.prototype.validateDifficulty=function(e){const t=this.canonicalDifficulty(e);return 0===t.cmp(new o(this.difficulty))},s.prototype.validateGasLimit=function(e){const t=new o(e.header.gasLimit),n=new o(this.gasLimit),r=this._common.hardfork()?this._common.hardfork():this._common.activeHardfork(this.number),i=t.div(new o(this._common.param("gasConfig","gasLimitBoundDivisor",r))),s=t.add(i),a=t.sub(i);return n.lt(s)&&n.gt(a)&&n.gte(this._common.param("gasConfig","minGasLimit",r))},s.prototype.validate=function(e,t,n){var r=this;if(2===arguments.length&&(n=t,t=!1),this.isGenesis())return n();e.getBlock(r.parentHash,function(e,s){if(e)return n("could not find parent block");r.parentBlock=s;var a=new o(r.number);if(0!==a.cmp(new o(s.header.number).iaddn(1)))return n("invalid number");if(t){var u=t.sub(new o(s.header.number));if(-1!==u.cmpn(8)||1!==u.cmpn(1))return n("uncle block has a parent that is too old or to young")}if(!r.validateDifficulty(s))return n("invalid Difficulty");if(!r.validateGasLimit(s))return n("invalid gas limit");if(i.bufferToInt(s.header.number)+1!==i.bufferToInt(r.number))return n("invalid heigth");if(i.bufferToInt(r.timestamp)<=i.bufferToInt(s.header.timestamp))return n("invalid timestamp");const l=r._common.hardfork()?r._common.hardfork():r._common.activeHardfork(t);if(r.extraData.length>r._common.param("vm","maxExtraDataSize",l))return n("invalid amount of extra data");n()})},s.prototype.hash=function(){return i.rlphash(this.raw)},s.prototype.isGenesis=function(){return""===this.number.toString("hex")},s.prototype.setGenesisParams=function(){this.timestamp=this._common.genesis().timestamp,this.gasLimit=this._common.genesis().gasLimit,this.difficulty=this._common.genesis().difficulty,this.extraData=this._common.genesis().extraData,this.nonce=this._common.genesis().nonce,this.stateRoot=this._common.genesis().stateRoot,this.number=t.from([])}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(1421),i=n(194);function o(e,t,n){const r=[];r.push({path:"nonce",value:e.nonce}),r.push({path:"gasPrice",value:e.gasPrice}),r.push({path:"gasLimit",value:e.gasLimit}),r.push({path:"toAddress",value:e.to}),r.push({path:"value",value:e.value}),r.push({path:"data",value:e.data}),r.push({path:"v",value:e.v}),r.push({path:"r",value:e.r}),r.push({path:"s",value:e.s}),r.push({path:"fromAddress",value:e.from}),r.push({path:"signature",value:[e.v,e.r,e.s]}),r.push({path:"isContractPublish",value:e.toCreationAddress()}),n(null,r)}e.exports=i("eth-tx",r,o)},function(e,t,n){"use strict";(function(r){const i=n(14),o=n(11),s=n(58),a=n(9),u=n(595),l=n(270),c=n(1427),f=n(1428),h=n(1429);t=e.exports,t.serialize=((e,t)=>{if(null!==e)if(r.isBuffer(e))"blob"===e.slice(0,4).toString()?i(()=>t(null,e)):i(()=>t(new Error("unexpected dagNode passed to serialize"),null));else switch(e.gitType){case"commit":c.serialize(e,t);break;case"tag":f.serialize(e,t);break;default:h.serialize(e,t)}else i(()=>t(new Error("dagNode passed to serialize was null"),null))}),t.deserialize=((e,t)=>{let n=l.find(e,0),r=e.slice(0,n).toString(),o=r.match(/([^ ]+) (\d+)/);if(o)switch(o[1]){case"blob":t(null,e);break;case"commit":c.deserialize(e.slice(n+1),t);break;case"tag":f.deserialize(e.slice(n+1),t);break;case"tree":h.deserialize(e.slice(n+1),t);break;default:i(()=>t(new Error("unknown object type "+o[1]),null))}else i(()=>t(new Error("invalid object header"),null))}),t.cid=((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};const i=n.hashAlg||u.defaultHashAlg,l=void 0===n.version?1:n.version;o([n=>t.serialize(e,n),(e,t)=>s(e,i,t),(e,t)=>t(null,new a(l,u.multicodec,e))],r)})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(594),o=n(454);t=e.exports,t.multicodec="git-raw",t.defaultHashAlg="sha1";const s=["original","name","email","date"];t.resolve=((e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),i.deserialize(e,(e,i)=>{if(e)return n(e);if(!t||"/"===t)return n(null,{value:i,remainderPath:""});if(r.isBuffer(i))return n(null,{value:i,remainderPath:t});const s=t.split("/"),a=o(i).get(s);if(a)return n(null,{value:a,remainderPath:""});let u,l=s.length;for(let e=0;e<l;e++){const e=s.shift();if(Array.isArray(i)&&(u=i[Number(e)]),!i[e])return u?(s.unshift(e),n(null,{value:u,remainderPath:s.join("/")})):n(new Error("path not available at root"));u=i[e],i=u}})}),t.tree=((e,t,n)=>{"function"==typeof t&&(n=t,t=void 0),t=t||{},i.deserialize(e,(e,t)=>{if(e)return n(e);if(r.isBuffer(t))return n(null,[]);let i=[];switch(t.gitType){case"commit":i=["message","tree"],i=i.concat(s.map(e=>"author/"+e)),i=i.concat(s.map(e=>"committer/"+e)),i=i.concat(t.parents.map((e,t)=>"parents/"+t)),t.encoding&&i.push("encoding");break;case"tag":i=["object","type","tag","message"],t.tagger&&(i=i.concat(s.map(e=>"tagger/"+e)));break;default:Object.keys(t).forEach(e=>{i.push(e),i.push(e+"/hash"),i.push(e+"/mode")})}n(null,i)})}),t.isLink=((e,n,r)=>{t.resolve(e,n,(e,t)=>e?r(e):t.remainderPath.length>0?r(new Error("path out of scope")):void("object"==typeof t.value&&t.value["/"]?r(null,t.value):r(null,!1)))})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(1431).BlockHeader,i=n(9),o=n(35),s=n(58),a=n(11),u=1487,l=(e,t)=>{let n=null,r;try{r=e.toBuffer()}catch(e){n=e}finally{t(n,r)}},c=(e,t)=>{if(1487!==e.length){const e=new Error("Zcash block header needs to be 1487 bytes");return t(e)}const n=r.fromBuffer(e);t(null,n)},f=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t=t||{};const o=t.hashAlg||n(356).defaultHashAlg,u=void 0===t.version?1:t.version;a([t=>{try{s(e.toBuffer(),o,t)}catch(e){t(e)}},(e,t)=>t(null,new i(u,"zcash-block",e))],r)},h=e=>{const t=n(356).defaultHashAlg,r=o.encode(e,t),s=1,a=new i(1,"zcash-block",r);return a};e.exports={hashToCid:h,ZCASH_BLOCK_HEADER_SIZE:1487,cid:f,deserialize:c,serialize:l}},function(e,t,n){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(null!==e&&"object"==typeof e&&Array.isArray(e.words))return e;this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(n=t,t=10),null!==e&&this._init(e||0,t||10,n||"be")}function o(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function s(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.prototype._init=function e(t,r,i){if("number"==typeof t)return t<0&&(this.sign=!0,t=-t),void(t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3));if("object"==typeof t)return this._initArray(t,r,i);"hex"===r&&(r=16),n(r===(0|r)&&r>=2&&r<=36),t=t.toString().replace(/\s+/g,"");var o=0;"-"===t[0]&&o++,16===r?this._parseHex(t,o):this._parseBase(t,r,o),"-"===t[0]&&(this.sign=!0),this.strip()},i.prototype._initArray=function e(t,r,i){if(n("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 o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===i)for(var o=t.length-1,a=0;o>=0;o-=3){var u=t[o]|t[o-1]<<8|t[o-2]<<16;this.words[a]|=u<<s&67108863,this.words[a+1]=u>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++)}else if("le"===i)for(var o=0,a=0;o<t.length;o+=3){var u=t[o]|t[o+1]<<8|t[o+2]<<16;this.words[a]|=u<<s&67108863,this.words[a+1]=u>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++)}return this.strip()},i.prototype._parseHex=function e(t,n){this.length=Math.ceil((t.length-n)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var i=0,r=t.length-6,s=0;r>=n;r-=6){var a=o(t,r,r+6);this.words[s]|=a<<i&67108863,this.words[s+1]|=a>>>26-i&4194303,i+=24,i>=26&&(i-=26,s++)}if(r+6!==n){var a=o(t,n,r+6);this.words[s]|=a<<i&67108863,this.words[s+1]|=a>>>26-i&4194303}this.strip()},i.prototype._parseBase=function e(t,n,r){this.words=[0],this.length=1;for(var i=0,o=1;o<=67108863;o*=n)i++;i--,o=o/n|0;for(var a=t.length-r,u=a%i,l=Math.min(a,a-u)+r,c=0,f=r;f<l;f+=i)c=s(t,f,f+i,n),this.imuln(o),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==u){for(var h=1,c=s(t,f,t.length,n),f=0;f<u;f++)h*=n;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},i.prototype.copy=function e(t){t.words=new Array(this.length);for(var n=0;n<this.length;n++)t.words[n]=this.words[n];t.length=this.length,t.sign=this.sign,t.red=this.red},i.prototype.clone=function e(){var t=new i(null);return this.copy(t),t},i.prototype.strip=function e(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function e(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function e(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var a=["","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"],u=[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],l=[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];i.prototype.toString=function e(t,r){if(t=t||10,16===t||"hex"===t){for(var i="",o=0,r=0|r||1,s=0,c=0;c<this.length;c++){var f=this.words[c],h=(16777215&(f<<o|s)).toString(16);s=f>>>24-o&16777215,i=0!==s||c!==this.length-1?a[6-h.length]+h+i:h+i,o+=2,o>=26&&(o-=26,c--)}for(0!==s&&(i=s.toString(16)+i);i.length%r!=0;)i="0"+i;return this.sign&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var p=u[t],d=l[t],i="",m=this.clone();for(m.sign=!1;0!==m.cmpn(0);){var g=m.modn(d).toString(t);m=m.idivn(d),i=0!==m.cmpn(0)?a[p-g.length]+g+i:g+i}return 0===this.cmpn(0)&&(i="0"+i),this.sign&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function e(){return this.toString(16)},i.prototype.toArray=function e(){this.strip();var t=new Array(this.byteLength());t[0]=0;for(var n=this.clone(),r=0;0!==n.cmpn(0);r++){var i=n.andln(255);n.ishrn(8),t[t.length-r-1]=i}return t},Math.clz32?i.prototype._countBits=function e(t){return 32-Math.clz32(t)}:i.prototype._countBits=function e(t){var n=t,r=0;return n>=4096&&(r+=13,n>>>=13),n>=64&&(r+=7,n>>>=7),n>=8&&(r+=4,n>>>=4),n>=2&&(r+=2,n>>>=2),r+n},i.prototype._zeroBits=function e(t){if(0===t)return 26;var n=t,r=0;return 0==(8191&n)&&(r+=13,n>>>=13),0==(127&n)&&(r+=7,n>>>=7),0==(15&n)&&(r+=4,n>>>=4),0==(3&n)&&(r+=2,n>>>=2),0==(1&n)&&r++,r},i.prototype.bitLength=function e(){var t=0,n=this.words[this.length-1],t=this._countBits(n);return 26*(this.length-1)+t},i.prototype.zeroBits=function e(){if(0===this.cmpn(0))return 0;for(var t=0,n=0;n<this.length;n++){var r=this._zeroBits(this.words[n]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function e(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function e(){if(0===this.cmpn(0))return this.clone();var t=this.clone();return t.sign=!this.sign,t},i.prototype.ior=function e(t){for(this.sign=this.sign||t.sign;this.length<t.length;)this.words[this.length++]=0;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]|t.words[n];return this.strip()},i.prototype.or=function e(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.iand=function e(t){var n;this.sign=this.sign&&t.sign,n=this.length>t.length?t:this;for(var r=0;r<n.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=n.length,this.strip()},i.prototype.and=function e(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.ixor=function e(t){var n,r;this.sign=this.sign||t.sign,this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=n.words[i]^r.words[i];if(this!==n)for(;i<n.length;i++)this.words[i]=n.words[i];return this.length=n.length,this.strip()},i.prototype.xor=function e(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.setn=function e(t,r){n("number"==typeof t&&t>=0);for(var i=t/26|0,o=t%26;this.length<=i;)this.words[this.length++]=0;return this.words[i]=r?this.words[i]|1<<o:this.words[i]&~(1<<o),this.strip()},i.prototype.iadd=function e(t){if(this.sign&&!t.sign){this.sign=!1;var n=this.isub(t);return this.sign=!this.sign,this._normSign()}if(!this.sign&&t.sign){t.sign=!1;var n=this.isub(t);return t.sign=!0,n._normSign()}var r,i;this.length>t.length?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s<i.length;s++){var n=r.words[s]+i.words[s]+o;this.words[s]=67108863&n,o=n>>>26}for(;0!==o&&s<r.length;s++){var n=r.words[s]+o;this.words[s]=67108863&n,o=n>>>26}if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},i.prototype.add=function e(t){if(t.sign&&!this.sign){t.sign=!1;var n=this.sub(t);return t.sign=!0,n}if(!t.sign&&this.sign){this.sign=!1;var n=t.sub(this);return this.sign=!0,n}return this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function e(t){if(t.sign){t.sign=!1;var n=this.iadd(t);return t.sign=!0,n._normSign()}if(this.sign)return this.sign=!1,this.iadd(t),this.sign=!0,this._normSign();var r=this.cmp(t),i,o;if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;r>0?(i=this,o=t):(i=t,o=this);for(var s=0,a=0;a<o.length;a++){var n=i.words[a]-o.words[a]+s;s=n>>26,this.words[a]=67108863&n}for(;0!==s&&a<i.length;a++){var n=i.words[a]+s;s=n>>26,this.words[a]=67108863&n}if(0===s&&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.sign=!0),this.strip()},i.prototype.sub=function e(t){return this.clone().isub(t)},i.prototype._smallMulTo=function e(t,n){n.sign=t.sign!==this.sign,n.length=this.length+t.length;for(var r=0,i=0;i<n.length-1;i++){for(var o=r>>>26,s=67108863&r,a=Math.min(i,t.length-1),u=Math.max(0,i-this.length+1);u<=a;u++){var l=i-u,c=0|this.words[l],f=0|t.words[u],h=c*f,p=67108863&h;o=o+(h/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0}n.words[i]=s,r=o}return 0!==r?n.words[i]=r:n.length--,n.strip()},i.prototype._bigMulTo=function e(t,n){n.sign=t.sign!==this.sign,n.length=this.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-this.length+1);l<=u;l++){var c=o-l,f=0|this.words[c],h=0|t.words[l],p=f*h,d=67108863&p;s=s+(p/67108864|0)|0,d=d+a|0,a=67108863&d,s=s+(d>>>26)|0,i+=s>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()},i.prototype.mulTo=function e(t,n){var r;return r=this.length+t.length<63?this._smallMulTo(t,n):this._bigMulTo(t,n),r},i.prototype.mul=function e(t){var n=new i(null);return n.words=new Array(this.length+t.length),this.mulTo(t,n)},i.prototype.imul=function e(t){if(0===this.cmpn(0)||0===t.cmpn(0))return this.words[0]=0,this.length=1,this;var n=this.length,r=t.length;this.sign=t.sign!==this.sign,this.length=this.length+t.length,this.words[this.length-1]=0;for(var i=this.length-2;i>=0;i--){for(var o=0,s=0,a=Math.min(i,r-1),u=Math.max(0,i-n+1);u<=a;u++){var l=i-u,c=this.words[l],f=t.words[u],h=c*f,p=67108863&h;o+=h/67108864|0,p+=s,s=67108863&p,o+=p>>>26}this.words[i]=s,this.words[i+1]+=o,o=0}for(var o=0,l=1;l<this.length;l++){var d=this.words[l]+o;this.words[l]=67108863&d,o=d>>>26}return this.strip()},i.prototype.imuln=function e(t){n("number"==typeof t);for(var r=0,i=0;i<this.length;i++){var o=this.words[i]*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this},i.prototype.sqr=function e(){return this.mul(this)},i.prototype.isqr=function e(){return this.mul(this)},i.prototype.ishln=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){for(var s=0,a=0;a<this.length;a++){var u=this.words[a]&o,l=this.words[a]-u<<r;this.words[a]=l|s,s=u>>>26-r}s&&(this.words[a]=s,this.length++)}if(0!==i){for(var a=this.length-1;a>=0;a--)this.words[a+i]=this.words[a];for(var a=0;a<i;a++)this.words[a]=0;this.length+=i}return this.strip()},i.prototype.ishrn=function e(t,r,i){var o;n("number"==typeof t&&t>=0),o=r?(r-r%26)/26:0;var s=t%26,a=Math.min((t-s)/26,this.length),u=67108863^67108863>>>s<<s,l=i;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a){this.length-=a;for(var c=0;c<this.length;c++)this.words[c]=this.words[c+a]}else this.words[0]=0,this.length=1;for(var f=0,c=this.length-1;c>=0&&(0!==f||c>=o);c--){var h=this.words[c];this.words[c]=f<<26-s|h>>>s,f=h&u}return l&&0!==f&&(l.words[l.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.shln=function e(t){return this.clone().ishln(t)},i.prototype.shrn=function e(t){return this.clone().ishrn(t)},i.prototype.testn=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,o=1<<r;if(this.length<=i)return!1;var s=this.words[i];return!!(s&o)},i.prototype.imaskn=function e(t){n("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26;if(n(!this.sign,"imaskn works only with positive numbers"),0!==r&&i++,this.length=Math.min(i,this.length),0!==r){var o=67108863^67108863>>>r<<r;this.words[this.length-1]&=o}return this.strip()},i.prototype.maskn=function e(t){return this.clone().imaskn(t)},i.prototype.iaddn=function e(t){return n("number"==typeof t),t<0?this.isubn(-t):this.sign?1===this.length&&this.words[0]<t?(this.words[0]=t-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(t),this.sign=!0,this):this._iaddn(t)},i.prototype._iaddn=function e(t){this.words[0]+=t;for(var n=0;n<this.length&&this.words[n]>=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},i.prototype.isubn=function e(t){if(n("number"==typeof t),t<0)return this.iaddn(-t);if(this.sign)return this.sign=!1,this.iaddn(t),this.sign=!0,this;this.words[0]-=t;for(var r=0;r<this.length&&this.words[r]<0;r++)this.words[r]+=67108864,this.words[r+1]-=1;return this.strip()},i.prototype.addn=function e(t){return this.clone().iaddn(t)},i.prototype.subn=function e(t){return this.clone().isubn(t)},i.prototype.iabs=function e(){return this.sign=!1,this},i.prototype.abs=function e(){return this.clone().iabs()},i.prototype._ishlnsubmul=function e(t,r,i){var o=t.length+i,s;if(this.words.length<o){for(var a=new Array(o),s=0;s<this.length;s++)a[s]=this.words[s];this.words=a}else s=this.length;for(this.length=Math.max(this.length,o);s<this.length;s++)this.words[s]=0;for(var u=0,s=0;s<t.length;s++){var l=this.words[s+i]+u,c=t.words[s]*r;l-=67108863&c,u=(l>>26)-(c/67108864|0),this.words[s+i]=67108863&l}for(;s<this.length-i;s++){var l=this.words[s+i]+u;u=l>>26,this.words[s+i]=67108863&l}if(0===u)return this.strip();n(-1===u),u=0;for(var s=0;s<this.length;s++){var l=-this.words[s]+u;u=l>>26,this.words[s]=67108863&l}return this.sign=!0,this.strip()},i.prototype._wordDiv=function e(t,n){var r=this.length-t.length,o=this.clone(),s=t,a=s.words[s.length-1],u=this._countBits(a);r=26-u,0!==r&&(s=s.shln(r),o.ishln(r),a=s.words[s.length-1]);var l=o.length-s.length,c;if("mod"!==n){c=new i(null),c.length=l+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=o.clone()._ishlnsubmul(s,1,l);h.sign||(o=h,c&&(c.words[l]=1));for(var p=l-1;p>=0;p--){var d=67108864*o.words[s.length+p]+o.words[s.length+p-1];for(d=Math.min(d/a|0,67108863),o._ishlnsubmul(s,d,p);o.sign;)d--,o.sign=!1,o._ishlnsubmul(s,1,p),0!==o.cmpn(0)&&(o.sign=!o.sign);c&&(c.words[p]=d)}return c&&c.strip(),o.strip(),"div"!==n&&0!==r&&o.ishrn(r),{div:c||null,mod:o}},i.prototype.divmod=function e(t,r){if(n(0!==t.cmpn(0)),this.sign&&!t.sign){var o=this.neg().divmod(t,r),s,a;return"mod"!==r&&(s=o.div.neg()),"div"!==r&&(a=0===o.mod.cmpn(0)?o.mod:t.sub(o.mod)),{div:s,mod:a}}if(!this.sign&&t.sign){var o=this.divmod(t.neg(),r),s;return"mod"!==r&&(s=o.div.neg()),{div:s,mod:o.mod}}return this.sign&&t.sign?this.neg().divmod(t.neg(),r):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,r)},i.prototype.div=function e(t){return this.divmod(t,"div").div},i.prototype.mod=function e(t){return this.divmod(t,"mod").mod},i.prototype.divRound=function e(t){var n=this.divmod(t);if(0===n.mod.cmpn(0))return n.div;var r=n.div.sign?n.mod.isub(t):n.mod,i=t.shrn(1),o=t.andln(1),s=r.cmp(i);return s<0||1===o&&0===s?n.div:n.div.sign?n.div.isubn(1):n.div.iaddn(1)},i.prototype.modn=function e(t){n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+this.words[o])%t;return i},i.prototype.idivn=function e(t){n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=this.words[i]+67108864*r;this.words[i]=o/t|0,r=o%t}return this.strip()},i.prototype.divn=function e(t){return this.clone().idivn(t)},i.prototype.egcd=function e(t){n(!t.sign),n(0!==t.cmpn(0));var r=this,o=t.clone();r=r.sign?r.mod(t):r.clone();for(var s=new i(1),a=new i(0),u=new i(0),l=new i(1),c=0;r.isEven()&&o.isEven();)r.ishrn(1),o.ishrn(1),++c;for(var f=o.clone(),h=r.clone();0!==r.cmpn(0);){for(;r.isEven();)r.ishrn(1),s.isEven()&&a.isEven()?(s.ishrn(1),a.ishrn(1)):(s.iadd(f).ishrn(1),a.isub(h).ishrn(1));for(;o.isEven();)o.ishrn(1),u.isEven()&&l.isEven()?(u.ishrn(1),l.ishrn(1)):(u.iadd(f).ishrn(1),l.isub(h).ishrn(1));r.cmp(o)>=0?(r.isub(o),s.isub(u),a.isub(l)):(o.isub(r),u.isub(s),l.isub(a))}return{a:u,b:l,gcd:o.ishln(c)}},i.prototype._invmp=function e(t){n(!t.sign),n(0!==t.cmpn(0));var r=this,o=t.clone();r=r.sign?r.mod(t):r.clone();for(var s=new i(1),a=new i(0),u=o.clone();r.cmpn(1)>0&&o.cmpn(1)>0;){for(;r.isEven();)r.ishrn(1),s.isEven()?s.ishrn(1):s.iadd(u).ishrn(1);for(;o.isEven();)o.ishrn(1),a.isEven()?a.ishrn(1):a.iadd(u).ishrn(1);r.cmp(o)>=0?(r.isub(o),s.isub(a)):(o.isub(r),a.isub(s))}return 0===r.cmpn(1)?s:a},i.prototype.gcd=function e(t){if(0===this.cmpn(0))return t.clone();if(0===t.cmpn(0))return this.clone();var n=this.clone(),r=t.clone();n.sign=!1,r.sign=!1;for(var i=0;n.isEven()&&r.isEven();i++)n.ishrn(1),r.ishrn(1);for(;;){for(;n.isEven();)n.ishrn(1);for(;r.isEven();)r.ishrn(1);var o=n.cmp(r);if(o<0){var s=n;n=r,r=s}else if(0===o||0===r.cmpn(1))break;n.isub(r)}return r.ishln(i)},i.prototype.invm=function e(t){return this.egcd(t).a.mod(t)},i.prototype.isEven=function e(){return 0==(1&this.words[0])},i.prototype.isOdd=function e(){return 1==(1&this.words[0])},i.prototype.andln=function e(t){return this.words[0]&t},i.prototype.bincn=function e(t){n("number"==typeof t);var r=t%26,i=(t-r)/26,o=1<<r;if(this.length<=i){for(var s=this.length;s<i+1;s++)this.words[s]=0;return this.words[i]|=o,this.length=i+1,this}for(var a=o,s=i;0!==a&&s<this.length;s++){var u=this.words[s];u+=a,a=u>>>26,u&=67108863,this.words[s]=u}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.cmpn=function e(t){var n=t<0,r;if(n&&(t=-t),this.sign&&!n)return-1;if(!this.sign&&n)return 1;if(t&=67108863,this.strip(),this.length>1)r=1;else{var i=this.words[0];r=i===t?0:i<t?-1:1}return this.sign&&(r=-r),r},i.prototype.cmp=function e(t){if(this.sign&&!t.sign)return-1;if(!this.sign&&t.sign)return 1;var n=this.ucmp(t);return this.sign?-n:n},i.prototype.ucmp=function e(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var n=0,r=this.length-1;r>=0;r--){var i=this.words[r],o=t.words[r];if(i!==o){i<o?n=-1:i>o&&(n=1);break}}return n},i.red=function e(t){return new g(t)},i.prototype.toRed=function e(t){return n(!this.red,"Already a number in reduction context"),n(!this.sign,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function e(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function e(t){return this.red=t,this},i.prototype.forceRed=function e(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function e(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function e(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function e(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function e(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function e(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function e(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function e(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function e(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function e(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function e(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function e(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function e(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function e(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var c={k256:null,p224:null,p192:null,p25519:null};function f(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).ishln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function d(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function y(e){g.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).ishln(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.sign=!0,this.minv=this.minv.mod(this.r)}f.prototype._tmp=function e(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function e(t){var n=t,r;do{this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),r=n.bitLength()}while(r>this.n);var i=r<this.n?-1:n.ucmp(this.p);return 0===i?(n.words[0]=0,n.length=1):i>0?n.isub(this.p):n.strip(),n},f.prototype.split=function e(t,n){t.ishrn(this.n,0,n)},f.prototype.imulK=function e(t){return t.imul(this.k)},r(h,f),h.prototype.split=function e(t,n){for(var r=4194303,i=Math.min(t.length,9),o=0;o<i;o++)n.words[o]=t.words[o];if(n.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];n.words[n.length++]=s&r;for(var o=10;o<t.length;o++){var a=t.words[o];t.words[o-10]=(a&r)<<4|s>>>22,s=a}t.words[o-10]=s>>>22,t.length-=9},h.prototype.imulK=function e(t){var n;t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var r=0,i=0;i<t.length;i++){var o=t.words[i];n=64*o,r+=977*o,n+=r/67108864|0,r&=67108863,t.words[i]=r,r=n}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(p,f),r(d,f),r(m,f),m.prototype.imulK=function e(t){for(var n=0,r=0;r<t.length;r++){var i=19*t.words[r]+n,o=67108863&i;i>>>=26,t.words[r]=o,n=i}return 0!==n&&(t.words[t.length++]=n),t},i._prime=function e(t){if(c[t])return c[t];var e;if("k256"===t)e=new h;else if("p224"===t)e=new p;else if("p192"===t)e=new d;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new m}return c[t]=e,e},g.prototype._verify1=function e(t){n(!t.sign,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function e(t,r){n(!t.sign&&!r.sign,"red works only with positives"),n(t.red&&t.red===r.red,"red works only with red numbers")},g.prototype.imod=function e(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.mod(this.m)._forceRed(this)},g.prototype.neg=function e(t){var n=t.clone();return n.sign=!n.sign,n.iadd(this.m)._forceRed(this)},g.prototype.add=function e(t,n){this._verify2(t,n);var r=t.add(n);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function e(t,n){this._verify2(t,n);var r=t.iadd(n);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function e(t,n){this._verify2(t,n);var r=t.sub(n);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function e(t,n){this._verify2(t,n);var r=t.isub(n);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function e(t,n){return this._verify1(t),this.imod(t.shln(n))},g.prototype.imul=function e(t,n){return this._verify2(t,n),this.imod(t.imul(n))},g.prototype.mul=function e(t,n){return this._verify2(t,n),this.imod(t.mul(n))},g.prototype.isqr=function e(t){return this.imul(t,t)},g.prototype.sqr=function e(t){return this.mul(t,t)},g.prototype.sqrt=function e(t){if(0===t.cmpn(0))return t.clone();var r=this.m.andln(3);if(n(r%2==1),3===r){var o=this.m.add(new i(1)).ishrn(2),s=this.pow(t,o);return s}for(var a=this.m.subn(1),u=0;0!==a.cmpn(0)&&0===a.andln(1);)u++,a.ishrn(1);n(0!==a.cmpn(0));var l=new i(1).toRed(this),c=l.redNeg(),f=this.m.subn(1).ishrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(c);)h.redIAdd(c);for(var p=this.pow(h,a),s=this.pow(t,a.addn(1).ishrn(1)),d=this.pow(t,a),m=u;0!==d.cmp(l);){for(var g=d,y=0;0!==g.cmp(l);y++)g=g.redSqr();n(y<m);var b=this.pow(p,new i(1).ishln(m-y-1));s=s.redMul(b),p=b.redSqr(),d=d.redMul(p),m=y}return s},g.prototype.invm=function e(t){var n=t._invmp(this.m);return n.sign?(n.sign=!1,this.imod(n).redNeg()):this.imod(n)},g.prototype.pow=function e(t,n){var r=[];if(0===n.cmpn(0))return new i(1);for(var o=n.clone();0!==o.cmpn(0);)r.push(o.andln(1)),o.ishrn(1);for(var s=t,a=0;a<r.length&&0===r[a];a++,s=this.sqr(s));if(++a<r.length)for(var o=this.sqr(s);a<r.length;a++,o=this.sqr(o))0!==r[a]&&(s=this.mul(s,o));return s},g.prototype.convertTo=function e(t){return t.clone()},g.prototype.convertFrom=function e(t){var n=t.clone();return n.red=null,n},i.mont=function e(t){return new y(t)},r(y,g),y.prototype.convertTo=function e(t){return this.imod(t.shln(this.shift))},y.prototype.convertFrom=function e(t){var n=this.imod(t.mul(this.rinv));return n.red=null,n},y.prototype.imul=function e(t,n){if(0===t.cmpn(0)||0===n.cmpn(0))return t.words[0]=0,t.length=1,t;var r=t.imul(n),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).ishrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},y.prototype.mul=function e(t,n){if(0===t.cmpn(0)||0===n.cmpn(0))return new i(0)._forceRed(this);var r=t.mul(n),o=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(o).ishrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},y.prototype.invm=function e(t){var n=this.imod(t._invmp(this.m).mul(this.r2));return n._forceRed(this)}}(e,this)}).call(this,n(75)(e))},function(e,t,n){"use strict";(function(t){var r=n(49),i=n(152),o=n(85),s=n(95),a=n(276),u=n(60),l=n(30),c=n(17),f=n(25),h=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};h.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this},h.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()},h.prototype.calci=function(){for(var e=0;e<4;e++){var t;this.sig.i=e;try{t=this.toPublicKey()}catch(e){console.error(e);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")},h.fromString=function(e){var t=JSON.parse(e);return new h(t)},h.prototype.randomK=function(){var e=i.getN(),t;do{t=r.fromBuffer(a.getRandomBuffer(32))}while(!t.lt(e)||!t.gt(r.Zero));return this.k=t,this},h.prototype.deterministicK=function(e){c.isUndefined(e)&&(e=0);var n=new t(32);n.fill(1);var o=new t(32);o.fill(0);var s=this.privkey.bn.toBuffer({size:32}),a="little"===this.endian?l.reverse(this.hashbuf):this.hashbuf;o=u.sha256hmac(t.concat([n,new t([0]),s,a]),o),n=u.sha256hmac(n,o),o=u.sha256hmac(t.concat([n,new t([1]),s,a]),o),n=u.sha256hmac(n,o),n=u.sha256hmac(n,o);for(var f=r.fromBuffer(n),h=i.getN(),p=0;p<e||!f.lt(h)||!f.gt(r.Zero);p++)o=u.sha256hmac(t.concat([n,new t([0])]),o),n=u.sha256hmac(n,o),n=u.sha256hmac(n,o),f=r.fromBuffer(n);return this.k=f,this},h.prototype.toPublicKey=function(){var e=this.sig.i;f.checkArgument(0===e||1===e||2===e||3===e,new Error("i must be equal to 0, 1, 2, or 3"));var t=r.fromBuffer(this.hashbuf),n=this.sig.r,o=this.sig.s,a=1&e,u=e>>1,l=i.getN(),c=i.getG(),h=u?n.add(l):n,p=i.fromX(a,h),d=p.mul(l);if(!d.isInfinity())throw new Error("nR is not a valid curve point");var m=t.neg().mod(l),g=n.invm(l),y=p.mul(o).add(c.mul(m)).mul(g),b=s.fromPoint(y,this.sig.compressed);return b},h.prototype.sigError=function(){if(!l.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s;if(!(e.gt(r.Zero)&&e.lt(i.getN())&&t.gt(r.Zero)&&t.lt(i.getN())))return"r and s not in range";var n=r.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),o=i.getN(),s=t.invm(o),a=s.mul(n).mod(o),u=s.mul(e).mod(o),c=i.getG().mulAdd(a,this.pubkey.point,u);return c.isInfinity()?"p is infinity":0!==c.getX().mod(o).cmp(e)&&"Invalid signature"},h.toLowS=function(e){return e.gt(r.fromBuffer(new t("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=i.getN().sub(e)),e},h.prototype._findSignature=function(e,t){var n=i.getN(),o=i.getG(),s=0,a,u,l,c;do{(!this.k||s>0)&&this.deterministicK(s),s++,a=this.k,u=o.mul(a),l=u.x.mod(n),c=a.invm(n).mul(t.add(e.mul(l))).mod(n)}while(l.cmp(r.Zero)<=0||c.cmp(r.Zero)<=0);return c=h.toLowS(c),{s:c,r:l}},h.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,n=t.bn;f.checkState(e&&t&&n,new Error("invalid parameters")),f.checkState(l.isBuffer(e)&&32===e.length,new Error("hashbuf must be a 32 byte buffer"));var i=r.fromBuffer(e,this.endian?{endian:this.endian}:void 0),s=this._findSignature(n,i);return s.compressed=this.pubkey.compressed,this.sig=new o(s),this},h.prototype.signRandomK=function(){return this.randomK(),this.sign()},h.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)},h.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},h.sign=function(e,t,n){return h().set({hashbuf:e,endian:n,privkey:t}).sign().sig},h.verify=function(e,t,n,r){return h().set({hashbuf:e,endian:r,sig:t,pubkey:n}).verify().verified},e.exports=h}).call(this,n(0).Buffer)},function(e,t){for(var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r={},i=0;i<n.length;i++)r[n.charAt(i)]=i;var o=58;function s(e){if(0===e.length)return"";var t,r,i=[0];for(t=0;t<e.length;t++){for(r=0;r<i.length;r++)i[r]<<=8;i[0]+=e[t];var s=0;for(r=0;r<i.length;++r)i[r]+=s,s=i[r]/o|0,i[r]%=o;for(;s;)i.push(s%o),s=s/o|0}for(t=0;0===e[t]&&t<e.length-1;t++)i.push(0);return i.reverse().map(function(e){return n[e]}).join("")}function a(e){if(0===e.length)return[];var t,n,i=[0];for(t=0;t<e.length;t++){var s=e[t];if(!(s in r))throw new Error("Non-base58 character");for(n=0;n<i.length;n++)i[n]*=o;i[0]+=r[s];var a=0;for(n=0;n<i.length;++n)i[n]+=a,a=i[n]>>8,i[n]&=255;for(;a;)i.push(255&a),a>>=8}for(t=0;"1"===e[t]&&t<e.length-1;t++)i.push(0);return i.reverse()}e.exports={encode:s,decode:a}},function(e,t,n){"use strict";(function(t){var r=n(129),i=n(109),o=n(80),s=n(60),a=n(358),u=n(95),l=n(85),c=n(128),f=n(25),h=n(17),p=n(84),d=n(0),m=n(30),g=n(41),y=function e(t){return this instanceof e?(this.chunks=[],m.isBuffer(t)?e.fromBuffer(t):t instanceof r?e.fromAddress(t):t instanceof e?e.fromBuffer(t.toBuffer()):"string"==typeof t?e.fromString(t):void(void 0!==t&&this.set(t))):new e(t)};y.prototype.set=function(e){return this.chunks=e.chunks||this.chunks,this},y.fromBuffer=function(e){var t=new y;t.chunks=[];for(var n=new i(e);!n.finished();)try{var r=n.readUInt8(),o,s;r>0&&r<a.OP_PUSHDATA1?(o=r,t.chunks.push({buf:n.read(o),len:o,opcodenum:r})):r===a.OP_PUSHDATA1?(o=n.readUInt8(),s=n.read(o),t.chunks.push({buf:s,len:o,opcodenum:r})):r===a.OP_PUSHDATA2?(o=n.readUInt16LE(),s=n.read(o),t.chunks.push({buf:s,len:o,opcodenum:r})):r===a.OP_PUSHDATA4?(o=n.readUInt32LE(),s=n.read(o),t.chunks.push({buf:s,len:o,opcodenum:r})):t.chunks.push({opcodenum:r})}catch(t){if(t instanceof RangeError)throw new p.Script.InvalidBuffer(e.toString("hex"));throw t}return t},y.prototype.toBuffer=function(){for(var e=new o,t=0;t<this.chunks.length;t++){var n=this.chunks[t],r=n.opcodenum;e.writeUInt8(n.opcodenum),n.buf&&(r<a.OP_PUSHDATA1?e.write(n.buf):r===a.OP_PUSHDATA1?(e.writeUInt8(n.len),e.write(n.buf)):r===a.OP_PUSHDATA2?(e.writeUInt16LE(n.len),e.write(n.buf)):r===a.OP_PUSHDATA4&&(e.writeUInt32LE(n.len),e.write(n.buf)))}return e.concat()},y.fromASM=function(e){var n=new y;n.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var o=r[i],s=a(o),u=s.toNumber();if(h.isUndefined(u)){var l=new t(r[i],"hex");n.chunks.push({buf:l,len:l.length,opcodenum:l.length}),i+=1}else u===a.OP_PUSHDATA1||u===a.OP_PUSHDATA2||u===a.OP_PUSHDATA4?(n.chunks.push({buf:new t(r[i+2],"hex"),len:parseInt(r[i+1]),opcodenum:u}),i+=3):(n.chunks.push({opcodenum:u}),i+=1)}return n},y.fromHex=function(e){return new y(new d.Buffer(e,"hex"))},y.fromString=function(e){if(g.isHexa(e)||0===e.length)return new y(new d.Buffer(e,"hex"));var n=new y;n.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var o=r[i],s=a(o),u=s.toNumber();if(h.isUndefined(u)){if(u=parseInt(o),!(u>0&&u<a.OP_PUSHDATA1))throw new Error("Invalid script: "+JSON.stringify(e));n.chunks.push({buf:new t(r[i+1].slice(2),"hex"),len:u,opcodenum:u}),i+=2}else if(u===a.OP_PUSHDATA1||u===a.OP_PUSHDATA2||u===a.OP_PUSHDATA4){if("0x"!==r[i+2].slice(0,2))throw new Error("Pushdata data must start with 0x");n.chunks.push({buf:new t(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:u}),i+=3}else n.chunks.push({opcodenum:u}),i+=1}return n},y.prototype._chunkToString=function(e,t){var n=e.opcodenum,r="asm"===t,i="";if(e.buf)n!==a.OP_PUSHDATA1&&n!==a.OP_PUSHDATA2&&n!==a.OP_PUSHDATA4||(i=i+" "+a(n).toString()),e.len>0&&(i=r?i+" "+e.buf.toString("hex"):i+" "+e.len+" 0x"+e.buf.toString("hex"));else if(void 0!==a.reverseMap[n])i=i+" "+a(n).toString();else{var o=n.toString(16);o.length%2!=0&&(o="0"+o),i=r?i+" "+o:i+" 0x"+o}return i},y.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var n=this.chunks[t];e+=this._chunkToString(n,"asm")}return e.substr(1)},y.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var n=this.chunks[t];e+=this._chunkToString(n)}return e.substr(1)},y.prototype.toHex=function(){return this.toBuffer().toString("hex")},y.prototype.inspect=function(){return"<Script: "+this.toString()+">"},y.prototype.isPublicKeyHashOut=function(){return!(5!==this.chunks.length||this.chunks[0].opcodenum!==a.OP_DUP||this.chunks[1].opcodenum!==a.OP_HASH160||!this.chunks[2].buf||20!==this.chunks[2].buf.length||this.chunks[3].opcodenum!==a.OP_EQUALVERIFY||this.chunks[4].opcodenum!==a.OP_CHECKSIG)},y.prototype.isPublicKeyHashIn=function(){if(2===this.chunks.length){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&48===e[0]&&t&&t.length){var n=t[0];if((4===n||6===n||7===n)&&65===t.length)return!0;if((3===n||2===n)&&33===t.length)return!0}}return!1},y.prototype.getPublicKey=function(){return f.checkState(this.isPublicKeyOut(),"Can't retreive PublicKey from a non-PK output"),this.chunks[0].buf},y.prototype.getPublicKeyHash=function(){return f.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf},y.prototype.isPublicKeyOut=function(){if(2===this.chunks.length&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===a.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],n=!1;if((4!==t&&6!==t&&7!==t||65!==e.length)&&(3!==t&&2!==t||33!==e.length)||(n=!0),n)return u.isValid(e)}return!1},y.prototype.isPublicKeyIn=function(){if(1===this.chunks.length){var e=this.chunks[0].buf;if(e&&e.length&&48===e[0])return!0}return!1},y.prototype.isScriptHashOut=function(){var e=this.toBuffer();return 23===e.length&&e[0]===a.OP_HASH160&&20===e[1]&&e[e.length-1]===a.OP_EQUAL},y.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf,n;if(!t)return!1;try{n=y.fromBuffer(t)}catch(e){if(e instanceof p.Script.InvalidBuffer)return!1;throw e}var r=n.classify();return r!==y.types.UNKNOWN},y.prototype.isMultisigOut=function(){return this.chunks.length>3&&a.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&m.isBuffer(e.buf)})&&a.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===a.OP_CHECKMULTISIG},y.prototype.isMultisigIn=function(){return this.chunks.length>=2&&0===this.chunks[0].opcodenum&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&m.isBuffer(e.buf)&&l.isTxDER(e.buf)})},y.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===a.OP_RETURN&&(1===this.chunks.length||2===this.chunks.length&&this.chunks[1].buf&&this.chunks[1].buf.length<=y.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)},y.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut())return h.isUndefined(this.chunks[1])?new t(0):new t(this.chunks[1].buf);if(this.isPublicKeyHashOut())return new t(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")},y.prototype.isPushOnly=function(){return h.every(this.chunks,function(e){return e.opcodenum<=a.OP_16})},y.types={},y.types.UNKNOWN="Unknown",y.types.PUBKEY_OUT="Pay to public key",y.types.PUBKEY_IN="Spend from public key",y.types.PUBKEYHASH_OUT="Pay to public key hash",y.types.PUBKEYHASH_IN="Spend from public key hash",y.types.SCRIPTHASH_OUT="Pay to script hash",y.types.SCRIPTHASH_IN="Spend from script hash",y.types.MULTISIG_OUT="Pay to multisig",y.types.MULTISIG_IN="Spend from multisig",y.types.DATA_OUT="Data push",y.OP_RETURN_STANDARD_SIZE=80,y.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=y.types.UNKNOWN?e:this.classifyInput()},y.outputIdentifiers={},y.outputIdentifiers.PUBKEY_OUT=y.prototype.isPublicKeyOut,y.outputIdentifiers.PUBKEYHASH_OUT=y.prototype.isPublicKeyHashOut,y.outputIdentifiers.MULTISIG_OUT=y.prototype.isMultisigOut,y.outputIdentifiers.SCRIPTHASH_OUT=y.prototype.isScriptHashOut,y.outputIdentifiers.DATA_OUT=y.prototype.isDataOut,y.prototype.classifyOutput=function(){for(var e in y.outputIdentifiers)if(y.outputIdentifiers[e].bind(this)())return y.types[e];return y.types.UNKNOWN},y.inputIdentifiers={},y.inputIdentifiers.PUBKEY_IN=y.prototype.isPublicKeyIn,y.inputIdentifiers.PUBKEYHASH_IN=y.prototype.isPublicKeyHashIn,y.inputIdentifiers.MULTISIG_IN=y.prototype.isMultisigIn,y.inputIdentifiers.SCRIPTHASH_IN=y.prototype.isScriptHashIn,y.prototype.classifyInput=function(){for(var e in y.inputIdentifiers)if(y.inputIdentifiers[e].bind(this)())return y.types[e];return y.types.UNKNOWN},y.prototype.isStandard=function(){return this.classify()!==y.types.UNKNOWN},y.prototype.prepend=function(e){return this._addByType(e,!0),this},y.prototype.equals=function(e){if(f.checkState(e instanceof y,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(m.isBuffer(this.chunks[t].buf)&&!m.isBuffer(e.chunks[t].buf))return!1;if(m.isBuffer(this.chunks[t].buf)&&!m.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0},y.prototype.add=function(e){return this._addByType(e,!1),this},y.prototype._addByType=function(e,t){if("string"==typeof e)this._addOpcode(e,t);else if("number"==typeof e)this._addOpcode(e,t);else if(e instanceof a)this._addOpcode(e,t);else if(m.isBuffer(e))this._addBuffer(e,t);else if(e instanceof y)this.chunks=this.chunks.concat(e.chunks);else{if("object"!=typeof e)throw new Error("Invalid script chunk");this._insertAtPosition(e,t)}},y.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)},y.prototype._addOpcode=function(e,t){var n;return n="number"==typeof e?e:e instanceof a?e.toNumber():a(e).toNumber(),this._insertAtPosition({opcodenum:n},t),this},y.prototype._addBuffer=function(e,t){var n,r=e.length;if(r>=0&&r<a.OP_PUSHDATA1)n=r;else if(r<Math.pow(2,8))n=a.OP_PUSHDATA1;else if(r<Math.pow(2,16))n=a.OP_PUSHDATA2;else{if(!(r<Math.pow(2,32)))throw new Error("You can't push that much data");n=a.OP_PUSHDATA4}return this._insertAtPosition({buf:e,len:r,opcodenum:n},t),this},y.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==a.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this},y.buildMultisigOut=function(e,t,n){f.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),n=n||{};var r=new y;r.add(a.smallInt(t)),e=h.map(e,u);var i=e;n.noSorting||(i=h.sortBy(e,function(e){return e.toString("hex")}));for(var o=0;o<i.length;o++){var s=i[o];r.add(s.toBuffer())}return r.add(a.smallInt(e.length)),r.add(a.OP_CHECKMULTISIG),r},y.buildMultisigIn=function(e,t,n,r){f.checkArgument(h.isArray(e)),f.checkArgument(h.isNumber(t)),f.checkArgument(h.isArray(n)),r=r||{};var i=new y;return i.add(a.OP_0),h.each(n,function(e){f.checkArgument(m.isBuffer(e),"Signatures must be an array of Buffers"),i.add(e)}),i},y.buildP2SHMultisigIn=function(e,t,n,r){f.checkArgument(h.isArray(e)),f.checkArgument(h.isNumber(t)),f.checkArgument(h.isArray(n)),r=r||{};var i=new y;return i.add(a.OP_0),h.each(n,function(e){f.checkArgument(m.isBuffer(e),"Signatures must be an array of Buffers"),i.add(e)}),i.add((r.cachedMultisig||y.buildMultisigOut(e,t,r)).toBuffer()),i},y.buildPublicKeyHashOut=function(e){f.checkArgument(!h.isUndefined(e)),f.checkArgument(e instanceof u||e instanceof r||h.isString(e)),e instanceof u?e=e.toAddress():h.isString(e)&&(e=new r(e));var t=new y;return t.add(a.OP_DUP).add(a.OP_HASH160).add(e.hashBuffer).add(a.OP_EQUALVERIFY).add(a.OP_CHECKSIG),t._network=e.network,t},y.buildPublicKeyOut=function(e){f.checkArgument(e instanceof u);var t=new y;return t.add(e.toBuffer()).add(a.OP_CHECKSIG),t},y.buildDataOut=function(e,n){f.checkArgument(h.isUndefined(e)||h.isString(e)||m.isBuffer(e)),h.isString(e)&&(e=new t(e,n));var r=new y;return r.add(a.OP_RETURN),h.isUndefined(e)||r.add(e),r},y.buildScriptHashOut=function(e){f.checkArgument(e instanceof y||e instanceof r&&e.isPayToScriptHash());var t=new y;return t.add(a.OP_HASH160).add(e instanceof r?e.hashBuffer:s.sha256ripemd160(e.toBuffer())).add(a.OP_EQUAL),t._network=e._network||e.network,t},y.buildPublicKeyIn=function(e,t){f.checkArgument(e instanceof l||m.isBuffer(e)),f.checkArgument(h.isUndefined(t)||h.isNumber(t)),e instanceof l&&(e=e.toBuffer());var n=new y;return n.add(m.concat([e,m.integerAsSingleByteBuffer(t||l.SIGHASH_ALL)])),n},y.buildPublicKeyHashIn=function(e,t,n){f.checkArgument(t instanceof l||m.isBuffer(t)),f.checkArgument(h.isUndefined(n)||h.isNumber(n)),t instanceof l&&(t=t.toBuffer());var r=(new y).add(m.concat([t,m.integerAsSingleByteBuffer(n||l.SIGHASH_ALL)])).add(new u(e).toBuffer());return r},y.empty=function(){return new y},y.prototype.toScriptHashOut=function(){return y.buildScriptHashOut(this)},y.fromAddress=function(e){if(e=r(e),e.isPayToScriptHash())return y.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return y.buildPublicKeyHashOut(e);throw new p.Script.UnrecognizedAddress(e)},y.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()},y.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=r.PayToScriptHash;else{if(!this.isPublicKeyHashOut())return!1;e.hashBuffer=this.getData(),e.type=r.PayToPublicKeyHash}return e},y.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=s.sha256ripemd160(this.chunks[1].buf),e.type=r.PayToPublicKeyHash;else{if(!this.isScriptHashIn())return!1;e.hashBuffer=s.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=r.PayToScriptHash}return e},y.prototype.toAddress=function(e){var t=this.getAddressInfo();return!!t&&(t.network=c.get(e)||this._network||c.defaultNetwork,new r(t))},y.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),n=t.toString("hex"),r=0;r<this.chunks.length;r++){var i=y({chunks:[this.chunks[r]]}),o=i.toBuffer(),s=o.toString("hex");n===s&&this.chunks.splice(r,1)}return this},y.prototype.checkMinimalPush=function(e){var t=this.chunks[e],n=t.buf,r=t.opcodenum;return!n||(0===n.length?r===a.OP_0:1===n.length&&n[0]>=1&&n[0]<=16?r===a.OP_1+(n[0]-1):1===n.length&&129===n[0]?r===a.OP_1NEGATE:n.length<=75?r===n.length:n.length<=255?r===a.OP_PUSHDATA1:!(n.length<=65535)||r===a.OP_PUSHDATA2)},y.prototype._decodeOP_N=function(e){if(e===a.OP_0)return 0;if(e>=a.OP_1&&e<=a.OP_16)return e-(a.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))},y.prototype.getSignatureOperationsCount=function(e){e=!!h.isUndefined(e)||e;var t=this,n=0,r=a.OP_INVALIDOPCODE;return h.each(t.chunks,function i(o){var s=o.opcodenum;s==a.OP_CHECKSIG||s==a.OP_CHECKSIGVERIFY?n++:s!=a.OP_CHECKMULTISIG&&s!=a.OP_CHECKMULTISIGVERIFY||(e&&r>=a.OP_1&&r<=a.OP_16?n+=t._decodeOP_N(r):n+=20),r=s}),n},e.exports=y}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(17),i=n(25),o=n(41),s=n(86),a=n(129),u=n(361);function l(e){if(!(this instanceof l))return new l(e);i.checkArgument(r.isObject(e),"Must provide an object from where to extract data");var t=e.address?new a(e.address):void 0,n=e.txid?e.txid:e.txId;if(!n||!o.isHexaString(n)||n.length>64)throw new Error("Invalid TXID in object",e);var c=r.isUndefined(e.vout)?e.outputIndex:e.vout;if(!r.isNumber(c))throw new Error("Invalid outputIndex, received "+c);i.checkArgument(!r.isUndefined(e.scriptPubKey)||!r.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var f=new s(e.scriptPubKey||e.script);i.checkArgument(!r.isUndefined(e.amount)||!r.isUndefined(e.satoshis),"Must provide an amount for the output");var h=r.isUndefined(e.amount)?e.satoshis:new u.fromBTC(e.amount).toSatoshis();i.checkArgument(r.isNumber(h),"Amount must be a number"),o.defineImmutable(this,{address:t,txId:n,outputIndex:c,script:f,satoshis:h})}l.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"},l.prototype.toString=function(){return this.txId+":"+this.outputIndex},l.fromObject=function(e){return new l(e)},l.prototype.toObject=l.prototype.toJSON=function e(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:u.fromSatoshis(this.satoshis).toBTC()}},e.exports=l},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(277),o=n(30),s=n(109),a=n(80),u=n(60),l=n(41),c=n(275),f=n(25);function h(e){if(!(this instanceof h))return new h(e);var t={};if(o.isBuffer(e))t=h._fromBufferReader(s(e));else{if(!r.isObject(e))throw new TypeError("Unrecognized argument for MerkleBlock");var n;n=e.header instanceof i?e.header:i.fromObject(e.header),t={header:n,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}return r.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}h.fromBuffer=function e(t){return h.fromBufferReader(s(t))},h.fromBufferReader=function e(t){return new h(h._fromBufferReader(t))},h.prototype.toBuffer=function e(){return this.toBufferWriter().concat()},h.prototype.toBufferWriter=function e(n){n||(n=new a),n.write(this.header.toBuffer()),n.writeUInt32LE(this.numTransactions),n.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)n.write(new t(this.hashes[r],"hex"));for(n.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)n.writeUInt8(this.flags[r]);return n},h.prototype.toObject=h.prototype.toJSON=function e(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}},h.prototype.validMerkleTree=function e(){if(f.checkState(r.isArray(this.flags),"MerkleBlock flags is not an array"),f.checkState(r.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)return!1;if(8*this.flags.length<this.hashes.length)return!1;var t=this._calcTreeHeight(),n={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,n);return n.hashesUsed===this.hashes.length&&o.equals(i,this.header.merkleRoot)},h.prototype._traverseMerkleTree=function e(n,r,i){if(i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0,i.flagBitsUsed>8*this.flags.length)return null;var o=this.flags[i.flagBitsUsed>>3]>>>(7&i.flagBitsUsed++)&1;if(0!==n&&o){var s=this._traverseMerkleTree(n-1,2*r,i),a=s;return 2*r+1<this._calcTreeWidth(n-1)&&(a=this._traverseMerkleTree(n-1,2*r+1,i)),u.sha256sha256(new t.concat([s,a]))}if(i.hashesUsed>=this.hashes.length)return null;var l=this.hashes[i.hashesUsed++];return 0===n&&o&&i.txs.push(l),new t(l,"hex")},h.prototype._calcTreeWidth=function e(t){return this.numTransactions+(1<<t)-1>>t},h.prototype._calcTreeHeight=function e(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t},h.prototype.hasTransaction=function e(n){f.checkArgument(!r.isUndefined(n),"tx cannot be undefined"),f.checkArgument(n instanceof c||"string"==typeof n,'Invalid tx given, tx must be a "string" or "Transaction"');var i=n;n instanceof c&&(i=o.reverse(new t(n.id,"hex")).toString("hex"));var s=[],a=this._calcTreeHeight();return this._traverseMerkleTree(a,0,{txs:s}),-1!==s.indexOf(i)},h._fromBufferReader=function e(t){f.checkState(!t.finished(),"No merkleblock data received");var n={};n.header=i.fromBufferReader(t),n.numTransactions=t.readUInt32LE();var r=t.readVarintNum();n.hashes=[];for(var o=0;o<r;o++)n.hashes.push(t.read(32).toString("hex"));var s=t.readVarintNum();for(n.flags=[],o=0;o<s;o++)n.flags.push(t.readUInt8());return n},h.fromObject=function e(t){return new h(t)},e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(18),i=n(0),o=n(17),s=n(25),a=n(49),u=n(274),l=n(195),c=n(60),f=n(128),h=n(362),p=n(152),d=n(273),m=n(276),g=n(84),y=g.HDPrivateKey,b=n(30),v=n(41),w=128,_=1/8,k=512;function S(e){if(e instanceof S)return e;if(!(this instanceof S))return new S(e);if(!e)return this._generateRandomly();if(f.get(e))return this._generateRandomly(e);if(o.isString(e)||b.isBuffer(e))if(S.isValidSerialized(e))this._buildFromSerialized(e);else if(v.isValidJSON(e))this._buildFromJSON(e);else{if(!b.isBuffer(e)||!S.isValidSerialized(e.toString()))throw S.getSerializedError(e);this._buildFromSerialized(e.toString())}else{if(!o.isObject(e))throw new y.UnrecognizedArgument(e);this._buildFromObject(e)}}S.isValidPath=function(e,t){if(o.isString(e)){var n=S._getDerivationIndexes(e);return null!==n&&o.all(n,S.isValidPath)}return!!o.isNumber(e)&&(e<S.Hardened&&!0===t&&(e+=S.Hardened),e>=0&&e<S.MaxIndex)},S._getDerivationIndexes=function(e){var t=e.split("/");if(o.contains(S.RootElementAlias,e))return[];if(!o.contains(S.RootElementAlias,t[0]))return null;var n=t.slice(1).map(function(e){var t="'"===e.slice(-1);if(t&&(e=e.slice(0,-1)),!e||"-"===e[0])return NaN;var n=+e;return t&&(n+=S.Hardened),n});return o.any(n,isNaN)?null:n},S.prototype.derive=function(e,t){if(o.isNumber(e))return this._deriveWithNumber(e,t);if(o.isString(e))return this._deriveFromString(e);throw new y.InvalidDerivationArgument(e)},S.prototype._deriveWithNumber=function(e,t){if(!S.isValidPath(e,t))throw new y.InvalidPath(e);t=e>=S.Hardened||t,e<S.Hardened&&!0===t&&(e+=S.Hardened);var n=h.get(this.xprivkey,e,t);if(n)return n;var r=b.integerAsBuffer(e),o;o=t?b.concat([new i.Buffer([0]),this.privateKey.toBuffer(),r]):b.concat([this.publicKey.toBuffer(),r]);var s=c.sha512hmac(o,this._buffers.chainCode),u=a.fromBuffer(s.slice(0,32),{size:32}),l=s.slice(32,64),f=u.add(this.privateKey.toBigNumber()).mod(p.getN()).toBuffer({size:32}),d=new S({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:l,privateKey:f});return h.set(this.xprivkey,e,t,d),d},S.prototype._deriveFromString=function(e){if(!S.isValidPath(e))throw new y.InvalidPath(e);var t=S._getDerivationIndexes(e),n=t.reduce(function(e,t){return e._deriveWithNumber(t)},this);return n},S.isValidSerialized=function(e,t){return!S.getSerializedError(e,t)},S.getSerializedError=function(e,t){if(!o.isString(e)&&!b.isBuffer(e))return new y.UnrecognizedArgument("Expected string or buffer");if(!u.validCharacters(e))return new g.InvalidB58Char("(unknown)",e);try{e=l.decode(e)}catch(t){return new g.InvalidB58Checksum(e)}if(e.length!==S.DataLength)return new y.InvalidLength(e);if(!o.isUndefined(t)){var n=S._validateNetwork(e,t);if(n)return n}return null},S._validateNetwork=function(e,t){var n=f.get(t);if(!n)return new g.InvalidNetworkArgument(t);var r=e.slice(0,4);return b.integerFromBuffer(r)!==n.xprivkey?new g.InvalidNetwork(r):null},S.fromString=function(e){return s.checkArgument(o.isString(e),"No valid string was provided"),new S(e)},S.fromObject=function(e){return s.checkArgument(o.isObject(e),"No valid argument was provided"),new S(e)},S.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))},S.prototype._buildFromObject=function(e){var t={version:e.network?b.integerAsBuffer(f.get(e.network).xprivkey):e.version,depth:o.isNumber(e.depth)?b.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:o.isNumber(e.parentFingerPrint)?b.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:o.isNumber(e.childIndex)?b.integerAsBuffer(e.childIndex):e.childIndex,chainCode:o.isString(e.chainCode)?b.hexToBuffer(e.chainCode):e.chainCode,privateKey:o.isString(e.privateKey)&&v.isHexa(e.privateKey)?b.hexToBuffer(e.privateKey):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:b.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)},S.prototype._buildFromSerialized=function(e){var t=l.decode(e),n={version:t.slice(S.VersionStart,S.VersionEnd),depth:t.slice(S.DepthStart,S.DepthEnd),parentFingerPrint:t.slice(S.ParentFingerPrintStart,S.ParentFingerPrintEnd),childIndex:t.slice(S.ChildIndexStart,S.ChildIndexEnd),chainCode:t.slice(S.ChainCodeStart,S.ChainCodeEnd),privateKey:t.slice(S.PrivateKeyStart,S.PrivateKeyEnd),checksum:t.slice(S.ChecksumStart,S.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(n)},S.prototype._generateRandomly=function(e){return S.fromSeed(m.getRandomBuffer(64),e)},S.fromSeed=function(e,n){if(v.isHexaString(e)&&(e=b.hexToBuffer(e)),!t.isBuffer(e))throw new y.InvalidEntropyArgument(e);if(e.length<16)throw new y.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>64)throw new y.InvalidEntropyArgument.TooMuchEntropy(e);var r=c.sha512hmac(e,new i.Buffer("Bitcoin seed"));return new S({network:f.get(n)||f.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})},S.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=n(604);this._hdPublicKey=new e(this)}},S.prototype._buildFromBuffers=function(e){S._validateBufferArguments(e),v.defineImmutable(this,{_buffers:e});var n=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,b.emptyBuffer(1),e.privateKey],r=i.Buffer.concat(n);if(e.checksum&&e.checksum.length){if(e.checksum.toString()!==l.checksum(r).toString())throw new g.InvalidB58Checksum(r)}else e.checksum=l.checksum(r);var o=f.get(b.integerFromBuffer(e.version)),s;s=l.encode(i.Buffer.concat(n)),e.xprivkey=new t(s);var u=new d(a.fromBuffer(e.privateKey),o),h=u.toPublicKey(),p=S.ParentFingerPrintSize,m=c.sha256ripemd160(h.toBuffer()).slice(0,p);return v.defineImmutable(this,{xprivkey:s,network:o,depth:b.integerFromSingleByteBuffer(e.depth),privateKey:u,publicKey:h,fingerPrint:m}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this},S._validateBufferArguments=function(e){var t=function(t,n){var i=e[t];r(b.isBuffer(i),t+" argument is not a buffer"),r(i.length===n,t+" has not the expected size: found "+i.length+", expected "+n)};t("version",S.VersionSize),t("depth",S.DepthSize),t("parentFingerPrint",S.ParentFingerPrintSize),t("childIndex",S.ChildIndexSize),t("chainCode",S.ChainCodeSize),t("privateKey",S.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",S.CheckSumSize)},S.prototype.toString=function(){return this.xprivkey},S.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"},S.prototype.toObject=S.prototype.toJSON=function e(){return{network:f.get(b.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:b.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:b.integerFromBuffer(this.fingerPrint),parentFingerPrint:b.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:b.integerFromBuffer(this._buffers.childIndex),chainCode:b.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:b.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}},S.fromBuffer=function(e){return new S(e.toString())},S.prototype.toBuffer=function(){return b.copy(this._buffers.xprivkey)},S.DefaultDepth=0,S.DefaultFingerprint=0,S.DefaultChildIndex=0,S.Hardened=2147483648,S.MaxIndex=2*S.Hardened,S.RootElementAlias=["m","M","m'","M'"],S.VersionSize=4,S.DepthSize=1,S.ParentFingerPrintSize=4,S.ChildIndexSize=4,S.ChainCodeSize=32,S.PrivateKeySize=32,S.CheckSumSize=4,S.DataLength=78,S.SerializedByteSize=82,S.VersionStart=0,S.VersionEnd=S.VersionStart+S.VersionSize,S.DepthStart=S.VersionEnd,S.DepthEnd=S.DepthStart+S.DepthSize,S.ParentFingerPrintStart=S.DepthEnd,S.ParentFingerPrintEnd=S.ParentFingerPrintStart+S.ParentFingerPrintSize,S.ChildIndexStart=S.ParentFingerPrintEnd,S.ChildIndexEnd=S.ChildIndexStart+S.ChildIndexSize,S.ChainCodeStart=S.ChildIndexEnd,S.ChainCodeEnd=S.ChainCodeStart+S.ChainCodeSize,S.PrivateKeyStart=S.ChainCodeEnd+1,S.PrivateKeyEnd=S.PrivateKeyStart+S.PrivateKeySize,S.ChecksumStart=S.PrivateKeyEnd,S.ChecksumEnd=S.ChecksumStart+S.CheckSumSize,r(S.ChecksumEnd===S.SerializedByteSize),e.exports=S}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(25),o=n(49),s=n(274),a=n(195),u=n(60),l=n(603),c=n(362),f=n(128),h=n(152),p=n(95),d=n(84),m=d,g=d.HDPublicKey,y=n(18),b=n(41),v=n(30);function w(e){if(e instanceof w)return e;if(!(this instanceof w))return new w(e);if(e){if(r.isString(e)||v.isBuffer(e)){var t=w.getSerializedError(e);if(t){if(v.isBuffer(e)&&!w.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof g.ArgumentIsPrivateExtended)return new l(e).hdPublicKey;throw t}return this._buildFromSerialized(e)}if(r.isObject(e))return e instanceof l?this._buildFromPrivate(e):this._buildFromObject(e);throw new g.UnrecognizedArgument(e)}throw new g.MustSupplyArgument}w.isValidPath=function(e){if(r.isString(e)){var t=l._getDerivationIndexes(e);return null!==t&&r.all(t,w.isValidPath)}return!!r.isNumber(e)&&(e>=0&&e<w.Hardened)},w.prototype.derive=function(e,t){if(r.isNumber(e))return this._deriveWithNumber(e,t);if(r.isString(e))return this._deriveFromString(e);throw new g.InvalidDerivationArgument(e)},w.prototype._deriveWithNumber=function(e,t){if(e>=w.Hardened||t)throw new g.InvalidIndexCantDeriveHardened;if(e<0)throw new g.InvalidPath(e);var n=c.get(this.xpubkey,e,!1);if(n)return n;var r=v.integerAsBuffer(e),i=v.concat([this.publicKey.toBuffer(),r]),s=u.sha512hmac(i,this._buffers.chainCode),a=o.fromBuffer(s.slice(0,32),{size:32}),l=s.slice(32,64),f=p.fromPoint(h.getG().mul(a).add(this.publicKey.point)),d=new w({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:l,publicKey:f});return c.set(this.xpubkey,e,!1,d),d},w.prototype._deriveFromString=function(e){if(r.contains(e,"'"))throw new g.InvalidIndexCantDeriveHardened;if(!w.isValidPath(e))throw new g.InvalidPath(e);var t=l._getDerivationIndexes(e),n=t.reduce(function(e,t){return e._deriveWithNumber(t)},this);return n},w.isValidSerialized=function(e,t){return r.isNull(w.getSerializedError(e,t))},w.getSerializedError=function(e,t){if(!r.isString(e)&&!v.isBuffer(e))return new g.UnrecognizedArgument("expected buffer or string");if(!s.validCharacters(e))return new m.InvalidB58Char("(unknown)",e);try{e=a.decode(e)}catch(t){return new m.InvalidB58Checksum(e)}if(e.length!==w.DataSize)return new g.InvalidLength(e);if(!r.isUndefined(t)){var n=w._validateNetwork(e,t);if(n)return n}var i=v.integerFromBuffer(e.slice(0,4));return i===f.livenet.xprivkey||i===f.testnet.xprivkey?new g.ArgumentIsPrivateExtended:null},w._validateNetwork=function(e,t){var n=f.get(t);if(!n)return new m.InvalidNetworkArgument(t);var r=e.slice(w.VersionStart,w.VersionEnd);return v.integerFromBuffer(r)!==n.xpubkey?new m.InvalidNetwork(r):null},w.prototype._buildFromPrivate=function(e){var t=r.clone(e._buffers),n=h.getG().mul(o.fromBuffer(t.privateKey));return t.publicKey=h.pointToCompressed(n),t.version=v.integerAsBuffer(f.get(v.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)},w.prototype._buildFromObject=function(e){var t={version:e.network?v.integerAsBuffer(f.get(e.network).xpubkey):e.version,depth:r.isNumber(e.depth)?v.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:r.isNumber(e.parentFingerPrint)?v.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:r.isNumber(e.childIndex)?v.integerAsBuffer(e.childIndex):e.childIndex,chainCode:r.isString(e.chainCode)?v.hexToBuffer(e.chainCode):e.chainCode,publicKey:r.isString(e.publicKey)?v.hexToBuffer(e.publicKey):v.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:r.isNumber(e.checksum)?v.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)},w.prototype._buildFromSerialized=function(e){var t=a.decode(e),n={version:t.slice(w.VersionStart,w.VersionEnd),depth:t.slice(w.DepthStart,w.DepthEnd),parentFingerPrint:t.slice(w.ParentFingerPrintStart,w.ParentFingerPrintEnd),childIndex:t.slice(w.ChildIndexStart,w.ChildIndexEnd),chainCode:t.slice(w.ChainCodeStart,w.ChainCodeEnd),publicKey:t.slice(w.PublicKeyStart,w.PublicKeyEnd),checksum:t.slice(w.ChecksumStart,w.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(n)},w.prototype._buildFromBuffers=function(e){w._validateBufferArguments(e),b.defineImmutable(this,{_buffers:e});var n=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=v.concat(n),i=a.checksum(r);if(e.checksum&&e.checksum.length){if(e.checksum.toString("hex")!==i.toString("hex"))throw new m.InvalidB58Checksum(r,i)}else e.checksum=i;var o=f.get(v.integerFromBuffer(e.version)),s;s=a.encode(v.concat(n)),e.xpubkey=new t(s);var l=new p(e.publicKey,{network:o}),c=w.ParentFingerPrintSize,h=u.sha256ripemd160(l.toBuffer()).slice(0,c);return b.defineImmutable(this,{xpubkey:s,network:o,depth:v.integerFromSingleByteBuffer(e.depth),publicKey:l,fingerPrint:h}),this},w._validateBufferArguments=function(e){var t=function(t,n){var r=e[t];y(v.isBuffer(r),t+" argument is not a buffer, it's "+typeof r),y(r.length===n,t+" has not the expected size: found "+r.length+", expected "+n)};t("version",w.VersionSize),t("depth",w.DepthSize),t("parentFingerPrint",w.ParentFingerPrintSize),t("childIndex",w.ChildIndexSize),t("chainCode",w.ChainCodeSize),t("publicKey",w.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",w.CheckSumSize)},w.fromString=function(e){return i.checkArgument(r.isString(e),"No valid string was provided"),new w(e)},w.fromObject=function(e){return i.checkArgument(r.isObject(e),"No valid argument was provided"),new w(e)},w.prototype.toString=function(){return this.xpubkey},w.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"},w.prototype.toObject=w.prototype.toJSON=function e(){return{network:f.get(v.integerFromBuffer(this._buffers.version)).name,depth:v.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:v.integerFromBuffer(this.fingerPrint),parentFingerPrint:v.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:v.integerFromBuffer(this._buffers.childIndex),chainCode:v.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:v.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}},w.fromBuffer=function(e){return new w(e)},w.prototype.toBuffer=function(){return v.copy(this._buffers.xpubkey)},w.Hardened=2147483648,w.RootElementAlias=["m","M"],w.VersionSize=4,w.DepthSize=1,w.ParentFingerPrintSize=4,w.ChildIndexSize=4,w.ChainCodeSize=32,w.PublicKeySize=33,w.CheckSumSize=4,w.DataSize=78,w.SerializedByteSize=82,w.VersionStart=0,w.VersionEnd=w.VersionStart+w.VersionSize,w.DepthStart=w.VersionEnd,w.DepthEnd=w.DepthStart+w.DepthSize,w.ParentFingerPrintStart=w.DepthEnd,w.ParentFingerPrintEnd=w.ParentFingerPrintStart+w.ParentFingerPrintSize,w.ChildIndexStart=w.ParentFingerPrintEnd,w.ChildIndexEnd=w.ChildIndexStart+w.ChildIndexSize,w.ChainCodeStart=w.ChildIndexEnd,w.ChainCodeEnd=w.ChainCodeStart+w.ChainCodeSize,w.PublicKeyStart=w.ChainCodeEnd,w.PublicKeyEnd=w.PublicKeyStart+w.PublicKeySize,w.ChecksumStart=w.PublicKeyEnd,w.ChecksumEnd=w.ChecksumStart+w.CheckSumSize,y(w.PublicKeyEnd===w.DataSize),y(w.ChecksumEnd===w.SerializedByteSize),e.exports=w}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(199),o=n(28),s=n(150),a=n(338),u=n(187).isSource,l=n(153),c=n(200);e.exports=(e=>{const n=c(e,"add"),f=r((e,r,c)=>{"function"==typeof r&&(c=r,r=null);const f=o(c);r||(r={}),r.converter=l;const h=e=>t.isBuffer(e)||s.readable(e)||u(e),p=e=>"object"==typeof e&&(e.content?h(e.content):Boolean(e.path)&&a(e.path)),d=e=>h(e)||p(e),m=d(e)||Array.isArray(e)&&e.every(d);if(!m)return f(new Error("invalid input: expected buffer, readable stream, pull stream, object or array of objects"));const g=[].concat(e),y=n({qs:r}),b=i(e=>f(null,e));y.once("error",f),y.pipe(b),g.forEach(e=>y.write(e)),y.end()});return function(){const e=Array.from(arguments);return 1===e.length&&u(e[0])&&e.push({}),f.apply(null,e)}})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(1471),i=n(202);e.exports=(e=>0===e.indexOf("https")?i.request:r.request)},function(e,t,n){(function(e){var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function o(e){return"function"==typeof e}t.fetch=o(e.fetch)&&o(e.ReadableStream),t.writableStream=o(e.WritableStream),t.abortController=o(e.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&o(r().overrideMimeType),n=null}).call(this,n(8))},function(e,t,n){(function(e,r,i){var o=n(607),s=n(1),a=n(20),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(t,n,s,u){var l=this;if(a.Readable.call(l),l._mode=s,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",function(){e.nextTick(function(){l.emit("close")})}),"fetch"===s){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach(function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)}),o.writableStream){var c=new WritableStream({write:function(e){return new Promise(function(t,n){l._destroyed?n():l.push(r.from(e))?t():l._resumeFetch=t})},close:function(){i.clearTimeout(u),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(c).catch(function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)})}catch(e){}}var f=n.body.getReader();function h(){f.read().then(function(e){if(!l._destroyed){if(e.done)return i.clearTimeout(u),void l.push(null);l.push(r.from(e.value)),h()}}).catch(function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)})}h()}else{l._xhr=t,l._pos=0,l.url=t.responseURL,l.statusCode=t.status,l.statusMessage=t.statusText;var p=t.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}}),l._charset="x-user-defined",!o.overrideMimeType){var d=l.rawHeaders["mime-type"];if(d){var m=d.match(/;\s*charset=([^;])(;|$)/);m&&(l._charset=m[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};s(l,a.Readable),l.prototype._read=function(){var e=this,t=this._resumeFetch;t&&(this._resumeFetch=null,t())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text":if(n=t.responseText,n.length>e._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var s=r.alloc(o.length),a=0;a<o.length;a++)s[a]=255&o.charCodeAt(a);e.push(s)}else e.push(o,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(r.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(r.from(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(r.from(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,n(2),n(0).Buffer,n(8))},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,n){(function(e){t.fetch=a(e.fetch)&&a(e.ReadableStream),t.writableStream=a(e.WritableStream),t.abortController=a(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,s=o&&a(e.ArrayBuffer.prototype.slice);function a(e){return"function"==typeof e}t.arraybuffer=t.fetch||o&&i("arraybuffer"),t.msstream=!t.fetch&&s&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&a(r().overrideMimeType),t.vbArray=a(e.VBArray),n=null}).call(this,n(8))},function(e,t,n){(function(e,r,i){var o=n(610),s=n(1),a=n(612),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(t,n,s,u){var l=this;if(a.Readable.call(l),l._mode=s,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",function(){e.nextTick(function(){l.emit("close")})}),"fetch"===s){if(l._fetchResponse=n,l.url=n.url,l.statusCode=n.status,l.statusMessage=n.statusText,n.headers.forEach(function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)}),o.writableStream){var c=new WritableStream({write:function(e){return new Promise(function(t,n){l._destroyed?n():l.push(new r(e))?t():l._resumeFetch=t})},close:function(){i.clearTimeout(u),l._destroyed||l.push(null)},abort:function(e){l._destroyed||l.emit("error",e)}});try{return void n.body.pipeTo(c).catch(function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)})}catch(e){}}var f=n.body.getReader();function h(){f.read().then(function(e){if(!l._destroyed){if(e.done)return i.clearTimeout(u),void l.push(null);l.push(new r(e.value)),h()}}).catch(function(e){i.clearTimeout(u),l._destroyed||l.emit("error",e)})}h()}else{l._xhr=t,l._pos=0,l.url=t.responseURL,l.statusCode=t.status,l.statusMessage=t.statusText;var p=t.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===l.headers[n]&&(l.headers[n]=[]),l.headers[n].push(t[2])):void 0!==l.headers[n]?l.headers[n]+=", "+t[2]:l.headers[n]=t[2],l.rawHeaders.push(t[1],t[2])}}),l._charset="x-user-defined",!o.overrideMimeType){var d=l.rawHeaders["mime-type"];if(d){var m=d.match(/;\s*charset=([^;])(;|$)/);m&&(l._charset=m[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};s(l,a.Readable),l.prototype._read=function(){var e=this,t=this._resumeFetch;t&&(this._resumeFetch=null,t())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{n=new i.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new r(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new r(o.length),a=0;a<o.length;a++)s[a]=255&o.charCodeAt(a);e.push(s)}else e.push(o,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(new r(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(new r(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var l=new i.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new r(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,n(2),n(0).Buffer,n(8))},function(e,t,n){t=e.exports=n(613),t.Stream=t,t.Readable=t,t.Writable=n(616),t.Duplex=n(155),t.Transform=n(617),t.PassThrough=n(1477)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(614),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1474),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1475),b=n(615),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(155),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(155),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(614),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(615),y;function b(){}function v(e,t){u=u||n(155),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(155),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(155),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){var r=n(0).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i<n;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(620),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1481),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1482),b=n(621),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(156),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(156),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(620),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(621),y;function b(){}function v(e,t){u=u||n(156),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(156),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(156),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){(function(e){var r=n(627),i=n(130),o="0000000000000000000",s="7777777777777777777",a="0".charCodeAt(0),u="ustar\x0000",l=parseInt("7777",8),c=function(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))},f=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},h=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},p=function(e,t,n,r){for(;n<r;n++)if(e[n]===t)return n;return r},d=function(e){for(var t=256,n=0;n<148;n++)t+=e[n];for(var r=156;r<512;r++)t+=e[r];return t},m=function(e,t){return e=e.toString(8),e.length>t?s.slice(0,t)+" ":o.slice(0,t-e.length)+e+" "};function g(e){var t;if(128===e[0])t=!0;else{if(255!==e[0])return null;t=!1}for(var n=!1,r=[],i=e.length-1;i>0;i--){var o=e[i];t?r.push(o):n&&0===o?r.push(0):n?(n=!1,r.push(256-o)):r.push(255-o)}var s=0,a=r.length;for(i=0;i<a;i++)s+=r[i]*Math.pow(256,i);return t?s:-1*s}var y=function(e,t,n){if(e=e.slice(t,t+n),t=0,128&e[t])return g(e);for(;t<e.length&&32===e[t];)t++;for(var r=c(p(e,32,t,e.length),e.length,e.length);t<r&&0===e[t];)t++;return r===t?0:parseInt(e.slice(t,r).toString(),8)},b=function(e,t,n,r){return e.slice(t,p(e,0,t,t+n)).toString(r)},v=function(t){var n=e.byteLength(t),r=Math.floor(Math.log(n)/Math.log(10))+1;return n+r>=Math.pow(10,r)&&r++,n+r+t};t.decodeLongPath=function(e,t){return b(e,0,e.length,t)},t.encodePax=function(e){var t="";e.name&&(t+=v(" path="+e.name+"\n")),e.linkname&&(t+=v(" linkpath="+e.linkname+"\n"));var n=e.pax;if(n)for(var i in n)t+=v(" "+i+"="+n[i]+"\n");return r(t)},t.decodePax=function(e){for(var t={};e.length;){for(var n=0;n<e.length&&32!==e[n];)n++;var r=parseInt(e.slice(0,n).toString(),10);if(!r)return t;var i=e.slice(n+1,r-1).toString(),o=i.indexOf("=");if(-1===o)return t;t[i.slice(0,o)]=i.slice(o+1),e=e.slice(r)}return t},t.encode=function(t){var n=i(512),r=t.name,o="";if(5===t.typeflag&&"/"!==r[r.length-1]&&(r+="/"),e.byteLength(r)!==r.length)return null;for(;e.byteLength(r)>100;){var s=r.indexOf("/");if(-1===s)return null;o+=o?"/"+r.slice(0,s):r.slice(0,s),r=r.slice(s+1)}return e.byteLength(r)>100||e.byteLength(o)>155?null:t.linkname&&e.byteLength(t.linkname)>100?null:(n.write(r),n.write(m(t.mode&l,6),100),n.write(m(t.uid,6),108),n.write(m(t.gid,6),116),n.write(m(t.size,11),124),n.write(m(t.mtime.getTime()/1e3|0,11),136),n[156]=a+h(t.type),t.linkname&&n.write(t.linkname,157),n.write(u,257),t.uname&&n.write(t.uname,265),t.gname&&n.write(t.gname,297),n.write(m(t.devmajor||0,6),329),n.write(m(t.devminor||0,6),337),o&&n.write(o,345),n.write(m(d(n),6),148),n)},t.decode=function(e,t){var n=0===e[156]?0:e[156]-a,r=b(e,0,100,t),i=y(e,100,8),o=y(e,108,8),s=y(e,116,8),u=y(e,124,12),l=y(e,136,12),c=f(n),h=0===e[157]?null:b(e,157,100,t),p=b(e,265,32),m=b(e,297,32),g=y(e,329,8),v=y(e,337,8);e[345]&&(r=b(e,345,155,t)+"/"+r),0===n&&r&&"/"===r[r.length-1]&&(n=5);var w=d(e);if(256===w)return null;if(w!==y(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:r,mode:i,uid:o,gid:s,size:u,mtime:new Date(1e3*l),type:c,linkname:h,uname:p,gname:m,devmajor:g,devminor:v}}}).call(this,n(0).Buffer)},function(e,t,n){(function(t){e.exports=i;var n=t.from&&t.from!==Uint8Array.from?t.from:r;function r(e,n){return new t(e,n)}function i(e,r){if(t.isBuffer(e))return e;if("string"==typeof e)return n(e,r);if(Array.isArray(e))return n(e);throw new Error("Input should be a buffer or a string")}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(629),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1499),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1500),b=n(630),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(157),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(157),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(629),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(630),y;function b(){}function v(e,t){u=u||n(157),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(157),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(157),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";const r=n(1510);t=e.exports=(()=>({"api-path":"/api/v0/","user-agent":`/node-${r.name}/${r.version}/`,host:"localhost",port:"5001",protocol:"http"}))},function(e,t,n){"use strict";(function(r){const i=n(1511),o=n(365).encode,s=n(201),a=n(366),u=n(59),l=n(28),c=n(112),f=n(1520),h=n(606),p=n(5)("ipfs-http-client:request");function d(e,t){const n=new Error(`Server responded with ${e.statusCode}`);f(e,(e,r)=>{if(e)return t(e);r&&(n.code=r.Code,n.message=r.Message||r.toString(),n.type=r.Type),t(n)})}function m(e,t){return n=>{const r=Boolean(n.headers["x-stream-output"]),i=Boolean(n.headers["x-chunked-output"]),o=n.headers["content-type"]&&0===n.headers["content-type"].indexOf("application/json");if(n.req?p(n.req.method,`${n.req.getHeaders().host}${n.req.path}`,n.statusCode,n.statusMessage):p(n.url,n.statusCode,n.statusMessage),n.statusCode>=400||!n.statusCode)return d(n,t);if(r&&!e)return t(null,n);if(i&&o){const e=a.parse();return u(n,e),n.on("end",()=>{let t=n.trailers["x-stream-error"];if(t){try{t=JSON.parse(t)}catch(e){t={Message:t}}e.emit("error",new Error(t.Message))}}),t(null,e)}return o?f(n,t):c(n,t)}}function g(e,t,n){n=l(n),t.qs=t.qs||{},Array.isArray(t.path)&&(t.path=t.path.join("/")),t.args&&!Array.isArray(t.args)&&(t.args=[t.args]),t.args&&(t.qs.arg=t.args),t.progress&&(t.qs.progress=!0),t.qs.r&&(t.qs.recursive=t.qs.r,delete t.qs.r),t.qs["stream-channels"]=!0,t.stream&&(t.buffer=!1),delete t.qs.followSymlinks;const a="POST",u=Object.assign({},e.headers);if(s&&(u["User-Agent"]=e["user-agent"]),t.multipart){if(!t.multipartBoundary)return n(new Error("No multipartBoundary"));u["Content-Type"]=`multipart/form-data; boundary=${t.multipartBoundary}`}const c=i.stringify(t.qs,{arrayFormat:"repeat",encoder:e=>{if(r.isBuffer(e)){let t="";for(const n of e)if(n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||45===n||46===n||95===n||126===n)t+=String.fromCharCode(n);else{const e=n.toString(16),r=1===e.length?`0${e}`:e;t+=`%${r}`}return t}return o(e)}}),f={hostname:e.host,path:`${e["api-path"]}${t.path}?${c}`,port:e.port,method:"POST",headers:u,protocol:`${e.protocol}:`},p=h(e.protocol)(f,m(t.buffer,n));return p.on("error",e=>{n(e)}),t.stream||p.end(),p}t=e.exports=(e=>{const t=(t,n)=>"object"!=typeof t?n(new Error("no options were passed")):g(e,t,n);return t.andTransform=((e,n,r)=>t(e,(e,t)=>{if(e)return r(e);n(t,r)})),t})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,n){(function(t){var r=n(1514).Transform,i=n(13).inherits,o=n(69);function s(e){r.call(this,e),this._destroyed=!1}function a(e,t,n){n(null,e)}function u(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=a),"function"!=typeof r&&(r=null),e(t,n,r)}}i(s,r),s.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var n=this;t.nextTick(function(){e&&n.emit("error",e),n.emit("close")})}},e.exports=u(function(e,t,n){var r=new s(e);return r._transform=t,n&&(r._flush=n),r}),e.exports.ctor=u(function(e,t,n){function r(t){if(!(this instanceof r))return new r(t);this.options=o(e,t),s.call(this,this.options)}return i(r,s),r.prototype._transform=t,n&&(r.prototype._flush=n),r}),e.exports.obj=u(function(e,t,n){var r=new s(o({objectMode:!0,highWaterMark:16},e));return r._transform=t,n&&(r._flush=n),r})}).call(this,n(2))},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(638),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1515),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1516),b=n(639),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(158),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(158),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(638),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(639),y;function b(){}function v(e,t){u=u||n(158),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(158),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(158),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t){function n(e,t,n,i){return JSON.stringify(e,r(t,i),n)}function r(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?r.splice(s,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}}t=e.exports=n,t.getSerialize=r},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{get:n(1523)(t),stat:n(1524)(t),put:n(1525)(t)}})},function(e,t,n){"use strict";e.exports=(e=>{const t=e.pop();let n={},r=[];return Array.isArray(e[e.length-1])||"object"!=typeof e[e.length-1]||(n=e.pop()),r=1===e.length&&Array.isArray(e[0])?e[0]:e,{callback:t,sources:r,opts:n}})},function(e,t,n){var r=n(246),i=n(1636),o=n(1637),s=n(1638),a=n(1639),u=n(1640);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},function(e,t,n){var r=n(1641),i=n(104);function o(e,t,n,s,a){return e===t||(null==e||null==t||!i(e)&&!i(t)?e!=e&&t!=t:r(e,t,n,s,o,a))}e.exports=o},function(e,t,n){var r=n(1642),i=n(1645),o=n(1646),s=1,a=2;function u(e,t,n,u,l,c){var f=n&s,h=e.length,p=t.length;if(h!=p&&!(f&&p>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,g=!0,y=n&a?new r:void 0;for(c.set(e,t),c.set(t,e);++m<h;){var b=e[m],v=t[m];if(u)var w=f?u(v,b,m,t,e,c):u(b,v,m,e,t,c);if(void 0!==w){if(w)continue;g=!1;break}if(y){if(!i(t,function(e,t){if(!o(y,t)&&(b===e||l(b,e,n,u,c)))return y.push(t)})){g=!1;break}}else if(b!==v&&!l(b,v,n,u,c)){g=!1;break}}return c.delete(e),c.delete(t),g}e.exports=u},function(e,t,n){var r=n(215);function i(e){return e==e&&!r(e)}e.exports=i},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){"use strict";const{Transform:r,PassThrough:i}=n(20),o=n(59),s=n(366),a=n(150),u=e=>({name:e.Name,type:e.Type,size:e.Size,hash:e.Hash});e.exports=(e=>(t,n)=>{n=n||{};const l=new r({objectMode:!0,transform(e,t,n){n(null,u(e))}}),c=new i({objectMode:!0});return e({path:"files/ls",args:t,qs:Object.assign({},n,{stream:!0})},(e,t)=>{if(e)return c.destroy(e);if(a(t)){const e=s.parse();o(t,e,l,c)}else{const e=t.Entries||[];e.forEach(e=>{c.write(u(e))}),c.end()}}),c})},function(e,t,n){(function(e,n){var r=200,i="__lodash_hash_undefined__",o=9007199254740991,s="[object Arguments]",a="[object Array]",u="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",h="[object GeneratorFunction]",p="[object Map]",d="[object Number]",m="[object Object]",g="[object Promise]",y="[object RegExp]",b="[object Set]",v="[object String]",w="[object Symbol]",_="[object WeakMap]",k="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",I="[object Int32Array]",T="[object Uint8Array]",j="[object Uint8ClampedArray]",O="[object Uint16Array]",P="[object Uint32Array]",B=/[\\^$.*+?()[\]{}|]/g,R=/\w*$/,N=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,L={};L[s]=L[a]=L[k]=L[S]=L[u]=L[l]=L[E]=L[x]=L[C]=L[A]=L[I]=L[p]=L[d]=L[m]=L[y]=L[b]=L[v]=L[w]=L[T]=L[j]=L[O]=L[P]=!0,L[c]=L[f]=L[_]=!1;var F="object"==typeof e&&e&&e.Object===Object&&e,D="object"==typeof self&&self&&self.Object===Object&&self,U=F||D||Function("return this")(),z=t&&!t.nodeType&&t,q=z&&"object"==typeof n&&n&&!n.nodeType&&n,K=q&&q.exports===z;function H(e,t){return e.set(t[0],t[1]),e}function V(e,t){return e.add(t),e}function W(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}function $(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function G(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Y(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function J(e,t){return null==e?void 0:e[t]}function Z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function X(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Q(e,t){return function(n){return e(t(n))}}function ee(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var te=Array.prototype,ne=Function.prototype,re=Object.prototype,ie=U["__core-js_shared__"],oe=(se=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""),se?"Symbol(src)_1."+se:""),se,ae=ne.toString,ue=re.hasOwnProperty,le=re.toString,ce=RegExp("^"+ae.call(ue).replace(B,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=K?U.Buffer:void 0,he=U.Symbol,pe=U.Uint8Array,de=Q(Object.getPrototypeOf,Object),me=Object.create,ge=re.propertyIsEnumerable,ye=te.splice,be=Object.getOwnPropertySymbols,ve=fe?fe.isBuffer:void 0,we=Q(Object.keys,Object),_e=At(U,"DataView"),ke=At(U,"Map"),Se=At(U,"Promise"),Ee=At(U,"Set"),xe=At(U,"WeakMap"),Ce=At(Object,"create"),Ae=Lt(_e),Ie=Lt(ke),Te=Lt(Se),je=Lt(Ee),Oe=Lt(xe),Pe=he?he.prototype:void 0,Be=Pe?Pe.valueOf:void 0;function Re(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.__data__=Ce?Ce(null):{}}function Me(e){return this.has(e)&&delete this.__data__[e]}function Le(e){var t=this.__data__;if(Ce){var n=t[e];return n===i?void 0:n}return ue.call(t,e)?t[e]:void 0}function Fe(e){var t=this.__data__;return Ce?void 0!==t[e]:ue.call(t,e)}function De(e,t){var n=this.__data__;return n[e]=Ce&&void 0===t?i:t,this}function Ue(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ze(){this.__data__=[]}function qe(e){var t=this.__data__,n=st(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():ye.call(t,n,1),!0}function Ke(e){var t=this.__data__,n=st(t,e);return n<0?void 0:t[n][1]}function He(e){return st(this.__data__,e)>-1}function Ve(e,t){var n=this.__data__,r=st(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function We(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $e(){this.__data__={hash:new Re,map:new(ke||Ue),string:new Re}}function Ge(e){return Ct(this,e).delete(e)}function Ye(e){return Ct(this,e).get(e)}function Je(e){return Ct(this,e).has(e)}function Ze(e,t){return Ct(this,e).set(e,t),this}function Xe(e){this.__data__=new Ue(e)}function Qe(){this.__data__=new Ue}function et(e){return this.__data__.delete(e)}function tt(e){return this.__data__.get(e)}function nt(e){return this.__data__.has(e)}function rt(e,t){var n=this.__data__;if(n instanceof Ue){var i=n.__data__;if(!ke||i.length<r-1)return i.push([e,t]),this;n=this.__data__=new We(i)}return n.set(e,t),this}function it(e,t){var n=zt(e)||Ut(e)?Y(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!ue.call(e,o)||i&&("length"==o||Bt(o,r))||n.push(o);return n}function ot(e,t,n){var r=e[t];ue.call(e,t)&&Dt(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function st(e,t){for(var n=e.length;n--;)if(Dt(e[n][0],t))return n;return-1}function at(e,t){return e&&St(t,Yt(t),e)}function ut(e,t,n,r,i,o,a){var u;if(r&&(u=o?r(e,i,o,a):r(e)),void 0!==u)return u;if(!$t(e))return e;var l=zt(e);if(l){if(u=jt(e),!t)return kt(e,u)}else{var c=Tt(e),p=c==f||c==h;if(Ht(e))return dt(e,t);if(c==m||c==s||p&&!o){if(Z(e))return o?e:{};if(u=Ot(p?{}:e),!t)return Et(e,at(u,e))}else{if(!L[c])return o?e:{};u=Pt(e,c,ut,t)}}a||(a=new Xe);var d=a.get(e);if(d)return d;if(a.set(e,u),!l)var g=n?xt(e):Yt(e);return W(g||e,function(i,o){g&&(o=i,i=e[o]),ot(u,o,ut(i,t,n,r,o,e,a))}),u}function lt(e){return $t(e)?me(e):{}}function ct(e,t,n){var r=t(e);return zt(e)?r:$(r,n(e))}function ft(e){return le.call(e)}function ht(e){if(!$t(e)||Nt(e))return!1;var t=Vt(e)||Z(e)?ce:N;return t.test(Lt(e))}function pt(e){if(!Mt(e))return we(e);var t=[];for(var n in Object(e))ue.call(e,n)&&"constructor"!=n&&t.push(n);return t}function dt(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function mt(e){var t=new e.constructor(e.byteLength);return new pe(t).set(new pe(e)),t}function gt(e,t){var n=t?mt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function yt(e,t,n){var r=t?n(X(e),!0):X(e);return G(r,H,new e.constructor)}function bt(e){var t=new e.constructor(e.source,R.exec(e));return t.lastIndex=e.lastIndex,t}function vt(e,t,n){var r=t?n(ee(e),!0):ee(e);return G(r,V,new e.constructor)}function wt(e){return Be?Object(Be.call(e)):{}}function _t(e,t){var n=t?mt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function kt(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function St(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=r?r(n[s],e[s],s,n,e):void 0;ot(n,s,void 0===a?e[s]:a)}return n}function Et(e,t){return St(e,It(e),t)}function xt(e){return ct(e,Yt,It)}function Ct(e,t){var n=e.__data__;return Rt(t)?n["string"==typeof t?"string":"hash"]:n.map}function At(e,t){var n=J(e,t);return ht(n)?n:void 0}Re.prototype.clear=Ne,Re.prototype.delete=Me,Re.prototype.get=Le,Re.prototype.has=Fe,Re.prototype.set=De,Ue.prototype.clear=ze,Ue.prototype.delete=qe,Ue.prototype.get=Ke,Ue.prototype.has=He,Ue.prototype.set=Ve,We.prototype.clear=$e,We.prototype.delete=Ge,We.prototype.get=Ye,We.prototype.has=Je,We.prototype.set=Ze,Xe.prototype.clear=Qe,Xe.prototype.delete=et,Xe.prototype.get=tt,Xe.prototype.has=nt,Xe.prototype.set=rt;var It=be?Q(be,Object):Jt,Tt=ft;function jt(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ue.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ot(e){return"function"!=typeof e.constructor||Mt(e)?{}:lt(de(e))}function Pt(e,t,n,r){var i=e.constructor;switch(t){case k:return mt(e);case u:case l:return new i(+e);case S:return gt(e,r);case E:case x:case C:case A:case I:case T:case j:case O:case P:return _t(e,r);case p:return yt(e,r,n);case d:case v:return new i(e);case y:return bt(e);case b:return vt(e,r,n);case w:return wt(e)}}function Bt(e,t){return t=null==t?o:t,!!t&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function Rt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Nt(e){return!!oe&&oe in e}function Mt(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||re;return e===n}function Lt(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ft(e){return ut(e,!0,!0)}function Dt(e,t){return e===t||e!=e&&t!=t}function Ut(e){return Kt(e)&&ue.call(e,"callee")&&(!ge.call(e,"callee")||le.call(e)==s)}(_e&&Tt(new _e(new ArrayBuffer(1)))!=S||ke&&Tt(new ke)!=p||Se&&Tt(Se.resolve())!=g||Ee&&Tt(new Ee)!=b||xe&&Tt(new xe)!=_)&&(Tt=function(e){var t=le.call(e),n=t==m?e.constructor:void 0,r=n?Lt(n):void 0;if(r)switch(r){case Ae:return S;case Ie:return p;case Te:return g;case je:return b;case Oe:return _}return t});var zt=Array.isArray;function qt(e){return null!=e&&Wt(e.length)&&!Vt(e)}function Kt(e){return Gt(e)&&qt(e)}var Ht=ve||Zt;function Vt(e){var t=$t(e)?le.call(e):"";return t==f||t==h}function Wt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function $t(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Gt(e){return!!e&&"object"==typeof e}function Yt(e){return qt(e)?it(e):pt(e)}function Jt(){return[]}function Zt(){return!1}n.exports=Ft}).call(this,n(8),n(75)(e))},function(e,t,n){"use strict";e.exports="ipfs-pubsub-room/v2"},function(e,t,n){"use strict";(function(t){e.exports=(e=>{let n=e;return t.isBuffer(n)||(n=t.from(n)),n})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=(e=>e._libp2pNode||e.libp2p)},function(e,t,n){(function(t){e.exports=function(e,n){var r=[];e.on("data",function(e){r.push(e)}),e.once("end",function(){n&&n(null,t.concat(r)),n=null}),e.once("error",function(e){n&&n(e),n=null})}}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var r=n(1),i=n(1728).Transform,o=n(1733);function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this),t||(t={}),"object"==typeof e&&(t=e,e=t.size),this.size=e||512,t.nopad?this._zeroPadding=!1:this._zeroPadding=o(t.zeroPadding,!0),this._buffered=[],this._bufferedBytes=0}e.exports=s,r(s,i),s.prototype._transform=function(e,n,r){for(this._bufferedBytes+=e.length,this._buffered.push(e);this._bufferedBytes>=this.size;){var i=t.concat(this._buffered);this._bufferedBytes-=this.size,this.push(i.slice(0,this.size)),this._buffered=[i.slice(this.size,i.length)]}r()},s.prototype._flush=function(){if(this._bufferedBytes&&this._zeroPadding){var e=new t(this.size-this._bufferedBytes);e.fill(0),this._buffered.push(e),this.push(t.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(t.concat(this._buffered)),this._buffered=null);this.push(null)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(658),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1729),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1730),b=n(659),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(160),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(160),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(658),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(659),y;function b(){}function v(e,t){u=u||n(160),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(160),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(160),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(663),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1738),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1739),b=n(664),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(161),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(161),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(663),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(664),y;function b(){}function v(e,t){u=u||n(161),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(161),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(161),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){e.exports=o;var r=n(1),i=n(1745);function o(e,t){var n=this;if(!(n instanceof o))return new o(e,t);i.Readable.call(n,t),n.destroyed=!1,n._drained=!1,n._forwarding=!1,n._current=null,n._toStreams2=t&&t.objectMode?s:a,"function"==typeof e?n._queue=e:(n._queue=e.map(n._toStreams2),n._queue.forEach(function(e){"function"!=typeof e&&n._attachErrorListener(e)})),n._next()}function s(e){return u(e,{objectMode:!0,highWaterMark:16})}function a(e){return u(e)}function u(e,t){if(!e||"function"==typeof e||e._readableState)return e;var n=new i.Readable(t).wrap(e);return e.destroy&&(n.destroy=e.destroy.bind(e)),n}r(o,i.Readable),o.obj=function(e){return new o(e,{objectMode:!0,highWaterMark:16})},o.prototype._read=function(){this._drained=!0,this._forward()},o.prototype._forward=function(){if(!this._forwarding&&this._drained&&this._current){var e;for(this._forwarding=!0;null!==(e=this._current.read());)this._drained=this.push(e);this._forwarding=!1}},o.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach(function(e){e.destroy&&e.destroy()}),e&&this.emit("error",e),this.emit("close"))},o.prototype._next=function(){var e=this;if(e._current=null,"function"==typeof e._queue)e._queue(function(t,n){if(t)return e.destroy(t);n=e._toStreams2(n),e._attachErrorListener(n),e._gotNextStream(n)});else{var t=e._queue.shift();"function"==typeof t&&(t=e._toStreams2(t()),e._attachErrorListener(t)),e._gotNextStream(t)}},o.prototype._gotNextStream=function(e){var t=this;if(!e)return t.push(null),void t.destroy();function n(){t._forward()}function r(){e._readableState.ended||t.destroy()}function i(){t._current=null,e.removeListener("readable",n),e.removeListener("end",i),e.removeListener("close",r),t._next()}t._current=e,t._forward(),e.on("readable",n),e.once("end",i),e.once("close",r)},o.prototype._attachErrorListener=function(e){var t=this;function n(r){e.removeListener("error",n),t.destroy(r)}e&&e.once("error",n)}},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(669),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1746),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1747),b=n(670),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(162),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(162),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(669),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(670),y;function b(){}function v(e,t){u=u||n(162),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(162),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(162),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){(function(t,r){const i=n(280),o=n(1753),s=n(15),a=n(371),u=n(1755),l=n(61),c=n(205),f=n(281);function h(e){if("string"==typeof e&&/^(stream-)?magnet:/.test(e))return u(e);if("string"==typeof e&&(/^[a-f0-9]{40}$/i.test(e)||/^[a-z2-7]{32}$/i.test(e)))return u(`magnet:?xt=urn:btih:${e}`);if(t.isBuffer(e)&&20===e.length)return u(`magnet:?xt=urn:btih:${e.toString("hex")}`);if(t.isBuffer(e))return d(e);if(e&&e.infoHash)return e.infoHash=e.infoHash.toLowerCase(),e.announce||(e.announce=[]),"string"==typeof e.announce&&(e.announce=[e.announce]),e.urlList||(e.urlList=[]),e;throw new Error("Invalid torrent identifier")}function p(e,t){let n;if("function"!=typeof t)throw new Error("second argument must be a Function");try{n=h(e)}catch(e){}function i(e){try{n=h(e)}catch(e){return t(e)}n&&n.infoHash?t(null,n):t(new Error("Invalid torrent identifier"))}n&&n.infoHash?r.nextTick(()=>{t(null,n)}):g(e)?o(e,(e,n)=>{if(e)return t(new Error(`Error converting Blob: ${e.message}`));i(n)}):"function"==typeof a&&/^https?:/.test(e)?a.concat({url:e,timeout:3e4,headers:{"user-agent":"WebTorrent (https://webtorrent.io)"}},(e,n,r)=>{if(e)return t(new Error(`Error downloading torrent: ${e.message}`));i(r)}):"function"==typeof s.readFile&&"string"==typeof e?s.readFile(e,(e,n)=>{if(e)return t(new Error("Invalid torrent identifier"));i(n)}):r.nextTick(()=>{t(new Error("Invalid torrent identifier"))})}function d(e){t.isBuffer(e)&&(e=i.decode(e)),v(e.info,"info"),v(e.info["name.utf-8"]||e.info.name,"info.name"),v(e.info["piece length"],"info['piece length']"),v(e.info.pieces,"info.pieces"),e.info.files?e.info.files.forEach(e=>{v("number"==typeof e.length,"info.files[0].length"),v(e["path.utf-8"]||e.path,"info.files[0].path")}):v("number"==typeof e.info.length,"info.length");const n={info:e.info,infoBuffer:i.encode(e.info),name:(e.info["name.utf-8"]||e.info.name).toString(),announce:[]};n.infoHash=c.sync(n.infoBuffer),n.infoHashBuffer=t.from(n.infoHash,"hex"),void 0!==e.info.private&&(n.private=!!e.info.private),e["creation date"]&&(n.created=new Date(1e3*e["creation date"])),e["created by"]&&(n.createdBy=e["created by"].toString()),t.isBuffer(e.comment)&&(n.comment=e.comment.toString()),Array.isArray(e["announce-list"])&&e["announce-list"].length>0?e["announce-list"].forEach(e=>{e.forEach(e=>{n.announce.push(e.toString())})}):e.announce&&n.announce.push(e.announce.toString()),t.isBuffer(e["url-list"])&&(e["url-list"]=e["url-list"].length>0?[e["url-list"]]:[]),n.urlList=(e["url-list"]||[]).map(e=>e.toString()),f(n.announce),f(n.urlList);const r=e.info.files||[e.info];n.files=r.map((e,t)=>{const i=[].concat(n.name,e["path.utf-8"]||e.path||[]).map(e=>e.toString());return{path:l.join.apply(null,[l.sep].concat(i)).slice(1),name:i[i.length-1],length:e.length,offset:r.slice(0,t).reduce(y,0)}}),n.length=r.reduce(y,0);const o=n.files[n.files.length-1];return n.pieceLength=e.info["piece length"],n.lastPieceLength=(o.offset+o.length)%n.pieceLength||n.pieceLength,n.pieces=b(e.info.pieces),n}function m(e){const n={info:e.info};return n["announce-list"]=(e.announce||[]).map(e=>(n.announce||(n.announce=e),e=t.from(e,"utf8"),[e])),n["url-list"]=e.urlList||[],void 0!==e.private&&(n.private=Number(e.private)),e.created&&(n["creation date"]=e.created.getTime()/1e3|0),e.createdBy&&(n["created by"]=e.createdBy),e.comment&&(n.comment=e.comment),i.encode(n)}function g(e){return"undefined"!=typeof Blob&&e instanceof Blob}function y(e,t){return e+t.length}function b(e){const t=[];for(let n=0;n<e.length;n+=20)t.push(e.slice(n,n+20).toString("hex"));return t}function v(e,t){if(!e)throw new Error(`Torrent is missing required field: ${t}`)}e.exports=h,e.exports.remote=p,e.exports.toMagnetURI=u.encode,e.exports.toTorrentFile=m,t.alloc(0)}).call(this,n(0).Buffer,n(2))},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(675),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1763),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1764),b=n(676),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(163),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(163),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(675),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(676),y;function b(){}function v(e,t){u=u||n(163),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(163),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(163),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){var r=n(4).Buffer;t.DEFAULT_ANNOUNCE_PEERS=50,t.MAX_ANNOUNCE_PEERS=82,t.binaryToHex=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"binary").toString("hex")},t.hexToBinary=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"hex").toString("binary")};var i=n(1772);Object.assign(t,i)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(681),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1780),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1781),b=n(682),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(164),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(164),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(681),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(682),y;function b(){}function v(e,t){u=u||n(164),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(164),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(164),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){e.exports=u;var r=n(1),i=n(20),o=n(618),s="undefined"!=typeof window&&window.MediaSource,a=60;function u(e,t){var n=this;if(!(n instanceof u))return new u(e,t);if(!s)throw new Error("web browser lacks MediaSource support");t||(t={}),n._debug=t.debug,n._bufferDuration=t.bufferDuration||a,n._elem=e,n._mediaSource=new s,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler);var e=n._streams.slice();e.forEach(function(e){e.destroy(n._elem.error)})},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function l(e,t){var n=this;if(i.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._debugBuffers=[],n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},n._errorHandler=function(e){n.destroyed||n.emit("error",e)},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._debugBuffers=t._debugBuffers,n._sourceBuffer.addEventListener("updateend",n._flowHandler),n._sourceBuffer.addEventListener("error",n._errorHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",function(e){n._wrapper.error(e)}),n.on("finish",function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every(function(e){return e._finished}))){n._wrapper._dumpDebugData();try{n._mediaSource.endOfStream()}catch(e){}}})}u.prototype.createWriteStream=function(e){var t=this;return new l(this,e)},u.prototype.error=function(e){var t=this;this.detailedError||(this.detailedError=e),this._dumpDebugData();try{this._mediaSource.endOfStream("decode")}catch(e){}try{window.URL.revokeObjectURL(this._elem.src)}catch(e){}},u.prototype._dumpDebugData=function(){var e=this;this._debug&&(this._debug=!1,this._streams.forEach(function(e,t){f(e._debugBuffers,"mediasource-stream-"+t)}))},r(l,i.Writable),l.prototype._onSourceOpen=function(){var e=this;this.destroyed||(this._mediaSource.removeEventListener("sourceopen",this._openHandler),this._createSourceBuffer())},l.prototype.destroy=function(e){var t=this;this.destroyed||(this.destroyed=!0,this._allStreams.splice(this._allStreams.indexOf(this),1),this._mediaSource.removeEventListener("sourceopen",this._openHandler),this._elem.removeEventListener("timeupdate",this._flowHandler),this._sourceBuffer&&(this._sourceBuffer.removeEventListener("updateend",this._flowHandler),this._sourceBuffer.removeEventListener("error",this._errorHandler),"open"===this._mediaSource.readyState&&this._sourceBuffer.abort()),e&&this.emit("error",e),this.emit("close"))},l.prototype._createSourceBuffer=function(){var e=this;if(!this.destroyed)if(s.isTypeSupported(this._type)){if(this._sourceBuffer=this._mediaSource.addSourceBuffer(this._type),this._sourceBuffer.addEventListener("updateend",this._flowHandler),this._sourceBuffer.addEventListener("error",this._errorHandler),this._cb){var t=this._cb;this._cb=null,t()}}else this.destroy(new Error("The provided type is not supported"))},l.prototype._write=function(e,t,n){var r=this;if(!r.destroyed)if(r._sourceBuffer){if(r._sourceBuffer.updating)return n(new Error("Cannot append buffer while source buffer updating"));var i=o(e);r._wrapper._debug&&r._debugBuffers.push(i);try{r._sourceBuffer.appendBuffer(i)}catch(e){return void r.destroy(e)}r._cb=n}else r._cb=function(i){if(i)return n(i);r._write(e,t,n)}},l.prototype._flow=function(){var e=this;if(!this.destroyed&&this._sourceBuffer&&!this._sourceBuffer.updating&&!("open"===this._mediaSource.readyState&&this._getBufferDuration()>this._bufferDuration)&&this._cb){var t=this._cb;this._cb=null,t()}};var c=0;function f(e,t){var n=document.createElement("a");n.href=window.URL.createObjectURL(new window.Blob(e)),n.download=t,n.click()}l.prototype._getBufferDuration=function(){for(var e=this,t=this._sourceBuffer.buffered,n=this._elem.currentTime,r=-1,i=0;i<t.length;i++){var o=t.start(i),s=t.end(i)+0;if(o>n)break;(r>=0||n<=s)&&(r=s)}var a=r-n;return a<0&&(a=0),a}},function(e,t,n){var r=n(687);e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);r(t,n,function(e,t){if(e)return i(e);var n=URL.createObjectURL(t);i(null,n)})}},function(e,t,n){var r=n(28);e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);i=r(i);var o=[];t.on("data",function(e){o.push(e)}).on("end",function(){var e=n?new Blob(o,{type:n}):new Blob(o);i(null,e)}).on("error",i)}},function(e,t,n){t=e.exports=n(689),t.Stream=t,t.Readable=t,t.Writable=n(692),t.Duplex=n(165),t.Transform=n(693),t.PassThrough=n(1812)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(690),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1809),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1810),b=n(691),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(165),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(165),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(690),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(691),y;function b(){}function v(e,t){u=u||n(165),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(165),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(165),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){var r=n(130),i=Math.pow(2,32);t.encodingLength=function(){return 8},t.encode=function(e,t,n){t||(t=r(8)),n||(n=0);var o=Math.floor(e/i),s=e-o*i;return t.writeUInt32BE(o,n),t.writeUInt32BE(s,n+4),t},t.decode=function(e,t){t||(t=0);var n=e.readUInt32BE(t),r=e.readUInt32BE(t+4);return n*i+r},t.encode.bytes=8,t.decode.bytes=8},function(e,t){function n(e,t){if(!(t>=e.length||t<0)){var n=e.pop();if(t<e.length){var r=e[t];return e[t]=n,r}return n}}e.exports=n},function(e,t,n){(function(t){const r=n(695),i=n(280),o=n(282),s=n(1821)("bittorrent-protocol"),a=n(69),u=n(148),l=n(372),c=n(1823),f=4e5,h=55e3,p=t.from("BitTorrent protocol"),d=t.from([0,0,0,0]),m=t.from([0,0,0,1,0]),g=t.from([0,0,0,1,1]),y=t.from([0,0,0,1,2]),b=t.from([0,0,0,1,3]),v=[0,0,0,0,0,0,0,0],w=[0,0,0,3,9,0,0];class _{constructor(e,t,n,r){this.piece=e,this.offset=t,this.length=n,this.callback=r}}class k extends c.Duplex{constructor(){super(),this._debugId=u(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=null,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new o(0,{grow:f}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=l(),this.downloadSpeed=l(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this.on("finish",this._onFinish),this._parseHandshake()}setKeepAlive(e){this._debug("setKeepAlive %s",e),clearInterval(this._keepAliveInterval),!1!==e&&(this._keepAliveInterval=setInterval(()=>{this.keepAlive()},h))}setTimeout(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._clearTimeout(),this._timeoutMs=e,this._timeoutUnref=!!t,this._updateTimeout()}destroy(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())}end(...e){this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...e)}use(e){const t=e.prototype.name;if(!t)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",t);const n=this._nextExt,r=new e(this);function i(){}"function"!=typeof r.onHandshake&&(r.onHandshake=i),"function"!=typeof r.onExtendedHandshake&&(r.onExtendedHandshake=i),"function"!=typeof r.onMessage&&(r.onMessage=i),this.extendedMapping[n]=t,this._ext[t]=r,this[t]=r,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(d)}handshake(e,n,r){let i,o;if("string"==typeof e?(e=e.toLowerCase(),i=t.from(e,"hex")):(i=e,e=i.toString("hex")),"string"==typeof n?o=t.from(n,"hex"):(o=n,n=o.toString("hex")),20!==i.length||20!==o.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,n,r);const s=t.from(v);s[5]|=16,r&&r.dht&&(s[7]|=1),this._push(t.concat([p,s,i,o])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_sendExtendedHandshake(){const e=a(this.extendedHandshake);e.m={};for(const t in this.extendedMapping){const n=this.extendedMapping[t];e.m[n]=Number(t)}this.extended(0,i.encode(e)),this._extendedHandshakeSent=!0}choke(){if(!this.amChoking){for(this.amChoking=!0,this._debug("choke");this.peerRequests.length;)this.peerRequests.pop();this._push(m)}}unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),this._push(g))}interested(){this.amInterested||(this.amInterested=!0,this._debug("interested"),this._push(y))}uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("uninterested"),this._push(b))}have(e){this._debug("have %d",e),this._message(4,[e],null)}bitfield(e){this._debug("bitfield"),t.isBuffer(e)||(e=e.buffer),this._message(5,[],e)}request(e,t,n,r){return r||(r=(()=>{})),this._finished?r(new Error("wire is closed")):this.peerChoking?r(new Error("peer is choking")):(this._debug("request index=%d offset=%d length=%d",e,t,n),this.requests.push(new _(e,t,n,r)),this._updateTimeout(),void this._message(6,[e,t,n],null))}piece(e,t,n){this._debug("piece index=%d offset=%d",e,t),this.uploaded+=n.length,this.uploadSpeed(n.length),this.emit("upload",n.length),this._message(7,[e,t],n)}cancel(e,t,n){this._debug("cancel index=%d offset=%d length=%d",e,t,n),this._callback(this._pull(this.requests,e,t,n),new Error("request was cancelled"),null),this._message(8,[e,t,n],null)}port(e){this._debug("port %d",e);const n=t.from(w);n.writeUInt16BE(e,5),this._push(n)}extended(e,n){if(this._debug("extended ext=%s",e),"string"==typeof e&&this.peerExtendedMapping[e]&&(e=this.peerExtendedMapping[e]),"number"!=typeof e)throw new Error(`Unrecognized extension: ${e}`);{const r=t.from([e]),o=t.isBuffer(n)?n:i.encode(n);this._message(20,[],t.concat([r,o]))}}_read(){}_message(e,n,r){const i=r?r.length:0,o=t.allocUnsafe(5+4*n.length);o.writeUInt32BE(o.length+i-4,0),o[4]=e;for(let e=0;e<n.length;e++)o.writeUInt32BE(n[e],5+4*e);this._push(o),r&&this._push(r)}_push(e){if(!this._finished)return this.push(e)}_onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")}_onHandshake(e,t,n){const r=e.toString("hex"),i=t.toString("hex");let o;for(o in this._debug("got handshake i=%s p=%s exts=%o",r,i,n),this.peerId=i,this.peerIdBuffer=t,this.peerExtensions=n,this.emit("handshake",r,i,n),this._ext)this._ext[o].onHandshake(r,i,n);n.extended&&this._handshakeSent&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_onChoke(){for(this.peerChoking=!0,this._debug("got choke"),this.emit("choke");this.requests.length;)this._callback(this.requests.pop(),new Error("peer is choking"),null)}_onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit("unchoke")}_onInterested(){this.peerInterested=!0,this._debug("got interested"),this.emit("interested")}_onUninterested(){this.peerInterested=!1,this._debug("got uninterested"),this.emit("uninterested")}_onHave(e){this.peerPieces.get(e)||(this._debug("got have %d",e),this.peerPieces.set(e,!0),this.emit("have",e))}_onBitField(e){this.peerPieces=new o(e),this._debug("got bitfield"),this.emit("bitfield",this.peerPieces)}_onRequest(e,t,n){if(this.amChoking)return;this._debug("got request index=%d offset=%d length=%d",e,t,n);const r=(r,o)=>{if(i===this._pull(this.peerRequests,e,t,n))return r?this._debug("error satisfying request index=%d offset=%d length=%d (%s)",e,t,n,r.message):void this.piece(e,t,o)};var i=new _(e,t,n,r);this.peerRequests.push(i),this.emit("request",e,t,n,r)}_onPiece(e,t,n){this._debug("got piece index=%d offset=%d",e,t),this._callback(this._pull(this.requests,e,t,n.length),null,n),this.downloaded+=n.length,this.downloadSpeed(n.length),this.emit("download",n.length),this.emit("piece",e,t,n)}_onCancel(e,t,n){this._debug("got cancel index=%d offset=%d length=%d",e,t,n),this._pull(this.peerRequests,e,t,n),this.emit("cancel",e,t,n)}_onPort(e){this._debug("got port %d",e),this.emit("port",e)}_onExtended(e,t){if(0===e){let e,n;try{e=i.decode(t)}catch(e){this._debug("ignoring invalid extended handshake: %s",e.message||e)}if(!e)return;if(this.peerExtendedHandshake=e,"object"==typeof e.m)for(n in e.m)this.peerExtendedMapping[n]=Number(e.m[n].toString());for(n in this._ext)this.peerExtendedMapping[n]&&this._ext[n].onExtendedHandshake(this.peerExtendedHandshake);this._debug("got extended handshake"),this.emit("extended","handshake",this.peerExtendedHandshake)}else this.extendedMapping[e]&&(e=this.extendedMapping[e],this._ext[e]&&this._ext[e].onMessage(t)),this._debug("got extended message ext=%s",e),this.emit("extended",e,t)}_onTimeout(){this._debug("request timed out"),this._callback(this.requests.shift(),new Error("request has timed out"),null),this.emit("timeout")}_write(e,n,r){for(this._bufferSize+=e.length,this._buffer.push(e);this._bufferSize>=this._parserSize;){const e=1===this._buffer.length?this._buffer[0]:t.concat(this._buffer);this._bufferSize-=this._parserSize,this._buffer=this._bufferSize?[e.slice(this._parserSize)]:[],this._parser(e.slice(0,this._parserSize))}r(null)}_callback(e,t,n){e&&(this._clearTimeout(),this.peerChoking||this._finished||this._updateTimeout(),e.callback(t,n))}_clearTimeout(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_updateTimeout(){this._timeoutMs&&this.requests.length&&!this._timeout&&(this._timeout=setTimeout(()=>this._onTimeout(),this._timeoutMs),this._timeoutUnref&&this._timeout.unref&&this._timeout.unref())}_parse(e,t){this._parserSize=e,this._parser=t}_onMessageLength(e){const t=e.readUInt32BE(0);t>0?this._parse(t,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))}_onMessage(e){switch(this._parse(4,this._onMessageLength),e[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(e.readUInt32BE(1));case 5:return this._onBitField(e.slice(1));case 6:return this._onRequest(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 7:return this._onPiece(e.readUInt32BE(1),e.readUInt32BE(5),e.slice(9));case 8:return this._onCancel(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 9:return this._onPort(e.readUInt16BE(1));case 20:return this._onExtended(e.readUInt8(1),e.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",e)}}_parseHandshake(){this._parse(1,e=>{const t=e.readUInt8(0);this._parse(t+48,e=>{const n=e.slice(0,t);if("BitTorrent protocol"!==n.toString())return this._debug("Error: wire not speaking BitTorrent protocol (%s)",n.toString()),void this.end();e=e.slice(t),this._onHandshake(e.slice(8,28),e.slice(28,48),{dht:!!(1&e[7]),extended:!!(16&e[5])}),this._parse(4,this._onMessageLength)})})}_onFinish(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,()=>{});this.peerRequests.length;)this.peerRequests.pop();for(;this.requests.length;)this._callback(this.requests.pop(),new Error("wire was closed"),null)}_debug(...e){e[0]=`[${this._debugId}] ${e[0]}`,s(...e)}_pull(e,t,n,i){for(let o=0;o<e.length;o++){const s=e[o];if(s.piece===t&&s.offset===n&&s.length===i)return r(e,o),s}return null}}e.exports=k}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(698),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1824),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1825),b=n(699),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(166),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(166),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t,n){e.exports=n(6).EventEmitter},function(e,t,n){"use strict";var r=n(10);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(s,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)}function o(){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 s(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:o}},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(698),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(699),y;function b(){}function v(e,t){u=u||n(166),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(166),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){"use strict";e.exports=s;var r=n(166),i=n(7);function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){const r=n(1832);e.exports.FS=r;const i=n(1982);e.exports.WOLK=i},function(e,t,n){"use strict";var r=n(374),i=n(704),o=n(375),s=o.paramsHaveRequestBody;function a(e,t,n){"function"==typeof t&&(n=t);var i={};return"object"==typeof t?r(i,t,{uri:e}):r(i,"string"==typeof e?{uri:e}:e),i.callback=n||i.callback,i}function u(e,t,n){if(void 0===e)throw new Error("undefined is not a valid uri or options object.");var r=a(e,t,n);if("HEAD"===r.method&&s(r))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new u.Request(r)}function l(e){var t=e.toUpperCase();return function(e,n,r){var i=a(e,n,r);return i.method=t,u(i,i.callback)}}function c(e,t,n,i){return function(o,s,u){var l=a(o,s,u),c={};return r(!0,c,t,l),c.pool=l.pool||t.pool,i&&(c.method=i.toUpperCase()),"function"==typeof n&&(e=n),e(c,c.callback)}}u.get=l("get"),u.head=l("head"),u.options=l("options"),u.post=l("post"),u.put=l("put"),u.patch=l("patch"),u.del=l("delete"),u.delete=l("delete"),u.jar=function(e){return i.jar(e)},u.cookie=function(e){return i.parse(e)},u.defaults=function(e,t){var n=this;e=e||{},"function"==typeof e&&(t=e,e={});var r=c(n,e,t),i=["get","head","post","put","patch","del","delete"];return i.forEach(function(i){r[i]=c(n[i],e,t,i)}),r.cookie=c(n.cookie,e,t),r.jar=n.jar,r.defaults=n.defaults,r},u.forever=function(e,t){var n={};return t&&r(n,t),e&&(n.agentOptions=e),n.forever=!0,u.defaults(n)},e.exports=u,u.Request=n(1837),u.initParams=a,Object.defineProperty(u,"debug",{enumerable:!0,get:function(){return u.Request.debug},set:function(e){u.Request.debug=e}})},function(e,t,n){"use strict";var r=n(1833),i=r.Cookie,o=r.CookieJar;function s(e){var t=this;this._jar=new o(e,{looseMode:!0})}t.parse=function(e){if(e&&e.uri&&(e=e.uri),"string"!=typeof e)throw new Error("The cookie function only accepts STRING as param");return i.parse(e,{loose:!0})},s.prototype.setCookie=function(e,t,n){var r=this;return this._jar.setCookieSync(e,t,n||{})},s.prototype.getCookieString=function(e){var t=this;return this._jar.getCookieStringSync(e)},s.prototype.getCookies=function(e){var t=this;return this._jar.getCookiesSync(e)},t.jar=function(e){return new s(e)}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2018, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(706);function i(e){return r.get(e)}t.getPublicSuffix=i},function(e,t,n){"use strict";var r=n(213),i={};i.rules=n(1834).map(function(e){return{rule:e,suffix:e.replace(/^(\*\.|\!)/,""),punySuffix:-1,wildcard:"*"===e.charAt(0),exception:"!"===e.charAt(0)}}),i.endsWith=function(e,t){return-1!==e.indexOf(t,e.length-t.length)},i.findRule=function(e){var t=r.toASCII(e);return i.rules.reduce(function(e,n){return-1===n.punySuffix&&(n.punySuffix=r.toASCII(n.suffix)),i.endsWith(t,"."+n.punySuffix)||t===n.punySuffix?n:e},null)},t.errorCodes={DOMAIN_TOO_SHORT:"Domain name too short.",DOMAIN_TOO_LONG:"Domain name too long. It should be no more than 255 chars.",LABEL_STARTS_WITH_DASH:"Domain name label can not start with a dash.",LABEL_ENDS_WITH_DASH:"Domain name label can not end with a dash.",LABEL_TOO_LONG:"Domain name label should be at most 63 chars long.",LABEL_TOO_SHORT:"Domain name label should be at least 1 character long.",LABEL_INVALID_CHARS:"Domain name label can only contain alphanumeric characters or dashes."},i.validate=function(e){var t=r.toASCII(e);if(t.length<1)return"DOMAIN_TOO_SHORT";if(t.length>255)return"DOMAIN_TOO_LONG";for(var n=t.split("."),i,o=0;o<n.length;++o){if(i=n[o],!i.length)return"LABEL_TOO_SHORT";if(i.length>63)return"LABEL_TOO_LONG";if("-"===i.charAt(0))return"LABEL_STARTS_WITH_DASH";if("-"===i.charAt(i.length-1))return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-]+$/.test(i))return"LABEL_INVALID_CHARS"}},t.parse=function(e){if("string"!=typeof e)throw new TypeError("Domain name must be a string.");var n=e.slice(0).toLowerCase();"."===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));var o=i.validate(n);if(o)return{input:e,error:{message:t.errorCodes[o],code:o}};var s={input:e,tld:null,sld:null,domain:null,subdomain:null,listed:!1},a=n.split(".");if("local"===a[a.length-1])return s;var u=function(){return/xn--/.test(n)?(s.domain&&(s.domain=r.toASCII(s.domain)),s.subdomain&&(s.subdomain=r.toASCII(s.subdomain)),s):s},l=i.findRule(n);if(!l)return a.length<2?s:(s.tld=a.pop(),s.sld=a.pop(),s.domain=[s.sld,s.tld].join("."),a.length&&(s.subdomain=a.pop()),u());s.listed=!0;var c=l.suffix.split("."),f=a.slice(0,a.length-c.length);return l.exception&&f.push(c.shift()),s.tld=c.join("."),f.length?(l.wildcard&&(c.unshift(f.pop()),s.tld=c.join(".")),f.length?(s.sld=f.pop(),s.domain=[s.sld,s.tld].join("."),f.length&&(s.subdomain=f.join(".")),u()):u()):u()},t.get=function(e){return e&&t.parse(e).domain||null},t.isValid=function(e){var n=t.parse(e);return Boolean(n.domain&&n.listed)}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/function r(){}t.Store=r,r.prototype.synchronous=!1,r.prototype.findCookie=function(e,t,n,r){throw new Error("findCookie is not implemented")},r.prototype.findCookies=function(e,t,n){throw new Error("findCookies is not implemented")},r.prototype.putCookie=function(e,t){throw new Error("putCookie is not implemented")},r.prototype.updateCookie=function(e,t,n){throw new Error("updateCookie is not implemented")},r.prototype.removeCookie=function(e,t,n,r){throw new Error("removeCookie is not implemented")},r.prototype.removeCookies=function(e,t,n){throw new Error("removeCookies is not implemented")},r.prototype.getAllCookies=function(e){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(705);function i(e){var t=r.getPublicSuffix(e);if(!t)return null;if(t==e)return[e];for(var n=e.slice(0,-(t.length+1)),i=n.split(".").reverse(),o=t,s=[o];i.length;)o=i.shift()+"."+o,s.push(o);return s}t.permuteDomain=i},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/function r(e,t){if(t===e)return!0;var n=e.indexOf(t);if(0===n){if("/"===t.substr(-1))return!0;if("/"===e.substr(t.length,1))return!0}return!1}t.pathMatch=r},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){s=n>2e3?2e3:n,n-=s;do{i=i+t[r++]|0,o=o+i|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}e.exports=r},function(e,t,n){"use strict";function r(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var i=r();function o(e,t,n,r){var o=i,s=r+n;e^=-1;for(var a=r;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}e.exports=o},function(e,t,n){e.exports={Verifier:l,Signer:c};var r=n(208),i=n(57),o=n(13),s=n(27),a=n(31).Buffer,u=n(102);function l(e,t){if("sha512"!==t.toLowerCase())throw new Error("ED25519 only supports the use of SHA-512 hashes");this.key=e,this.chunks=[],i.Writable.call(this,{})}function c(e,t){if("sha512"!==t.toLowerCase())throw new Error("ED25519 only supports the use of SHA-512 hashes");this.key=e,this.chunks=[],i.Writable.call(this,{})}o.inherits(l,i.Writable),l.prototype._write=function(e,t,n){this.chunks.push(e),n()},l.prototype.update=function(e){"string"==typeof e&&(e=a.from(e,"binary")),this.chunks.push(e)},l.prototype.verify=function(e,t){var n;if(u.isSignature(e,[2,0])){if("ed25519"!==e.type)return!1;n=e.toBuffer("raw")}else if("string"==typeof e)n=a.from(e,"base64");else if(u.isSignature(e,[1,0]))throw new Error("signature was created by too old a version of sshpk and cannot be verified");return s.buffer(n),r.sign.detached.verify(new Uint8Array(a.concat(this.chunks)),new Uint8Array(n),new Uint8Array(this.key.part.A.data))},o.inherits(c,i.Writable),c.prototype._write=function(e,t,n){this.chunks.push(e),n()},c.prototype.update=function(e){"string"==typeof e&&(e=a.from(e,"binary")),this.chunks.push(e)},c.prototype.sign=function(){var e=r.sign.detached(new Uint8Array(a.concat(this.chunks)),new Uint8Array(a.concat([this.key.part.k.data,this.key.part.A.data]))),t=a.from(e),n=u.parse(t,"ed25519","raw");return n.hashAlgorithm="sha512",n}},function(e,t,n){e.exports={read:d,write:v};var r=n(27),i=n(31).Buffer,o=n(47),s=n(46),a=n(50),u=n(113),l=n(715),c=n(114),f=n(381),h=n(716),p="Private-key-format: v1";function d(e,t){if("string"==typeof e){if(e.trim().match(/^[-]+[ ]*BEGIN/))return u.read(e,t);if(e.match(/^\s*ssh-[a-z]/))return l.read(e,t);if(e.match(/^\s*ecdsa-/))return l.read(e,t);if(e.match(/^putty-user-key-file-2:/i))return h.read(e,t);if(b(e))return f.read(e,t);e=i.from(e,"binary")}else{if(r.buffer(e),y(e))return u.read(e,t);if(g(e))return l.read(e,t);if(m(e))return h.read(e,t);if(b(e))return f.read(e,t)}if(e.readUInt32BE(0)<e.length)return c.read(e,t);throw new Error("Failed to auto-detect format of key")}function m(e){for(var t=0;t<e.length&&(32===e[t]||10===e[t]||9===e[t]);)++t;return t+22<=e.length&&"putty-user-key-file-2:"===e.slice(t,t+22).toString("ascii").toLowerCase()}function g(e){for(var t=0;t<e.length&&(32===e[t]||10===e[t]||9===e[t]);)++t;return t+4<=e.length&&"ssh-"===e.slice(t,t+4).toString("ascii")||t+6<=e.length&&"ecdsa-"===e.slice(t,t+6).toString("ascii")}function y(e){for(var t=0;t<e.length&&(32===e[t]||10===e[t]);)++t;if(45!==e[t])return!1;for(;t<e.length&&45===e[t];)++t;for(;t<e.length&&32===e[t];)++t;return!(t+5>e.length||"BEGIN"!==e.slice(t,t+5).toString("ascii"))}function b(e){if(e.length<=p.length)return!1;var t=e.slice(0,p.length);if(t.toString("ascii")===p)return!0;"string"!=typeof e&&(e=e.toString("ascii"));for(var n=e.split("\n"),r=0;n[r].match(/^\;/);)r++;return!!n[r].toString("ascii").match(/\. IN KEY /)||!!n[r].toString("ascii").match(/\. IN DNSKEY /)}function v(e,t){throw new Error('"auto" format cannot be used for writing')}},function(e,t,n){"use strict";var r=n(208).lowlevel.crypto_hash,i=0,o=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};function s(e,t,n){return(e[0][t[n+3]]+e[1][t[n+2]]^e[2][t[n+1]])+e[3][t[n]]}function a(e,t){var n,r=0;for(n=0;n<4;n++,i++)i>=t&&(i=0),r=r<<8|e[i];return r}o.prototype.encipher=function(e,t){void 0===t&&(t=new Uint8Array(e.buffer),0!==e.byteOffset&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var n=1;n<16;n+=2)e[1]^=s(this.S,t,0)^this.P[n],e[0]^=s(this.S,t,4)^this.P[n+1];var r=e[0];e[0]=e[1]^this.P[17],e[1]=r},o.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);0!==e.byteOffset&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var n=16;n>0;n-=2)e[1]^=s(this.S,t,0)^this.P[n],e[0]^=s(this.S,t,4)^this.P[n-1];var r=e[0];e[0]=e[1]^this.P[0],e[1]=r},o.prototype.expand0state=function(e,t){var n=new Uint32Array(2),r,o,s=new Uint8Array(n.buffer);for(r=0,i=0;r<18;r++)this.P[r]^=a(e,t);for(i=0,r=0;r<18;r+=2)this.encipher(n,s),this.P[r]=n[0],this.P[r+1]=n[1];for(r=0;r<4;r++)for(o=0;o<256;o+=2)this.encipher(n,s),this.S[r][o]=n[0],this.S[r][o+1]=n[1]},o.prototype.expandstate=function(e,t,n,r){var o=new Uint32Array(2),s,u;for(s=0,i=0;s<18;s++)this.P[s]^=a(n,r);for(s=0,i=0;s<18;s+=2)o[0]^=a(e,t),o[1]^=a(e,t),this.encipher(o),this.P[s]=o[0],this.P[s+1]=o[1];for(s=0;s<4;s++)for(u=0;u<256;u+=2)o[0]^=a(e,t),o[1]^=a(e,t),this.encipher(o),this.S[s][u]=o[0],this.S[s][u+1]=o[1];i=0},o.prototype.enc=function(e,t){for(var n=0;n<t;n++)this.encipher(e.subarray(2*n))},o.prototype.dec=function(e,t){for(var n=0;n<t;n++)this.decipher(e.subarray(2*n))};var u=8,l=32;function c(e,t,n){var r=new o,i=new Uint32Array(u),s,l=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(r.expandstate(t,64,e,64),s=0;s<64;s++)r.expand0state(t,64),r.expand0state(e,64);for(s=0;s<u;s++)i[s]=a(l,l.byteLength);for(s=0;s<64;s++)r.enc(i,i.byteLength/8);for(s=0;s<u;s++)n[4*s+3]=i[s]>>>24,n[4*s+2]=i[s]>>>16,n[4*s+1]=i[s]>>>8,n[4*s+0]=i[s]}function f(e,t,n,i,o,s,a){var u=new Uint8Array(64),f=new Uint8Array(64),h=new Uint8Array(l),p=new Uint8Array(l),d=new Uint8Array(i+4),m,g,y,b,v,w,_=s;if(a<1)return-1;if(0===t||0===i||0===s||s>h.byteLength*h.byteLength||i>1<<20)return-1;for(b=Math.floor((s+h.byteLength-1)/h.byteLength),y=Math.floor((s+b-1)/b),m=0;m<i;m++)d[m]=n[m];for(r(u,e,t),w=1;s>0;w++){for(d[i+0]=w>>>24,d[i+1]=w>>>16,d[i+2]=w>>>8,d[i+3]=w,r(f,d,i+4),c(u,f,p),m=h.byteLength;m--;)h[m]=p[m];for(m=1;m<a;m++)for(r(f,p,p.byteLength),c(u,f,p),g=0;g<h.byteLength;g++)h[g]^=p[g];for(y=Math.min(y,s),m=0;m<y&&(v=m*b+(w-1),!(v>=_));m++)o[v]=h[m];s-=m}return 0}e.exports={BLOCKS:u,HASHSIZE:l,hash:c,pbkdf:f}},function(e,t,n){e.exports={read:h,write:p};var r=n(27),i=n(31).Buffer,o=n(114),s=n(47),a=n(46),u=n(50),l=n(287),c=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/,f=/^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/;function h(e,t){"string"!=typeof e&&(r.buffer(e,"buf"),e=e.toString("ascii"));var n=e.trim().replace(/[\\\r]/g,""),s=n.match(c);s||(s=n.match(f)),r.ok(s,"key must match regex");var a=o.algToKeyType(s[1]),u=i.from(s[2],"base64"),l,h={};if(s[4])try{l=o.read(u)}catch(e){s=n.match(f),r.ok(s,"key must match regex"),u=i.from(s[2],"base64"),l=o.readInternal(h,"public",u)}else l=o.readInternal(h,"public",u);if(r.strictEqual(a,l.type),s[4]&&s[4].length>0)l.comment=s[4];else if(h.consumed){var p=s[2]+(s[3]?s[3]:""),d=4*Math.ceil(h.consumed/3);p=p.slice(0,d-2).replace(/[^a-zA-Z0-9+\/=]/g,"")+p.slice(d-2);var m=h.consumed%3;for(m>0&&"="!==p.slice(d-1,d)&&d--;"="===p.slice(d,d+1);)d++;var g=p.slice(d);g=g.replace(/[\r\n]/g," ").replace(/^\s+/,""),g.match(/^[a-zA-Z0-9]/)&&(l.comment=g)}return l}function p(e,t){if(r.object(e),!a.isKey(e))throw new Error("Must be a public key");var n=[],s=o.keyTypeToAlg(e);n.push(s);var u=o.write(e);return n.push(u.toString("base64")),e.comment&&n.push(e.comment),i.from(n.join(" "))}},function(e,t,n){e.exports={read:u,write:c};var r=n(27),i=n(31).Buffer,o=n(114),s=n(46),a=n(96);function u(e,t){for(var n=e.toString("ascii").split(/[\r\n]+/),s=!1,a,u=0;u<n.length;)if(a=l(n[u++]),a&&"putty-user-key-file-2"===a[0].toLowerCase()){s=!0;break}if(!s)throw new Error("No PuTTY format first line found");var c=a[1];a=l(n[u++]),r.equal(a[0].toLowerCase(),"encryption"),a=l(n[u++]),r.equal(a[0].toLowerCase(),"comment");var f=a[1];a=l(n[u++]),r.equal(a[0].toLowerCase(),"public-lines");var h=parseInt(a[1],10);if(!isFinite(h)||h<0||h>n.length)throw new Error("Invalid public-lines count");var p=i.from(n.slice(u,u+h).join(""),"base64"),d=o.algToKeyType(c),m=o.read(p);if(m.type!==d)throw new Error("Outer key algorithm mismatch");return m.comment=f,m}function l(e){var t=e.indexOf(":");if(-1===t)return null;var n=e.slice(0,t);for(++t;" "===e[t];)++t;var r=e.slice(t);return[n,r]}function c(e,t){if(r.object(e),!s.isKey(e))throw new Error("Must be a public key");var n=o.keyTypeToAlg(e),a=o.write(e),u=e.comment||"",l=a.toString("base64"),c=f(l,64);return c.unshift("Public-Lines: "+c.length),c.unshift("Comment: "+u),c.unshift("Encryption: none"),c.unshift("PuTTY-User-Key-File-2: "+n),i.from(c.join("\n")+"\n")}function f(e,t){for(var n=[],r=0;r<e.length;)n.push(e.slice(r,r+64)),r+=64;return n}},function(e,t,n){e.exports={read:_,verify:g,sign:M,signAsync:L,write:F};var r=n(27),i=n(103),o=n(31).Buffer,s=n(55),a=n(47),u=n(46),l=n(50),c=n(113),f=n(212),h=n(102),p=n(211),d=n(210);function m(e,t){return r.strictEqual(e.peek(),i.Ber.Integer,t+" is not an Integer"),a.mpNormalize(e.readString(i.Ber.Integer,!0))}function g(e,t){var n=e.signatures.x509;r.object(n,"x509 signature");var o=n.algo.split("-");if(o[0]!==t.type)return!1;var s=n.cache;if(void 0===s){var a=new i.BerWriter;D(e,a),s=a.buffer}var u=t.createVerify(o[1]);return u.write(s),u.verify(n.signature)}function y(e){return i.Ber.Context|i.Ber.Constructor|e}function b(e){return i.Ber.Context|e}var v={"rsa-md5":"1.2.840.113549.1.1.4","rsa-sha1":"1.2.840.113549.1.1.5","rsa-sha256":"1.2.840.113549.1.1.11","rsa-sha384":"1.2.840.113549.1.1.12","rsa-sha512":"1.2.840.113549.1.1.13","dsa-sha1":"1.2.840.10040.4.3","dsa-sha256":"2.16.840.1.101.3.4.3.2","ecdsa-sha1":"1.2.840.10045.4.1","ecdsa-sha256":"1.2.840.10045.4.3.2","ecdsa-sha384":"1.2.840.10045.4.3.3","ecdsa-sha512":"1.2.840.10045.4.3.4","ed25519-sha512":"1.3.101.112"};Object.keys(v).forEach(function(e){v[v[e]]=e}),v["1.3.14.3.2.3"]="rsa-md5",v["1.3.14.3.2.29"]="rsa-sha1";var w={issuerKeyId:"2.5.29.35",altName:"2.5.29.17",basicConstraints:"2.5.29.19",keyUsage:"2.5.29.15",extKeyUsage:"2.5.29.37"};function _(e,t){"string"==typeof e&&(e=o.from(e,"binary")),r.buffer(e,"buf");var n=new i.BerReader(e);if(n.readSequence(),Math.abs(n.length-n.remain)>1)throw new Error("DER sequence does not contain whole byte stream");var s=n.offset;n.readSequence();var a=n.offset+n.length,u=a;if(n.peek()===y(0)){n.readSequence(y(0));var l=n.readInt();r.ok(l<=3,"only x.509 versions up to v3 supported")}var c={signatures:{}},g=c.signatures.x509={};g.extras={},c.serial=m(n,"serial"),n.readSequence();var b=n.offset+n.length,w=n.readOID(),_=v[w];if(void 0===_)throw new Error("unknown signature algorithm "+w);if(n._offset=b,c.issuer=f.parseAsn1(n),n.readSequence(),c.validFrom=k(n),c.validUntil=k(n),c.subjects=[f.parseAsn1(n)],n.readSequence(),b=n.offset+n.length,c.subjectKey=d.readPkcs8(void 0,"public",n),n._offset=b,n.peek()===y(1)&&(n.readSequence(y(1)),g.extras.issuerUniqueID=e.slice(n.offset,n.offset+n.length),n._offset+=n.length),n.peek()===y(2)&&(n.readSequence(y(2)),g.extras.subjectUniqueID=e.slice(n.offset,n.offset+n.length),n._offset+=n.length),n.peek()===y(3)){n.readSequence(y(3));var S=n.offset+n.length;for(n.readSequence();n.offset<S;)I(c,e,n);r.strictEqual(n.offset,S)}r.strictEqual(n.offset,a),n.readSequence(),b=n.offset+n.length;var E=n.readOID(),x=v[E];if(void 0===x)throw new Error("unknown signature algorithm "+E);n._offset=b;var C=n.readString(i.Ber.BitString,!0);0===C[0]&&(C=C.slice(1));var A=x.split("-");return g.signature=h.parse(C,A[0],"asn1"),g.signature.hashAlgorithm=A[1],g.algo=x,g.cache=e.slice(s,u),new p(c)}function k(e){if(e.peek()===i.Ber.UTCTime)return j(e.readString(i.Ber.UTCTime));if(e.peek()===i.Ber.GeneralizedTime)return P(e.readString(i.Ber.GeneralizedTime));throw new Error("Unsupported date format")}function S(e,t){t.getUTCFullYear()>=2050||t.getUTCFullYear()<1950?e.writeString(N(t),i.Ber.GeneralizedTime):e.writeString(R(t),i.Ber.UTCTime)}var E={OtherName:y(0),RFC822Name:b(1),DNSName:b(2),X400Address:y(3),DirectoryName:y(4),EDIPartyName:y(5),URI:b(6),IPAddress:b(7),OID:b(8)},x={serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",joyentDocker:"1.3.6.1.4.1.38678.1.4.1",joyentCmon:"1.3.6.1.4.1.38678.1.4.2"},C={};Object.keys(x).forEach(function(e){C[x[e]]=e});var A=["signature","identity","keyEncryption","encryption","keyAgreement","ca","crl"];function I(e,t,n){n.readSequence();var r=n.offset+n.length,o=n.readOID(),s,a=e.signatures.x509,u;switch(a.extras.exts||(a.extras.exts=[]),n.peek()===i.Ber.Boolean&&(u=n.readBoolean()),o){case w.basicConstraints:n.readSequence(i.Ber.OctetString),n.readSequence();var l=n.offset+n.length,c=!1;n.peek()===i.Ber.Boolean&&(c=n.readBoolean()),void 0===e.purposes&&(e.purposes=[]),!0===c&&e.purposes.push("ca");var h={oid:o,critical:u};n.offset<l&&n.peek()===i.Ber.Integer&&(h.pathLen=n.readInt()),a.extras.exts.push(h);break;case w.extKeyUsage:n.readSequence(i.Ber.OctetString),n.readSequence(),void 0===e.purposes&&(e.purposes=[]);for(var p=n.offset+n.length;n.offset<p;){var d=n.readOID();e.purposes.push(C[d]||d)}-1!==e.purposes.indexOf("serverAuth")&&-1===e.purposes.indexOf("clientAuth")?e.subjects.forEach(function(e){"host"!==e.type&&(e.type="host",e.hostname=e.uid||e.email||e.components[0].value)}):-1!==e.purposes.indexOf("clientAuth")&&-1===e.purposes.indexOf("serverAuth")&&e.subjects.forEach(function(e){"user"!==e.type&&(e.type="user",e.uid=e.hostname||e.email||e.components[0].value)}),a.extras.exts.push({oid:o,critical:u});break;case w.keyUsage:n.readSequence(i.Ber.OctetString);var m=n.readString(i.Ber.BitString,!0),g=U(m,A);g.forEach(function(t){void 0===e.purposes&&(e.purposes=[]),-1===e.purposes.indexOf(t)&&e.purposes.push(t)}),a.extras.exts.push({oid:o,critical:u,bits:m});break;case w.altName:n.readSequence(i.Ber.OctetString),n.readSequence();for(var y=n.offset+n.length;n.offset<y;)switch(n.peek()){case E.OtherName:case E.EDIPartyName:n.readSequence(),n._offset+=n.length;break;case E.OID:n.readOID(E.OID);break;case E.RFC822Name:var b=n.readString(E.RFC822Name);s=f.forEmail(b),e.subjects[0].equals(s)||e.subjects.push(s);break;case E.DirectoryName:n.readSequence(E.DirectoryName),s=f.parseAsn1(n),e.subjects[0].equals(s)||e.subjects.push(s);break;case E.DNSName:var v=n.readString(E.DNSName);s=f.forHost(v),e.subjects[0].equals(s)||e.subjects.push(s);break;default:n.readString(n.peek())}a.extras.exts.push({oid:o,critical:u});break;default:a.extras.exts.push({oid:o,critical:u,data:n.readString(i.Ber.OctetString,!0)})}n._offset=r}var T=/^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;function j(e){var t=e.match(T);r.ok(t,"timestamps must be in UTC");var n=new Date,i=n.getUTCFullYear(),o=100*Math.floor(i/100),s=parseInt(t[1],10);return s+=i%100<50&&s>=60?o-1:o,n.setUTCFullYear(s,parseInt(t[2],10)-1,parseInt(t[3],10)),n.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&n.setUTCSeconds(parseInt(t[6],10)),n}var O=/^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;function P(e){var t=e.match(O);r.ok(t);var n=new Date;return n.setUTCFullYear(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10)),n.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&n.setUTCSeconds(parseInt(t[6],10)),n}function B(e,t){void 0===t&&(t=2);for(var n=""+e;n.length<t;)n="0"+n;return n}function R(e){var t="";return t+=B(e.getUTCFullYear()%100),t+=B(e.getUTCMonth()+1),t+=B(e.getUTCDate()),t+=B(e.getUTCHours()),t+=B(e.getUTCMinutes()),t+=B(e.getUTCSeconds()),t+="Z",t}function N(e){var t="";return t+=B(e.getUTCFullYear(),4),t+=B(e.getUTCMonth()+1),t+=B(e.getUTCDate()),t+=B(e.getUTCHours()),t+=B(e.getUTCMinutes()),t+=B(e.getUTCSeconds()),t+="Z",t}function M(e,t){void 0===e.signatures.x509&&(e.signatures.x509={});var n=e.signatures.x509;if(n.algo=t.type+"-"+t.defaultHashAlgorithm(),void 0===v[n.algo])return!1;var r=new i.BerWriter;D(e,r);var o=r.buffer;n.cache=o;var s=t.createSign();return s.write(o),e.signatures.x509.signature=s.sign(),!0}function L(e,t,n){void 0===e.signatures.x509&&(e.signatures.x509={});var r=e.signatures.x509,o=new i.BerWriter;D(e,o);var s=o.buffer;r.cache=s,t(s,function(e,t){e?n(e):(r.algo=t.type+"-"+t.hashAlgorithm,void 0!==v[r.algo]?(r.signature=t,n()):n(new Error('Invalid signing algorithm "'+r.algo+'"')))})}function F(e,t){var n=e.signatures.x509;r.object(n,"x509 signature");var s=new i.BerWriter;s.startSequence(),n.cache?(s._ensure(n.cache.length),n.cache.copy(s._buf,s._offset),s._offset+=n.cache.length):D(e,s),s.startSequence(),s.writeOID(v[n.algo]),n.algo.match(/^rsa-/)&&s.writeNull(),s.endSequence();var a=n.signature.toBuffer("asn1"),u=o.alloc(a.length+1);return u[0]=0,a.copy(u,1),s.writeBuffer(u,i.Ber.BitString),s.endSequence(),s.buffer}function D(e,t){var n=e.signatures.x509;r.object(n,"x509 signature"),t.startSequence(),t.startSequence(y(0)),t.writeInt(2),t.endSequence(),t.writeBuffer(a.mpNormalize(e.serial),i.Ber.Integer),t.startSequence(),t.writeOID(v[n.algo]),n.algo.match(/^rsa-/)&&t.writeNull(),t.endSequence(),e.issuer.toAsn1(t),t.startSequence(),S(t,e.validFrom),S(t,e.validUntil),t.endSequence();var o=e.subjects[0],s=e.subjects.slice(1);if(o.toAsn1(t),d.writePkcs8(t,e.subjectKey),n.extras&&n.extras.issuerUniqueID&&t.writeBuffer(n.extras.issuerUniqueID,y(1)),n.extras&&n.extras.subjectUniqueID&&t.writeBuffer(n.extras.subjectUniqueID,y(2)),s.length>0||"host"===o.type||void 0!==e.purposes&&e.purposes.length>0||n.extras&&n.extras.exts){t.startSequence(y(3)),t.startSequence();var u=[];void 0!==e.purposes&&e.purposes.length>0&&(u.push({oid:w.basicConstraints,critical:!0}),u.push({oid:w.keyUsage,critical:!0}),u.push({oid:w.extKeyUsage,critical:!0})),u.push({oid:w.altName}),n.extras&&n.extras.exts&&(u=n.extras.exts);for(var l=0;l<u.length;++l){if(t.startSequence(),t.writeOID(u[l].oid),void 0!==u[l].critical&&t.writeBoolean(u[l].critical),u[l].oid===w.altName){t.startSequence(i.Ber.OctetString),t.startSequence(),"host"===o.type&&t.writeString(o.hostname,b(2));for(var c=0;c<s.length;++c)"host"===s[c].type?t.writeString(s[c].hostname,E.DNSName):"email"===s[c].type?t.writeString(s[c].email,E.RFC822Name):(t.startSequence(E.DirectoryName),s[c].toAsn1(t),t.endSequence());t.endSequence(),t.endSequence()}else if(u[l].oid===w.basicConstraints){t.startSequence(i.Ber.OctetString),t.startSequence();var f=-1!==e.purposes.indexOf("ca"),h=u[l].pathLen;t.writeBoolean(f),void 0!==h&&t.writeInt(h),t.endSequence(),t.endSequence()}else if(u[l].oid===w.extKeyUsage)t.startSequence(i.Ber.OctetString),t.startSequence(),e.purposes.forEach(function(e){if("ca"!==e&&-1===A.indexOf(e)){var n=e;void 0!==x[e]&&(n=x[e]),t.writeOID(n)}}),t.endSequence(),t.endSequence();else if(u[l].oid===w.keyUsage){if(t.startSequence(i.Ber.OctetString),void 0!==u[l].bits)t.writeBuffer(u[l].bits,i.Ber.BitString);else{var p=z(e.purposes,A);t.writeBuffer(p,i.Ber.BitString)}t.endSequence()}else t.writeBuffer(u[l].data,i.Ber.OctetString);t.endSequence()}t.endSequence(),t.endSequence()}t.endSequence()}function U(e,t){for(var n=8*(e.length-1)-e[0],r={},i=0;i<n;++i){var o=1+Math.floor(i/8),s=7-i%8,a=1<<s,u=0!=(e[o]&a),l=t[i];u&&"string"==typeof l&&(r[l]=!0)}return Object.keys(r)}function z(e,t){var n=t.length,r=Math.ceil(n/8),i=8*r-n,s=o.alloc(1+r);s[0]=i;for(var a=0;a<n;++a){var u=1+Math.floor(a/8),l=7-a%8,c=1<<l,f=t[a];if(void 0!==f){var h=-1!==e.indexOf(f);h&&(s[u]|=c)}}return s}},function(e,t,n){var r=n(57);function i(e){return e instanceof r.Stream}function o(e){return i(e)&&"function"==typeof e._read&&"object"==typeof e._readableState}function s(e){return i(e)&&"function"==typeof e._write&&"object"==typeof e._writableState}function a(e){return o(e)&&s(e)}e.exports=i,e.exports.isReadable=o,e.exports.isWritable=s,e.exports.isDuplex=a},function(e,t,n){"use strict";var r=n(1875),i=n(1876),o=n(721);e.exports={formats:o,parse:i,stringify:r}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function e(t){for(var n;t.length;){var r=t.pop();if(n=r.obj[r.prop],Array.isArray(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&i.push(n[o]);r.obj[r.prop]=i}}return n},s=function e(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)void 0!==t[i]&&(r[i]=t[i]);return r},a=function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(i.plainObjects||i.allowPrototypes||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var o=t;return Array.isArray(t)&&!Array.isArray(n)&&(o=s(t,i)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(n,o){r.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],n,i):t.push(n):t[o]=n}),t):Object.keys(n).reduce(function(t,o){var s=n[o];return r.call(t,o)?t[o]=e(t[o],s,i):t[o]=s,t},o)},u=function e(t,n){return Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},t)},l=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},c=function e(t){if(0===t.length)return t;for(var n="string"==typeof t?t:String(t),r="",o=0;o<n.length;++o){var s=n.charCodeAt(o);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?r+=n.charAt(o):s<128?r+=i[s]:s<2048?r+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?r+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(o)),r+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return r},f=function e(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var s=n[i],a=s.obj[s.prop],u=Object.keys(a),l=0;l<u.length;++l){var c=u[l],f=a[c];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(n.push({obj:a,prop:c}),r.push(f))}return o(n)},h=function e(t){return"[object RegExp]"===Object.prototype.toString.call(t)},p=function e(t){return null!==t&&void 0!==t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))};e.exports={arrayToObject:s,assign:u,compact:f,decode:l,encode:c,isBuffer:p,isRegExp:h,merge:a}},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,n){"use strict";var r=n(167);function i(e){r.copy(e,this)}e.exports=i},function(e,t,n){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},o={key:n,value:e[n]};return i(r,o)}}),i,o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,s;if(Array.isArray(t)){for(s="[",i=0;i<t.length;i++)i&&(s+=","),s+=e(t[i])||"null";return s+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=o.push(t)-1,u=Object.keys(t).sort(r&&r(t));for(s="",i=0;i<u.length;i++){var l=u[i],c=e(t[l]);c&&(s&&(s+=","),s+=JSON.stringify(l)+":"+c)}return o.splice(a,1),"{"+s+"}"}}(e)}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i="",o=!0===t.schema.$async,s=t.util.schemaHasRulesExcept(t.schema,t.RULES.all,"$ref"),a=t.self._getId(t.schema);if(t.opts.strictKeywords){var u=t.util.schemaUnknownRules(t.schema,t.RULES.keywords);if(u){var l="unknown keyword: "+u;if("log"!==t.opts.strictKeywords)throw new Error(l);t.logger.warn(l)}}if(t.isTop&&(i+=" var validate = ",o&&(t.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(t.opts.sourceCode||t.opts.processCode)&&(i+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof t.schema||!s&&!t.schema.$ref){var n="false schema",c=t.level,f=t.dataLevel,h=t.schema[n],p=t.schemaPath+t.util.getProperty(n),d=t.errSchemaPath+"/"+n,m=!t.opts.allErrors,g,y="data"+(f||""),b="valid"+c;if(!1===t.schema){t.isTop?m=!0:i+=" var "+b+" = false; ";var v=v||[];v.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(g||"false schema")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(d)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: 'boolean schema is false' "),t.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var w=i;i=v.pop(),!t.compositeRule&&m?t.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else t.isTop?i+=o?" return data; ":" validate.errors = null; return true; ":i+=" var "+b+" = true; ";return t.isTop&&(i+=" }; return validate; "),i}if(t.isTop){var _=t.isTop,c=t.level=0,f=t.dataLevel=0,y="data";if(t.rootId=t.resolve.fullPath(t.self._getId(t.root.schema)),t.baseId=t.baseId||t.rootId,delete t.isTop,t.dataPathArr=[void 0],void 0!==t.schema.default&&t.opts.useDefaults&&t.opts.strictDefaults){var k="default is ignored in the schema root";if("log"!==t.opts.strictDefaults)throw new Error(k);t.logger.warn(k)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var c=t.level,f=t.dataLevel,y="data"+(f||"");if(a&&(t.baseId=t.resolve.url(t.baseId,a)),o&&!t.async)throw new Error("async schema in sync schema");i+=" var errs_"+c+" = errors;"}var b="valid"+c,m=!t.opts.allErrors,S="",E="",g,x=t.schema.type,C=Array.isArray(x);if(x&&t.opts.nullable&&!0===t.schema.nullable&&(C?-1==x.indexOf("null")&&(x=x.concat("null")):"null"!=x&&(x=[x,"null"],C=!0)),C&&1==x.length&&(x=x[0],C=!1),t.schema.$ref&&s){if("fail"==t.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+t.errSchemaPath+'" (see option extendRefs)');!0!==t.opts.extendRefs&&(s=!1,t.logger.warn('$ref: keywords ignored in schema at path "'+t.errSchemaPath+'"'))}if(t.schema.$comment&&t.opts.$comment&&(i+=" "+t.RULES.all.$comment.code(t,"$comment")),x){if(t.opts.coerceTypes)var A=t.util.coerceToTypes(t.opts.coerceTypes,x);var I=t.RULES.types[x];if(A||C||!0===I||I&&!ne(I)){var p=t.schemaPath+".type",d=t.errSchemaPath+"/type",p=t.schemaPath+".type",d=t.errSchemaPath+"/type",T=C?"checkDataTypes":"checkDataType";if(i+=" if ("+t.util[T](x,y,!0)+") { ",A){var j="dataType"+c,O="coerced"+c;i+=" var "+j+" = typeof "+y+"; ","array"==t.opts.coerceTypes&&(i+=" if ("+j+" == 'object' && Array.isArray("+y+")) "+j+" = 'array'; "),i+=" var "+O+" = undefined; ";var P="",B=A;if(B)for(var R,N=-1,M=B.length-1;N<M;)R=B[N+=1],N&&(i+=" if ("+O+" === undefined) { ",P+="}"),"array"==t.opts.coerceTypes&&"array"!=R&&(i+=" if ("+j+" == 'array' && "+y+".length == 1) { "+O+" = "+y+" = "+y+"[0]; "+j+" = typeof "+y+"; } "),"string"==R?i+=" if ("+j+" == 'number' || "+j+" == 'boolean') "+O+" = '' + "+y+"; else if ("+y+" === null) "+O+" = ''; ":"number"==R||"integer"==R?(i+=" if ("+j+" == 'boolean' || "+y+" === null || ("+j+" == 'string' && "+y+" && "+y+" == +"+y+" ","integer"==R&&(i+=" && !("+y+" % 1)"),i+=")) "+O+" = +"+y+"; "):"boolean"==R?i+=" if ("+y+" === 'false' || "+y+" === 0 || "+y+" === null) "+O+" = false; else if ("+y+" === 'true' || "+y+" === 1) "+O+" = true; ":"null"==R?i+=" if ("+y+" === '' || "+y+" === 0 || "+y+" === false) "+O+" = null; ":"array"==t.opts.coerceTypes&&"array"==R&&(i+=" if ("+j+" == 'string' || "+j+" == 'number' || "+j+" == 'boolean' || "+y+" == null) "+O+" = ["+y+"]; ");i+=" "+P+" if ("+O+" === undefined) { ";var v=v||[];v.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(d)+" , params: { type: '",i+=C?""+x.join(","):""+x,i+="' } ",!1!==t.opts.messages&&(i+=" , message: 'should be ",i+=C?""+x.join(","):""+x,i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var w=i;i=v.pop(),!t.compositeRule&&m?t.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ";var L=f?"data"+(f-1||""):"parentData",F=f?t.dataPathArr[f]:"parentDataProperty";i+=" "+y+" = "+O+"; ",f||(i+="if ("+L+" !== undefined)"),i+=" "+L+"["+F+"] = "+O+"; } "}else{var v=v||[];v.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(d)+" , params: { type: '",i+=C?""+x.join(","):""+x,i+="' } ",!1!==t.opts.messages&&(i+=" , message: 'should be ",i+=C?""+x.join(","):""+x,i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var w=i;i=v.pop(),!t.compositeRule&&m?t.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(t.schema.$ref&&!s)i+=" "+t.RULES.all.$ref.code(t,"$ref")+" ",m&&(i+=" } if (errors === ",i+=_?"0":"errs_"+c,i+=") { ",E+="}");else{var D=t.RULES;if(D)for(var I,U=-1,z=D.length-1;U<z;)if(I=D[U+=1],ne(I)){if(I.type&&(i+=" if ("+t.util.checkDataType(I.type,y)+") { "),t.opts.useDefaults)if("object"==I.type&&t.schema.properties){var h=t.schema.properties,q=Object.keys(h),K=q;if(K)for(var H,V=-1,W=K.length-1;V<W;){H=K[V+=1];var $=h[H];if(void 0!==$.default){var G=y+t.util.getProperty(H);if(t.compositeRule){if(t.opts.strictDefaults){var k="default is ignored for: "+G;if("log"!==t.opts.strictDefaults)throw new Error(k);t.logger.warn(k)}}else i+=" if ("+G+" === undefined ","empty"==t.opts.useDefaults&&(i+=" || "+G+" === null || "+G+" === '' "),i+=" ) "+G+" = ","shared"==t.opts.useDefaults?i+=" "+t.useDefault($.default)+" ":i+=" "+JSON.stringify($.default)+" ",i+="; "}}}else if("array"==I.type&&Array.isArray(t.schema.items)){var Y=t.schema.items;if(Y)for(var $,N=-1,J=Y.length-1;N<J;)if($=Y[N+=1],void 0!==$.default){var G=y+"["+N+"]";if(t.compositeRule){if(t.opts.strictDefaults){var k="default is ignored for: "+G;if("log"!==t.opts.strictDefaults)throw new Error(k);t.logger.warn(k)}}else i+=" if ("+G+" === undefined ","empty"==t.opts.useDefaults&&(i+=" || "+G+" === null || "+G+" === '' "),i+=" ) "+G+" = ","shared"==t.opts.useDefaults?i+=" "+t.useDefault($.default)+" ":i+=" "+JSON.stringify($.default)+" ",i+="; "}}var Z=I.rules;if(Z)for(var X,Q=-1,ee=Z.length-1;Q<ee;)if(X=Z[Q+=1],re(X)){var te=X.code(t,X.keyword,I.type);te&&(i+=" "+te+" ",m&&(S+="}"))}if(m&&(i+=" "+S+" ",S=""),I.type&&(i+=" } ",x&&x===I.type&&!A)){i+=" else { ";var p=t.schemaPath+".type",d=t.errSchemaPath+"/type",v=v||[];v.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(d)+" , params: { type: '",i+=C?""+x.join(","):""+x,i+="' } ",!1!==t.opts.messages&&(i+=" , message: 'should be ",i+=C?""+x.join(","):""+x,i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+y+" "),i+=" } "):i+=" {} ";var w=i;i=v.pop(),!t.compositeRule&&m?t.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}m&&(i+=" if (errors === ",i+=_?"0":"errs_"+c,i+=") { ",E+="}")}}function ne(e){for(var t=e.rules,n=0;n<t.length;n++)if(re(t[n]))return!0}function re(e){return void 0!==t.schema[e.keyword]||e.implements&&ie(e)}function ie(e){for(var n=e.implements,r=0;r<n.length;r++)if(void 0!==t.schema[n[r]])return!0}return m&&(i+=" "+E+" "),_?(o?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+b+" = errors === errs_"+c+";",i=t.util.cleanUpCode(i),_&&(i=t.util.finalCleanUpCode(i,o)),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f,h="data"+(s||""),p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="maximum"==n,g=m?"exclusiveMaximum":"exclusiveMinimum",y=t.schema[g],b=t.opts.$data&&y&&y.$data,v=m?"<":">",w=m?">":"<",f=void 0;if(b){var _=t.util.getData(y.$data,s,t.dataPathArr),k="exclusive"+o,S="exclType"+o,E="exclIsNumber"+o,x="op"+o,C="' + "+x+" + '";i+=" var schemaExcl"+o+" = "+_+"; ",_="schemaExcl"+o,i+=" var "+k+"; var "+S+" = typeof "+_+"; if ("+S+" != 'boolean' && "+S+" != 'undefined' && "+S+" != 'number') { ";var f=g,A=A||[];A.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: '"+g+" should be boolean' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var I=i;i=A.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+I+"]); ":i+=" validate.errors = ["+I+"]; return false; ":i+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),i+=" "+S+" == 'number' ? ( ("+k+" = "+d+" === undefined || "+_+" "+v+"= "+d+") ? "+h+" "+w+"= "+_+" : "+h+" "+w+" "+d+" ) : ( ("+k+" = "+_+" === true) ? "+h+" "+w+"= "+d+" : "+h+" "+w+" "+d+" ) || "+h+" !== "+h+") { var op"+o+" = "+k+" ? '"+v+"' : '"+v+"='; ",void 0===a&&(f=g,l=t.errSchemaPath+"/"+g,d=_,p=b)}else{var E="number"==typeof y,C=v;if(E&&p){var x="'"+C+"'";i+=" if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),i+=" ( "+d+" === undefined || "+y+" "+v+"= "+d+" ? "+h+" "+w+"= "+y+" : "+h+" "+w+" "+d+" ) || "+h+" !== "+h+") { "}else{E&&void 0===a?(k=!0,f=g,l=t.errSchemaPath+"/"+g,d=y,w+="="):(E&&(d=Math[m?"min":"max"](y,a)),y===(!E||d)?(k=!0,f=g,l=t.errSchemaPath+"/"+g,w+="="):(k=!1,C+="="));var x="'"+C+"'";i+=" if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),i+=" "+h+" "+w+" "+d+" || "+h+" !== "+h+") { "}}f=f||n;var A=A||[];A.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"_limit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { comparison: "+x+", limit: "+d+", exclusive: "+k+" } ",!1!==t.opts.messages&&(i+=" , message: 'should be "+C+" ",i+=p?"' + "+d:d+"'"),t.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var I=i;return i=A.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+I+"]); ":i+=" validate.errors = ["+I+"]; return false; ":i+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f,h="data"+(s||""),p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="maxItems"==n?">":"<";i+="if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),i+=" "+h+".length "+m+" "+d+") { ";var f=n,g=g||[];g.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { limit: "+d+" } ",!1!==t.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==n?"more":"fewer",i+=" than ",i+=p?"' + "+d+" + '":""+a,i+=" items' "),t.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;return i=g.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f,h="data"+(s||""),p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="maxLength"==n?">":"<";i+="if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),!1===t.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+m+" "+d+") { ";var f=n,g=g||[];g.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { limit: "+d+" } ",!1!==t.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==n?"longer":"shorter",i+=" than ",i+=p?"' + "+d+" + '":""+a,i+=" characters' "),t.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;return i=g.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f,h="data"+(s||""),p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="maxProperties"==n?">":"<";i+="if ( ",p&&(i+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "),i+=" Object.keys("+h+").length "+m+" "+d+") { ";var f=n,g=g||[];g.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { limit: "+d+" } ",!1!==t.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==n?"more":"fewer",i+=" than ",i+=p?"' + "+d+" + '":""+a,i+=" properties' "),t.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;return i=g.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}},function(e,t,n){"use strict";function r(e,t,n){this.name="RequestError",this.message=String(e),this.cause=e,this.error=e,this.options=t,this.response=n,Error.captureStackTrace&&Error.captureStackTrace(this)}function i(e,t,n,r){this.name="StatusCodeError",this.statusCode=e,this.message=e+" - "+(JSON&&JSON.stringify?JSON.stringify(t):t),this.error=t,this.options=n,this.response=r,Error.captureStackTrace&&Error.captureStackTrace(this)}function o(e,t,n){this.name="TransformError",this.message=String(e),this.cause=e,this.error=e,this.options=t,this.response=n,Error.captureStackTrace&&Error.captureStackTrace(this)}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,e.exports={RequestError:r,StatusCodeError:i,TransformError:o}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2018, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(706);function i(e){return r.get(e)}t.getPublicSuffix=i},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/function r(){}t.Store=r,r.prototype.synchronous=!1,r.prototype.findCookie=function(e,t,n,r){throw new Error("findCookie is not implemented")},r.prototype.findCookies=function(e,t,n){throw new Error("findCookies is not implemented")},r.prototype.putCookie=function(e,t){throw new Error("putCookie is not implemented")},r.prototype.updateCookie=function(e,t,n){throw new Error("updateCookie is not implemented")},r.prototype.removeCookie=function(e,t,n,r){throw new Error("removeCookie is not implemented")},r.prototype.removeCookies=function(e,t,n){throw new Error("removeCookies is not implemented")},r.prototype.removeAllCookies=function(e){throw new Error("removeAllCookies is not implemented")},r.prototype.getAllCookies=function(e){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(731);function i(e){var t=r.getPublicSuffix(e);if(!t)return null;if(t==e)return[e];for(var n=e.slice(0,-(t.length+1)),i=n.split(".").reverse(),o=t,s=[o];i.length;)o=i.shift()+"."+o,s.push(o);return s}t.permuteDomain=i},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/function r(e,t){if(t===e)return!0;var n=e.indexOf(t);if(0===n){if("/"===t.substr(-1))return!0;if("/"===e.substr(t.length,1))return!0}return!1}t.pathMatch=r},function(e,t,n){!function(){function t(){var e=function(t,n,r){if(t=""+t,r||s===n||(e.last=t<e.last?e.last:t,delete(e.$||{})[a]),r=r||e.$||(e.$={}),!t&&Object.keys(r).length)return r;for(var o=0,u=t.length-1,l=t[o],c,f;!(c=r[l])&&o<u;)l+=t[++o];if(c){if(o!=u)return s!==n&&delete c[a],e(t.slice(++o),n,c||(c={}));if(s===n)return s===(f=c[""])?c:f;c[""]=n}else{if(!i(r,function(e,i){var o=0,a="";if((i||"").length)for(;i[o]==t[o];)a+=i[o++];if(a){if(s===n){if(o<=u)return;return(f||(f={}))[i.slice(o)]=e}var l={};return l[i.slice(o)]=e,o=t.slice(o),""===o?l[""]=n:(l[o]={})[""]=n,r[a]=l,delete r[i],!0}})){if(s===n)return;(r[l]||(r[l]={}))[""]=n}if(s===n)return f}};return e}if(t.map=function e(t,n,r,i){i=i||[];var u="function"==typeof t?t.$||{}:t;if(u){var l=(u[a]||o).sort||(u[a]=function e(){return e.sort=Object.keys(u).sort(),e}()).sort;r=!0===r?{branch:!0}:r||{},r.reverse&&(l=l.slice().reverse());for(var c=r.start,f=r.end,h=0,p=l.length;h<p;h++){var d=l[h],m=u[d],g,y,b;if(m&&""!==d&&a!==d&&(y=i.slice(),y.push(d),b=y.join(""),!(s!==c&&b<(c||"").slice(0,b.length)||s!==f&&(f||"￿")<b))){if(s!==(g=m[""])){if(g=n(g,b,d,i),s!==g)return g}else if(r.branch&&(g=n(s,b,d,i),s!==g))return g;if(i=y,g=e(m,n,r,i),s!==g)return g;i.pop()}}}},Object.keys=Object.keys||function(e){return i(e,function(e,t,n){n(t)})},"undefined"!=typeof window){var r=window.Gun;window.Radix=t}else{var r=n(168);try{e.exports=t}catch(e){}}var i=r.obj.map,o={},s,a=String.fromCharCode(24)}()},function(e,t,n){!function(){function t(e){e=e||{},e.log=e.log||console.log,e.file=String(e.file||"radata");var n=(t.has||(t.has={}))[e.file];if(n)return n;function r(e){return encodeURIComponent(e).replace(/\*/g,"%2A")}function i(e){return y!==e&&(!e||"object"!=typeof e)}e.pack=e.pack||.3*(e.memory?1e3*e.memory*1e3:1399e6),e.until=e.until||e.wait||250,e.batch=e.batch||1e4,e.chunk=e.chunk||10485760,e.code=e.code||{},e.code.from=e.code.from||"!";var a=o.obj.map,u=!1;if(!e.store)return e.log("ERROR: Radisk needs `opt.store` interface with `{get: fn, put: fn (, list: fn)}`!");if(!e.store.put)return e.log("ERROR: Radisk needs `store.put` interface with `(file, data, cb)`!");if(!e.store.get)return e.log("ERROR: Radisk needs `store.get` interface with `(file, cb)`!");e.store.list;var l=function(t,n,r){if(t=""+t,n instanceof Function){var o=r||{};if(r=n,n=l.batch(t),y!==n&&(r(y,l.range(n,o),o),i(n)))return;return l.thrash.at&&(n=l.thrash.at(t),y!==n&&(r(y,l.range(n,o),o),i(n)))?void r(y,n,o):l.read(t,r,o)}if(l.batch(t,n),r&&l.batch.acks.push(r),++l.batch.ed>=e.batch)return l.thrash();l.batch.to||(l.batch.to=setTimeout(l.thrash,e.until||1))},c,f,h,p,d;l.batch=s(),l.batch.acks=[],l.batch.ed=0,l.thrash=function(){var t=l.thrash;if(t.ing)return t.more=!0;t.more=!1,t.ing=!0;var n=t.at=l.batch,r=0;clearTimeout(l.batch.to),l.batch=null,l.batch=s(),l.batch.acks=[],l.batch.ed=0,l.save(n,function(i,o){++r>1?e.log("RAD ERR: Radisk has callbacked multiple times, please report this as a BUG at github.com/amark/gun/issues ! "+r):(i&&e.log("err",i),a(n.acks,function(e){e(i,o)}),t.at=null,t.ing=!1,t.more&&t())})},l.save=function(t,n){var r=function e(){};r.find=function(e,t){if(!(t<r.start))return r.start=t,l.list(r.lex),!0},r.lex=function(t){if(t=y===t?y:decodeURIComponent(t),!t||t>r.start)return r.mix(r.file||e.code.from,r.start,r.end=t),!0;r.file=t},r.mix=function(e,i,o){r.start=r.end=r.file=y,l.parse(e,function(a,u){if(a)return n(a);u=u||s(),s.map(t,function(e,t){if(!(t<i))return o&&o<t?r.start=t:void u(t,e)}),l.write(e,u,r.next)})},r.next=function(e,i){return(r.err=e)?n(e):r.start?s.map(t,r.find):void n(e,i)},s.map(t,r.find)},l.write=function(n,i,o,a){a="object"==typeof a?a:{force:a};var u=function e(){};if(u.text="",u.count=0,u.file=n,u.each=function(n,r,l,c){if(y!==n&&u.count++,e.pack<=(n||"").length)return o("Record too big!"),!0;var f=t.encode(c.length)+"#"+t.encode(l)+(y===n?"":":"+t.encode(n))+"\n";if(e.chunk<u.text.length+f.length&&1<u.count&&!a.force)return u.text="",u.limit=Math.ceil(u.count/2),u.count=0,u.sub=s(),s.map(i,u.slice),!0;u.text+=f},u.write=function(){var t=r(n),i;e.store.put(t,u.text,function(e){if(e)return o(e);l.list.add(t,o)})},u.slice=function(e,t){if(!(t<u.file)){if(u.limit<++u.count){var n=u.file;return u.file=t,u.count=0,l.write(n,u.sub,u.next,a),!0}u.sub(t,e)}},u.next=function(e){if(e)return o(e);u.sub=s(),s.map(i,u.slice)||l.write(u.file,u.sub,o,a)},e.jsonify)return l.write.jsonify(u,n,i,o,a);s.map(i,u.each,!0)||u.write()},l.write.jsonify=function(t,n,r,i,o){var a,u;try{a=JSON.stringify(r.$)}catch(e){return i("Record too big!")}e.chunk<a.length&&!o.force&&s.map(r,t.each,!0)||(t.text=a,t.write())},l.range=function(e,t){if(e&&t){if(y===t.start&&y===t.end)return e;if(i(e))return e;var n=s();return s.map(e,function(e,t){n(t,e)},t),n("")}},c={},l.read=function(t,n,r){if(r=r||{},g&&!r.next){var o=g(t);if(i(o))return void n(y,o,r)}r.span=y!==r.start||y!==r.end;var s=function e(){};s.lex=function(e){var i;if(e=y===e?y:decodeURIComponent(e),i=r.next||t||(r.reverse?r.end||"￿":r.start||""),!e||(r.reverse?e<i:e>i))return(r.next||r.reverse)&&(s.file=e),(i=c[s.file])?(i.push({key:t,ack:n,file:s.file,opt:r}),!0):(c[s.file]=[{key:t,ack:n,file:s.file,opt:r}],s.file?(l.parse(s.file,s.it),!0):(s.it(null,y,{}),!0));s.file=e},s.it=function(t,n,r){(s.err=t)&&e.log("err",t),s.info=r,n&&(g=s.disk=n),n=c[s.file],delete c[s.file],a(n,s.ack)},s.ack=function(e){if(e.ack){var t=e.key,n=e.opt,r=s.info,i=s.disk||m,o=l.range(i(t),n),a=i.last;if(n.parsed=(n.parsed||0)+(r.parsed||0),n.chunks=(n.chunks||0)+1,n.some||(n.some=y!==o),y!==o)e.ack(s.err,o,n);else if(!e.file)return void(!n.some&&e.ack(s.err,y,n));if(!n.span){if(/*!last || */a===t)return void(!n.some&&e.ack(s.err,y,n));if(a&&a>t&&0!=a.indexOf(t))return void(!n.some&&e.ack(s.err,y,n))}n.some&&n.parsed>=n.limit||(n.next=e.file,l.read(t,e.ack,n))}},r.reverse&&(s.lex.reverse=!0),l.list(s.lex)},function(){var n={},i=String.fromCharCode(31);l.parse=function(o,u,l){var c;if(c=n[o])return c.push(u);c=n[o]=[u];var f=function e(){},h={};if(f.disk=s(),f.read=function(t,r){var i,s,s;if(delete n[o],(f.err=t)||(f.not=!r))return a(c,f.ack);if("string"!=typeof r){try{e.pack<=r.length?f.err="Chunk too big!":r=r.toString()}catch(e){f.err=e}if(f.err)return a(c,f.ack)}if(h.parsed=r.length,e.jsonify){try{var u=JSON.parse(r);return f.disk.$=u,void a(c,f.ack)}catch(e){i=e}if("{"===r[0])return f.err=i||"JSON error!",a(c,f.ack)}var i=f.split(r),l=[],p,d,m;if(!i||0!==i[1])return f.err="File '"+o+"' does not have root radix! ",a(c,f.ack);for(;i;)d=m=y,p=i[1],i=f.split(i[2])||"","#"==i[0]&&(d=i[1],l=l.slice(0,p),p<=l.length&&l.push(d)),i=f.split(i[2])||"","\n"!=i[0]&&("="!=i[0]&&":"!=i[0]||(m=i[1]),y!==d&&y!==m&&f.disk(l.join(""),m),i=f.split(i[2]));a(c,f.ack)},f.split=function(e){if(e){var n=[],r={},o=-1,s="",a,u;if(o=e.indexOf(i),e[o])return s=e.slice(0,o),n[0]=s,n[1]=a=t.decode(e.slice(o),r),n[2]=e.slice(o+r.i),n}},f.ack=function(e){if(e)return f.err||f.not?e(f.err,y,h):void e(y,f.disk,h)},l)return f.read(null,l);e.store.get(r(o),f.read)}}(),p=String.fromCharCode(28),d=r(p),l.list=function(e){if(f){var t={reverse:e.reverse?1:0};s.map(f,function(t,n){return e(n)},t)||e()}else{if(h)return h.push(e);h=[e],l.parse(p,l.list.init)}},l.list.add=function(e,t){var n=f(e);if(n||e===d)return t(y,1);f(e,!0),t.listed=(t.listed||0)+1,l.write(p,f,function(e,n){if(e)return t(e);t.listed=(t.listed||0)-1,0===t.listed&&t(y,1)},!0)},l.list.init=function(t,n){if(t)return e.log("list",t),void setTimeout(function(){l.parse(p,l.list.init)},1e3);n?l.list.drain(n):e.store.list?e.store.list(function(e){if(f=f||s(),!e)return l.list.drain(f);l.list.add(e,m)}):l.list.drain(s())},l.list.drain=function(e,t){l.list.dir=f=e,t=h,h=null,o.list.map(t,function(e){l.list(e)})};var m=function(){},g,y;return t.has[e.file]=l,l}var r,i;if(r=String.fromCharCode(31),t.encode=function(e,t,n){n=n||r;var i=n,s;if("string"==typeof e){for(var a=e.indexOf(n);-1!=a;)i+=n,a=e.indexOf(n,a+1);return i+'"'+e+n}return e&&e["#"]&&(s=o.val.link.is(e))?i+"#"+s+i:o.num.is(e)?i+"+"+(e||0)+i:null===e?i+" "+i:!0===e?i+"+"+i:!1===e?i+"-"+i:void 0},t.decode=function(e,t,n){n=n||r;var i="",s=-1,a=0,u,l;if(n===e[0]){for(;n===e[++s];)++a;for(l=e[u=a]||!0;--a>=0;)s=e.indexOf(n,s+1);return-1==s&&(s=e.length),i=e.slice(u+1,s),t&&(t.i=s+1),'"'===l?i:"#"===l?o.val.link.ify(i):"+"===l?0===i.length||parseFloat(i):" "===l?null:"-"!==l&&void 0}},"undefined"!=typeof window){var o=window.Gun,s=window.Radix;window.Radisk=t}else{var o=n(168),s=n(735);try{e.exports=t}catch(e){}}t.Radix=s}()},function(e,t,n){const r=n(115);n(759),n(767),n(1688),n(1723),n(1831),n(1984),"undefined"!=typeof window&&(window.DwebTransports=r),t=e.exports=r},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var f=e[c].replace(a,"%20"),h=f.indexOf(n),p,d,m,g;h>=0?(p=f.substr(0,h),d=f.substr(h+1)):(p=f,d=""),m=decodeURIComponent(p),g=decodeURIComponent(d),r(s,m)?i(s[m])?s[m].push(g):s[m]=[s[m],g]:s[m]=g}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],function(e){return a+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[s]))}).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){function r(e){function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){let n;function s(...e){if(!s.enabled)return;const t=s,i=Number(new Date),o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return n;a++;const o=r.formatters[i];if("function"==typeof o){const r=e[a];n=o.call(t,r),e.splice(a,1),a--}return n}),r.formatArgs.call(t,e);const u=t.log||r.log;u.apply(t,e)}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){const e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){const e=r.instances[t];e.enabled=r.enabled(e.namespace)}}function a(){const e=[...r.names.map(l),...r.skips.map(l).map(e=>"-"+e)].join(",");return r.enable(""),e}function u(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function c(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(t=>{r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){"use strict";t.byteLength=c,t.toByteArray=h,t.fromByteArray=m;for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function l(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("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function f(e,t,n){return 3*(t+n)/4-n}function h(e){for(var t,n=l(e),r=n[0],s=n[1],a=new o(f(e,r,s)),u=0,c=s>0?r-4:r,h=0;h<c;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],a[u++]=t>>16&255,a[u++]=t>>8&255,a[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,a[u++]=255&t),1===s&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t),a}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function d(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(p(r));return i.join("")}function m(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=16383)o.push(d(e,a,a+16383>u?u:a+16383));return 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]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){},function(e,t,n){var r=n(173),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;function u(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}e.exports=u},function(e,t){var n=Object.prototype,r=n.toString;function i(e){return r.call(e)}e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var r=n(171),i=l(r),o=n(747),s=l(o),a=n(132),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=-1,n=e.length;return function r(){return++t<n?{value:e[t],key:t}:null}}function f(e){var t=-1;return function n(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}function h(e){var t=(0,u.default)(e),n=-1,r=t.length;return function i(){var o=t[++n];return n<r?{value:e[o],key:o}:null}}function p(e){if((0,i.default)(e))return c(e);var t=(0,s.default)(e);return t?f(t):h(e)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r&&e[r]&&e[r]()};var r="function"==typeof Symbol&&Symbol.iterator;e.exports=t.default},function(e,t,n){var r=n(749),i=n(293),o=n(68),s=n(390),a=n(391),u=n(392),l=Object.prototype,c=l.hasOwnProperty;function f(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&s(e),h=!n&&!l&&!f&&u(e),p=n||l||f||h,d=p?r(e.length,String):[],m=d.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||d.push(g);return d}e.exports=f},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){var r=n(131),i=n(104),o="[object Arguments]";function s(e){return i(e)&&r(e)==o}e.exports=s},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){var r=n(131),i=n(290),o=n(104),s="[object Arguments]",a="[object Array]",u="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",d="[object Object]",m="[object RegExp]",g="[object Set]",y="[object String]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",k="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",x="[object Int32Array]",C="[object Uint8Array]",A="[object Uint8ClampedArray]",I="[object Uint16Array]",T="[object Uint32Array]",j={};function O(e){return o(e)&&i(e.length)&&!!j[r(e)]}j[_]=j[k]=j[S]=j[E]=j[x]=j[C]=j[A]=j[I]=j[T]=!0,j[s]=j[a]=j[v]=j[u]=j[w]=j[l]=j[c]=j[f]=j[h]=j[p]=j[d]=j[m]=j[g]=j[y]=j[b]=!1,e.exports=O},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){(function(e){var r=n(388),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i,a=s&&r.process,u=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(this,n(75)(e))},function(e,t,n){var r=n(756),i=n(757),o=Object.prototype,s=o.hasOwnProperty;function a(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}e.exports=a},function(e,t){var n=Object.prototype;function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}e.exports=r},function(e,t,n){var r=n(758),i=r(Object.keys,Object);e.exports=i},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){const r=n(134),i=n(115),o=n(289),s=n(32),a=n(20),u=n(5)("dweb-transports:http"),l=n(220);defaulthttpoptions={urlbase:"https://dweb.me"},servercommands={rawfetch:"contenthash",rawstore:"contenturl/rawstore",rawadd:"void/rawadd",rawlist:"metadata/rawlist",get:"get/table",set:"set/table",delete:"delete/table",keys:"keys/table",getall:"getall/table"};class c extends r{constructor(e){super(e),this.options=e,this.urlbase=e.urlbase,this.supportURLs=["contenthash","http","https"],this.supportFunctions=["fetch","store","add","list","reverse","newlisturls","get","set","keys","getall","delete","newtable","newdatabase"],this.supportFeatures=["noCache"],"undefined"==typeof window&&this.supportFunctions.push("createReadStream"),this.supportFeatures=["fetch.range","noCache"],this.name="HTTP",this.status=r.STATUS_LOADED}static setup0(e){let t=r.mergeoptions(defaulthttpoptions,e.http);try{let e=new c(t);return i.addtransport(e),e}catch(e){throw console.error("HTTP unable to setup0",e.message),e}}async p_setup1(e){return this.status=r.STATUS_STARTING,e&&e(this),await this.p_status(),e&&e(this),this}async p_status(){try{this.info=await this.p_info(),this.status=r.STATUS_CONNECTED}catch(e){console.error(this.name,": Error in p_status.info",e.message),this.status=r.STATUS_FAILED}return super.p_status()}_cmdurl(e){return`${this.urlbase}/${e}`}_url(e,t,n){if(!e)throw new errors.CodingError(`${t}: requires url`);return"string"!=typeof e&&(e=e.href),e=e.replace("contenthash:/contenthash",this._cmdurl(t)),e=e.replace("getall/table",t),e+=n?"?"+n:"",e}validFor(e,t,n){return(this.connected()||e.protocol.startsWith("http")&&!e.href.startsWith(this.urlbase))&&this.supports(e,t,n)}async p_rawfetch(e,t={}){if(("string"==typeof e?e:e.href).includes("/getall/table"))throw new Error("Probably dont want to be calling p_rawfetch on a KeyValueTable, especially since dont know if its keyvaluetable or subclass");return await o.p_GET(this._url(e,servercommands.rawfetch),t)}p_rawlist(e){if(!e)throw new errors.CodingError("TransportHTTP.p_rawlist: requires url");return o.p_GET(this._url(e,servercommands.rawlist))}rawreverse(){throw new errors.ToBeImplementedError("Undefined function TransportHTTP.rawreverse")}async p_rawstore(e){console.assert(e,"TransportHttp.p_rawstore: requires data");const t=await o.p_POST(this._cmdurl(servercommands.rawstore),{data:e,contenttype:"application/octet-stream"});let n=s.parse(t),r=n.pathname.split("/");return`contenthash:/contenthash/${r.slice(-1)}`}p_rawadd(e,t){if(!e||!t)throw new errors.CodingError("TransportHTTP.p_rawadd: invalid parms",e,t);const n=l(t.preflight(Object.assign({},t)))+"\n";return o.p_POST(this._url(e,servercommands.rawadd),{data:n,contenttype:"application/json"})}p_newlisturls(e){let t=e._publicurls.map(e=>s.parse(e)).find(e=>"https:"===e.protocol&&["gateway.dweb.me","dweb.me"].includes(e.host)&&(e.pathname.includes("/content/rawfetch")||e.pathname.includes("/contenthash/"))||"contenthash:"===e.protocol&&"contenthash"===e.pathname.split("/")[1]);return t||(t=`contenthash:/contenthash/${e.keypair.verifyexportmultihashsha256_58()}`),[t,t]}async p_f_createReadStream(e,{wanturl:t=!1}={}){try{let n=this;return t?e:function(t){return n.createReadStream(e,t)}}catch(e){throw e}}createReadStream(e,t){let n;return u("createreadstream %s %o",s.parse(e).href,t),n=new a.PassThrough,o.p_GET(this._url(e,servercommands.rawfetch),Object.assign({wantstream:!0},t)).then(e=>e.pipe(n)).catch(e=>{console.warn(this.name,"createReadStream caught error",e.message),"function"==typeof n.destroy?n.destroy(e):n.emit("error",e)}),n}async p_createReadStream(e,t){u("createreadstream %s %o",s.parse(e).href,t);try{return await o.p_GET(this._url(e,servercommands.rawfetch),Object.assign({wantstream:!0},t))}catch(e){throw console.warn(this.name,"caught error",e),e}}async p_newdatabase(e){e.hasOwnProperty("keypair")&&(e=e.keypair.signingexport());let t=`${this.urlbase}/getall/table/${encodeURIComponent(e)}`;return{publicurl:t,privateurl:t}}async p_newtable(e,t){if(!e)throw new errors.CodingError("p_newtable currently requires a pubkey");let n=await this.p_newdatabase(e);return{privateurl:`${n.privateurl}/${t}`,publicurl:`${n.publicurl}/${t}`}}async p_set(e,t,n){if(!e||!t)throw new errors.CodingError("TransportHTTP.p_set: invalid parms",e,keyvalyes);if("string"==typeof t){let r=l([{key:t,value:n}]);await o.p_POST(this._url(e,servercommands.set),{data:r,contenttype:"application/json"})}else{let n=l(Object.keys(t).map(e=>({key:e,value:t[e]})));await o.p_POST(this._url(e,servercommands.set),{data:n,contenttype:"application/json"})}}_keyparm(e){return`key=${encodeURIComponent(e)}`}async p_get(e,t){if(!e&&t)throw new errors.CodingError("TransportHTTP.p_get: requires url and at least one key");let n=Array.isArray(t)?t.map(e=>this._keyparm(e)).join("&"):this._keyparm(t);const r=await o.p_GET(this._url(e,servercommands.get,n));return Array.isArray(t)?r:r[t]}async p_delete(e,t){if(!e&&t)throw new errors.CodingError("TransportHTTP.p_get: requires url and at least one key");let n=t.map(e=>this._keyparm(e)).join("&");await o.p_GET(this._url(e,servercommands.delete,n))}async p_keys(e){if(!e&&keys)throw new errors.CodingError("TransportHTTP.p_get: requires url and at least one key");return await o.p_GET(this._url(e,servercommands.keys))}async p_getall(e){if(!e&&keys)throw new errors.CodingError("TransportHTTP.p_get: requires url and at least one key");return await o.p_GET(this._url(e,servercommands.getall))}p_info(){return o.p_GET(`${this.urlbase}/info`,{retries:5})}static async p_test(e={}){console.log("TransportHTTP.test");try{let t=await this.p_setup(e);console.log("HTTP connected");let n=await t.p_info();console.log("TransportHTTP info=",n),n=await t.p_status(),console.assert(n===r.STATUS_CONNECTED),await t.p_test_kvt("NACL%20VERIFY")}catch(e){throw console.log("Exception thrown in TransportHTTP.test:",e.message),e}}static async test(){return this}}i._transportclasses.HTTP=c,t=e.exports=c},function(e,t){},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(0),s=o.Buffer,a=n(762),u=a.inspect,l=u&&u.custom||"inspect";function c(e,t,n){s.prototype.copy.call(e,t,n)}e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},t.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},t.shift=function e(){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.clear=function e(){this.head=this.tail=null,this.length=0},t.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},t.concat=function e(t){if(0===this.length)return s.alloc(0);for(var n=s.allocUnsafe(t>>>0),r=this.head,i=0;r;)c(r.data,n,i),i+=r.data.length,r=r.next;return n},t.consume=function e(t,n){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():n?this._getString(t):this._getBuffer(t),r},t.first=function e(){return this.head.data},t._getString=function e(t){var n=this.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),t-=s,0===t){s===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++r}return this.length-=r,i},t._getBuffer=function e(t){var n=s.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),t-=a,0===t){a===o.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a));break}++i}return this.length-=i,n},t[l]=function(e,t){return u(this,r({},t,{depth:0,customInspect:!1}))},e}()},function(e,t){},function(e,t,n){"use strict";(function(t){var n=new Set;function r(e){if(!n.has(e)){var r=e+" is an experimental feature. This feature could change at any time";n.add(e),t.emitWarning(r,"ExperimentalWarning")}}function i(){}e.exports.emitExperimentalWarning=t.emitWarning?r:i}).call(this,n(2))},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(294),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[s];if(null!==t){var n=e[h].read();null!==n&&(e[c]=null,e[s]=null,e[a]=null,t(p(n,!1)))}}function m(e){t.nextTick(d,e)}function g(e,t){return function(n,r){e.then(function(){t[l]?n(p(void 0,!0)):t[f](n,r)},r)}}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((r={get stream(){return this[h]},next:function e(){var n=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise(function(e,r){t.nextTick(function(){n[u]?r(n[u]):e(p(void 0,!0))})});var i=this[c],o;if(i)o=new Promise(g(i,this));else{var s=this[h].read();if(null!==s)return Promise.resolve(p(s,!1));o=new Promise(this[f])}return this[c]=o,o}},i(r,Symbol.asyncIterator,function(){return this}),i(r,"return",function e(){var t=this;return new Promise(function(e,n){t[h].destroy(null,function(t){t?n(t):e(p(void 0,!0))})})}),r),y),v=function e(t){var n,r=Object.create(b,(n={},i(n,h,{value:t,writable:!0}),i(n,s,{value:null,writable:!0}),i(n,a,{value:null,writable:!0}),i(n,u,{value:null,writable:!0}),i(n,l,{value:t._readableState.endEmitted,writable:!0}),i(n,f,{value:function e(t,n){var i=r[h].read();i?(r[c]=null,r[s]=null,r[a]=null,t(p(i,!1))):(r[s]=t,r[a]=n)},writable:!0}),n));return r[c]=null,o(t,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[c]=null,r[s]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[a]=null,n(p(void 0,!0))),r[l]=!0}),t.on("readable",m.bind(null,r)),r};e.exports=v}).call(this,n(2))},function(e,t,n){"use strict";e.exports=i;var r=n(400);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(1)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;function i(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var o=n(135).codes,s=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function l(e){return e.setHeader&&"function"==typeof e.abort}function c(e,t,o,s){s=i(s);var u=!1;e.on("close",function(){u=!0}),void 0===r&&(r=n(294)),r(e,{readable:t,writable:o},function(e){if(e)return s(e);u=!0,s()});var c=!1;return function(t){if(!u&&!c)return c=!0,l(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new a("pipe"))}}function f(e){e()}function h(e,t){return e.pipe(t)}function p(e){return e.length?"function"!=typeof e[e.length-1]?u:e.pop():u}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=p(t),i;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map(function(e,n){var s=n<t.length-1,a=n>0;return c(e,s,a,function(e){i||(i=e),e&&o.forEach(f),s||(o.forEach(f),r(i))})});return t.reduce(h)}e.exports=d},function(e,t,n){(function(r,i){const o=n(289),s=n(5)("dweb-transports:ipfs"),a=n(768),u=n(1459),l=n(9),c=n(48),f=n(32),h=n(20),p=n(97),d=n(134),m=n(115),g=n(170),y={repo:"/tmp/dweb_ipfsv3107",config:{Bootstrap:["/dns4/dweb.me/tcp/4245/wss/ipfs/QmQz3p44VVQDeAieaW28DMjcTVzLbpxqaQB9bkXnyd7HY5"]},EXPERIMENTAL:{pubsub:!0},preload:{enabled:!1}};class b extends d{constructor(e){super(e),e.urlUrlstore&&(this.urlUrlstore=e.urlUrlstore,delete e.urlUrlstore),this.ipfs=void 0,this.options=e,this.name="IPFS",this.supportURLs=["ipfs"],this.supportFunctions=["fetch","store","seed","createReadStream"],this.supportFeatures=["noCache"],this.status=d.STATUS_LOADED}_ipfsversion(e,t,n){e.version((r,i)=>{r?(s("IPFS via %s present but unresponsive: %o",t,i),this.ipfstype="FAILED",n(r)):(s("IPFS available via %s: %o",t,i),this.ipfstype=t,n(null,e))})}IPFSAutoConnect(e){if(r.ipfs)this._ipfsversion(r.ipfs,"global.ipfs",e);else if("undefined"!=typeof window&&window.ipfs)this._ipfsversion(window.ipfs,"window.ipfs",e);else{var t=u("localhost","5001",{protocol:"http"});t.version((n,r)=>{n?(s("IPFS via API failed %s, trying running own IPFS client",n.message),t=new a(this.options),t.on("ready",()=>{this._ipfsversion(t,"client",e)}),t.on("error",t=>{s("IPFS via client error %s",t.message),e(t)})):this._ipfsversion(t,"API",e)})}}static setup0(e){const t=d.mergeoptions(y,e.ipfs);s("setup options=%o",t);const n=new b(t);return m.addtransport(n),n}p_setup1(e,t){if(!t)return new Promise((e,t)=>{try{n.call(this,(n,r)=>{n?t(n):e(r)})}catch(e){t(e)}});try{n.call(this,t)}catch(e){t(e)}function n(t){this.status=d.STATUS_STARTING,e&&e(this),this.IPFSAutoConnect((n,r)=>{n?(s("Failed to connect %s",n.message),this.status=d.STATUS_FAILED):(this.ipfs=r,this.status=d.STATUS_CONNECTED),e&&e(this),t(null,this)})}}p_setup2(e){return this.status===d.STATUS_FAILED&&s("Stage 1 failed, skipping"),this}p_stop(e){return new Promise((t,n)=>{"client"===this.ipfstype?this.ipfs.stop((r,i)=>{this.status=d.STATUS_FAILED,e&&e(this),r?n(r):t(i)}):(this.status=d.STATUS_FAILED,e&&e(this),t(this))})}async p_status(){return this.status=await this.ipfs.isOnline()?d.STATUS_CONNECTED:d.STATUS_FAILED,super.p_status()}static urlFrom(e){if(e instanceof l)return"ipfs:/ipfs/"+e.toBaseEncodedString();if("object"==typeof e&&e.hash)return"ipfs:/ipfs/"+e.hash;if("string"==typeof e)return"ipfs:/ipfs/"+e;throw new p.CodingError("TransportIPFS.urlFrom: Cant convert to url from",e)}static cidFrom(e){if(e instanceof l)return e;if("string"==typeof e&&(e=f.parse(e)),e&&e.pathname){const t=e.pathname.split("/");if(!["ipfs:","dweb:"].includes(e.protocol)||"ipfs"!==t[1]||t.length<3)throw new p.TransportError("TransportIPFS.cidFrom bad format for url should be dweb: or ipfs:/ipfs/...: "+e.href);if(t.length>3)throw new p.TransportError("TransportIPFS.cidFrom not supporting paths in url yet, should be dweb: or ipfs:/ipfs/...: "+e.href);return new l(t[2])}throw new p.CodingError("TransportIPFS.cidFrom: Cant convert url",e)}static _stringFrom(e){return e instanceof l?"/ipfs/"+e.toBaseEncodedString():"object"==typeof e&&e.path?e.path:void 0}static ipfsFrom(e){if(e=this._stringFrom(e),e.indexOf("/ipfs/")>-1)return e.slice(e.indexOf("/ipfs/"));throw new p.CodingError(`TransportIPFS.ipfsFrom: Cant convert url ${e} into a path starting /ipfs/`)}static ipfsGatewayFrom(e){if(e=this._stringFrom(e),e.indexOf("/ipfs/")>-1)return"https://ipfs.io"+e.slice(e.indexOf("/ipfs/"));throw new p.CodingError(`TransportIPFS.ipfsGatewayFrom: Cant convert url ${e} into a path starting /ipfs/`)}static multihashFrom(e){if(e instanceof l)return e.toBaseEncodedString();if("object"==typeof e&&e.path&&(e=e.path),"string"==typeof e){const t=e.indexOf("/ipfs/");if(t>-1)return e.slice(t+6)}throw new p.CodingError(`Cant turn ${e} into a multihash`)}async p_rawfetch(e,{timeoutMS:t=6e4,relay:n=!1}={}){if(!e)throw new p.CodingError("TransportIPFS.p_rawfetch: requires url");const r=b.cidFrom(e),i=b.ipfsFrom(e);try{const n=await g.p_timeout(this.ipfs.dag.get(r),t,"Timed out IPFS fetch of "+b._stringFrom(r));if(n.remainderPath.length)throw new p.TransportError("Not yet supporting paths in p_rawfetch");let a;return"DAGNode"===n.value.constructor.name?a=await this.ipfs.cat(i):(s("Found a raw IPFS block (unusual) - not a DAGNode - handling as such"),a=n.value),a}catch(n){s("Caught error '%s' fetching via IPFS, trying IPFS HTTP gateway",n.message);try{let n=b.ipfsGatewayFrom(e);return await g.p_timeout(o.p_GET(n),t,"Timed out IPFS fetch of "+n)}catch(e){throw e}}}async p_rawstore(e){console.assert(e,"TransportIPFS.p_rawstore: requires data");const t=e instanceof i?e:new i(e),n=(await this.ipfs.add(t,{"cid-version":1,hashAlg:"sha2-256"}))[0];return b.urlFrom(n)}seed({directoryPath:e,fileRelativePath:t,ipfsHash:n,urlToFile:r},i){if(this.urlUrlstore&&r){const e=`${this.urlUrlstore}?arg=${encodeURIComponent(r)}`;o.p_GET(e,{retries:0},(e,t)=>{e?(s("IPFS.seed for %s failed in http: %s",r,e.message),i(e)):(s("Added %s to IPFS key=",r,t.Key),n&&n!==t.Key&&s("ipfs hash doesnt match expected metadata has %s daemon returned %s",n,t.Key),i(null,t))})}else s("IPFS.seed support requires urlUrlstore and urlToFile"),i(new Error("IPFS.seed support requires urlUrlstore and urlToFile"))}async p_f_createReadStream(e,{wanturl:t=!1}={}){let n;try{let r=e.pathname.split("/ipfs/")[1];if(r.includes("/"))throw new CodingError("Should not be seeing URLS with a path here:"+e);let i=this;return t?e:function e(t){s("reading from stream %o %o",r,t||"");const o=t?t.start:0,a=t&&t.end?o+t.end+1:void 0;return n&&n.destroy&&n.destroy(),n=i.ipfs.catReadableStream(r,{offset:o,length:a&&a-o}),n.on("error",e=>console.error(e)),n}}catch(e){throw n&&n.destroy&&n.destroy(),e}}static async p_test(e){console.log("TransportIPFS.test");try{const t=await this.p_setup(e);console.log(t.name,"setup");const n=await t.p_status();let r;console.assert(n===d.STATUS_CONNECTED);const i="The quick brown fox",o="ipfs:/ipfs/zdpuAscRnisRkYnEyJAp1LydQ3po25rCEDPPEDMymYRfN1yPK",s="1114",a=await t.p_rawstore(i);console.log("rawstore returned",a);const u=b.cidFrom(a);console.assert(a===o,"url should match url from rawstore");const l=a.split("/")[2],c=b.urlFrom(u);console.assert(a===c,"Should round trip"),r=a;const f=await t.p_rawfetch(r);return console.assert(f.toString()===i,"Should fetch block stored above"),t}catch(e){throw console.log("Exception thrown in TransportIPFS.test:",e.message),e}}}m._transportclasses.IPFS=b,t=e.exports=b}).call(this,n(8),n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(401),o=n(769),s=n(23),a=n(44),u=n(64),l=n(65),c=n(24),f=n(35),h=n(484),p=n(88),d=n(9),m=n(5),g=n(181),y=n(6),b=n(959),v=n(961),w=n(962),_=n(1321),k=n(1322),S=n(1326),E={get"bitcoin-block"(){return n(1327)},get"eth-account-snapshot"(){return n(126).ethAccountSnapshot},get"eth-block"(){return n(126).ethBlock},get"eth-block-list"(){return n(126).ethBlockList},get"eth-state-trie"(){return n(126).ethStateTrie},get"eth-storage-trie"(){return n(126).ethStorageTrie},get"eth-tx"(){return n(126).ethTx},get"eth-tx-trie"(){return n(126).ethTxTrie},get"git-raw"(){return n(1424)},get"zcash-block"(){return n(1430)}};class x extends y{constructor(e){super();const t={init:!0,start:!0,EXPERIMENTAL:{},preload:{enabled:!0,addresses:["/dnsaddr/node0.preload.ipfs.io/https","/dnsaddr/node1.preload.ipfs.io/https"]}};e=b.validate(e||{}),this._options=g(e,t),!1===e.init&&(this._options.init=!1),!1!==e.start&&(this._options.start=!0),"string"==typeof e.repo||void 0===e.repo?this._repo=_(e.repo):this._repo=e.repo,this.log=m("jsipfs"),this.log.err=m("jsipfs:err"),this.types={Buffer:r,PeerId:s,PeerInfo:a,multiaddr:c,multibase:p,multihash:f,CID:d},this._peerInfoBook=new h,this._peerInfo=void 0,this._bitswap=void 0,this._blockService=new i(this._repo),this._ipld=new o({blockService:this._blockService,loadFormat:(e,t)=>{if(this.log("Loading IPLD format",e),E[e])return t(null,E[e]);t(new Error(`Missing IPLD format "${e}"`))}}),this._preload=k(this),this._mfsPreload=S(this),this._ipns=void 0,this._print=this._options.silent?this.log:console.log,this.init=w.init(this),this.preStart=w.preStart(this),this.start=w.start(this),this.stop=w.stop(this),this.shutdown=this.stop,this.isOnline=w.isOnline(this),Object.assign(this,w.filesRegular(this)),this.version=w.version(this),this.id=w.id(this),this.repo=w.repo(this),this.bootstrap=w.bootstrap(this),this.config=w.config(this),this.block=w.block(this),this.object=w.object(this),this.dag=w.dag(this),this.files=w.filesMFS(this),this.libp2p=null,this.swarm=w.swarm(this),this.name=w.name(this),this.bitswap=w.bitswap(this),this.pin=w.pin(this),this.ping=w.ping(this),this.pingPullStream=w.pingPullStream(this),this.pingReadableStream=w.pingReadableStream(this),this.pubsub=w.pubsub(this),this.dht=w.dht(this),this.dns=w.dns(this),this.key=w.key(this),this.stats=w.stats(this),this.resolve=w.resolve(this),this._options.EXPERIMENTAL.pubsub&&this.log("EXPERIMENTAL pubsub is enabled"),this._options.EXPERIMENTAL.ipnsPubsub&&(this._options.EXPERIMENTAL.pubsub||(this.log("EXPERIMENTAL pubsub is enabled to use IPNS pubsub"),this._options.EXPERIMENTAL.pubsub=!0),this.log("EXPERIMENTAL IPNS pubsub is enabled")),this._options.EXPERIMENTAL.sharding&&this.log("EXPERIMENTAL sharding is enabled"),this._options.EXPERIMENTAL.dht&&this.log("EXPERIMENTAL Kademlia DHT is enabled"),this.state=n(1458)(this),this.util={crypto:u,isIPFS:l},v(this)}}t=e.exports=x,t.createNode=(e=>new x(e))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(137),i=n(26),o=n(9),s=n(409),a=n(224),u=n(401),l=n(61).join,c=n(61).sep,f=n(70).source,h=n(438),p=n(99),d=n(40),m=n(11),g=n(33).MemoryDatastore,y=n(439),b=n(304),v=n(38),w=n(889);function _(){}class k{constructor(e){const t=y(k.defaultOptions,e);if(!t.blockService)throw new Error("Missing blockservice");this.bs=t.blockService,this.resolvers={},this.support={},this.support.add=((e,t,n)=>{if(this.resolvers[e])throw new Error('Resolver already exists for codec "'+e+'"');this.resolvers[e]={resolver:t,util:n}}),this.support.load=t.loadFormat||((e,t)=>{t(new Error(`No resolver found for codec "${e}"`))}),this.support.rm=(e=>{this.resolvers[e]&&delete this.resolvers[e]});for(const e of t.formats){const{resolver:t,util:n}=e,r=t.multicodec;this.support.add(r,t,n)}}get(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n={}),"string"==typeof t&&(t=l("/",t).substr(1).split(c).join("/")),""===t||!t)return this._get(e,(t,n)=>{if(t)return r(t);r(null,{value:n,remainderPath:"",cid:e})});let i;s(n=>{this._getFormat(e.codec,(r,o)=>{if(r)return n(r);this.bs.get(e,(e,r)=>{if(e)return n(e);o.resolver.resolve(r.data,t,(e,r)=>{if(e)return n(e);i=r.value,t=r.remainderPath,n()})})})},()=>{const r=!t||""===t||"/"===t,o=i&&!k._maybeCID(i);return r&&o||n.localResolve?(e=k._maybeCID(i)||e,!0):(i=k._maybeCID(i),i&&(e=i),!1)},(n,o)=>n?r(n):r(null,{value:i,remainderPath:t,cid:e}))}getStream(e,t,n){const r=f();return this.get(e,t,n,(e,t)=>{if(e)return r.resolve(i.error(e));r.resolve(i.values([t]))}),r}getMany(e,t){if(!Array.isArray(e))return t(new Error("Argument must be an array of CIDs"));this.bs.getMany(e,(e,n)=>{if(e)return t(e);p(n,(e,t)=>{this._getFormat(e.cid.codec,(n,r)=>{if(n)return t(n);r.util.deserialize(e.data,t)})},t)})}put(e,t,n){return"function"==typeof t?(n=t,setImmediate(()=>n(new Error("IPLDResolver.put requires options")))):(n=n||_,t.cid&&o.isCID(t.cid)?t.onlyHash?setImmediate(()=>n(null,t.cid)):this._put(t.cid,e,n):void this._getFormat(t.format,(r,i)=>{if(r)return n(r);i.util.cid(e,t,(r,i)=>r?n(r):t.onlyHash?n(null,i):void this._put(i,e,n))}))}treeStream(e,t,n){let r;return"object"==typeof t&&(n=t,t=void 0),n=n||{},n.recursive||(r=f(),m([t=>this._getFormat(e.codec,t),(t,n)=>this.bs.get(e,(e,r)=>{if(e)return n(e);n(null,t,r)}),(e,t,n)=>e.resolver.tree(t.data,n)],(e,t)=>{if(e)return r.abort(e),r;r.resolve(i.values(t))})),n.recursive&&(r=i(h.widthFirst({basePath:null,cid:e},e=>{if("string"==typeof e)return i.empty();const t=f(),n=e.cid;return m([e=>this._getFormat(n.codec,e),(e,t)=>this.bs.get(n,(n,r)=>{if(n)return t(n);t(null,e,r)}),(e,t,n)=>e.resolver.tree(t.data,(r,i)=>{if(r)return n(r);p(i,(n,r)=>{e.resolver.isLink(t.data,n,(e,t)=>{if(e)return r(e);r(null,{path:n,link:t})})},n)})],(n,r)=>{if(n)return t.abort(n),t;t.resolve(i.values(r.map(t=>{const n=e.basePath?e.basePath+"/"+t.path:t.path;return t.link?{basePath:n,cid:k._maybeCID(t.link)}:n})))}),t}),i.map(e=>"string"==typeof e?e:e.basePath),i.filter(Boolean))),t?i(r,i.map(e=>{if(0===e.indexOf(t))return e=e.slice(t.length+1),e}),i.filter(Boolean)):r}remove(e,t){this.bs.delete(e,t)}_get(e,t){m([t=>this._getFormat(e.codec,t),(t,n)=>this.bs.get(e,(e,r)=>{if(e)return n(e);n(null,t,r)}),(e,t,n)=>{e.util.deserialize(t.data,(e,t)=>{if(e)return n(e);n(null,t)})}],t)}_getFormat(e,t){if(this.resolvers[e])return t(null,this.resolvers[e]);this.support.load(e,(n,r)=>{if(n)return t(n);this.resolvers[e]=r,t(null,r)})}_put(e,t,n){n=n||_,m([t=>this._getFormat(e.codec,t),(e,n)=>e.util.serialize(t,n),(t,n)=>this.bs.put(new r(t,e),n)],t=>{if(t)return n(t);n(null,e)})}static _maybeCID(e){return o.isCID(e)?e:e&&void 0!==e["/"]?new o(e["/"]):null}}k.defaultOptions={formats:[b,v,w]},k.inMemory=function(e){const t=new a("in-memory",{storageBackends:{root:g,blocks:g,datastore:g},lock:"memory"}),n=new u(t);d([e=>t.init({},e),e=>t.open(e)],t=>{if(t)return e(t);e(null,new k({blockService:n}))})},e.exports=k},function(e,t,n){"use strict";(function(t){const r=n(35),i=n(88),o=n(295),s=n(175),a=n(785),u=n(53);class l{constructor(e,n,s,a){if(c.isCID(e)){const n=e;return this.version=n.version,this.codec=n.codec,this.multihash=t.from(n.multihash),void(this.multibaseName=n.multibaseName||(0===n.version?"base58btc":"base32"))}if("string"==typeof e){const t=i.isEncoded(e);if(t){const n=i.decode(e);this.version=parseInt(n.slice(0,1).toString("hex"),16),this.codec=o.getCodec(n.slice(1)),this.multihash=o.rmPrefix(n.slice(1)),this.multibaseName=t}else this.version=0,this.codec="dag-pb",this.multihash=r.fromB58String(e),this.multibaseName="base58btc";return l.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(t.isBuffer(e)){const t=e.slice(0,1),n=parseInt(t.toString("hex"),16);if(1===n){const t=e;this.version=n,this.codec=o.getCodec(t.slice(1)),this.multihash=o.rmPrefix(t.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";l.validateCID(this)}else this.version=e,this.codec=n,this.multihash=s,this.multibaseName=a||(0===e?"base58btc":"base32"),l.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),r.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=r.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new c(0,this.codec,this.multihash)}toV1(){return new c(1,this.codec,this.multihash)}toBaseEncodedString(e=this.multibaseName){if(this.string&&e===this.multibaseName)return this.string;let t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=r.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=i.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const c=u(l,{className:"CID",symbolName:"@ipld/js-cid/CID"});c.codecs=s,e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){const r=n(4).Buffer;e.exports=function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");const n=new Uint8Array(256);n.fill(255);for(let e=0;e<t.length;e++){const r=t.charAt(e),i=r.charCodeAt(0);if(255!==n[i])throw new TypeError(r+" is ambiguous");n[i]=e}const i=t.length,o=t.charAt(0),s=Math.log(i)/Math.log(256),a=Math.log(256)/Math.log(i);function u(e){if(!r.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";let n=0,s=0,u=0;const l=e.length;for(;u!==l&&0===e[u];)u++,n++;const c=(l-u)*a+1>>>0,f=new Uint8Array(c);for(;u!==l;){let t=e[u],n=0;for(let e=c-1;(0!==t||n<s)&&-1!==e;e--,n++)t+=256*f[e]>>>0,f[e]=t%i>>>0,t=t/i>>>0;if(0!==t)throw new Error("Non-zero carry");s=n,u++}let h=c-s;for(;h!==c&&0===f[h];)h++;let p=o.repeat(n);for(;h<c;++h)p+=t.charAt(f[h]);return p}function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);let t=0;if(" "===e[t])return;let a=0,u=0;for(;e[t]===o;)a++,t++;const l=(e.length-t)*s+1>>>0,c=new Uint8Array(l);for(;e[t];){let r=n[e.charCodeAt(t)];if(255===r)return;let o=0;for(let e=l-1;(0!==r||o<u)&&-1!==e;e--,o++)r+=i*c[e]>>>0,c[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");u=o,t++}if(" "===e[t])return;let f=l-u;for(;f!==l&&0===c[f];)f++;const h=r.allocUnsafe(a+(l-f));h.fill(0,0,a);let p=a;for(;f!==l;)h[p++]=c[f++];return h}function c(e){const t=l(e);if(t)return t;throw new Error("Non-base"+i+" character")}return{encode:u,decodeUnsafe:l,decode:c}}},function(e,t){e.exports=s;var n=128,r=127,i=-128,o=Math.pow(2,31);function s(e,t,r){t=t||[],r=r||0;for(var a=r;e>=o;)t[r++]=255&e|n,e/=128;for(;e&i;)t[r++]=255&e|n,e>>>=7;return t[r]=0|e,s.bytes=r-a+1,t}},function(e,t){e.exports=i;var n=128,r=127;function i(e,t){var o=0,t=t||0,s=0,a=t,u,l=e.length;do{if(a>=l)throw i.bytes=0,new RangeError("Could not decode varint");u=e[a++],o+=s<28?(u&r)<<s:(u&r)*Math.pow(2,s),s+=7}while(u>=n);return i.bytes=a-t,o}},function(e,t){var n=Math.pow(2,7),r=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),s=Math.pow(2,35),a=Math.pow(2,42),u=Math.pow(2,49),l=Math.pow(2,56),c=Math.pow(2,63);e.exports=function(e){return e<n?1:e<r?2:e<i?3:e<o?4:e<s?5:e<a?6:e<u?7:e<l?8:e<c?9:10}},function(e,t,n){"use strict";const r=n(776),i=n(777),o=n(778),s=n(779),a=n(780),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",s,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",s,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",s,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",s,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",s,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],l=u.reduce((e,t)=>(e[t[0]]=new r(t[0],t[1],t[2],t[3]),e),{}),c=u.reduce((e,t)=>(e[t[1]]=l[t[0]],e),{});e.exports={names:l,codes:c}},function(e,t,n){"use strict";class r{constructor(e,t,n,r){this.name=e,this.code=t,this.alphabet=r,n&&r&&(this.engine=n(r))}encode(e){return this.engine.encode(e)}decode(e){return this.engine.decode(e)}isImplemented(){return this.engine}}e.exports=r},function(e,t,n){var r=n(4).Buffer;e.exports=function e(t){for(var n={},i=t.length,o=t.charAt(0),s=0;s<t.length;s++){var a=t.charAt(s);if(void 0!==n[a])throw new TypeError(a+" is ambiguous");n[a]=s}function u(e){if(0===e.length)return"";for(var n=[0],r=0;r<e.length;++r){for(var s=0,a=e[r];s<n.length;++s)a+=n[s]<<8,n[s]=a%i,a=a/i|0;for(;a>0;)n.push(a%i),a=a/i|0}for(var u="",l=0;0===e[l]&&l<e.length-1;++l)u+=o;for(var c=n.length-1;c>=0;--c)u+=t[n[c]];return u}function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return r.allocUnsafe(0);for(var t=[0],s=0;s<e.length;s++){var a=n[e[s]];if(void 0===a)return;for(var u=0,l=a;u<t.length;++u)l+=t[u]*i,t[u]=255&l,l>>=8;for(;l>0;)t.push(255&l),l>>=8}for(var c=0;e[c]===o&&c<e.length-1;++c)t.push(0);return r.from(t.reverse())}function c(e){var t=l(e);if(t)return t;throw new Error("Non-base"+i+" character")}return{encode:u,decodeUnsafe:l,decode:c}}},function(e,t,n){"use strict";(function(t){e.exports=function e(n){return{encode:e=>"string"==typeof e?t.from(e).toString("hex"):e.toString("hex"),decode(e){for(let t of e)if(n.indexOf(t)<0)throw new Error("invalid base16 character");return t.from(e,"hex")}}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){function n(e,t){e=e.replace(new RegExp("=","g"),"");let n=e.length,r=0,i=0,o=0,s=new Uint8Array(5*n/8|0);for(let a=0;a<n;a++)i=i<<5|t.indexOf(e[a]),r+=5,r>=8&&(s[o++]=i>>>r-8&255,r-=8);return s.buffer}function r(e,t){let n=e.byteLength,r=new Uint8Array(e),i=t.indexOf("=")===t.length-1;i&&(t=t.substring(0,t.length-2));let o=0,s=0,a="";for(let e=0;e<n;e++)for(s=s<<8|r[e],o+=8;o>=5;)a+=t[s>>>o-5&31],o-=5;if(o>0&&(a+=t[s<<5-o&31]),i)for(;a.length%8!=0;)a+="=";return a}e.exports=function e(i){return{encode:e=>r("string"==typeof e?t.from(e):e,i),decode(e){for(let t of e)if(i.indexOf(t)<0)throw new Error("invalid base32 character");return n(e,i)}}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){e.exports=function e(n){const r=n.indexOf("=")>-1,i=n.indexOf("-")>-1&&n.indexOf("_")>-1;return{encode(e){let n="";n="string"==typeof e?t.from(e).toString("base64"):e.toString("base64"),i&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));const o=n.indexOf("=");return o>0&&!r&&(n=n.substring(0,o)),n},decode(e){for(let t of e)if(n.indexOf(t)<0)throw new Error("invalid base64 character");return t.from(e,"base64")}}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(175),i=n(404).varintBufferEncode,o={};e.exports=o;for(let e in r){let t=r[e];o[e]=i(t)}},function(e,t,n){"use strict";const r=n(175),i={};e.exports=i;for(let e in r){let t=r[e];i[t.toString("hex")]=e}},function(e,t,n){"use strict";e.exports=Object.freeze({PROTOBUF:80,CBOR:81,RLP:96,BENCODE:99,MULTICODEC:48,MULTIHASH:49,MULTIADDR:50,MULTIBASE:51,IDENTITY:0,SHA1:17,SHA2_256:18,SHA2_512:19,SHA3_512:20,SHA3_384:21,SHA3_256:22,SHA3_224:23,SHAKE_128:24,SHAKE_256:25,KECCAK_224:26,KECCAK_256:27,KECCAK_384:28,KECCAK_512:29,MURMUR3_128:34,MURMUR3_32:35,DBL_SHA2_256:86,MD4:212,MD5:213,BMT:214,X11:4352,BLAKE2B_8:45569,BLAKE2B_16:45570,BLAKE2B_24:45571,BLAKE2B_32:45572,BLAKE2B_40:45573,BLAKE2B_48:45574,BLAKE2B_56:45575,BLAKE2B_64:45576,BLAKE2B_72:45577,BLAKE2B_80:45578,BLAKE2B_88:45579,BLAKE2B_96:45580,BLAKE2B_104:45581,BLAKE2B_112:45582,BLAKE2B_120:45583,BLAKE2B_128:45584,BLAKE2B_136:45585,BLAKE2B_144:45586,BLAKE2B_152:45587,BLAKE2B_160:45588,BLAKE2B_168:45589,BLAKE2B_176:45590,BLAKE2B_184:45591,BLAKE2B_192:45592,BLAKE2B_200:45593,BLAKE2B_208:45594,BLAKE2B_216:45595,BLAKE2B_224:45596,BLAKE2B_232:45597,BLAKE2B_240:45598,BLAKE2B_248:45599,BLAKE2B_256:45600,BLAKE2B_264:45601,BLAKE2B_272:45602,BLAKE2B_280:45603,BLAKE2B_288:45604,BLAKE2B_296:45605,BLAKE2B_304:45606,BLAKE2B_312:45607,BLAKE2B_320:45608,BLAKE2B_328:45609,BLAKE2B_336:45610,BLAKE2B_344:45611,BLAKE2B_352:45612,BLAKE2B_360:45613,BLAKE2B_368:45614,BLAKE2B_376:45615,BLAKE2B_384:45616,BLAKE2B_392:45617,BLAKE2B_400:45618,BLAKE2B_408:45619,BLAKE2B_416:45620,BLAKE2B_424:45621,BLAKE2B_432:45622,BLAKE2B_440:45623,BLAKE2B_448:45624,BLAKE2B_456:45625,BLAKE2B_464:45626,BLAKE2B_472:45627,BLAKE2B_480:45628,BLAKE2B_488:45629,BLAKE2B_496:45630,BLAKE2B_504:45631,BLAKE2B_512:45632,BLAKE2S_8:45633,BLAKE2S_16:45634,BLAKE2S_24:45635,BLAKE2S_32:45636,BLAKE2S_40:45637,BLAKE2S_48:45638,BLAKE2S_56:45639,BLAKE2S_64:45640,BLAKE2S_72:45641,BLAKE2S_80:45642,BLAKE2S_88:45643,BLAKE2S_96:45644,BLAKE2S_104:45645,BLAKE2S_112:45646,BLAKE2S_120:45647,BLAKE2S_128:45648,BLAKE2S_136:45649,BLAKE2S_144:45650,BLAKE2S_152:45651,BLAKE2S_160:45652,BLAKE2S_168:45653,BLAKE2S_176:45654,BLAKE2S_184:45655,BLAKE2S_192:45656,BLAKE2S_200:45657,BLAKE2S_208:45658,BLAKE2S_216:45659,BLAKE2S_224:45660,BLAKE2S_232:45661,BLAKE2S_240:45662,BLAKE2S_248:45663,BLAKE2S_256:45664,SKEIN256_8:45825,SKEIN256_16:45826,SKEIN256_24:45827,SKEIN256_32:45828,SKEIN256_40:45829,SKEIN256_48:45830,SKEIN256_56:45831,SKEIN256_64:45832,SKEIN256_72:45833,SKEIN256_80:45834,SKEIN256_88:45835,SKEIN256_96:45836,SKEIN256_104:45837,SKEIN256_112:45838,SKEIN256_120:45839,SKEIN256_128:45840,SKEIN256_136:45841,SKEIN256_144:45842,SKEIN256_152:45843,SKEIN256_160:45844,SKEIN256_168:45845,SKEIN256_176:45846,SKEIN256_184:45847,SKEIN256_192:45848,SKEIN256_200:45849,SKEIN256_208:45850,SKEIN256_216:45851,SKEIN256_224:45852,SKEIN256_232:45853,SKEIN256_240:45854,SKEIN256_248:45855,SKEIN256_256:45856,SKEIN512_8:45857,SKEIN512_16:45858,SKEIN512_24:45859,SKEIN512_32:45860,SKEIN512_40:45861,SKEIN512_48:45862,SKEIN512_56:45863,SKEIN512_64:45864,SKEIN512_72:45865,SKEIN512_80:45866,SKEIN512_88:45867,SKEIN512_96:45868,SKEIN512_104:45869,SKEIN512_112:45870,SKEIN512_120:45871,SKEIN512_128:45872,SKEIN512_136:45873,SKEIN512_144:45874,SKEIN512_152:45875,SKEIN512_160:45876,SKEIN512_168:45877,SKEIN512_176:45878,SKEIN512_184:45879,SKEIN512_192:45880,SKEIN512_200:45881,SKEIN512_208:45882,SKEIN512_216:45883,SKEIN512_224:45884,SKEIN512_232:45885,SKEIN512_240:45886,SKEIN512_248:45887,SKEIN512_256:45888,SKEIN512_264:45889,SKEIN512_272:45890,SKEIN512_280:45891,SKEIN512_288:45892,SKEIN512_296:45893,SKEIN512_304:45894,SKEIN512_312:45895,SKEIN512_320:45896,SKEIN512_328:45897,SKEIN512_336:45898,SKEIN512_344:45899,SKEIN512_352:45900,SKEIN512_360:45901,SKEIN512_368:45902,SKEIN512_376:45903,SKEIN512_384:45904,SKEIN512_392:45905,SKEIN512_400:45906,SKEIN512_408:45907,SKEIN512_416:45908,SKEIN512_424:45909,SKEIN512_432:45910,SKEIN512_440:45911,SKEIN512_448:45912,SKEIN512_456:45913,SKEIN512_464:45914,SKEIN512_472:45915,SKEIN512_480:45916,SKEIN512_488:45917,SKEIN512_496:45918,SKEIN512_504:45919,SKEIN512_512:45920,SKEIN1024_8:45921,SKEIN1024_16:45922,SKEIN1024_24:45923,SKEIN1024_32:45924,SKEIN1024_40:45925,SKEIN1024_48:45926,SKEIN1024_56:45927,SKEIN1024_64:45928,SKEIN1024_72:45929,SKEIN1024_80:45930,SKEIN1024_88:45931,SKEIN1024_96:45932,SKEIN1024_104:45933,SKEIN1024_112:45934,SKEIN1024_120:45935,SKEIN1024_128:45936,SKEIN1024_136:45937,SKEIN1024_144:45938,SKEIN1024_152:45939,SKEIN1024_160:45940,SKEIN1024_168:45941,SKEIN1024_176:45942,SKEIN1024_184:45943,SKEIN1024_192:45944,SKEIN1024_200:45945,SKEIN1024_208:45946,SKEIN1024_216:45947,SKEIN1024_224:45948,SKEIN1024_232:45949,SKEIN1024_240:45950,SKEIN1024_248:45951,SKEIN1024_256:45952,SKEIN1024_264:45953,SKEIN1024_272:45954,SKEIN1024_280:45955,SKEIN1024_288:45956,SKEIN1024_296:45957,SKEIN1024_304:45958,SKEIN1024_312:45959,SKEIN1024_320:45960,SKEIN1024_328:45961,SKEIN1024_336:45962,SKEIN1024_344:45963,SKEIN1024_352:45964,SKEIN1024_360:45965,SKEIN1024_368:45966,SKEIN1024_376:45967,SKEIN1024_384:45968,SKEIN1024_392:45969,SKEIN1024_400:45970,SKEIN1024_408:45971,SKEIN1024_416:45972,SKEIN1024_424:45973,SKEIN1024_432:45974,SKEIN1024_440:45975,SKEIN1024_448:45976,SKEIN1024_456:45977,SKEIN1024_464:45978,SKEIN1024_472:45979,SKEIN1024_480:45980,SKEIN1024_488:45981,SKEIN1024_496:45982,SKEIN1024_504:45983,SKEIN1024_512:45984,SKEIN1024_520:45985,SKEIN1024_528:45986,SKEIN1024_536:45987,SKEIN1024_544:45988,SKEIN1024_552:45989,SKEIN1024_560:45990,SKEIN1024_568:45991,SKEIN1024_576:45992,SKEIN1024_584:45993,SKEIN1024_592:45994,SKEIN1024_600:45995,SKEIN1024_608:45996,SKEIN1024_616:45997,SKEIN1024_624:45998,SKEIN1024_632:45999,SKEIN1024_640:46e3,SKEIN1024_648:46001,SKEIN1024_656:46002,SKEIN1024_664:46003,SKEIN1024_672:46004,SKEIN1024_680:46005,SKEIN1024_688:46006,SKEIN1024_696:46007,SKEIN1024_704:46008,SKEIN1024_712:46009,SKEIN1024_720:46010,SKEIN1024_728:46011,SKEIN1024_736:46012,SKEIN1024_744:46013,SKEIN1024_752:46014,SKEIN1024_760:46015,SKEIN1024_768:46016,SKEIN1024_776:46017,SKEIN1024_784:46018,SKEIN1024_792:46019,SKEIN1024_800:46020,SKEIN1024_808:46021,SKEIN1024_816:46022,SKEIN1024_824:46023,SKEIN1024_832:46024,SKEIN1024_840:46025,SKEIN1024_848:46026,SKEIN1024_856:46027,SKEIN1024_864:46028,SKEIN1024_872:46029,SKEIN1024_880:46030,SKEIN1024_888:46031,SKEIN1024_896:46032,SKEIN1024_904:46033,SKEIN1024_912:46034,SKEIN1024_920:46035,SKEIN1024_928:46036,SKEIN1024_936:46037,SKEIN1024_944:46038,SKEIN1024_952:46039,SKEIN1024_960:46040,SKEIN1024_968:46041,SKEIN1024_976:46042,SKEIN1024_984:46043,SKEIN1024_992:46044,SKEIN1024_1000:46045,SKEIN1024_1008:46046,SKEIN1024_1016:46047,SKEIN1024_1024:46048,IP4:4,TCP:6,DCCP:33,IP6:41,IP6ZONE:42,DNS:53,DNS4:54,DNS6:55,DNSADDR:56,SCTP:132,UDP:273,P2P_WEBRTC_STAR:275,P2P_WEBRTC_DIRECT:276,P2P_STARDUST:277,P2P_CIRCUIT:290,UDT:301,UTP:302,UNIX:400,P2P:421,IPFS:421,HTTPS:443,ONION:444,ONION3:445,GARLIC64:446,GARLIC32:447,QUIC:460,WS:477,WSS:478,P2P_WEBSOCKET_STAR:479,HTTP:480,RAW:85,DAG_PB:112,DAG_CBOR:113,LIBP2P_KEY:114,GIT_RAW:120,TORRENT_INFO:123,TORRENT_FILE:124,LEOFCOIN_BLOCK:129,LEOFCOIN_TX:130,LEOFCOIN_PR:131,ETH_BLOCK:144,ETH_BLOCK_LIST:145,ETH_TX_TRIE:146,ETH_TX:147,ETH_TX_RECEIPT_TRIE:148,ETH_TX_RECEIPT:149,ETH_STATE_TRIE:150,ETH_ACCOUNT_SNAPSHOT:151,ETH_STORAGE_TRIE:152,BITCOIN_BLOCK:176,BITCOIN_TX:177,ZCASH_BLOCK:192,ZCASH_TX:193,STELLAR_BLOCK:208,STELLAR_TX:209,DECRED_BLOCK:224,DECRED_TX:225,DASH_BLOCK:240,DASH_TX:241,SWARM_MANIFEST:250,SWARM_FEED:251,DAG_JSON:297,PATH:47,IPLD_NS:226,IPFS_NS:227,SWARM_NS:228,ED25519_PUB:237,HOLOCHAIN_ADR_V0:8417572,HOLOCHAIN_ADR_V1:8483108,HOLOCHAIN_KEY_V0:9728292,HOLOCHAIN_KEY_V1:9793828,HOLOCHAIN_SIG_V0:10645796,HOLOCHAIN_SIG_V1:10711332})},function(e,t,n){"use strict";e.exports=Object.freeze({80:"protobuf",81:"cbor",96:"rlp",99:"bencode",48:"multicodec",49:"multihash",50:"multiaddr",51:"multibase",0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",20:"sha3-512",21:"sha3-384",22:"sha3-256",23:"sha3-224",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",86:"dbl-sha2-256",212:"md4",213:"md5",214:"bmt",4352:"x11",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"skein256-8",45826:"skein256-16",45827:"skein256-24",45828:"skein256-32",45829:"skein256-40",45830:"skein256-48",45831:"skein256-56",45832:"skein256-64",45833:"skein256-72",45834:"skein256-80",45835:"skein256-88",45836:"skein256-96",45837:"skein256-104",45838:"skein256-112",45839:"skein256-120",45840:"skein256-128",45841:"skein256-136",45842:"skein256-144",45843:"skein256-152",45844:"skein256-160",45845:"skein256-168",45846:"skein256-176",45847:"skein256-184",45848:"skein256-192",45849:"skein256-200",45850:"skein256-208",45851:"skein256-216",45852:"skein256-224",45853:"skein256-232",45854:"skein256-240",45855:"skein256-248",45856:"skein256-256",45857:"skein512-8",45858:"skein512-16",45859:"skein512-24",45860:"skein512-32",45861:"skein512-40",45862:"skein512-48",45863:"skein512-56",45864:"skein512-64",45865:"skein512-72",45866:"skein512-80",45867:"skein512-88",45868:"skein512-96",45869:"skein512-104",45870:"skein512-112",45871:"skein512-120",45872:"skein512-128",45873:"skein512-136",45874:"skein512-144",45875:"skein512-152",45876:"skein512-160",45877:"skein512-168",45878:"skein512-176",45879:"skein512-184",45880:"skein512-192",45881:"skein512-200",45882:"skein512-208",45883:"skein512-216",45884:"skein512-224",45885:"skein512-232",45886:"skein512-240",45887:"skein512-248",45888:"skein512-256",45889:"skein512-264",45890:"skein512-272",45891:"skein512-280",45892:"skein512-288",45893:"skein512-296",45894:"skein512-304",45895:"skein512-312",45896:"skein512-320",45897:"skein512-328",45898:"skein512-336",45899:"skein512-344",45900:"skein512-352",45901:"skein512-360",45902:"skein512-368",45903:"skein512-376",45904:"skein512-384",45905:"skein512-392",45906:"skein512-400",45907:"skein512-408",45908:"skein512-416",45909:"skein512-424",45910:"skein512-432",45911:"skein512-440",45912:"skein512-448",45913:"skein512-456",45914:"skein512-464",45915:"skein512-472",45916:"skein512-480",45917:"skein512-488",45918:"skein512-496",45919:"skein512-504",45920:"skein512-512",45921:"skein1024-8",45922:"skein1024-16",45923:"skein1024-24",45924:"skein1024-32",45925:"skein1024-40",45926:"skein1024-48",45927:"skein1024-56",45928:"skein1024-64",45929:"skein1024-72",45930:"skein1024-80",45931:"skein1024-88",45932:"skein1024-96",45933:"skein1024-104",45934:"skein1024-112",45935:"skein1024-120",45936:"skein1024-128",45937:"skein1024-136",45938:"skein1024-144",45939:"skein1024-152",45940:"skein1024-160",45941:"skein1024-168",45942:"skein1024-176",45943:"skein1024-184",45944:"skein1024-192",45945:"skein1024-200",45946:"skein1024-208",45947:"skein1024-216",45948:"skein1024-224",45949:"skein1024-232",45950:"skein1024-240",45951:"skein1024-248",45952:"skein1024-256",45953:"skein1024-264",45954:"skein1024-272",45955:"skein1024-280",45956:"skein1024-288",45957:"skein1024-296",45958:"skein1024-304",45959:"skein1024-312",45960:"skein1024-320",45961:"skein1024-328",45962:"skein1024-336",45963:"skein1024-344",45964:"skein1024-352",45965:"skein1024-360",45966:"skein1024-368",45967:"skein1024-376",45968:"skein1024-384",45969:"skein1024-392",45970:"skein1024-400",45971:"skein1024-408",45972:"skein1024-416",45973:"skein1024-424",45974:"skein1024-432",45975:"skein1024-440",45976:"skein1024-448",45977:"skein1024-456",45978:"skein1024-464",45979:"skein1024-472",45980:"skein1024-480",45981:"skein1024-488",45982:"skein1024-496",45983:"skein1024-504",45984:"skein1024-512",45985:"skein1024-520",45986:"skein1024-528",45987:"skein1024-536",45988:"skein1024-544",45989:"skein1024-552",45990:"skein1024-560",45991:"skein1024-568",45992:"skein1024-576",45993:"skein1024-584",45994:"skein1024-592",45995:"skein1024-600",45996:"skein1024-608",45997:"skein1024-616",45998:"skein1024-624",45999:"skein1024-632",46000:"skein1024-640",46001:"skein1024-648",46002:"skein1024-656",46003:"skein1024-664",46004:"skein1024-672",46005:"skein1024-680",46006:"skein1024-688",46007:"skein1024-696",46008:"skein1024-704",46009:"skein1024-712",46010:"skein1024-720",46011:"skein1024-728",46012:"skein1024-736",46013:"skein1024-744",46014:"skein1024-752",46015:"skein1024-760",46016:"skein1024-768",46017:"skein1024-776",46018:"skein1024-784",46019:"skein1024-792",46020:"skein1024-800",46021:"skein1024-808",46022:"skein1024-816",46023:"skein1024-824",46024:"skein1024-832",46025:"skein1024-840",46026:"skein1024-848",46027:"skein1024-856",46028:"skein1024-864",46029:"skein1024-872",46030:"skein1024-880",46031:"skein1024-888",46032:"skein1024-896",46033:"skein1024-904",46034:"skein1024-912",46035:"skein1024-920",46036:"skein1024-928",46037:"skein1024-936",46038:"skein1024-944",46039:"skein1024-952",46040:"skein1024-960",46041:"skein1024-968",46042:"skein1024-976",46043:"skein1024-984",46044:"skein1024-992",46045:"skein1024-1000",46046:"skein1024-1008",46047:"skein1024-1016",46048:"skein1024-1024",4:"ip4",6:"tcp",33:"dccp",41:"ip6",42:"ip6zone",53:"dns",54:"dns4",55:"dns6",56:"dnsaddr",132:"sctp",273:"udp",275:"p2p-webrtc-star",276:"p2p-webrtc-direct",277:"p2p-stardust",290:"p2p-circuit",301:"udt",302:"utp",400:"unix",421:"p2p",443:"https",444:"onion",445:"onion3",446:"garlic64",447:"garlic32",460:"quic",477:"ws",478:"wss",479:"p2p-websocket-star",480:"http",85:"raw",112:"dag-pb",113:"dag-cbor",114:"libp2p-key",120:"git-raw",123:"torrent-info",124:"torrent-file",129:"leofcoin-block",130:"leofcoin-tx",131:"leofcoin-pr",144:"eth-block",145:"eth-block-list",146:"eth-tx-trie",147:"eth-tx",148:"eth-tx-receipt-trie",149:"eth-tx-receipt",150:"eth-state-trie",151:"eth-account-snapshot",152:"eth-storage-trie",176:"bitcoin-block",177:"bitcoin-tx",192:"zcash-block",193:"zcash-tx",208:"stellar-block",209:"stellar-tx",224:"decred-block",225:"decred-tx",240:"dash-block",241:"dash-tx",250:"swarm-manifest",251:"swarm-feed",297:"dag-json",47:"path",226:"ipld-ns",227:"ipfs-ns",228:"swarm-ns",237:"ed25519-pub",8417572:"holochain-adr-v0",8483108:"holochain-adr-v1",9728292:"holochain-key-v0",9793828:"holochain-key-v1",10645796:"holochain-sig-v0",10711332:"holochain-sig-v1"})},function(e,t,n){"use strict";(function(t){const r=n(35);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{r.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports={keys:n(787),once:n(138),values:n(43),count:n(788),infinite:n(789),empty:n(106),error:n(81)}},function(e,t,n){"use strict";var r=n(43);e.exports=function(e){return r(Object.keys(e))}},function(e,t,n){"use strict";e.exports=function e(t){var n=0;return t=t||1/0,function(e,r){return e?r&&r(e):n>t?r(!0):void r(null,n++)}}},function(e,t,n){"use strict";e.exports=function e(t){return t=t||Math.random,function(e,n){return e?n&&n(e):n(null,t())}}},function(e,t,n){"use strict";e.exports={drain:n(176),onEnd:n(406),log:n(791),find:n(792),reduce:n(221),collect:n(37),concat:n(793)}},function(e,t,n){"use strict";var r=n(176);e.exports=function e(t){return r(function(e){console.log(e)},t)}},function(e,t,n){"use strict";function r(e){return e}var i=n(177),o=n(176);e.exports=function e(t,n){var s=!1;return n?t=i(t)||r:(n=t,t=r),o(function(e){if(t(e))return s=!0,n(null,e),!1},function(e){s||n(!0===e?null:e,null)})}},function(e,t,n){"use strict";var r=n(221);e.exports=function e(t){return r(function(e,t){return e+t},"",t)}},function(e,t,n){"use strict";e.exports={map:n(77),asyncMap:n(89),filter:n(78),filterNot:n(795),through:n(222),take:n(296),unique:n(408),nonUnique:n(796),flatten:n(223)}},function(e,t,n){"use strict";var r=n(407),i=n(78);e.exports=function e(t){return t=r(t),i(function(e){return!t(e)})}},function(e,t,n){"use strict";var r=n(408);e.exports=function e(t){return r(t,!0)}},function(e,t,n){"use strict";(function(t){const r=n(35);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{r.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=n(67),i=f(r),o=n(105),s=f(o),a=n(133),u=f(a),l=n(42),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){n=(0,u.default)(n||i.default);var r=(0,c.default)(e),o=function(e){if(e)return n(e);var i=(0,s.default)(arguments,1);if(t.apply(this,i))return r(o);n.apply(null,[null].concat(i))};r(o)}e.exports=t.default},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}e.exports=a()?Object.assign:function(e,t){for(var n,a=s(e),u,l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]),n)i.call(n,c)&&(a[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(a[u[f]]=n[u[f]])}}return a}},function(e,t){e.exports=function e(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(e,t,n){"use strict";t.create=function e(t,n,r){const i=r.storageBackends[t],o=Object.assign({},r.storageBackendOptions[t]||{});return new i(n,o)}},function(e,t,n){"use strict";(function(t){const r=n(33).Key,i=n(5),o=i("repo:version"),s=new r("version");e.exports=(e=>({exists(t){e.has(s,t)},get(t){e.get(s,(e,n)=>{if(e)return t(e);t(null,parseInt(n.toString().trim(),10))})},set(n,r){e.put(s,t.from(String(n)),r)},check(e,t){this.get((n,r)=>{if(n)return t(n);o("comparing version: %s and %s",r,e);const i=6===r&&7===e||6===e&&7===r;if(r!==e&&!i)return t(new Error(`ipfs repo needs migration: expected version v${e}, found version v${r}`));t()})}}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(26),i=n(14),o=n(298).asyncFilter,s=n(298).asyncSort,a=n(412),u=n(415);class l{constructor(){this.data={}}open(e){i(e)}put(e,t,n){this.data[e.toString()]=t,i(n)}get(e,t){this.has(e,(n,r)=>n?t(n):r?void t(null,this.data[e.toString()]):t(u.notFoundError()))}has(e,t){i(()=>{t(null,void 0!==this.data[e.toString()])})}delete(e,t){delete this.data[e.toString()],i(()=>{t()})}batch(){let e=[],t=[];return{put(t,n){e.push([t,n])},delete(e){t.push(e)},commit:n=>{e.forEach(e=>{this.data[e[0].toString()]=e[1]}),e=[],t.forEach(e=>{delete this.data[e.toString()]}),t=[],i(n)}}}query(e){let t=[r.keys(this.data),r.map(e=>({key:new a(e),value:this.data[e]}))],n=[];if(null!=e.prefix){const t=e.prefix;n.push((e,n)=>n(null,e.key.toString().startsWith(t)))}if(null!=e.filters&&(n=n.concat(e.filters)),t=t.concat(n.map(e=>o(e))),null!=e.orders&&(t=t.concat(e.orders.map(e=>s(e)))),null!=e.offset){let n=0;t.push(r.filter(()=>n++>=e.offset))}return null!=e.limit&&t.push(r.take(e.limit)),!0===e.keysOnly&&t.push(r.map(e=>({key:e.key}))),r.apply(null,t)}close(e){i(e)}}e.exports=l},function(e,t,n){"use strict";const r=n(33).Key,i=n(227),o=n(11),s=n(411),a=n(811),u=n(0).Buffer,l=new r("config");e.exports=(e=>{const t=i(r,1),n={get(t,n){"function"==typeof t&&(n=t,t=void 0),t||(t=void 0),e.get(l,(e,r)=>{if(e)return n(e);let i;try{i=JSON.parse(r.toString())}catch(e){return n(e)}if(void 0===t)return n(null,i);if("string"!=typeof t)return n(new Error("Key "+t+" must be a string."));const o=s(i,t,null);if(null===o)return n(new Error("Key "+t+" does not exist in config."));n(null,o)})},set(e,n,r){if("function"==typeof n)r=n,n=e,e=void 0;else if(!e||"string"!=typeof e)return r(new Error("Invalid key type"));if(void 0===n||u.isBuffer(n))return r(new Error("Invalid value type"));t.push({key:e,value:n},r)},exists(t){e.has(l,t)}};return n;function r(e,t){const r=e.key,i=e.value;r?o([e=>n.get(e),(e,t)=>{a(e,r,i),t(null,e)},c],t):c(i,t)}function c(t,n){const r=u.from(JSON.stringify(t,null,2));e.put(l,r,n)}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r=n(806),i=y(r),o=n(68),s=y(o),a=n(67),u=y(a),l=n(133),c=y(l),f=n(218),h=y(f),p=n(810),d=y(p),m=n(42),g=y(m);function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t,n){if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var r=(0,g.default)(e),o=0,a=[],l=!1;function f(e,t,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(y.started=!0,(0,s.default)(e)||(e=[e]),0===e.length&&y.idle())return(0,h.default)(function(){y.drain()});for(var r=0,i=e.length;r<i;r++){var o={data:e[r],callback:n||u.default};t?y._tasks.unshift(o):y._tasks.push(o)}l||(l=!0,(0,h.default)(function(){l=!1,y.process()}))}function p(e){return function(t){o-=1;for(var n=0,r=e.length;n<r;n++){var s=e[n],u=(0,i.default)(a,s,0);0===u?a.shift():u>0&&a.splice(u,1),s.callback.apply(s,arguments),null!=t&&y.error(t,s.data)}o<=y.concurrency-y.buffer&&y.unsaturated(),y.idle()&&y.drain(),y.process()}}var m=!1,y={_tasks:new d.default,concurrency:t,payload:n,saturated:u.default,unsaturated:u.default,buffer:t/4,empty:u.default,drain:u.default,error:u.default,started:!1,paused:!1,push:function(e,t){f(e,!1,t)},kill:function(){y.drain=u.default,y._tasks.empty()},unshift:function(e,t){f(e,!0,t)},remove:function(e){y._tasks.remove(e)},process:function(){if(!m){for(m=!0;!y.paused&&o<y.concurrency&&y._tasks.length;){var e=[],t=[],n=y._tasks.length;y.payload&&(n=Math.min(n,y.payload));for(var i=0;i<n;i++){var s=y._tasks.shift();e.push(s),a.push(s),t.push(s.data)}o+=1,0===y._tasks.length&&y.empty(),o===y.concurrency&&y.saturated();var u=(0,c.default)(p(e));r(t,u)}m=!1}},length:function(){return y._tasks.length},running:function(){return o},workersList:function(){return a},idle:function(){return y._tasks.length+o===0},pause:function(){y.paused=!0},resume:function(){!1!==y.paused&&(y.paused=!1,(0,h.default)(y.process))}};return y}e.exports=t.default},function(e,t,n){var r=n(807),i=n(808),o=n(809);function s(e,t,n){return t==t?o(e,t,n):r(e,i,n)}e.exports=s},function(e,t){function n(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}e.exports=n},function(e,t){function n(e){return e!=e}e.exports=n},function(e,t){function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}e.exports=n},function(e,t,n){"use strict";function r(){this.head=this.tail=null,this.length=0}function i(e,t){e.length=1,e.head=e.tail=t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype.removeLink=function(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e},r.prototype.empty=function(){for(;this.head;)this.shift();return this},r.prototype.insertAfter=function(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1},r.prototype.insertBefore=function(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1},r.prototype.unshift=function(e){this.head?this.insertBefore(this.head,e):i(this,e)},r.prototype.push=function(e){this.tail?this.insertAfter(this.tail,e):i(this,e)},r.prototype.shift=function(){return this.head&&this.removeLink(this.head)},r.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},r.prototype.toArray=function(){for(var e=Array(this.length),t=this.head,n=0;n<this.length;n++)e[n]=t.data,t=t.next;return e},r.prototype.remove=function(e){for(var t=this.head;t;){var n=t.next;e(t)&&this.removeLink(t),t=n}return this},e.exports=t.default},function(e,t){function n(e,t,n){"string"==typeof t&&(t=t.split(".")),"symbol"==typeof t&&(t=[t]);var r=t.pop(),i;if(!r)return!1;for(;i=t.shift();)if(void 0===e[i]&&(e[i]={}),e=e[i],!e||"object"!=typeof e)return!1;return e[r]=n,!0}e.exports=n},function(e,t,n){"use strict";(function(t){const r=n(33).Key,i=n(813),o=new r("datastore_spec");e.exports=(e=>({exists(t){e.has(o,t)},get(t){e.get(o,(e,n)=>{if(e)return t(e);t(null,JSON.parse(n.toString()))})},set(n,r){e.put(o,t.from(JSON.stringify(i(n,{deep:!0}))),r)}}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(416);e.exports=((e,t)=>{if(!r(e))throw new TypeError("Expected a plain object");if(t=t||{},"function"==typeof t)throw new TypeError("Specify the compare function as an option instead");const n=t.deep,i=[],o=[],s=e=>{const a=i.indexOf(e);if(-1!==a)return o[a];const u={},l=Object.keys(e).sort(t.compare);i.push(e),o.push(u);for(let t=0;t<l.length;t++){const i=l[t],o=e[i];if(n&&Array.isArray(o)){const e=[];for(let t=0;t<o.length;t++)e[t]=r(o[t])?s(o[t]):o[t];u[i]=e}else u[i]=n&&r(o)?s(o):o}return u};return s(e)})},function(e,t,n){"use strict";(function(t){const r=n(33).Key,i=new r("api");e.exports=(e=>({get(t){e.get(i,(e,n)=>t(e,n&&n.toString()))},set(n,r){e.put(i,t.from(n.toString()),r)},delete(t){e.delete(i,t)}}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(417),i=r.ShardingDatastore,o=n(33).Key,s=n(822),a=n(137),u=n(14),l=n(419),c=n(825),f=n(12),h=n(37),p=e=>{const t=new s.Encoder;return new o("/"+t.write(e).finalize(),!1)},d=e=>p(e.buffer);function m(e,t,n){if(t.sharding){const t=new r.shard.NextToLast(2);i.createOrOpen(e,t,n)}else u(()=>n(null,e))}function g(e){return{query(t,n){f(e.query(t),h(n))},get(t,n){if(!c.isCID(t))return u(()=>{n(new Error("Not a valid cid"))});const r=d(t);e.get(r,(i,o)=>{if(i){if("ERR_NOT_FOUND"===i.code){const o=y(t);if(!o)return n(i);const s=d(o);return e.get(s,(i,o)=>{if(i)return n(i);e.put(r,o,e=>{if(e)return n(e);n(null,new a(o,t))})})}return n(i)}n(null,new a(o,t))})},put(t,n){if(!a.isBlock(t))return u(()=>{n(new Error("invalid block"))});const r=d(t.cid);e.has(r,(i,o)=>i?n(i):o?n():void e.put(r,t.data,n))},putMany(t,n){const r=t.map(e=>({key:d(e.cid),block:e})),i=e.batch();l(r,(t,n)=>e.has(t.key,n),(e,t)=>{if(e)return n(e);t.forEach(e=>{i.put(e.key,e.block.data)}),i.commit(n)})},has(t,n){if(!c.isCID(t))return u(()=>{n(new Error("Not a valid cid"))});e.has(d(t),(r,i)=>{if(r)return n(r);if(i)return n(null,!0);const o=y(t);if(!o)return n(null,!1);e.has(d(o),n)})},delete(t,n){if(!c.isCID(t))return u(()=>{n(new Error("Not a valid cid"))});e.delete(d(t),n)},close(t){e.close(t)}}}function y(e){try{return 0===e.version?e.toV1():e.toV0()}catch(e){return null}}e.exports=((e,t,n)=>{m(e,t,(e,t)=>{if(e)return n(e);n(null,g(t))})})},function(e,t,n){"use strict";(function(t){const r=n(11),i=n(54),o=n(33).Key,s=n(418),a=n(228),u=new o(s.SHARDING_FN),l=new o(s.README_FN);class c{constructor(e,t){this.child=new a(e,{convert:this._convertKey.bind(this),invert:this._invertKey.bind(this)}),this.shard=t}open(e){this.child.open(e)}_convertKey(e){const t=e.toString();if(t===u.toString()||t===l.toString())return e;const n=new o(this.shard.fun(t));return n.child(e)}_invertKey(e){const t=e.toString();return t===u.toString()||t===l.toString()?e:o.withNamespaces(e.list().slice(1))}static createOrOpen(e,t,n){c.create(e,t,t=>{if(t&&"datastore exists"!==t.message)return n(t);c.open(e,n)})}static open(e,t){r([t=>s.readShardFun("/",e,t),(t,n)=>{n(null,new c(e,t))}],t)}static create(e,n,r){e.has(u,(o,a)=>{if(o)return r(o);if(!a){const o="function"==typeof e.putRaw?e.putRaw.bind(e):e.put.bind(e);return i([e=>o(u,t.from(n.toString()+"\n"),e),e=>o(l,t.from(s.readme),e)],e=>r(e))}s.readShardFun("/",e,(e,t)=>{if(e)return r(e);const i=(t||"").toString(),o=n.toString();if(i!==o)return r(new Error(`specified fun ${o} does not match repo shard fun ${i}`));r(new Error("datastore exists"))})})}put(e,t,n){this.child.put(e,t,n)}get(e,t){this.child.get(e,t)}has(e,t){this.child.has(e,t)}delete(e,t){this.child.delete(e,t)}batch(){return this.child.batch()}query(e){const t={keysOnly:e.keysOnly,offset:e.offset,limit:e.limit,filters:[(e,t)=>t(null,e.key.toString()!==u.toString()),(e,t)=>t(null,e.key.toString()!==l.toString())]};if(null!=e.prefix&&t.filters.push((t,n)=>{n(null,this._invertKey(t.key).toString().startsWith(e.prefix))}),null!=e.filters){const n=e.filters.map(e=>(t,n)=>{e(Object.assign({},t,{key:this._invertKey(t.key)}),n)});t.filters=t.filters.concat(n)}return null!=e.orders&&(t.orders=e.orders.map(e=>(t,n)=>{t.forEach(e=>{e.key=this._invertKey(e.key)}),e(t,(e,t)=>{if(e)return n(e);t.forEach(e=>{e.key=this._convertKey(e.key)}),n(null,t)})})),this.child.query(t)}close(e){this.child.close(e)}}e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports="This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed <base32 encoding of cid>.data. Where <base32 encoding of cid> is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"},function(e,t,n){"use strict";const r=n(56),i=n(819),o=n(26),s=n(33).Key,a=n(33).Errors,u=n(33).utils,l=u.asyncFilter,c=u.asyncSort,f=u.replaceStartWith,h=n(228);class p{constructor(e){this.mounts=e.slice()}open(e){r(this.mounts,(e,t)=>{e.datastore.open(t)},e)}_lookup(e){for(let t of this.mounts)if(t.prefix.toString()===e.toString()||t.prefix.isAncestorOf(e)){const n=f(e.toString(),t.prefix.toString());return{datastore:t.datastore,mountpoint:t.prefix,rest:new s(n)}}}put(e,t,n){const r=this._lookup(e);if(null==r)return n(a.dbWriteFailedError(new Error("No datastore mounted for this key")));r.datastore.put(r.rest,t,n)}get(e,t){const n=this._lookup(e);if(null==n)return t(a.notFoundError(new Error("No datastore mounted for this key")));n.datastore.get(n.rest,t)}has(e,t){const n=this._lookup(e);null!=n?n.datastore.has(n.rest,t):t(null,!1)}delete(e,t){const n=this._lookup(e);if(null==n)return t(a.dbDeleteFailedError(new Error("No datastore mounted for this key")));n.datastore.delete(n.rest,t)}close(e){r(this.mounts,(e,t)=>{e.datastore.close(t)},e)}batch(){const e={},t=t=>{const n=this._lookup(t);if(null==n)throw new Error("No datastore mounted for this key");const r=n.mountpoint.toString();return null==e[r]&&(e[r]=n.datastore.batch()),{batch:e[r],rest:n.rest}};return{put:(e,n)=>{const r=t(e);r.batch.put(r.rest,n)},delete:e=>{const n=t(e);n.batch.delete(n.rest)},commit:t=>{r(Object.keys(e),(t,n)=>{e[t].commit(n)},t)}}}query(e){const t=this.mounts.map(t=>{const n=new h(t.datastore,{convert:e=>{throw new Error("should never be called")},invert:e=>t.prefix.child(e)});let r;return null!=e.prefix&&(r=f(e.prefix,t.prefix.toString())),n.query({prefix:r,filters:e.filters,keysOnly:e.keysOnly})});let n=[i(t)];if(null!=e.filters&&(n=n.concat(e.filters.map(e=>l(e)))),null!=e.orders&&(n=n.concat(e.orders.map(e=>c(e)))),null!=e.offset){let t=0;n.push(o.filter(()=>t++>=e.offset))}return null!=e.limit&&n.push(o.take(e.limit)),o.apply(null,n)}}e.exports=p},function(e,t){e.exports=function(e){var t=!!e,n=(e||[]).map(s),r=0,i,o;function s(e){return{ready:!1,reading:!1,ended:!1,read:e,data:null}}function a(){if(o){u();var e=n.length,s=o;if(0===e&&(i||t))return o=null,void s(i||!0);for(var a=0;a<e;a++){var l=n[(r+a)%e];if(l.ready&&!l.ended){var c=l.data;return l.ready=!1,l.data=null,r++,o=null,s(null,c)}}}}function u(){for(var e=n.length;e--;)n[e].ended&&n.splice(e,1)}function l(){for(var e=n.length;e--;)!function(t){if(e>n.length)throw new Error("this should never happen");if(!(t.reading||t.ended||t.ready)){t.reading=!0;var r=!0;t.read(i,function e(n,o){t.data=o,t.ready=!0,t.reading=!1,!0===n||i?t.ended=!0:n&&(i=t.ended=n),i&&!n&&t.read(i,e),r||a()}),r=!1}}(n[e]);a()}function c(e,t){i=i||e,o=t,l()}return c.add=function(e){if(!e)return t=!0,l();n.push(s(e)),l()},c.cap=function(e){c.add(null)},c}},function(e,t,n){"use strict";const r=n(56),i=n(229),o=n(33).Errors;class s{constructor(e){this.stores=e.slice()}open(e){r(this.stores,(e,t)=>{e.open(t)},t=>{if(t)return e(o.dbOpenFailedError());e()})}put(e,t,n){r(this.stores,(n,r)=>{n.put(e,t,r)},e=>{if(e)return n(o.dbWriteFailedError());n()})}get(e,t){const n=this.stores.length;let r=!1,s=0;i(()=>!r&&s<n,t=>{const n=this.stores[s++];n.get(e,(e,n)=>{if(null==e)return r=!0,t(null,n);t()})},(e,n)=>{if(e||!n)return t(o.notFoundError());t(null,n)})}has(e,t){const n=this.stores.length;let r=!1,o=0;i(()=>!r&&o<n,t=>{const n=this.stores[o++];n.has(e,(e,n)=>{if(null==e)return r=!0,t(null,n);t()})},t)}delete(e,t){r(this.stores,(t,n)=>{t.delete(e,n)},e=>{if(e)return t(o.dbDeleteFailedError());t()})}close(e){r(this.stores,(e,t)=>{e.close(t)},e)}batch(){const e=this.stores.map(e=>e.batch());return{put:(t,n)=>{e.forEach(e=>e.put(t,n))},delete:t=>{e.forEach(e=>e.delete(t))},commit:t=>{r(e,(e,t)=>{e.commit(t)},t)}}}query(e){return this.stores[this.stores.length-1].query(e)}}e.exports=s},function(e,t,n){"use strict";const r=n(33).Key,i=n(228);class o extends i{constructor(e,t){super(e,{convert:e=>t.child(e),invert(e){if("/"===t.toString())return e;if(!t.isAncestorOf(e))throw new Error(`Expected prefix: (${t.toString()}) in key: ${e.toString()}`);return new r(e.toString().slice(t.toString().length),!1)}}),this.prefix=t}query(e){return e.prefix&&"/"!==this.prefix.toString()?super.query(Object.assign({},e,{prefix:this.prefix.child(new r(e.prefix)).toString()})):super.query(e)}}e.exports=o},function(e,t,n){"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach(function(e,n){e in t||(t[e]=n)}),t},i={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};i.charmap=r(i.alphabet,i.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var s={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function u(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}s.charmap=r(s.alphabet,s.charmap),a.prototype.charmap=i.charmap,a.prototype.write=function(e){var t=this.charmap,n=this.buf,r=this.shift,i=this.carry;return e.toUpperCase().split("").forEach(function(e){if("="!=e){var o=255&t[e];r-=5,r>0?i|=o<<r:r<0?(n.push(i|o>>-r),r+=8,i=o<<r&255):(n.push(i|o),r=8,i=0)}}),this.shift=r,this.carry=i,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},u.prototype.alphabet=i.alphabet,u.prototype.write=function(e){var t=this.shift,n=this.carry,r,i,o;for(o=0;o<e.length;o++)i=e[o],r=n|i>>t,this.buf+=this.alphabet[31&r],t>5&&(t-=5,r=i>>t,this.buf+=this.alphabet[31&r]),t=5-t,n=i<<t,t=8-t;return this.shift=t,this.carry=n,this},u.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new u(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=u,t.charmap=r,t.crockford=o,t.rfc4648=i,t.base32hex=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=n(824),i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,r){(0,i.default)(e,t,function(e,t){n(e,function(e,n){t(e,!n)})},r)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=n(299),i=p(r),o=n(171),s=p(o),a=n(420),u=p(a),l=n(67),c=p(l),f=n(42),h=p(f);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n,r){var i=new Array(t.length);e(t,function(e,t,r){n(e,function(e,n){i[t]=!!n,r(e)})},function(e){if(e)return r(e);for(var n=[],o=0;o<t.length;o++)i[o]&&n.push(t[o]);r(null,n)})}function m(e,t,n,r){var o=[];e(t,function(e,t,r){n(e,function(n,i){n?r(n):(i&&o.push({index:t,value:e}),r())})},function(e){e?r(e):r(null,(0,i.default)(o.sort(function(e,t){return e.index-t.index}),(0,u.default)("value")))})}function g(e,t,n,r){var i=(0,s.default)(t)?d:m;i(e,t,(0,h.default)(n),r||c.default)}e.exports=t.default},function(e,t,n){"use strict";(function(t){const r=n(35),i=n(88),o=n(295),s=n(175),a=n(826),u=n(53);class l{constructor(e,n,s,a){if(c.isCID(e)){const n=e;return this.version=n.version,this.codec=n.codec,this.multihash=t.from(n.multihash),void(this.multibaseName=n.multibaseName||(0===n.version?"base58btc":"base32"))}if("string"==typeof e){const t=i.isEncoded(e);if(t){const n=i.decode(e);this.version=parseInt(n.slice(0,1).toString("hex"),16),this.codec=o.getCodec(n.slice(1)),this.multihash=o.rmPrefix(n.slice(1)),this.multibaseName=t}else this.version=0,this.codec="dag-pb",this.multihash=r.fromB58String(e),this.multibaseName="base58btc";return l.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(t.isBuffer(e)){const t=e.slice(0,1),n=parseInt(t.toString("hex"),16);if(1===n){const t=e;this.version=n,this.codec=o.getCodec(t.slice(1)),this.multihash=o.rmPrefix(t.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";l.validateCID(this)}else this.version=e,this.codec=n,this.multihash=s,this.multibaseName=a||(0===e?"base58btc":"base32"),l.validateCID(this)}get buffer(){let e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=t.concat([t.from("01","hex"),o.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}get prefix(){return t.concat([t.from(`0${this.version}`,"hex"),o.getCodeVarint(this.codec),r.prefix(this.multihash)])}toV0(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");const{name:e,length:t}=r.decode(this.multihash);if("sha2-256"!==e)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==t)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new c(0,this.codec,this.multihash)}toV1(){return new c(1,this.codec,this.multihash)}toBaseEncodedString(e=this.multibaseName){if(this.string&&e===this.multibaseName)return this.string;let t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=r.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=i.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}toString(e){return this.toBaseEncodedString(e)}toJSON(){return{codec:this.codec,version:this.version,hash:this.multihash}}equals(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}static validateCID(e){let t=a.checkCIDComponents(e);if(t)throw new Error(t)}}const c=u(l,{className:"CID",symbolName:"@ipld/js-cid/CID"});c.codecs=s,e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(35);var i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs";if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0";if("string"!=typeof e.codec)return"codec must be string";if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0";if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!t.isBuffer(e.multihash))return"multihash must be a Buffer";try{r.validate(e.multihash)}catch(e){let t=e.message;return t||(t="Multihash validation failed"),t}}};e.exports=i}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports={lock:"memory",storageBackends:{root:n(230),blocks:n(230),keys:n(230),datastore:n(230)},storageBackendOptions:{root:{extension:""},blocks:{sharding:!1},keys:{sharding:!1}}}},function(e,t,n){(function(t){var r=n(6).EventEmitter,i=n(13).inherits,o=n(69),s=n(829),a=n(832),u=n(833),l=n(300),c=n(18),f=n(424),h=n(231).getCallback,p=n(231).getOptions,d=l.WriteError,m=l.ReadError,g=l.NotFoundError,y=l.OpenError,b=l.InitializationError;function v(e,n,i){if(!(this instanceof v))return new v(e,n,i);var o;if(r.call(this),this.setMaxListeners(1/0),"function"==typeof n&&(i=n,n={}),n=n||{},!e||"object"!=typeof e){if(o=new b("First argument must be an abstract-leveldown compliant store"),"function"==typeof i)return t.nextTick(i,o);throw o}c.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=p(n),this._db=e,this.db=new s(e),this.open(i)}function w(e,n){if(!e._isOpening()&&!e.isOpen())return t.nextTick(n,new m("Database is not open")),!0}v.prototype.emit=r.prototype.emit,v.prototype.once=r.prototype.once,i(v,r),v.prototype.open=function(e){var n=this,r;return e||(e=f(),r=e.promise),this.isOpen()?(t.nextTick(e,null,n),r):this._isOpening()?(this.once("open",function(){e(null,n)}),r):(this.emit("opening"),this.db.open(this.options,function(t){if(t)return e(new y(t));n.db=n._db,e(null,n),n.emit("open"),n.emit("ready")}),r)},v.prototype.close=function(e){var n=this,r;return e||(e=f(),r=e.promise),this.isOpen()?(this.db.close(function(){n.emit("closed"),e.apply(null,arguments)}),this.emit("closing"),this.db=new s(this._db)):this.isClosed()?t.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",function(){n.close(e)}),r},v.prototype.isOpen=function(){return"open"===this.db.status},v.prototype._isOpening=function(){return"opening"===this.db.status},v.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},v.prototype.get=function(e,t,n){if(null===e||void 0===e)throw new m("get() requires a key argument");var r;return n=h(t,n),n||(n=f(),r=n.promise),w(this,n)?r:(t=p(t),this.db.get(e,t,function(t,r){if(t)return t=/notfound/i.test(t)||t.notFound?new g("Key not found in database ["+e+"]",t):new m(t),n(t);n(null,r)}),r)},v.prototype.put=function(e,t,n,r){if(null===e||void 0===e)throw new d("put() requires a key argument");var i=this,o;return r=h(n,r),r||(r=f(),o=r.promise),w(this,r)?o:(n=p(n),this.db.put(e,t,n,function(n){if(n)return r(new d(n));i.emit("put",e,t),r()}),o)},v.prototype.del=function(e,t,n){if(null===e||void 0===e)throw new d("del() requires a key argument");var r=this,i;return n=h(t,n),n||(n=f(),i=n.promise),w(this,n)?i:(t=p(t),this.db.del(e,t,function(t){if(t)return n(new d(t));r.emit("del",e),n()}),i)},v.prototype.batch=function(e,t,n){if(!arguments.length)return new u(this);if(!Array.isArray(e))throw new d("batch() requires an array argument");var r=this,i;return n=h(t,n),n||(n=f(),i=n.promise),w(this,n)?i:(t=p(t),this.db.batch(e,t,function(t){if(t)return n(new d(t));r.emit("batch",e),n()}),i)},v.prototype.iterator=function(e){return this.db.iterator(e)},v.prototype.readStream=v.prototype.createReadStream=function(e){return e=o({keys:!0,values:!0},e),"number"!=typeof e.limit&&(e.limit=-1),new a(this.db.iterator(e),e)},v.prototype.keyStream=v.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},v.prototype.valueStream=v.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},v.prototype.toString=function(){return"LevelUP"},v.errors=l,e.exports=v.default=v}).call(this,n(2))},function(e,t,n){var r=n(421).AbstractLevelDOWN,i=n(1),o=n(831),s="put get del batch".split(" ");function a(e){r.call(this,""),this._db=e,this._operations=[],this._iterators=[],l(this)}function u(e){s.concat("iterator").forEach(function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}}),e._db.approximateSize&&(e.approximateSize=function(){return this._db.approximateSize.apply(this._db,arguments)})}function l(e){s.forEach(function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}}),"function"==typeof e._db.approximateSize&&(e.approximateSize=function(){this._operations.push({method:"approximateSize",args:arguments})}),e._iterator=function(e){var t=new o(e);return this._iterators.push(t),t}}i(a,r),a.prototype._open=function(e,t){var n=this;this._db.open(e,function(e){if(e)return t(e);n._operations.forEach(function(e){n._db[e.method].apply(n._db,e.args)}),n._operations=[],n._iterators.forEach(function(e){e.setDb(n._db)}),n._iterators=[],u(n),t()})},a.prototype._close=function(e){var t=this;this._db.close(function(n){if(n)return e(n);l(t),e()})},a.prototype._serializeKey=function(e){return e},a.prototype._serializeValue=function(e){return e},e.exports=a,e.exports.DeferredIterator=o},function(e,t,n){(function(t,r){var i=n(69),o=n(422),s=n(423),a=Object.prototype.hasOwnProperty,u="start end gt gte lt lte".split(" ");function l(){this.status="new"}function c(e,t){var n={};for(var r in t)if(a.call(t,r)){var i=t[r];f(r)&&(i=e._serializeKey(i)),n[r]=i}return n}function f(e){return-1!==u.indexOf(e)}l.prototype.open=function(e,t){var n=this,r=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)return n.status=r,t(e);n.status="open",t()})},l.prototype._open=function(e,n){t.nextTick(n)},l.prototype.close=function(e){var t=this,n=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(r){if(r)return t.status=n,e(r);t.status="closed",e()})},l.prototype._close=function(e){t.nextTick(e)},l.prototype.get=function(e,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("get() requires a callback argument");var i=this._checkKey(e);if(i)return t.nextTick(r,i);e=this._serializeKey(e),"object"==typeof n&&null!==n||(n={}),n.asBuffer=!1!==n.asBuffer,this._get(e,n,r)},l.prototype._get=function(e,n,r){t.nextTick(function(){r(new Error("NotFound"))})},l.prototype.put=function(e,n,r,i){if("function"==typeof r&&(i=r),"function"!=typeof i)throw new Error("put() requires a callback argument");var o=this._checkKey(e)||this._checkValue(n);if(o)return t.nextTick(i,o);e=this._serializeKey(e),n=this._serializeValue(n),"object"==typeof r&&null!==r||(r={}),this._put(e,n,r,i)},l.prototype._put=function(e,n,r,i){t.nextTick(i)},l.prototype.del=function(e,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("del() requires a callback argument");var i=this._checkKey(e);if(i)return t.nextTick(r,i);e=this._serializeKey(e),"object"==typeof n&&null!==n||(n={}),this._del(e,n,r)},l.prototype._del=function(e,n,r){t.nextTick(r)},l.prototype.batch=function(e,n,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof n&&(r=n),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return t.nextTick(r,new Error("batch(array) requires an array argument"));if(0===e.length)return t.nextTick(r);"object"==typeof n&&null!==n||(n={});for(var o=new Array(e.length),s=0;s<e.length;s++){if("object"!=typeof e[s]||null===e[s])return t.nextTick(r,new Error("batch(array) element must be an object and not `null`"));var a=i(e[s]);if("put"!==a.type&&"del"!==a.type)return t.nextTick(r,new Error("`type` must be 'put' or 'del'"));var u=this._checkKey(a.key);if(u)return t.nextTick(r,u);if(a.key=this._serializeKey(a.key),"put"===a.type){var l=this._checkValue(a.value);if(l)return t.nextTick(r,l);a.value=this._serializeValue(a.value)}o[s]=a}this._batch(o,n,r)},l.prototype._batch=function(e,n,r){t.nextTick(r)},l.prototype._setupIteratorOptions=function(e){return e=c(this,e),e.reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},l.prototype._iterator=function(e){return new o(this)},l.prototype._chainedBatch=function(){return new s(this)},l.prototype._serializeKey=function(e){return e},l.prototype._serializeValue=function(e){return e},l.prototype._checkKey=function(e){return null===e||void 0===e?new Error("key cannot be `null` or `undefined`"):r.isBuffer(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},l.prototype._checkValue=function(e){if(null===e||void 0===e)return new Error("value cannot be `null` or `undefined`")},e.exports=l}).call(this,n(2),n(0).Buffer)},function(e,t,n){var r=n(421).AbstractIterator,i=n(1);function o(e){r.call(this,e),this._options=e,this._iterator=null,this._operations=[]}i(o,r),o.prototype.setDb=function(e){var t=this._iterator=e.iterator(this._options);this._operations.forEach(function(e){t[e.method].apply(t,e.args)})},o.prototype._operation=function(e,t){if(this._iterator)return this._iterator[e].apply(this._iterator,t);this._operations.push({method:e,args:t})},"next end".split(" ").forEach(function(e){o.prototype["_"+e]=function(){this._operation(e,arguments)}}),e.exports=o},function(e,t,n){var r=n(1),i=n(20).Readable,o=n(69);function s(e,t){if(!(this instanceof s))return new s(e,t);t=t||{},i.call(this,o(t,{objectMode:!0})),this._iterator=e,this._options=t,this.on("end",this.destroy.bind(this,null,null))}e.exports=s,r(s,i),s.prototype._read=function(){var e=this,t=this._options;this.destroyed||this._iterator.next(function(n,r,i){if(!e.destroyed)return n?e.destroy(n):void(void 0===r&&void 0===i?e.push(null):!1!==t.keys&&!1===t.values?e.push(r):!1===t.keys&&!1!==t.values?e.push(i):e.push({key:r,value:i}))})},s.prototype._destroy=function(e,t){this._iterator.end(function(n){t(e||n)})}},function(e,t,n){var r=n(300).WriteError,i=n(424),o=n(231).getCallback,s=n(231).getOptions;function a(e){this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}a.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new r(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},a.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new r(e)}return this.ops.push({type:"del",key:e}),this.length++,this},a.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new r(e)}return this.ops=[],this.length=0,this},a.prototype.write=function(e,t){var n=this._levelup,a=this.ops,u;t=o(e,t),t||(t=i(),u=t.promise),e=s(e);try{this.batch.write(e,function(e){if(e)return t(new r(e));n.emit("batch",a),t()})}catch(e){throw new r(e)}return u},e.exports=a},function(e,t,n){var r=e.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];e.exports.errno={},e.exports.code={},r.forEach(function(t){e.exports.errno[t.errno]=t,e.exports.code[t.code]=t}),e.exports.custom=n(835)(e.exports),e.exports.create=e.exports.custom.createError},function(e,t,n){var r=n(836);function i(e,t,n){t&&"string"!=typeof t&&(t=t.message||t.name),r(this,{type:e,name:e,cause:"string"!=typeof t?t:n,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}function s(e,t,n){var r=function(n,o){i.call(this,t,n,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,r)};return r.prototype=n?new n:new o,r}o.prototype=new Error,e.exports=function(e){var t=function(t,n){return s(e,t,n)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},function(e,t,n){
/*!
* prr
* (c) 2013 Rod Vagg <rod@vagg.org>
* https://github.com/rvagg/prr
* License: MIT
*/
var r,i,o;r="prr",i=this,o=function(){var e="function"==typeof Object.defineProperty?function(e,t,n){return Object.defineProperty(e,t,n),e}:function(e,t,n){return e[t]=n.value,e},t=function(e,t){var n="object"==typeof t,r=!n&&"string"==typeof t,i=function(e){return n?!!t[e]:!!r&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}},n=function(n,r,i,o){var s;if(o=t(i,o),"object"==typeof r){for(s in r)Object.hasOwnProperty.call(r,s)&&(o.value=r[s],e(n,s,o));return n}return e(n,r,o)};return n},e.exports?e.exports=o():i.prr=o()},function(e,t,n){"use strict";var r=n(301).AbstractLevelDOWN,i=n(301).AbstractChainedBatch,o=n(301).AbstractIterator,s=n(1),a=n(839),u=n(300).EncodingError;function l(e,t){if(!(this instanceof l))return new l(e,t);r.call(this,""),t=t||{},void 0===t.keyEncoding&&(t.keyEncoding="utf8"),void 0===t.valueEncoding&&(t.valueEncoding="utf8"),this.db=e,this.codec=new a(t)}function c(e,t){o.call(this,e),this.codec=e.codec,this.keys=t.keys,this.values=t.values,this.opts=this.codec.encodeLtgt(t),this.it=e.db.iterator(this.opts)}function f(e,t){i.call(this,e),this.codec=e.codec,this.batch=e.db.batch()}e.exports=l.default=l,s(l,r),l.prototype._serializeKey=l.prototype._serializeValue=function(e){return e},l.prototype._open=function(e,t){this.db.open(e,t)},l.prototype._close=function(e){this.db.close(e)},l.prototype._put=function(e,t,n,r){e=this.codec.encodeKey(e,n),t=this.codec.encodeValue(t,n),this.db.put(e,t,n,r)},l.prototype._get=function(e,t,n){var r=this;e=this.codec.encodeKey(e,t),t.asBuffer=this.codec.valueAsBuffer(t),this.db.get(e,t,function(e,i){if(e)return n(e);try{i=r.codec.decodeValue(i,t)}catch(e){return n(new u(e))}n(null,i)})},l.prototype._del=function(e,t,n){e=this.codec.encodeKey(e,t),this.db.del(e,t,n)},l.prototype._chainedBatch=function(){return new f(this)},l.prototype._batch=function(e,t,n){e=this.codec.encodeBatch(e,t),this.db.batch(e,t,n)},l.prototype._iterator=function(e){return e.keyAsBuffer=this.codec.keyAsBuffer(e),e.valueAsBuffer=this.codec.valueAsBuffer(e),new c(this,e)},l.prototype.approximateSize=function(e,t,n,r){return e=this.codec.encodeKey(e,n),t=this.codec.encodeKey(t,n),this.db.approximateSize(e,t,n,r)},s(c,o),c.prototype._next=function(e){var t=this;this.it.next(function(n,r,i){if(n)return e(n);try{r=t.keys&&void 0!==r?t.codec.decodeKey(r,t.opts):void 0,i=t.values&&void 0!==i?t.codec.decodeValue(i,t.opts):void 0}catch(n){return e(new u(n))}e(null,r,i)})},c.prototype._end=function(e){this.it.end(e)},s(f,i),f.prototype._put=function(e,t){e=this.codec.encodeKey(e),t=this.codec.encodeValue(t),this.batch.put(e,t)},f.prototype._del=function(e){e=this.codec.encodeKey(e),this.batch.del(e)},f.prototype._clear=function(){this.batch.clear()},f.prototype._write=function(e,t){this.batch.write(e,t)}},function(e,t,n){(function(t,r){var i=n(69),o=n(425),s=n(426),a=Object.prototype.hasOwnProperty,u="start end gt gte lt lte".split(" ");function l(){this.status="new"}function c(e,t){var n={};for(var r in t)if(a.call(t,r)){var i=t[r];f(r)&&(i=e._serializeKey(i)),n[r]=i}return n}function f(e){return-1!==u.indexOf(e)}l.prototype.open=function(e,t){var n=this,r=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)return n.status=r,t(e);n.status="open",t()})},l.prototype._open=function(e,n){t.nextTick(n)},l.prototype.close=function(e){var t=this,n=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(r){if(r)return t.status=n,e(r);t.status="closed",e()})},l.prototype._close=function(e){t.nextTick(e)},l.prototype.get=function(e,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("get() requires a callback argument");var i=this._checkKey(e);if(i)return t.nextTick(r,i);e=this._serializeKey(e),"object"==typeof n&&null!==n||(n={}),n.asBuffer=!1!==n.asBuffer,this._get(e,n,r)},l.prototype._get=function(e,n,r){t.nextTick(function(){r(new Error("NotFound"))})},l.prototype.put=function(e,n,r,i){if("function"==typeof r&&(i=r),"function"!=typeof i)throw new Error("put() requires a callback argument");var o=this._checkKey(e)||this._checkValue(n);if(o)return t.nextTick(i,o);e=this._serializeKey(e),n=this._serializeValue(n),"object"==typeof r&&null!==r||(r={}),this._put(e,n,r,i)},l.prototype._put=function(e,n,r,i){t.nextTick(i)},l.prototype.del=function(e,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("del() requires a callback argument");var i=this._checkKey(e);if(i)return t.nextTick(r,i);e=this._serializeKey(e),"object"==typeof n&&null!==n||(n={}),this._del(e,n,r)},l.prototype._del=function(e,n,r){t.nextTick(r)},l.prototype.batch=function(e,n,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof n&&(r=n),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return t.nextTick(r,new Error("batch(array) requires an array argument"));if(0===e.length)return t.nextTick(r);"object"==typeof n&&null!==n||(n={});for(var o=new Array(e.length),s=0;s<e.length;s++){if("object"!=typeof e[s]||null===e[s])return t.nextTick(r,new Error("batch(array) element must be an object and not `null`"));var a=i(e[s]);if("put"!==a.type&&"del"!==a.type)return t.nextTick(r,new Error("`type` must be 'put' or 'del'"));var u=this._checkKey(a.key);if(u)return t.nextTick(r,u);if(a.key=this._serializeKey(a.key),"put"===a.type){var l=this._checkValue(a.value);if(l)return t.nextTick(r,l);a.value=this._serializeValue(a.value)}o[s]=a}this._batch(o,n,r)},l.prototype._batch=function(e,n,r){t.nextTick(r)},l.prototype._setupIteratorOptions=function(e){return e=c(this,e),e.reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},l.prototype._iterator=function(e){return new o(this)},l.prototype._chainedBatch=function(){return new s(this)},l.prototype._serializeKey=function(e){return e},l.prototype._serializeValue=function(e){return e},l.prototype._checkKey=function(e){return null===e||void 0===e?new Error("key cannot be `null` or `undefined`"):r.isBuffer(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},l.prototype._checkValue=function(e){if(null===e||void 0===e)return new Error("value cannot be `null` or `undefined`")},e.exports=l}).call(this,n(2),n(0).Buffer)},function(e,t,n){var r=n(840);function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=r}e.exports=i,i.prototype._encoding=function(e){return"string"==typeof e&&(e=r[e]),e||(e=r.id),e},i.prototype._keyEncoding=function(e,t){return this._encoding(t&&t.keyEncoding||e&&e.keyEncoding||this.opts.keyEncoding)},i.prototype._valueEncoding=function(e,t){return this._encoding(t&&(t.valueEncoding||t.encoding)||e&&(e.valueEncoding||e.encoding)||this.opts.valueEncoding||this.opts.encoding)},i.prototype.encodeKey=function(e,t,n){return this._keyEncoding(t,n).encode(e)},i.prototype.encodeValue=function(e,t,n){return this._valueEncoding(t,n).encode(e)},i.prototype.decodeKey=function(e,t){return this._keyEncoding(t).decode(e)},i.prototype.decodeValue=function(e,t){return this._valueEncoding(t).decode(e)},i.prototype.encodeBatch=function(e,t){var n=this;return e.map(function(e){var r={type:e.type,key:n.encodeKey(e.key,t,e)};return n.keyAsBuffer(t,e)&&(r.keyEncoding="binary"),e.prefix&&(r.prefix=e.prefix),"value"in e&&(r.value=n.encodeValue(e.value,t,e),n.valueAsBuffer(t,e)&&(r.valueEncoding="binary")),r})};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(e){var t=this,n={};return Object.keys(e).forEach(function(r){n[r]=o.indexOf(r)>-1?t.encodeKey(e[r],e):e[r]}),n},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(n,r){return{key:t.decodeKey(n,e),value:t.decodeValue(r,e)}}:e.keys?function(n){return t.decodeKey(n,e)}:e.values?function(n,r){return t.decodeValue(r,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},function(e,t,n){(function(e){t.utf8=t["utf-8"]={encode:function(e){return i(e)?e:String(e)},decode:r,buffer:!1,type:"utf8"},t.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},t.binary={encode:function(t){return i(t)?t:e.from(t)},decode:r,buffer:!0,type:"binary"},t.none={encode:r,decode:r,buffer:!1,type:"id"},t.id=t.none;var n=["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"];function r(e){return e}function i(t){return void 0===t||null===t||e.isBuffer(t)}n.forEach(function(n){t[n]={encode:function(t){return i(t)?t:e.from(t,n)},decode:function(e){return e.toString(n)},buffer:!0,type:n}})}).call(this,n(0).Buffer)},function(e,t,n){(function(t,r){e.exports=u;var i=n(427).AbstractLevelDOWN,o=n(13),s=n(843),a=n(69);function u(e){if(!(this instanceof u))return new u(e);i.call(this,e)}o.inherits(u,i),u.prototype._open=function(e,t){var n=this;if(this._idbOpts=a({storeName:this.location,keyEncoding:"none",valueEncoding:"none"},e),this._idbOpts.idb)o(this._idbOpts.idb);else{var r=indexedDB.open(this.location);r.onerror=i,r.onsuccess=function(){o(r.result)}}function i(e){t(e.target.error)}function o(r){n._db=r;var i=n._db.objectStoreNames.contains(n._idbOpts.storeName);if(e.errorIfExists&&i)return n._db.close(),void t(new Error("store already exists"));if(!e.createIfMissing&&!i)return n._db.close(),void t(new Error("store does not exist"));if(e.createIfMissing&&!i){n._db.close();var o=indexedDB.open(n.location,n._db.version+1);return o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){var e=o.result;e.createObjectStore(n._idbOpts.storeName,n._idbOpts)},void(o.onsuccess=function(){n._db=o.result,t(null,n)})}t(null,n)}},u.prototype._get=function(e,n,r){n=a(this._idbOpts,n);var i=e;"binary"!==n.keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var o=this._db.transaction(this._idbOpts.storeName),s=o.objectStore(this._idbOpts.storeName).openCursor(IDBKeyRange.only(e));o.onabort=function(){r(o.error)},s.onsuccess=function(){var e=s.result;if(e){var o=e.value;if(o instanceof Uint8Array&&(o=new t(o)),"binary"!==n.valueEncoding||t.isBuffer(o)||(o=new t(o)),n.asBuffer&&!t.isBuffer(o))if(null==o)o=new t(0);else if("string"==typeof o)o=new t(o);else if("boolean"==typeof o)o=new t(String(o));else if("number"==typeof o)o=new t(String(o));else if(Array.isArray(o))o=new t(String(o));else{if(!(o instanceof Uint8Array))return void r(new TypeError("can't coerce `"+o.constructor.name+"` into a Buffer"));o=new t(o)}r(null,o,i)}else r(new Error("NotFound"))}},u.prototype._del=function(e,t,n){t=a(this._idbOpts,t),"binary"!==t.keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var r="readwrite";!0===t.sync&&(r="readwriteflush");var i=this._db.transaction(this._idbOpts.storeName,r),o=i.objectStore(this._idbOpts.storeName).delete(e);i.onabort=function(){n(i.error)},i.oncomplete=function(){n()}},u.prototype._put=function(e,t,n,r){n=a(this._idbOpts,n),"binary"!==n.keyEncoding||Array.isArray(e)||(e=Array.prototype.slice.call(e));var i="readwrite";!0===n.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i),s=o.objectStore(this._idbOpts.storeName).put(t,e);o.onabort=function(){r(o.error)},o.oncomplete=function(){r()}},u.prototype._iterator=function(e){return new s(this,e)},u.prototype._batch=function(e,t,n){if(0===e.length)return r.nextTick(n);var i="readwrite";!0===t.sync&&(i="readwriteflush");var o=this._db.transaction(this._idbOpts.storeName,i),s=o.objectStore(this._idbOpts.storeName);o.onabort=function(){n(o.error)},o.oncomplete=function(){n()},e.forEach(function(e){var n=a(t,e);"binary"!==n.keyEncoding||Array.isArray(e.key)||(e.key=Array.prototype.slice.call(e.key)),"del"===e.type?s.delete(e.key):s.put(e.value,e.key)})},u.prototype._close=function(e){this._db.close(),r.nextTick(e)},u.prototype._approximateSize=function(e,t,n){var i=new Error("Not implemented");if(!n)throw i;r.nextTick(function(){n(i)})},u.destroy=function(e,t){var n;if(null!=e&&"object"==typeof e)n=a({location:e.location,storeName:e.location},e._idbOpts);else{if("string"!=typeof e)throw new TypeError("location must be a string or an object");n={location:e,storeName:e}}if("string"!=typeof n.location)throw new TypeError("location must be a string");if("string"!=typeof n.storeName)throw new TypeError("db.storeName must be a string");var r=indexedDB.open(n.location);r.onerror=function(e){t(e.target.error)},r.onsuccess=function(){var e=r.result;function i(e){var n=indexedDB.deleteDatabase(e);n.onerror=function(e){t(e.target.error)},n.onsuccess=function(){t()}}if(e.close(),0!==e.objectStoreNames.length)if(e.objectStoreNames.contains(n.storeName)){var o=indexedDB.open(n.location,e.version+1);o.onerror=function(e){t(e.target.error)},o.onupgradeneeded=function(){e=o.result,e.deleteObjectStore(n.storeName)},o.onsuccess=function(){e=o.result,e.close(),0===e.objectStoreNames.length?i(n.location):t()}}else t();else i(n.location)}}}).call(this,n(0).Buffer,n(2))},function(e,t,n){var r=n(428);function i(e){return!(!e||"object"!=typeof e)&&Object.keys(r.prototype).filter(function(e){return"_"!=e[0]&&"approximateSize"!=e}).every(function(t){return"function"==typeof e[t]})}e.exports=i},function(e,t,n){(function(t,r){var i=n(13),o=n(427).AbstractIterator,s=n(844),a=n(845),u=n(57),l=n(69),c=u.Writable;function f(e,t){if(this._db=e._db,this._idbOpts=e._idbOpts,o.call(this,e),this._options=l({snapshot:!0},this._idbOpts,t),this._limit=this._options.limit,null!=this._limit&&-1!==this._limit||(this._limit=1/0),"number"!=typeof this._limit)throw new TypeError("options.limit must be a number");0!==this._limit&&(this._count=0,this._startCursor(this._options))}e.exports=f,i.inherits(f,o),f.prototype._startCursor=function(e){e=l(this._options,e);var t=this,n=null,r=s.lowerBound(e),i=s.upperBound(e),o=s.lowerBoundExclusive(e),u=s.upperBoundExclusive(e),f=e.reverse?"prev":"next";if(r&&("binary"!==e.keyEncoding||Array.isArray(r)||(r=Array.prototype.slice.call(r))),i&&("binary"!==e.keyEncoding||Array.isArray(i)||(i=Array.prototype.slice.call(i))),r&&i)try{n=IDBKeyRange.bound(r,i,o,u)}catch(e){return void(this._keyRangeError=!0)}else r?n=IDBKeyRange.lowerBound(r,o):i&&(n=IDBKeyRange.upperBound(i,u));this._reader=a(this._db,this._idbOpts.storeName,l(e,{range:n,direction:f})),this._reader.on("error",function(e){var n=t._callback;t._callback=!1,n?n(e):t._readNext=function(t){t(e)}}),this._reader.pipe(new c({objectMode:!0,write:function(e,n,r){if(t._count++>=t._limit)return t._reader.pause(),t._reader.unpipe(this),r(),void this.end();var i=t._callback;t._callback=!1,i?t._processItem(e,function(e,t,n){r(e),i(e,t,n)}):t._readNext=function(n){t._processItem(e,function(e,t,i){r(e),n(e,t,i)})}}})).on("finish",function(){var e=t._callback;t._callback=!1,e?e():t._readNext=function(e){e()}})},f.prototype._processItem=function(e,n){if("function"!=typeof n)throw new TypeError("cb must be a function");var r=e.key,i=e.value;if(i instanceof Uint8Array&&(i=new t(i)),"binary"===this._options.keyEncoding&&Array.isArray(r)&&(r=new t(r)),"binary"!==this._options.valueEncoding||t.isBuffer(i)||(i=new t(i)),this._options.keyAsBuffer&&!t.isBuffer(r))if(null==r)r=new t(0);else if("string"==typeof r)r=new t(r);else if("boolean"==typeof r)r=new t(String(r));else if("number"==typeof r)r=new t(String(r));else if(Array.isArray(r))r=new t(String(r));else{if(!(r instanceof Uint8Array))throw new TypeError("can't coerce `"+r.constructor.name+"` into a Buffer");r=new t(r)}if(this._options.valueAsBuffer&&!t.isBuffer(i))if(null==i)i=new t(0);else if("string"==typeof i)i=new t(i);else if("boolean"==typeof i)i=new t(String(i));else if("number"==typeof i)i=new t(String(i));else if(Array.isArray(i))i=new t(String(i));else{if(!(i instanceof Uint8Array))throw new TypeError("can't coerce `"+i.constructor.name+"` into a Buffer");i=new t(i)}n(null,r,i)},f.prototype._next=function(e){if(this._callback)throw new Error("callback already exists");if(this._keyRangeError||0===this._limit)e();else{var t=this._readNext;this._readNext=!1,t?r.nextTick(function(){t(e)}):this._callback=e}}}).call(this,n(0).Buffer,n(2))},function(e,t,n){(function(e){function n(e){return void 0!==e&&""!==e}function r(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}t.compare=function(t,n){if(e.isBuffer(t)){for(var r=Math.min(t.length,n.length),i=0;i<r;i++){var o=t[i]-n[i];if(o)return o}return t.length-n.length}return t<n?-1:t>n?1:0};var o=t.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},s=t.lowerBound=function(e,t){var n=o(e);return n?e[n]:t},a=t.lowerBoundInclusive=function(e){return!r(e,"gt")},u=t.upperBoundInclusive=function(e){return!r(e,"lt")},l=t.lowerBoundExclusive=function(e){return!a(e)},c=t.upperBoundExclusive=function(e){return!u(e)},f=t.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=t.upperBound=function(e,t){var n=f(e);return n?e[n]:t};function p(e){return e}t.start=function(e,t){return e.reverse?h(e,t):s(e,t)},t.end=function(e,t){return e.reverse?s(e,t):h(e,t)},t.startInclusive=function(e){return e.reverse?u(e):a(e)},t.endInclusive=function(e){return e.reverse?a(e):u(e)},t.toLtgt=function(e,n,i,o,s){n=n||{},i=i||p;var a=arguments.length>3,u=t.lowerBoundKey(e),l=t.upperBoundKey(e);return u?"gt"===u?n.gt=i(e.gt,!1):n.gte=i(e[u],!1):a&&(n.gte=i(o,!1)),l?"lt"===l?n.lt=i(e.lt,!0):n.lte=i(e[l],!0):a&&(n.lte=i(s,!0)),null!=e.reverse&&(n.reverse=!!e.reverse),r(n,"max")&&delete n.max,r(n,"min")&&delete n.min,r(n,"start")&&delete n.start,r(n,"end")&&delete n.end,n},t.contains=function(e,r,i){i=i||t.compare;var o=s(e);if(n(o)){var a=i(r,o);if(a<0||0===a&&l(e))return!1}var u=h(e);if(n(u)){var a=i(r,u);if(a>0||0===a&&c(e))return!1}return!0},t.filter=function(e,n){return function(r){return t.contains(e,r,n)}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(57),i=n(69);function o(e,t,n){if("object"!=typeof e)throw new TypeError("db must be an object");if("string"!=typeof t)throw new TypeError("storeName must be a string");if(null==n&&(n={}),"object"!=typeof n)throw new TypeError("opts must be an object");var o=new r.Transform(i(n,{objectMode:!0,transform:function(e,t,n){n(null,e)}}));n=i({snapshot:!1},n);var s=null;function a(){var r,i,u,l,c=n.direction||"next",f=n.range||{},h;r=f.lower,i=f.upper,u=!!f.lowerOpen,l=!!f.upperOpen,s&&("next"===c?(u=!0,r=s):(l=!0,i=s)),r&&i?h=IDBKeyRange.bound(r,i,u,l):r?h=IDBKeyRange.lowerBound(r,u):i&&(h=IDBKeyRange.upperBound(i,l));var p=e.transaction(t,"readonly"),d=p.objectStore(t);o._cursorsOpened++;var m=d.openCursor(h,n.direction);function g(e){try{e.continue()}catch(e){"TransactionInactiveError"!==e.name||n.snapshot?o.emit("error",e):a()}}m.onsuccess=function(){var e=m.result;if(e){s=e.key;var t=o.write({key:e.key,value:e.value});n.snapshot||t?g(e):o.once("drain",function(){g(e)})}else o.end()},p.onabort=function(){o.emit("error",p.error)},p.onerror=function(){o.emit("error",p.error)}}return o._cursorsOpened=0,a(),o}e.exports=o},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(848);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(434),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(303)},function(e,t,n){e.exports=n(116)},function(e,t,n){e.exports=n(302).Transform},function(e,t,n){e.exports=n(302).PassThrough},function(e,t,n){"use strict";e.exports={Spec:{type:"mount",mounts:[{mountpoint:"/blocks",type:"measure",prefix:"flatfs.datastore",child:{type:"flatfs",path:"blocks",sync:!0,shardFunc:"/repo/flatfs/shard/v1/next-to-last/2"}},{mountpoint:"/",type:"measure",prefix:"leveldb.datastore",child:{type:"levelds",path:"datastore",compression:"none"}}]}}},function(e,t,n){"use strict";t.ERR_REPO_NOT_INITIALIZED="ERR_REPO_NOT_INITIALIZED"},function(e,t,n){"use strict";e.exports={repoVersion:7}},function(e,t){e.exports=function(){var e,t,n,r,i;function o(o){return i?i(o):(e=o,function(e,i){t?t(e,i):(r=e,n=i)})}return o.resolve=function(o){if(i)throw new Error("already resolved");if(i=o,!i)throw new Error("resolve *must* be passed a transform stream");e&&(t=i(e),n&&t(r,n))},o}},function(e,t,n){"use strict";t.Diagnose=n(859),t.Decoder=n(441),t.Encoder=n(862),t.Simple=n(442),t.Tagged=n(443),t.decodeAll=t.Decoder.decodeAll,t.decodeFirst=t.Decoder.decodeFirst,t.diagnose=t.Diagnose.diagnose,t.encode=t.Encoder.encode,t.decode=t.Decoder.decode,t.leveldb={decode:t.Decoder.decodeAll,encode:t.Encoder.encode,buffer:!0,name:"cbor"}},function(e,t,n){"use strict";(function(t){const r=n(441),i=n(305);class o extends r{createTag(e,t){return`${e}(${t})`}createInt(e){return super.createInt(e).toString()}createInt32(e,t){return super.createInt32(e,t).toString()}createInt64(e,t,n,r){return super.createInt64(e,t,n,r).toString()}createInt32Neg(e,t){return super.createInt32Neg(e,t).toString()}createInt64Neg(e,t,n,r){return super.createInt64Neg(e,t,n,r).toString()}createTrue(){return"true"}createFalse(){return"false"}createFloat(e){const t=super.createFloat(e);return i.isNegativeZero(e)?"-0_1":`${t}_1`}createFloatSingle(e,t,n,r){const i=super.createFloatSingle(e,t,n,r);return`${i}_2`}createFloatDouble(e,t,n,r,i,o,s,a){const u=super.createFloatDouble(e,t,n,r,i,o,s,a);return`${u}_3`}createByteString(e,t){const n=e.join(", ");return-1===t?`(_ ${n})`:`h'${n}`}createByteStringFromHeap(e,n){const r=t.from(super.createByteStringFromHeap(e,n)).toString("hex");return`h'${r}'`}createInfinity(){return"Infinity_1"}createInfinityNeg(){return"-Infinity_1"}createNaN(){return"NaN_1"}createNaNNeg(){return"-NaN_1"}createNull(){return"null"}createUndefined(){return"undefined"}createSimpleUnassigned(e){return`simple(${e})`}createArray(e,t){const n=super.createArray(e,t);return-1===t?`[_ ${n.join(", ")}]`:`[${n.join(", ")}]`}createMap(e,t){const n=super.createMap(e),r=Array.from(n.keys()).reduce(s(n),"");return-1===t?`{_ ${r}}`:`{${r}}`}createObject(e,t){const n=super.createObject(e),r=Object.keys(n).reduce(s(n),"");return-1===t?`{_ ${r}}`:`{${r}}`}createUtf8String(e,t){const n=e.join(", ");return-1===t?`(_ ${n})`:`"${n}"`}createUtf8StringFromHeap(e,n){const r=t.from(super.createUtf8StringFromHeap(e,n)).toString("utf8");return`"${r}"`}static diagnose(e,n){"string"==typeof e&&(e=t.from(e,n||"hex"));const r=new o;return r.decodeFirst(e)}}function s(e){return(t,n)=>t?`${t}, ${n}: ${e[n]}`:`${n}: ${e[n]}`}e.exports=o}).call(this,n(0).Buffer)},function(e,t){e.exports=function e(t,n,r){"use asm";var i=new t.Uint8Array(r);var o=n.pushInt;var s=n.pushInt32;var a=n.pushInt32Neg;var u=n.pushInt64;var l=n.pushInt64Neg;var c=n.pushFloat;var f=n.pushFloatSingle;var h=n.pushFloatDouble;var p=n.pushTrue;var d=n.pushFalse;var m=n.pushUndefined;var g=n.pushNull;var y=n.pushInfinity;var b=n.pushInfinityNeg;var v=n.pushNaN;var w=n.pushNaNNeg;var _=n.pushArrayStart;var k=n.pushArrayStartFixed;var S=n.pushArrayStartFixed32;var E=n.pushArrayStartFixed64;var x=n.pushObjectStart;var C=n.pushObjectStartFixed;var A=n.pushObjectStartFixed32;var I=n.pushObjectStartFixed64;var T=n.pushByteString;var j=n.pushByteStringStart;var O=n.pushUtf8String;var P=n.pushUtf8StringStart;var B=n.pushSimpleUnassigned;var R=n.pushTagStart;var N=n.pushTagStart4;var M=n.pushTagStart8;var L=n.pushTagUnassigned;var F=n.pushBreak;var D=t.Math.pow;var U=0;var z=0;var q=0;function K(e){e=e|0;U=0;z=e;while((U|0)<(z|0)){q=Ze[i[U]&255](i[U]|0)|0;if((q|0)>0){break}}return q|0}function H(e){e=e|0;if(((U|0)+(e|0)|0)<(z|0)){return 0}return 1}function V(e){e=e|0;return i[e|0]<<8|i[e+1|0]|0}function W(e){e=e|0;return i[e|0]<<24|i[e+1|0]<<16|i[e+2|0]<<8|i[e+3|0]|0}function $(e){e=e|0;o(e|0);U=U+1|0;return 0}function G(e){e=e|0;if(H(1)|0){return 1}o(i[U+1|0]|0);U=U+2|0;return 0}function Y(e){e=e|0;if(H(2)|0){return 1}o(V(U+1|0)|0);U=U+3|0;return 0}function J(e){e=e|0;if(H(4)|0){return 1}s(V(U+1|0)|0,V(U+3|0)|0);U=U+5|0;return 0}function Z(e){e=e|0;if(H(8)|0){return 1}u(V(U+1|0)|0,V(U+3|0)|0,V(U+5|0)|0,V(U+7|0)|0);U=U+9|0;return 0}function X(e){e=e|0;o(-1-(e-32|0)|0);U=U+1|0;return 0}function Q(e){e=e|0;if(H(1)|0){return 1}o(-1-(i[U+1|0]|0)|0);U=U+2|0;return 0}function ee(e){e=e|0;var t=0;if(H(2)|0){return 1}t=V(U+1|0)|0;o(-1-(t|0)|0);U=U+3|0;return 0}function te(e){e=e|0;if(H(4)|0){return 1}a(V(U+1|0)|0,V(U+3|0)|0);U=U+5|0;return 0}function ne(e){e=e|0;if(H(8)|0){return 1}l(V(U+1|0)|0,V(U+3|0)|0,V(U+5|0)|0,V(U+7|0)|0);U=U+9|0;return 0}function re(e){e=e|0;var t=0;var n=0;var r=0;r=e-64|0;if(H(r|0)|0){return 1}t=U+1|0;n=(U+1|0)+(r|0)|0;T(t|0,n|0);U=n|0;return 0}function ie(e){e=e|0;var t=0;var n=0;var r=0;if(H(1)|0){return 1}r=i[U+1|0]|0;t=U+2|0;n=(U+2|0)+(r|0)|0;if(H(r+1|0)|0){return 1}T(t|0,n|0);U=n|0;return 0}function oe(e){e=e|0;var t=0;var n=0;var r=0;if(H(2)|0){return 1}r=V(U+1|0)|0;t=U+3|0;n=(U+3|0)+(r|0)|0;if(H(r+2|0)|0){return 1}T(t|0,n|0);U=n|0;return 0}function se(e){e=e|0;var t=0;var n=0;var r=0;if(H(4)|0){return 1}r=W(U+1|0)|0;t=U+5|0;n=(U+5|0)+(r|0)|0;if(H(r+4|0)|0){return 1}T(t|0,n|0);U=n|0;return 0}function ae(e){e=e|0;return 1}function ue(e){e=e|0;j();U=U+1|0;return 0}function le(e){e=e|0;var t=0;var n=0;var r=0;r=e-96|0;if(H(r|0)|0){return 1}t=U+1|0;n=(U+1|0)+(r|0)|0;O(t|0,n|0);U=n|0;return 0}function ce(e){e=e|0;var t=0;var n=0;var r=0;if(H(1)|0){return 1}r=i[U+1|0]|0;t=U+2|0;n=(U+2|0)+(r|0)|0;if(H(r+1|0)|0){return 1}O(t|0,n|0);U=n|0;return 0}function fe(e){e=e|0;var t=0;var n=0;var r=0;if(H(2)|0){return 1}r=V(U+1|0)|0;t=U+3|0;n=(U+3|0)+(r|0)|0;if(H(r+2|0)|0){return 1}O(t|0,n|0);U=n|0;return 0}function he(e){e=e|0;var t=0;var n=0;var r=0;if(H(4)|0){return 1}r=W(U+1|0)|0;t=U+5|0;n=(U+5|0)+(r|0)|0;if(H(r+4|0)|0){return 1}O(t|0,n|0);U=n|0;return 0}function pe(e){e=e|0;return 1}function de(e){e=e|0;P();U=U+1|0;return 0}function me(e){e=e|0;k(e-128|0);U=U+1|0;return 0}function ge(e){e=e|0;if(H(1)|0){return 1}k(i[U+1|0]|0);U=U+2|0;return 0}function ye(e){e=e|0;if(H(2)|0){return 1}k(V(U+1|0)|0);U=U+3|0;return 0}function be(e){e=e|0;if(H(4)|0){return 1}S(V(U+1|0)|0,V(U+3|0)|0);U=U+5|0;return 0}function ve(e){e=e|0;if(H(8)|0){return 1}E(V(U+1|0)|0,V(U+3|0)|0,V(U+5|0)|0,V(U+7|0)|0);U=U+9|0;return 0}function we(e){e=e|0;_();U=U+1|0;return 0}function _e(e){e=e|0;var t=0;t=e-160|0;if(H(t|0)|0){return 1}C(t|0);U=U+1|0;return 0}function ke(e){e=e|0;if(H(1)|0){return 1}C(i[U+1|0]|0);U=U+2|0;return 0}function Se(e){e=e|0;if(H(2)|0){return 1}C(V(U+1|0)|0);U=U+3|0;return 0}function Ee(e){e=e|0;if(H(4)|0){return 1}A(V(U+1|0)|0,V(U+3|0)|0);U=U+5|0;return 0}function xe(e){e=e|0;if(H(8)|0){return 1}I(V(U+1|0)|0,V(U+3|0)|0,V(U+5|0)|0,V(U+7|0)|0);U=U+9|0;return 0}function Ce(e){e=e|0;x();U=U+1|0;return 0}function Ae(e){e=e|0;R(e-192|0|0);U=U+1|0;return 0}function Ie(e){e=e|0;R(e|0);U=U+1|0;return 0}function Te(e){e=e|0;R(e|0);U=U+1|0;return 0}function je(e){e=e|0;R(e|0);U=U+1|0;return 0}function Oe(e){e=e|0;R(e|0);U=U+1|0;return 0}function Pe(e){e=e|0;R(e-192|0|0);U=U+1|0;return 0}function Be(e){e=e|0;R(e|0);U=U+1|0;return 0}function Re(e){e=e|0;R(e|0);U=U+1|0;return 0}function Ne(e){e=e|0;R(e|0);U=U+1|0;return 0}function Me(e){e=e|0;if(H(1)|0){return 1}R(i[U+1|0]|0);U=U+2|0;return 0}function Le(e){e=e|0;if(H(2)|0){return 1}R(V(U+1|0)|0);U=U+3|0;return 0}function Fe(e){e=e|0;if(H(4)|0){return 1}N(V(U+1|0)|0,V(U+3|0)|0);U=U+5|0;return 0}function De(e){e=e|0;if(H(8)|0){return 1}M(V(U+1|0)|0,V(U+3|0)|0,V(U+5|0)|0,V(U+7|0)|0);U=U+9|0;return 0}function Ue(e){e=e|0;B((e|0)-224|0);U=U+1|0;return 0}function ze(e){e=e|0;d();U=U+1|0;return 0}function qe(e){e=e|0;p();U=U+1|0;return 0}function Ke(e){e=e|0;g();U=U+1|0;return 0}function He(e){e=e|0;m();U=U+1|0;return 0}function Ve(e){e=e|0;if(H(1)|0){return 1}B(i[U+1|0]|0);U=U+2|0;return 0}function We(e){e=e|0;var t=0;var n=0;var r=1.0;var o=0.0;var s=0.0;var a=0.0;if(H(2)|0){return 1}t=i[U+1|0]|0;n=i[U+2|0]|0;if((t|0)&0x80){r=-1.0}o=+(((t|0)&0x7C)>>2);s=+(((t|0)&0x03)<<8|n);if(+o==0.0){c(+(+r*+5.9604644775390625e-8*+s))}else if(+o==31.0){if(+r==1.0){if(+s>0.0){v()}else{y()}}else{if(+s>0.0){w()}else{b()}}}else{c(+(+r*D(+2,+(+o-25.0))*+(1024.0+s)))}U=U+3|0;return 0}function $e(e){e=e|0;if(H(4)|0){return 1}f(i[U+1|0]|0,i[U+2|0]|0,i[U+3|0]|0,i[U+4|0]|0);U=U+5|0;return 0}function Ge(e){e=e|0;if(H(8)|0){return 1}h(i[U+1|0]|0,i[U+2|0]|0,i[U+3|0]|0,i[U+4|0]|0,i[U+5|0]|0,i[U+6|0]|0,i[U+7|0]|0,i[U+8|0]|0);U=U+9|0;return 0}function Ye(e){e=e|0;return 1}function Je(e){e=e|0;F();U=U+1|0;return 0}var Ze=[$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,G,Y,J,Z,Ye,Ye,Ye,Ye,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,Q,ee,te,ne,Ye,Ye,Ye,Ye,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,ie,oe,se,ae,Ye,Ye,Ye,ue,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,le,ce,fe,he,pe,Ye,Ye,Ye,de,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,me,ge,ye,be,ve,Ye,Ye,Ye,we,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,_e,ke,Se,Ee,xe,Ye,Ye,Ye,Ce,Ae,Ae,Ae,Ae,Ae,Ae,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Pe,Me,Le,Fe,De,Ye,Ye,Ye,Ye,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,ze,qe,Ke,He,Ve,We,$e,Ge,Ye,Ye,Ye,Je];return{parse:K}}},function(e,t,n){"use strict";const{URLWithLegacySupport:r,format:i}=n(444);e.exports=((e,t={},n={},o)=>{let s=t.protocol?t.protocol.replace(":",""):"http",a;s=(n[s]||o||s)+":";try{a=new r(e)}catch(e){a={}}const u=Object.assign({},t,{protocol:s||a.protocol,host:t.host||a.host});return new r(e,i(u)).toString()})},function(e,t,n){"use strict";(function(t){const{URL:r}=n(306),i=n(62),o=n(305),s=n(232),a=s.MT,u=s.NUMBYTES,l=s.SHIFT32,c=s.SYMS,f=s.TAG,h=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.TWO,p=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.FOUR,d=s.MT.SIMPLE_FLOAT<<5|s.NUMBYTES.EIGHT,m=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.TRUE,g=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.FALSE,y=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.UNDEFINED,b=s.MT.SIMPLE_FLOAT<<5|s.SIMPLE.NULL,v=new i("0x20000000000000"),w=t.from("f97e00","hex"),_=t.from("f9fc00","hex"),k=t.from("f97c00","hex");function S(e){return{}.toString.call(e).slice(8,-1)}class E{constructor(e){e=e||{},this.streaming="function"==typeof e.stream,this.onData=e.stream,this.semanticTypes=[[r,this._pushUrl],[i,this._pushBigNumber]];const t=e.genTypes||[],n=t.length;for(let e=0;e<n;e++)this.addSemanticType(t[e][0],t[e][1]);this._reset()}addSemanticType(e,t){const n=this.semanticTypes.length;for(let r=0;r<n;r++){const n=this.semanticTypes[r][0];if(n===e){const e=this.semanticTypes[r][1];return this.semanticTypes[r][1]=t,e}}return this.semanticTypes.push([e,t]),null}push(e){return!e||(this.result[this.offset]=e,this.resultMethod[this.offset]=0,this.resultLength[this.offset]=e.length,this.offset++,this.streaming&&this.onData(this.finalize()),!0)}pushWrite(e,t,n){return this.result[this.offset]=e,this.resultMethod[this.offset]=t,this.resultLength[this.offset]=n,this.offset++,this.streaming&&this.onData(this.finalize()),!0}_pushUInt8(e){return this.pushWrite(e,1,1)}_pushUInt16BE(e){return this.pushWrite(e,2,2)}_pushUInt32BE(e){return this.pushWrite(e,3,4)}_pushDoubleBE(e){return this.pushWrite(e,4,8)}_pushNaN(){return this.push(w)}_pushInfinity(e){const t=e<0?_:k;return this.push(t)}_pushFloat(e){const n=t.allocUnsafe(2);if(o.writeHalf(n,e)&&o.parseHalf(n)===e)return this._pushUInt8(h)&&this.push(n);const r=t.allocUnsafe(4);return r.writeFloatBE(e,0),r.readFloatBE(0)===e?this._pushUInt8(p)&&this.push(r):this._pushUInt8(d)&&this._pushDoubleBE(e)}_pushInt(e,t,n){const r=t<<5;return e<24?this._pushUInt8(r|e):e<=255?this._pushUInt8(r|u.ONE)&&this._pushUInt8(e):e<=65535?this._pushUInt8(r|u.TWO)&&this._pushUInt16BE(e):e<=4294967295?this._pushUInt8(r|u.FOUR)&&this._pushUInt32BE(e):e<=Number.MAX_SAFE_INTEGER?this._pushUInt8(r|u.EIGHT)&&this._pushUInt32BE(Math.floor(e/l))&&this._pushUInt32BE(e%l):t===a.NEG_INT?this._pushFloat(n):this._pushFloat(e)}_pushIntNum(e){return e<0?this._pushInt(-e-1,a.NEG_INT,e):this._pushInt(e,a.POS_INT)}_pushNumber(e){switch(!1){case e==e:return this._pushNaN(e);case isFinite(e):return this._pushInfinity(e);case e%1!=0:return this._pushIntNum(e);default:return this._pushFloat(e)}}_pushString(e){const n=t.byteLength(e,"utf8");return this._pushInt(n,a.UTF8_STRING)&&this.pushWrite(e,5,n)}_pushBoolean(e){return this._pushUInt8(e?m:g)}_pushUndefined(e){return this._pushUInt8(y)}_pushArray(e,t){const n=t.length;if(!e._pushInt(n,a.ARRAY))return!1;for(let r=0;r<n;r++)if(!e.pushAny(t[r]))return!1;return!0}_pushTag(e){return this._pushInt(e,a.TAG)}_pushDate(e,t){return e._pushTag(f.DATE_EPOCH)&&e.pushAny(Math.round(t/1e3))}_pushBuffer(e,t){return e._pushInt(t.length,a.BYTE_STRING)&&e.push(t)}_pushNoFilter(e,t){return e._pushBuffer(e,t.slice())}_pushRegexp(e,t){return e._pushTag(f.REGEXP)&&e.pushAny(t.source)}_pushSet(e,t){if(!e._pushInt(t.size,a.ARRAY))return!1;for(let n of t)if(!e.pushAny(n))return!1;return!0}_pushUrl(e,t){return e._pushTag(f.URI)&&e.pushAny(t.format())}_pushBigint(e){let n=f.POS_BIGINT;e.isNegative()&&(e=e.negated().minus(1),n=f.NEG_BIGINT);let r=e.toString(16);r.length%2&&(r="0"+r);const i=t.from(r,"hex");return this._pushTag(n)&&this._pushBuffer(this,i)}_pushBigNumber(e,t){if(t.isNaN())return e._pushNaN();if(!t.isFinite())return e._pushInfinity(t.isNegative()?-1/0:1/0);if(t.isInteger())return e._pushBigint(t);if(!e._pushTag(f.DECIMAL_FRAC)||!e._pushInt(2,a.ARRAY))return!1;const n=t.decimalPlaces(),r=t.multipliedBy(new i(10).pow(n));return!!e._pushIntNum(-n)&&(r.abs().isLessThan(v)?e._pushIntNum(r.toNumber()):e._pushBigint(r))}_pushMap(e,t){return!!e._pushInt(t.size,a.MAP)&&this._pushRawMap(t.size,Array.from(t))}_pushObject(e){if(!e)return this._pushUInt8(b);for(var t=this.semanticTypes.length,n=0;n<t;n++)if(e instanceof this.semanticTypes[n][0])return this.semanticTypes[n][1].call(e,this,e);var r=e.encodeCBOR;if("function"==typeof r)return r.call(e,this);var i=Object.keys(e),o=i.length;return!!this._pushInt(o,a.MAP)&&this._pushRawMap(o,i.map(t=>[t,e[t]]))}_pushRawMap(e,t){t=t.map(function(e){return e[0]=E.encode(e[0]),e}).sort(o.keySorter);for(var n=0;n<e;n++){if(!this.push(t[n][0]))return!1;if(!this.pushAny(t[n][1]))return!1}return!0}write(e){return this.pushAny(e)}pushAny(e){var n=S(e);switch(n){case"Number":return this._pushNumber(e);case"String":return this._pushString(e);case"Boolean":return this._pushBoolean(e);case"Object":return this._pushObject(e);case"Array":return this._pushArray(this,e);case"Uint8Array":return this._pushBuffer(this,t.isBuffer(e)?e:t.from(e));case"Null":return this._pushUInt8(b);case"Undefined":return this._pushUndefined(e);case"Map":return this._pushMap(this,e);case"Set":return this._pushSet(this,e);case"URL":return this._pushUrl(this,e);case"BigNumber":return this._pushBigNumber(this,e);case"Date":return this._pushDate(this,e);case"RegExp":return this._pushRegexp(this,e);case"Symbol":switch(e){case c.NULL:return this._pushObject(null);case c.UNDEFINED:return this._pushUndefined(void 0);default:throw new Error("Unknown symbol: "+e.toString())}default:throw new Error("Unknown type: "+typeof e+", "+(e?e.toString():""))}}finalize(){if(0===this.offset)return null;for(var e=this.result,n=this.resultLength,r=this.resultMethod,i=this.offset,o=0,s=0;s<i;s++)o+=n[s];var a=t.allocUnsafe(o),u=0,l=0;for(s=0;s<i;s++){switch(l=n[s],r[s]){case 0:e[s].copy(a,u);break;case 1:a.writeUInt8(e[s],u,!0);break;case 2:a.writeUInt16BE(e[s],u,!0);break;case 3:a.writeUInt32BE(e[s],u,!0);break;case 4:a.writeDoubleBE(e[s],u,!0);break;case 5:a.write(e[s],u,l,"utf8");break;default:throw new Error("unkown method")}u+=l}var c=a;return this._reset(),c}_reset(){this.result=[],this.resultMethod=[],this.resultLength=[],this.offset=0}static encode(e){const t=new E,n=t.pushAny(e);if(!n)throw new Error("Failed to encode input");return t.finalize()}}e.exports=E}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(445),i=n(447),o=n(448),s=n(865),a=o.toCallback,u=o.toBuf,l=o.fromString,c=o.fromNumberTo32BitBuf,f=(e,n)=>{s.sha2256(e,(e,r)=>{e&&n(e),s.sha2256(t.from(r),n)})};e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(r.sha3_512)),sha3384:a(u(r.sha3_384)),sha3256:a(u(r.sha3_256)),sha3224:a(u(r.sha3_224)),shake128:a(u(r.shake_128,128)),shake256:a(u(r.shake_256,256)),keccak224:a(u(r.keccak_224)),keccak256:a(u(r.keccak_256)),keccak384:a(u(r.keccak_384)),keccak512:a(u(r.keccak_512)),murmur3128:a(u(l(i.x64.hash128))),murmur332:a(c(l(i.x86.hash32))),addBlake:n(867),dblSha2256:f}}).call(this,n(0).Buffer)},function(e,t,n){!function(n,r){"use strict";var i={version:"3.0.1",x86:{},x64:{}};function o(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function s(e,t){return e<<t|e>>>32-t}function a(e){return e^=e>>>16,e=o(e,2246822507),e^=e>>>13,e=o(e,3266489909),e^=e>>>16,e}function u(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function l(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function c(e,t){return t%=64,32===t?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function f(e,t){return t%=64,0===t?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function h(e,t){return[e[0]^t[0],e[1]^t[1]]}function p(e){return e=h(e,[0,e[0]>>>1]),e=l(e,[4283543511,3981806797]),e=h(e,[0,e[0]>>>1]),e=l(e,[3301882366,444984403]),e=h(e,[0,e[0]>>>1]),e}i.x86.hash32=function(e,t){e=e||"",t=t||0;for(var n=e.length%4,r=e.length-n,i=t,u=0,l=3432918353,c=461845907,f=0;f<r;f+=4)u=255&e.charCodeAt(f)|(255&e.charCodeAt(f+1))<<8|(255&e.charCodeAt(f+2))<<16|(255&e.charCodeAt(f+3))<<24,u=o(u,l),u=s(u,15),u=o(u,c),i^=u,i=s(i,13),i=o(i,5)+3864292196;switch(u=0,n){case 3:u^=(255&e.charCodeAt(f+2))<<16;case 2:u^=(255&e.charCodeAt(f+1))<<8;case 1:u^=255&e.charCodeAt(f),u=o(u,l),u=s(u,15),u=o(u,c),i^=u}return i^=e.length,i=a(i),i>>>0},i.x86.hash128=function(e,t){e=e||"",t=t||0;for(var n=e.length%16,r=e.length-n,i=t,u=t,l=t,c=t,f=0,h=0,p=0,d=0,m=597399067,g=2869860233,y=951274213,b=2716044179,v=0;v<r;v+=16)f=255&e.charCodeAt(v)|(255&e.charCodeAt(v+1))<<8|(255&e.charCodeAt(v+2))<<16|(255&e.charCodeAt(v+3))<<24,h=255&e.charCodeAt(v+4)|(255&e.charCodeAt(v+5))<<8|(255&e.charCodeAt(v+6))<<16|(255&e.charCodeAt(v+7))<<24,p=255&e.charCodeAt(v+8)|(255&e.charCodeAt(v+9))<<8|(255&e.charCodeAt(v+10))<<16|(255&e.charCodeAt(v+11))<<24,d=255&e.charCodeAt(v+12)|(255&e.charCodeAt(v+13))<<8|(255&e.charCodeAt(v+14))<<16|(255&e.charCodeAt(v+15))<<24,f=o(f,m),f=s(f,15),f=o(f,g),i^=f,i=s(i,19),i+=u,i=o(i,5)+1444728091,h=o(h,g),h=s(h,16),h=o(h,y),u^=h,u=s(u,17),u+=l,u=o(u,5)+197830471,p=o(p,y),p=s(p,17),p=o(p,b),l^=p,l=s(l,15),l+=c,l=o(l,5)+2530024501,d=o(d,b),d=s(d,18),d=o(d,m),c^=d,c=s(c,13),c+=i,c=o(c,5)+850148119;switch(f=0,h=0,p=0,d=0,n){case 15:d^=e.charCodeAt(v+14)<<16;case 14:d^=e.charCodeAt(v+13)<<8;case 13:d^=e.charCodeAt(v+12),d=o(d,b),d=s(d,18),d=o(d,m),c^=d;case 12:p^=e.charCodeAt(v+11)<<24;case 11:p^=e.charCodeAt(v+10)<<16;case 10:p^=e.charCodeAt(v+9)<<8;case 9:p^=e.charCodeAt(v+8),p=o(p,y),p=s(p,17),p=o(p,b),l^=p;case 8:h^=e.charCodeAt(v+7)<<24;case 7:h^=e.charCodeAt(v+6)<<16;case 6:h^=e.charCodeAt(v+5)<<8;case 5:h^=e.charCodeAt(v+4),h=o(h,g),h=s(h,16),h=o(h,y),u^=h;case 4:f^=e.charCodeAt(v+3)<<24;case 3:f^=e.charCodeAt(v+2)<<16;case 2:f^=e.charCodeAt(v+1)<<8;case 1:f^=e.charCodeAt(v),f=o(f,m),f=s(f,15),f=o(f,g),i^=f}return i^=e.length,u^=e.length,l^=e.length,c^=e.length,i+=u,i+=l,i+=c,u+=i,l+=i,c+=i,i=a(i),u=a(u),l=a(l),c=a(c),i+=u,i+=l,i+=c,u+=i,l+=i,c+=i,("00000000"+(i>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(l>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){e=e||"",t=t||0;for(var n=e.length%16,r=e.length-n,i=[0,t],o=[0,t],s=[0,0],a=[0,0],d=[2277735313,289559509],m=[1291169091,658871167],g=0;g<r;g+=16)s=[255&e.charCodeAt(g+4)|(255&e.charCodeAt(g+5))<<8|(255&e.charCodeAt(g+6))<<16|(255&e.charCodeAt(g+7))<<24,255&e.charCodeAt(g)|(255&e.charCodeAt(g+1))<<8|(255&e.charCodeAt(g+2))<<16|(255&e.charCodeAt(g+3))<<24],a=[255&e.charCodeAt(g+12)|(255&e.charCodeAt(g+13))<<8|(255&e.charCodeAt(g+14))<<16|(255&e.charCodeAt(g+15))<<24,255&e.charCodeAt(g+8)|(255&e.charCodeAt(g+9))<<8|(255&e.charCodeAt(g+10))<<16|(255&e.charCodeAt(g+11))<<24],s=l(s,d),s=c(s,31),s=l(s,m),i=h(i,s),i=c(i,27),i=u(i,o),i=u(l(i,[0,5]),[0,1390208809]),a=l(a,m),a=c(a,33),a=l(a,d),o=h(o,a),o=c(o,31),o=u(o,i),o=u(l(o,[0,5]),[0,944331445]);switch(s=[0,0],a=[0,0],n){case 15:a=h(a,f([0,e.charCodeAt(g+14)],48));case 14:a=h(a,f([0,e.charCodeAt(g+13)],40));case 13:a=h(a,f([0,e.charCodeAt(g+12)],32));case 12:a=h(a,f([0,e.charCodeAt(g+11)],24));case 11:a=h(a,f([0,e.charCodeAt(g+10)],16));case 10:a=h(a,f([0,e.charCodeAt(g+9)],8));case 9:a=h(a,[0,e.charCodeAt(g+8)]),a=l(a,m),a=c(a,33),a=l(a,d),o=h(o,a);case 8:s=h(s,f([0,e.charCodeAt(g+7)],56));case 7:s=h(s,f([0,e.charCodeAt(g+6)],48));case 6:s=h(s,f([0,e.charCodeAt(g+5)],40));case 5:s=h(s,f([0,e.charCodeAt(g+4)],32));case 4:s=h(s,f([0,e.charCodeAt(g+3)],24));case 3:s=h(s,f([0,e.charCodeAt(g+2)],16));case 2:s=h(s,f([0,e.charCodeAt(g+1)],8));case 1:s=h(s,[0,e.charCodeAt(g)]),s=l(s,d),s=c(s,31),s=l(s,m),i=h(i,s)}return i=h(i,[0,e.length]),o=h(o,[0,e.length]),i=u(i,o),o=u(o,i),i=p(i),o=p(o),i=u(i,o),o=u(o,i),("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=i),t.murmurHash3=i}(this)},function(e,t,n){"use strict";(function(t){const r=n(449),i=o();function o(){return self.crypto?self.crypto.subtle||self.crypto.webkitSubtle:self.msCrypto?self.msCrypto.subtle:void 0}function s(e){if(!i)throw new Error("Please use a browser with webcrypto support and ensure the code has been delivered securely via HTTPS/TLS and run within a Secure Context");return(n,o)=>{const s=i.digest({name:e},n);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));r(s.then(e=>t.from(new Uint8Array(e))),o)}}function a(e,t){s("SHA-1")(e,t)}function u(e,t){s("SHA-256")(e,t)}function l(e,t){s("SHA-512")(e,t)}e.exports={sha1:a,sha2256:u,sha2512:l}}).call(this,n(0).Buffer)},function(e,t,n){(function(t){var r=n(450),i;i="function"==typeof setImediate?setImediate:"object"==typeof t&&t&&t.nextTick?t.nextTick:function(e){setTimeout(e,0)};var o=[];function s(e){if(!(this instanceof s))return"function"==typeof e?new s(e):a();var t=!1,n=!1,u,l=[],c=!1;function f(e){l.length?(c=!0,l.shift()(e||!1)):c=!1}function h(e,r){return new s(function(o){function s(t){var s=n?e:r;if("function"==typeof s){function a(){var e;try{e=s(u)}catch(e){return o.reject(e),f()}o.fulfill(e),f(!0)}t?a():i(a)}else n?(o.fulfill(u),f(t)):(o.reject(u),f(t))}l.push(s),t&&!c&&f()})}this.then=h,function(){function i(e){t||(r(e)?e.then(i,s):(t=n=!0,u=e,f()))}function s(e){t||(t=!0,n=!1,u=e,f())}for(var a={fulfill:i,reject:s},l=0;l<o.length;l++)o[l](this,a);if("function"==typeof e)try{e(a)}catch(e){a.reject(e)}}()}function a(){var e,t=new s(function(t){e=t});return{resolver:e,promise:t}}e.exports=s,s.use=function(e){o.push(e)}}).call(this,n(2))},function(e,t,n){"use strict";(function(t){const r=n(451),i=n(448).toCallback,o=45569,s=45633,a={init:r.blake2bInit,update:r.blake2bUpdate,digest:r.blake2bFinal},u={init:r.blake2sInit,update:r.blake2sUpdate,digest:r.blake2sFinal},l=(e,n)=>i(r=>{const i=n.init(e,null);return n.update(i,r),t.from(n.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[o+t]=l(t+1,a);for(let t=0;t<32;t++)e[s+t]=l(t+1,u)})}).call(this,n(0).Buffer)},function(e,t,n){var r=n(452);function i(e,t,n){var r=e[t]+e[n],i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function o(e,t,n,r){var i=e[t]+n;n<0&&(i+=4294967296);var o=e[t+1]+r;i>=4294967296&&o++,e[t]=i,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,n,r,s,a){var u=h[s],l=h[s+1],c=h[a],p=h[a+1];i(f,e,t),o(f,e,u,l);var d=f[r]^f[e],m=f[r+1]^f[e+1];f[r]=m,f[r+1]=d,i(f,n,r),d=f[t]^f[n],m=f[t+1]^f[n+1],f[t]=d>>>24^m<<8,f[t+1]=m>>>24^d<<8,i(f,e,t),o(f,e,c,p),d=f[r]^f[e],m=f[r+1]^f[e+1],f[r]=d>>>16^m<<16,f[r+1]=m>>>16^d<<16,i(f,n,r),d=f[t]^f[n],m=f[t+1]^f[n+1],f[t]=m>>>31^d<<1,f[t+1]=d>>>31^m<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],c=new Uint8Array(l.map(function(e){return 2*e})),f=new Uint32Array(32),h=new Uint32Array(32);function p(e,t){var n=0;for(n=0;n<16;n++)f[n]=e.h[n],f[n+16]=u[n];for(f[24]=f[24]^e.t,f[25]=f[25]^e.t/4294967296,t&&(f[28]=~f[28],f[29]=~f[29]),n=0;n<32;n++)h[n]=s(e.b,4*n);for(n=0;n<12;n++)a(0,8,16,24,c[16*n+0],c[16*n+1]),a(2,10,18,26,c[16*n+2],c[16*n+3]),a(4,12,20,28,c[16*n+4],c[16*n+5]),a(6,14,22,30,c[16*n+6],c[16*n+7]),a(0,10,20,30,c[16*n+8],c[16*n+9]),a(2,12,22,24,c[16*n+10],c[16*n+11]),a(4,14,16,26,c[16*n+12],c[16*n+13]),a(6,8,18,28,c[16*n+14],c[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^f[n]^f[n+16]}function d(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var n={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},r=0;r<16;r++)n.h[r]=u[r];var i=t?t.length:0;return n.h[0]^=16842752^i<<8^e,t&&(m(n,t),n.c=128),n}function m(e,t){for(var n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,p(e,!1),e.c=0),e.b[e.c++]=t[n]}function g(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;p(e,!0);for(var t=new Uint8Array(e.outlen),n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function y(e,t,n){n=n||64,e=r.normalizeInput(e);var i=d(n,t);return m(i,e),g(i)}function b(e,t,n){var i=y(e,t,n);return r.toHex(i)}e.exports={blake2b:y,blake2bHex:b,blake2bInit:d,blake2bUpdate:m,blake2bFinal:g}},function(e,t,n){var r=n(452);function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,i,o){l[e]=l[e]+l[t]+i,l[r]=s(l[r]^l[e],16),l[n]=l[n]+l[r],l[t]=s(l[t]^l[n],12),l[e]=l[e]+l[t]+o,l[r]=s(l[r]^l[e],8),l[n]=l[n]+l[r],l[t]=s(l[t]^l[n],7)}function s(e,t){return e>>>t^e<<32-t}var a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),c=new Uint32Array(16);function f(e,t){var n=0;for(n=0;n<8;n++)l[n]=e.h[n],l[n+8]=a[n];for(l[12]^=e.t,l[13]^=e.t/4294967296,t&&(l[14]=~l[14]),n=0;n<16;n++)c[n]=i(e.b,4*n);for(n=0;n<10;n++)o(0,4,8,12,c[u[16*n+0]],c[u[16*n+1]]),o(1,5,9,13,c[u[16*n+2]],c[u[16*n+3]]),o(2,6,10,14,c[u[16*n+4]],c[u[16*n+5]]),o(3,7,11,15,c[u[16*n+6]],c[u[16*n+7]]),o(0,5,10,15,c[u[16*n+8]],c[u[16*n+9]]),o(1,6,11,12,c[u[16*n+10]],c[u[16*n+11]]),o(2,7,8,13,c[u[16*n+12]],c[u[16*n+13]]),o(3,4,9,14,c[u[16*n+14]],c[u[16*n+15]]);for(n=0;n<8;n++)e.h[n]^=l[n]^l[n+8]}function h(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");var n=t?t.length:0;if(t&&!(n>0&&n<=32))throw new Error("Incorrect key length, should be in [1, 32]");var r={h:new Uint32Array(a),b:new Uint32Array(64),c:0,t:0,outlen:e};return r.h[0]^=16842752^n<<8^e,n>0&&(p(r,t),r.c=64),r}function p(e,t){for(var n=0;n<t.length;n++)64===e.c&&(e.t+=e.c,f(e,!1),e.c=0),e.b[e.c++]=t[n]}function d(e){for(e.t+=e.c;e.c<64;)e.b[e.c++]=0;f(e,!0);for(var t=new Uint8Array(e.outlen),n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n)&255;return t}function m(e,t,n){n=n||32,e=r.normalizeInput(e);var i=h(n,t);return p(i,e),d(i)}function g(e,t,n){var i=m(e,t,n);return r.toHex(i)}e.exports={blake2s:m,blake2sHex:g,blake2sInit:h,blake2sUpdate:p,blake2sFinal:d}},function(e,t,n){var r=n(871);function i(e){if(!(e instanceof Object))throw new TypeError('"obj" must be an object (or inherit from it)');return o(e)}function o(e,t){for(var n in t=new r(e,t),e){var i=e[n];if(i instanceof Object&&(t.contains(i)||o(i,t)))return!0}return!1}e.exports=i},function(e,t){function n(e,t){this.value=e,this.next=t}e.exports=n,n.prototype.contains=function(e){for(var t=this;t;){if(t.value===e)return!0;t=t.next}return!1}},function(e,t,n){
//! stable.js 0.1.8, https://github.com/Two-Screen/stable
//! © 2018 Angry Bytes and contributors. MIT licensed.
var r,i;r=this,i=function(){"use strict";var e=function(e,n){return t(e.slice(),n)};function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var r=e.length;if(r<=1)return e;for(var i=new Array(r),o=1;o<r;o*=2){n(e,t,o,i);var s=e;e=i,i=s}return e}e.inplace=function(e,r){var i=t(e,r);return i!==e&&n(i,null,e.length,e),e};var n=function(e,t,n,r){var i=e.length,o=0,s=2*n,a,u,l,c,f;for(a=0;a<i;a+=s)for(u=a+n,l=u+n,u>i&&(u=i),l>i&&(l=i),c=a,f=u;;)if(c<u&&f<l)t(e[c],e[f])<=0?r[o++]=e[c++]:r[o++]=e[f++];else if(c<u)r[o++]=e[c++];else{if(!(f<l))break;r[o++]=e[f++]}};return e},e.exports=i()},function(e,t,n){var r=n(874),i=n(876);e.exports=r,e.exports.parse=r,e.exports.stringify=i},function(e,t,n){var r=n(875),i=536870911,o=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],s=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift();var n=e.shift();if("("===n&&(n=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option");t[n]=e.shift();break;case"]":return e.shift(),t;default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},a=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":var n=e.shift();t.required="required"===n,t.repeated="repeated"===n,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=s(e);break;case";":if(null===t.name)throw new Error("Missing field name");if(null===t.type)throw new Error("Missing type in message field: "+t.name);if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name);return e.shift(),t;default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},u=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(a(e));break;case"enum":t.enums.push(m(e));break;case"message":t.messages.push(f(e));break;case"extensions":t.extensions=c(e);break;case"oneof":e.shift();var n=e.shift();if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");var r=a(e);r.oneof=n,t.fields.push(r)}e.shift();break;case"extend":t.extends.push(l(e));break;case";":e.shift();break;case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift();break;default:e.unshift("optional"),t.fields.push(a(e))}return t},l=function(e){var t={name:e[1],message:f(e)};return t},c=function(e){e.shift();var t=Number(e.shift());if(isNaN(t))throw new Error("Invalid from in extensions definition");if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition");var n=e.shift();if("max"===n&&(n=536870911),n=Number(n),isNaN(n))throw new Error("Invalid to in extensions definition");if(";"!==e.shift())throw new Error("Missing ; in extensions definition");return{from:t,to:n}},f=function(e){e.shift();var t=1,n=[],r={name:e.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),n=u(n),r.enums=n.enums,r.messages=n.messages,r.fields=n.fields,r.extends=n.extends,r.extensions=n.extensions,r;n.push(e.shift())}if(t)throw new Error("No closing tag for message")},h=function(e){e.shift();var t=e.shift();if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},p=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]);e.shift();var t=e.shift();switch(t){case'"proto2"':t=2;break;case'"proto3"':t=3;break;default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]);return e.shift(),t},d=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "));if("="!==e[1])throw new Error("Expected = but found "+e[1]);if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]);var t=e.shift();e.shift();var n={value:null,options:{}};return n.value=Number(e.shift()),"["===e[0]&&(n.options=s(e)),e.shift(),{name:t,val:n}},m=function(e){e.shift();var t={},n={name:e.shift(),values:{},options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),n;if("option"!==e[0]){var r=d(e);n.values[r.name]=r.val}else t=g(e),n.options[t.name]=t.value}throw new Error("No closing tag for enum")},g=function(e){for(var t=null,n=null,r=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:n};switch(e[0]){case"option":e.shift();var i="("===e[0];if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}"."===e[0][0]&&(t+=e.shift());break;case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]);if(n=r(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(n))throw new Error("Unexpected value for option optimize_for: "+n);"{"===n&&(n=y(e));break;default:throw new Error("Unexpected token in option: "+e[0])}}},y=function(e){for(var t=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},n={};e.length;){if("}"===e[0])return e.shift(),n;var r="("===e[0];r&&e.shift();var i=e.shift();if(r){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]);e.shift()}var o=null;switch(e[0]){case":":if(void 0!==n[i])throw new Error("Duplicate option map key "+i);e.shift(),o=t(e.shift()),"{"===o&&(o=y(e)),n[i]=o,";"===e[0]&&e.shift();break;case"{":if(e.shift(),o=y(e),void 0===n[i]&&(n[i]=[]),!Array.isArray(n[i]))throw new Error("Duplicate option map key "+i);n[i].push(o);break;default:throw new Error("Unexpected token in option map: "+e[0])}}throw new Error("No closing tag for option map")},b=function(e){e.shift();var t=e.shift().replace(/^"+|"+$/gm,"");if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"');return e.shift(),t},v=function(e){e.shift();var t={name:e.shift(),methods:[],options:{}};if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;switch(e[0]){case"option":var n=g(e);if(void 0!==t.options[n.name])throw new Error("Duplicate option "+n.name);t.options[n.name]=n.value;break;case"rpc":t.methods.push(w(e));break;default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},w=function(e){e.shift();var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]);if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]);if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]);if(e.shift(),";"===e[0])return e.shift(),t;if("{"!==e[0])throw new Error("Expected { but found "+e[0]);for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t;if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]);var n=g(e);if(void 0!==t.options[n.name])throw new Error("Duplicate option "+n.name);t.options[n.name]=n.value}throw new Error("No closing tag for rpc")},_=function(e){for(var t=r(e.toString()),n=0;n<t.length;n++){var i;if(/^("|')([^'"]*)$/.test(t[n]))for(i=1===t[n].length?n+1:n;i<t.length;i++)if(/^([^'"]*)("|')$/.test(t[i])){t=t.slice(0,n).concat(t.slice(n,i+1).join("")).concat(t.slice(i+1));break}}for(var s={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},a=!0;t.length;){switch(t[0]){case"package":s.package=h(t);break;case"syntax":if(!a)throw new Error("Protobuf syntax version should be first thing in file");s.syntax=p(t);break;case"message":s.messages.push(f(t));break;case"enum":s.enums.push(m(t));break;case"option":var u=g(t);if(s.options[u.name])throw new Error("Duplicate option "+u.name);s.options[u.name]=u.value;break;case"import":s.imports.push(b(t));break;case"extend":s.extends.push(l(t));break;case"service":s.services||(s.services=[]),s.services.push(v(t));break;default:throw new Error("Unexpected token: "+t[0])}a=!1}return s.extends.forEach(function(e){s.messages.forEach(function(t){t.name===e.name&&e.message.fields.forEach(function(e){if(!t.extensions||e.tag<t.extensions.from||e.tag>t.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number");t.fields.push(e)})})}),s.messages.forEach(function(e){e.fields.forEach(function(t){var n,r,i,a;function u(e){return e.name===t.type}function l(e){return e.name===i}if(t.options&&"true"===t.options.packed&&-1===o.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some(u))return}else{if(n=t.type.split("."),n.length>2)throw new Error("what is this?");if(r=n[0],i=n[1],s.messages.some(function(e){if(e.name===r)return a=e,e}),a&&a.enums&&a.enums.some(l))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),s};e.exports=_},function(e,t){e.exports=function(e){var t=function(e){var t=e.indexOf("//");return t>-1?e.slice(0,t):e},n=function(){var e=!1;return function(t){return"/*"===t?(e=!0,!1):"*/"===t?(e=!1,!1):!e}},r=function(e){return e.trim()};return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(t).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter(n())}},function(e,t){var n=function(e,t){var n=e.repeated?"repeated":e.required?"required":"optional";"map"===e.type&&(n="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(n="");var r=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");return r&&(r=" ["+r+"]"),t.push((n?n+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+r+";"),t},r=function(e,t){t.push("message "+e.name+" {"),e.enums||(e.enums=[]),e.enums.forEach(function(e){t.push(i(e,[]))}),e.messages||(e.messages=[]),e.messages.forEach(function(e){t.push(r(e,[]))});var o={};return e.fields||(e.fields=[]),e.fields.forEach(function(e){e.oneof?(o[e.oneof]||(o[e.oneof]=[]),o[e.oneof].push(n(e,[]))):t.push(n(e,[]))}),Object.keys(o).forEach(function(e){o[e].unshift("oneof "+e+" {"),o[e].push("}"),t.push(o[e])}),t.push("}",""),t},i=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={});var n=s(e.options,[]);return n.length>1&&t.push(n.slice(0,-1)),Object.keys(e.values).map(function(n){var r=o(e.values[n]);t.push([n+" = "+r+";"])}),t.push("}",""),t},o=function(e,t){var n=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",");n&&(n=" ["+n+"]");var r=e.value+n;return r},s=function(e,t){var n=Object.keys(e);return n.forEach(function(n){var r=e[n];~n.indexOf(".")&&(n="("+n+")");var i=typeof r;"object"===i?(r=a(r,[]),r.length&&t.push("option "+n+" = {",r,"};")):("string"===i&&"optimize_for"!==n&&(r='"'+r+'"'),t.push("option "+n+" = "+r+";"))}),n.length>0&&t.push(""),t},a=function(e,t){var n=Object.keys(e);return n.forEach(function(n){var r=e[n],i=typeof r;"object"===i?Array.isArray(r)?r.forEach(function(e){e=a(e,[]),e.length&&t.push(n+" {",e,"}")}):(r=a(r,[]),r.length&&t.push(n+" {",r,"}")):("string"===i&&(r='"'+r+'"'),t.push(n+": "+r))}),t},u=function(e,t){return t.push("service "+e.name+" {"),e.options||(e.options={}),s(e.options,t),e.methods||(e.methods=[]),e.methods.forEach(function(e){t.push(l(e,[]))}),t.push("}",""),t},l=function(e,t){var n="rpc "+e.name+"(";e.client_streaming&&(n+="stream "),n+=e.input_type+") returns (",e.server_streaming&&(n+="stream "),n+=e.output_type+")",e.options||(e.options={});var r=s(e.options,[]);return r.length>1?t.push(n+" {",r.slice(0,-1),"}"):t.push(n+";"),t},c=function(e){return function(t){return Array.isArray(t)?t.map(c(e+" ")).join("\n"):e+t}};e.exports=function(e){var t=[];return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),s(e.options,t),e.enums||(e.enums=[]),e.enums.forEach(function(e){i(e,t)}),e.messages||(e.messages=[]),e.messages.forEach(function(e){r(e,t)}),e.services&&e.services.forEach(function(e){u(e,t)}),t.map(c("")).join("\n")}},function(e,t,n){"use strict";var r=n(878),i=n(880),o=n(881),s=n(882),a=n(39),u=function(e){if(!e)return null;var t={};return Object.keys(e).forEach(function(n){t[n]=e[n].value}),t};e.exports=function(e,t){var n={},l={},c={},f=function(e,t){e.enums&&e.enums.forEach(function(e){e.id=t+(t?".":"")+e.name,l[e.id]=e,f(e,e.id)}),e.messages&&e.messages.forEach(function(r){r.id=t+(t?".":"")+r.name,n[r.id]=r,r.fields.forEach(function(r){if(r.map){var i="Map_"+r.map.from+"_"+r.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:r.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:r.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:t+(t?".":"")+i};n[o.id]||(n[o.id]=o,e.messages.push(o)),r.type=i,r.repeated=!0}}),f(r,r.id)})};f(e,"");var h=function(e){var t=Object.keys(e.values||[]).map(function(t){return parseInt(e.values[t].value,10)}),n=function e(n,r,i){if(!t.length||-1===t.indexOf(n))throw new Error("Invalid enum value: "+n);return a.encode(n,r,i),e.bytes=a.encode.bytes,r},i=function e(n,r){var i=a.decode(n,r);if(!t.length||-1===t.indexOf(i))throw new Error("Invalid enum value: "+i);return e.bytes=a.decode.bytes,i};return r.make(0,n,i,a.encodingLength)},p=function(e,t){e.messages.forEach(function(n){t[n.name]=d(n.name,e.id)}),e.enums.forEach(function(e){t[e.name]=u(e.values)}),t.type=2,t.message=!0,t.name=e.name;var n={};e.fields.forEach(function(e){e.oneof&&(n[e.oneof]||(n[e.oneof]=[]),n[e.oneof].push(e.name))});var r=e.fields.map(function(t){return d(t.type,e.id)}),a=s(e,r,n),l=o(e,d,r,n,a),c=i(e,d,r);return l.bytes=c.bytes=0,t.buffer=!0,t.encode=l,t.decode=c,t.encodingLength=a,t},d=function(e,i,o){if(t&&t[e])return t[e];if(r[e])return r[e];var s=(i?i+"."+e:e).split(".").map(function(t,n,r){return r.slice(0,n).concat(e).join(".")}).reverse().reduce(function(e,t){return e||n[t]||l[t]},null);if(!1===o)return s;if(!s)throw new Error("Could not resolve "+e);if(s.values)return h(s);var a=c[s.id]||p(s,c[s.id]={});return a};return(e.enums||[]).concat((e.messages||[]).map(function(e){return d(e.id)}))}},function(e,t,n){"use strict";var r=n(39),i=n(879),o=n(4).Buffer,s=function(e,t,n,r){return t.bytes=n.bytes=0,{type:e,encode:t,decode:n,encodingLength:r}},a,u,l,c,f;t.make=s,t.bytes=(u=function(e){return o.isBuffer(e)?e.length:o.byteLength(e)},l=function(e){var t=u(e);return r.encodingLength(t)+t},c=function(e,t,n){var i=n,s=u(e);return r.encode(s,t,n),n+=r.encode.bytes,o.isBuffer(e)?e.copy(t,n):t.write(e,n,s),n+=s,c.bytes=n-i,t},f=function(e,t){var n=t,i=r.decode(e,t);t+=r.decode.bytes;var o=e.slice(t,t+i);return t+=o.length,f.bytes=t-n,o},s(2,c,f,l)),t.string=function(){var e=function(e){var t=o.byteLength(e);return r.encodingLength(t)+t},t=function(e,n,i){var s=i,a=o.byteLength(e);return r.encode(a,n,i,"utf-8"),i+=r.encode.bytes,n.write(e,i,a),i+=a,t.bytes=i-s,n},n=function(e,t){var i=t,o=r.decode(e,t);t+=r.decode.bytes;var s=e.toString("utf-8",t,t+o);return t+=o,n.bytes=t-i,s};return s(2,t,n,e)}(),t.bool=function(){var e=function(e){return 1},t=function(e,n,r){return n[r]=e?1:0,t.bytes=1,n},n=function(e,t){var r=e[t]>0;return n.bytes=1,r};return s(0,t,n,e)}(),t.int32=function(){var e=function(t,n){var i=r.decode(t,n);return e.bytes=r.decode.bytes,i>2147483647?i-4294967296:i},t=function(e,n,i){return r.encode(e<0?e+4294967296:e,n,i),t.bytes=r.encode.bytes,n},n=function(e){return r.encodingLength(e<0?e+4294967296:e)};return s(0,r.encode,e,n)}(),t.int64=function(){var e=function(t,n){var i=r.decode(t,n);if(i>=Math.pow(2,63)){for(var s=9;255===t[n+s-1];)s--;s=s||9;var a=o.allocUnsafe(s);t.copy(a,0,n,n+s),a[s-1]=127&a[s-1],i=-1*r.decode(a,0),e.bytes=10}else e.bytes=r.decode.bytes;return i},t=function(e,n,i){if(e<0){var o=i+9;for(r.encode(-1*e,n,i),i+=r.encode.bytes-1,n[i]=128|n[i];i<o-1;)i++,n[i]=255;n[o]=1,t.bytes=10}else r.encode(e,n,i),t.bytes=r.encode.bytes;return n},n=function(e){return e<0?10:r.encodingLength(e)};return s(0,t,e,n)}(),t.sint32=t.sint64=s(0,i.encode,i.decode,i.encodingLength),t.uint32=t.uint64=t.enum=t.varint=s(0,r.encode,r.decode,r.encodingLength),t.fixed64=t.sfixed64=function(){var e=function(e){return 8},t=function(e,n,r){return e.copy(n,r),t.bytes=8,n},n=function(e,t){var r=e.slice(t,t+8);return n.bytes=8,r};return s(1,t,n,e)}(),t.double=function(){var e=function(e){return 8},t=function(e,n,r){return n.writeDoubleLE(e,r),t.bytes=8,n},n=function(e,t){var r=e.readDoubleLE(t);return n.bytes=8,r};return s(1,t,n,e)}(),t.fixed32=function(){var e=function(e){return 4},t=function(e,n,r){return n.writeUInt32LE(e,r),t.bytes=4,n},n=function(e,t){var r=e.readUInt32LE(t);return n.bytes=4,r};return s(5,t,n,e)}(),t.sfixed32=function(){var e=function(e){return 4},t=function(e,n,r){return n.writeInt32LE(e,r),t.bytes=4,n},n=function(e,t){var r=e.readInt32LE(t);return n.bytes=4,r};return s(5,t,n,e)}(),t.float=function(){var e=function(e){return 4},t=function(e,n,r){return n.writeFloatLE(e,r),t.bytes=4,n},n=function(e,t){var r=e.readFloatLE(t);return n.bytes=4,r};return s(5,t,n,e)}()},function(e,t,n){var r=n(39);t.encode=function e(t,n,i){t=t>=0?2*t:-2*t-1;var o=r.encode(t,n,i);return e.bytes=r.encode.bytes,o},t.decode=function e(t,n){var i=r.decode(t,n);return e.bytes=r.decode.bytes,1&i?(i+1)/-2:i/2},t.encodingLength=function(e){return r.encodingLength(e>=0?2*e:-2*e-1)}},function(e,t,n){"use strict";var r=n(39),i=n(307).defined;function o(e,t,n){for(var o=[],u={},l=[],c=[],f=0;f<n.length;f++){var h=e.fields[f];u[h.tag]=f;var p=h.options&&h.options.default,d=t(h.type,e.id,!1);c[f]=[p,d&&d.values],e.fields[f].packed=h.repeated&&h.options&&h.options.packed&&"false"!==h.options.packed,h.required&&o.push(h.name),h.oneof&&l.push(h.name)}function m(e,t,n,i,o,s){var a=t.name;if(t.oneof)for(var u=Object.keys(n),c=0;c<u.length;c++)l.indexOf(u[c])>-1&&delete n[u[c]];if(e.message){var f=r.decode(i,o);o+=r.decode.bytes;var h=e.decode(i,o,o+f);t.map?(n[a]=n[a]||{},n[a][h.key]=h.value):t.repeated?(n[a]=n[a]||[],n[a].push(h)):n[a]=h}else t.repeated?(n[a]=n[a]||[],n[a].push(e.decode(i,o))):n[a]=e.decode(i,o);return o+=e.decode.bytes,o}return function t(f,h,p){if(null==h&&(h=0),null==p&&(p=f.length),!(p<=f.length&&h<=f.length))throw new Error("Decoded message is not valid");for(var d=h,g={},y;;){if(p<=h){var b="",v=0,w,_;for(v=0;v<o.length;v++)if(b=o[v],!i(g[b]))throw new Error("Decoded message is not valid, missing required field: "+b);for(v=0;v<n.length;v++)if(y=e.fields[v],_=c[v][0],w=c[v][1],b=y.name,!i(g[b])){var k=!1;if(y.oneof)for(var S=Object.keys(g),E=0;E<S.length;E++)if(l.indexOf(S[E])>-1){k=!0;break}k||(w?y.repeated?g[b]=[]:(_=_&&w[_]?w[_].value:w[Object.keys(w)[0]].value,g[b]=parseInt(_||0,10)):g[b]=a(y,_))}return t.bytes=h-d,g}var x=r.decode(f,h);h+=r.decode.bytes;var C=x>>3,A=u[C];if(null!=A){var I=n[A];if(y=e.fields[A],y.packed){var T=r.decode(f,h);for(h+=r.decode.bytes,T+=h;h<T;)h=m(I,y,g,f,h,A)}else h=m(I,y,g,f,h,A)}else h=s(7&x,f,h)}}}var s=function(e,t,n){switch(e){case 0:return r.decode(t,n),n+r.decode.bytes;case 1:return n+8;case 2:var i=r.decode(t,n);return n+r.decode.bytes+i;case 3:case 4:throw new Error("Groups are not supported");case 5:return n+4;default:throw new Error("Unknown wire type: "+e)}},a=function(e,t){if(e.map)return{};if(e.repeated)return[];switch(e.type){case"string":return null!=t?t:"";case"bool":return"true"===t;case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10);default:return null}};e.exports=o},function(e,t,n){"use strict";(function(t){var r=n(307).defined,i=n(39);function o(e,n,o,s,a){for(var u=Object.keys(s),l=o.length,c={},f=0;f<l;f++){c[f]={p:i.encode(e.fields[f].tag<<3|2),h:i.encode(e.fields[f].tag<<3|o[f].type)};var h=e.fields[f];e.fields[f].packed=h.repeated&&h.options&&h.options.packed&&"false"!==h.options.packed}function p(e,t,n,r,o,s){var a=0;if(!o)for(a=0;a<n.length;a++)e[t++]=n[a];return r.message&&(i.encode(r.encodingLength(s),e,t),t+=i.encode.bytes),r.encode(s,e,t),t+r.encode.bytes}return function n(f,h,d){null==d&&(d=0),null==h&&(h=t.allocUnsafe(a(f)));var m=d,g=Object.keys(f),y=0,b=!1;for(y=0;y<u.length;y++){var v=u[y],w=s[y];if(g.indexOf(w)>-1){if(b)throw new Error("only one of the properties defined in oneof "+v+" can be set");b=!0}}for(y=0;y<l;y++){var _=o[y],k=e.fields[y],S=f[k.name],E=0;if(r(S)){var x=c[y].p,C=c[y].h,A=k.packed,I;if(k.map){var T=Object.keys(S);for(E=0;E<T.length;E++)T[E]={key:T[E],value:S[T[E]]};S=T}if(A){var j=0;for(E=0;E<S.length;E++)r(S[E])&&(j+=_.encodingLength(S[E]));if(j){for(E=0;E<C.length;E++)h[d++]=x[E];i.encode(j,h,d),d+=i.encode.bytes}}if(k.repeated)for(E=0;E<S.length;E++)I=S[E],r(I)&&(d=p(h,d,C,_,A,I));else d=p(h,d,C,_,A,S)}else if(k.required)throw new Error(k.name+" is required")}return n.bytes=d-m,h}}e.exports=o}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(307).defined,i=n(39);function o(e,t,n){for(var o=Object.keys(n),s=t.length,a=new Array(s),u=0;u<e.fields.length;u++){a[u]=i.encodingLength(e.fields[u].tag<<3|t[u].type);var l=e.fields[u];e.fields[u].packed=l.repeated&&l.options&&l.options.packed&&"false"!==l.options.packed}return function u(l){var c=0,f=0,h=0;for(f=0;f<o.length;f++){var p=o[f],d=n[p],m=!1;for(h=0;h<d.length;h++)if(r(l[d[h]])){if(m)throw new Error("only one of the properties defined in oneof "+p+" can be set");m=!0}}for(f=0;f<s;f++){var g=t[f],y=e.fields[f],b=l[y.name],v=a[f],w;if(r(b)){if(y.map){var _=Object.keys(b);for(h=0;h<_.length;h++)_[h]={key:_[h],value:b[_[h]]};b=_}if(y.packed){var k=0;for(h=0;h<b.length;h++)r(b[h])&&(w=g.encodingLength(b[h]),k+=w,g.message&&(k+=i.encodingLength(w)));k&&(c+=v+k+i.encodingLength(k))}else if(y.repeated)for(h=0;h<b.length;h++)r(b[h])&&(w=g.encodingLength(b[h]),c+=v+w+(g.message?i.encodingLength(w):0));else w=g.encodingLength(b),c+=v+w+(g.message?i.encodingLength(w):0)}else if(y.required)throw new Error(y.name+" is required")}return c}}e.exports=o},function(e,t,n){"use strict";e.exports="// An IPFS MerkleDAG Link\nmessage PBLink {\n\n // multihash of the target object\n optional bytes Hash = 1;\n\n // utf string name. should be unique per object\n optional string Name = 2;\n\n // cumulative size of target object\n optional uint64 Tsize = 3;\n}\n\n// An IPFS MerkleDAG Node\nmessage PBNode {\n\n // refs to other objects\n repeated PBLink Links = 2;\n\n // opaque user data\n optional bytes Data = 1;\n}"},function(e,t,n){"use strict";const r=n(117);function i(e,t,n,i){const o=new r(e,t,n);i(null,o)}e.exports=i},function(e,t,n){"use strict";const r=n(117);function i(e){return new r(e.name?e.name:e.Name,e.size?e.size:e.Size,e.hash||e.Hash||e.multihash||e.cid)}t=e.exports,t.createDagLinkFromB58EncodedHash=i},function(e,t,n){"use strict";const r=n(236),i=r.cloneLinks,o=r.cloneData,s=n(234);function a(e,t){const n=o(e),r=i(e);s(n,r,t)}e.exports=a},function(e,t,n){"use strict";const r=n(236),i=r.cloneLinks,o=r.cloneData,s=r.toDAGLink,a=n(117),u=n(233),l=n(234);function c(e,t){if(a.isDAGLink(e))return t(null,e);if(u.isDAGNode(e))return s(e,{},t);try{t(null,new a(e.name,e.size,e.multihash||e.hash||e.cid))}catch(e){return t(e)}}function f(e,t,n){const r=i(e),s=o(e);c(t,(e,t)=>{if(e)return n(e);r.push(t),l(s,r,n)})}e.exports=f},function(e,t,n){"use strict";(function(t){const r=n(236),i=r.cloneLinks,o=r.cloneData,s=n(234),a=n(9);function u(e,n,r){const u=o(e);let l=i(e);if("string"==typeof n)l=l.filter(e=>e.name!==n);else{if(!t.isBuffer(n)&&!a.isCID(n))return r(new Error("second arg needs to be a name or CID"),null);l=l.filter(e=>!e.cid.equals(n))}s(u,l,r)}e.exports=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(9),i=n(58);e.exports={resolver:{multicodec:"raw",defaultHashAlg:"sha2-256",resolve:(e,t,n)=>{n(null,{value:e,remainderPath:""})},tree:(e,t,n)=>{"function"==typeof t&&(n=t),n(null,[])}},util:{deserialize:(e,t)=>{t(null,e)},serialize:(e,t)=>{t(null,e)},cid:(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t=t||{};const o=t.hashAlg||"sha2-256",s=void 0===t.version?1:t.version;i(e,o,(e,t)=>{if(e)return n(e);n(null,new r(s,"raw",t))})}}}},function(e,t,n){(function(t){var n={};e.exports=n;var r={};function i(e,t){var n=0,r=t.length,i=t.charAt(0),o=[0];for(n=0;n<e.length();++n){for(var s=0,a=e.at(n);s<o.length;++s)a+=o[s]<<8,o[s]=a%r,a=a/r|0;for(;a>0;)o.push(a%r),a=a/r|0}var u="";for(n=0;0===e.at(n)&&n<e.length()-1;++n)u+=i;for(n=o.length-1;n>=0;--n)u+=t[o[n]];return u}n.encode=function(e,t,n){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==n&&"number"!=typeof n)throw new TypeError('"maxline" must be a number.');var r="";if(e instanceof Uint8Array){var o=0,s=t.length,a=t.charAt(0),u=[0];for(o=0;o<e.length;++o){for(var l=0,c=e[o];l<u.length;++l)c+=u[l]<<8,u[l]=c%s,c=c/s|0;for(;c>0;)u.push(c%s),c=c/s|0}for(o=0;0===e[o]&&o<e.length-1;++o)r+=a;for(o=u.length-1;o>=0;--o)r+=t[u[o]]}else r=i(e,t);if(n){var f=new RegExp(".{1,"+n+"}","g");r=r.match(f).join("\r\n")}return r},n.decode=function(e,n){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof n)throw new TypeError('"alphabet" must be a string.');var i=r[n];if(!i){i=r[n]=[];for(var o=0;o<n.length;++o)i[n.charCodeAt(o)]=o}e=e.replace(/\s/g,"");for(var s=n.length,a=n.charAt(0),u=[0],o=0;o<e.length;o++){var l=i[e.charCodeAt(o)];if(void 0===l)return;for(var c=0,f=l;c<u.length;++c)f+=u[c]*s,u[c]=255&f,f>>=8;for(;f>0;)u.push(255&f),f>>=8}for(var h=0;e[h]===a&&h<e.length-1;++h)u.push(0);return void 0!==t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(19);n(34),n(141),n(894);var i=e.exports=r.pkcs1=r.pkcs1||{};function o(e,t,n){n||(n=r.md.sha1.create());for(var i="",o=Math.ceil(t/n.digestLength),s=0;s<o;++s){var a=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);n.start(),n.update(e+a),i+=n.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,n){var i,s,a,u;"string"==typeof n?(i=n,s=arguments[3]||void 0,a=arguments[4]||void 0):n&&(i=n.label||void 0,s=n.seed||void 0,a=n.md||void 0,n.mgf1&&n.mgf1.md&&(u=n.mgf1.md)),a?a.start():a=r.md.sha1.create(),u||(u=a);var l=Math.ceil(e.n.bitLength()/8),c=l-2*a.digestLength-2;if(t.length>c){var f=new Error("RSAES-OAEP input message length is too long.");throw f.length=t.length,f.maxLength=c,f}i||(i=""),a.update(i,"raw");for(var h=a.digest(),p="",d=c-t.length,m=0;m<d;m++)p+="\0";var g=h.getBytes()+p+""+t;if(s){if(s.length!==a.digestLength){var f=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw f.seedLength=s.length,f.digestLength=a.digestLength,f}}else s=r.random.getBytes(a.digestLength);var y=o(s,l-a.digestLength-1,u),b=r.util.xorBytes(g,y,g.length),v=o(b,a.digestLength,u),w=r.util.xorBytes(s,v,s.length);return"\0"+w+b},i.decode_rsa_oaep=function(e,t,n){var i,s,a;"string"==typeof n?(i=n,s=arguments[3]||void 0):n&&(i=n.label||void 0,s=n.md||void 0,n.mgf1&&n.mgf1.md&&(a=n.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u){var l=new Error("RSAES-OAEP encoded message length is invalid.");throw l.length=t.length,l.expectedLength=u,l}if(void 0===s?s=r.md.sha1.create():s.start(),a||(a=s),u<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),s.update(i,"raw");for(var c=s.digest().getBytes(),f=t.charAt(0),h=t.substring(1,s.digestLength+1),p=t.substring(1+s.digestLength),d=o(p,s.digestLength,a),m=r.util.xorBytes(h,d,h.length),g=o(m,u-s.digestLength-1,a),y=r.util.xorBytes(p,g,p.length),b=y.substring(0,s.digestLength),l="\0"!==f,v=0;v<s.digestLength;++v)l|=c.charAt(v)!==b.charAt(v);for(var w=1,_=s.digestLength,k=s.digestLength;k<y.length;k++){var S=y.charCodeAt(k),E=1&S^1,x=w?65534:0;l|=S&x,w&=E,_+=w}if(l||1!==y.charCodeAt(_))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(_+1)}},function(e,t,n){var r=n(19);n(118),n(34);var i=e.exports=r.sha256=r.sha256||{};r.md.sha256=r.md.algorithms.sha256=i,i.create=function(){s||u();var e=null,t=r.util.createBuffer(),n=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,o=0;o<n;++o)i.fullMessageLength.push(0);return t=r.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(o,s){"utf8"===s&&(o=r.util.encodeUtf8(o));var a=o.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=a[1],a[1]=a[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),l(e,n,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=r.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize,u=a&i.blockLength-1,c,f;s.putBytes(o.substr(0,i.blockLength-u));for(var h=8*i.fullMessageLength[0],p=0;p<i.fullMessageLength.length-1;++p)c=8*i.fullMessageLength[p+1],f=c/4294967296>>>0,h+=f,s.putInt32(h>>>0),h=c>>>0;s.putInt32(h);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};l(d,n,s);var m=r.util.createBuffer();return m.putInt32(d.h0),m.putInt32(d.h1),m.putInt32(d.h2),m.putInt32(d.h3),m.putInt32(d.h4),m.putInt32(d.h5),m.putInt32(d.h6),m.putInt32(d.h7),m},i};var o=null,s=!1,a=null;function u(){o=String.fromCharCode(128),o+=r.util.fillString(String.fromCharCode(0),64),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=!0}function l(e,t,n){for(var r,i,o,s,u,l,c,f,h,p,d,m,g,y,b,v=n.length();v>=64;){for(c=0;c<16;++c)t[c]=n.getInt32();for(;c<64;++c)r=t[c-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,i=t[c-15],i=(i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=r+t[c-7]+i+t[c-16]|0;for(f=e.h0,h=e.h1,p=e.h2,d=e.h3,m=e.h4,g=e.h5,y=e.h6,b=e.h7,c=0;c<64;++c)s=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),u=y^m&(g^y),o=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),l=f&h|p&(f^h),r=b+s+u+a[c]+t[c],i=o+l,b=y,y=g,g=m,m=d+r>>>0,d=p,p=h,h=f,f=r+i>>>0;e.h0=e.h0+f|0,e.h1=e.h1+h|0,e.h2=e.h2+p|0,e.h3=e.h3+d|0,e.h4=e.h4+m|0,e.h5=e.h5+g|0,e.h6=e.h6+y|0,e.h7=e.h7+b|0,v-=64}}},function(e,t,n){(function(t){var r=n(19);n(34);var i=null;!r.util.isNodejs||r.options.usePureJavaScript||t.versions["node-webkit"]||(i=n(460));var o=e.exports=r.prng=r.prng||{};o.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},n=e.md,o=new Array(32),s=0;s<32;++s)o[s]=n.create();function a(e){if(t.pools[0].messageLength>=32)return l(),e();var n=32-t.pools[0].messageLength<<5;t.seedFile(n,function(n,r){if(n)return e(n);t.collect(r),l(),e()})}function u(){if(t.pools[0].messageLength>=32)return l();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),l()}function l(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var n=1,r=0;r<32;++r)t.reseeds%n==0&&(e.update(t.pools[r].digest().getBytes()),t.pools[r].start()),n<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null;if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;n&&n.getRandomValues&&(t=function(e){return n.getRandomValues(e)})}var i=r.util.createBuffer();if(t)for(;i.length()<e;){var o=Math.max(1,Math.min(e-i.length(),65536)/4),s=new Uint32Array(Math.floor(o));try{t(s);for(var a=0;a<s.length;++a)i.putInt32(s[a])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(i.length()<e)for(var u,l,c,f=Math.floor(65536*Math.random());i.length()<e;){l=16807*(65535&f),u=16807*(f>>16),l+=(32767&u)<<16,l+=u>>15,l=(2147483647&l)+(l>>31),f=4294967295&l;for(var a=0;a<3;++a)c=f>>>(a<<3),c^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&c))}return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,n){if(!n)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,u=t.plugin.formatSeed,l=r.util.createBuffer();function c(f){if(f)return n(f);if(l.length()>=e)return n(null,l.getBytes(e));if(t.generated>1048575&&(t.key=null),null===t.key)return r.util.nextTick(function(){a(c)});var h=i(t.key,t.seed);t.generated+=h.length,l.putBytes(h),t.key=s(i(t.key,o(t.seed))),t.seed=u(i(t.key,t.seed)),r.util.setImmediate(c)}t.key=null,c()},t.generateSync=function(e){var n=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var a=r.util.createBuffer();a.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&u();var l=n(t.key,t.seed);t.generated+=l.length,a.putBytes(l),t.key=o(n(t.key,i(t.seed))),t.seed=s(n(t.key,t.seed))}return a.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,function(e,n){if(e)return t(e);t(null,n.toString())})},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var n=e.length,r=0;r<n;++r)t.pools[t.pool].update(e.substr(r,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,n){for(var r="",i=0;i<n;i+=8)r+=String.fromCharCode(e>>i&255);t.collect(r)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){function n(e){var r=e.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",n),t(r.forge.prng.err,r.forge.prng.bytes))}self.addEventListener("message",n),self.postMessage({forge:{prng:{needed:e}}})};else{var n=function(n){var r=n.data;r.forge&&r.forge.prng&&t.seedFile(r.forge.prng.needed,function(t,n){e.postMessage({forge:{prng:{err:t,bytes:n}}})})};e.addEventListener("message",n)}},t}}).call(this,n(2))},function(e,t,n){var r=n(19);n(118),n(34);var i=e.exports=r.sha1=r.sha1||{};r.md.sha1=r.md.algorithms.sha1=i,i.create=function(){s||a();var e=null,t=r.util.createBuffer(),n=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,o=0;o<n;++o)i.fullMessageLength.push(0);return t=r.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(o,s){"utf8"===s&&(o=r.util.encodeUtf8(o));var a=o.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=a[1],a[1]=a[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),u(e,n,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=r.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize,l=a&i.blockLength-1,c,f;s.putBytes(o.substr(0,i.blockLength-l));for(var h=8*i.fullMessageLength[0],p=0;p<i.fullMessageLength.length-1;++p)c=8*i.fullMessageLength[p+1],f=c/4294967296>>>0,h+=f,s.putInt32(h>>>0),h=c>>>0;s.putInt32(h);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};u(d,n,s);var m=r.util.createBuffer();return m.putInt32(d.h0),m.putInt32(d.h1),m.putInt32(d.h2),m.putInt32(d.h3),m.putInt32(d.h4),m},i};var o=null,s=!1;function a(){o=String.fromCharCode(128),o+=r.util.fillString(String.fromCharCode(0),64),s=!0}function u(e,t,n){for(var r,i,o,s,a,u,l,c,f=n.length();f>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,u=e.h4,c=0;c<16;++c)r=n.getInt32(),t[c]=r,l=a^o&(s^a),r=(i<<5|i>>>27)+l+u+1518500249+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;for(;c<20;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,l=a^o&(s^a),r=(i<<5|i>>>27)+l+u+1518500249+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;for(;c<32;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,l=o^s^a,r=(i<<5|i>>>27)+l+u+1859775393+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;for(;c<40;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=o^s^a,r=(i<<5|i>>>27)+l+u+1859775393+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;for(;c<60;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=o&s|a&(o^s),r=(i<<5|i>>>27)+l+u+2400959708+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;for(;c<80;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=o^s^a,r=(i<<5|i>>>27)+l+u+3395469782+r,u=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+s|0,e.h3=e.h3+a|0,e.h4=e.h4+u|0,f-=64}}},function(e,t,n){var r=n(19);n(34),n(457),n(141),function(){if(r.prime)e.exports=r.prime;else{var t=e.exports=r.prime=r.prime||{},n=r.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new n(null);o.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,n){"function"==typeof t&&(n=t,t={}),t=t||{};var i=t.algorithm||"PRIMEINC";"string"==typeof i&&(i={name:i}),i.options=i.options||{};var o=t.prng||r.random,s={nextBytes:function(e){for(var t=o.getBytesSync(e.length),n=0;n<e.length;++n)e[n]=t.charCodeAt(n)}};if("PRIMEINC"===i.name)return a(e,s,i.options,n);throw new Error("Invalid prime generation algorithm: "+i.name)}}function a(e,t,n,r){return"workers"in n?c(e,t,n,r):u(e,t,n,r)}function u(e,t,n,r){var i=f(e,t),o=0,s=h(i.bitLength());"millerRabinTests"in n&&(s=n.millerRabinTests);var a=10;"maxBlockTime"in n&&(a=n.maxBlockTime),l(i,e,t,0,s,a,r)}function l(e,t,n,o,s,a,u){var c=+new Date;do{if(e.bitLength()>t&&(e=f(t,n)),e.isProbablePrime(s))return u(null,e);e.dAddOffset(i[o++%8],0)}while(a<0||+new Date-c<a);r.util.setImmediate(function(){l(e,t,n,o,s,a,u)})}function c(e,t,i,o){if("undefined"==typeof Worker)return u(e,t,i,o);var s=f(e,t),a=i.workers,l=i.workLoad||100,c=30*l/8,h=i.workerScript||"forge/prime.worker.js";if(-1===a)return r.util.estimateCores(function(e,t){e&&(t=2),a=t-1,p()});function p(){a=Math.max(1,a);for(var r=[],i=0;i<a;++i)r[i]=new Worker(h);for(var u=a,i=0;i<a;++i)r[i].addEventListener("message",d);var p=!1;function d(i){if(!p){--u;var a=i.data;if(a.found){for(var h=0;h<r.length;++h)r[h].terminate();return p=!0,o(null,new n(a.prime,16))}s.bitLength()>e&&(s=f(e,t));var d=s.toString(16);i.target.postMessage({hex:d,workLoad:l}),s.dAddOffset(c,0)}}}p()}function f(e,t){var r=new n(e,t),i=e-1;return r.testBit(i)||r.bitwiseTo(n.ONE.shiftLeft(i),s,r),r.dAddOffset(31-r.mod(o).byteValue(),0),r}function h(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}}()},function(e,t,n){var r=n(19);n(118),n(34);var i=e.exports=r.hmac=r.hmac||{};i.create=function(){var e=null,t=null,n=null,i=null,o={start:function(o,s){if(null!==o)if("string"==typeof o){if(o=o.toLowerCase(),!(o in r.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');t=r.md.algorithms[o].create()}else t=o;if(null===s)s=e;else{if("string"==typeof s)s=r.util.createBuffer(s);else if(r.util.isArray(s)){var a=s;s=r.util.createBuffer();for(var u=0;u<a.length;++u)s.putByte(a[u])}var l=s.length();l>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),n=r.util.createBuffer(),i=r.util.createBuffer(),l=s.length();for(var u=0;u<l;++u){var a=s.at(u);n.putByte(54^a),i.putByte(92^a)}if(l<t.blockLength)for(var a=t.blockLength-l,u=0;u<a;++u)n.putByte(54),i.putByte(92);e=s,n=n.bytes(),i=i.bytes()}t.start(),t.update(n)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return o.digest=o.getMac,o}},function(e,t,n){var r=n(19);n(34);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5],s=function(e,t){return e<<t&65535|(65535&e)>>16-t},a=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=r.rc2=r.rc2||{},r.rc2.expandKey=function(e,t){"string"==typeof e&&(e=r.util.createBuffer(e)),t=t||128;var n=e,o=e.length(),s=t,a=Math.ceil(s/8),u=255>>(7&s),l;for(l=o;l<128;l++)n.putByte(i[n.at(l-1)+n.at(l-o)&255]);for(n.setAt(128-a,i[n.at(128-a)&u]),l=127-a;l>=0;l--)n.setAt(l,i[n.at(l+1)^n.at(l+a)]);return n};var u=function(e,t,n){var i=!1,u=null,l=null,c=null,f,h,p,d,m=[];for(e=r.rc2.expandKey(e,t),p=0;p<64;p++)m.push(e.getInt16Le());n?(f=function(e){for(p=0;p<4;p++)e[p]+=m[d]+(e[(p+3)%4]&e[(p+2)%4])+(~e[(p+3)%4]&e[(p+1)%4]),e[p]=s(e[p],o[p]),d++},h=function(e){for(p=0;p<4;p++)e[p]+=m[63&e[(p+3)%4]]}):(f=function(e){for(p=3;p>=0;p--)e[p]=a(e[p],o[p]),e[p]-=m[d]+(e[(p+3)%4]&e[(p+2)%4])+(~e[(p+3)%4]&e[(p+1)%4]),d--},h=function(e){for(p=3;p>=0;p--)e[p]-=m[63&e[(p+3)%4]]});var g=function(e){var t=[];for(p=0;p<4;p++){var r=u.getInt16Le();null!==c&&(n?r^=c.getInt16Le():c.putInt16Le(r)),t.push(65535&r)}d=n?0:63;for(var i=0;i<e.length;i++)for(var o=0;o<e[i][0];o++)e[i][1](t);for(p=0;p<4;p++)null!==c&&(n?c.putInt16Le(t[p]):t[p]^=c.getInt16Le()),l.putInt16Le(t[p])},y=null;return y={start:function(e,t){e&&"string"==typeof e&&(e=r.util.createBuffer(e)),i=!1,u=r.util.createBuffer(),l=t||new r.util.createBuffer,c=e,y.output=l},update:function(e){for(i||u.putBuffer(e);u.length()>=8;)g([[5,f],[1,h],[6,f],[1,h],[5,f]])},finish:function(e){var t=!0;if(n)if(e)t=e(8,u,!n);else{var r=8===u.length()?8:8-u.length();u.fillWithByte(r,r)}if(t&&(i=!0,y.update()),!n&&(t=0===u.length(),t))if(e)t=e(8,l,!n);else{var o=l.length(),s=l.at(o-1);s>o?t=!1:l.truncate(s)}return t}},y};r.rc2.startEncrypting=function(e,t,n){var i=r.rc2.createEncryptionCipher(e,128);return i.start(t,n),i},r.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},r.rc2.startDecrypting=function(e,t,n){var i=r.rc2.createDecryptionCipher(e,128);return i.start(t,n),i},r.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,n){"use strict";const r=n(58),i=n(71),o=n(76),s=n(90),a=n(899),u=i(n(308));n(912),n(310);const l=n(19);class c{constructor(e){this._key=e}verify(e,t,n){g(n),a.hashAndVerify(this._key,t,e,n)}marshal(){return a.utils.jwkToPkix(this._key)}get bytes(){return u.PublicKey.encode({Type:u.KeyType.RSA,Data:this.marshal()})}encrypt(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}equals(e){return this.bytes.equals(e.bytes)}hash(e){g(e),r(this.bytes,"sha2-256",e)}}class f{constructor(e,t){this._key=e,this._publicKey=t}genSecret(){return a.getRandomValues(16)}sign(e,t){g(t),a.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new c(this._publicKey)}decrypt(e,t){a.decrypt(this._key,e,t)}marshal(){return a.utils.jwkToPkcs1(this._key)}get bytes(){return u.PrivateKey.encode({Type:u.KeyType.RSA,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){g(e),r(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,n)=>{if(t)return e(t);e(null,o.encode(n))})}export(e,t,n){"function"==typeof t&&(n=t,t=e,e="pkcs-8"),g(n),s(()=>{let r=null,i=null;try{const n=new l.util.ByteBuffer(this.marshal()),o=l.asn1.fromDer(n),s=l.pki.privateKeyFromAsn1(o);if("pkcs-8"===e){const e={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};i=l.pki.encryptRsaPrivateKey(s,t,e)}else r=new Error(`Unknown export format '${e}'`)}catch(e){r=e}n(r,i)})}}function h(e,t){const n=a.utils.pkcs1ToJwk(e);a.unmarshalPrivateKey(n,(e,n)=>{if(e)return t(e);t(null,new f(n.privateKey,n.publicKey))})}function p(e){const t=a.utils.pkixToJwk(e);return new c(t)}function d(e,t){a.unmarshalPrivateKey(e,(e,n)=>{if(e)return t(e);t(null,new f(n.privateKey,n.publicKey))})}function m(e,t){a.generateKey(e,(e,n)=>{if(e)return t(e);t(null,new f(n.privateKey,n.publicKey))})}function g(e){if("function"!=typeof e)throw new Error("callback is required")}e.exports={RsaPublicKey:c,RsaPrivateKey:f,unmarshalRsaPublicKey:p,unmarshalRsaPrivateKey:h,generateKeyPair:m,fromJwk:d}},function(e,t,n){"use strict";(function(e){const r=n(313),i=n(314),o=n(315);function s(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}function a(e){return i.subtle.importKey("jwk",{kty:e.kty,n:e.n,e:e.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"])}t.utils=n(901),t.generateKey=function(e,t){r(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(s).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.unmarshalPrivateKey=function(e,t){const n=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);r(Promise.all([n,a(e)]).then(e=>s({privateKey:e[0],publicKey:e[1]})).then(e=>({privateKey:e[0],publicKey:e[1]})),t)},t.getRandomValues=o,t.hashAndSign=function(t,n,o){r(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(e=>i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(n))).then(t=>e.from(t)),o)},t.hashAndVerify=function(e,t,n,o){r(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(e=>i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,n)),o)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t,n){const r=t.crypto||t.msCrypto,i=65536;function o(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}function s(e){const t=new Uint8Array(e);let o=0;if(e>0)if(e>i)for(;o<t;)o+i>t?r.getRandomValues(t.subarray(o,t-o)):(r.getRandomValues(t.subarray(o,o+i)),o+=i);else r.getRandomValues(t);return n.from(t)}r&&r.getRandomValues?e.exports=s:e.exports=o}).call(this,n(8),n(0).Buffer)},function(e,t,n){"use strict";const r=n(142),i=n(466),o=i.toBase64,s=i.toBn,a=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())}),u=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),l=r.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),c=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});t.pkcs1ToJwk=function(e){const t=a.decode(e,"der");return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return a.encode({version:0,modulus:s(e.n),publicExponent:s(e.e),privateExponent:s(e.d),prime1:s(e.p),prime2:s(e.q),exponent1:s(e.dp),exponent2:s(e.dq),coefficient:s(e.qi)},"der")},t.pkixToJwk=function(e){const t=l.decode(e,"der"),n=c.decode(t.subjectPublicKey.data,"der");return{kty:"RSA",n:o(n.modulus),e:o(n.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return l.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:c.encode({modulus:s(e.n),publicExponent:s(e.e)},"der")}},"der")}},function(e,t){},function(e,t,n){"use strict";const r=n(142),i=n(1),o=t;function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}o.define=function e(t,n){return new s(t,n)},s.prototype._createNamed=function e(t){let r;try{r=n(904).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function e(n){t.call(this,n)},new r(this)},s.prototype._getDecoder=function e(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(r.decoders[t])),this.decoders[t]},s.prototype.decode=function e(t,n,r){return this._getDecoder(n).decode(t,r)},s.prototype._getEncoder=function e(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r.encoders[t])),this.encoders[t]},s.prototype.encode=function e(t,n,r){return this._getEncoder(n).encode(t,r)}},function(module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function e(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,"null"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var o=Object_keys(n),s=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return e&&forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t,n){"use strict";const r=n(1);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function e(t){return t instanceof o},i.prototype.save=function e(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function e(t){const n=this._reporterState;n.obj=t.obj,n.path=n.path.slice(0,t.pathLen)},i.prototype.enterKey=function e(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function e(t){const n=this._reporterState;n.path=n.path.slice(0,t-1)},i.prototype.leaveKey=function e(t,n,r){const i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[n]=r)},i.prototype.path=function e(){return this._reporterState.path.join("/")},i.prototype.enterObject=function e(){const t=this._reporterState,n=t.obj;return t.obj={},n},i.prototype.leaveObject=function e(t){const n=this._reporterState,r=n.obj;return n.obj=t,r},i.prototype.error=function e(t){let n;const r=this._reporterState,i=t instanceof o;if(n=i?t:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw n;return i||r.errors.push(n),n},i.prototype.wrapResult=function e(t){const n=this._reporterState;return n.options.partial?{result:this.isError(t)?null:t,errors:n.errors}:t},r(o,Error),o.prototype.rethrow=function e(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){"use strict";const r=n(179).Reporter,i=n(179).EncoderBuffer,o=n(179).DecoderBuffer,s=n(107),a=["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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a),l=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function c(e,t){const n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function e(){const t=this._baseState,n={};f.forEach(function(e){n[e]=t[e]});const r=new this.constructor(n.parent);return r._baseState=n,r},c.prototype._wrap=function e(){const t=this._baseState;u.forEach(function(e){this[e]=function n(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},c.prototype._init=function e(t){const n=this._baseState;s(null===n.parent),t.call(this),n.children=n.children.filter(function(e){return e._baseState.parent===this},this),s.equal(n.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function e(t){const n=this._baseState,r=t.filter(function(e){return e instanceof this.constructor},this);t=t.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(s(null===n.children),n.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==t.length&&(s(null===n.args),n.args=t,n.reverseArgs=t.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n}),t}))},l.forEach(function(e){c.prototype[e]=function t(){const n=this._baseState;throw new Error(e+" not implemented for encoding: "+n.enc)}}),a.forEach(function(e){c.prototype[e]=function t(){const n=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===n.tag),n.tag=e,this._useArgs(r),this}}),c.prototype.use=function e(t){s(t);const n=this._baseState;return s(null===n.use),n.use=t,this},c.prototype.optional=function e(){const t=this._baseState;return t.optional=!0,this},c.prototype.def=function e(t){const n=this._baseState;return s(null===n.default),n.default=t,n.optional=!0,this},c.prototype.explicit=function e(t){const n=this._baseState;return s(null===n.explicit&&null===n.implicit),n.explicit=t,this},c.prototype.implicit=function e(t){const n=this._baseState;return s(null===n.explicit&&null===n.implicit),n.implicit=t,this},c.prototype.obj=function e(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return t.obj=!0,0!==n.length&&this._useArgs(n),this},c.prototype.key=function e(t){const n=this._baseState;return s(null===n.key),n.key=t,this},c.prototype.any=function e(){const t=this._baseState;return t.any=!0,this},c.prototype.choice=function e(t){const n=this._baseState;return s(null===n.choice),n.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},c.prototype.contains=function e(t){const n=this._baseState;return s(null===n.use),n.contains=t,this},c.prototype._decode=function e(t,n){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,n));let i=r.default,s=!0,a=null,u;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){let e=null;if(null!==r.explicit?e=r.explicit:null!==r.implicit?e=r.implicit:null!==r.tag&&(e=r.tag),null!==e||r.any){if(s=this._peekTag(t,e,r.any),t.isError(s))return s}else{const e=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,n):this._decodeChoice(t,n),s=!0}catch(e){s=!1}t.restore(e)}}if(r.obj&&s&&(u=t.enterObject()),s){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const e=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?i=t.raw(e):t=n}if(n&&n.track&&null!==r.tag&&n.track(t.path(),e,t.length,"tagged"),n&&n.track&&null!==r.tag&&n.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,n):this._decodeChoice(t,n)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function e(r){r._decode(t,n)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const e=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(e,n)}}return r.obj&&s&&(i=t.leaveObject(u)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function e(t,n,r){const i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(n,t,i.args[0],r):/str$/.test(t)?this._decodeStr(n,t,r):"objid"===t&&i.args?this._decodeObjid(n,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(n,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(n,t,r):"null_"===t?this._decodeNull(n,r):"bool"===t?this._decodeBool(n,r):"objDesc"===t?this._decodeStr(n,t,r):"int"===t||"enum"===t?this._decodeInt(n,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,n._reporterState.obj)._decode(n,r):n.error("unknown tag: "+t)},c.prototype._getUse=function e(t,n){const r=this._baseState;return r.useDecoder=this._use(t,n),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function e(t,n){const r=this._baseState;let i=null,o=!1;return Object.keys(r.choice).some(function(e){const s=t.save(),a=r.choice[e];try{const r=a._decode(t,n);if(t.isError(r))return!1;i={type:e,value:r},o=!0}catch(e){return t.restore(s),!1}return!0},this),o?i:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function e(t){return new i(t,this.reporter)},c.prototype._encode=function e(t,n,r){const i=this._baseState;if(null!==i.default&&i.default===t)return;const o=this._encodeValue(t,n,r);return void 0===o||this._skipDefault(o,n,r)?void 0:o},c.prototype._encodeValue=function e(t,n,i){const o=this._baseState;if(null===o.parent)return o.children[0]._encode(t,n||new r);let s=null;if(this.reporter=n,o.optional&&void 0===t){if(null===o.default)return;t=o.default}let a=null,u=!1;if(o.any)s=this._createEncoderBuffer(t);else if(o.choice)s=this._encodeChoice(t,n);else if(o.contains)a=this._getUse(o.contains,i)._encode(t,n),u=!0;else if(o.children)a=o.children.map(function(e){if("null_"===e._baseState.tag)return e._encode(null,n,t);if(null===e._baseState.key)return n.error("Child should have a key");const r=n.enterKey(e._baseState.key);if("object"!=typeof t)return n.error("Child expected, but input is not object");const i=e._encode(t[e._baseState.key],n,t);return n.leaveKey(r),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return n.error("Too many args for : "+o.tag);if(!Array.isArray(t))return n.error("seqof/setof, but data is not Array");const e=this.clone();e._baseState.implicit=null,a=this._createEncoderBuffer(t.map(function(e){const r=this._baseState;return this._getUse(r.args[0],t)._encode(e,n)},e))}else null!==o.use?s=this._getUse(o.use,i)._encode(t,n):(a=this._encodePrimitive(o.tag,t),u=!0);if(!o.any&&null===o.choice){const e=null!==o.implicit?o.implicit:o.tag,t=null===o.implicit?"universal":"context";null===e?null===o.use&&n.error("Tag could be omitted only for .use()"):null===o.use&&(s=this._encodeComposite(e,u,t,a))}return null!==o.explicit&&(s=this._encodeComposite(o.explicit,!1,"context",s)),s},c.prototype._encodeChoice=function e(t,n){const r=this._baseState,i=r.choice[t.type];return i||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,n)},c.prototype._encodePrimitive=function e(t,n){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(n,t);if("objid"===t&&r.args)return this._encodeObjid(n,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(n,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(n,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(n,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(n);if("objDesc"===t)return this._encodeStr(n,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function e(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function e(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(e,t,n){"use strict";const r=n(463);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.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"},t.tagByName=r._reverse(t.tag)},function(e,t,n){"use strict";const r=t;r.der=n(464),r.pem=n(909)},function(e,t,n){"use strict";const r=n(1),i=n(0).Buffer,o=n(464);function s(e){o.call(this,e),this.enc="pem"}r(s,o),e.exports=s,s.prototype.decode=function e(t,n){const r=t.toString().split(/[\r\n]+/g),s=n.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let u=-1,l=-1;for(let e=0;e<r.length;e++){const t=r[e].match(a);if(null!==t&&t[2]===s){if(-1!==u){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;u=e}}if(-1===u||-1===l)throw new Error("PEM section not found for: "+s);const c=r.slice(u+1,l).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const f=new i(c,"base64");return o.prototype.decode.call(this,f,n)}},function(e,t,n){"use strict";const r=t;r.der=n(465),r.pem=n(911)},function(e,t,n){"use strict";const r=n(1),i=n(465);function o(e){i.call(this,e),this.enc="pem"}r(o,i),e.exports=o,o.prototype.encode=function e(t,n){const r=i.prototype.encode.call(this,t),o=r.toString("base64"),s=["-----BEGIN "+n.label+"-----"];for(let e=0;e<o.length;e+=64)s.push(o.slice(e,e+64));return s.push("-----END "+n.label+"-----"),s.join("\n")}},function(e,t,n){var r=n(19);n(118),n(34);var i=e.exports=r.sha512=r.sha512||{};r.md.sha512=r.md.algorithms.sha512=i;var o=r.sha384=r.sha512.sha384=r.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},r.md.sha384=r.md.algorithms.sha384=o,r.sha512.sha256=r.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},r.md["sha512/256"]=r.md.algorithms["sha512/256"]=r.sha512.sha256,r.sha512.sha224=r.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},r.md["sha512/224"]=r.md.algorithms["sha512/224"]=r.sha512.sha224,i.create=function(e){if(a||c(),void 0===e&&(e="SHA-512"),!(e in l))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=l[e],n=null,i=r.util.createBuffer(),o=new Array(80),u=0;u<80;++u)o[u]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var p={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var e=p.messageLengthSize/4,o=0;o<e;++o)p.fullMessageLength.push(0);i=r.util.createBuffer(),n=new Array(t.length);for(var o=0;o<t.length;++o)n[o]=t[o].slice(0);return p}};return p.start(),p.update=function(e,t){"utf8"===t&&(e=r.util.encodeUtf8(e));var s=e.length;p.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var a=p.fullMessageLength.length-1;a>=0;--a)p.fullMessageLength[a]+=s[1],s[1]=s[0]+(p.fullMessageLength[a]/4294967296>>>0),p.fullMessageLength[a]=p.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),f(n,o,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var t=r.util.createBuffer();t.putBytes(i.bytes());var a=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize,u=a&p.blockLength-1,l,c;t.putBytes(s.substr(0,p.blockLength-u));for(var h=8*p.fullMessageLength[0],d=0;d<p.fullMessageLength.length-1;++d)l=8*p.fullMessageLength[d+1],c=l/4294967296>>>0,h+=c,t.putInt32(h>>>0),h=l>>>0;t.putInt32(h);for(var m=new Array(n.length),d=0;d<n.length;++d)m[d]=n[d].slice(0);f(m,o,t);var g=r.util.createBuffer(),y;y="SHA-512"===e?m.length:"SHA-384"===e?m.length-2:m.length-4;for(var d=0;d<y;++d)g.putInt32(m[d][0]),d===y-1&&"SHA-512/224"===e||g.putInt32(m[d][1]);return g},p};var s=null,a=!1,u=null,l=null;function c(){s=String.fromCharCode(128),s+=r.util.fillString(String.fromCharCode(0),128),u=[[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]],l={},l["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],l["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],l["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],l["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0}function f(e,t,n){for(var r,i,o,s,a,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S,E,x,C,A,I,T,j,O,P,B,R,N,M,L,F,D=n.length();D>=128;){for(P=0;P<16;++P)t[P][0]=n.getInt32()>>>0,t[P][1]=n.getInt32()>>>0;for(;P<80;++P)N=t[P-2],B=N[0],R=N[1],r=((B>>>19|R<<13)^(R>>>29|B<<3)^B>>>6)>>>0,i=((B<<13|R>>>19)^(R<<3|B>>>29)^(B<<26|R>>>6))>>>0,L=t[P-15],B=L[0],R=L[1],o=((B>>>1|R<<31)^(B>>>8|R<<24)^B>>>7)>>>0,s=((B<<31|R>>>1)^(B<<24|R>>>8)^(B<<25|R>>>7))>>>0,M=t[P-7],F=t[P-16],R=i+M[1]+s+F[1],t[P][0]=r+M[0]+o+F[0]+(R/4294967296>>>0)>>>0,t[P][1]=R>>>0;for(g=e[0][0],y=e[0][1],b=e[1][0],v=e[1][1],w=e[2][0],_=e[2][1],k=e[3][0],S=e[3][1],E=e[4][0],x=e[4][1],C=e[5][0],A=e[5][1],I=e[6][0],T=e[6][1],j=e[7][0],O=e[7][1],P=0;P<80;++P)c=((E>>>14|x<<18)^(E>>>18|x<<14)^(x>>>9|E<<23))>>>0,f=((E<<18|x>>>14)^(E<<14|x>>>18)^(x<<23|E>>>9))>>>0,h=(I^E&(C^I))>>>0,p=(T^x&(A^T))>>>0,a=((g>>>28|y<<4)^(y>>>2|g<<30)^(y>>>7|g<<25))>>>0,l=((g<<4|y>>>28)^(y<<30|g>>>2)^(y<<25|g>>>7))>>>0,d=(g&b|w&(g^b))>>>0,m=(y&v|_&(y^v))>>>0,R=O+f+p+u[P][1]+t[P][1],r=j+c+h+u[P][0]+t[P][0]+(R/4294967296>>>0)>>>0,i=R>>>0,R=l+m,o=a+d+(R/4294967296>>>0)>>>0,s=R>>>0,j=I,O=T,I=C,T=A,C=E,A=x,R=S+i,E=k+r+(R/4294967296>>>0)>>>0,x=R>>>0,k=w,S=_,w=b,_=v,b=g,v=y,R=i+s,g=r+o+(R/4294967296>>>0)>>>0,y=R>>>0;R=e[0][1]+y,e[0][0]=e[0][0]+g+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+v,e[1][0]=e[1][0]+b+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+_,e[2][0]=e[2][0]+w+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+S,e[3][0]=e[3][0]+k+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+x,e[4][0]=e[4][0]+E+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+A,e[5][0]=e[5][0]+C+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+T,e[6][0]=e[6][0]+I+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+O,e[7][0]=e[7][0]+j+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,D-=128}}},function(e,t,n){"use strict";(function(t){const r=n(58),i=n(71),o=n(76),s=n(914),a=i(n(308));class u{constructor(e){this._key=m(e,s.publicKeyLength)}verify(e,t,n){d(n),s.hashAndVerify(this._key,t,e,n)}marshal(){return t.from(this._key)}get bytes(){return a.PublicKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){d(e),r(this.bytes,"sha2-256",e)}}class l{constructor(e,t){this._key=m(e,s.privateKeyLength),this._publicKey=m(t,s.publicKeyLength)}sign(e,t){d(t),s.hashAndSign(this._key,e,t)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new u(this._publicKey)}marshal(){return t.concat([t.from(this._key),t.from(this._publicKey)])}get bytes(){return a.PrivateKey.encode({Type:a.KeyType.Ed25519,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){d(e),r(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,n)=>{if(t)return e(t);e(null,o.encode(n))})}}function c(e,t){try{e=m(e,s.privateKeyLength+s.publicKeyLength)}catch(e){return t(e)}const n=e.slice(0,s.privateKeyLength),r=e.slice(s.privateKeyLength,e.length);t(null,new l(n,r))}function f(e){return e=m(e,s.publicKeyLength),new u(e)}function h(e,t){void 0===t&&"function"==typeof e&&(t=e),s.generateKey((e,n)=>{if(e)return t(e);let r;try{r=new l(n.secretKey,n.publicKey)}catch(e){return void t(e)}t(null,r)})}function p(e,t,n){void 0===n&&"function"==typeof t&&(n=t),s.generateKeyFromSeed(e,(e,t)=>{if(e)return n(e);let r;try{r=new l(t.secretKey,t.publicKey)}catch(e){return void n(e)}n(null,r)})}function d(e){if("function"!=typeof e)throw new Error("callback is required")}function m(e,n){if(t.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==n)throw new Error("Key must be a Uint8Array or Buffer of length "+n);return e}e.exports={Ed25519PublicKey:u,Ed25519PrivateKey:l,unmarshalEd25519PrivateKey:c,unmarshalEd25519PublicKey:f,generateKeyPair:h,generateKeyPairFromSeed:p}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(e){const r=n(915),i=n(90);t.publicKeyLength=r.sign.publicKeyLength,t.privateKeyLength=r.sign.secretKeyLength,t.generateKey=function(e){i(()=>{let t;try{t=r.sign.keyPair()}catch(t){return e(t)}e(null,t)})},t.generateKeyFromSeed=function(e,t){i(()=>{let n;try{n=r.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,n)})},t.hashAndSign=function(t,n,o){i(()=>{o(null,e.from(r.sign.detached(n,t)))})},t.hashAndVerify=function(e,t,n,o){i(()=>{let i;try{i=r.sign.detached.verify(n,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,n(0).Buffer)},function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=t(),a=t([1]),u=t([56129,1]),l=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function m(e,t,n,r,i){var o,s=0;for(o=0;o<i;o++)s|=e[t+o]^n[r+o];return(1&s-1>>>8)-1}function g(e,t,n,r){return m(e,t,n,r,16)}function y(e,t,n,r){return m(e,t,n,r,32)}function b(e,t,n,r){for(var i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=i,_=o,k=s,S=a,E=u,x=l,C=c,A=f,I=h,T=p,j=d,O=m,P=g,B=y,R=b,N=v,M,L=0;L<20;L+=2)M=w+P|0,E^=M<<7|M>>>25,M=E+w|0,I^=M<<9|M>>>23,M=I+E|0,P^=M<<13|M>>>19,M=P+I|0,w^=M<<18|M>>>14,M=x+_|0,T^=M<<7|M>>>25,M=T+x|0,B^=M<<9|M>>>23,M=B+T|0,_^=M<<13|M>>>19,M=_+B|0,x^=M<<18|M>>>14,M=j+C|0,R^=M<<7|M>>>25,M=R+j|0,k^=M<<9|M>>>23,M=k+R|0,C^=M<<13|M>>>19,M=C+k|0,j^=M<<18|M>>>14,M=N+O|0,S^=M<<7|M>>>25,M=S+N|0,A^=M<<9|M>>>23,M=A+S|0,O^=M<<13|M>>>19,M=O+A|0,N^=M<<18|M>>>14,M=w+S|0,_^=M<<7|M>>>25,M=_+w|0,k^=M<<9|M>>>23,M=k+_|0,S^=M<<13|M>>>19,M=S+k|0,w^=M<<18|M>>>14,M=x+E|0,C^=M<<7|M>>>25,M=C+x|0,A^=M<<9|M>>>23,M=A+C|0,E^=M<<13|M>>>19,M=E+A|0,x^=M<<18|M>>>14,M=j+T|0,O^=M<<7|M>>>25,M=O+j|0,I^=M<<9|M>>>23,M=I+O|0,T^=M<<13|M>>>19,M=T+I|0,j^=M<<18|M>>>14,M=N+R|0,P^=M<<7|M>>>25,M=P+N|0,B^=M<<9|M>>>23,M=B+P|0,R^=M<<13|M>>>19,M=R+B|0,N^=M<<18|M>>>14;w=w+i|0,_=_+o|0,k=k+s|0,S=S+a|0,E=E+u|0,x=x+l|0,C=C+c|0,A=A+f|0,I=I+h|0,T=T+p|0,j=j+d|0,O=O+m|0,P=P+g|0,B=B+y|0,R=R+b|0,N=N+v|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=j>>>0&255,e[41]=j>>>8&255,e[42]=j>>>16&255,e[43]=j>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=B>>>0&255,e[53]=B>>>8&255,e[54]=B>>>16&255,e[55]=B>>>24&255,e[56]=R>>>0&255,e[57]=R>>>8&255,e[58]=R>>>16&255,e[59]=R>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}function v(e,t,n,r){for(var i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,a=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=i,_=o,k=s,S=a,E=u,x=l,C=c,A=f,I=h,T=p,j=d,O=m,P=g,B=y,R=b,N=v,M,L=0;L<20;L+=2)M=w+P|0,E^=M<<7|M>>>25,M=E+w|0,I^=M<<9|M>>>23,M=I+E|0,P^=M<<13|M>>>19,M=P+I|0,w^=M<<18|M>>>14,M=x+_|0,T^=M<<7|M>>>25,M=T+x|0,B^=M<<9|M>>>23,M=B+T|0,_^=M<<13|M>>>19,M=_+B|0,x^=M<<18|M>>>14,M=j+C|0,R^=M<<7|M>>>25,M=R+j|0,k^=M<<9|M>>>23,M=k+R|0,C^=M<<13|M>>>19,M=C+k|0,j^=M<<18|M>>>14,M=N+O|0,S^=M<<7|M>>>25,M=S+N|0,A^=M<<9|M>>>23,M=A+S|0,O^=M<<13|M>>>19,M=O+A|0,N^=M<<18|M>>>14,M=w+S|0,_^=M<<7|M>>>25,M=_+w|0,k^=M<<9|M>>>23,M=k+_|0,S^=M<<13|M>>>19,M=S+k|0,w^=M<<18|M>>>14,M=x+E|0,C^=M<<7|M>>>25,M=C+x|0,A^=M<<9|M>>>23,M=A+C|0,E^=M<<13|M>>>19,M=E+A|0,x^=M<<18|M>>>14,M=j+T|0,O^=M<<7|M>>>25,M=O+j|0,I^=M<<9|M>>>23,M=I+O|0,T^=M<<13|M>>>19,M=T+I|0,j^=M<<18|M>>>14,M=N+R|0,P^=M<<7|M>>>25,M=P+N|0,B^=M<<9|M>>>23,M=B+P|0,R^=M<<13|M>>>19,M=R+B|0,N^=M<<18|M>>>14;e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=j>>>0&255,e[9]=j>>>8&255,e[10]=j>>>16&255,e[11]=j>>>24&255,e[12]=N>>>0&255,e[13]=N>>>8&255,e[14]=N>>>16&255,e[15]=N>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=I>>>0&255,e[25]=I>>>8&255,e[26]=I>>>16&255,e[27]=I>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255}function w(e,t,n,r){b(e,t,n,r)}function _(e,t,n,r){v(e,t,n,r)}var k=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,n,r,i,o,s){var a=new Uint8Array(16),u=new Uint8Array(64),l,c;for(c=0;c<16;c++)a[c]=0;for(c=0;c<8;c++)a[c]=o[c];for(;i>=64;){for(w(u,a,s,k),c=0;c<64;c++)e[t+c]=n[r+c]^u[c];for(l=1,c=8;c<16;c++)l=l+(255&a[c])|0,a[c]=255&l,l>>>=8;i-=64,t+=64,r+=64}if(i>0)for(w(u,a,s,k),c=0;c<i;c++)e[t+c]=n[r+c]^u[c];return 0}function E(e,t,n,r,i){var o=new Uint8Array(16),s=new Uint8Array(64),a,u;for(u=0;u<16;u++)o[u]=0;for(u=0;u<8;u++)o[u]=r[u];for(;n>=64;){for(w(s,o,i,k),u=0;u<64;u++)e[t+u]=s[u];for(a=1,u=8;u<16;u++)a=a+(255&o[u])|0,o[u]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(w(s,o,i,k),u=0;u<n;u++)e[t+u]=s[u];return 0}function x(e,t,n,r,i){var o=new Uint8Array(32);_(o,r,i,k);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=r[a+16];return E(e,t,n,s,o)}function C(e,t,n,r,i,o,s){var a=new Uint8Array(32);_(a,o,s,k);for(var u=new Uint8Array(8),l=0;l<8;l++)u[l]=o[l+16];return S(e,t,n,r,i,u,a)}var A=function(e){var t,n,r,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function I(e,t,n,r,i,o){var s=new A(o);return s.update(n,r,i),s.finish(e,t),0}function T(e,t,n,r,i,o){var s=new Uint8Array(16);return I(s,0,n,r,i,o),g(e,t,s,0)}function j(e,t,n,r,i){var o;if(n<32)return-1;for(C(e,0,t,0,n,r,i),I(e,16,e,32,n-32,e),o=0;o<16;o++)e[o]=0;return 0}function O(e,t,n,r,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(x(s,0,32,r,i),0!==T(t,16,t,32,n-32,s))return-1;for(C(e,0,t,0,n,r,i),o=0;o<32;o++)e[o]=0;return 0}function P(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function B(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function R(e,t,n){for(var r,i=~(n-1),o=0;o<16;o++)r=i&(e[o]^t[o]),e[o]^=r,t[o]^=r}function N(e,n){var r,i,o,s=t(),a=t();for(r=0;r<16;r++)a[r]=n[r];for(B(a),B(a),B(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,R(a,s,1-o)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function M(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return N(n,e),N(r,t),y(n,0,r,0)}function L(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function F(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function D(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function z(e,t,n){var r,i,o=0,s=0,a=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0,y=0,b=0,v=0,w=0,_=0,k=0,S=0,E=0,x=0,C=0,A=0,I=0,T=0,j=0,O=0,P=0,B=0,R=0,N=0,M=n[0],L=n[1],F=n[2],D=n[3],U=n[4],z=n[5],q=n[6],K=n[7],H=n[8],V=n[9],W=n[10],$=n[11],G=n[12],Y=n[13],J=n[14],Z=n[15];r=t[0],o+=r*M,s+=r*L,a+=r*F,u+=r*D,l+=r*U,c+=r*z,f+=r*q,h+=r*K,p+=r*H,d+=r*V,m+=r*W,g+=r*$,y+=r*G,b+=r*Y,v+=r*J,w+=r*Z,r=t[1],s+=r*M,a+=r*L,u+=r*F,l+=r*D,c+=r*U,f+=r*z,h+=r*q,p+=r*K,d+=r*H,m+=r*V,g+=r*W,y+=r*$,b+=r*G,v+=r*Y,w+=r*J,_+=r*Z,r=t[2],a+=r*M,u+=r*L,l+=r*F,c+=r*D,f+=r*U,h+=r*z,p+=r*q,d+=r*K,m+=r*H,g+=r*V,y+=r*W,b+=r*$,v+=r*G,w+=r*Y,_+=r*J,k+=r*Z,r=t[3],u+=r*M,l+=r*L,c+=r*F,f+=r*D,h+=r*U,p+=r*z,d+=r*q,m+=r*K,g+=r*H,y+=r*V,b+=r*W,v+=r*$,w+=r*G,_+=r*Y,k+=r*J,S+=r*Z,r=t[4],l+=r*M,c+=r*L,f+=r*F,h+=r*D,p+=r*U,d+=r*z,m+=r*q,g+=r*K,y+=r*H,b+=r*V,v+=r*W,w+=r*$,_+=r*G,k+=r*Y,S+=r*J,E+=r*Z,r=t[5],c+=r*M,f+=r*L,h+=r*F,p+=r*D,d+=r*U,m+=r*z,g+=r*q,y+=r*K,b+=r*H,v+=r*V,w+=r*W,_+=r*$,k+=r*G,S+=r*Y,E+=r*J,x+=r*Z,r=t[6],f+=r*M,h+=r*L,p+=r*F,d+=r*D,m+=r*U,g+=r*z,y+=r*q,b+=r*K,v+=r*H,w+=r*V,_+=r*W,k+=r*$,S+=r*G,E+=r*Y,x+=r*J,C+=r*Z,r=t[7],h+=r*M,p+=r*L,d+=r*F,m+=r*D,g+=r*U,y+=r*z,b+=r*q,v+=r*K,w+=r*H,_+=r*V,k+=r*W,S+=r*$,E+=r*G,x+=r*Y,C+=r*J,A+=r*Z,r=t[8],p+=r*M,d+=r*L,m+=r*F,g+=r*D,y+=r*U,b+=r*z,v+=r*q,w+=r*K,_+=r*H,k+=r*V,S+=r*W,E+=r*$,x+=r*G,C+=r*Y,A+=r*J,I+=r*Z,r=t[9],d+=r*M,m+=r*L,g+=r*F,y+=r*D,b+=r*U,v+=r*z,w+=r*q,_+=r*K,k+=r*H,S+=r*V,E+=r*W,x+=r*$,C+=r*G,A+=r*Y,I+=r*J,T+=r*Z,r=t[10],m+=r*M,g+=r*L,y+=r*F,b+=r*D,v+=r*U,w+=r*z,_+=r*q,k+=r*K,S+=r*H,E+=r*V,x+=r*W,C+=r*$,A+=r*G,I+=r*Y,T+=r*J,j+=r*Z,r=t[11],g+=r*M,y+=r*L,b+=r*F,v+=r*D,w+=r*U,_+=r*z,k+=r*q,S+=r*K,E+=r*H,x+=r*V,C+=r*W,A+=r*$,I+=r*G,T+=r*Y,j+=r*J,O+=r*Z,r=t[12],y+=r*M,b+=r*L,v+=r*F,w+=r*D,_+=r*U,k+=r*z,S+=r*q,E+=r*K,x+=r*H,C+=r*V,A+=r*W,I+=r*$,T+=r*G,j+=r*Y,O+=r*J,P+=r*Z,r=t[13],b+=r*M,v+=r*L,w+=r*F,_+=r*D,k+=r*U,S+=r*z,E+=r*q,x+=r*K,C+=r*H,A+=r*V,I+=r*W,T+=r*$,j+=r*G,O+=r*Y,P+=r*J,B+=r*Z,r=t[14],v+=r*M,w+=r*L,_+=r*F,k+=r*D,S+=r*U,E+=r*z,x+=r*q,C+=r*K,A+=r*H,I+=r*V,T+=r*W,j+=r*$,O+=r*G,P+=r*Y,B+=r*J,R+=r*Z,r=t[15],w+=r*M,_+=r*L,k+=r*F,S+=r*D,E+=r*U,x+=r*z,C+=r*q,A+=r*K,I+=r*H,T+=r*V,j+=r*W,O+=r*$,P+=r*G,B+=r*Y,R+=r*J,N+=r*Z,o+=38*_,s+=38*k,a+=38*S,u+=38*E,l+=38*x,c+=38*C,f+=38*A,h+=38*I,p+=38*T,d+=38*j,m+=38*O,g+=38*P,y+=38*B,b+=38*R,v+=38*N,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=w}function q(e,t){z(e,t,t)}function K(e,n){var r=t(),i;for(i=0;i<16;i++)r[i]=n[i];for(i=253;i>=0;i--)q(r,r),2!==i&&4!==i&&z(r,r,n);for(i=0;i<16;i++)e[i]=r[i]}function H(e,n){var r=t(),i;for(i=0;i<16;i++)r[i]=n[i];for(i=250;i>=0;i--)q(r,r),1!==i&&z(r,r,n);for(i=0;i<16;i++)e[i]=r[i]}function V(e,n,r){var i=new Uint8Array(32),o=new Float64Array(80),s,a,l=t(),c=t(),f=t(),h=t(),p=t(),d=t();for(a=0;a<31;a++)i[a]=n[a];for(i[31]=127&n[31]|64,i[0]&=248,F(o,r),a=0;a<16;a++)c[a]=o[a],h[a]=l[a]=f[a]=0;for(l[0]=h[0]=1,a=254;a>=0;--a)s=i[a>>>3]>>>(7&a)&1,R(l,c,s),R(f,h,s),D(p,l,f),U(l,l,f),D(f,c,h),U(c,c,h),q(h,p),q(d,l),z(l,f,l),z(f,c,p),D(p,l,f),U(l,l,f),q(c,l),U(f,h,d),z(l,f,u),D(l,l,h),z(f,f,l),z(l,h,d),z(h,c,o),q(c,p),R(l,c,s),R(f,h,s);for(a=0;a<16;a++)o[a+16]=l[a],o[a+32]=f[a],o[a+48]=c[a],o[a+64]=h[a];var m=o.subarray(32),g=o.subarray(16);return K(m,m),z(g,g,m),N(e,g),0}function W(e,t){return V(e,t,o)}function $(e,t){return r(t,32),W(e,t)}function G(e,t,n){var r=new Uint8Array(32);return V(r,n,t),_(e,i,r,k)}A.prototype.blocks=function(e,t,n){for(var r=this.fin?0:2048,i,o,s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S=this.h[0],E=this.h[1],x=this.h[2],C=this.h[3],A=this.h[4],I=this.h[5],T=this.h[6],j=this.h[7],O=this.h[8],P=this.h[9],B=this.r[0],R=this.r[1],N=this.r[2],M=this.r[3],L=this.r[4],F=this.r[5],D=this.r[6],U=this.r[7],z=this.r[8],q=this.r[9];n>=16;)i=255&e[t+0]|(255&e[t+1])<<8,S+=8191&i,o=255&e[t+2]|(255&e[t+3])<<8,E+=8191&(i>>>13|o<<3),s=255&e[t+4]|(255&e[t+5])<<8,x+=8191&(o>>>10|s<<6),a=255&e[t+6]|(255&e[t+7])<<8,C+=8191&(s>>>7|a<<9),u=255&e[t+8]|(255&e[t+9])<<8,A+=8191&(a>>>4|u<<12),I+=u>>>1&8191,l=255&e[t+10]|(255&e[t+11])<<8,T+=8191&(u>>>14|l<<2),c=255&e[t+12]|(255&e[t+13])<<8,j+=8191&(l>>>11|c<<5),f=255&e[t+14]|(255&e[t+15])<<8,O+=8191&(c>>>8|f<<8),P+=f>>>5|r,h=0,p=h,p+=S*B,p+=E*(5*q),p+=x*(5*z),p+=C*(5*U),p+=A*(5*D),h=p>>>13,p&=8191,p+=I*(5*F),p+=T*(5*L),p+=j*(5*M),p+=O*(5*N),p+=P*(5*R),h+=p>>>13,p&=8191,d=h,d+=S*R,d+=E*B,d+=x*(5*q),d+=C*(5*z),d+=A*(5*U),h=d>>>13,d&=8191,d+=I*(5*D),d+=T*(5*F),d+=j*(5*L),d+=O*(5*M),d+=P*(5*N),h+=d>>>13,d&=8191,m=h,m+=S*N,m+=E*R,m+=x*B,m+=C*(5*q),m+=A*(5*z),h=m>>>13,m&=8191,m+=I*(5*U),m+=T*(5*D),m+=j*(5*F),m+=O*(5*L),m+=P*(5*M),h+=m>>>13,m&=8191,g=h,g+=S*M,g+=E*N,g+=x*R,g+=C*B,g+=A*(5*q),h=g>>>13,g&=8191,g+=I*(5*z),g+=T*(5*U),g+=j*(5*D),g+=O*(5*F),g+=P*(5*L),h+=g>>>13,g&=8191,y=h,y+=S*L,y+=E*M,y+=x*N,y+=C*R,y+=A*B,h=y>>>13,y&=8191,y+=I*(5*q),y+=T*(5*z),y+=j*(5*U),y+=O*(5*D),y+=P*(5*F),h+=y>>>13,y&=8191,b=h,b+=S*F,b+=E*L,b+=x*M,b+=C*N,b+=A*R,h=b>>>13,b&=8191,b+=I*B,b+=T*(5*q),b+=j*(5*z),b+=O*(5*U),b+=P*(5*D),h+=b>>>13,b&=8191,v=h,v+=S*D,v+=E*F,v+=x*L,v+=C*M,v+=A*N,h=v>>>13,v&=8191,v+=I*R,v+=T*B,v+=j*(5*q),v+=O*(5*z),v+=P*(5*U),h+=v>>>13,v&=8191,w=h,w+=S*U,w+=E*D,w+=x*F,w+=C*L,w+=A*M,h=w>>>13,w&=8191,w+=I*N,w+=T*R,w+=j*B,w+=O*(5*q),w+=P*(5*z),h+=w>>>13,w&=8191,_=h,_+=S*z,_+=E*U,_+=x*D,_+=C*F,_+=A*L,h=_>>>13,_&=8191,_+=I*M,_+=T*N,_+=j*R,_+=O*B,_+=P*(5*q),h+=_>>>13,_&=8191,k=h,k+=S*q,k+=E*z,k+=x*U,k+=C*D,k+=A*F,h=k>>>13,k&=8191,k+=I*L,k+=T*M,k+=j*N,k+=O*R,k+=P*B,h+=k>>>13,k&=8191,h=(h<<2)+h|0,h=h+p|0,p=8191&h,h>>>=13,d+=h,S=p,E=d,x=m,C=g,A=y,I=b,T=v,j=w,O=_,P=k,t+=16,n-=16;this.h[0]=S,this.h[1]=E,this.h[2]=x,this.h[3]=C,this.h[4]=A,this.h[5]=I,this.h[6]=T,this.h[7]=j,this.h[8]=O,this.h[9]=P},A.prototype.finish=function(e,t){var n=new Uint16Array(10),r,i,o,s;if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=r,r=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,n[0]=this.h[0]+5,r=n[0]>>>13,n[0]&=8191,s=1;s<10;s++)n[s]=this.h[s]+r,r=n[s]>>>13,n[s]&=8191;for(n[9]-=8192,i=(1^r)-1,s=0;s<10;s++)n[s]&=i;for(i=~i,s=0;s<10;s++)this.h[s]=this.h[s]&i|n[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,s=1;s<8;s++)o=(this.h[s]+this.pad[s]|0)+(o>>>16)|0,this.h[s]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,n){var r,i;if(this.leftover){for(i=16-this.leftover,i>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var Y=j,J=O;function Z(e,t,n,r,i,o){var s=new Uint8Array(32);return G(s,i,o),Y(e,t,n,r,s)}function X(e,t,n,r,i,o){var s=new Uint8Array(32);return G(s,i,o),J(e,t,n,r,s)}var Q=[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 ee(e,t,n,r){for(var i=new Int32Array(16),o=new Int32Array(16),s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S,E,x,C,A,I,T,j,O,P=e[0],B=e[1],R=e[2],N=e[3],M=e[4],L=e[5],F=e[6],D=e[7],U=t[0],z=t[1],q=t[2],K=t[3],H=t[4],V=t[5],W=t[6],$=t[7],G=0;r>=128;){for(E=0;E<16;E++)x=8*E+G,i[E]=n[x+0]<<24|n[x+1]<<16|n[x+2]<<8|n[x+3],o[E]=n[x+4]<<24|n[x+5]<<16|n[x+6]<<8|n[x+7];for(E=0;E<80;E++)if(s=P,a=B,u=R,l=N,c=M,f=L,h=F,p=D,d=U,m=z,g=q,y=K,b=H,v=V,w=W,_=$,C=D,A=$,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=(M>>>14|H<<18)^(M>>>18|H<<14)^(H>>>9|M<<23),A=(H>>>14|M<<18)^(H>>>18|M<<14)^(M>>>9|H<<23),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=M&L^~M&F,A=H&V^~H&W,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=Q[2*E],A=Q[2*E+1],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=i[E%16],A=o[E%16],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,k=65535&j|O<<16,S=65535&I|T<<16,C=k,A=S,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=(P>>>28|U<<4)^(U>>>2|P<<30)^(U>>>7|P<<25),A=(U>>>28|P<<4)^(P>>>2|U<<30)^(P>>>7|U<<25),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,C=P&B^P&R^B&R,A=U&z^U&q^z&q,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,p=65535&j|O<<16,_=65535&I|T<<16,C=l,A=y,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=k,A=S,I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,l=65535&j|O<<16,y=65535&I|T<<16,B=s,R=a,N=u,M=l,L=c,F=f,D=h,P=p,z=d,q=m,K=g,H=y,V=b,W=v,$=w,U=_,E%16==15)for(x=0;x<16;x++)C=i[x],A=o[x],I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=i[(x+9)%16],A=o[(x+9)%16],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,k=i[(x+1)%16],S=o[(x+1)%16],C=(k>>>1|S<<31)^(k>>>8|S<<24)^k>>>7,A=(S>>>1|k<<31)^(S>>>8|k<<24)^(S>>>7|k<<25),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,k=i[(x+14)%16],S=o[(x+14)%16],C=(k>>>19|S<<13)^(S>>>29|k<<3)^k>>>6,A=(S>>>19|k<<13)^(k>>>29|S<<3)^(S>>>6|k<<26),I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,i[x]=65535&j|O<<16,o[x]=65535&I|T<<16;C=P,A=U,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[0],A=t[0],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[0]=P=65535&j|O<<16,t[0]=U=65535&I|T<<16,C=B,A=z,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[1],A=t[1],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[1]=B=65535&j|O<<16,t[1]=z=65535&I|T<<16,C=R,A=q,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[2],A=t[2],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[2]=R=65535&j|O<<16,t[2]=q=65535&I|T<<16,C=N,A=K,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[3],A=t[3],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[3]=N=65535&j|O<<16,t[3]=K=65535&I|T<<16,C=M,A=H,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[4],A=t[4],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[4]=M=65535&j|O<<16,t[4]=H=65535&I|T<<16,C=L,A=V,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[5],A=t[5],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[5]=L=65535&j|O<<16,t[5]=V=65535&I|T<<16,C=F,A=W,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[6],A=t[6],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[6]=F=65535&j|O<<16,t[6]=W=65535&I|T<<16,C=D,A=$,I=65535&A,T=A>>>16,j=65535&C,O=C>>>16,C=e[7],A=t[7],I+=65535&A,T+=A>>>16,j+=65535&C,O+=C>>>16,T+=I>>>16,j+=T>>>16,O+=j>>>16,e[7]=D=65535&j|O<<16,t[7]=$=65535&I|T<<16,G+=128,r-=128}return r}function te(e,t,n){var r=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),s,a=n;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,ee(r,i,t,n),n%=128,s=0;s<n;s++)o[s]=t[a-n+s];for(o[n]=128,n=256-128*(n<112?1:0),o[n-9]=0,d(o,n-8,a/536870912|0,a<<3),ee(r,i,o,n),s=0;s<8;s++)d(e,8*s,r[s],i[s]);return 0}function ne(e,n){var r=t(),i=t(),o=t(),s=t(),a=t(),u=t(),l=t(),f=t(),h=t();U(r,e[1],e[0]),U(h,n[1],n[0]),z(r,r,h),D(i,e[0],e[1]),D(h,n[0],n[1]),z(i,i,h),z(o,e[3],n[3]),z(o,o,c),z(s,e[2],n[2]),D(s,s,s),U(a,i,r),U(u,s,o),D(l,s,o),D(f,i,r),z(e[0],a,u),z(e[1],f,l),z(e[2],l,u),z(e[3],a,f)}function re(e,t,n){var r;for(r=0;r<4;r++)R(e[r],t[r],n)}function ie(e,n){var r=t(),i=t(),o=t();K(o,n[2]),z(r,n[0],o),z(i,n[1],o),N(e,i),e[31]^=L(r)<<7}function oe(e,t,n){var r,i;for(P(e[0],s),P(e[1],a),P(e[2],a),P(e[3],s),i=255;i>=0;--i)r=n[i/8|0]>>(7&i)&1,re(e,t,r),ne(t,e),ne(e,e),re(e,t,r)}function se(e,n){var r=[t(),t(),t(),t()];P(r[0],f),P(r[1],h),P(r[2],a),z(r[3],f,h),oe(e,r,n)}function ae(e,n,i){var o=new Uint8Array(64),s=[t(),t(),t(),t()],a;for(i||r(n,32),te(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,se(s,o),ie(e,s),a=0;a<32;a++)n[a+32]=e[a];return 0}var ue=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function le(e,t){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)t[i]+=n-16*t[r]*ue[i-(r-32)],n=t[i]+128>>8,t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ue[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ue[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ce(e){var t=new Float64Array(64),n;for(n=0;n<64;n++)t[n]=e[n];for(n=0;n<64;n++)e[n]=0;le(e,t)}function fe(e,n,r,i){var o=new Uint8Array(64),s=new Uint8Array(64),a=new Uint8Array(64),u,l,c=new Float64Array(64),f=[t(),t(),t(),t()];te(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var h=r+64;for(u=0;u<r;u++)e[64+u]=n[u];for(u=0;u<32;u++)e[32+u]=o[32+u];for(te(a,e.subarray(32),r+32),ce(a),se(f,a),ie(e,f),u=32;u<64;u++)e[u]=i[u];for(te(s,e,r+64),ce(s),u=0;u<64;u++)c[u]=0;for(u=0;u<32;u++)c[u]=a[u];for(u=0;u<32;u++)for(l=0;l<32;l++)c[u+l]+=s[u]*o[l];return le(e.subarray(32),c),h}function he(e,n){var r=t(),i=t(),o=t(),u=t(),c=t(),f=t(),h=t();return P(e[2],a),F(e[1],n),q(o,e[1]),z(u,o,l),U(o,o,e[2]),D(u,e[2],u),q(c,u),q(f,c),z(h,f,c),z(r,h,o),z(r,r,u),H(r,r),z(r,r,o),z(r,r,u),z(r,r,u),z(e[0],r,u),q(i,e[0]),z(i,i,u),M(i,o)&&z(e[0],e[0],p),q(i,e[0]),z(i,i,u),M(i,o)?-1:(L(e[0])===n[31]>>7&&U(e[0],s,e[0]),z(e[3],e[0],e[1]),0)}function pe(e,n,r,i){var o,s,a=new Uint8Array(32),u=new Uint8Array(64),l=[t(),t(),t(),t()],c=[t(),t(),t(),t()];if(s=-1,r<64)return-1;if(he(c,i))return-1;for(o=0;o<r;o++)e[o]=n[o];for(o=0;o<32;o++)e[o+32]=i[o];if(te(u,e,r),ce(u),oe(l,c,u),se(c,n.subarray(32)),ne(l,c),ie(a,l),r-=64,y(n,0,a,0)){for(o=0;o<r;o++)e[o]=0;return-1}for(o=0;o<r;o++)e[o]=n[o+64];return s=r,s}var de=32,me=24,ge=32,ye=16,be=32,ve=32,we=32,_e=32,ke=32,Se=me,Ee=32,xe=16,Ce=64,Ae=32,Ie=64,Te=32,je=64;function Oe(e,t){if(e.length!==de)throw new Error("bad key size");if(t.length!==me)throw new Error("bad nonce size")}function Pe(e,t){if(e.length!==we)throw new Error("bad public key size");if(t.length!==_e)throw new Error("bad secret key size")}function Be(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Re(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:_,crypto_stream_xor:C,crypto_stream:x,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:E,crypto_onetimeauth:I,crypto_onetimeauth_verify:T,crypto_verify_16:g,crypto_verify_32:y,crypto_secretbox:j,crypto_secretbox_open:O,crypto_scalarmult:V,crypto_scalarmult_base:W,crypto_box_beforenm:G,crypto_box_afternm:Y,crypto_box:Z,crypto_box_open:X,crypto_box_keypair:$,crypto_hash:te,crypto_sign:fe,crypto_sign_keypair:ae,crypto_sign_open:pe,crypto_secretbox_KEYBYTES:de,crypto_secretbox_NONCEBYTES:me,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:we,crypto_box_SECRETKEYBYTES:_e,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:Se,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){Be(e,t,n),Oe(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),o=0;o<e.length;o++)r[o+32]=e[o];return j(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){Be(e,t,n),Oe(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),o=0;o<e.length;o++)r[o+16]=e[o];return r.length<32?null:0!==O(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=de,e.secretbox.nonceLength=me,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(Be(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return V(n,e,t),n},e.scalarMult.base=function(e){if(Be(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return W(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var o=e.box.before(r,i);return e.secretbox(t,n,o)},e.box.before=function(e,t){Be(e,t),Pe(e,t);var n=new Uint8Array(32);return G(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var o=e.box.before(r,i);return e.secretbox.open(t,n,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(we),t=new Uint8Array(_e);return $(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(Be(e),e.length!==_e)throw new Error("bad secret key size");var t=new Uint8Array(we);return W(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=we,e.box.secretKeyLength=_e,e.box.sharedKeyLength=32,e.box.nonceLength=Se,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(Be(e,t),64!==t.length)throw new Error("bad secret key size");var n=new Uint8Array(64+e.length);return fe(n,e,e.length,t),n},e.sign.open=function(e,t){if(Be(e,t),32!==t.length)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=pe(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached.verify=function(e,t,n){if(Be(e,t,n),64!==t.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");var r=new Uint8Array(64+e.length),i=new Uint8Array(64+e.length),o;for(o=0;o<64;o++)r[o]=t[o];for(o=0;o<e.length;o++)r[o+64]=e[o];return pe(i,r,r.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ae(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(Be(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(Be(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),n=new Uint8Array(64),r=0;r<32;r++)n[r]=e[r];return ae(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){Be(e);var t=new Uint8Array(64);return te(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return Be(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===m(e,0,t,0,e.length))},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var r=65536;e.setPRNG(function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];Re(i)})}else t=n(916),t&&t.randomBytes&&e.setPRNG(function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];Re(i)})}()}(e.exports?e.exports:self.nacl=self.nacl||{})},function(e,t){},function(e,t,n){"use strict";const r=n(76),i=n(58);e.exports=((e,t,o)=>{o=o||n(918)(t);class s{constructor(e){o.validatePublicKey(e),this._key=e}verify(e,t,n){f(n),o.hashAndVerify(this._key,t,e,n)}marshal(){return o.compressPublicKey(this._key)}get bytes(){return e.PublicKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),i(this.bytes,"sha2-256",e)}}class a{constructor(e,t){this._key=e,this._publicKey=t||o.computePublicKey(e),o.validatePrivateKey(this._key),o.validatePublicKey(this._publicKey)}sign(e,t){f(t),o.hashAndSign(this._key,e,t)}get public(){return new s(this._publicKey)}marshal(){return this._key}get bytes(){return e.PrivateKey.encode({Type:e.KeyType.Secp256k1,Data:this.marshal()})}equals(e){return this.bytes.equals(e.bytes)}hash(e){f(e),i(this.bytes,"sha2-256",e)}id(e){this.public.hash((t,n)=>{if(t)return e(t);e(null,r.encode(n))})}}function u(e,t){t(null,new a(e),null)}function l(e){return new s(e)}function c(e,t){void 0===t&&"function"==typeof e&&(t=e),f(t),o.generateKey((e,n)=>{if(e)return t(e);let r;try{r=new a(n)}catch(e){return t(e)}t(null,r)})}function f(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:s,Secp256k1PrivateKey:a,unmarshalSecp256k1PrivateKey:u,unmarshalSecp256k1PublicKey:l,generateKeyPair:c}})},function(e,t,n){"use strict";const r=n(919),i=n(58),o=n(14),s="sha2-256";e.exports=(e=>{const t=32;function n(t){const n=(e,n)=>o(()=>t(e,n));let i;do{i=e(32)}while(!r.privateKeyVerify(i));n(null,i)}function a(e,t,n){const a=(e,t)=>o(()=>n(e,t));i.digest(t,s,(t,n)=>{if(t)return a(t);try{const i=r.sign(n,e),o=r.signatureExport(i.signature);return a(null,o)}catch(t){a(t)}})}function u(e,t,n,a){const u=(e,t)=>o(()=>a(e,t));i.digest(n,s,(n,i)=>{if(n)return u(n);try{t=r.signatureImport(t);const o=r.verify(i,t,e);return u(null,o)}catch(n){u(n)}})}function l(e){if(!r.publicKeyVerify(e))throw new Error("Invalid public key");return r.publicKeyConvert(e,!0)}function c(e){return r.publicKeyConvert(e,!1)}function f(e){if(!r.privateKeyVerify(e))throw new Error("Invalid private key")}function h(e){if(!r.publicKeyVerify(e))throw new Error("Invalid public key")}function p(e){return f(e),r.publicKeyCreate(e)}return{generateKey:n,privateKeyLength:32,hashAndSign:a,hashAndVerify:u,compressPublicKey:l,decompressPublicKey:c,validatePrivateKey:f,validatePublicKey:h,computePublicKey:p}})},function(e,t,n){"use strict";e.exports=n(467)(n(922))},function(e,t,n){"use strict";(function(e){var n=Object.prototype.toString;t.isArray=function(e,t){if(!Array.isArray(e))throw TypeError(t)},t.isBoolean=function(e,t){if("[object Boolean]"!==n.call(e))throw TypeError(t)},t.isBuffer=function(t,n){if(!e.isBuffer(t))throw TypeError(n)},t.isFunction=function(e,t){if("[object Function]"!==n.call(e))throw TypeError(t)},t.isNumber=function(e,t){if("[object Number]"!==n.call(e))throw TypeError(t)},t.isObject=function(e,t){if("[object Object]"!==n.call(e))throw TypeError(t)},t.isBufferLength=function(e,t,n){if(e.length!==t)throw RangeError(n)},t.isBufferLength2=function(e,t,n,r){if(e.length!==t&&e.length!==n)throw RangeError(r)},t.isLengthGTZero=function(e,t){if(0===e.length)throw RangeError(t)},t.isNumberInInterval=function(e,t,n,r){if(e<=t||e>=n)throw RangeError(r)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(316),o=r.from([48,129,211,2,1,1,4,32,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,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,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,0,0,0,0,0,0,0]),s=r.from([48,130,1,19,2,1,1,4,32,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,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,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,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,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(e,t,n){var i=r.from(n?o:s);return e.copy(i,n?8:9),t.copy(i,n?181:214),i},t.privateKeyImport=function(e){var t=e.length,n=0;if(!(t<n+1||48!==e[n])&&(n+=1,!(t<n+1)&&128&e[n])){var r=127&e[n];if(n+=1,!(r<1||r>2||t<n+r)){var i=e[n+r-1]|(r>1?e[n+r-2]<<8:0);if(n+=r,!(t<n+i||t<n+3||2!==e[n]||1!==e[n+1]||1!==e[n+2]||(n+=3,t<n+2||4!==e[n]||e[n+1]>32||t<n+2+e[n+1])))return e.slice(n+2,n+2+e[n+1])}}},t.signatureExport=function(e){for(var t=r.concat([r.from([0]),e.r]),n=33,o=0;n>1&&0===t[o]&&!(128&t[o+1]);--n,++o);for(var s=r.concat([r.from([0]),e.s]),a=33,u=0;a>1&&0===s[u]&&!(128&s[u+1]);--a,++u);return i.encode(t.slice(o),s.slice(u))},t.signatureImport=function(e){var t=r.alloc(32,0),n=r.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(n,32-o.s.length),{r:t,s:n}},t.signatureImportLax=function(e){var t=r.alloc(32,0),n=r.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var s=e[o++];if(!(128&s&&(o+=s-128,o>i))&&2===e[o++]){var a=e[o++];if(128&a){if(s=a-128,o+s>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+e[o]}if(!(a>i-o)){var u=o;if(o+=a,2===e[o++]){var l=e[o++];if(128&l){if(s=l-128,o+s>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(l=0;s>0;o+=1,s-=1)l=(l<<8)+e[o]}if(!(l>i-o)){var c=o;for(o+=l;a>0&&0===e[u];a-=1,u+=1);if(!(a>32)){var f=e.slice(u,u+a);for(f.copy(t,32-f.length);l>0&&0===e[c];l-=1,c+=1);if(!(l>32)){var h=e.slice(c,c+l);return h.copy(n,32-h.length),{r:t,s:n}}}}}}}}}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(143),o=n(927),s=n(317),a=n(238),u=n(473),l=n(932);t.privateKeyVerify=function(e){var t=a.fromBuffer(e);return!(t.isOverflow()||t.isZero())},t.privateKeyExport=function(e,t){var n=a.fromBuffer(e);if(n.isOverflow()||n.isZero())throw new Error(s.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return l.mul(n).toPublicKey(t)},t.privateKeyNegate=function(e){var t=a.fromBuffer(e);return t.isZero()?r.alloc(32):(t.ucmp(a.n)>0&&t.isub(a.n),a.n.sub(t).toBuffer())},t.privateKeyModInverse=function(e){var t=a.fromBuffer(e);if(t.isOverflow()||t.isZero())throw new Error(s.EC_PRIVATE_KEY_RANGE_INVALID);return t.uinvm().toBuffer()},t.privateKeyTweakAdd=function(e,t){var n=a.fromBuffer(t);if(n.isOverflow())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(n.iadd(a.fromBuffer(e)),n.isOverflow()&&n.isub(a.n),n.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return n.toBuffer()},t.privateKeyTweakMul=function(e,t){var n=a.fromBuffer(t);if(n.isOverflow()||n.isZero())throw new Error(s.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);var r=a.fromBuffer(e);return n.umul(r).ureduce().toBuffer()},t.publicKeyCreate=function(e,t){var n=a.fromBuffer(e);if(n.isOverflow()||n.isZero())throw new Error(s.EC_PUBLIC_KEY_CREATE_FAIL);return l.mul(n).toPublicKey(t)},t.publicKeyConvert=function(e,t){var n=u.fromPublicKey(e);if(null===n)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);return n.toPublicKey(t)},t.publicKeyVerify=function(e){return null!==u.fromPublicKey(e)},t.publicKeyTweakAdd=function(e,t,n){var r=u.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if(t=a.fromBuffer(t),t.isOverflow())throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var i=l.mul(t).add(r);if(i.inf)throw new Error(s.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return i.toPublicKey(n)},t.publicKeyTweakMul=function(e,t,n){var r=u.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);if(t=a.fromBuffer(t),t.isOverflow()||t.isZero())throw new Error(s.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return r.mul(t).toPublicKey(n)},t.publicKeyCombine=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;++r)if(n[r]=u.fromPublicKey(e[r]),null===n[r])throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);for(var i=n[0],o=1;o<n.length;++o)i=i.add(n[o]);if(i.inf)throw new Error(s.EC_PUBLIC_KEY_COMBINE_FAIL);return i.toPublicKey(t)},t.signatureNormalize=function(e){var t=a.fromBuffer(e.slice(0,32)),n=a.fromBuffer(e.slice(32,64));if(t.isOverflow()||n.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);var i=r.from(e);return n.isHigh()&&a.n.sub(n).toBuffer().copy(i,32),i},t.signatureExport=function(e){var t=e.slice(0,32),n=e.slice(32,64);if(a.fromBuffer(t).isOverflow()||a.fromBuffer(n).isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:n}},t.signatureImport=function(e){var t=a.fromBuffer(e.r);t.isOverflow()&&(t=a.fromNumber(0));var n=a.fromBuffer(e.s);return n.isOverflow()&&(n=a.fromNumber(0)),r.concat([t.toBuffer(),n.toBuffer()])},t.sign=function(e,t,n,i){var u=a.fromBuffer(t);if(u.isOverflow()||u.isZero())throw new Error(s.ECDSA_SIGN_FAIL);if(null===n){var c=new o("sha256",t,e,i);n=function(){return c.generate(32)}}for(var f=a.fromBuffer(e),h=0;;++h){var p=n(e,t,null,i,h);if(!r.isBuffer(p)||32!==p.length)throw new Error(s.ECDSA_SIGN_FAIL);var d=a.fromBuffer(p);if(!d.isOverflow()&&!d.isZero()){var m=l.mul(d),g=m.x.fireduce();if(!g.isZero()){var y=d.uinvm().umul(g.umul(u).ureduce().iadd(f).fireduce()).ureduce();if(!y.isZero()){var b=(0!==m.x.ucmp(g)?2:0)|(m.y.isOdd()?1:0);return y.isHigh()&&(y=a.n.sub(y),b^=1),{signature:r.concat([g.toBuffer(),y.toBuffer()]),recovery:b}}}}}},t.verify=function(e,t,n){var r=a.fromBuffer(t.slice(0,32)),i=a.fromBuffer(t.slice(32,64));if(r.isOverflow()||i.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);if(i.isHigh()||r.isZero()||i.isZero())return!1;var o=u.fromPublicKey(n);if(null===o)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var c=i.uinvm(),f=c.umul(a.fromBuffer(e)).ureduce(),h=c.umul(r).ureduce(),p=l.mulAdd(f,o,h);if(p.inf)return!1;var d=p.z.redSqr();return 0===r.redMul(d).ucmp(p.x)||!(r.ucmp(a.psn)>=0)&&0===r.iadd(a.psn).redMul(d).ucmp(p.x)},t.recover=function(e,t,n,i){var o=a.fromBuffer(t.slice(0,32)),c=a.fromBuffer(t.slice(32,64));if(o.isOverflow()||c.isOverflow())throw new Error(s.ECDSA_SIGNATURE_PARSE_FAIL);do{if(o.isZero()||c.isZero())break;var f=o;if(n>>1){if(f.ucmp(a.psn)>=0)break;f=o.add(a.n)}var h=r.concat([r.from([2+(1&n)]),f.toBuffer()]),p=u.fromPublicKey(h);if(null===p)break;var d=o.uinvm(),m=a.n.sub(a.fromBuffer(e)).umul(d).ureduce(),g=c.umul(d).ureduce(),y=u.fromECJPoint(l.mulAdd(m,p,g));return y.toPublicKey(i)}while(0);throw new Error(s.ECDSA_RECOVER_FAIL)},t.ecdh=function(e,n){var r=t.ecdhUnsafe(e,n,!0);return i("sha256").update(r).digest()},t.ecdhUnsafe=function(e,t,n){var r=u.fromPublicKey(e);if(null===r)throw new Error(s.EC_PUBLIC_KEY_PARSE_FAIL);var i=a.fromBuffer(t);if(i.isOverflow()||i.isZero())throw new Error(s.ECDH_FAIL);return r.mul(i).toPublicKey(n)}},function(e,t,n){var r=n(1),i=n(144),o=n(4).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var h=0;h<80;++h){var p=~~(h/20),d=l(n)+f(p,r,i,o)+a+t[h]+s[p]|0;a=o,o=i,i=c(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,n){var r=n(1),i=n(144),o=n(4).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function l(e){return e<<1|e>>>31}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=l(t[u-3]^t[u-8]^t[u-14]^t[u-16]);for(var p=0;p<80;++p){var d=~~(p/20),m=c(n)+h(d,r,i,o)+a+t[p]+s[d]|0;a=o,o=i,i=f(r),r=n,n=m}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,n){var r=n(1),i=n(471),o=n(144),s=n(4).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}r(u,i),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,n){var r=n(1),i=n(472),o=n(144),s=n(4).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}r(u,i),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t,n){"use strict";(function(t){var r=n(319),i=n(930),o=new t(0),s=new t([0]),a=new t([1]);function u(e,t,n,r){var o=i[e];if(void 0===o)throw new Error("hash "+e+" is not supported");this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,n,r)}u.prototype._update=function(e){var t=r(this._algo,this._K).update(this._V).update(s);e&&t.update(e),this._K=t.digest(),this._V=r(this._algo,this._K).update(this._V).digest(),e&&(this._K=r(this._algo,this._K).update(this._V).update(a).update(e).digest(),this._V=r(this._algo,this._K).update(this._V).digest())},u.prototype._init=function(e,n,r){if(e.length<this._securityStrength)throw new Error("Not enough entropy");this._K=new t(this._outlen),this._V=new t(this._outlen);for(var i=0;i<this._K.length;++i)this._K[i]=0,this._V[i]=1;this._update(t.concat([e,n,r||o])),this._reseed=1},u.prototype.reseed=function(e,n){if(e.length<this._securityStrength)throw new Error("Not enough entropy");this._update(t.concat([e,n||o])),this._reseed=1},u.prototype.generate=function(e,n){if(this._reseed>this._reseedInterval)throw new Error("Reseed is required");n&&0===n.length&&(n=void 0),n&&this._update(n);for(var i=new t(0);i.length<e;)this._V=r(this._algo,this._K).update(this._V).digest(),i=t.concat([i,this._V]);return this._update(n),this._reseed+=1,i.slice(0,e)},e.exports=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(1),i=n(4).Buffer,o=n(119),s=i.alloc(128),a=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=i.concat([t,s],a));for(var n=this._ipad=i.allocUnsafe(a),r=this._opad=i.allocUnsafe(a),u=0;u<a;u++)n[u]=54^t[u],r[u]=92^t[u];this._hash=[n]}r(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},function(e,t,n){var r=n(318);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports={sha1:{securityStrength:128,outlen:160,seedlen:440},sha224:{securityStrength:192,outlen:224,seedlen:440},sha256:{securityStrength:256,outlen:256,seedlen:440},sha384:{securityStrength:256,outlen:384,seedlen:888},sha512:{securityStrength:256,outlen:512,seedlen:888}}},function(e,t,n){"use strict";t.umulTo10x10=function(e,t,n){var r=e.words,i=t.words,o=n.words,s=0,a,u,l,c=0|r[0],f=8191&c,h=c>>>13,p=0|r[1],d=8191&p,m=p>>>13,g=0|r[2],y=8191&g,b=g>>>13,v=0|r[3],w=8191&v,_=v>>>13,k=0|r[4],S=8191&k,E=k>>>13,x=0|r[5],C=8191&x,A=x>>>13,I=0|r[6],T=8191&I,j=I>>>13,O=0|r[7],P=8191&O,B=O>>>13,R=0|r[8],N=8191&R,M=R>>>13,L=0|r[9],F=8191&L,D=L>>>13,U=0|i[0],z=8191&U,q=U>>>13,K=0|i[1],H=8191&K,V=K>>>13,W=0|i[2],$=8191&W,G=W>>>13,Y=0|i[3],J=8191&Y,Z=Y>>>13,X=0|i[4],Q=8191&X,ee=X>>>13,te=0|i[5],ne=8191&te,re=te>>>13,ie=0|i[6],oe=8191&ie,se=ie>>>13,ae=0|i[7],ue=8191&ae,le=ae>>>13,ce=0|i[8],fe=8191&ce,he=ce>>>13,pe=0|i[9],de=8191&pe,me=pe>>>13;n.length=19,a=Math.imul(f,z),u=Math.imul(f,q),u+=Math.imul(h,z),l=Math.imul(h,q);var ge=s+a+((8191&u)<<13);s=l+(u>>>13)+(ge>>>26),ge&=67108863,a=Math.imul(d,z),u=Math.imul(d,q),u+=Math.imul(m,z),l=Math.imul(m,q),a+=Math.imul(f,H),u+=Math.imul(f,V),u+=Math.imul(h,H),l+=Math.imul(h,V);var ye=s+a+((8191&u)<<13);s=l+(u>>>13)+(ye>>>26),ye&=67108863,a=Math.imul(y,z),u=Math.imul(y,q),u+=Math.imul(b,z),l=Math.imul(b,q),a+=Math.imul(d,H),u+=Math.imul(d,V),u+=Math.imul(m,H),l+=Math.imul(m,V),a+=Math.imul(f,$),u+=Math.imul(f,G),u+=Math.imul(h,$),l+=Math.imul(h,G);var be=s+a+((8191&u)<<13);s=l+(u>>>13)+(be>>>26),be&=67108863,a=Math.imul(w,z),u=Math.imul(w,q),u+=Math.imul(_,z),l=Math.imul(_,q),a+=Math.imul(y,H),u+=Math.imul(y,V),u+=Math.imul(b,H),l+=Math.imul(b,V),a+=Math.imul(d,$),u+=Math.imul(d,G),u+=Math.imul(m,$),l+=Math.imul(m,G),a+=Math.imul(f,J),u+=Math.imul(f,Z),u+=Math.imul(h,J),l+=Math.imul(h,Z);var ve=s+a+((8191&u)<<13);s=l+(u>>>13)+(ve>>>26),ve&=67108863,a=Math.imul(S,z),u=Math.imul(S,q),u+=Math.imul(E,z),l=Math.imul(E,q),a+=Math.imul(w,H),u+=Math.imul(w,V),u+=Math.imul(_,H),l+=Math.imul(_,V),a+=Math.imul(y,$),u+=Math.imul(y,G),u+=Math.imul(b,$),l+=Math.imul(b,G),a+=Math.imul(d,J),u+=Math.imul(d,Z),u+=Math.imul(m,J),l+=Math.imul(m,Z),a+=Math.imul(f,Q),u+=Math.imul(f,ee),u+=Math.imul(h,Q),l+=Math.imul(h,ee);var we=s+a+((8191&u)<<13);s=l+(u>>>13)+(we>>>26),we&=67108863,a=Math.imul(C,z),u=Math.imul(C,q),u+=Math.imul(A,z),l=Math.imul(A,q),a+=Math.imul(S,H),u+=Math.imul(S,V),u+=Math.imul(E,H),l+=Math.imul(E,V),a+=Math.imul(w,$),u+=Math.imul(w,G),u+=Math.imul(_,$),l+=Math.imul(_,G),a+=Math.imul(y,J),u+=Math.imul(y,Z),u+=Math.imul(b,J),l+=Math.imul(b,Z),a+=Math.imul(d,Q),u+=Math.imul(d,ee),u+=Math.imul(m,Q),l+=Math.imul(m,ee),a+=Math.imul(f,ne),u+=Math.imul(f,re),u+=Math.imul(h,ne),l+=Math.imul(h,re);var _e=s+a+((8191&u)<<13);s=l+(u>>>13)+(_e>>>26),_e&=67108863,a=Math.imul(T,z),u=Math.imul(T,q),u+=Math.imul(j,z),l=Math.imul(j,q),a+=Math.imul(C,H),u+=Math.imul(C,V),u+=Math.imul(A,H),l+=Math.imul(A,V),a+=Math.imul(S,$),u+=Math.imul(S,G),u+=Math.imul(E,$),l+=Math.imul(E,G),a+=Math.imul(w,J),u+=Math.imul(w,Z),u+=Math.imul(_,J),l+=Math.imul(_,Z),a+=Math.imul(y,Q),u+=Math.imul(y,ee),u+=Math.imul(b,Q),l+=Math.imul(b,ee),a+=Math.imul(d,ne),u+=Math.imul(d,re),u+=Math.imul(m,ne),l+=Math.imul(m,re),a+=Math.imul(f,oe),u+=Math.imul(f,se),u+=Math.imul(h,oe),l+=Math.imul(h,se);var ke=s+a+((8191&u)<<13);s=l+(u>>>13)+(ke>>>26),ke&=67108863,a=Math.imul(P,z),u=Math.imul(P,q),u+=Math.imul(B,z),l=Math.imul(B,q),a+=Math.imul(T,H),u+=Math.imul(T,V),u+=Math.imul(j,H),l+=Math.imul(j,V),a+=Math.imul(C,$),u+=Math.imul(C,G),u+=Math.imul(A,$),l+=Math.imul(A,G),a+=Math.imul(S,J),u+=Math.imul(S,Z),u+=Math.imul(E,J),l+=Math.imul(E,Z),a+=Math.imul(w,Q),u+=Math.imul(w,ee),u+=Math.imul(_,Q),l+=Math.imul(_,ee),a+=Math.imul(y,ne),u+=Math.imul(y,re),u+=Math.imul(b,ne),l+=Math.imul(b,re),a+=Math.imul(d,oe),u+=Math.imul(d,se),u+=Math.imul(m,oe),l+=Math.imul(m,se),a+=Math.imul(f,ue),u+=Math.imul(f,le),u+=Math.imul(h,ue),l+=Math.imul(h,le);var Se=s+a+((8191&u)<<13);s=l+(u>>>13)+(Se>>>26),Se&=67108863,a=Math.imul(N,z),u=Math.imul(N,q),u+=Math.imul(M,z),l=Math.imul(M,q),a+=Math.imul(P,H),u+=Math.imul(P,V),u+=Math.imul(B,H),l+=Math.imul(B,V),a+=Math.imul(T,$),u+=Math.imul(T,G),u+=Math.imul(j,$),l+=Math.imul(j,G),a+=Math.imul(C,J),u+=Math.imul(C,Z),u+=Math.imul(A,J),l+=Math.imul(A,Z),a+=Math.imul(S,Q),u+=Math.imul(S,ee),u+=Math.imul(E,Q),l+=Math.imul(E,ee),a+=Math.imul(w,ne),u+=Math.imul(w,re),u+=Math.imul(_,ne),l+=Math.imul(_,re),a+=Math.imul(y,oe),u+=Math.imul(y,se),u+=Math.imul(b,oe),l+=Math.imul(b,se),a+=Math.imul(d,ue),u+=Math.imul(d,le),u+=Math.imul(m,ue),l+=Math.imul(m,le),a+=Math.imul(f,fe),u+=Math.imul(f,he),u+=Math.imul(h,fe),l+=Math.imul(h,he);var Ee=s+a+((8191&u)<<13);s=l+(u>>>13)+(Ee>>>26),Ee&=67108863,a=Math.imul(F,z),u=Math.imul(F,q),u+=Math.imul(D,z),l=Math.imul(D,q),a+=Math.imul(N,H),u+=Math.imul(N,V),u+=Math.imul(M,H),l+=Math.imul(M,V),a+=Math.imul(P,$),u+=Math.imul(P,G),u+=Math.imul(B,$),l+=Math.imul(B,G),a+=Math.imul(T,J),u+=Math.imul(T,Z),u+=Math.imul(j,J),l+=Math.imul(j,Z),a+=Math.imul(C,Q),u+=Math.imul(C,ee),u+=Math.imul(A,Q),l+=Math.imul(A,ee),a+=Math.imul(S,ne),u+=Math.imul(S,re),u+=Math.imul(E,ne),l+=Math.imul(E,re),a+=Math.imul(w,oe),u+=Math.imul(w,se),u+=Math.imul(_,oe),l+=Math.imul(_,se),a+=Math.imul(y,ue),u+=Math.imul(y,le),u+=Math.imul(b,ue),l+=Math.imul(b,le),a+=Math.imul(d,fe),u+=Math.imul(d,he),u+=Math.imul(m,fe),l+=Math.imul(m,he),a+=Math.imul(f,de),u+=Math.imul(f,me),u+=Math.imul(h,de),l+=Math.imul(h,me);var xe=s+a+((8191&u)<<13);s=l+(u>>>13)+(xe>>>26),xe&=67108863,a=Math.imul(F,H),u=Math.imul(F,V),u+=Math.imul(D,H),l=Math.imul(D,V),a+=Math.imul(N,$),u+=Math.imul(N,G),u+=Math.imul(M,$),l+=Math.imul(M,G),a+=Math.imul(P,J),u+=Math.imul(P,Z),u+=Math.imul(B,J),l+=Math.imul(B,Z),a+=Math.imul(T,Q),u+=Math.imul(T,ee),u+=Math.imul(j,Q),l+=Math.imul(j,ee),a+=Math.imul(C,ne),u+=Math.imul(C,re),u+=Math.imul(A,ne),l+=Math.imul(A,re),a+=Math.imul(S,oe),u+=Math.imul(S,se),u+=Math.imul(E,oe),l+=Math.imul(E,se),a+=Math.imul(w,ue),u+=Math.imul(w,le),u+=Math.imul(_,ue),l+=Math.imul(_,le),a+=Math.imul(y,fe),u+=Math.imul(y,he),u+=Math.imul(b,fe),l+=Math.imul(b,he),a+=Math.imul(d,de),u+=Math.imul(d,me),u+=Math.imul(m,de),l+=Math.imul(m,me);var Ce=s+a+((8191&u)<<13);s=l+(u>>>13)+(Ce>>>26),Ce&=67108863,a=Math.imul(F,$),u=Math.imul(F,G),u+=Math.imul(D,$),l=Math.imul(D,G),a+=Math.imul(N,J),u+=Math.imul(N,Z),u+=Math.imul(M,J),l+=Math.imul(M,Z),a+=Math.imul(P,Q),u+=Math.imul(P,ee),u+=Math.imul(B,Q),l+=Math.imul(B,ee),a+=Math.imul(T,ne),u+=Math.imul(T,re),u+=Math.imul(j,ne),l+=Math.imul(j,re),a+=Math.imul(C,oe),u+=Math.imul(C,se),u+=Math.imul(A,oe),l+=Math.imul(A,se),a+=Math.imul(S,ue),u+=Math.imul(S,le),u+=Math.imul(E,ue),l+=Math.imul(E,le),a+=Math.imul(w,fe),u+=Math.imul(w,he),u+=Math.imul(_,fe),l+=Math.imul(_,he),a+=Math.imul(y,de),u+=Math.imul(y,me),u+=Math.imul(b,de),l+=Math.imul(b,me);var Ae=s+a+((8191&u)<<13);s=l+(u>>>13)+(Ae>>>26),Ae&=67108863,a=Math.imul(F,J),u=Math.imul(F,Z),u+=Math.imul(D,J),l=Math.imul(D,Z),a+=Math.imul(N,Q),u+=Math.imul(N,ee),u+=Math.imul(M,Q),l+=Math.imul(M,ee),a+=Math.imul(P,ne),u+=Math.imul(P,re),u+=Math.imul(B,ne),l+=Math.imul(B,re),a+=Math.imul(T,oe),u+=Math.imul(T,se),u+=Math.imul(j,oe),l+=Math.imul(j,se),a+=Math.imul(C,ue),u+=Math.imul(C,le),u+=Math.imul(A,ue),l+=Math.imul(A,le),a+=Math.imul(S,fe),u+=Math.imul(S,he),u+=Math.imul(E,fe),l+=Math.imul(E,he),a+=Math.imul(w,de),u+=Math.imul(w,me),u+=Math.imul(_,de),l+=Math.imul(_,me);var Ie=s+a+((8191&u)<<13);s=l+(u>>>13)+(Ie>>>26),Ie&=67108863,a=Math.imul(F,Q),u=Math.imul(F,ee),u+=Math.imul(D,Q),l=Math.imul(D,ee),a+=Math.imul(N,ne),u+=Math.imul(N,re),u+=Math.imul(M,ne),l+=Math.imul(M,re),a+=Math.imul(P,oe),u+=Math.imul(P,se),u+=Math.imul(B,oe),l+=Math.imul(B,se),a+=Math.imul(T,ue),u+=Math.imul(T,le),u+=Math.imul(j,ue),l+=Math.imul(j,le),a+=Math.imul(C,fe),u+=Math.imul(C,he),u+=Math.imul(A,fe),l+=Math.imul(A,he),a+=Math.imul(S,de),u+=Math.imul(S,me),u+=Math.imul(E,de),l+=Math.imul(E,me);var Te=s+a+((8191&u)<<13);s=l+(u>>>13)+(Te>>>26),Te&=67108863,a=Math.imul(F,ne),u=Math.imul(F,re),u+=Math.imul(D,ne),l=Math.imul(D,re),a+=Math.imul(N,oe),u+=Math.imul(N,se),u+=Math.imul(M,oe),l+=Math.imul(M,se),a+=Math.imul(P,ue),u+=Math.imul(P,le),u+=Math.imul(B,ue),l+=Math.imul(B,le),a+=Math.imul(T,fe),u+=Math.imul(T,he),u+=Math.imul(j,fe),l+=Math.imul(j,he),a+=Math.imul(C,de),u+=Math.imul(C,me),u+=Math.imul(A,de),l+=Math.imul(A,me);var je=s+a+((8191&u)<<13);s=l+(u>>>13)+(je>>>26),je&=67108863,a=Math.imul(F,oe),u=Math.imul(F,se),u+=Math.imul(D,oe),l=Math.imul(D,se),a+=Math.imul(N,ue),u+=Math.imul(N,le),u+=Math.imul(M,ue),l+=Math.imul(M,le),a+=Math.imul(P,fe),u+=Math.imul(P,he),u+=Math.imul(B,fe),l+=Math.imul(B,he),a+=Math.imul(T,de),u+=Math.imul(T,me),u+=Math.imul(j,de),l+=Math.imul(j,me);var Oe=s+a+((8191&u)<<13);s=l+(u>>>13)+(Oe>>>26),Oe&=67108863,a=Math.imul(F,ue),u=Math.imul(F,le),u+=Math.imul(D,ue),l=Math.imul(D,le),a+=Math.imul(N,fe),u+=Math.imul(N,he),u+=Math.imul(M,fe),l+=Math.imul(M,he),a+=Math.imul(P,de),u+=Math.imul(P,me),u+=Math.imul(B,de),l+=Math.imul(B,me);var Pe=s+a+((8191&u)<<13);s=l+(u>>>13)+(Pe>>>26),Pe&=67108863,a=Math.imul(F,fe),u=Math.imul(F,he),u+=Math.imul(D,fe),l=Math.imul(D,he),a+=Math.imul(N,de),u+=Math.imul(N,me),u+=Math.imul(M,de),l+=Math.imul(M,me);var Be=s+a+((8191&u)<<13);s=l+(u>>>13)+(Be>>>26),Be&=67108863,a=Math.imul(F,de),u=Math.imul(F,me),u+=Math.imul(D,de),l=Math.imul(D,me);var Re=s+a+((8191&u)<<13);return s=l+(u>>>13)+(Re>>>26),Re&=67108863,o[0]=ge,o[1]=ye,o[2]=be,o[3]=ve,o[4]=we,o[5]=_e,o[6]=ke,o[7]=Se,o[8]=Ee,o[9]=xe,o[10]=Ce,o[11]=Ae,o[12]=Ie,o[13]=Te,o[14]=je,o[15]=Oe,o[16]=Pe,o[17]=Be,o[18]=Re,0!==s&&(o[19]=s,n.length++),n}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(238),o=n(473),s=n(474);function a(){this.x=i.fromBuffer(r.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(r.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}a.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=4,n=new Array(1+Math.ceil(64.25)),r=n[0]=e,i=1;i<n.length;++i){for(var s=0;s<4;s++)r=r.dbl();n[i]=r}this.precomputed={naf:e._getNAFPoints(7),doubles:{step:4,points:n,negpoints:n.map(function(e){return e.neg()})}}},a.prototype.mul=function(e){for(var t=this.precomputed.doubles.step,n=this.precomputed.doubles.points,r=this.precomputed.doubles.negpoints,i=e.getNAF(1),a=((1<<t+1)-(t%2==0?2:1))/3,u=[],l=0;l<i.length;l+=t){for(var c=0,f=l+t-1;f>=l;f--)c=(c<<1)+i[f];u.push(c)}for(var h=new s(null,null,null),p=new s(null,null,null),d=a;d>0;d--){for(var m=0;m<u.length;m++)u[m]===d?p=p.mixedAdd(n[m]):u[m]===-d&&(p=p.mixedAdd(r[m]));h=h.add(p)}return o.fromECJPoint(h)},a.prototype.mulAdd=function(e,t,n){for(var r=this.precomputed.naf,i=t._getNAFPoints1(),o=[r.points,i.points],a=[e.getNAF(r.wnd),n.getNAF(i.wnd)],u=new s(null,null,null),l=[null,null],c=Math.max(a[0].length,a[1].length);c>=0;c--){for(var f=0;c>=0&&(l[0]=0|a[0][c],l[1]=0|a[1][c],0===l[0]&&0===l[1]);++f,--c);if(c>=0&&(f+=1),u=u.dblp(f),c<0)break;for(var h=0;h<2;h++){var p=l[h],d;0!==p&&(p>0?d=o[h][p>>1]:p<0&&(d=o[h][-p>>1].neg()),u=void 0===d.z?u.mixedAdd(d):u.add(d))}}return u},e.exports=new a},function(e,t,n){"use strict";(function(t){const r=n(229),i=n(475),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};e.exports=((e,n,s,a)=>{const u=o[e];if(!u)return a(new Error("unkown cipherType passed"));if(!n)return a(new Error("unkown hashType passed"));const l=u.keySize,c=u.ivSize,f=20,h=t.from("key expansion"),p=2*(c+l+20);i.create(n,s,(e,n)=>{if(e)return a(e);n.digest(h,(e,i)=>{if(e)return a(e);let o=[],s=0;function u(e){n.digest(t.concat([i,h]),(t,r)=>{if(t)return e(t);let a=r.length;s+a>p&&(a=p-s),o.push(r),s+=a,n.digest(i,(t,n)=>{if(t)return e(t);i=n,e()})})}function f(e){if(e)return a(e);const n=p/2,r=t.concat(o),i=r.slice(0,n),s=r.slice(n,p),u=e=>({iv:e.slice(0,c),cipherKey:e.slice(c,c+l),macKey:e.slice(c+l)});a(null,{k1:u(i),k2:u(s)})}r(()=>s<p,u,f)})})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,n){"use strict";const r=n(936);e.exports=((e,t)=>{r.generateEphmeralKeyPair(e,t)})},function(e,t,n){"use strict";(function(e){const r=n(314),i=n(313),o=n(142).bignum,s=n(466),a=s.toBase64,u=s.toBn,l={"P-256":256,"P-384":384,"P-521":521};t.generateEphmeralKeyPair=function(t,n){i(r.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then(n=>{const o=(o,s,a)=>{let u;"function"==typeof s&&(a=s,s=void 0),u=s?r.subtle.importKey("jwk",p(t,s),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(n.privateKey);const c=Promise.all([r.subtle.importKey("jwk",h(t,o),{name:"ECDH",namedCurve:t},!1,[]),u]);i(c.then(e=>r.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],l[t])).then(t=>e.from(t)),a)};return r.subtle.exportKey("jwk",n.publicKey).then(e=>({key:f(e),genSharedKey:o}))}),n)};const c={"P-256":32,"P-384":48,"P-521":66};function f(t){const n=c[t.crv];return e.concat([e.from([4]),u(t.x).toArrayLike(e,"be",n),u(t.y).toArrayLike(e,"be",n)],1+2*n)}function h(t,n){const r=c[t];if(!n.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format");const i=new o(n.slice(1,r+1)),s=new o(n.slice(1+r));return{kty:"EC",crv:t,x:a(i,r),y:a(s,r),ext:!0}}function p(e,t){const n=h(e,t.public);return n.d=a(new o(t.private)),n}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(938),i=n(320),o=n(39);function s(e){const t=[],n=e.split("/").slice(1);if(1===n.length&&""===n[0])return[];for(let r=0;r<n.length;r++){const o=n[r],s=i(o);if(0!==s.size){if(r++,r>=n.length)throw w("invalid address: "+e);if(s.path){t.push([o,v(n.slice(r).join("/"))]);break}t.push([o,n[r]])}else t.push([o])}return t}function a(e){const t=[];return e.map(e=>{const n=_(e);t.push(n.name),e.length>1&&t.push(e[1])}),v(t.join("/"))}function u(e){return e.map(e=>{Array.isArray(e)||(e=[e]);const t=_(e);return e.length>1?[t.code,r.toBuffer(t.code,e[1])]:[t.code]})}function l(e){return e.map(e=>{const t=_(e);return e.length>1?[t.code,r.toString(t.code,e[1])]:[t.code]})}function c(e){return g(t.concat(e.map(e=>{const n=_(e);let r=t.from(o.encode(n.code));return e.length>1&&(r=t.concat([r,e[1]])),r})))}function f(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;{const e=o.decode(t);return e+o.decode.bytes}}function h(e){const t=[];let n=0;for(;n<e.length;){const r=o.decode(e,n),s=o.decode.bytes,a=i(r),u=f(a,e.slice(n+s));if(0===u){t.push([r]),n+=s;continue}const l=e.slice(n+s,n+s+u);if(n+=u+s,n>e.length)throw w("Invalid address buffer: "+e.toString("hex"));t.push([r,l])}return t}function p(e){const t=h(e),n=l(t);return a(n)}function d(e){e=v(e);const t=s(e),n=u(t);return c(n)}function m(e){return d(e)}function g(e){const n=y(e);if(n)throw n;return t.from(e)}function y(e){try{h(e)}catch(e){return e}}function b(e){return void 0===y(e)}function v(e){return"/"+e.trim().split("/").filter(e=>e).join("/")}function w(e){return new Error("Error parsing address: "+e)}function _(e){const t=i(e[0]);return t}e.exports={stringToStringTuples:s,stringTuplesToString:a,tuplesToStringTuples:l,stringTuplesToTuples:u,bufferToTuples:h,tuplesToBuffer:c,bufferToString:p,stringToBuffer:d,fromString:m,fromBuffer:g,validateBuffer:y,isValidBuffer:b,cleanPath:v,ParseError:w,protoFromTuple:_,sizeForAddr:f}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(939),i=n(940),o=n(320),s=n(76),a=n(942),u=n(39);function l(e,n){return n instanceof t?l.toString(e,n):l.toBuffer(e,n)}function c(e){if(!i(e))throw new Error("invalid ip address");return r.toBuffer(e)}function f(e){const t=r.toString(e);if(!i(t))throw new Error("invalid ip address");return t}function h(e){const n=t.alloc(2);return n.writeUInt16BE(e,0),n}function p(e){return e.readUInt16BE(0)}function d(e){const n=t.from(e),r=t.from(u.encode(n.length));return t.concat([r,n])}function m(e){const t=u.decode(e);if(e=e.slice(u.decode.bytes),e.length!==t)throw new Error("inconsistent lengths");return e.toString()}function g(e){const n=t.from(s.decode(e)),r=t.from(u.encode(n.length));return t.concat([r,n])}function y(e){const t=u.decode(e),n=e.slice(u.decode.bytes);if(n.length!==t)throw new Error("inconsistent lengths");return s.encode(n)}function b(e){const n=e.split(":");if(2!==n.length)throw new Error("failed to parse onion addr: "+n+" does not contain a port number");if(16!==n[0].length)throw new Error("failed to parse onion addr: "+n[0]+" not a Tor onion address.");const r=t.from(a.decode.asBytes(n[0].toUpperCase())),i=parseInt(n[1],10);if(i<1||i>65536)throw new Error("Port number is not in range(1, 65536)");const o=h(i);return t.concat([r,o])}function v(e){const n=e.split(":");if(2!==n.length)throw new Error("failed to parse onion addr: "+n+" does not contain a port number");if(56!==n[0].length)throw new Error("failed to parse onion addr: "+n[0]+" not a Tor onion3 address.");const r=t.from(a.decode.asBytes(n[0].toUpperCase())),i=parseInt(n[1],10);if(i<1||i>65536)throw new Error("Port number is not in range(1, 65536)");const o=h(i);return t.concat([r,o])}function w(e){const t=e.slice(0,e.length-2),n=e.slice(e.length-2),r=a.encode(t).toString("ascii").toLowerCase(),i=p(n);return r+":"+i}e.exports=l,l.toString=function e(t,n){switch(t=o(t),t.code){case 4:case 41:return f(n);case 6:case 273:case 33:case 132:return p(n);case 53:case 54:case 55:case 56:case 400:return m(n);case 421:return y(n);case 444:case 445:return w(n);default:return n.toString("hex")}},l.toBuffer=function e(n,r){switch(n=o(n),n.code){case 4:case 41:return c(r);case 6:case 273:case 33:case 132:return h(parseInt(r,10));case 53:case 54:case 55:case 56:case 400:return d(r);case 421:return g(r);case 444:return b(r);case 445:return v(r);default:return t.from(r,"hex")}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=t,i=n(0).Buffer,o=n(226);r.toBuffer=function(e,t,n){var r;if(n=~~n,this.isV4Format(e))r=t||new i(n+4),e.split(/\./g).map(function(e){r[n++]=255&parseInt(e,10)});else if(this.isV6Format(e)){var o=e.split(":",8),s;for(s=0;s<o.length;s++){var a=this.isV4Format(o[s]),u;a&&(u=this.toBuffer(o[s]),o[s]=u.slice(0,2).toString("hex")),u&&++s<8&&o.splice(s,0,u.slice(2,4).toString("hex"))}if(""===o[0])for(;o.length<8;)o.unshift("0");else if(""===o[o.length-1])for(;o.length<8;)o.push("0");else if(o.length<8){for(s=0;s<o.length&&""!==o[s];s++);var l=[s,1];for(s=9-o.length;s>0;s--)l.push("0");o.splice.apply(o,l)}for(r=t||new i(n+16),s=0;s<o.length;s++){var c=parseInt(o[s],16);r[n++]=c>>8&255,r[n++]=255&c}}if(!r)throw Error("Invalid ip address: "+e);return r},r.toString=function(e,t,n){t=~~t,n=n||e.length-t;var r=[];if(4===n){for(var i=0;i<n;i++)r.push(e[t+i]);r=r.join(".")}else if(16===n){for(var i=0;i<n;i+=2)r.push(e.readUInt16BE(t+i).toString(16));r=r.join(":"),r=r.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3"),r=r.replace(/:{3,4}/,"::")}return r};var s=/^(\d{1,3}\.){3,3}\d{1,3}$/,a=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;function u(e){return e?e.toLowerCase():"ipv4"}r.isV4Format=function(e){return s.test(e)},r.isV6Format=function(e){return a.test(e)},r.fromPrefixLen=function(e,t){t=e>32?"ipv6":u(t);var n=4;"ipv6"===t&&(n=16);for(var o=new i(n),s=0,a=o.length;s<a;++s){var l=8;e<8&&(l=e),e-=l,o[s]=255&~(255>>l)}return r.toString(o)},r.mask=function(e,t){e=r.toBuffer(e),t=r.toBuffer(t);var n=new i(Math.max(e.length,t.length)),o=0;if(e.length===t.length)for(o=0;o<e.length;o++)n[o]=e[o]&t[o];else if(4===t.length)for(o=0;o<t.length;o++)n[o]=e[e.length-4+o]&t[o];else{for(var o=0;o<n.length-6;o++)n[o]=0;for(n[10]=255,n[11]=255,o=0;o<e.length;o++)n[o+12]=e[o]&t[o+12];o+=12}for(;o<n.length;o++)n[o]=0;return r.toString(n)},r.cidr=function(e){var t=e.split("/"),n=t[0];if(2!==t.length)throw new Error("invalid CIDR subnet: "+n);var i=r.fromPrefixLen(parseInt(t[1],10));return r.mask(n,i)},r.subnet=function(e,t){for(var n=r.toLong(r.mask(e,t)),i=r.toBuffer(t),o=0,s=0;s<i.length;s++)if(255===i[s])o+=8;else for(var a=255&i[s];a;)a=a<<1&255,o++;var u=Math.pow(2,32-o);return{networkAddress:r.fromLong(n),firstAddress:u<=2?r.fromLong(n):r.fromLong(n+1),lastAddress:u<=2?r.fromLong(n+u-1):r.fromLong(n+u-2),broadcastAddress:r.fromLong(n+u-1),subnetMask:t,subnetMaskLength:o,numHosts:u<=2?u:u-2,length:u,contains:function(e){return n===r.toLong(r.mask(e,t))}}},r.cidrSubnet=function(e){var t=e.split("/"),n=t[0];if(2!==t.length)throw new Error("invalid CIDR subnet: "+n);var i=r.fromPrefixLen(parseInt(t[1],10));return r.subnet(n,i)},r.not=function(e){for(var t=r.toBuffer(e),n=0;n<t.length;n++)t[n]=255^t[n];return r.toString(t)},r.or=function(e,t){if(e=r.toBuffer(e),t=r.toBuffer(t),e.length===t.length){for(var n=0;n<e.length;++n)e[n]|=t[n];return r.toString(e)}var i=e,o=t;t.length>e.length&&(i=t,o=e);for(var s=i.length-o.length,n=s;n<i.length;++n)i[n]|=o[n-s];return r.toString(i)},r.isEqual=function(e,t){if(e=r.toBuffer(e),t=r.toBuffer(t),e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(4===t.length){var i=t;t=e,e=i}for(var n=0;n<10;n++)if(0!==t[n])return!1;var o=t.readUInt16BE(10);if(0!==o&&65535!==o)return!1;for(var n=0;n<4;n++)if(e[n]!==t[n+12])return!1;return!0},r.isPrivate=function(e){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^f[cd][0-9a-f]{2}:/i.test(e)||/^fe80:/i.test(e)||/^::1$/.test(e)||/^::$/.test(e)},r.isPublic=function(e){return!r.isPrivate(e)},r.isLoopback=function(e){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(e)||/^fe80::1$/.test(e)||/^::1$/.test(e)||/^::$/.test(e)},r.loopback=function(e){if(e=u(e),"ipv4"!==e&&"ipv6"!==e)throw new Error("family must be ipv4 or ipv6");return"ipv4"===e?"127.0.0.1":"fe80::1"},r.address=function(e,t){var n=o.networkInterfaces(),i;if(t=u(t),e&&"private"!==e&&"public"!==e){var s=n[e].filter(function(e){var n=e.family.toLowerCase();return n===t});if(0===s.length)return;return s[0].address}var i=Object.keys(n).map(function(i){var o=n[i].filter(function(n){return n.family=n.family.toLowerCase(),n.family===t&&!r.isLoopback(n.address)&&(!e||("public"===e?r.isPrivate(n.address):r.isPublic(n.address)))});return o.length?o[0].address:void 0}).filter(Boolean);return i.length?i[0]:r.loopback(t)},r.toLong=function(e){var t=0;return e.split(".").forEach(function(e){t<<=8,t+=parseInt(e)}),t>>>0},r.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},function(e,t,n){"use strict";const r=n(941),i=e.exports=(e=>r({exact:!0}).test(e));i.v4=(e=>r.v4({exact:!0}).test(e)),i.v6=(e=>r.v6({exact:!0}).test(e))},function(e,t,n){"use strict";const r="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}",i="[0-9a-fA-F]{1,4}",o=`\n(\n(?:${i}:){7}(?:${i}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${i}:){6}(?:${r}|:${i}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${i}:){5}(?::${r}|(:${i}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${i}:){4}(?:(:${i}){0,1}:${r}|(:${i}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${i}:){3}(?:(:${i}){0,2}:${r}|(:${i}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${i}:){2}(?:(:${i}){0,3}:${r}|(:${i}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${i}:){1}(?:(:${i}){0,4}:${r}|(:${i}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::${i}){0,5}:${r}|(?::${i}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=e.exports=(e=>e&&e.exact?new RegExp(`(?:^${r}$)|(?:^${o}$)`):new RegExp(`(?:${r})|(?:${o})`,"g"));s.v4=(e=>e&&e.exact?new RegExp(`^${r}$`):new RegExp(r,"g")),s.v6=(e=>e&&e.exact?new RegExp(`^${o}$`):new RegExp(o,"g"))},function(e,t,n){(function(t,r){var i;
/*
* [hi-base32]{@link https://github.com/emn178/hi-base32}
*
* @version 0.5.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/
/*
* [hi-base32]{@link https://github.com/emn178/hi-base32}
*
* @version 0.5.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/
!function(){"use strict";var o="object"==typeof window?window:{},s=!o.HI_BASE32_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node;s&&(o=r);var a=!o.HI_BASE32_NO_COMMON_JS&&"object"==typeof e&&e.exports,u=n(446),l="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),c={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},f=[0,0,0,0,0,0,0,0],h=function(e,t){t.length>10&&(t="..."+t.substr(-10));var n=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw n.position=e,n},p=function(e){for(var t="",n=e.length,r=0,i=0,o,s;r<n;)if(o=e[r++],o<=127)t+=String.fromCharCode(o);else{o>191&&o<=223?(s=31&o,i=1):o<=239?(s=15&o,i=2):o<=247?(s=7&o,i=3):h(r,t);for(var a=0;a<i;++a)o=e[r++],(o<128||o>191)&&h(r,t),s<<=6,s+=63&o;s>=55296&&s<=57343&&h(r,t),s>1114111&&h(r,t),s<=65535?t+=String.fromCharCode(s):(s-=65536,t+=String.fromCharCode(55296+(s>>10)),t+=String.fromCharCode(56320+(1023&s)))}return t},d=function(e){if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");e=e.replace(/=/g,"");for(var t,n,r,i,o,s,a,u,l=[],f=0,h=e.length,p=0,d=h>>3<<3;p<d;)t=c[e.charAt(p++)],n=c[e.charAt(p++)],r=c[e.charAt(p++)],i=c[e.charAt(p++)],o=c[e.charAt(p++)],s=c[e.charAt(p++)],a=c[e.charAt(p++)],u=c[e.charAt(p++)],l[f++]=255&(t<<3|n>>>2),l[f++]=255&(n<<6|r<<1|i>>>4),l[f++]=255&(i<<4|o>>>1),l[f++]=255&(o<<7|s<<2|a>>>3),l[f++]=255&(a<<5|u);var m=h-d;return 2===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],l[f++]=255&(t<<3|n>>>2)):4===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],r=c[e.charAt(p++)],i=c[e.charAt(p++)],l[f++]=255&(t<<3|n>>>2),l[f++]=255&(n<<6|r<<1|i>>>4)):5===m?(t=c[e.charAt(p++)],n=c[e.charAt(p++)],r=c[e.charAt(p++)],i=c[e.charAt(p++)],o=c[e.charAt(p++)],l[f++]=255&(t<<3|n>>>2),l[f++]=255&(n<<6|r<<1|i>>>4),l[f++]=255&(i<<4|o>>>1)):7===m&&(t=c[e.charAt(p++)],n=c[e.charAt(p++)],r=c[e.charAt(p++)],i=c[e.charAt(p++)],o=c[e.charAt(p++)],s=c[e.charAt(p++)],a=c[e.charAt(p++)],l[f++]=255&(t<<3|n>>>2),l[f++]=255&(n<<6|r<<1|i>>>4),l[f++]=255&(i<<4|o>>>1),l[f++]=255&(o<<7|s<<2|a>>>3)),l},m=function(e){for(var t,n,r,i,o,s="",a=e.length,u=0,c=5*parseInt(a/5);u<c;)t=e.charCodeAt(u++),n=e.charCodeAt(u++),r=e.charCodeAt(u++),i=e.charCodeAt(u++),o=e.charCodeAt(u++),s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o];var f=a-c;return 1===f?(t=e.charCodeAt(u),s+=l[t>>>3]+l[t<<2&31]+"======"):2===f?(t=e.charCodeAt(u++),n=e.charCodeAt(u),s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[n<<4&31]+"===="):3===f?(t=e.charCodeAt(u++),n=e.charCodeAt(u++),r=e.charCodeAt(u),s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[r<<1&31]+"==="):4===f&&(t=e.charCodeAt(u++),n=e.charCodeAt(u++),r=e.charCodeAt(u++),i=e.charCodeAt(u),s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"="),s},g=function(e){var t,n,r,i,o,s,a=!1,u="",c=0,h,p=0,d=0,m=e.length;do{for(f[0]=f[5],f[1]=f[6],f[2]=f[7],h=p;c<m&&h<5;++c)s=e.charCodeAt(c),s<128?f[h++]=s:s<2048?(f[h++]=192|s>>6,f[h++]=128|63&s):s<55296||s>=57344?(f[h++]=224|s>>12,f[h++]=128|s>>6&63,f[h++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++c)),f[h++]=240|s>>18,f[h++]=128|s>>12&63,f[h++]=128|s>>6&63,f[h++]=128|63&s);d+=h-p,p=h-5,c===m&&++c,c>m&&h<6&&(a=!0),t=f[0],h>4?(n=f[1],r=f[2],i=f[3],o=f[4],u+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o]):1===h?u+=l[t>>>3]+l[t<<2&31]+"======":2===h?(n=f[1],u+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[n<<4&31]+"===="):3===h?(n=f[1],r=f[2],u+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[r<<1&31]+"==="):(n=f[1],r=f[2],i=f[3],u+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"=")}while(!a);return u},y=function(e){for(var t,n,r,i,o,s="",a=e.length,u=0,c=5*parseInt(a/5);u<c;)t=e[u++],n=e[u++],r=e[u++],i=e[u++],o=e[u++],s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o];var f=a-c;return 1===f?(t=e[u],s+=l[t>>>3]+l[t<<2&31]+"======"):2===f?(t=e[u++],n=e[u],s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[n<<4&31]+"===="):3===f?(t=e[u++],n=e[u++],r=e[u],s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[r<<1&31]+"==="):4===f&&(t=e[u++],n=e[u++],r=e[u++],i=e[u],s+=l[t>>>3]+l[31&(t<<2|n>>>6)]+l[n>>>1&31]+l[31&(n<<4|r>>>4)]+l[31&(r<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"="),s},b=function(e,t){var n="string"!=typeof e;return n&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),n?y(e):t?m(e):g(e)},v=function(e,t){if(!t)return p(d(e));if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var n,r,i,o,s,a,u,l,f="",h=e.indexOf("=");-1===h&&(h=e.length);for(var m=0,g=h>>3<<3;m<g;)n=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],s=c[e.charAt(m++)],a=c[e.charAt(m++)],u=c[e.charAt(m++)],l=c[e.charAt(m++)],f+=String.fromCharCode(255&(n<<3|r>>>2))+String.fromCharCode(255&(r<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))+String.fromCharCode(255&(s<<7|a<<2|u>>>3))+String.fromCharCode(255&(u<<5|l));var y=h-g;return 2===y?(n=c[e.charAt(m++)],r=c[e.charAt(m++)],f+=String.fromCharCode(255&(n<<3|r>>>2))):4===y?(n=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],f+=String.fromCharCode(255&(n<<3|r>>>2))+String.fromCharCode(255&(r<<6|i<<1|o>>>4))):5===y?(n=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],s=c[e.charAt(m++)],f+=String.fromCharCode(255&(n<<3|r>>>2))+String.fromCharCode(255&(r<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))):7===y&&(n=c[e.charAt(m++)],r=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],s=c[e.charAt(m++)],a=c[e.charAt(m++)],u=c[e.charAt(m++)],f+=String.fromCharCode(255&(n<<3|r>>>2))+String.fromCharCode(255&(r<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))+String.fromCharCode(255&(s<<7|a<<2|u>>>3))),f},w={encode:b,decode:v};v.asBytes=d,a?e.exports=w:(o.base32=w,u&&(i=function(){return w}.call(w,n,w,e),void 0===i||(e.exports=i)))}()}).call(this,n(2),n(8))},function(e,t,n){"use strict";const{ensureMultiaddr:r}=n(476),i=n(944);class o{constructor(e){this._multiaddrs=e||[],this._observedMultiaddrs=[]}add(e){e=r(e),this.has(e)||this._multiaddrs.push(e)}addSafe(e){e=r(e);const t=this._observedMultiaddrs.some((t,n)=>{if(t.equals(e))return this.add(e),this._observedMultiaddrs.splice(n,1),!0});t||this._observedMultiaddrs.push(e)}toArray(){return this._multiaddrs.slice()}get size(){return this._multiaddrs.length}forEach(e){return this._multiaddrs.forEach(e)}filterBy(e){return"object"!=typeof e||"function"!=typeof e.matches||"function"!=typeof e.partialMatch||"function"!=typeof e.toString?[]:this._multiaddrs.filter(t=>e.matches(t))}has(e){return e=r(e),this._multiaddrs.some(t=>t.equals(e))}delete(e){e=r(e),this._multiaddrs.some((t,n)=>{if(t.equals(e))return this._multiaddrs.splice(n,1),!0})}replace(e,t){Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(e=>this.delete(e)),t.forEach(e=>this.add(e))}clear(){this._multiaddrs=[]}distinct(){return i(this._multiaddrs,e=>[e.toOptions().port,e.toOptions().transport].join())}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=[],r={};if("function"!=typeof t){var i=t;t=function e(t){return t[i]}}return e.forEach(function e(i){var o=t(i);r[o]||(r[o]=!0,n.push(i))}),n}e.exports=r},function(e,t,n){"use strict";const r=n(946),i={16:"aes-128-ctr",32:"aes-256-ctr"};t.create=function(e,t,n){const o=i[e.length];if(!o)return n(new Error("Invalid key length"));const s=r.createCipheriv(o,e,t),a=r.createDecipheriv(o,e,t),u={encrypt(e,t){t(null,s.update(e))},decrypt(e,t){t(null,a.update(e))}};n(null,u)}},function(e,t,n){"use strict";const r=n(947);e.exports={createCipheriv:r.createCipheriv,createDecipheriv:r.createDecipheriv}},function(e,t,n){var r=n(948),i=n(956),o=n(480);function s(){return Object.keys(o)}t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=s},function(e,t,n){var r=n(477),i=n(481),o=n(4).Buffer,s=n(482),a=n(119),u=n(239),l=n(483),c=n(1);function f(e,t,n){a.call(this),this._cache=new p,this._cipher=new u.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}c(f,a),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return o.concat(r)};var h=o.alloc(16,16);function p(){this.cache=o.allocUnsafe(0)}function d(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new s(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new f(a.module,t,n)}function m(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return d(e,i.key,i.iv)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=o.concat([this.cache,e])},p.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},p.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return o.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=m},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(180);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(4).Buffer,i=n(180);function o(e,t,n){var o=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=r.concat([e._prev,n?t:s]),s}t.encrypt=function(e,t,n){for(var i=r.allocUnsafe(0),s;t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){i=r.concat([i,o(e,t,n)]);break}s=e._cache.length,i=r.concat([i,o(e,t.slice(0,s),n)]),t=t.slice(s)}return i}},function(e,t,n){var r=n(4).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev),o=i[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:o])]),o}t.encrypt=function(e,t,n){for(var o=t.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],n);return s}},function(e,t,n){var r=n(4).Buffer;function i(e,t,n){for(var r,i=-1,s=8,a=0,u,l;++i<8;)r=e._cipher.encryptBlock(e._prev),u=t&1<<7-i?128:0,l=r[0]^u,a+=(128&l)>>i%8,e._prev=o(e._prev,n?u:l);return a}function o(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,n){for(var o=t.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],n);return s}},function(e,t,n){(function(e){var r=n(180);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var o=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,o)}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(4).Buffer,i=r.alloc(16,0);function o(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e=o(this.h),t=[0,0,0,0],n,r,i,a=-1;++a<128;){for(r=0!=(this.state[~~(a/8)]&1<<7-a%8),r&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),i=0!=(1&e[3]),n=3;n>0;n--)e[n]=e[n]>>>1|(1&e[n-1])<<31;e[0]=e[0]>>>1,i&&(e[0]=e[0]^225<<24)}this.state=s(t)},a.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=a},function(e,t,n){var r=n(481),i=n(4).Buffer,o=n(477),s=n(482),a=n(119),u=n(239),l=n(483),c=n(1);function f(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function p(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function d(e,t,n){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new f(a.module,t,n)}function m(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=l(t,!1,n.key,n.iv);return d(e,r.key,r.iv)}c(f,a),f.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return p(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=m,t.createDecipheriv=d},function(e,t,n){"use strict";const r=n(461),i=n(34),o={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};function s(e,t,n,s,a){const u=o[a];if(!u)throw new Error(`Hash '${a}' is unknown or not supported`);const l=r(e,t,n,s,u);return i.encode64(l)}e.exports=s},function(e,t,n){(function(e,r){var i;
/**
* @license
* Lodash <https://lodash.com/>
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var o,s="4.17.11",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,d=2,m=4,g=1,y=2,b=1,v=2,w=4,_=8,k=16,S=32,E=64,x=128,C=256,A=512,I=30,T="...",j=800,O=16,P=1,B=2,R=3,N=1/0,M=9007199254740991,L=1.7976931348623157e308,F=NaN,D=4294967295,U=D-1,z=D>>>1,q=[["ary",x],["bind",b],["bindKey",v],["curry",_],["curryRight",k],["flip",A],["partial",S],["partialRight",E],["rearg",C]],K="[object Arguments]",H="[object Array]",V="[object AsyncFunction]",W="[object Boolean]",$="[object Date]",G="[object DOMException]",Y="[object Error]",J="[object Function]",Z="[object GeneratorFunction]",X="[object Map]",Q="[object Number]",ee="[object Null]",te="[object Object]",ne="[object Promise]",re="[object Proxy]",ie="[object RegExp]",oe="[object Set]",se="[object String]",ae="[object Symbol]",ue="[object Undefined]",le="[object WeakMap]",ce="[object WeakSet]",fe="[object ArrayBuffer]",he="[object DataView]",pe="[object Float32Array]",de="[object Float64Array]",me="[object Int8Array]",ge="[object Int16Array]",ye="[object Int32Array]",be="[object Uint8Array]",ve="[object Uint8ClampedArray]",we="[object Uint16Array]",_e="[object Uint32Array]",ke=/\b__p \+= '';/g,Se=/\b(__p \+=) '' \+/g,Ee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,Ae=RegExp(xe.source),Ie=RegExp(Ce.source),Te=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,Oe=/<%=([\s\S]+?)%>/g,Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Be=/^\w*$/,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Me=RegExp(Ne.source),Le=/^\s+|\s+$/g,Fe=/^\s+/,De=/\s+$/,Ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ze=/\{\n\/\* \[wrapped with (.+)\] \*/,qe=/,? & /,Ke=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,He=/\\(\\)?/g,Ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,We=/\w*$/,$e=/^[-+]0x[0-9a-f]+$/i,Ge=/^0b[01]+$/i,Ye=/^\[object .+?Constructor\]$/,Je=/^0o[0-7]+$/i,Ze=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,et=/['\n\r\u2028\u2029\\]/g,tt="\\ud800-\\udfff",nt="\\u0300-\\u036f",rt="\\ufe20-\\ufe2f",it="\\u20d0-\\u20ff",ot="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",st="\\u2700-\\u27bf",at="a-z\\xdf-\\xf6\\xf8-\\xff",ut="\\xac\\xb1\\xd7\\xf7",lt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ct="\\u2000-\\u206f",ft=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ht="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\ufe0e\\ufe0f",dt=ut+lt+"\\u2000-\\u206f"+ft,mt="[']",gt="[\\ud800-\\udfff]",yt="["+dt+"]",bt="["+ot+"]",vt="\\d+",wt="[\\u2700-\\u27bf]",_t="["+at+"]",kt="[^"+tt+dt+vt+st+at+ht+"]",St="\\ud83c[\\udffb-\\udfff]",Et="(?:"+bt+"|"+St+")",xt="[^\\ud800-\\udfff]",Ct="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+ht+"]",Tt="\\u200d",jt="(?:"+_t+"|"+kt+")",Ot="(?:"+It+"|"+kt+")",Pt="(?:['](?:d|ll|m|re|s|t|ve))?",Bt="(?:['](?:D|LL|M|RE|S|T|VE))?",Rt=Et+"?",Nt="[\\ufe0e\\ufe0f]?",Mt="(?:\\u200d(?:"+[xt,Ct,At].join("|")+")"+Nt+Rt+")*",Lt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ft="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dt=Nt+Rt+Mt,Ut="(?:"+[wt,Ct,At].join("|")+")"+Dt,zt="(?:"+[xt+bt+"?",bt,Ct,At,gt].join("|")+")",qt=RegExp("[']","g"),Kt=RegExp(bt,"g"),Ht=RegExp(St+"(?="+St+")|"+zt+Dt,"g"),Vt=RegExp([It+"?"+_t+"+"+Pt+"(?="+[yt,It,"$"].join("|")+")",Ot+"+"+Bt+"(?="+[yt,It+jt,"$"].join("|")+")",It+"?"+jt+"+"+Pt,It+"+"+Bt,Ft,Lt,vt,Ut].join("|"),"g"),Wt=RegExp("["+Tt+tt+ot+pt+"]"),$t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yt=-1,Jt={};Jt[pe]=Jt[de]=Jt[me]=Jt[ge]=Jt[ye]=Jt[be]=Jt[ve]=Jt[we]=Jt[_e]=!0,Jt[K]=Jt[H]=Jt[fe]=Jt[W]=Jt[he]=Jt[$]=Jt[Y]=Jt[J]=Jt[X]=Jt[Q]=Jt[te]=Jt[ie]=Jt[oe]=Jt[se]=Jt[le]=!1;var Zt={};Zt[K]=Zt[H]=Zt[fe]=Zt[he]=Zt[W]=Zt[$]=Zt[pe]=Zt[de]=Zt[me]=Zt[ge]=Zt[ye]=Zt[X]=Zt[Q]=Zt[te]=Zt[ie]=Zt[oe]=Zt[se]=Zt[ae]=Zt[be]=Zt[ve]=Zt[we]=Zt[_e]=!0,Zt[Y]=Zt[J]=Zt[le]=!1;var Xt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Qt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},en={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof e&&e&&e.Object===Object&&e,sn="object"==typeof self&&self&&self.Object===Object&&self,an=on||sn||Function("return this")(),un=t&&!t.nodeType&&t,ln=un&&"object"==typeof r&&r&&!r.nodeType&&r,cn=ln&&ln.exports===un,fn=cn&&on.process,hn=function(){try{var e=ln&&ln.require&&ln.require("util").types;return e||fn&&fn.binding&&fn.binding("util")}catch(e){}}(),pn=hn&&hn.isArrayBuffer,dn=hn&&hn.isDate,mn=hn&&hn.isMap,gn=hn&&hn.isRegExp,yn=hn&&hn.isSet,bn=hn&&hn.isTypedArray;function vn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function wn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kn(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Sn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function En(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function xn(e,t){var n=null==e?0:e.length;return!!n&&Ln(e,t,0)>-1}function Cn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function An(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function In(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function jn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function On(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Pn=zn("length");function Bn(e){return e.split("")}function Rn(e){return e.match(Ke)||[]}function Nn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Mn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ln(e,t,n){return t==t?hr(e,t,n):Mn(e,Dn,n)}function Fn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Dn(e){return e!=e}function Un(e,t){var n=null==e?0:e.length;return n?Vn(e,t)/n:F}function zn(e){return function(t){return null==t?o:t[e]}}function qn(e){return function(t){return null==e?o:e[t]}}function Kn(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Hn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Vn(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);s!==o&&(n=n===o?s:n+s)}return n}function Wn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $n(e,t){return An(t,function(t){return[t,e[t]]})}function Gn(e){return function(t){return e(t)}}function Yn(e,t){return An(t,function(t){return e[t]})}function Jn(e,t){return e.has(t)}function Zn(e,t){for(var n=-1,r=e.length;++n<r&&Ln(t,e[n],0)>-1;);return n}function Xn(e,t){for(var n=e.length;n--&&Ln(t,e[n],0)>-1;);return n}function Qn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var er=qn(Xt),tr=qn(Qt);function nr(e){return"\\"+tn[e]}function rr(e,t){return null==e?o:e[t]}function ir(e){return Wt.test(e)}function or(e){return $t.test(e)}function sr(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function ar(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ur(e,t){return function(n){return e(t(n))}}function lr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==h||(e[n]=h,o[i++]=n)}return o}function cr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function fr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function hr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function pr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function dr(e){return ir(e)?yr(e):Pn(e)}function mr(e){return ir(e)?br(e):Bn(e)}var gr=qn(en);function yr(e){for(var t=Ht.lastIndex=0;Ht.test(e);)++t;return t}function br(e){return e.match(Ht)||[]}function vr(e){return e.match(Vt)||[]}var wr=function e(t){t=null==t?an:_r.defaults(an.Object(),t,_r.pick(an,Gt));var n=t.Array,r=t.Date,i=t.Error,R=t.Function,Ke=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=n.prototype,st=R.prototype,at=tt.prototype,ut=t["__core-js_shared__"],lt=st.toString,ct=at.hasOwnProperty,ft=0,ht=(pt=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||""),pt?"Symbol(src)_1."+pt:""),pt,dt=at.toString,mt=lt.call(tt),gt=an._,yt=nt("^"+lt.call(ct).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=cn?t.Buffer:o,vt=t.Symbol,wt=t.Uint8Array,_t=bt?bt.allocUnsafe:o,kt=ur(tt.getPrototypeOf,tt),St=tt.create,Et=at.propertyIsEnumerable,xt=ot.splice,Ct=vt?vt.isConcatSpreadable:o,At=vt?vt.iterator:o,It=vt?vt.toStringTag:o,Tt=function(){try{var e=Vs(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),jt=t.clearTimeout!==an.clearTimeout&&t.clearTimeout,Ot=r&&r.now!==an.Date.now&&r.now,Pt=t.setTimeout!==an.setTimeout&&t.setTimeout,Bt=Ke.ceil,Rt=Ke.floor,Nt=tt.getOwnPropertySymbols,Mt=bt?bt.isBuffer:o,Lt=t.isFinite,Ft=ot.join,Dt=ur(tt.keys,tt),Ut=Ke.max,zt=Ke.min,Ht=r.now,Vt=t.parseInt,Wt=Ke.random,$t=ot.reverse,Xt=Vs(t,"DataView"),Qt=Vs(t,"Map"),en=Vs(t,"Promise"),tn=Vs(t,"Set"),on=Vs(t,"WeakMap"),sn=Vs(tt,"create"),un=on&&new on,ln={},fn=ja(Xt),hn=ja(Qt),Pn=ja(en),Bn=ja(tn),qn=ja(on),hr=vt?vt.prototype:o,yr=hr?hr.valueOf:o,br=hr?hr.toString:o;function wr(e){if(Sc(e)&&!sc(e)&&!(e instanceof xr)){if(e instanceof Er)return e;if(ct.call(e,"__wrapped__"))return Pa(e)}return new Er(e)}var kr=function(){function e(){}return function(t){if(!kc(t))return{};if(St)return St(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Sr(){}function Er(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function xr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function Cr(){var e=new xr(this.__wrapped__);return e.__actions__=ns(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ns(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ns(this.__views__),e}function Ar(){if(this.__filtered__){var e=new xr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ir(){var e=this.__wrapped__.value(),t=this.__dir__,n=sc(e),r=t<0,i=n?e.length:0,o=Js(0,i,this.__views__),s=o.start,a=o.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,f=c.length,h=0,p=zt(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Lo(e,this.__actions__);var d=[];e:for(;u--&&h<p;){l+=t;for(var m=-1,g=e[l];++m<f;){var y=c[m],b=y.iteratee,v=y.type,w=b(g);if(v==B)g=w;else if(!w){if(v==P)continue e;break e}}d[h++]=g}return d}function Tr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jr(){this.__data__=sn?sn(null):{},this.size=0}function Or(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Pr(e){var t=this.__data__;if(sn){var n=t[e];return n===c?o:n}return ct.call(t,e)?t[e]:o}function Br(e){var t=this.__data__;return sn?t[e]!==o:ct.call(t,e)}function Rr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=sn&&t===o?c:t,this}function Nr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mr(){this.__data__=[],this.size=0}function Lr(e){var t=this.__data__,n=ui(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():xt.call(t,n,1),--this.size,!0}function Fr(e){var t=this.__data__,n=ui(t,e);return n<0?o:t[n][1]}function Dr(e){return ui(this.__data__,e)>-1}function Ur(e,t){var n=this.__data__,r=ui(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function zr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qr(){this.size=0,this.__data__={hash:new Tr,map:new(Qt||Nr),string:new Tr}}function Kr(e){var t=Ks(this,e).delete(e);return this.size-=t?1:0,t}function Hr(e){return Ks(this,e).get(e)}function Vr(e){return Ks(this,e).has(e)}function Wr(e,t){var n=Ks(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function $r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zr;++t<n;)this.add(e[t])}function Gr(e){return this.__data__.set(e,c),this}function Yr(e){return this.__data__.has(e)}function Jr(e){var t=this.__data__=new Nr(e);this.size=t.size}function Zr(){this.__data__=new Nr,this.size=0}function Xr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Qr(e){return this.__data__.get(e)}function ei(e){return this.__data__.has(e)}function ti(e,t){var n=this.__data__;if(n instanceof Nr){var r=n.__data__;if(!Qt||r.length<a-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zr(r)}return n.set(e,t),this.size=n.size,this}function ni(e,t){var n=sc(e),r=!n&&oc(e),i=!n&&!r&&fc(e),o=!n&&!r&&!i&&Fc(e),s=n||r||i||o,a=s?Wn(e.length,rt):[],u=a.length;for(var l in e)!t&&!ct.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ia(l,u))||a.push(l);return a}function ri(e){var t=e.length;return t?e[go(0,t-1)]:o}function ii(e,t){return Aa(ns(e),di(t,0,e.length))}function oi(e){return Aa(ns(e))}function si(e,t,n){(n===o||nc(e[t],n))&&(n!==o||t in e)||hi(e,t,n)}function ai(e,t,n){var r=e[t];ct.call(e,t)&&nc(r,n)&&(n!==o||t in e)||hi(e,t,n)}function ui(e,t){for(var n=e.length;n--;)if(nc(e[n][0],t))return n;return-1}function li(e,t,n,r){return wi(e,function(e,i,o){t(r,e,n(e),o)}),r}function ci(e,t){return e&&rs(t,_f(t),e)}function fi(e,t){return e&&rs(t,kf(t),e)}function hi(e,t,n){"__proto__"==t&&Tt?Tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function pi(e,t){for(var r=-1,i=t.length,s=n(i),a=null==e;++r<i;)s[r]=a?o:mf(e,t[r]);return s}function di(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function mi(e,t,n,r,i,s){var a,u=t&p,l=t&d,c=t&m;if(n&&(a=i?n(e,r,i,s):n(e)),a!==o)return a;if(!kc(e))return e;var f=sc(e);if(f){if(a=Qs(e),!u)return ns(e,a)}else{var h=Ys(e),g=h==J||h==Z;if(fc(e))return Wo(e,u);if(h==te||h==K||g&&!i){if(a=l||g?{}:ea(e),!u)return l?os(e,fi(a,e)):is(e,ci(a,e))}else{if(!Zt[h])return i?e:{};a=ta(e,h,u)}}s||(s=new Jr);var y=s.get(e);if(y)return y;if(s.set(e,a),Nc(e))return e.forEach(function(r){a.add(mi(r,t,n,r,e,s))}),a;if(Ec(e))return e.forEach(function(r,i){a.set(i,mi(r,t,n,i,e,s))}),a;var b=c?l?Fs:Ls:l?kf:_f,v=f?o:b(e);return _n(v||e,function(r,i){v&&(i=r,r=e[i]),ai(a,i,mi(r,t,n,i,e,s))}),a}function gi(e){var t=_f(e);return function(n){return yi(n,e,t)}}function yi(e,t,n){var r=n.length;if(null==e)return!r;for(e=tt(e);r--;){var i=n[r],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function bi(e,t,n){if("function"!=typeof e)throw new it(l);return Sa(function(){e.apply(o,n)},t)}function vi(e,t,n,r){var i=-1,o=xn,s=!0,u=e.length,l=[],c=t.length;if(!u)return l;n&&(t=An(t,Gn(n))),r?(o=Cn,s=!1):t.length>=a&&(o=Jn,s=!1,t=new $r(t));e:for(;++i<u;){var f=e[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h==h){for(var p=c;p--;)if(t[p]===h)continue e;l.push(f)}else o(t,h,r)||l.push(f)}return l}wr.templateSettings={escape:Te,evaluate:je,interpolate:Oe,variable:"",imports:{_:wr}},wr.prototype=Sr.prototype,wr.prototype.constructor=wr,Er.prototype=kr(Sr.prototype),Er.prototype.constructor=Er,xr.prototype=kr(Sr.prototype),xr.prototype.constructor=xr,Tr.prototype.clear=jr,Tr.prototype.delete=Or,Tr.prototype.get=Pr,Tr.prototype.has=Br,Tr.prototype.set=Rr,Nr.prototype.clear=Mr,Nr.prototype.delete=Lr,Nr.prototype.get=Fr,Nr.prototype.has=Dr,Nr.prototype.set=Ur,zr.prototype.clear=qr,zr.prototype.delete=Kr,zr.prototype.get=Hr,zr.prototype.has=Vr,zr.prototype.set=Wr,$r.prototype.add=$r.prototype.push=Gr,$r.prototype.has=Yr,Jr.prototype.clear=Zr,Jr.prototype.delete=Xr,Jr.prototype.get=Qr,Jr.prototype.has=ei,Jr.prototype.set=ti;var wi=us(Ti),_i=us(ji,!0);function ki(e,t){var n=!0;return wi(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function Si(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],a=t(s);if(null!=a&&(u===o?a==a&&!Lc(a):n(a,u)))var u=a,l=s}return l}function Ei(e,t,n,r){var i=e.length;for(n=Wc(n),n<0&&(n=-n>i?0:i+n),r=r===o||r>i?i:Wc(r),r<0&&(r+=i),r=n>r?0:$c(r);n<r;)e[n++]=t;return e}function xi(e,t){var n=[];return wi(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Ci(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=ra),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Ci(a,t-1,n,r,i):In(i,a):r||(i[i.length]=a)}return i}var Ai=ls(),Ii=ls(!0);function Ti(e,t){return e&&Ai(e,t,_f)}function ji(e,t){return e&&Ii(e,t,_f)}function Oi(e,t){return En(t,function(t){return vc(e[t])})}function Pi(e,t){t=qo(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[Ta(t[n++])];return n&&n==r?e:o}function Bi(e,t,n){var r=t(e);return sc(e)?r:In(r,n(e))}function Ri(e){return null==e?e===o?ue:ee:It&&It in tt(e)?Ws(e):ya(e)}function Ni(e,t){return e>t}function Mi(e,t){return null!=e&&ct.call(e,t)}function Li(e,t){return null!=e&&t in tt(e)}function Fi(e,t,n){return e>=zt(t,n)&&e<Ut(t,n)}function Di(e,t,r){for(var i=r?Cn:xn,s=e[0].length,a=e.length,u=a,l=n(a),c=1/0,f=[];u--;){var h=e[u];u&&t&&(h=An(h,Gn(t))),c=zt(h.length,c),l[u]=!r&&(t||s>=120&&h.length>=120)?new $r(u&&h):o}h=e[0];var p=-1,d=l[0];e:for(;++p<s&&f.length<c;){var m=h[p],g=t?t(m):m;if(m=r||0!==m?m:0,!(d?Jn(d,g):i(f,g,r))){for(u=a;--u;){var y=l[u];if(!(y?Jn(y,g):i(e[u],g,r)))continue e}d&&d.push(g),f.push(m)}}return f}function Ui(e,t,n,r){return Ti(e,function(e,i,o){t(r,n(e),i,o)}),r}function zi(e,t,n){t=qo(t,e),e=va(e,t);var r=null==e?e:e[Ta(ru(t))];return null==r?o:vn(r,e,n)}function qi(e){return Sc(e)&&Ri(e)==K}function Ki(e){return Sc(e)&&Ri(e)==fe}function Hi(e){return Sc(e)&&Ri(e)==$}function Vi(e,t,n,r,i){return e===t||(null==e||null==t||!Sc(e)&&!Sc(t)?e!=e&&t!=t:Wi(e,t,n,r,Vi,i))}function Wi(e,t,n,r,i,o){var s=sc(e),a=sc(t),u=s?H:Ys(e),l=a?H:Ys(t);u=u==K?te:u,l=l==K?te:l;var c=u==te,f=l==te,h=u==l;if(h&&fc(e)){if(!fc(t))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new Jr),s||Fc(e)?Bs(e,t,n,r,i,o):Rs(e,t,u,n,r,i,o);if(!(n&g)){var p=c&&ct.call(e,"__wrapped__"),d=f&&ct.call(t,"__wrapped__");if(p||d){var m=p?e.value():e,y=d?t.value():t;return o||(o=new Jr),i(m,y,n,r,o)}}return!!h&&(o||(o=new Jr),Ns(e,t,n,r,i,o))}function $i(e){return Sc(e)&&Ys(e)==X}function Gi(e,t,n,r){var i=n.length,s=i,a=!r;if(null==e)return!s;for(e=tt(e);i--;){var u=n[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){u=n[i];var l=u[0],c=e[l],f=u[1];if(a&&u[2]){if(c===o&&!(l in e))return!1}else{var h=new Jr;if(r)var p=r(c,f,l,e,t,h);if(!(p===o?Vi(f,c,g|y,r,h):p))return!1}}return!0}function Yi(e){if(!kc(e)||la(e))return!1;var t=vc(e)?yt:Ye;return t.test(ja(e))}function Ji(e){return Sc(e)&&Ri(e)==ie}function Zi(e){return Sc(e)&&Ys(e)==oe}function Xi(e){return Sc(e)&&_c(e.length)&&!!Jt[Ri(e)]}function Qi(e){return"function"==typeof e?e:null==e?Th:"object"==typeof e?sc(e)?oo(e[0],e[1]):io(e):qh(e)}function eo(e){if(!fa(e))return Dt(e);var t=[];for(var n in tt(e))ct.call(e,n)&&"constructor"!=n&&t.push(n);return t}function to(e){if(!kc(e))return ga(e);var t=fa(e),n=[];for(var r in e)("constructor"!=r||!t&&ct.call(e,r))&&n.push(r);return n}function no(e,t){return e<t}function ro(e,t){var r=-1,i=uc(e)?n(e.length):[];return wi(e,function(e,n,o){i[++r]=t(e,n,o)}),i}function io(e){var t=Hs(e);return 1==t.length&&t[0][2]?pa(t[0][0],t[0][1]):function(n){return n===e||Gi(n,e,t)}}function oo(e,t){return sa(e)&&ha(t)?pa(Ta(e),t):function(n){var r=mf(n,e);return r===o&&r===t?yf(n,e):Vi(t,r,g|y)}}function so(e,t,n,r,i){e!==t&&Ai(t,function(s,a){if(kc(s))i||(i=new Jr),ao(e,t,a,n,so,r,i);else{var u=r?r(_a(e,a),s,a+"",e,t,i):o;u===o&&(u=s),si(e,a,u)}},kf)}function ao(e,t,n,r,i,s,a){var u=_a(e,n),l=_a(t,n),c=a.get(l);if(c)si(e,n,c);else{var f=s?s(u,l,n+"",e,t,a):o,h=f===o;if(h){var p=sc(l),d=!p&&fc(l),m=!p&&!d&&Fc(l);f=l,p||d||m?sc(u)?f=u:lc(u)?f=ns(u):d?(h=!1,f=Wo(l,!0)):m?(h=!1,f=Zo(l,!0)):f=[]:Pc(l)||oc(l)?(f=u,oc(u)?f=Yc(u):kc(u)&&!vc(u)||(f=ea(l))):h=!1}h&&(a.set(l,f),i(f,l,r,s,a),a.delete(l)),si(e,n,f)}}function uo(e,t){var n=e.length;if(n)return t+=t<0?n:0,ia(t,n)?e[t]:o}function lo(e,t,n){var r=-1;t=An(t.length?t:[Th],Gn(qs()));var i=ro(e,function(e,n,i){var o=An(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return Hn(i,function(e,t){return Qo(e,t,n)})}function co(e,t){return fo(e,t,function(t,n){return yf(e,n)})}function fo(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Pi(e,s);n(a,s)&&ko(o,qo(s,e),a)}return o}function ho(e){return function(t){return Pi(t,e)}}function po(e,t,n,r){var i=r?Fn:Ln,o=-1,s=t.length,a=e;for(e===t&&(t=ns(t)),n&&(a=An(e,Gn(n)));++o<s;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(a,c,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function mo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ia(i)?xt.call(e,i,1):Ro(e,i)}}return e}function go(e,t){return e+Rt(Wt()*(t-e+1))}function yo(e,t,r,i){for(var o=-1,s=Ut(Bt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}function bo(e,t){var n="";if(!e||t<1||t>M)return n;do{t%2&&(n+=e),t=Rt(t/2),t&&(e+=e)}while(t);return n}function vo(e,t){return Ea(ba(e,t,Th),e+"")}function wo(e){return ri(Uf(e))}function _o(e,t){var n=Uf(e);return Aa(n,di(t,0,n.length))}function ko(e,t,n,r){if(!kc(e))return e;t=qo(t,e);for(var i=-1,s=t.length,a=s-1,u=e;null!=u&&++i<s;){var l=Ta(t[i]),c=n;if(i!=a){var f=u[l];c=r?r(f,l,u):o,c===o&&(c=kc(f)?f:ia(t[i+1])?[]:{})}ai(u,l,c),u=u[l]}return e}var So=un?function(e,t){return un.set(e,t),e}:Th,Eo=Tt?function(e,t){return Tt(e,"toString",{configurable:!0,enumerable:!1,value:xh(t),writable:!0})}:Th;function xo(e){return Aa(Uf(e))}function Co(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function Ao(e,t){var n;return wi(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function Io(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=z){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Lc(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return To(e,t,Th,n)}function To(e,t,n,r){t=n(t);for(var i=0,s=null==e?0:e.length,a=t!=t,u=null===t,l=Lc(t),c=t===o;i<s;){var f=Rt((i+s)/2),h=n(e[f]),p=h!==o,d=null===h,m=h==h,g=Lc(h);if(a)var y=r||m;else y=c?m&&(r||p):u?m&&p&&(r||!d):l?m&&p&&!d&&(r||!g):!d&&!g&&(r?h<=t:h<t);y?i=f+1:s=f}return zt(s,U)}function jo(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!nc(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function Oo(e){return"number"==typeof e?e:Lc(e)?F:+e}function Po(e){if("string"==typeof e)return e;if(sc(e))return An(e,Po)+"";if(Lc(e))return br?br.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Bo(e,t,n){var r=-1,i=xn,o=e.length,s=!0,u=[],l=u;if(n)s=!1,i=Cn;else if(o>=a){var c=t?null:As(e);if(c)return cr(c);s=!1,i=Jn,l=new $r}else l=t?[]:u;e:for(;++r<o;){var f=e[r],h=t?t(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue e;t&&l.push(h),u.push(f)}else i(l,h,n)||(l!==u&&l.push(h),u.push(f))}return u}function Ro(e,t){return t=qo(t,e),e=va(e,t),null==e||delete e[Ta(ru(t))]}function No(e,t,n,r){return ko(e,t,n(Pi(e,t)),r)}function Mo(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Co(e,r?0:o,r?o+1:i):Co(e,r?o+1:0,r?i:o)}function Lo(e,t){var n=e;return n instanceof xr&&(n=n.value()),Tn(t,function(e,t){return t.func.apply(t.thisArg,In([e],t.args))},n)}function Fo(e,t,r){var i=e.length;if(i<2)return i?Bo(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=vi(s[o]||a,e[u],t,r));return Bo(Ci(s,1),t,r)}function Do(e,t,n){for(var r=-1,i=e.length,s=t.length,a={};++r<i;){var u=r<s?t[r]:o;n(a,e[r],u)}return a}function Uo(e){return lc(e)?e:[]}function zo(e){return"function"==typeof e?e:Th}function qo(e,t){return sc(e)?e:sa(e,t)?[e]:Ia(Zc(e))}var Ko=vo;function Ho(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:Co(e,t,n)}var Vo=jt||function(e){return an.clearTimeout(e)};function Wo(e,t){if(t)return e.slice();var n=e.length,r=_t?_t(n):new e.constructor(n);return e.copy(r),r}function $o(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Go(e,t){var n=t?$o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Yo(e){var t=new e.constructor(e.source,We.exec(e));return t.lastIndex=e.lastIndex,t}function Jo(e){return yr?tt(yr.call(e)):{}}function Zo(e,t){var n=t?$o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Xo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,s=Lc(e),a=t!==o,u=null===t,l=t==t,c=Lc(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!s&&!c&&e<t||c&&n&&i&&!r&&!s||u&&n&&i||!a&&i||!l)return-1}return 0}function Qo(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=Xo(i[r],o[r]);if(u){if(r>=a)return u;var l=n[r];return u*("desc"==l?-1:1)}}return e.index-t.index}function es(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,l=t.length,c=Ut(s-a,0),f=n(l+c),h=!i;++u<l;)f[u]=t[u];for(;++o<a;)(h||o<s)&&(f[r[o]]=e[o]);for(;c--;)f[u++]=e[o++];return f}function ts(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,l=-1,c=t.length,f=Ut(s-u,0),h=n(f+c),p=!i;++o<f;)h[o]=e[o];for(var d=o;++l<c;)h[d+l]=t[l];for(;++a<u;)(p||o<s)&&(h[d+r[a]]=e[o++]);return h}function ns(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function rs(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=r?r(n[u],e[u],u,n,e):o;l===o&&(l=e[u]),i?hi(n,u,l):ai(n,u,l)}return n}function is(e,t){return rs(e,$s(e),t)}function os(e,t){return rs(e,Gs(e),t)}function ss(e,t){return function(n,r){var i=sc(n)?wn:li,o=t?t():{};return i(n,e,qs(r,2),o)}}function as(e){return vo(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&oa(n[0],n[1],a)&&(s=i<3?o:s,i=1),t=tt(t);++r<i;){var u=n[r];u&&e(t,u,r,s)}return t})}function us(e,t){return function(n,r){if(null==n)return n;if(!uc(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=tt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function ls(e){return function(t,n,r){for(var i=-1,o=tt(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function cs(e,t,n){var r=t&b,i=ps(e);function o(){var t=this&&this!==an&&this instanceof o?i:e;return t.apply(r?n:this,arguments)}return o}function fs(e){return function(t){t=Zc(t);var n=ir(t)?mr(t):o,r=n?n[0]:t.charAt(0),i=n?Ho(n,1).join(""):t.slice(1);return r[e]()+i}}function hs(e){return function(t){return Tn(wh($f(t).replace(qt,"")),e,"")}}function ps(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=kr(e.prototype),r=e.apply(n,t);return kc(r)?r:n}}function ds(e,t,r){var i=ps(e);function s(){for(var a=arguments.length,u=n(a),l=a,c=zs(s);l--;)u[l]=arguments[l];var f=a<3&&u[0]!==c&&u[a-1]!==c?[]:lr(u,c);if(a-=f.length,a<r)return xs(e,t,ys,s.placeholder,o,u,f,o,o,r-a);var h=this&&this!==an&&this instanceof s?i:e;return vn(h,this,u)}return s}function ms(e){return function(t,n,r){var i=tt(t);if(!uc(t)){var s=qs(n,3);t=_f(t),n=function(e){return s(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[s?t[a]:a]:o}}function gs(e){return Ms(function(t){var n=t.length,r=n,i=Er.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new it(l);if(i&&!a&&"wrapper"==Us(s))var a=new Er([],!0)}for(r=a?r:n;++r<n;){s=t[r];var u=Us(s),c="wrapper"==u?Ds(s):o;a=c&&ua(c[0])&&c[1]==(x|_|S|C)&&!c[4].length&&1==c[9]?a[Us(c[0])].apply(a,c[3]):1==s.length&&ua(s)?a[u]():a.thru(s)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&sc(r))return a.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function ys(e,t,r,i,s,a,u,l,c,f){var h=t&x,p=t&b,d=t&v,m=t&(_|k),g=t&A,y=d?o:ps(e);function w(){for(var o=arguments.length,b=n(o),v=o;v--;)b[v]=arguments[v];if(m)var _=zs(w),k=Qn(b,_);if(i&&(b=es(b,i,s,m)),a&&(b=ts(b,a,u,m)),o-=k,m&&o<f){var S=lr(b,_);return xs(e,t,ys,w.placeholder,r,b,S,l,c,f-o)}var E=p?r:this,x=d?E[e]:e;return o=b.length,l?b=wa(b,l):g&&o>1&&b.reverse(),h&&c<o&&(b.length=c),this&&this!==an&&this instanceof w&&(x=y||ps(x)),x.apply(E,b)}return w}function bs(e,t){return function(n,r){return Ui(n,e,t(r),{})}}function vs(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Po(n),r=Po(r)):(n=Oo(n),r=Oo(r)),i=e(n,r)}return i}}function ws(e){return Ms(function(t){return t=An(t,Gn(qs())),vo(function(n){var r=this;return e(t,function(e){return vn(e,r,n)})})})}function _s(e,t){t=t===o?" ":Po(t);var n=t.length;if(n<2)return n?bo(t,e):t;var r=bo(t,Bt(e/dr(t)));return ir(t)?Ho(mr(r),0,e).join(""):r.slice(0,e)}function ks(e,t,r,i){var o=t&b,s=ps(e);function a(){for(var t=-1,u=arguments.length,l=-1,c=i.length,f=n(c+u),h=this&&this!==an&&this instanceof a?s:e;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++t];return vn(h,o?r:this,f)}return a}function Ss(e){return function(t,n,r){return r&&"number"!=typeof r&&oa(t,n,r)&&(n=r=o),t=Vc(t),n===o?(n=t,t=0):n=Vc(n),r=r===o?t<n?1:-1:Vc(r),yo(t,n,r,e)}}function Es(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Gc(t),n=Gc(n)),e(t,n)}}function xs(e,t,n,r,i,s,a,u,l,c){var f=t&_,h=f?a:o,p=f?o:a,d=f?s:o,m=f?o:s;t|=f?S:E,t&=~(f?E:S),t&w||(t&=~(b|v));var g=[e,t,i,d,h,m,p,u,l,c],y=n.apply(o,g);return ua(e)&&ka(y,g),y.placeholder=r,xa(y,e,t)}function Cs(e){var t=Ke[e];return function(e,n){if(e=Gc(e),n=null==n?0:zt(Wc(n),292),n){var r=(Zc(e)+"e").split("e"),i=t(r[0]+"e"+(+r[1]+n));return r=(Zc(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}var As=tn&&1/cr(new tn([,-0]))[1]==N?function(e){return new tn(e)}:Lh;function Is(e){return function(t){var n=Ys(t);return n==X?ar(t):n==oe?fr(t):$n(t,e(t))}}function Ts(e,t,n,r,i,s,a,u){var c=t&v;if(!c&&"function"!=typeof e)throw new it(l);var f=r?r.length:0;if(f||(t&=~(S|E),r=i=o),a=a===o?a:Ut(Wc(a),0),u=u===o?u:Wc(u),f-=i?i.length:0,t&E){var h=r,p=i;r=i=o}var d=c?o:Ds(e),m=[e,t,n,r,i,h,p,s,a,u];if(d&&ma(m,d),e=m[0],t=m[1],n=m[2],r=m[3],i=m[4],u=m[9]=m[9]===o?c?0:e.length:Ut(m[9]-f,0),!u&&t&(_|k)&&(t&=~(_|k)),t&&t!=b)g=t==_||t==k?ds(e,t,u):t!=S&&t!=(b|S)||i.length?ys.apply(o,m):ks(e,t,n,r);else var g=cs(e,t,n);var y=d?So:ka;return xa(y(g,m),e,t)}function js(e,t,n,r){return e===o||nc(e,at[n])&&!ct.call(r,n)?t:e}function Os(e,t,n,r,i,s){return kc(e)&&kc(t)&&(s.set(t,e),so(e,t,o,Os,s),s.delete(t)),e}function Ps(e){return Pc(e)?o:e}function Bs(e,t,n,r,i,s){var a=n&g,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var f=-1,h=!0,p=n&y?new $r:o;for(s.set(e,t),s.set(t,e);++f<u;){var d=e[f],m=t[f];if(r)var b=a?r(m,d,f,t,e,s):r(d,m,f,e,t,s);if(b!==o){if(b)continue;h=!1;break}if(p){if(!On(t,function(e,t){if(!Jn(p,t)&&(d===e||i(d,e,n,r,s)))return p.push(t)})){h=!1;break}}else if(d!==m&&!i(d,m,n,r,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function Rs(e,t,n,r,i,o,s){switch(n){case he:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fe:return!(e.byteLength!=t.byteLength||!o(new wt(e),new wt(t)));case W:case $:case Q:return nc(+e,+t);case Y:return e.name==t.name&&e.message==t.message;case ie:case se:return e==t+"";case X:var a=ar;case oe:var u=r&g;if(a||(a=cr),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;r|=y,s.set(e,t);var c=Bs(a(e),a(t),r,i,o,s);return s.delete(e),c;case ae:if(yr)return yr.call(e)==yr.call(t)}return!1}function Ns(e,t,n,r,i,s){var a=n&g,u=Ls(e),l=u.length,c=Ls(t),f=c.length;if(l!=f&&!a)return!1;for(var h=l;h--;){var p=u[h];if(!(a?p in t:ct.call(t,p)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var m=!0;s.set(e,t),s.set(t,e);for(var y=a;++h<l;){p=u[h];var b=e[p],v=t[p];if(r)var w=a?r(v,b,p,t,e,s):r(b,v,p,e,t,s);if(!(w===o?b===v||i(b,v,n,r,s):w)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var _=e.constructor,k=t.constructor;_!=k&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof k&&k instanceof k)&&(m=!1)}return s.delete(e),s.delete(t),m}function Ms(e){return Ea(ba(e,o,Wa),e+"")}function Ls(e){return Bi(e,_f,$s)}function Fs(e){return Bi(e,kf,Gs)}var Ds=un?function(e){return un.get(e)}:Lh;function Us(e){for(var t=e.name+"",n=ln[t],r=ct.call(ln,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function zs(e){var t=ct.call(wr,"placeholder")?wr:e;return t.placeholder}function qs(){var e=wr.iteratee||jh;return e=e===jh?Qi:e,arguments.length?e(arguments[0],arguments[1]):e}function Ks(e,t){var n=e.__data__;return aa(t)?n["string"==typeof t?"string":"hash"]:n.map}function Hs(e){for(var t=_f(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ha(i)]}return t}function Vs(e,t){var n=rr(e,t);return Yi(n)?n:o}function Ws(e){var t=ct.call(e,It),n=e[It];try{e[It]=o;var r=!0}catch(e){}var i=dt.call(e);return r&&(t?e[It]=n:delete e[It]),i}var $s=Nt?function(e){return null==e?[]:(e=tt(e),En(Nt(e),function(t){return Et.call(e,t)}))}:Wh,Gs=Nt?function(e){for(var t=[];e;)In(t,$s(e)),e=kt(e);return t}:Wh,Ys=Ri;function Js(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=zt(t,e+s);break;case"takeRight":e=Ut(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(ze);return t?t[1].split(qe):[]}function Xs(e,t,n){t=qo(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=Ta(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=null==e?0:e.length,!!i&&_c(i)&&ia(s,i)&&(sc(e)||oc(e)))}function Qs(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ct.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ea(e){return"function"!=typeof e.constructor||fa(e)?{}:kr(kt(e))}function ta(e,t,n){var r=e.constructor;switch(t){case fe:return $o(e);case W:case $:return new r(+e);case he:return Go(e,n);case pe:case de:case me:case ge:case ye:case be:case ve:case we:case _e:return Zo(e,n);case X:return new r;case Q:case se:return new r(e);case ie:return Yo(e);case oe:return new r;case ae:return Jo(e)}}function na(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ue,"{\n/* [wrapped with "+t+"] */\n")}function ra(e){return sc(e)||oc(e)||!!(Ct&&e&&e[Ct])}function ia(e,t){var n=typeof e;return t=null==t?M:t,!!t&&("number"==n||"symbol"!=n&&Ze.test(e))&&e>-1&&e%1==0&&e<t}function oa(e,t,n){if(!kc(n))return!1;var r=typeof t;return!!("number"==r?uc(n)&&ia(t,n.length):"string"==r&&t in n)&&nc(n[t],e)}function sa(e,t){if(sc(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Lc(e))||(Be.test(e)||!Pe.test(e)||null!=t&&e in tt(t))}function aa(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function ua(e){var t=Us(e),n=wr[t];if("function"!=typeof n||!(t in xr.prototype))return!1;if(e===n)return!0;var r=Ds(n);return!!r&&e===r[0]}function la(e){return!!ht&&ht in e}(Xt&&Ys(new Xt(new ArrayBuffer(1)))!=he||Qt&&Ys(new Qt)!=X||en&&Ys(en.resolve())!=ne||tn&&Ys(new tn)!=oe||on&&Ys(new on)!=le)&&(Ys=function(e){var t=Ri(e),n=t==te?e.constructor:o,r=n?ja(n):"";if(r)switch(r){case fn:return he;case hn:return X;case Pn:return ne;case Bn:return oe;case qn:return le}return t});var ca=ut?vc:$h;function fa(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||at;return e===n}function ha(e){return e==e&&!kc(e)}function pa(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in tt(n)))}}function da(e){var t=Fl(e,function(e){return n.size===f&&n.clear(),e}),n=t.cache;return t}function ma(e,t){var n=e[1],r=t[1],i=n|r,o=i<(b|v|x),s=r==x&&n==_||r==x&&n==C&&e[7].length<=t[8]||r==(x|C)&&t[7].length<=t[8]&&n==_;if(!o&&!s)return e;r&b&&(e[2]=t[2],i|=n&b?0:w);var a=t[3];if(a){var u=e[3];e[3]=u?es(u,a,t[4]):a,e[4]=u?lr(e[3],h):t[4]}return a=t[5],a&&(u=e[5],e[5]=u?ts(u,a,t[6]):a,e[6]=u?lr(e[5],h):t[6]),a=t[7],a&&(e[7]=a),r&x&&(e[8]=null==e[8]?t[8]:zt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ga(e){var t=[];if(null!=e)for(var n in tt(e))t.push(n);return t}function ya(e){return dt.call(e)}function ba(e,t,r){return t=Ut(t===o?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=Ut(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),vn(e,this,u)}}function va(e,t){return t.length<2?e:Pi(e,Co(t,0,-1))}function wa(e,t){for(var n=e.length,r=zt(t.length,n),i=ns(e);r--;){var s=t[r];e[r]=ia(s,n)?i[s]:o}return e}function _a(e,t){if("__proto__"!=t)return e[t]}var ka=Ca(So),Sa=Pt||function(e,t){return an.setTimeout(e,t)},Ea=Ca(Eo);function xa(e,t,n){var r=t+"";return Ea(e,na(r,Oa(Zs(r),n)))}function Ca(e){var t=0,n=0;return function(){var r=Ht(),i=O-(r-n);if(n=r,i>0){if(++t>=j)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Aa(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var s=go(n,i),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Ia=da(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Re,function(e,n,r,i){t.push(r?i.replace(He,"$1"):n||e)}),t});function Ta(e){if("string"==typeof e||Lc(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function ja(e){if(null!=e){try{return lt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oa(e,t){return _n(q,function(n){var r="_."+n[0];t&n[1]&&!xn(e,r)&&e.push(r)}),e.sort()}function Pa(e){if(e instanceof xr)return e.clone();var t=new Er(e.__wrapped__,e.__chain__);return t.__actions__=ns(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ba(e,t,r){t=(r?oa(e,t,r):t===o)?1:Ut(Wc(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,u=n(Bt(i/t));s<i;)u[a++]=Co(e,s,s+=t);return u}function Ra(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Na(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return In(sc(r)?ns(r):[r],Ci(t,1))}var Ma=vo(function(e,t){return lc(e)?vi(e,Ci(t,1,lc,!0)):[]}),La=vo(function(e,t){var n=ru(t);return lc(n)&&(n=o),lc(e)?vi(e,Ci(t,1,lc,!0),qs(n,2)):[]}),Fa=vo(function(e,t){var n=ru(t);return lc(n)&&(n=o),lc(e)?vi(e,Ci(t,1,lc,!0),o,n):[]});function Da(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===o?1:Wc(t),Co(e,t<0?0:t,r)):[]}function Ua(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===o?1:Wc(t),t=r-t,Co(e,0,t<0?0:t)):[]}function za(e,t){return e&&e.length?Mo(e,qs(t,3),!0,!0):[]}function qa(e,t){return e&&e.length?Mo(e,qs(t,3),!0):[]}function Ka(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oa(e,t,n)&&(n=0,r=i),Ei(e,t,n,r)):[]}function Ha(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wc(n);return i<0&&(i=Ut(r+i,0)),Mn(e,qs(t,3),i)}function Va(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=Wc(n),i=n<0?Ut(r+i,0):zt(i,r-1)),Mn(e,qs(t,3),i,!0)}function Wa(e){var t=null==e?0:e.length;return t?Ci(e,1):[]}function $a(e){var t=null==e?0:e.length;return t?Ci(e,N):[]}function Ga(e,t){var n=null==e?0:e.length;return n?(t=t===o?1:Wc(t),Ci(e,t)):[]}function Ya(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Ja(e){return e&&e.length?e[0]:o}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wc(n);return i<0&&(i=Ut(r+i,0)),Ln(e,t,i)}function Xa(e){var t=null==e?0:e.length;return t?Co(e,0,-1):[]}var Qa=vo(function(e){var t=An(e,Uo);return t.length&&t[0]===e[0]?Di(t):[]}),eu=vo(function(e){var t=ru(e),n=An(e,Uo);return t===ru(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Di(n,qs(t,2)):[]}),tu=vo(function(e){var t=ru(e),n=An(e,Uo);return t="function"==typeof t?t:o,t&&n.pop(),n.length&&n[0]===e[0]?Di(n,o,t):[]});function nu(e,t){return null==e?"":Ft.call(e,t)}function ru(e){var t=null==e?0:e.length;return t?e[t-1]:o}function iu(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=Wc(n),i=i<0?Ut(r+i,0):zt(i,r-1)),t==t?pr(e,t,i):Mn(e,Dn,i,!0)}function ou(e,t){return e&&e.length?uo(e,Wc(t)):o}var su=vo(au);function au(e,t){return e&&e.length&&t&&t.length?po(e,t):e}function uu(e,t,n){return e&&e.length&&t&&t.length?po(e,t,qs(n,2)):e}function lu(e,t,n){return e&&e.length&&t&&t.length?po(e,t,o,n):e}var cu=Ms(function(e,t){var n=null==e?0:e.length,r=pi(e,t);return mo(e,An(t,function(e){return ia(e,n)?+e:e}).sort(Xo)),r});function fu(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=qs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return mo(e,i),n}function hu(e){return null==e?e:$t.call(e)}function pu(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&oa(e,t,n)?(t=0,n=r):(t=null==t?0:Wc(t),n=n===o?r:Wc(n)),Co(e,t,n)):[]}function du(e,t){return Io(e,t)}function mu(e,t,n){return To(e,t,qs(n,2))}function gu(e,t){var n=null==e?0:e.length;if(n){var r=Io(e,t);if(r<n&&nc(e[r],t))return r}return-1}function yu(e,t){return Io(e,t,!0)}function bu(e,t,n){return To(e,t,qs(n,2),!0)}function vu(e,t){var n=null==e?0:e.length;if(n){var r=Io(e,t,!0)-1;if(nc(e[r],t))return r}return-1}function wu(e){return e&&e.length?jo(e):[]}function _u(e,t){return e&&e.length?jo(e,qs(t,2)):[]}function ku(e){var t=null==e?0:e.length;return t?Co(e,1,t):[]}function Su(e,t,n){return e&&e.length?(t=n||t===o?1:Wc(t),Co(e,0,t<0?0:t)):[]}function Eu(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===o?1:Wc(t),t=r-t,Co(e,t<0?0:t,r)):[]}function xu(e,t){return e&&e.length?Mo(e,qs(t,3),!1,!0):[]}function Cu(e,t){return e&&e.length?Mo(e,qs(t,3)):[]}var Au=vo(function(e){return Bo(Ci(e,1,lc,!0))}),Iu=vo(function(e){var t=ru(e);return lc(t)&&(t=o),Bo(Ci(e,1,lc,!0),qs(t,2))}),Tu=vo(function(e){var t=ru(e);return t="function"==typeof t?t:o,Bo(Ci(e,1,lc,!0),o,t)});function ju(e){return e&&e.length?Bo(e):[]}function Ou(e,t){return e&&e.length?Bo(e,qs(t,2)):[]}function Pu(e,t){return t="function"==typeof t?t:o,e&&e.length?Bo(e,o,t):[]}function Bu(e){if(!e||!e.length)return[];var t=0;return e=En(e,function(e){if(lc(e))return t=Ut(e.length,t),!0}),Wn(t,function(t){return An(e,zn(t))})}function Ru(e,t){if(!e||!e.length)return[];var n=Bu(e);return null==t?n:An(n,function(e){return vn(t,o,e)})}var Nu=vo(function(e,t){return lc(e)?vi(e,t):[]}),Mu=vo(function(e){return Fo(En(e,lc))}),Lu=vo(function(e){var t=ru(e);return lc(t)&&(t=o),Fo(En(e,lc),qs(t,2))}),Fu=vo(function(e){var t=ru(e);return t="function"==typeof t?t:o,Fo(En(e,lc),o,t)}),Du=vo(Bu);function Uu(e,t){return Do(e||[],t||[],ai)}function zu(e,t){return Do(e||[],t||[],ko)}var qu=vo(function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Ru(e,n)});function Ku(e){var t=wr(e);return t.__chain__=!0,t}function Hu(e,t){return t(e),e}function Vu(e,t){return t(e)}var Wu=Ms(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return pi(t,e)};return!(t>1||this.__actions__.length)&&r instanceof xr&&ia(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Vu,args:[i],thisArg:o}),new Er(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)});function $u(){return Ku(this)}function Gu(){return new Er(this.value(),this.__chain__)}function Yu(){this.__values__===o&&(this.__values__=Hc(this.value()));var e=this.__index__>=this.__values__.length,t=e?o:this.__values__[this.__index__++];return{done:e,value:t}}function Ju(){return this}function Zu(e){for(var t,n=this;n instanceof Sr;){var r=Pa(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function Xu(){var e=this.__wrapped__;if(e instanceof xr){var t=e;return this.__actions__.length&&(t=new xr(this)),t=t.reverse(),t.__actions__.push({func:Vu,args:[hu],thisArg:o}),new Er(t,this.__chain__)}return this.thru(hu)}function Qu(){return Lo(this.__wrapped__,this.__actions__)}var el=ss(function(e,t,n){ct.call(e,n)?++e[n]:hi(e,n,1)});function tl(e,t,n){var r=sc(e)?Sn:ki;return n&&oa(e,t,n)&&(t=o),r(e,qs(t,3))}function nl(e,t){var n=sc(e)?En:xi;return n(e,qs(t,3))}var rl=ms(Ha),il=ms(Va);function ol(e,t){return Ci(dl(e,t),1)}function sl(e,t){return Ci(dl(e,t),N)}function al(e,t,n){return n=n===o?1:Wc(n),Ci(dl(e,t),n)}function ul(e,t){var n=sc(e)?_n:wi;return n(e,qs(t,3))}function ll(e,t){var n=sc(e)?kn:_i;return n(e,qs(t,3))}var cl=ss(function(e,t,n){ct.call(e,n)?e[n].push(t):hi(e,n,[t])});function fl(e,t,n,r){e=uc(e)?e:Uf(e),n=n&&!r?Wc(n):0;var i=e.length;return n<0&&(n=Ut(i+n,0)),Mc(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ln(e,t,n)>-1}var hl=vo(function(e,t,r){var i=-1,o="function"==typeof t,s=uc(e)?n(e.length):[];return wi(e,function(e){s[++i]=o?vn(t,e,r):zi(e,t,r)}),s}),pl=ss(function(e,t,n){hi(e,n,t)});function dl(e,t){var n=sc(e)?An:ro;return n(e,qs(t,3))}function ml(e,t,n,r){return null==e?[]:(sc(t)||(t=null==t?[]:[t]),n=r?o:n,sc(n)||(n=null==n?[]:[n]),lo(e,t,n))}var gl=ss(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function yl(e,t,n){var r=sc(e)?Tn:Kn,i=arguments.length<3;return r(e,qs(t,4),n,i,wi)}function bl(e,t,n){var r=sc(e)?jn:Kn,i=arguments.length<3;return r(e,qs(t,4),n,i,_i)}function vl(e,t){var n=sc(e)?En:xi;return n(e,Dl(qs(t,3)))}function wl(e){var t=sc(e)?ri:wo;return t(e)}function _l(e,t,n){t=(n?oa(e,t,n):t===o)?1:Wc(t);var r=sc(e)?ii:_o;return r(e,t)}function kl(e){var t=sc(e)?oi:xo;return t(e)}function Sl(e){if(null==e)return 0;if(uc(e))return Mc(e)?dr(e):e.length;var t=Ys(e);return t==X||t==oe?e.size:eo(e).length}function El(e,t,n){var r=sc(e)?On:Ao;return n&&oa(e,t,n)&&(t=o),r(e,qs(t,3))}var xl=vo(function(e,t){if(null==e)return[];var n=t.length;return n>1&&oa(e,t[0],t[1])?t=[]:n>2&&oa(t[0],t[1],t[2])&&(t=[t[0]]),lo(e,Ci(t,1),[])}),Cl=Ot||function(){return an.Date.now()};function Al(e,t){if("function"!=typeof t)throw new it(l);return e=Wc(e),function(){if(--e<1)return t.apply(this,arguments)}}function Il(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ts(e,x,o,o,o,o,t)}function Tl(e,t){var n;if("function"!=typeof t)throw new it(l);return e=Wc(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var jl=vo(function(e,t,n){var r=b;if(n.length){var i=lr(n,zs(jl));r|=S}return Ts(e,r,t,n,i)}),Ol=vo(function(e,t,n){var r=b|v;if(n.length){var i=lr(n,zs(Ol));r|=S}return Ts(t,r,e,n,i)});function Pl(e,t,n){t=n?o:t;var r=Ts(e,_,o,o,o,o,o,t);return r.placeholder=Pl.placeholder,r}function Bl(e,t,n){t=n?o:t;var r=Ts(e,k,o,o,o,o,o,t);return r.placeholder=Bl.placeholder,r}function Rl(e,t,n){var r,i,s,a,u,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof e)throw new it(l);function m(t){var n=r,s=i;return r=i=o,f=t,a=e.apply(s,n),a}function g(e){return f=e,u=Sa(v,t),h?m(e):a}function y(e){var n=e-c,r=e-f,i=t-n;return p?zt(i,s-r):i}function b(e){var n=e-c,r=e-f;return c===o||n>=t||n<0||p&&r>=s}function v(){var e=Cl();if(b(e))return w(e);u=Sa(v,y(e))}function w(e){return u=o,d&&r?m(e):(r=i=o,a)}function _(){u!==o&&Vo(u),f=0,r=c=i=u=o}function k(){return u===o?a:w(Cl())}function S(){var e=Cl(),n=b(e);if(r=arguments,i=this,c=e,n){if(u===o)return g(c);if(p)return u=Sa(v,t),m(c)}return u===o&&(u=Sa(v,t)),a}return t=Gc(t)||0,kc(n)&&(h=!!n.leading,p="maxWait"in n,s=p?Ut(Gc(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),S.cancel=_,S.flush=k,S}var Nl=vo(function(e,t){return bi(e,1,t)}),Ml=vo(function(e,t,n){return bi(e,Gc(t)||0,n)});function Ll(e){return Ts(e,A)}function Fl(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(l);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fl.Cache||zr),n}function Dl(e){if("function"!=typeof e)throw new it(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ul(e){return Tl(2,e)}Fl.Cache=zr;var zl=Ko(function(e,t){t=1==t.length&&sc(t[0])?An(t[0],Gn(qs())):An(Ci(t,1),Gn(qs()));var n=t.length;return vo(function(r){for(var i=-1,o=zt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return vn(e,this,r)})}),ql=vo(function(e,t){var n=lr(t,zs(ql));return Ts(e,S,o,t,n)}),Kl=vo(function(e,t){var n=lr(t,zs(Kl));return Ts(e,E,o,t,n)}),Hl=Ms(function(e,t){return Ts(e,C,o,o,o,t)});function Vl(e,t){if("function"!=typeof e)throw new it(l);return t=t===o?t:Wc(t),vo(e,t)}function Wl(e,t){if("function"!=typeof e)throw new it(l);return t=null==t?0:Ut(Wc(t),0),vo(function(n){var r=n[t],i=Ho(n,0,t);return r&&In(i,r),vn(e,this,i)})}function $l(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(l);return kc(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Rl(e,t,{leading:r,maxWait:t,trailing:i})}function Gl(e){return Il(e,1)}function Yl(e,t){return ql(zo(t),e)}function Jl(){if(!arguments.length)return[];var e=arguments[0];return sc(e)?e:[e]}function Zl(e){return mi(e,m)}function Xl(e,t){return t="function"==typeof t?t:o,mi(e,m,t)}function Ql(e){return mi(e,p|m)}function ec(e,t){return t="function"==typeof t?t:o,mi(e,p|m,t)}function tc(e,t){return null==t||yi(e,t,_f(t))}function nc(e,t){return e===t||e!=e&&t!=t}var rc=Es(Ni),ic=Es(function(e,t){return e>=t}),oc=qi(function(){return arguments}())?qi:function(e){return Sc(e)&&ct.call(e,"callee")&&!Et.call(e,"callee")},sc=n.isArray,ac=pn?Gn(pn):Ki;function uc(e){return null!=e&&_c(e.length)&&!vc(e)}function lc(e){return Sc(e)&&uc(e)}function cc(e){return!0===e||!1===e||Sc(e)&&Ri(e)==W}var fc=Mt||$h,hc=dn?Gn(dn):Hi;function pc(e){return Sc(e)&&1===e.nodeType&&!Pc(e)}function dc(e){if(null==e)return!0;if(uc(e)&&(sc(e)||"string"==typeof e||"function"==typeof e.splice||fc(e)||Fc(e)||oc(e)))return!e.length;var t=Ys(e);if(t==X||t==oe)return!e.size;if(fa(e))return!eo(e).length;for(var n in e)if(ct.call(e,n))return!1;return!0}function mc(e,t){return Vi(e,t)}function gc(e,t,n){n="function"==typeof n?n:o;var r=n?n(e,t):o;return r===o?Vi(e,t,o,n):!!r}function yc(e){if(!Sc(e))return!1;var t=Ri(e);return t==Y||t==G||"string"==typeof e.message&&"string"==typeof e.name&&!Pc(e)}function bc(e){return"number"==typeof e&&Lt(e)}function vc(e){if(!kc(e))return!1;var t=Ri(e);return t==J||t==Z||t==V||t==re}function wc(e){return"number"==typeof e&&e==Wc(e)}function _c(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=M}function kc(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Sc(e){return null!=e&&"object"==typeof e}var Ec=mn?Gn(mn):$i;function xc(e,t){return e===t||Gi(e,t,Hs(t))}function Cc(e,t,n){return n="function"==typeof n?n:o,Gi(e,t,Hs(t),n)}function Ac(e){return Oc(e)&&e!=+e}function Ic(e){if(ca(e))throw new i(u);return Yi(e)}function Tc(e){return null===e}function jc(e){return null==e}function Oc(e){return"number"==typeof e||Sc(e)&&Ri(e)==Q}function Pc(e){if(!Sc(e)||Ri(e)!=te)return!1;var t=kt(e);if(null===t)return!0;var n=ct.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&lt.call(n)==mt}var Bc=gn?Gn(gn):Ji;function Rc(e){return wc(e)&&e>=-M&&e<=M}var Nc=yn?Gn(yn):Zi;function Mc(e){return"string"==typeof e||!sc(e)&&Sc(e)&&Ri(e)==se}function Lc(e){return"symbol"==typeof e||Sc(e)&&Ri(e)==ae}var Fc=bn?Gn(bn):Xi;function Dc(e){return e===o}function Uc(e){return Sc(e)&&Ys(e)==le}function zc(e){return Sc(e)&&Ri(e)==ce}var qc=Es(no),Kc=Es(function(e,t){return e<=t});function Hc(e){if(!e)return[];if(uc(e))return Mc(e)?mr(e):ns(e);if(At&&e[At])return sr(e[At]());var t=Ys(e),n=t==X?ar:t==oe?cr:Uf;return n(e)}function Vc(e){if(!e)return 0===e?e:0;if(e=Gc(e),e===N||e===-N){var t=e<0?-1:1;return t*L}return e==e?e:0}function Wc(e){var t=Vc(e),n=t%1;return t==t?n?t-n:t:0}function $c(e){return e?di(Wc(e),0,D):0}function Gc(e){if("number"==typeof e)return e;if(Lc(e))return F;if(kc(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=kc(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Le,"");var n=Ge.test(e);return n||Je.test(e)?rn(e.slice(2),n?2:8):$e.test(e)?F:+e}function Yc(e){return rs(e,kf(e))}function Jc(e){return e?di(Wc(e),-M,M):0===e?e:0}function Zc(e){return null==e?"":Po(e)}var Xc=as(function(e,t){if(fa(t)||uc(t))rs(t,_f(t),e);else for(var n in t)ct.call(t,n)&&ai(e,n,t[n])}),Qc=as(function(e,t){rs(t,kf(t),e)}),ef=as(function(e,t,n,r){rs(t,kf(t),e,r)}),tf=as(function(e,t,n,r){rs(t,_f(t),e,r)}),nf=Ms(pi);function rf(e,t){var n=kr(e);return null==t?n:ci(n,t)}var of=vo(function(e,t){e=tt(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&oa(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],a=kf(s),u=-1,l=a.length;++u<l;){var c=a[u],f=e[c];(f===o||nc(f,at[c])&&!ct.call(e,c))&&(e[c]=s[c])}return e}),sf=vo(function(e){return e.push(o,Os),vn(Cf,o,e)});function af(e,t){return Nn(e,qs(t,3),Ti)}function uf(e,t){return Nn(e,qs(t,3),ji)}function lf(e,t){return null==e?e:Ai(e,qs(t,3),kf)}function cf(e,t){return null==e?e:Ii(e,qs(t,3),kf)}function ff(e,t){return e&&Ti(e,qs(t,3))}function hf(e,t){return e&&ji(e,qs(t,3))}function pf(e){return null==e?[]:Oi(e,_f(e))}function df(e){return null==e?[]:Oi(e,kf(e))}function mf(e,t,n){var r=null==e?o:Pi(e,t);return r===o?n:r}function gf(e,t){return null!=e&&Xs(e,t,Mi)}function yf(e,t){return null!=e&&Xs(e,t,Li)}var bf=bs(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=dt.call(t)),e[t]=n},xh(Th)),vf=bs(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=dt.call(t)),ct.call(e,t)?e[t].push(n):e[t]=[n]},qs),wf=vo(zi);function _f(e){return uc(e)?ni(e):eo(e)}function kf(e){return uc(e)?ni(e,!0):to(e)}function Sf(e,t){var n={};return t=qs(t,3),Ti(e,function(e,r,i){hi(n,t(e,r,i),e)}),n}function Ef(e,t){var n={};return t=qs(t,3),Ti(e,function(e,r,i){hi(n,r,t(e,r,i))}),n}var xf=as(function(e,t,n){so(e,t,n)}),Cf=as(function(e,t,n,r){so(e,t,n,r)}),Af=Ms(function(e,t){var n={};if(null==e)return n;var r=!1;t=An(t,function(t){return t=qo(t,e),r||(r=t.length>1),t}),rs(e,Fs(e),n),r&&(n=mi(n,p|d|m,Ps));for(var i=t.length;i--;)Ro(n,t[i]);return n});function If(e,t){return jf(e,Dl(qs(t)))}var Tf=Ms(function(e,t){return null==e?{}:co(e,t)});function jf(e,t){if(null==e)return{};var n=An(Fs(e),function(e){return[e]});return t=qs(t),fo(e,n,function(e,n){return t(e,n[0])})}function Of(e,t,n){t=qo(t,e);var r=-1,i=t.length;for(i||(i=1,e=o);++r<i;){var s=null==e?o:e[Ta(t[r])];s===o&&(r=i,s=n),e=vc(s)?s.call(e):s}return e}function Pf(e,t,n){return null==e?e:ko(e,t,n)}function Bf(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ko(e,t,n,r)}var Rf=Is(_f),Nf=Is(kf);function Mf(e,t,n){var r=sc(e),i=r||fc(e)||Fc(e);if(t=qs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:kc(e)&&vc(o)?kr(kt(e)):{}}return(i?_n:Ti)(e,function(e,r,i){return t(n,e,r,i)}),n}function Lf(e,t){return null==e||Ro(e,t)}function Ff(e,t,n){return null==e?e:No(e,t,zo(n))}function Df(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:No(e,t,zo(n),r)}function Uf(e){return null==e?[]:Yn(e,_f(e))}function zf(e){return null==e?[]:Yn(e,kf(e))}function qf(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=Gc(n),n=n==n?n:0),t!==o&&(t=Gc(t),t=t==t?t:0),di(Gc(e),t,n)}function Kf(e,t,n){return t=Vc(t),n===o?(n=t,t=0):n=Vc(n),e=Gc(e),Fi(e,t,n)}function Hf(e,t,n){if(n&&"boolean"!=typeof n&&oa(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=Vc(e),t===o?(t=e,e=0):t=Vc(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Wt();return zt(e+i*(t-e+nn("1e-"+((i+"").length-1))),t)}return go(e,t)}var Vf=hs(function(e,t,n){return t=t.toLowerCase(),e+(n?Wf(t):t)});function Wf(e){return vh(Zc(e).toLowerCase())}function $f(e){return e=Zc(e),e&&e.replace(Xe,er).replace(Kt,"")}function Gf(e,t,n){e=Zc(e),t=Po(t);var r=e.length;n=n===o?r:di(Wc(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function Yf(e){return e=Zc(e),e&&Ie.test(e)?e.replace(Ce,tr):e}function Jf(e){return e=Zc(e),e&&Me.test(e)?e.replace(Ne,"\\$&"):e}var Zf=hs(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Xf=hs(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Qf=fs("toLowerCase");function eh(e,t,n){e=Zc(e),t=Wc(t);var r=t?dr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return _s(Rt(i),n)+e+_s(Bt(i),n)}function th(e,t,n){e=Zc(e),t=Wc(t);var r=t?dr(e):0;return t&&r<t?e+_s(t-r,n):e}function nh(e,t,n){e=Zc(e),t=Wc(t);var r=t?dr(e):0;return t&&r<t?_s(t-r,n)+e:e}function rh(e,t,n){return n||null==t?t=0:t&&(t=+t),Vt(Zc(e).replace(Fe,""),t||0)}function ih(e,t,n){return t=(n?oa(e,t,n):t===o)?1:Wc(t),bo(Zc(e),t)}function oh(){var e=arguments,t=Zc(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var sh=hs(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function ah(e,t,n){return n&&"number"!=typeof n&&oa(e,t,n)&&(t=n=o),n=n===o?D:n>>>0,n?(e=Zc(e),e&&("string"==typeof t||null!=t&&!Bc(t))&&(t=Po(t),!t&&ir(e))?Ho(mr(e),0,n):e.split(t,n)):[]}var uh=hs(function(e,t,n){return e+(n?" ":"")+vh(t)});function lh(e,t,n){return e=Zc(e),n=null==n?0:di(Wc(n),0,e.length),t=Po(t),e.slice(n,n+t.length)==t}function ch(e,t,n){var r=wr.templateSettings;n&&oa(e,t,n)&&(t=o),e=Zc(e),t=ef({},t,r,js);var i=ef({},t.imports,r.imports,js),s=_f(i),a=Yn(i,s),u,l,c=0,f=t.interpolate||Qe,h="__p += '",p=nt((t.escape||Qe).source+"|"+f.source+"|"+(f===Oe?Ve:Qe).source+"|"+(t.evaluate||Qe).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Yt+"]")+"\n";e.replace(p,function(t,n,r,i,o,s){return r||(r=i),h+=e.slice(c,s).replace(et,nr),n&&(u=!0,h+="' +\n__e("+n+") +\n'"),o&&(l=!0,h+="';\n"+o+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=s+t.length,t}),h+="';\n";var m=t.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(l?h.replace(ke,""):h).replace(Se,"$1").replace(Ee,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(l?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=_h(function(){return R(s,d+"return "+h).apply(o,a)});if(g.source=h,yc(g))throw g;return g}function fh(e){return Zc(e).toLowerCase()}function hh(e){return Zc(e).toUpperCase()}function ph(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(Le,"");if(!e||!(t=Po(t)))return e;var r=mr(e),i=mr(t),s=Zn(r,i),a=Xn(r,i)+1;return Ho(r,s,a).join("")}function dh(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(De,"");if(!e||!(t=Po(t)))return e;var r=mr(e),i=Xn(r,mr(t))+1;return Ho(r,0,i).join("")}function mh(e,t,n){if(e=Zc(e),e&&(n||t===o))return e.replace(Fe,"");if(!e||!(t=Po(t)))return e;var r=mr(e),i=Zn(r,mr(t));return Ho(r,i).join("")}function gh(e,t){var n=I,r=T;if(kc(t)){var i="separator"in t?t.separator:i;n="length"in t?Wc(t.length):n,r="omission"in t?Po(t.omission):r}e=Zc(e);var s=e.length;if(ir(e)){var a=mr(e);s=a.length}if(n>=s)return e;var u=n-dr(r);if(u<1)return r;var l=a?Ho(a,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(a&&(u+=l.length-u),Bc(i)){if(e.slice(u).search(i)){var c,f=l;for(i.global||(i=nt(i.source,Zc(We.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(Po(i),u)!=u){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+r}function yh(e){return e=Zc(e),e&&Ae.test(e)?e.replace(xe,gr):e}var bh=hs(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),vh=fs("toUpperCase");function wh(e,t,n){return e=Zc(e),t=n?o:t,t===o?or(e)?vr(e):Rn(e):e.match(t)||[]}var _h=vo(function(e,t){try{return vn(e,o,t)}catch(e){return yc(e)?e:new i(e)}}),kh=Ms(function(e,t){return _n(t,function(t){t=Ta(t),hi(e,t,jl(e[t],e))}),e});function Sh(e){var t=null==e?0:e.length,n=qs();return e=t?An(e,function(e){if("function"!=typeof e[1])throw new it(l);return[n(e[0]),e[1]]}):[],vo(function(n){for(var r=-1;++r<t;){var i=e[r];if(vn(i[0],this,n))return vn(i[1],this,n)}})}function Eh(e){return gi(mi(e,p))}function xh(e){return function(){return e}}function Ch(e,t){return null==e||e!=e?t:e}var Ah=gs(),Ih=gs(!0);function Th(e){return e}function jh(e){return Qi("function"==typeof e?e:mi(e,p))}function Oh(e){return io(mi(e,p))}function Ph(e,t){return oo(e,mi(t,p))}var Bh=vo(function(e,t){return function(n){return zi(n,e,t)}}),Rh=vo(function(e,t){return function(n){return zi(e,n,t)}});function Nh(e,t,n){var r=_f(t),i=Oi(t,r);null!=n||kc(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Oi(t,_f(t)));var o=!(kc(n)&&"chain"in n&&!n.chain),s=vc(e);return _n(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=ns(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,In([this.value()],arguments))})}),e}function Mh(){return an._===this&&(an._=gt),this}function Lh(){}function Fh(e){return e=Wc(e),vo(function(t){return uo(t,e)})}var Dh=ws(An),Uh=ws(Sn),zh=ws(On);function qh(e){return sa(e)?zn(Ta(e)):ho(e)}function Kh(e){return function(t){return null==e?o:Pi(e,t)}}var Hh=Ss(),Vh=Ss(!0);function Wh(){return[]}function $h(){return!1}function Gh(){return{}}function Yh(){return""}function Jh(){return!0}function Zh(e,t){if(e=Wc(e),e<1||e>M)return[];var n=D,r=zt(e,D);t=qs(t),e-=D;for(var i=Wn(r,t);++n<e;)t(n);return i}function Xh(e){return sc(e)?An(e,Ta):Lc(e)?[e]:ns(Ia(Zc(e)))}function Qh(e){var t=++ft;return Zc(e)+t}var ep=vs(function(e,t){return e+t},0),tp=Cs("ceil"),np=vs(function(e,t){return e/t},1),rp=Cs("floor");function ip(e){return e&&e.length?Si(e,Th,Ni):o}function op(e,t){return e&&e.length?Si(e,qs(t,2),Ni):o}function sp(e){return Un(e,Th)}function ap(e,t){return Un(e,qs(t,2))}function up(e){return e&&e.length?Si(e,Th,no):o}function lp(e,t){return e&&e.length?Si(e,qs(t,2),no):o}var cp=vs(function(e,t){return e*t},1),fp=Cs("round"),hp=vs(function(e,t){return e-t},0),pp;function dp(e){return e&&e.length?Vn(e,Th):0}function mp(e,t){return e&&e.length?Vn(e,qs(t,2)):0}return wr.after=Al,wr.ary=Il,wr.assign=Xc,wr.assignIn=Qc,wr.assignInWith=ef,wr.assignWith=tf,wr.at=nf,wr.before=Tl,wr.bind=jl,wr.bindAll=kh,wr.bindKey=Ol,wr.castArray=Jl,wr.chain=Ku,wr.chunk=Ba,wr.compact=Ra,wr.concat=Na,wr.cond=Sh,wr.conforms=Eh,wr.constant=xh,wr.countBy=el,wr.create=rf,wr.curry=Pl,wr.curryRight=Bl,wr.debounce=Rl,wr.defaults=of,wr.defaultsDeep=sf,wr.defer=Nl,wr.delay=Ml,wr.difference=Ma,wr.differenceBy=La,wr.differenceWith=Fa,wr.drop=Da,wr.dropRight=Ua,wr.dropRightWhile=za,wr.dropWhile=qa,wr.fill=Ka,wr.filter=nl,wr.flatMap=ol,wr.flatMapDeep=sl,wr.flatMapDepth=al,wr.flatten=Wa,wr.flattenDeep=$a,wr.flattenDepth=Ga,wr.flip=Ll,wr.flow=Ah,wr.flowRight=Ih,wr.fromPairs=Ya,wr.functions=pf,wr.functionsIn=df,wr.groupBy=cl,wr.initial=Xa,wr.intersection=Qa,wr.intersectionBy=eu,wr.intersectionWith=tu,wr.invert=bf,wr.invertBy=vf,wr.invokeMap=hl,wr.iteratee=jh,wr.keyBy=pl,wr.keys=_f,wr.keysIn=kf,wr.map=dl,wr.mapKeys=Sf,wr.mapValues=Ef,wr.matches=Oh,wr.matchesProperty=Ph,wr.memoize=Fl,wr.merge=xf,wr.mergeWith=Cf,wr.method=Bh,wr.methodOf=Rh,wr.mixin=Nh,wr.negate=Dl,wr.nthArg=Fh,wr.omit=Af,wr.omitBy=If,wr.once=Ul,wr.orderBy=ml,wr.over=Dh,wr.overArgs=zl,wr.overEvery=Uh,wr.overSome=zh,wr.partial=ql,wr.partialRight=Kl,wr.partition=gl,wr.pick=Tf,wr.pickBy=jf,wr.property=qh,wr.propertyOf=Kh,wr.pull=su,wr.pullAll=au,wr.pullAllBy=uu,wr.pullAllWith=lu,wr.pullAt=cu,wr.range=Hh,wr.rangeRight=Vh,wr.rearg=Hl,wr.reject=vl,wr.remove=fu,wr.rest=Vl,wr.reverse=hu,wr.sampleSize=_l,wr.set=Pf,wr.setWith=Bf,wr.shuffle=kl,wr.slice=pu,wr.sortBy=xl,wr.sortedUniq=wu,wr.sortedUniqBy=_u,wr.split=ah,wr.spread=Wl,wr.tail=ku,wr.take=Su,wr.takeRight=Eu,wr.takeRightWhile=xu,wr.takeWhile=Cu,wr.tap=Hu,wr.throttle=$l,wr.thru=Vu,wr.toArray=Hc,wr.toPairs=Rf,wr.toPairsIn=Nf,wr.toPath=Xh,wr.toPlainObject=Yc,wr.transform=Mf,wr.unary=Gl,wr.union=Au,wr.unionBy=Iu,wr.unionWith=Tu,wr.uniq=ju,wr.uniqBy=Ou,wr.uniqWith=Pu,wr.unset=Lf,wr.unzip=Bu,wr.unzipWith=Ru,wr.update=Ff,wr.updateWith=Df,wr.values=Uf,wr.valuesIn=zf,wr.without=Nu,wr.words=wh,wr.wrap=Yl,wr.xor=Mu,wr.xorBy=Lu,wr.xorWith=Fu,wr.zip=Du,wr.zipObject=Uu,wr.zipObjectDeep=zu,wr.zipWith=qu,wr.entries=Rf,wr.entriesIn=Nf,wr.extend=Qc,wr.extendWith=ef,Nh(wr,wr),wr.add=ep,wr.attempt=_h,wr.camelCase=Vf,wr.capitalize=Wf,wr.ceil=tp,wr.clamp=qf,wr.clone=Zl,wr.cloneDeep=Ql,wr.cloneDeepWith=ec,wr.cloneWith=Xl,wr.conformsTo=tc,wr.deburr=$f,wr.defaultTo=Ch,wr.divide=np,wr.endsWith=Gf,wr.eq=nc,wr.escape=Yf,wr.escapeRegExp=Jf,wr.every=tl,wr.find=rl,wr.findIndex=Ha,wr.findKey=af,wr.findLast=il,wr.findLastIndex=Va,wr.findLastKey=uf,wr.floor=rp,wr.forEach=ul,wr.forEachRight=ll,wr.forIn=lf,wr.forInRight=cf,wr.forOwn=ff,wr.forOwnRight=hf,wr.get=mf,wr.gt=rc,wr.gte=ic,wr.has=gf,wr.hasIn=yf,wr.head=Ja,wr.identity=Th,wr.includes=fl,wr.indexOf=Za,wr.inRange=Kf,wr.invoke=wf,wr.isArguments=oc,wr.isArray=sc,wr.isArrayBuffer=ac,wr.isArrayLike=uc,wr.isArrayLikeObject=lc,wr.isBoolean=cc,wr.isBuffer=fc,wr.isDate=hc,wr.isElement=pc,wr.isEmpty=dc,wr.isEqual=mc,wr.isEqualWith=gc,wr.isError=yc,wr.isFinite=bc,wr.isFunction=vc,wr.isInteger=wc,wr.isLength=_c,wr.isMap=Ec,wr.isMatch=xc,wr.isMatchWith=Cc,wr.isNaN=Ac,wr.isNative=Ic,wr.isNil=jc,wr.isNull=Tc,wr.isNumber=Oc,wr.isObject=kc,wr.isObjectLike=Sc,wr.isPlainObject=Pc,wr.isRegExp=Bc,wr.isSafeInteger=Rc,wr.isSet=Nc,wr.isString=Mc,wr.isSymbol=Lc,wr.isTypedArray=Fc,wr.isUndefined=Dc,wr.isWeakMap=Uc,wr.isWeakSet=zc,wr.join=nu,wr.kebabCase=Zf,wr.last=ru,wr.lastIndexOf=iu,wr.lowerCase=Xf,wr.lowerFirst=Qf,wr.lt=qc,wr.lte=Kc,wr.max=ip,wr.maxBy=op,wr.mean=sp,wr.meanBy=ap,wr.min=up,wr.minBy=lp,wr.stubArray=Wh,wr.stubFalse=$h,wr.stubObject=Gh,wr.stubString=Yh,wr.stubTrue=Jh,wr.multiply=cp,wr.nth=ou,wr.noConflict=Mh,wr.noop=Lh,wr.now=Cl,wr.pad=eh,wr.padEnd=th,wr.padStart=nh,wr.parseInt=rh,wr.random=Hf,wr.reduce=yl,wr.reduceRight=bl,wr.repeat=ih,wr.replace=oh,wr.result=Of,wr.round=fp,wr.runInContext=e,wr.sample=wl,wr.size=Sl,wr.snakeCase=sh,wr.some=El,wr.sortedIndex=du,wr.sortedIndexBy=mu,wr.sortedIndexOf=gu,wr.sortedLastIndex=yu,wr.sortedLastIndexBy=bu,wr.sortedLastIndexOf=vu,wr.startCase=uh,wr.startsWith=lh,wr.subtract=hp,wr.sum=dp,wr.sumBy=mp,wr.template=ch,wr.times=Zh,wr.toFinite=Vc,wr.toInteger=Wc,wr.toLength=$c,wr.toLower=fh,wr.toNumber=Gc,wr.toSafeInteger=Jc,wr.toString=Zc,wr.toUpper=hh,wr.trim=ph,wr.trimEnd=dh,wr.trimStart=mh,wr.truncate=gh,wr.unescape=yh,wr.uniqueId=Qh,wr.upperCase=bh,wr.upperFirst=vh,wr.each=ul,wr.eachRight=ll,wr.first=Ja,Nh(wr,(pp={},Ti(wr,function(e,t){ct.call(wr.prototype,t)||(pp[t]=e)}),pp),{chain:!1}),wr.VERSION=s,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){wr[e].placeholder=wr}),_n(["drop","take"],function(e,t){xr.prototype[e]=function(n){n=n===o?1:Ut(Wc(n),0);var r=this.__filtered__&&!t?new xr(this):this.clone();return r.__filtered__?r.__takeCount__=zt(n,r.__takeCount__):r.__views__.push({size:zt(n,D),type:e+(r.__dir__<0?"Right":"")}),r},xr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),_n(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==P||3==n;xr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:qs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),_n(["head","last"],function(e,t){var n="take"+(t?"Right":"");xr.prototype[e]=function(){return this[n](1).value()[0]}}),_n(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");xr.prototype[e]=function(){return this.__filtered__?new xr(this):this[n](1)}}),xr.prototype.compact=function(){return this.filter(Th)},xr.prototype.find=function(e){return this.filter(e).head()},xr.prototype.findLast=function(e){return this.reverse().find(e)},xr.prototype.invokeMap=vo(function(e,t){return"function"==typeof e?new xr(this):this.map(function(n){return zi(n,e,t)})}),xr.prototype.reject=function(e){return this.filter(Dl(qs(e)))},xr.prototype.slice=function(e,t){e=Wc(e);var n=this;return n.__filtered__&&(e>0||t<0)?new xr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=Wc(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},xr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xr.prototype.toArray=function(){return this.take(D)},Ti(xr.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=wr[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(wr.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof xr,l=a[0],c=u||sc(t),f=function(e){var t=i.apply(wr,In([e],a));return r&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,m=u&&!p;if(!s&&c){t=m?t:new xr(this);var g=e.apply(t,a);return g.__actions__.push({func:Vu,args:[f],thisArg:o}),new Er(g,h)}return d&&m?e.apply(this,a):(g=this.thru(f),d?r?g.value()[0]:g.value():g)})}),_n(["pop","push","shift","sort","splice","unshift"],function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);wr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(sc(i)?i:[],e)}return this[n](function(n){return t.apply(sc(n)?n:[],e)})}}),Ti(xr.prototype,function(e,t){var n=wr[t];if(n){var r=n.name+"",i=ln[r]||(ln[r]=[]);i.push({name:t,func:n})}}),ln[ys(o,v).name]=[{name:"wrapper",func:o}],xr.prototype.clone=Cr,xr.prototype.reverse=Ar,xr.prototype.value=Ir,wr.prototype.at=Wu,wr.prototype.chain=$u,wr.prototype.commit=Gu,wr.prototype.next=Yu,wr.prototype.plant=Zu,wr.prototype.reverse=Xu,wr.prototype.toJSON=wr.prototype.valueOf=wr.prototype.value=Qu,wr.prototype.first=wr.prototype.head,At&&(wr.prototype[At]=Ju),wr},_r=wr();an._=_r,i=function(){return _r}.call(t,n,t,r),i===o||(r.exports=i)}).call(this)}).call(this,n(8),n(75)(e))},function(e,t,n){"use strict";const r=n(485).extend(n(960)),i=r.object().keys({repo:r.alternatives().try(r.object(),r.string()).allow(null),repoOwner:r.boolean().default(!0),preload:r.object().keys({enabled:r.boolean().default(!0),addresses:r.array().items(r.multiaddr().options({convert:!1})),interval:r.number().integer().default(3e4)}).allow(null),init:r.alternatives().try(r.boolean(),r.object().keys({bits:r.number().integer()})).allow(null),start:r.boolean(),local:r.boolean(),pass:r.string().allow(""),relay:r.object().keys({enabled:r.boolean(),hop:r.object().keys({enabled:r.boolean(),active:r.boolean()}).allow(null)}).allow(null),EXPERIMENTAL:r.object().keys({pubsub:r.boolean(),ipnsPubsub:r.boolean(),sharding:r.boolean(),dht:r.boolean()}).allow(null),connectionManager:r.object().allow(null),config:r.object().keys({Addresses:r.object().keys({Swarm:r.array().items(r.multiaddr().options({convert:!1})),API:r.multiaddr().options({convert:!1}),Gateway:r.multiaddr().options({convert:!1})}).allow(null),Discovery:r.object().keys({MDNS:r.object().keys({Enabled:r.boolean(),Interval:r.number().integer()}).allow(null),webRTCStar:r.object().keys({Enabled:r.boolean()}).allow(null)}).allow(null),Bootstrap:r.array().items(r.multiaddr().IPFS().options({convert:!1}))}).allow(null),libp2p:r.alternatives().try(r.func(),r.object().keys({modules:r.object().allow(null)})).allow(null)}).options({allowUnknown:!0});e.exports.validate=(e=>r.attempt(e,i))},function(e,t,n){const r=n(24),i=n(91);e.exports={name:"multiaddr",language:{invalid:"{{message}}",fmt:"must be in {{fmt}} format"},pre(e,t,n){if(null==e)return this.createError("multiaddr.invalid",{v:e,message:"addr must be a string, Buffer, or another Multiaddr"},t,n);let i;try{i=r(e)}catch(r){return this.createError("multiaddr.invalid",{v:e,message:r.message},t,n)}return n.convert?i:e},rules:Object.keys(i).map(e=>({name:e,validate(t,n,r,o){return i[e].matches(n)?n:this.createError("multiaddr.fmt",{v:n,fmt:e},r,o)}}))}},function(e,t,n){"use strict";const r=n(11),i=n(224).errors;function o(e){return!!e&&(e.code===i.ERR_REPO_NOT_INITIALIZED||!!(e.message.match(/not found/)||e.message.match(/ENOENT/)||e.message.match(/No value/)))}e.exports=(e=>{e.log("booting");const t=e._options,n=t.init,i=t.start;r([t=>{if(!e._repo.closed)return t(null,!0);e._repo.open((e,n)=>o(e)?t(null,!1):e?t(e):void t(null,!0))},(r,i)=>{if(r)return e.init({repo:e._repo},e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()});if(n){const n=Object.assign({bits:2048,pass:e._options.pass},"object"==typeof t.init?t.init:{});return e.init(n,e=>{if(e)return i(Object.assign(e,{emitted:!0}));i()})}i()},t=>{if(!i)return t();e.start(e=>{if(e)return t(Object.assign(e,{emitted:!0}));t()})}],t=>{t?t.emitted||e.emit("error",t):(e.log("booted"),e.emit("ready"))})})},function(e,t,n){"use strict";t.preStart=n(963),t.start=n(978),t.stop=n(1179),t.isOnline=n(1180),t.version=n(1181),t.id=n(1182),t.repo=n(545),t.init=n(1183),t.bootstrap=n(1186),t.config=n(1187),t.block=n(1188),t.object=n(1189),t.dag=n(1190),t.libp2p=n(504),t.swarm=n(1194),t.ping=n(1197),t.pingPullStream=n(1198),t.pingReadableStream=n(1199),t.pin=n(1200),t.filesRegular=n(1207),t.filesMFS=n(1261),t.bitswap=n(570),t.pubsub=n(1309),t.dht=n(1310),t.dns=n(1313),t.key=n(1315),t.stats=n(1316),t.resolve=n(1317),t.name=n(1319)},function(e,t,n){"use strict";const r=n(23),i=n(44),o=n(24),s=n(11),a=n(486),u=n(181),l=n(977);e.exports=function e(t){return e=>{t.log("pre-start");const n=t._options.pass;s([e=>t._repo.config.get(e),(e,n)=>{if(!t._options.config)return n(null,e);e=u(t._options.config,e),t.config.replace(e,t=>{if(t)return n(t);n(null,e)})},(e,n)=>{if(e.Keychain)return n(null,e);e.Keychain=a.generateOptions(),t.config.set("Keychain",e.Keychain,r=>{t.log("using default keychain options"),n(r,e)})},(e,r)=>{if(t._keychain);else if(n){const r=Object.assign({passPhrase:n},e.Keychain);t._keychain=new a(t._repo.keys,r),t.log("keychain constructed")}else t._keychain=new l,t.log("no keychain, use --pass");r(null,e)},(e,t)=>{const n=e.Identity.PrivKey;r.createFromPrivKey(n,(n,r)=>{t(n,e,r)})},(e,r,i)=>{if(!n)return i(null,e,r);t._keychain.findKeyByName("self",n=>{if(n)return t.log('Creating "self" key'),t._keychain.importPeer("self",r,t=>i(t,e,r));i(null,e,r)})},(e,n,r)=>{t.log("peer created"),t._peerInfo=new i(n),e.Addresses&&e.Addresses.Swarm&&e.Addresses.Swarm.forEach(e=>{let n=o(e);n.getPeerId()&&(n=n.encapsulate("/ipfs/"+t._peerInfo.id.toB58String())),t._peerInfo.multiaddrs.add(n)}),r()},e=>t.pin._load(e)],e)}}},function(e,t,n){"use strict";const r=n(965),i=n(439),o=n(64),s=n(33),a=n(37),u=n(12),l=n(969),c="/pkcs8/",f="/info/",h={minKeyLength:14,minSaltLength:16,minIterationCount:1e3},p={dek:{keyLength:64,iterationCount:1e4,salt:"you should override this value with a crypto secure random number",hash:"sha2-512"}};function d(e){return!!e&&("string"==typeof e&&e===r(e.trim()))}function m(e,t){const n=200,r=1e3,i=800*Math.random()+200;"string"==typeof t&&(t=new Error(t)),setTimeout(e,i,t,null)}function g(e){return new s.Key(c+e)}function y(e){return new s.Key(f+e)}class b{constructor(e,t){if(!e)throw new Error("store is required");this.store=e;const n=i(p,t);if(!n.passPhrase||n.passPhrase.length<20)throw new Error("passPhrase must be least 20 characters");if(n.dek.keyLength<h.minKeyLength)throw new Error(`dek.keyLength must be least ${h.minKeyLength} bytes`);if(n.dek.salt.length<h.minSaltLength)throw new Error(`dek.saltLength must be least ${h.minSaltLength} bytes`);if(n.dek.iterationCount<h.minIterationCount)throw new Error(`dek.iterationCount must be least ${h.minIterationCount}`);const r=o.pbkdf2(n.passPhrase,n.dek.salt,n.dek.iterationCount,n.dek.keyLength,n.dek.hash);Object.defineProperty(this,"_",{value:()=>r})}get cms(){return new l(this)}static generateOptions(){const e=Object.assign({},p),t=3*Math.ceil(h.minSaltLength/3);return e.dek.salt=o.randomBytes(t).toString("base64"),e}static get options(){return p}createKey(e,t,n,r){const i=this;if(!d(e)||"self"===e)return m(r,`Invalid key name '${e}'`);if("string"!=typeof t)return m(r,`Invalid key type '${t}'`);if(!Number.isSafeInteger(n))return m(r,`Invalid key size '${n}'`);const s=g(e);i.store.has(s,(a,u)=>{if(a)return m(r,a);if(u)return m(r,`Key '${e}' already exists`);switch(t.toLowerCase()){case"rsa":if(n<2048)return m(r,`Invalid RSA key size ${n}`)}o.keys.generateKeyPair(t,n,(t,n)=>{if(t)return m(r,t);n.id((t,o)=>{if(t)return m(r,t);n.export(this._(),(t,n)=>{if(t)return m(r,t);const a={name:e,id:o},u=i.store.batch();u.put(s,n),u.put(y(e),JSON.stringify(a)),u.commit(e=>{if(e)return m(r,e);r(null,a)})})})})})}listKeys(e){const t=this,n={prefix:f};u(this.store.query(n),a((t,n)=>{if(t)return m(e,t);const r=n.map(e=>JSON.parse(e.value));e(null,r)}))}findKeyById(e,t){this.listKeys((n,r)=>{if(n)return m(t,n);const i=r.find(t=>t.id===e);t(null,i)})}findKeyByName(e,t){if(!d(e))return m(t,`Invalid key name '${e}'`);const n=y(e);this.store.get(n,(n,r)=>{if(n)return m(t,`Key '${e}' does not exist. ${n.message}`);t(null,JSON.parse(r.toString()))})}removeKey(e,t){const n=this;if(!d(e)||"self"===e)return m(t,`Invalid key name '${e}'`);const r=g(e);n.findKeyByName(e,(i,o)=>{if(i)return m(t,i);const s=n.store.batch();s.delete(r),s.delete(y(e)),s.commit(e=>{if(e)return m(t,e);t(null,o)})})}renameKey(e,t,n){const r=this;if(!d(e)||"self"===e)return m(n,`Invalid old key name '${e}'`);if(!d(t)||"self"===t)return m(n,`Invalid new key name '${t}'`);const i=g(e),o=g(t),s=y(e),a=y(t);this.store.get(i,(u,l)=>{if(u)return m(n,`Key '${e}' does not exist. ${u.message}`);const c=l.toString();r.store.has(o,(e,u)=>e?m(n,e):u?m(n,`Key '${t}' already exists`):void r.store.get(s,(e,u)=>{if(e)return m(n,e);const l=JSON.parse(u.toString());l.name=t;const f=r.store.batch();f.put(o,c),f.put(a,JSON.stringify(l)),f.delete(i),f.delete(s),f.commit(e=>{if(e)return m(n,e);n(null,l)})}))})}exportKey(e,t,n){if(!d(e))return m(n,`Invalid key name '${e}'`);if(!t)return m(n,"Password is required");const r=g(e);this.store.get(r,(r,i)=>{if(r)return m(n,`Key '${e}' does not exist. ${r.message}`);const s=i.toString();o.keys.import(s,this._(),(e,r)=>{if(e)return m(n,e);r.export(t,n)})})}importKey(e,t,n,r){const i=this;if(!d(e)||"self"===e)return m(r,`Invalid key name '${e}'`);if(!t)return m(r,"PEM encoded key is required");const s=g(e);i.store.has(s,(a,u)=>a?m(r,a):u?m(r,`Key '${e}' already exists`):void o.keys.import(t,n,(t,n)=>{if(t)return m(r,"Cannot read the key, most likely the password is wrong");n.id((t,o)=>{if(t)return m(r,t);n.export(this._(),(t,n)=>{if(t)return m(r,t);const a={name:e,id:o},u=i.store.batch();u.put(s,n),u.put(y(e),JSON.stringify(a)),u.commit(e=>{if(e)return m(r,e);r(null,a)})})})}))}importPeer(e,t,n){const r=this;if(!d(e))return m(n,`Invalid key name '${e}'`);if(!t||!t.privKey)return m(n,"Peer.privKey is required");const i=t.privKey,o=g(e);r.store.has(o,(t,s)=>t?m(n,t):s?m(n,`Key '${e}' already exists`):void i.id((t,s)=>{if(t)return m(n,t);i.export(this._(),(t,i)=>{if(t)return m(n,t);const a={name:e,id:s},u=r.store.batch();u.put(o,i),u.put(y(e),JSON.stringify(a)),u.commit(e=>{if(e)return m(n,e);n(null,a)})})}))}_getPrivateKey(e,t){if(!d(e))return m(t,`Invalid key name '${e}'`);this.store.get(g(e),(n,r)=>{if(n)return m(t,`Key '${e}' does not exist. ${n.message}`);t(null,r.toString())})}}e.exports=b},function(e,t,n){"use strict";var r=n(966),i=/[\/\?<>\\:\*\|":]/g,o=/[\x00-\x1f\x80-\x9f]/g,s=/^\.+$/,a=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,u=/[\. ]+$/;function l(e,t){var n=e.replace(i,t).replace(o,t).replace(s,t).replace(a,t).replace(u,t);return r(n,255)}e.exports=function(e,t){var n=t&&t.replacement||"",r=l(e,n);return""===n?r:l(r,"")}},function(e,t,n){"use strict";var r=n(967),i=n(968);e.exports=r.bind(null,i)},function(e,t,n){"use strict";function r(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function e(t,n,o){if("string"!=typeof n)throw new Error("Input must be string");for(var s=n.length,a=0,u,l,c=0;c<s;c+=1){if(u=n.charCodeAt(c),l=n[c],r(u)&&i(n.charCodeAt(c+1))&&(c+=1,l+=n[c]),a+=t(l),a===o)return n.slice(0,c+1);if(a>o)return n.slice(0,c-l.length+1)}return n}},function(e,t,n){"use strict";function r(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function e(t){if("string"!=typeof t)throw new Error("Input must be string");for(var n=t.length,o=0,s=null,a=null,u=0;u<n;u++)s=t.charCodeAt(u),i(s)?null!=a&&r(a)?o+=1:o+=3:s<=127?o+=1:s>=128&&s<=2047?o+=2:s>=2048&&s<=65535&&(o+=3),a=s;return o}},function(e,t,n){"use strict";(function(t){const r=n(14),i=n(40),o=n(970),s=n(11);n(971),n(310);const a=n(19),u=n(976);class l{constructor(e){if(!e)throw new Error("keychain is required");this.keychain=e}encrypt(e,n,o){const s=this,l=(e,t)=>r(()=>o(e,t));if(!t.isBuffer(n))return l(new Error("Plain data must be a Buffer"));i([t=>s.keychain.findKeyByName(e,t),t=>s.keychain._getPrivateKey(e,t)],(e,r)=>{if(e)return l(e);let i=r[0],c=r[1];try{const r=a.pki.decryptRsaPrivateKey(c,s.keychain._());u.certificateForKey(i,r,(e,r)=>{if(e)return o(e);const i=a.pkcs7.createEnvelopedData();i.addRecipient(r),i.content=a.util.createBuffer(n),i.encrypt();const s=a.asn1.toDer(i.toAsn1()).getBytes();l(null,t.from(s,"binary"))})}catch(e){l(e)}})}decrypt(e,n){const i=(e,t)=>r(()=>n(e,t));if(!t.isBuffer(e))return i(new Error("CMS data is required"));const u=this;let l;try{const t=a.util.createBuffer(e.toString("binary")),n=a.asn1.fromDer(t);l=a.pkcs7.messageFromAsn1(n)}catch(e){return i(new Error("Invalid CMS: "+e.message))}const c=l.recipients.filter(e=>e.issuer.find(e=>"O"===e.shortName&&"ipfs"===e.value)).filter(e=>e.issuer.find(e=>"CN"===e.shortName)).map(e=>({recipient:e,keyId:e.issuer.find(e=>"CN"===e.shortName).value}));o(c,(e,t)=>u.keychain.findKeyById(e.keyId,(e,n)=>t(null,!e&&n)),(e,n)=>{if(e)return i(e);if(!n){const t=c.map(e=>e.keyId);return e=new Error("Decryption needs one of the key(s): "+t.join(", ")),e.missingKeys=t,i(e)}s([e=>u.keychain.findKeyById(n.keyId,e),(e,t)=>u.keychain._getPrivateKey(e.name,t)],(e,r)=>{if(e)return i(e);const o=a.pki.decryptRsaPrivateKey(r,u.keychain._());l.decrypt(n.recipient,o),i(null,t.from(l.content.getBytes(),"binary"))})})}}e.exports=l}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),i=f(r),o=n(241),s=f(o),a=n(174),u=f(a),l=n(487),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}t.default=(0,u.default)((0,s.default)(i.default,c.default)),e.exports=t.default},function(e,t,n){var r=n(19);n(237),n(140),n(311),n(178),n(312),n(972),n(141),n(34),n(488);var i=r.asn1,o=e.exports=r.pkcs7=r.pkcs7||{};function s(e){var t={},n=[];if(!i.validate(e,o.asn1.recipientInfoValidator,t,n)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=n,s}return{version:t.version.charCodeAt(0),issuer:r.pki.RDNAttributesAsArray(t.issuer),serialNumber:r.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter.value,content:t.encKey}}}function a(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[r.pki.distinguishedNameToAsn1({attributes:e.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,r.util.hexToBytes(e.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.encryptedContent.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function u(e){for(var t=[],n=0;n<e.length;++n)t.push(s(e[n]));return t}function l(e){for(var t=[],n=0;n<e.length;++n)t.push(a(e[n]));return t}function c(e){var t={},n=[];if(!i.validate(e,o.asn1.signerInfoValidator,t,n)){var s=new Error("Cannot read PKCS#7 SignerInfo. ASN.1 object is not an PKCS#7 SignerInfo.");throw s.errors=n,s}var a={version:t.version.charCodeAt(0),issuer:r.pki.RDNAttributesAsArray(t.issuer),serialNumber:r.util.createBuffer(t.serial).toHex(),digestAlgorithm:i.derToOid(t.digestAlgorithm),signatureAlgorithm:i.derToOid(t.signatureAlgorithm),signature:t.signature,authenticatedAttributes:[],unauthenticatedAttributes:[]},u=t.authenticatedAttributes||[],l=t.unauthenticatedAttributes||[];return a}function f(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[r.pki.distinguishedNameToAsn1({attributes:e.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,r.util.hexToBytes(e.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.digestAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var n=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o<e.unauthenticatedAttributes.length;++o){var s=e.unauthenticatedAttributes[o];n.values.push(d(s))}t.value.push(n)}return t}function h(e){for(var t=[],n=0;n<e.length;++n)t.push(c(e[n]));return t}function p(e){for(var t=[],n=0;n<e.length;++n)t.push(f(e[n]));return t}function d(e){var t;if(e.type===r.pki.oids.contentType)t=i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.value).getBytes());else if(e.type===r.pki.oids.messageDigest)t=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===r.pki.oids.signingTime){var n=new Date("1950-01-01T00:00:00Z"),o=new Date("2050-01-01T00:00:00Z"),s=e.value;if("string"==typeof s){var a=Date.parse(s);s=isNaN(a)?13===s.length?i.utcTimeToDate(s):i.generalizedTimeToDate(s):new Date(a)}t=s>=n&&s<o?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(s)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(s))}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[t])])}function m(e){return[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(r.pki.oids.data).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.parameter.getBytes())]),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.content.getBytes())])]}function g(e,t,n){var o={},s=[];if(!i.validate(t,n,o,s)){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw a.errors=a,a}var u=i.derToOid(o.contentType);if(u!==r.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(o.encryptedContent){var l="";if(r.util.isArray(o.encryptedContent))for(var c=0;c<o.encryptedContent.length;++c){if(o.encryptedContent[c].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");l+=o.encryptedContent[c].value}else l=o.encryptedContent;e.encryptedContent={algorithm:i.derToOid(o.encAlgorithm),parameter:r.util.createBuffer(o.encParameter.value),content:r.util.createBuffer(l)}}if(o.content){var l="";if(r.util.isArray(o.content))for(var c=0;c<o.content.length;++c){if(o.content[c].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");l+=o.content[c].value}else l=o.content;e.content=r.util.createBuffer(l)}return e.version=o.version.charCodeAt(0),e.rawCapture=o,o}function y(e){if(void 0===e.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===e.content){var t;switch(e.encryptedContent.algorithm){case r.pki.oids["aes128-CBC"]:case r.pki.oids["aes192-CBC"]:case r.pki.oids["aes256-CBC"]:t=r.aes.createDecryptionCipher(e.encryptedContent.key);break;case r.pki.oids.desCBC:case r.pki.oids["des-EDE3-CBC"]:t=r.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}o.messageFromPem=function(e){var t=r.pem.decode(e)[0];if("PKCS7"!==t.type){var n=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw n.headerType=t.type,n}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var s=i.fromDer(t.body);return o.messageFromAsn1(s)},o.messageToPem=function(e,t){var n={type:"PKCS7",body:i.toDer(e.toAsn1()).getBytes()};return r.pem.encode(n,{maxline:t})},o.messageFromAsn1=function(e){var t={},n=[];if(!i.validate(e,o.asn1.contentInfoValidator,t,n)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw s.errors=n,s}var a=i.derToOid(t.contentType),u;switch(a){case r.pki.oids.envelopedData:u=o.createEnvelopedData();break;case r.pki.oids.encryptedData:u=o.createEncryptedData();break;case r.pki.oids.signedData:u=o.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return u.fromAsn1(t.content.value[0]),u},o.createSignedData=function(){var e=null;return e={type:r.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){if(g(e,t,o.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var n=e.rawCapture.certificates.value,i=0;i<n.length;++i)e.certificates.push(r.pki.certificateFromAsn1(n[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var t=[],n=0;n<e.certificates.length;++n)t.push(r.pki.certificateToAsn1(e.certificates[n]));var o=[],s=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return t.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var n=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=r.pki.certificateFromPem(o)),n=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=r.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||r.pki.oids.sha1;switch(a){case r.pki.oids.sha1:case r.pki.oids.sha256:case r.pki.oids.sha384:case r.pki.oids.sha512:case r.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var u=t.authenticatedAttributes||[];if(u.length>0){for(var l=!1,c=!1,f=0;f<u.length;++f){var h=u[f];if(l||h.type!==r.pki.oids.contentType){if(c||h.type!==r.pki.oids.messageDigest);else if(c=!0,l)break}else if(l=!0,c)break}if(!l||!c)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:s,version:1,issuer:n,serialNumber:i,digestAlgorithm:a,signatureAlgorithm:r.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(o){var s;(o=o||{},"object"!=typeof e.content||null===e.contentInfo)&&(e.contentInfo=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(r.pki.oids.data).getBytes())]),"content"in e&&(e.content instanceof r.util.ByteBuffer?s=e.content.bytes():"string"==typeof e.content&&(s=r.util.encodeUtf8(e.content)),o.detached?e.detachedContent=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,s):e.contentInfo.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,s)]))));if(0!==e.signers.length){var a=t();n(a)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){"string"==typeof t&&(t=r.pki.certificateFromPem(t)),e.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var t={},n=0;n<e.signers.length;++n){var o=e.signers[n],s=o.digestAlgorithm;s in t||(t[s]=r.md[r.pki.oids[s]].create()),0===o.authenticatedAttributes.length?o.md=t[s]:o.md=r.md[r.pki.oids[s]].create()}for(var s in e.digestAlgorithmIdentifiers=[],t)e.digestAlgorithmIdentifiers.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(s).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return t}function n(t){var n;if(e.detachedContent?n=e.detachedContent:(n=e.contentInfo.value[1],n=n.value[0]),!n)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var o=i.derToOid(e.contentInfo.value[0].value),s=i.toDer(n);for(var a in s.getByte(),i.getBerValueLength(s),s=s.getBytes(),t)t[a].start().update(s);for(var u=new Date,l=0;l<e.signers.length;++l){var c=e.signers[l];if(0===c.authenticatedAttributes.length){if(o!==r.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var f=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[]),h=0;h<c.authenticatedAttributes.length;++h){var m=c.authenticatedAttributes[h];m.type===r.pki.oids.messageDigest?m.value=t[c.digestAlgorithm].digest():m.type===r.pki.oids.signingTime&&(m.value||(m.value=u)),f.value.push(d(m)),c.authenticatedAttributesAsn1.value.push(d(m))}s=i.toDer(f).getBytes(),c.md.start().update(s)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=p(e.signers)}},o.createEncryptedData=function(){var e=null;return e={type:r.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:r.pki.oids["aes256-CBC"]},fromAsn1:function(t){g(e,t,o.asn1.encryptedDataValidator)},decrypt:function(t){void 0!==t&&(e.encryptedContent.key=t),y(e)}},e},o.createEnvelopedData=function(){var e=null;return e={type:r.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:r.pki.oids["aes256-CBC"]},fromAsn1:function(t){var n=g(e,t,o.asn1.envelopedDataValidator);e.recipients=u(n.recipientInfos.value)},toAsn1:function(){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,l(e.recipients)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,m(e.encryptedContent))])])])},findRecipient:function(t){for(var n=t.issuer.attributes,r=0;r<e.recipients.length;++r){var i=e.recipients[r],o=i.issuer;if(i.serialNumber===t.serialNumber&&o.length===n.length){for(var s=!0,a=0;a<n.length;++a)if(o[a].type!==n[a].type||o[a].value!==n[a].value){s=!1;break}if(s)return i}}return null},decrypt:function(t,n){if(void 0===e.encryptedContent.key&&void 0!==t&&void 0!==n)switch(t.encryptedContent.algorithm){case r.pki.oids.rsaEncryption:case r.pki.oids.desCBC:var i=n.decrypt(t.encryptedContent.content);e.encryptedContent.key=r.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}y(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:r.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,n){if(void 0===e.encryptedContent.content){var i,o,s;switch(n=n||e.encryptedContent.algorithm,t=t||e.encryptedContent.key,n){case r.pki.oids["aes128-CBC"]:i=16,o=16,s=r.aes.createEncryptionCipher;break;case r.pki.oids["aes192-CBC"]:i=24,o=16,s=r.aes.createEncryptionCipher;break;case r.pki.oids["aes256-CBC"]:i=32,o=16,s=r.aes.createEncryptionCipher;break;case r.pki.oids["des-EDE3-CBC"]:i=24,o=8,s=r.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+n)}if(void 0===t)t=r.util.createBuffer(r.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");e.encryptedContent.algorithm=n,e.encryptedContent.key=t,e.encryptedContent.parameter=r.util.createBuffer(r.random.getBytes(o));var a=s(t);if(a.start(e.encryptedContent.parameter.copy()),a.update(e.content),!a.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=a.output}for(var u=0;u<e.recipients.length;++u){var l=e.recipients[u];if(void 0===l.encryptedContent.content)switch(l.encryptedContent.algorithm){case r.pki.oids.rsaEncryption:l.encryptedContent.content=l.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+l.encryptedContent.algorithm)}}}},e}},function(e,t,n){var r=n(19);n(140),n(34);var i=r.asn1,o=e.exports=r.pkcs7asn1=r.pkcs7asn1||{};r.pkcs7=r.pkcs7||{},r.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,n){var r=n(19);n(974),e.exports=r.mgf=r.mgf||{},r.mgf.mgf1=r.mgf1},function(e,t,n){var r=n(19);n(34),r.mgf=r.mgf||{};var i=e.exports=r.mgf.mgf1=r.mgf1=r.mgf1||{};i.create=function(e){var t={generate:function(t,n){for(var i=new r.util.ByteBuffer,o=Math.ceil(n/e.digestLength),s=0;s<o;s++){var a=new r.util.ByteBuffer;a.putInt32(s),e.start(),e.update(t+a.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-n),i.getBytes()}};return t}},function(e,t,n){var r=n(19);n(141),n(34);var i=e.exports=r.pss=r.pss||{};i.create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,n=e.mgf,i=t.digestLength,o=e.salt||null,s;if("string"==typeof o&&(o=r.util.createBuffer(o)),"saltLength"in e)s=e.saltLength;else{if(null===o)throw new Error("Salt length not specified or specific salt not given.");s=o.length()}if(null!==o&&o.length()!==s)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||r.random,u={encode:function(e,u){var l,c=u-1,f=Math.ceil(c/8),h=e.digest().getBytes(),p;if(f<i+s+2)throw new Error("Message is too long to encrypt.");p=null===o?a.getBytesSync(s):o.bytes();var d=new r.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(h),d.putBytes(p),t.start(),t.update(d.getBytes());var m=t.digest().getBytes(),g=new r.util.ByteBuffer;g.fillWithByte(0,f-s-i-2),g.putByte(1),g.putBytes(p);var y=g.getBytes(),b=f-i-1,v=n.generate(m,b),w="";for(l=0;l<b;l++)w+=String.fromCharCode(y.charCodeAt(l)^v.charCodeAt(l));var _=65280>>8*f-c&255;return w=String.fromCharCode(w.charCodeAt(0)&~_)+w.substr(1),w+m+String.fromCharCode(188)},verify:function(e,o,a){var u,l=a-1,c=Math.ceil(l/8);if(o=o.substr(-c),c<i+s+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==o.charCodeAt(c-1))throw new Error("Encoded message does not end in 0xBC.");var f=c-i-1,h=o.substr(0,f),p=o.substr(f,i),d=65280>>8*c-l&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var m=n.generate(p,f),g="";for(u=0;u<f;u++)g+=String.fromCharCode(h.charCodeAt(u)^m.charCodeAt(u));g=String.fromCharCode(g.charCodeAt(0)&~d)+g.substr(1);var y=c-i-s-2;for(u=0;u<y;u++)if(0!==g.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(y))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var b=g.substr(-s),v=new r.util.ByteBuffer;v.fillWithByte(0,8),v.putBytes(e),v.putBytes(b),t.start(),t.update(v.getBytes());var w=t.digest().getBytes();return p===w}};return u}},function(e,t,n){"use strict";n(488);const r=n(19),i=r.pki;t=e.exports,t.certificateForKey=((e,t,n)=>{const r=i.setRsaPublicKey(t.n,t.e),o=i.createCertificate();o.publicKey=r,o.serialNumber="01",o.validity.notBefore=new Date,o.validity.notAfter=new Date,o.validity.notAfter.setFullYear(o.validity.notBefore.getFullYear()+10);const s=[{name:"organizationName",value:"ipfs"},{shortName:"OU",value:"keystore"},{name:"commonName",value:e.id}];return o.setSubject(s),o.setIssuer(s),o.setExtensions([{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0,codeSigning:!0,emailProtection:!0,timeStamping:!0},{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0,sslCA:!0,emailCA:!0,objCA:!0}]),o.sign(t),n(null,o)})},function(e,t,n){"use strict";function r(){throw new Error("Key management requires '--pass ...' option")}class i{static get options(){r()}static generateOptions(){r()}createKey(){r()}listKeys(){r()}findKeyById(){r()}findKeyByName(){r()}renameKey(){r()}removeKey(){r()}exportKey(){r()}importKey(){r()}importPeer(){r()}get cms(){r()}}e.exports=i},function(e,t,n){"use strict";const r=n(40),i=n(979),o=n(244),s=n(14),a=n(3),{TieredDatastore:u}=n(417),l=n(497),c=n(499),f=n(500),h=n(504);e.exports=(e=>a(t=>{const n=n=>{if(n)return s(()=>e.emit("error",n)),t(n);e.state.started(),s(()=>e.emit("start")),t()};if("stopped"!==e.state.state())return n(new Error(`Not able to start from state: ${e.state.state()}`));e.log("starting"),e.state.start(),r([t=>{e._repo.closed?e._repo.open(t):t()},t=>{e._repo.config.get((n,r)=>{if(n)return t(n);const i=h(e,r);i.start(n=>{if(n)return t(n);e.libp2p=i,t()})})},t=>{const n=[];let r;if(o(e._options,"EXPERIMENTAL.ipnsPubsub",!1)){const t=e.libp2p.pubsub,i=e._repo.datastore,o=e._peerInfo.id;r=new c(t,i,o),n.push(r)}if(o(e._options,"EXPERIMENTAL.dht",!1)&&!e._options.local)n.push(e.libp2p.dht);else{const t=new f(e._repo);n.push(t)}const s=new u(n);e._ipns=new l(s,e._repo.datastore,e._peerInfo,e._keychain,e._options),e._bitswap=new i(e.libp2p,e._repo.blocks,{statsEnabled:!0}),e._bitswap.start(),e._blockService.setExchange(e._bitswap),e._preload.start(),e._ipns.republisher.start(),e._mfsPreload.start(t)}],n)}))},function(e,t,n){"use strict";const r=n(11),i=n(419),o=n(56),s=n(40),a=n(99),u=n(90),l=n(980),c=n(989),f=n(993),h=n(995),p=n(120).logger,d=n(996),m={statsEnabled:!1,statsComputeThrottleTimeout:1e3,statsComputeThrottleMaxQueueSize:1e3},g=["blocksReceived","dataReceived","dupBlksReceived","dupDataReceived","blocksSent","dataSent","providesBufferLength","wantListLength","peerCount"];class y{constructor(e,t,n){this._libp2p=e,this._log=p(this.peerInfo.id),this._options=Object.assign({},m,n),this._stats=new d(g,{enabled:this._options.statsEnabled,computeThrottleTimeout:this._options.statsComputeThrottleTimeout,computeThrottleMaxQueueSize:this._options.statsComputeThrottleMaxQueueSize}),this.network=new c(e,this,{},this._stats),this.blockstore=t,this.engine=new f(this.peerInfo.id,t,this.network,this._stats),this.wm=new l(this.peerInfo.id,this.network,this._stats),this.notifications=new h(this.peerInfo.id)}get peerInfo(){return this._libp2p.peerInfo}_receiveMessage(e,t,n){this.engine.messageReceived(e,t,r=>{if(r&&this._log("failed to receive message",t),0===t.blocks.size)return n();const i=Array.from(t.blocks.values()),s=i.filter(e=>this.wm.wantlist.contains(e.cid)).map(e=>e.cid);this.wm.cancelWants(s),o(i,(t,n)=>this._handleReceivedBlock(e,t,n),n)})}_handleReceivedBlock(e,t,n){this._log("received block"),r([e=>this.blockstore.has(t.cid,e),(n,r)=>{if(this._updateReceiveCounters(e.toB58String(),t,n),n)return u(r);this._putBlock(t,r)}],n)}_updateReceiveCounters(e,t,n){this._stats.push(e,"blocksReceived",1),this._stats.push(e,"dataReceived",t.data.length),n&&(this._stats.push(e,"dupBlksReceived",1),this._stats.push(e,"dupDataReceived",t.data.length))}_receiveError(e){this._log.error("ReceiveError: %s",e.message)}_onPeerConnected(e){this.wm.connected(e)}_onPeerDisconnected(e){this.wm.disconnected(e),this.engine.peerDisconnected(e),this._stats.disconnected(e)}_putBlock(e,t){this.blockstore.put(e,n=>{if(n)return t(n);this.notifications.hasBlock(e),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)}),this.engine.receivedBlocks([e.cid]),t()})}enableStats(){this._stats.enable()}disableStats(){this._stats.disable()}wantlistForPeer(e){return this.engine.wantlistForPeer(e)}ledgerForPeer(e){return this.engine.ledgerForPeer(e)}get(e,t){this.getMany([e],(e,n)=>{if(e)return t(e);n&&n.length>0?t(null,n[0]):t()})}getMany(e,t){let n=e.length;const i=[];let o=!1;const s=(e,t)=>{i.push(e),this.notifications.wantBlock(e,n=>{this.wm.cancelWants([e]),t(null,n)},()=>{this.wm.cancelWants([e]),t(null,void 0)}),n||this.wm.wantBlocks(i)};a(e,(t,a)=>{r([e=>this.blockstore.has(t,e),(r,a)=>{if(n--,r)return n||this.wm.wantBlocks(i),this.blockstore.get(t,a);o||(o=!0,this.network.findAndConnect(e[0],e=>{e&&this._log.error(e)})),s(t,a)}],a)},t)}unwant(e){Array.isArray(e)||(e=[e]),this.wm.unwantBlocks(e),e.forEach(e=>this.notifications.unwantBlock(e))}cancelWants(e){Array.isArray(e)||(e=[e]),this.wm.cancelWants(e)}put(e,t){this._log("putting block"),r([t=>this.blockstore.has(e.cid,t),(t,n)=>{if(t)return u(n);this._putBlock(e,n)}],t)}putMany(e,t){r([t=>i(e,(e,t)=>{this.blockstore.has(e.cid,t)},t),(e,t)=>this.blockstore.putMany(e,n=>{if(n)return t(n);e.forEach(e=>{this.notifications.hasBlock(e),this.engine.receivedBlocks([e.cid]),this.network.provide(e.cid,e=>{e&&this._log.error("Failed to provide: %s",e.message)})}),t()})],t)}getWantlist(){return this.wm.wantlist.entries()}peers(){return this.engine.peers()}stat(){return this._stats}start(e){s([e=>this.wm.start(e),e=>this.network.start(e),e=>this.engine.start(e)],e)}stop(e){this._stats.stop(),s([e=>this.wm.stop(e),e=>this.network.stop(e),e=>this.engine.stop(e)],e)}}e.exports=y},function(e,t,n){"use strict";const r=n(90),i=n(242),o=n(243),s=n(321),a=n(988),u=n(120).logger;e.exports=class e{constructor(e,t,n){this.peers=new Map,this.wantlist=new o(n),this.network=t,this._stats=n,this._peerId=e,this._log=u(e,"want")}_addEntries(e,t,n){const r=e.map((e,n)=>new i.Entry(e,s.kMaxPriority-n,t));r.forEach(e=>{e.cancel?n?this.wantlist.removeForce(e.cid):this.wantlist.remove(e.cid):(this._log("adding to wl"),this.wantlist.add(e.cid,e.priority))});for(let e of this.peers.values())e.addEntries(r)}_startPeerHandler(e){let t=this.peers.get(e.toB58String());if(t)return void t.refcnt++;t=new a(this._peerId,e,this.network);const n=new i(!0);for(let e of this.wantlist.entries())n.addEntry(e[1].cid,e[1].priority);return t.addMessage(n),this.peers.set(e.toB58String(),t),t}_stopPeerHandler(e){const t=this.peers.get(e.toB58String());t&&(t.refcnt--,t.refcnt>0||this.peers.delete(e.toB58String()))}wantBlocks(e){this._addEntries(e,!1)}unwantBlocks(e){this._log("unwant blocks: %s",e.length),this._addEntries(e,!0,!0)}cancelWants(e){this._log("cancel wants: %s",e.length),this._addEntries(e,!0)}connectedPeers(){return Array.from(this.peers.keys())}connected(e){this._startPeerHandler(e)}disconnected(e){this._stopPeerHandler(e)}start(e){this.timer=setInterval(()=>{this._log("resend full-wantlist");const e=new i(!0);this.wantlist.forEach(t=>{e.addEntry(t.cid,t.priority)}),this.peers.forEach(t=>t.addMessage(e))},6e4),r(()=>e())}stop(e){this.peers.forEach(e=>this.disconnected(e.peerId)),clearInterval(this.timer),r(()=>e())}}},function(e,t,n){(function(e,n){var r=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,u="[object Arguments]",l="[object Array]",c="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",d="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",b="[object Promise]",v="[object RegExp]",w="[object Set]",_="[object String]",k="[object Symbol]",S="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",C="[object Float32Array]",A="[object Float64Array]",I="[object Int8Array]",T="[object Int16Array]",j="[object Int32Array]",O="[object Uint8Array]",P="[object Uint8ClampedArray]",B="[object Uint16Array]",R="[object Uint32Array]",N=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,F={};F[C]=F[A]=F[I]=F[T]=F[j]=F[O]=F[P]=F[B]=F[R]=!0,F[u]=F[l]=F[E]=F[c]=F[x]=F[f]=F[h]=F[p]=F[m]=F[g]=F[y]=F[v]=F[w]=F[_]=F[S]=!1;var D="object"==typeof e&&e&&e.Object===Object&&e,U="object"==typeof self&&self&&self.Object===Object&&self,z=D||U||Function("return this")(),q=t&&!t.nodeType&&t,K=q&&"object"==typeof n&&n&&!n.nodeType&&n,H=K&&K.exports===q,V=H&&D.process,W=function(){try{return V&&V.binding("util")}catch(e){}}(),$=W&&W.isTypedArray;function G(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function Y(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function J(e){return function(t){return e(t)}}function Z(e,t){return null==e?void 0:e[t]}function X(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function Q(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ee(e,t){return function(n){return e(t(n))}}function te(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ne=Array.prototype,re=Function.prototype,ie=Object.prototype,oe=z["__core-js_shared__"],se=(ae=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||""),ae?"Symbol(src)_1."+ae:""),ae,ue=re.toString,le=ie.hasOwnProperty,ce=ie.toString,fe=RegExp("^"+ue.call(le).replace(N,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),he=z.Symbol,pe=z.Uint8Array,de=ie.propertyIsEnumerable,me=ne.splice,ge=ee(Object.keys,Object),ye=mt(z,"DataView"),be=mt(z,"Map"),ve=mt(z,"Promise"),we=mt(z,"Set"),_e=mt(z,"WeakMap"),ke=mt(Object,"create"),Se=_t(ye),Ee=_t(be),xe=_t(ve),Ce=_t(we),Ae=_t(_e),Ie=he?he.prototype:void 0,Te=Ie?Ie.valueOf:void 0;function je(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(){this.__data__=ke?ke(null):{}}function Pe(e){return this.has(e)&&delete this.__data__[e]}function Be(e){var t=this.__data__;if(ke){var n=t[e];return n===i?void 0:n}return le.call(t,e)?t[e]:void 0}function Re(e){var t=this.__data__;return ke?void 0!==t[e]:le.call(t,e)}function Ne(e,t){var n=this.__data__;return n[e]=ke&&void 0===t?i:t,this}function Me(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Le(){this.__data__=[]}function Fe(e){var t=this.__data__,n=it(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():me.call(t,n,1),!0}function De(e){var t=this.__data__,n=it(t,e);return n<0?void 0:t[n][1]}function Ue(e){return it(this.__data__,e)>-1}function ze(e,t){var n=this.__data__,r=it(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function qe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ke(){this.__data__={hash:new je,map:new(be||Me),string:new je}}function He(e){return dt(this,e).delete(e)}function Ve(e){return dt(this,e).get(e)}function We(e){return dt(this,e).has(e)}function $e(e,t){return dt(this,e).set(e,t),this}function Ge(e){var t=-1,n=e?e.length:0;for(this.__data__=new qe;++t<n;)this.add(e[t])}function Ye(e){return this.__data__.set(e,i),this}function Je(e){return this.__data__.has(e)}function Ze(e){this.__data__=new Me(e)}function Xe(){this.__data__=new Me}function Qe(e){return this.__data__.delete(e)}function et(e){return this.__data__.get(e)}function tt(e){return this.__data__.has(e)}function nt(e,t){var n=this.__data__;if(n instanceof Me){var i=n.__data__;if(!be||i.length<r-1)return i.push([e,t]),this;n=this.__data__=new qe(i)}return n.set(e,t),this}function rt(e,t){var n=Et(e)||St(e)?Y(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!le.call(e,o)||i&&("length"==o||yt(o,r))||n.push(o);return n}function it(e,t){for(var n=e.length;n--;)if(kt(e[n][0],t))return n;return-1}function ot(e){return ce.call(e)}function st(e,t,n,r,i){return e===t||(null==e||null==t||!jt(e)&&!Ot(t)?e!=e&&t!=t:at(e,t,st,n,r,i))}function at(e,t,n,r,i,o){var a=Et(e),c=Et(t),f=l,h=l;a||(f=gt(e),f=f==u?y:f),c||(h=gt(t),h=h==u?y:h);var p=f==y&&!X(e),d=h==y&&!X(t),m=f==h;if(m&&!p)return o||(o=new Ze),a||Pt(e)?ft(e,t,n,r,i,o):ht(e,t,f,n,r,i,o);if(!(i&s)){var g=p&&le.call(e,"__wrapped__"),b=d&&le.call(t,"__wrapped__");if(g||b){var v=g?e.value():e,w=b?t.value():t;return o||(o=new Ze),n(v,w,r,i,o)}}return!!m&&(o||(o=new Ze),pt(e,t,n,r,i,o))}function ut(e){if(!jt(e)||vt(e))return!1;var t=It(e)||X(e)?fe:M;return t.test(_t(e))}function lt(e){return Ot(e)&&Tt(e.length)&&!!F[ce.call(e)]}function ct(e){if(!wt(e))return ge(e);var t=[];for(var n in Object(e))le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ft(e,t,n,r,i,a){var u=i&s,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var f=a.get(e);if(f&&a.get(t))return f==t;var h=-1,p=!0,d=i&o?new Ge:void 0;for(a.set(e,t),a.set(t,e);++h<l;){var m=e[h],g=t[h];if(r)var y=u?r(g,m,h,t,e,a):r(m,g,h,e,t,a);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!G(t,function(e,t){if(!d.has(t)&&(m===e||n(m,e,r,i,a)))return d.add(t)})){p=!1;break}}else if(m!==g&&!n(m,g,r,i,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ht(e,t,n,r,i,a,u){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!r(new pe(e),new pe(t)));case c:case f:case g:return kt(+e,+t);case h:return e.name==t.name&&e.message==t.message;case v:case _:return e==t+"";case m:var l=Q;case w:var p=a&s;if(l||(l=te),e.size!=t.size&&!p)return!1;var d=u.get(e);if(d)return d==t;a|=o,u.set(e,t);var y=ft(l(e),l(t),r,i,a,u);return u.delete(e),y;case k:if(Te)return Te.call(e)==Te.call(t)}return!1}function pt(e,t,n,r,i,o){var a=i&s,u=Bt(e),l=u.length,c=Bt(t),f=c.length;if(l!=f&&!a)return!1;for(var h=l;h--;){var p=u[h];if(!(a?p in t:le.call(t,p)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var m=!0;o.set(e,t),o.set(t,e);for(var g=a;++h<l;){p=u[h];var y=e[p],b=t[p];if(r)var v=a?r(b,y,p,t,e,o):r(y,b,p,e,t,o);if(!(void 0===v?y===b||n(y,b,r,i,o):v)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,_=t.constructor;w!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _)&&(m=!1)}return o.delete(e),o.delete(t),m}function dt(e,t){var n=e.__data__;return bt(t)?n["string"==typeof t?"string":"hash"]:n.map}function mt(e,t){var n=Z(e,t);return ut(n)?n:void 0}je.prototype.clear=Oe,je.prototype.delete=Pe,je.prototype.get=Be,je.prototype.has=Re,je.prototype.set=Ne,Me.prototype.clear=Le,Me.prototype.delete=Fe,Me.prototype.get=De,Me.prototype.has=Ue,Me.prototype.set=ze,qe.prototype.clear=Ke,qe.prototype.delete=He,qe.prototype.get=Ve,qe.prototype.has=We,qe.prototype.set=$e,Ge.prototype.add=Ge.prototype.push=Ye,Ge.prototype.has=Je,Ze.prototype.clear=Xe,Ze.prototype.delete=Qe,Ze.prototype.get=et,Ze.prototype.has=tt,Ze.prototype.set=nt;var gt=ot;function yt(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||L.test(e))&&e>-1&&e%1==0&&e<t}function bt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function vt(e){return!!se&&se in e}function wt(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||ie;return e===n}function _t(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function kt(e,t){return e===t||e!=e&&t!=t}function St(e){return Ct(e)&&le.call(e,"callee")&&(!de.call(e,"callee")||ce.call(e)==u)}(ye&&gt(new ye(new ArrayBuffer(1)))!=x||be&&gt(new be)!=m||ve&&gt(ve.resolve())!=b||we&&gt(new we)!=w||_e&&gt(new _e)!=S)&&(gt=function(e){var t=ce.call(e),n=t==y?e.constructor:void 0,r=n?_t(n):void 0;if(r)switch(r){case Se:return x;case Ee:return m;case xe:return b;case Ce:return w;case Ae:return S}return t});var Et=Array.isArray;function xt(e){return null!=e&&Tt(e.length)&&!It(e)}function Ct(e){return Ot(e)&&xt(e)}function At(e,t,n){n="function"==typeof n?n:void 0;var r=n?n(e,t):void 0;return void 0===r?st(e,t,n):!!r}function It(e){var t=jt(e)?ce.call(e):"";return t==p||t==d}function Tt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function jt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ot(e){return!!e&&"object"==typeof e}var Pt=$?J($):lt;function Bt(e){return xt(e)?rt(e):ct(e)}n.exports=At}).call(this,n(8),n(75)(e))},function(e,t,n){"use strict";const r=n(983),i={};e.exports=i;for(let e in r){let t=r[e];i[t.toString("hex")]=e}},function(e,t,n){"use strict";(function(n){t=e.exports,t.raw=n.from("55","hex"),t.base1=n.from("01","hex"),t.base2=n.from("00","hex"),t.base8=n.from("07","hex"),t.base10=n.from("09","hex"),t.cbor=n.from("51","hex"),t.protobuf=n.from("50","hex"),t.rlp=n.from("60","hex"),t.bencode=n.from("63","hex"),t.multicodec=n.from("30","hex"),t.multihash=n.from("31","hex"),t.multiaddr=n.from("32","hex"),t.multibase=n.from("33","hex"),t.md4=n.from("d4","hex"),t.md5=n.from("d5","hex"),t.sha1=n.from("11","hex"),t["sha2-256"]=n.from("12","hex"),t["sha2-512"]=n.from("13","hex"),t["dbl-sha2-256"]=n.from("56","hex"),t["sha3-224"]=n.from("17","hex"),t["sha3-256"]=n.from("16","hex"),t["sha3-384"]=n.from("15","hex"),t["sha3-512"]=n.from("14","hex"),t["shake-128"]=n.from("18","hex"),t["shake-256"]=n.from("19","hex"),t["keccak-224"]=n.from("1a","hex"),t["keccak-256"]=n.from("1b","hex"),t["keccak-384"]=n.from("1c","hex"),t["keccak-512"]=n.from("1d","hex"),t.murmur3=n.from("22","hex"),t["blake2b-8"]=n.from("b201","hex"),t["blake2b-16"]=n.from("b202","hex"),t["blake2b-24"]=n.from("b203","hex"),t["blake2b-32"]=n.from("b204","hex"),t["blake2b-40"]=n.from("b205","hex"),t["blake2b-48"]=n.from("b206","hex"),t["blake2b-56"]=n.from("b207","hex"),t["blake2b-64"]=n.from("b208","hex"),t["blake2b-72"]=n.from("b209","hex"),t["blake2b-80"]=n.from("b20a","hex"),t["blake2b-88"]=n.from("b20b","hex"),t["blake2b-96"]=n.from("b20c","hex"),t["blake2b-104"]=n.from("b20d","hex"),t["blake2b-112"]=n.from("b20e","hex"),t["blake2b-120"]=n.from("b20f","hex"),t["blake2b-128"]=n.from("b210","hex"),t["blake2b-136"]=n.from("b211","hex"),t["blake2b-144"]=n.from("b212","hex"),t["blake2b-152"]=n.from("b213","hex"),t["blake2b-160"]=n.from("b214","hex"),t["blake2b-168"]=n.from("b215","hex"),t["blake2b-176"]=n.from("b216","hex"),t["blake2b-184"]=n.from("b217","hex"),t["blake2b-192"]=n.from("b218","hex"),t["blake2b-200"]=n.from("b219","hex"),t["blake2b-208"]=n.from("b21a","hex"),t["blake2b-216"]=n.from("b21b","hex"),t["blake2b-224"]=n.from("b21c","hex"),t["blake2b-232"]=n.from("b21d","hex"),t["blake2b-240"]=n.from("b21e","hex"),t["blake2b-248"]=n.from("b21f","hex"),t["blake2b-256"]=n.from("b220","hex"),t["blake2b-264"]=n.from("b221","hex"),t["blake2b-272"]=n.from("b222","hex"),t["blake2b-280"]=n.from("b223","hex"),t["blake2b-288"]=n.from("b224","hex"),t["blake2b-296"]=n.from("b225","hex"),t["blake2b-304"]=n.from("b226","hex"),t["blake2b-312"]=n.from("b227","hex"),t["blake2b-320"]=n.from("b228","hex"),t["blake2b-328"]=n.from("b229","hex"),t["blake2b-336"]=n.from("b22a","hex"),t["blake2b-344"]=n.from("b22b","hex"),t["blake2b-352"]=n.from("b22c","hex"),t["blake2b-360"]=n.from("b22d","hex"),t["blake2b-368"]=n.from("b22e","hex"),t["blake2b-376"]=n.from("b22f","hex"),t["blake2b-384"]=n.from("b230","hex"),t["blake2b-392"]=n.from("b231","hex"),t["blake2b-400"]=n.from("b232","hex"),t["blake2b-408"]=n.from("b233","hex"),t["blake2b-416"]=n.from("b234","hex"),t["blake2b-424"]=n.from("b235","hex"),t["blake2b-432"]=n.from("b236","hex"),t["blake2b-440"]=n.from("b237","hex"),t["blake2b-448"]=n.from("b238","hex"),t["blake2b-456"]=n.from("b239","hex"),t["blake2b-464"]=n.from("b23a","hex"),t["blake2b-472"]=n.from("b23b","hex"),t["blake2b-480"]=n.from("b23c","hex"),t["blake2b-488"]=n.from("b23d","hex"),t["blake2b-496"]=n.from("b23e","hex"),t["blake2b-504"]=n.from("b23f","hex"),t["blake2b-512"]=n.from("b240","hex"),t["blake2s-8"]=n.from("b241","hex"),t["blake2s-16"]=n.from("b242","hex"),t["blake2s-24"]=n.from("b243","hex"),t["blake2s-32"]=n.from("b244","hex"),t["blake2s-40"]=n.from("b245","hex"),t["blake2s-48"]=n.from("b246","hex"),t["blake2s-56"]=n.from("b247","hex"),t["blake2s-64"]=n.from("b248","hex"),t["blake2s-72"]=n.from("b249","hex"),t["blake2s-80"]=n.from("b24a","hex"),t["blake2s-88"]=n.from("b24b","hex"),t["blake2s-96"]=n.from("b24c","hex"),t["blake2s-104"]=n.from("b24d","hex"),t["blake2s-112"]=n.from("b24e","hex"),t["blake2s-120"]=n.from("b24f","hex"),t["blake2s-128"]=n.from("b250","hex"),t["blake2s-136"]=n.from("b251","hex"),t["blake2s-144"]=n.from("b252","hex"),t["blake2s-152"]=n.from("b253","hex"),t["blake2s-160"]=n.from("b254","hex"),t["blake2s-168"]=n.from("b255","hex"),t["blake2s-176"]=n.from("b256","hex"),t["blake2s-184"]=n.from("b257","hex"),t["blake2s-192"]=n.from("b258","hex"),t["blake2s-200"]=n.from("b259","hex"),t["blake2s-208"]=n.from("b25a","hex"),t["blake2s-216"]=n.from("b25b","hex"),t["blake2s-224"]=n.from("b25c","hex"),t["blake2s-232"]=n.from("b25d","hex"),t["blake2s-240"]=n.from("b25e","hex"),t["blake2s-248"]=n.from("b25f","hex"),t["blake2s-256"]=n.from("b260","hex"),t["skein256-8"]=n.from("b301","hex"),t["skein256-16"]=n.from("b302","hex"),t["skein256-24"]=n.from("b303","hex"),t["skein256-32"]=n.from("b304","hex"),t["skein256-40"]=n.from("b305","hex"),t["skein256-48"]=n.from("b306","hex"),t["skein256-56"]=n.from("b307","hex"),t["skein256-64"]=n.from("b308","hex"),t["skein256-72"]=n.from("b309","hex"),t["skein256-80"]=n.from("b30a","hex"),t["skein256-88"]=n.from("b30b","hex"),t["skein256-96"]=n.from("b30c","hex"),t["skein256-104"]=n.from("b30d","hex"),t["skein256-112"]=n.from("b30e","hex"),t["skein256-120"]=n.from("b30f","hex"),t["skein256-128"]=n.from("b310","hex"),t["skein256-136"]=n.from("b311","hex"),t["skein256-144"]=n.from("b312","hex"),t["skein256-152"]=n.from("b313","hex"),t["skein256-160"]=n.from("b314","hex"),t["skein256-168"]=n.from("b315","hex"),t["skein256-176"]=n.from("b316","hex"),t["skein256-184"]=n.from("b317","hex"),t["skein256-192"]=n.from("b318","hex"),t["skein256-200"]=n.from("b319","hex"),t["skein256-208"]=n.from("b31a","hex"),t["skein256-216"]=n.from("b31b","hex"),t["skein256-224"]=n.from("b31c","hex"),t["skein256-232"]=n.from("b31d","hex"),t["skein256-240"]=n.from("b31e","hex"),t["skein256-248"]=n.from("b31f","hex"),t["skein256-256"]=n.from("b320","hex"),t["skein512-8"]=n.from("b321","hex"),t["skein512-16"]=n.from("b322","hex"),t["skein512-24"]=n.from("b323","hex"),t["skein512-32"]=n.from("b324","hex"),t["skein512-40"]=n.from("b325","hex"),t["skein512-48"]=n.from("b326","hex"),t["skein512-56"]=n.from("b327","hex"),t["skein512-64"]=n.from("b328","hex"),t["skein512-72"]=n.from("b329","hex"),t["skein512-80"]=n.from("b32a","hex"),t["skein512-88"]=n.from("b32b","hex"),t["skein512-96"]=n.from("b32c","hex"),t["skein512-104"]=n.from("b32d","hex"),t["skein512-112"]=n.from("b32e","hex"),t["skein512-120"]=n.from("b32f","hex"),t["skein512-128"]=n.from("b330","hex"),t["skein512-136"]=n.from("b331","hex"),t["skein512-144"]=n.from("b332","hex"),t["skein512-152"]=n.from("b333","hex"),t["skein512-160"]=n.from("b334","hex"),t["skein512-168"]=n.from("b335","hex"),t["skein512-176"]=n.from("b336","hex"),t["skein512-184"]=n.from("b337","hex"),t["skein512-192"]=n.from("b338","hex"),t["skein512-200"]=n.from("b339","hex"),t["skein512-208"]=n.from("b33a","hex"),t["skein512-216"]=n.from("b33b","hex"),t["skein512-224"]=n.from("b33c","hex"),t["skein512-232"]=n.from("b33d","hex"),t["skein512-240"]=n.from("b33e","hex"),t["skein512-248"]=n.from("b33f","hex"),t["skein512-256"]=n.from("b340","hex"),t["skein512-264"]=n.from("b341","hex"),t["skein512-272"]=n.from("b342","hex"),t["skein512-280"]=n.from("b343","hex"),t["skein512-288"]=n.from("b344","hex"),t["skein512-296"]=n.from("b345","hex"),t["skein512-304"]=n.from("b346","hex"),t["skein512-312"]=n.from("b347","hex"),t["skein512-320"]=n.from("b348","hex"),t["skein512-328"]=n.from("b349","hex"),t["skein512-336"]=n.from("b34a","hex"),t["skein512-344"]=n.from("b34b","hex"),t["skein512-352"]=n.from("b34c","hex"),t["skein512-360"]=n.from("b34d","hex"),t["skein512-368"]=n.from("b34e","hex"),t["skein512-376"]=n.from("b34f","hex"),t["skein512-384"]=n.from("b350","hex"),t["skein512-392"]=n.from("b351","hex"),t["skein512-400"]=n.from("b352","hex"),t["skein512-408"]=n.from("b353","hex"),t["skein512-416"]=n.from("b354","hex"),t["skein512-424"]=n.from("b355","hex"),t["skein512-432"]=n.from("b356","hex"),t["skein512-440"]=n.from("b357","hex"),t["skein512-448"]=n.from("b358","hex"),t["skein512-456"]=n.from("b359","hex"),t["skein512-464"]=n.from("b35a","hex"),t["skein512-472"]=n.from("b35b","hex"),t["skein512-480"]=n.from("b35c","hex"),t["skein512-488"]=n.from("b35d","hex"),t["skein512-496"]=n.from("b35e","hex"),t["skein512-504"]=n.from("b35f","hex"),t["skein512-512"]=n.from("b360","hex"),t["skein1024-8"]=n.from("b361","hex"),t["skein1024-16"]=n.from("b362","hex"),t["skein1024-24"]=n.from("b363","hex"),t["skein1024-32"]=n.from("b364","hex"),t["skein1024-40"]=n.from("b365","hex"),t["skein1024-48"]=n.from("b366","hex"),t["skein1024-56"]=n.from("b367","hex"),t["skein1024-64"]=n.from("b368","hex"),t["skein1024-72"]=n.from("b369","hex"),t["skein1024-80"]=n.from("b36a","hex"),t["skein1024-88"]=n.from("b36b","hex"),t["skein1024-96"]=n.from("b36c","hex"),t["skein1024-104"]=n.from("b36d","hex"),t["skein1024-112"]=n.from("b36e","hex"),t["skein1024-120"]=n.from("b36f","hex"),t["skein1024-128"]=n.from("b370","hex"),t["skein1024-136"]=n.from("b371","hex"),t["skein1024-144"]=n.from("b372","hex"),t["skein1024-152"]=n.from("b373","hex"),t["skein1024-160"]=n.from("b374","hex"),t["skein1024-168"]=n.from("b375","hex"),t["skein1024-176"]=n.from("b376","hex"),t["skein1024-184"]=n.from("b377","hex"),t["skein1024-192"]=n.from("b378","hex"),t["skein1024-200"]=n.from("b379","hex"),t["skein1024-208"]=n.from("b37a","hex"),t["skein1024-216"]=n.from("b37b","hex"),t["skein1024-224"]=n.from("b37c","hex"),t["skein1024-232"]=n.from("b37d","hex"),t["skein1024-240"]=n.from("b37e","hex"),t["skein1024-248"]=n.from("b37f","hex"),t["skein1024-256"]=n.from("b380","hex"),t["skein1024-264"]=n.from("b381","hex"),t["skein1024-272"]=n.from("b382","hex"),t["skein1024-280"]=n.from("b383","hex"),t["skein1024-288"]=n.from("b384","hex"),t["skein1024-296"]=n.from("b385","hex"),t["skein1024-304"]=n.from("b386","hex"),t["skein1024-312"]=n.from("b387","hex"),t["skein1024-320"]=n.from("b388","hex"),t["skein1024-328"]=n.from("b389","hex"),t["skein1024-336"]=n.from("b38a","hex"),t["skein1024-344"]=n.from("b38b","hex"),t["skein1024-352"]=n.from("b38c","hex"),t["skein1024-360"]=n.from("b38d","hex"),t["skein1024-368"]=n.from("b38e","hex"),t["skein1024-376"]=n.from("b38f","hex"),t["skein1024-384"]=n.from("b390","hex"),t["skein1024-392"]=n.from("b391","hex"),t["skein1024-400"]=n.from("b392","hex"),t["skein1024-408"]=n.from("b393","hex"),t["skein1024-416"]=n.from("b394","hex"),t["skein1024-424"]=n.from("b395","hex"),t["skein1024-432"]=n.from("b396","hex"),t["skein1024-440"]=n.from("b397","hex"),t["skein1024-448"]=n.from("b398","hex"),t["skein1024-456"]=n.from("b399","hex"),t["skein1024-464"]=n.from("b39a","hex"),t["skein1024-472"]=n.from("b39b","hex"),t["skein1024-480"]=n.from("b39c","hex"),t["skein1024-488"]=n.from("b39d","hex"),t["skein1024-496"]=n.from("b39e","hex"),t["skein1024-504"]=n.from("b39f","hex"),t["skein1024-512"]=n.from("b3a0","hex"),t["skein1024-520"]=n.from("b3a1","hex"),t["skein1024-528"]=n.from("b3a2","hex"),t["skein1024-536"]=n.from("b3a3","hex"),t["skein1024-544"]=n.from("b3a4","hex"),t["skein1024-552"]=n.from("b3a5","hex"),t["skein1024-560"]=n.from("b3a6","hex"),t["skein1024-568"]=n.from("b3a7","hex"),t["skein1024-576"]=n.from("b3a8","hex"),t["skein1024-584"]=n.from("b3a9","hex"),t["skein1024-592"]=n.from("b3aa","hex"),t["skein1024-600"]=n.from("b3ab","hex"),t["skein1024-608"]=n.from("b3ac","hex"),t["skein1024-616"]=n.from("b3ad","hex"),t["skein1024-624"]=n.from("b3ae","hex"),t["skein1024-632"]=n.from("b3af","hex"),t["skein1024-640"]=n.from("b3b0","hex"),t["skein1024-648"]=n.from("b3b1","hex"),t["skein1024-656"]=n.from("b3b2","hex"),t["skein1024-664"]=n.from("b3b3","hex"),t["skein1024-672"]=n.from("b3b4","hex"),t["skein1024-680"]=n.from("b3b5","hex"),t["skein1024-688"]=n.from("b3b6","hex"),t["skein1024-696"]=n.from("b3b7","hex"),t["skein1024-704"]=n.from("b3b8","hex"),t["skein1024-712"]=n.from("b3b9","hex"),t["skein1024-720"]=n.from("b3ba","hex"),t["skein1024-728"]=n.from("b3bb","hex"),t["skein1024-736"]=n.from("b3bc","hex"),t["skein1024-744"]=n.from("b3bd","hex"),t["skein1024-752"]=n.from("b3be","hex"),t["skein1024-760"]=n.from("b3bf","hex"),t["skein1024-768"]=n.from("b3c0","hex"),t["skein1024-776"]=n.from("b3c1","hex"),t["skein1024-784"]=n.from("b3c2","hex"),t["skein1024-792"]=n.from("b3c3","hex"),t["skein1024-800"]=n.from("b3c4","hex"),t["skein1024-808"]=n.from("b3c5","hex"),t["skein1024-816"]=n.from("b3c6","hex"),t["skein1024-824"]=n.from("b3c7","hex"),t["skein1024-832"]=n.from("b3c8","hex"),t["skein1024-840"]=n.from("b3c9","hex"),t["skein1024-848"]=n.from("b3ca","hex"),t["skein1024-856"]=n.from("b3cb","hex"),t["skein1024-864"]=n.from("b3cc","hex"),t["skein1024-872"]=n.from("b3cd","hex"),t["skein1024-880"]=n.from("b3ce","hex"),t["skein1024-888"]=n.from("b3cf","hex"),t["skein1024-896"]=n.from("b3d0","hex"),t["skein1024-904"]=n.from("b3d1","hex"),t["skein1024-912"]=n.from("b3d2","hex"),t["skein1024-920"]=n.from("b3d3","hex"),t["skein1024-928"]=n.from("b3d4","hex"),t["skein1024-936"]=n.from("b3d5","hex"),t["skein1024-944"]=n.from("b3d6","hex"),t["skein1024-952"]=n.from("b3d7","hex"),t["skein1024-960"]=n.from("b3d8","hex"),t["skein1024-968"]=n.from("b3d9","hex"),t["skein1024-976"]=n.from("b3da","hex"),t["skein1024-984"]=n.from("b3db","hex"),t["skein1024-992"]=n.from("b3dc","hex"),t["skein1024-1000"]=n.from("b3dd","hex"),t["skein1024-1008"]=n.from("b3de","hex"),t["skein1024-1016"]=n.from("b3df","hex"),t["skein1024-1024"]=n.from("b3e0","hex"),t.ip4=n.from("04","hex"),t.ip6=n.from("29","hex"),t.tcp=n.from("06","hex"),t.udp=n.from("0111","hex"),t.dccp=n.from("21","hex"),t.sctp=n.from("84","hex"),t.udt=n.from("012d","hex"),t.utp=n.from("012e","hex"),t.ipfs=n.from("01a5","hex"),t.http=n.from("01e0","hex"),t.https=n.from("01bb","hex"),t.quic=n.from("01cc","hex"),t.ws=n.from("01dd","hex"),t.onion=n.from("01bc","hex"),t["p2p-circuit"]=n.from("0122","hex"),t["git-raw"]=n.from("78","hex"),t["dag-pb"]=n.from("70","hex"),t["dag-cbor"]=n.from("71","hex"),t["git-raw"]=n.from("78","hex"),t["eth-block"]=n.from("90","hex"),t["eth-block-list"]=n.from("91","hex"),t["eth-tx-trie"]=n.from("92","hex"),t["eth-tx"]=n.from("93","hex"),t["eth-tx-receipt-trie"]=n.from("94","hex"),t["eth-tx-receipt"]=n.from("95","hex"),t["eth-state-trie"]=n.from("96","hex"),t["eth-account-snapshot"]=n.from("97","hex"),t["eth-storage-trie"]=n.from("98","hex"),t["bitcoin-block"]=n.from("b0","hex"),t["bitcoin-tx"]=n.from("b1","hex"),t["zcash-block"]=n.from("c0","hex"),t["zcash-tx"]=n.from("c1","hex"),t["stellar-block"]=n.from("d0","hex"),t["stellar-tx"]=n.from("d1","hex"),t["torrent-info"]=n.from("7b","hex"),t["torrent-file"]=n.from("7c","hex"),t["ed25519-pub"]=n.from("ed","hex")}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(39);e.exports=(e=>{if(!t.isBuffer(e))throw new Error("arg needs to be a buffer");let n=[];for(;e.length>0;){const t=r.decode(e);n.push(t),e=e.slice(r.decode.bytes)}return n})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports="\n message Message {\n message Wantlist {\n message Entry {\n // changed from string to bytes, it makes a difference in JavaScript\n optional bytes block = 1; // the block cid (cidV0 in bitswap 1.0.0, cidV1 in bitswap 1.1.0)\n optional int32 priority = 2; // the priority (normalized). default to 1\n optional bool cancel = 3; // whether this revokes an entry\n }\n\n repeated Entry entries = 1; // a list of wantlist entries\n optional bool full = 2; // whether this is the full wantlist. default to false\n }\n\n message Block {\n optional bytes prefix = 1; // CID prefix (cid version, multicodec and multihash prefix (type + length)\n optional bytes data = 2;\n }\n\n optional Wantlist wantlist = 1;\n repeated bytes blocks = 2; // used to send Blocks in bitswap 1.0.0\n repeated Block payload = 3; // used to send Blocks in bitswap 1.1.0\n }\n"},function(e,t,n){"use strict";const r=n(243).Entry,i=n(9),o=n(18);e.exports=class e{constructor(e,t,n){o(i.isCID(e),"needs valid cid"),this.entry=new r(e,t),this.cancel=Boolean(n)}get cid(){return this.entry.cid}set cid(e){this.entry.cid=e}get priority(){return this.entry.priority}set priority(e){this.entry.priority=e}get[Symbol.toStringTag](){const e=this.cid.toBaseEncodedString();return`BitswapMessageEntry ${e} <cancel: ${this.cancel}, priority: ${this.priority}>`}equals(e){return this.cancel===e.cancel&&this.entry.equals(e.entry)}}},function(e,t,n){"use strict";const r=n(18),i=n(9);class o{constructor(e,t){r(i.isCID(e),"must be valid CID"),this._refCounter=1,this.cid=e,this.priority=t||1}inc(){this._refCounter+=1}dec(){this._refCounter=Math.max(0,this._refCounter-1)}hasRefs(){return this._refCounter>0}get[Symbol.toStringTag](){const e=this.cid.toBaseEncodedString();return`WantlistEntry <key: ${e}, priority: ${this.priority}, refs: ${this._refCounter}>`}equals(e){return this._refCounter===e._refCounter&&this.cid.equals(e.cid)&&this.priority===e.priority}}e.exports=o},function(e,t,n){"use strict";const r=n(489),i=n(242),o=n(120).logger;e.exports=class e{constructor(e,t,n){this.peerId=t,this.network=n,this.refcnt=1,this._entries=[],this._log=o(e,"msgqueue",t.toB58String().slice(0,8)),this.sendEntries=r(this._sendEntries.bind(this),200)}addMessage(e){e.empty||this.send(e)}addEntries(e){this._entries=this._entries.concat(e),this.sendEntries()}_sendEntries(){if(!this._entries.length)return;const e=new i(!1);this._entries.forEach(t=>{t.cancel?e.cancel(t.cid):e.addEntry(t.cid,t.priority)}),this._entries=[],this.addMessage(e)}send(e){this.network.connectTo(this.peerId,t=>{t?this._log.error("cant connect to peer %s: %s",this.peerId.toB58String(),t.message):(this._log("sending message"),this.network.sendMessage(this.peerId,e,e=>{e&&this._log.error("send error: %s",e.message)}))})}}},function(e,t,n){"use strict";const r=n(72),i=n(26),o=n(11),s=n(56),a=n(90),u=n(242),l=n(321),c=n(120).logger,f="/ipfs/bitswap/1.0.0",h="/ipfs/bitswap/1.1.0";class p{constructor(e,t,n,r){this._log=c(e.peerInfo.id,"network"),n=n||{},this.libp2p=e,this.bitswap=t,this.b100Only=n.b100Only||!1,this._stats=r,this._running=!1}start(e){this._running=!0,this._onPeerConnect=this._onPeerConnect.bind(this),this._onPeerDisconnect=this._onPeerDisconnect.bind(this),this._onConnection=this._onConnection.bind(this),this.libp2p.handle(f,this._onConnection),this.b100Only||this.libp2p.handle(h,this._onConnection),this.libp2p.on("peer:connect",this._onPeerConnect),this.libp2p.on("peer:disconnect",this._onPeerDisconnect),this.libp2p.peerBook.getAllArray().filter(e=>e.isConnected()).forEach(e=>this._onPeerConnect(e)),a(()=>e())}stop(e){this._running=!1,this.libp2p.unhandle(f),this.b100Only||this.libp2p.unhandle(h),this.libp2p.removeListener("peer:connect",this._onPeerConnect),this.libp2p.removeListener("peer:disconnect",this._onPeerDisconnect),a(()=>e())}_onConnection(e,t){this._running&&(this._log("incomming new bitswap connection: %s",e),i(t,r.decode(),i.asyncMap((e,t)=>u.deserialize(e,t)),i.asyncMap((e,n)=>{t.getPeerInfo((t,r)=>{if(t)return n(t);this.bitswap._receiveMessage(r.id,e,n)})}),i.onEnd(e=>{this._log("ending connection"),e&&this.bitswap._receiveError(e)})))}_onPeerConnect(e){this._running&&this.bitswap._onPeerConnected(e.id)}_onPeerDisconnect(e){this._running&&this.bitswap._onPeerDisconnected(e.id)}findProviders(e,t,n){this.libp2p.contentRouting.findProviders(e,{maxTimeout:l.providerRequestTimeout,maxNumProviders:t},n)}findAndConnect(e,t){o([t=>this.findProviders(e,l.maxProvidersPerRequest,t),(e,t)=>{this._log("connecting to providers",e.map(e=>e.id.toB58String())),s(e,(e,t)=>this.connectTo(e,t))}],t)}provide(e,t){this.libp2p.contentRouting.provide(e,t)}sendMessage(e,t,n){if(!this._running)return n(new Error("network isn't running"));const r=e.toB58String()?e.toB58String():e.id.toB58String();this._log("sendMessage to %s",r,t),this._dialPeer(e,(r,i,o)=>{if(r)return n(r);let s;switch(o){case f:s=t.serializeToBitswap100();break;case h:s=t.serializeToBitswap110();break;default:return n(new Error("Unkown protocol: "+o))}d(i,s,e=>{e&&this._log.error(e)}),n(),this._updateSentStats(e,t.blocks)})}connectTo(e,t){if(!this._running)return t(new Error("network isn't running"));this.libp2p.dial(e,t)}_dialPeer(e,t){this.libp2p.dialProtocol(e,h,(n,r)=>{n?this.libp2p.dialProtocol(e,f,(e,n)=>{if(e)return t(e);t(null,n,f)}):t(null,r,h)})}_updateSentStats(e,t){const n=e.toB58String();this._stats&&(t.forEach(e=>this._stats.push(n,"dataSent",e.data.length)),this._stats.push(n,"blocksSent",t.size))}}function d(e,t,n){i(i.values([t]),r.encode(),e,i.onEnd(n))}e.exports=p},function(e,t,n){"use strict";const r=n(4).Buffer;e.exports=o;const i=10240;function o(e){e=Object.assign({fixed:!1},e||{});const t=n(39);let i=e.fixed?null:s(),o=0,a=!1;return n=>(u,l)=>{if(u&&(a=u),a)return l(a);n(null,(n,u)=>{if(n&&(a=n),a)return l(a);if(!a&&!r.isBuffer(u))return a=new Error("data must be a buffer"),l(a);const c=a?0:u.length;let f;if(e.fixed?(f=r.alloc(4),f.writeInt32BE(c,0)):(t.encode(c,i,o),o+=t.encode.bytes,f=i.slice(o-t.encode.bytes,o),i.length-o<100&&(i=s(),o=0)),a)return l(null,f);l(null,r.concat([f,u],(e.fixed?4:t.encode.bytes)+c))})}}function s(){return r.alloc(i)}},function(e,t,n){"use strict";const r=n(39),i=n(490),o=n(4).Buffer,s=n(73);t.decode=c,t.decodeFromReader=f;const a=128,u=e=>!(128&e),l=4194304;function c(e){let t=new i,n=s(e=>{t.abort(e)});return r=>{function i(){let r=!0,o=!1;const s=(e,t)=>{o=!0,e?(n.end(e),r=!1):(n.push(t),r||i())};for(;r;)o=!1,h(t,e,s),o||(r=!1)}return t(r),i(),n}}function f(e,t,n){"function"==typeof t&&(n=t,t={}),h(e,t,function e(t,r){if(t)return n(!0===t?new Error("Unexpected end of input from reader."):t);n(null,r)})}function h(e,t,n){t=Object.assign({fixed:!1,maxLength:l},t||{}),t.fixed?p(e,t.maxLength,n):d(e,t.maxLength,n)}function p(e,t,n){e.read(4,(r,i)=>{if(r)return n(r);const o=i.readInt32BE(0);if(o>t)return n(new Error("size longer than max permitted length of "+t+"!"));m(e,o,n)})}function d(e,t,n){let i=[];function s(){e.read(1,(a,l)=>{if(a)return n(a);if(i.push(l),l&&!u(l[0]))return void s();const c=r.decode(o.concat(i));if(c>t)return n(new Error("size longer than max permitted length of "+t+"!"));m(e,c,(e,t)=>e?n(e):(i=[],t.length<c?n(new Error("Message length does not match prefix specified length.")):void n(null,t)))})}0===i.length&&s()}function m(e,t,n){e.read(t,(e,t)=>{if(e)return n(e);n(null,t)})}},function(e,t,n){(function(t){e.exports=function(){var e=[],n=0;function r(){return e.reduce(function(e,t){return e+t.length},0)}return{length:n,data:this,add:function(r){if(!t.isBuffer(r))throw new Error("data must be a buffer, was: "+JSON.stringify(r));return this.length=n+=r.length,e.push(r),this},has:function(e){return null==e?n>0:n>=e},get:function(r){var i;if(null==r||r===n){n=0;var o=e;return e=[],1==o.length?o[0]:t.concat(o)}if(e.length>1&&r<=(i=e[0].length)){var s=e[0].slice(0,r);return r===i?e.shift():e[0]=e[0].slice(r,i),n-=r,s}if(r<n){for(var a=[],u=0;u+e[0].length<r;){var l=e.shift();u+=l.length,a.push(l)}return u<r&&(a.push(e[0].slice(0,r-u)),e[0]=e[0].slice(r-u,e[0].length),this.length=n-=r),t.concat(a)}throw new Error("could not get "+r+" bytes")}}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(56),i=n(145),o=n(11),s=n(90),a=n(99),u=n(489),l=n(242),c=n(243),f=n(994),{logger:h,groupBy:p,pullAllWith:d,uniqWith:m}=n(120),g=524288;class y{constructor(e,t,n,r){this._log=h(e,"engine"),this.blockstore=t,this.network=n,this._stats=r,this.ledgerMap=new Map,this._running=!1,this._tasks=[],this._outbox=u(this._processTasks.bind(this),100)}_sendBlocks(e,t,n){const r=t.reduce((e,t)=>e+t.data.byteLength,0);if(r<g)return this._sendSafeBlocks(e,t,n);let o=0,a=[],u=t.length;i(t,(t,n)=>{if(u--,a.push(t),o+=t.data.byteLength,o>=g||0===u){o=0;const t=a.slice();a=[],this._sendSafeBlocks(e,t,e=>{e&&this._log("sendblock error: %s",e.message),n()})}else s(n)},n)}_sendSafeBlocks(e,t,n){const r=new l(!1);t.forEach(e=>r.addBlock(e)),this.network.sendMessage(e,r,n)}_processTasks(){if(!this._running||!this._tasks.length)return;const e=this._tasks;this._tasks=[];const t=e.map(e=>e.entry),n=t.map(e=>e.cid),i=m((e,t)=>e.equals(t),n),s=p(e=>e.target.toB58String(),e);o([e=>a(i,(e,t)=>{this.blockstore.get(e,t)},e),(e,t)=>r(Object.values(s),(t,r)=>{const i=t[0].target,o=n.map(t=>e.find(e=>e.cid.equals(t)));this._sendBlocks(i,o,e=>{e?this._log.error("should never happen: ",e):o.forEach(e=>this.messageSent(i,e)),r()})},t)],e=>{this._tasks=[],e&&this._log.error(e)})}wantlistForPeer(e){const t=e.toB58String();return this.ledgerMap.has(t)?this.ledgerMap.get(t).wantlist.sortedEntries():new Map}ledgerForPeer(e){const t=e.toB58String(),n=this.ledgerMap.get(t);return n?{peer:n.partner.toPrint(),value:n.debtRatio(),sent:n.accounting.bytesSent,recv:n.accounting.bytesRecv,exchanged:n.exchangeCount}:null}peers(){return Array.from(this.ledgerMap.values()).map(e=>e.partner)}receivedBlocks(e){e.length&&(this.ledgerMap.forEach(t=>{e.map(e=>t.wantlistContains(e)).filter(Boolean).forEach(e=>{this._tasks.push({entry:e,target:t.partner})})}),this._outbox())}messageReceived(e,t,n){const r=this._findOrCreate(e);if(t.empty)return s(n);if(t.full&&(r.wantlist=new c),this._processBlocks(t.blocks,r),0===t.wantlist.size)return s(n);let i=[],o=[];t.wantlist.forEach(e=>{e.cancel?(r.cancelWant(e.cid),i.push(e)):(r.wants(e.cid,e.priority),o.push(e))}),this._cancelWants(r,e,i),this._addWants(r,e,o,n)}_cancelWants(e,t,n){const r=t.toB58String();this._tasks=d((e,t)=>{const n=e.target.toB58String()===r,i=e.entry.cid.equals(t.cid);return n&&i},this._tasks,n)}_addWants(e,t,n,i){r(n,(e,n)=>{this.blockstore.has(e.cid,(r,i)=>{r?this._log.error("failed existence check"):i&&this._tasks.push({entry:e.entry,target:t}),n()})},()=>{this._outbox(),i()})}_processBlocks(e,t,n){const r=[];e.forEach((e,n)=>{this._log("got block (%s bytes)",e.data.length),t.receivedBytes(e.data.length),r.push(e.cid)}),this.receivedBlocks(r)}messageSent(e,t){const n=this._findOrCreate(e);n.sentBytes(t?t.data.length:0),t&&t.cid&&n.wantlist.remove(t.cid)}numBytesSentTo(e){return this._findOrCreate(e).accounting.bytesSent}numBytesReceivedFrom(e){return this._findOrCreate(e).accounting.bytesRecv}peerDisconnected(e){}_findOrCreate(e){const t=e.toB58String();if(this.ledgerMap.has(t))return this.ledgerMap.get(t);const n=new f(e);return this.ledgerMap.set(t,n),this._stats&&this._stats.push(t,"peerCount",1),n}start(e){this._running=!0,s(()=>e())}stop(e){this._running=!1,s(()=>e())}}e.exports=y},function(e,t,n){"use strict";const r=n(243);class i{constructor(e){this.partner=e,this.wantlist=new r,this.exchangeCount=0,this.sentToPeer=new Map,this.accounting={bytesSent:0,bytesRecv:0}}sentBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesSent+=e}receivedBytes(e){this.exchangeCount++,this.lastExchange=(new Date).getTime(),this.accounting.bytesRecv+=e}wants(e,t){this.wantlist.add(e,t)}cancelWant(e){this.wantlist.remove(e)}wantlistContains(e){return this.wantlist.contains(e)}debtRatio(){return this.accounting.bytesSent/(this.accounting.bytesRecv+1)}}e.exports=i},function(e,t,n){"use strict";const r=n(6).EventEmitter,i=n(321),o=n(120).logger,s=e=>`unwant:${e}`,a=e=>`block:${e}`;class u extends r{constructor(e){super(),this.setMaxListeners(i.maxListeners),this._log=o(e,"notif"),this._unwantListeners={},this._blockListeners={}}hasBlock(e){const t=`block:${e.cid.buffer.toString()}`;this._log(t),this.emit(t,e)}wantBlock(e,t,n){const r=e.buffer.toString();this._log(`wantBlock:${r}`),this._unwantListeners[r]=(()=>{this._log(`manual unwant: ${r}`),this._cleanup(r),n()}),this._blockListeners[r]=(e=>{this._cleanup(r),t(e)}),this.once(s(r),this._unwantListeners[r]),this.once(a(r),this._blockListeners[r])}unwantBlock(e){const t=`unwant:${e.buffer.toString()}`;this._log(t),this.emit(t)}_cleanup(e){this._unwantListeners[e]&&(this.removeListener(s(e),this._unwantListeners[e]),delete this._unwantListeners[e]),this._blockListeners[e]&&(this.removeListener(a(e),this._blockListeners[e]),delete this._blockListeners[e])}}e.exports=u},function(e,t,n){"use strict";const r=n(6),i=n(997),o={movingAverageIntervals:[6e4,3e5,9e5]};class s extends r{constructor(e,t){super();const n=Object.assign({},o,t);if("number"!=typeof n.computeThrottleTimeout)throw new Error("need computeThrottleTimeout");if("number"!=typeof n.computeThrottleMaxQueueSize)throw new Error("need computeThrottleMaxQueueSize");this._initialCounters=e,this._options=n,this._enabled=this._options.enabled,this._global=new i(e,n),this._global.on("update",e=>this.emit("update",e)),this._peers=new Map}enable(){this._enabled=!0,this._options.enabled=!0,this._global.enable()}disable(){this._enabled=!1,this._options.enabled=!1,this._global.disable()}stop(){this._enabled=!1,this._global.stop();for(let e of this._peers)e[1].stop()}get snapshot(){return this._global.snapshot}get movingAverages(){return this._global.movingAverages}forPeer(e){return e.toB58String&&(e=e.toB58String()),this._peers.get(e)}push(e,t,n){if(this._enabled&&(this._global.push(t,n),e)){let r=this._peers.get(e);r||(r=new i(this._initialCounters,this._options),this._peers.set(e,r)),r.push(t,n)}}disconnected(e){const t=e.toB58String(),n=this._peers.get(t);n&&(n.stop(),this._peers.delete(t))}}e.exports=s},function(e,t,n){"use strict";const r=n(6),i=n(62),o=n(492);class s extends r{constructor(e,t){super(),this._options=t,this._queue=[],this._stats={},this._frequencyLastTime=Date.now(),this._frequencyAccumulators={},this._movingAverages={},this._update=this._update.bind(this),e.forEach(e=>{this._stats[e]=i(0),this._movingAverages[e]={},this._options.movingAverageIntervals.forEach(t=>{const n=this._movingAverages[e][t]=o(t);n.push(this._frequencyLastTime,0)})}),this._enabled=this._options.enabled}enable(){this._enabled=!0}disable(){this._disabled=!0}stop(){this._timeout&&clearTimeout(this._timeout)}get snapshot(){return Object.assign({},this._stats)}get movingAverages(){return Object.assign({},this._movingAverages)}push(e,t){this._enabled&&(this._queue.push([e,t,Date.now()]),this._resetComputeTimeout())}_resetComputeTimeout(){this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(this._update,this._nextTimeout())}_nextTimeout(){const e=this._queue.length/this._options.computeThrottleMaxQueueSize;return Math.max(this._options.computeThrottleTimeout*(1-e),0)}_update(){if(this._timeout=null,this._queue.length){let e;for(;this._queue.length;){const t=e=this._queue.shift();this._applyOp(t)}this._updateFrequency(e[2]),this.emit("update",this._stats)}}_updateFrequency(e){const t=e-this._frequencyLastTime;Object.keys(this._stats).forEach(n=>{this._updateFrequencyFor(n,t,e)}),this._frequencyLastTime=e}_updateFrequencyFor(e,t,n){const r=this._frequencyAccumulators[e]||0;this._frequencyAccumulators[e]=0;const i=r/t*1e3;let s=this._movingAverages[e];s||(s=this._movingAverages[e]={}),this._options.movingAverageIntervals.forEach(e=>{let t=s[e];t||(t=s[e]=o(e)),t.push(n,i)})}_applyOp(e){const t=e[0],n=e[1];if("number"!=typeof n)throw new Error("invalid increment number:",n);let r;r=this._stats.hasOwnProperty(t)?this._stats[t]:this._stats[t]=i(0),this._stats[t]=r.plus(n),this._frequencyAccumulators[t]||(this._frequencyAccumulators[t]=0),this._frequencyAccumulators[t]+=n}}e.exports=s},function(e,t,n){var r=n(999),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=s},function(e,t,n){var r=n(1e3),i=500;function o(e){var t=r(e,function(e){return n.size===i&&n.clear(),e}),n=t.cache;return t}e.exports=o},function(e,t,n){var r=n(324),i="Expected a function";function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(1002),i=n(246),o=n(325);function s(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}e.exports=s},function(e,t,n){var r=n(1003),i=n(1008),o=n(1009),s=n(1010),a=n(1011);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,n){var r=n(245);function i(){this.__data__=r?r(null):{},this.size=0}e.exports=i},function(e,t,n){var r=n(172),i=n(1005),o=n(215),s=n(495),a=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,h=c.hasOwnProperty,p=RegExp("^"+f.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(e){if(!o(e)||i(e))return!1;var t=r(e)?p:u;return t.test(s(e))}e.exports=d},function(e,t,n){var r=n(1006),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""),o?"Symbol(src)_1."+o:""),o;function s(e){return!!i&&i in e}e.exports=s},function(e,t,n){var r=n(98),i=r["__core-js_shared__"];e.exports=i},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=n},function(e,t,n){var r=n(245),i="__lodash_hash_undefined__",o=Object.prototype,s=o.hasOwnProperty;function a(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return s.call(t,e)?t[e]:void 0}e.exports=a},function(e,t,n){var r=n(245),i=Object.prototype,o=i.hasOwnProperty;function s(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}e.exports=s},function(e,t,n){var r=n(245),i="__lodash_hash_undefined__";function o(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}e.exports=o},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){var r=n(247),i=Array.prototype,o=i.splice;function s(e){var t=this.__data__,n=r(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():o.call(t,n,1),--this.size,!0}e.exports=s},function(e,t,n){var r=n(247);function i(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}e.exports=i},function(e,t,n){var r=n(247);function i(e){return r(this.__data__,e)>-1}e.exports=i},function(e,t,n){var r=n(247);function i(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}e.exports=i},function(e,t,n){var r=n(248);function i(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}e.exports=i},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){var r=n(248);function i(e){return r(this,e).get(e)}e.exports=i},function(e,t,n){var r=n(248);function i(e){return r(this,e).has(e)}e.exports=i},function(e,t,n){var r=n(248);function i(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}e.exports=i},function(e,t,n){var r=n(173),i=n(299),o=n(68),s=n(323),a=1/0,u=r?r.prototype:void 0,l=u?u.toString:void 0;function c(e){if("string"==typeof e)return e;if(o(e))return i(e,c)+"";if(s(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}e.exports=c},function(e,t,n){"use strict";e.exports=a;var r=n(87),i=a.prototype,o=new Date%1e9;function s(){return(1e9*Math.random()>>>0)+o++}function a(e){e=e||{},this.id=e.id||s(),this.max=e.max||1/0,this.items=e.items||[],this._lookup={},this.size=this.items.length,this.lastModified=new Date(e.lastModified||new Date);for(var t,n,r=this.items.length;r--;)t=this.items[r],n=new Date(t.expires)-new Date,this._lookup[t.key]=t,n>0?this.expire(t.key,n):n<=0&&this.delete(t.key)}i.has=function(e){return e in this._lookup},i.get=function(e){if(!this.has(e))return null;var t=this._lookup[e];return t.refresh&&this.expire(e,t.refresh),this.items.splice(this.items.indexOf(t),1),this.items.push(t),t.value},i.meta=function(e){if(!this.has(e))return null;var t=this._lookup[e];return"meta"in t?t.meta:null},i.set=function(e,t,n){var r=this._lookup[e],i=this._lookup[e]={key:e,value:t};return this.lastModified=new Date,r?(clearTimeout(r.timeout),this.items.splice(this.items.indexOf(r),1,i)):(this.size>=this.max&&this.delete(this.items[0].key),this.items.push(i),this.size++),n&&("ttl"in n&&this.expire(e,n.ttl),"meta"in n&&(i.meta=n.meta),n.refresh&&(i.refresh=n.ttl)),this},i.delete=function(e){var t=this._lookup[e];return!!t&&(this.lastModified=new Date,this.items.splice(this.items.indexOf(t),1),clearTimeout(t.timeout),delete this._lookup[e],this.size--,this)},i.expire=function(e,t){var n=t||0,i=this._lookup[e];if(!i)return this;if("string"==typeof n&&(n=r(t)),"number"!=typeof n)throw new TypeError("Expiration time must be a string or number.");return clearTimeout(i.timeout),i.timeout=setTimeout(this.delete.bind(this,i.key),n),i.expires=Number(new Date)+n,this},i.clear=function(){for(var e=this.items.length;e--;)this.delete(this.items[e].key);return this},i.toJSON=function(){for(var e=new Array(this.items.length),t,n=e.length;n--;)t=this.items[n],e[n]={key:t.key,meta:t.meta,value:t.value,expires:t.expires,refresh:t.refresh};return{id:this.id,max:isFinite(this.max)?this.max:void 0,lastModified:this.lastModified,items:e}}},function(e,t,n){"use strict";const r=n(23),{Key:i}=n(33),o=n(40),s=n(22),a=n(5),u=a("jsipfs:ipns:publisher");u.error=a("jsipfs:ipns:publisher:error");const l=n(182),c=36e5;class f{constructor(e,t){this._routing=e,this._datastore=t}publishWithEOL(e,t,n,i){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return u.error(e),i(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}r.createFromPrivKey(e.bytes,(r,o)=>{if(r)return i(r);this._updateOrCreateRecord(e,t,n,o,(e,t)=>{if(e)return i(e);this._putRecordToRouting(t,o,i)})})}publish(e,t,n){this.publishWithEOL(e,t,c,n)}_putRecordToRouting(e,t,n){if(!r.isPeerId(t)){const e="peerId received is not valid";return u.error(e),n(s(new Error(e),"ERR_INVALID_PEER_ID"))}const i=t._pubKey;l.embedPublicKey(i,e,(r,s)=>{if(r)return n(r);let a;try{a=l.getIdKeys(t.toBytes())}catch(r){return u.error(r),n(r)}o([n=>this._publishEntry(a.routingKey,s||e,t,n),e=>this._publishPublicKey(a.routingPubKey,i,t,e)],t=>{if(t)return u.error(t),n(t);n(null,s||e)})})}_publishEntry(e,t,n,r){if(!i.isKey(e)){const e="datastore key does not have a valid format";return u.error(e),r(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}let o;try{o=l.marshal(t)}catch(e){return u.error(e),r(e)}this._routing.put(e.toBuffer(),o,(t,n)=>{if(t){const t=`ipns record for ${e.toString()} could not be stored in the routing`;return u.error(t),r(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}u(`ipns record for ${e.toString()} was stored in the routing`),r(null,n)})}_publishPublicKey(e,t,n,r){if(!i.isKey(e)){const e="datastore key does not have a valid format";return u.error(e),r(s(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!t||!t.bytes){const e="one or more of the provided parameters are not defined";return u.error(e),r(s(new Error(e),"ERR_UNDEFINED_PARAMETER"))}this._routing.put(e.toBuffer(),t.bytes,(t,n)=>{if(t){const t=`public key for ${e.toString()} could not be stored in the routing`;return u.error(t),r(s(new Error(t),"ERR_PUTTING_TO_ROUTING"))}u(`public key for ${e.toString()} was stored in the routing`),r(null,n)})}_getPublished(e,t,n){if(!r.isPeerId(e)){const e="peerId received is not valid";return u.error(e),n(s(new Error(e),"ERR_INVALID_PEER_ID"))}t=t||{};const i=!1!==t.checkRouting;this._datastore.get(l.getLocalKey(e.id),(t,r)=>{if(t){if("ERR_NOT_FOUND"!==t.code){const t=`unexpected error getting the ipns record ${e.id} from datastore`;return u.error(t),n(s(new Error(t),"ERR_UNEXPECTED_DATASTORE_RESPONSE"))}if(!i)return n(s(t));let r;try{r=l.getIdKeys(e.toBytes())}catch(t){return u.error(t),n(t)}this._routing.get(r.routingKey.toBuffer(),(e,t)=>{if(e)return n(e);this._unmarshalData(t,n)})}else this._unmarshalData(r,n)})}_unmarshalData(e,t){let n;try{n=l.unmarshal(e)}catch(e){return u.error(e),t(s(e,"ERR_INVALID_RECORD_DATA"))}t(null,n)}_updateOrCreateRecord(e,t,n,i,o){if(!r.isPeerId(i)){const e="peerId received is not valid";return u.error(e),o(s(new Error(e),"ERR_INVALID_PEER_ID"))}const a={checkRouting:!0};this._getPublished(i,a,(r,a)=>{if(r&&"ERR_NOT_FOUND"!==r.code){const e=`unexpected error when determining the last published IPNS record for ${i.id}`;return u.error(e),o(s(new Error(e),"ERR_DETERMINING_PUBLISHED_RECORD"))}let c=0;a&&void 0!==a.sequence&&(c=a.value.toString()!==t?a.sequence+1:a.sequence),l.create(e,t,c,n,(e,n)=>{if(e){const e=`ipns record for ${t} could not be created`;return u.error(e),o(s(new Error(e),"ERR_CREATING_IPNS_RECORD"))}const r=l.marshal(n);this._datastore.put(l.getLocalKey(i.id),r,(e,r)=>{if(e){const e=`ipns record for ${t} could not be stored in the datastore`;return u.error(e),o(s(new Error(e),"ERR_STORING_IN_DATASTORE"))}u(`ipns record for ${t} was stored in the datastore`),o(null,n)})})})}}t=e.exports=f},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",r="0123456789ABCDEFGHIJKLMNOPQRSTUV",i="0123456789ABCDEFGHJKMNPQRSTVWXYZ";e.exports=function e(t,o,s){var a,u;switch(s=s||{},o){case"RFC3548":case"RFC4648":a=n,u=!0;break;case"RFC4648-HEX":a=r,u=!0;break;case"Crockford":a=i,u=!1;break;default:throw new Error("Unknown base32 variant: "+o)}for(var l=void 0!==s.padding?s.padding:u,c=t.byteLength,f=new Uint8Array(t),h=0,p=0,d="",m=0;m<c;m++)for(p=p<<8|f[m],h+=8;h>=5;)d+=a[p>>>h-5&31],h-=5;if(h>0&&(d+=a[p<<5-h&31]),l)for(;d.length%8!=0;)d+="=";return d}},function(e,t,n){
/**
* Timestamp for 64-bit time_t, nanosecond precision and strftime
*
* @author Yusuke Kawasaki
* @license MIT
* @see https://github.com/kawanet/timestamp-nano
*/
var r=function(){e.exports=b;var t=86400,n=3200,r=146097*n/400,i=t*r,o=1e3*i,s=1e11*t,a=16777216,u=4294967296,l=1e6,c=1e9,f="000000000",h=Math.trunc||N,p=b.prototype;b.fromDate=C,b.fromInt64BE=B(0,1,2,3,0,4),b.fromInt64LE=B(3,2,1,0,4,0),b.fromString=x,b.fromTimeT=A,p.year=0,p.time=0,p.nano=0,p.addNano=S,p.getNano=E,p.getTimeT=T,p.getYear=v,p.toDate=_,p.toJSON=j,p.toString=O,p.writeInt64BE=P(0,1,2,3,0,4),p.writeInt64LE=P(3,2,1,0,4,0);var d="%Y-%m-%dT%H:%M:%S.%NZ",m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],g=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],y={"%":"%",F:"%Y-%m-%d",n:"\n",R:"%H:%M",T:"%H:%M:%S",t:"\t",X:"%T",Z:"GMT",z:"+0000"};return b;function b(e,t,n){var r=this;if(!(r instanceof b))return new b(e,t,n);r.time=+e||0,r.nano=+t||0,r.year=+n||0,w(r)}function v(){var e=this.toDate().getUTCFullYear();return e+this.year}function w(e){var t=e.year,r=e.time,i=e.nano,a,u;if(i<0||l<=i){var c=Math.floor(i/l);i-=c*l,r+=c,a=1}var f=t%n;if(r<-s||s<r||f){u=h(r/o),u&&(t+=u*n,r-=u*o);var p=k(r);p.setUTCFullYear(f+p.getUTCFullYear()),t-=f,r=+p,u=h(t/n);var d=r+u*o;u&&-s<=d&&d<=s&&(t-=u*n,r=d),a=1}return a&&(e.year=t,e.time=r,e.nano=i),e}function _(){var e=w(this);return k(e.time)}function k(e){var t=new Date(0);return t.setTime(e),t}function S(e){return this.nano+=+e||0,this}function E(){var e=w(this);return(e.time%1e3*l+ +e.nano+c)%c}function x(e){var t,n=new b;e+="";var r=e.replace(/^\s*[+\-]?\d+/,function(e){var t=+e,r=1970+(t-1970)%400;return n.year=t-r,r}).replace(/(?:Z|([+\-]\d{2}):?(\d{2}))$/,function(e,n,r){return n<0&&(r*=-1),t=6e4*(60*+n+ +r),""}).replace(/\.\d+$/,function(e){return n.nano=+(e+f).substr(1,9),""}).split(/\D+/);if(r.length>1?r[1]--:r[1]=0,n.time=t=Date.UTC.apply(Date,r)-(t||0),isNaN(t))throw new TypeError("Invalid Date");return w(n)}function C(e){return new b(+e)}function A(e){return I(e,0)}function I(e,t){t|=0,t*=u,e=+e||0;var r=h(t/i)+h(e/i),o=t%i+e%i,s=h(o/i);return s&&(r+=s,o-=s*i),new b(1e3*o,0,r*n)}function T(){var e=w(this),i=Math.floor(e.time/1e3),o=e.year;return o&&(i+=o*r*t/n),i}function j(){return this.toString().replace(/0{1,6}Z$/,"Z")}function O(e){var t=this,n=t.toDate(),r={H:l,L:h,M:c,N:p,S:f,Y:o,a:b,b:v,d:a,e:u,m:s};return i(e||d);function i(e){return e.replace(/%./g,function(e){var t=e[1],n=y[t],o=r[t];return n?i(n):o?o():e})}function o(){var e=t.getYear();return e>999999?"+"+e:e>9999?"+"+F(e,6):e>=0?F(e,4):e>=-999999?"-"+F(-e,6):e}function s(){return L(n.getUTCMonth()+1)}function a(){return L(n.getUTCDate())}function u(){return M(n.getUTCDate())}function l(){return L(n.getUTCHours())}function c(){return L(n.getUTCMinutes())}function f(){return L(n.getUTCSeconds())}function h(){return F(n.getUTCMilliseconds(),3)}function p(){return F(t.getNano(),9)}function b(){return g[n.getUTCDay()]}function v(){return m[n.getUTCMonth()]}}function P(e,i,o,s,a,l){return c;function c(e,i){var o=w(this);e||(e=new Array(8)),R(e,i|=0);var s=Math.floor(o.time/1e3),c=o.year*(r*t/n),p=h(c/u)+h(s/u),d=c%u+s%u,m=Math.floor(d/u);return m&&(p+=m,d-=m*u),f(e,i+a,p),f(e,i+l,d),e}function f(t,n,r){t[n+e]=r>>24&255,t[n+i]=r>>16&255,t[n+o]=r>>8&255,t[n+s]=255&r}}function B(e,t,n,r,i,o){return s;function s(e,t){R(e,t|=0);var n=u(e,t+i),r=u(e,t+o);return I(r,n)}function u(i,o){return i[o+e]*a+(i[o+t]<<16|i[o+n]<<8|i[o+r])}}function R(e,t){var n=e&&e.length;if(null==n)throw new TypeError("Invalid Buffer");if(n<t+8)throw new RangeError("Out of range")}function N(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t}function M(e){return(e>9?"":" ")+(0|e)}function L(e){return(e>9?"":"0")+(0|e)}function F(e,t){return(f+(0|e)).substr(-t)}}()},function(e,t,n){"use strict";const r=n(71),i='\nmessage IpnsEntry {\n enum ValidityType {\n\t\tEOL = 0; // setting an EOL says "this record is valid until..."\n\t}\n\n required bytes value = 1;\n\trequired bytes signature = 2;\n\n\toptional ValidityType validityType = 3;\n\toptional bytes validity = 4;\n\n\toptional uint64 sequence = 5;\n\n\toptional uint64 ttl = 6;\n\n\t// in order for nodes to properly validate a record upon receipt, they need the public\n\t// key associated with it. For old RSA keys, its easiest if we just send this as part of\n\t// the record itself. For newer ed25519 keys, the public key can be embedded in the\n\t// peerID, making this field unnecessary.\n\toptional bytes pubKey = 7;\n}\n';e.exports=r(i).IpnsEntry},function(e,t,n){"use strict";e.exports.toRFC3339=(e=>{const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),r=String(e.getUTCDate()).padStart(2,"0"),i=String(e.getUTCHours()).padStart(2,"0"),o=String(e.getUTCMinutes()).padStart(2,"0"),s=String(e.getUTCSeconds()).padStart(2,"0"),a=e.getUTCMilliseconds(),u=1e3*a*1e3;return`${t}-${n}-${r}T${i}:${o}:${s}.${u}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),n=String(e).trim().match(t);if(!n)throw new Error("Invalid format");const r=parseInt(n[1],10),i=parseInt(n[2],10)-1,o=parseInt(n[3],10),s=parseInt(n[4],10),a=parseInt(n[5],10),u=parseInt(n[6],10),l=parseInt(n[7].slice(0,-6),10);return new Date(Date.UTC(r,i,o,s,a,u,l))})},function(e,t,n){"use strict";t.ERR_IPNS_EXPIRED_RECORD="ERR_IPNS_EXPIRED_RECORD",t.ERR_UNRECOGNIZED_VALIDITY="ERR_UNRECOGNIZED_VALIDITY",t.ERR_SIGNATURE_CREATION="ERR_SIGNATURE_CREATION",t.ERR_SIGNATURE_VERIFICATION="ERR_SIGNATURE_VERIFICATION",t.ERR_UNRECOGNIZED_FORMAT="ERR_UNRECOGNIZED_FORMAT",t.ERR_PEER_ID_FROM_PUBLIC_KEY="ERR_PEER_ID_FROM_PUBLIC_KEY",t.ERR_PUBLIC_KEY_FROM_ID="ERR_PUBLIC_KEY_FROM_ID",t.ERR_UNDEFINED_PARAMETER="ERR_UNDEFINED_PARAMETER"},function(e,t,n){"use strict";(function(r){const i=n(182),o=n(64),s=n(23),a=n(22),u=n(5),l=n(56),c=n(11),f=u("jsipfs:ipns:republisher");f.error=u("jsipfs:ipns:republisher:error");const h=6e4,p=60*h,d=4*p,m=24*p;class g{constructor(e,t,n,r,i){this._publisher=e,this._datastore=t,this._peerInfo=n,this._keychain=r,this._options=i,this._republishHandle=null}start(){if(this._republishHandle){const e="already running";throw f.error(e),a(new Error(e),"ERR_REPUBLISH_ALREADY_RUNNING")}const e={_onCancel:null,_timeoutId:null,runPeriodically:(t,n)=>{e._timeoutId=setTimeout(()=>{e._timeoutId=null,t(r=>{if(e._onCancel)return e._onCancel();e.runPeriodically(t,r||n)})},n)},cancel:t=>{if(e._timeoutId)return clearTimeout(e._timeoutId),t();e._onCancel=t}},{privKey:t}=this._peerInfo.id,{pass:n}=this._options;e.runPeriodically(e=>{this._republishEntries(t,n,()=>e(d))},h),this._republishHandle=e}stop(e){const t=this._republishHandle;if(!t){const t="not running";return f.error(t),e(a(new Error(t),"ERR_REPUBLISH_NOT_RUNNING"))}this._republishHandle=null,t.cancel(e)}_republishEntries(e,t,n){this._republishEntry(e,e=>{if(e){const e="cannot republish entry for the node's private key";f.error(e)}else t?this._keychain.listKeys((e,r)=>{e?f.error(e):l(r,(e,n)=>{c([n=>this._keychain.exportKey(e.name,t,n),(e,n)=>o.keys.import(e,t,n)],(e,t)=>{e?f.error(e):this._republishEntry(t,n)})},e=>{e&&f.error(e),n(null)})}):n(null)})}_republishEntry(e,t){if(!e||!e.bytes){const e="one or more of the provided parameters are not defined";return f.error(e),t(a(new Error(e),"ERR_UNDEFINED_PARAMETER"))}c([t=>s.createFromPrivKey(e.bytes,t),(e,t)=>this._getPreviousValue(e,t)],(n,r)=>{if(n)return t("ERR_NO_ENTRY_FOUND"===n.code?null:n);this._publisher.publishWithEOL(e,r,m,t)})}_getPreviousValue(e,t){if(!s.isPeerId(e)){const e="peerId received is not valid";return f.error(e),t(a(new Error(e),"ERR_INVALID_PEER_ID"))}this._datastore.get(i.getLocalKey(e.id),(n,o)=>{if(n&&n.notFound){const n=`no previous entry for record with id: ${e.id}`;return f.error(n),t(a(new Error(n),"ERR_NO_ENTRY_FOUND"))}if(n)return t(n);if(!r.isBuffer(o)){const e="found ipns record that we couldn't process";return f.error(e),t(a(new Error(e),"ERR_INVALID_IPNS_RECORD"))}let s;try{s=i.unmarshal(o)}catch(n){const e="found ipns record that we couldn't convert to a value";return f.error(e),t(a(new Error(e),"ERR_INVALID_IPNS_RECORD"))}t(null,s.value)})}}t=e.exports=g}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(182),i=n(64),o=n(23),s=n(22),a=n(5),u=a("jsipfs:ipns:resolver");u.error=a("jsipfs:ipns:resolver:error");const l=32;class c{constructor(e){this._routing=e}resolve(e,t,n){if("function"==typeof t&&(n=t,t={}),"string"!=typeof e){const e="one or more of the provided parameters are not valid";return u.error(e),n(s(new Error(e),"ERR_INVALID_PARAMETER"))}t=t||{};const r=t.recursive&&"true"===t.recursive.toString(),i=e.split("/");if(3!==i.length||""!==i[0]){const t=`invalid name syntax for ${e}`;return u.error(t),n(s(new Error(t),"ERR_INVALID_NAME_SYNTAX"))}const o=i[2];let a;r&&(a=l),this.resolver(o,a,(t,r)=>{if(t)return n(t);u(`${e} was locally resolved correctly`),n(null,r)})}resolver(e,t,n){if(0===t){const e=`could not resolve name (recursion limit of ${l} exceeded)`;return u.error(e),n(s(new Error(e),"ERR_RESOLVE_RECURSION_LIMIT"))}this._resolveName(e,(e,r)=>{if(e)return n(e);const i=r.split("/");if("ipfs"===i[1]||!t)return n(null,r);this.resolver(i[2],t-1,n)})}_resolveName(e,t){let n;try{n=o.createFromB58String(e)}catch(e){return t(e)}const{routingKey:a,routingPubKey:l}=r.getIdKeys(n.toBytes());this._routing.get(a.toBuffer(),(o,c)=>{if(o){if("ERR_NOT_FOUND"!==o.code){const e=`unexpected error getting the ipns record ${n.id}`;return u.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const r=`record requested was not found for ${e} (${a}) in the network`;return u.error(r),t(s(new Error(r),"ERR_NO_RECORD_FOUND"))}let f;try{f=r.unmarshal(c)}catch(o){const e="found ipns record that we couldn't convert to a value";return u.error(e),t(s(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}if(f.pubKey)return this._validateRecord(n,f,t);this._routing.get(a.toBuffer(),(r,o)=>{if(r){if("ERR_NOT_FOUND"!==r.code){const e=`unexpected error getting the public key for the ipns record ${n.id}`;return u.error(e),t(s(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_PUB_KEY"))}const i=`public key requested was not found for ${e} (${l}) in the network`;return u.error(i),t(s(new Error(i),"ERR_NO_RECORD_FOUND"))}try{n.pubKey=i.keys.unmarshalPublicKey(o)}catch(r){const e="found public key record that we couldn't convert to a value";return u.error(e),t(s(new Error(e),"ERR_INVALID_PUB_KEY_RECEIVED"))}this._validateRecord(n,f,t)})})}_validateRecord(e,t,n){r.extractPublicKey(e,t,(e,i)=>{if(e)return n(e);r.validate(i,t,e=>{if(e)return n(e);n(null,t.value.toString())})})}}t=e.exports=c},function(e,t,n){"use strict";(function(r){const{Key:i}=n(33),{encodeBase32:o,keyToTopic:s,topicToKey:a}=n(1033),u=n(22),l=n(18),c=n(5),f=c("datastore-pubsub:publisher");f.error=c("datastore-pubsub:publisher:error");class h{constructor(e,t,n,r,i){l.strictEqual(typeof r,"object","missing validator"),l.strictEqual(typeof r.validate,"function","missing validate function"),l.strictEqual(typeof r.select,"function","missing select function"),i&&l.strictEqual(typeof i,"function","invalid subscriptionKeyFn received"),this._pubsub=e,this._datastore=t,this._peerId=n,this._validator=r,this._handleSubscriptionKeyFn=i,this._onMessage=this._onMessage.bind(this)}put(e,t,n){if(!r.isBuffer(e)){const e="datastore key does not have a valid format";return f.error(e),n(u(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}if(!r.isBuffer(t)){const e="received value is not a buffer";return f.error(e),n(u(new Error(e),"ERR_INVALID_VALUE_RECEIVED"))}const i=s(e);f(`publish value for topic ${i}`),this._pubsub.publish(i,t,n)}get(e,t){if(!r.isBuffer(e)){const e="datastore key does not have a valid format";return f.error(e),t(u(new Error(e),"ERR_INVALID_DATASTORE_KEY"))}const n=s(e);this._pubsub.ls((r,i)=>r?t(r):i&&Array.isArray(i)&&i.indexOf(n)>-1?this._getLocal(e,t):void this._pubsub.subscribe(n,this._onMessage,r=>{if(r){const e=`cannot subscribe topic ${n}`;return f.error(e),t(u(new Error(e),"ERR_SUBSCRIBING_TOPIC"))}f(`subscribed values for key ${n}`),this._getLocal(e,t)}))}unsubscribe(e){const t=s(e);this._pubsub.unsubscribe(t,this._onMessage)}_getLocal(e,t){const n=new i("/"+o(e),!1);this._datastore.get(n,(e,i)=>{if(e){if("ERR_NOT_FOUND"!==e.code){const e=`unexpected error getting the ipns record for ${n.toString()}`;return f.error(e),t(u(new Error(e),"ERR_UNEXPECTED_ERROR_GETTING_RECORD"))}const r=`local record requested was not found for ${n.toString()}`;return f.error(r),t(u(new Error(r),"ERR_NOT_FOUND"))}if(!r.isBuffer(i)){const e="found record that we couldn't convert to a value";return f.error(e),t(u(new Error(e),"ERR_INVALID_RECORD_RECEIVED"))}t(null,i)})}_onMessage(e){const{data:t,from:n,topicIDs:r}=e;let i;try{i=a(r[0])}catch(e){return void f.error(e)}f(`message received for ${i} topic`),n!==this._peerId.toB58String()?this._handleSubscriptionKeyFn?this._handleSubscriptionKeyFn(i,(e,n)=>{e?f.error("message discarded by the subscriptionKeyFn"):this._storeIfSubscriptionIsBetter(n,t)}):this._storeIfSubscriptionIsBetter(i,t):f("message discarded as it is from the same peer")}_storeIfSubscriptionIsBetter(e,t){this._isBetter(e,t,(n,i)=>{!n&&i&&this._storeRecord(r.from(e),t)})}_validateRecord(e,t,n){this._validator.validate(e,t,n)}_selectRecord(e,t,n){this._validator.select(e,t,(e,t)=>{if(e)return f.error(e),n(e);n(null,0===t)})}_isBetter(e,t,n){this._validateRecord(t,e,(r,o)=>{if(r||!o){const e="record received through pubsub is not valid";return f.error(e),n(u(new Error(e),"ERR_NOT_VALID_RECORD"))}const s=new i(e);this._getLocal(s.toBuffer(),(e,r)=>e?n(null,!0):r.equals(t)?n(null,!1):void this._selectRecord(t,r,n))})}_storeRecord(e,t){const n=new i("/"+o(e),!1);this._datastore.put(n,t,t=>{t?f.error(`record for ${e.toString()} could not be stored in the routing`):f(`record for ${e.toString()} was stored in the datastore`)})}open(e){const t="open function was not implemented yet";return f.error(t),e(u(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}has(e,t){const n="has function was not implemented yet";return f.error(n),t(u(new Error(n),"ERR_NOT_IMPLEMENTED_YET"))}delete(e,t){const n="delete function was not implemented yet";return f.error(n),t(u(new Error(n),"ERR_NOT_IMPLEMENTED_YET"))}close(e){const t="close function was not implemented yet";return f.error(t),e(u(new Error(t),"ERR_NOT_IMPLEMENTED_YET"))}batch(){const e="batch function was not implemented yet";throw f.error(e),u(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}query(){const e="query function was not implemented yet";throw f.error(e),u(new Error(e),"ERR_NOT_IMPLEMENTED_YET")}}t=e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(88),i=n(22),o="/record/",s="u";e.exports.encodeBase32=(e=>r.encode("base32",e).slice(1)),e.exports.keyToTopic=(e=>{const t=r.encode("base64url",e).slice(1).toString();return`/record/${t}`}),e.exports.topicToKey=(e=>{if(e.substring(0,o.length)!==o)throw i(new Error("topic received is not from a record"),"ERR_TOPIC_IS_NOT_FROM_RECORD_NAMESPACE");const t=`u${e.substring(o.length)}`;return r.decode(t).toString()})},function(e,t,n){"use strict";e.exports={Record:n(1035),validator:n(1038),selection:n(1046)}},function(e,t,n){"use strict";(function(t){const r=n(71),i=n(18),o=r(n(1036)).Record,s=n(1037);class a{constructor(e,n,r){e&&i(t.isBuffer(e),"key must be a Buffer"),n&&i(t.isBuffer(n),"value must be a buffer"),this.key=e,this.value=n,this.timeReceived=r}serialize(){return o.encode(this.prepareSerialize())}prepareSerialize(){return{key:this.key,value:this.value,timeReceived:this.timeReceived&&s.toRFC3339(this.timeReceived)}}static deserialize(e){const t=o.decode(e);return a.fromDeserialized(t)}static fromDeserialized(e){let t;e.timeReceived&&(t=s.parseRFC3339(e.timeReceived));const n=new a(e.key,e.value,t);return n}}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports="// Record represents a dht record that contains a value\n// for a key value pair\nmessage Record {\n // The key that references this record\n bytes key = 1;\n\n // The actual value this record is storing\n bytes value = 2;\n\n // Note: These fields were removed from the Record message\n // hash of the authors public key\n // optional bytes author = 3;\n // A PKI signature for the key+value+author\n // optional bytes signature = 4;\n\n // Time the record was received, set by receiver\n optional string timeReceived = 5;\n}"},function(e,t,n){"use strict";e.exports.toRFC3339=(e=>{const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),r=String(e.getUTCDate()).padStart(2,"0"),i=String(e.getUTCHours()).padStart(2,"0"),o=String(e.getUTCMinutes()).padStart(2,"0"),s=String(e.getUTCSeconds()).padStart(2,"0"),a=e.getUTCMilliseconds(),u=1e3*a*1e3;return`${t}-${n}-${r}T${i}:${o}:${s}.${u}Z`}),e.exports.parseRFC3339=(e=>{const t=new RegExp("(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d+)Z"),n=String(e).trim().match(t);if(!n)throw new Error("Invalid format");const r=parseInt(n[1],10),i=parseInt(n[2],10)-1,o=parseInt(n[3],10),s=parseInt(n[4],10),a=parseInt(n[5],10),u=parseInt(n[6],10),l=parseInt(n[7].slice(0,-6),10);return new Date(Date.UTC(r,i,o,s,a,u,l))})},function(e,t,n){"use strict";(function(t){const r=n(501),i=n(22),o=(e,n,o)=>{const s=n.key,a=r(s,t.from("/"));if(a.length<3)return o();const u=e[a[1].toString()];if(!u){const e="Invalid record keytype";return o(i(new Error(e),"ERR_INVALID_RECORD_KEY_TYPE"))}u.func(s,n.value,o)};e.exports={verifyRecord:o,validators:n(1040)}}).call(this,n(0).Buffer)},function(e,t){e.exports=function e(t,n,r){r=r||0;for(var i=0,o=-1,s=r;s<t.length;++s)if(t[s]==n[i]){if(-1==o&&(o=s),++i,i==n.length)break}else o=-1,i=0;return o>-1&&t.length-o<n.length?-1:o}},function(e,t,n){"use strict";e.exports={pk:n(1041)}},function(e,t,n){"use strict";(function(t){const r=n(14),i=n(1042),o=(e,n,o)=>{const s=e=>r(()=>o(e));if(!t.isBuffer(e))return s(new Error('"key" must be a Buffer'));if(e.length<3)return s(new Error("invalid public key record"));const a=e.slice(0,4).toString();if("/pk/"!==a)return s(new Error("key was not prefixed with /pk/"));const u=e.slice(4);i(n,"sha2-256",(e,t)=>e?s(e):u.equals(t)?void s():s(new Error("public key does not match passed in key")))};e.exports={func:o,sign:!1}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(35),i=n(1043);function o(e,t,n,i){if("function"==typeof n&&(i=n,n=void 0),!i)throw new Error("Missing callback");o.digest(e,t,n,(e,o)=>{if(e)return i(e);i(null,r.encode(o,t,n))})}e.exports=o,o.Buffer=t,o.multihash=r,o.digest=function(e,t,n,r){if("function"==typeof n&&(r=n,n=void 0),!r)throw new Error("Missing callback");let i=r,s;n&&(i=((e,t)=>{if(e)return r(e);r(null,t.slice(0,n))}));try{s=o.createHash(t)}catch(e){return i(e)}s(e,i)},o.createHash=function(e){if(e=r.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported");return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions),o.validate=((e,n,i)=>{let s=r.decode(n).name;o(e,s,(e,r)=>{if(e)return i(e);i(e,0===t.compare(n,r))})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(445),i=n(447),o=n(502),s=n(1044),a=o.toCallback,u=o.toBuf,l=o.fromString,c=o.fromNumberTo32BitBuf,f=(e,n)=>{s.sha2256(e,(e,r)=>{e&&n(e),s.sha2256(t.from(r),n)})};e.exports={sha1:s.sha1,sha2256:s.sha2256,sha2512:s.sha2512,sha3512:a(u(r.sha3_512)),sha3384:a(u(r.sha3_384)),sha3256:a(u(r.sha3_256)),sha3224:a(u(r.sha3_224)),shake128:a(u(r.shake_128,128)),shake256:a(u(r.shake_256,256)),keccak224:a(u(r.keccak_224)),keccak256:a(u(r.keccak_256)),keccak384:a(u(r.keccak_384)),keccak512:a(u(r.keccak_512)),murmur3128:a(u(l(i.x64.hash128))),murmur332:a(c(l(i.x86.hash32))),addBlake:n(1045),dblSha2256:f}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(449),i=o();function o(){return self.crypto?self.crypto.subtle||self.crypto.webkitSubtle:self.msCrypto?self.msCrypto.subtle:void 0}function s(e){if(!i)throw new Error("Please use a browser with webcrypto support and ensure the code has been delivered securely via HTTPS/TLS and run within a Secure Context");return(n,o)=>{const s=i.digest({name:e},n);if("function"!=typeof s.then)return s.onerror=(()=>{o(new Error(`hashing data using ${e}`))}),void(s.oncomplete=(e=>{o(null,e.target.result)}));r(s.then(e=>t.from(new Uint8Array(e))),o)}}function a(e,t){s("SHA-1")(e,t)}function u(e,t){s("SHA-256")(e,t)}function l(e,t){s("SHA-512")(e,t)}e.exports={sha1:a,sha2256:u,sha2512:l}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(451),i=n(502).toCallback,o=45569,s=45633,a={init:r.blake2bInit,update:r.blake2bUpdate,digest:r.blake2bFinal},u={init:r.blake2sInit,update:r.blake2sUpdate,digest:r.blake2sFinal},l=(e,n)=>i(r=>{const i=n.init(e,null);return n.update(i,r),t.from(n.digest(i))});e.exports=(e=>{for(let t=0;t<64;t++)e[o+t]=l(t+1,a);for(let t=0;t<32;t++)e[s+t]=l(t+1,u)})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(501),i=n(22),o=(e,n,o)=>{if(0===o.length){const e="No records given";throw i(new Error(e),"ERR_NO_RECORDS_RECEIVED")}const s=r(n,t.from("/"));if(s.length<3){const e="Record key does not have a selector function";throw i(new Error(e),"ERR_NO_SELECTOR_FUNCTION_FOR_RECORD_KEY")}const a=e[s[1].toString()];if(!a){const e=`Unrecognized key prefix: ${s[1]}`;throw i(new Error(e),"ERR_UNRECOGNIZED_KEY_PREFIX")}return a(n,o)};e.exports={bestRecord:o,selectors:n(1047)}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports={pk:n(1048)}},function(e,t,n){"use strict";const r=(e,t)=>0;e.exports=r},function(e,t,n){"use strict";const r=n(505),i=n(1060),o=n(1095),s=n(1104),a=n(1110),u=n(1118),l=n(1119),c=n(181),f=n(24);class h extends l{constructor(e){const t=new i({id:e.peerInfo.id}),n=e.peerInfo.multiaddrs.toArray().map(String).filter(e=>e.includes("p2p-websocket-star"));e.peerInfo.multiaddrs.replace(n.map(f),"/p2p-websocket-star");const l=new o({servers:n,id:e.peerInfo.id,ignore_no_online:!n.length||e.wsStarIgnoreErrors}),h={modules:{transport:[r,t,l],streamMuxer:[s],connEncryption:[a],peerDiscovery:[t.discovery,l.discovery,u]},config:{peerDiscovery:{bootstrap:{enabled:!0},webRTCStar:{enabled:!0},websocketStar:{enabled:!0}},EXPERIMENTAL:{dht:!1,pubsub:!1}}};super(c(e,h))}}e.exports=h},function(e,t,n){"use strict";var r=n(1051),i=n(1053),o=n(1057);function s(e){return"function"==typeof e}e.exports=function(e,t){s(t)&&(t={onConnect:t});var n="undefined"==typeof window?{}:window.location,a=o(e,n),u=new r(a),l=i(u,t);return l.remoteAddress=a,l.close=function(e){s(e)&&u.addEventListener("close",e),u.close()},u.addEventListener("open",function(e){t&&s(t.onConnect)&&t.onConnect(null,l)}),l},e.exports.connect=e.exports},function(e,t,n){e.exports="undefined"==typeof WebSocket?n(1052):WebSocket},function(e,t){},function(e,t,n){var r=n(1054),i=n(1055);function o(e,t){var n=e.upgradeReq||{};return t&&t.binaryType?e.binaryType=t.binaryType:t&&t.binary&&(e.binaryType="arraybuffer"),{source:r(e,t&&t.onConnect),sink:i(e,t),headers:n.headers,url:n.url,upgrade:n.upgrade,method:n.method}}e.exports=o},function(e,t,n){var r=n(4).Buffer;function i(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}e.exports=function(e,t){var n=[],o,s,a=!1;function u(t,r){if(o=null,s)return r(s);t?(o=r,e.close()):n.length>0?r(null,n.shift()):o=r}return e.addEventListener("message",function(e){var t=e.data;if(i(t)&&(t=r.from(t)),o)return o(null,t);n.push(t)}),e.addEventListener("close",function(e){s||o&&o(s=!0)}),e.addEventListener("error",function(e){s||(s=e,a||(a=!0,t&&t(e)),o&&o(s))}),e.addEventListener("open",function(e){a||s||(a=!0)}),u}},function(e,t,n){(function(t){var r=n(1056),i="undefined"!=typeof setImmediate?setImmediate:t.nextTick;e.exports=function(e,t){return function(n){t=t||{};var o=!1!==t.closeOnEnd,s="function"==typeof t?t:t.onClose;function a(t,u){t?o&&e.readyState<=1&&(s&&e.addEventListener("close",function(e){if(e.wasClean||1006===e.code)s();else{var t=new Error("ws error");t.event=e,s(t)}}),e.close()):r(e,function(t){if(t)return n(t,function(){});e.send(u),i(function(){n(null,a)})})}n(null,a)}}}).call(this,n(2))},function(e,t){e.exports=function(e,t){var n=e&&(e.removeEventListener||e.removeListener);function r(){"function"==typeof n&&(n.call(e,"open",i),n.call(e,"error",o))}function i(e){r(),t()}function o(e){r(),t(e)}return e.readyState>=2?t(!0):1===e.readyState?t():(e.addEventListener("open",i),void e.addEventListener("error",o))}},function(e,t,n){var{relative:r}=n(306),i={http:"ws",https:"wss"},o="ws";e.exports=function(e,t){return r(e,t,i,o)}},function(e,t,n){"use strict";const r=n(437);e.exports=class e{constructor(e,t){this.peerInfo=null,this.conn=r(),e?this.setInnerConn(e,t):t&&(this.info=t)}get source(){return this.conn.source}get sink(){return this.conn.sink}getPeerInfo(e){return this.info&&this.info.getPeerInfo?this.info.getPeerInfo(e):this.peerInfo?void e(null,this.peerInfo):e(new Error("Peer Info not set yet"))}setPeerInfo(e){if(this.info&&this.info.setPeerInfo)return this.info.setPeerInfo(e);this.peerInfo=e}getObservedAddrs(e){if(this.info&&this.info.getObservedAddrs)return this.info.getObservedAddrs(e);e(null,[])}setInnerConn(e,t){this.conn.resolve(e),this.info=t||e}}},function(e,t,n){"use strict";e.exports=function(){throw new Error("WebSocket Servers can not be created in the browser!")}},function(e,t,n){"use strict";const r=n(5),i=r("libp2p:webrtc-star"),o=n(24),s=n(91),a=n(53),u=n(507),l=n(6).EventEmitter,c=n(254),f=n(23),h=n(44),p=n(66).Connection,d=n(79),m=n(28),g=n(14),y=n(1093),b=n(1094),v=b.cleanUrlSIO,w=b.cleanMultiaddr,_=m(()=>{}),k={transports:["websocket"],"force new connection":!0};class S{constructor(e){e=e||{},this.maSelf=void 0,this.sioOptions={transports:["websocket"],"force new connection":!0},e.wrtc&&(this.wrtc=e.wrtc),this.discovery=new l,this.discovery.tag="webRTCStar",this.discovery.start=(e=>{g(e)}),this.discovery.stop=(e=>{g(e)}),this.listenersRefs={},this._peerDiscovered=this._peerDiscovered.bind(this)}dial(e,t,n){"function"==typeof t&&(n=t,t={}),n=n?m(n):_;const r=(~~(1e9*Math.random())).toString(36)+Date.now(),o=this.listenersRefs[Object.keys(this.listenersRefs)[0]].io,s={initiator:!0,trickle:!1};let a;this.wrtc&&(s.wrtc=this.wrtc);try{a=new c(s)}catch(e){return i("Could not create connection:",e),n(e)}const u=new p(d.duplex(a));let l=!1;return a.on("signal",t=>{o.emit("ss-handshake",{intentId:r,srcMultiaddr:this.maSelf.toString(),dstMultiaddr:e.toString(),signal:t})}),a.once("timeout",()=>n(new Error("timeout"))),a.once("error",e=>{l||n(e)}),o.on("ws-handshake",t=>{if(t.intentId===r&&t.err)return n(new Error(t.err));t.intentId===r&&t.answer&&(a.once("connect",()=>{l=!0,u.destroy=a.destroy.bind(a),a.once("close",()=>u.destroy()),u.getObservedAddrs=(t=>t(null,[e])),n(null,u)}),a.signal(t.signal))}),u}createListener(e,t){"function"==typeof e&&(t=e,e={});const n=new l;return n.listen=((e,r)=>{if(r=r?m(r):_,!y.support&&!this.wrtc)return g(()=>r(new Error("no WebRTC support")));this.maSelf=e;const o=v(e);i("Dialing to Signalling Server on: "+o),n.io=u.connect(o,k),n.io.once("connect_error",r),n.io.once("error",e=>{n.emit("error",e),n.emit("close")}),n.io.on("ws-handshake",a),n.io.on("ws-peer",this._peerDiscovered),n.io.on("connect",()=>{n.io.emit("ss-join",e.toString())}),n.io.once("connect",()=>{n.emit("listening"),r()});const s=this;function a(e){if(e.answer||e.err)return;const o={trickle:!1};let a;s.wrtc&&(o.wrtc=s.wrtc);try{a=new c(o)}catch(e){return i("Could not create incoming connection:",e),r(e)}const u=new p(d.duplex(a));a.once("connect",()=>{u.getObservedAddrs=(t=>t(null,[e.srcMultiaddr])),n.emit("connection",u),t(u)}),a.once("signal",t=>{e.signal=t,e.answer=!0,n.io.emit("ss-handshake",e)}),a.signal(e.signal)}}),n.close=(e=>{e=e?m(e):_,n.io.emit("ss-leave"),g(()=>{n.emit("close"),e()})}),n.getAddrs=(e=>{g(()=>e(null,[this.maSelf]))}),this.listenersRefs[o.toString()]=n,n}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>!(e.protoNames().indexOf("p2p-circuit")>-1)&&s.WebRTCStar.matches(e))}_peerDiscovered(e){i("Peer Discovered:",e),e=w(e);const t=e.split("/ipfs/"),n=t[t.length-1],r=f.createFromB58String(n),s=new h(r);s.multiaddrs.add(o(e)),this.discovery.emit("peer",s)}}e.exports=a(S,{className:"WebRTCStar",symbolName:"@libp2p/js-libp2p-webrtc-star/webrtcstar"})},function(e,t,n){var r=n(508),i=n(250)("socket.io-client:url");function o(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var o=-1!==n.host.indexOf(":"),s=o?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port,n.href=n.protocol+"://"+s+(t&&t.port===n.port?"":":"+n.port),n}e.exports=o},function(e,t,n){function r(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){var n;function i(){if(i.enabled){var e=i,r=+new Date,o=r-(n||r);e.diff=o,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=i.log||t.log||console.log.bind(console);l.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=r(e),i.destroy=o,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function s(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function a(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1063),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1065),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t,n){function r(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){var n;function i(){if(i.enabled){var e=i,r=+new Date,o=r-(n||r);e.diff=o,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=i.log||t.log||console.log.bind(console);l.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=r(e),i.destroy=o,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function s(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function a(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1066),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(509),i=n(510),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);function u(e,t){if(!e)return e;if(i(e)){var n={_placeholder:!0,num:t.length};return t.push(e),n}if(r(e)){for(var o=new Array(e.length),s=0;s<e.length;s++)o[s]=u(e[s],t);return o}if("object"==typeof e&&!(e instanceof Date)){var o={};for(var a in e)o[a]=u(e[a],t);return o}return e}function l(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(r(e))for(var n=0;n<e.length;n++)e[n]=l(e[n],t);else if("object"==typeof e)for(var i in e)e[i]=l(e[i],t);return e}t.deconstructPacket=function(e){var t=[],n=e.data,r=e;return r.data=u(n,t),r.attachments=t.length,{packet:r,buffers:t}},t.reconstructPacket=function(e,t){return e.data=l(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){function n(e,l,c){if(!e)return e;if(s&&e instanceof Blob||a&&e instanceof File){o++;var f=new FileReader;f.onload=function(){c?c[l]=this.result:u=this.result,--o||t(u)},f.readAsArrayBuffer(e)}else if(r(e))for(var h=0;h<e.length;h++)n(e[h],h,e);else if("object"==typeof e&&!i(e))for(var p in e)n(e[p],p,e)}var o=0,u=e;n(u),o||t(u)}},function(e,t,n){e.exports=n(1069),e.exports.parser=n(147)},function(e,t,n){var r=n(512),i=n(146),o=n(253)("engine.io-client:socket"),s=n(516),a=n(147),u=n(508),l=n(251);function c(e,t){if(!(this instanceof c))return new c(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=u(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=u(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=l.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function f(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}e.exports=c,c.priorWebsocketSuccess=!1,i(c.prototype),c.protocol=a.protocol,c.Socket=c,c.Transport=n(329),c.transports=n(512),c.parser=n(147),c.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=f(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};this.id&&(t.sid=this.id);var i=new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return i},c.prototype.open=function(){var e;if(this.rememberUpgrade&&c.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},c.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},c.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;c.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){n||"closed"!==r.readyState&&(o("changing transport and sending upgrade packet"),h(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())})}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}}))}function s(){n||(n=!0,h(),t.close(),t=null)}function a(n){var i=new Error("probe error: "+n);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",i)}function u(){a("transport closed")}function l(){a("socket closed")}function f(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function h(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",u),r.removeListener("close",l),r.removeListener("upgrading",f)}c.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",u),this.once("close",l),this.once("upgrading",f),t.open()},c.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",c.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},c.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else o('packet received with socket readyState "%s"',this.readyState)},c.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},c.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},c.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){o("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},c.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},c.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},c.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},c.prototype.write=c.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},c.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},c.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():t()}):this.upgrading?r():t()}function t(){e.onClose("forced close"),o("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},c.prototype.onError=function(e){o("socket error %j",e),c.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},c.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},c.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){var r=n(328),i=n(513),o=n(146),s=n(252),a=n(253)("engine.io-client:polling-xhr");function u(){}function l(e){if(i.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function c(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=l,e.exports.Request=c,s(l,i),l.prototype.supportsBinary=!0,l.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new c(e)},l.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=r},l.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},o(c.prototype),c.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new r(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===e&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout(function(){n.onError(t.status)},0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout(function(){n.onError(e)},0)}"undefined"!=typeof document&&(this.index=c.requestsCount++,c.requests[this.index]=this)},c.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},c.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},c.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},c.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=u:this.xhr.onreadystatechange=u,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete c.requests[this.index],this.xhr=null}},c.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},c.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},c.prototype.abort=function(){this.cleanup()},c.requestsCount=0,c.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",h);else if("function"==typeof addEventListener){var f="onpagehide"in self?"pagehide":"unload";addEventListener(f,h,!1)}function h(){for(var e in c.requests)c.requests.hasOwnProperty(e)&&c.requests[e].abort()}},function(e,t){e.exports=Object.keys||function e(t){var n=[],r=Object.prototype.hasOwnProperty;for(var i in t)r.call(t,i)&&n.push(i);return n}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)o[a]=i[s];return o.buffer}},function(e,t){function n(e,t,n){var i=!1;return n=n||r,o.count=e,0===e?t():o;function o(e,r){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=n):0!==o.count||i||t(null,r)}}function r(){}e.exports=n},function(e,t){
/*! https://mths.be/utf8js v2.1.2 by @mathias */
var n=String.fromCharCode,r,i,o;function s(e){for(var t=[],n=0,r=e.length,i,o;n<r;)i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<r?(o=e.charCodeAt(n++),56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)):t.push(i);return t}function a(e){for(var t=e.length,r=-1,i,o="";++r<t;)i=e[r],i>65535&&(i-=65536,o+=n(i>>>10&1023|55296),i=56320|1023&i),o+=n(i);return o}function u(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function l(e,t){return n(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return n(e);var r="";return 0==(4294965248&e)?r=n(e>>6&31|192):0==(4294901760&e)?(u(e,t)||(e=65533),r=n(e>>12&15|224),r+=l(e,6)):0==(4292870144&e)&&(r=n(e>>18&7|240),r+=l(e,12),r+=l(e,6)),r+=n(63&e|128),r}function f(e,t){t=t||{};for(var n=!1!==t.strict,r=s(e),i=r.length,o=-1,a,u="";++o<i;)a=r[o],u+=c(a,n);return u}function h(){if(o>=i)throw Error("Invalid byte index");var e=255&r[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(e){var t,n,s,a,l;if(o>i)throw Error("Invalid byte index");if(o==i)return!1;if(t=255&r[o],o++,0==(128&t))return t;if(192==(224&t)){if(n=h(),l=(31&t)<<6|n,l>=128)return l;throw Error("Invalid continuation byte")}if(224==(240&t)){if(n=h(),s=h(),l=(15&t)<<12|n<<6|s,l>=2048)return u(l,e)?l:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=h(),s=h(),a=h(),l=(7&t)<<18|n<<12|s<<6|a,l>=65536&&l<=1114111))return l;throw Error("Invalid UTF-8 detected")}function d(e,t){t=t||{};var n=!1!==t.strict;r=s(e),i=r.length,o=0;for(var u=[],l;!1!==(l=p(n));)u.push(l);return a(u)}e.exports={version:"2.1.2",encode:f,decode:d}},function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n=new Uint8Array(t),r,i=n.length,o="";for(r=0;r<i;r+=3)o+=e[n[r]>>2],o+=e[(3&n[r])<<4|n[r+1]>>4],o+=e[(15&n[r+1])<<2|n[r+2]>>6],o+=e[63&n[r+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t=.75*e.length,r=e.length,i,o=0,s,a,u,l;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);var c=new ArrayBuffer(t),f=new Uint8Array(c);for(i=0;i<r;i+=4)s=n[e.charCodeAt(i)],a=n[e.charCodeAt(i+1)],u=n[e.charCodeAt(i+2)],l=n[e.charCodeAt(i+3)],f[o++]=s<<2|a>>4,f[o++]=(15&a)<<4|u>>2,f[o++]=(3&u)<<6|63&l;return c}}()},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{var e=new Blob(["hi"]);return 2===e.size}catch(e){return!1}}(),i=r&&function(){try{var e=new Blob([new Uint8Array([1,2])]);return 2===e.size}catch(e){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e})}function a(e,t){t=t||{};var r=new n;return s(e).forEach(function(e){r.append(e)}),t.type?r.getBlob(t.type):r.getBlob()}function u(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,u.prototype=Blob.prototype),e.exports=r?i?Blob:u:o?a:void 0},function(e,t,n){function r(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){var n;function i(){if(i.enabled){var e=i,r=+new Date,o=r-(n||r);e.diff=o,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=i.log||t.log||console.log.bind(console);l.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=r(e),i.destroy=o,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function s(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function a(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1080),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var r=n(513),i=n(252);e.exports=c;var o=/\n/g,s=/\\n/g,a;function u(){}function l(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{}}function c(e){if(r.call(this,e),this.query=this.query||{},!a){var t=l();a=t.___eio=t.___eio||[]}this.index=a.length;var n=this;a.push(function(e){n.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){n.script&&(n.script.onerror=u)},!1)}i(c,r),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},c.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},c.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r=document.createElement("form"),i=document.createElement("textarea"),a=this.iframeId="eio_iframe_"+this.index,u;r.className="socketio",r.style.position="absolute",r.style.top="-1000px",r.style.left="-1000px",r.target=a,r.method="POST",r.setAttribute("accept-charset","utf-8"),i.name="d",r.appendChild(i),document.body.appendChild(r),this.form=r,this.area=i}function l(){c(),t()}function c(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';u=document.createElement(e)}catch(e){u=document.createElement("iframe"),u.name=n.iframeId,u.src="javascript:0"}u.id=n.iframeId,n.form.appendChild(u),n.iframe=u}this.form.action=this.uri(),c(),e=e.replace(s,"\\\n"),this.area.value=e.replace(o,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&l()}:this.iframe.onload=l}}).call(this,n(8))},function(e,t,n){(function(t){var r=n(329),i=n(147),o=n(251),s=n(252),a=n(515),u=n(253)("engine.io-client:websocket"),l,c;if("undefined"!=typeof WebSocket)l=WebSocket;else if("undefined"!=typeof self)l=self.WebSocket||self.MozWebSocket;else try{c=n(1083)}catch(e){}var f=l||c;function h(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=l&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(f=c),r.call(this,e)}e.exports=h,s(h,r),h.prototype.name="websocket",h.prototype.supportsBinary=!0,h.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new f(e,t):new f(e):new f(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},h.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},h.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,s=r;o<s;o++)!function(e){i.encodePacket(e,n.supportsBinary,function(i){if(!n.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),n.perMessageDeflate){var s="string"==typeof i?t.byteLength(i):i.length;s<n.perMessageDeflate.threshold&&(o.compress=!1)}}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,o)}catch(e){u("websocket closed before onclose event")}--r||a()})}(e[o]);function a(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}},h.prototype.onClose=function(){r.prototype.onClose.call(this)},h.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||(e.b64=1),e=o.encode(e),e.length&&(e="?"+e);var r=-1!==this.hostname.indexOf(":");return t+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+e},h.prototype.check=function(){return!(!f||"__initialize"in f&&this.name===h.prototype.name)}}).call(this,n(0).Buffer)},function(e,t){},function(e,t){function n(e,t){var n=[];t=t||0;for(var r=t||0;r<e.length;r++)n[r-t]=e[r];return n}e.exports=n},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t){e.exports=function e(){if("undefined"==typeof window)return null;var t={RTCPeerConnection:window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,RTCSessionDescription:window.RTCSessionDescription||window.mozRTCSessionDescription||window.webkitRTCSessionDescription,RTCIceCandidate:window.RTCIceCandidate||window.mozRTCIceCandidate||window.webkitRTCIceCandidate};return t.RTCPeerConnection?t:null}},function(e,t,n){t=e.exports=n(520),t.Stream=t,t.Readable=t,t.Writable=n(523),t.Duplex=n(149),t.Transform=n(524),t.PassThrough=n(1091)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1090);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(524),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){function n(e,t){if(e&&t)return n(e)(t);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(t){r[t]=e[t]}),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach(function(e){r[e]=i[e]}),r}}e.exports=n},function(e,t){var n,r;self.mozRTCPeerConnection||navigator.mozGetUserMedia?(n="moz",r=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10)):(self.webkitRTCPeerConnection||navigator.webkitGetUserMedia)&&(n="webkit",r=navigator.userAgent.match(/Chrom(e|ium)/)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2],10));var i=self.RTCPeerConnection||self.mozRTCPeerConnection||self.webkitRTCPeerConnection,o=self.mozRTCIceCandidate||self.RTCIceCandidate,s=self.mozRTCSessionDescription||self.RTCSessionDescription,a=self.webkitMediaStream||self.MediaStream,u="https:"===self.location.protocol&&("webkit"===n&&r>=26||"moz"===n&&r>=33),l=self.AudioContext||self.webkitAudioContext,c=self.document&&document.createElement("video"),f=c&&c.canPlayType&&"probably"===c.canPlayType('video/webm; codecs="vp8", vorbis'),h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia;e.exports={prefix:n,browserVersion:r,support:!!i&&!!h,supportRTCPeerConnection:!!i,supportVp8:f,supportGetUserMedia:!!h,supportDataChannel:!!(i&&i.prototype&&i.prototype.createDataChannel),supportWebAudio:!(!l||!l.prototype.createMediaStreamSource),supportMediaStream:!(!a||!a.prototype.removeTrack),supportScreenSharing:!!u,AudioContext:l,PeerConnection:i,SessionDescription:s,IceCandidate:o,MediaStream:a,getUserMedia:h}},function(e,t,n){"use strict";const r=n(24);function i(e){const t=e.toString().split("/"),n=e.protos()[1].name,i=e.protos()[2].name,o=e.stringTuples()[1][1];if("tcp"!==n||"ws"!==i&&"wss"!==i)throw new Error("invalid multiaddr: "+e.toString());return r.isName(e)?"ws"===i?"http://"+t[2]+(80===o?"":":"+o):"wss"===i?"https://"+t[2]+(443===o?"":":"+o):void 0:"http://"+t[2]+":"+t[4]}function o(e){const t="/libp2p-webrtc-star";if(-1!==e.indexOf(t)){e=e.substring(t.length,e.length);let n=r(e);const i=n.stringTuples().filter(e=>421===e[0])[0];n=n.decapsulate("ipfs"),n=n.encapsulate("/p2p-webrtc-star"),n=n.encapsulate(`/ipfs/${i[1]}`),e=n.toString()}return e}t=e.exports,t.cleanUrlSIO=i,t.cleanMultiaddr=o},function(e,t,n){"use strict";const r=n(5),i=r("libp2p:websocket-star:multi"),o=n(28),s=n(6).EventEmitter,a=n(99),u=n(54),l=n(24),c=n(91),f=n(1096);class h{constructor(e){this.opt=e||{},this.servers=e.servers||[],this.ws=new f(this.opt),this.discovery=this.ws.discovery}dial(e,t,n){return i("dial",e),this.ws.dial(e,t,n)}createListener(e,t){"function"==typeof e&&(t=e,e={});const n=new s;return n.servers={},n.online=[],this.servers.forEach(r=>{const i=this.ws.createListener(e,t);i.once("error",()=>{}),i.url=r,n.servers[r]=i}),n.listen=((e,t)=>{const r=e.toString().split("ipfs/").pop();i("listen on %s server(s) with id %s",this.servers.length,r),u(this.servers.map(e=>n.servers[e]).map(e=>t=>{i("listen %s",e.url);const s=o(r=>(i("listen %s ok %s",e.url,!r),r?t(i(r)):(n.online.push(e),t())));setTimeout(s,this.opt.timeout||5e3,new Error("Timeout")),e.listen(l(e.url).encapsulate("/ipfs/"+r),s)}),()=>{if(n.online.length||this.opt.ignore_no_online)n.emit("listening"),t();else{const e=new Error("Couldn't listen on any of the servers");n.emit("error",e),t(e)}})}),n.close=(e=>u(n.online.map(e=>t=>e.close(t)),t=>e(t,n.online=[]))),n.getAddrs=(e=>a(n.online,(e,t)=>e.getAddrs(t),(t,n)=>t?e(t):e(null,n.reduce((e,t)=>e.concat(t),[])))),n}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>e.toString().startsWith("/p2p-websocket-star")||c.WebSocketStar.matches(e))}}e.exports=h},function(e,t,n){"use strict";const r=n(5),i=r("libp2p:websocket-star"),o=n(24),s=n(6).EventEmitter,a=n(23),u=n(44),l=n(66).Connection,c=n(14),f=n(526),h=n(1097),p=f.cleanUrlSIO,d=n(91),m=n(53);class g{constructor(e){e=e||{},this.id=e.id,this.flag=e.allowJoinWithDisabledChallenge,this.discovery=new s,this.discovery.tag="websocketStar",this.discovery.start=(e=>{c(e)}),this.discovery.stop=(e=>{c(e)}),this.listeners_list={},this._peerDiscovered=this._peerDiscovered.bind(this)}lazySetId(e){e&&(this.id=e,this.canCrypto=!0)}dial(e,t,n){let r;"function"==typeof t&&(n=t,t={});try{r=p(e)}catch(e){return n(e)}const i=this.listeners_list[r];return i?i.dial(e,t,n):(n(new Error("No listener for this server")),new l)}createListener(e,t){"function"==typeof e&&(t=e,e={});const n=new h({id:this.id,handler:t,listeners:this.listeners_list,flag:this.flag});return n.on("peer",this._peerDiscovered),n}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>d.WebSocketStar.matches(e))}_peerDiscovered(e){i("Peer Discovered:",e);const t=e.split("/ipfs/").pop(),n=a.createFromB58String(t),r=new u(n);r.multiaddrs.add(o(e)),this.discovery.emit("peer",r)}}e.exports=m(g,{className:"WebsocketStar",symbolName:"@libp2p/js-libp2p-websocket-star/websocketstar"})},function(e,t,n){"use strict";(function(t){const r=n(5),i=r("libp2p:websocket-star:listener"),o=n(24),s=n(507),a=n(1098),u=n(527),l=n(40),c=n(6).EventEmitter,f=n(66).Connection,h=n(28),p=n(14),d=n(526),m=d.cleanUrlSIO,g=n(64),y=n(12),b=n(222),v=n(1103),w=h(()=>{}),_={transports:["websocket"],"force new connection":!0};class k extends c{constructor(e){super(),this.id=e.id,this.log=i.bind(i,"listener#offline"),this.canCrypto=Boolean(e.id),this._handler=e.handler||w,this.listeners_list=e.listeners||{},this.flag=e.flag,this.conns=[],this.connected=!1}_up(e){if(e=e?h(e):w,this.io)return e();this.log=i.bind(i,"listener#"+this.server),this.log("dialing to signalling server");const t=this.io=s.connect(this.server,_);a(t,{codec:"buffer"}),t.once("error",e),t.once("connect_error",e),t.once("connect",e);const n=new d.Protocol(this.log);n.addRequest("ws-peer",["multiaddr"],(e,t)=>this.emit("peer",t)),n.addRequest("ss-incomming",["string","multiaddr","function"],this._incommingDial.bind(this)),n.handleSocket(t)}_down(){this.io&&(this.io.disconnect(),this.emit("close"),delete this.io)}_cryptoChallenge(e){if(!this.io)return e(new Error("Not connected"));const n=this.canCrypto?g.keys.marshalPublicKey(this.id.pubKey).toString("hex"):"",r=this.ma.toString();this.io.emit("ss-join",r,n,(n,r,i)=>{if(n)return e(n);if(r){if(!this.canCrypto)return this._down(),e(new Error("Can't sign cryptoChallenge: No id provided"));this.log("performing cryptoChallenge"),this.id.privKey.sign(t.from(r),(t,n)=>{if(t)return e(t);this.signature=n.toString("hex"),this._join(e)})}else{if(!this.flag)return this._down(),e(new Error('Tried to listen on a server with crypto challenge disabled!\n This is prohibited by default and can lead to security issues!\n Please set "allowJoinWithDisabledChallenge" to true in the constructor options (but only if you know what you are doing)!'));this.signature="_",e(null,null,i)}})}_crypto(e){if(e=e?h(e):w,this.log("joining"),!this.io)return e(new Error("Not connected"));this.signature?this._join(e):this._cryptoChallenge(e)}_join(e){this.io.emit("ss-join",this.ma.toString(),this.signature,e)}_incommingDial(e,t,n,r){this.log("dial#"+t+" incomming from",n);const i=o(n),s=this.io.createSource(t+".dialer"),a=this.io.createSink(t+".listener");r();const u=new f({sink:a,source:s},{getObservedAddrs:e=>e(null,[i])});this.emit("connection",u),this._handler(u)}listen(e,t){if(this.ma=e,this.server=m(e),this.listeners_list[this.server]=this,t=t?h(t):w,this.connected)return this.closing=!1,p(()=>t());l([e=>this._up(e),e=>this._crypto((t,n,r)=>e(t,r))],(e,[n,r])=>{if(e){if(e.description&&"ENOTFOUND"===e.description.code){const t=e.description.hostname;e=Object.assign(new Error(`WebSocket connection failed on ${t}`),{code:v.ERR_WS_STAR_WEBSOCKET_CONNECTION})}return this.log("error",e),e instanceof Error||(e=new Error(e)),this._down(),this.emit("error",e),this.emit("close"),t(e)}this.log("success"),this.connected=!0,this.io.on("reconnect",()=>{this.signature=null,this._crypto((e,t,n)=>{if(e)this.log("reconnect error",e),this.emit("error",e);else{this.log("reconnected");for(const e of n||[])this.emit("peer",e)}})}),this.emit("listening");for(const e of r||[])this.emit("peer",e);t()})}getAddrs(e){p(()=>e(null,this.ma?[this.ma]:[]))}get activeConnections(){return this.conns=this.conns.filter(e=>e.sink||e.source),Boolean(this.conns.length)}maybeClose(){!this.activeConnections&&this.closing&&(this.connected=!1,this.closing=!1,this.log("no more connections and listener is offline - closing"),this._down())}close(e){e=e?h(e):w,this.closing=!0,this.maybeClose(),e()}stateWatch(e,t){let n={sink:!0,source:!0};const r=e=>b(e=>e,t=>{n[e]=!1,n.sink||n.source||this.maybeClose()});return this.conns.push(n),{sink:y(r("sink"),e),source:y(t,r("source"))}}dial(e,t,n){"function"==typeof t&&(n=t,t={});const r=o(e),s=new f(null),a=u(),l=this.log.bind(i,"dial#"+a);n=n?h(n):w;let c=this.io;if(!c)return n(new Error("Not listening"));const p=c.createSink(a+".dialer");return l("dialing",e.toString()),c.emit("ss-dial",this.ma.toString(),e.toString(),a,e=>{if(e)return n(e instanceof Error?e:new Error(e));l(e?"error: "+e.toString():"success");const t=c.createSource(a+".listener");s.setInnerConn(this.stateWatch(p,t),{getObservedAddrs:e=>e(null,[r])}),n(null,s)}),s}}e.exports=k}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(1099),i=n(527),o=n(26),s=(e,t)=>"socket.io-pull-stream."+e+(t?"."+t:""),a=n(1101),u=a("socket.io-pull-stream");function l(e,t){if(null==t)return t;try{return e(t)}catch(e){return console.error("Codec Error"),console.error(e),!1}}const c={hex:{encode:e=>e.toString("hex"),decode:e=>t.from(e,"hex")},plain:{encode:e=>e,decode:e=>e},buffer:{encode:e=>t.from(e),decode:e=>t.from(e)}};function f(e){if(e||(e="plain"),"object"==typeof e)return e;const t=c[e];if(!t)throw new Error("Invalid codec "+e);return t}function h(e,t,n){const i=r(),o=e.sioplog.bind(e.sioplog,"source("+t+")"),a=f(n.codec).decode;function u(){e.removeAllListeners(s("error",t)),e.removeAllListeners(s("queue",t))}return o("create source"),e.emit(s("accept",t)),e.on(s("error",t),e=>{o(!0===e?"finish":"error"),u(),i.append({end:e})}),e.on(s("queue",t),e=>{o("queue data"),i.append({data:l(a,e)})}),e.once("disconnect",()=>{u(),i.append({end:!0})}),function(e,t){if(o("reading"),e)return t(e);i.get((e,n)=>e?t(e):n.end?(i.error(n.end),t(n.end)):t(null,n.data))}}function p(e,t,n){const i=r(),o=e.sioplog.bind(e.sioplog," sink("+t+")"),a=f(n.codec).encode;let u;function c(e){i.append({err:e}),u=e}return o("create sink"),e.once(s("accept",t),()=>{function n(){i.get((r,u)=>{let{data:c,err:f}=u||{};if(r&&(f=r),o("send",f&&!0===f?"finish":f?"error":c?"data":"<invalid>"),f&&!r&&i.error(f),f)return e.emit(s("error",t),f);c&&e.emit(s("queue",t),l(a,c)),n()})}o("start transmission"),n()}),e.once("disconnect",()=>c(!0)),function(e){e(null,function t(n,r){return n?c(n):u?e(u,t):(i.append({data:r}),void e(null,t))})}}e.exports=function e(t,n){t.createSink||(t.sioplog=t.id?u.bind(u,"["+t.id+"]"):u,t.createSink=((e,r)=>{e||(e=i());const o=p(t,e,n||r);return o.id=e,o}),t.createSource=((e,r)=>{const i=h(t,e,n||r);return i.id=e,i}),t.createProxy=((e,n,r)=>{o(t.createSource(e,r),n.createSink(e,r))}))}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(6).EventEmitter;function i(){const e=new r;let t=[],n;function i(){e.removeAllListeners("err"),e.removeAllListeners("data")}return{append:r=>{if(n)return n;t.push(r),e.emit("data")},prepend:e=>{if(n)return n;t.unshift(e)},error:t=>{n=t,e.emit("err",t)},get:r=>(i(),n?r(n):t.length?r(null,t.shift()):(e.once("err",e=>{i(),r(e)}),void e.once("data",()=>(i(),r(null,t.shift()))))),height:()=>t.length}}e.exports=i},function(e,t,n){var r=n(413),i=n(414),o,s,a=0,u=0;function l(e,t,n){var l=t&&n||0,c=t||[];e=e||{};var f=e.node||o,h=void 0!==e.clockseq?e.clockseq:s;if(null==f||null==h){var p=r();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=s=16383&(p[6]<<8|p[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,g=d-a+(m-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||d>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=m,s=h,d+=122192928e5;var y=(1e4*(268435455&d)+m)%4294967296;c[l++]=y>>>24&255,c[l++]=y>>>16&255,c[l++]=y>>>8&255,c[l++]=255&y;var b=d/4294967296*1e4&268435455;c[l++]=b>>>8&255,c[l++]=255&b,c[l++]=b>>>24&15|16,c[l++]=b>>>16&255,c[l++]=h>>>8|128,c[l++]=255&h;for(var v=0;v<6;++v)c[l+v]=f[v];return t||i(c)}e.exports=l},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1102)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){"use strict";t.ERR_WS_STAR_WEBSOCKET_CONNECTION="ERR_WS_STAR_WEBSOCKET_CONNECTION"},function(e,t,n){"use strict";const r=n(100),i=n(1105),o=n(528),s=n(1107),a=n(59);function u(e,t){const n=r(e);n.on("end",()=>n.destroy());const o=new i({halfOpen:!0,initiator:!t});return a(n,o,n),new s(e,o)}t=e.exports=u,t.multicodec=o,t.dialer=(e=>u(e,!1)),t.listener=(e=>u(e,!0))},function(e,t,n){"use strict";(function(t){const r=n(20),i=n(39),o=n(5),s=n(1106),a=t.from([0]),u=t.alloc(0);let l=t.alloc(10240),c=0;class f extends r.Duplex{constructor(e,n){super(),"function"==typeof e&&(n=e,e={}),e||(e={}),n&&this.on("stream",n),this.destroyed=!1,this.limit=e.limit||0,null==e.initiator&&(e.initiator=!0),this.initiator=e.initiator,this._corked=0,this._options=e,this._binaryName=Boolean(e.binaryName),this._local=[],this._remote=[],this._list=this._local,this._receiving=null,this._chunked=!1,this._state=0,this._type=0,this._channel=0,this._missing=0,this._message=null,this.log=o("mplex:main:"+Math.floor(1e5*Math.random())),this.log("construction");let r=100;this.limit&&(r=i.encodingLength(this.limit)),this._buf=t.alloc(r),this._ptr=0,this._awaitChannelDrains=0,this._onwritedrain=null,this._ondrain=[],this._finished=!1,this.once("finish",this._clear),this._nextId=this.initiator?0:1}_nextStreamId(){let e=this._nextId;return this._nextId+=2,e}createStream(e,t){if(this.destroyed)throw new Error("Multiplexer is destroyed");const n=this._nextStreamId();let r=this._name(e||n.toString());const i=Object.assign(this._options,t);this.log("createStream: %s",n,r.toString(),i);const o=new s(r,this,i);return this._addChannel(o,n,this._local)}receiveStream(e,t){if(this.destroyed)throw new Error("Multiplexer is destroyed");if(void 0===e||null===e)throw new Error("Name is needed when receiving a stream");const n=this._name(e);this.log("receiveStream: "+n.toString());const r=new s(n,this,Object.assign(this._options,t));if(this._receiving||(this._receiving={}),this._receiving[r.name])throw new Error("You are already receiving this stream");return this._receiving[r.name]=r,r}_name(e){return this._binaryName?t.isBuffer(e)?e:t.from(e):e.toString()}_send(e,n){const r=n?n.length:0,o=c;this.log("_send",e,r),i.encode(e,l,c),c+=i.encode.bytes,i.encode(r,l,c),c+=i.encode.bytes;let s=l.slice(o,c);return l.length-c<100&&(l=t.alloc(10240),c=0),n&&(s=t.concat([s,n])),this.push(s)}_addChannel(e,t,n){return this.log("_addChannel",t),n[t]=e,e.on("finalize",()=>{this.log("_remove channel",t),n[t]=null}),e.open(t,n===this._local),e}_writeVarint(e,t){for(;t<e.length;t++){if(this._ptr===this._buf.length)return this._lengthError(e);if(this._buf[this._ptr++]=e[t],!(128&e[t])){if(0===this._state){const e=i.decode(this._buf);this._type=7&e,this._channel=e>>3,this._list=1&this._type?this._local:this._remote;const t=this._list.length>this._channel&&this._list[this._channel]&&this._list[this._channel].chunked;this._chunked=Boolean(1===this._type||2===this._type)&&t}else if(this._missing=i.decode(this._buf),this.limit&&this._missing>this.limit)return this._lengthError(e);return this._state++,this._ptr=0,t+1}}return e.length}_lengthError(e){return this.destroy(new Error("Incoming message is too big")),e.length}_writeMessage(e,n){const r=e.length-n,i=this._missing;if(!this._message){if(i<=r)return this._missing=0,this._push(e.slice(n,n+i)),n+i;if(this._chunked)return this._missing-=r,this._push(e.slice(n,e.length)),e.length;this._message=t.alloc(i)}return e.copy(this._message,this._ptr,n,n+i),i<=r?(this._missing=0,this._push(this._message),n+i):(this._missing-=r,this._ptr+=r,e.length)}_push(e){if(this.log("_push",e.length),this._missing||(this._ptr=0,this._state=0,this._message=null),0===this._type){if(this.log("open",this._channel),this.destroyed||this._finished)return;let t,n;return t=this._binaryName?e:e.toString()||this._channel.toString(),this.log("open name",t),void(this._receiving&&this._receiving[t]?(n=this._receiving[t],delete this._receiving[t],this._addChannel(n,this._channel,this._list)):(n=new s(t,this,this._options),this.emit("stream",this._addChannel(n,this._channel,this._list),n.name)))}const t=this._list[this._channel];if(t)switch(this._type){case 5:case 6:{const n=new Error(e.toString()||"Channel destroyed");return t.local=!1,void t.destroy(n)}case 3:case 4:return void t.push(null);case 1:case 2:t.push(e)||(this._awaitChannelDrains++,t._awaitDrain++)}}_onchanneldrain(e){if(this._awaitChannelDrains-=e,this._awaitChannelDrains)return;const t=this._onwritedrain;this._onwritedrain=null,t&&t()}_write(e,t,n){if(this.log("_write",e.length),this._finished)return void n();if(this._corked)return void this._onuncork(this._write.bind(this,e,t,n));if(e===a)return void this._finish(n);let r=0;for(;r<e.length;)r=2===this._state?this._writeMessage(e,r):this._writeVarint(e,r);2!==this._state||this._missing||this._push(u),this._awaitChannelDrains?this._onwritedrain=n:n()}_finish(e){this._onuncork(()=>{!1===this._writableState.prefinished&&(this._writableState.prefinished=!0),this.emit("prefinish"),this._onuncork(e)})}cork(){1==++this._corked&&this.emit("cork")}uncork(){this._corked&&0==--this._corked&&this.emit("uncork")}end(e,t,n){return this.log("end"),"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e&&this.write(e),this._writableState.ending||this.write(a),r.Writable.prototype.end.call(this,n)}_onuncork(e){this._corked?this.once("uncork",e):e()}_read(){for(;this._ondrain.length;)this._ondrain.shift()()}_clear(){if(this.log("_clear"),this._finished)return;this._finished=!0;const e=this._local.concat(this._remote);this._local=[],this._remote=[],e.forEach(function(e){e&&(e.local=!1,e.destroy(null))}),this.push(null)}finalize(){this._clear()}_destroy(e,t){this.log("destroy");const n=this._local.concat(this._remote);n.forEach(function(t){t&&t.destroy(e||new Error("Channel destroyed"))}),this._clear(),t(e)}}e.exports=f}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(20),i=n(5);class o extends r.Duplex{constructor(e,t,n){const r=Boolean(n.halfOpen);super({allowHalfOpen:r}),this.name=e,this.log=i("mplex:channel:"+this.name.toString()),this.channel=0,this.initiator=!1,this.chunked=Boolean(n.chunked),this.halfOpen=r,this.destroyed=!1,this.finalized=!1,this.local=!0,this._multiplex=t,this._dataHeader=0,this._opened=!1,this._awaitDrain=0,this._lazy=Boolean(n.lazy);let o=!1,s=!1;this.log("open, halfOpen: "+this.halfOpen),this.once("end",()=>{this.log("end"),this._read(),this.destroyed||(s=!0,o?this._finalize():this.halfOpen||this.end())}),this.once("finish",function e(){if(!this.destroyed){if(!this._opened)return this.once("open",e);this._lazy&&this.initiator&&this._open(),this._multiplex._send(this.channel<<3|(this.initiator?4:3),null),o=!0,s&&this._finalize()}})}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):this.log("error",...t)}_destroy(e,n){if(this.log("_destroy:"+(this.local?"local":"remote")),this.local&&this._opened){this._lazy&&this.initiator&&this._open();const n=e?t.from(e.message):null;try{this._multiplex._send(this.channel<<3|(this.initiator?6:5),n)}catch(e){}}this._finalize(),n(e)}_finalize(){this.finalized||(this.finalized=!0,this.emit("finalize"))}_write(e,t,n){if(this.log("write: ",e.length),!this._opened)return void this.once("open",()=>{this._write(e,t,n)});if(this.destroyed)return void n();this._lazy&&this.initiator&&this._open();const r=this._multiplex._send(this._dataHeader,e);r?n():this._multiplex._ondrain.push(n)}_read(){if(this._awaitDrain){const e=this._awaitDrain;this._awaitDrain=0,this._multiplex._onchanneldrain(e)}}_open(){let e=null;t.isBuffer(this.name)?e=this.name:this.name!==this.channel.toString()&&(e=t.from(this.name)),this._lazy=!1,this._multiplex._send(this.channel<<3|0,e)}open(e,t){this.log("open: "+e),this.channel=e,this.initiator=t,this._dataHeader=e<<3|(t?2:1),this._opened=!0,!this._lazy&&this.initiator&&this._open(),this.emit("open")}}e.exports=o}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(6).EventEmitter,i=n(66).Connection,o=n(79),s=n(26),a=n(1108),u=n(14),l=n(5),c=l("mplex");c.error=l("mplex:error");const f=n(528);function h(){}function p(e){return{source:s(e.source,a(e=>{if("Channel destroyed"!==e.message)return!1})),sink:e.sink}}class d extends r{constructor(e,t){super(),this.multiplex=t,this.conn=e,this.multicodec=f,t.on("close",()=>this.emit("close")),t.on("error",e=>this.emit("error",e)),t.on("stream",(e,t)=>{const n=new i(p(o.duplex(e)),this.conn);this.emit("stream",n)})}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):c.error("error",...t)}newStream(e){let t;e=e||h;try{t=this.multiplex.createStream()}catch(t){return u(()=>e(t))}const n=new i(p(o.duplex(t)),this.conn);return u(()=>e(null,n)),n}end(e,t){"function"==typeof e&&(t=e,e=null),t=t||h,this.multiplex.destroy(e),t()}}e.exports=d},function(e,t){e.exports=function e(t){var n;return t=t||function e(){},function e(r){return function e(i,o){r(i,function e(r,i){if(n)return o(!0);if(r&&!0!==r){var s=t(r);return!1===s?o(r):s&&!0!==s?(n=!0,o(null,s)):o(!0)}o(r,i)})}}}},function(e,t){},function(e,t,n){"use strict";const r=n(12),i=n(66).Connection,o=n(18),s=n(44),a=n(5),u=n(28),l=a("libp2p:secio");l.error=a("libp2p:secio:error");const c=n(1111),f=n(1117);e.exports={tag:"/secio/1.0.0",encrypt(e,t,n,a){o(e,"no local private key provided"),o(t,"no connection for the handshake provided"),"function"==typeof n&&(a=n,n=void 0),a=u(a||function(e){e&&l.error(e)});const h=3e5,p=new f(e,n,3e5,a);function d(e){if(e)return a(e);t.getPeerInfo((e,n)=>{m.setInnerConn(new i(p.secure,t)),e&&m.setPeerInfo(new s(p.id.remote)),a()})}const m=new i(void 0,t);return r(t,c(p,d),t),m}}},function(e,t,n){"use strict";const r=n(40),i=n(1112),o=n(1114),s=n(1115);e.exports=function e(t,n){return r([e=>i(t,e),e=>o(t,e),e=>s(t,e)],e=>{t.cleanSecrets(),e&&(!0===e&&(e=new Error("Stream ended prematurely")),t.shake.abort(e)),n(e)}),t.stream}},function(e,t,n){"use strict";const r=n(5),i=n(11),o=n(330),s=n(331),a=r("libp2p:secio");a.error=r("libp2p:secio:error"),e.exports=function e(t,n){a("1. propose - start"),a("1. propose - writing proposal"),o.write(t,s.createProposal(t)),i([e=>o.read(t.shake,e),(e,n)=>{a("1. propose - reading proposal",e),s.identify(t,e,n)},e=>s.selectProtocols(t,e)],e=>{if(e)return n(e);a("1. propose - finish"),n()})}},function(e,t,n){"use strict";e.exports="message Propose {\n optional bytes rand = 1;\n optional bytes pubkey = 2;\n optional string exchanges = 3;\n optional string ciphers = 4;\n optional string hashes = 5;\n}\n\nmessage Exchange {\n optional bytes epubkey = 1;\n optional bytes signature = 2;\n}"},function(e,t,n){"use strict";const r=n(5),i=n(11),o=n(330),s=n(331),a=r("libp2p:secio");a.error=r("libp2p:secio:error"),e.exports=function e(t,n){a("2. exchange - start"),a("2. exchange - writing exchange"),i([e=>s.createExchange(t,e),(e,n)=>{o.write(t,e),o.read(t.shake,n)},(e,n)=>{a("2. exchange - reading exchange"),s.verify(t,e,n)},e=>s.generateKeys(t,e)],e=>{if(e)return n(e);a("2. exchange - finish"),n()})}},function(e,t,n){"use strict";const r=n(12),i=n(81),o=n(122),s=n(5),a=s("libp2p:secio");a.error=s("libp2p:secio:error");const u=n(1116),l=n(331);e.exports=function e(t,n){a("3. finish - start");const s=t.protocols,c=t.shake.rest(),f=o({timeout:t.timeout},e=>{if(e)throw e});r(c,u.createUnboxStream(s.remote.cipher,s.remote.mac),f,u.createBoxStream(s.local.cipher,s.local.mac),c),f.handshake.write(t.proposal.in.rand),f.handshake.read(t.proposal.in.rand.length,(e,r)=>{const o=e=>{a.error(e),t.secure.resolve({source:i(e),sink(e){}}),n(e)};if(e)return o(e);try{l.verifyNonce(t,r)}catch(e){return o(e)}a("3. finish - finish"),t.secure.resolve(f.handshake.rest()),n()})}},function(e,t,n){"use strict";(function(e){const r=n(12),i=n(77),o=n(89),s=n(72),a={fixed:!0,bytes:4};function u(){return i(t=>"string"==typeof t?e.from(t,"utf-8"):t)}t.createBoxStream=((t,n)=>r(u(),o((r,i)=>{t.encrypt(r,(t,r)=>{if(t)return i(t);n.digest(r,(t,n)=>{if(t)return i(t);i(null,e.concat([r,n]))})})}),s.encode(a))),t.createUnboxStream=((e,t)=>r(u(),s.decode(a),o((n,r)=>{const i=n.length,o=t.length;if(i<o)return r(new Error(`buffer (${i}) shorter than MAC size (${o})`));const s=i-o,a=n.slice(0,s),u=n.slice(s);t.digest(a,(t,n)=>t?r(t):u.equals(n)?void e.decrypt(a,(e,t)=>{if(e)return r(e);r(null,t)}):r(new Error(`MAC Invalid: ${u.toString("hex")} != ${n.toString("hex")}`)))})))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(122),i=n(70);class o{constructor(e,t,n,o){"function"==typeof n&&(o=n,n=void 0),this.setup(),this.id.local=e,this.id.remote=t,this.key.local=e.privKey,this.timeout=n||6e4,o=o||(()=>{}),this.secure=i.duplex(),this.stream=r({timeout:this.timeout},o),this.shake=this.stream.handshake,delete this.stream.handshake}setup(){this.id={local:null,remote:null},this.key={local:null,remote:null},this.shake=null,this.cleanSecrets()}cleanSecrets(){this.shared={},this.ephemeralKey={local:null,remote:null},this.proposal={in:null,out:null},this.proposalEncoded={in:null,out:null},this.protocols={local:null,remote:null},this.exchange={in:null,out:null}}}e.exports=o},function(e,t,n){"use strict";const r=n(23),i=n(44),o=n(24),s=n(91),a=n(6).EventEmitter,u=n(5),l=n(90),c=u("libp2p:bootstrap");function f(e){try{return s.IPFS.matches(e)}catch(e){return!1}}c.error=u("libp2p:bootstrap:error");class h extends a{constructor(e){super(),this._list=e.list,this._interval=e.interval||1e4,this._timer=null}start(e){if(this._timer)return l(()=>e());this._timer=setInterval(()=>this._discoverBootstrapPeers(),this._interval),l(()=>{e(),this._discoverBootstrapPeers()})}_discoverBootstrapPeers(){this._list.forEach(e=>{if(!f(e))return c.error("Invalid multiaddr");const t=o(e),n=r.createFromB58String(t.getPeerId());i.create(n,(e,n)=>{if(e)return c.error("Invalid bootstrap peer id",e);n.multiaddrs.add(t),this.emit("peer",n)})})}stop(e){l(e),this._timer&&(clearInterval(this._timer),this._timer=null)}}t=e.exports=h,t.tag="bootstrap"},function(e,t,n){"use strict";(function(t){const r=n(183),i=n(6).EventEmitter,o=n(5),s=o("libp2p");s.error=o("libp2p:error");const a=n(22),u=n(56),l=n(40),c=n(54),f=n(484),h=n(1121),p=n(1152),d=n(505),m=n(1156),g=n(1164),y=n(1165),b=n(1166),v=n(1167),w=n(1177),_=n(1178).validate,k=(e,t)=>a(new Error(`libp2p cannot ${e} when not started; state is ${t}`),"ERR_NODE_NOT_STARTED");class S extends i{constructor(e){if(super(),e=_(e),this.datastore=e.datastore,this.peerInfo=e.peerInfo,this.peerBook=e.peerBook||new f,this._modules=e.modules,this._config=e.config,this._isStarted=!1,this._transport=[],this._discovery=[],this._switch=new h(this.peerInfo,this.peerBook,e.switch),this._switch.on("error",(...e)=>this.emit("error",...e)),this.stats=this._switch.stats,this.connectionManager=new m(this,e.connectionManager),this._modules.streamMuxer){let e=this._modules.streamMuxer;e.forEach(e=>this._switch.connection.addStreamMuxer(e)),this._switch.connection.reuse(),this._switch.connection.enableCircuitRelay(this._config.relay),this._switch.on("peer-mux-established",e=>{this.emit("peer:connect",e),this.peerBook.put(e)}),this._switch.on("peer-mux-closed",e=>{this.emit("peer:disconnect",e)})}if(this._modules.connEncryption){let e=this._modules.connEncryption;e.forEach(e=>{this._switch.connection.crypto(e.tag,e.encrypt)})}if(this._modules.connProtector)this._switch.protector=this._modules.connProtector;else if(t.env.LIBP2P_FORCE_PNET)throw new Error("Private network is enforced, but no protector was provided");if(this._config.EXPERIMENTAL.dht){const e=this._modules.dht,t=!1!==this._config.dht.enabledDiscovery;this._dht=new e(this._switch,{kBucketSize:this._config.dht.kBucketSize,enabledDiscovery:t,datastore:this.datastore,validators:this._config.dht.validators,selectors:this._config.dht.selectors})}this._config.EXPERIMENTAL.pubsub&&(this.pubsub=v(this)),this.peerRouting=g(this),this.contentRouting=y(this),this.dht=b(this),this._getPeerInfo=w(this),p.mount(this._switch),this.state=new r("STOPPED",{STOPPED:{start:"STARTING",stop:"STOPPED"},STARTING:{done:"STARTED",abort:"STOPPED",stop:"STOPPING"},STARTED:{stop:"STOPPING",start:"STARTED"},STOPPING:{stop:"STOPPING",done:"STOPPED"}}),this.state.on("STARTING",()=>{s("libp2p is starting"),this._onStarting()}),this.state.on("STOPPING",()=>{s("libp2p is stopping"),this._onStopping()}),this.state.on("STARTED",()=>{s("libp2p has started"),this.emit("start")}),this.state.on("STOPPED",()=>{s("libp2p has stopped"),this.emit("stop")}),this.state.on("error",e=>{s.error(e),this.emit("error",e)})}emit(e,...t){"error"!==e||this._events.error?super.emit(e,...t):s.error(...t)}start(e=(()=>{})){this.once("start",e),this.state("start")}stop(e=(()=>{})){this.once("stop",e),this.state("stop")}isStarted(){return!!this.state&&"STARTED"===this.state._state}dial(e,t){this.dialProtocol(e,null,t)}dialProtocol(e,t,n){if(!this.isStarted())return n(k("dial",this.state._state));"function"==typeof t&&(n=t,t=void 0),this._getPeerInfo(e,(e,r)=>{if(e)return n(e);this._switch.dial(r,t,(e,t)=>{if(e)return n(e);this.peerBook.put(r),n(null,t)})})}dialFSM(e,t,n){if(!this.isStarted())return n(k("dial",this.state._state));"function"==typeof t&&(n=t,t=void 0),this._getPeerInfo(e,(e,r)=>{if(e)return n(e);const i=this._switch.dialFSM(r,t,e=>{e||this.peerBook.put(r)});n(null,i)})}hangUp(e,t){this._getPeerInfo(e,(e,n)=>{if(e)return t(e);this._switch.hangUp(n,t)})}ping(e,t){if(!this.isStarted())return t(k("ping",this.state._state));this._getPeerInfo(e,(e,n)=>{if(e)return t(e);t(null,new p(this._switch,n))})}handle(e,t,n){this._switch.handle(e,t,n)}unhandle(e){this._switch.unhandle(e)}_onStarting(){if(!this._modules.transport)return this.emit("error",new Error("no transports were present")),this.state("abort");let e;const t=[],n=[];this.peerInfo.multiaddrs.toArray().forEach(e=>{e.getPeerId()||(t.push(e),n.push(e.encapsulate("/ipfs/"+this.peerInfo.id.toB58String())))}),this.peerInfo.multiaddrs.replace(t,n);const r=this.peerInfo.multiaddrs.toArray();this._modules.transport.forEach(t=>{let n;n="function"==typeof t?new t:t,n.filter(r).length>0?this._switch.transport.add(n.tag||n[Symbol.toStringTag],n):d.isWebSockets(n)&&(e=n),this._transport.push(n)}),l([e=>{this.connectionManager.start(),this._switch.start(e)},t=>{e&&this._switch.transport.add(e.tag||e.constructor.name,e),this._modules.peerDiscovery?u(this._modules.peerDiscovery,(e,t)=>{let n={};e.tag&&this._config.peerDiscovery&&this._config.peerDiscovery[e.tag]&&(n=this._config.peerDiscovery[e.tag]);const r=null==n.enabled||n.enabled;if(r){let r;r="function"==typeof e?new e(Object.assign({},n,{peerInfo:this.peerInfo})):e,r.on("peer",e=>this.emit("peer:discovery",e)),this._discovery.push(r),r.start(t)}else t()},t):t()},e=>{this._isStarted=!0,this._dht?this._dht.start(e):e()},e=>{if(this._floodSub)return this._floodSub.start(e);e()},e=>{const t=this.peerInfo.multiaddrs.toArray();t.forEach(e=>{e.toString().match(/\/p2p-circuit($|\/)/)||this._transport.find(t=>t.filter(e).length>0)||this.peerInfo.multiaddrs.delete(e)}),e()}],e=>{if(e)return s.error(e),this.emit("error",e),this.state("stop");this.state("done")})}_onStopping(){l([e=>{if(this._modules.peerDiscovery)return c(this._discovery.map(e=>t=>e.stop(()=>{t()})),e);e()},e=>{if(this._floodSub)return this._floodSub.stop(e);e()},e=>{if(this._dht)return this._dht.stop(e);e()},e=>{this.connectionManager.stop(),this._switch.stop(e)},e=>{this._switch.transport.removeAll(e)}],e=>{e&&(s.error(e),this.emit("error",e)),this.state("done")})}}e.exports=S}).call(this,n(2))},function(e,t){function n(e,t){for(var n in e){var r=e[n];t(r,n,e)}}function r(e){return Object.keys(e).sort()}function i(e,t){return~e.indexOf(t)}function o(e,t){return e.filter(function(e){return i(t,e)})}function s(e,t){return e.filter(function(e){return!i(t,e)})}function a(e,t){return e.filter(function(e){return!i(t,e)}).concat(t.filter(function(t){return!i(e,t)})).sort()}function u(e,t){if(e.length!=t.length)return!1;for(var n in e)if(t[n]!==e[n])return!1}function l(e){for(var t in e)return!1;return!0}var c=t.validate=function(e){var t=Object.keys(e);return n(e,function(t,r){n(t,function(t,n){if(!e[t])throw new Error("invalid transition from state:"+r+" to state:"+t+" on event:"+n)})}),!0},f=t.reachable=function(e){var t={},r=!1;do{r=!1,n(e,function(e,i){var o=t[i]=t[i]||{};n(e,function(e,t){o[e]||(o[e]=[t],r=!0)}),n(e,function(e,i){var s=t[e];n(s,function(e,t){o[t]||(o[t]=[i].concat(e),r=!0)})})})}while(r);return t};t.terminal=t.deadlock=function(e){var t=[];return n(e,function(e,n){l(e)&&t.push(n)}),t};var h=t.livelock=function(e,t){var r=f(e),o=[];return n(r,function(e,r){i(t,r)||n(t,function(t){e[t]||i(o,r)||o.push(r)})}),o.sort()};function p(e){var t=[];return n(e,function(e,r){n(e,function(e,n){i(t,n)||t.push(n)})}),t.sort()}var d=t.combine=function(e,t,n,i){var s={},u=p(e),l=p(t),c=a(u,l);function f(n,i){var a=n+"-"+i,u;s[a]||(s[a]={}),u=s[a];var l=r(e[n]),h=r(t[i]),p=o(l,h);return p.forEach(function(r){u[r]=e[n][r]+"-"+t[i][r],s[u[r]]||f(e[n][r],t[i][r])}),o(c,l).forEach(function(t){u[t]=e[n][t]+"-"+i,s[u[t]]||f(e[n][t],i)}),o(c,h).forEach(function(e){u[e]=n+"-"+t[i][e],s[u[e]]||f(n,t[i][e])}),s[a]}return f(n,i),s}},function(e,t,n){"use strict";const r=n(183),i=n(6).EventEmitter,o=n(56),s=n(145),a=n(40),u=n(1122),l=n(1126),c=n(539),f=n(1141),h=n(1142),p=n(1144),d=n(538),m=n(1145),g=n(1146),y=n(18),b=n(537),v=n(5),w=v("libp2p:switch");w.error=v("libp2p:switch:error");class _ extends i{constructor(e,t,n){super(),y(e,"You must provide a `peerInfo`"),y(t,"You must provide a `peerBook`"),this._peerInfo=e,this._peerBook=t,this._options=n||{},this.setMaxListeners(1/0),this.transports={},this.conns={},this.protocols={},this.muxers={},this.identify=!1,this.crypto=d,this.protector=this._options.protector||null,this.transport=new u(this),this.connection=new l(this),this.observer=m(this),this.stats=g(this.observer,this._options.stats),this.protocolMuxer=p(this.protocols,this.observer),this.dial=f(this),this.dialFSM=f(this,!0),this._connectionHandler=h(this),this.state=new r("STOPPED",{STOPPED:{start:"STARTING",stop:"STOPPING"},STARTING:{done:"STARTED",stop:"STOPPING"},STARTED:{stop:"STOPPING",start:"STARTED"},STOPPING:{stop:"STOPPING",done:"STOPPED"}}),this.state.on("STARTING",()=>{w("The switch is starting"),this._onStarting()}),this.state.on("STOPPING",()=>{w("The switch is stopping"),this._onStopping()}),this.state.on("STARTED",()=>{w("The switch has started"),this.emit("start")}),this.state.on("STOPPED",()=>{w("The switch has stopped"),this.emit("stop")}),this.state.on("error",e=>{w.error(e),this.emit("error",e)})}availableTransports(e){const t=e.multiaddrs.toArray(),n=Object.keys(this.transports);return n.filter(e=>this.transports[e].filter(t).length>0).sort(e=>"Circuit"===e?1:0)}handle(e,t,n){this.protocols[e]={handlerFunc:t,matchFunc:n}}unhandle(e){this.protocols[e]&&delete this.protocols[e]}hangUp(e,t){const n=c(e,this._peerBook),r=n.id.toB58String(),i=[...this.connection.getAllById(r)];o(i,(e,t)=>{e.once("close",t),e.close()},t)}hasTransports(){const e=Object.keys(this.transports).filter(e=>"Circuit"!==e);return e&&e.length>0}start(e=(()=>{})){this.once("start",e),this.state("start")}stop(e=(()=>{})){this.once("stop",e),this.state("stop")}_onStarting(){this.stats.start(),s(this.availableTransports(this._peerInfo),(e,t)=>{this.transport.listen(e,{},null,t)},e=>{if(e)return w.error(e),this.emit("error",e);this.state("done")})}_onStopping(){this.stats.stop(),a([e=>{o(this.transports,(e,t)=>{o(e.listeners,(e,t)=>{e.close(t)},t)},e)},e=>o([...this.connection.getAll()],(e,t)=>{e.once("close",t),e.close()},e)],e=>{this.state("done")})}}e.exports=_,e.exports.errors=b},function(e,t,n){"use strict";const r=n(54),i=n(28),o=n(5),s=o("libp2p:switch:transport"),a=n(1123),u=8,l=3e4;class c{constructor(e){this.switch=e,this.dialer=new a(u,l)}add(e,t){if(s("adding %s",e),this.switch.transports[e])throw new Error("There is already a transport with this key");this.switch.transports[e]=t,this.switch.transports[e].listeners||(this.switch.transports[e].listeners=[])}remove(e,t){if(t=t||function(){},!this.switch.transports[e])return t();this.close(e,n=>{delete this.switch.transports[e],t(n)})}removeAll(e){const t=Object.keys(this.switch.transports).map(e=>t=>{this.remove(e,t)});r(t,e)}dial(e,t,n){const r=this.switch.transports[e];let i=t.multiaddrs.toArray();Array.isArray(i)||(i=[i]),i=c.dialables(r,i,this.switch._peerInfo),s("dialing %s",e,i.map(e=>e.toString())),this.dialer.dialMany(t.id,r,i,(e,r)=>{if(e)return n(e);t.connect(r.multiaddr),this.switch._peerBook.put(t),n(null,r.conn)})}listen(e,t,n,o){n=this.switch._connectionHandler(e,n);const s=this.switch.transports[e],a=c.dialables(s,this.switch._peerInfo.multiaddrs.distinct());s.listeners||(s.listeners=[]);let u=[];const l=a.map(e=>t=>{const r=i(t),o=s.createListener(n);o.once("error",r),o.listen(e,e=>{if(e)return r(e);o.removeListener("error",r),o.getAddrs((e,t)=>{if(e)return r(e);u=u.concat(t),s.listeners.push(o),r()})})});r(l,e=>{if(e)return o(e);this.switch._peerInfo.multiaddrs.replace(a,u),o()})}close(e,t){const n=this.switch.transports[e];if(!n)return t(new Error(`Trying to close non existing transport: ${e}`));r(n.listeners.map(e=>t=>{e.close(t)}),t)}static dialables(e,t,n){if(!e||!e.filter)return[];const r=e.filter(t);return n?r.filter(e=>!n.multiaddrs.toArray().find(t=>{try{e.decapsulate(t)}catch(e){return!1}return!0})):r}}e.exports=c},function(e,t,n){"use strict";const r=n(332),i=n(5),o=n(28),s=i("libp2p:switch:dialer"),a=n(1124);class u{constructor(e,t){s("create: %s peer limit, %s dial timeout",e,t),this.perPeerLimit=e,this.dialTimeout=t,this.queues=new Map}dialMany(e,t,n,i){s("dialMany:start");const a={cancel:!1};i=o(i);let u=[];const l=n.map(n=>r=>this.dialSingle(e,t,n,a,(e,t)=>e?(u.push(e),r(e)):r(null,t)));r(l,(e,t)=>t&&t.conn?(s("dialMany:success"),i(null,t)):(s("dialMany:error"),i(u)))}dialSingle(e,t,n,r,i){const o=e.toB58String();let u;s("dialSingle: %s:%s",o,n.toString()),this.queues.has(o)?u=this.queues.get(o):(u=new a(this.perPeerLimit,this.dialTimeout),this.queues.set(o,u)),u.push(t,n,r,i)}}e.exports=u},function(e,t,n){"use strict";const r=n(66).Connection,i=n(12),o=n(106),s=n(1125),a=n(227),u=n(5),l=n(28),c=u("libp2p:switch:dialer:queue");c.error=u("libp2p:switch:dialer:queue:error");class f{constructor(e,t){this.dialTimeout=t,this.queue=a((e,t)=>{this._doWork(e.transport,e.addr,e.token,t)},e)}_doWork(e,t,n,s){s=l(s),c("work:start"),this._dialWithTimeout(e,t,(a,u)=>{if(a)return c.error(`${e.constructor.name}:work`,a),s(a);if(n.cancel)return c("work:cancel"),i(o(),u),"function"==typeof u.close?u.close(e=>s(null,{cancel:!0})):s(null,{cancel:!0});n.cancel=!0,c("work:success");const l=new r;l.setInnerConn(u),s(null,{multiaddr:t,conn:u})})}_dialWithTimeout(e,t,n){s(n=>{const r=e.dial(t,e=>{if(e)return n(e);n(null,r)})},this.dialTimeout)(n)}push(e,t,n,r){this.queue.push({transport:e,addr:t,token:n},r)}}e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(393),i=a(r),o=n(42),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){var r=(0,s.default)(e);return(0,i.default)(function(i,o){var s=!1,a;function u(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),s=!0,o(r)}i.push(function(){s||(o.apply(null,arguments),clearTimeout(a))}),a=setTimeout(u,t),r.apply(null,i)})}e.exports=t.default},function(e,t,n){"use strict";const r=n(529),i=n(258),o=n(5),s=o("libp2p:switch:conn-manager"),a=n(28),u=n(534),{msHandle:l,msSelect:c,identifyDialer:f}=n(1140),h=n(535),p=n(538);class d{constructor(e){this.switch=e,this.connections={}}add(e){this.connections[e.theirB58Id]=this.connections[e.theirB58Id]||[],this.get(e)||this.connections[e.theirB58Id].push(e)}get(e){if(!this.connections[e.theirB58Id])return null;for(let t=0;t<this.connections[e.theirB58Id].length;t++)if(this.connections[e.theirB58Id][t]===e)return this.connections[e.theirB58Id][t];return null}getOne(e){return this.connections[e]?this.connections[e][0]:null}remove(e){if(this.connections[e.theirB58Id])for(let t=0;t<this.connections[e.theirB58Id].length;t++)if(this.connections[e.theirB58Id][t]===e)return void this.connections[e.theirB58Id].splice(t,1)}getAll(){let e=[];for(const t of Object.values(this.connections))e=[...e,...t];return e}getAllById(e){return this.connections[e]||[]}addStreamMuxer(e){this.switch.muxers[e.multicodec]=e,this.switch.handle(e.multicodec,(t,n)=>{const o=e.listener(n);return o.on("stream",this.switch.protocolMuxer(null)),this.switch.identify&&n.getPeerInfo((e,t)=>{!e&&t||s("crypto peerInfo wasnt found"),n.getPeerInfo=(async e=>{const n=o.newStream(),s=new i.Dialer;let u;e=a(e);try{await l(s,n);const i=await c(s,r.multicodec);u=await f(i,t)}catch(t){return o.end(()=>{e(t,null)})}const{peerInfo:h,observedAddrs:p}=u;for(var d=0;d<p.length;d++){var m=p[d];this.switch._peerInfo.multiaddrs.addSafe(m)}h&&n.setPeerInfo(h),e(null,h)}),n.getPeerInfo((e,t)=>{if(e)return s("identify not successful");const r=t.id.toB58String(),i=new u({_switch:this.switch,peerInfo:t,muxer:o,conn:n,type:"inc"});this.switch.connection.add(i),t.multiaddrs.size>0?t.connect(t.multiaddrs.toArray()[0]):t.connect(`/ipfs/${r}`),t=this.switch._peerBook.put(t),o.once("close",()=>{i.close()}),this.switch.emit("peer-mux-established",t)})}),n})}crypto(e,t){e||t||(e=p.tag,t=p.encrypt),this.switch.crypto={tag:e,encrypt:t}}enableCircuitRelay(e){e=e||{},e.enabled&&(e.hop||Object.assign(e,{hop:{enabled:!1,active:!1}}),this.switch.transport.add(h.tag,new h(this.switch,e)))}reuse(){this.switch.identify=!0,this.switch.handle(r.multicodec,(e,t)=>{r.listener(t,this.switch._peerInfo)})}}e.exports=d},function(e,t,n){"use strict";(function(t){const r=n(12),i=n(43),o=n(72),s=n(333);e.exports=((e,n)=>{e.getObservedAddrs((a,u)=>{if(a)return;u=u[0];let l=t.alloc(0);n.id.pubKey&&(l=n.id.pubKey.bytes);const c=s.encode({protocolVersion:"ipfs/0.1.0",agentVersion:"na",publicKey:l,listenAddrs:n.multiaddrs.toArray().map(e=>e.buffer),observedAddr:u?u.buffer:t.from(""),protocols:Array.from(n.protocols)});r(i([c]),o.encode(),e)})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(44),i=n(23),o=n(24),s=n(12),a=n(296),u=n(37),l=n(72),c=n(333);function f(e){if(!h(e))return[];let t=e.observedAddr;return Array.isArray(t)||(t=[t]),t.map(e=>o(e))}function h(e){return e.observedAddr&&e.observedAddr.length>0}e.exports=((e,t,n)=>{"function"==typeof t&&(n=t,t=null,console.warn("WARNING: no expected peer info was given, identify will not be able to verify peer integrity")),s(e,l.decode(),a(1),u((e,s)=>{if(e)return n(e);if(0===s.length)return n(new Error("conn was closed, did not receive data"));const a=c.decode(s[0]);i.createFromPubKey(a.publicKey,(e,i)=>{if(e)return n(e);const s=new r(i);if(t&&t.id.toB58String()!==i.toB58String())return n(new Error("invalid peer"));try{a.listenAddrs.map(o).forEach(e=>s.multiaddrs.add(e))}catch(e){return n(e)}let u;try{u=f(a)}catch(e){return n(e)}s.protocols=new Set(a.protocols),n(null,s,u)})}))})},function(e,t,n){"use strict";const r=n(12),i=n(18),o=n(530),s=n(1130),a=n(1131),u=n(532),l=n(259),c=n(66).Connection,f=n(533).PROTOCOL_ID;class h{constructor(){this.handlers={ls:{handlerFunc:(e,t)=>a(this,t),matchFunc:u}},this.log=l.log.listener()}handle(e,t){this.log("listener handle conn");const n=o(f,(n,i)=>{if(n)return t(n);const o=new c(i,e),a=s(o,this.handlers,this.log);r(o,a,o),t()},this.log);r(e,n,e)}addHandler(e,t,n){this.log("adding handler: "+e),i("function"==typeof t,"handler must be a function"),this.handlers[e]&&this.log("overwriting handler for "+e),n||(n=u),this.handlers[e]={handlerFunc:t,matchFunc:n}}}e.exports=h},function(e,t,n){"use strict";(function(t){const r=n(122),i=n(72),o=n(66).Connection,s=n(259).writeEncoded,a=n(531);function u(e,n,a){const u=e=>{a.error(e)},c=r({timeout:6e4},u),f=c.handshake;return h(),c;function h(){i.decodeFromReader(f,(r,i)=>{if(r)return u(r);a("received:",i.toString());const c=i.toString().slice(0,-1);l(c,n,(r,l)=>{if(r)return u(r);const p=l;if(p){a("send ack back of: "+c),s(f,i,u);const t=new o(f.rest(),e);n[p].handlerFunc(c,t)}else a("not supported protocol: "+c),s(f,t.from("na\n")),h()})})}}function l(e,t,n){const r=Object.keys(t);let i=!1;a(r,(n,r)=>{t[n].matchFunc(n,e,(e,t)=>{if(e)return r(e);t&&(i=n),r()})},e=>{if(e)return n(e);n(null,i)})}e.exports=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(12),i=n(43),o=n(72),s=n(39);function a(e,n){const a=Object.keys(e.handlers).filter(e=>"ls"!==e),u=a.length,l=a.reduce((e,n)=>{const r=t.from(n+"\n"),i=s.encodingLength(r.length);return e+i},0),c=t.concat([t.from(s.encode(u)),t.from(s.encode(l)),t.from("\n")]),f=a.map(e=>t.from(e+"\n"));r(i([c].concat(f)),o.encode(),n)}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(39),i=n(12),o=n(77),s=n(37),a=n(296),u=n(72),l=n(66).Connection,c=n(259),f=n(530),h=n(28),p=n(533).PROTOCOL_ID;class d{constructor(){this.conn=null,this.log=c.log.dialer()}handle(e,t){this.log("dialer handle conn"),t=h(t);const n=f(p,(n,r)=>{if(n)return t(n);this.log("handshake success"),this.conn=new l(r,e),t()},this.log);try{i(e,n,e)}catch(e){this.log.error(e),t(e)}}select(e,t){if(this.log("dialer select "+e),t=h(t),!this.conn)return t(new Error("multistream handshake has not finalized yet"));const n=f(e,(e,n)=>{if(e)return this.conn=new l(n,this.conn),t(e);t(null,new l(n,this.conn))},this.log);i(this.conn,n,this.conn)}ls(e){e=h(e);const t=f("ls",(t,n)=>{if(t)return e(t);i(n,u.decode(),g(n),o(m),s((t,n)=>{if(t)return e(t);e(null,n.slice(1))}))},this.log);i(this.conn,t,this.conn)}}function m(e){return e.toString().slice(0,-1)}function g(e){let t=!0,n=0;return a(e=>(r.decode(e),n=r.decode(e,r.decode.bytes),!0))}e.exports=d},function(e,t,n){"use strict";const r=n(1134);function i(e,t,n){const i=e.split("/"),o=t.split("/"),s=i[1],a=i[2],u=o[1],l=o[2];if(s!==u)return n(null,!1);const c=r.satisfies(a,"~"+l);n(null,c)}e.exports=i},function(e,t,n){(function(n){var r;t=e.exports=ee,r="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,a=t.re=[],u=t.src=[],l=0,c=l++;u[c]="0|[1-9]\\d*";var f=l++;u[f]="[0-9]+";var h=l++;u[h]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=l++;u[p]="("+u[c]+")\\.("+u[c]+")\\.("+u[c]+")";var d=l++;u[d]="("+u[f]+")\\.("+u[f]+")\\.("+u[f]+")";var m=l++;u[m]="(?:"+u[c]+"|"+u[h]+")";var g=l++;u[g]="(?:"+u[f]+"|"+u[h]+")";var y=l++;u[y]="(?:-("+u[m]+"(?:\\."+u[m]+")*))";var b=l++;u[b]="(?:-?("+u[g]+"(?:\\."+u[g]+")*))";var v=l++;u[v]="[0-9A-Za-z-]+";var w=l++;u[w]="(?:\\+("+u[v]+"(?:\\."+u[v]+")*))";var _=l++,k="v?"+u[p]+u[y]+"?"+u[w]+"?";u[_]="^"+k+"$";var S="[v=\\s]*"+u[d]+u[b]+"?"+u[w]+"?",E=l++;u[E]="^"+S+"$";var x=l++;u[x]="((?:<|>)?=?)";var C=l++;u[C]=u[f]+"|x|X|\\*";var A=l++;u[A]=u[c]+"|x|X|\\*";var I=l++;u[I]="[v=\\s]*("+u[A]+")(?:\\.("+u[A]+")(?:\\.("+u[A]+")(?:"+u[y]+")?"+u[w]+"?)?)?";var T=l++;u[T]="[v=\\s]*("+u[C]+")(?:\\.("+u[C]+")(?:\\.("+u[C]+")(?:"+u[b]+")?"+u[w]+"?)?)?";var j=l++;u[j]="^"+u[x]+"\\s*"+u[I]+"$";var O=l++;u[O]="^"+u[x]+"\\s*"+u[T]+"$";var P=l++;u[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var B=l++;u[B]="(?:~>?)";var R=l++;u[R]="(\\s*)"+u[B]+"\\s+",a[R]=new RegExp(u[R],"g");var N="$1~",M=l++;u[M]="^"+u[B]+u[I]+"$";var L=l++;u[L]="^"+u[B]+u[T]+"$";var F=l++;u[F]="(?:\\^)";var D=l++;u[D]="(\\s*)"+u[F]+"\\s+",a[D]=new RegExp(u[D],"g");var U="$1^",z=l++;u[z]="^"+u[F]+u[I]+"$";var q=l++;u[q]="^"+u[F]+u[T]+"$";var K=l++;u[K]="^"+u[x]+"\\s*("+S+")$|^$";var H=l++;u[H]="^"+u[x]+"\\s*("+k+")$|^$";var V=l++;u[V]="(\\s*)"+u[x]+"\\s*("+S+"|"+u[I]+")",a[V]=new RegExp(u[V],"g");var W="$1$2$3",$=l++;u[$]="^\\s*("+u[I]+")\\s+-\\s+("+u[I]+")\\s*$";var G=l++;u[G]="^\\s*("+u[T]+")\\s+-\\s+("+u[T]+")\\s*$";var Y=l++;u[Y]="(<|>)?=?\\s*\\*";for(var J=0;J<l;J++)r(J,u[J]),a[J]||(a[J]=new RegExp(u[J]));function Z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ee)return e;if("string"!=typeof e)return null;if(e.length>i)return null;var n=t.loose?a[E]:a[_];if(!n.test(e))return null;try{return new ee(e,t)}catch(e){return null}}function X(e,t){var n=Z(e,t);return n?n.version:null}function Q(e,t){var n=Z(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}function ee(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ee){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof ee))return new ee(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var n=e.trim().match(t.loose?a[E]:a[_]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}function te(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new ee(e,n).inc(t,r).version}catch(e){return null}}function ne(e,t){if(ge(e,t))return null;var n=Z(e),r=Z(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o}t.parse=Z,t.valid=X,t.clean=Q,t.SemVer=ee,ee.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},ee.prototype.toString=function(){return this.version},ee.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof ee||(e=new ee(e,this.options)),this.compareMain(e)||this.comparePre(e)},ee.prototype.compareMain=function(e){return e instanceof ee||(e=new ee(e,this.options)),ie(this.major,e.major)||ie(this.minor,e.minor)||ie(this.patch,e.patch)},ee.prototype.comparePre=function(e){if(e instanceof ee||(e=new ee(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return ie(n,i)}while(++t)},ee.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=te,t.diff=ne,t.compareIdentifiers=ie;var re=/^[0-9]+$/;function ie(e,t){var n=re.test(e),r=re.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function oe(e,t){return ie(t,e)}function se(e,t){return new ee(e,t).major}function ae(e,t){return new ee(e,t).minor}function ue(e,t){return new ee(e,t).patch}function le(e,t,n){return new ee(e,n).compare(new ee(t,n))}function ce(e,t){return le(e,t,!0)}function fe(e,t,n){return le(t,e,n)}function he(e,n){return e.sort(function(e,r){return t.compare(e,r,n)})}function pe(e,n){return e.sort(function(e,r){return t.rcompare(e,r,n)})}function de(e,t,n){return le(e,t,n)>0}function me(e,t,n){return le(e,t,n)<0}function ge(e,t,n){return 0===le(e,t,n)}function ye(e,t,n){return 0!==le(e,t,n)}function be(e,t,n){return le(e,t,n)>=0}function ve(e,t,n){return le(e,t,n)<=0}function we(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return ge(e,n,r);case"!=":return ye(e,n,r);case">":return de(e,n,r);case">=":return be(e,n,r);case"<":return me(e,n,r);case"<=":return ve(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function _e(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _e){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof _e))return new _e(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ke?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=oe,t.major=se,t.minor=ae,t.patch=ue,t.compare=le,t.compareLoose=ce,t.rcompare=fe,t.sort=he,t.rsort=pe,t.gt=de,t.lt=me,t.eq=ge,t.neq=ye,t.gte=be,t.lte=ve,t.cmp=we,t.Comparator=_e;var ke={};function Se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Se(e.raw,t);if(e instanceof _e)return new Se(e.value,t);if(!(this instanceof Se))return new Se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function Ee(e,t){return new Se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function xe(e,t){return r("comp",e,t),e=Te(e,t),r("caret",e),e=Ae(e,t),r("tildes",e),e=Oe(e,t),r("xrange",e),e=Be(e,t),r("stars",e),e}function Ce(e){return!e||"x"===e.toLowerCase()||"*"===e}function Ae(e,t){return e.trim().split(/\s+/).map(function(e){return Ie(e,t)}).join(" ")}function Ie(e,t){var n=t.loose?a[L]:a[M];return e.replace(n,function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),Ce(n)?a="":Ce(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":Ce(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a})}function Te(e,t){return e.trim().split(/\s+/).map(function(e){return je(e,t)}).join(" ")}function je(e,t){r("caret",e,t);var n=t.loose?a[q]:a[z];return e.replace(n,function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),Ce(n)?a="":Ce(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":Ce(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a})}function Oe(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return Pe(e,t)}).join(" ")}function Pe(e,t){e=e.trim();var n=t.loose?a[O]:a[j];return e.replace(n,function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var u=Ce(i),l=u||Ce(o),c=l||Ce(s),f=c;return"="===n&&f&&(n=""),u?t=">"===n||"<"===n?"<0.0.0":"*":n&&f?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t})}function Be(e,t){return r("replaceStars",e,t),e.trim().replace(a[Y],"")}function Re(e,t,n,r,i,o,s,a,u,l,c,f,h){return t=Ce(n)?"":Ce(r)?">="+n+".0.0":Ce(i)?">="+n+"."+r+".0":">="+t,a=Ce(u)?"":Ce(l)?"<"+(+u+1)+".0.0":Ce(c)?"<"+u+"."+(+l+1)+".0":f?"<="+u+"."+l+"."+c+"-"+f:"<="+a,(t+" "+a).trim()}function Ne(e,t,n){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(i=0;i<e.length;i++)if(r(e[i].semver),e[i].semver!==ke&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function Me(e,t,n){try{t=new Se(t,n)}catch(e){return!1}return t.test(e)}function Le(e,t,n){var r=null,i=null;try{var o=new Se(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new ee(r,n)))}),r}function Fe(e,t,n){var r=null,i=null;try{var o=new Se(t,n)}catch(e){return null}return e.forEach(function(e){o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new ee(r,n)))}),r}function De(e,t){e=new Se(e,t);var n=new ee("0.0.0");if(e.test(n))return n;if(n=new ee("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){var i=e.set[r];i.forEach(function(e){var t=new ee(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!de(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}return n&&e.test(n)?n:null}function Ue(e,t){try{return new Se(e,t).range||"*"}catch(e){return null}}function ze(e,t,n){return Ke(e,t,"<",n)}function qe(e,t,n){return Ke(e,t,">",n)}function Ke(e,t,n,r){var i,o,s,a,u;switch(e=new ee(e,r),t=new Se(t,r),n){case">":i=de,o=ve,s=me,a=">",u=">=";break;case"<":i=me,o=be,s=de,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Me(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var c=t.set[l],f=null,h=null;if(c.forEach(function(e){e.semver===ke&&(e=new _e(">=0.0.0")),f=f||e,h=h||e,i(e.semver,f.semver,r)?f=e:s(e.semver,h.semver,r)&&(h=e)}),f.operator===a||f.operator===u)return!1;if((!h.operator||h.operator===a)&&o(e,h.semver))return!1;if(h.operator===u&&s(e,h.semver))return!1}return!0}function He(e,t){var n=Z(e,t);return n&&n.prerelease.length?n.prerelease:null}function Ve(e,t,n){return e=new Se(e,n),t=new Se(t,n),e.intersects(t)}function We(e){if(e instanceof ee)return e;if("string"!=typeof e)return null;var t=e.match(a[P]);return null==t?null:Z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}_e.prototype.parse=function(e){var t=this.options.loose?a[K]:a[H],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new ee(n[2],this.options.loose):this.semver=ke},_e.prototype.toString=function(){return this.value},_e.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ke||("string"==typeof e&&(e=new ee(e,this.options)),we(e,this.operator,this.semver,this.options))},_e.prototype.intersects=function(e,t){if(!(e instanceof _e))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new Se(e.value,t),Me(this.value,n,t);if(""===e.operator)return n=new Se(this.value,t),Me(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=we(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=we(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||u},t.Range=Se,Se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},Se.prototype.toString=function(){return this.range},Se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[G]:a[$];e=e.replace(n,Re),r("hyphen replace",e),e=e.replace(a[V],"$1$2$3"),r("comparator trim",e,a[V]),e=e.replace(a[R],"$1~"),e=e.replace(a[D],"$1^"),e=e.split(/\s+/).join(" ");var i=t?a[K]:a[H],o=e.split(" ").map(function(e){return xe(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new _e(e,this.options)},this),o},Se.prototype.intersects=function(e,t){if(!(e instanceof Se))throw new TypeError("a Range is required");return this.set.some(function(n){return n.every(function(n){return e.set.some(function(e){return e.every(function(e){return n.intersects(e,t)})})})})},t.toComparators=Ee,Se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new ee(e,this.options));for(var t=0;t<this.set.length;t++)if(Ne(this.set[t],e,this.options))return!0;return!1},t.satisfies=Me,t.maxSatisfying=Le,t.minSatisfying=Fe,t.minVersion=De,t.validRange=Ue,t.ltr=ze,t.gtr=qe,t.outside=Ke,t.prerelease=He,t.intersects=Ve,t.coerce=We}).call(this,n(2))},function(e,t,n){"use strict";const r=n(91),i=n(24),o=n(1136),s=n(184),a=n(5),u=a("libp2p:circuit:transportdialer");u.err=a("libp2p:circuit:error:transportdialer");const l=n(1137);class c{static get tag(){return"Circuit"}constructor(e,t){this.options=t||{},this.swarm=e,this.dialer=null,this.utils=s(e),this.peerInfo=this.swarm._peerInfo,this.relays=this.filter(this.peerInfo.multiaddrs.toArray()),0===this.relays.length&&this.peerInfo.multiaddrs.add(`/p2p-circuit/ipfs/${this.peerInfo.id.toB58String()}`),this.dialer=new o(e,t),this.swarm.on("peer-mux-established",e=>{this.dialer.canHop(e)}),this.swarm.on("peer-mux-closed",e=>{this.dialer.relayPeers.delete(e.id.toB58String())})}_dialSwarmRelays(){this.relays.forEach(e=>{let t=e.toString().split("/p2p-circuit").filter(e=>e.length);t.forEach(e=>{const t=this.utils.peerInfoFromMa(i(e));this.dialer._dialRelay(t)})})}dial(e,t,n){return this.dialer.dial(e,t,n)}createListener(e,t){"function"==typeof e&&(t=e,e=this.options||{});const n=l(this.swarm,e,t);return n.on("listen",this._dialSwarmRelays.bind(this)),n}filter(e){return Array.isArray(e)||(e=[e]),e.filter(e=>r.Circuit.matches(e))}}e.exports=c},function(e,t,n){"use strict";const r=n(28),i=n(23),o=n(11),s=n(14),a=n(24),u=n(66).Connection,l=n(184),c=n(334),f=n(5),h=f("libp2p:circuit:dialer");h.err=f("libp2p:circuit:error:dialer");const p=n(335),d=n(185);class m{constructor(e,t){this.swarm=e,this.relayPeers=new Map,this.relayConns=new Map,this.options=t,this.utils=l(e)}_dialRelayHelper(e,t){return this.relayConns.has(e.id.toB58String())?t(null,this.relayConns.get(e.id.toB58String())):this._dialRelay(e,t)}dial(e,t){t=t||(()=>{});const n=e.toString();if(!n.includes("/p2p-circuit"))return h.err("invalid circuit address"),t(new Error("invalid circuit address"));const r=n.split("p2p-circuit"),i="/"===r[0]?null:a(r[0]),o=a(r[1]||r[0]),l=new u;return s(this._dialPeer.bind(this),o,i,(e,n)=>{if(e)return h.err(e),t(e);l.setInnerConn(n),t(null,l)}),l}canHop(e,t){t=r(t||(()=>{})),this._dialRelayHelper(e,(n,r)=>{if(n)return t(n);const i=new c(r);o([e=>i.write(d.CircuitRelay.encode({type:d.CircuitRelay.Type.CAN_HOP}),e),e=>i.read(e)],(n,r)=>{if(n)return t(n);const o=d.CircuitRelay.decode(r);if(o.code!==d.CircuitRelay.Status.SUCCESS){const n=new Error(`HOP not supported, skipping - ${this.utils.getB58String(e)}`);return h(n),t(n)}h("HOP supported adding as relay - %s",this.utils.getB58String(e)),this.relayPeers.set(this.utils.getB58String(e),e),i.close(),t()})})}_dialPeer(e,t,n){if("function"==typeof t&&(n=t,t=null),n||(n=(()=>{})),e=a(e),t)return this._negotiateRelay(t,e,(e,t)=>e?(h.err("An error has occurred negotiating the relay connection",e),n(e)):n(null,t));{const t=Array.from(this.relayPeers.values());let r=i=>{if(!i){let e="no relay peers were found or all relays failed to dial";return h.err(e),n(e)}return this._negotiateRelay(i,e,(e,i)=>{if(e)return h.err(e),r(t.shift());n(null,i)})};r(t.shift())}}_negotiateRelay(e,t,n){t=a(t),e=this.utils.peerInfoFromMa(e);const r=this.swarm._peerInfo.multiaddrs.toArray();this._dialRelayHelper(e,(e,s)=>{if(e)return h.err(e),n(e);let a=new c(s);o([e=>{let n;h("negotiating relay for peer %s",t.getPeerId());try{n=i.createFromB58String(t.getPeerId()).id}catch(t){return e(t)}a.write(d.CircuitRelay.encode({type:d.CircuitRelay.Type.HOP,srcPeer:{id:this.swarm._peerInfo.id.id,addrs:r.map(e=>e.buffer)},dstPeer:{id:n,addrs:[t.buffer]}}),e)},e=>a.read(e)],(e,t)=>{if(e)return n(e);const r=d.CircuitRelay.decode(t);return r.type!==d.CircuitRelay.Type.STATUS?n(new Error("Got invalid message type - "+`expected ${d.CircuitRelay.Type.STATUS} got ${r.type}`)):r.code!==d.CircuitRelay.Status.SUCCESS?n(new Error(`Got ${r.code} error code trying to dial over relay`)):void n(null,new u(a.rest()))})})}_dialRelay(e,t){t=r(t||(()=>{})),this.swarm.dial(e,p.relay,r((e,n)=>{if(e)return h.err(e),t(e);t(null,n)}))}}e.exports=m},function(e,t,n){"use strict";const r=n(14),i=n(335),o=n(6).EventEmitter,s=n(24),a=n(91),u=n(1138),l=n(1139),c=n(185),f=n(184),h=n(334),p=n(5),d=p("libp2p:circuit:listener");d.err=p("libp2p:circuit:error:listener"),e.exports=((e,t,n)=>{const p=new o,m=f(e);return p.stopHandler=new u(e),p.stopHandler.on("connection",e=>p.emit("connection",e)),p.hopHandler=new l(e,t.hop),p.listen=((t,o)=>{o=o||(()=>{}),e.handle(i.relay,(e,t)=>{const r=new h(t);r.read((e,t)=>{if(e)return void d.err(e);let i=null;try{i=c.CircuitRelay.decode(t)}catch(e){return m.writeResponse(r,c.CircuitRelay.Status.MALFORMED_MESSAGE)}switch(i.type){case c.CircuitRelay.Type.CAN_HOP:case c.CircuitRelay.Type.HOP:return p.hopHandler.handle(i,r);case c.CircuitRelay.Type.STOP:return p.stopHandler.handle(i,r,n);default:return m.writeResponse(r,c.CircuitRelay.Status.INVALID_MSG_TYPE),r.close()}})}),r(()=>p.emit("listen")),o()}),p.close=(t=>{e.unhandle(i.relay),r(()=>p.emit("close")),t()}),p.getAddrs=(t=>{let n=e._peerInfo.multiaddrs.toArray(),r=n.filter(t=>a.Circuit.matches(t)&&!t.toString().includes(e._peerInfo.id.toB58String()));r.length&&(n=r);let i=[];n.forEach(t=>{const n=`/p2p-circuit/ipfs/${e._peerInfo.id.toB58String()}`;if(t.toString()!==n)if(a.Circuit.matches(t))i.push(t.encapsulate(`/ipfs/${e._peerInfo.id.toB58String()}`));else if(t.getPeerId())i.push(s("/p2p-circuit").encapsulate(t));else{const n=`${t}/ipfs/${e._peerInfo.id.toB58String()}`;i.push(s("/p2p-circuit").encapsulate(n))}else i.push(s(n))}),t(null,i)}),p})},function(e,t,n){"use strict";const r=n(14),i=n(6).EventEmitter,o=n(66).Connection,s=n(184),a=n(44),u=n(185).CircuitRelay,l=n(40),c=n(5),f=c("libp2p:circuit:stop");f.err=c("libp2p:circuit:error:stop");class h extends i{constructor(e){super(),this.swarm=e,this.utils=s(e)}handle(e,t,n){n=n||(()=>{}),l([n=>this.utils.validateAddrs(e,t,u.Type.STOP,n),e=>this.utils.writeResponse(t,u.Status.Success,e)],i=>{if(i)return n(),f(i);const s=new a(this.utils.peerIdFromId(e.srcPeer.id));e.srcPeer.addrs.forEach(e=>s.multiaddrs.add(e));const u=new o(t.rest());u.setPeerInfo(s),r(()=>this.emit("connection",u)),n(u)})}}e.exports=h},function(e,t,n){"use strict";const r=n(12),i=n(5),o=n(44),s=n(23),a=n(6).EventEmitter,u=n(28),l=n(184),c=n(334),f=n(185).CircuitRelay,h=n(24),p=n(40),d=n(11),m=n(14),g=n(335),y=i("libp2p:circuit:relay");y.err=i("libp2p:circuit:error:relay");class b extends a{constructor(e,t){super(),this.swarm=e,this.peerInfo=this.swarm._peerInfo,this.utils=l(e),this.config=t||{active:!1,enabled:!1},this.active=this.config.active}handle(e,t){if(!this.config.enabled)return this.utils.writeResponse(t,f.Status.HOP_CANT_SPEAK_RELAY),t.close();if(e.type===f.Type.CAN_HOP)return this.utils.writeResponse(t,f.Status.SUCCESS),t.close();let n=null,r=null;try{n=s.createFromBytes(e.srcPeer.id).toB58String(),r=s.createFromBytes(e.dstPeer.id).toB58String()}catch(e){if(y.err(e),!n)return this.utils.writeResponse(t,f.Status.HOP_SRC_MULTIADDR_INVALID),t.close();if(!r)return this.utils.writeResponse(t,f.Status.HOP_DST_MULTIADDR_INVALID),t.close()}if(n===r)return this.utils.writeResponse(t,f.Status.HOP_CANT_RELAY_TO_SELF),t.close();if(!e.dstPeer.addrs.length){const t=h(`/p2p-circuit/ipfs/${r}`).buffer;e.dstPeer.addrs.push(t)}y("trying to establish a circuit: %s <-> %s",n,r);const i=()=>(this.utils.writeResponse(t,f.Status.HOP_NO_CONN_TO_DST),t.close()),o=e=>{let t;try{if(t=this.swarm._peerBook.get(r),!t.isConnected()&&!this.active){const t=new Error(`No Connection to peer ${r}`);return i(t),e(t)}}catch(t){if(!this.active)return i(t),e(t)}e()};p([n=>this.utils.validateAddrs(e,t,f.Type.HOP,n),e=>o(e),n=>this._circuit(t,e,n)],e=>{if(e)return y.err(e),t.close(),m(()=>this.emit("circuit:error",e));m(()=>this.emit("circuit:success"))})}_connectToStop(e,t,n){this._dialPeer(e,(e,r)=>e?(this.utils.writeResponse(t,f.Status.HOP_CANT_DIAL_DST),y.err(e),n(e)):this.utils.writeResponse(t,f.Status.SUCCESS,e=>e?(y.err(e),n(e)):n(null,r)))}_negotiateStop(e,t,n,r){const i=Object.assign({},n,{type:f.Type.STOP});e.write(f.encode(i),n=>{if(n)return this.utils.writeResponse(t,f.Status.HOP_CANT_OPEN_DST_STREAM),y.err(n),r(n);e.read((e,t)=>{if(e)return y.err(e),r(e);const n=f.decode(t);return n.code!==f.Status.SUCCESS?r(new Error("Unable to create circuit!")):r(null,t)})})}_circuit(e,t,n){let i=null;d([n=>this._connectToStop(t.dstPeer,e,n),(n,r)=>{i=new c(n),this._negotiateStop(i,e,t,r)}],o=>{if(o)return e&&e.close(),i&&i.close(),n(o);const a=e.rest(),u=i.rest(),l=s.createFromBytes(t.srcPeer.id).toB58String(),c=s.createFromBytes(t.dstPeer.id).toB58String();r(a,u,a),y("circuit %s <-> %s established",l,c),n()})}_dialPeer(e,t){const n=new o(s.createFromBytes(e.id));e.addrs.forEach(e=>n.multiaddrs.add(e)),this.swarm.dial(n,g.relay,u((e,n)=>{if(e)return y.err(e),t(e);t(null,n)}))}}e.exports=b},function(e,t,n){"use strict";const r=n(529);e.exports.msHandle=((e,t)=>new Promise((n,r)=>{e.handle(t,e=>{if(e)return r(e);n()})})),e.exports.msSelect=((e,t)=>new Promise((n,r)=>{e.select(t,(e,t)=>{if(e)return r(e);n(t)})})),e.exports.identifyDialer=((e,t)=>new Promise((n,i)=>{r.dialer(e,t,(e,t,r)=>{if(e)return i(e);n({peerInfo:t,observedAddrs:r})})}))},function(e,t,n){"use strict";const r=n(66).Connection,i=n(534),o=n(539),s=n(28),a=n(90),u=n(5),l=u("libp2p:switch:dial");function c({protocol:e,proxyConnection:t,connection:n,callback:r}){if(e)return n.shake(e,(e,i)=>{if(!i)return r(e);t.setPeerInfo(n.theirPeerInfo),t.setInnerConn(i),r(null,t)});a(r)}function f(e,t){return(n,u,f)=>{"function"==typeof u&&(f=u,u=null),f=s(f||function e(){});const h=o(n,e._peerBook),p=h.id.toB58String();l("dialing to %s with protocol %s",p,u||"unknown");let d=e.connection.getOne(p);i.isConnectionFSM(d)||(d=new i({_switch:e,peerInfo:h,muxer:null,conn:null}),d.once("error",e=>f(e)),d.once("connected",()=>d.protect()),d.once("private",()=>d.encrypt()),d.once("encrypted",()=>d.upgrade()),d.once("muxed",()=>{c({protocol:u,proxyConnection:m,connection:d,callback:f})}),d.once("unmuxed",()=>{c({protocol:u,proxyConnection:m,connection:d,callback:f})}));const m=new r;return m.setPeerInfo(h),a(()=>{"MUXED"===d.getState()?c({protocol:u,proxyConnection:m,connection:d,callback:f}):d.dial()}),t?d:m}}e.exports=f},function(e,t,n){"use strict";const r=n(5),i=n(1143),o=n(336);function s(e){const t=r("libp2p:switch:listener");return(n,r)=>s=>{const a=n?o(n,null,s,e.observer):s;t("received incoming connection");const u=new i({connection:a,_switch:e,transportKey:n});u.once("error",e=>t(e)),u.once("private",e=>{if(r)return r(e);u.encrypt()}),u.once("encrypted",()=>u.upgrade()),u.protect()}}e.exports=s},function(e,t,n){"use strict";const r=n(183),i=n(258),o=n(53),s=n(536);class a extends s{constructor({connection:e,_switch:t,transportKey:n}){super({_switch:t,name:`inc:${t._peerInfo.id.toB58String().slice(0,8)}`}),this.conn=e,this.theirPeerInfo=null,this.ourPeerInfo=this.switch._peerInfo,this.transportKey=n,this.protocolMuxer=this.switch.protocolMuxer(this.transportKey),this.msListener=new i.Listener,this._state=r("DIALED",{DISCONNECTED:{disconnect:"DISCONNECTED"},DIALED:{privatize:"PRIVATIZING",encrypt:"ENCRYPTING"},PRIVATIZING:{done:"PRIVATIZED",disconnect:"DISCONNECTING"},PRIVATIZED:{encrypt:"ENCRYPTING"},ENCRYPTING:{done:"ENCRYPTED",disconnect:"DISCONNECTING"},ENCRYPTED:{upgrade:"UPGRADING",disconnect:"DISCONNECTING"},UPGRADING:{done:"MUXED"},MUXED:{disconnect:"DISCONNECTING"},DISCONNECTING:{done:"DISCONNECTED"}}),this._state.on("PRIVATIZING",()=>this._onPrivatizing()),this._state.on("PRIVATIZED",()=>this._onPrivatized()),this._state.on("ENCRYPTING",()=>this._onEncrypting()),this._state.on("ENCRYPTED",()=>{this.log("successfully encrypted connection to %s",this.theirB58Id||"unknown peer"),this.emit("encrypted",this.conn)}),this._state.on("UPGRADING",()=>this._onUpgrading()),this._state.on("MUXED",()=>{this.log("successfully muxed connection to %s",this.theirB58Id||"unknown peer"),this.emit("muxed",this.conn)}),this._state.on("DISCONNECTING",()=>{this.theirPeerInfo&&this.theirPeerInfo.disconnect(),this._state("done")})}_onEncrypting(){this.log("encrypting connection via %s",this.switch.crypto.tag),this.msListener.addHandler(this.switch.crypto.tag,(e,t)=>{this.conn=this.switch.crypto.encrypt(this.ourPeerInfo.id,t,void 0,e=>{if(e)return this.close(e);this.conn.getPeerInfo((e,t)=>{this.theirPeerInfo=t,this._state("done")})})},null),this.msListener.handle(this.conn,e=>{e&&this.emit("crypto handshaking failed",e)})}_onUpgrading(){this.log("adding the protocol muxer to the connection"),this.protocolMuxer(this.conn,this.msListener),this._state("done")}}e.exports=o(a,{className:"IncomingConnectionFSM",symbolName:"libp2p-switch/IncomingConnectionFSM"})},function(e,t,n){"use strict";const r=n(258),i=n(336),o=n(5),s=o("libp2p:switch:protocol-muxer");s.error=o("libp2p:switch:protocol-muxer:error"),e.exports=function e(t,n){return e=>(o,a)=>{const u=a||new r.Listener;let l;l=e&&!a?i(e,null,o,n):o,Object.keys(t).forEach(e=>{if(!e)return;const r=(e,r)=>{s("registering handler with protocol %s",e);const o=t[e];if(o){const t=o&&o.handlerFunc;if(t){const s=i(null,e,r,n);t(o,s)}}};u.addHandler(e,r,t[e].matchFunc)}),u.handle(l,e=>{e&&s.error("multistream handshake failed",e)})}}},function(e,t,n){"use strict";const r=n(77),i=n(6);e.exports=(e=>{const t=Object.assign(new i,{incoming:n("in"),outgoing:n("out")});return e.on("peer-mux-established",e=>{t.emit("peer:connected",e.id.toB58String())}),e.on("peer-mux-closed",e=>{t.emit("peer:closed",e.id.toB58String())}),t;function n(e){return(t,n,i)=>r(r=>(o(i,t,n,e,r.length),r))}function o(e,n,r,i,o){e.then(e=>{if(e){const s=e.id.toB58String();t.emit("message",s,n,r,i,o)}})}})},function(e,t,n){"use strict";const r=n(6),i=n(1147),o=n(1150),s={computeThrottleMaxQueueSize:1e3,computeThrottleTimeout:2e3,movingAverageIntervals:[6e4,3e5,9e5],maxOldPeersRetention:50},a=["dataReceived","dataSent"],u={in:"dataReceived",out:"dataSent"};e.exports=((e,t)=>{const n=Object.assign({},s,t),l=new i(a,n),c=Object.assign(new r,{start:g,stop:y,global:l,peers:()=>Array.from(h.keys()),forPeer:e=>h.get(e)||f.get(e),transports:()=>Array.from(p.keys()),forTransport:e=>p.get(e),protocols:()=>Array.from(d.keys()),forProtocol:e=>d.get(e)});l.on("update",b);const f=o(n.maxOldPeersRetention),h=new Map,p=new Map,d=new Map;return e.on("peer:closed",e=>{const t=h.get(e);t&&(t.removeListener("update",b),t.stop(),h.delete(e),f.set(e,t))}),c;function m(e,t,r,o,s){const c=u[o];if(t){l.push(c,s);let t=h.get(e);t||(t=f.get(e),t?f.delete(e):t=new i(a,n),t.on("update",b),t.start(),h.set(e,t)),t.push(c,s)}if(t){let e=p.get(t);e||(e=new i(a,n),e.on("update",b),p.set(t,e)),e.push(c,s)}if(r){let e=d.get(r);e||(e=new i(a,n),e.on("update",b),d.set(r,e)),e.push(c,s)}}function g(){e.on("message",m),l.start();for(let e of h.values())e.start();for(let e of p.values())e.start()}function y(){e.removeListener("message",m),l.stop();for(let e of h.values())e.stop();for(let e of p.values())e.stop()}function b(){c.emit("update")}})},function(e,t,n){"use strict";const r=n(6),i=n(62),o=n(492),s=n(1148);class a extends r{constructor(e,t){super(),this._options=t,this._queue=[],this._stats={},this._frequencyLastTime=Date.now(),this._frequencyAccumulators={},this._movingAverages={},this._update=this._update.bind(this);const n=this._options.movingAverageIntervals;for(var r=0;r<e.length;r++){var s=e[r];this._stats[s]=i(0),this._movingAverages[s]={};for(var a=0;a<n.length;a++){var u=n[a],l=this._movingAverages[s][u]=o(u);l.push(this._frequencyLastTime,0)}}}start(){this._queue.length&&this._resetComputeTimeout()}stop(){this._timeout&&(this._timeout.clear(),this._timeout=null)}get snapshot(){return Object.assign({},this._stats)}get movingAverages(){return Object.assign({},this._movingAverages)}push(e,t){this._queue.push([e,t,Date.now()]),this._resetComputeTimeout()}_resetComputeTimeout(){this._timeout?this._timeout.reschedule(this._nextTimeout()):this._timeout=s(this._update,this._nextTimeout())}_nextTimeout(){const e=this._queue.length/this._options.computeThrottleMaxQueueSize,t=Math.max(this._options.computeThrottleTimeout*(1-e),0);return t}_update(){if(this._timeout=null,this._queue.length){let e;for(;this._queue.length;){const t=e=this._queue.shift();this._applyOp(t)}this._updateFrequency(e[2]),this.emit("update",this._stats)}}_updateFrequency(e){const t=e-this._frequencyLastTime;Object.keys(this._stats).forEach(n=>{this._updateFrequencyFor(n,t,e)}),this._frequencyLastTime=e}_updateFrequencyFor(e,t,n){const r=this._frequencyAccumulators[e]||0;this._frequencyAccumulators[e]=0;const i=r/t*1e3;let s=this._movingAverages[e];s||(s=this._movingAverages[e]={});const a=this._options.movingAverageIntervals;for(var u=0;u<a.length;u++){var l=a[u],c=s[l];c||(c=s[l]=o(l)),c.push(n,i)}}_applyOp(e){const t=e[0],n=e[1];if("number"!=typeof n)throw new Error("invalid increment number:",n);let r;r=this._stats.hasOwnProperty(t)?this._stats[t]:this._stats[t]=i(0),this._stats[t]=r.plus(n),this._frequencyAccumulators[t]||(this._frequencyAccumulators[t]=0),this._frequencyAccumulators[t]+=n}}e.exports=a},function(e,t,n){"use strict";var r=n(1149);function i(e,t,n){var i=this;function o(){i._rescheduled>0?(i._scheduled=i._rescheduled-(r()-i._started),i._timer=setTimeout(o,i._scheduled),i._rescheduled=0):e.apply(null,i._args)}this._started=r(),this._rescheduled=0,this._scheduled=t,this._args=n,this._timer=setTimeout(o,t)}function o(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("timeout needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new i(arguments[0],arguments[1],e)}i.prototype.reschedule=function(e){var t=r();return!(t+e-(this._started+this._scheduled)<0)&&(this._started=t,this._rescheduled=e,!0)},i.prototype.clear=function(){clearTimeout(this._timer)},e.exports=o},function(e,t,n){"use strict";e.exports=function e(){return Date.now()}},function(e,t,n){"use strict";const r=n(1151);e.exports=(e=>{const t=r(e);return t.delete=t.remove,t})},function(e,t){e.exports=function(e){if(!e)throw Error("hashlru must have a max value, of type number, greater than 0");var t=0,n=Object.create(null),r=Object.create(null);function i(i,o){n[i]=o,t++,t>=e&&(t=0,r=n,n=Object.create(null))}return{has:function(e){return void 0!==n[e]||void 0!==r[e]},remove:function(e){void 0!==n[e]&&(n[e]=void 0),void 0!==r[e]&&(r[e]=void 0)},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:i(e,t)},clear:function(){n=Object.create(null),r=Object.create(null)}}}},function(e,t,n){"use strict";const r=n(1153);t=e.exports=n(1154),t.mount=r.mount,t.unmount=r.unmount},function(e,t,n){"use strict";const r=n(12),i=n(122),o=n(337),s=o.PROTOCOL,a=o.PING_LENGTH,u=n(5),l=u("libp2p-ping");function c(e){e.handle(s,(e,t)=>{const n=i({timeout:0}),o=n.handshake;function s(){o.read(a,(e,t)=>{if(!0!==e)return e?l.error(e):(o.write(t),s())})}r(t,n,t),s()})}function f(e){e.unhandle(s)}l.error=u("libp2p-ping:error"),t=e.exports,t.mount=c,t.unmount=f},function(e,t,n){"use strict";const r=n(6).EventEmitter,i=n(12),o=n(106),s=n(122),a=n(337),u=n(1155),l=u.rnd,c=n(5),f=c("libp2p-ping");f.error=c("libp2p-ping:error");const h=a.PROTOCOL,p=a.PING_LENGTH;class d extends r{constructor(e,t){super(),this._stopped=!1,this.peer=t,this.swarm=e}start(){f("dialing %s to %s",h,this.peer.id.toB58String()),this.swarm.dial(this.peer,h,(e,t)=>{if(e)return this.emit("error",e);const n=s({timeout:0});this.shake=n.handshake,i(n,t,n);const r=this;function o(){let e=new Date,t=l(p);r.shake.write(t),r.shake.read(p,(n,i)=>{let s=new Date;if(n||!t.equals(i)){const e=new Error("Received wrong ping ack");return r.emit("error",e)}r.emit("ping",s-e),r._stopped||o()})}o()})}stop(){!this._stopped&&this.shake&&(this._stopped=!0,i(o(),this.shake.rest()))}}e.exports=d},function(e,t,n){"use strict";const r=n(64),i=n(337);t=e.exports,t.rnd=(e=>(e||(e=i.PING_LENGTH),r.randomBytes(e)))},function(e,t,n){"use strict";const r=n(6),i=n(1157).default,o=n(1162)("libp2p:connection-manager"),s={maxPeers:1/0,minPeers:0,maxData:1/0,maxSentData:1/0,maxReceivedData:1/0,maxEventLoopDelay:1/0,pollInterval:2e3,movingAverageInterval:6e4,defaultPeerValue:1};class a extends r{constructor(e,t){if(super(),this._libp2p=e,this._options=Object.assign({},s,t),this._options.maxPeersPerProtocol=l(this._options.maxPeersPerProtocol),o("options: %j",this._options),this._stats=e.stats,t&&!this._stats)throw new Error("No libp2p.stats");this._peerValues=new Map,this._peers=new Map,this._peerProtocols=new Map,this._peerCountPerProtocol=new Map,this._onStatsUpdate=this._onStatsUpdate.bind(this),this._onPeerConnect=this._onPeerConnect.bind(this),this._onPeerDisconnect=this._onPeerDisconnect.bind(this),this._libp2p.isStarted()?this._onceStarted():this._libp2p.once("start",this._onceStarted.bind(this))}start(){this._stats.on("update",this._onStatsUpdate),this._libp2p.on("peer:connect",this._onPeerConnect),this._libp2p.on("peer:disconnect",this._onPeerDisconnect),this._latencyMonitor=new i({dataEmitIntervalMs:this._options.pollInterval}),this._onLatencyMeasure=this._onLatencyMeasure.bind(this),this._latencyMonitor.on("data",this._onLatencyMeasure)}stop(){this._stats.removeListener("update",this._onStatsUpdate),this._libp2p.removeListener("peer:connect",this._onPeerConnect),this._libp2p.removeListener("peer:disconnect",this._onPeerDisconnect),this._latencyMonitor.removeListener("data",this._onLatencyMeasure)}setPeerValue(e,t){if(t<0||t>1)throw new Error("value should be a number between 0 and 1");e.toB58String&&(e=e.toB58String()),this._peerValues.set(e,t)}_onceStarted(){this._peerId=this._libp2p.peerInfo.id.toB58String()}_onStatsUpdate(){const e=this._stats.global.movingAverages,t=e.dataReceived[this._options.movingAverageInterval].movingAverage();this._checkLimit("maxReceivedData",t);const n=e.dataSent[this._options.movingAverageInterval].movingAverage();this._checkLimit("maxSentData",n);const r=t+n;this._checkLimit("maxData",r),o("stats update",r)}_onPeerConnect(e){const t=e.id.toB58String();o("%s: connected to %s",this._peerId,t),this._peerValues.set(t,this._options.defaultPeerValue),this._peers.set(t,e),this.emit("connected",t),this._checkLimit("maxPeers",this._peers.size),c(e).forEach(e=>{const n=this._peerCountPerProtocol[e];n||(this._peerCountPerProtocol[e]=0),this._peerCountPerProtocol[e]++;let r=this._peerProtocols[t];r||(r=this._peerProtocols[t]=new Set),r.add(e),this._checkProtocolMaxPeersLimit(e,this._peerCountPerProtocol[e])})}_onPeerDisconnect(e){const t=e.id.toB58String();o("%s: disconnected from %s",this._peerId,t),this._peerValues.delete(t),this._peers.delete(t);const n=this._peerProtocols[t];n&&Array.from(n).forEach(e=>{const t=this._peerCountPerProtocol[e];t&&this._peerCountPerProtocol[e]--}),this.emit("disconnected",t)}_onLatencyMeasure(e){this._checkLimit("maxEventLoopDelay",e.avgMs)}_checkLimit(e,t){o("checking limit. current value of %s is %d",e,t);const n=this._options[e];t>n&&(o("%s: limit exceeded: %s, %d",this._peerId,e,t),this.emit("limit:exceeded",e,t),this._maybeDisconnectOne())}_checkProtocolMaxPeersLimit(e,t){o("checking protocol limit. current value of %s is %d",e,t);const n=this._options.maxPeersPerProtocol[e];t>n&&(o("%s: protocol max peers limit exceeded: %s, %d",this._peerId,e,t),this.emit("limit:exceeded",e,t),this._maybeDisconnectOne())}_maybeDisconnectOne(){if(this._options.minPeers<this._peerValues.size){const e=Array.from(this._peerValues).sort(u);o("%s: sorted peer values: %j",this._peerId,e);const t=e[0];if(t){const e=t[0];o("%s: lowest value peer is %s",this._peerId,e),o("%s: forcing disconnection from %j",this._peerId,e),this._disconnectPeer(e)}}}_disconnectPeer(e){o("preemptively disconnecting peer",e),this.emit("%s: disconnect:preemptive",this._peerId,e);const t=this._peers.get(e);this._libp2p.hangUp(t,e=>{e&&this.emit("error",e)})}}function u(e,t){return e[1]-t[1]}function l(e){return e||(e={}),Object.keys(e).forEach(t=>{const n=e[t];delete e[t],e[t.toLowerCase()]=n}),e}function c(e){const t=new Set;return e.multiaddrs.forEach(e=>{e.protos().map(f).forEach(e=>{t.add(e)})}),Array.from(t)}function f(e){return e.name.toLowerCase()}e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=n(1158).default},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6),o=h(i),s=n(244),a=h(s),u=n(172),l=h(u),c=n(1159),f=h(c);function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=n(540)("latency-monitor:LatencyMonitor"),y=function(t){function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.latencyCheckIntervalMs,i=t.dataEmitIntervalMs,o=t.asyncTestFn,s=t.latencyRandomPercentage;p(this,n);var u=d(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),l=u;return l.latencyCheckIntervalMs=r||500,l.latencyRandomPercentage=s||10,l._latecyCheckMultiply=l.latencyRandomPercentage/100*2*l.latencyCheckIntervalMs,l._latecyCheckSubtract=l._latecyCheckMultiply/2,l.dataEmitIntervalMs=null===i||0===i?void 0:i||5e3,g("latencyCheckIntervalMs: %s dataEmitIntervalMs: %s",l.latencyCheckIntervalMs,l.dataEmitIntervalMs),l.dataEmitIntervalMs?g("Expecting ~%s events per summary",l.latencyCheckIntervalMs/l.dataEmitIntervalMs):g("Not emitting summaries"),l.asyncTestFn=o,e&&e.hrtime?(g("Using process.hrtime for timing"),l.now=e.hrtime,l.getDeltaMS=function(e){var t=l.now(e);return 1e3*t[0]+t[1]/1e6}):"undefined"!=typeof window&&(0,a.default)(window,"performance.now")?(g("Using performance.now for timing"),l.now=window.performance.now.bind(window.performance),l.getDeltaMS=function(e){return Math.round(l.now()-e)}):(g("Using Date.now for timing"),l.now=Date.now,l.getDeltaMS=function(e){return l.now()-e}),l._latencyData=l._initLatencyData(),b()&&(l._visibilityChangeEmitter=new f.default,l._visibilityChangeEmitter.on("visibilityChange",function(e){e?l._startTimers():(l._emitSummary(),l._stopTimers())})),l._visibilityChangeEmitter&&!l._visibilityChangeEmitter.isVisible()||l._startTimers(),u}return m(n,t),r(n,[{key:"_startTimers",value:function e(){var t=this;this._checkLatencyID||(this._checkLatency(),this.dataEmitIntervalMs&&(this._emitIntervalID=setInterval(function(){return t._emitSummary()},this.dataEmitIntervalMs),(0,l.default)(this._emitIntervalID.unref)&&this._emitIntervalID.unref()))}},{key:"_stopTimers",value:function e(){this._checkLatencyID&&(clearTimeout(this._checkLatencyID),this._checkLatencyID=void 0),this._emitIntervalID&&(clearInterval(this._emitIntervalID),this._emitIntervalID=void 0)}},{key:"_emitSummary",value:function e(){var t=this.getSummary();t.events>0&&this.emit("data",t)}},{key:"getSummary",value:function e(){var t={events:this._latencyData.events,minMs:this._latencyData.minMs,maxMs:this._latencyData.maxMs,avgMs:this._latencyData.events?this._latencyData.totalMs/this._latencyData.events:Number.POSITIVE_INFINITY,lengthMs:this.getDeltaMS(this._latencyData.startTime)};return this._latencyData=this._initLatencyData(),g("Summary: %O",t),t}},{key:"_checkLatency",value:function e(){var t=this,n=this,r=Math.random()*n._latecyCheckMultiply-n._latecyCheckSubtract,i={deltaOffset:Math.ceil(n.latencyCheckIntervalMs+r),startTime:n.now()},o=function e(){if(t._checkLatencyID){var r=n.getDeltaMS(i.startTime)-i.deltaOffset;n._checkLatency(),n._latencyData.events++,n._latencyData.minMs=Math.min(n._latencyData.minMs,r),n._latencyData.maxMs=Math.max(n._latencyData.maxMs,r),n._latencyData.totalMs+=r,g("MS: %s Data: %O",r,n._latencyData)}};g("localData: %O",i),this._checkLatencyID=setTimeout(function(){n.asyncTestFn?(i.deltaOffset=0,i.startTime=n.now(),n.asyncTestFn(o)):(i.deltaOffset-=1,o())},i.deltaOffset),(0,l.default)(this._checkLatencyID.unref)&&this._checkLatencyID.unref()}},{key:"_initLatencyData",value:function e(){return{startTime:this.now(),minMs:Number.POSITIVE_INFINITY,maxMs:Number.NEGATIVE_INFINITY,events:0,totalMs:0}}}]),n}(o.default);function b(){return"undefined"!=typeof window}t.default=y}).call(this,n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6),o=s(i);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=n(540)("latency-monitor:VisibilityChangeEmitter"),f=function(e){function t(){a(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return"undefined"==typeof document?(c('This is not a browser, no "document" found. Stopping.'),u(e)):(e._initializeVisibilityVarNames(),e._addVisibilityChangeListener(),e)}return l(t,e),r(t,[{key:"_initializeVisibilityVarNames",value:function e(){var t=void 0,n=void 0;void 0!==document.hidden?(t="hidden",n="visibilitychange"):void 0!==document.mozHidden?(t="mozHidden",n="mozvisibilitychange"):void 0!==document.msHidden?(t="msHidden",n="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",n="webkitvisibilitychange"),this._hidden=t,this._visibilityChange=n}},{key:"_addVisibilityChangeListener",value:function e(){void 0===document.addEventListener||void 0===document[this._hidden]?c("Checking page visibility requires a browser that supports the Page Visibility API."):document.addEventListener(this._visibilityChange,this._handleVisibilityChange.bind(this),!1)}},{key:"isVisible",value:function e(){if(void 0!==this._hidden&&void 0!==document[this._hidden])return!document[this._hidden]}},{key:"_handleVisibilityChange",value:function e(){var t=!document[this._hidden];c(t?"Page Visible":"Page Hidden"),this.emit("visibilityChange",t)}}]),t}(o.default);t.default=f},function(e,t,n){var r;function i(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function o(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=n.log||t.log||console.log.bind(console);l.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=i(e),"function"==typeof t.init&&t.init(n),n}function s(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function u(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o.debug=o.default=o,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1161),t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1163)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){"use strict";const r=n(332),i=n(22);e.exports=(e=>{const t=e._modules.peerRouting||[];return e._dht&&t.unshift(e._dht),{findPeer:(e,n,o)=>{"function"==typeof n&&(o=n,n={}),t.length||o(i(new Error("No peer routers available"),"NO_ROUTERS_AVAILABLE"));const s=t.map(t=>r=>t.findPeer(e,n,(e,t)=>e?r(e):t&&0!==Object.keys(t).length?void r(null,t):r(i(new Error("not found"),"NOT_FOUND"),null)));r(s,(e,t)=>{if(e&&"NOT_FOUND"!==e.code)return o(e);t=t||[],o(null,t)})}}})},function(e,t,n){"use strict";const r=n(332),i=n(54),o=n(22);e.exports=(e=>{const t=e._modules.contentRouting||[];return e._dht&&t.unshift(e._dht),{findProviders:(e,n,i)=>{if("function"==typeof n?(i=n,n={}):"number"==typeof n&&(n={maxTimeout:n}),!t.length)return i(o(new Error("No content routers available"),"NO_ROUTERS_AVAILABLE"));const s=t.map(t=>r=>t.findProviders(e,n,(e,t)=>e?r(e):t&&0!==Object.keys(t).length?void r(null,t):r(o(new Error("not found"),"NOT_FOUND"),null)));r(s,(e,t)=>{if(e&&"NOT_FOUND"!==e.code)return i(e);t=t||[],i(null,t)})},provide:(e,n)=>{if(!t.length)return n(o(new Error("No content routers available"),"NO_ROUTERS_AVAILABLE"));i(t.map(t=>n=>t.provide(e,n)),n)}}})},function(e,t,n){"use strict";e.exports=(e=>({put:(t,n,r)=>{if(!e._dht)return r(new Error("DHT is not available"));e._dht.put(t,n,r)},get:(t,n,r)=>{if("function"==typeof n&&(r=n,n={}),!e._dht)return r(new Error("DHT is not available"));e._dht.get(t,n,r)},getMany:(t,n,r,i)=>{if("function"==typeof r&&(i=r,r={}),!e._dht)return i(new Error("DHT is not available"));e._dht.getMany(t,n,r,i)}}))},function(e,t,n){"use strict";(function(t){const r=n(14),i=n(1168).NOT_STARTED_YET,o=n(1169);e.exports=(e=>{const n=new o(e);return e._floodSub=n,{subscribe:(t,o,s,a)=>{if("function"==typeof o&&(a=s,s=o,o={}),!e.isStarted()&&!n.started)return r(()=>a(new Error(i)));function u(e){0===n.listenerCount(t)&&n.subscribe(t),n.on(t,s),r(e)}u(a)},unsubscribe:(t,r)=>{if(!e.isStarted()&&!n.started)throw new Error(i);n.removeListener(t,r),0===n.listenerCount(t)&&n.unsubscribe(t)},publish:(o,s,a)=>e.isStarted()||n.started?t.isBuffer(s)?(n.publish(o,s),void r(()=>a())):r(()=>a(new Error("data must be a Buffer"))):r(()=>a(new Error(i))),ls:t=>{if(!e.isStarted()&&!n.started)return r(()=>t(new Error(i)));const o=Array.from(n.subscriptions);r(()=>t(null,o))},peers:(t,o)=>{if(!e.isStarted()&&!n.started)return r(()=>o(new Error(i)));"function"==typeof t&&(o=t,t=null);const s=Array.from(n.peers.values()).filter(e=>!t||e.topics.has(t)).map(e=>e.info.id.toB58String());r(()=>o(null,s))},setMaxListeners:e=>n.setMaxListeners(e)}})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";t.NOT_STARTED_YET="The libp2p node is not started yet"},function(e,t,n){"use strict";const r=n(541),i=n(26),o=n(72),s=n(18),a=n(542),{message:u}=n(542),l=n(1175),c=n(1176),f=c.multicodec,h=l.ensureArray,p=n(14);class d extends a{constructor(e){super("libp2p:floodsub",f,e),this.cache=new r,this.subscriptions=new Set}_onDial(e,t,n){super._onDial(e,t,t=>{if(t)return n(t);const r=e.id.toB58String(),i=this.peers.get(r);i&&i.isWritable&&i.sendSubscriptions(this.subscriptions),p(()=>n())})}_processConnection(e,t,n){i(t,o.decode(),i.map(e=>u.rpc.RPC.decode(e)),i.drain(t=>this._onRpc(e,t),t=>this._onConnectionEnd(e,n,t)))}_onRpc(e,t){if(!t)return;this.log("rpc from",e);const n=t.subscriptions,r=t.msgs;if(r&&r.length&&this._processRpcMessages(l.normalizeInRpcMessages(t.msgs)),n&&n.length){const t=this.peers.get(e);t&&(t.updateSubscriptions(n),this.emit("floodsub:subscription-change",t.info,t.topics,n))}}_processRpcMessages(e){e.forEach(e=>{const t=l.msgId(e.from,e.seqno);this.cache.has(t)||(this.cache.put(t),this._emitMessages(e.topicIDs,[e]),this._forwardMessages(e.topicIDs,[e]))})}_emitMessages(e,t){e.forEach(e=>{this.subscriptions.has(e)&&t.forEach(t=>{this.emit(e,t)})})}_forwardMessages(e,t){this.peers.forEach(n=>{n.isWritable&&l.anyMatch(n.topics,e)&&(n.sendMessages(l.normalizeOutRpcMessages(t)),this.log("publish msgs on topics",e,n.info.id.toB58String()))})}stop(e){super.stop(t=>{if(t)return e(t);this.subscriptions=new Set,e()})}publish(e,t){s(this.started,"FloodSub is not started"),this.log("publish",e,t),e=h(e),t=h(t);const n=this.libp2p.peerInfo.id.toB58String(),r=t=>{const r=l.randomSeqno();return this.cache.put(l.msgId(n,r)),{from:n,data:t,seqno:r,topicIDs:e}},i=t.map(r);this._emitMessages(e,i),this._forwardMessages(e,i)}subscribe(e){function t(n){if(n&&n.isWritable)return n.sendSubscriptions(e);const r=()=>{n.removeListener("connection",r),t(n)};n.on("connection",r),n.once("close",()=>n.removeListener("connection",r))}s(this.started,"FloodSub is not started"),e=h(e),e.forEach(e=>this.subscriptions.add(e)),this.peers.forEach(e=>t(e))}unsubscribe(e){function t(n){n&&n.isWritable?n.sendUnsubscriptions(e):p(t.bind(n))}this.started&&(e=h(e),e.forEach(e=>this.subscriptions.delete(e)),this.peers.forEach(e=>t(e)))}}e.exports=d},function(e,t,n){(function(t){var n="Expected a function",r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,f="object"==typeof self&&self&&self.Object===Object&&self,h=c||f||Function("return this")(),p=Object.prototype,d=p.toString,m=Math.max,g=Math.min,y=function(){return h.Date.now()};function b(e,t,r){var i,o,s,a,u,l,c=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(n);function d(t){var n=i,r=o;return i=o=void 0,c=t,a=e.apply(r,n),a}function b(e){return c=e,u=setTimeout(k,t),f?d(e):a}function v(e){var n=e-l,r=e-c,i=t-n;return h?g(i,s-r):i}function _(e){var n=e-l,r=e-c;return void 0===l||n>=t||n<0||h&&r>=s}function k(){var e=y();if(_(e))return E(e);u=setTimeout(k,v(e))}function E(e){return u=void 0,p&&i?d(e):(i=o=void 0,a)}function x(){void 0!==u&&clearTimeout(u),c=0,i=l=o=u=void 0}function C(){return void 0===u?a:E(y())}function A(){var e=y(),n=_(e);if(i=arguments,o=this,l=e,n){if(void 0===u)return b(l);if(h)return u=setTimeout(k,t),d(l)}return void 0===u&&(u=setTimeout(k,t)),a}return t=S(t)||0,w(r)&&(f=!!r.leading,h="maxWait"in r,s=h?m(S(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),A.cancel=x,A.flush=C,A}function v(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(n);return w(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),b(e,t,{leading:i,maxWait:t,trailing:o})}function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){return!!e&&"object"==typeof e}function k(e){return"symbol"==typeof e||_(e)&&d.call(e)==i}function S(e){if("number"==typeof e)return e;if(k(e))return r;if(w(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=w(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?r:+e}e.exports=v}).call(this,n(8))},function(e,t,n){"use strict";const r=n(72),i=n(73),o=n(26),s=n(14),a=n(6),u=n(543).rpc.RPC;class l extends a{constructor(e){super(),this.info=e,this.conn=null,this.topics=new Set,this.stream=null,this._references=0}get isConnected(){return Boolean(this.conn)}get isWritable(){return Boolean(this.stream)}write(e){if(!this.isWritable){const e=this.info.id.toB58String();throw new Error("No writable connection to "+e)}this.stream.push(e)}attachConnection(e){this.conn=e,this.stream=new i,o(this.stream,r.encode(),e,o.onEnd(()=>{this.conn=null,this.stream=null,this.emit("close")})),this.emit("connection")}_sendRawSubscriptions(e,t){if(0===e.size)return;const n=[];e.forEach(e=>{n.push({subscribe:t,topicID:e})}),this.write(u.encode({subscriptions:n}))}sendSubscriptions(e){this._sendRawSubscriptions(e,!0)}sendUnsubscriptions(e){this._sendRawSubscriptions(e,!1)}sendMessages(e){this.write(u.encode({msgs:e}))}updateSubscriptions(e){e.forEach(e=>{e.subscribe?this.topics.add(e.topicID):this.topics.delete(e.topicID)})}close(e){this._references=1,this.stream&&this.stream.end(),s(()=>{this.conn=null,this.stream=null,this.emit("close"),e()})}}e.exports=l},function(e,t,n){"use strict";e.exports="\nmessage RPC {\n repeated SubOpts subscriptions = 1;\n repeated Message msgs = 2;\n\n message SubOpts {\n optional bool subscribe = 1; // subscribe or unsubcribe\n optional string topicID = 2;\n }\n\n message Message {\n optional bytes from = 1;\n optional bytes data = 2;\n optional bytes seqno = 3;\n repeated string topicIDs = 4; \n }\n}"},function(e,t,n){"use strict";e.exports="\n// topicCID = cid(merkledag_protobuf(topicDescriptor)); (not the topic.name)\nmessage TopicDescriptor {\n optional string name = 1;\n optional AuthOpts auth = 2;\n optional EncOpts enc = 2;\n\n message AuthOpts {\n optional AuthMode mode = 1;\n repeated bytes keys = 2; // root keys to trust\n\n enum AuthMode {\n NONE = 0; // no authentication, anyone can publish\n KEY = 1; // only messages signed by keys in the topic descriptor are accepted\n WOT = 2; // web of trust, certificates can allow publisher set to grow\n }\n }\n\n message EncOpts {\n optional EncMode mode = 1;\n repeated bytes keyHashes = 2; // the hashes of the shared keys used (salted)\n\n enum EncMode {\n NONE = 0; // no encryption, anyone can read\n SHAREDKEY = 1; // messages are encrypted with shared key\n WOT = 2; // web of trust, certificates can allow publisher set to grow\n }\n }\n}"},function(e,t,n){"use strict";(function(r){const i=n(64),o=n(76);t=e.exports,t.randomSeqno=(()=>i.randomBytes(20)),t.msgId=((e,t)=>e+t.toString("hex")),t.anyMatch=((e,t)=>{let n;n=Array.isArray(t)?e=>t.indexOf(e)>-1:e=>t.has(e);for(let t of e)if(n(t))return!0;return!1}),t.ensureArray=(e=>Array.isArray(e)?e:[e]),t.normalizeInRpcMessages=(e=>e?e.map(e=>{const t=Object.assign({},e);return r.isBuffer(e.from)&&(t.from=o.encode(e.from)),t}):e),t.normalizeOutRpcMessages=(e=>e?e.map(e=>{const t=Object.assign({},e);return("string"==typeof e.from||e.from instanceof String)&&(t.from=o.decode(e.from)),t}):e)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(64),o=n(76);t=e.exports,t.randomSeqno=(()=>i.randomBytes(20)),t.msgId=((e,t)=>e+t.toString("hex")),t.anyMatch=((e,t)=>{let n;n=Array.isArray(t)?e=>t.indexOf(e)>-1:e=>t.has(e);for(let t of e)if(n(t))return!0;return!1}),t.ensureArray=(e=>Array.isArray(e)?e:[e]),t.normalizeInRpcMessages=(e=>e?e.map(e=>{const t=Object.assign({},e);return r.isBuffer(e.from)&&(t.from=o.encode(e.from)),t}):e),t.normalizeOutRpcMessages=(e=>e?e.map(e=>{const t=Object.assign({},e);return("string"==typeof e.from||e.from instanceof String)&&(t.from=o.decode(e.from)),t}):e)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(5),i=r("libp2p:floodsub");i.err=r("libp2p:floodsub:error"),e.exports={log:i,multicodec:"/floodsub/1.0.0"}},function(e,t,n){"use strict";const r=n(23),i=n(44),o=n(24),s=n(22);e.exports=(e=>(function(t,n){let a;if(i.isPeerInfo(t))a=t;else if(o.isMultiaddr(t)||"string"==typeof t){if("string"==typeof t)try{t=o(t)}catch(e){return n(s(e,"ERR_INVALID_MULTIADDR"))}const u=t.getPeerId();if(!u)return n(s(new Error("peer multiaddr instance or string must include peerId"),"ERR_INVALID_MULTIADDR"));try{a=e.peerBook.get(u)}catch(e){a=new i(r.createFromB58String(u))}a.multiaddrs.add(t)}else{if(!r.isPeerId(t))return n(s(new Error(`${a} is not a valid peer type`),"ERR_INVALID_PEER_TYPE"));{const r=t.toB58String();try{a=e.peerBook.get(r)}catch(r){return e.peerRouting.findPeer(t,n)}}}n(null,a)}))},function(e,t,n){"use strict";const r=n(485),i=r.alternatives().try(r.func(),r.object()),o=r.object({connectionManager:r.object(),datastore:r.object(),peerInfo:r.object().required(),peerBook:r.object(),modules:r.object().keys({connEncryption:r.array().items(i).allow(null),connProtector:r.object().keys({protect:r.func().required()}).unknown(),contentRouting:r.array().items(r.object()).allow(null),dht:i.allow(null),peerDiscovery:r.array().items(i).allow(null),peerRouting:r.array().items(r.object()).allow(null),streamMuxer:r.array().items(i).allow(null),transport:r.array().items(i).min(1).required()}).required(),config:r.object().keys({peerDiscovery:r.object().allow(null),relay:r.object().keys({enabled:r.boolean().default(!0),hop:r.object().keys({enabled:r.boolean().default(!1),active:r.boolean().default(!1)})}).default(),dht:r.object().keys({kBucketSize:r.number().default(20),enabledDiscovery:r.boolean().default(!0),validators:r.object().allow(null),selectors:r.object().allow(null)}).default(),EXPERIMENTAL:r.object().keys({dht:r.boolean().default(!1),pubsub:r.boolean().default(!1)}).default()}).default()});e.exports.validate=(e=>(e=r.attempt(e,o),e.config.EXPERIMENTAL.dht&&r.assert(e.modules.dht,i.required()),e))},function(e,t,n){"use strict";const r=n(40),i=n(3);e.exports=(e=>i(t=>{if(t=t||function e(){},e.log("stop"),"stopped"===e.state.state())return t(new Error("Already stopped"));if("running"!==e.state.state())return t(new Error("Not able to stop from state: "+e.state.state()));const n=n=>{if(n)return e.emit("error",n),t(n);e.state.stopped(),e.emit("stop"),t()};e.state.stop(),e._blockService.unsetExchange(),e._bitswap.stop(),e._preload.stop(),r([t=>e._ipns.republisher.stop(t),t=>e._mfsPreload.stop(t),t=>{const n=e.libp2p;e.libp2p=null,n.stop(t)},t=>e._repo.close(t)],n)}))},function(e,t,n){"use strict";e.exports=function e(t){return()=>Boolean(t._bitswap&&t.libp2p&&t.libp2p.isStarted())}},function(e,t,n){"use strict";const r=n(544),i=n(3);e.exports=function e(t){return i((e,n)=>{"function"==typeof e&&(n=e,e={}),t.repo.version((e,t)=>{if(e)return n(e);n(null,{version:r.version,repo:t,commit:""})})})}},function(e,t,n){"use strict";const r=n(3),i=n(14),o=n(544).version;e.exports=function e(t){return r((e,n)=>{"function"==typeof e&&(n=e,e={}),i(()=>n(null,{id:t._peerInfo.id.toB58String(),publicKey:t._peerInfo.id.pubKey.bytes.toString("base64"),addresses:t._peerInfo.multiaddrs.toArray().map(e=>e.toString()).filter(e=>e.indexOf("ipfs")>=0).sort(),agentVersion:`js-ipfs/${o}`,protocolVersion:"9000"}))})}},function(e,t,n){"use strict";(function(t){const r=n(23),i=n(11),o=n(54),s=n(3),a=n(181),u=n(546),l=n(486),{DAGNode:c}=n(38),f=n(48),h=n(497),p=n(500),d=n(1185);e.exports=function e(n){return s((e,s)=>{"function"==typeof e&&(s=e,e={});const m=(e,t)=>{if(e)return n.emit("error",e),s(e);n.preStart(e=>{if(e)return n.emit("error",e),s(e);n.state.initialized(),n.emit("init"),s(null,t)})};if("uninitialized"!==n.state.state())return m(new Error("Not able to init from state: "+n.state.state()));if(n.state.init(),n.log("init"),e.repo)return n._repo=e.repo,m(null,!0);e.emptyRepo=e.emptyRepo||!1,e.bits=Number(e.bits)||2048,e.log=e.log||function(){};const g=a(n._options.config,u());let y;i([e=>n._repo.exists(e),(i,o)=>{if(n.log("repo exists?",i),!0===i)return o(new Error("repo already exists"));e.privateKey?(n.log("using user-supplied private-key"),"object"==typeof e.privateKey?o(null,e.privateKey):r.createFromPrivKey(t.from(e.privateKey,"base64"),o)):(e.log(`generating ${e.bits}-bit RSA keypair...`,!1),n.log("generating peer id: %s bits",e.bits),r.create({bits:e.bits},o))},(t,r)=>{n.log("identity generated"),g.Identity={PeerID:t.toB58String(),PrivKey:t.privKey.bytes.toString("base64")},y=t.privKey,e.pass&&(g.Keychain=l.generateOptions()),e.log("done"),e.log("peer identity: "+g.Identity.PeerID),n._repo.init(g,r)},(e,t)=>n._repo.open(t),t=>{if(n.log("repo opened"),e.pass){n.log("creating keychain");const r=Object.assign({passPhrase:e.pass},g.Keychain);n._keychain=new l(n._repo.keys,r),n._keychain.importPeer("self",{privKey:y},t)}else t(null,!0)},(e,t)=>{const r=new p(n._repo);n._ipns=new h(r,n._repo.datastore,n._peerInfo,n._keychain,n._options),t(null,!0)},(t,r)=>{if(e.emptyRepo)return r(null,!0);const s=[e=>{i([e=>c.create(new f("directory").marshal(),e),(e,t)=>n.dag.put(e,{version:0,format:"dag-pb",hashAlg:"sha2-256"},t),(e,t)=>n._ipns.initializeKeyspace(y,e.toBaseEncodedString(),t)],e)}];"function"==typeof d&&s.push(t=>d(n,e.log,t)),n.log("adding assets"),o(s,e=>{e?r(e):r(null,!0)})}],m)})}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports="message Data {\n enum DataType {\n Raw = 0;\n Directory = 1;\n File = 2;\n Metadata = 3;\n Symlink = 4;\n HAMTShard = 5;\n }\n\n required DataType Type = 1;\n optional bytes Data = 2;\n optional uint64 filesize = 3;\n repeated uint64 blocksizes = 4;\n\n optional uint64 hashType = 5;\n optional uint64 fanout = 6;\n}\n\nmessage Metadata {\n optional string MimeType = 1;\n}"},function(e,t){},function(e,t,n){"use strict";const r=n(546),i=n(91).IPFS.matches,o=n(3);function s(e){try{return i(e)}catch(e){return!1}}function a(e){return new Error(`${e} is not a valid Multiaddr`)}e.exports=function e(t){return{list:o(e=>{t._repo.config.get((t,n)=>{if(t)return e(t);e(null,{Peers:n.Bootstrap})})}),add:o((e,n,i)=>{if("function"==typeof n&&(i=n,n={default:!1}),e&&!s(e))return setImmediate(()=>i(a(e)));t._repo.config.get((o,s)=>{if(o)return i(o);n.default?s.Bootstrap=r().Bootstrap:e&&-1===s.Bootstrap.indexOf(e)&&s.Bootstrap.push(e),t._repo.config.set(s,t=>{if(t)return i(t);i(null,{Peers:n.default?r().Bootstrap:[e]})})})}),rm:o((e,n,r)=>{if("function"==typeof n&&(r=n,n={all:!1}),e&&!s(e))return setImmediate(()=>r(a(e)));t._repo.config.get((i,o)=>{if(i)return r(i);n.all?o.Bootstrap=[]:o.Bootstrap=o.Bootstrap.filter(t=>t!==e),t._repo.config.set(o,t=>{if(t)return r(t);const i=[];!n.all&&e&&i.push(e),r(null,{Peers:i})})})})}}},function(e,t,n){"use strict";const r=n(3);e.exports=function e(t){return{get:r((e,n)=>("function"==typeof e&&(n=e,e=void 0),t._repo.config.get(e,n))),set:r((e,n,r)=>{t._repo.config.set(e,n,r)}),replace:r((e,n)=>{t._repo.config.set(e,n)})}}},function(e,t,n){"use strict";const r=n(137),i=n(58),o=n(9),s=n(11),a=n(14),u=n(3),l=n(22);function c(e){return o.isCID(e)?e:new o(e)}e.exports=function e(t){return{get:u((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};try{e=c(e)}catch(e){return a(()=>r(l(e,"ERR_INVALID_CID")))}!1!==n.preload&&t._preload(e),t._blockService.get(e,r)}),put:u((e,n,a)=>{if(a=a||function e(){},"function"==typeof n&&(a=n,n={}),n=n||{},Array.isArray(e))return a(new Error("Array is not supported"));s([t=>{if(r.isBlock(e))return t(null,e);if(n.cid&&o.isCID(n.cid))return t(null,new r(e,n.cid));const s=n.mhtype||"sha2-256",a=n.format||"dag-pb";let u;u=null==n.version?"sha2-256"===s&&"dag-pb"===a?0:1:n.version,i(e,s,(n,i)=>{if(n)return t(n);let s;try{s=new o(u,a,i)}catch(n){return t(n)}t(null,new r(e,s))})},(e,r)=>t._blockService.put(e,i=>{if(i)return r(i);!1!==n.preload&&t._preload(e.cid),r(null,e)})],a)}),rm:u((e,n)=>{try{e=c(e)}catch(e){return a(()=>n(l(e,"ERR_INVALID_CID")))}t._blockService.delete(e,n)}),stat:u((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};try{e=c(e)}catch(e){return a(()=>r(l(e,"ERR_INVALID_CID")))}!1!==n.preload&&t._preload(e),t._blockService.get(e,(t,n)=>{if(t)return r(t);r(null,{key:e.toString(),size:n.data.length})})})}}},function(e,t,n){"use strict";(function(t){const r=n(11),i=n(54),o=n(14),s=n(3),a=n(38),u=a.DAGNode,l=a.DAGLink,c=n(9),f=n(35),h=n(48),p=n(22);function d(e,n){if("string"==typeof e)return"base58"!==n&&n?t.from(e,n):e;if(t.isBuffer(e))return e;if(c.isCID(e))return e.buffer;throw new Error("unsupported multihash")}function m(e,t,n){switch(t){case"json":return g(e,n);case"protobuf":return y(e,n);default:n(new Error(`unkown encoding: ${t}`))}}function g(e,n){let r,i;try{const o=JSON.parse(e.toString());i=(o.Links||[]).map(e=>new l(e.Name||e.name,e.Size||e.size,f.fromB58String(e.Hash||e.hash||e.multihash))),r=t.from(o.Data)}catch(e){return n(new Error("failed to parse JSON: "+e))}u.create(r,i,n)}function y(e,t){a.util.deserialize(e,t)}e.exports=function e(n){function f(e){return(t,i,o)=>{"function"==typeof i&&(o=i,i={}),i=i||{},r([e=>{n.object.get(t,i,e)},(t,r)=>{e(t,(e,t)=>{if(e)return r(e);n._ipld.put(t,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(e,t)=>{if(e)return r(e);!1!==i.preload&&n._preload(t),r(null,t)})})}],o)}}return{new:s((e,r,i)=>{let s;if("function"==typeof e&&(i=e,e=void 0,r={}),"function"==typeof r&&(i=r,r={}),r=r||{},e){if("unixfs-dir"!==e)return o(()=>i(new Error("unknown template")));s=new h("directory").marshal()}else s=t.alloc(0);u.create(s,(e,t)=>{if(e)return i(e);n._ipld.put(t,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(e,t)=>{if(e)return i(e);!1!==r.preload&&n._preload(t),i(null,t)})})}),put:s((e,r,i)=>{"function"==typeof r&&(i=r,r={}),r=r||{};const o=r.enc;let s;if(t.isBuffer(e))o?m(e,o,(e,t)=>{if(e)return i(e);s=t,a()}):u.create(e,(e,t)=>{if(e)return i(e);s=t,a()});else if(u.isDAGNode(e))s=e,a();else{if("object"!=typeof e)return i(new Error("obj not recognized"));u.create(e.Data,e.Links,(e,t)=>{if(e)return i(e);s=t,a()})}function a(){n._ipld.put(s,{version:0,hashAlg:"sha2-256",format:"dag-pb"},(e,t)=>{if(e)return i(e);!1!==r.preload&&n._preload(t),i(null,t)})}}),get:s((e,t,r)=>{let i,s;"function"==typeof t&&(r=t,t={}),t=t||{};try{i=d(e,t.enc)}catch(e){return o(()=>r(p(e,"ERR_INVALID_MULTIHASH")))}try{s=new c(i)}catch(e){return o(()=>r(p(e,"ERR_INVALID_CID")))}1===t.cidVersion&&(s=s.toV1()),!1!==t.preload&&n._preload(s),n._ipld.get(s,(e,t)=>{if(e)return r(e);r(null,t.value)})}),data:s((e,t,r)=>{"function"==typeof t&&(r=t,t={}),n.object.get(e,t,(e,t)=>{if(e)return r(e);r(null,t.data)})}),links:s((e,t,r)=>{"function"==typeof t&&(r=t,t={}),n.object.get(e,t,(e,t)=>{if(e)return r(e);r(null,t.links)})}),stat:s((e,t,o)=>{"function"==typeof t&&(o=t,t={}),t=t||{},r([r=>n.object.get(e,t,r),(e,t)=>{i({serialized:t=>a.util.serialize(e,t),cid:t=>a.util.cid(e,t),node:t=>t(null,e)},t)}],(e,t)=>{if(e)return o(e);const n=t.serialized.length,r=t.node.links.reduce((e,t)=>e+t.size,0);o(null,{Hash:t.cid.toBaseEncodedString(),NumLinks:t.node.links.length,BlockSize:n,LinksSize:n-t.node.data.length,DataSize:t.node.data.length,CumulativeSize:n+r})})}),patch:s({addLink(e,t,n,r){f((e,n)=>{u.addLink(e,t,n)})(e,n,r)},rmLink(e,t,n,r){f((e,n)=>{l.isDAGLink(t)?t=t._name:t&&t.name&&(t=t.name),u.rmLink(e,t,n)})(e,n,r)},appendData(e,n,r,i){f((e,r)=>{const i=t.concat([e.data,n]);u.create(i,e.links,r)})(e,r,i)},setData(e,t,n,r){f((e,n)=>{u.create(t,e.links,n)})(e,n,r)}})}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(9),o=n(26),s=n(99),a=n(14),u=n(1191),l=n(22);e.exports=function e(n){return{put:r((e,t,r)=>{if("function"==typeof t&&(r=t,t={}),t=t||{},t.cid&&(t.format||t.hashAlg))return r(new Error("Can't put dag node. Please provide either `cid` OR `format` and `hashAlg` options."));if(t.format&&!t.hashAlg||!t.format&&t.hashAlg)return r(new Error("Can't put dag node. Please provide `format` AND `hashAlg` options."));const i={format:"dag-cbor",hashAlg:"sha2-256"};t=t.cid?t:Object.assign({},i,t),n._ipld.put(e,t,(e,i)=>{if(e)return r(e);!1!==t.preload&&n._preload(i),r(null,i)})}),get:r((e,r,o,s)=>{if("function"==typeof r&&(s=r,r=void 0),"function"==typeof o&&(s=o,"string"!=typeof r?(o=r,r=null):o={}),o=o||{},"string"==typeof e){const t=e.split("/");try{e=new i(t[0])}catch(e){return a(()=>s(l(e,"ERR_INVALID_CID")))}t.shift(),r=t.length>0?t.join("/"):"/"}else if(t.isBuffer(e))try{e=new i(e)}catch(e){return a(()=>s(l(e,"ERR_INVALID_CID")))}!1!==o.preload&&n._preload(e),n._ipld.get(e,r,o,s)}),tree:r((e,t,r,s)=>{if("object"==typeof t&&(s=r,r=t,t=void 0),"function"==typeof t&&(s=t,t=void 0),"function"==typeof r&&(s=r,r={}),r=r||{},"string"==typeof e){const n=e.split("/");try{e=new i(n[0])}catch(e){return a(()=>s(l(e,"ERR_INVALID_CID")))}n.shift(),t=n.length>0?n.join("/"):void 0}!1!==r.preload&&n._preload(e),o(n._ipld.treeStream(e,t,r),o.collect(s))}),_getRecursive:r((e,t,r)=>{let o;"function"==typeof t&&(r=t,t={}),t=t||{};try{o=new i(e)}catch(e){return a(()=>r(l(e,"ERR_INVALID_CID")))}n.dag.get(o,"",t,(e,i)=>{if(e)return r(e);s(i.value.links,(e,r)=>{n.dag._getRecursive(e.cid,t,r)},(e,t)=>{if(e)return r(e);r(null,u([i.value,t]))})})})}}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(1192),i=1/0;function o(e){var t=null==e?0:e.length;return t?r(e,i):[]}e.exports=o},function(e,t,n){var r=n(547),i=n(1193);function o(e,t,n,s,a){var u=-1,l=e.length;for(n||(n=i),a||(a=[]);++u<l;){var c=e[u];t>0&&n(c)?t>1?o(c,t-1,n,s,a):r(a,c):s||(a[a.length]=c)}return a}e.exports=o},function(e,t,n){var r=n(173),i=n(293),o=n(68),s=r?r.isConcatSpreadable:void 0;function a(e){return o(e)||i(e)||!!(s&&e&&e[s])}e.exports=a},function(e,t,n){"use strict";const r=n(3),i=n(1195),o=n(186).OFFLINE_ERROR;e.exports=function e(t){return{peers:r((e,n)=>{if("function"==typeof e&&(n=e,e={}),e=e||{},!t.isOnline())return n(new Error(o));const r=e.v||e.verbose,s=[];i(t._peerInfoBook.getAll()).forEach(e=>{const t=e.isConnected();if(!t)return;const n={addr:t,peer:e.id};r&&(n.latency="unknown"),s.push(n)}),n(null,s)}),addrs:r(e=>{if(!t.isOnline())return e(new Error(o));const n=i(t._peerInfoBook.getAll());e(null,n)}),localAddrs:r(e=>{if(!t.isOnline())return e(new Error(o));e(null,t.libp2p.peerInfo.multiaddrs.toArray())}),connect:r((e,n)=>{if(!t.isOnline())return n(new Error(o));t.libp2p.dial(e,n)}),disconnect:r((e,n)=>{if(!t.isOnline())return n(new Error(o));t.libp2p.hangUp(e,n)}),filters:r(e=>e(new Error("Not implemented")))}}},function(e,t,n){var r=n(1196),i=n(132);function o(e){return null==e?[]:r(e,i(e))}e.exports=o},function(e,t,n){var r=n(299);function i(e,t){return r(t,function(t){return e[t]})}e.exports=i},function(e,t,n){"use strict";const r=n(3),i=n(12);e.exports=function e(t){return r((e,n,r)=>{"function"==typeof n&&(r=n,n={}),i(t.pingPullStream(e,n),i.collect(r))})}},function(e,t,n){"use strict";const r=n(5),i=n(186).OFFLINE_ERROR,o=n(23),s=n(26),a=n(73),u=r("jsipfs:pingPullStream");function l(e){const t={success:!0,time:0,text:""};return Object.assign(t,e)}function c(e,t,n,r){let i,s;try{i=o.createFromB58String(n)}catch(e){return r(e)}try{s=e.peerBook.get(i)}catch(o){return u("Peer not found in peer book, trying peer routing"),t.push(l({text:`Looking up peer ${n}`})),e.peerRouting.findPeer(i,r)}r(null,s)}function f(e,t,n,r,i){e.ping(r,(e,o)=>{if(e)return i(e);let s=0,a=0;t.push(l({text:`PING ${r.id.toB58String()}`})),o.on("ping",e=>{if(t.push(l({time:e})),a+=e,s++,s>=n){const e=a/n;o.stop(),t.push(l({text:`Average latency: ${e}ms`})),t.end()}}),o.on("error",e=>{u.error(e),o.stop(),i(e)}),o.start()})}u.error=r("jsipfs:pingPullStream:error"),e.exports=function e(t){return(e,n)=>{if(!t.isOnline())return s.error(new Error(i));n=Object.assign({count:10},n);const r=a();return c(t.libp2p,r,e,(e,i)=>{if(e)return u.error(e),void r.end(e);f(t.libp2p,r,n.count,i,e=>{e&&(u.error(e),r.push(l({success:!1,text:e.toString()})),r.end())})}),r}}},function(e,t,n){"use strict";const r=n(100);e.exports=function e(t){return(e,n)=>r.source(t.pingPullStream(e,n))}},function(e,t,n){"use strict";(function(t){const r=n(3),{DAGNode:i,DAGLink:o,util:s}=n(38),a=n(9),u=n(99),l=n(1201),c=n(40),f=n(54),h=n(491),p=n(11),d=n(1203),m=n(14),{Key:g}=n(33),y=n(22),b=n(88),v=n(1204),{resolvePath:w}=n(186),_=300,k=new g("/local/pins");function S(e){return new a(e).toBaseEncodedString()}function E(e){const t=`Invalid type '${e}', must be one of {direct, indirect, recursive, all}`;return y(new Error(t),"ERR_INVALID_PIN_TYPE")}e.exports=(e=>{const n=e._repo,g=e.dag,x=v(g),C={direct:"direct",recursive:"recursive",indirect:"indirect",all:"all"};let A=new Set,I=new Set;const T=()=>Array.from(A).map(e=>new a(e).buffer),j=()=>Array.from(I).map(e=>new a(e).buffer);function O(e){const t=new Set;h(j(),_,(e,n)=>{g._getRecursive(e,(e,r)=>{if(e)return n(e);u(r,(e,t)=>s.cid(e,t),(e,r)=>{if(e)return n(e);r.map(e=>e.toBaseEncodedString()).filter(e=>!I.has(e)).forEach(e=>t.add(e)),n()})})},n=>{if(n)return e(n);e(null,Array.from(t))})}function P(r){let s,a,u;c([e=>p([e=>x.storeSet(T(),e),({node:e,cid:t},n)=>o.create(C.direct,e.size,t,n),(e,t)=>{s=e,t(null)}],e),e=>p([e=>x.storeSet(j(),e),({node:e,cid:t},n)=>o.create(C.recursive,e.size,t,n),(e,t)=>{a=e,t(null)}],e),e=>i.create(t.alloc(0),(t,n)=>{if(t)return e(t);g.put(n,{version:0,hashAlg:"sha2-256",format:"dag-pb",preload:!1},e)}),e=>i.create(t.alloc(0),[s,a],(t,n)=>{if(t)return e(t);u=n,g.put(u,{version:0,hashAlg:"sha2-256",format:"dag-pb",preload:!1},(t,n)=>{t||(u.multihash=n.buffer),e(t)})}),e=>n.closed?n.open(e):e(null,null),e=>n.datastore.put(k,u.multihash,e)],(t,n)=>t?r(t):(e.log(`Flushed pins with root: ${u}`),r(null,u)))}const B={add:r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};const i=null==n.recursive||n.recursive;w(e.object,t,(e,t)=>{if(e)return r(e);u(t,(e,t)=>{const r=S(e);if(i){if(I.has(r))return t(null,r);g._getRecursive(r,{preload:n.preload},e=>e?t(e):t(null,r))}else{if(I.has(r))return t(new Error(`${r} already pinned recursively`));if(A.has(r))return t(null,r);g.get(new a(e),{preload:n.preload},e=>e?t(e):t(null,r))}},(e,t)=>{if(e)return r(e);const n=i?I:A;t.forEach(e=>n.add(e)),P((e,n)=>{if(e)return r(e);r(null,t.map(e=>({hash:e})))})})})}),rm:r((t,n,r)=>{"function"==typeof n&&(r=n),n=n||{};const i=null==n.recursive||n.recursive;if(n.cidBase&&!b.names.includes(n.cidBase))return m(()=>{r(y(new Error("invalid multibase"),"ERR_INVALID_MULTIBASE"))});w(e.object,t,(t,n)=>{if(t)return r(t);u(n,(e,t)=>{B._isPinnedWithType(e,C.all,(n,r)=>{if(n)return t(n);const{pinned:o,reason:s}=r,a=S(e);if(!o)return t(new Error(`${a} is not pinned`));switch(s){case C.recursive:return i?t(null,a):t(new Error(`${a} is pinned recursively`));case C.direct:return t(null,a);default:return t(new Error(`${a} is pinned indirectly under ${s}`))}})},(t,n)=>{if(t)return r(t);n.forEach(e=>{i&&I.has(e)?I.delete(e):A.delete(e)}),P((t,i)=>{if(t)return r(t);e.log(`Removed pins: ${n}`),r(null,n.map(e=>({hash:e})))})})})}),ls:r((t,n,r)=>{let i=C.all;if("function"==typeof t&&(r=t,n={},t=null),"function"==typeof n&&(r=n),t&&t.type&&(n=t,t=null),n=n||{},n.type){if("string"!=typeof n.type)return m(()=>r(E(n.type)));i=n.type.toLowerCase()}if(!Object.keys(C).includes(i))return m(()=>r(E(i)));if(t)p([n=>w(e.object,t,n),(e,t)=>l(e,(e,t)=>B._isPinnedWithType(e,C.all,t),t),(e,t)=>{if(e=e.filter(e=>e.pinned).map(({key:e,reason:t})=>{switch(t){case C.direct:case C.recursive:return{hash:e,type:t};default:return{hash:e,type:`${C.indirect} through ${t}`}}}),!e.length)return t(new Error("Path is not pinned"));t(null,e)}],r);else{let e=[];i!==C.direct&&i!==C.all||(e=e.concat(Array.from(A).map(e=>({type:C.direct,hash:e})))),i!==C.recursive&&i!==C.all||(e=e.concat(Array.from(I).map(e=>({type:C.recursive,hash:e})))),i===C.indirect||i===C.all?O((t,n)=>t?r(t):(e=e.filter(({hash:e})=>!n.includes(e)||n.includes(e)&&!A.has(e)).concat(n.map(e=>({type:C.indirect,hash:e}))),r(null,e))):r(null,e)}}),_isPinnedWithType:r((e,t,n)=>{const r=S(e),{recursive:i,direct:o,all:s}=C;return t!==i&&t!==s||!I.has(r)?t===i?n(null,{key:r,pinned:!1}):t!==o&&t!==s||!A.has(r)?t===o?n(null,{key:r,pinned:!1}):void d(j().map(e=>new a(e)),_,(e,t)=>{p([t=>g.get(e,"",{preload:!1},t),(e,t)=>t(null,e.value),(e,t)=>x.hasDescendant(e,r,t)],t)},(e,t)=>n(e,{key:r,pinned:Boolean(t),reason:t})):n(null,{key:r,pinned:!0,reason:o}):n(null,{key:r,pinned:!0,reason:i})}),_load:r(t=>{p([e=>n.closed?n.datastore.open(e):e(null,null),(e,t)=>n.datastore.has(k,t),(e,t)=>e?t():t(new Error("No pins to load")),e=>n.datastore.get(k,e),(e,t)=>{g.get(new a(e),"",{preload:!1},t)}],(n,r)=>{if(n)return"No pins to load"===n.message?(e.log("No pins to load"),t()):t(n);f([e=>x.loadSet(r.value,C.recursive,e),e=>x.loadSet(r.value,C.direct,e)],(n,r)=>{if(n)return t(n);const[i,o]=r;return A=new Set(o.map(S)),I=new Set(i.map(S)),e.log("Loaded pins from the datastore"),t(null)})})})};return B})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1202),i=a(r),o=n(219),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(548),i=a(r),o=n(402),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(s.default),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240),i=f(r),o=n(241),s=f(o),a=n(548),u=f(a),l=n(487),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}t.default=(0,u.default)((0,s.default)(i.default,c.default)),e.exports=t.default},function(e,t,n){"use strict";(function(r){const i=n(35),o=n(9),s=n(71),a=n(1205),u=n(39),{DAGNode:l,DAGLink:c}=n(38),f=n(531),h=n(214),p=n(1206),d="QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n",m=i.fromB58String(d),g=256,y=8192,b=s(p);function v(e){return new o(e).toBaseEncodedString()}function w(e){const t=e.data,n=u.decode(t),r=u.decode.bytes;if(r<=0)throw new Error("Invalid Set header length");if(r+n>t.length)throw new Error("Impossibly large set header length");const i=t.slice(r,n+r),o=b.Set.decode(i);if(1!==o.version)throw new Error(`Unsupported Set version: ${o.version}`);if(o.fanout>e.links.length)throw new Error("Impossibly large fanout");return{header:o,data:t.slice(n+r)}}function _(e,t){const n=r.alloc(4);n.writeUInt32LE(e,0);const i=r.concat([n,r.from(v(t))]);return a(i.toString("binary"))}t=e.exports=function(e){const t={hasDescendant:(t,n,i)=>{const s={};return(o.isCID(n)||r.isBuffer(n))&&(n=v(n)),a(t,i);function a(t,r){f(t.links,({cid:t},r)=>{const i=v(t);return i===n?r(null,!0):i in s?r(null,!1):(s[i]=!0,void e.get(t,"",{preload:!1},(e,t)=>{if(e)return r(e);a(t.value,r)}))},r)}},storeSet:(n,i)=>{const s=n.map(e=>(("string"==typeof e||r.isBuffer(e))&&(e=new o(e)),{key:e,data:null}));t.storeItems(s,(t,n)=>{if(t)return i(t);e.put(n,{version:0,format:"dag-pb",hashAlg:"sha2-256",preload:!1},(e,t)=>{if(e)return i(e,t);i(null,{node:n,cid:t})})})},storeItems:(t,n)=>{return i(t,0,n);function i(t,n,o){const s=b.Set.encode({version:1,fanout:g,seed:n}),a=r.concat([r.from(u.encode(s.length)),s]),f=[];for(let e=0;e<g;e++)f.push(new c("",1,m));if(t.length<=y){const e=t.map(e=>({link:new c("",1,e.key),data:e.data||r.alloc(0)})).sort((e,t)=>r.compare(e.link.cid.buffer,t.link.cid.buffer)),n=f.concat(e.map(e=>e.link)),i=r.concat([a].concat(e.map(e=>e.data)));l.create(i,n,(e,t)=>e?o(e):o(null,t))}else{const e=t.reduce((e,t)=>{const r=_(n,t.key)%g;return e[r]=r in e?e[r].concat([t]):[t],e},{});h(e,(e,t,r)=>{i(e,n+1,(e,n)=>p(e,n,t,r))},e=>{if(e)return o(e);l.create(a,f,(e,t)=>e?o(e):o(null,t))})}function p(t,n,r,i){if(t)return i(t);const o={version:0,hashAlg:"sha2-256",format:"dag-pb",preload:!1};e.put(n,o,(e,t)=>{if(e)return i(e);f[r]=new c("",n.size,t),i(null)})}}},loadSet:(n,r,i)=>{const o=n.links.find(e=>e.name===r);if(!o)return i(new Error("No link found with name "+r));e.get(o.cid,"",{preload:!1},(e,n)=>{if(e)return i(e);const r=[],o=e=>r.push(e.cid.buffer);t.walkItems(n.value,o,e=>e?i(e):i(null,r))})},walkItems:(n,r,i)=>{let o;try{o=w(n)}catch(e){return i(e)}h(n.links,(n,i,s)=>{if(i<o.header.fanout){const i=n.cid.buffer;if(!m.equals(i))return e.get(i,"",{preload:!1},(e,n)=>{if(e)return s(e);t.walkItems(n.value,r,s)})}else r(n,i,o.data);s(null)},i)}};return t}}).call(this,n(0).Buffer)},function(e,t){function n(e){for(var t=n.BASE,r=0,i=e.length;r<i;r++)t^=e.charCodeAt(r),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}n.BASE=2166136261,e.exports=n},function(e,t,n){"use strict";e.exports='\n syntax = "proto2";\n\n package ipfs.pin;\n\n option go_package = "pb";\n\n message Set {\n optional uint32 version = 1;\n optional uint32 fanout = 2;\n optional fixed32 seed = 3;\n }\n'},function(e,t,n){"use strict";e.exports=(e=>({add:n(549)(e),addFromFs:n(1209)(e),addFromStream:n(1211)(e),addFromURL:n(1212)(e),addPullStream:n(1214)(e),addReadableStream:n(1251)(e),cat:n(1252)(e),catPullStream:n(1253)(e),catReadableStream:n(1254)(e),get:n(1255)(e),getPullStream:n(1256)(e),getReadableStream:n(1257)(e),ls:n(1258)(e),lsPullStream:n(1259)(e),lsReadableStream:n(1260)(e)}))},function(e,t,n){var r=n(225),i=n(81),o=n(43),s=n(37);e.exports=function(e){var t=r(),n=s(function(n,r){if(n)return t.resolve(i(n));t.resolve(o(r.sort(e)))});return function(e){return n(e),t}}},function(e,t,n){"use strict";e.exports=(e=>n(1210)(e))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((...e)=>{const t=e.pop();t(new Error("not available in the browser"))}))},function(e,t,n){"use strict";e.exports=(e=>n(549)(e))},function(e,t,n){"use strict";(function(t){const{URL:r}=n(32),i=n(1213);e.exports=(e=>async(n,o,s)=>{let a;"function"==typeof o&&(s=o,o={});try{const u=new r(n),l=await i(n);if(!l.ok)throw new Error("unexpected status code: "+l.status);const c=t.from(await l.arrayBuffer()),f=decodeURIComponent(u.pathname.split("/").pop());a=await e.add({content:c,path:f},o)}catch(e){if(s)return s(e);throw e}return s&&s(null,a),a})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=fetch},function(e,t,n){"use strict";(function(t){const{importer:r}=n(260),i=n(26),o=n(79),s=n(11),a=n(150),u=n(187).isSource,l=n(9),{parseChunkerString:c}=n(264),f="wrapper/";function h(){}function p(e,n,r,i){r=r||{};let o=new l(e.multihash);1===r.cidVersion&&(o=o.toV1()),s([t=>r.onlyHash?t(null,e):n.object.get(e.multihash,Object.assign({},r,{preload:!1}),t),(n,i)=>{const s=o.toBaseEncodedString();let a=n.size;t.isBuffer(n)&&(a=n.length),i(null,{path:r.wrapWithDirectory?e.path.substring(f.length):e.path||s,hash:s,size:a})}],i)}function d(e,n){return Array.isArray(e)||(e=[e]),e.map(e=>{if(t.isBuffer(e)&&(e={path:"",content:i.values([e])}),a.readable(e)&&(e={path:"",content:o.source(e)}),u(e)&&(e={path:"",content:e}),e&&e.content&&"function"!=typeof e.content&&(t.isBuffer(e.content)&&(e.content=i.values([e.content])),a.readable(e.content)&&(e.content=o.source(e.content))),n.wrapWithDirectory&&!e.path)throw new Error("Must provide a path when wrapping with a directory");return n.wrapWithDirectory&&(e.path=f+e.path),e})}function m(e,t,n){const r=n.wrapWithDirectory?""===e.path:!e.path.includes("/"),i=r&&!n.onlyHash&&!1!==n.preload;return i&&t._preload(e.hash),e}function g(e,t,n,r){const i=!("pin"in n)||n.pin,o=!e.path.includes("/"),s=i&&o&&!n.onlyHash&&!n.hashAlg;if(s)return t.pin.add(e.hash,{preload:!1},t=>r(t,e));r(null,e)}e.exports=function(e){return function t(n){let o;n=n||{};try{o=c(n.chunker)}catch(e){return i.map(()=>{throw e})}const s=Object.assign({},{shardSplitThreshold:e._options.EXPERIMENTAL.sharding?1e3:1/0},n,o);s.hashAlg&&1!==s.cidVersion&&(s.cidVersion=1);let a=0;const u=s.progress||h,l=e=>{a+=e,u(a)};return s.progress=l,i(i.map(e=>d(e,s)),i.flatten(),r(e._ipld,s),i.asyncMap((t,n)=>p(t,e,s,n)),i.map(t=>m(t,e,s)),i.asyncMap((t,n)=>g(t,e,s,n)))}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(551),i=n(12),o=n(77),s=n(261),a=n(73),u=n(18),l=n(14),c=n(1217),f=n(1228),h=n(1240),p={chunker:"fixed",rawLeaves:!1,hashOnly:!1,cidVersion:0,hash:null,leafType:"file",hashAlg:"sha2-256"};e.exports=function(e,n){const d=Object.assign({},p,n);d.cidVersion=d.cidVersion||0,d.cidVersion>0&&void 0===n.rawLeaves&&(d.rawLeaves=!0),n&&void 0!==n.hash&&void 0===n.rawLeaves&&(d.rawLeaves=!0);const m=h[d.chunker];u(m,"Unknkown chunker named "+d.chunker);let g=0;const y=[],b={sink:s((e,t)=>{g+=e.length,e.forEach(e=>b.source.push(e)),l(t)},null,1,e=>b.source.end(e)),source:a()},v=c(m,e,d),w=f(e,d),_=w.stream(),k=r(()=>{});return i(b,k,v,o(e=>(g--,g||t.nextTick(()=>{for(;y.length;)y.shift()()}),e)),_),{sink:b.sink,source:_.source,flush:S};function S(e){function t(){w.flush((t,n)=>{if(t)return _.source.end(t),void e(t);k.resume(),e(null,n)})}k.pause(),g?y.push(t):t()}}}).call(this,n(2))},function(e,t){e.exports=function(e){var t=!1,n=0;return function(){if(n=!0,!t){for(t=!0;n;)n=!1,e();t=!1}}}},function(e,t,n){"use strict";const r=n(18),i=n(1218),o=n(1219),s={flat:n(1223),balanced:n(1224),trickle:n(1226)},a={strategy:"balanced",highWaterMark:100,reduceSingleLeafToSelf:!0};e.exports=function(e,t,n){r(e,"Missing chunker creator function"),r(t,"Missing IPLD");const u=Object.assign({},a,n),l=u.strategy,c=s[l];r(c,"Unknown importer build strategy name: "+l);const f=o(e,t,c,u);return i(f,t,u)}},function(e,t,n){"use strict";const r=n(73),i=n(261);e.exports=function e(t,n,o){const s=r(),a=i(t(s),null,o.highWaterMark,e=>s.end(e));return{source:s,sink:a}}},function(e,t,n){"use strict";(function(t){const r=n(1220),i=n(48),o=n(12),s=n(43),a=n(37),u=n(222),l=n(188),c=n(54),f=n(11),h=n(339),p=n(262),d=n(1222),{DAGNode:m}=n(38),g={chunkerOptions:{maxChunkSize:262144,avgChunkSize:262144},rawLeaves:!1,hashAlg:"sha2-256",leafType:"file",cidVersion:0,progress:()=>{}};e.exports=function e(n,y,b,v){const w=r({},g,v);return w.progress="function"==typeof w.progress?w.progress:g.progress,function(e){return function(t,n){c(t.map(t=>n=>{if(!t.content)return _(t,(t,r)=>{if(t)return n(t);r&&e.push(r),n()});k(t,(t,r)=>{if(t)return n(t);r&&e.push(r),n()})}),n)}};function _(e,t){const n=new i("directory");f([e=>m.create(n.marshal(),[],e),(e,t)=>p(e,y,w,t)],(n,r)=>{if(n)return t(n);t(null,{path:e.path,multihash:r.cid.buffer,size:r.node.size})})}function k(e,r){if(t.isBuffer(e.content)&&(e.content=s([e.content])),"function"!=typeof e.content)return r(new Error("invalid content"));const c=b(d(e,y,w),w);let g,v;try{g=n(w.chunkerOptions)}catch(e){return r(e)}let _=0;o(e.content,g,u(e=>{w.progress(e.length)}),h((e,t)=>{f([t=>{if(w.rawLeaves)return t(null,{size:e.length,leafSize:e.length,data:e});const n=new i(w.leafType,e);m.create(n.marshal(),[],(e,r)=>{if(e)return t(e);t(null,{size:r.size,leafSize:n.fileSize(),data:r})})},(e,t)=>{p(e.data,y,w,(n,r)=>{if(n)return t(n);t(null,{size:e.size,leafSize:e.leafSize,data:r.node,multihash:r.cid.buffer,path:e.path,name:""})})}],t)}),l(function e(t){_++,v&&this.queue(v),v=t},function e(){v&&(1===_&&(v.single=!0),this.queue(v)),this.queue(null)}),c,a((e,t)=>{e?r(e):r(null,t[0])}))}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){
/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function i(e){var t=[];return e.forEach(function(e,o){"object"==typeof e&&null!==e?Array.isArray(e)?t[o]=i(e):n(e)?t[o]=r(e):t[o]=s({},e):t[o]=e}),t}function o(e,t){return"__proto__"===t?void 0:e[t]}var s=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),a,u,l;return t.forEach(function(t){"object"!=typeof t||null===t||Array.isArray(t)||Object.keys(t).forEach(function(l){return u=o(e,l),a=o(t,l),a===e?void 0:"object"!=typeof a||null===a?void(e[l]=a):Array.isArray(a)?void(e[l]=i(a)):n(a)?void(e[l]=r(a)):"object"!=typeof u||null===u||Array.isArray(u)?void(e[l]=s({},a)):void(e[l]=s(u,a))})}),e}}).call(this,n(0).Buffer)},function(e,t){e.exports=function(e){var t=!1,n=0;return function(){if(n=!0,!t){for(t=!0;n;)n=!1,e();t=!1}}}},function(e,t,n){"use strict";const r=n(11),i=n(38),o=n(48),s=n(262),a=i.DAGLink,u=i.DAGNode;e.exports=function e(t,n,i){return function(e,l){if(1===e.length&&e[0].single&&i.reduceSingleLeafToSelf){const n=e[0];return l(null,{size:n.size,leafSize:n.leafSize,multihash:n.multihash,path:t.path,name:n.name})}const c=new o("file"),f=e.map(e=>(c.addBlockSize(e.leafSize),new a(e.name,e.size,e.multihash)));r([e=>u.create(c.marshal(),f,e),(e,t)=>s(e,n,i,t)],(e,n)=>{if(e)return l(e);l(null,{size:n.node.size,leafSize:c.fileSize(),multihash:n.cid.buffer,path:t.path,name:""})})}}},function(e,t,n){"use strict";const r=n(12),i=n(89),o=n(37),s=n(73),a=n(257),u=n(340);e.exports=function(e,t){const n=a(),l=n.source,c=s();return r(l,u(1/0),i(e),o((e,t)=>{e?c.end(e):1===t.length?(c.push(t[0]),c.end()):t.length>1?c.end(new Error("expected a maximum of 1 roots and got "+t.length)):c.end()})),{sink:n.sink,source:c}}},function(e,t,n){"use strict";const r=n(1225),i={maxChildrenPerNode:174};e.exports=function(e,t){const n=Object.assign({},i,t);return r(e,n)}},function(e,t,n){"use strict";const r=n(12),i=n(43),o=n(89),s=n(37),a=n(73),u=n(257),l=n(340);e.exports=function e(t,n){const c=u(),f=c.source,h=a();function p(e,a){let u=e;function c(e,t){e?a(e):t.length>1?p(t,a):a(null,t)}Array.isArray(u)&&(u=i(u)),r(u,l(n.maxChildrenPerNode),o(t),s(c))}return p(f,(e,t)=>{e?h.end(e):1===t.length?(h.push(t[0]),h.end()):t.length>1?h.end(new Error("expected a maximum of 1 roots and got "+t.length)):h.end()}),{sink:c.sink,source:h}}},function(e,t,n){"use strict";const r=n(1227),i={maxChildrenPerNode:174,layerRepeat:4};e.exports=function(e,t){const n=Object.assign({},i,t);return r(e,n)}},function(e,t,n){"use strict";const r=n(12),i=n(89),o=n(37),s=n(73),a=n(340),u=n(257),l=n(188),c=n(261),f=n(551);e.exports=function e(t,n){const h=u(),p=s(),d=f(()=>{});let m=0;return r(h.source,d,g(0,-1),a(1/0),i(t),o((e,t)=>{e?p.end(e):1===t.length?(p.push(t[0]),p.end()):t.length>1?p.end(new Error("expected a maximum of 1 roots and got "+t.length)):p.end()})),{sink:h.sink,source:p};function g(e,u){let f=0,h=0,p,y=!1;const b=s();return{source:b,sink:c(v,null,1,_)};function v(n,u){let c=!1;const f=n[0];h&&!p&&(p=s(),r(p,g(e+1,h-1),l(function(e){this.queue(e)},function(e){e?this.emit("error",e):(c||(c=!0,m++,d.pause()),this.queue(null))}),a(1/0),i(t),o((e,t)=>{m--,e?b.end(e):(t.forEach(e=>{b.push(e)}),w())}))),p?p.push(f):(b.push(f),w()),u()}function w(){p=null,f++,(0===h&&f===n.maxChildrenPerNode||h>0&&f===n.layerRepeat)&&(f=0,h++),(!y&&u>=0&&h>u||y&&!m)&&(y=!0,b.end()),m||d.resume()}function _(e){e?b.end(e):p?y||(y=!0,p.end()):b.end()}}}},function(e,t,n){"use strict";(function(t){const r=n(145),i=n(297),o=n(11),s=n(227),a=n(261),u=n(73),l=n(1229),c=n(1230),f=n(341),h=n(1239);e.exports=d;const p={wrap:!1,shardSplitThreshold:1e3,onlyHash:!1};function d(e,n){const d=Object.assign({},p,n),m=s(b,1);let g=w(),y=l({path:"",root:!0,dir:!0,dirty:!1,flat:!0},d);return{flush:k,stream:v};function b(e,t){const n=e.args.concat(function(){e.cb.apply(null,arguments),t()});e.fn.apply(null,n)}function v(){return g}function w(){const e=a(n,null,1,i),t=u();return{sink:e,source:t};function n(e,n){r(e,(e,n)=>{m.push({fn:_,args:[e],cb:r=>{r?n(r):(t.push(e),n())}})},n)}function i(e){k(n=>{t.end(n||e)})}}function _(e,t){const n=h(e.path||"");let r=y;const s=n.length-1;let a="";i(n,(t,n,i)=>{a&&(a+="/"),a+=t;const u=n===s;r.dirty=!0,r.multihash=null,r.size=null,u?o([n=>r.put(t,e,n),e=>c(null,r,d.shardSplitThreshold,d,e),(e,t)=>{y=e,t()}],i):r.get(t,(e,n)=>{if(e)return void i(e);let o=n;o&&o instanceof f||(o=l({dir:!0,parent:r,parentKey:t,path:a,dirty:!0,flat:!0},d));const s=r;r=o,s.put(t,o,i)})},t)}function k(e){m.push({fn:S,args:["",y],cb:(t,n)=>{t?e(t):e(null,n&&n.multihash)}})}function S(e,n,r){if(n.dir){if(n.root&&n.childCount()>1&&!d.wrap)return void r(new Error("detected more than one root"));n.eachChildSeries((t,n,r)=>{S(e?e+"/"+t:t,n,r)},t=>{t?r(t):E(e,n,r)})}else t.nextTick(r)}function E(t,n,r){!n.root||d.wrap?n.dirty?(n.dirty=!1,n.flush(t,e,g.source,(e,t)=>{e?r(e):r(null,t)})):r(null,n.multihash):n.onlyChild((e,t)=>{e?r(e):r(null,t)})}}}).call(this,n(2))},function(e,t,n){"use strict";(function(t){const r=n(145),i=n(11),o=n(38),s=n(48),a=o.DAGLink,u=o.DAGNode,l=n(341),c=n(262);class f extends l{constructor(e,t){super(e,t),this._children={}}put(e,n,r){this.multihash=void 0,this.size=void 0,this._children[e]=n,t.nextTick(r)}get(e,n){t.nextTick(()=>n(null,this._children[e]))}childCount(){return Object.keys(this._children).length}directChildrenCount(){return this.childCount()}onlyChild(e){t.nextTick(()=>e(null,this._children[Object.keys(this._children)[0]]))}eachChildSeries(e,t){r(Object.keys(this._children),(t,n)=>{e(t,this._children[t],n)},t)}flush(e,t,n,r){const o=Object.keys(this._children).map(e=>{const t=this._children[e];return new a(e,t.size,t.multihash)}),l=new s("directory");i([e=>u.create(l.marshal(),o,e),(e,n)=>c(e,t,this._options,n),({cid:t,node:r},i)=>{this.multihash=t.buffer,this.size=r.size;const o={path:e,multihash:t.buffer,size:r.size};n.push(o),i(null,r)}],r)}}function h(e,t){return new f(e,t)}e.exports=h}).call(this,n(2))},function(e,t,n){"use strict";const r=n(11),i=n(263);function o(e,t,n,i,a){s(t,n,i,(s,u)=>{if(s)return void a(s);const l=u.parent;l?r([n=>{u!==t?(e&&(e.parent=u),l.put(u.parentKey,u,n)):n()},e=>{l?o(u,l,n,i,e):e(null,u)}],a):a(null,u)})}function s(e,t,n,r){e.flat&&e.directChildrenCount()>=t?a(e,n,r):r(null,e)}function a(e,t,n){const r=i({root:e.root,dir:!0,parent:e.parent,parentKey:e.parentKey,path:e.path,dirty:e.dirty,flat:!1},t);e.eachChildSeries((e,t,n)=>{r.put(e,t,n)},e=>{e?n(e):n(e,r)})}e.exports=o},function(e,t,n){"use strict";e.exports=i;var r=[""," "," "," "," "," "," "," "," "," "];function i(e,t,n){if(e+="",t-=e.length,t<=0)return e;if(n||0===n||(n=" "),n+=""," "===n&&t<10)return r[t]+e;for(var i="";1&t&&(i+=n),t>>=1,t;)n+=n;return i+e}},function(e,t,n){const r=n(1233),i=n(1234);function o(e){return e=r(e),async(t,n)=>{if(t){if(e.return)try{await e.return()}catch(e){return n(e)}return n(t)}let r;try{r=await e.next()}catch(e){return n(e)}if(r.done)return n(!0);n(null,r.value)}}o.source=o,o.transform=o.through=(e=>t=>o(e(i(t)))),o.duplex=(e=>({sink:o.sink(e.sink),source:o(e.source)})),o.sink=(e=>t=>{e({[Symbol.asyncIterator](){return this},next:()=>new Promise((e,n)=>{t(null,(t,r)=>!0===t?e({done:!0,value:r}):t?n(t):void e({done:!1,value:r}))}),return:()=>new Promise((e,n)=>{t(!0,(t,r)=>{if(t&&!0!==t)return n(t);e({done:!0,value:r})})}),throw:e=>new Promise((n,r)=>{t(e,(e,t)=>{if(e&&!0!==e)return r(e);n({done:!0,value:t})})})})}),e.exports=o},function(e,t){e.exports=function e(t){if(t){if("function"==typeof t[Symbol.iterator])return t[Symbol.iterator]();if("function"==typeof t[Symbol.asyncIterator])return t[Symbol.asyncIterator]();if("function"==typeof t.next)return t}throw new Error("argument is not an iterator or iterable")}},function(e,t,n){const r=n(26);e.exports=(e=>(async function*(){let t;const n=e=>{t=(()=>new Promise((t,n)=>{e(null,(e,r)=>!0===e?t({end:e}):e?n(e):void t({data:r}))}))};for(r(e,n);;){const{end:e,data:n}=await t();if(e)break;yield n}})())},function(e,t,n){"use strict";const r=n(342);e.exports=function e(t){return new r(t)},e.exports.isBucket=r.isBucket},function(e,t,n){"use strict";const r=7;function i(e,t){return e+o(t)}function o(e){let t=e;return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}function s(e,t){return e[0]-t[0]}function a(e){return e[1]}e.exports=class e{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(e,t){let n=this._internalPositionFor(e,!1);if(void 0===t)-1!==n&&(this._unsetInternalPos(n),this._unsetBit(e),this._changedLength=!0,this._changedData=!0);else{let r=!1;-1===n?(n=this._data.length,this._setBit(e),this._changedData=!0):r=!0,this._setInternalPos(n,e,t,r),this._changedLength=!0}}unset(e){this.set(e,void 0)}get(e){this._sortData();const t=this._internalPositionFor(e,!0);if(-1!==t)return this._data[t][1]}push(e){return this.set(this.length,e),this.length}get length(){if(this._sortData(),this._changedLength){const e=this._data[this._data.length-1];this._length=e?e[0]+1:0,this._changedLength=!1}return this._length}forEach(e){let t=0;for(;t<this.length;)e(this.get(t),t,this),t++}map(e){let t=0,n=new Array(this.length);for(;t<this.length;)n[t]=e(this.get(t),t,this),t++;return n}reduce(e,t){let n=0,r=t;for(;n<this.length;){const t=this.get(n);r=e(r,t,n),n++}return r}find(e){let t=0,n,r;for(;t<this.length&&!n;)r=this.get(t),n=e(r),t++;return n?r:void 0}_internalPositionFor(e,t){const n=this._bytePosFor(e,t);if(n>=this._bitArrays.length)return-1;const r=this._bitArrays[n],s=e-7*n,a=(r&1<<s)>0;if(!a)return-1;const u=this._bitArrays.slice(0,n).reduce(i,0),l=~(4294967295<<s+1),c=o(r&l),f=u+c-1;return f}_bytePosFor(e,t){const n=Math.floor(e/7),r=n+1;for(;!t&&this._bitArrays.length<r;)this._bitArrays.push(0);return n}_setBit(e){const t=this._bytePosFor(e,!1);this._bitArrays[t]|=1<<e-7*t}_unsetBit(e){const t=this._bytePosFor(e,!1);this._bitArrays[t]&=~(1<<e-7*t)}_setInternalPos(e,t,n,r){const i=this._data,o=[t,n];if(r)this._sortData(),i[e]=o;else{if(i.length)if(i[i.length-1][0]>=t)i.push(o);else if(i[0][0]<=t)i.unshift(o);else{const e=Math.round(i.length/2);this._data=i.slice(0,e).concat(o).concat(i.slice(e))}else this._data.push(o);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(e){this._data.splice(e,1)}_sortData(){this._changedData&&this._data.sort(s),this._changedData=!1}bitField(){const e=[];let t=8,n=0,r=0,i;const o=this._bitArrays.slice();for(;o.length||n;){0===n&&(i=o.shift(),n=7);const s=Math.min(n,t),a=~(255<<s),u=i&a;r|=u<<8-t,i>>>=s,n-=s,t-=s,t&&(n||o.length)||(e.push(r),r=0,t=8)}for(var s=e.length-1;s>0;s--){const t=e[s];if(0!==t)break;e.pop()}return e}compactArray(){return this._sortData(),this._data.map(a)}}},function(e,t,n){"use strict";(function(t){const r=n(1238);e.exports=function e(t){return function e(n){return n instanceof i?n:new i(n,t)}};class i{constructor(e,n){if("string"!=typeof e&&!t.isBuffer(e))throw new Error("can only hash strings or buffers");this._value=e,this._hashFn=n,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(e){let t=e;for(;this._availableBits<t;)await this._produceMoreBits();let n=0;for(;t>0;){const e=this._buffers[this._currentBufferIndex],r=Math.min(e.availableBits(),t),i=e.take(r);n=(n<<r)+i,t-=r,this._availableBits-=r,0===e.availableBits()&&this._currentBufferIndex++}return n}untake(e){let t=e;for(;t>0;){const e=this._buffers[this._currentBufferIndex],n=Math.min(e.totalBits()-e.availableBits(),t);e.untake(n),t-=n,this._availableBits+=n,this._currentBufferIndex>0&&e.totalBits()===e.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;const e=this._depth?this._value+this._depth:this._value,t=await this._hashFn(e),n=new r(t);this._buffers.push(n),this._availableBits+=n.availableBits()}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=[255,254,252,248,240,224,192,128],i=[1,3,7,15,31,63,127,255];function o(e,t,n){const r=s(t,n);return(e&r)>>>t}function s(e,t){return r[e]&i[Math.min(t+e-1,7)]}e.exports=class e{constructor(e){this._value=e,this._currentBytePos=e.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+8*this._currentBytePos}totalBits(){return 8*this._value.length}take(e){let t=e,n=0;for(;t&&this._haveBits();){const e=this._value[this._currentBytePos],r=this._currentBitPos+1,i=Math.min(r,t),s=o(e,r-i,i);n=(n<<i)+s,t-=i,this._currentBitPos-=i,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return n}untake(e){for(this._currentBitPos+=e;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}}},function(e,t,n){"use strict";const r=(e="")=>(e.trim().match(/([^\\^/]|\\\/)+/g)||[]).filter(Boolean);e.exports=r},function(e,t,n){"use strict";const r={fixed:n(1241),rabin:n(1243)};e.exports=r},function(e,t,n){"use strict";(function(t){const r=n(1242),i=n(188);e.exports=(e=>{let n="number"==typeof e?e:e.maxChunkSize,o=new r,s=0,a=!1;return i(function e(t){for(o.append(t),s+=t.length;s>=n;)if(this.queue(o.slice(0,n)),a=!0,n===o.length)o=new r,s=0;else{const e=new r;e.append(o.shallowSlice(n)),o=e,s-=n}},function e(){s&&(this.queue(o.slice(0,s)),a=!0),a||this.queue(t.alloc(0)),this.queue(null)})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(20).Duplex,i=n(13);function o(e){if(!(this instanceof o))return new o(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function e(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",function e(n){n.on("error",t)}),this.on("unpipe",function e(n){n.removeListener("error",t)})}else this.append(e);r.call(this)}i.inherits(o,r),o.prototype._offset=function e(t){var n=0,r=0,i;if(0===t)return[0,0];for(;r<this._bufs.length;r++){if(i=n+this._bufs[r].length,t<i||r==this._bufs.length-1)return[r,t-n];n=i}},o.prototype._reverseOffset=function(e){for(var t=e[0],n=e[1],r=0;r<t;r++)n+=this._bufs[r].length;return n},o.prototype.append=function e(n){var r=0;if(t.isBuffer(n))this._appendBuffer(n);else if(Array.isArray(n))for(;r<n.length;r++)this.append(n[r]);else if(n instanceof o)for(;r<n._bufs.length;r++)this.append(n._bufs[r]);else null!=n&&("number"==typeof n&&(n=n.toString()),this._appendBuffer(t.from(n)));return this},o.prototype._appendBuffer=function e(t){this._bufs.push(t),this.length+=t.length},o.prototype._write=function e(t,n,r){this._appendBuffer(t),"function"==typeof r&&r()},o.prototype._read=function e(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},o.prototype.end=function e(t){r.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype.get=function e(t){if(!(t>this.length||t<0)){var n=this._offset(t);return this._bufs[n[0]][n[1]]}},o.prototype.slice=function e(t,n){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof n&&n<0&&(n+=this.length),this.copy(null,0,t,n)},o.prototype.copy=function e(n,r,i,o){if(("number"!=typeof i||i<0)&&(i=0),("number"!=typeof o||o>this.length)&&(o=this.length),i>=this.length)return n||t.alloc(0);if(o<=0)return n||t.alloc(0);var e=!!n,s=this._offset(i),a=o-i,u=a,l=e&&r||0,c=s[1],f,h;if(0===i&&o==this.length){if(!e)return 1===this._bufs.length?this._bufs[0]:t.concat(this._bufs,this.length);for(h=0;h<this._bufs.length;h++)this._bufs[h].copy(n,l),l+=this._bufs[h].length;return n}if(u<=this._bufs[s[0]].length-c)return e?this._bufs[s[0]].copy(n,r,c,c+u):this._bufs[s[0]].slice(c,c+u);for(e||(n=t.allocUnsafe(a)),h=s[0];h<this._bufs.length;h++){if(f=this._bufs[h].length-c,!(u>f)){this._bufs[h].copy(n,l,c,c+u);break}this._bufs[h].copy(n,l,c),l+=f,u-=f,c&&(c=0)}return n},o.prototype.shallowSlice=function e(t,n){if(t=t||0,n="number"!=typeof n?this.length:n,t<0&&(t+=this.length),n<0&&(n+=this.length),t===n)return new o;var r=this._offset(t),i=this._offset(n),s=this._bufs.slice(r[0],i[0]+1);return 0==i[1]?s.pop():s[s.length-1]=s[s.length-1].slice(0,i[1]),0!=r[1]&&(s[0]=s[0].slice(r[1])),new o(s)},o.prototype.toString=function e(t,n,r){return this.slice(n,r).toString(t)},o.prototype.consume=function e(t){for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function e(){for(var t=0,n=new o;t<this._bufs.length;t++)n.append(this._bufs[t]);return n},o.prototype._destroy=function e(t,n){this._bufs.length=0,this.length=0,n(t)},o.prototype.indexOf=function(e,n,r){if(void 0===r&&"string"==typeof n&&(r=n,n=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=t.from([e]):"string"==typeof e?e=t.from(e,r):e instanceof o?e=e.slice():t.isBuffer(e)||(e=t.from(e)),n=Number(n||0),isNaN(n)&&(n=0),n<0&&(n=this.length+n),n<0&&(n=0),0===e.length)return n>this.length?this.length:n;for(var i=this._offset(n),s=i[0],a=i[1];s<this._bufs.length;s++){for(var u=this._bufs[s];a<u.length;){var l=u.length-a;if(l>=e.length){var c=u.indexOf(e,a);if(-1!==c)return this._reverseOffset([s,c]);a=u.length-e.length+1}else{var f=this._reverseOffset([s,a]);if(this._match(f,e))return f;a++}}a=0}return-1},o.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(var n=0;n<t.length;n++)if(this.get(e+n)!==t[n])return!1;return!0},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(var t in e)!function(t){o.prototype[t]=null===e[t]?function(e,n){return this.slice(e,e+n)[t](0,n)}:function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=o}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(79),i=n(188);let o;e.exports=(e=>{if(!o)try{if(o=n(1244),"function"!=typeof o)throw new Error("createRabin was not a function")}catch(e){const t=new Error("Rabin chunker not available, it may have failed to install or not be supported on this platform");return i(function(){this.emit("error",t)})}let t,s,a;e.minChunkSize&&e.maxChunkSize&&e.avgChunkSize?(a=e.avgChunkSize,t=e.minChunkSize,s=e.maxChunkSize):(a=e.avgChunkSize,t=a/3,s=a+a/2);const u=Math.floor(Math.log2(a)),l=o({min:t,max:s,bits:u,window:e.window||16,polynomial:e.polynomial||"0x3DF305DFB2A805"});return r.duplex(l)})},function(e,t){},function(e,t,n){"use strict";(function(t){const r=n(48),i=n(12),o=n(81),s=n(78),a=n(223),u=n(77),l=n(339),c=n(9),f=n(11),h={directory:n(1246),"hamt-sharded-directory":n(1247),file:n(1248),object:n(1249),raw:n(1250)};function p(e,t,n,r){return n||(n=0),n>t.maxDepth?u(m):i(l((n,r)=>{if("number"!=typeof n.depth)return o(new Error("no depth"));if(n.object)return r(null,g(null,n.object,n,t));const i=new c(n.multihash);f([t=>e.get(i,t),(e,r)=>r(null,g(i,e.value,n,t))],r)}),a(),s(Boolean),s(e=>e.depth<=t.maxDepth));function g(t,n,i,o){return y({cid:t,node:n,name:i.name,path:i.path,pathRest:i.pathRest,size:i.size,dag:e,parentNode:i.parent||r,depth:i.depth,options:o})}function y({cid:e,node:t,name:n,path:r,pathRest:i,size:s,dag:a,parentNode:u,depth:l,options:c}){let f;try{f=d(t)}catch(e){return o(e)}const m=h[f];if(!m)return o(new Error("Unkown node type "+f));const g=p(a,c,l,t);return m(e,t,n,r,i,g,s,a,u,l,c)}}function d(e){return t.isBuffer(e)?"raw":t.isBuffer(e.data)?r.unmarshal(e.data).type:"object"}function m(e){return e}e.exports=Object.assign({createResolver:p,typeOf:d},h)}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(12),i=n(43),o=n(78),s=n(77),a=n(256);function u(e,t,n,u,l,c,f,h,p,d,m){const g=l[0],y={name:n,depth:d,path:u,multihash:e.buffer,size:t.size,type:"dir"};if(m.maxDepth&&m.maxDepth<=d)return i([y]);const b=[r(i(t.links),o(e=>void 0===g||e.name===g),s(e=>({depth:d+1,size:e.size,name:e.name,path:u+"/"+e.name,multihash:e.cid.buffer,linkName:e.name,pathRest:l.slice(1),type:"dir"})),c)];return l.length&&!m.fullPath||b.unshift(i([y])),a(b)}e.exports=u},function(e,t,n){"use strict";const r=n(70),i=n(12),o=n(81),s=n(43),a=n(78),u=n(77),l=n(256),c=n(342),f=n(263),h=n(11);function p(e,t,n,p,b,v,w,_,k,S,E){let x;if(k&&k.path===p||(x={name:n,depth:S,path:p,multihash:e.buffer,size:t.size,type:"dir"}),E.maxDepth&&E.maxDepth<=S)return s([x]);if(!b.length){const e=[i(s(t.links),u(e=>{const t=e.name.substring(2),n=t?p+"/"+t:p;return{depth:t?S+1:S,name:t,path:n,multihash:e.cid.buffer,pathRest:t?b.slice(1):b,parent:x||k}}),v)];return e.unshift(s([x])),l(e)}const C=r.source(),A=b[0];return h([e=>E.rootBucket?d(t.links,E.lastBucket,E.rootBucket,e):(E.rootBucket=new c({hashFn:f.hashFn}),E.hamtDepth=1,d(t.links,E.rootBucket,E.rootBucket,e)),e=>g(A,E.rootBucket,e),(e,n)=>{let r=m(e.pos);const o=y(e);o.length>E.hamtDepth&&(E.lastBucket=o[E.hamtDepth],r=m(E.lastBucket._posAtParent));const l=[i(s(t.links),u(e=>{const t=e.name.substring(0,2),n=e.name.substring(2),i=n?p+"/"+n:p;return t===r&&((!n||n===A)&&(n?(delete E.rootBucket,delete E.lastBucket,delete E.hamtDepth):E.hamtDepth++,{depth:n?S+1:S,name:n,path:i,multihash:e.cid.buffer,pathRest:n?b.slice(1):b,parent:x||k}))}),a(Boolean),v)];E.fullPath&&l.unshift(s([x])),n(null,l)}],(e,t)=>{if(e)return C.resolve(o(e));C.resolve(l(t))}),C}e.exports=p;const d=(e,t,n,r)=>{Promise.all(e.map(e=>{if(2===e.name.length){const n=parseInt(e.name,16);return t._putObjectAt(n,new c({hashFn:f.hashFn},t,n))}return n.put(e.name.substring(2),!0)})).catch(e=>{r(e),r=null}).then(()=>r&&r())},m=e=>e.toString("16").toUpperCase().padStart(2,"0").substring(0,2),g=(e,t,n)=>{t._findNewBucketAndPos(e).catch(e=>{n(e),n=null}).then(e=>{n&&n(null,e)})},y=e=>{let t=e.bucket;const n=[];for(;t._parent;)n.push(t),t=t._parent;return n.push(t),n.reverse()}},function(e,t,n){"use strict";(function(t){const r=n(438),i=n(48),o=n(12),s=n(43),a=n(81),u=n(138),l=n(106),c=n(78),f=n(223),h=n(77),p=n(339),d=n(552);function m(e,n,i,s,a){if(s===i||0===a)return u(t.alloc(0));const l=s+a;return o(r.depthFirst({node:n,start:0,end:i},g(e,s,l)),h(y(s,l)),c(Boolean))}function g(e,n,r){let s=0;return function c({node:h}){if(t.isBuffer(h))return l();let d;try{d=i.unmarshal(h.data)}catch(e){return a(e)}const m=Boolean(d.data&&d.data.length);m&&h.links.length&&(s+=d.data.length);const g=h.links.map((e,t)=>{const n={link:e,start:s,end:s+d.blockSizes[t],size:d.blockSizes[t]};return s=n.end,n}).filter(e=>n>=e.start&&n<e.end||r>e.start&&r<=e.end||n<e.start&&r>e.end);return g.length&&(s=g[0].start),o(u(g),p((t,n)=>{e.getMany(t.map(e=>e.link.cid),(e,r)=>{if(e)return n(e);n(null,r.map((e,n)=>{const r=t[n];return{start:r.start,end:r.end,node:e,size:r.size}}))})}),f())}}function y(e,n){let r=-1;return function o({node:s,start:a,end:u}){let l;if(t.isBuffer(s))l=s;else try{const e=i.unmarshal(s.data);if(!e.data){if(e.blockSizes.length)return;return t.alloc(0)}l=e.data}catch(e){throw new Error(`Failed to unmarshal node - ${e.message}`)}if(l&&l.length){-1===r&&(r=a);const t=d(l,r,e,n);return r+=l.length,t}return t.alloc(0)}}e.exports=((e,n,r,o,c,f,h,p,d,g,y)=>{const b=c[0];if(void 0!==b&&b!==o)return l();let v;try{v=i.unmarshal(n.data)}catch(e){return a(e)}const w=h||v.fileSize();let _=y.offset,k=y.length;if(_<0)return a(new Error("Offset must be greater than or equal to 0"));if(_>w)return a(new Error("Offset must be less than the file size"));if(k<0)return a(new Error("Length must be greater than or equal to 0"));if(0===k)return u({depth:g,content:u(t.alloc(0)),name:r,path:o,multihash:e.buffer,size:w,type:"file"});_||(_=0),(!k||_+k>w)&&(k=w-_);const S=m(p,n,w,_,k);return s([{depth:g,content:S,name:r,path:o,multihash:e.buffer,size:w,type:"file"}])})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(9),i=n(12),o=n(43),s=n(81);e.exports=((e,t,n,a,u,l,c,f,h,p)=>{let d;if(u.length){const e=u[0];d=t[e];const n=a+"/"+e;if(!d)return s(new Error("not found"));const c=r.isCID(d);return i(o([{depth:p,name:e,path:n,pathRest:u.slice(1),multihash:c&&d,object:!c&&d,parent:h}]),l)}return s(new Error("invalid node type"))})},function(e,t,n){"use strict";(function(t){const r=n(81),i=n(138),o=n(106),s=n(552);e.exports=((e,n,a,u,l,c,f,h,p,d,m)=>{const g=l[0];if(void 0!==g&&g!==u)return o();f=f||n.length;let y=m.offset,b=m.length;return y<0?r(new Error("Offset must be greater than or equal to 0")):y>f?r(new Error("Offset must be less than the file size")):b<0?r(new Error("Length must be greater than or equal to 0")):0===b?i({depth:d,content:i(t.alloc(0)),hash:e,name:a,path:u,size:f,type:"raw"}):(y||(y=0),(!b||y+b>f)&&(b=f-y),i({depth:d,content:i(s(n,0,y,y+b)),hash:e,name:a,path:u,size:f,type:"raw"}))})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(26),i=n(73),o=n(20).Duplex;class s extends o{constructor(e,t,n){super(Object.assign({objectMode:!0},n)),this._pullStream=e,this._pushable=t,this._waitingPullFlush=[]}_read(){this._pullStream(null,(e,t)=>{for(;this._waitingPullFlush.length;){const e=this._waitingPullFlush.shift();e()}e?e instanceof Error&&this.emit("error",e):this.push(t)})}_write(e,t,n){this._waitingPullFlush.push(n),this._pushable.push(e)}}e.exports=function(e){return t=>{t=t||{};const n=i(),o=r(n,e.addPullStream(t)),a=new s(o,n);return a.once("finish",()=>n.end()),a}}},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(26);e.exports=function(e){return r((n,r,o)=>{"function"==typeof r&&(o=r,r={}),i(e.catPullStream(n,r),i.collect((e,n)=>{if(e)return o(e);o(null,t.concat(n))}))})}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const{exporter:r}=n(260),i=n(26),o=n(70),{normalizePath:s}=n(264);e.exports=function(e){return function t(n,a){if("function"==typeof n)throw new Error("You must supply an ipfsPath");a=a||{},n=s(n);const u=n.split("/"),l=s(u.slice(1).join("/")),c=e=>l&&e.path===l||e.path===n;!1!==a.preload&&e._preload(u[0]);const f=o.source();return i(r(n,e._ipld,a),i.filter(c),i.take(1),i.collect((e,t)=>{if(e)return f.abort(e);if(!t.length)return f.abort(new Error("No such file"));const n=t[0];return n.content||"dir"!==n.type?n.content?void f.resolve(n.content):f.abort(new Error("this dag node has no content")):f.abort(new Error("this dag node is a directory"))})),f}}},function(e,t,n){"use strict";const r=n(100);e.exports=function(e){return(t,n)=>r.source(e.catPullStream(t,n))}},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(26);e.exports=function(e){return r((n,r,o)=>{"function"==typeof r&&(o=r,r={}),r=r||{},i(e.getPullStream(n,r),i.asyncMap((e,n)=>{e.content?i(e.content,i.collect((r,i)=>{if(r)return n(r);e.content=t.concat(i),n(null,e)})):n(null,e)}),i.collect(o))})}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const{exporter:r}=n(260),i=n(26),o=n(22),{normalizePath:s}=n(264);e.exports=function(e){return(t,n)=>{if(n=n||{},!1!==n.preload){let n;try{n=s(t).split("/")}catch(e){return i.error(o(e,"ERR_INVALID_PATH"))}e._preload(n[0])}return r(t,e._ipld,n)}}},function(e,t,n){"use strict";const r=n(26),i=n(100);e.exports=function(e){return(t,n)=>(n=n||{},i.source(r(e.getPullStream(t,n),r.map(e=>(e.content&&(e.content=i.source(e.content),e.content.pause()),e)))))}},function(e,t,n){"use strict";const r=n(3),i=n(26);e.exports=function(e){return r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{},i(e.lsPullStream(t,n),i.collect((e,t)=>{if(e)return r(e);r(null,t)}))})}},function(e,t,n){"use strict";(function(t){const{exporter:r}=n(260),i=n(26),o=n(9),{normalizePath:s}=n(264);e.exports=function(e){return function(n,a){a=a||{};const u=s(n),l=a.recursive,c=u.split("/"),f=c.length,h=l?t.Infinity:f;return a.maxDepth=a.maxDepth||h,!1!==a.preload&&e._preload(c[0]),i(r(n,e._ipld,a),i.filter(e=>l?e.depth>=f:e.depth===f),i.map(e=>(e.hash=new o(e.hash).toBaseEncodedString(),delete e.content,e)))}}}).call(this,n(8))},function(e,t,n){"use strict";const r=n(100);e.exports=function(e){return(t,n)=>r.source(e.lsPullStream(t,n))}},function(e,t,n){"use strict";const r=n(1262);e.exports=(e=>r({ipld:e._ipld,repo:e._repo,repoOwner:e._options.repoOwner}))},function(e,t,n){"use strict";e.exports=n(1263)},function(e,t,n){"use strict";const r=n(18),i=n(3),{createLock:o}=n(82),s={ls:n(1302),stat:n(267)},a={cp:n(568),flush:n(1303),mkdir:n(345),mv:n(1304),rm:n(569)},u={write:n(1305),read:n(1306)},l={readPullStream:n(346),readReadableStream:n(1307),lsPullStream:n(344),lsReadableStream:n(1308)},c=({options:e,mfs:t,operations:n,lock:r})=>{Object.keys(n).forEach(o=>{t[o]=i(r(n[o](e)))})},f={repoOwner:!0,ipld:null,repo:null};e.exports=(e=>{const{repoOwner:t}=Object.assign({},f||{},e);r(e.ipld,"MFS requires an IPLD instance"),r(e.repo,"MFS requires an ipfs-repo instance");const n=o(t),h=e=>n.readLock(e),p=e=>n.writeLock(e),d={};return c({options:e,mfs:d,operations:s,lock:h}),c({options:e,mfs:d,operations:a,lock:p}),Object.keys(u).forEach(t=>{d[t]=i(u[t](e))}),Object.keys(l).forEach(t=>{d[t]=l[t](e)}),d})},function(e,t,n){"use strict";const r=n(222),i=e=>{let t=0;return r(e=>(t+=e.length,e),()=>{e(t)})};e.exports=i},function(e,t,n){"use strict";const r=n(1266),i=n(5)("ipfs:mfs:lock");let o;e.exports=(e=>{if(o)return o;const t=r({singleProcess:e}),n=(e,n,r,o)=>{i(`Queuing ${e} operation`),t[`${e}Lock`](()=>new Promise((t,o)=>{r.push((n,r)=>{if(i(`${e.substring(0,1).toUpperCase()}${e.substring(1)} operation callback invoked${n?" with error: "+n.message:""}`),n)return o(n);t(r)}),i(`Starting ${e} operation`),n.apply(null,r)})).then(t=>{i(`Finished ${e} operation`);const n=o;o=null,n(null,t)}).catch(t=>{if(i(`Finished ${e} operation with error: ${t.message}`),o)return o(t);throw i(`Callback already invoked for ${e} operation`),t})};return o={readLock:e=>(function(){const t=Array.from(arguments);let r=t.pop();n("read",e,t,r)}),writeLock:e=>(function(){const t=Array.from(arguments);let r=t.pop();n("write",e,t,r)})},o})},function(e,t,n){(function(t){const r=n(1267),i=n(1277),o=n(1278),{timeout:s}=n(1280),a=n(557),u={};let l;const c=(e,t)=>{if(l.isWorker)return{readLock:l.readLock(e,t),writeLock:l.writeLock(e,t)};const n=new o({concurrency:1});let r=null;return{readLock:e=>{if(r)return r.add(()=>s(e(),t.timeout));r=new o({concurrency:t.concurrency,autoStart:!1});const i=r,a=r.add(()=>s(e(),t.timeout));return n.add(()=>(i.start(),i.onIdle().then(()=>{r===i&&(r=null)}))),a},writeLock:e=>(r=null,n.add(()=>s(e(),t.timeout)))}},f={concurrency:1/0,timeout:846e5,global:t,singleProcess:!1};e.exports=((e,t)=>(t||(t={}),"object"==typeof e&&(t=e,e="lock"),e||(e="lock"),t=Object.assign({},f,t),l||(l=r(t)||i(t),l.isWorker||(l.on("requestReadLock",(e,t)=>{u[e]&&u[e].readLock(t)}),l.on("requestWriteLock",(e,t)=>{u[e]&&u[e].writeLock(t)}))),u[e]||(u[e]=c(e,t)),u[e])),e.exports.Worker=function(e,n){let r;n=n||t.Worker;try{r=new n(e)}catch(t){t.message.includes("not a constructor")&&(r=n(e))}if(!r)throw new Error("Could not create Worker from",n);return a(r),r}}).call(this,n(8))},function(e,t,n){(function(t){const r=n(6).EventEmitter,i=n(555),{WORKER_REQUEST_READ_LOCK:o,WORKER_RELEASE_READ_LOCK:s,MASTER_GRANT_READ_LOCK:a,WORKER_REQUEST_WRITE_LOCK:u,WORKER_RELEASE_WRITE_LOCK:l,MASTER_GRANT_WRITE_LOCK:c}=n(556);let f;const h=(e,t,n,r,i)=>(o,s)=>{s&&s.type===n&&e.emit(t,s.name,()=>(o.send({type:i,name:s.name,identifier:s.identifier}),new Promise(e=>{const t=n=>{n&&n.type===r&&n.identifier===s.identifier&&(o.removeListener("message",t),e())};o.on("message",t)})))},p=(e,n,r,o)=>s=>{const a=i.generate();return t.send({type:n,identifier:a,name:e}),new Promise((n,i)=>{const u=l=>{if(l&&l.type===r&&l.identifier===a){t.removeListener("message",u);let r=null;s().catch(e=>{r=e}).then(s=>{if(t.send({type:o,identifier:a,name:e}),r)return i(r);n(s)})}};t.on("message",u)})};e.exports=(e=>{try{if(f=n(1276),!Object.keys(f).length)return}catch(e){return}if(f.isMaster||e.singleProcess){const e=new r;return f.on("message",h(e,"requestReadLock",o,s,a)),f.on("message",h(e,"requestWriteLock",u,l,c)),e}return{isWorker:!0,readLock:(e,t)=>p(e,o,a,s),writeLock:(e,t)=>p(e,u,c,l)}})}).call(this,n(2))},function(e,t,n){"use strict";var r=n(266),i=n(1270),o=n(1274),s=n(1275)||0;function a(t){return r.seed(t),e.exports}function u(t){return s=t,e.exports}function l(e){return void 0!==e&&r.characters(e),r.shuffled()}function c(){return i(s)}e.exports=c,e.exports.generate=c,e.exports.seed=a,e.exports.worker=u,e.exports.characters=l,e.exports.isValid=o},function(e,t,n){"use strict";var r=1;function i(){return r=(9301*r+49297)%233280,r/233280}function o(e){r=e}e.exports={nextValue:i,seed:o}},function(e,t,n){"use strict";var r=n(1271),i=n(266),o=1459707606518,s=6,a,u;function l(e){var t="",n=Math.floor(.001*(Date.now()-o));return n===u?a++:(a=0,u=n),t+=r(s),t+=r(e),a>0&&(t+=r(a)),t+=r(n),t}e.exports=l},function(e,t,n){"use strict";var r=n(266),i=n(1272),o=n(1273);function s(e){for(var t=0,n,s="";!n;)s+=o(i,r.get(),1),n=e<Math.pow(16,t+1),t++;return s}e.exports=s},function(e,t,n){"use strict";var r="object"==typeof window&&(window.crypto||window.msCrypto),i;i=r&&r.getRandomValues?function(e){return r.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n<e;n++)t.push(Math.floor(256*Math.random()));return t},e.exports=i},function(e,t){e.exports=function(e,t,n){var r=(2<<Math.log(t.length-1)/Math.LN2)-1,i=Math.ceil(1.6*r*n/t.length);n=+n;for(var o="";;)for(var s=e(i),a=0;a<i;a++){var u=s[a]&r;if(t[u]&&(o+=t[u],o.length===n))return o}}},function(e,t,n){"use strict";var r=n(266);function i(e){if(!e||"string"!=typeof e||e.length<6)return!1;var t=new RegExp("[^"+r.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!t.test(e)}e.exports=i},function(e,t,n){"use strict";e.exports=0},function(e,t){},function(e,t,n){(function(t){const r=n(6).EventEmitter,i=n(555),{WORKER_REQUEST_READ_LOCK:o,WORKER_RELEASE_READ_LOCK:s,MASTER_GRANT_READ_LOCK:a,WORKER_REQUEST_WRITE_LOCK:u,WORKER_RELEASE_WRITE_LOCK:l,MASTER_GRANT_WRITE_LOCK:c}=n(556),f=n(557),h=(e,t,n,r,i)=>(o,s)=>{if(!s||!s.data||s.data.type!==n)return;const a={type:s.data.type,name:s.data.name,identifier:s.data.identifier};e.emit(t,a.name,()=>(o.postMessage({type:i,name:a.name,identifier:a.identifier}),new Promise(e=>{const t=n=>{if(!n||!n.data)return;const i={type:n.data.type,name:n.data.name,identifier:n.data.identifier};i&&i.type===r&&i.identifier===a.identifier&&(o.removeEventListener("message",t),e())};o.addEventListener("message",t)})))},p=(e,t,n,r,o)=>s=>{const a=i.generate();return e.postMessage({type:n,identifier:a,name:t}),new Promise((n,i)=>{const u=l=>{if(!l||!l.data)return;const c={type:l.data.type,identifier:l.data.identifier};if(c&&c.type===r&&c.identifier===a){let r;e.removeEventListener("message",u),s().catch(e=>{r=e}).then(s=>(e.postMessage({type:o,identifier:a,name:t}),r?i(r):n(s)))}};e.addEventListener("message",u)})},d={global:t,singleProcess:!1};e.exports=(e=>{e=Object.assign({},d,e);const t=!!e.global.document||e.singleProcess;if(t){const e=new r;return f.addEventListener("message",h(e,"requestReadLock",o,s,a)),f.addEventListener("message",h(e,"requestWriteLock",u,l,c)),e}return{isWorker:!0,readLock:(e,t)=>p(t.global,e,o,a,s),writeLock:(e,t)=>p(t.global,e,u,c,l)}})}).call(this,n(8))},function(e,t,n){"use strict";const r=n(1279);function i(e,t,n){let r=0,i=e.length;for(;i>0;){const o=i/2|0;let s=r+o;n(e[s],t)<=0?(r=++s,i-=o+1):i=o}return r}class o{constructor(){this._queue=[]}enqueue(e,t){t={priority:0,...t};const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)return void this._queue.push(n);const r=i(this._queue,n,(e,t)=>t.priority-e.priority);this._queue.splice(r,0,n)}dequeue(){return this._queue.shift().run}get size(){return this._queue.length}}e.exports=class e extends r{constructor(e){if(super(),e={carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:o,...e},!("number"==typeof e.concurrency&&e.concurrency>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e.concurrency}\` (${typeof e.concurrency})`);if(!("number"==typeof e.intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap}\` (${typeof e.intervalCap})`);if(!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCount=0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._intervalId=null,this._intervalEnd=0,this._timeoutId=null,this.queue=new e.queueClass,this._queueClass=e.queueClass,this._pendingCount=0,this._concurrency=e.concurrency,this._isPaused=!1===e.autoStart,this._resolveEmpty=(()=>{}),this._resolveIdle=(()=>{})}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother()}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=(()=>{}),0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=(()=>{}))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=null}_intervalPaused(){const e=Date.now();if(null===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return null===this._timeoutId&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this.queue.size)return clearInterval(this._intervalId),this._intervalId=null,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._intervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this.queue.dequeue()(),e&&this._initializeIntervalIfNeeded(),!0}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||null!==this._intervalId||(this._intervalId=setInterval(()=>this._onInterval(),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){for(0===this._intervalCount&&0===this._pendingCount&&(clearInterval(this._intervalId),this._intervalId=null),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._tryToStartAnother(););}async add(e,t){return new Promise((n,r)=>{const i=async()=>{this._pendingCount++,this._intervalCount++;try{n(await e())}catch(e){r(e)}this._next()};this.queue.enqueue(i,t),this._tryToStartAnother()})}async addAll(e,t){return Promise.all(e.map(e=>this.add(e,t)))}start(){if(this._isPaused)for(this._isPaused=!1;this._tryToStartAnother(););}pause(){this._isPaused=!0}clear(){this.queue=new this._queueClass}async onEmpty(){if(0!==this.queue.size)return new Promise(e=>{const t=this._resolveEmpty;this._resolveEmpty=(()=>{t(),e()})})}async onIdle(){if(0!==this._pendingCount||0!==this.queue.size)return new Promise(e=>{const t=this._resolveIdle;this._resolveIdle=(()=>{t(),e()})})}get size(){return this.queue.size}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function s(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,r||e,o),u=i?i+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function u(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),l.prototype.eventNames=function e(){var t=[],n,o;if(0===this._eventsCount)return t;for(o in n=this._events)r.call(n,o)&&t.push(i?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t},l.prototype.listeners=function e(t){var n=i?i+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,a=new Array(s);o<s;o++)a[o]=r[o].fn;return a},l.prototype.listenerCount=function e(t){var n=i?i+t:t,r=this._events[n];return r?r.fn?1:r.length:0},l.prototype.emit=function e(t,n,r,o,s,a){var u=i?i+t:t;if(!this._events[u])return!1;var l=this._events[u],c=arguments.length,f,h;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,n),!0;case 3:return l.fn.call(l.context,n,r),!0;case 4:return l.fn.call(l.context,n,r,o),!0;case 5:return l.fn.call(l.context,n,r,o,s),!0;case 6:return l.fn.call(l.context,n,r,o,s,a),!0}for(h=1,f=new Array(c-1);h<c;h++)f[h-1]=arguments[h];l.fn.apply(l.context,f)}else{var p=l.length,d;for(h=0;h<p;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,n);break;case 3:l[h].fn.call(l[h].context,n,r);break;case 4:l[h].fn.call(l[h].context,n,r,o);break;default:if(!f)for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];l[h].fn.apply(l[h].context,f)}}return!0},l.prototype.on=function e(t,n,r){return a(this,t,n,r,!1)},l.prototype.once=function e(t,n,r){return a(this,t,n,r,!0)},l.prototype.removeListener=function e(t,n,r,o){var s=i?i+t:t;if(!this._events[s])return this;if(!n)return u(this,s),this;var a=this._events[s];if(a.fn)a.fn!==n||o&&!a.once||r&&a.context!==r||u(this,s);else{for(var l=0,c=[],f=a.length;l<f;l++)(a[l].fn!==n||o&&!a[l].once||r&&a[l].context!==r)&&c.push(a[l]);c.length?this._events[s]=1===c.length?c[0]:c:u(this,s)}return this},l.prototype.removeAllListeners=function e(t){var n;return t?(n=i?i+t:t,this._events[n]&&u(this,n)):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=i,l.EventEmitter=l,e.exports=l},function(e,t,n){"use strict";var r,i=e.exports.timeout=function(e,t){var n=new r,i;return Promise.race([e,new Promise(function(e,r){i=setTimeout(function(){r(n)},t)})]).then(function(e){return clearTimeout(i),e},function(e){throw clearTimeout(i),e})};r=e.exports.TimeoutError=function(){Error.call(this),this.stack=Error().stack,this.message="Timeout"},r.prototype=Object.create(Error.prototype),r.prototype.name="TimeoutError"},function(e,t,n){"use strict";const r=n(11),i=n(48),{DAGNode:o}=n(38),s=(e,t,n,s)=>{r([e=>o.create(new i(t).marshal(),[],e),(t,r)=>e.ipld.put(t,{version:n.cidVersion,format:n.format,hashAlg:n.hashAlg},(e,n)=>r(e,{cid:n,node:t}))],s)};e.exports=s},function(e,t,n){"use strict";(function(t){const r=n(9);e.exports=((e,n)=>(t.isBuffer(e)&&(e=new r(e)),"base58btc"===n?e.toBaseEncodedString():e.toV1().toBaseEncodedString(n)))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(89),i=e=>{let t=0;return r((n,r)=>{if(t>e)return r(!0);t+n.length>e&&(n=n.slice(0,e-t)),t+=n.length,r(null,n)})};e.exports=i},function(e,t,n){"use strict";const r=n(11),i=n(9),o=n(5)("ipfs:mfs:utils:load-node"),s=(e,t,n)=>{const s=new i(t.cid);o(`Loading DAGNode for child ${s.toBaseEncodedString()}`),r([t=>e.ipld.get(s,t),(e,t)=>t(null,{node:e.value,cid:s})],n)};e.exports=s},function(e,t,n){"use strict";const{DAGNode:r,DAGLink:i}=n(38),o=n(11),s=n(9),a=n(5)("ipfs:mfs:core:utils:remove-link"),u=n(48),{generatePath:l,updateHamtDirectory:c}=n(554),f={parent:void 0,parentCid:void 0,name:"",flush:!0,cidVersion:0,hashAlg:"sha2-256",codec:"dag-pb",shardSplitThreshold:1e3},h=(e,t,n)=>{if(t=Object.assign({},f,t),!t.parentCid)return n(new Error("No parent CID passed to removeLink"));if(!s.isCID(t.parentCid))return n(new Error("Invalid CID passed to addLink"));if(!t.parent)return a("Loading parent node",t.parentCid.toBaseEncodedString()),o([n=>e.ipld.get(t.parentCid,n),(e,t)=>t(null,e.value),(n,r)=>h(e,{...t,parent:n},r)],n);if(!t.name)return n(new Error("No child name passed to removeLink"));const r=u.unmarshal(t.parent.data);return"hamt-sharded-directory"===r.type?(a(`Removing ${t.name} from sharded directory`),d(e,t,n)):(a(`Removing link ${t.name} regular directory`),p(e,t,n))},p=(e,t,n)=>{o([e=>r.rmLink(t.parent,t.name,e),(n,r)=>{e.ipld.put(n,{version:t.cidVersion,format:t.codec,hashAlg:t.hashAlg},(e,t)=>r(e,{node:n,cid:t}))},(e,t)=>{a("Updated regular directory",e.cid.toBaseEncodedString()),t(null,e)}],n)},d=(e,t,n)=>o([n=>l(e,t.name,t.parent,n),({rootBucket:e,path:n},r)=>{e.del(t.name).catch(e=>{r(e),r=null}).then(()=>r&&r(null,{rootBucket:e,path:n}))},({rootBucket:n,path:r},i)=>{m(e,r,{name:t.name,cid:t.cid,size:t.size},t,(e,t={})=>i(e,{rootBucket:n,...t}))},({rootBucket:n,node:r},i)=>c(e,r.links,n,t,i)],n),m=(e,t,n,i,s)=>{const{bucket:u,prefix:l,node:f}=t.pop(),h=f.links.find(e=>e.name.substring(0,2)===l);return h?o([s=>h.name===`${l}${n.name}`?(a(`Removing existing link ${h.name}`),o([e=>r.rmLink(f,h.name,e),(t,n)=>{e.ipld.put(t,{version:i.cidVersion,format:i.codec,hashAlg:i.hashAlg,hashOnly:!i.flush},(e,r)=>n(e,{node:t,cid:r}))},(e,t)=>{u.del(n.name).catch(e=>{t(e),t=null}).then(()=>t&&t(null,e))},(t,n)=>c(e,t.node.links,u,i,n)],s)):(a(`Descending into sub-shard ${h.name} for ${l}${n.name}`),o([r=>m(e,t,n,i,r),(t,n)=>{let r=l;1===t.node.links.length&&(a(`Removing subshard for ${l}`),t.cid=t.node.links[0].cid,t.node=t.node.links[0],r=`${l}${t.node.name.substring(2)}`),a(`Updating shard ${l} with name ${r}`),g(e,u,f,l,r,t.node.size,t.cid,i,n)}],s))],s):s(new Error(`No link found with prefix ${l} for file ${n.name}`))},g=async(e,t,n,s,a,u,l,f,h)=>{o([e=>r.rmLink(n,s,e),(e,t)=>r.addLink(e,new i(a,u,l),t),(n,r)=>c(e,n.links,t,f,r)],h)};e.exports=h},function(e,t,n){"use strict";(function(t,r){const i=n(79),o=n(150),s=n(1287),a=n(187),u=n(1294),l=n(43),c=n(5)("ipfs:mfs:utils:to-pull-source"),f=n(11),h=(e,n,h)=>e?t.isBuffer(e)?(c("Content was a buffer"),n.length||0===n.length||(n.length=n.length||e.length),h(null,l([e]))):"string"==typeof e||e instanceof String?(c("Content was a path"),f([t=>n.length?t(null,{size:n.length}):u.stat(e,t),(t,r)=>{n.length=t.size,r(null,i.source(u.createReadStream(e)))}],h)):(r.Blob&&e instanceof r.Blob&&(c("Content was an HTML5 Blob"),n.length=n.length||e.size,e=s(e)),o(e)?(c("Content was a Node stream"),h(null,i.source(e))):a.isSource(e)?(c("Content was a pull-stream"),h(null,e)):void h(new Error(`Don't know how to convert ${e} into a pull stream source`))):h(new Error("paths must start with a leading /"));e.exports=h}).call(this,n(0).Buffer,n(8))},function(e,t,n){var r=n(1288),i=n(565);e.exports=function(e,t){t=t||{};var n=t.offset||0,o=t.chunkSize||1048576,s=new FileReader(e),a=r(function(t,r){if(n>=e.size)return r(null,null);s.onloadend=function e(t){var n=t.target.result;n instanceof ArrayBuffer&&(n=i(new Uint8Array(t.target.result))),r(null,n)};var a=n+o,u=e.slice(n,a);s.readAsArrayBuffer(u),n=a});return a.name=e.name,a.size=e.size,a.type=e.type,a.lastModified=e.lastModified,s.onerror=function(e){a.destroy(e)},a}},function(e,t,n){(function(t){var r=n(1289).Readable,i=n(1);e.exports=a,a.ctor=u,a.obj=l;var o=u();function s(e){return e=e.slice(),function(t,n){var r=null,i=e.length?e.shift():null;i instanceof Error&&(r=i,i=null),n(r,i)}}function a(e,t){("object"!=typeof e||Array.isArray(e))&&(t=e,e={});var n=new o(e);return n._from=Array.isArray(t)?s(t):t||c,n}function u(e,n){function o(t){if(!(this instanceof o))return new o(t);this._reading=!1,this._callback=s,this.destroyed=!1,r.call(this,t||e);var n=this,i=this._readableState.highWaterMark;function s(e,t){if(!n.destroyed){if(e)return n.destroy(e);if(null===t)return n.push(null);n._reading=!1,n.push(t)&&n._read(i)}}}return"function"==typeof e&&(n=e,e={}),e=f(e),i(o,r),o.prototype._from=n||c,o.prototype._read=function(e){this._reading||this.destroyed||(this._reading=!0,this._from(e,this._callback))},o.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var n=this;t.nextTick(function(){e&&n.emit("error",e),n.emit("close")})}},o}function l(e,t){return("function"==typeof e||Array.isArray(e))&&(t=e,e={}),e=f(e),e.objectMode=!0,e.highWaterMark=16,a(e,t)}function c(){}function f(e){return e=e||{},e}}).call(this,n(2))},function(e,t,n){t=e.exports=n(560),t.Stream=t,t.Readable=t,t.Writable=n(563),t.Duplex=n(151),t.Transform=n(564),t.PassThrough=n(1293)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1292);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(564),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){},function(e,t,n){"use strict";const r=n(567);function i(e,t,n,i){r(e,t,n,(e,t)=>{if(e)return i(e);const n=t.sources.pop();i(null,{destination:n,...t})})}e.exports=i},function(e,t,n){"use strict";const r=n(343),i=n(123),o=n(12),s=n(78),a=n(77),u=n(37),l=n(5)("ipfs:mfs:utils:to-trail"),c=n(9),f=(e,t,n,f)=>{const h=r(t).slice(1),p=`/${h.slice(1).join("/")}`;let d=0;l(`Creating trail for path ${t} ${h}`);let m="";o(i(t,e.ipld,{fullPath:!0,maxDepth:h.length-1}),s(e=>(l(`Saw node ${e.name} for segment ${h[d]} at depth ${e.depth}`),e.name===h[d]&&(d++,!0))),a(e=>{let t="/",n=t;if(m&&(t=`${"/"===m?"":m}/${h[e.depth]}`,n=e.name),m=t,m!==p&&"dir"!==e.type)throw new Error(`cannot access ${m}: Not a directory ${p}`);return{name:n,cid:new c(e.hash),size:e.size,type:e.type}}),u(f))};e.exports=f},function(e,t,n){"use strict";const r=n(5)("ipfs:mfs:utils:update-mfs:root"),i=n(11),o=n(9),{MFS_ROOT_KEY:s}=n(265),a=(e,t,n)=>{const a=new o(t);r(`New MFS root will be ${a.toBaseEncodedString()}`),i([t=>e.repo.datastore.put(s,a.buffer,e=>t(e))],e=>n(e,a))};e.exports=a},function(e,t,n){"use strict";const r=n(11),i=n(1299),o=n(553),s={shardSplitThreshold:1e3},a=(e,t,n,a)=>{n=Object.assign({},s,n),r([n=>e.ipld.getMany(t.map(e=>e.cid),n),(r,s)=>{let a=t.length-1;i(t,null,(i,s,u)=>{const l=r[a],c=t[a].cid;if(a--,!i)return u(null,s);o(e,{parent:l,parentCid:c,name:i.name,cid:i.cid,size:i.size,flush:n.flush,shardSplitThreshold:n.shardSplitThreshold},(e,t)=>{if(e)return u(e);u(e,{cid:t.cid,node:t.node,name:s.name,size:t.node.size})})},s)}],a)};e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=n(1300),i=a(r),o=n(105),s=a(o);function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n,r){var o=(0,s.default)(e).reverse();(0,i.default)(o,t,n,r)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var r=n(297),i=f(r),o=n(67),s=f(o),a=n(216),u=f(a),l=n(42),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n,r){r=(0,u.default)(r||s.default);var o=(0,c.default)(n);(0,i.default)(e,function(e,n,r){o(t,e,function(e,n){t=n,r(e)})},function(e){r(e,t)})}e.exports=t.default},function(e,t,n){"use strict";(function(t){const n=(e=1/0,n=4096)=>{let r=0;return(i,o)=>{if(i)return o&&o(i);if(r>=e){const e=!0;return o(e)}let s=n;r+s>e&&(s=e-r),r+=s,o(null,t.alloc(s,0))}};e.exports=n}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const{FILE_SEPARATOR:r}=n(82),i=n(12),o=n(37),s=n(344);e.exports=(e=>(function t(n,a,u){"function"==typeof n&&(u=n,n=r,a={}),"function"==typeof a&&(u=a,a={}),i(s(e)(n,a),o(u))}))},function(e,t,n){"use strict";const r=n(11),i=n(267),{FILE_SEPARATOR:o}=n(82),s={};e.exports=(e=>(function t(n,a,u){"function"==typeof a&&(u=a,a={}),"function"==typeof n&&(u=n,a={},n=o),n||(n=o),a=Object.assign({},s,a),r([t=>i(e)(n,a,t),(e,t)=>t()],u)}))},function(e,t,n){"use strict";const r=n(40),i=n(11),{toSources:o}=n(82),s=n(568),a=n(569),u={parents:!1,recursive:!1,flush:!0,format:"dag-pb",hashAlg:"sha2-256",shardSplitThreshold:1e3};e.exports=(e=>(function t(){let n=Array.from(arguments);const l=n.pop();Array.isArray(n[0])&&(n=n[0].concat(n.slice(1))),i([t=>o(e,n,u,t),({sources:t,options:n},i)=>{const o=t.map(e=>e.path).concat(n),u=t.slice(0,-1).map(e=>e.path).concat(Object.assign(n,{recursive:!0}));r([t=>s(e).apply(null,o.concat(t)),t=>a(e).apply(null,u.concat(t))],i)}],l)}))},function(e,t,n){"use strict";const r=n(3),i=n(11),o=n(54),s=n(40),{createLock:a,updateMfsRoot:u,addLink:l,updateTree:c,toMfsPath:f,toPathComponents:h,toPullSource:p,loadNode:d,limitStreamBytes:m,countStreamBytes:g,toTrail:y,zeros:b}=n(82),{unmarshal:v}=n(48),w=n(12),_=n(256),k=n(37),S=n(106),E=n(81),x=n(5)("ipfs:mfs:write"),C=n(43),A=n(123),I=n(550),T=n(70),j=n(9),O=n(267),P=n(345),B={offset:0,length:void 0,create:!1,truncate:!1,rawLeaves:!1,reduceSingleLeafToSelf:!1,cidVersion:0,hashAlg:"sha2-256",format:"dag-pb",parents:!1,progress:()=>{},strategy:"trickle",flush:!0,leafType:"raw",shardSplitThreshold:1e3};e.exports=function e(t){return r((e,n,r,u)=>("function"==typeof r&&(u=r,r={}),r=Object.assign({},B,r),r.offset<0?u(new Error("cannot have negative write offset")):r.length<0?u(new Error("cannot have negative byte count")):(r.length||0===r.length||(r.length=1/0),r.cidVersion=r.cidVersion||0,void i([u=>{a().readLock(a=>{i([i=>{o({source:e=>p(n,r,e),path:n=>f(t,e,n)},i)},({source:n,path:{mfsPath:r,mfsDirectory:i}},o)=>{s({mfsDirectory:e=>O(t)(i,{unsorted:!0,long:!0},(t,n)=>{t&&t.message.includes("does not exist")&&(t=null),e(t,n)}),mfsPath:e=>O(t)(r,{unsorted:!0,long:!0},(t,n)=>{t&&t.message.includes("does not exist")&&(t=null),e(t,n)})},(t,r={})=>{o(t,{source:n,path:e,mfsDirectory:r.mfsDirectory,mfsPath:r.mfsPath})})}],a)})(u)},({source:e,path:n,mfsDirectory:i,mfsPath:o},s)=>r.parents||i?r.create||o?void R(t,r,n,e,o,s):s(new Error("file does not exist")):s(new Error("directory does not exist"))],e=>u(e)))))};const R=(e,t,n,r,o,s)=>{i([t=>{if(o)return d(e,{cid:o.hash},t);t(null,null)},(n,i)=>{const{cid:o,node:s}=n||{};N(e,o,s,r,t,i)},(r,o)=>{a().writeLock(o=>{const s=h(n),a=s.pop();i([n=>O(e)(`/${s.join("/")}`,t,(e,t)=>{e&&e.message.includes("does not exist")&&(e=null),n(null,Boolean(t))}),(n,r)=>{if(n)return r();P(e)(`/${s.join("/")}`,t,r)},t=>f(e,n,t),({mfsDirectory:n,root:i},o)=>{y(e,n,t,(n,i)=>{if(n)return o(n);const s=i[i.length-1];if("dir"!==s.type)return o(new Error(`cannot write to ${s.name}: Not a directory`));e.ipld.get(s.cid,(n,u)=>{if(n)return o(n);l(e,{parent:u.value,parentCid:s.cid,name:a,cid:r.cid,size:r.size,flush:t.flush,shardSplitThreshold:t.shardSplitThreshold},(e,t)=>{if(e)return o(e);s.cid=t.cid,s.size=t.node.size,o(null,i)})})})},(n,r)=>c(e,n,t,r),({cid:t},n)=>u(e,t,n)],o)})(o)}],s)},N=(e,t,n,r,i,o)=>{let s;n?(s=v(n.data),x(`Overwriting file ${t.toBaseEncodedString()} offset ${i.offset} length ${i.length}`)):x(`Writing file offset ${i.offset} length ${i.length}`);const a=[];if(i.offset>0)if(n&&s.fileSize()>i.offset){x(`Writing first ${i.offset} bytes of original file`);const n=T.source();a.push(n),w(A(t,e.ipld,{offset:0,length:i.offset}),k((e,t)=>{if(e)return n.resolve(E(e));n.resolve(t[0].content)}))}else x(`Writing zeros for first ${i.offset} bytes`),a.push(b(i.offset));const u=T.source();a.push(w(r,m(i.length),g(r=>{if(x(`Wrote ${r} bytes`),n&&!i.truncate){const n=s.fileSize(),o=i.offset+r;n>o?(x(`Writing last ${n-o} of ${n} bytes from original file`),w(A(t,e.ipld,{offset:o}),k((e,t)=>{if(e)return u.resolve(E(e));u.resolve(t[0].content)}))):(x("Not writing last bytes from original file"),u.resolve(S()))}}))),n&&!i.truncate&&a.push(u),w(C([{path:"",content:_(a)}]),I(e.ipld,{progress:i.progress,hashAlg:i.hashAlg,cidVersion:i.cidVersion,strategy:i.strategy,rawLeaves:i.rawLeaves,reduceSingleLeafToSelf:i.reduceSingleLeafToSelf,leafType:i.leafType}),k((e,t)=>{if(e)return o(e);const n=t.pop(),r=new j(n.multihash);x(`Wrote ${r.toBaseEncodedString()}`),o(null,{cid:r,size:n.size})}))}},function(e,t,n){"use strict";(function(t){const r=n(12),i=n(37),o=n(346);e.exports=(e=>(function n(s,a,u){"function"==typeof a&&(u=a,a={}),r(o(e)(s,a),i((e,n)=>e?u(e):u(null,t.concat(n))))}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(346),i=n(100);e.exports=(e=>(function t(n,o={}){return i.source(r(e)(n,o))}))},function(e,t,n){"use strict";const r=n(344),i=n(100);e.exports=(e=>(function t(n,o={}){return i.source(r(e)(n,o))}))},function(e,t,n){"use strict";const r=n(3),i=n(14),o=n(22),s=()=>o(new Error("pubsub experiment is not enabled"),"ERR_PUBSUB_DISABLED");e.exports=function e(t){return{subscribe:(e,n,r,o)=>("function"==typeof r&&(o=r,r={}),t._options.EXPERIMENTAL.pubsub?o?void t.libp2p.pubsub.subscribe(e,r,n,o):new Promise((i,o)=>{t.libp2p.pubsub.subscribe(e,r,n,e=>{if(e)return o(e);i()})}):o?i(()=>o(s())):Promise.reject(s())),unsubscribe:(e,n,r)=>t._options.EXPERIMENTAL.pubsub?(t.libp2p.pubsub.unsubscribe(e,n),r?void i(()=>r()):Promise.resolve()):r?i(()=>r(s())):Promise.reject(s()),publish:r((e,n,r)=>{if(!t._options.EXPERIMENTAL.pubsub)return i(()=>r(s()));t.libp2p.pubsub.publish(e,n,r)}),ls:r(e=>{if(!t._options.EXPERIMENTAL.pubsub)return i(()=>e(s()));t.libp2p.pubsub.ls(e)}),peers:r((e,n)=>{if(!t._options.EXPERIMENTAL.pubsub)return i(()=>n(s()));t.libp2p.pubsub.peers(e,n)}),setMaxListeners(e){if(!t._options.EXPERIMENTAL.pubsub)throw s();t.libp2p.pubsub.setMaxListeners(e)}}}},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(1311),o=n(23),s=n(9),a=n(56),u=n(14),l=n(22);e.exports=(e=>({get:r((n,r,i)=>{if(!t.isBuffer(n))return i(new Error("Not valid key"));"function"==typeof r&&(i=r,r={}),r=r||{},e.libp2p.dht.get(n,r.timeout,i)}),put:r((n,r,i)=>{if(!t.isBuffer(n))return i(new Error("Not valid key"));e.libp2p.dht.put(n,r,i)}),findprovs:r((t,n,r)=>{if("function"==typeof n&&(r=n,n={}),n=n||{},"string"==typeof t)try{t=new s(t)}catch(e){return u(()=>r(l(e,"ERR_INVALID_CID")))}"function"==typeof n&&(r=n,n={}),n=n||{},e.libp2p.contentRouting.findProviders(t,n.timeout||null,r)}),findpeer:r((t,n)=>{"string"==typeof t&&(t=o.createFromB58String(t)),e.libp2p.peerRouting.findPeer(t,(e,t)=>{if(e)return n(e);const r=[{Responses:[{ID:t.id.toB58String(),Addresses:t.multiaddrs.toArray().map(e=>e.toString())}]}];n(null,r)})}),provide:r((t,n,r)=>{Array.isArray(t)||(t=[t]),"function"==typeof n&&(r=n,n={}),n=n||{},i(t,(t,n)=>{e._repo.blocks.has(t,n)},(i,o)=>i?r(i):o?void(n.recursive||a(t,(t,n)=>{e.libp2p.contentRouting.provide(t,n)},r)):r(new Error("block(s) not found locally, cannot provide")))}),query:r((t,n)=>{"string"==typeof t&&(t=o.createFromB58String(t)),e.libp2p._dht.getClosestPeers(t.toBytes(),(e,t)=>{if(e)return n(e);n(null,t.map(e=>({ID:e.toB58String()})))})})}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241),i=l(r),o=n(174),s=l(o),a=n(1312),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)((0,i.default)(u.default,u.default)),e.exports=t.default},function(e,t,n){"use strict";function r(e){return!e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";const r=n(1314),i=n(3);e.exports=(()=>i((e,t,n)=>{if("string"!=typeof e)return n(new Error("Invalid arguments, domain must be a string"));"function"==typeof t&&(n=t,t={}),t=t||{},r(e,t,n)}))},function(e,t,n){"use strict";e.exports=((e,t,n)=>{"function"==typeof t&&(n=t,t={}),t=t||{},e=encodeURIComponent(e);let r=`https://ipfs.io/api/v0/dns?arg=${e}`;Object.keys(t).forEach(e=>{r+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`}),self.fetch(r,{mode:"cors"}).then(e=>e.json()).then(e=>e.Path?n(null,e.Path):n(new Error(e.Message))).catch(e=>{n(e)})})},function(e,t,n){"use strict";const r=n(3);e.exports=function e(t){return{gen:r((e,n,r)=>{n=n||{},t._keychain.createKey(e,n.type,n.size,r)}),info:r((e,n)=>{t._keychain.findKeyByName(e,n)}),list:r(e=>{t._keychain.listKeys(e)}),rm:r((e,n)=>{t._keychain.removeKey(e,n)}),rename:r((e,n,r)=>{t._keychain.renameKey(e,n,(t,n)=>{if(t)return r(t);const i={was:e,now:n.name,id:n.id,overwrite:!1};r(null,i)})}),import:r((e,n,r,i)=>{t._keychain.importKey(e,n,r,i)}),export:r((e,n,r)=>{t._keychain.exportKey(e,n,r)})}}},function(e,t,n){"use strict";const r=n(3),i=n(62),o=n(73),s=n(571),a=n(100),u=n(22);function l(e,t){return new Promise((n,r)=>{let o;o=t.peer?e.libp2p.stats.forPeer(t.peer):t.proto?e.libp2p.stats.forProtocol(t.proto):e.libp2p.stats.global,n(o?{totalIn:o.snapshot.dataReceived,totalOut:o.snapshot.dataSent,rateIn:new i(o.movingAverages.dataReceived[6e4].movingAverage()/60),rateOut:new i(o.movingAverages.dataSent[6e4].movingAverage()/60)}:{totalIn:new i(0),totalOut:new i(0),rateIn:new i(0),rateOut:new i(0)})})}e.exports=function e(t){const i=e=>{e=e||{};let n=null,r=o(!0,()=>{n&&clearInterval(n)});return e.poll?s(e.interval||"1s",(i,o)=>{if(i)return r.end(u(i,"ERR_INVALID_POLL_INTERVAL"));n=setInterval(()=>{l(t,e).then(e=>r.push(e)).catch(e=>r.end(e))},o)}):l(t,e).then(e=>{r.push(e),r.end()}).catch(e=>r.end(e)),r.source};return{bitswap:n(570)(t).stat,repo:n(545)(t).stat,bw:r((e,n)=>{"function"==typeof e&&(n=e,e={}),e=e||{},l(t,e).then(e=>n(null,e)).catch(e=>n(e))}),bwReadableStream:e=>a.source(i(e)),bwPullStream:i}}},function(e,t,n){"use strict";const r=n(3),i=n(65),o=n(14),s=n(409),a=n(9),{cidToString:u}=n(1318);e.exports=(e=>{return r((e,n,r)=>{if("function"==typeof n&&(r=n,n={}),n=n||{},!i.path(e))return o(()=>r(new Error("invalid argument")));if(!i.ipfsPath(e))return o(()=>r(new Error("resolve non-IPFS names is not implemented")));const s=e.split("/"),l=new a(s[2]);if(3===s.length)return o(()=>r(null,`/ipfs/${u(l,{base:n.cidBase})}`));const c=s.slice(3).join("/");t(l,c,(e,t)=>e?r(e):t?void r(null,`/ipfs/${u(t,{base:n.cidBase})}`):r(new Error("found non-link at given path")))});function t(t,n,r){let i;s(r=>{e.block.get(t,(o,s)=>{if(o)return r(o);const a=e._ipld.resolvers[t.codec];if(!a)return r(new Error(`No resolver found for codec "${t.codec}"`));a.resolver.resolve(s.data,n,(e,t)=>{if(e)return r(e);i=t.value,n=t.remainderPath,r()})})},()=>{const e=!n||"/"===n;return!!e||(i&&(t=new a(i["/"])),!1)},e=>e?r(e):i&&i["/"]?r(null,new a(i["/"])):void r())}})},function(e,t,n){"use strict";const r=n(9);t.cidToString=((e,t)=>{if(t=t||{},t.base=t.base||null,t.upgrade=!1!==t.upgrade,r.isCID(e)||(e=new r(e)),0===e.version&&t.base&&"base58btc"!==t.base){if(!t.upgrade)return e.toString();e=e.toV1()}return e.toBaseEncodedString(t.base)})},function(e,t,n){"use strict";const r=n(5),i=n(3),o=n(11),s=n(54),a=n(571),u=n(64),l=n(22),c=r("jsipfs:name");c.error=r("jsipfs:name:error");const f=n(1320),h=n(186),p=n(498),d=(e,t,n)=>{if("self"===t)return n(null,e._peerInfo.id.privKey);const r=e._options.pass;o([n=>e._keychain.exportKey(t,r,n),(e,t)=>u.keys.import(e,r,t)],(e,t)=>e?(c.error(e),n(l(e,"ERR_CANNOT_GET_KEY"))):n(null,t))};e.exports=function e(t){return{publish:i((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};const i=!(!1===n.resolve),o=n.lifetime||"24h",u=n.key||"self";if(!t.isOnline()){const e=h.OFFLINE_ERROR;return c.error(e),r(l(e,"OFFLINE_ERROR"))}try{e=h.normalizePath(e)}catch(e){return c.error(e),r(e)}s([e=>a(o,e),e=>d(t,u,e),n=>"true"===i.toString()?p.resolvePath(t,e,n):n()],(n,i)=>{if(n)return c.error(n),r(n);const o=i[0].toFixed(6),s=i[1];t._ipns.publish(s,e,o,r)})}),resolve:i((e,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{};const i=n.nocache&&"true"===n.nocache.toString(),o=n.recursive&&"true"===n.recursive.toString(),s=t._options.local;if(!t.isOnline()&&!s){const e=h.OFFLINE_ERROR;return c.error(e),r(l(e,"OFFLINE_ERROR"))}if(s&&i){const e="cannot specify both local and nocache";return c.error(e),r(l(new Error(e),"ERR_NOCACHE_AND_LOCAL"))}e||(e=t._peerInfo.id.toB58String()),e.startsWith("/ipns/")||(e=`/ipns/${e}`);const a={nocache:i,recursive:o};t._ipns.resolve(e,a,r)}),pubsub:f(t)}}},function(e,t,n){"use strict";const r=n(5),i=n(22),o=n(3),s=n(499),a=r("jsipfs:name-pubsub");a.error=r("jsipfs:name-pubsub:error");const u=e=>{try{return Boolean(l(e))}catch(e){return!1}},l=e=>{if(!e._ipns||!e._options.EXPERIMENTAL.ipnsPubsub){const e="IPNS pubsub subsystem is not enabled";throw i(e,"ERR_IPNS_PUBSUB_NOT_ENABLED")}if(s.isIpnsPubsubDatastore(e._ipns.routing))return e._ipns.routing;const t=(e._ipns.routing.stores||[]).find(e=>s.isIpnsPubsubDatastore(e));if(!t){const e="IPNS pubsub datastore not found";throw i(e,"ERR_PUBSUB_DATASTORE_NOT_FOUND")}return t};e.exports=function e(t){return{state:o(e=>{e(null,{enabled:u(t)})}),cancel:o((e,n)=>{let r;try{r=l(t)}catch(e){return n(e)}r.cancel(e,n)}),subs:o(e=>{let n;try{n=l(t)}catch(t){return e(t)}n.getSubscriptions(e)})}}},function(e,t,n){"use strict";const r=n(224);e.exports=(e=>{const t=e||"ipfs";return new r(t)})},function(e,t,n){"use strict";const r=n(14),i=n(1323),o=n(506),s=n(5),a=n(9),u=n(1325),l=s("jsipfs:preload");l.error=s("jsipfs:preload:error");const c=e=>{e&&l.error(e)};function f(e){return e.endsWith("http")||e.endsWith("https")||(e+="/http"),o(e)}e.exports=(e=>{const t=e._options.preload||{};if(t.enabled=Boolean(t.enabled),t.addresses=t.addresses||[],!t.enabled||!t.addresses.length){const e=(e,t)=>{t&&r(()=>t())};return e.start=(()=>{}),e.stop=(()=>{}),e}let n=!0,o=[];const s=t.addresses.map(f),h=(e,t)=>{if(t=t||c,"string"!=typeof e)try{e=new a(e).toBaseEncodedString()}catch(e){return r(()=>t(e))}const f=Array.from(s);let h;const p=Date.now();i({times:f.length},t=>{if(n)return t(new Error(`preload aborted for ${e}`));o=o.filter(e=>e!==h);const r=f.shift();h=u(`${r}/api/v0/refs?r=true&arg=${e}`,t),o=o.concat(h)},n=>{if(o=o.filter(e=>e!==h),n)return t(n);l(`preloaded ${e} in ${Date.now()-p}ms`),t()})};return h.start=(()=>{n=!1}),h.stop=(()=>{n=!0,l(`canceling ${o.length} pending preload request(s)`),o.forEach(e=>e.cancel()),o=[]}),h})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(67),i=l(r),o=n(1324),s=l(o),a=n(42),u=l(a);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){var r=5,o=0,a={times:r,intervalFunc:(0,s.default)(o)};function l(e,t){if("object"==typeof t)e.times=+t.times||r,e.intervalFunc="function"==typeof t.interval?t.interval:(0,s.default)(+t.interval||o),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||r}}if(arguments.length<3&&"function"==typeof e?(n=t||i.default,t=e):(l(a,e),n=n||i.default),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var c=(0,u.default)(t),f=1;function h(){c(function(e){e&&f++<a.times&&("function"!=typeof a.errorFilter||a.errorFilter(e))?setTimeout(h,a.intervalFunc(f)):n.apply(null,arguments)})}h()}e.exports=t.default},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){"use strict";const r=n(5),i=r("jsipfs:preload");i.error=r("jsipfs:preload:error"),e.exports=function e(t,n){i(t);const r=new AbortController,o=r.signal;return fetch(t,{signal:o}).then(e=>{if(!e.ok)throw i.error("failed to preload",t,e.status,e.statusText),new Error(`failed to preload ${t}`);return e.text()}).then(()=>n()).catch(n),{cancel:()=>r.abort()}}},function(e,t,n){"use strict";const r=n(5),i=r("jsipfs:mfs-preload");i.error=r("jsipfs:mfs-preload:error"),e.exports=(e=>{const t=e._options.preload||{};if(t.interval=t.interval||3e4,!t.enabled)return i("MFS preload disabled"),{start:e=>setImmediate(e),stop:e=>setImmediate(e)};let n,r;const o=()=>{e.files.stat("/",(s,a)=>s?(r=setTimeout(o,t.interval),i.error("failed to stat MFS root for preload",s)):n!==a.hash?(i(`preloading updated MFS root ${n} -> ${a.hash}`),e._preload(a.hash,e=>{if(r=setTimeout(o,t.interval),e)return i.error(`failed to preload MFS root ${a.hash}`,e);n=a.hash})):void(r=setTimeout(o,t.interval)))};return{start(s){e.files.stat("/",(e,a)=>{if(e)return s(e);n=a.hash,i(`monitoring MFS root ${n}`),r=setTimeout(o,t.interval),s()})},stop(e){clearTimeout(r),e()}}})},function(e,t,n){"use strict";t.resolver=n(347),t.util=n(572)},function(e,t,n){const r=n(29);e.exports={Block:n(1356),ECPair:n(581),Transaction:n(349),TransactionBuilder:n(1360),address:n(583),bip32:n(1385),crypto:n(108),networks:n(83),opcodes:n(36),payments:n(351),script:r}},function(e){e.exports={name:"elliptic",version:"6.4.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,n){"use strict";var r=t,i=n(63),o=n(107),s=n(573);function a(e,t){for(var n=[],r=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(r-1);o=s>(r>>1)-1?(r>>1)-s:s,i.isubn(o)}else o=0;n.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(r-1)?t+1:1,u=1;u<a;u++)n.push(0);i.iushrn(a)}return n}function u(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o=e.andln(3)+r&3,s=t.andln(3)+i&3,a,u;if(3===o&&(o=-1),3===s&&(s=-1),0==(1&o))a=0;else{var l=e.andln(7)+r&7;a=3!==l&&5!==l||2!==s?o:-o}if(n[0].push(a),0==(1&s))u=0;else{var l=t.andln(7)+i&7;u=3!==l&&5!==l||2!==o?s:-s}n[1].push(u),2*r===a+1&&(r=1-r),2*i===u+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n}function l(e,t,n){var r="_"+t;e.prototype[t]=function e(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}}function c(e){return"string"==typeof e?r.toArray(e,"hex"):e}function f(e){return new i(e,"hex","le")}r.assert=o,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=a,r.getJSF=u,r.cachedProperty=l,r.parseBytes=c,r.intFromLE=f},function(e,t){},function(e,t,n){"use strict";var r=n(63),i=n(74),o=i.utils,s=o.getNAF,a=o.getJSF,u=o.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function e(){throw new Error("Not implemented")},l.prototype.validate=function e(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function e(t,n){u(t.precomputed);var r=t._getDoubles(),i=s(n,1),o=(1<<r.step+1)-(r.step%2==0?2:1);o/=3;for(var a=[],l=0;l<i.length;l+=r.step){for(var c=0,n=l+r.step-1;n>=l;n--)c=(c<<1)+i[n];a.push(c)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),p=o;p>0;p--){for(var l=0;l<a.length;l++){var c=a[l];c===p?h=h.mixedAdd(r.points[l]):c===-p&&(h=h.mixedAdd(r.points[l].neg()))}f=f.add(h)}return f.toP()},l.prototype._wnafMul=function e(t,n){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var o=i.points,a=s(n,r),l=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var n=0;c>=0&&0===a[c];c--)n++;if(c>=0&&n++,l=l.dblp(n),c<0)break;var f=a[c];u(0!==f),l="affine"===t.type?f>0?l.mixedAdd(o[f-1>>1]):l.mixedAdd(o[-f-1>>1].neg()):f>0?l.add(o[f-1>>1]):l.add(o[-f-1>>1].neg())}return"affine"===t.type?l.toP():l},l.prototype._wnafMulAdd=function e(t,n,r,i,o){for(var u=this._wnafT1,l=this._wnafT2,c=this._wnafT3,f=0,h=0;h<i;h++){var p=n[h],d=p._getNAFPoints(t);u[h]=d.wnd,l[h]=d.points}for(var h=i-1;h>=1;h-=2){var m=h-1,g=h;if(1===u[m]&&1===u[g]){var y=[n[m],null,null,n[g]];0===n[m].y.cmp(n[g].y)?(y[1]=n[m].add(n[g]),y[2]=n[m].toJ().mixedAdd(n[g].neg())):0===n[m].y.cmp(n[g].y.redNeg())?(y[1]=n[m].toJ().mixedAdd(n[g]),y[2]=n[m].add(n[g].neg())):(y[1]=n[m].toJ().mixedAdd(n[g]),y[2]=n[m].toJ().mixedAdd(n[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[m],r[g]);f=Math.max(v[0].length,f),c[m]=new Array(f),c[g]=new Array(f);for(var w=0;w<f;w++){var _=0|v[0][w],k=0|v[1][w];c[m][w]=b[3*(_+1)+(k+1)],c[g][w]=0,l[m]=y}}else c[m]=s(r[m],u[m]),c[g]=s(r[g],u[g]),f=Math.max(c[m].length,f),f=Math.max(c[g].length,f)}for(var S=this.jpoint(null,null,null),E=this._wnafT4,h=f;h>=0;h--){for(var x=0;h>=0;){for(var C=!0,w=0;w<i;w++)E[w]=0|c[w][h],0!==E[w]&&(C=!1);if(!C)break;x++,h--}if(h>=0&&x++,S=S.dblp(x),h<0)break;for(var w=0;w<i;w++){var A=E[w],p;0!==A&&(A>0?p=l[w][A-1>>1]:A<0&&(p=l[w][-A-1>>1].neg()),S="affine"===p.type?S.mixedAdd(p):S.add(p))}}for(var h=0;h<i;h++)l[h]=null;return o?S:S.toP()},l.BasePoint=c,c.prototype.eq=function e(){throw new Error("Not implemented")},c.prototype.validate=function e(){return this.curve.validate(this)},l.prototype.decodePoint=function e(t,n){t=o.toArray(t,n);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r){6===t[0]?u(t[t.length-1]%2==0):7===t[0]&&u(t[t.length-1]%2==1);var i=this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));return i}if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function e(t){return this.encode(t,!0)},c.prototype._encode=function e(t){var n=this.curve.p.byteLength(),r=this.getX().toArray("be",n);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",n))},c.prototype.encode=function e(t,n){return o.encode(this._encode(n),t)},c.prototype.precompute=function e(t){if(this.precomputed)return this;var n={doubles:null,naf:null,beta:null};return n.naf=this._getNAFPoints(8),n.doubles=this._getDoubles(4,t),n.beta=this._getBeta(),this.precomputed=n,this},c.prototype._hasDoubles=function e(t){if(!this.precomputed)return!1;var n=this.precomputed.doubles;return!!n&&n.points.length>=Math.ceil((t.bitLength()+1)/n.step)},c.prototype._getDoubles=function e(t,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,o=0;o<n;o+=t){for(var s=0;s<t;s++)i=i.dbl();r.push(i)}return{step:t,points:r}},c.prototype._getNAFPoints=function e(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var n=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),o=1;o<r;o++)n[o]=n[o-1].add(i);return{wnd:t,points:n}},c.prototype._getBeta=function e(){return null},c.prototype.dblp=function e(t){for(var n=this,r=0;r<t;r++)n=n.dbl();return n}},function(e,t,n){"use strict";var r=n(268),i=n(74),o=n(63),s=n(1),a=r.base,u=i.utils.assert;function l(e){a.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,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 f(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(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}s(l,a),e.exports=l,l.prototype._getEndomorphism=function e(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r,i;if(t.beta)n=new o(t.beta,16).toRed(this.red);else{var s=this._getEndoRoots(this.p);n=s[0].cmp(s[1])<0?s[0]:s[1],n=n.toRed(this.red)}if(t.lambda)r=new o(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(n))?r=a[0]:(r=a[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return i=t.basis?t.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r),{beta:n,lambda:r,basis:i}}},l.prototype._getEndoRoots=function e(t){var n=t===this.p?this.red:o.mont(t),r=new o(2).toRed(n).redInvm(),i=r.redNeg(),s=new o(3).toRed(n).redNeg().redSqrt().redMul(r),a=i.redAdd(s).fromRed(),u=i.redSub(s).fromRed();return[a,u]},l.prototype._getEndoBasis=function e(t){for(var n=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=t,i=this.n.clone(),s=new o(1),a=new o(0),u=new o(0),l=new o(1),c,f,h,p,d,m,g,y=0,b,v;0!==r.cmpn(0);){var w=i.div(r);b=i.sub(w.mul(r)),v=u.sub(w.mul(s));var _=l.sub(w.mul(a));if(!h&&b.cmp(n)<0)c=g.neg(),f=s,h=b.neg(),p=v;else if(h&&2==++y)break;g=b,i=r,r=b,u=s,s=v,l=a,a=_}d=b.neg(),m=v;var k=h.sqr().add(p.sqr()),S=d.sqr().add(m.sqr());return S.cmp(k)>=0&&(d=c,m=f),h.negative&&(h=h.neg(),p=p.neg()),d.negative&&(d=d.neg(),m=m.neg()),[{a:h,b:p},{a:d,b:m}]},l.prototype._endoSplit=function e(t){var n=this.endo.basis,r=n[0],i=n[1],o=i.b.mul(t).divRound(this.n),s=r.b.neg().mul(t).divRound(this.n),a=o.mul(r.a),u=s.mul(i.a),l=o.mul(r.b),c=s.mul(i.b),f=t.sub(a).sub(u),h=l.add(c).neg();return{k1:f,k2:h}},l.prototype.pointFromX=function e(t,n){t=new o(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var s=i.fromRed().isOdd();return(n&&!s||!n&&s)&&(i=i.redNeg()),this.point(t,i)},l.prototype.validate=function e(t){if(t.inf)return!0;var n=t.x,r=t.y,i=this.a.redMul(n),o=n.redSqr().redMul(n).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},l.prototype._endoWnafMulAdd=function e(t,n,r){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s<t.length;s++){var a=this._endoSplit(n[s]),u=t[s],l=u._getBeta();a.k1.negative&&(a.k1.ineg(),u=u.neg(!0)),a.k2.negative&&(a.k2.ineg(),l=l.neg(!0)),i[2*s]=u,i[2*s+1]=l,o[2*s]=a.k1,o[2*s+1]=a.k2}for(var c=this._wnafMulAdd(1,i,o,2*s,r),f=0;f<2*s;f++)i[f]=null,o[f]=null;return c},s(c,a.BasePoint),l.prototype.point=function e(t,n,r){return new c(this,t,n,r)},l.prototype.pointFromJSON=function e(t,n){return c.fromJSON(this,t,n)},c.prototype._getBeta=function e(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};t.beta=n,n.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return n}},c.prototype.toJSON=function e(){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]},c.fromJSON=function e(t,n,r){"string"==typeof n&&(n=JSON.parse(n));var i=t.point(n[0],n[1],r);if(!n[2])return i;function o(e){return t.point(e[0],e[1],r)}var s=n[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(o))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(o))}},i},c.prototype.inspect=function e(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function e(){return this.inf},c.prototype.add=function e(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 n=this.y.redSub(t.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(t.x).redInvm()));var r=n.redSqr().redISub(this.x).redISub(t.x),i=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.prototype.dbl=function e(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(n).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},c.prototype.getX=function e(){return this.x.fromRed()},c.prototype.getY=function e(){return this.y.fromRed()},c.prototype.mul=function e(t){return t=new o(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function e(t,n,r){var i=[this,n],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)},c.prototype.jmulAdd=function e(t,n,r){var i=[this,n],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)},c.prototype.eq=function e(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function e(t){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};n.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return n},c.prototype.toJ=function e(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t},s(f,a.BasePoint),l.prototype.jpoint=function e(t,n,r){return new f(this,t,n,r)},f.prototype.toP=function e(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),n=t.redSqr(),r=this.x.redMul(n),i=this.y.redMul(n).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function e(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function e(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var n=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(n),o=t.x.redMul(r),s=this.y.redMul(n.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),u=i.redSub(o),l=s.redSub(a);if(0===u.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=u.redSqr(),f=c.redMul(u),h=i.redMul(c),p=l.redSqr().redIAdd(f).redISub(h).redISub(h),d=l.redMul(h.redISub(p)).redISub(s.redMul(f)),m=this.z.redMul(t.z).redMul(u);return this.curve.jpoint(p,d,m)},f.prototype.mixedAdd=function e(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var n=this.z.redSqr(),r=this.x,i=t.x.redMul(n),o=this.y,s=t.y.redMul(n).redMul(this.z),a=r.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),f=r.redMul(l),h=u.redSqr().redIAdd(c).redISub(f).redISub(f),p=u.redMul(f.redISub(h)).redISub(o.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,p,d)},f.prototype.dblp=function e(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var n=this,r=0;r<t;r++)n=n.dbl();return n}for(var i=this.curve.a,o=this.curve.tinv,s=this.x,a=this.y,u=this.z,l=u.redSqr().redSqr(),c=a.redAdd(a),r=0;r<t;r++){var f=s.redSqr(),h=c.redSqr(),p=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(l)),m=s.redMul(h),g=d.redSqr().redISub(m.redAdd(m)),y=m.redISub(g),b=d.redMul(y);b=b.redIAdd(b).redISub(p);var v=c.redMul(u);r+1<t&&(l=l.redMul(p)),s=g,u=v,c=b}return this.curve.jpoint(s,c.redMul(o),u)},f.prototype.dbl=function e(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function e(){var t,n,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var u=i.redAdd(i).redIAdd(i),l=u.redSqr().redISub(a).redISub(a),c=s.redIAdd(s);c=c.redIAdd(c),c=c.redIAdd(c),t=l,n=u.redMul(a.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),p=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(p);d=d.redIAdd(d);var m=f.redAdd(f).redIAdd(f),g=m.redSqr(),y=p.redIAdd(p);y=y.redIAdd(y),y=y.redIAdd(y),t=g.redISub(d).redISub(d),n=m.redMul(d.redISub(t)).redISub(y),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(t,n,r)},f.prototype._threeDbl=function e(){var t,n,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var u=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),l=u.redSqr().redISub(a).redISub(a);t=l;var c=s.redIAdd(s);c=c.redIAdd(c),c=c.redIAdd(c),n=u.redMul(a.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),p=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var m=p.redIAdd(p);m=m.redIAdd(m);var g=m.redAdd(m);t=d.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var y=h.redSqr();y=y.redIAdd(y),y=y.redIAdd(y),y=y.redIAdd(y),n=d.redMul(m.redISub(t)).redISub(y)}return this.curve.jpoint(t,n,r)},f.prototype._dbl=function e(){var t=this.curve.a,n=this.x,r=this.y,i=this.z,o=i.redSqr().redSqr(),s=n.redSqr(),a=r.redSqr(),u=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(o)),l=n.redAdd(n);l=l.redIAdd(l);var c=l.redMul(a),f=u.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),p=a.redSqr();p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var d=u.redMul(h).redISub(p),m=r.redAdd(r).redMul(i);return this.curve.jpoint(f,d,m)},f.prototype.trpl=function e(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),n=this.y.redSqr(),r=this.z.redSqr(),i=n.redSqr(),o=t.redAdd(t).redIAdd(t),s=o.redSqr(),a=this.x.redAdd(n).redSqr().redISub(t).redISub(i);a=a.redIAdd(a),a=a.redAdd(a).redIAdd(a),a=a.redISub(s);var u=a.redSqr(),l=i.redIAdd(i);l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var c=o.redIAdd(a).redSqr().redISub(s).redISub(u).redISub(l),f=n.redMul(c);f=f.redIAdd(f),f=f.redIAdd(f);var h=this.x.redMul(u).redISub(f);h=h.redIAdd(h),h=h.redIAdd(h);var p=this.y.redMul(c.redMul(l.redISub(c)).redISub(a.redMul(u)));p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(u);return this.curve.jpoint(h,p,d)},f.prototype.mul=function e(t,n){return t=new o(t,n),this.curve._wnafMul(this,t)},f.prototype.eq=function e(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var n=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(n)).cmpn(0))return!1;var i=n.redMul(this.z),o=r.redMul(t.z);return 0===this.y.redMul(o).redISub(t.y.redMul(i)).cmpn(0)},f.prototype.eqXToP=function e(t){var n=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(n);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),o=this.curve.redN.redMul(n);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},f.prototype.inspect=function e(){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)+">"},f.prototype.isInfinity=function e(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(268),i=n(63),o=n(1),s=r.base,a=n(74),u=a.utils;function l(e){s.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(l,s),e.exports=l,l.prototype.validate=function e(t){var n=t.normalize().x,r=n.redSqr(),i=r.redMul(n).redAdd(r.redMul(this.a)).redAdd(n),o=i.redSqrt();return 0===o.redSqr().cmp(i)},o(c,s.BasePoint),l.prototype.decodePoint=function e(t,n){return this.point(u.toArray(t,n),1)},l.prototype.point=function e(t,n){return new c(this,t,n)},l.prototype.pointFromJSON=function e(t){return c.fromJSON(this,t)},c.prototype.precompute=function e(){},c.prototype._encode=function e(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function e(t,n){return new c(t,n[0],n[1]||t.one)},c.prototype.inspect=function e(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function e(){return 0===this.z.cmpn(0)},c.prototype.dbl=function e(){var t=this.x.redAdd(this.z),n=t.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),o=n.redSub(i),s=n.redMul(i),a=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(s,a)},c.prototype.add=function e(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function e(t,n){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=t.x.redAdd(t.z),s=t.x.redSub(t.z),a=s.redMul(r),u=o.redMul(i),l=n.z.redMul(a.redAdd(u).redSqr()),c=n.x.redMul(a.redISub(u).redSqr());return this.curve.point(l,c)},c.prototype.mul=function e(t){for(var n=t.clone(),r=this,i=this.curve.point(null,null),o=this,s=[];0!==n.cmpn(0);n.iushrn(1))s.push(n.andln(1));for(var a=s.length-1;a>=0;a--)0===s[a]?(r=r.diffAdd(i,o),i=i.dbl()):(i=r.diffAdd(i,o),r=r.dbl());return i},c.prototype.mulAdd=function e(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function e(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function e(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function e(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function e(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(268),i=n(74),o=n(63),s=n(1),a=r.base,u=i.utils.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,n,r,i){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&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 o(t,16),this.y=new o(n,16),this.z=r?new o(r,16):this.curve.one,this.t=i&&new o(i,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()))))}s(l,a),e.exports=l,l.prototype._mulA=function e(t){return this.mOneA?t.redNeg():this.a.redMul(t)},l.prototype._mulC=function e(t){return this.oneC?t:this.c.redMul(t)},l.prototype.jpoint=function e(t,n,r,i){return this.point(t,n,r,i)},l.prototype.pointFromX=function e(t,n){t=new o(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(s.redInvm()),u=a.redSqrt();if(0!==u.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var l=u.fromRed().isOdd();return(n&&!l||!n&&l)&&(u=u.redNeg()),this.point(t,u)},l.prototype.pointFromY=function e(t,n){t=new o(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,t)}var u=a.redSqrt();if(0!==u.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return u.fromRed().isOdd()!==n&&(u=u.redNeg()),this.point(u,t)},l.prototype.validate=function e(t){if(t.isInfinity())return!0;t.normalize();var n=t.x.redSqr(),r=t.y.redSqr(),i=n.redMul(this.a).redAdd(r),o=this.c2.redMul(this.one.redAdd(this.d.redMul(n).redMul(r)));return 0===i.cmp(o)},s(c,a.BasePoint),l.prototype.pointFromJSON=function e(t){return c.fromJSON(this,t)},l.prototype.point=function e(t,n,r,i){return new c(this,t,n,r,i)},c.fromJSON=function e(t,n){return new c(t,n[0],n[1],n[2])},c.prototype.inspect=function e(){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)+">"},c.prototype.isInfinity=function e(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function e(){var t=this.x.redSqr(),n=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(n),s=i.redAdd(n),a=s.redSub(r),u=i.redSub(n),l=o.redMul(a),c=s.redMul(u),f=o.redMul(u),h=a.redMul(s);return this.curve.point(l,c,h,f)},c.prototype._projDbl=function e(){var t=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),r=this.y.redSqr(),i,o,s;if(this.curve.twisted){var a=this.curve._mulA(n),u=a.redAdd(r);if(this.zOne)i=t.redSub(n).redSub(r).redMul(u.redSub(this.curve.two)),o=u.redMul(a.redSub(r)),s=u.redSqr().redSub(u).redSub(u);else{var l=this.z.redSqr(),c=u.redSub(l).redISub(l);i=t.redSub(n).redISub(r).redMul(c),o=u.redMul(a.redSub(r)),s=u.redMul(c)}}else{var a=n.redAdd(r),l=this.curve._mulC(this.z).redSqr(),c=a.redSub(l).redSub(l);i=this.curve._mulC(t.redISub(a)).redMul(c),o=this.curve._mulC(a).redMul(n.redISub(r)),s=a.redMul(c)}return this.curve.point(i,o,s)},c.prototype.dbl=function e(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function e(t){var n=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),s=r.redSub(n),a=o.redSub(i),u=o.redAdd(i),l=r.redAdd(n),c=s.redMul(a),f=u.redMul(l),h=s.redMul(l),p=a.redMul(u);return this.curve.point(c,f,p,h)},c.prototype._projAdd=function e(t){var n=this.z.redMul(t.z),r=n.redSqr(),i=this.x.redMul(t.x),o=this.y.redMul(t.y),s=this.curve.d.redMul(i).redMul(o),a=r.redSub(s),u=r.redAdd(s),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(o),c=n.redMul(a).redMul(l),f,h;return this.curve.twisted?(f=n.redMul(u).redMul(o.redSub(this.curve._mulA(i))),h=a.redMul(u)):(f=n.redMul(u).redMul(o.redSub(i)),h=this.curve._mulC(a).redMul(u)),this.curve.point(c,f,h)},c.prototype.add=function e(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function e(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function e(t,n,r){return this.curve._wnafMulAdd(1,[this,n],[t,r],2,!1)},c.prototype.jmulAdd=function e(t,n,r){return this.curve._wnafMulAdd(1,[this,n],[t,r],2,!0)},c.prototype.normalize=function e(){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},c.prototype.neg=function e(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function e(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function e(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function e(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function e(t){var n=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,n){"use strict";var r=t,i=n(189),o=n(74),s=o.utils.assert,a;function u(e){"short"===e.type?this.curve=new o.curve.short(e):"edwards"===e.type?this.curve=new o.curve.edwards(e):this.curve=new o.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=u,l("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("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:i.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"]}),l("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:i.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"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),l("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{a=n(1343)}catch(e){a=void 0}l("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})},function(e,t,n){"use strict";t.sha1=n(1338),t.sha224=n(1339),t.sha256=n(576),t.sha384=n(1340),t.sha512=n(577)},function(e,t,n){"use strict";var r=n(92),i=n(190),o=n(575),s=r.rotl32,a=r.sum32,u=r.sum32_5,l=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,c),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function e(t,n){for(var r=this.W,i=0;i<16;i++)r[i]=t[n+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var o=this.h[0],c=this.h[1],h=this.h[2],p=this.h[3],d=this.h[4];for(i=0;i<r.length;i++){var m=~~(i/20),g=u(s(o,5),l(m,c,h,p),d,r[i],f[m]);d=p,p=h,h=s(c,30),c=o,o=g}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],c),this.h[2]=a(this.h[2],h),this.h[3]=a(this.h[3],p),this.h[4]=a(this.h[4],d)},h.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(92),i=n(576);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(92),i=n(577);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(92),i=n(190),o=r.rotl32,s=r.sum32,a=r.sum32_3,u=r.sum32_4,l=i.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function p(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(c,l),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function e(t,n){for(var r=this.h[0],i=this.h[1],l=this.h[2],c=this.h[3],b=this.h[4],v=r,w=i,_=l,k=c,S=b,E=0;E<80;E++){var x=s(o(u(r,f(E,i,l,c),t[d[E]+n],h(E)),g[E]),b);r=b,b=c,c=o(l,10),l=i,i=x,x=s(o(u(v,f(79-E,w,_,k),t[m[E]+n],p(E)),y[E]),S),v=S,S=k,k=o(_,10),_=w,w=x}x=a(this.h[1],l,k),this.h[1]=a(this.h[2],c,S),this.h[2]=a(this.h[3],b,v),this.h[3]=a(this.h[4],r,w),this.h[4]=a(this.h[0],i,_),this.h[0]=x},c.prototype._digest=function e(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var d=[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],y=[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(e,t,n){"use strict";var r=n(92),i=n(107);function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=o,o.prototype._init=function e(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var n=t.length;n<this.blockSize;n++)t.push(0);for(n=0;n<t.length;n++)t[n]^=54;for(this.inner=(new this.Hash).update(t),n=0;n<t.length;n++)t[n]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function e(t,n){return this.inner.update(t,n),this},o.prototype.digest=function e(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(e,t){e.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(e,t,n){"use strict";var r=n(63),i=n(1345),o=n(74),s=o.utils,a=s.assert,u=n(1346),l=n(1347);function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=c,c.prototype.keyPair=function e(t){return new u(this,t)},c.prototype.keyFromPrivate=function e(t,n){return u.fromPrivate(this,t,n)},c.prototype.keyFromPublic=function e(t,n){return u.fromPublic(this,t,n)},c.prototype.genKeyPair=function e(t){t||(t={});for(var n=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),s=this.n.byteLength(),a=this.n.sub(new r(2));;){var u=new r(n.generate(s));if(!(u.cmp(a)>0))return u.iaddn(1),this.keyFromPrivate(u)}},c.prototype._truncateToN=function e(t,n){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function e(t,n,o,s){"object"==typeof o&&(s=o,o=null),s||(s={}),n=this.keyFromPrivate(n,o),t=this._truncateToN(new r(t,16));for(var a=this.n.byteLength(),u=n.getPrivate().toArray("be",a),c=t.toArray("be",a),f=new i({hash:this.hash,entropy:u,nonce:c,pers:s.pers,persEnc:s.persEnc||"utf8"}),h=this.n.sub(new r(1)),p=0;;p++){var d=s.k?s.k(p):new r(f.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(h)>=0)){var m=this.g.mul(d);if(!m.isInfinity()){var g=m.getX(),y=g.umod(this.n);if(0!==y.cmpn(0)){var b=d.invm(this.n).mul(y.mul(n.getPrivate()).iadd(t));if(b=b.umod(this.n),0!==b.cmpn(0)){var v=(m.getY().isOdd()?1:0)|(0!==g.cmp(y)?2:0);return s.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new l({r:y,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function e(t,n,i,o){t=this._truncateToN(new r(t,16)),i=this.keyFromPublic(i,o),n=new l(n,"hex");var s=n.r,a=n.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var u=a.invm(this.n),c=u.mul(t).umod(this.n),f=u.mul(s).umod(this.n);if(!this.curve._maxwellTrick){var h=this.g.mulAdd(c,i.getPublic(),f);return!h.isInfinity()&&0===h.getX().umod(this.n).cmp(s)}var h=this.g.jmulAdd(c,i.getPublic(),f);return!h.isInfinity()&&h.eqXToP(s)},c.prototype.recoverPubKey=function(e,t,n,i){a((3&n)===n,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,s=new r(e),u=t.r,c=t.s,f=1&n,h=n>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");u=h?this.curve.pointFromX(u.add(this.curve.n),f):this.curve.pointFromX(u,f);var p=t.r.invm(o),d=o.sub(s).mul(p).umod(o),m=c.mul(p).umod(o);return this.g.mulAdd(d,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(t=new l(t,r),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(189),i=n(573),o=n(107);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=s,s.prototype._init=function e(t,n,r){var i=t.concat(n).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function e(){return new r.hmac(this.hash,this.K)},s.prototype._update=function e(t){var n=this._hmac().update(this.V).update([0]);t&&(n=n.update(t)),this.K=n.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())},s.prototype.reseed=function e(t,n,r,s){"string"!=typeof n&&(s=r,r=n,n=null),t=i.toArray(t,n),r=i.toArray(r,s),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function e(t,n,r,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(o=r,r=n,n=null),r&&(r=i.toArray(r,o||"hex"),this._update(r));for(var s=[];s.length<t;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,t);return this._update(r),this._reseed++,i.encode(a,n)}},function(e,t,n){"use strict";var r=n(63),i=n(74),o=i.utils,s=o.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function e(t,n,r){return n instanceof a?n:new a(t,{pub:n,pubEnc:r})},a.fromPrivate=function e(t,n,r){return n instanceof a?n:new a(t,{priv:n,privEnc:r})},a.prototype.validate=function e(){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"}},a.prototype.getPublic=function e(t,n){return"string"==typeof t&&(n=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,t):this.pub},a.prototype.getPrivate=function e(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function e(t,n){this.priv=new r(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function e(t,n){if(t.x||t.y)return"mont"===this.ec.curve.type?s(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(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,n)},a.prototype.derive=function e(t){return t.mul(this.priv).getX()},a.prototype.sign=function e(t,n,r){return this.ec.sign(t,this,n,r)},a.prototype.verify=function e(t,n){return this.ec.verify(t,n,this)},a.prototype.inspect=function e(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(63),i=n(74),o=i.utils,s=o.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function u(){this.place=0}function l(e,t){var n=e[t.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,s=t.place;o<r;o++,s++)i<<=8,i|=e[s];return t.place=s,i}function c(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function e(t,n){t=o.toArray(t,n);var i=new u;if(48!==t[i.place++])return!1;var s=l(t,i);if(s+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var a=l(t,i),c=t.slice(i.place,a+i.place);if(i.place+=a,2!==t[i.place++])return!1;var f=l(t,i);if(t.length!==f+i.place)return!1;var h=t.slice(i.place,f+i.place);return 0===c[0]&&128&c[1]&&(c=c.slice(1)),0===h[0]&&128&h[1]&&(h=h.slice(1)),this.r=new r(c),this.s=new r(h),this.recoveryParam=null,!0},a.prototype.toDER=function e(t){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=c(n),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,n.length),i=i.concat(n),i.push(2),f(i,r.length);var s=i.concat(r),a=[48];return f(a,s.length),a=a.concat(s),o.encode(a,t)}},function(e,t,n){"use strict";var r=n(189),i=n(74),o=i.utils,s=o.assert,a=o.parseBytes,u=n(1349),l=n(1350);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);var e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=c,c.prototype.sign=function e(t,n){t=a(t);var r=this.keyFromSecret(n),i=this.hashInt(r.messagePrefix(),t),o=this.g.mul(i),s=this.encodePoint(o),u=this.hashInt(s,r.pubBytes(),t).mul(r.priv()),l=i.add(u).umod(this.curve.n);return this.makeSignature({R:o,S:l,Rencoded:s})},c.prototype.verify=function e(t,n,r){t=a(t),n=this.makeSignature(n);var i=this.keyFromPublic(r),o=this.hashInt(n.Rencoded(),i.pubBytes(),t),s=this.g.mul(n.S()),u=n.R().add(i.pub().mul(o));return u.eq(s)},c.prototype.hashInt=function e(){for(var t=this.hash(),n=0;n<arguments.length;n++)t.update(arguments[n]);return o.intFromLE(t.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function e(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function e(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function e(t){return t instanceof l?t:new l(this,t)},c.prototype.encodePoint=function e(t){var n=t.getY().toArray("le",this.encodingLength);return n[this.encodingLength-1]|=t.getX().isOdd()?128:0,n},c.prototype.decodePoint=function e(t){t=o.parseBytes(t);var n=t.length-1,r=t.slice(0,n).concat(-129&t[n]),i=0!=(128&t[n]),s=o.intFromLE(r);return this.curve.pointFromY(s,i)},c.prototype.encodeInt=function e(t){return t.toArray("le",this.encodingLength)},c.prototype.decodeInt=function e(t){return o.intFromLE(t)},c.prototype.isPoint=function e(t){return t instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(74),i=r.utils,o=i.assert,s=i.parseBytes,a=i.cachedProperty;function u(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}u.fromPublic=function e(t,n){return n instanceof u?n:new u(t,{pub:n})},u.fromSecret=function e(t,n){return n instanceof u?n:new u(t,{secret:n})},u.prototype.secret=function e(){return this._secret},a(u,"pubBytes",function e(){return this.eddsa.encodePoint(this.pub())}),a(u,"pub",function e(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(u,"privBytes",function e(){var t=this.eddsa,n=this.hash(),r=t.encodingLength-1,i=n.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),a(u,"priv",function e(){return this.eddsa.decodeInt(this.privBytes())}),a(u,"hash",function e(){return this.eddsa.hash().update(this.secret()).digest()}),a(u,"messagePrefix",function e(){return this.hash().slice(this.eddsa.encodingLength)}),u.prototype.sign=function e(t){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},u.prototype.verify=function e(t,n){return this.eddsa.verify(t,n,this)},u.prototype.getSecret=function e(t){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),t)},u.prototype.getPublic=function e(t){return i.encode(this.pubBytes(),t)},e.exports=u},function(e,t,n){"use strict";var r=n(63),i=n(74),o=i.utils,s=o.assert,a=o.cachedProperty,u=o.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(l,"S",function e(){return this.eddsa.decodeInt(this.Sencoded())}),a(l,"R",function e(){return this.eddsa.decodePoint(this.Rencoded())}),a(l,"Rencoded",function e(){return this.eddsa.encodePoint(this.R())}),a(l,"Sencoded",function e(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function e(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function e(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},function(e,t,n){(function(t){const r=n(319),i=t.alloc(1,1),o=t.alloc(1,0);function s(e,n,s,a,u){let l=t.alloc(32,0),c=t.alloc(32,1);l=r("sha256",l).update(c).update(o).update(n).update(e).update(u||"").digest(),c=r("sha256",l).update(c).digest(),l=r("sha256",l).update(c).update(i).update(n).update(e).update(u||"").digest(),c=r("sha256",l).update(c).digest(),c=r("sha256",l).update(c).digest();let f=c;for(;!a(f)||!s(f);)l=r("sha256",l).update(c).update(o).digest(),c=r("sha256",l).update(c).digest(),c=r("sha256",l).update(c).digest(),f=c;return f}e.exports=s}).call(this,n(0).Buffer)},function(e,t,n){var r=n(36);function i(e){return e<r.OP_PUSHDATA1?1:e<=255?2:e<=65535?3:5}function o(e,t,n){var o=i(t);return 1===o?e.writeUInt8(t,n):2===o?(e.writeUInt8(r.OP_PUSHDATA1,n),e.writeUInt8(t,n+1)):3===o?(e.writeUInt8(r.OP_PUSHDATA2,n),e.writeUInt16LE(t,n+1)):(e.writeUInt8(r.OP_PUSHDATA4,n),e.writeUInt32LE(t,n+1)),o}function s(e,t){var n=e.readUInt8(t),i,o;if(n<r.OP_PUSHDATA1)i=n,o=1;else if(n===r.OP_PUSHDATA1){if(t+2>e.length)return null;i=e.readUInt8(t+1),o=2}else if(n===r.OP_PUSHDATA2){if(t+3>e.length)return null;i=e.readUInt16LE(t+1),o=3}else{if(t+5>e.length)return null;if(n!==r.OP_PUSHDATA4)throw new Error("Unexpected opcode");i=e.readUInt32LE(t+1),o=5}return{opcode:n,number:i,size:o}}e.exports={encodingLength:i,encode:o,decode:s}},function(e,t,n){(function(t){var r=n(348),i=n(578);function o(e){return t.isBuffer(e)}function s(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function a(e,t){var n=e.toJSON();function r(r){if(!e(r))return!1;if(r.length===t)return!0;throw i.tfCustomError(n+"(Length: "+t+")",n+"(Length: "+r.length+")")}return r.toJSON=function(){return n},r}var u=a.bind(null,r.Array),l=a.bind(null,o),c=a.bind(null,s),f=a.bind(null,r.String);function h(e,t,n){function i(r,i){return n(r,i)&&r>e&&r<t}return n=n||r.Number,i.toJSON=function(){return`${n.toJSON()} between [${e}, ${t}]`},i}var p=Math.pow(2,53)-1;function d(e){return"number"==typeof e&&isFinite(e)}function m(e){return e<<24>>24===e}function g(e){return e<<16>>16===e}function y(e){return(0|e)===e}function b(e){return"number"==typeof e&&e>=-p&&e<=p&&Math.floor(e)===e}function v(e){return(255&e)===e}function w(e){return(65535&e)===e}function _(e){return e>>>0===e}function k(e){return"number"==typeof e&&e>=0&&e<=p&&Math.floor(e)===e}var S={ArrayN:u,Buffer:o,BufferN:l,Finite:d,Hex:s,HexN:c,Int8:m,Int16:g,Int32:y,Int53:b,Range:h,StringN:f,UInt8:v,UInt16:w,UInt32:_,UInt53:k};for(var E in S)S[E].toJSON=function(e){return e}.bind(null,E);e.exports=S}).call(this,n(0).Buffer)},function(e,t,n){var r=n(36),i={};for(var o in r){var s=r[o];i[s]=o}e.exports=i},function(e,t,n){const r=n(316),i=n(4).Buffer,o=n(45),s=n(93),a=i.alloc(1,0);function u(e){let t=0;for(;0===e[t];)++t;return t===e.length?a:(e=e.slice(t),128&e[0]?i.concat([a,e],1+e.length):e)}function l(e){0===e[0]&&(e=e.slice(1));const t=i.alloc(32,0),n=Math.max(0,32-e.length);return e.copy(t,n),t}function c(e){const t=e.readUInt8(e.length-1),n=-129&t;if(n<=0||n>=4)throw new Error("Invalid hashType "+t);const o=r.decode(e.slice(0,-1)),s=l(o.r),a=l(o.s);return{signature:i.concat([s,a],64),hashType:t}}function f(e,t){o({signature:s.BufferN(64),hashType:s.UInt8},{signature:e,hashType:t});const n=-129&t;if(n<=0||n>=4)throw new Error("Invalid hashType "+t);const a=i.allocUnsafe(1);a.writeUInt8(t,0);const l=u(e.slice(0,32)),c=u(e.slice(32,64));return i.concat([r.encode(l,c),a])}e.exports={decode:c,encode:f}},function(e,t,n){const r=n(4).Buffer,i=n(108),o=n(1357),s=n(45),a=n(93),u=n(580),l=n(349);function c(){this.version=1,this.prevHash=null,this.merkleRoot=null,this.timestamp=0,this.bits=0,this.nonce=0}c.fromBuffer=function(e){if(e.length<80)throw new Error("Buffer too small (< 80 bytes)");let t=0;function n(n){return t+=n,e.slice(t-n,t)}function r(){const n=e.readUInt32LE(t);return t+=4,n}function i(){const n=e.readInt32LE(t);return t+=4,n}const o=new c;if(o.version=i(),o.prevHash=n(32),o.merkleRoot=n(32),o.timestamp=r(),o.bits=r(),o.nonce=r(),80===e.length)return o;function s(){const n=u.decode(e,t);return t+=u.decode.bytes,n}function a(){const n=l.fromBuffer(e.slice(t),!0);return t+=n.byteLength(),n}const f=s();o.transactions=[];for(var h=0;h<f;++h){const e=a();o.transactions.push(e)}return o},c.prototype.byteLength=function(e){return e||!this.transactions?80:80+u.encodingLength(this.transactions.length)+this.transactions.reduce(function(e,t){return e+t.byteLength()},0)},c.fromHex=function(e){return c.fromBuffer(r.from(e,"hex"))},c.prototype.getHash=function(){return i.hash256(this.toBuffer(!0))},c.prototype.getId=function(){return this.getHash().reverse().toString("hex")},c.prototype.getUTCDate=function(){const e=new Date(0);return e.setUTCSeconds(this.timestamp),e},c.prototype.toBuffer=function(e){const t=r.allocUnsafe(this.byteLength(e));let n=0;function i(e){e.copy(t,n),n+=e.length}function o(e){t.writeInt32LE(e,n),n+=4}function s(e){t.writeUInt32LE(e,n),n+=4}return o(this.version),i(this.prevHash),i(this.merkleRoot),s(this.timestamp),s(this.bits),s(this.nonce),e||!this.transactions?t:(u.encode(this.transactions.length,t,n),n+=u.encode.bytes,this.transactions.forEach(function(e){const r=e.byteLength();e.toBuffer(t,n),n+=r}),t)},c.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")},c.calculateTarget=function(e){const t=((4278190080&e)>>24)-3,n=8388607&e,i=r.alloc(32,0);return i.writeUIntBE(n,29-t,3),i},c.calculateMerkleRoot=function(e){if(s([{getHash:a.Function}],e),0===e.length)throw TypeError("Cannot compute merkle root for zero transactions");const t=e.map(function(e){return e.getHash()});return o(t,i.hash256)},c.prototype.checkMerkleRoot=function(){if(!this.transactions)return!1;const e=c.calculateMerkleRoot(this.transactions);return 0===this.merkleRoot.compare(e)},c.prototype.checkProofOfWork=function(){const e=this.getHash().reverse(),t=c.calculateTarget(this.bits);return e.compare(t)<=0},e.exports=c},function(e,t,n){(function(t){e.exports=function e(n,r){if(!Array.isArray(n))throw TypeError("Expected values Array");if("function"!=typeof r)throw TypeError("Expected digest Function");for(var i=n.length,o=n.concat();i>1;){for(var s=0,a=0;a<i;a+=2,++s){var u=o[a],l=a+1===i?u:o[a+1],c=t.concat([u,l]);o[s]=r(c)}i=s}return o[0]}}).call(this,n(0).Buffer)},function(e,t){function n(e,t){if("number"!=typeof e)throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("RangeError: value out of range");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}function r(e,t){const r=e.readUInt32LE(t);let i=e.readUInt32LE(t+4);return i*=4294967296,n(i+r,9007199254740991),i+r}function i(e,t,r){return n(t,9007199254740991),e.writeInt32LE(-1&t,r),e.writeUInt32LE(Math.floor(t/4294967296),r+4),r+8}e.exports={readUInt64LE:r,writeUInt64LE:i}},function(e,t,n){"use strict";var r=n(76),i=n(4).Buffer;e.exports=function(e){function t(t){var n=e(t);return r.encode(i.concat([t,n],t.length+4))}function n(t){var n=t.slice(0,-4),r=t.slice(-4),i=e(n);if(!(r[0]^i[0]|r[1]^i[1]|r[2]^i[2]|r[3]^i[3]))return n}function o(e){var t=r.decodeUnsafe(e);if(t)return n(t)}function s(t){var i=r.decode(t),o=n(i,e);if(!o)throw new Error("Invalid checksum");return o}return{encode:t,decode:s,decodeUnsafe:o}}},function(e,t,n){const r=n(4).Buffer,i=n(583),o=n(108),s=n(29),a=n(83),u=n(36),l=n(351),c=n(45),f=n(93),h=n(1368),p=h.types,d=n(581),m=n(349);function g(e,t,n,r){if(0===e.length&&0===t.length)return{};if(!n){let r=h.input(e,!0),i=h.witness(t,!0);r===p.NONSTANDARD&&(r=void 0),i===p.NONSTANDARD&&(i=void 0),n=r||i}switch(n){case p.P2WPKH:{const{output:e,pubkey:n,signature:r}=l.p2wpkh({witness:t});return{prevOutScript:e,prevOutType:p.P2WPKH,pubkeys:[n],signatures:[r]}}case p.P2PKH:{const{output:t,pubkey:n,signature:r}=l.p2pkh({input:e});return{prevOutScript:t,prevOutType:p.P2PKH,pubkeys:[n],signatures:[r]}}case p.P2PK:{const{signature:t}=l.p2pk({input:e});return{prevOutType:p.P2PK,pubkeys:[void 0],signatures:[t]}}case p.P2MS:{const{m:t,pubkeys:n,signatures:i}=l.p2ms({input:e,output:r},{allowIncomplete:!0});return{prevOutType:p.P2MS,pubkeys:n,signatures:i,maxSignatures:t}}}if(n===p.P2SH){const{output:n,redeem:r}=l.p2sh({input:e,witness:t}),i=h.output(r.output),o=g(r.input,r.witness,i,r.output);return o.prevOutType?{prevOutScript:n,prevOutType:p.P2SH,redeemScript:r.output,redeemScriptType:o.prevOutType,witnessScript:o.witnessScript,witnessScriptType:o.witnessScriptType,pubkeys:o.pubkeys,signatures:o.signatures}:{}}if(n===p.P2WSH){const{output:n,redeem:r}=l.p2wsh({input:e,witness:t}),i=h.output(r.output);let o;return o=i===p.P2WPKH?g(r.input,r.witness,i):g(s.compile(r.witness),[],i,r.output),o.prevOutType?{prevOutScript:n,prevOutType:p.P2WSH,witnessScript:r.output,witnessScriptType:o.prevOutType,pubkeys:o.pubkeys,signatures:o.signatures}:{}}return{prevOutType:p.NONSTANDARD,prevOutScript:e}}function y(e,t,n){if(e.redeemScriptType!==p.P2MS||!e.redeemScript)return;if(e.pubkeys.length===e.signatures.length)return;const r=e.signatures.concat();e.signatures=e.pubkeys.map(function(i){const o=d.fromPublicKey(i);let a;return r.some(function(i,u){if(!i)return!1;const l=s.signature.decode(i),c=t.hashForSignature(n,e.redeemScript,l.hashType);return!!o.verify(c,l.signature)&&(r[u]=void 0,a=i,!0)}),a})}function b(e,t){c(f.Buffer,e);const n=h.output(e);switch(n){case p.P2PKH:{if(!t)return{type:n};const r=l.p2pkh({output:e}).hash,i=o.hash160(t);return r.equals(i)?{type:n,pubkeys:[t],signatures:[void 0]}:{type:n}}case p.P2WPKH:{if(!t)return{type:n};const r=l.p2wpkh({output:e}).hash,i=o.hash160(t);return r.equals(i)?{type:n,pubkeys:[t],signatures:[void 0]}:{type:n}}case p.P2PK:{const t=l.p2pk({output:e});return{type:n,pubkeys:[t.pubkey],signatures:[void 0]}}case p.P2MS:{const t=l.p2ms({output:e});return{type:n,pubkeys:t.pubkeys,signatures:t.pubkeys.map(()=>void 0),maxSignatures:t.m}}}return{type:n}}function v(e,t,n,r){if(n&&r){const i=l.p2wsh({redeem:{output:r}}),o=l.p2wsh({output:n}),a=l.p2sh({redeem:{output:n}}),u=l.p2sh({redeem:i});if(!i.hash.equals(o.hash))throw new Error("Witness script inconsistent with prevOutScript");if(!a.hash.equals(u.hash))throw new Error("Redeem script inconsistent with prevOutScript");const c=b(i.redeem.output,t);if(!c.pubkeys)throw new Error(c.type+" not supported as witnessScript ("+s.toASM(r)+")");e.signatures&&e.signatures.some(e=>e)&&(c.signatures=e.signatures);let f=r;if(c.type===p.P2WPKH)throw new Error("P2SH(P2WSH(P2WPKH)) is a consensus failure");return{redeemScript:n,redeemScriptType:p.P2WSH,witnessScript:r,witnessScriptType:c.type,prevOutType:p.P2SH,prevOutScript:a.output,hasWitness:!0,signScript:f,signType:c.type,pubkeys:c.pubkeys,signatures:c.signatures,maxSignatures:c.maxSignatures}}if(n){const r=l.p2sh({redeem:{output:n}});if(e.prevOutScript){let t;try{t=l.p2sh({output:e.prevOutScript})}catch(e){throw new Error("PrevOutScript must be P2SH")}if(!r.hash.equals(t.hash))throw new Error("Redeem script inconsistent with prevOutScript")}const i=b(r.redeem.output,t);if(!i.pubkeys)throw new Error(i.type+" not supported as redeemScript ("+s.toASM(n)+")");e.signatures&&e.signatures.some(e=>e)&&(i.signatures=e.signatures);let o=n;return i.type===p.P2WPKH&&(o=l.p2pkh({pubkey:i.pubkeys[0]}).output),{redeemScript:n,redeemScriptType:i.type,prevOutType:p.P2SH,prevOutScript:r.output,hasWitness:i.type===p.P2WPKH,signScript:o,signType:i.type,pubkeys:i.pubkeys,signatures:i.signatures,maxSignatures:i.maxSignatures}}if(r){const n=l.p2wsh({redeem:{output:r}});if(e.prevOutScript){const t=l.p2wsh({output:e.prevOutScript});if(!n.hash.equals(t.hash))throw new Error("Witness script inconsistent with prevOutScript")}const i=b(n.redeem.output,t);if(!i.pubkeys)throw new Error(i.type+" not supported as witnessScript ("+s.toASM(r)+")");e.signatures&&e.signatures.some(e=>e)&&(i.signatures=e.signatures);let o=r;if(i.type===p.P2WPKH)throw new Error("P2WSH(P2WPKH) is a consensus failure");return{witnessScript:r,witnessScriptType:i.type,prevOutType:p.P2WSH,prevOutScript:n.output,hasWitness:!0,signScript:o,signType:i.type,pubkeys:i.pubkeys,signatures:i.signatures,maxSignatures:i.maxSignatures}}if(e.prevOutType&&e.prevOutScript){if(e.prevOutType===p.P2SH)throw new Error("PrevOutScript is "+e.prevOutType+", requires redeemScript");if(e.prevOutType===p.P2WSH)throw new Error("PrevOutScript is "+e.prevOutType+", requires witnessScript");if(!e.prevOutScript)throw new Error("PrevOutScript is missing");const n=b(e.prevOutScript,t);if(!n.pubkeys)throw new Error(n.type+" not supported ("+s.toASM(e.prevOutScript)+")");e.signatures&&e.signatures.some(e=>e)&&(n.signatures=e.signatures);let r=e.prevOutScript;return n.type===p.P2WPKH&&(r=l.p2pkh({pubkey:n.pubkeys[0]}).output),{prevOutType:n.type,prevOutScript:e.prevOutScript,hasWitness:n.type===p.P2WPKH,signScript:r,signType:n.type,pubkeys:n.pubkeys,signatures:n.signatures,maxSignatures:n.maxSignatures}}const i=l.p2pkh({pubkey:t}).output;return{prevOutType:p.P2PKH,prevOutScript:i,hasWitness:!1,signScript:i,signType:p.P2PKH,pubkeys:[t],signatures:[void 0]}}function w(e,t,n){const r=t.pubkeys||[];let i=t.signatures||[];switch(e){case p.P2PKH:if(0===r.length)break;if(0===i.length)break;return l.p2pkh({pubkey:r[0],signature:i[0]});case p.P2WPKH:if(0===r.length)break;if(0===i.length)break;return l.p2wpkh({pubkey:r[0],signature:i[0]});case p.P2PK:if(0===r.length)break;if(0===i.length)break;return l.p2pk({signature:i[0]});case p.P2MS:{const e=t.maxSignatures;i=n?i.map(e=>e||u.OP_0):i.filter(e=>e);const o=!n||e===i.length;return l.p2ms({m:e,pubkeys:r,signatures:i},{allowIncomplete:n,validate:o})}case p.P2SH:{const e=w(t.redeemScriptType,t,n);if(!e)return;return l.p2sh({redeem:{output:e.output||t.redeemScript,input:e.input,witness:e.witness}})}case p.P2WSH:{const e=w(t.witnessScriptType,t,n);if(!e)return;return l.p2wsh({redeem:{output:t.witnessScript,input:e.input,witness:e.witness}})}}}function _(e,t){this.__prevTxSet={},this.network=e||a.bitcoin,this.maximumFeeRate=t||2500,this.__inputs=[],this.__tx=new m,this.__tx.version=2}function k(e){return void 0!==e.signScript&&void 0!==e.signType&&void 0!==e.pubkeys&&void 0!==e.signatures&&e.signatures.length===e.pubkeys.length&&e.pubkeys.length>0&&(!1===e.hasWitness||void 0!==e.value)}function S(e){return e.readUInt8(e.length-1)}_.prototype.setLockTime=function(e){if(c(f.UInt32,e),this.__inputs.some(function(e){return!!e.signatures&&e.signatures.some(function(e){return e})}))throw new Error("No, this would invalidate signatures");this.__tx.locktime=e},_.prototype.setVersion=function(e){c(f.UInt32,e),this.__tx.version=e},_.fromTransaction=function(e,t){const n=new _(t);return n.setVersion(e.version),n.setLockTime(e.locktime),e.outs.forEach(function(e){n.addOutput(e.script,e.value)}),e.ins.forEach(function(e){n.__addInputUnsafe(e.hash,e.index,{sequence:e.sequence,script:e.script,witness:e.witness})}),n.__inputs.forEach(function(t,n){y(t,e,n)}),n},_.prototype.addInput=function(e,t,n,i){if(!this.__canModifyInputs())throw new Error("No, this would invalidate signatures");let o;if("string"==typeof e)e=r.from(e,"hex").reverse();else if(e instanceof m){const n=e.outs[t];i=n.script,o=n.value,e=e.getHash()}return this.__addInputUnsafe(e,t,{sequence:n,prevOutScript:i,value:o})},_.prototype.__addInputUnsafe=function(e,t,n){if(m.isCoinbaseHash(e))throw new Error("coinbase inputs not supported");const r=e.toString("hex")+":"+t;if(void 0!==this.__prevTxSet[r])throw new Error("Duplicate TxOut: "+r);let i={};if(void 0!==n.script&&(i=g(n.script,n.witness||[])),void 0!==n.value&&(i.value=n.value),!i.prevOutScript&&n.prevOutScript){let e;if(!i.pubkeys&&!i.signatures){const t=b(n.prevOutScript);t.pubkeys&&(i.pubkeys=t.pubkeys,i.signatures=t.signatures),e=t.type}i.prevOutScript=n.prevOutScript,i.prevOutType=e||h.output(n.prevOutScript)}const o=this.__tx.addInput(e,t,n.sequence,n.scriptSig);return this.__inputs[o]=i,this.__prevTxSet[r]=!0,o},_.prototype.addOutput=function(e,t){if(!this.__canModifyOutputs())throw new Error("No, this would invalidate signatures");return"string"==typeof e&&(e=i.toOutputScript(e,this.network)),this.__tx.addOutput(e,t)},_.prototype.build=function(){return this.__build(!1)},_.prototype.buildIncomplete=function(){return this.__build(!0)},_.prototype.__build=function(e){if(!e){if(!this.__tx.ins.length)throw new Error("Transaction has no inputs");if(!this.__tx.outs.length)throw new Error("Transaction has no outputs")}const t=this.__tx.clone();if(this.__inputs.forEach(function(n,r){if(!n.prevOutType&&!e)throw new Error("Transaction is not complete");const i=w(n.prevOutType,n,e);if(i)t.setInputScript(r,i.input),t.setWitness(r,i.witness);else{if(!e&&n.prevOutType===p.NONSTANDARD)throw new Error("Unknown input type");if(!e)throw new Error("Not enough information")}}),!e&&this.__overMaximumFees(t.virtualSize()))throw new Error("Transaction has absurd fees");return t},_.prototype.sign=function(e,t,n,r,i,o){if(t.network&&t.network!==this.network)throw new TypeError("Inconsistent network");if(!this.__inputs[e])throw new Error("No input at index: "+e);if(r=r||m.SIGHASH_ALL,this.__needsOutputs(r))throw new Error("Transaction needs outputs");const a=this.__inputs[e];if(void 0!==a.redeemScript&&n&&!a.redeemScript.equals(n))throw new Error("Inconsistent redeemScript");const u=t.publicKey||t.getPublicKey();if(!k(a)){if(void 0!==i){if(void 0!==a.value&&a.value!==i)throw new Error("Input didn't match witnessValue");c(f.Satoshi,i),a.value=i}if(!k(a)){const e=v(a,u,n,o);Object.assign(a,e)}if(!k(a))throw Error(a.prevOutType+" not supported")}let l;l=a.hasWitness?this.__tx.hashForWitnessV0(e,a.signScript,a.value,r):this.__tx.hashForSignature(e,a.signScript,r);const h=a.pubkeys.some(function(e,n){if(!u.equals(e))return!1;if(a.signatures[n])throw new Error("Signature already exists");if(33!==u.length&&a.hasWitness)throw new Error("BIP143 rejects uncompressed public keys in P2WPKH or P2WSH");const i=t.sign(l);return a.signatures[n]=s.signature.encode(i,r),!0});if(!h)throw new Error("Key pair cannot sign for this input")},_.prototype.__canModifyInputs=function(){return this.__inputs.every(function(e){return!e.signatures||e.signatures.every(function(e){if(!e)return!0;const t=S(e);return t&m.SIGHASH_ANYONECANPAY})})},_.prototype.__needsOutputs=function(e){return e===m.SIGHASH_ALL?0===this.__tx.outs.length:0===this.__tx.outs.length&&this.__inputs.some(e=>!!e.signatures&&e.signatures.some(e=>{if(!e)return!1;const t=S(e);return!(t&m.SIGHASH_NONE)}))},_.prototype.__canModifyOutputs=function(){const e=this.__tx.ins.length,t=this.__tx.outs.length;return this.__inputs.every(function(n){return void 0===n.signatures||n.signatures.every(function(n){if(!n)return!0;const r=S(n),i=31&r;return i===m.SIGHASH_NONE||(i===m.SIGHASH_SINGLE?e<=t:void 0)})})},_.prototype.__overMaximumFees=function(e){const t=this.__inputs.reduce(function(e,t){return e+(t.value>>>0)},0),n=this.__tx.outs.reduce(function(e,t){return e+t.value},0),r=t-n,i=r/e;return i>this.maximumFeeRate},e.exports=_},function(e,t,n){const r=n(125),i=n(45),o=n(36),s=n(29),a=n(83).bitcoin;function u(e,t){return e.length===t.length&&e.every(function(e,n){return e.equals(t[n])})}function l(e,t){if(!e.data&&!e.output)throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),i({network:i.maybe(i.Object),output:i.maybe(i.Buffer),data:i.maybe(i.arrayOf(i.Buffer))},e);const n=e.network||a,l={network:n};if(r.prop(l,"output",function(){if(e.data)return s.compile([o.OP_RETURN].concat(e.data))}),r.prop(l,"data",function(){if(e.output)return s.decompile(e.output).slice(1)}),t.validate&&e.output){const t=s.decompile(e.output);if(t[0]!==o.OP_RETURN)throw new TypeError("Output is invalid");if(!t.slice(1).every(i.Buffer))throw new TypeError("Output is invalid");if(e.data&&!u(e.data,l.data))throw new TypeError("Data mismatch")}return Object.assign(l,e)}e.exports=l},function(e,t,n){const r=n(125),i=n(45),o=n(36),s=n(124),a=n(29),u=n(83).bitcoin,l=o.OP_RESERVED;function c(e,t){return e.length===t.length&&e.every(function(e,n){return e.equals(t[n])})}function f(e,t){if(!(e.input||e.output||e.pubkeys&&void 0!==e.m||e.signatures))throw new TypeError("Not enough data");function n(e){return a.isCanonicalScriptSignature(e)||t.allowIncomplete&&e===o.OP_0}t=Object.assign({validate:!0},t||{}),i({network:i.maybe(i.Object),m:i.maybe(i.Number),n:i.maybe(i.Number),output:i.maybe(i.Buffer),pubkeys:i.maybe(i.arrayOf(s.isPoint)),signatures:i.maybe(i.arrayOf(n)),input:i.maybe(i.Buffer)},e);const f=e.network||u,h={network:f};let p,d=!1;function m(e){d||(d=!0,p=a.decompile(e),h.m=p[0]-l,h.n=p[p.length-2]-l,h.pubkeys=p.slice(1,-2))}if(r.prop(h,"output",function(){if(e.m&&h.n&&e.pubkeys)return a.compile([].concat(l+e.m,e.pubkeys,l+h.n,o.OP_CHECKMULTISIG))}),r.prop(h,"m",function(){if(h.output)return m(h.output),h.m}),r.prop(h,"n",function(){if(h.pubkeys)return h.pubkeys.length}),r.prop(h,"pubkeys",function(){if(e.output)return m(e.output),h.pubkeys}),r.prop(h,"signatures",function(){if(e.input)return a.decompile(e.input).slice(1)}),r.prop(h,"input",function(){if(e.signatures)return a.compile([o.OP_0].concat(e.signatures))}),r.prop(h,"witness",function(){if(h.input)return[]}),t.validate){if(e.output){if(m(e.output),!i.Number(p[0]))throw new TypeError("Output is invalid");if(!i.Number(p[p.length-2]))throw new TypeError("Output is invalid");if(p[p.length-1]!==o.OP_CHECKMULTISIG)throw new TypeError("Output is invalid");if(h.m<=0||h.n>16||h.m>h.n||h.n!==p.length-3)throw new TypeError("Output is invalid");if(!h.pubkeys.every(e=>s.isPoint(e)))throw new TypeError("Output is invalid");if(void 0!==e.m&&e.m!==h.m)throw new TypeError("m mismatch");if(void 0!==e.n&&e.n!==h.n)throw new TypeError("n mismatch");if(e.pubkeys&&!c(e.pubkeys,h.pubkeys))throw new TypeError("Pubkeys mismatch")}if(e.pubkeys){if(void 0!==e.n&&e.n!==e.pubkeys.length)throw new TypeError("Pubkey count mismatch");if(h.n=e.pubkeys.length,h.n<h.m)throw new TypeError("Pubkey count cannot be less than m")}if(e.signatures){if(e.signatures.length<h.m)throw new TypeError("Not enough signatures provided");if(e.signatures.length>h.m)throw new TypeError("Too many signatures provided")}if(e.input){if(e.input[0]!==o.OP_0)throw new TypeError("Input is invalid");if(0===h.signatures.length||!h.signatures.every(n))throw new TypeError("Input has invalid signature(s)");if(e.signatures&&!c(e.signatures,h.signatures))throw new TypeError("Signature mismatch");if(void 0!==e.m&&e.m!==e.signatures.length)throw new TypeError("Signature count mismatch")}}return Object.assign(h,e)}e.exports=f},function(e,t,n){const r=n(125),i=n(45),o=n(36),s=n(124),a=n(29),u=n(83).bitcoin;function l(e,t){if(!(e.input||e.output||e.pubkey||e.input||e.signature))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),i({network:i.maybe(i.Object),output:i.maybe(i.Buffer),pubkey:i.maybe(s.isPoint),signature:i.maybe(a.isCanonicalScriptSignature),input:i.maybe(i.Buffer)},e);const n=r.value(function(){return a.decompile(e.input)}),l=e.network||u,c={network:l};if(r.prop(c,"output",function(){if(e.pubkey)return a.compile([e.pubkey,o.OP_CHECKSIG])}),r.prop(c,"pubkey",function(){if(e.output)return e.output.slice(1,-1)}),r.prop(c,"signature",function(){if(e.input)return n()[0]}),r.prop(c,"input",function(){if(e.signature)return a.compile([e.signature])}),r.prop(c,"witness",function(){if(c.input)return[]}),t.validate){if(e.output){if(e.output[e.output.length-1]!==o.OP_CHECKSIG)throw new TypeError("Output is invalid");if(!s.isPoint(c.pubkey))throw new TypeError("Output pubkey is invalid");if(e.pubkey&&!e.pubkey.equals(c.pubkey))throw new TypeError("Pubkey mismatch")}if(e.signature&&e.input&&!e.input.equals(c.input))throw new TypeError("Signature mismatch");if(e.input){if(1!==n().length)throw new TypeError("Input is invalid");if(!a.isCanonicalScriptSignature(c.signature))throw new TypeError("Input has invalid signature")}}return Object.assign(c,e)}e.exports=l},function(e,t,n){(function(t){const r=n(125),i=n(45),o=n(36),s=n(124),a=n(108),u=n(29),l=n(83).bitcoin,c=n(191);function f(e,n){if(!(e.address||e.hash||e.output||e.pubkey||e.input))throw new TypeError("Not enough data");n=Object.assign({validate:!0},n||{}),i({network:i.maybe(i.Object),address:i.maybe(i.String),hash:i.maybe(i.BufferN(20)),output:i.maybe(i.BufferN(25)),pubkey:i.maybe(s.isPoint),signature:i.maybe(u.isCanonicalScriptSignature),input:i.maybe(i.Buffer)},e);const f=r.value(function(){const t=c.decode(e.address),n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}),h=r.value(function(){return u.decompile(e.input)}),p=e.network||l,d={network:p};if(r.prop(d,"address",function(){if(!d.hash)return;const e=t.allocUnsafe(21);return e.writeUInt8(p.pubKeyHash,0),d.hash.copy(e,1),c.encode(e)}),r.prop(d,"hash",function(){return e.output?e.output.slice(3,23):e.address?f().hash:e.pubkey||d.pubkey?a.hash160(e.pubkey||d.pubkey):void 0}),r.prop(d,"output",function(){if(d.hash)return u.compile([o.OP_DUP,o.OP_HASH160,d.hash,o.OP_EQUALVERIFY,o.OP_CHECKSIG])}),r.prop(d,"pubkey",function(){if(e.input)return h()[1]}),r.prop(d,"signature",function(){if(e.input)return h()[0]}),r.prop(d,"input",function(){if(e.pubkey&&e.signature)return u.compile([e.signature,e.pubkey])}),r.prop(d,"witness",function(){if(d.input)return[]}),n.validate){let t;if(e.address){if(f().version!==p.pubKeyHash)throw new TypeError("Invalid version or Network mismatch");if(20!==f().hash.length)throw new TypeError("Invalid address");t=f().hash}if(e.hash){if(t&&!t.equals(e.hash))throw new TypeError("Hash mismatch");t=e.hash}if(e.output){if(25!==e.output.length||e.output[0]!==o.OP_DUP||e.output[1]!==o.OP_HASH160||20!==e.output[2]||e.output[23]!==o.OP_EQUALVERIFY||e.output[24]!==o.OP_CHECKSIG)throw new TypeError("Output is invalid");const n=e.output.slice(3,23);if(t&&!t.equals(n))throw new TypeError("Hash mismatch");t=n}if(e.pubkey){const n=a.hash160(e.pubkey);if(t&&!t.equals(n))throw new TypeError("Hash mismatch");t=n}if(e.input){const n=h();if(2!==n.length)throw new TypeError("Input is invalid");if(!u.isCanonicalScriptSignature(n[0]))throw new TypeError("Input has invalid signature");if(!s.isPoint(n[1]))throw new TypeError("Input has invalid pubkey");if(e.signature&&!e.signature.equals(n[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(n[1]))throw new TypeError("Pubkey mismatch");const r=a.hash160(n[1]);if(t&&!t.equals(r))throw new TypeError("Hash mismatch")}}return Object.assign(d,e)}e.exports=f}).call(this,n(0).Buffer)},function(e,t,n){(function(t){const r=n(125),i=n(45),o=n(36),s=n(108),a=n(29),u=n(83).bitcoin,l=n(191);function c(e,t){return e.length===t.length&&e.every(function(e,n){return e.equals(t[n])})}function f(e,n){if(!(e.address||e.hash||e.output||e.redeem||e.input))throw new TypeError("Not enough data");n=Object.assign({validate:!0},n||{}),i({network:i.maybe(i.Object),address:i.maybe(i.String),hash:i.maybe(i.BufferN(20)),output:i.maybe(i.BufferN(23)),redeem:i.maybe({network:i.maybe(i.Object),output:i.maybe(i.Buffer),input:i.maybe(i.Buffer),witness:i.maybe(i.arrayOf(i.Buffer))}),input:i.maybe(i.Buffer),witness:i.maybe(i.arrayOf(i.Buffer))},e);let f=e.network;f||(f=e.redeem&&e.redeem.network||u);const h={network:f},p=r.value(function(){const t=l.decode(e.address),n=t.readUInt8(0),r=t.slice(1);return{version:n,hash:r}}),d=r.value(function(){return a.decompile(e.input)}),m=r.value(function(){const t=d();return{network:f,output:t[t.length-1],input:a.compile(t.slice(0,-1)),witness:e.witness||[]}});if(r.prop(h,"address",function(){if(!h.hash)return;const e=t.allocUnsafe(21);return e.writeUInt8(f.scriptHash,0),h.hash.copy(e,1),l.encode(e)}),r.prop(h,"hash",function(){return e.output?e.output.slice(2,22):e.address?p().hash:h.redeem&&h.redeem.output?s.hash160(h.redeem.output):void 0}),r.prop(h,"output",function(){if(h.hash)return a.compile([o.OP_HASH160,h.hash,o.OP_EQUAL])}),r.prop(h,"redeem",function(){if(e.input)return m()}),r.prop(h,"input",function(){if(e.redeem&&e.redeem.input&&e.redeem.output)return a.compile([].concat(a.decompile(e.redeem.input),e.redeem.output))}),r.prop(h,"witness",function(){return h.redeem&&h.redeem.witness?h.redeem.witness:h.input?[]:void 0}),n.validate){let n;if(e.address){if(p().version!==f.scriptHash)throw new TypeError("Invalid version or Network mismatch");if(20!==p().hash.length)throw new TypeError("Invalid address");n=p().hash}if(e.hash){if(n&&!n.equals(e.hash))throw new TypeError("Hash mismatch");n=e.hash}if(e.output){if(23!==e.output.length||e.output[0]!==o.OP_HASH160||20!==e.output[1]||e.output[22]!==o.OP_EQUAL)throw new TypeError("Output is invalid");const t=e.output.slice(2,22);if(n&&!n.equals(t))throw new TypeError("Hash mismatch");n=t}const r=function(e){if(e.output){const t=a.decompile(e.output);if(!t||t.length<1)throw new TypeError("Redeem.output too short");const r=s.hash160(e.output);if(n&&!n.equals(r))throw new TypeError("Hash mismatch");n=r}if(e.input){const t=e.input.length>0,n=e.witness&&e.witness.length>0;if(!t&&!n)throw new TypeError("Empty input");if(t&&n)throw new TypeError("Input and witness provided");if(t){const t=a.decompile(e.input);if(!a.isPushOnly(t))throw new TypeError("Non push-only scriptSig")}}};if(e.input){const e=d();if(!e||e.length<1)throw new TypeError("Input too short");if(!t.isBuffer(m().output))throw new TypeError("Input is invalid");r(m())}if(e.redeem){if(e.redeem.network&&e.redeem.network!==f)throw new TypeError("Network mismatch");if(e.input){const t=m();if(e.redeem.output&&!e.redeem.output.equals(t.output))throw new TypeError("Redeem.output mismatch");if(e.redeem.input&&!e.redeem.input.equals(t.input))throw new TypeError("Redeem.input mismatch")}r(e.redeem)}if(e.witness&&e.redeem&&e.redeem.witness&&!c(e.redeem.witness,e.witness))throw new TypeError("Witness and redeem.witness mismatch")}return Object.assign(h,e)}e.exports=f}).call(this,n(0).Buffer)},function(e,t,n){(function(t){const r=n(125),i=n(45),o=n(36),s=n(124),a=n(108),u=n(350),l=n(29),c=n(83).bitcoin,f=t.alloc(0);function h(e,n){if(!(e.address||e.hash||e.output||e.pubkey||e.witness))throw new TypeError("Not enough data");n=Object.assign({validate:!0},n||{}),i({address:i.maybe(i.String),hash:i.maybe(i.BufferN(20)),input:i.maybe(i.BufferN(0)),network:i.maybe(i.Object),output:i.maybe(i.BufferN(22)),pubkey:i.maybe(s.isPoint),signature:i.maybe(l.isCanonicalScriptSignature),witness:i.maybe(i.arrayOf(i.Buffer))},e);const h=r.value(function(){const n=u.decode(e.address),r=n.words.shift(),i=u.fromWords(n.words);return{version:r,prefix:n.prefix,data:t.from(i)}}),p=e.network||c,d={network:p};if(r.prop(d,"address",function(){if(!d.hash)return;const e=u.toWords(d.hash);return e.unshift(0),u.encode(p.bech32,e)}),r.prop(d,"hash",function(){return e.output?e.output.slice(2,22):e.address?h().data:e.pubkey||d.pubkey?a.hash160(e.pubkey||d.pubkey):void 0}),r.prop(d,"output",function(){if(d.hash)return l.compile([o.OP_0,d.hash])}),r.prop(d,"pubkey",function(){return e.pubkey?e.pubkey:e.witness?e.witness[1]:void 0}),r.prop(d,"signature",function(){if(e.witness)return e.witness[0]}),r.prop(d,"input",function(){if(d.witness)return f}),r.prop(d,"witness",function(){if(e.pubkey&&e.signature)return[e.signature,e.pubkey]}),n.validate){let t;if(e.address){if(p&&p.bech32!==h().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(0!==h().version)throw new TypeError("Invalid address version");if(20!==h().data.length)throw new TypeError("Invalid address data");t=h().data}if(e.hash){if(t&&!t.equals(e.hash))throw new TypeError("Hash mismatch");t=e.hash}if(e.output){if(22!==e.output.length||e.output[0]!==o.OP_0||20!==e.output[1])throw new TypeError("Output is invalid");if(t&&!t.equals(e.output.slice(2)))throw new TypeError("Hash mismatch");t=e.output.slice(2)}if(e.pubkey){const n=a.hash160(e.pubkey);if(t&&!t.equals(n))throw new TypeError("Hash mismatch");t=n}if(e.witness){if(2!==e.witness.length)throw new TypeError("Witness is invalid");if(!l.isCanonicalScriptSignature(e.witness[0]))throw new TypeError("Witness has invalid signature");if(!s.isPoint(e.witness[1]))throw new TypeError("Witness has invalid pubkey");if(e.signature&&!e.signature.equals(e.witness[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(e.witness[1]))throw new TypeError("Pubkey mismatch");const n=a.hash160(e.witness[1]);if(t&&!t.equals(n))throw new TypeError("Hash mismatch")}}return Object.assign(d,e)}e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){(function(t){const r=n(125),i=n(45),o=n(36),s=n(350),a=n(108),u=n(29),l=n(83).bitcoin,c=t.alloc(0);function f(e,t){return e.length===t.length&&e.every(function(e,n){return e.equals(t[n])})}function h(e,n){if(!(e.address||e.hash||e.output||e.redeem||e.witness))throw new TypeError("Not enough data");n=Object.assign({validate:!0},n||{}),i({network:i.maybe(i.Object),address:i.maybe(i.String),hash:i.maybe(i.BufferN(32)),output:i.maybe(i.BufferN(34)),redeem:i.maybe({input:i.maybe(i.Buffer),network:i.maybe(i.Object),output:i.maybe(i.Buffer),witness:i.maybe(i.arrayOf(i.Buffer))}),input:i.maybe(i.BufferN(0)),witness:i.maybe(i.arrayOf(i.Buffer))},e);const h=r.value(function(){const n=s.decode(e.address),r=n.words.shift(),i=s.fromWords(n.words);return{version:r,prefix:n.prefix,data:t.from(i)}}),p=r.value(function(){return u.decompile(e.redeem.input)});let d=e.network;d||(d=e.redeem&&e.redeem.network||l);const m={network:d};if(r.prop(m,"address",function(){if(!m.hash)return;const e=s.toWords(m.hash);return e.unshift(0),s.encode(d.bech32,e)}),r.prop(m,"hash",function(){return e.output?e.output.slice(2):e.address?h().data:m.redeem&&m.redeem.output?a.sha256(m.redeem.output):void 0}),r.prop(m,"output",function(){if(m.hash)return u.compile([o.OP_0,m.hash])}),r.prop(m,"redeem",function(){if(e.witness)return{output:e.witness[e.witness.length-1],input:c,witness:e.witness.slice(0,-1)}}),r.prop(m,"input",function(){if(m.witness)return c}),r.prop(m,"witness",function(){if(e.redeem&&e.redeem.input&&e.redeem.input.length>0&&e.redeem.output&&e.redeem.output.length>0){const t=u.toStack(p());return m.redeem=Object.assign({witness:t},e.redeem),m.redeem.input=c,[].concat(t,e.redeem.output)}if(e.redeem&&e.redeem.output&&e.redeem.witness)return[].concat(e.redeem.witness,e.redeem.output)}),n.validate){let t;if(e.address){if(h().prefix!==d.bech32)throw new TypeError("Invalid prefix or Network mismatch");if(0!==h().version)throw new TypeError("Invalid address version");if(32!==h().data.length)throw new TypeError("Invalid address data");t=h().data}if(e.hash){if(t&&!t.equals(e.hash))throw new TypeError("Hash mismatch");t=e.hash}if(e.output){if(34!==e.output.length||e.output[0]!==o.OP_0||32!==e.output[1])throw new TypeError("Output is invalid");const n=e.output.slice(2);if(t&&!t.equals(n))throw new TypeError("Hash mismatch");t=n}if(e.redeem){if(e.redeem.network&&e.redeem.network!==d)throw new TypeError("Network mismatch");if(e.redeem.input&&e.redeem.input.length>0&&e.redeem.witness&&e.redeem.witness.length>0)throw new TypeError("Ambiguous witness source");if(e.redeem.output){if(0===u.decompile(e.redeem.output).length)throw new TypeError("Redeem.output is invalid");const n=a.sha256(e.redeem.output);if(t&&!t.equals(n))throw new TypeError("Hash mismatch");t=n}if(e.redeem.input&&!u.isPushOnly(p()))throw new TypeError("Non push-only scriptSig");if(e.witness&&e.redeem.witness&&!f(e.witness,e.redeem.witness))throw new TypeError("Witness and redeem.witness mismatch")}if(e.witness&&e.redeem&&e.redeem.output&&!e.redeem.output.equals(e.witness[e.witness.length-1]))throw new TypeError("Witness and redeem.output mismatch")}return Object.assign(m,e)}e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){const r=n(29).decompile,i=n(352),o=n(1371),s=n(353),a=n(354),u=n(1376),l=n(1379),c=n(1381),f=n(1383),h={P2MS:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",WITNESS_COMMITMENT:"witnesscommitment"};function p(e){if(l.output.check(e))return h.P2WPKH;if(c.output.check(e))return h.P2WSH;if(a.output.check(e))return h.P2PKH;if(u.output.check(e))return h.P2SH;const t=r(e);if(!t)throw new TypeError("Invalid script");return i.output.check(t)?h.P2MS:s.output.check(t)?h.P2PK:f.output.check(t)?h.WITNESS_COMMITMENT:o.output.check(t)?h.NULLDATA:h.NONSTANDARD}function d(e,t){const n=r(e);if(!n)throw new TypeError("Invalid script");return a.input.check(n)?h.P2PKH:u.input.check(n,t)?h.P2SH:i.input.check(n,t)?h.P2MS:s.input.check(n)?h.P2PK:h.NONSTANDARD}function m(e,t){const n=r(e);if(!n)throw new TypeError("Invalid script");return l.input.check(n)?h.P2WPKH:c.input.check(n,t)?h.P2WSH:h.NONSTANDARD}e.exports={input:d,output:p,witness:m,types:h}},function(e,t,n){const r=n(29),i=n(36);function o(e){return e===i.OP_0||r.isCanonicalScriptSignature(e)}function s(e,t){const n=r.decompile(e);return!(n.length<2)&&(n[0]===i.OP_0&&(t?n.slice(1).every(o):n.slice(1).every(r.isCanonicalScriptSignature)))}s.toJSON=function(){return"multisig input"},e.exports={check:s}},function(e,t,n){const r=n(29),i=n(93),o=n(36),s=o.OP_RESERVED;function a(e,t){const n=r.decompile(e);if(n.length<4)return!1;if(n[n.length-1]!==o.OP_CHECKMULTISIG)return!1;if(!i.Number(n[0]))return!1;if(!i.Number(n[n.length-2]))return!1;const a=n[0]-s,u=n[n.length-2]-s;if(a<=0)return!1;if(u>16)return!1;if(a>u)return!1;if(u!==n.length-3)return!1;if(t)return!0;const l=n.slice(1,-2);return l.every(r.isCanonicalPubKey)}a.toJSON=function(){return"multi-sig output"},e.exports={check:a}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.compile(e);return t.length>1&&t[0]===i.OP_RETURN}o.toJSON=function(){return"null data output"},e.exports={output:{check:o}}},function(e,t,n){const r=n(29);function i(e){const t=r.decompile(e);return 1===t.length&&r.isCanonicalScriptSignature(t[0])}i.toJSON=function(){return"pubKey input"},e.exports={check:i}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.decompile(e);return 2===t.length&&r.isCanonicalPubKey(t[0])&&t[1]===i.OP_CHECKSIG}o.toJSON=function(){return"pubKey output"},e.exports={check:o}},function(e,t,n){const r=n(29);function i(e){const t=r.decompile(e);return 2===t.length&&r.isCanonicalScriptSignature(t[0])&&r.isCanonicalPubKey(t[1])}i.toJSON=function(){return"pubKeyHash input"},e.exports={check:i}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.compile(e);return 25===t.length&&t[0]===i.OP_DUP&&t[1]===i.OP_HASH160&&20===t[2]&&t[23]===i.OP_EQUALVERIFY&&t[24]===i.OP_CHECKSIG}o.toJSON=function(){return"pubKeyHash output"},e.exports={check:o}},function(e,t,n){e.exports={input:n(1377),output:n(1378)}},function(e,t,n){const r=n(4).Buffer,i=n(29),o=n(352),s=n(353),a=n(354),u=n(584),l=n(585);function c(e,t){const n=i.decompile(e);if(n.length<1)return!1;const c=n[n.length-1];if(!r.isBuffer(c))return!1;const f=i.decompile(i.compile(n.slice(0,-1))),h=i.decompile(c);return!!h&&(!!i.isPushOnly(f)&&(1===n.length?l.check(h)||u.check(h):!(!a.input.check(f)||!a.output.check(h))||(!(!o.input.check(f,t)||!o.output.check(h))||!(!s.input.check(f)||!s.output.check(h)))))}c.toJSON=function(){return"scriptHash input"},e.exports={check:c}},function(e,t,n){const r=n(29),i=n(36);function o(e){const t=r.compile(e);return 23===t.length&&t[0]===i.OP_HASH160&&20===t[1]&&t[22]===i.OP_EQUAL}o.toJSON=function(){return"scriptHash output"},e.exports={check:o}},function(e,t,n){e.exports={input:n(1380),output:n(584)}},function(e,t,n){const r=n(29);function i(e){return r.isCanonicalPubKey(e)&&33===e.length}function o(e){const t=r.decompile(e);return 2===t.length&&r.isCanonicalScriptSignature(t[0])&&i(t[1])}o.toJSON=function(){return"witnessPubKeyHash input"},e.exports={check:o}},function(e,t,n){e.exports={input:n(1382),output:n(585)}},function(e,t,n){(function(t){const r=n(29),i=n(93),o=n(45),s=n(352),a=n(353),u=n(354);function l(e,n){if(o(i.Array,e),e.length<1)return!1;const l=e[e.length-1];if(!t.isBuffer(l))return!1;const c=r.decompile(l);if(!c||0===c.length)return!1;const f=r.compile(e.slice(0,-1));return!(!u.input.check(f)||!u.output.check(c))||(!(!s.input.check(f,n)||!s.output.check(c))||!(!a.input.check(f)||!a.output.check(c)))}l.toJSON=function(){return"witnessScriptHash input"},e.exports={check:l}}).call(this,n(0).Buffer)},function(e,t,n){e.exports={output:n(1384)}},function(e,t,n){const r=n(4).Buffer,i=n(29),o=n(93),s=n(45),a=n(36),u=r.from("aa21a9ed","hex");function l(e){const t=i.compile(e);return t.length>37&&t[0]===a.OP_RETURN&&36===t[1]&&t.slice(2,6).equals(u)}function c(e){s(o.Hash256bit,e);const t=r.allocUnsafe(36);return u.copy(t,0),e.copy(t,4),i.compile([a.OP_RETURN,t])}function f(e){return s(l,e),i.decompile(e)[1].slice(4,36)}l.toJSON=function(){return"Witness commitment output"},e.exports={check:l,decode:f,encode:c}},function(e,t,n){let r=n(4).Buffer,i=n(191),o=n(1386),s=n(124),a=n(45),u=n(582),l=a.BufferN(32),c=a.compile({wif:a.UInt8,bip32:{public:a.UInt32,private:a.UInt32}}),f={wif:128,bip32:{public:76067358,private:76066276}};function h(e,t,n,r){a(c,r),this.__d=e||null,this.__Q=t||null,this.chainCode=n,this.depth=0,this.index=0,this.network=r,this.parentFingerprint=0}Object.defineProperty(h.prototype,"identifier",{get:function(){return o.hash160(this.publicKey)}}),Object.defineProperty(h.prototype,"fingerprint",{get:function(){return this.identifier.slice(0,4)}}),Object.defineProperty(h.prototype,"privateKey",{enumerable:!1,get:function(){return this.__d}}),Object.defineProperty(h.prototype,"publicKey",{get:function(){return this.__Q||(this.__Q=s.pointFromScalar(this.__d,this.compressed)),this.__Q}}),h.prototype.isNeutered=function(){return null===this.__d},h.prototype.neutered=function(){let e=v(this.publicKey,this.chainCode,this.network);return e.depth=this.depth,e.index=this.index,e.parentFingerprint=this.parentFingerprint,e},h.prototype.toBase58=function(){let e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,n=r.allocUnsafe(78);return n.writeUInt32BE(t,0),n.writeUInt8(this.depth,4),n.writeUInt32BE(this.parentFingerprint,5),n.writeUInt32BE(this.index,9),this.chainCode.copy(n,13),this.isNeutered()?this.publicKey.copy(n,45):(n.writeUInt8(0,45),this.privateKey.copy(n,46)),i.encode(n)},h.prototype.toWIF=function(){if(!this.privateKey)throw new TypeError("Missing private key");return u.encode(this.network.wif,this.privateKey,!0)};let p=2147483648;h.prototype.derive=function(e){a(a.UInt32,e);let t=e>=2147483648,n=r.allocUnsafe(37);if(t){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");n[0]=0,this.privateKey.copy(n,1),n.writeUInt32BE(e,33)}else this.publicKey.copy(n,0),n.writeUInt32BE(e,33);let i=o.hmacSHA512(this.chainCode,n),u=i.slice(0,32),l=i.slice(32),c;if(!s.isPrivate(u))return this.derive(e+1);if(this.isNeutered()){let t=s.pointAddScalar(this.publicKey,u,!0);if(null===t)return this.derive(e+1);c=v(t,l,this.network)}else{let t=s.privateAdd(this.privateKey,u);if(null==t)return this.derive(e+1);c=b(t,l,this.network)}return c.depth=this.depth+1,c.index=e,c.parentFingerprint=this.fingerprint.readUInt32BE(0),c};let d=Math.pow(2,31)-1;function m(e){return a.UInt32(e)&&e<=d}function g(e){return a.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function y(e,t){let n=i.decode(e);if(78!==n.length)throw new TypeError("Invalid buffer length");t=t||f;let r=n.readUInt32BE(0);if(r!==t.bip32.private&&r!==t.bip32.public)throw new TypeError("Invalid network version");let o=n[4],s=n.readUInt32BE(5);if(0===o&&0!==s)throw new TypeError("Invalid parent fingerprint");let a=n.readUInt32BE(9);if(0===o&&0!==a)throw new TypeError("Invalid index");let u=n.slice(13,45),l;if(r===t.bip32.private){if(0!==n.readUInt8(45))throw new TypeError("Invalid private key");let e=n.slice(46,78);l=b(e,u,t)}else{let e=n.slice(45,78);l=v(e,u,t)}return l.depth=o,l.index=a,l.parentFingerprint=s,l}function b(e,t,n){if(a({privateKey:l,chainCode:l},{privateKey:e,chainCode:t}),n=n||f,!s.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return new h(e,null,t,n)}function v(e,t,n){if(a({publicKey:a.BufferN(33),chainCode:l},{publicKey:e,chainCode:t}),n=n||f,!s.isPoint(e))throw new TypeError("Point is not on the curve");return new h(null,e,t,n)}function w(e,t){if(a(a.Buffer,e),e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");t=t||f;let n=o.hmacSHA512("Bitcoin seed",e),r=n.slice(0,32),i=n.slice(32);return b(r,i,t)}h.prototype.deriveHardened=function(e){return a(m,e),this.derive(e+2147483648)},h.prototype.derivePath=function(e){a(g,e);let t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");t=t.slice(1)}return t.reduce(function(e,t){let n;return"'"===t.slice(-1)?(n=parseInt(t.slice(0,-1),10),e.deriveHardened(n)):(n=parseInt(t,10),e.derive(n))},this)},h.prototype.sign=function(e){return s.sign(e,this.privateKey)},h.prototype.verify=function(e,t){return s.verify(e,this.publicKey,t)},e.exports={fromBase58:y,fromPrivateKey:b,fromPublicKey:v,fromSeed:w}},function(e,t,n){let r=n(143),i=n(319);function o(e){const t=r("sha256").update(e).digest();try{return r("rmd160").update(t).digest()}catch(e){return r("ripemd160").update(t).digest()}}function s(e,t){return i("sha512",e).update(t).digest()}e.exports={hash160:o,hmacSHA512:s}},function(e,t,n){const r=n(269),i=n(192),o=n(4).Buffer;var s=e.exports=function(e){var t=[{name:"nonce",default:o.alloc(0)},{name:"balance",default:o.alloc(0)},{name:"stateRoot",length:32,default:r.SHA3_RLP},{name:"codeHash",length:32,default:r.SHA3_NULL}];r.defineProperties(this,t,e)};s.prototype.serialize=function(){return i.encode(this.raw)},s.prototype.isContract=function(){return this.codeHash.toString("hex")!==r.SHA3_NULL_S},s.prototype.getCode=function(e,t){this.isContract()?e.getRaw(this.codeHash,t):t(null,o.alloc(0))},s.prototype.setCode=function(e,t,n){var i=this;this.codeHash=r.sha3(t),this.codeHash.toString("hex")!==r.SHA3_NULL_S?e.putRaw(this.codeHash,t,function(e){n(e,i.codeHash)}):n(null,o.alloc(0))},s.prototype.getStorage=function(e,t,n){var r=e.copy();r.root=this.stateRoot,r.get(t,n)},s.prototype.setStorage=function(e,t,n,r){var i=this,o=e.copy();o.root=i.stateRoot,o.put(t,n,function(e){if(e)return r();i.stateRoot=o.root,r()})},s.prototype.isEmpty=function(){return""===this.balance.toString("hex")&&""===this.nonce.toString("hex")&&this.stateRoot.toString("hex")===r.SHA3_RLP_S&&this.codeHash.toString("hex")===r.SHA3_NULL_S}},function(e,t,n){"use strict";e.exports=n(1389)(n(1392))},function(e,t,n){"use strict";var r=n(1390),i=n(1391);e.exports=function(e){var t=r(e),n=i(e);return function(e,r){var i="string"==typeof e?e.toLowerCase():e;switch(i){case"keccak224":return new t(1152,448,null,224,r);case"keccak256":return new t(1088,512,null,256,r);case"keccak384":return new t(832,768,null,384,r);case"keccak512":return new t(576,1024,null,512,r);case"sha3-224":return new t(1152,448,6,224,r);case"sha3-256":return new t(1088,512,6,256,r);case"sha3-384":return new t(832,768,6,384,r);case"sha3-512":return new t(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+e)}}}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(57).Transform,o=n(1);e.exports=function(e){function t(t,n,r,o,s){i.call(this,s),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=o,this._options=s,this._state=new e,this._state.initialize(t,n),this._finalized=!1}return o(t,i),t.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},t.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},t.prototype.update=function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return r.isBuffer(e)||(e=r.from(e,t)),this._state.absorb(e),this},t.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t},t.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},t.prototype._clone=function(){var e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e},t}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(57).Transform,o=n(1);e.exports=function(e){function t(t,n,r,o){i.call(this,o),this._rate=t,this._capacity=n,this._delimitedSuffix=r,this._options=o,this._state=new e,this._state.initialize(t,n),this._finalized=!1}return o(t,i),t.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},t.prototype._flush=function(){},t.prototype._read=function(e){this.push(this.squeeze(e))},t.prototype.update=function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return r.isBuffer(e)||(e=r.from(e,t)),this._state.absorb(e),this},t.prototype.squeeze=function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n},t.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},t.prototype._clone=function(){var e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e},t}},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(1393);function o(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(var n=0;n<50;++n)this.state[n]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(var t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);for(var t=r.alloc(e),n=0;n<e;++n)t[n]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},function(e,t,n){"use strict";var r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49],p=f^(o<<1|s>>>31),d=h^(s<<1|o>>>31),m=e[0]^p,g=e[1]^d,y=e[10]^p,b=e[11]^d,v=e[20]^p,w=e[21]^d,_=e[30]^p,k=e[31]^d,S=e[40]^p,E=e[41]^d;p=n^(a<<1|u>>>31),d=i^(u<<1|a>>>31);var x=e[2]^p,C=e[3]^d,A=e[12]^p,I=e[13]^d,T=e[22]^p,j=e[23]^d,O=e[32]^p,P=e[33]^d,B=e[42]^p,R=e[43]^d;p=o^(l<<1|c>>>31),d=s^(c<<1|l>>>31);var N=e[4]^p,M=e[5]^d,L=e[14]^p,F=e[15]^d,D=e[24]^p,U=e[25]^d,z=e[34]^p,q=e[35]^d,K=e[44]^p,H=e[45]^d;p=a^(f<<1|h>>>31),d=u^(h<<1|f>>>31);var V=e[6]^p,W=e[7]^d,$=e[16]^p,G=e[17]^d,Y=e[26]^p,J=e[27]^d,Z=e[36]^p,X=e[37]^d,Q=e[46]^p,ee=e[47]^d;p=l^(n<<1|i>>>31),d=c^(i<<1|n>>>31);var te=e[8]^p,ne=e[9]^d,re=e[18]^p,ie=e[19]^d,oe=e[28]^p,se=e[29]^d,ae=e[38]^p,ue=e[39]^d,le=e[48]^p,ce=e[49]^d,fe=m,he=g,pe=b<<4|y>>>28,de=y<<4|b>>>28,me=v<<3|w>>>29,ge=w<<3|v>>>29,ye=k<<9|_>>>23,be=_<<9|k>>>23,ve=S<<18|E>>>14,we=E<<18|S>>>14,_e=x<<1|C>>>31,ke=C<<1|x>>>31,Se=I<<12|A>>>20,Ee=A<<12|I>>>20,xe=T<<10|j>>>22,Ce=j<<10|T>>>22,Ae=P<<13|O>>>19,Ie=O<<13|P>>>19,Te=B<<2|R>>>30,je=R<<2|B>>>30,Oe=M<<30|N>>>2,Pe=N<<30|M>>>2,Be=L<<6|F>>>26,Re=F<<6|L>>>26,Ne=U<<11|D>>>21,Me=D<<11|U>>>21,Le=z<<15|q>>>17,Fe=q<<15|z>>>17,De=H<<29|K>>>3,Ue=K<<29|H>>>3,ze=V<<28|W>>>4,qe=W<<28|V>>>4,Ke=G<<23|$>>>9,He=$<<23|G>>>9,Ve=Y<<25|J>>>7,We=J<<25|Y>>>7,$e=Z<<21|X>>>11,Ge=X<<21|Z>>>11,Ye=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=se<<7|oe>>>25,nt=oe<<7|se>>>25,rt=ae<<8|ue>>>24,it=ue<<8|ae>>>24,ot=le<<14|ce>>>18,st=ce<<14|le>>>18;e[0]=fe^~Se&Ne,e[1]=he^~Ee&Me,e[10]=ze^~Qe&me,e[11]=qe^~et&ge,e[20]=_e^~Be&Ve,e[21]=ke^~Re&We,e[30]=Ze^~pe&xe,e[31]=Xe^~de&Ce,e[40]=Oe^~Ke&tt,e[41]=Pe^~He&nt,e[2]=Se^~Ne&$e,e[3]=Ee^~Me&Ge,e[12]=Qe^~me&Ae,e[13]=et^~ge&Ie,e[22]=Be^~Ve&rt,e[23]=Re^~We&it,e[32]=pe^~xe&Le,e[33]=de^~Ce&Fe,e[42]=Ke^~tt&ye,e[43]=He^~nt&be,e[4]=Ne^~$e&ot,e[5]=Me^~Ge&st,e[14]=me^~Ae&De,e[15]=ge^~Ie&Ue,e[24]=Ve^~rt&ve,e[25]=We^~it&we,e[34]=xe^~Le&Ye,e[35]=Ce^~Fe&Je,e[44]=tt^~ye&Te,e[45]=nt^~be&je,e[6]=$e^~ot&fe,e[7]=Ge^~st&he,e[16]=Ae^~De&ze,e[17]=Ie^~Ue&qe,e[26]=rt^~ve&_e,e[27]=it^~we&ke,e[36]=Le^~Ye&Ze,e[37]=Fe^~Je&Xe,e[46]=ye^~Te&Oe,e[47]=be^~je&Pe,e[8]=ot^~fe&Se,e[9]=st^~he&Ee,e[18]=De^~ze&Qe,e[19]=Ue^~qe&et,e[28]=ve^~_e&Be,e[29]=we^~ke&Re,e[38]=Ye^~Ze&pe,e[39]=Je^~Xe&de,e[48]=Te^~Oe&Ke,e[49]=je^~Pe&He,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},function(e,t,n){"use strict";e.exports=n(467)(n(1395))},function(e,t,n){"use strict";var r=n(4).Buffer,i=n(143),o=n(63),s=n(74).ec,a=n(317),u=new s("secp256k1"),l=u.curve;function c(e,t){var n=new o(t);if(n.cmp(l.p)>=0)return null;n=n.toRed(l.red);var r=n.redSqr().redIMul(n).redIAdd(l.b).redSqrt();return 3===e!==r.isOdd()&&(r=r.redNeg()),u.keyPair({pub:{x:n,y:r}})}function f(e,t,n){var r=new o(t),i=new o(n);if(r.cmp(l.p)>=0||i.cmp(l.p)>=0)return null;if(r=r.toRed(l.red),i=i.toRed(l.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;var s=r.redSqr().redIMul(r);return i.redSqr().redISub(s.redIAdd(l.b)).isZero()?u.keyPair({pub:{x:r,y:i}}):null}function h(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:c(t,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:f(t,e.slice(1,33),e.slice(33,65));default:return null}}t.privateKeyVerify=function(e){var t=new o(e);return t.cmp(l.n)<0&&!t.isZero()},t.privateKeyExport=function(e,t){var n=new o(e);if(n.cmp(l.n)>=0||n.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return r.from(u.keyFromPrivate(e).getPublic(t,!0))},t.privateKeyNegate=function(e){var t=new o(e);return t.isZero()?r.alloc(32):l.n.sub(t).umod(l.n).toArrayLike(r,"be",32)},t.privateKeyModInverse=function(e){var t=new o(e);if(t.cmp(l.n)>=0||t.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID);return t.invm(l.n).toArrayLike(r,"be",32)},t.privateKeyTweakAdd=function(e,t){var n=new o(t);if(n.cmp(l.n)>=0)throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(n.iadd(new o(e)),n.cmp(l.n)>=0&&n.isub(l.n),n.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return n.toArrayLike(r,"be",32)},t.privateKeyTweakMul=function(e,t){var n=new o(t);if(n.cmp(l.n)>=0||n.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return n.imul(new o(e)),n.cmp(l.n)&&(n=n.umod(l.n)),n.toArrayLike(r,"be",32)},t.publicKeyCreate=function(e,t){var n=new o(e);if(n.cmp(l.n)>=0||n.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL);return r.from(u.keyFromPrivate(e).getPublic(t,!0))},t.publicKeyConvert=function(e,t){var n=h(e);if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return r.from(n.getPublic(t,!0))},t.publicKeyVerify=function(e){return null!==h(e)},t.publicKeyTweakAdd=function(e,t,n){var i=h(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if(t=new o(t),t.cmp(l.n)>=0)throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var s=l.g.mul(t).add(i.pub);if(s.isInfinity())throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return r.from(s.encode(!0,n))},t.publicKeyTweakMul=function(e,t,n){var i=h(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if(t=new o(t),t.cmp(l.n)>=0||t.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return r.from(i.pub.mul(t).encode(!0,n))},t.publicKeyCombine=function(e,t){for(var n=new Array(e.length),i=0;i<e.length;++i)if(n[i]=h(e[i]),null===n[i])throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);for(var o=n[0].pub,s=1;s<n.length;++s)o=o.add(n[s].pub);if(o.isInfinity())throw new Error(a.EC_PUBLIC_KEY_COMBINE_FAIL);return r.from(o.encode(!0,t))},t.signatureNormalize=function(e){var t=new o(e.slice(0,32)),n=new o(e.slice(32,64));if(t.cmp(l.n)>=0||n.cmp(l.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);var i=r.from(e);return 1===n.cmp(u.nh)&&l.n.sub(n).toArrayLike(r,"be",32).copy(i,32),i},t.signatureExport=function(e){var t=e.slice(0,32),n=e.slice(32,64);if(new o(t).cmp(l.n)>=0||new o(n).cmp(l.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:n}},t.signatureImport=function(e){var t=new o(e.r);t.cmp(l.n)>=0&&(t=new o(0));var n=new o(e.s);return n.cmp(l.n)>=0&&(n=new o(0)),r.concat([t.toArrayLike(r,"be",32),n.toArrayLike(r,"be",32)])},t.sign=function(e,t,n,i){if("function"==typeof n){var s=n;n=function(n){var u=s(e,t,null,i,n);if(!r.isBuffer(u)||32!==u.length)throw new Error(a.ECDSA_SIGN_FAIL);return new o(u)}}var c=new o(t);if(c.cmp(l.n)>=0||c.isZero())throw new Error(a.ECDSA_SIGN_FAIL);var f=u.sign(e,t,{canonical:!0,k:n,pers:i});return{signature:r.concat([f.r.toArrayLike(r,"be",32),f.s.toArrayLike(r,"be",32)]),recovery:f.recoveryParam}},t.verify=function(e,t,n){var r={r:t.slice(0,32),s:t.slice(32,64)},i=new o(r.r),s=new o(r.s);if(i.cmp(l.n)>=0||s.cmp(l.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);if(1===s.cmp(u.nh)||i.isZero()||s.isZero())return!1;var c=h(n);if(null===c)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return u.verify(e,r,{x:c.pub.x,y:c.pub.y})},t.recover=function(e,t,n,i){var s={r:t.slice(0,32),s:t.slice(32,64)},c=new o(s.r),f=new o(s.s);if(c.cmp(l.n)>=0||f.cmp(l.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);try{if(c.isZero()||f.isZero())throw new Error;var h=u.recoverPubKey(e,s,n);return r.from(h.encode(!0,i))}catch(e){throw new Error(a.ECDSA_RECOVER_FAIL)}},t.ecdh=function(e,n){var r=t.ecdhUnsafe(e,n,!0);return i("sha256").update(r).digest()},t.ecdhUnsafe=function(e,t,n){var i=h(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);var s=new o(t);if(s.cmp(l.n)>=0||s.isZero())throw new Error(a.ECDH_FAIL);return r.from(i.pub.mul(s).encode(!0,n))}},function(e,t,n){"use strict";(function(t){var r=n(587),i=n(1397);function o(e){var t=e;if("string"!=typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function s(e){var t=e.toString(16);return"0x"+t}function a(e){var n=s(e);return new t(o(n.slice(2)),"hex")}function u(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8")}function l(e,t,n){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(n)?"some":"every"](function(t){return e.indexOf(t)>=0})}function c(e){var n=new t(o(i(e).replace(/^0+|0+$/g,"")),"hex");return n.toString("utf8")}function f(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t}function h(e){var n=new t(e,"utf8");return"0x"+o(n.toString("hex")).replace(/^0+|0+$/g,"")}function p(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n),i=r.toString(16);t+=i.length<2?"0"+i:i}return"0x"+t}function d(e,t,n){if(!Array.isArray(e))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof e+"'");if("string"!=typeof t)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var r=[],i=0;i<e.length;i++){var o=e[i][t];if(n&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");r.push(o)}return r}function m(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}e.exports={arrayContainsArray:l,intToBuffer:a,getBinarySize:u,isHexPrefixed:r,stripHexPrefix:i,padToEven:o,intToHex:s,fromAscii:p,fromUtf8:h,toAscii:f,toUtf8:c,getKeys:d,isHexString:m}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(587);e.exports=function e(t){return"string"!=typeof t?t:r(t)?t.slice(2):t}},function(e,t,n){(function(t){e.exports=new t("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","hex")}).call(this,n(0).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1400),i=n(1406),o=function(){function e(e,t,n){this._chainParams=this.setChain(e),this._hardfork=null,this._supportedHardforks=void 0===n?[]:n,t&&this.setHardfork(t)}return e.prototype.setChain=function(e){if("number"==typeof e){if(!r.chains.names[e])throw new Error("Chain with ID "+e+" not supported");this._chainParams=r.chains[r.chains.names[e]]}else if("string"==typeof e){if(!r.chains[e])throw new Error("Chain with name "+e+" not supported");this._chainParams=r.chains[e]}else{if("object"!=typeof e)throw new Error("Wrong input format");for(var t=["networkId","genesis","hardforks","bootstrapNodes"],n=0,i=t;n<i.length;n++){var o=i[n];if(void 0===e[o])throw new Error("Missing required chain parameter: "+o)}this._chainParams=e}return this._chainParams},e.prototype.setHardfork=function(e){if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");for(var t=!1,n=0,r=i.hardforks;n<r.length;n++){var o=r[n];o[0]===e&&(this._hardfork=e,t=!0)}if(!t)throw new Error("Hardfork with name "+e+" not supported")},e.prototype._chooseHardfork=function(e,t){if(t=void 0===t||t,e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else{if(!this._hardfork)throw new Error("Method called with neither a hardfork set nor provided by param");e=this._hardfork}return e},e.prototype._getHardfork=function(e){for(var t=this.hardforks(),n=0,r=t;n<r.length;n++){var i=r[n];if(i.name===e)return i}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},e.prototype._isSupportedHardfork=function(e){if(!(this._supportedHardforks.length>0))return!0;for(var t=0,n=this._supportedHardforks;t<n.length;t++){var r=n[t];if(e===r)return!0}return!1},e.prototype.param=function(e,t,n){var r;n=this._chooseHardfork(n);for(var o=0,s=i.hardforks;o<s.length;o++){var a=s[o];if(!a[1][e])throw new Error("Topic "+e+" not defined");if(void 0!==a[1][e][t]&&(r=a[1][e][t].v),a[0]===n)break}if(void 0===r)throw new Error(e+" value for "+t+" not found");return r},e.prototype.paramByBlock=function(e,t,n){var r=this.activeHardforks(n),i=r[r.length-1].name;return this.param(e,t,i)},e.prototype.hardforkIsActiveOnBlock=function(e,t,n){n=void 0!==n?n:{};var r=void 0!==n.onlySupported&&n.onlySupported;e=this._chooseHardfork(e,r);var i=this.hardforkBlock(e);return null!==i&&t>=i},e.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},e.prototype.hardforkGteHardfork=function(e,t,n){n=void 0!==n?n:{};var r=void 0!==n.onlyActive&&n.onlyActive,i;e=this._chooseHardfork(e,n.onlySupported),i=r?this.activeHardforks(null,n):this.hardforks();for(var o=-1,s=-1,a=0,u=0,l=i;u<l.length;u++){var c=l[u];c.name===e&&(o=a),c.name===t&&(s=a),a+=1}return o>=s},e.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},e.prototype.hardforkIsActiveOnChain=function(e,t){t=void 0!==t?t:{};var n=void 0!==t.onlySupported&&t.onlySupported;e=this._chooseHardfork(e,n);for(var r=0,i=this.hardforks();r<i.length;r++){var o=i[r];if(o.name===e&&null!==o.block)return!0}return!1},e.prototype.activeHardforks=function(e,t){t=void 0!==t?t:{};for(var n=[],r=this.hardforks(),i=0,o=r;i<o.length;i++){var s=o[i];if(null!==s.block){if(void 0!==e&&null!==e&&e<s.block)break;t.onlySupported&&!this._isSupportedHardfork(s.name)||n.push(s)}}return n},e.prototype.activeHardfork=function(e,t){t=void 0!==t?t:{};var n=this.activeHardforks(e,t);if(n.length>0)return n[n.length-1].name;throw new Error("No (supported) active hardfork found")},e.prototype.hardforkBlock=function(e){return e=this._chooseHardfork(e,!1),this._getHardfork(e).block},e.prototype.isHardforkBlock=function(e,t){return t=this._chooseHardfork(t,!1),this.hardforkBlock(t)===e},e.prototype.consensus=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).consensus},e.prototype.finality=function(e){return e=this._chooseHardfork(e),this._getHardfork(e).finality},e.prototype.genesis=function(){return this._chainParams.genesis},e.prototype.hardforks=function(){return this._chainParams.hardforks},e.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},e.prototype.hardfork=function(){return this._hardfork},e.prototype.chainId=function(){return this._chainParams.chainId},e.prototype.chainName=function(){return r.chains.names[this.chainId()]||this._chainParams.name},e.prototype.networkId=function(){return this._chainParams.networkId},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chains={names:{1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",6284:"goerli"},mainnet:n(1401),ropsten:n(1402),rinkeby:n(1403),kovan:n(1404),goerli:n(1405)}},function(e){e.exports={name:"mainnet",chainId:1,networkId:1,comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{hash:"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",timestamp:null,gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",stateRoot:"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},hardforks:[{name:"chainstart",block:0,consensus:"pow",finality:null},{name:"homestead",block:115e4,consensus:"pow",finality:null},{name:"dao",block:192e4,consensus:"pow",finality:null},{name:"tangerineWhistle",block:2463e3,consensus:"pow",finality:null},{name:"spuriousDragon",block:2675e3,consensus:"pow",finality:null},{name:"byzantium",block:437e4,consensus:"pow",finality:null},{name:"constantinople",block:728e4,consensus:"pow",finality:null},{name:"petersburg",block:728e4,consensus:"pow",finality:null},{name:"istanbul",block:null,consensus:"pow",finality:null}],bootstrapNodes:[{ip:"13.93.211.84",port:30303,id:"3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99",location:"US-WEST",comment:"Go Bootnode"},{ip:"191.235.84.50",port:30303,id:"78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d",location:"BR",comment:"Go Bootnode"},{ip:"13.75.154.138",port:30303,id:"158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6",location:"AU",comment:"Go Bootnode"},{ip:"52.74.57.123",port:30303,id:"1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082",location:"SG",comment:"Go Bootnode"}]}},function(e){e.exports={name:"ropsten",chainId:3,networkId:3,comment:"PoW test network",url:"https://github.com/ethereum/ropsten",genesis:{hash:"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d",timestamp:null,gasLimit:16777216,difficulty:1048576,nonce:"0x0000000000000042",extraData:"0x3535353535353535353535353535353535353535353535353535353535353535",stateRoot:"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},hardforks:[{name:"chainstart",block:0,consensus:"pow",finality:null},{name:"homestead",block:0,consensus:"pow",finality:null},{name:"dao",block:null,consensus:"pow",finality:null},{name:"tangerineWhistle",block:0,consensus:"pow",finality:null},{name:"spuriousDragon",block:10,consensus:"pow",finality:null},{name:"byzantium",block:17e5,consensus:"pow",finality:null},{name:"constantinople",block:423e4,consensus:"pow",finality:null},{name:"petersburg",block:4939394,consensus:"pow",finality:null},{name:"istanbul",block:null,consensus:"pow",finality:null}],bootstrapNodes:[{ip:"52.176.7.10",port:"30303",id:"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606",network:"Ropsten",chainId:3,location:"US",comment:"US-Azure geth"},{ip:"52.176.100.77",port:"30303",id:"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c",network:"Ropsten",chainId:3,location:"US",comment:"US-Azure parity"},{ip:"52.232.243.152",port:"30303",id:"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f",network:"Ropsten",chainId:3,location:"US",comment:"Parity"},{ip:"192.81.208.223",port:"30303",id:"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09",network:"Ropsten",chainId:3,location:"US",comment:"@gpip"}]}},function(e){e.exports={name:"rinkeby",chainId:4,networkId:4,comment:"PoA test network",url:"https://www.rinkeby.io",genesis:{hash:"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177",timestamp:"0x58ee40ba",gasLimit:47e5,difficulty:1,nonce:"0x0000000000000000",extraData:"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},hardforks:[{name:"chainstart",block:0,consensus:"poa",finality:null},{name:"homestead",block:1,consensus:"poa",finality:null},{name:"dao",block:null,consensus:"poa",finality:null},{name:"tangerineWhistle",block:2,consensus:"poa",finality:null},{name:"spuriousDragon",block:3,consensus:"poa",finality:null},{name:"byzantium",block:1035301,consensus:"poa",finality:null},{name:"constantinople",block:null,consensus:"poa",finality:null},{name:"istanbul",block:null,consensus:"poa",finality:null}],bootstrapNodes:[{ip:"52.169.42.101",port:30303,id:"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf",location:"IE",comment:""},{ip:"52.3.158.184",port:30303,id:"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8",location:"",comment:"INFURA"}]}},function(e){e.exports={name:"kovan",chainId:42,networkId:42,comment:"Parity PoA test network",url:"https://kovan-testnet.github.io/website/",genesis:{hash:"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9",timestamp:null,gasLimit:6e6,difficulty:131072,nonce:"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",extraData:"0x",stateRoot:"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},hardforks:[],bootstrapNodes:[{ip:"40.71.221.215",port:30303,id:"56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de",location:"",comment:"Parity Bootnode"},{ip:"52.166.117.77",port:30303,id:"d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3",location:"",comment:"Parity Bootnode"},{ip:"52.165.239.18",port:30303,id:"8fa162563a8e5a05eef3e1cd5abc5828c71344f7277bb788a395cce4a0e30baf2b34b92fe0b2dbbba2313ee40236bae2aab3c9811941b9f5a7e8e90aaa27ecba",location:"",comment:"Parity Bootnode"},{ip:"52.243.47.56",port:30303,id:"7e2e7f00784f516939f94e22bdc6cf96153603ca2b5df1c7cc0f90a38e7a2f218ffb1c05b156835e8b49086d11fdd1b3e2965be16baa55204167aa9bf536a4d9",location:"",comment:"Parity Bootnode"},{ip:"40.68.248.100",port:30303,id:"0518a3d35d4a7b3e8c433e7ffd2355d84a1304ceb5ef349787b556197f0c87fad09daed760635b97d52179d645d3e6d16a37d2cc0a9945c2ddf585684beb39ac",location:"",comment:"Parity Bootnode"}]}},function(e){e.exports={name:"goerli",chainId:5,networkId:5,comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{hash:"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a",timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",stateRoot:"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},hardforks:[{name:"chainstart",block:0,consensus:"poa",finality:null},{name:"homestead",block:0,consensus:"poa",finality:null},{name:"dao",block:0,consensus:"poa",finality:null},{name:"tangerineWhistle",block:0,consensus:"poa",finality:null},{name:"spuriousDragon",block:0,consensus:"poa",finality:null},{name:"byzantium",block:0,consensus:"poa",finality:null},{name:"constantinople",block:0,consensus:"poa",finality:null},{name:"petersburg",block:0,consensus:"poa",finality:null},{name:"istanbul",block:null,consensus:"poa",finality:null}],bootstrapNodes:[{ip:"51.141.78.53",port:30303,id:"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a",location:"",comment:"Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt"},{ip:"13.93.54.137",port:30303,id:"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b",location:"",comment:"Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt"},{ip:"94.237.54.114",port:30313,id:"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291",location:"",comment:"Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt"},{ip:"52.64.155.147",port:30303,id:"c1f8b7c2ac4453271fa07d8e9ecf9a2e8285aa0bd0c07df0131f47153306b0736fd3db8924e7a9bf0bed6b1d8d4f87362a71b033dc7c64547728d953e43e59b2",location:"",comment:"Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt"},{ip:"213.186.16.82",port:30303,id:"f4a9c6ee28586009fb5a96c8af13a58ed6d8315a9eee4772212c1d4d9cebe5a8b8a78ea4434f318726317d04a3f531a1ef0420cf9752605a562cfe858c46e263",location:"",comment:"Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt"}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=[["chainstart",n(1407)],["homestead",n(1408)],["dao",n(1409)],["tangerineWhistle",n(1410)],["spuriousDragon",n(1411)],["byzantium",n(1412)],["constantinople",n(1413)],["petersburg",n(1414)],["istanbul",n(1415)]]},function(e){e.exports={name:"chainstart",comment:"Start of the Ethereum main chain",eip:{url:"",status:""},status:"",gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"}},gasPrices:{tierStep:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them"},exp:{v:10,d:"Once per EXP instuction"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},sha3:{v:30,d:"Once per SHA3 operation"},sha3Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Once per SLOAD operation"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Refunded gas, once per SSTORE operation if the zeroness changes to zero"},log:{v:375,d:"Per LOG* operation"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Once per CREATE operation & contract-creation transaction"},call:{v:40,d:"Once per CALL operation & message call transaction"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"}},casper:{},sharding:{}}},function(e){e.exports={name:"homestead",comment:"Homestead hardfork with protocol and network changes",eip:{url:"https://eips.ethereum.org/EIPS/eip-606",status:"Final"},gasConfig:{},gasPrices:{},vm:{},pow:{},casper:{},sharding:{}}},function(e){e.exports={name:"dao",comment:"DAO rescue hardfork",eip:{url:"https://eips.ethereum.org/EIPS/eip-779",status:"Final"},gasConfig:{},gasPrices:{},vm:{},pow:{},casper:{},sharding:{}}},function(e){e.exports={name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",eip:{url:"https://eips.ethereum.org/EIPS/eip-608",status:"Final"},gasConfig:{},gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"}},vm:{},pow:{},casper:{},sharding:{}}},function(e){e.exports={name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",eip:{url:"https://eips.ethereum.org/EIPS/eip-607",status:"Final"},gasConfig:{},gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}},pow:{},casper:{},sharding:{}}},function(e){e.exports={name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",eip:{url:"https://eips.ethereum.org/EIPS/eip-609",status:"Final"},gasConfig:{},gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"}},vm:{},pow:{minerReward:{v:"3000000000000000000",d:"the amount a miner get rewarded for mining a block"}},casper:{},sharding:{}}},function(e){e.exports={name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",eip:{url:"https://eips.ethereum.org/EIPS/eip-1013",status:"Final"},gasConfig:{},gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"}},vm:{},pow:{minerReward:{v:"2000000000000000000",d:"The amount a miner gets rewarded for mining a block"}},casper:{},sharding:{}}},function(e){e.exports={name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",eip:{url:"https://github.com/ethereum/EIPs/pull/1716",status:"Draft"},gasConfig:{},gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}},vm:{},pow:{},casper:{},sharding:{}}},function(e){e.exports={name:"istanbul",comment:"HF targeted for October 2019 following the Constantinople/Petersburg HF",eip:{url:"https://eips.ethereum.org/EIPS/eip-1679",status:"Draft"},gasConfig:{},gasPrices:{ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"}},vm:{},pow:{},casper:{},sharding:{}}},function(e,t,n){"use strict";const r=n(11),i=n(56),o=n(217),s=n(192),a=n(592),u=n(58),l=n(193),c=n(591).resolver,f=n(194),h=f("eth-block-list",void 0,d),p=h.util;function d(e,t,n){let r=[];r.push({path:"count",value:e.length}),i(e,(t,n)=>{const i=e.indexOf(t),o=i.toString();r.push({path:o,value:t}),c._mapFromEthObject(t,{},(e,t)=>{if(e)return n(e);t.forEach(e=>e.path=o+"/"+e.path),r=r.concat(t),n()})},e=>{if(e)return n(e);n(null,r)})}p.serialize=o(e=>{const t=e.map(e=>e.raw);return s.encode(t)}),p.deserialize=o(e=>{const t=s.decode(e);return t.map(e=>new a(e))}),p.cid=((e,t,n)=>{"function"==typeof t&&(n=t,t={}),t=t||{};const i=t.hashAlg||"keccak-256",s=void 0===t.version?1:t.version;r([t=>p.serialize(e,t),(e,t)=>u.digest(e,i,t),o(e=>l("eth-block-list",e,t))],n)}),e.exports=h},function(e,t,n){"use strict";const r=n(586),i=n(355),o=i("eth-state-trie",r);e.exports=o},function(e,t,n){"use strict";(function(t){var r=n(192),i=n(269);function o(e,t,n){if(Array.isArray(e))this.parseNode(e);else if(this.type=e,"branch"===e){var r=t;this.raw=Array.apply(null,Array(17)),r&&r.forEach(function(e){this.set.apply(this,e)})}else this.raw=Array(2),this.setValue(n),this.setKey(t)}function s(e,t){return e.length%2?e.unshift(1):(e.unshift(0),e.unshift(0)),t&&(e[0]+=2),e}function a(e){return e=e[0]%2?e.slice(1):e.slice(2),e}function u(e){return e[0]>1}function l(e){for(var n=new t(e),r=[],i=0;i<n.length;i++){var o=2*i;r[o]=n[i]>>4,++o,r[o]=n[i]%16}return r}function c(e){for(var n=new t(e.length/2),r=0;r<n.length;r++){var i=2*r;n[r]=(e[i]<<4)+e[++i]}return n}function f(e){if(17===e.length)return"branch";if(2===e.length){var t=l(e[0]);return u(t)?"leaf":"extention"}}function h(e){return Array.isArray(e)&&!t.isBuffer(e)}e.exports=o,o.isRawNode=h,o.addHexPrefix=s,o.removeHexPrefix=a,o.isTerminator=u,o.stringToNibbles=l,o.nibblesToBuffer=c,o.getNodeType=f,Object.defineProperty(o.prototype,"value",{get:function e(){return this.getValue()},set:function e(t){this.setValue(t)}}),Object.defineProperty(o.prototype,"key",{get:function e(){return this.getKey()},set:function e(t){this.setKey(t)}}),o.prototype.parseNode=function(e){this.raw=e,this.type=f(e)},o.prototype.setValue=function(e,t){"branch"!==this.type?this.raw[1]=e:(1===arguments.length&&(t=e,e=16),this.raw[e]=t)},o.prototype.getValue=function(e){if("branch"!==this.type)return this.raw[1];0===arguments.length&&(e=16);var t=this.raw[e];return null!==t&&void 0!==t&&0!==t.length?t:void 0},o.prototype.setKey=function(e){"branch"!==this.type&&(e=t.isBuffer(e)?l(e):e.slice(0),e=s(e,"leaf"===this.type),this.raw[0]=c(e))},o.prototype.getKey=function(){if("branch"!==this.type){var e=this.raw[0];return e=a(l(e)),e}},o.prototype.serialize=function(){return r.encode(this.raw)},o.prototype.hash=function(){return i.sha3(this.serialize())},o.prototype.toString=function(){var e=this.type;return e+=": [",this.raw.forEach(function(n){t.isBuffer(n)?e+=n.toString("hex")+", ":e+=n?"object, ":"empty, "}),e=e.slice(0,-2),e+="]",e},o.prototype.getChildren=function(){var e=[];switch(this.type){case"leaf":break;case"extention":e.push([this.key,this.getValue()]);break;case"branch":for(var t=0,n=16;t<16;t++){var r=this.getValue(t);r&&e.push([[t],r])}}return e}}).call(this,n(0).Buffer)},function(e,t){function n(e){return Boolean(e["/"])}e.exports=n},function(e,t,n){"use strict";const r=n(355),i=r("eth-storage-trie");e.exports=i},function(e,t,n){"use strict";(function(t){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(269),o=n(1422),s=i.BN,a=new s("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=function(){function e(n){r(this,e),n=n||{};var o=[{name:"nonce",length:32,allowLess:!0,default:new t([])},{name:"gasPrice",length:32,allowLess:!0,default:new t([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new t([])},{name:"to",allowZero:!0,length:20,default:new t([])},{name:"value",length:32,allowLess:!0,default:new t([])},{name:"data",alias:"input",allowZero:!0,default:new t([])},{name:"v",allowZero:!0,default:new t([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new t([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new t([])}];i.defineProperties(this,o,n),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var s=i.bufferToInt(this.v),a=Math.floor((s-35)/2);a<0&&(a=0),this._chainId=a||n.chainId||0,this._homestead=!0}return e.prototype.toCreationAddress=function e(){return""===this.to.toString("hex")},e.prototype.hash=function e(t){void 0===t&&(t=!0);var n=void 0;if(t)n=this.raw;else if(this._chainId>0){var r=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,n=this.raw,this.raw=r}else n=this.raw.slice(0,6);return i.rlphash(n)},e.prototype.getChainId=function e(){return this._chainId},e.prototype.getSenderAddress=function e(){if(this._from)return this._from;var t=this.getSenderPublicKey();return this._from=i.publicToAddress(t),this._from},e.prototype.getSenderPublicKey=function e(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function e(){var t=this.hash(!1);if(this._homestead&&1===new s(this.s).cmp(a))return!1;try{var n=i.bufferToInt(this.v);this._chainId>0&&(n-=2*this._chainId+8),this._senderPubKey=i.ecrecover(t,n,this.r,this.s)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function e(t){var n=this.hash(!1),r=i.ecsign(n,t);this._chainId>0&&(r.v+=2*this._chainId+8),Object.assign(this,r)},e.prototype.getDataFee=function e(){for(var t=this.raw[5],n=new s(0),r=0;r<t.length;r++)0===t[r]?n.iaddn(o.txDataZeroGas.v):n.iaddn(o.txDataNonZeroGas.v);return n},e.prototype.getBaseFee=function e(){var t=this.getDataFee().iaddn(o.txGas.v);return this._homestead&&this.toCreationAddress()&&t.iaddn(o.txCreation.v),t},e.prototype.getUpfrontCost=function e(){return new s(this.gasLimit).imul(new s(this.gasPrice)).iadd(new s(this.value))},e.prototype.validate=function e(t){var n=[];return this.verifySignature()||n.push("Invalid Signature"),this.getBaseFee().cmp(new s(this.gasLimit))>0&&n.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===t||!1===t?0===n.length:n.join(" ")},e}();e.exports=u}).call(this,n(0).Buffer)},function(e){e.exports={genesisGasLimit:{v:5e3,d:"Gas limit of the Genesis block."},genesisDifficulty:{v:17179869184,d:"Difficulty of the Genesis block."},genesisNonce:{v:"0x0000000000000042",d:"the geneis nonce"},genesisExtraData:{v:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",d:"extra data "},genesisHash:{v:"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",d:"genesis hash"},genesisStateRoot:{v:"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544",d:"the genesis state root"},minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be."},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations."},minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be."},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations."},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},maximumExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis."},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs."},stackLimit:{v:1024,d:"Maximum size of VM stack allowed."},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack."},tierStepGas:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them."},expGas:{v:10,d:"Once per EXP instuction."},expByteGas:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction."},sha3Gas:{v:30,d:"Once per SHA3 operation."},sha3WordGas:{v:6,d:"Once per word of the SHA3 operation's data."},sloadGas:{v:50,d:"Once per SLOAD operation."},sstoreSetGas:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero."},sstoreResetGas:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero."},sstoreRefundGas:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero."},jumpdestGas:{v:1,d:"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},logGas:{v:375,d:"Per LOG* operation."},logDataGas:{v:8,d:"Per byte in a LOG* operation's data."},logTopicGas:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},createGas:{v:32e3,d:"Once per CREATE operation & contract-creation transaction."},callGas:{v:40,d:"Once per CALL operation & message call transaction."},callStipend:{v:2300,d:"Free gas given at beginning of call."},callValueTransferGas:{v:9e3,d:"Paid for CALL when the value transfor is non-zero."},callNewAccountGas:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior."},suicideRefundGas:{v:24e3,d:"Refunded following a suicide operation."},memoryGas:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation."},createDataGas:{v:200,d:""},txGas:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions."},txCreation:{v:32e3,d:"the cost of creating a contract via tx"},txDataZeroGas:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},txDataNonZeroGas:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},copyGas:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},ecrecoverGas:{v:3e3,d:""},sha256Gas:{v:60,d:""},sha256WordGas:{v:12,d:""},ripemd160Gas:{v:600,d:""},ripemd160WordGas:{v:120,d:""},identityGas:{v:15,d:""},identityWordGas:{v:3,d:""},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"},ommerReward:{v:"625000000000000000",d:"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},niblingReward:{v:"156250000000000000",d:"the amount a miner gets for inculding a uncle"},homeSteadForkNumber:{v:115e4,d:"the block that the Homestead fork started at"},homesteadRepriceForkNumber:{v:2463e3,d:"the block that the Homestead Reprice (EIP150) fork started at"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},freeBlockPeriod:{v:2}}},function(e,t,n){"use strict";const r=n(593),i=n(355),o=i("eth-tx-trie",r);e.exports=o},function(e,t,n){"use strict";t.util=n(594),t.resolver=n(595)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const n={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};function r(t){if(!e.isEncoding(t))throw new Error(n.INVALID_ENCODING)}function i(e){return"number"==typeof e&&isFinite(e)&&l(e)}function o(e,t){if("number"!=typeof e)throw new Error(t?n.INVALID_OFFSET_NON_NUMBER:n.INVALID_LENGTH_NON_NUMBER);if(!i(e)||e<0)throw new Error(t?n.INVALID_OFFSET:n.INVALID_LENGTH)}function s(e){o(e,!1)}function a(e){o(e,!0)}function u(e,t){if(e<0||e>t.length)throw new Error(n.INVALID_TARGET_OFFSET)}function l(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}t.ERRORS=n,t.checkEncoding=r,t.isFiniteInteger=i,t.checkLengthValue=s,t.checkOffsetValue=a,t.checkTargetOffset=u}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(e){t.raw=e.from("55","hex"),t.cbor=e.from("51","hex"),t.protobuf=e.from("50","hex"),t.rlp=e.from("60","hex"),t.bencode=e.from("63","hex"),t.multicodec=e.from("30","hex"),t.multihash=e.from("31","hex"),t.multiaddr=e.from("32","hex"),t.multibase=e.from("33","hex"),t.identity=e.from("00","hex"),t.md4=e.from("d4","hex"),t.md5=e.from("d5","hex"),t.sha1=e.from("11","hex"),t["sha2-256"]=e.from("12","hex"),t["sha2-512"]=e.from("13","hex"),t["dbl-sha2-256"]=e.from("56","hex"),t["sha3-224"]=e.from("17","hex"),t["sha3-256"]=e.from("16","hex"),t["sha3-384"]=e.from("15","hex"),t["sha3-512"]=e.from("14","hex"),t["shake-128"]=e.from("18","hex"),t["shake-256"]=e.from("19","hex"),t["keccak-224"]=e.from("1a","hex"),t["keccak-256"]=e.from("1b","hex"),t["keccak-384"]=e.from("1c","hex"),t["keccak-512"]=e.from("1d","hex"),t["murmur3-128"]=e.from("22","hex"),t["murmur3-32"]=e.from("23","hex"),t.x11=e.from("1100","hex"),t["blake2b-8"]=e.from("b201","hex"),t["blake2b-16"]=e.from("b202","hex"),t["blake2b-24"]=e.from("b203","hex"),t["blake2b-32"]=e.from("b204","hex"),t["blake2b-40"]=e.from("b205","hex"),t["blake2b-48"]=e.from("b206","hex"),t["blake2b-56"]=e.from("b207","hex"),t["blake2b-64"]=e.from("b208","hex"),t["blake2b-72"]=e.from("b209","hex"),t["blake2b-80"]=e.from("b20a","hex"),t["blake2b-88"]=e.from("b20b","hex"),t["blake2b-96"]=e.from("b20c","hex"),t["blake2b-104"]=e.from("b20d","hex"),t["blake2b-112"]=e.from("b20e","hex"),t["blake2b-120"]=e.from("b20f","hex"),t["blake2b-128"]=e.from("b210","hex"),t["blake2b-136"]=e.from("b211","hex"),t["blake2b-144"]=e.from("b212","hex"),t["blake2b-152"]=e.from("b213","hex"),t["blake2b-160"]=e.from("b214","hex"),t["blake2b-168"]=e.from("b215","hex"),t["blake2b-176"]=e.from("b216","hex"),t["blake2b-184"]=e.from("b217","hex"),t["blake2b-192"]=e.from("b218","hex"),t["blake2b-200"]=e.from("b219","hex"),t["blake2b-208"]=e.from("b21a","hex"),t["blake2b-216"]=e.from("b21b","hex"),t["blake2b-224"]=e.from("b21c","hex"),t["blake2b-232"]=e.from("b21d","hex"),t["blake2b-240"]=e.from("b21e","hex"),t["blake2b-248"]=e.from("b21f","hex"),t["blake2b-256"]=e.from("b220","hex"),t["blake2b-264"]=e.from("b221","hex"),t["blake2b-272"]=e.from("b222","hex"),t["blake2b-280"]=e.from("b223","hex"),t["blake2b-288"]=e.from("b224","hex"),t["blake2b-296"]=e.from("b225","hex"),t["blake2b-304"]=e.from("b226","hex"),t["blake2b-312"]=e.from("b227","hex"),t["blake2b-320"]=e.from("b228","hex"),t["blake2b-328"]=e.from("b229","hex"),t["blake2b-336"]=e.from("b22a","hex"),t["blake2b-344"]=e.from("b22b","hex"),t["blake2b-352"]=e.from("b22c","hex"),t["blake2b-360"]=e.from("b22d","hex"),t["blake2b-368"]=e.from("b22e","hex"),t["blake2b-376"]=e.from("b22f","hex"),t["blake2b-384"]=e.from("b230","hex"),t["blake2b-392"]=e.from("b231","hex"),t["blake2b-400"]=e.from("b232","hex"),t["blake2b-408"]=e.from("b233","hex"),t["blake2b-416"]=e.from("b234","hex"),t["blake2b-424"]=e.from("b235","hex"),t["blake2b-432"]=e.from("b236","hex"),t["blake2b-440"]=e.from("b237","hex"),t["blake2b-448"]=e.from("b238","hex"),t["blake2b-456"]=e.from("b239","hex"),t["blake2b-464"]=e.from("b23a","hex"),t["blake2b-472"]=e.from("b23b","hex"),t["blake2b-480"]=e.from("b23c","hex"),t["blake2b-488"]=e.from("b23d","hex"),t["blake2b-496"]=e.from("b23e","hex"),t["blake2b-504"]=e.from("b23f","hex"),t["blake2b-512"]=e.from("b240","hex"),t["blake2s-8"]=e.from("b241","hex"),t["blake2s-16"]=e.from("b242","hex"),t["blake2s-24"]=e.from("b243","hex"),t["blake2s-32"]=e.from("b244","hex"),t["blake2s-40"]=e.from("b245","hex"),t["blake2s-48"]=e.from("b246","hex"),t["blake2s-56"]=e.from("b247","hex"),t["blake2s-64"]=e.from("b248","hex"),t["blake2s-72"]=e.from("b249","hex"),t["blake2s-80"]=e.from("b24a","hex"),t["blake2s-88"]=e.from("b24b","hex"),t["blake2s-96"]=e.from("b24c","hex"),t["blake2s-104"]=e.from("b24d","hex"),t["blake2s-112"]=e.from("b24e","hex"),t["blake2s-120"]=e.from("b24f","hex"),t["blake2s-128"]=e.from("b250","hex"),t["blake2s-136"]=e.from("b251","hex"),t["blake2s-144"]=e.from("b252","hex"),t["blake2s-152"]=e.from("b253","hex"),t["blake2s-160"]=e.from("b254","hex"),t["blake2s-168"]=e.from("b255","hex"),t["blake2s-176"]=e.from("b256","hex"),t["blake2s-184"]=e.from("b257","hex"),t["blake2s-192"]=e.from("b258","hex"),t["blake2s-200"]=e.from("b259","hex"),t["blake2s-208"]=e.from("b25a","hex"),t["blake2s-216"]=e.from("b25b","hex"),t["blake2s-224"]=e.from("b25c","hex"),t["blake2s-232"]=e.from("b25d","hex"),t["blake2s-240"]=e.from("b25e","hex"),t["blake2s-248"]=e.from("b25f","hex"),t["blake2s-256"]=e.from("b260","hex"),t["skein256-8"]=e.from("b301","hex"),t["skein256-16"]=e.from("b302","hex"),t["skein256-24"]=e.from("b303","hex"),t["skein256-32"]=e.from("b304","hex"),t["skein256-40"]=e.from("b305","hex"),t["skein256-48"]=e.from("b306","hex"),t["skein256-56"]=e.from("b307","hex"),t["skein256-64"]=e.from("b308","hex"),t["skein256-72"]=e.from("b309","hex"),t["skein256-80"]=e.from("b30a","hex"),t["skein256-88"]=e.from("b30b","hex"),t["skein256-96"]=e.from("b30c","hex"),t["skein256-104"]=e.from("b30d","hex"),t["skein256-112"]=e.from("b30e","hex"),t["skein256-120"]=e.from("b30f","hex"),t["skein256-128"]=e.from("b310","hex"),t["skein256-136"]=e.from("b311","hex"),t["skein256-144"]=e.from("b312","hex"),t["skein256-152"]=e.from("b313","hex"),t["skein256-160"]=e.from("b314","hex"),t["skein256-168"]=e.from("b315","hex"),t["skein256-176"]=e.from("b316","hex"),t["skein256-184"]=e.from("b317","hex"),t["skein256-192"]=e.from("b318","hex"),t["skein256-200"]=e.from("b319","hex"),t["skein256-208"]=e.from("b31a","hex"),t["skein256-216"]=e.from("b31b","hex"),t["skein256-224"]=e.from("b31c","hex"),t["skein256-232"]=e.from("b31d","hex"),t["skein256-240"]=e.from("b31e","hex"),t["skein256-248"]=e.from("b31f","hex"),t["skein256-256"]=e.from("b320","hex"),t["skein512-8"]=e.from("b321","hex"),t["skein512-16"]=e.from("b322","hex"),t["skein512-24"]=e.from("b323","hex"),t["skein512-32"]=e.from("b324","hex"),t["skein512-40"]=e.from("b325","hex"),t["skein512-48"]=e.from("b326","hex"),t["skein512-56"]=e.from("b327","hex"),t["skein512-64"]=e.from("b328","hex"),t["skein512-72"]=e.from("b329","hex"),t["skein512-80"]=e.from("b32a","hex"),t["skein512-88"]=e.from("b32b","hex"),t["skein512-96"]=e.from("b32c","hex"),t["skein512-104"]=e.from("b32d","hex"),t["skein512-112"]=e.from("b32e","hex"),t["skein512-120"]=e.from("b32f","hex"),t["skein512-128"]=e.from("b330","hex"),t["skein512-136"]=e.from("b331","hex"),t["skein512-144"]=e.from("b332","hex"),t["skein512-152"]=e.from("b333","hex"),t["skein512-160"]=e.from("b334","hex"),t["skein512-168"]=e.from("b335","hex"),t["skein512-176"]=e.from("b336","hex"),t["skein512-184"]=e.from("b337","hex"),t["skein512-192"]=e.from("b338","hex"),t["skein512-200"]=e.from("b339","hex"),t["skein512-208"]=e.from("b33a","hex"),t["skein512-216"]=e.from("b33b","hex"),t["skein512-224"]=e.from("b33c","hex"),t["skein512-232"]=e.from("b33d","hex"),t["skein512-240"]=e.from("b33e","hex"),t["skein512-248"]=e.from("b33f","hex"),t["skein512-256"]=e.from("b340","hex"),t["skein512-264"]=e.from("b341","hex"),t["skein512-272"]=e.from("b342","hex"),t["skein512-280"]=e.from("b343","hex"),t["skein512-288"]=e.from("b344","hex"),t["skein512-296"]=e.from("b345","hex"),t["skein512-304"]=e.from("b346","hex"),t["skein512-312"]=e.from("b347","hex"),t["skein512-320"]=e.from("b348","hex"),t["skein512-328"]=e.from("b349","hex"),t["skein512-336"]=e.from("b34a","hex"),t["skein512-344"]=e.from("b34b","hex"),t["skein512-352"]=e.from("b34c","hex"),t["skein512-360"]=e.from("b34d","hex"),t["skein512-368"]=e.from("b34e","hex"),t["skein512-376"]=e.from("b34f","hex"),t["skein512-384"]=e.from("b350","hex"),t["skein512-392"]=e.from("b351","hex"),t["skein512-400"]=e.from("b352","hex"),t["skein512-408"]=e.from("b353","hex"),t["skein512-416"]=e.from("b354","hex"),t["skein512-424"]=e.from("b355","hex"),t["skein512-432"]=e.from("b356","hex"),t["skein512-440"]=e.from("b357","hex"),t["skein512-448"]=e.from("b358","hex"),t["skein512-456"]=e.from("b359","hex"),t["skein512-464"]=e.from("b35a","hex"),t["skein512-472"]=e.from("b35b","hex"),t["skein512-480"]=e.from("b35c","hex"),t["skein512-488"]=e.from("b35d","hex"),t["skein512-496"]=e.from("b35e","hex"),t["skein512-504"]=e.from("b35f","hex"),t["skein512-512"]=e.from("b360","hex"),t["skein1024-8"]=e.from("b361","hex"),t["skein1024-16"]=e.from("b362","hex"),t["skein1024-24"]=e.from("b363","hex"),t["skein1024-32"]=e.from("b364","hex"),t["skein1024-40"]=e.from("b365","hex"),t["skein1024-48"]=e.from("b366","hex"),t["skein1024-56"]=e.from("b367","hex"),t["skein1024-64"]=e.from("b368","hex"),t["skein1024-72"]=e.from("b369","hex"),t["skein1024-80"]=e.from("b36a","hex"),t["skein1024-88"]=e.from("b36b","hex"),t["skein1024-96"]=e.from("b36c","hex"),t["skein1024-104"]=e.from("b36d","hex"),t["skein1024-112"]=e.from("b36e","hex"),t["skein1024-120"]=e.from("b36f","hex"),t["skein1024-128"]=e.from("b370","hex"),t["skein1024-136"]=e.from("b371","hex"),t["skein1024-144"]=e.from("b372","hex"),t["skein1024-152"]=e.from("b373","hex"),t["skein1024-160"]=e.from("b374","hex"),t["skein1024-168"]=e.from("b375","hex"),t["skein1024-176"]=e.from("b376","hex"),t["skein1024-184"]=e.from("b377","hex"),t["skein1024-192"]=e.from("b378","hex"),t["skein1024-200"]=e.from("b379","hex"),t["skein1024-208"]=e.from("b37a","hex"),t["skein1024-216"]=e.from("b37b","hex"),t["skein1024-224"]=e.from("b37c","hex"),t["skein1024-232"]=e.from("b37d","hex"),t["skein1024-240"]=e.from("b37e","hex"),t["skein1024-248"]=e.from("b37f","hex"),t["skein1024-256"]=e.from("b380","hex"),t["skein1024-264"]=e.from("b381","hex"),t["skein1024-272"]=e.from("b382","hex"),t["skein1024-280"]=e.from("b383","hex"),t["skein1024-288"]=e.from("b384","hex"),t["skein1024-296"]=e.from("b385","hex"),t["skein1024-304"]=e.from("b386","hex"),t["skein1024-312"]=e.from("b387","hex"),t["skein1024-320"]=e.from("b388","hex"),t["skein1024-328"]=e.from("b389","hex"),t["skein1024-336"]=e.from("b38a","hex"),t["skein1024-344"]=e.from("b38b","hex"),t["skein1024-352"]=e.from("b38c","hex"),t["skein1024-360"]=e.from("b38d","hex"),t["skein1024-368"]=e.from("b38e","hex"),t["skein1024-376"]=e.from("b38f","hex"),t["skein1024-384"]=e.from("b390","hex"),t["skein1024-392"]=e.from("b391","hex"),t["skein1024-400"]=e.from("b392","hex"),t["skein1024-408"]=e.from("b393","hex"),t["skein1024-416"]=e.from("b394","hex"),t["skein1024-424"]=e.from("b395","hex"),t["skein1024-432"]=e.from("b396","hex"),t["skein1024-440"]=e.from("b397","hex"),t["skein1024-448"]=e.from("b398","hex"),t["skein1024-456"]=e.from("b399","hex"),t["skein1024-464"]=e.from("b39a","hex"),t["skein1024-472"]=e.from("b39b","hex"),t["skein1024-480"]=e.from("b39c","hex"),t["skein1024-488"]=e.from("b39d","hex"),t["skein1024-496"]=e.from("b39e","hex"),t["skein1024-504"]=e.from("b39f","hex"),t["skein1024-512"]=e.from("b3a0","hex"),t["skein1024-520"]=e.from("b3a1","hex"),t["skein1024-528"]=e.from("b3a2","hex"),t["skein1024-536"]=e.from("b3a3","hex"),t["skein1024-544"]=e.from("b3a4","hex"),t["skein1024-552"]=e.from("b3a5","hex"),t["skein1024-560"]=e.from("b3a6","hex"),t["skein1024-568"]=e.from("b3a7","hex"),t["skein1024-576"]=e.from("b3a8","hex"),t["skein1024-584"]=e.from("b3a9","hex"),t["skein1024-592"]=e.from("b3aa","hex"),t["skein1024-600"]=e.from("b3ab","hex"),t["skein1024-608"]=e.from("b3ac","hex"),t["skein1024-616"]=e.from("b3ad","hex"),t["skein1024-624"]=e.from("b3ae","hex"),t["skein1024-632"]=e.from("b3af","hex"),t["skein1024-640"]=e.from("b3b0","hex"),t["skein1024-648"]=e.from("b3b1","hex"),t["skein1024-656"]=e.from("b3b2","hex"),t["skein1024-664"]=e.from("b3b3","hex"),t["skein1024-672"]=e.from("b3b4","hex"),t["skein1024-680"]=e.from("b3b5","hex"),t["skein1024-688"]=e.from("b3b6","hex"),t["skein1024-696"]=e.from("b3b7","hex"),t["skein1024-704"]=e.from("b3b8","hex"),t["skein1024-712"]=e.from("b3b9","hex"),t["skein1024-720"]=e.from("b3ba","hex"),t["skein1024-728"]=e.from("b3bb","hex"),t["skein1024-736"]=e.from("b3bc","hex"),t["skein1024-744"]=e.from("b3bd","hex"),t["skein1024-752"]=e.from("b3be","hex"),t["skein1024-760"]=e.from("b3bf","hex"),t["skein1024-768"]=e.from("b3c0","hex"),t["skein1024-776"]=e.from("b3c1","hex"),t["skein1024-784"]=e.from("b3c2","hex"),t["skein1024-792"]=e.from("b3c3","hex"),t["skein1024-800"]=e.from("b3c4","hex"),t["skein1024-808"]=e.from("b3c5","hex"),t["skein1024-816"]=e.from("b3c6","hex"),t["skein1024-824"]=e.from("b3c7","hex"),t["skein1024-832"]=e.from("b3c8","hex"),t["skein1024-840"]=e.from("b3c9","hex"),t["skein1024-848"]=e.from("b3ca","hex"),t["skein1024-856"]=e.from("b3cb","hex"),t["skein1024-864"]=e.from("b3cc","hex"),t["skein1024-872"]=e.from("b3cd","hex"),t["skein1024-880"]=e.from("b3ce","hex"),t["skein1024-888"]=e.from("b3cf","hex"),t["skein1024-896"]=e.from("b3d0","hex"),t["skein1024-904"]=e.from("b3d1","hex"),t["skein1024-912"]=e.from("b3d2","hex"),t["skein1024-920"]=e.from("b3d3","hex"),t["skein1024-928"]=e.from("b3d4","hex"),t["skein1024-936"]=e.from("b3d5","hex"),t["skein1024-944"]=e.from("b3d6","hex"),t["skein1024-952"]=e.from("b3d7","hex"),t["skein1024-960"]=e.from("b3d8","hex"),t["skein1024-968"]=e.from("b3d9","hex"),t["skein1024-976"]=e.from("b3da","hex"),t["skein1024-984"]=e.from("b3db","hex"),t["skein1024-992"]=e.from("b3dc","hex"),t["skein1024-1000"]=e.from("b3dd","hex"),t["skein1024-1008"]=e.from("b3de","hex"),t["skein1024-1016"]=e.from("b3df","hex"),t["skein1024-1024"]=e.from("b3e0","hex"),t.ip4=e.from("04","hex"),t.ip6=e.from("29","hex"),t.ip6zone=e.from("2a","hex"),t.tcp=e.from("06","hex"),t.udp=e.from("0111","hex"),t.dccp=e.from("21","hex"),t.sctp=e.from("84","hex"),t.udt=e.from("012d","hex"),t.utp=e.from("012e","hex"),t.p2p=e.from("01a5","hex"),t.ipfs=e.from("01a5","hex"),t.http=e.from("01e0","hex"),t.https=e.from("01bb","hex"),t.quic=e.from("01cc","hex"),t.ws=e.from("01dd","hex"),t.wss=e.from("01de","hex"),t.onion=e.from("01bc","hex"),t.onion3=e.from("01bd","hex"),t.garlic64=e.from("01be","hex"),t["p2p-circuit"]=e.from("0122","hex"),t.dns=e.from("35","hex"),t.dns4=e.from("36","hex"),t.dns6=e.from("37","hex"),t.dnsaddr=e.from("38","hex"),t["p2p-websocket-star"]=e.from("01df","hex"),t["p2p-webrtc-star"]=e.from("0113","hex"),t["p2p-webrtc-direct"]=e.from("0114","hex"),t.unix=e.from("0190","hex"),t["dag-pb"]=e.from("70","hex"),t["dag-cbor"]=e.from("71","hex"),t["dag-json"]=e.from("0129","hex"),t["git-raw"]=e.from("78","hex"),t["eth-block"]=e.from("90","hex"),t["eth-block-list"]=e.from("91","hex"),t["eth-tx-trie"]=e.from("92","hex"),t["eth-tx"]=e.from("93","hex"),t["eth-tx-receipt-trie"]=e.from("94","hex"),t["eth-tx-receipt"]=e.from("95","hex"),t["eth-state-trie"]=e.from("96","hex"),t["eth-account-snapshot"]=e.from("97","hex"),t["eth-storage-trie"]=e.from("98","hex"),t["bitcoin-block"]=e.from("b0","hex"),t["bitcoin-tx"]=e.from("b1","hex"),t["zcash-block"]=e.from("c0","hex"),t["zcash-tx"]=e.from("c1","hex"),t["stellar-block"]=e.from("d0","hex"),t["stellar-tx"]=e.from("d1","hex"),t["decred-block"]=e.from("e0","hex"),t["decred-tx"]=e.from("e1","hex"),t["dash-block"]=e.from("f0","hex"),t["dash-tx"]=e.from("f1","hex"),t["torrent-info"]=e.from("7b","hex"),t["torrent-file"]=e.from("7c","hex"),t["ed25519-pub"]=e.from("ed","hex")}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(14),o=n(271).SmartBuffer,s=n(270);t=e.exports,t.serialize=((e,t)=>{let n=[];n.push("tree "+s.cidToSha(e.tree["/"]).toString("hex")),e.parents.forEach(e=>{n.push("parent "+s.cidToSha(e["/"]).toString("hex"))}),n.push("author "+s.serializePersonLine(e.author)),n.push("committer "+s.serializePersonLine(e.committer)),e.encoding&&n.push("encoding "+e.encoding),e.mergetag&&e.mergetag.forEach(e=>{n.push("mergetag object "+s.cidToSha(e.object["/"]).toString("hex")),n.push(e.text)}),e.signature&&(n.push("gpgsig -----BEGIN PGP SIGNATURE-----"),n.push(e.signature.text)),n.push(""),n.push(e.message);let r=n.join("\n"),a=new o;a.writeString("commit "),a.writeString(r.length.toString()),a.writeUInt8(0),a.writeString(r),i(()=>t(null,a.toBuffer()))}),t.deserialize=((e,t)=>{let n=e.toString().split("\n"),o={gitType:"commit",parents:[]};for(let e=0;e<n.length;e++){let a=n[e].match(/^([^ ]+) (.+)$/);if(!a){""!==n[e]&&i(()=>t(new Error("Invalid commit line "+e))),o.message=n.slice(e+1).join("\n");break}let u=a[1],l=a[2];switch(u){case"tree":o.tree={"/":s.shaToCid(r.from(l,"hex"))};break;case"committer":o.committer=s.parsePersonLine(l);break;case"author":o.author=s.parsePersonLine(l);break;case"parent":o.parents.push({"/":s.shaToCid(r.from(l,"hex"))});break;case"gpgsig":{"-----BEGIN PGP SIGNATURE-----"!==l&&i(()=>t(new Error("Invalid commit line "+e))),o.signature={};let r=e;for(;e<n.length-1;e++)if(" "!==n[e+1][0]){o.signature.text=n.slice(r+1,e+1).join("\n");break}break}case"mergetag":{let a=l.match(/^object ([0-9a-f]{40})$/);a||i(()=>t(new Error("Invalid commit line "+e)));let u={object:{"/":s.shaToCid(r.from(a[1],"hex"))}},c=e;for(;e<n.length-1;e++)if(" "!==n[e+1][0]){u.text=n.slice(c+1,e+1).join("\n");break}o.mergetag||(o.mergetag=[]),o.mergetag.push(u)}break;default:o[u]=l}}i(()=>t(null,o))})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){const i=n(14),o=n(271).SmartBuffer,s=n(270);t=e.exports,t.serialize=((e,t)=>{let n=[];n.push("object "+s.cidToSha(e.object["/"]).toString("hex")),n.push("type "+e.type),n.push("tag "+e.tag),null!==e.tagger&&n.push("tagger "+s.serializePersonLine(e.tagger)),n.push(""),n.push(e.message);let r=n.join("\n"),a=new o;a.writeString("tag "),a.writeString(r.length.toString()),a.writeUInt8(0),a.writeString(r),i(()=>t(null,a.toBuffer()))}),t.deserialize=((e,t)=>{let n=e.toString().split("\n"),o={gitType:"tag"};for(let e=0;e<n.length;e++){let a=n[e].match(/^([^ ]+) (.+)$/);if(null===a){""!==n[e]&&i(()=>t(new Error("Invalid tag line "+e))),o.message=n.slice(e+1).join("\n");break}let u=a[1],l=a[2];switch(u){case"object":o.object={"/":s.shaToCid(r.from(l,"hex"))};break;case"tagger":o.tagger=s.parsePersonLine(l);break;case"tag":o.tag=l;break;case"type":o.type=l;break;default:o[u]=l}}i(()=>t(null,o))})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(14),i=n(271).SmartBuffer,o=n(270);t=e.exports,t.serialize=((e,t)=>{let n=[];Object.keys(e).forEach(t=>{n.push([t,e[t]])}),n.sort((e,t)=>e[0]>t[0]?1:-1);let s=new i;n.forEach(e=>{s.writeStringNT(e[1].mode+" "+e[0]),s.writeBuffer(o.cidToSha(e[1].hash["/"]))});let a=new i;a.writeString("tree "),a.writeString(s.length.toString()),a.writeUInt8(0),a.writeBuffer(s.toBuffer()),r(()=>t(null,a.toBuffer()))}),t.deserialize=((e,t)=>{let n={},s=i.fromBuffer(e,"utf8");for(;;){let e=s.readStringNT();if(""===e)break;let i=s.readBuffer(o.SHA1_LENGTH),a=e.match(/^(\d+) (.+)$/);a||r(()=>t(new Error("invalid file mode/name"))),n[a[2]]&&r(()=>t(new Error("duplicate file in tree"))),n[a[2]]={mode:a[1],hash:{"/":o.shaToCid(i)}}}r(()=>t(null,n))})},function(e,t,n){"use strict";t.resolver=n(356),t.util=n(596)},function(e,t,n){"use strict";(function(t,r){var i=e.exports;i.version="v"+n(1432).version,i.versionGuard=function(e){if(void 0!==e)var t="More than one instance of zcash-bitcore-lib found. Please make sure to require zcash-bitcore-lib and check that submodules do not also include their own zcash-bitcore-lib dependency."},i.versionGuard(t._bitcore),t._bitcore=i.version,i.crypto={},i.crypto.BN=n(49),i.crypto.ECDSA=n(598),i.crypto.Hash=n(60),i.crypto.Random=n(276),i.crypto.Point=n(152),i.crypto.Signature=n(85),i.encoding={},i.encoding.Base58=n(274),i.encoding.Base58Check=n(195),i.encoding.BufferReader=n(109),i.encoding.BufferWriter=n(80),i.encoding.Varint=n(1454),i.util={},i.util.buffer=n(30),i.util.js=n(41),i.util.preconditions=n(25),i.errors=n(84),i.Address=n(129),i.Block=n(1455),i.MerkleBlock=n(602),i.BlockHeader=n(277),i.HDPrivateKey=n(603),i.HDPublicKey=n(604),i.Networks=n(128),i.Opcode=n(358),i.PrivateKey=n(273),i.PublicKey=n(95),i.Script=n(86),i.Transaction=n(275),i.URI=n(1457),i.Unit=n(361),i.deps={},i.deps.bnjs=n(597),i.deps.bs58=n(599),i.deps.Buffer=r,i.deps.elliptic=n(94),i.deps._=n(17),i._HDKeyCache=n(362),i.Transaction.sighash=n(110)}).call(this,n(8),n(0).Buffer)},function(e){e.exports={name:"zcash-bitcore-lib",version:"0.13.20-rc3",description:"A pure and powerful JavaScript Zcash library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{lint:"gulp lint",test:"gulp test",coverage:"gulp coverage",build:"gulp"},contributors:[{name:"Daniel Cousens",email:"bitcoin@dcousens.com"},{name:"Esteban Ordano",email:"eordano@gmail.com"},{name:"Gordon Hall",email:"gordon@bitpay.com"},{name:"Jeff Garzik",email:"jgarzik@bitpay.com"},{name:"Kyle Drake",email:"kyle@kyledrake.net"},{name:"Manuel Araoz",email:"manuelaraoz@gmail.com"},{name:"Matias Alejo Garcia",email:"ematiu@gmail.com"},{name:"Ryan X. Charles",email:"ryanxcharles@gmail.com"},{name:"Stefan Thomas",email:"moon@justmoon.net"},{name:"Stephen Pair",email:"stephen@bitpay.com"},{name:"Wei Lu",email:"luwei.here@gmail.com"},{name:"Jack Grigg",email:"jack@z.cash"}],keywords:["zcash","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitmex/zcash-bitcore-lib.git"},browser:{request:"browser-request"},dependencies:{"bn.js":"=2.0.4",bs58:"=2.0.0","buffer-compare":"=1.0.0",elliptic:"=3.0.3",inherits:"=2.0.1",lodash:"=3.10.1"},devDependencies:{"zcash-bitcore-build":"^0.5.4",brfs:"^1.2.0",chai:"^1.10.0",gulp:"^3.8.10",sinon:"^1.13.0"},license:"MIT"}},function(e,t,n){"use strict";var r="http://bitcore.io/";e.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+r+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]},function(e){e.exports={name:"elliptic",version:"3.0.3",description:"EC cryptography",main:"lib/elliptic.js",scripts:{test:"make lint && mocha --reporter=spec test/*-test.js"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{browserify:"^3.44.2",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},dependencies:{"bn.js":"^2.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"}}},function(e,t,n){"use strict";var r=t;function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}}else for(var r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n}function o(e){return 1===e.length?"0"+e:e}function s(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t}function a(e,t){for(var n=[],r=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(r-1);o=s>(r>>1)-1?(r>>1)-s:s,i.isubn(o)}else o=0;n.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(r-1)?t+1:1,u=1;u<a;u++)n.push(0);i.ishrn(a)}return n}function u(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;e.cmpn(-r)>0||t.cmpn(-i)>0;){var o=e.andln(3)+r&3,s=t.andln(3)+i&3,a,u;if(3===o&&(o=-1),3===s&&(s=-1),0==(1&o))a=0;else{var l=e.andln(7)+r&7;a=3!==l&&5!==l||2!==s?o:-o}if(n[0].push(a),0==(1&s))u=0;else{var l=t.andln(7)+i&7;u=3!==l&&5!==l||2!==o?s:-s}n[1].push(u),2*r===a+1&&(r=1-r),2*i===u+1&&(i=1-i),e.ishrn(1),t.ishrn(1)}return n}r.assert=function e(t,n){if(!t)throw new Error(n||"Assertion failed")},r.toArray=i,r.zero2=o,r.toHex=s,r.encode=function e(t,n){return"hex"===n?s(t):t},r.getNAF=a,r.getJSF=u},function(e,t,n){"use strict";var r=n(189),i=n(94),o=i.utils,s=o.assert;function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc),n=o.toArray(e.nonce,e.nonceEnc),r=o.toArray(e.pers,e.persEnc);s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=a,a.prototype._init=function e(t,n,r){var i=t.concat(n).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(i),this.reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function e(){return new r.hmac(this.hash,this.K)},a.prototype._update=function e(t){var n=this._hmac().update(this.V).update([0]);t&&(n=n.update(t)),this.K=n.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 e(t,n,r,i){"string"!=typeof n&&(i=r,r=n,n=null),t=o.toBuffer(t,n),r=o.toBuffer(r,i),s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this.reseed=1},a.prototype.generate=function e(t,n,r,i){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=o.toArray(r,i),this._update(r));for(var s=[];s.length<t;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,t);return this._update(r),this.reseed++,o.encode(a,n)}},function(e,t,n){"use strict";var r=n(127),i=n(94),o=i.utils.getNAF,s=i.utils.getJSF,a=i.utils.assert;function u(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function e(){throw new Error("Not implemented")},u.prototype.validate=function e(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function e(t,n){var r=t._getDoubles(),i=o(n,1),s=(1<<r.step+1)-(r.step%2==0?2:1);s/=3;for(var a=[],u=0;u<i.length;u+=r.step){for(var l=0,n=u+r.step-1;n>=u;n--)l=(l<<1)+i[n];a.push(l)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=s;h>0;h--){for(var u=0;u<a.length;u++){var l=a[u];l===h?f=f.mixedAdd(r.points[u]):l===-h&&(f=f.mixedAdd(r.points[u].neg()))}c=c.add(f)}return c.toP()},u.prototype._wnafMul=function e(t,n){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var s=i.points,u=o(n,r),l=this.jpoint(null,null,null),c=u.length-1;c>=0;c--){for(var n=0;c>=0&&0===u[c];c--)n++;if(c>=0&&n++,l=l.dblp(n),c<0)break;var f=u[c];a(0!==f),l="affine"===t.type?f>0?l.mixedAdd(s[f-1>>1]):l.mixedAdd(s[-f-1>>1].neg()):f>0?l.add(s[f-1>>1]):l.add(s[-f-1>>1].neg())}return"affine"===t.type?l.toP():l},u.prototype._wnafMulAdd=function e(t,n,r,i){for(var a=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,f=0;f<i;f++){var h=n[f],p=h._getNAFPoints(t);a[f]=p.wnd,u[f]=p.points}for(var f=i-1;f>=1;f-=2){var d=f-1,m=f;if(1===a[d]&&1===a[m]){var g=[n[d],null,null,n[m]];0===n[d].y.cmp(n[m].y)?(g[1]=n[d].add(n[m]),g[2]=n[d].toJ().mixedAdd(n[m].neg())):0===n[d].y.cmp(n[m].y.redNeg())?(g[1]=n[d].toJ().mixedAdd(n[m]),g[2]=n[d].add(n[m].neg())):(g[1]=n[d].toJ().mixedAdd(n[m]),g[2]=n[d].toJ().mixedAdd(n[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[d],r[m]);c=Math.max(b[0].length,c),l[d]=new Array(c),l[m]=new Array(c);for(var v=0;v<c;v++){var w=0|b[0][v],_=0|b[1][v];l[d][v]=y[3*(w+1)+(_+1)],l[m][v]=0,u[d]=g}}else l[d]=o(r[d],a[d]),l[m]=o(r[m],a[m]),c=Math.max(l[d].length,c),c=Math.max(l[m].length,c)}for(var k=this.jpoint(null,null,null),S=this._wnafT4,f=c;f>=0;f--){for(var E=0;f>=0;){for(var x=!0,v=0;v<i;v++)S[v]=0|l[v][f],0!==S[v]&&(x=!1);if(!x)break;E++,f--}if(f>=0&&E++,k=k.dblp(E),f<0)break;for(var v=0;v<i;v++){var C=S[v],h;0!==C&&(C>0?h=u[v][C-1>>1]:C<0&&(h=u[v][-C-1>>1].neg()),k="affine"===h.type?k.mixedAdd(h):k.add(h))}}for(var f=0;f<i;f++)u[f]=null;return k.toP()},u.BasePoint=l,l.prototype.validate=function e(){return this.curve.validate(this)},l.prototype.precompute=function e(t){if(this.precomputed)return this;var n={doubles:null,naf:null,beta:null};return n.naf=this._getNAFPoints(8),n.doubles=this._getDoubles(4,t),n.beta=this._getBeta(),this.precomputed=n,this},l.prototype._getDoubles=function e(t,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,o=0;o<n;o+=t){for(var s=0;s<t;s++)i=i.dbl();r.push(i)}return{step:t,points:r}},l.prototype._getNAFPoints=function e(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var n=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),o=1;o<r;o++)n[o]=n[o-1].add(i);return{wnd:t,points:n}},l.prototype._getBeta=function e(){return null},l.prototype.dblp=function e(t){for(var n=this,r=0;r<t;r++)n=n.dbl();return n}},function(e,t,n){"use strict";var r=n(272),i=n(94),o=n(127),s=n(357),a=r.base,u=i.utils.assert;function l(e){a.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,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 f(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(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}s(l,a),e.exports=l,l.prototype._getEndomorphism=function e(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r,i;if(t.beta)n=new o(t.beta,16).toRed(this.red);else{var s=this._getEndoRoots(this.p);n=s[0].cmp(s[1])<0?s[0]:s[1],n=n.toRed(this.red)}if(t.lambda)r=new o(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(n))?r=a[0]:(r=a[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return i=t.basis?t.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r),{beta:n,lambda:r,basis:i}}},l.prototype._getEndoRoots=function e(t){var n=t===this.p?this.red:o.mont(t),r=new o(2).toRed(n).redInvm(),i=r.redNeg(),s=new o(3).toRed(n).redNeg().redSqrt().redMul(r),a=i.redAdd(s).fromRed(),u=i.redSub(s).fromRed();return[a,u]},l.prototype._getEndoBasis=function e(t){for(var n=this.n.shrn(Math.floor(this.n.bitLength()/2)),r=t,i=this.n.clone(),s=new o(1),a=new o(0),u=new o(0),l=new o(1),c,f,h,p,d,m,g,y=0,b,v;0!==r.cmpn(0);){var w=i.div(r);b=i.sub(w.mul(r)),v=u.sub(w.mul(s));var _=l.sub(w.mul(a));if(!h&&b.cmp(n)<0)c=g.neg(),f=s,h=b.neg(),p=v;else if(h&&2==++y)break;g=b,i=r,r=b,u=s,s=v,l=a,a=_}d=b.neg(),m=v;var k=h.sqr().add(p.sqr()),S=d.sqr().add(m.sqr());return S.cmp(k)>=0&&(d=c,m=f),h.sign&&(h=h.neg(),p=p.neg()),d.sign&&(d=d.neg(),m=m.neg()),[{a:h,b:p},{a:d,b:m}]},l.prototype._endoSplit=function e(t){var n=this.endo.basis,r=n[0],i=n[1],o=i.b.mul(t).divRound(this.n),s=r.b.neg().mul(t).divRound(this.n),a=o.mul(r.a),u=s.mul(i.a),l=o.mul(r.b),c=s.mul(i.b),f=t.sub(a).sub(u),h=l.add(c).neg();return{k1:f,k2:h}},l.prototype.pointFromX=function e(t,n){n=new o(n,16),n.red||(n=n.toRed(this.red));var r=n.redSqr().redMul(n).redIAdd(n.redMul(this.a)).redIAdd(this.b),i=r.redSqrt(),s=i.fromRed().isOdd();return(t&&!s||!t&&s)&&(i=i.redNeg()),this.point(n,i)},l.prototype.validate=function e(t){if(t.inf)return!0;var n=t.x,r=t.y,i=this.a.redMul(n),o=n.redSqr().redMul(n).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},l.prototype._endoWnafMulAdd=function e(t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(n[o]),a=t[o],u=a._getBeta();s.k1.sign&&(s.k1.sign=!s.k1.sign,a=a.neg(!0)),s.k2.sign&&(s.k2.sign=!s.k2.sign,u=u.neg(!0)),r[2*o]=a,r[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var l=this._wnafMulAdd(1,r,i,2*o),c=0;c<2*o;c++)r[c]=null,i[c]=null;return l},s(c,a.BasePoint),l.prototype.point=function e(t,n,r){return new c(this,t,n,r)},l.prototype.pointFromJSON=function e(t,n){return c.fromJSON(this,t,n)},c.prototype._getBeta=function e(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};t.beta=n,n.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return n}},c.prototype.toJSON=function e(){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]},c.fromJSON=function e(t,n,r){"string"==typeof n&&(n=JSON.parse(n));var i=t.point(n[0],n[1],r);if(!n[2])return i;function o(e){return t.point(e[0],e[1],r)}var s=n[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(o))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(o))}},i},c.prototype.inspect=function e(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function e(){return this.inf},c.prototype.add=function e(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 n=this.y.redSub(t.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(t.x).redInvm()));var r=n.redSqr().redISub(this.x).redISub(t.x),i=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.prototype.dbl=function e(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(n).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},c.prototype.getX=function e(){return this.x.fromRed()},c.prototype.getY=function e(){return this.y.fromRed()},c.prototype.mul=function e(t){return t=new o(t,16),this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function e(t,n,r){var i=[this,n],o=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)},c.prototype.eq=function e(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function e(t){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};n.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return n},c.prototype.toJ=function e(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t},s(f,a.BasePoint),l.prototype.jpoint=function e(t,n,r){return new f(this,t,n,r)},f.prototype.toP=function e(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),n=t.redSqr(),r=this.x.redMul(n),i=this.y.redMul(n).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function e(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function e(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var n=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(n),o=t.x.redMul(r),s=this.y.redMul(n.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),u=i.redSub(o),l=s.redSub(a);if(0===u.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=u.redSqr(),f=c.redMul(u),h=i.redMul(c),p=l.redSqr().redIAdd(f).redISub(h).redISub(h),d=l.redMul(h.redISub(p)).redISub(s.redMul(f)),m=this.z.redMul(t.z).redMul(u);return this.curve.jpoint(p,d,m)},f.prototype.mixedAdd=function e(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var n=this.z.redSqr(),r=this.x,i=t.x.redMul(n),o=this.y,s=t.y.redMul(n).redMul(this.z),a=r.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),f=r.redMul(l),h=u.redSqr().redIAdd(c).redISub(f).redISub(f),p=u.redMul(f.redISub(h)).redISub(o.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(h,p,d)},f.prototype.dblp=function e(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var n=this,r=0;r<t;r++)n=n.dbl();return n}for(var i=this.curve.a,o=this.curve.tinv,s=this.x,a=this.y,u=this.z,l=u.redSqr().redSqr(),c=a.redAdd(a),r=0;r<t;r++){var f=s.redSqr(),h=c.redSqr(),p=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(l)),m=s.redMul(h),g=d.redSqr().redISub(m.redAdd(m)),y=m.redISub(g),b=d.redMul(y);b=b.redIAdd(b).redISub(p);var v=c.redMul(u);r+1<t&&(l=l.redMul(p)),s=g,u=v,c=b}return this.curve.jpoint(s,c.redMul(o),u)},f.prototype.dbl=function e(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function e(){var t,n,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var u=i.redAdd(i).redIAdd(i),l=u.redSqr().redISub(a).redISub(a),c=s.redIAdd(s);c=c.redIAdd(c),c=c.redIAdd(c),t=l,n=u.redMul(a.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),p=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(p);d=d.redIAdd(d);var m=f.redAdd(f).redIAdd(f),g=m.redSqr(),y=p.redIAdd(p);y=y.redIAdd(y),y=y.redIAdd(y),t=g.redISub(d).redISub(d),n=m.redMul(d.redISub(t)).redISub(y),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(t,n,r)},f.prototype._threeDbl=function e(){var t,n,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(s);a=a.redIAdd(a);var u=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),l=u.redSqr().redISub(a).redISub(a);t=l;var c=s.redIAdd(s);c=c.redIAdd(c),c=c.redIAdd(c),n=u.redMul(a.redISub(l)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),p=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var m=p.redIAdd(p);m=m.redIAdd(m);var g=m.redAdd(m);t=d.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var y=h.redSqr();y=y.redIAdd(y),y=y.redIAdd(y),y=y.redIAdd(y),n=d.redMul(m.redISub(t)).redISub(y)}return this.curve.jpoint(t,n,r)},f.prototype._dbl=function e(){var t=this.curve.a,n=this.x,r=this.y,i=this.z,o=i.redSqr().redSqr(),s=n.redSqr(),a=r.redSqr(),u=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(o)),l=n.redAdd(n);l=l.redIAdd(l);var c=l.redMul(a),f=u.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),p=a.redSqr();p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var d=u.redMul(h).redISub(p),m=r.redAdd(r).redMul(i);return this.curve.jpoint(f,d,m)},f.prototype.trpl=function e(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),n=this.y.redSqr(),r=this.z.redSqr(),i=n.redSqr(),o=t.redAdd(t).redIAdd(t),s=o.redSqr(),a=this.x.redAdd(n).redSqr().redISub(t).redISub(i);a=a.redIAdd(a),a=a.redAdd(a).redIAdd(a),a=a.redISub(s);var u=a.redSqr(),l=i.redIAdd(i);l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var c=o.redIAdd(a).redSqr().redISub(s).redISub(u).redISub(l),f=n.redMul(c);f=f.redIAdd(f),f=f.redIAdd(f);var h=this.x.redMul(u).redISub(f);h=h.redIAdd(h),h=h.redIAdd(h);var p=this.y.redMul(c.redMul(l.redISub(c)).redISub(a.redMul(u)));p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(u);return this.curve.jpoint(h,p,d)},f.prototype.mul=function e(t,n){return t=new o(t,n),this.curve._wnafMul(this,t)},f.prototype.eq=function e(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var n=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(n)).cmpn(0))return!1;var i=n.redMul(this.z),o=r.redMul(t.z);return 0===this.y.redMul(o).redISub(t.y.redMul(i)).cmpn(0)},f.prototype.inspect=function e(){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)+">"},f.prototype.isInfinity=function e(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(272),i=n(127),o=n(357),s=r.base;function a(e){s.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(a,s),e.exports=a,a.prototype.validate=function e(t){var n=t.normalize().x,r=n.redSqr(),i=r.redMul(n).redAdd(r.redMul(this.a)).redAdd(n),o=i.redSqrt();return 0===o.redSqr().cmp(i)},o(u,s.BasePoint),a.prototype.point=function e(t,n){return new u(this,t,n)},a.prototype.pointFromJSON=function e(t){return u.fromJSON(this,t)},u.prototype.precompute=function e(){},u.fromJSON=function e(t,n){return new u(t,n[0],n[1]||t.one)},u.prototype.inspect=function e(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function e(){return 0===this.z.cmpn(0)},u.prototype.dbl=function e(){var t=this.x.redAdd(this.z),n=t.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),o=n.redSub(i),s=n.redMul(i),a=o.redMul(i.redAdd(this.curve.a24.redMul(o)));return this.curve.point(s,a)},u.prototype.add=function e(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function e(t,n){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=t.x.redAdd(t.z),s=t.x.redSub(t.z),a=s.redMul(r),u=o.redMul(i),l=n.z.redMul(a.redAdd(u).redSqr()),c=n.x.redMul(a.redISub(u).redSqr());return this.curve.point(l,c)},u.prototype.mul=function e(t){for(var n=t.clone(),r=this,i=this.curve.point(null,null),o=this,s=[];0!==n.cmpn(0);n.ishrn(1))s.push(n.andln(1));for(var a=s.length-1;a>=0;a--)0===s[a]?(r=r.diffAdd(i,o),i=i.dbl()):(i=r.diffAdd(i,o),r=r.dbl());return i},u.prototype.mulAdd=function e(){throw new Error("Not supported on Montgomery curve")},u.prototype.normalize=function e(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function e(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(272),i=n(94),o=n(127),s=n(357),a=r.base,u=i.utils.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new o(e.a,16).mod(this.red.m).toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,n,r,i){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&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 o(t,16),this.y=new o(n,16),this.z=r?new o(r,16):this.curve.one,this.t=i&&new o(i,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()))))}s(l,a),e.exports=l,l.prototype._mulA=function e(t){return this.mOneA?t.redNeg():this.a.redMul(t)},l.prototype._mulC=function e(t){return this.oneC?t:this.c.redMul(t)},l.prototype.jpoint=function e(t,n,r,i){return this.point(t,n,r,i)},l.prototype.pointFromX=function e(t,n){n=new o(n,16),n.red||(n=n.toRed(this.red));var i=n.redSqr(),s=this.c2.redSub(this.a.redMul(i)),a=this.one.redSub(this.c2.redMul(this.d).redMul(i)),u=s.redMul(a.redInvm()).redSqrt(),l=u.fromRed().isOdd();return(t&&!l||!t&&l)&&(u=u.redNeg()),this.point(n,u,r.one)},l.prototype.validate=function e(t){if(t.isInfinity())return!0;t.normalize();var n=t.x.redSqr(),r=t.y.redSqr(),i=n.redMul(this.a).redAdd(r),o=this.c2.redMul(this.one.redAdd(this.d.redMul(n).redMul(r)));return 0===i.cmp(o)},s(c,a.BasePoint),l.prototype.pointFromJSON=function e(t){return c.fromJSON(this,t)},l.prototype.point=function e(t,n,r,i){return new c(this,t,n,r,i)},c.fromJSON=function e(t,n){return new c(t,n[0],n[1],n[2])},c.prototype.inspect=function e(){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)+">"},c.prototype.isInfinity=function e(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function e(){var t=this.x.redSqr(),n=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(n),s=i.redAdd(n),a=s.redSub(r),u=i.redSub(n),l=o.redMul(a),c=s.redMul(u),f=o.redMul(u),h=a.redMul(s);return this.curve.point(l,c,h,f)},c.prototype._projDbl=function e(){var t=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),r=this.y.redSqr(),i,o,s;if(this.curve.twisted){var a=this.curve._mulA(n),u=a.redAdd(r);if(this.zOne)i=t.redSub(n).redSub(r).redMul(u.redSub(this.curve.two)),o=u.redMul(a.redSub(r)),s=u.redSqr().redSub(u).redSub(u);else{var l=this.z.redSqr(),c=u.redSub(l).redISub(l);i=t.redSub(n).redISub(r).redMul(c),o=u.redMul(a.redSub(r)),s=u.redMul(c)}}else{var a=n.redAdd(r),l=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=a.redSub(l).redSub(l);i=this.curve._mulC(t.redISub(a)).redMul(c),o=this.curve._mulC(a).redMul(n.redISub(r)),s=a.redMul(c)}return this.curve.point(i,o,s)},c.prototype.dbl=function e(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function e(t){var n=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),s=r.redSub(n),a=o.redSub(i),u=o.redAdd(i),l=r.redAdd(n),c=s.redMul(a),f=u.redMul(l),h=s.redMul(l),p=a.redMul(u);return this.curve.point(c,f,p,h)},c.prototype._projAdd=function e(t){var n=this.z.redMul(t.z),r=n.redSqr(),i=this.x.redMul(t.x),o=this.y.redMul(t.y),s=this.curve.d.redMul(i).redMul(o),a=r.redSub(s),u=r.redAdd(s),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(o),c=n.redMul(a).redMul(l),f,h;return this.curve.twisted?(f=n.redMul(u).redMul(o.redSub(this.curve._mulA(i))),h=a.redMul(u)):(f=n.redMul(u).redMul(o.redSub(i)),h=this.curve._mulC(a).redMul(u)),this.curve.point(c,f,h)},c.prototype.add=function e(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function e(t){return this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function e(t,n,r){return this.curve._wnafMulAdd(1,[this,n],[t,r],2)},c.prototype.normalize=function e(){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},c.prototype.neg=function e(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function e(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function e(){return this.normalize(),this.y.fromRed()},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,n){"use strict";var r=t,i=n(189),o=n(94),s=o.utils.assert,a;function u(e){"short"===e.type?this.curve=new o.curve.short(e):"edwards"===e.type?this.curve=new o.curve.edwards(e):this.curve=new o.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=u,l("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),l("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{a=n(1442)}catch(e){a=void 0}l("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})},function(e,t){e.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(e,t,n){"use strict";var r=n(127),i=n(94),o=i.utils,s=o.assert,a=n(1444),u=n(1445);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(s(i.curves.hasOwnProperty(e),"Unknown curve "+e),e=i.curves[e]),e instanceof i.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.shrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=l,l.prototype.keyPair=function e(t){return new a(this,t)},l.prototype.keyFromPrivate=function e(t,n){return a.fromPrivate(this,t,n)},l.prototype.keyFromPublic=function e(t,n){return a.fromPublic(this,t,n)},l.prototype.genKeyPair=function e(t){t||(t={});for(var n=new i.hmacDRBG({hash:this.hash,pers:t.pers,entropy:t.entropy||i.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new r(2));;){var a=new r(n.generate(o));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function e(t,n){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.shrn(r)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function e(t,n,o,s){"object"==typeof o&&(s=o,o=null),s||(s={}),n=this.keyFromPrivate(n,o),t=this._truncateToN(new r(t,16));for(var a=this.n.byteLength(),l=n.getPrivate().toArray(),c=l.length;c<21;c++)l.unshift(0);for(var f=t.toArray(),c=f.length;c<a;c++)f.unshift(0);for(var h=new i.hmacDRBG({hash:this.hash,entropy:l,nonce:f}),p=this.n.sub(new r(1));;){var d=new r(h.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(p)>=0)){var m=this.g.mul(d);if(!m.isInfinity()){var g=m.getX().mod(this.n);if(0!==g.cmpn(0)){var y=d.invm(this.n).mul(g.mul(n.getPrivate()).iadd(t)).mod(this.n);if(0!==y.cmpn(0))return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y)),new u({r:g,s:y})}}}}},l.prototype.verify=function e(t,n,i,o){t=this._truncateToN(new r(t,16)),i=this.keyFromPublic(i,o),n=new u(n,"hex");var s=n.r,a=n.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var l=a.invm(this.n),c=l.mul(t).mod(this.n),f=l.mul(s).mod(this.n),h=this.g.mulAdd(c,i.getPublic(),f);return!h.isInfinity()&&0===h.getX().mod(this.n).cmp(s)}},function(e,t,n){"use strict";var r=n(127),i=n(94),o=i.utils;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function e(t,n,r){return n instanceof s?n:new s(t,{pub:n,pubEnc:r})},s.fromPrivate=function e(t,n,r){return n instanceof s?n:new s(t,{priv:n,privEnc:r})},s.prototype.validate=function e(){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"}},s.prototype.getPublic=function e(t,n){if(this.pub||(this.pub=this.ec.g.mul(this.priv)),"string"==typeof t&&(n=t,t=null),!n)return this.pub;for(var r=this.ec.curve.p.byteLength(),i=this.pub.getX().toArray(),s=i.length,a;s<r;s++)i.unshift(0);if("mont"!==this.ec.curve.type)if(t)a=[this.pub.getY().isEven()?2:3].concat(i);else{for(var u=this.pub.getY().toArray(),s=u.length;s<r;s++)u.unshift(0);var a=[4].concat(i,u)}else a=i;return o.encode(a,n)},s.prototype.getPrivate=function e(t){return"hex"===t?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function e(t,n){this.priv=new r(t,n||16),this.priv=this.priv.mod(this.ec.curve.n)},s.prototype._importPublic=function e(t,n){if(!t.x&&!t.y)return t=o.toArray(t,n),"mont"!==this.ec.curve.type?this._importPublicShort(t):this._importPublicMont(t);this.pub=this.ec.curve.point(t.x,t.y)},s.prototype._importPublicShort=function e(t){var n=this.ec.curve.p.byteLength();4===t[0]&&t.length-1==2*n?this.pub=this.ec.curve.point(t.slice(1,1+n),t.slice(1+n,1+2*n)):2!==t[0]&&3!==t[0]||t.length-1!==n||(this.pub=this.ec.curve.pointFromX(3===t[0],t.slice(1,1+n)))},s.prototype._importPublicMont=function e(t){this.pub=this.ec.curve.point(t,1)},s.prototype.derive=function e(t){return t.mul(this.priv).getX()},s.prototype.sign=function e(t){return this.ec.sign(t,this)},s.prototype.verify=function e(t,n){return this.ec.verify(t,n,this)},s.prototype.inspect=function e(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(127),i=n(94),o=i.utils,s=o.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16))}e.exports=a,a.prototype._importDER=function e(t,n){if(t=o.toArray(t,n),t.length<6||48!==t[0]||2!==t[2])return!1;var i=t[1];if(1+i>t.length)return!1;var s=t[3];if(s>=128)return!1;if(4+s+2>=t.length)return!1;if(2!==t[4+s])return!1;var a=t[5+s];return!(a>=128)&&(!(4+s+2+a>t.length)&&(this.r=new r(t.slice(4,4+s)),this.s=new r(t.slice(4+s+2,4+s+2+a)),!0))},a.prototype.toDER=function e(t){var n=this.r.toArray(),r=this.s.toArray();128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r));var i=n.length+r.length+4,s=[48,i,2,n.length];return s=s.concat(n,[2,r.length],r),o.encode(s,t)}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(600),o=n(358),s=n(49),a=n(60),u=n(85),l=n(95),c=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};c.prototype.verify=function(e,t,o,s,a){var u=n(275),l;if(r.isUndefined(o)&&(o=new u),r.isUndefined(s)&&(s=0),r.isUndefined(a)&&(a=0),this.set({script:e,tx:o,nin:s,flags:a}),0!=(a&c.SCRIPT_VERIFY_SIGPUSHONLY)&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;a&c.SCRIPT_VERIFY_P2SH&&(l=this.stack.slice());var f=this.stack;if(this.initialize(),this.set({script:t,stack:f,tx:o,nin:s,flags:a}),!this.evaluate())return!1;if(0===this.stack.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var h=this.stack[this.stack.length-1];if(!c.castToBool(h))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;if(a&c.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(0===l.length)throw new Error("internal error - stack copy empty");var p=l[l.length-1],d=i.fromBuffer(p);return l.pop(),this.initialize(),this.set({script:d,stack:l,tx:o,nin:s,flags:a}),!!this.evaluate()&&(0===l.length?(this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1):!!c.castToBool(l[l.length-1])||(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1))}return!0},e.exports=c,c.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0},c.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=void 0!==e.nin?e.nin:this.nin,this.stack=e.stack||this.stack,this.altstack=e.altack||this.altstack,this.pc=void 0!==e.pc?e.pc:this.pc,this.pbegincodehash=void 0!==e.pbegincodehash?e.pbegincodehash:this.pbegincodehash,this.nOpCount=void 0!==e.nOpCount?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=void 0!==e.flags?e.flags:this.flags},c.true=new t([1]),c.false=new t([]),c.MAX_SCRIPT_ELEMENT_SIZE=520,c.LOCKTIME_THRESHOLD=5e8,c.LOCKTIME_THRESHOLD_BN=new s(c.LOCKTIME_THRESHOLD),c.SCRIPT_VERIFY_NONE=0,c.SCRIPT_VERIFY_P2SH=1,c.SCRIPT_VERIFY_STRICTENC=2,c.SCRIPT_VERIFY_DERSIG=4,c.SCRIPT_VERIFY_LOW_S=8,c.SCRIPT_VERIFY_NULLDUMMY=16,c.SCRIPT_VERIFY_SIGPUSHONLY=32,c.SCRIPT_VERIFY_MINIMALDATA=64,c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,c.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,c.castToBool=function(e){for(var t=0;t<e.length;t++)if(0!==e[t])return t!==e.length-1||128!==e[t];return!1},c.prototype.checkSignatureEncoding=function(e){var t;if(0!=(this.flags&(c.SCRIPT_VERIFY_DERSIG|c.SCRIPT_VERIFY_LOW_S|c.SCRIPT_VERIFY_STRICTENC))&&!u.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(0!=(this.flags&c.SCRIPT_VERIFY_LOW_S)){if(t=u.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(0!=(this.flags&c.SCRIPT_VERIFY_STRICTENC)&&(t=u.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0},c.prototype.checkPubkeyEncoding=function(e){return!(0!=(this.flags&c.SCRIPT_VERIFY_STRICTENC)&&!l.isValid(e))||(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1)},c.prototype.evaluate=function(){if(this.script.toBuffer().length>1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(e){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+e,!1}return!(this.vfExec.length>0)||(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1)},c.prototype.checkLockTime=function(e){return!!(this.tx.nLockTime<c.LOCKTIME_THRESHOLD&&e.lt(c.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=c.LOCKTIME_THRESHOLD&&e.gte(c.LOCKTIME_THRESHOLD_BN))&&(!e.gt(new s(this.tx.nLockTime))&&!!this.tx.inputs[this.nin].isFinal())},c.prototype.step=function(){var e=0!=(this.flags&c.SCRIPT_VERIFY_MINIMALDATA),t=-1===this.vfExec.indexOf(!1),n,f,h,p,d,m,g,y,b,v,w,_,k,S,E,x,C,A=this.script.chunks[this.pc];this.pc++;var I=A.opcodenum;if(r.isUndefined(I))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(A.buf&&A.buf.length>c.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(I>o.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(I===o.OP_CAT||I===o.OP_SUBSTR||I===o.OP_LEFT||I===o.OP_RIGHT||I===o.OP_INVERT||I===o.OP_AND||I===o.OP_OR||I===o.OP_XOR||I===o.OP_2MUL||I===o.OP_2DIV||I===o.OP_MUL||I===o.OP_DIV||I===o.OP_MOD||I===o.OP_LSHIFT||I===o.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(t&&0<=I&&I<=o.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(A.buf){if(A.len!==A.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(A.buf)}else this.stack.push(c.false)}else if(t||o.OP_IF<=I&&I<=o.OP_ENDIF)switch(I){case o.OP_1NEGATE:case o.OP_1:case o.OP_2:case o.OP_3:case o.OP_4:case o.OP_5:case o.OP_6:case o.OP_7:case o.OP_8:case o.OP_9:case o.OP_10:case o.OP_11:case o.OP_12:case o.OP_13:case o.OP_14:case o.OP_15:case o.OP_16:d=I-(o.OP_1-1),n=new s(d).toScriptNumBuffer(),this.stack.push(n);break;case o.OP_NOP:break;case o.OP_NOP2:case o.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&c.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var T=s.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(T.lt(new s(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(T))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case o.OP_NOP1:case o.OP_NOP3:case o.OP_NOP4:case o.OP_NOP5:case o.OP_NOP6:case o.OP_NOP7:case o.OP_NOP8:case o.OP_NOP9:case o.OP_NOP10:if(this.flags&c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case o.OP_IF:case o.OP_NOTIF:if(x=!1,t){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;n=this.stack.pop(),x=c.castToBool(n),I===o.OP_NOTIF&&(x=!x)}this.vfExec.push(x);break;case o.OP_ELSE:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1];break;case o.OP_ENDIF:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop();break;case o.OP_VERIFY:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(n=this.stack[this.stack.length-1],x=c.castToBool(n),!x)return this.errstr="SCRIPT_ERR_VERIFY",!1;this.stack.pop();break;case o.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case o.OP_TOALTSTACK:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop());break;case o.OP_FROMALTSTACK:if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop());break;case o.OP_2DROP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case o.OP_2DUP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;f=this.stack[this.stack.length-2],h=this.stack[this.stack.length-1],this.stack.push(f),this.stack.push(h);break;case o.OP_3DUP:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;f=this.stack[this.stack.length-3],h=this.stack[this.stack.length-2];var j=this.stack[this.stack.length-1];this.stack.push(f),this.stack.push(h),this.stack.push(j);break;case o.OP_2OVER:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;f=this.stack[this.stack.length-4],h=this.stack[this.stack.length-3],this.stack.push(f),this.stack.push(h);break;case o.OP_2ROT:if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack.splice(this.stack.length-6,2),this.stack.push(p[0]),this.stack.push(p[1]);break;case o.OP_2SWAP:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack.splice(this.stack.length-4,2),this.stack.push(p[0]),this.stack.push(p[1]);break;case o.OP_IFDUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;n=this.stack[this.stack.length-1],x=c.castToBool(n),x&&this.stack.push(n);break;case o.OP_DEPTH:n=new s(this.stack.length).toScriptNumBuffer(),this.stack.push(n);break;case o.OP_DROP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case o.OP_DUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1]);break;case o.OP_NIP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case o.OP_OVER:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2]);break;case o.OP_PICK:case o.OP_ROLL:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(n=this.stack[this.stack.length-1],y=s.fromScriptNumBuffer(n,e),d=y.toNumber(),this.stack.pop(),d<0||d>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;n=this.stack[this.stack.length-d-1],I===o.OP_ROLL&&this.stack.splice(this.stack.length-d-1,1),this.stack.push(n);break;case o.OP_ROT:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=this.stack[this.stack.length-3],g=this.stack[this.stack.length-2];var O=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=g,this.stack[this.stack.length-2]=O,this.stack[this.stack.length-1]=m;break;case o.OP_SWAP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=this.stack[this.stack.length-2],g=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=g,this.stack[this.stack.length-1]=m;break;case o.OP_TUCK:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1]);break;case o.OP_SIZE:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;y=new s(this.stack[this.stack.length-1].length),this.stack.push(y.toScriptNumBuffer());break;case o.OP_EQUAL:case o.OP_EQUALVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;f=this.stack[this.stack.length-2],h=this.stack[this.stack.length-1];var P=f.toString("hex")===h.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(P?c.true:c.false),I===o.OP_EQUALVERIFY){if(!P)return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1;this.stack.pop()}break;case o.OP_1ADD:case o.OP_1SUB:case o.OP_NEGATE:case o.OP_ABS:case o.OP_NOT:case o.OP_0NOTEQUAL:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(n=this.stack[this.stack.length-1],y=s.fromScriptNumBuffer(n,e),I){case o.OP_1ADD:y=y.add(s.One);break;case o.OP_1SUB:y=y.sub(s.One);break;case o.OP_NEGATE:y=y.neg();break;case o.OP_ABS:y.cmp(s.Zero)<0&&(y=y.neg());break;case o.OP_NOT:y=new s((0===y.cmp(s.Zero))+0);break;case o.OP_0NOTEQUAL:y=new s((0!==y.cmp(s.Zero))+0)}this.stack.pop(),this.stack.push(y.toScriptNumBuffer());break;case o.OP_ADD:case o.OP_SUB:case o.OP_BOOLAND:case o.OP_BOOLOR:case o.OP_NUMEQUAL:case o.OP_NUMEQUALVERIFY:case o.OP_NUMNOTEQUAL:case o.OP_LESSTHAN:case o.OP_GREATERTHAN:case o.OP_LESSTHANOREQUAL:case o.OP_GREATERTHANOREQUAL:case o.OP_MIN:case o.OP_MAX:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(b=s.fromScriptNumBuffer(this.stack[this.stack.length-2],e),v=s.fromScriptNumBuffer(this.stack[this.stack.length-1],e),y=new s(0),I){case o.OP_ADD:y=b.add(v);break;case o.OP_SUB:y=b.sub(v);break;case o.OP_BOOLAND:y=new s((0!==b.cmp(s.Zero)&&0!==v.cmp(s.Zero))+0);break;case o.OP_BOOLOR:y=new s((0!==b.cmp(s.Zero)||0!==v.cmp(s.Zero))+0);break;case o.OP_NUMEQUAL:case o.OP_NUMEQUALVERIFY:y=new s((0===b.cmp(v))+0);break;case o.OP_NUMNOTEQUAL:y=new s((0!==b.cmp(v))+0);break;case o.OP_LESSTHAN:y=new s((b.cmp(v)<0)+0);break;case o.OP_GREATERTHAN:y=new s((b.cmp(v)>0)+0);break;case o.OP_LESSTHANOREQUAL:y=new s((b.cmp(v)<=0)+0);break;case o.OP_GREATERTHANOREQUAL:y=new s((b.cmp(v)>=0)+0);break;case o.OP_MIN:y=b.cmp(v)<0?b:v;break;case o.OP_MAX:y=b.cmp(v)>0?b:v}if(this.stack.pop(),this.stack.pop(),this.stack.push(y.toScriptNumBuffer()),I===o.OP_NUMEQUALVERIFY){if(!c.castToBool(this.stack[this.stack.length-1]))return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1;this.stack.pop()}break;case o.OP_WITHIN:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;b=s.fromScriptNumBuffer(this.stack[this.stack.length-3],e),v=s.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var B=s.fromScriptNumBuffer(this.stack[this.stack.length-1],e);x=v.cmp(b)<=0&&b.cmp(B)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(x?c.true:c.false);break;case o.OP_RIPEMD160:case o.OP_SHA1:case o.OP_SHA256:case o.OP_HASH160:case o.OP_HASH256:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var R;n=this.stack[this.stack.length-1],I===o.OP_RIPEMD160?R=a.ripemd160(n):I===o.OP_SHA1?R=a.sha1(n):I===o.OP_SHA256?R=a.sha256(n):I===o.OP_HASH160?R=a.sha256ripemd160(n):I===o.OP_HASH256&&(R=a.sha256sha256(n)),this.stack.pop(),this.stack.push(R);break;case o.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case o.OP_CHECKSIG:case o.OP_CHECKSIGVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=this.stack[this.stack.length-2],_=this.stack[this.stack.length-1],k=(new i).set({chunks:this.script.chunks.slice(this.pbegincodehash)});var N=(new i).add(w);if(k.findAndDelete(N),!this.checkSignatureEncoding(w)||!this.checkPubkeyEncoding(_))return!1;try{S=u.fromTxFormat(w),E=l.fromBuffer(_,!1),C=this.tx.verifySignature(S,E,this.nin,k)}catch(e){C=!1}if(this.stack.pop(),this.stack.pop(),this.stack.push(C?c.true:c.false),I===o.OP_CHECKSIGVERIFY){if(!C)return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1;this.stack.pop()}break;case o.OP_CHECKMULTISIG:case o.OP_CHECKMULTISIGVERIFY:var M=1;if(this.stack.length<M)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var L=s.fromScriptNumBuffer(this.stack[this.stack.length-M],e).toNumber();if(L<0||L>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=L,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var F=++M;if(M+=L,this.stack.length<M)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var D=s.fromScriptNumBuffer(this.stack[this.stack.length-M],e).toNumber();if(D<0||D>L)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var U=++M;if(M+=D,this.stack.length<M)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;k=(new i).set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var z=0;z<D;z++)w=this.stack[this.stack.length-U-z],k.findAndDelete((new i).add(w));for(C=!0;C&&D>0;){if(w=this.stack[this.stack.length-U],_=this.stack[this.stack.length-F],!this.checkSignatureEncoding(w)||!this.checkPubkeyEncoding(_))return!1;var q;try{S=u.fromTxFormat(w),E=l.fromBuffer(_,!1),q=this.tx.verifySignature(S,E,this.nin,k)}catch(e){q=!1}q&&(U++,D--),F++,L--,D>L&&(C=!1)}for(;M-- >1;)this.stack.pop();if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&c.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(C?c.true:c.false),I===o.OP_CHECKMULTISIGVERIFY){if(!C)return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;this.stack.pop()}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}}).call(this,n(0).Buffer)},function(e,t){e.exports=function(e,t){for(var n=0,r=0;r<e.length&&r!=t.length&&(n=e[r]<t[r]?-1:e[r]>t[r]?1:0,0==n);++r);return 0==n&&(t.length>e.length?n=-1:e.length>t.length&&(n=1)),n}},function(e,t,n){"use strict";var r=n(197),i=n(25),o=n(30),s=n(196),a=n(111),u=n(110),l=n(86),c=n(85),f=n(198);function h(){s.apply(this,arguments)}r(h,s),h.prototype.getSignatures=function(e,t,n,r){i.checkState(this.output instanceof a),r=r||c.SIGHASH_ALL;var o=t.toPublicKey();return o.toString()===this.output.script.getPublicKey().toString("hex")?[new f({publicKey:o,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:n,signature:u.sign(e,t,r,n,this.output.script),sigtype:r})]:[]},h.prototype.addSignature=function(e,t){return i.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(l.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this},h.prototype.clearSignatures=function(){return this.setScript(l.empty()),this},h.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()},h.SCRIPT_MAX_SIZE=73,h.prototype._estimateSize=function(){return h.SCRIPT_MAX_SIZE},e.exports=h},function(e,t,n){"use strict";var r=n(197),i=n(25),o=n(30),s=n(60),a=n(196),u=n(111),l=n(110),c=n(86),f=n(85),h=n(198);function p(){a.apply(this,arguments)}r(p,a),p.prototype.getSignatures=function(e,t,n,r,a){return i.checkState(this.output instanceof u),a=a||s.sha256ripemd160(t.publicKey.toBuffer()),r=r||f.SIGHASH_ALL,o.equals(a,this.output.script.getPublicKeyHash())?[new h({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:n,signature:l.sign(e,t,r,n,this.output.script),sigtype:r})]:[]},p.prototype.addSignature=function(e,t){return i.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(c.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this},p.prototype.clearSignatures=function(){return this.setScript(c.empty()),this},p.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()},p.SCRIPT_MAX_SIZE=107,p.prototype._estimateSize=function(){return p.SCRIPT_MAX_SIZE},e.exports=p},function(e,t,n){"use strict";var r=n(17),i=n(197),o=n(359),s=n(196),a=n(111),u=n(25),l=n(86),c=n(85),f=n(110),h=n(95),p=n(30),d=n(198);function m(e,t,n,i){s.apply(this,arguments);var o=this;t=t||e.publicKeys,n=n||e.threshold,i=i||e.signatures,this.publicKeys=r.sortBy(t,function(e){return e.toString("hex")}),u.checkState(l.buildMultisigOut(this.publicKeys,n).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},r.each(this.publicKeys,function(e,t){o.publicKeyIndex[e.toString()]=t}),this.threshold=n,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}i(m,s),m.prototype.toObject=function(){var e=s.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=r.map(this.publicKeys,function(e){return e.toString()}),e.signatures=this._serializeSignatures(),e},m.prototype._deserializeSignatures=function(e){return r.map(e,function(e){if(e)return new d(e)})},m.prototype._serializeSignatures=function(){return r.map(this.signatures,function(e){if(e)return e.toObject()})},m.prototype.getSignatures=function(e,t,n,i){u.checkState(this.output instanceof a),i=i||c.SIGHASH_ALL;var o=this,s=[];return r.each(this.publicKeys,function(r){r.toString()===t.publicKey.toString()&&s.push(new d({publicKey:t.publicKey,prevTxId:o.prevTxId,outputIndex:o.outputIndex,inputIndex:n,signature:f.sign(e,t,i,n,o.output.script),sigtype:i}))}),s},m.prototype.addSignature=function(e,t){return u.checkState(!this.isFullySigned(),"All needed signatures have already been added"),u.checkArgument(!r.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),u.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this},m.prototype._updateScript=function(){return this.setScript(l.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this},m.prototype._createSignatures=function(){return r.map(r.filter(this.signatures,function(e){return!r.isUndefined(e)}),function(e){return p.concat([e.signature.toDER(),p.integerAsSingleByteBuffer(e.sigtype)])})},m.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()},m.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},m.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},m.prototype.countSignatures=function(){return r.reduce(this.signatures,function(e,t){return e+!!t},0)},m.prototype.publicKeysWithoutSignature=function(){var e=this;return r.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})},m.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,f.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script)},m.normalizeSignatures=function(e,t,n,r,i){return i.map(function(i){var o=null;return r=r.filter(function(r){if(o)return!0;var s=new d({signature:c.fromTxFormat(r),publicKey:i,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:n,sigtype:c.SIGHASH_ALL});s.signature.nhashtype=s.sigtype;var a=f.verify(e,s.signature,s.publicKey,s.inputIndex,t.output.script);return!a||(o=s,!1)}),o||null})},m.OPCODES_SIZE=1,m.SIGNATURE_SIZE=73,m.prototype._estimateSize=function(){return m.OPCODES_SIZE+this.threshold*m.SIGNATURE_SIZE},e.exports=m},function(e,t,n){"use strict";var r=n(17),i=n(197),o=n(196),s=n(111),a=n(25),u=n(86),l=n(85),c=n(110),f=n(95),h=n(30),p=n(198);function d(e,t,n,i){o.apply(this,arguments);var s=this;t=t||e.publicKeys,n=n||e.threshold,i=i||e.signatures,this.publicKeys=r.sortBy(t,function(e){return e.toString("hex")}),this.redeemScript=u.buildMultisigOut(this.publicKeys,n),a.checkState(u.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output"),this.publicKeyIndex={},r.each(this.publicKeys,function(e,t){s.publicKeyIndex[e.toString()]=t}),this.threshold=n,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}i(d,o),d.prototype.toObject=function(){var e=o.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=r.map(this.publicKeys,function(e){return e.toString()}),e.signatures=this._serializeSignatures(),e},d.prototype._deserializeSignatures=function(e){return r.map(e,function(e){if(e)return new p(e)})},d.prototype._serializeSignatures=function(){return r.map(this.signatures,function(e){if(e)return e.toObject()})},d.prototype.getSignatures=function(e,t,n,i){a.checkState(this.output instanceof s),i=i||l.SIGHASH_ALL;var o=this,u=[];return r.each(this.publicKeys,function(r){r.toString()===t.publicKey.toString()&&u.push(new p({publicKey:t.publicKey,prevTxId:o.prevTxId,outputIndex:o.outputIndex,inputIndex:n,signature:c.sign(e,t,i,n,o.redeemScript),sigtype:i}))}),u},d.prototype.addSignature=function(e,t){return a.checkState(!this.isFullySigned(),"All needed signatures have already been added"),a.checkArgument(!r.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),a.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this},d.prototype._updateScript=function(){return this.setScript(u.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript})),this},d.prototype._createSignatures=function(){return r.map(r.filter(this.signatures,function(e){return!r.isUndefined(e)}),function(e){return h.concat([e.signature.toDER(),h.integerAsSingleByteBuffer(e.sigtype)])})},d.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()},d.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},d.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},d.prototype.countSignatures=function(){return r.reduce(this.signatures,function(e,t){return e+!!t},0)},d.prototype.publicKeysWithoutSignature=function(){var e=this;return r.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})},d.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,c.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript)},d.OPCODES_SIZE=7,d.SIGNATURE_SIZE=74,d.PUBKEY_SIZE=34,d.prototype._estimateSize=function(){return d.OPCODES_SIZE+this.threshold*d.SIGNATURE_SIZE+this.publicKeys.length*d.PUBKEY_SIZE},e.exports=d},function(e,t,n){"use strict";var r=n(17),i=n(25),o=n(49),s=n(0),a=n(80),u=n(30),l=n(41),c=n(1453),f=2,h=2,p=601;function d(e){return this instanceof d?(this.nullifiers=[],this.commitments=[],this.ciphertexts=[],this.macs=[],e?this._fromObject(e):void 0):new d(e)}Object.defineProperty(d.prototype,"vpub_old",{configurable:!1,enumerable:!0,get:function(){return this._vpub_old},set:function(e){e instanceof o?(this._vpub_oldBN=e,this._vpub_old=e.toNumber()):r.isString(e)?(this._vpub_old=parseInt(e),this._vpub_oldBN=o.fromNumber(this._vpub_old)):(i.checkArgument(l.isNaturalNumber(e),"vpub_old is not a natural number"),this._vpub_oldBN=o.fromNumber(e),this._vpub_old=e),i.checkState(l.isNaturalNumber(this._vpub_old),"vpub_old is not a natural number")}}),Object.defineProperty(d.prototype,"vpub_new",{configurable:!1,enumerable:!0,get:function(){return this._vpub_new},set:function(e){e instanceof o?(this._vpub_newBN=e,this._vpub_new=e.toNumber()):r.isString(e)?(this._vpub_new=parseInt(e),this._vpub_newBN=o.fromNumber(this._vpub_new)):(i.checkArgument(l.isNaturalNumber(e),"vpub_new is not a natural number"),this._vpub_newBN=o.fromNumber(e),this._vpub_new=e),i.checkState(l.isNaturalNumber(this._vpub_new),"vpub_new is not a natural number")}}),d.fromObject=function(e){i.checkArgument(r.isObject(e));var t=new d;return t._fromObject(e)},d.prototype._fromObject=function(e){var t=[];r.each(e.nullifiers,function(e){t.push(u.reverse(new s.Buffer(e,"hex")))});var n=[];r.each(e.commitments,function(e){n.push(u.reverse(new s.Buffer(e,"hex")))});var i=[];r.each(e.ciphertexts,function(e){i.push(new s.Buffer(e,"hex"))});var o=[];return r.each(e.macs,function(e){o.push(u.reverse(new s.Buffer(e,"hex")))}),this.vpub_old=e.vpub_old,this.vpub_new=e.vpub_new,this.anchor=u.reverse(new s.Buffer(e.anchor,"hex")),this.nullifiers=t,this.commitments=n,this.ephemeralKey=u.reverse(new s.Buffer(e.ephemeralKey,"hex")),this.ciphertexts=i,this.randomSeed=u.reverse(new s.Buffer(e.randomSeed,"hex")),this.macs=o,this.proof=c.fromObject(e.proof),this},d.prototype.toObject=d.prototype.toJSON=function e(){var t=[];r.each(this.nullifiers,function(e){t.push(u.reverse(e).toString("hex"))});var n=[];r.each(this.commitments,function(e){n.push(u.reverse(e).toString("hex"))});var i=[];r.each(this.ciphertexts,function(e){i.push(e.toString("hex"))});var o=[];r.each(this.macs,function(e){o.push(u.reverse(e).toString("hex"))});var s={vpub_old:this.vpub_old,vpub_new:this.vpub_new,anchor:u.reverse(this.anchor).toString("hex"),nullifiers:t,commitments:n,ephemeralKey:u.reverse(this.ephemeralKey).toString("hex"),ciphertexts:i,randomSeed:u.reverse(this.randomSeed).toString("hex"),macs:o,proof:this.proof.toObject()};return s},d.fromBufferReader=function(e){var t,n=new d;for(n.vpub_old=e.readUInt64LEBN(),n.vpub_new=e.readUInt64LEBN(),n.anchor=e.read(32),t=0;t<2;t++)n.nullifiers.push(e.read(32));for(t=0;t<2;t++)n.commitments.push(e.read(32));for(n.ephemeralKey=e.read(32),n.randomSeed=e.read(32),t=0;t<2;t++)n.macs.push(e.read(32));for(n.proof=c.fromBufferReader(e),t=0;t<2;t++)n.ciphertexts.push(e.read(601));return n},d.prototype.toBufferWriter=function(e){var t;for(e||(e=new a),e.writeUInt64LEBN(this._vpub_oldBN),e.writeUInt64LEBN(this._vpub_newBN),e.write(this.anchor),t=0;t<2;t++)e.write(this.nullifiers[t]);for(t=0;t<2;t++)e.write(this.commitments[t]);for(e.write(this.ephemeralKey),e.write(this.randomSeed),t=0;t<2;t++)e.write(this.macs[t]);for(this.proof.toBufferWriter(e),t=0;t<2;t++)e.write(this.ciphertexts[t]);return e},e.exports=d},function(e,t,n){"use strict";var r=n(25),i=n(0),o=n(80),s=2,a=10;function u(e){return this instanceof u?e?this._fromObject(e):void 0:new u(e)}function l(e){return this instanceof l?e?this._fromObject(e):void 0:new l(e)}function c(e){return this instanceof c?e?this._fromObject(e):void 0:new c(e)}u.fromObject=function(e){r.checkArgument(_.isObject(e));var t=new u;return t._fromObject(e)},u.prototype._fromObject=function(e){return this.y_lsb=e.y_lsb,this.x=new i.Buffer(e.x,"hex"),this},u.prototype.toObject=u.prototype.toJSON=function e(){var t={y_lsb:this.y_lsb,x:this.x.toString("hex")};return t},u.fromBufferReader=function(e){var t=new u,n=e.readUInt8();return t.y_lsb=1&n,t.x=e.read(32),t},u.prototype.toBufferWriter=function(e){return e||(e=new o),e.writeUInt8(2|this.y_lsb),e.write(this.x),e},l.fromObject=function(e){r.checkArgument(_.isObject(e));var t=new l;return t._fromObject(e)},l.prototype._fromObject=function(e){return this.y_gt=e.y_gt,this.x=new i.Buffer(e.x,"hex"),this},l.prototype.toObject=l.prototype.toJSON=function e(){var t={y_gt:this.y_gt,x:this.x.toString("hex")};return t},l.fromBufferReader=function(e){var t=new l,n=e.readUInt8();return t.y_gt=1&n,t.x=e.read(64),t},l.prototype.toBufferWriter=function(e){return e||(e=new o),e.writeUInt8(10|this.y_gt),e.write(this.x),e},c.fromObject=function(e){r.checkArgument(_.isObject(e));var t=new c;return t._fromObject(e)},c.prototype._fromObject=function(e){return this.g_A=u.fromObject(e.g_A),this.g_A_prime=u.fromObject(e.g_A_prime),this.g_B=l.fromObject(e.g_B),this.g_B_prime=u.fromObject(e.g_B_prime),this.g_C=u.fromObject(e.g_C),this.g_C_prime=u.fromObject(e.g_C_prime),this.g_K=u.fromObject(e.g_K),this.g_H=u.fromObject(e.g_H),this},c.prototype.toObject=c.prototype.toJSON=function e(){var t={g_A:this.g_A.toObject(),g_A_prime:this.g_A_prime.toObject(),g_B:this.g_B.toObject(),g_B_prime:this.g_B_prime.toObject(),g_C:this.g_C.toObject(),g_C_prime:this.g_C_prime.toObject(),g_K:this.g_K.toObject(),g_H:this.g_H.toObject()};return t},c.fromBufferReader=function(e){var t=new c;return t.g_A=u.fromBufferReader(e),t.g_A_prime=u.fromBufferReader(e),t.g_B=l.fromBufferReader(e),t.g_B_prime=u.fromBufferReader(e),t.g_C=u.fromBufferReader(e),t.g_C_prime=u.fromBufferReader(e),t.g_K=u.fromBufferReader(e),t.g_H=u.fromBufferReader(e),t},c.prototype.toBufferWriter=function(e){return e||(e=new o),this.g_A.toBufferWriter(e),this.g_A_prime.toBufferWriter(e),this.g_B.toBufferWriter(e),this.g_B_prime.toBufferWriter(e),this.g_C.toBufferWriter(e),this.g_C_prime.toBufferWriter(e),this.g_K.toBufferWriter(e),this.g_H.toBufferWriter(e),e},e.exports=c},function(e,t,n){"use strict";(function(t){var r=n(80),i=n(109),o=n(49),s=function e(n){if(!(this instanceof e))return new e(n);if(t.isBuffer(n))this.buf=n;else if("number"==typeof n){var r=n;this.fromNumber(r)}else if(n instanceof o){var i=n;this.fromBN(i)}else if(n){var s=n;this.set(s)}};s.prototype.set=function(e){return this.buf=e.buf||this.buf,this},s.prototype.fromString=function(e){return this.set({buf:new t(e,"hex")}),this},s.prototype.toString=function(){return this.buf.toString("hex")},s.prototype.fromBuffer=function(e){return this.buf=e,this},s.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this},s.prototype.fromBN=function(e){return this.buf=r().writeVarintBN(e).concat(),this},s.prototype.fromNumber=function(e){return this.buf=r().writeVarintNum(e).concat(),this},s.prototype.toBuffer=function(){return this.buf},s.prototype.toBN=function(){return i(this.buf).readVarintBN()},s.prototype.toNumber=function(){return i(this.buf).readVarintNum()},e.exports=s}).call(this,n(0).Buffer)},function(e,t,n){e.exports=n(1456),e.exports.BlockHeader=n(277),e.exports.MerkleBlock=n(602)},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(277),o=n(49),s=n(30),a=n(109),u=n(80),l=n(60),c=n(275),f=n(25);function h(e){return this instanceof h?(r.extend(this,h._from(e)),this):new h(e)}h.MAX_BLOCK_SIZE=1e6,h._from=function e(t){var n={};if(s.isBuffer(t))n=h._fromBufferReader(a(t));else{if(!r.isObject(t))throw new TypeError("Unrecognized argument for Block");n=h._fromObject(t)}return n},h._fromObject=function e(t){var n=[];t.transactions.forEach(function(e){e instanceof c?n.push(e):n.push(c().fromObject(e))});var r={header:i.fromObject(t.header),transactions:n};return r},h.fromObject=function e(t){var n=h._fromObject(t);return new h(n)},h._fromBufferReader=function e(t){var n={};f.checkState(!t.finished(),"No block data received"),n.header=i.fromBufferReader(t);var r=t.readVarintNum();n.transactions=[];for(var o=0;o<r;o++)n.transactions.push(c().fromBufferReader(t));return n},h.fromBufferReader=function e(t){f.checkArgument(t,"br is required");var n=h._fromBufferReader(t);return new h(n)},h.fromBuffer=function e(t){return h.fromBufferReader(new a(t))},h.fromString=function e(n){var r=new t(n,"hex");return h.fromBuffer(r)},h.fromRawBlock=function e(n){s.isBuffer(n)||(n=new t(n,"binary"));var r=a(n);r.pos=h.Values.START_OF_BLOCK;var i=h._fromBufferReader(r);return new h(i)},h.prototype.toObject=h.prototype.toJSON=function e(){var t=[];return this.transactions.forEach(function(e){t.push(e.toObject())}),{header:this.header.toObject(),transactions:t}},h.prototype.toBuffer=function e(){return this.toBufferWriter().concat()},h.prototype.toString=function e(){return this.toBuffer().toString("hex")},h.prototype.toBufferWriter=function e(t){t||(t=new u),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var n=0;n<this.transactions.length;n++)this.transactions[n].toBufferWriter(t);return t},h.prototype.getTransactionHashes=function e(){var t=[];if(0===this.transactions.length)return[h.Values.NULL_HASH];for(var n=0;n<this.transactions.length;n++)t.push(this.transactions[n]._getHash());return t},h.prototype.getMerkleTree=function e(){for(var n=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var o=0;o<i;o+=2){var s=Math.min(o+1,i-1),a=t.concat([n[r+o],n[r+s]]);n.push(l.sha256sha256(a))}r+=i}return n},h.prototype.getMerkleRoot=function e(){var t=this.getMerkleTree();return t[t.length-1]},h.prototype.validMerkleRoot=function e(){var t=new o(this.header.merkleRoot.toString("hex"),"hex"),n=new o(this.getMerkleRoot().toString("hex"),"hex");return 0===t.cmp(n)},h.prototype._getHash=function(){return this.header._getHash()};var p={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:r.noop};Object.defineProperty(h.prototype,"id",p),Object.defineProperty(h.prototype,"hash",p),h.prototype.inspect=function e(){return"<Block "+this.id+">"},h.Values={START_OF_BLOCK:8,NULL_HASH:new t("0000000000000000000000000000000000000000000000000000000000000000","hex")},e.exports=h}).call(this,n(0).Buffer)},function(e,t,n){"use strict";var r=n(17),i=n(32),o=n(129),s=n(361),a=function(e,t){if(!(this instanceof a))return new a(e,t);if(this.extras={},this.knownParams=t||[],this.address=this.network=this.amount=this.message=null,"string"==typeof e){var n=a.parse(e);n.amount&&(n.amount=this._parseAmount(n.amount)),this._fromObject(n)}else{if("object"!=typeof e)throw new TypeError("Unrecognized data format.");this._fromObject(e)}};a.fromString=function e(t){if("string"!=typeof t)throw new TypeError("Expected a string");return new a(t)},a.fromObject=function e(t){return new a(t)},a.isValid=function(e,t){try{new a(e,t)}catch(e){return!1}return!0},a.parse=function(e){var t=i.parse(e,!0);if("zcash:"!==t.protocol)throw new TypeError("Invalid zcash URI");var n=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=n&&n[1]||void 0,t.query},a.Members=["address","amount","message","label","r"],a.prototype._fromObject=function(e){if(!o.isValid(e.address))throw new TypeError("Invalid zcash address");for(var t in this.address=new o(e.address),this.network=this.address.network,this.amount=e.amount,e)if("address"!==t&&"amount"!==t){if(/^req-/.exec(t)&&-1===this.knownParams.indexOf(t))throw Error("Unknown required argument "+t);var n=a.Members.indexOf(t)>-1?this:this.extras;n[t]=e[t]}},a.prototype._parseAmount=function(e){if(e=Number(e),isNaN(e))throw new TypeError("Invalid amount");return s.fromBTC(e).toSatoshis()},a.prototype.toObject=a.prototype.toJSON=function e(){for(var t={},n=0;n<a.Members.length;n++){var i=a.Members[n];this.hasOwnProperty(i)&&void 0!==this[i]&&(t[i]=this[i].toString())}return r.extend(t,this.extras),t},a.prototype.toString=function(){var e={};return this.amount&&(e.amount=s.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),r.extend(e,this.extras),i.format({protocol:"zcash:",host:this.address,query:e})},a.prototype.inspect=function(){return"<URI: "+this.toString()+">"},e.exports=a},function(e,t,n){"use strict";const r=n(5),i=r("jsipfs:state");i.error=r("jsipfs:state:error");const o=n(183);e.exports=(e=>{const t=o("uninitialized",{uninitialized:{init:"initializing",initialized:"stopped"},initializing:{initialized:"stopped"},stopped:{start:"starting"},starting:{started:"running"},running:{stop:"stopping"},stopping:{stopped:"stopped"}});return t.on("error",e=>i.error(e)),t.on("done",()=>i("-> "+t._state)),t.init=(()=>{t("init")}),t.initialized=(()=>{t("initialized")}),t.stop=(()=>{t("stop")}),t.stopped=(()=>{t("stopped")}),t.start=(()=>{t("start")}),t.started=(()=>{t("started")}),t.state=(()=>t._state),t})},function(e,t,n){"use strict";(function(t){const r=n(24),i=n(1460),o=n(633),s=n(634);function a(e,n,a){let l={};if(e)r.isMultiaddr(e)?l=u(e):"object"==typeof e?l=e:"string"==typeof e&&("/"===e[0]?l=u(r(e)):l.host=e);else if("undefined"!=typeof self){const e=self.location.host.split(":");l.host=e[0],l.port=e[1]}n&&"object"!=typeof n&&(n={port:n});const c=Object.assign(o(),l,n,a),f=s(c),h=i(f,c);return h.send=f,h.Buffer=t,h}function u(e){const t=e.nodeAddress();return{host:t.address,port:t.port}}e.exports=a}).call(this,n(0).Buffer)},function(e,t,n){"use strict";function r(){const e={add:n(605),addReadableStream:n(1467),addPullStream:n(1468),addFromFs:n(1469),addFromURL:n(1470),addFromStream:n(605),cat:n(1478),catReadableStream:n(1485),catPullStream:n(1486),get:n(1487),getReadableStream:n(1507),getPullStream:n(1508),ls:n(1509),lsReadableStream:n(1521),lsPullStream:n(1522),block:n(643),bitswap:n(1526),dag:n(1530),object:n(1533),pin:n(1546),bootstrap:n(1550),dht:n(1554),name:n(1561),ping:n(1568),pingReadableStream:n(1570),pingPullStream:n(1571),swarm:n(1572),pubsub:n(1578),dns:n(1582),commands:n(1583),config:n(1584),diag:n(1589),id:n(1593),key:n(1594),log:n(1601),mount:n(1605),refs:n(1606),repo:n(1607),stop:n(1611),stats:n(1612),update:n(1618),version:n(1619),types:n(1620),resolve:n(1621)};return e.shutdown=e.stop,e.files=(e=>n(1622)(e)),e.util=((e,t)=>({getEndpointConfig:n(1687)(t),crypto:n(64),isIPFS:n(65)})),e}function i(e,t){const n=r(),i={};return Object.keys(n).forEach(r=>{i[r]=n[r](e,t)}),i}e.exports=i},function(e,t){var n=void 0,r=1e5,i=(o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,{Class:function(e){return o.call(e).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return s.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}),o,s,a=Math.LN2,u=Math.abs,l=Math.floor,c=Math.log,f=Math.min,h=Math.pow,p=Math.round,d;function m(e){if(g&&d){var t=g(e),n;for(n=0;n<t.length;n+=1)d(e,t[n],{value:e[t[n]],writable:!1,enumerable:!1,configurable:!1})}}d=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,n){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return i.HasProperty(n,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,n.get),i.HasProperty(n,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,n.set),i.HasProperty(n,"value")&&(e[t]=n.value),e};var g=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t=[],n;for(n in e)i.HasOwnProperty(e,n)&&t.push(n);return t};function y(e){if(d){if(e.length>r)throw new RangeError("Array too large for polyfill");var t;for(t=0;t<e.length;t+=1)n(t)}function n(t){d(e,t,{get:function(){return e._getter(t)},set:function(n){e._setter(t,n)},enumerable:!0,configurable:!1})}}function b(e,t){var n=32-t;return e<<n>>n}function v(e,t){var n=32-t;return e<<n>>>n}function w(e){return[255&e]}function _(e){return b(e[0],8)}function k(e){return[255&e]}function S(e){return v(e[0],8)}function E(e){return e=p(Number(e)),[e<0?0:e>255?255:255&e]}function x(e){return[e>>8&255,255&e]}function C(e){return b(e[0]<<8|e[1],16)}function A(e){return[e>>8&255,255&e]}function I(e){return v(e[0]<<8|e[1],16)}function T(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function j(e){return b(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function O(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function P(e){return v(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function B(e,t,n){var r=(1<<t-1)-1,i,o,s,p,d,m,g,y;function b(e){var t=l(e),n=e-t;return n<.5?t:n>.5?t+1:t%2?t+1:t}for(e!=e?(o=(1<<t)-1,s=h(2,n-1),i=0):e===1/0||e===-1/0?(o=(1<<t)-1,s=0,i=e<0?1:0):0===e?(o=0,s=0,i=1/e==-1/0?1:0):(i=e<0,e=u(e),e>=h(2,1-r)?(o=f(l(c(e)/a),1023),s=b(e/h(2,o)*h(2,n)),s/h(2,n)>=2&&(o+=1,s=1),o>r?(o=(1<<t)-1,s=0):(o+=r,s-=h(2,n))):(o=0,s=b(e/h(2,1-r-n)))),m=[],d=n;d;d-=1)m.push(s%2?1:0),s=l(s/2);for(d=t;d;d-=1)m.push(o%2?1:0),o=l(o/2);for(m.push(i?1:0),m.reverse(),g=m.join(""),y=[];g.length;)y.push(parseInt(g.substring(0,8),2)),g=g.substring(8);return y}function R(e,t,n){var r=[],i,o,s,a,u,l,c,f;for(i=e.length;i;i-=1)for(s=e[i-1],o=8;o;o-=1)r.push(s%2?1:0),s>>=1;return r.reverse(),a=r.join(""),u=(1<<t-1)-1,l=parseInt(a.substring(0,1),2)?-1:1,c=parseInt(a.substring(1,1+t),2),f=parseInt(a.substring(1+t),2),c===(1<<t)-1?0!==f?NaN:l*(1/0):c>0?l*h(2,c-u)*(1+f/h(2,n)):0!==f?l*h(2,-(u-1))*(f/h(2,n)):l<0?-0:0}function N(e){return R(e,11,52)}function M(e){return B(e,11,52)}function L(e){return R(e,8,23)}function F(e){return B(e,8,23)}!function(){var e=function e(t){if(t=i.ToInt32(t),t<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var n;for(this.byteLength=t,this._bytes=[],this._bytes.length=t,n=0;n<this.byteLength;n+=1)this._bytes[n]=0;m(this)};t.ArrayBuffer=t.ArrayBuffer||e;var r=function e(){};function o(t,o,s){var a;return a=function(t,n,r){var o,s,u,l;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===a)for(o=arguments[0],this.length=o.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)this._setter(u,o._getter(u));else if("object"!=typeof arguments[0]||(arguments[0]instanceof e||"ArrayBuffer"===i.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof e||"ArrayBuffer"===i.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=t,this.byteOffset=i.ToUint32(n),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=i.ToUint32(r),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(s=arguments[0],this.length=i.ToUint32(s.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)l=s[u],this._setter(u,Number(l));else{if(this.length=i.ToInt32(arguments[0]),r<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}this.constructor=a,m(this),y(this)},a.prototype=new r,a.prototype.BYTES_PER_ELEMENT=t,a.prototype._pack=o,a.prototype._unpack=s,a.BYTES_PER_ELEMENT=t,a.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(e=i.ToUint32(e),e>=this.length)return n;var t=[],r,o;for(r=0,o=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,o+=1)t.push(this.buffer._bytes[o]);return this._unpack(t)},a.prototype.get=a.prototype._getter,a.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(e=i.ToUint32(e),e>=this.length)return n;var r=this._pack(t),o,s;for(o=0,s=this.byteOffset+e*this.BYTES_PER_ELEMENT;o<this.BYTES_PER_ELEMENT;o+=1,s+=1)this.buffer._bytes[s]=r[o]},a.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var n,r,o,s,a,u,l,c,f,h;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(n=arguments[0],o=i.ToUint32(arguments[1]),o+n.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(c=this.byteOffset+o*this.BYTES_PER_ELEMENT,f=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(h=[],a=0,u=n.byteOffset;a<f;a+=1,u+=1)h[a]=n.buffer._bytes[u];for(a=0,l=c;a<f;a+=1,l+=1)this.buffer._bytes[l]=h[a]}else for(a=0,u=n.byteOffset,l=c;a<f;a+=1,u+=1,l+=1)this.buffer._bytes[l]=n.buffer._bytes[u]}else{if("object"!=typeof arguments[0]||void 0===arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(r=arguments[0],s=i.ToUint32(r.length),o=i.ToUint32(arguments[1]),o+s>this.length)throw new RangeError("Offset plus length of array is out of range");for(a=0;a<s;a+=1)u=r[a],this._setter(o+a,Number(u))}},a.prototype.subarray=function(e,t){function n(e,t,n){return e<t?t:e>n?n:e}e=i.ToInt32(e),t=i.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=n(e,0,this.length),t=n(t,0,this.length);var r=t-e;return r<0&&(r=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)},a}var s=o(1,w,_),a=o(1,k,S),u=o(1,E,S),l=o(2,x,C),c=o(2,A,I),f=o(4,T,j),h=o(4,O,P),p=o(4,F,L),d=o(8,M,N);t.Int8Array=t.Int8Array||s,t.Uint8Array=t.Uint8Array||a,t.Uint8ClampedArray=t.Uint8ClampedArray||u,t.Int16Array=t.Int16Array||l,t.Uint16Array=t.Uint16Array||c,t.Int32Array=t.Int32Array||f,t.Uint32Array=t.Uint32Array||h,t.Float32Array=t.Float32Array||p,t.Float64Array=t.Float64Array||d}(),function(){function e(e,t){return i.IsCallable(e.get)?e.get(t):e[t]}var n=(r=new t.Uint16Array([4660]),o=new t.Uint8Array(r.buffer),18===e(o,0)),r,o,s=function e(n,r,o){if(0===arguments.length)n=new t.ArrayBuffer(0);else if(!(n instanceof t.ArrayBuffer||"ArrayBuffer"===i.Class(n)))throw new TypeError("TypeError");if(this.buffer=n||new t.ArrayBuffer(0),this.byteOffset=i.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=i.ToUint32(o),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");m(this)};function a(r){return function(o,s){if(o=i.ToUint32(o),o+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");o+=this.byteOffset;var a=new t.Uint8Array(this.buffer,o,r.BYTES_PER_ELEMENT),u=[],l;for(l=0;l<r.BYTES_PER_ELEMENT;l+=1)u.push(e(a,l));return Boolean(s)===Boolean(n)&&u.reverse(),e(new r(new t.Uint8Array(u).buffer),0)}}function u(r){return function(o,s,a){if(o=i.ToUint32(o),o+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var u=new r([s]),l=new t.Uint8Array(u.buffer),c=[],f,h;for(f=0;f<r.BYTES_PER_ELEMENT;f+=1)c.push(e(l,f));Boolean(a)===Boolean(n)&&c.reverse(),h=new t.Uint8Array(this.buffer,o,r.BYTES_PER_ELEMENT),h.set(c)}}s.prototype.getUint8=a(t.Uint8Array),s.prototype.getInt8=a(t.Int8Array),s.prototype.getUint16=a(t.Uint16Array),s.prototype.getInt16=a(t.Int16Array),s.prototype.getUint32=a(t.Uint32Array),s.prototype.getInt32=a(t.Int32Array),s.prototype.getFloat32=a(t.Float32Array),s.prototype.getFloat64=a(t.Float64Array),s.prototype.setUint8=u(t.Uint8Array),s.prototype.setInt8=u(t.Int8Array),s.prototype.setUint16=u(t.Uint16Array),s.prototype.setInt16=u(t.Int16Array),s.prototype.setUint32=u(t.Uint32Array),s.prototype.setInt32=u(t.Int32Array),s.prototype.setFloat32=u(t.Float32Array),s.prototype.setFloat64=u(t.Float64Array),t.DataView=t.DataView||s}()},function(e,t,n){"use strict";const r=n(201),i=n(1463);function o(e,t){const r=n(61),i=n(1464),o=n(1465),s=null==e.followSymlinks||e.followSymlinks;t=r.resolve(t);const a=i.statSync(t);if(a.isDirectory()&&!e.recursive)throw new Error("Can only add directories using --recursive");if(a.isDirectory()&&e.recursive){t=t.split(r.sep).join("/");const n=t+(t.endsWith("/")?"":"/");let a=n.split("/");a=a[a.length-2]+"/";const u=new o.sync.GlobSync("**/*",{cwd:t,follow:s,dot:e.hidden,ignore:e.ignore});return u.found.map(e=>{const t=n+e;return!0===u.symlinks[t]?{path:a+e,symlink:!0,dir:!1,content:i.readlinkSync(t)}:"FILE"===u.cache[t]?{path:a+e,symlink:!1,dir:!1,content:i.createReadStream(t)}:"DIR"===u.cache[t]||u.cache[t]instanceof Array?{path:a+e,symlink:!1,dir:!0}:void 0}).filter(Boolean)}return{path:r.basename(t),content:i.createReadStream(t)}}function s(e,t){let n=[].concat(e);return i(n,e=>{if("string"==typeof e){if(!r)throw new Error("Can only add file paths in node");return o(t,e)}return e.path&&!e.content?(e.dir=!0,e):e.content||e.dir?e:{path:"",symlink:!1,dir:!1,content:e}})}t=e.exports=s},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=[];return Array.isArray(e)?(e.forEach(function(e,i,o){var s=t.call(n,e,i,o);Array.isArray(s)?r.push.apply(r,s):null!=s&&r.push(s)}),r):r}},function(e,t){},function(e,t){},function(e,t,n){"use strict";(function(t){const r=n(20).Transform,i=n(201),o=n(187).isSource,s=n(100),a="--",u="\r\n",l=t.from(u);class c extends r{constructor(e){super(Object.assign({},e,{objectMode:!0,highWaterMark:1})),this._boundary=this._generateBoundary(),this._files=[],this._draining=!1}_flush(){this.push(t.from(a+this._boundary+a+u)),this.push(null)}_generateBoundary(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);return e}_transform(e,n,r){if(t.isBuffer(e))return this.push(e),r();this._files.push(e),this._maybeDrain(r)}_maybeDrain(e){if(this._draining)this.once("drained all files",e);else if(this._files.length){this._draining=!0;const t=this._files.shift();this._pushFile(t,t=>{this._draining=!1,t?this.emit("error",t):this._maybeDrain(e)})}else this.emit("drained all files"),e()}_pushFile(e,n){const r=this._leading(e.headers||{});this.push(r);let a=e.content||t.alloc(0);if(t.isBuffer(a))return this.push(a),this.push(l),n();o(a)&&(a=s.source(a)),a.once("error",this.emit.bind(this,"error")),a.once("end",()=>{this.push(l),n()}),a.on("data",e=>{const t=this.push(e);!t&&i&&(a.pause(),this.once("drain",()=>a.resume()))})}_leading(e){var n=[a+this._boundary];Object.keys(e).forEach(t=>{n.push(t+": "+e[t])}),n.push(""),n.push("");const r=n.join(u);return t.from(r)}}e.exports=c}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(200),i=n(153);e.exports=(e=>t=>(t=t||{},t.converter=i,r(e,"add")(t)))},function(e,t,n){"use strict";const r=n(200),i=n(153),o=n(79);e.exports=(e=>t=>(t=t||{},t.converter=i,o(r(e,"add")({qs:t}))))},function(e,t,n){"use strict";const r=n(201),i=n(3),o=n(363),s=n(153);e.exports=(e=>{const t=o(e,"add");return i((e,n,i)=>{if("function"==typeof n&&void 0===i&&(i=n,n={}),"function"==typeof n&&"function"==typeof i&&(i=n,n={}),!r)return i(new Error("fsAdd does not work in the browser"));if("string"!=typeof e)return i(new Error('"path" must be a string'));const o={qs:n,converter:s};t(e,o,i)})})},function(e,t,n){"use strict";const r=n(3),{URL:i}=n(32),o=n(606),s=n(363),a=n(153);e.exports=(e=>{const t=s(e,"add");return r((e,n,r)=>{if("function"==typeof n&&void 0===r&&(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),!u(e))return r(new Error('"url" param must be an http(s) url'));l(e,n,t,r)})});const u=e=>"string"==typeof e&&e.startsWith("http"),l=(e,t,n,r)=>{const s=new i(e),c=o(s.protocol)(e,e=>{if(e.statusCode>=400)return r(new Error(`Failed to download with ${e.statusCode}`));const i=e.headers.location;if(e.statusCode>=300&&e.statusCode<400&&i){if(!u(i))return r(new Error("redirection url must be an http(s) url"));l(i,t,n,r)}else{const i={qs:t,converter:a},o=decodeURIComponent(s.pathname.split("/").pop());n({content:e,path:o},i,r)}});c.once("error",r),c.end()}},function(e,t,n){(function(e){var r=n(1472),i=n(608),o=n(69),s=n(609),a=n(32),u=t;u.request=function(t,n){t="string"==typeof t?a.parse(t):o(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new r(t);return n&&f.on("response",n),f},u.get=function e(t,n){var r=u.request(t,n);return r.end(),r},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(8))},function(e,t,n){(function(t,r,i){var o=n(607),s=n(1),a=n(608),u=n(20),l=a.IncomingMessage,c=a.readyStates;function f(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}var h=e.exports=function(e){var n=this,r;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+t.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){n.setHeader(t,e.headers[t])});var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=f(r,i),n._fetchTimer=null,n.on("finish",function(){n._onFinish()})};function p(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}s(h,u.Writable),h.prototype.setHeader=function(e,t){var n=this,r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){var t=this;delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,n=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var a=[];if(Object.keys(n).forEach(function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach(function(e){a.push([t,e])}):a.push([t,r])}),"fetch"===e._mode){var u=null,l=null;if(o.abortController){var f=new AbortController;u=f.signal,e._fetchAbortController=f,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then(function(t){e._fetchResponse=t,e._connect()},function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var h=e._xhr=new r.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick(function(){e.emit("error",t)})}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),a.forEach(function(e){h.setRequestHeader(e[0],e[1])}),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(s)}catch(t){return void i.nextTick(function(){e.emit("error",t)})}}}},h.prototype._onXHRProgress=function(){var e=this;p(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,n){var r=this;this._body.push(e),n()},h.prototype.abort=h.prototype.destroy=function(){var e=this;this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,n){var r=this;"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(0).Buffer,n(8),n(2))},function(e,t,n){(function(t,r,i){var o=n(610),s=n(1),a=n(611),u=n(612),l=n(618),c=a.IncomingMessage,f=a.readyStates;function h(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}var p=e.exports=function(e){var n=this,r;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){n.setHeader(t,e.headers[t])});var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=h(r,i),n._fetchTimer=null,n.on("finish",function(){n._onFinish()})};function d(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}s(p,u.Writable),p.prototype.setHeader=function(e,t){var n=this,r=e.toLowerCase();-1===m.indexOf(r)&&(this._headers[r]={name:e,value:t})},p.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},p.prototype.removeHeader=function(e){var t=this;delete this._headers[e.toLowerCase()]},p.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts,s=e._headers,a=null;"GET"!==n.method&&"HEAD"!==n.method&&(a=o.arraybuffer?l(t.concat(e._body)):o.blobConstructor?new r.Blob(e._body.map(function(e){return l(e)}),{type:(s["content-type"]||{}).value||""}):t.concat(e._body).toString());var u=[];if(Object.keys(s).forEach(function(e){var t=s[e].name,n=s[e].value;Array.isArray(n)?n.forEach(function(e){u.push([t,e])}):u.push([t,n])}),"fetch"===e._mode){var c=null,h=null;if(o.abortController){var p=new AbortController;c=p.signal,e._fetchAbortController=p,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=r.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},n.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._connect()},function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var d=e._xhr=new r.XMLHttpRequest;try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick(function(){e.emit("error",t)})}"responseType"in d&&(d.responseType=e._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(d.timeout=n.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),u.forEach(function(e){d.setRequestHeader(e[0],e[1])}),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{d.send(a)}catch(t){return void i.nextTick(function(){e.emit("error",t)})}}}},p.prototype._onXHRProgress=function(){var e=this;d(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},p.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},p.prototype._write=function(e,t,n){var r=this;this._body.push(e),n()},p.prototype.abort=p.prototype.destroy=function(){var e=this;this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},p.prototype.end=function(e,t,n){var r=this;"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},p.prototype.flushHeaders=function(){},p.prototype.setTimeout=function(){},p.prototype.setNoDelay=function(){},p.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(0).Buffer,n(8),n(2))},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1476);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(617),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";const r=n(3),i=n(101),o=n(65),s=n(1479);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={});try{t=i(t)}catch(e){if(!o.ipfsPath(t))return r(e)}const a={offset:n.offset,length:n.length};e({path:"cat",args:t,buffer:n.buffer,qs:a},(e,t)=>{if(e)return r(e);t.pipe(s((e,t)=>{if(e)return r(e);r(null,t)}))})}))},function(e,t,n){"use strict";var r=n(1480).Duplex,i=n(13),o=n(4).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function e(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",function e(n){n.on("error",t)}),this.on("unpipe",function e(n){n.removeListener("error",t)})}else this.append(e);r.call(this)}i.inherits(s,r),s.prototype._offset=function e(t){var n=0,r=0,i;if(0===t)return[0,0];for(;r<this._bufs.length;r++){if(i=n+this._bufs[r].length,t<i||r==this._bufs.length-1)return[r,t-n];n=i}},s.prototype._reverseOffset=function(e){for(var t=e[0],n=e[1],r=0;r<t;r++)n+=this._bufs[r].length;return n},s.prototype.append=function e(t){var n=0;if(o.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;n<t.length;n++)this.append(t[n]);else if(t instanceof s)for(;n<t._bufs.length;n++)this.append(t._bufs[n]);else null!=t&&("number"==typeof t&&(t=t.toString()),this._appendBuffer(o.from(t)));return this},s.prototype._appendBuffer=function e(t){this._bufs.push(t),this.length+=t.length},s.prototype._write=function e(t,n,r){this._appendBuffer(t),"function"==typeof r&&r()},s.prototype._read=function e(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function e(t){r.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype.get=function e(t){if(!(t>this.length||t<0)){var n=this._offset(t);return this._bufs[n[0]][n[1]]}},s.prototype.slice=function e(t,n){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof n&&n<0&&(n+=this.length),this.copy(null,0,t,n)},s.prototype.copy=function e(t,n,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return t||o.alloc(0);if(i<=0)return t||o.alloc(0);var e=!!t,s=this._offset(r),a=i-r,u=a,l=e&&n||0,c=s[1],f,h;if(0===r&&i==this.length){if(!e)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(h=0;h<this._bufs.length;h++)this._bufs[h].copy(t,l),l+=this._bufs[h].length;return t}if(u<=this._bufs[s[0]].length-c)return e?this._bufs[s[0]].copy(t,n,c,c+u):this._bufs[s[0]].slice(c,c+u);for(e||(t=o.allocUnsafe(a)),h=s[0];h<this._bufs.length;h++){if(f=this._bufs[h].length-c,!(u>f)){this._bufs[h].copy(t,l,c,c+u);break}this._bufs[h].copy(t,l,c),l+=f,u-=f,c&&(c=0)}return t},s.prototype.shallowSlice=function e(t,n){if(t=t||0,n="number"!=typeof n?this.length:n,t<0&&(t+=this.length),n<0&&(n+=this.length),t===n)return new s;var r=this._offset(t),i=this._offset(n),o=this._bufs.slice(r[0],i[0]+1);return 0==i[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new s(o)},s.prototype.toString=function e(t,n,r){return this.slice(n,r).toString(t)},s.prototype.consume=function e(t){for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function e(){for(var t=0,n=new s;t<this._bufs.length;t++)n.append(this._bufs[t]);return n},s.prototype.destroy=function e(){this._bufs.length=0,this.length=0,this.push(null)},s.prototype.indexOf=function(e,t,n){if(void 0===n&&"string"==typeof t&&(n=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=o.from([e]):"string"==typeof e?e=o.from(e,n):e instanceof s?e=e.slice():o.isBuffer(e)||(e=o.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;for(var r=this._offset(t),i=r[0],a=r[1];i<this._bufs.length;i++){for(var u=this._bufs[i];a<u.length;){var l=u.length-a;if(l>=e.length){var c=u.indexOf(e,a);if(-1!==c)return this._reverseOffset([i,c]);a=u.length-e.length+1}else{var f=this._reverseOffset([i,a]);if(this._match(f,e))return f;a++}}a=0}return-1},s.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(var n=0;n<t.length;n++)if(this.get(e+n)!==t[n])return!1;return!0},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(var t in e)!function(t){s.prototype[t]=null===e[t]?function(e,n){return this.slice(e,e+n)[t](0,n)}:function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=s},function(e,t,n){t=e.exports=n(619),t.Stream=t,t.Readable=t,t.Writable=n(622),t.Duplex=n(156),t.Transform=n(623),t.PassThrough=n(1484)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1483);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(623),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";const r=n(101),i=n(65),o=n(20),s=n(59);e.exports=(e=>(t,n)=>{n=n||{};const a=new o.PassThrough;try{t=r(t)}catch(e){if(!i.ipfsPath(t))return a.destroy(e)}const u={offset:n.offset,length:n.length};return e({path:"cat",args:t,buffer:n.buffer,qs:u},(e,t)=>{if(e)return a.destroy(e);s(t,a)}),a})},function(e,t,n){"use strict";const r=n(101),i=n(65),o=n(79),s=n(70);e.exports=(e=>(t,n)=>{n=n||{};const a=s.source();try{t=r(t)}catch(e){if(!i.ipfsPath(t))return a.end(e)}const u={offset:n.offset,length:n.length};return e({path:"cat",args:t,buffer:n.buffer,qs:u},(e,t)=>{if(e)return a.end(e);a.resolve(o(t))}),a})},function(e,t,n){"use strict";const r=n(3),i=n(101),o=n(364),s=n(199),a=n(1506),u=n(65);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={});try{t=i(t)}catch(e){if(!u.ipfsPath(t))return r(e)}const l={path:"get",args:t,qs:n};e.andTransform(l,o,(e,t)=>{if(e)return r(e);const n=[];t.pipe(a.obj((e,t,r)=>{e.content?e.content.pipe(s(t=>{n.push({path:e.path,content:t})})):n.push(e),r()},()=>r(null,n)))})}))},function(e,t,n){t.extract=n(1489),t.pack=n(1503)},function(e,t,n){var r=n(13),i=n(1490),o=n(69),s=n(626),a=n(279).Writable,u=n(279).PassThrough,l=function(){},c=function(e){return e&=511,e&&512-e},f=function(e,t){var n=new p(e,t);return n.end(),n},h=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},p=function(e,t){this._parent=e,this.offset=t,u.call(this)};r.inherits(p,u),p.prototype.destroy=function(e){this._parent.destroy(e)};var d=function(e){if(!(this instanceof d))return new d(e);a.call(this,e),e=e||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=l,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,n=t._buffer,r=function(){t._continue()},u=function(e){if(t._locked=!1,e)return t.destroy(e);t._stream||r()},m=function(){t._stream=null;var e=c(t._header.size);e?t._parse(e,g):t._parse(512,_),t._locked||r()},g=function(){t._buffer.consume(c(t._header.size)),t._parse(512,_),r()},y=function(){var e=t._header.size;t._paxGlobal=s.decodePax(n.slice(0,e)),n.consume(e),m()},b=function(){var e=t._header.size;t._pax=s.decodePax(n.slice(0,e)),t._paxGlobal&&(t._pax=o(t._paxGlobal,t._pax)),n.consume(e),m()},v=function(){var r=t._header.size;this._gnuLongPath=s.decodeLongPath(n.slice(0,r),e.filenameEncoding),n.consume(r),m()},w=function(){var r=t._header.size;this._gnuLongLinkPath=s.decodeLongPath(n.slice(0,r),e.filenameEncoding),n.consume(r),m()},_=function(){var i=t._offset,o;try{o=t._header=s.decode(n.slice(0,512),e.filenameEncoding)}catch(e){t.emit("error",e)}return n.consume(512),o?"gnu-long-path"===o.type?(t._parse(o.size,v),void r()):"gnu-long-link-path"===o.type?(t._parse(o.size,w),void r()):"pax-global-header"===o.type?(t._parse(o.size,y),void r()):"pax-header"===o.type?(t._parse(o.size,b),void r()):(t._gnuLongPath&&(o.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(o.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=o=h(o,t._pax),t._pax=null),t._locked=!0,o.size&&"directory"!==o.type?(t._stream=new p(t,i),t.emit("entry",o,t._stream,u),t._parse(o.size,m),void r()):(t._parse(512,_),void t.emit("entry",o,f(t,i),u))):(t._parse(512,_),void r())};this._onheader=_,this._parse(512,_)};r.inherits(d,a),d.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))},d.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)},d.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=l,this._overflow?this._write(this._overflow,void 0,e):e()}},d.prototype._write=function(e,t,n){if(!this._destroyed){var r=this._stream,i=this._buffer,o=this._missing;if(e.length&&(this._partial=!0),e.length<o)return this._missing-=e.length,this._overflow=null,r?r.write(e,n):(i.append(e),n());this._cb=n,this._missing=0;var s=null;e.length>o&&(s=e.slice(o),e=e.slice(0,o)),r?r.end(e):i.append(e),this._overflow=s,this._onparse()}},d.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()},e.exports=d},function(e,t,n){var r=n(1491),i=n(13),o=n(4).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function e(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",function e(n){n.on("error",t)}),this.on("unpipe",function e(n){n.removeListener("error",t)})}else this.append(e);r.call(this)}i.inherits(s,r),s.prototype._offset=function e(t){var n=0,r=0,i;if(0===t)return[0,0];for(;r<this._bufs.length;r++){if(i=n+this._bufs[r].length,t<i||r==this._bufs.length-1)return[r,t-n];n=i}},s.prototype.append=function e(t){var n=0;if(o.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;n<t.length;n++)this.append(t[n]);else if(t instanceof s)for(;n<t._bufs.length;n++)this.append(t._bufs[n]);else null!=t&&("number"==typeof t&&(t=t.toString()),this._appendBuffer(o.from(t)));return this},s.prototype._appendBuffer=function e(t){this._bufs.push(t),this.length+=t.length},s.prototype._write=function e(t,n,r){this._appendBuffer(t),"function"==typeof r&&r()},s.prototype._read=function e(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function e(t){r.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype.get=function e(t){return this.slice(t,t+1)[0]},s.prototype.slice=function e(t,n){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof n&&n<0&&(n+=this.length),this.copy(null,0,t,n)},s.prototype.copy=function e(t,n,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return t||o.alloc(0);if(i<=0)return t||o.alloc(0);var e=!!t,s=this._offset(r),a=i-r,u=a,l=e&&n||0,c=s[1],f,h;if(0===r&&i==this.length){if(!e)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(h=0;h<this._bufs.length;h++)this._bufs[h].copy(t,l),l+=this._bufs[h].length;return t}if(u<=this._bufs[s[0]].length-c)return e?this._bufs[s[0]].copy(t,n,c,c+u):this._bufs[s[0]].slice(c,c+u);for(e||(t=o.allocUnsafe(a)),h=s[0];h<this._bufs.length;h++){if(f=this._bufs[h].length-c,!(u>f)){this._bufs[h].copy(t,l,c,c+u);break}this._bufs[h].copy(t,l,c),l+=f,u-=f,c&&(c=0)}return t},s.prototype.shallowSlice=function e(t,n){t=t||0,n=n||this.length,t<0&&(t+=this.length),n<0&&(n+=this.length);var r=this._offset(t),i=this._offset(n),o=this._bufs.slice(r[0],i[0]+1);return 0==i[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new s(o)},s.prototype.toString=function e(t,n,r){return this.slice(n,r).toString(t)},s.prototype.consume=function e(t){for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function e(){for(var t=0,n=new s;t<this._bufs.length;t++)n.append(this._bufs[t]);return n},s.prototype.destroy=function e(){this._bufs.length=0,this.length=0,this.push(null)},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)!function(t){s.prototype[t]=function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=s},function(e,t,n){e.exports=n(203)},function(e,t,n){"use strict";(function(t,r){var i=n(10);e.exports=S;var o=n(51),s;S.ReadableState=k;var a=n(6).EventEmitter,u=function(e,t){return e.listeners(t).length},l=n(624),c=n(4).Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var d=n(7);d.inherits=n(1);var m=n(1493),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var y=n(1494),b=n(625),v;d.inherits(S,l);var w=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function k(e,t){s=s||n(203),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(16).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function S(e){if(s=s||n(203),!(this instanceof S))return new S(e);this._readableState=new k(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,r,i){var o=e._readableState,s;null===t?(o.reading=!1,O(e,o)):(i||(s=C(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):R(e,o)):x(e,o,t,!1))):r||(o.reading=!1));return A(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&P(e)),R(e,t)}function C(e,t){var n;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function A(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=b.destroy,S.prototype._undestroy=b.undestroy,S.prototype._destroy=function(e,t){this.push(null),t(e)},S.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:"string"==typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),E(this,e,t,!1,r)},S.prototype.unshift=function(e){return E(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return v||(v=n(16).StringDecoder),this._readableState.decoder=new v(e),this._readableState.encoding=e,this};var I=8388608;function T(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){g("emit readable"),e.emit("readable"),U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,U(e))}}function L(e){g("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=q(e,t.buffer,t.decoder),n);var n}function q(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?K(e,t):H(e,t),r}function K(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),e-=s,0===e){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}function H(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),e-=s,0===e){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function $(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}S.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):P(this),null;if(e=j(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var r=t.needReadable,i;return g("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,g("length less than watermark",r)),t.ended||t.reading?(r=!1,g("reading or ended",r)):r&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(n,t))),i=e>0?z(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&V(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,g("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,a=s?c:w;function l(e,t){g("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function c(){g("onend"),e.end()}o.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",l);var f=M(n);e.on("drain",f);var h=!1;function p(){g("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var d=!1;function m(t){g("ondata"),d=!1;var r=e.write(t);!1!==r||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==$(o.pipes,e))&&!h&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){g("onerror",t),w(),e.removeListener("error",y),0===u(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),w()}function v(){g("onfinish"),e.removeListener("close",b),w()}function w(){g("unpipe"),n.unpipe(e)}return n.on("data",m),_(e,"error",y),e.once("close",b),e.once("finish",v),e.emit("pipe",n),o.flowing||(g("pipe resume"),n.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=$(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},S.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&P(this):i.nextTick(L,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,F(this,e)),this},S.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){if(g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=t.push(i);o||(r=!0,e.pause())}}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=z}).call(this,n(8),n(2))},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1495);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";(function(t,r){var i=n(10);function o(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){L(t,e)}}e.exports=w;var a=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick,u;w.WritableState=v;var l=n(7);l.inherits=n(1);var c={deprecate:n(52)},f=n(624),h=n(4).Buffer,p=r.Uint8Array||function(){};function d(e){return h.from(e)}function m(e){return h.isBuffer(e)||e instanceof p}var g=n(625),y;function b(){}function v(e,t){u=u||n(203),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){I(t,e)},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 s(this)}function w(e){if(u=u||n(203),!(y.call(w,this)||this instanceof u))return new w(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function _(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}function k(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}function S(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n)),t}function E(e,t,n,r,i,o){if(!n){var s=S(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,a,r,i,o);return u}function x(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function A(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function I(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(A(n),t)C(e,n,r,t,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),r?a(T,e,n,o,i):T(e,n,o,i)}}function T(e,t,n,r){n||j(e,t),t.pendingcb--,r(),N(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,x(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback,h=t.objectMode?1:l.length;if(x(e,t,!1,h,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=P(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function M(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function L(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}l.inherits(w,f),v.prototype.getBuffer=function e(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!y.call(this,e)||this===w&&(e&&e._writableState instanceof v)}})):y=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(e);return o&&!h.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=b),r.ended?_(this,n):(o||k(this,r,e,n))&&(r.pendingcb++,i=E(this,r,o,e,t,n)),i},w.prototype.cork=function(){var e=this._writableState;e.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},w.prototype.setDefaultEncoding=function e(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(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||M(this,r,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(8))},function(e,t,n){(function(t){var n=function(){try{if(!t.isEncoding("latin1"))return!1;var e=t.alloc?t.alloc(4):new t(4);return e.fill("ab","ucs2"),"61006200"===e.toString("hex")}catch(e){return!1}}();function r(e){return 1===e.length&&e.charCodeAt(0)<256}function i(e,t,n,r){if(n<0||r>e.length)throw new RangeError("Out of range index");return n>>>=0,r=void 0===r?e.length:r>>>0,r>n&&e.fill(t,n,r),e}function o(e,t,n,r){if(n<0||r>e.length)throw new RangeError("Out of range index");if(r<=n)return e;n>>>=0,r=void 0===r?e.length:r>>>0;for(var i=n,o=t.length;i<=r-o;)t.copy(e,i),i+=o;return i!==r&&t.copy(e,i,0,r-i),e}function s(e,s,a,u,l){if(n)return e.fill(s,a,u,l);if("number"==typeof s)return i(e,s,a,u);if("string"==typeof s){if("string"==typeof a?(l=a,a=0,u=e.length):"string"==typeof u&&(l=u,u=e.length),void 0!==l&&"string"!=typeof l)throw new TypeError("encoding must be a string");if("latin1"===l&&(l="binary"),"string"==typeof l&&!t.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(""===s)return i(e,0,a,u);if(r(s))return i(e,s.charCodeAt(0),a,u);s=new t(s,l)}return t.isBuffer(s)?o(e,s,a,u):i(e,0,a,u)}e.exports=s}).call(this,n(0).Buffer)},function(e,t,n){(function(t){function n(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return t.allocUnsafe?t.allocUnsafe(e):new t(e)}e.exports=n}).call(this,n(0).Buffer)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1501);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(632),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){(function(t,r){var i=n(1504),o=n(255),s=n(13),a=n(130),u=n(627),l=n(279).Readable,c=n(279).Writable,f=n(16).StringDecoder,h=n(626),p=parseInt("755",8),d=parseInt("644",8),m=a(1024),g=function(){},y=function(e,t){t&=511,t&&e.push(m.slice(0,512-t))};function b(e){switch(e&i.S_IFMT){case i.S_IFBLK:return"block-device";case i.S_IFCHR:return"character-device";case i.S_IFDIR:return"directory";case i.S_IFIFO:return"fifo";case i.S_IFLNK:return"symlink"}return"file"}var v=function(e){c.call(this),this.written=0,this._to=e,this._destroyed=!1};s.inherits(v,c),v.prototype._write=function(e,t,n){if(this.written+=e.length,this._to.push(e))return n();this._to._drain=n},v.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var w=function(){c.call(this),this.linkname="",this._decoder=new f("utf-8"),this._destroyed=!1};s.inherits(w,c),w.prototype._write=function(e,t,n){this.linkname+=this._decoder.write(e),n()},w.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var _=function(){c.call(this),this._destroyed=!1};s.inherits(_,c),_.prototype._write=function(e,t,n){n(new Error("No body allowed for this entry"))},_.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var k=function(e){if(!(this instanceof k))return new k(e);l.call(this,e),this._drain=g,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};s.inherits(k,l),k.prototype.entry=function(e,n,i){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof n&&(i=n,n=null),i||(i=g);var s=this;if(e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=b(e.mode)),e.mode||(e.mode="directory"===e.type?p:d),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof n&&(n=u(n)),t.isBuffer(n))return e.size=n.length,this._encode(e),this.push(n),y(s,e.size),r.nextTick(i),new _;if("symlink"===e.type&&!e.linkname){var a=new w;return o(a,function(t){if(t)return s.destroy(),i(t);e.linkname=a.linkname,s._encode(e),i()}),a}if(this._encode(e),"file"!==e.type&&"contiguous-file"!==e.type)return r.nextTick(i),new _;var l=new v(this);return this._stream=l,o(l,function(t){return s._stream=null,t?(s.destroy(),i(t)):l.written!==e.size?(s.destroy(),i(new Error("size mismatch"))):(y(s,e.size),s._finalizing&&s.finalize(),void i())}),l}},k.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(m),this.push(null))},k.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},k.prototype._encode=function(e){if(!e.pax){var t=h.encode(e);if(t)return void this.push(t)}this._encodePax(e)},k.prototype._encodePax=function(e){var t=h.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(h.encode(n)),this.push(t),y(this,t.length),n.size=e.size,n.type=e.type,this.push(h.encode(n))},k.prototype._read=function(e){var t=this._drain;this._drain=g,t()},e.exports=k}).call(this,n(0).Buffer,n(2))},function(e,t,n){e.exports=n(1505)},function(e){e.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,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,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,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},function(e,t,n){(function(t){var r=n(20).Transform,i=n(13).inherits;function o(e){r.call(this,e),this._destroyed=!1}function s(e,t,n){n(null,e)}function a(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=s),"function"!=typeof r&&(r=null),e(t,n,r)}}i(o,r),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var n=this;t.nextTick(function(){e&&n.emit("error",e),n.emit("close")})}},e.exports=a(function(e,t,n){var r=new o(e);return r._transform=t,n&&(r._flush=n),r}),e.exports.ctor=a(function(e,t,n){function r(t){if(!(this instanceof r))return new r(t);this.options=Object.assign({},e,t),o.call(this,this.options)}return i(r,o),r.prototype._transform=t,n&&(r.prototype._flush=n),r}),e.exports.obj=a(function(e,t,n){var r=new o(Object.assign({objectMode:!0,highWaterMark:16},e));return r._transform=t,n&&(r._flush=n),r})}).call(this,n(2))},function(e,t,n){"use strict";const r=n(101),i=n(364),o=n(65),s=n(20),a=n(59);e.exports=(e=>(t,n)=>{n=n||{};const u=new s.PassThrough({objectMode:!0});try{t=r(t)}catch(e){if(!o.ipfsPath(t))return u.destroy(e)}const l={path:"get",args:t,qs:n};return e.andTransform(l,i,(e,t)=>{if(e)return u.destroy(e);a(t,u)}),u})},function(e,t,n){"use strict";const r=n(101),i=n(364),o=n(65),s=n(26),a=n(79),u=n(70);e.exports=(e=>(t,n)=>{n=n||{};const l=u.source();try{t=r(t)}catch(e){if(!o.ipfsPath(t))return l.end(e)}const c={path:"get",args:t,qs:n};return e.andTransform(c,i,(e,t)=>{if(e)return l.end(e);l.resolve(s(a.source(t),s.map(e=>{const{path:t,content:n}=e;return n?{path:t,content:a.source(n)}:e})))}),l})},function(e,t,n){"use strict";const r=n(3),i=n(65),o=n(21),s=n(101);function a(e){switch(e.Type){case 1:case 5:return"dir";case 2:return"file";default:return"unknown"}}e.exports=(e=>{const t=o(e);return r((e,n,r)=>{"function"==typeof n&&(r=n,n={});try{e=s(e)}catch(t){if(!i.ipfsPath(e))return r(t)}t({path:"ls",args:e,qs:n},(t,n)=>{if(t)return r(t);let i=n.Objects;return i?(i=i[0],i?(i=i.Links,Array.isArray(i)?(i=i.map(t=>({name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:a(t),depth:t.Depth||1})),void r(null,i)):r(new Error("expected one array in results.Objects[0].Links"))):r(new Error("expected one array in results.Objects"))):r(new Error("expected .Objects in results"))})})})},function(e){e.exports={name:"ipfs-http-client",version:"29.1.1",description:"A client library for the IPFS HTTP API",leadMaintainer:"Alan Shaw <alan@tableflip.io>",main:"src/index.js",browser:{glob:!1,fs:!1,stream:"readable-stream",http:"stream-http"},scripts:{test:"aegir test","test:node":"aegir test -t node","test:browser":"aegir test -t browser","test:webworker":"aegir test -t webworker",lint:"aegir lint",build:"aegir build",release:"aegir release ","release-minor":"aegir release --type minor ","release-major":"aegir release --type major ",coverage:"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000","dep-check":"npx dependency-check package.json './test/**/*.js' './src/**/*.js'"},dependencies:{async:"^2.6.1","bignumber.js":"^8.0.2",bl:"^2.1.2",bs58:"^4.0.1",cids:"~0.5.5","concat-stream":"^2.0.0",debug:"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2",flatmap:"0.0.3",glob:"^7.1.3","ipfs-block":"~0.8.0","ipfs-unixfs":"~0.1.16","ipld-dag-cbor":"~0.13.0","ipld-dag-pb":"~0.15.0","is-ipfs":"~0.4.7","is-pull-stream":"0.0.0","is-stream":"^1.1.0","libp2p-crypto":"~0.16.0",lodash:"^4.17.11","lru-cache":"^5.1.1",multiaddr:"^6.0.0",multibase:"~0.6.0",multihashes:"~0.4.14",ndjson:"^1.5.0",once:"^1.4.0","peer-id":"~0.12.1","peer-info":"~0.15.0","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-pushable":"^2.2.0","pull-stream-to-stream":"^1.3.4",pump:"^3.0.0",qs:"^6.5.2","readable-stream":"^3.0.6","stream-http":"^3.0.0","stream-to-pull-stream":"^1.7.2",streamifier:"~0.1.1","tar-stream":"^1.6.2",through2:"^3.0.0"},engines:{node:">=10.0.0",npm:">=3.0.0"},repository:{type:"git",url:"https://github.com/ipfs/js-ipfs-http-client"},devDependencies:{aegir:"^18.0.2","browser-process-platform":"~0.1.1",chai:"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"~0.4.18","interface-ipfs-core":"~0.96.0","ipfsd-ctl":"github:ipfs/js-ipfsd-ctl",nock:"^10.0.2","pull-stream":"^3.6.9","stream-equal":"^1.1.1"},keywords:["ipfs"],contributors:["Alan Shaw <alan.shaw@protocol.ai>","Alan Shaw <alan@tableflip.io>","Alex Mingoia <talk@alexmingoia.com>","Alex Potsides <alex@achingbrain.net>","Antonio Tenorio-Fornés <antoniotenorio@ucm.es>","Bruno Barbieri <bbarbieri@delivery.com>","Clemo <flipflopsimsommer@users.noreply.github.com>","Connor Keenan <ckeenan89@gmail.com>","Danny <dannyid@protonmail.com>","David Braun <David.Braun@Toptal.com>","David Dias <daviddias.p@gmail.com>","Diogo Silva <fsdiogo@gmail.com>","Dmitriy Ryajov <dryajov@gmail.com>","Dmitry Nikulin <dmitr-nikulin@mail.ru>","Donatas Stundys <donatas.stundys@necolt.com>","Fil <fil@rezo.net>","Filip Š <filip.stamcar@hotmail.com>","Francisco Baio Dias <xicombd@gmail.com>","Friedel Ziegelmayer <dignifiedquire@gmail.com>","Gar <gar+gh@danger.computer>","Gavin McDermott <gavinmcdermott@gmail.com>","Greenkeeper <support@greenkeeper.io>","Haad <haadcode@users.noreply.github.com>","Harlan T Wood <harlantwood@users.noreply.github.com>","Harlan T Wood <code@harlantwood.net>","Henrique Dias <hacdias@gmail.com>","Holodisc <holodiscent@gmail.com>","Hugo Dias <mail@hugodias.me>","JGAntunes <j.goncalo.antunes@gmail.com>","Jacob Heun <jacobheun@gmail.com>","James Halliday <substack@gmail.com>","Jason Carver <jacarver@linkedin.com>","Jason Papakostas <vith@users.noreply.github.com>","Jeff Downie <JeffDownie@users.noreply.github.com>","Jeromy <why@ipfs.io>","Jeromy <jeromyj@gmail.com>","Joe Turgeon <arithmetric@gmail.com>","Jonathan <jkrone@vt.edu>","Juan Batiz-Benet <juan@benet.ai>","Kevin Wang <kevin@fossa.io>","Kristoffer Ström <kristoffer@rymdkoloni.se>","Marcin Rataj <lidel@lidel.org>","Matt Bell <mappum@gmail.com>","Maxime Lathuilière <k@maxlath.eu>","Michael Muré <batolettre@gmail.com>","Mikeal Rogers <mikeal.rogers@gmail.com>","Mitar <mitar.git@tnode.com>","Mithgol <getgit@mithgol.ru>","Mohamed Abdulaziz <mohamed@mohamedabdulaziz.com>","Nuno Nogueira <nunofmn@gmail.com>","Níckolas Goline <nickolas.goline@gmail.com>","Oli Evans <oli@tableflip.io>","Orie Steele <orie@ohs.io>","Pedro Teixeira <i@pgte.me>","Pete Thomas <pete@xminusone.net>","Richard Littauer <richard.littauer@gmail.com>","Richard Schneider <makaretu@gmail.com>","Roman Khafizianov <requilence@gmail.com>","SeungWon <ksw3894@gmail.com>","Stephen Whitmore <stephen.whitmore@gmail.com>","Tara Vancil <tbvanc@gmail.com>","Travis Person <travis@protocol.ai>","Travis Person <travis.person@gmail.com>","Vasco Santos <vasco.santos@ua.pt>","Vasco Santos <vasco.santos@moxy.studio>","Victor Bjelkholm <victor@typeform.com>","Volker Mische <volker.mische@gmail.com>","Zhiyuan Lin <edsgerlin@gmail.com>","dmitriy ryajov <dryajov@dmitriys-MacBook-Pro.local>","elsehow <yes@cosmopol.is>","ethers <ethereum@outlook.com>","haad <haad@headbanggames.com>","kumavis <kumavis@users.noreply.github.com>","leekt216 <leekt216@gmail.com>","nginnever <ginneversource@gmail.com>","noah the goodra <peterpan0413@live.com>","priecint <tp-dev@seznam.cz>","samuli <samuli@nugg.ad>","shunkin <hiyoko.san.ipod@gmail.com>","victorbjelkholm <victorbjelkholm@gmail.com>","Łukasz Magiera <magik6k@users.noreply.github.com>","Łukasz Magiera <magik6k@gmail.com>"],license:"MIT",bugs:{url:"https://github.com/ipfs/js-ipfs-http-client/issues"},homepage:"https://github.com/ipfs/js-ipfs-http-client"}},function(e,t,n){"use strict";var r=n(1512),i=n(1513),o=n(635);e.exports={formats:o,parse:i,stringify:r}},function(e,t,n){"use strict";var r=n(365),i=n(635),o=Object.prototype.hasOwnProperty,s={brackets:function e(t){return t+"[]"},comma:"comma",indices:function e(t,n){return t+"["+n+"]"},repeat:function e(t){return t}},a=Array.isArray,u=Array.prototype.push,l=function(e,t){u.apply(e,a(t)?t:[t])},c=Date.prototype.toISOString,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:i.formatters[i.default],indices:!1,serializeDate:function e(t){return c.call(t)},skipNulls:!1,strictNullHandling:!1},h=function e(t,n,i,o,s,u,c,h,p,d,m,g,y){var b=t;if("function"==typeof c?b=c(n,b):b instanceof Date?b=d(b):"comma"===i&&a(b)&&(b=b.join(",")),null===b){if(o)return u&&!g?u(n,f.encoder,y):n;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||r.isBuffer(b)){if(u){var v=g?n:u(n,f.encoder,y);return[m(v)+"="+m(u(b,f.encoder,y))]}return[m(n)+"="+m(String(b))]}var w=[],_;if(void 0===b)return w;if(a(c))_=c;else{var k=Object.keys(b);_=h?k.sort(h):k}for(var S=0;S<_.length;++S){var E=_[S];s&&null===b[E]||(a(b)?l(w,e(b[E],"function"==typeof i?i(n,E):n,i,o,s,u,c,h,p,d,m,g,y)):l(w,e(b[E],n+(p?"."+E:"["+E+"]"),i,o,s,u,c,h,p,d,m,g,y)))}return w},p=function e(t){if(!t)return f;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var n=t.charset||f.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==t.format){if(!o.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var s=i.formatters[r],u=f.filter;return("function"==typeof t.filter||a(t.filter))&&(u=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:f.addQueryPrefix,allowDots:void 0===t.allowDots?f.allowDots:!!t.allowDots,charset:n,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:f.charsetSentinel,delimiter:void 0===t.delimiter?f.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:f.encode,encoder:"function"==typeof t.encoder?t.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:f.encodeValuesOnly,filter:u,formatter:s,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:f.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:f.strictNullHandling}};e.exports=function(e,t){var n=e,r=p(t),i,o;"function"==typeof r.filter?(o=r.filter,n=o("",n)):a(r.filter)&&(o=r.filter,i=o);var u=[],c;if("object"!=typeof n||null===n)return"";c=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[c];i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var d=0;d<i.length;++d){var m=i[d];r.skipNulls&&null===n[m]||l(u,h(n[m],m,f,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.formatter,r.encodeValuesOnly,r.charset))}var g=u.join(r.delimiter),y=!0===r.addQueryPrefix?"?":"";return r.charsetSentinel&&("iso-8859-1"===r.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),g.length>0?y+g:""}},function(e,t,n){"use strict";var r=n(365),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",l=function e(t,n){var l={},c=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,f=n.parameterLimit===1/0?void 0:n.parameterLimit,h=c.split(n.delimiter,f),p=-1,d,m=n.charset;if(n.charsetSentinel)for(d=0;d<h.length;++d)0===h[d].indexOf("utf8=")&&(h[d]===u?m="utf-8":h[d]===a&&(m="iso-8859-1"),p=d,d=h.length);for(d=0;d<h.length;++d)if(d!==p){var g=h[d],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1,v,w;-1===b?(v=n.decoder(g,o.decoder,m),w=n.strictNullHandling?null:""):(v=n.decoder(g.slice(0,b),o.decoder,m),w=n.decoder(g.slice(b+1),o.decoder,m)),w&&n.interpretNumericEntities&&"iso-8859-1"===m&&(w=s(w)),w&&n.comma&&w.indexOf(",")>-1&&(w=w.split(",")),i.call(l,v)?l[v]=r.combine(l[v],w):l[v]=w}return l},c=function(e,t,n){for(var r=t,i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s&&n.parseArrays)o=[].concat(r);else{o=n.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(a,10);n.parseArrays||""!==a?!isNaN(u)&&s!==a&&String(u)===a&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[],o[u]=r):o[a]=r:o={0:r}}r=o}return r},f=function e(t,n,r){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=s.exec(o),l=u?o.slice(0,u.index):o,f=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;f.push(l)}for(var h=0;null!==(u=a.exec(o))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(u[1])}return u&&f.push("["+o.slice(u.index)+"]"),c(f,n,r)}},h=function e(t){if(!t)return o;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var n=void 0===t.charset?o.charset:t.charset;return{allowDots:void 0===t.allowDots?o.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:n,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:o.comma,decoder:"function"==typeof t.decoder?t.decoder:o.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"==typeof t.depth?t.depth:o.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}};e.exports=function(e,t){var n=h(t);if(""===e||null===e||void 0===e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?l(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],c=f(u,i[u],n);o=r.merge(o,c,n)}return r.compact(o)}},function(e,t,n){t=e.exports=n(637),t.Stream=t,t.Readable=t,t.Writable=n(640),t.Duplex=n(158),t.Transform=n(641),t.PassThrough=n(1518)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1517);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(641),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r=n(636),i=n(16).StringDecoder;function o(e,t,n){if(this._last+=this._decoder.write(e),this._last.length>this.maxLength)return n(new Error("maximum buffer reached"));var r=this._last.split(this.matcher);this._last=r.pop();for(var i=0;i<r.length;i++)a(this,this.mapper(r[i]));n()}function s(e){this._last+=this._decoder.end(),this._last&&a(this,this.mapper(this._last)),e()}function a(e,t){void 0!==t&&e.push(t)}function u(e){return e}function l(e,t,n){switch(e=e||/\r?\n/,t=t||u,n=n||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!=typeof e||e instanceof RegExp||(n=e,e=/\r?\n/);break;case 2:"function"==typeof e?(n=t,t=e,e=/\r?\n/):"object"==typeof t&&(n=t,t=u)}var a=r(n,o,s);return a._readableState.objectMode=!0,a._readableState.highWaterMark&&!n.highWaterMark&&(a._readableState.highWaterMark=16),a._last="",a._decoder=new i("utf8"),a.matcher=e,a.mapper=t,a.maxLength=n.maxLength,a}e.exports=l},function(e,t,n){"use strict";(function(t){const r=n(112);function i(e,n){r(e,(e,r)=>{if(e)return n(e);if(!r||0===r.length)return n();let i;t.isBuffer(r)&&(r=r.toString());try{i=JSON.parse(r)}catch(e){return n(e)}n(null,i)})}e.exports=i}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(21),i=n(20),o=n(65),s=n(101);function a(e){switch(e.Type){case 1:case 5:return"dir";case 2:return"file";default:return"unknown"}}e.exports=(e=>{const t=r(e);return(e,n,r)=>{"function"==typeof n&&(r=n,n={});try{e=s(e)}catch(t){if(!o.ipfsPath(e))return r(t)}const u=new i.PassThrough({objectMode:!0});return t({path:"ls",args:e,qs:n},(t,n)=>{if(t)return r(t);let i=n.Objects;return i?(i=i[0],i?(i=i.Links,Array.isArray(i)?(i=i.map(t=>({depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:a(t)})),i.forEach(e=>u.write(e)),void u.end()):r(new Error("expected one array in results.Objects[0].Links"))):r(new Error("expected one array in results.Objects"))):r(new Error("expected .Objects in results"))}),u}})},function(e,t,n){"use strict";const r=n(21),i=n(26),o=n(70),s=n(65),a=n(101);function u(e){switch(e.Type){case 1:case 5:return"dir";case 2:return"file";default:return"unknown"}}e.exports=(e=>{const t=r(e);return(e,n,r)=>{"function"==typeof n&&(r=n,n={});try{e=a(e)}catch(t){if(!s.ipfsPath(e))return r(t)}const l=o.source();return t({path:"ls",args:e,qs:n},(t,n)=>{if(t)return r(t);let o=n.Objects;return o?(o=o[0],o?(o=o.Links,Array.isArray(o)?(o=o.map(t=>({depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:u(t)})),void l.resolve(i.values(o))):r(new Error("expected one array in results.Objects[0].Links"))):r(new Error("expected one array in results.Objects"))):r(new Error("expected .Objects in results"))}),l}})},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(137),o=n(9),s=n(112);e.exports=(e=>r((n,r,a)=>{let u;"function"==typeof r&&(a=r,r={});try{if(o.isCID(n))u=n,n=u.toBaseEncodedString();else if(t.isBuffer(n))u=new o(n),n=u.toBaseEncodedString();else{if("string"!=typeof n)return a(new Error("invalid argument"));u=new o(n)}}catch(e){return a(e)}const l=(e,n)=>{t.isBuffer(e)?n(null,new i(e,u)):Array.isArray(e)&&0===e.length?n(null,new i(t.alloc(0),u)):s(e,(e,r)=>{if(e)return n(e);r.length||(r=t.alloc(0)),n(null,new i(r,u))})},c={path:"block/get",args:n,qs:r};e.andTransform(c,l,a)}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(3),i=n(9),o=n(35);e.exports=(e=>r((t,n,r)=>{t&&i.isCID(t)&&(t=o.toB58String(t.multihash)),"function"==typeof n&&(r=n,n={});const s={path:"block/stat",args:t,qs:n},a=(e,t)=>{t(null,{key:e.Key,size:e.Size})};e.andTransform(s,a,r)}))},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(137),o=n(9),s=n(35),a=n(159);e.exports=(e=>{const n=a(e,"block/put");return r((e,r,a)=>{if("function"==typeof r&&(a=r,r={}),r=r||{},Array.isArray(e))return a(new Error("block.put accepts only one block"));if(t.isBuffer(e)&&(e={data:e}),!e||!e.data)return a(new Error("invalid block arg"));const u={};if(e.cid||r.cid){let t;try{t=new o(e.cid||r.cid)}catch(e){return a(e)}const{name:n,length:i}=s.decode(t.multihash);u.format=t.codec,u.mhtype=n,u.mhlen=i,u.version=t.version}else r.format&&(u.format=r.format),r.mhtype&&(u.mhtype=r.mhtype),r.mhlen&&(u.mhlen=r.mhlen),null!=r.version&&(u.version=r.version);n(e.data,{qs:u},(t,r)=>{if(t)return"dag-pb"===u.format||"dag-cbor"===u.format?(u.format="dag-pb"===u.format?"protobuf":"cbor",n(e.data,{qs:u},(t,n)=>{if(t)return a(t);a(null,new i(e.data,new o(n.Key)))})):a(t);a(null,new i(e.data,new o(r.Key)))})})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{wantlist:n(1527)(t),stat:n(1528)(t),unwant:n(1529)(t)}})},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r)=>{if("function"==typeof t?(r=t,n={},t=null):"function"==typeof n&&(r=n,n={}),t)try{n.peer=new i(t).toBaseEncodedString()}catch(e){return r(e)}e({path:"bitswap/wantlist",qs:n},r)}))},function(e,t,n){"use strict";const r=n(3),i=n(62),o=function(e,t){t(null,{provideBufLen:e.ProvideBufLen,wantlist:e.Wantlist||[],peers:e.Peers||[],blocksReceived:new i(e.BlocksReceived),dataReceived:new i(e.DataReceived),blocksSent:new i(e.BlocksSent),dataSent:new i(e.DataSent),dupBlksReceived:new i(e.DupBlksReceived),dupDataReceived:new i(e.DupDataReceived)})};e.exports=(e=>r(t=>{e.andTransform({path:"bitswap/stat"},o,t)}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={});try{t=new i(t)}catch(e){return r(e)}e({path:"bitswap/unwant",args:t.toBaseEncodedString(),qs:n},r)}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{get:n(1531)(t),put:n(1532)(t)}})},function(e,t,n){"use strict";const r=n(38),i=n(304),o=n(3),s=n(9),a=n(11),u=n(643),l={"dag-cbor":i.resolver,"dag-pb":r.resolver};e.exports=(e=>o((t,n,r,i)=>{"function"==typeof n&&(i=n,n=void 0),"function"==typeof r&&(i=r,r={}),r=r||{},n=n||"",s.isCID(t)&&(t=t.toBaseEncodedString()),a([i=>{e({path:"dag/resolve",args:t+"/"+n,qs:r},i)},(t,n)=>{u(e).get(new s(t.Cid["/"]),(e,r)=>{n(e,r,t.RemPath)})},(e,t,n)=>{const r=l[e.cid.codec];if(!r){const t=new Error('ipfs-http-client is missing DAG resolver for "'+e.cid.codec+'" multicodec');return t.missingMulticodec=e.cid.codec,void n(t)}r.resolve(e.data,t,n)}],i)}))},function(e,t,n){"use strict";const r=n(38),i=n(304),o=n(3),s=n(9),a=n(35),u=n(159);e.exports=(e=>{const t=u(e,"dag/put");return o((e,n,o)=>{if("function"==typeof n&&(o=n),n=n||{},n.hash&&(n.hashAlg=n.hash,delete n.hash),n.cid&&(n.format||n.hashAlg))return o(new Error("Can't put dag node. Please provide either `cid` OR `format` and `hash` options."));if(n.format&&!n.hashAlg||!n.format&&n.hashAlg)return o(new Error("Can't put dag node. Please provide `format` AND `hash` options."));if(n.cid){let e;try{e=new s(n.cid)}catch(e){return o(e)}n.format=e.codec,n.hashAlg=a.decode(e.multihash).name,delete n.cid}const u={format:"dag-cbor",hashAlg:"sha2-256",inputEnc:"raw"};function l(e,r){if(e)return o(e);const i={qs:{hash:n.hashAlg,format:n.format,"input-enc":n.inputEnc}};t(r,i,(e,t)=>e?o(e):t.Cid?o(null,new s(t.Cid["/"])):o(t))}n=Object.assign(u,n),"dag-cbor"===n.format?i.util.serialize(e,l):"dag-pb"===n.format?r.util.serialize(e,l):l(null,e)})})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{get:n(1534)(t),put:n(1537)(t),data:n(1538)(t),links:n(1539)(t),stat:n(1540)(t),new:n(1541)(t),patch:{addLink:n(1542)(t),rmLink:n(1543)(t),setData:n(1544)(t),appendData:n(1545)(t)}}})},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(38),o=i.DAGNode,s=i.DAGLink,a=n(9),u=n(367),l={max:128},c=new u(l);e.exports=(e=>r((n,r,i)=>{let u;"function"==typeof r&&(i=r,r={}),r||(r={});try{n=new a(n),u=n.toBaseEncodedString()}catch(e){return i(e)}const l=c.get(u);if(l)return i(null,l);e({path:"object/get",args:u,qs:{"data-encoding":"base64"}},(e,n)=>{if(e)return i(e);n.Data=t.from(n.Data,"base64");const r=n.Links.map(e=>new s(e.Name,e.Size,e.Hash));o.create(n.Data,r,(e,t)=>{if(e)return i(e);c.set(u,t),i(null,t)})})}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,r){if(!(this instanceof s))return new s(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=s,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(1536)(r)}catch(e){}},function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(9),{DAGNode:o}=n(38),s=n(159),a=n(28);e.exports=(e=>{const n=s(e,"object/put");return r((e,r,s)=>{"function"==typeof r&&(s=r,r={});const u=a(s);r||(r={});let l={Data:null,Links:[]},c;if(t.isBuffer(e))r.enc||(l={Data:e.toString(),Links:[]});else if(o.isDAGNode(e))l={Data:e.data.toString(),Links:e.links.map(e=>{const t=e.toJSON();return t.hash=t.cid,t})};else{if("object"!=typeof e)return u(new Error("obj not recognized"));l.Data=e.Data.toString(),l.Links=e.Links}c=t.isBuffer(e)&&r.enc?e:t.from(JSON.stringify(l));const f=r.enc||"json",h={qs:{inputenc:f}};n(c,h,(e,t)=>{if(e)return u(e);u(null,new i(t.Hash))})})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(3),i=n(112),o=n(9),s=n(367),a={max:128},u=new s(a);e.exports=(e=>r((t,n,r)=>{let s;"function"==typeof n&&(r=n,n={}),n||(n={});try{t=new o(t),s=t.toBaseEncodedString()}catch(e){return r(e)}const a=u.get(s);if(a)return r(null,a.data);e({path:"object/data",args:s},(e,t)=>{if(e)return r(e);"function"==typeof t.pipe?i(t,r):r(null,t)})}))},function(e,t,n){"use strict";const r=n(3),i=n(38),o=i.DAGLink,s=n(9),a=n(367),u={max:128},l=new a(u);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n||(n={});try{t=new s(t)}catch(e){return r(e)}const i=l.get(t.toString());if(i)return r(null,i.links);e({path:"object/links",args:t.toString()},(e,t)=>{if(e)return r(e);let n=[];t.Links&&(n=t.Links.map(e=>new o(e.Name,e.Size,e.Hash))),r(null,n)})}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n||(n={});try{t=new i(t)}catch(e){return r(e)}e({path:"object/stat",args:t.toString()},r)}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t=void 0),e({path:"object/new",args:t},(e,t)=>{if(e)return n(e);n(null,new i(t.Hash))})}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r,o)=>{"function"==typeof r&&(o=r,r={}),r||(r={});try{t=new i(t)}catch(e){return o(e)}e({path:"object/patch/add-link",args:[t.toString(),n.name,n.cid.toString()]},(e,t)=>{if(e)return o(e);o(null,new i(t.Hash))})}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r,o)=>{"function"==typeof r&&(o=r,r={}),r||(r={});try{t=new i(t)}catch(e){return o(e)}e({path:"object/patch/rm-link",args:[t.toString(),n.name]},(e,t)=>{if(e)return o(e);o(null,new i(t.Hash))})}))},function(e,t,n){"use strict";const r=n(3),i=n(28),o=n(9),s=n(159);e.exports=(e=>{const t=s(e,"object/patch/set-data");return r((e,n,r,s)=>{"function"==typeof r&&(s=r,r={});const a=i(s);r||(r={});try{e=new o(e)}catch(e){return a(e)}t(n,{args:[e.toString()]},(e,t)=>{if(e)return a(e);a(null,new o(t.Hash))})})})},function(e,t,n){"use strict";const r=n(3),i=n(28),o=n(9),s=n(159);e.exports=(e=>{const t=s(e,"object/patch/append-data");return r((e,n,r,s)=>{"function"==typeof r&&(s=r,r={});const a=i(s);r||(r={});try{e=new o(e)}catch(e){return a(e)}t(n,{args:[e.toString()]},(e,t)=>{if(e)return a(e);a(null,new o(t.Hash))})})})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{add:n(1547)(t),rm:n(1548)(t),ls:n(1549)(t)}})},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n=null),e({path:"pin/add",args:t,qs:n},(e,t)=>{if(e)return r(e);r(null,t.Pins.map(e=>({hash:e})))})}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n=null),e({path:"pin/rm",args:t,qs:n},(e,t)=>{if(e)return r(e);r(null,t.Pins.map(e=>({hash:e})))})}))},function(e,t,n){"use strict";const r=n(3),i=n(132);e.exports=(e=>r((t,n,r)=>{"function"==typeof t&&(r=t,n=null,t=null),"function"==typeof n&&(r=n,n=null),t&&t.type&&(n=t,t=null),e({path:"pin/ls",args:t,qs:n},(e,t)=>{if(e)return r(e);r(null,i(t.Keys).map(e=>({hash:e,type:t.Keys[e].Type})))})}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{add:n(1551)(t),rm:n(1552)(t),list:n(1553)(t)}})},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),t&&"object"==typeof t&&(n=t,t=void 0),e({path:"bootstrap/add",args:t,qs:n},r)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),t&&"object"==typeof t&&(n=t,t=void 0),e({path:"bootstrap/rm",args:t,qs:n},r)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"bootstrap/list",qs:t},n)}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{get:n(1555)(t),put:n(1556)(t),findProvs:n(1557)(t),findPeer:n(1558)(t),provide:n(1559)(t),query:n(1560)(t)}})},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{function i(e,t,n){if(t)return e(t);if(!n)return e(new Error("empty response"));if(0===n.length)return e(new Error("no value returned for key"));if(Array.isArray(n)&&(n=n[0]),5===n.Type)e(null,n.Extra);else{let t=new Error("key was not found (type 6)");e(t)}}"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),e({path:"dht/get",args:t,qs:n},i.bind(null,r))}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r,i)=>{"function"!=typeof r||i||(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),e({path:"dht/put",args:[t,n],qs:r},i)}))},function(e,t,n){"use strict";const r=n(3),i=n(368),o=n(24),s=n(23),a=n(44),u=n(22);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={});const l=(e,t)=>{if(Array.isArray(e)&&(e=e[0]),4!==e.Type){const e="key was not found (type 4)";return t(u(new Error(e),"ERR_KEY_TYPE_4_NOT_FOUND"))}const n=e.Responses.map(e=>{const t=new a(s.createFromB58String(e.ID));return e.Addrs.forEach(e=>{const n=o(e);t.multiaddrs.add(n)}),t});t(null,n)};e({path:"dht/findprovs",args:t,qs:n},(e,t)=>{if(e)return r(e);i(t,l,r)})}))},function(e,t,n){"use strict";const r=n(3),i=n(368),o=n(24),s=n(23),a=n(44),u=n(22);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={});const l=(e,t)=>{if(Array.isArray(e)&&(e=e[0]),2!==e.Type){const e="key was not found (type 2)";return t(u(new Error(e),"ERR_KEY_TYPE_2_NOT_FOUND"))}const n=e.Responses[0],r=new a(s.createFromB58String(n.ID));n.Addrs.forEach(e=>{const t=o(e);r.multiaddrs.add(t)}),t(null,r)};e({path:"dht/findpeer",args:t,qs:n},(e,t)=>{if(e)return r(e);i(t,l,r)})}))},function(e,t,n){"use strict";const r=n(3),i=n(9);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),Array.isArray(t)||(t=[t]);try{t=t.map(e=>new i(e).toBaseEncodedString("base58btc"))}catch(e){return r(e)}e({path:"dht/provide",args:t,qs:n},r)}))},function(e,t,n){"use strict";const r=n(3),i=n(368),o=n(23),s=n(44);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={});const a=(e,t)=>{const n=e.map(e=>new s(o.createFromB58String(e.ID)));t(null,n)};e({path:"dht/query",args:t,qs:n},(e,t)=>{if(e)return r(e);i(t,a,r)})}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{publish:n(1562)(t),resolve:n(1563)(t),pubsub:n(1564)(t)}})},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{name:e.Name,value:e.Value})};e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e.andTransform({path:"name/publish",args:t,qs:n},i,r)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,e.Path)};e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e.andTransform({path:"name/resolve",args:t,qs:n},i,r)}))},function(e,t,n){"use strict";e.exports=(e=>({cancel:n(1565)(e),state:n(1566)(e),subs:n(1567)(e)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{canceled:void 0===e.Canceled||!0===e.Canceled})};e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e.andTransform({path:"name/pubsub/cancel",args:t,qs:n},i,r)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{enabled:e.Enabled})};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"name/pubsub/state",qs:t},i,n)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,e.Strings||[])};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"name/pubsub/subs",qs:t},i,n)}))},function(e,t,n){"use strict";const r=n(3),i=n(59),o=n(20).Writable,s=n(21),a=n(369);e.exports=(e=>{const t=s(e);return r((e,n,r)=>{if("function"==typeof n&&(r=n,n={}),n.n&&n.count)return r(new Error("Use either n or count, not both"));n.n||n.count||(n.n=1);const s={path:"ping",args:e,qs:n},u=(e,t)=>{const n=new a,r=[];i(e,n,new o({objectMode:!0,write(e,t,n){r.push(e),n()}}),e=>{if(e)return t(e);t(null,r)})};t.andTransform(s,u,r)})})},function(e,t,n){"use strict";function r(e){return e&&"boolean"==typeof e.Success}e.exports=function e(t){if(!r(t))throw new Error("Invalid ping message received");return{success:t.Success,time:t.Time,text:t.Text}}},function(e,t,n){"use strict";const r=n(59),i=n(21),o=n(369);e.exports=(e=>{const t=i(e);return(e,n={})=>{n.n||n.count||(n.n=1);const i={path:"ping",args:e,qs:n},s=new o;return t(i,(e,t)=>{if(e)return s.emit("error",e);r(t,s)}),s}})},function(e,t,n){"use strict";const r=n(79),i=n(70),o=n(59),s=n(21),a=n(369);e.exports=(e=>{const t=s(e);return(e,n={})=>{n.n||n.count||(n.n=1);const s={path:"ping",args:e,qs:n},u=i.source(),l=new a;return t(s,(e,t)=>{if(e)return u.abort(e);o(t,l),u.resolve(r.source(l))}),u}})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{peers:n(1573)(t),connect:n(1574)(t),disconnect:n(1575)(t),addrs:n(1576)(t),localAddrs:n(1577)(t)}})},function(e,t,n){"use strict";const r=n(3),i=n(24),o=n(23);function s(e,t){return Array.isArray(t.Strings)?t.Strings.map(a.bind(null,e)):Array.isArray(t.Peers)?t.Peers.map(u.bind(null,e)):[]}function a(e,t){const n={};try{if(e){const e=t.split(" ");n.addr=i(e[0]),n.latency=e[1]}else n.addr=i(t);n.peer=o.createFromB58String(n.addr.getPeerId())}catch(e){n.error=e,n.rawPeerInfo=t}return n}function u(e,t){const n={};try{n.addr=i(t.Addr),n.peer=o.createFromB58String(t.Peer),n.muxer=t.Muxer}catch(e){n.error=e,n.rawPeerInfo=t}return t.Latency&&(n.latency=t.Latency),t.Streams&&(n.streams=t.Streams),n}e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={});const r=t.v||t.verbose;e({path:"swarm/peers",qs:t},(e,t)=>{if(e)return n(e);const i=s(r,t);n(null,i)})}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e({path:"swarm/connect",args:t,qs:n},r)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e({path:"swarm/disconnect",args:t,qs:n},r)}))},function(e,t,n){"use strict";const r=n(3),i=n(44),o=n(23),s=n(24);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"swarm/addrs",qs:t},(e,t)=>{if(e)return n(e);const r=Object.keys(t.Addrs).map(e=>{const n=new i(o.createFromB58String(e));return t.Addrs[e].forEach(e=>{n.multiaddrs.add(s(e))}),n});n(null,r)})}))},function(e,t,n){"use strict";const r=n(3),i=n(24);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"swarm/addrs/local",qs:t},(e,t)=>{if(e)return n(e);n(null,t.Strings.map(e=>i(e)))})}))},function(e,t,n){"use strict";(function(t){const r=n(3),i=n(6),o=n(255),s=n(201),a=n(14),u=n(1579),l=n(1581),c=n(21),f=()=>new Error("pubsub is currently not supported when run in the browser");e.exports=(e=>{const n=c(e),h=new i,p={};return h.id=Math.random(),{subscribe:(e,t,n,r)=>{const i={discover:!1};return"function"==typeof n&&(r=n,n=i),n||(n=i),s?r?void d(e,t,n,r):new Promise((r,i)=>{d(e,t,n,e=>{if(e)return i(e);r()})}):r?a(()=>r(f())):Promise.reject(f())},unsubscribe:(e,t,n)=>{if(!s)return n?a(()=>n(f())):Promise.reject(f());if(0===h.listenerCount(e)||!p[e]){const t=new Error(`Not subscribed to '${e}'`);return n?a(()=>n(t)):Promise.reject(t)}return h.removeListener(e,t),0===h.listenerCount(e)?n?(o(p[e].res,e=>{setTimeout(()=>n(e))}),p[e].req.abort(),void(p[e]=null)):new Promise((t,n)=>{o(p[e].res,e=>{setTimeout(()=>{if(e)return n(e);t()})}),p[e].req.abort(),p[e]=null}):n?void a(()=>n()):Promise.resolve()},publish:r((e,r,i)=>{if(!s)return i(f());if(!t.isBuffer(r))return i(new Error("data must be a Buffer"));const o={path:"pubsub/pub",args:[e,r]};n(o,i)}),ls:r(e=>{if(!s)return e(f());const t={path:"pubsub/ls"};n.andTransform(t,l,e)}),peers:r((e,t)=>{if(!s)return t(f());const r={path:"pubsub/peers",args:[e]};n.andTransform(r,l,t)}),setMaxListeners:e=>h.setMaxListeners(e)};function d(e,t,r,i){if(h.on(e,t),p[e])return i();const s={path:"pubsub/sub",args:[e],qs:{discover:r.discover}};p[e]={},p[e].req=n.andTransform(s,u.from,(n,r)=>{if(n)return p[e]=null,h.removeListener(e,t),i(n);p[e].res=r,r.on("data",t=>{h.emit(e,t)}),r.on("error",e=>{h.emit("error",e)}),o(r,n=>{n&&h.emit("error",n),p[e]=null,h.removeListener(e,t)}),i()})}})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(20).Transform,i=n(1580);class o extends r{constructor(e){const t=Object.assign(e||{},{objectMode:!0});super(t)}static from(e,t){let n=e.pipe(new o);e.on("end",()=>n.emit("end")),t(null,n)}_transform(e,t,n){if(0===Object.keys(e).length)return n();try{const t=i.deserialize(e,"base64");this.push(t),n()}catch(e){return n(e)}}}e.exports=o},function(e,t,n){"use strict";(function(t){const r=n(76);function i(e){const t=JSON.parse(e);return o(t)}function o(e){if(!s(e))throw new Error("Not a pubsub message");return{from:r.encode(t.from(e.from,"base64")).toString(),seqno:t.from(e.seqno,"base64"),data:t.from(e.data,"base64"),topicIDs:e.topicIDs||e.topicCIDs}}function s(e){return e&&e.from&&e.seqno&&e.data&&(e.topicIDs||e.topicCIDs)}e.exports={deserialize(e,t){if(t=t?t.toLowerCase():"json","json"===t)return i(e);if("base64"===t)return o(e);throw new Error(`Unsupported encoding: '${t}'`)}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";function r(e,t){t(null,e.Strings||[])}e.exports=r},function(e,t,n){"use strict";const r=n(3),i=n(21),o=function(e,t){t(null,e.Path)};e.exports=(e=>{const t=i(e);return r((e,n,r)=>{"function"==typeof n&&(r=n,n={}),t.andTransform({path:"dns",args:e,qs:n},o,r)})})},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return r(e=>{t({path:"commands"},e)})})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{get:n(1585)(t),set:n(1586)(t),replace:n(1587)(t)}})},function(e,t,n){"use strict";(function(t){const r=n(3),i=function(e,n){t.isBuffer(e)?n(null,JSON.parse(e.toString())):n(null,e)};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t=void 0),t?e.andTransform({path:"config",args:t,buffer:!0},i,(e,t)=>{if(e)return n(e);n(null,t.Value)}):e.andTransform({path:"config/show",buffer:!0},i,n)}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(3);e.exports=(e=>r((n,r,i,o)=>("function"==typeof i&&(o=i,i={}),"string"!=typeof n?o(new Error("Invalid key type")):void 0===r||t.isBuffer(r)?o(new Error("Invalid value type")):("object"==typeof r&&(r=JSON.stringify(r),i={json:!0}),"boolean"==typeof r&&(r=r.toString(),i={bool:!0}),void e({path:"config",args:[n,r],qs:i,files:void 0,buffer:!0},o)))))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){const r=n(1588),i=n(3),o=n(159);e.exports=(e=>{const n=o(e,"config/replace");return i((e,i)=>{"object"==typeof e&&(e=r.createReadStream(t.from(JSON.stringify(e)))),n(e,{},i)})})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(13),i=n(57);e.exports.createReadStream=function(e,t){return new o(e,t)};var o=function(e,n){e instanceof t||"string"==typeof e?(n=n||{},i.Readable.call(this,{highWaterMark:n.highWaterMark,encoding:n.encoding})):i.Readable.call(this,{objectMode:!0}),this._object=e};r.inherits(o,i.Readable),o.prototype._read=function(){this.push(this._object),this._object=null}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{net:n(1590)(t),sys:n(1591)(t),cmds:n(1592)(t)}})},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"diag/net",qs:t},n)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"diag/sys",qs:t},n)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"diag/cmds",qs:t},n)}))},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return r((e,n)=>{"function"==typeof e&&(n=e,e=void 0),t({path:"id",args:e},(e,t)=>{if(e)return n(e);const r={id:t.ID,publicKey:t.PublicKey,addresses:t.Addresses,agentVersion:t.AgentVersion,protocolVersion:t.ProtocolVersion};n(null,r)})})})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{gen:n(1595)(t),list:n(1596)(t),rename:n(1597)(t),rm:n(1598)(t),export:n(1599)(t),import:n(1600)(t)}})},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{id:e.Id,name:e.Name})};e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e.andTransform({path:"key/gen",args:t,qs:n},i,r)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,e.Keys.map(e=>({id:e.Id,name:e.Name})))};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"key/list",qs:t},i,n)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{id:e.Id,was:e.Was,now:e.Now,overwrite:e.Overwrite})};e.exports=(e=>r((t,n,r)=>{e.andTransform({path:"key/rename",args:[t,n]},i,r)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{id:e.Keys[0].Id,name:e.Keys[0].Name})};e.exports=(e=>r((t,n)=>{e.andTransform({path:"key/rm",args:t},i,n)}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{e({path:"key/export",args:t,qs:{password:n}},(e,t)=>{if(e)return r(e);r(null,t.toString())})}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,{id:e.Id,name:e.Name})};e.exports=(e=>r((t,n,r,o)=>{e.andTransform({path:"key/import",args:t,qs:{pem:n,password:r}},i,o)}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{tail:n(1602)(t),ls:n(1603)(t),level:n(1604)(t)}})},function(e,t,n){"use strict";const r=n(3),i=n(59),o=n(366);e.exports=(e=>r(t=>e({path:"log/tail"},(e,n)=>{if(e)return t(e);const r=o.parse();i(n,r),t(null,r)})))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r(t=>{e({path:"log/ls"},(e,n)=>{if(e)return t(e);t(null,n.Strings)})}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r,i)=>("function"==typeof r&&(i=r,r={}),"string"!=typeof t?i(new Error("Invalid subsystem type")):"string"!=typeof n?i(new Error("Invalid level type")):void e({path:"log/level",args:[t,n],qs:r,files:void 0,buffer:!0},i))))},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return r((e,n,r)=>{"function"==typeof e?(r=e,e=null):"function"==typeof n&&(r=n,n=null);const i={};e&&(i.f=e),n&&(i.n=n),t({path:"mount",qs:i},r)})})},function(e,t,n){"use strict";const r=n(3),i=n(112),o=n(21);e.exports=(e=>{const t=o(e),n=r((e,n,r)=>{"function"==typeof n&&(r=n,n={});const o={path:"refs",args:e,qs:n};t.andTransform(o,i,r)});return n.local=r((e,n)=>{"function"==typeof e&&(n=e,e={});const r={path:"refs/local",qs:e};t.andTransform(r,i,n)}),n})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{gc:n(1608)(t),stat:n(1609)(t),version:n(1610)(t)}})},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e({path:"repo/gc",qs:t},n)}))},function(e,t,n){"use strict";const r=n(3),i=n(62),o=function(e,t){t(null,{numObjects:new i(e.NumObjects),repoSize:new i(e.RepoSize),repoPath:e.RepoPath,version:e.Version,storageMax:new i(e.StorageMax)})};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"repo/stat",qs:t},o,n)}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){t(null,e.Version)};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"repo/version",qs:t},i,n)}))},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return r(e=>{t({path:"shutdown"},e)})})},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{bitswap:n(1613)(t),bw:n(1614)(t),bwReadableStream:n(1615)(t),bwPullStream:n(1616)(t),repo:n(1617)(t)}})},function(e,t,n){"use strict";const r=n(3),i=n(62),o=function(e,t){t(null,{provideBufLen:e.ProvideBufLen,wantlist:e.Wantlist||[],peers:e.Peers||[],blocksReceived:new i(e.BlocksReceived),dataReceived:new i(e.DataReceived),blocksSent:new i(e.BlocksSent),dataSent:new i(e.DataSent),dupBlksReceived:new i(e.DupBlksReceived),dupDataReceived:new i(e.DupDataReceived)})};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"stats/bitswap",qs:t},o,n)}))},function(e,t,n){"use strict";const r=n(3),i=n(112),o=n(370),s=(e,t)=>i(e,(e,n)=>{if(e)return t(e);t(null,o(n[0]))});e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"stats/bw",qs:t},s,n)}))},function(e,t,n){"use strict";const r=n(20),i=n(59),o=n(370);e.exports=(e=>t=>{t=t||{};const n=new r.Transform({objectMode:!0,transform(e,t,n){n(null,o(e))}});return e({path:"stats/bw",qs:t},(e,t)=>{if(e)return n.destroy(e);i(t,n)}),n})},function(e,t,n){"use strict";const r=n(79),i=n(26),o=n(370),s=n(70);e.exports=(e=>t=>{t=t||{};const n=s.source();return e({path:"stats/bw",qs:t},(e,t)=>{if(e)return n.end(e);n.resolve(i(r.source(t),i.map(o)))}),n})},function(e,t,n){"use strict";const r=n(3),i=n(62),o=function(e,t){t(null,{numObjects:new i(e.NumObjects),repoSize:new i(e.RepoSize),repoPath:e.RepoPath,version:e.Version,storageMax:new i(e.StorageMax)})};e.exports=(e=>r((t,n)=>{"function"==typeof t&&(n=t,t={}),e.andTransform({path:"stats/repo",qs:t},o,n)}))},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return{apply:r((e,n)=>{"function"==typeof e&&(n=e,e={}),t({path:"update",qs:e},n)}),check:r((e,n)=>{"function"==typeof e&&(n=e,e={}),t({path:"update/check",qs:e},n)}),log:r((e,n)=>{"function"==typeof e&&(n=e,e={}),t({path:"update/log",qs:e},n)})}})},function(e,t,n){"use strict";const r=n(3),i=n(21);e.exports=(e=>{const t=i(e);return r((e,n)=>{"function"==typeof e&&(n=e,e={}),t({path:"version",qs:e},(e,t)=>{if(e)return n(e);const r={version:t.Version,commit:t.Commit,repo:t.Repo};n(null,r)})})})},function(e,t,n){"use strict";(function(t){const r=n(9),i=n(24),o=n(88),s=n(35),a=n(23),u=n(44);e.exports=(()=>({Buffer:t,CID:r,multiaddr:i,multibase:o,multihash:s,PeerId:a,PeerInfo:u}))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(3),i=n(88),o=n(9);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n=n||{},n.cidBase&&(n["cid-base"]=n.cidBase,delete n.cidBase);const s=(e,t)=>{if(!n["cid-base"])return t(null,e.Path);const r=e.Path.split("/");if(i.isEncoded(r[2])!==n["cid-base"])try{let i=new o(r[2]);0===i.version&&"base58btc"!==n["cid-base"]&&(i=i.toV1()),r[2]=i.toBaseEncodedString(n["cid-base"]),e.Path=r.join("/")}catch(e){return t(e)}t(null,e.Path)};e.andTransform({path:"resolve",args:t,qs:n},s,r)}))},function(e,t,n){"use strict";const r=n(21);e.exports=(e=>{const t=r(e);return{cp:n(1623)(t),mkdir:n(1624)(t),flush:n(1625)(t),stat:n(1626)(t),rm:n(1679)(t),ls:n(1680)(t),lsReadableStream:n(650)(t),lsPullStream:n(1681)(t),read:n(1682)(t),readReadableStream:n(1683)(t),readPullStream:n(1684)(t),write:n(1685)(t),mv:n(1686)(t)}})},function(e,t,n){"use strict";const r=n(3),i=n(644);e.exports=(e=>r(function(){const{callback:t,sources:n,opts:r}=i(Array.prototype.slice.call(arguments));e({path:"files/cp",args:n,qs:r},e=>t(e))}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e({path:"files/mkdir",args:t,qs:n},e=>r(e))}))},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n)=>("function"==typeof t&&(n=t,t="/"),e({path:"files/flush",args:t},e=>n(e)))))},function(e,t,n){"use strict";const r=n(3),i=n(1627),o=n(1669),s=function(e,t){t(null,{type:e.Type,blocks:e.Blocks,size:e.Size,hash:e.Hash,cumulativeSize:e.CumulativeSize,withLocality:e.WithLocality||!1,local:e.Local||void 0,sizeLocal:e.SizeLocal||void 0})};e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),n=i(n,(e,t)=>o(t)),e.andTransform({path:"files/stat",args:t,qs:n},s,r)}))},function(e,t,n){var r=n(1628),i=n(1630),o=n(1633);function s(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}e.exports=s},function(e,t,n){var r=n(1629);function i(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}e.exports=i},function(e,t,n){var r=n(121),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(1631),i=n(132);function o(e,t){return e&&r(e,t,i)}e.exports=o},function(e,t,n){var r=n(1632),i=r();e.exports=i},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}e.exports=n},function(e,t,n){var r=n(1634),i=n(1663),o=n(240),s=n(68),a=n(1667);function u(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}e.exports=u},function(e,t,n){var r=n(1635),i=n(1662),o=n(649);function s(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}e.exports=s},function(e,t,n){var r=n(645),i=n(646),o=1,s=2;function a(e,t,n,a){var u=n.length,l=u,c=!a;if(null==e)return!l;for(e=Object(e);u--;){var f=n[u];if(c&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<l;){f=n[u];var h=f[0],p=e[h],d=f[1];if(c&&f[2]){if(void 0===p&&!(h in e))return!1}else{var m=new r;if(a)var g=a(p,d,h,e,t,m);if(!(void 0===g?i(d,p,o|s,a,m):g))return!1}}return!0}e.exports=a},function(e,t,n){var r=n(246);function i(){this.__data__=new r,this.size=0}e.exports=i},function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){var r=n(246),i=n(325),o=n(324),s=200;function a(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<s-1)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}e.exports=a},function(e,t,n){var r=n(645),i=n(647),o=n(1647),s=n(1651),a=n(1657),u=n(68),l=n(390),c=n(392),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function y(e,t,n,m,y,b){var v=u(e),w=u(t),_=v?p:a(e),k=w?p:a(t);_=_==h?d:_,k=k==h?d:k;var S=_==d,E=k==d,x=_==k;if(x&&l(e)){if(!l(t))return!1;v=!0,S=!1}if(x&&!S)return b||(b=new r),v||c(e)?i(e,t,n,m,y,b):o(e,t,_,n,m,y,b);if(!(n&f)){var C=S&&g.call(e,"__wrapped__"),A=E&&g.call(t,"__wrapped__");if(C||A){var I=C?e.value():e,T=A?t.value():t;return b||(b=new r),y(I,T,n,m,b)}}return!!x&&(b||(b=new r),s(e,t,n,m,y,b))}e.exports=y},function(e,t,n){var r=n(324),i=n(1643),o=n(1644);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},function(e,t){var n="__lodash_hash_undefined__";function r(e){return this.__data__.set(e,n),this}e.exports=r},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){var r=n(173),i=n(1648),o=n(496),s=n(647),a=n(1649),u=n(1650),l=1,c=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",m="[object Number]",g="[object RegExp]",y="[object Set]",b="[object String]",v="[object Symbol]",w="[object ArrayBuffer]",_="[object DataView]",k=r?r.prototype:void 0,S=k?k.valueOf:void 0;function E(e,t,n,r,k,E,x){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!E(new i(e),new i(t)));case f:case h:case m:return o(+e,+t);case p:return e.name==t.name&&e.message==t.message;case g:case b:return e==t+"";case d:var C=a;case y:var A=r&l;if(C||(C=u),e.size!=t.size&&!A)return!1;var I=x.get(e);if(I)return I==t;r|=c,x.set(e,t);var T=s(C(e),C(t),r,k,E,x);return x.delete(e),T;case v:if(S)return S.call(e)==S.call(t)}return!1}e.exports=E},function(e,t,n){var r=n(98),i=r.Uint8Array;e.exports=i},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){var r=n(1652),i=1,o=Object.prototype,s=o.hasOwnProperty;function a(e,t,n,o,a,u){var l=n&i,c=r(e),f=c.length,h=r(t),p=h.length;if(f!=p&&!l)return!1;for(var d=f;d--;){var m=c[d];if(!(l?m in t:s.call(t,m)))return!1}var g=u.get(e);if(g&&u.get(t))return g==t;var y=!0;u.set(e,t),u.set(t,e);for(var b=l;++d<f;){m=c[d];var v=e[m],w=t[m];if(o)var _=l?o(w,v,m,t,e,u):o(v,w,m,e,t,u);if(!(void 0===_?v===w||a(v,w,n,o,u):_)){y=!1;break}b||(b="constructor"==m)}if(y&&!b){var k=e.constructor,S=t.constructor;k!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof k&&k instanceof k&&"function"==typeof S&&S instanceof S)&&(y=!1)}return u.delete(e),u.delete(t),y}e.exports=a},function(e,t,n){var r=n(1653),i=n(1654),o=n(132);function s(e){return r(e,o,i)}e.exports=s},function(e,t,n){var r=n(547),i=n(68);function o(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}e.exports=o},function(e,t,n){var r=n(1655),i=n(1656),o=Object.prototype,s=o.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return s.call(e,t)}))}:i;e.exports=u},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}e.exports=n},function(e,t){function n(){return[]}e.exports=n},function(e,t,n){var r=n(1658),i=n(325),o=n(1659),s=n(1660),a=n(1661),u=n(131),l=n(495),c="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",d="[object WeakMap]",m="[object DataView]",g=l(r),y=l(i),b=l(o),v=l(s),w=l(a),_=u;(r&&_(new r(new ArrayBuffer(1)))!=m||i&&_(new i)!=c||o&&_(o.resolve())!=h||s&&_(new s)!=p||a&&_(new a)!=d)&&(_=function(e){var t=u(e),n=t==f?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return m;case y:return c;case b:return h;case v:return p;case w:return d}return t}),e.exports=_},function(e,t,n){var r=n(121),i=n(98),o=r(i,"DataView");e.exports=o},function(e,t,n){var r=n(121),i=n(98),o=r(i,"Promise");e.exports=o},function(e,t,n){var r=n(121),i=n(98),o=r(i,"Set");e.exports=o},function(e,t,n){var r=n(121),i=n(98),o=r(i,"WeakMap");e.exports=o},function(e,t,n){var r=n(648),i=n(132);function o(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}e.exports=o},function(e,t,n){var r=n(646),i=n(244),o=n(1664),s=n(322),a=n(648),u=n(649),l=n(249),c=1,f=2;function h(e,t){return s(e)&&a(t)?u(l(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,c|f)}}e.exports=h},function(e,t,n){var r=n(1665),i=n(1666);function o(e,t){return null!=e&&i(e,t,r)}e.exports=o},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){var r=n(494),i=n(293),o=n(68),s=n(391),a=n(290),u=n(249);function l(e,t,n){t=r(t,e);for(var l=-1,c=t.length,f=!1;++l<c;){var h=u(t[l]);if(!(f=null!=e&&n(e,h)))break;e=e[h]}return f||++l!=c?f:(c=null==e?0:e.length,!!c&&a(c)&&s(h,c)&&(o(e)||i(e)))}e.exports=l},function(e,t,n){var r=n(420),i=n(1668),o=n(322),s=n(249);function a(e){return o(e)?r(s(e)):i(e)}e.exports=a},function(e,t,n){var r=n(493);function i(e){return function(t){return r(t,e)}}e.exports=i},function(e,t,n){var r=n(1670),i=r(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});e.exports=i},function(e,t,n){var r=n(1671),i=n(1672),o=n(1675),s="[']",a=RegExp("[']","g");function u(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}e.exports=u},function(e,t){function n(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}e.exports=n},function(e,t,n){var r=n(1673),i=n(326),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",l="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",c="["+l+"]",f=RegExp(c,"g");function h(e){return e=i(e),e&&e.replace(o,r).replace(f,"")}e.exports=h},function(e,t,n){var r=n(1674),i={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},o=r(i);e.exports=o},function(e,t){function n(e){return function(t){return null==e?void 0:e[t]}}e.exports=n},function(e,t,n){var r=n(1676),i=n(1677),o=n(326),s=n(1678);function a(e,t,n){return e=o(e),t=n?void 0:t,void 0===t?i(e)?s(e):r(e):e.match(t)||[]}e.exports=a},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r(e){return e.match(n)||[]}e.exports=r},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function r(e){return n.test(e)}e.exports=r},function(e,t){var n="\\ud800-\\udfff",r="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",s="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",a="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",m=l+c+"\\u2000-\\u206f"+h,g="[']",y="["+m+"]",b="["+s+"]",v="\\d+",w="[\\u2700-\\u27bf]",_="["+u+"]",k="[^"+n+m+v+a+u+p+"]",S="\\ud83c[\\udffb-\\udfff]",E="(?:"+b+"|"+S+")",x="[^\\ud800-\\udfff]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+p+"]",T="\\u200d",j="(?:"+_+"|"+k+")",O="(?:"+I+"|"+k+")",P="(?:['](?:d|ll|m|re|s|t|ve))?",B="(?:['](?:D|LL|M|RE|S|T|VE))?",R=E+"?",N="[\\ufe0e\\ufe0f]?",M="(?:\\u200d(?:"+[x,C,A].join("|")+")"+N+R+")*",L="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",F="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",D=N+R+M,U="(?:"+[w,C,A].join("|")+")"+D,z=RegExp([I+"?"+_+"+"+P+"(?="+[y,I,"$"].join("|")+")",O+"+"+B+"(?="+[y,I+j,"$"].join("|")+")",I+"?"+j+"+"+P,I+"+"+B,F,L,v,U].join("|"),"g");function q(e){return e.match(z)||[]}e.exports=q},function(e,t,n){"use strict";const r=n(3);e.exports=(e=>r((t,n,r)=>{"function"!=typeof n||r||(r=n,n={}),"function"==typeof n&&"function"==typeof r&&(r=n,n={}),e({path:"files/rm",args:t,qs:n},e=>r(e))}))},function(e,t,n){"use strict";const r=n(3),i=function(e,t){const n=e.Entries||[];t(null,n.map(e=>({name:e.Name,type:e.Type,size:e.Size,hash:e.Hash})))};e.exports=(e=>r((t,n,r)=>("function"==typeof n&&(r=n,n={}),"function"==typeof t&&(r=t,n={},t=null),e.andTransform({path:"files/ls",args:t,qs:n},i,r))))},function(e,t,n){"use strict";const r=n(79),i=n(650);e.exports=(e=>(t,n)=>(n=n||{},r.source(i(e)(t,n))))},function(e,t,n){"use strict";const r=n(3),i=n(112);e.exports=(e=>r((t,n,r)=>{"function"==typeof n&&(r=n,n={}),e.andTransform({path:"files/read",args:t,qs:n},i,r)}))},function(e,t,n){"use strict";const r=n(20),i=n(59);e.exports=(e=>(t,n)=>{n=n||{};const o=new r.PassThrough;return e({path:"files/read",args:t,qs:n},(e,t)=>{if(e)return o.destroy(e);i(t,o)}),o})},function(e,t,n){"use strict";const r=n(79),i=n(70);e.exports=(e=>(t,n)=>{n=n||{};const o=i.source();return e({path:"files/read",args:t,qs:n},(e,t)=>{if(e)return o.abort(e);o.resolve(r(t))}),o})},function(e,t,n){"use strict";const r=n(3),i=n(199),o=n(28),s=n(153),a=n(200);e.exports=(e=>{const t=a(e,"files/write");return r((e,n,r,a)=>{"function"!=typeof r||a||(a=r,r={}),"function"==typeof r&&"function"==typeof a&&(a=r,r={});const u=[].concat(n),l=o(a),c={args:e,qs:r,converter:s},f=t({qs:c}),h=i(e=>l(null,e));f.once("error",l),f.pipe(h),u.forEach(e=>f.write(e)),f.end()})})},function(e,t,n){"use strict";const r=n(3),i=n(644);e.exports=(e=>r(function(){const{callback:t,sources:n,opts:r}=i(Array.prototype.slice.call(arguments));e({path:"files/mv",args:n,qs:r},e=>t(e))}))},function(e,t,n){"use strict";e.exports=(e=>()=>({host:e.host,port:e.port,protocol:e.protocol,"api-path":e["api-path"]}))},function(e,t,n){const r=n(32),i=n(5)("dweb-transports:yjs"),o=n(220),s=n(1689);function a(e,t){return new Promise(n=>{setTimeout(()=>{n(t)},e)})}n(1700)(s),n(1702)(s),n(1703)(s),n(1705)(s),n(1706)(s),n(1722)(s);const u=n(97),l=n(134),c=n(115),f=n(170);let h={db:{name:"indexeddb"},connector:{name:"ipfs"}};class p extends l{constructor(e){super(e),this.options=e,this.name="YJS",this.supportURLs=["yjs"],this.supportFunctions=["fetch","add","list","listmonitor","newlisturls","connection","get","set","getall","keys","newdatabase","newtable","monitor"],this.supportFeatures=[],this.status=l.STATUS_LOADED}async p__y(e,t){"string"!=typeof e&&(e=e.href),console.assert(e.startsWith("yjs:/yjs/"));try{if(this.yarrays[e])return this.yarrays[e];{let n=l.mergeoptions(this.options,{connector:{room:e}},t);return this.yarrays[e]=await s(n)}}catch(e){throw console.error("Failed to initialize Y",e.message),e}}async p__yarray(e){return this.p__y(e,{share:{array:"Array"}})}async p_connection(e){return this.p__y(e,{share:{map:"Map"}})}static setup0(e){let t=l.mergeoptions(h,e.yjs);i("YJS options %o",t);let n=new p(t);return c.addtransport(n),n}async p_setup2(e){try{this.status=l.STATUS_STARTING,e&&e(this),this.options.connector.ipfs=c.ipfs().ipfs,this.yarrays={},await this.p_status()}catch(e){console.error(this.name,"failed to start",e),this.status=l.STATUS_FAILED}return e&&e(this),this}async p_status(){return this.status=await this.options.connector.ipfs.isOnline()?l.STATUS_CONNECTED:l.STATUS_FAILED,super.p_status()}async p_rawlist(e){try{let t=await this.p__yarray(e),n=t.share.array.toArray();return n}catch(e){throw e}}listmonitor(e,t,{current:n=!1}={}){let r=this.yarrays["string"==typeof e?e:e.href];console.assert(r,"Should always exist before calling listmonitor - async call p__yarray(url) to create"),n&&r.share.array.toArray.map(t),r.share.array.observe(e=>{"insert"===e.type&&(i("resources inserted %o",e.values),e.values.map(t))})}rawreverse(){throw new u.ToBeImplementedError("Undefined function TransportYJS.rawreverse")}async p_rawadd(e,t){console.assert(e&&t.urls.length&&t.signature&&t.signedby.length,"TransportYJS.p_rawadd args",e,t);let n=t.preflight(Object.assign({},t)),r=await this.p__yarray(e);r.share.array.push([n])}p_newlisturls(e){let t=e._publicurls.map(e=>r.parse(e)).find(e=>"ipfs"===e.protocol&&e.pathname.includes("/ipfs/")||"yjs:"===e.protocol);return t||(t=`yjs:/yjs/${e.keypair.verifyexportmultihashsha256_58()}`),[t,t]}async p_newdatabase(e){e.hasOwnProperty("keypair")&&(e=e.keypair.signingexport());let t=`yjs:/yjs/${encodeURIComponent(e)}`;return{publicurl:t,privateurl:t}}async p_newtable(e,t){if(!e)throw new u.CodingError("p_newtable currently requires a pubkey");let n=await this.p_newdatabase(e);return{privateurl:`${n.privateurl}/${t}`,publicurl:`${n.publicurl}/${t}`}}async p_set(e,t,n){let r=await this.p_connection(e);"string"==typeof t?r.share.map.set(t,o(n)):Object.keys(t).map(e=>r.share.map.set(e,t[e]))}_p_get(e,t){if(Array.isArray(t))return t.reduce(function(t,n){let r=e.share.map.get(n);return t[n]="string"==typeof r?JSON.parse(r):r,t},{});{let n=e.share.map.get(t);return"string"==typeof n?JSON.parse(n):n}}async p_get(e,t){return this._p_get(await this.p_connection(e),t)}async p_delete(e,t){let n=await this.p_connection(e);"string"==typeof t?n.share.map.delete(t):t.map(e=>n.share.map.delete(e))}async p_keys(e){let t=await this.p_connection(e);return t.share.map.keys()}async p_getall(e){let t=await this.p_connection(e),n=t.share.map.keys();return this._p_get(t,n)}async p_rawfetch(e){return{table:"keyvaluetable",_map:await this.p_getall(e)}}async monitor(e,t,{current:n=!1}={}){e="string"==typeof e?e:e.href;let r=this.yarrays[e];if(!r)throw new u.CodingError("Should always exist before calling monitor - async call p__yarray(url) to create");n&&r.share.map.keys().forEach(e=>{let n=r.share.map.get[e];t({type:"set",key:e,value:"string"==typeof n?JSON.parse(n):n})}),r.share.map.observe(n=>{if(["add","update"].includes(n.type)&&(i("YJS monitor: %o %s %s %o",e,n.type,n.name,n.value),"update"!==n.type||n.oldValue!==n.value)){let e={type:{add:"set",update:"set",delete:"delete"}[n.type],value:JSON.parse(n.value),key:n.name};t(e)}})}static async p_test(e={}){console.log("TransportHTTP.test");try{let t=await this.p_setup(e);console.log("HTTP connected");let n=await t.p_info();console.log("TransportHTTP info=",n),n=await t.p_status(),console.assert(n===l.STATUS_CONNECTED),await t.p_test_kvt("NACL%20VERIFY")}catch(e){throw console.log("Exception thrown in TransportHTTP.test:",e.message),e}}}p.Y=s,c._transportclasses.YJS=p,t=e.exports=p},function(e,t,n){"use strict";n(1690)(o),n(1691)(o),n(1692)(o),n(1693)(o),n(1694)(o),n(1695)(o),o.debug=n(1696);var r={};function i(e){var t;t=null===o.sourceDir?null:o.sourceDir||"/bower_components";for(var i="undefined"!=typeof regeneratorRuntime?".js":".es6",s=[],a=0;a<e.length;a++){var u=e[a].split("(")[0],l="y-"+u.toLowerCase();if(null==o[u])if(null==r[u])if("undefined"!=typeof window&&"undefined"!==window.Y){if(null!=t){var c=document.createElement("script");c.src=t+"/"+l+"/"+l+i,document.head.appendChild(c)}let e={};r[u]=e,e.promise=new Promise(function(t){e.resolve=t}),s.push(e.promise)}else console.info("YJS: Please do not depend on automatic requiring of modules anymore! Extend modules as follows `require('y-modulename')(Y)`"),n(1699)(l)(o);else s.push(r[e[a]].promise)}return Promise.all(s)}function o(e){e.hasOwnProperty("sourceDir")&&(o.sourceDir=e.sourceDir),e.types=null!=e.types?e.types:[];var t=[e.db.name,e.connector.name].concat(e.types);for(var n in e.share)t.push(e.share[n]);return new Promise(function(n,r){null==e?r("An options object is expected! "):null==e.connector?r("You must specify a connector! (missing connector property)"):null==e.connector.name?r("You must specify connector name! (missing connector.name property)"):null==e.db?r("You must specify a database! (missing db property)"):null==e.connector.name?r("You must specify db name! (missing db.name property)"):(e=o.utils.copyObject(e),e.connector=o.utils.copyObject(e.connector),e.db=o.utils.copyObject(e.db),e.share=o.utils.copyObject(e.share),setTimeout(function(){o.requestModules(t).then(function(){var t=new s(e);t.db.whenUserIdSet(function(){t.init(function(){n(t)})})}).catch(r)},0))})}e.exports=o,o.requiringModules=r,o.extend=function(e,t){if(2===arguments.length&&"string"==typeof e)t instanceof o.utils.CustomTypeDefinition?o[e]=t.parseArguments:o[e]=t,null!=r[e]&&(r[e].resolve(),delete r[e]);else for(var n=0;n<arguments.length;n++){var i=arguments[n];if("function"!=typeof i)throw new Error("Expected function!");i(o)}},o.requestModules=i;class s{constructor(e,t){this.options=e,this.db=new o[e.db.name](this,e.db),this.connector=new o[e.connector.name](this,e.connector),this.connected=!0}init(e){var t=this.options,n={};this.share=n,this.db.requestTransaction(function*r(){for(var i in t.share){var s=t.share[i].split("("),a=s.splice(0,1),u=o[a],l=u.typeDefinition,c=["_",l.struct+"_"+a+"_"+i+"_"+s],f=[];if(1===s.length){try{f=JSON.parse("["+s[0].split(")")[0]+"]")}catch(e){throw new Error("Was not able to parse type definition! (share."+i+")")}if(null==u.typeDefinition.parseArguments)throw new Error(a+" does not expect arguments!");f=l.parseArguments(f[0])[1]}n[i]=yield*this.store.initType.call(this,c,f)}this.store.whenTransactionsFinished().then(e)})}isConnected(){return this.connector.isSynced}disconnect(){return this.connected?(this.connected=!1,this.connector.disconnect()):Promise.resolve()}reconnect(){return this.connected?Promise.resolve():(this.connected=!0,this.connector.reconnect())}destroy(){var e=this;return this.close().then(function(){return null!=e.db.deleteDB?e.db.deleteDB():Promise.resolve()})}close(){var e=this;return this.share=null,null!=this.connector.destroy?this.connector.destroy():this.connector.disconnect(),this.db.whenTransactionsFinished(function(){return this.db.destroyTypes(),this.db.requestTransaction(function*(){yield*e.db.destroy()}),this.db.whenTransactionsFinished()})}}},function(e,t){function n(e){return"read"===e||"write"===e}function r(e){return"write"===e}e.exports=function(e){class t{constructor(t,n){if(this.y=t,null==n&&(n={}),null==n.role||"master"===n.role)this.role="master";else{if("slave"!==n.role)throw new Error("Role must be either 'master' or 'slave'!");this.role="slave"}this.log=e.debug("y:connector"),this.logMessage=e.debug("y:connector-message"),this.y.db.forwardAppliedOperations=n.forwardAppliedOperations||!1,this.role=n.role,this.connections={},this.isSynced=!1,this.userEventListeners=[],this.whenSyncedListeners=[],this.currentSyncTarget=null,this.syncingClients=[],this.forwardToSyncingClients=!1!==n.forwardToSyncingClients,this.debug=!0===n.debug,this.syncStep2=Promise.resolve(),this.broadcastOpBuffer=[],this.protocolVersion=11,this.authInfo=n.auth||null,this.checkAuth=n.checkAuth||function(){return Promise.resolve("write")},!0===n.generateUserId&&this.setUserId(e.utils.generateGuid())}resetAuth(e){this.authInfo!==e&&(this.authInfo=e,this.broadcast({type:"auth",auth:this.authInfo}))}reconnect(){return this.log("reconnecting.."),this.y.db.startGarbageCollector()}disconnect(){return this.log("discronnecting.."),this.connections={},this.isSynced=!1,this.currentSyncTarget=null,this.syncingClients=[],this.whenSyncedListeners=[],this.y.db.stopGarbageCollector(),this.y.db.whenTransactionsFinished()}repair(){for(var e in this.log("Repairing the state of Yjs. This can happen if messages get lost, and Yjs detects that something is wrong. If this happens often, please report an issue here: https://github.com/y-js/yjs/issues"),this.connections)this.connections[e].isSynced=!1;this.isSynced=!1,this.currentSyncTarget=null,this.findNextSyncTarget()}setUserId(e){return null==this.userId?(this.log('Set userId to "%s"',e),this.userId=e,this.y.db.setUserId(e)):null}onUserEvent(e){this.userEventListeners.push(e)}removeUserEventListener(e){this.userEventListeners=this.userEventListeners.filter(e=>{})}userLeft(e){if(null!=this.connections[e])for(var t of(this.log("User left: %s",e),delete this.connections[e],e===this.currentSyncTarget&&(this.currentSyncTarget=null,this.findNextSyncTarget()),this.syncingClients=this.syncingClients.filter(function(t){return t!==e}),this.userEventListeners))t({action:"userLeft",user:e})}userJoined(e,t){if(null==t)throw new Error("You must specify the role of the joined user!");if(null!=this.connections[e])throw new Error("This user already joined!");for(var n of(this.log("User joined: %s",e),this.connections[e]={isSynced:!1,role:t},this.userEventListeners))n({action:"userJoined",user:e,role:t});null==this.currentSyncTarget&&this.findNextSyncTarget()}whenSynced(e){this.isSynced?e():this.whenSyncedListeners.push(e)}findNextSyncTarget(){if(null==this.currentSyncTarget){var e=null;for(var t in this.connections)if(!this.connections[t].isSynced){e=t;break}var n=this;null!=e?(this.currentSyncTarget=e,this.y.db.requestTransaction(function*(){var t=yield*this.getStateSet(),r=yield*this.getDeleteSet(),i={type:"sync step 1",stateSet:t,deleteSet:r,protocolVersion:n.protocolVersion,auth:n.authInfo};n.send(e,i)})):n.isSynced||this.y.db.requestTransaction(function*(){if(!n.isSynced){for(var e of(n.isSynced=!0,yield*this.garbageCollectAfterSync(),n.whenSyncedListeners))e();n.whenSyncedListeners=[]}})}}send(e,t){this.log("Send '%s' to %s",t.type,e),this.logMessage("Message: %j",t)}broadcast(e){this.log("Broadcast '%s'",e.type),this.logMessage("Message: %j",e)}broadcastOps(t){t=t.map(function(t){return e.Struct[t.struct].encode(t)});var n=this;function r(){n.broadcastOpBuffer.length>0&&(n.broadcast({type:"update",ops:n.broadcastOpBuffer}),n.broadcastOpBuffer=[])}0===this.broadcastOpBuffer.length?(this.broadcastOpBuffer=t,this.y.db.transactionInProgress?this.y.db.whenTransactionsFinished().then(r):setTimeout(r,0)):this.broadcastOpBuffer=this.broadcastOpBuffer.concat(t)}receiveMessage(e,t){if(e===this.userId)return Promise.resolve();if(this.log("Receive '%s' from %s",t.type,e),this.logMessage("Message: %j",t),null!=t.protocolVersion&&t.protocolVersion!==this.protocolVersion)return this.log(`You tried to sync with a yjs instance that has a different protocol version\n (You: ${this.protocolVersion}, Client: ${t.protocolVersion}).\n The sync was stopped. You need to upgrade your dependencies (especially Yjs & the Connector)!\n `),this.send(e,{type:"sync stop",protocolVersion:this.protocolVersion}),Promise.reject("Incompatible protocol version");if(null!=t.auth&&null!=this.connections[e]){var i=this.checkAuth(t.auth,this.y,e);this.connections[e].auth=i,i.then(t=>{for(var n of this.userEventListeners)n({action:"userAuthenticated",user:e,auth:t})})}else null!=this.connections[e]&&null==this.connections[e].auth&&(this.connections[e].auth=this.checkAuth(null,this.y,e));return null!=this.connections[e]&&null!=this.connections[e].auth?this.connections[e].auth.then(i=>{if("sync step 1"===t.type&&n(i)){let n=this,o=t;this.y.db.requestTransaction(function*(){var t=yield*this.getStateSet();r(i)&&(yield*this.applyDeleteSet(o.deleteSet));var s=yield*this.getDeleteSet(),a={type:"sync step 2",stateSet:t,deleteSet:s,protocolVersion:this.protocolVersion,auth:this.authInfo};a.os=yield*this.getOperations(o.stateSet),n.send(e,a),this.forwardToSyncingClients?(n.syncingClients.push(e),setTimeout(function(){n.syncingClients=n.syncingClients.filter(function(t){return t!==e}),n.send(e,{type:"sync done"})},5e3)):n.send(e,{type:"sync done"})})}else if("sync step 2"===t.type&&r(i)){var o=this.y.db,s={};s.promise=new Promise(function(e){s.resolve=e}),this.syncStep2=s.promise;let e=t;o.requestTransaction(function*(){yield*this.applyDeleteSet(e.deleteSet),null!=e.osUntransformed?yield*this.applyOperationsUntransformed(e.osUntransformed,e.stateSet):this.store.apply(e.os),s.resolve()})}else if("sync done"===t.type){var a=this;this.syncStep2.then(function(){a._setSyncedWith(e)})}else if("update"===t.type&&r(i)){if(this.forwardToSyncingClients)for(var u of this.syncingClients)this.send(u,t);if(this.y.db.forwardAppliedOperations){var l=t.ops.filter(function(e){return"Delete"===e.struct});l.length>0&&this.broadcastOps(l)}this.y.db.apply(t.ops)}}):Promise.reject("Unable to deliver message")}_setSyncedWith(e){var t=this.connections[e];null!=t&&(t.isSynced=!0),e===this.currentSyncTarget&&(this.currentSyncTarget=null,this.findNextSyncTarget())}parseMessageFromXml(e){function t(e){for(var r of e.children)return"true"===r.getAttribute("isArray")?t(r):n(r)}function n(e){var r={};for(var i in e.attrs){var o=e.attrs[i],s=parseInt(o,10);isNaN(s)||""+s!==o?r[i]=o:r[i]=s}for(var a in e.children){var u=a.name;"true"===a.getAttribute("isArray")?r[u]=t(a):r[u]=n(a)}return r}n(e)}encodeMessageToXml(e,t){function n(e,t){for(var i in t){var o=t[i];null==i||(o.constructor===Object?n(e.c(i),o):o.constructor===Array?r(e.c(i),o):e.setAttribute(i,o))}}function r(e,t){for(var i of(e.setAttribute("isArray","true"),t))i.constructor===Object?n(e.c("array-element"),i):r(e.c("array-element"),i)}if(t.constructor===Object)n(e.c("y",{xmlns:"http://y.ninja/connector-stanza"}),t);else{if(t.constructor!==Array)throw new Error("I can't encode this json!");r(e.c("y",{xmlns:"http://y.ninja/connector-stanza"}),t)}}}e.AbstractConnector=t}},function(e,t,n){"use strict";e.exports=function(e){class t{constructor(e,t){this.y=e,this.dbOpts=t;var n=this,r;function i(){return n.whenTransactionsFinished().then(function(){return n.gc1.length>0||n.gc2.length>0?(n.y.connector.isSynced||console.warn("gc should be empty when not synced!"),new Promise(e=>{n.requestTransaction(function*(){if(null!=n.y.connector&&n.y.connector.isSynced){for(var t=0;t<n.gc2.length;t++){var r=n.gc2[t];yield*this.garbageCollectOperation(r)}n.gc2=n.gc1,n.gc1=[]}n.gcTimeout>0&&(n.gcInterval=setTimeout(i,n.gcTimeout)),e()})})):(n.gcTimeout>0&&(n.gcInterval=setTimeout(i,n.gcTimeout)),Promise.resolve())})}this.userId=null,this.userIdPromise=new Promise(function(e){r=e}),this.userIdPromise.resolve=r,this.forwardAppliedOperations=!1,this.listenersById={},this.listenersByIdExecuteNow=[],this.listenersByIdRequestPending=!1,this.initializedTypes={},this.waitingTransactions=[],this.transactionInProgress=!1,this.transactionIsFlushed=!1,"undefined"!=typeof YConcurrency_TestingMode&&(this.executeOrder=[]),this.gc1=[],this.gc2=[],this.garbageCollect=i,this.startGarbageCollector(),this.repairCheckInterval=t.repairCheckInterval?t.repairCheckInterval:6e3,this.opsReceivedTimestamp=new Date,this.startRepairCheck()}startGarbageCollector(){this.gc=null==this.dbOpts.gc||this.dbOpts.gc,this.gc?this.gcTimeout=this.dbOpts.gcTimeout?this.dbOpts.gcTimeout:5e4:this.gcTimeout=-1,this.gcTimeout>0&&this.garbageCollect()}startRepairCheck(){var e=this;this.repairCheckInterval>0&&(this.repairCheckIntervalHandler=setInterval(function t(){new Date-e.opsReceivedTimestamp>e.repairCheckInterval&&Object.keys(e.listenersById).length>0&&(e.listenersById={},e.opsReceivedTimestamp=new Date,e.y.connector.repair())},this.repairCheckInterval))}stopRepairCheck(){clearInterval(this.repairCheckIntervalHandler)}queueGarbageCollector(e){this.y.connector.isSynced&&this.gc&&this.gc1.push(e)}emptyGarbageCollector(){return new Promise(e=>{var t=()=>{this.gc1.length>0||this.gc2.length>0?this.garbageCollect().then(t):e()};setTimeout(t,0)})}addToDebug(){if("undefined"!=typeof YConcurrency_TestingMode){var e=Array.prototype.map.call(arguments,function(e){return"string"==typeof e?e:JSON.stringify(e)}).join("").replace(/"/g,"'").replace(/,/g,", ").replace(/:/g,": ");this.executeOrder.push(e)}}getDebugData(){console.log(this.executeOrder.join("\n"))}stopGarbageCollector(){var e=this;return this.gc=!1,this.gcTimeout=-1,new Promise(function(t){e.requestTransaction(function*(){var n=e.gc1.concat(e.gc2);e.gc1=[],e.gc2=[];for(var r=0;r<n.length;r++){var i=yield*this.getOperation(n[r]);null!=i&&(delete i.gc,yield*this.setOperation(i))}t()})})}*addToGarbageCollector(e,t){if(null==e.gc&&!0===e.deleted&&this.store.gc&&this.store.y.connector.isSynced){var n=!1;if(null!=t&&!0===t.deleted?n=!0:null!=e.content&&e.content.length>1&&(e=yield*this.getInsertionCleanStart([e.id[0],e.id[1]+1]),n=!0),n)return e.gc=!0,yield*this.setOperation(e),this.store.queueGarbageCollector(e.id),!0}return!1}removeFromGarbageCollector(t){function n(n){return!e.utils.compareIds(n,t.id)}this.gc1=this.gc1.filter(n),this.gc2=this.gc2.filter(n),delete t.gc}destroyTypes(){for(var e in this.initializedTypes){var t=this.initializedTypes[e];null!=t._destroy?t._destroy():console.error("The type you included does not provide destroy functionality, it will remain in memory (updating your packages will help).")}}*destroy(){clearInterval(this.gcInterval),this.gcInterval=null,this.stopRepairCheck()}setUserId(e){if(!this.userIdPromise.inProgress){this.userIdPromise.inProgress=!0;var t=this;t.requestTransaction(function*(){t.userId=e;var n=yield*this.getState(e);t.opClock=n.clock,t.userIdPromise.resolve(e)})}return this.userIdPromise}whenUserIdSet(e){this.userIdPromise.then(e)}getNextOpId(e){if(null==e)throw new Error("getNextOpId expects the number of created ids to create!");if(null==this.userId)throw new Error("OperationStore not yet initialized!");var t=[this.userId,this.opClock];return this.opClock+=e,t}apply(t){this.opsReceivedTimestamp=new Date;for(var n=0;n<t.length;n++){var r=t[n];if(null==r.id||r.id[0]!==this.y.connector.userId){var i=e.Struct[r.struct].requiredOps(r);null!=r.requires&&(i=i.concat(r.requires)),this.whenOperationsExist(i,r)}}}whenOperationsExist(e,t){if(e.length>0){let n={op:t,missing:e.length};for(let t=0;t<e.length;t++){let r=e[t],i=JSON.stringify(r),o=this.listenersById[i];null==o&&(o=[],this.listenersById[i]=o),o.push(n)}}else this.listenersByIdExecuteNow.push({op:t});if(!this.listenersByIdRequestPending){this.listenersByIdRequestPending=!0;var n=this;this.requestTransaction(function*(){var e=n.listenersByIdExecuteNow;n.listenersByIdExecuteNow=[];var t=n.listenersById;n.listenersById={},n.listenersByIdRequestPending=!1;for(let t=0;t<e.length;t++){let r=e[t].op;yield*n.tryExecute.call(this,r)}for(var r in t){var i=t[r],o=JSON.parse(r),s;if(s="string"==typeof o[1]?yield*this.getOperation(o):yield*this.getInsertion(o),null==s)n.listenersById[r]=i;else for(let e=0;e<i.length;e++){let t=i[e],r=t.op;0==--t.missing&&(yield*n.tryExecute.call(this,r))}}})}}*tryExecute(t){if(this.store.addToDebug("yield* this.store.tryExecute.call(this, ",JSON.stringify(t),")"),"Delete"===t.struct)yield*e.Struct.Delete.execute.call(this,t);else{for(var n=yield*this.getInsertion(t.id);null!=n&&null!=n.content&&n.id[1]+n.content.length<t.id[1]+t.content.length;){var r=n.content.length-(t.id[1]-n.id[1]);t.content.splice(0,r),t.id=[t.id[0],t.id[1]+r],t.left=e.utils.getLastId(n),t.origin=t.left,n=yield*this.getOperation(t.id)}if(null==n){var i=t.id,o=yield*this.isGarbageCollected(i);o||(yield*e.Struct[t.struct].execute.call(this,t),yield*this.addOperation(t),yield*this.store.operationAdded(this,t),t=yield*this.getOperation(i),yield*this.tryCombineWithLeft(t))}}}*operationAdded(t,n){if("Delete"===n.struct){var r=this.initializedTypes[JSON.stringify(n.targetParent)];null!=r&&(yield*r._changed(t,n))}else{yield*t.updateState(n.id[0]);var i=null!=n.content?n.content.length:1;for(let e=0;e<i;e++){var o=JSON.stringify([n.id[0],n.id[1]+e]),s=this.listenersById[o];if(delete this.listenersById[o],null!=s)for(var a in s){var u=s[a];0==--u.missing&&this.whenOperationsExist([],u.op)}}var l=this.initializedTypes[JSON.stringify(n.parent)];if(null!=n.parent){var c=yield*t.isDeleted(n.parent);if(c)return void(yield*t.deleteList(n.id))}if(null!=l){let r=e.utils.copyOperation(n);yield*l._changed(t,r)}if(!n.deleted){var f=null!=n.content?n.content.length:1,h=n.id;for(let e=0;e<f;e++){var p=[h[0],h[1]+e],d=yield*t.isDeleted(p);if(d){var m={struct:"Delete",target:p};yield*this.tryExecute.call(t,m)}}}}}whenTransactionsFinished(){if(this.transactionInProgress){if(null==this.transactionsFinished){var e,t=new Promise(function(t){e=t});this.transactionsFinished={resolve:e,promise:t}}return this.transactionsFinished.promise}return Promise.resolve()}getNextRequest(){return 0===this.waitingTransactions.length?this.transactionIsFlushed?(this.transactionInProgress=!1,this.transactionIsFlushed=!1,null!=this.transactionsFinished&&(this.transactionsFinished.resolve(),this.transactionsFinished=null),null):(this.transactionIsFlushed=!0,function*(){yield*this.flush()}):(this.transactionIsFlushed=!1,this.waitingTransactions.shift())}requestTransaction(e,t){this.waitingTransactions.push(e),this.transactionInProgress||(this.transactionInProgress=!0,setTimeout(()=>{this.transact(this.getNextRequest())},0))}getType(e){return this.initializedTypes[JSON.stringify(e)]}*initType(t,n){var r=JSON.stringify(t),i=this.store.initializedTypes[r];if(null==i){var o=yield*this.getOperation(t);null!=o&&(i=yield*e[o.type].typeDefinition.initType.call(this,this.store,o,n),this.store.initializedTypes[r]=i)}return i}createType(t,n){var r=t[0].struct;n=n||this.getNextOpId(1);var i=e.Struct[r].create(n);i.type=t[0].name,this.requestTransaction(function*(){"_"===i.id[0]?yield*this.setOperation(i):yield*this.applyCreatedOperations([i])});var o=e[i.type].typeDefinition.createType(this,i,t[1]);return this.initializedTypes[JSON.stringify(i.id)]=o,o}}e.AbstractDatabase=t}},function(e,t,n){"use strict";e.exports=function(e){class t{*applyCreatedOperations(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];yield*this.store.tryExecute.call(this,i),null!=i.id&&"string"==typeof i.id[1]||n.push(e.Struct[i.struct].encode(i))}n.length>0&&this.store.y.connector.broadcastOps(n)}*deleteList(e){for(;null!=e;){if(e=yield*this.getOperation(e),!e.gc){e.gc=!0,e.deleted=!0,yield*this.setOperation(e);var t=null!=e.content?e.content.length:1;yield*this.markDeleted(e.id,t),null!=e.opContent&&(yield*this.deleteOperation(e.opContent)),this.store.queueGarbageCollector(e.id)}e=e.right}}*deleteOperation(e,t,n){for(null==t&&(t=1),yield*this.markDeleted(e,t);t>0;){var r=!1,i=yield*this.os.findWithUpperBound([e[0],e[1]+t-1]),o=null!=i&&null!=i.content?i.content.length:1;if(null==i||i.id[0]!==e[0]||i.id[1]+o<=e[1]?(i=null,t=0):(i.deleted||(i.id[1]<e[1]&&(i=yield*this.getInsertionCleanStart(e),o=i.content.length),i.id[1]+o>e[1]+t&&(i=yield*this.getInsertionCleanEnd([e[0],e[1]+t-1]),o=i.content.length)),t=i.id[1]-e[1]),null!=i){if(!i.deleted){if(r=!0,i.deleted=!0,null!=i.start&&(yield*this.deleteList(i.start)),null!=i.map)for(var s in i.map)yield*this.deleteList(i.map[s]);if(null!=i.opContent&&(yield*this.deleteOperation(i.opContent)),null!=i.requires)for(var a=0;a<i.requires.length;a++)yield*this.deleteOperation(i.requires[a])}var u,l;u=null!=i.left?yield*this.getInsertion(i.left):null,yield*this.setOperation(i),l=null!=i.right?yield*this.getOperation(i.right):null,r&&!n&&(yield*this.store.operationAdded(this,{struct:"Delete",target:i.id,length:o,targetParent:i.parent})),yield*this.store.addToGarbageCollector.call(this,i,u),null!=l&&(yield*this.store.addToGarbageCollector.call(this,l,i))}}}*markGarbageCollected(t,n){this.store.addToDebug("yield* this.markGarbageCollected(",t,", ",n,")");var r=yield*this.markDeleted(t,n);if(r.id[1]<t[1]&&!r.gc){var i=r.len-(t[1]-r.id[1]);r.len-=i,yield*this.ds.put(r),r={id:t,len:i,gc:!1},yield*this.ds.put(r)}var o=yield*this.ds.findPrev(t),s=yield*this.ds.findNext(t);t[1]+n<r.id[1]+r.len&&!r.gc&&(yield*this.ds.put({id:[t[0],t[1]+n],len:r.len-n,gc:!1}),r.len=n),r.gc=!0,null!=o&&o.gc&&e.utils.compareIds([o.id[0],o.id[1]+o.len],r.id)&&(o.len+=r.len,yield*this.ds.delete(r.id),r=o),null!=s&&s.gc&&e.utils.compareIds([r.id[0],r.id[1]+r.len],s.id)&&(r.len+=s.len,yield*this.ds.delete(s.id)),yield*this.ds.put(r),yield*this.updateState(r.id[0])}*markDeleted(e,t){null==t&&(t=1);var n=yield*this.ds.findWithUpperBound(e);if(null!=n&&n.id[0]===e[0])if(n.id[1]<=e[1]&&e[1]<=n.id[1]+n.len){var r=e[1]+t-(n.id[1]+n.len);if(!(r>0))return n;if(n.gc){if(r=n.id[1]+n.len-e[1],!(r<t))throw new Error("Cannot happen! (it dit though.. :()");n={id:[e[0],e[1]+r],len:t-r,gc:!1},yield*this.ds.put(n)}else n.len+=r}else n={id:e,len:t,gc:!1},yield*this.ds.put(n);else n={id:e,len:t,gc:!1},yield*this.ds.put(n);var i=yield*this.ds.findNext(n.id);if(null!=i&&n.id[0]===i.id[0]&&n.id[1]+n.len>=i.id[1])for(r=n.id[1]+n.len-i.id[1];r>=0;){if(i.gc){n.len-=r,r>=i.len&&(r-=i.len,r>0&&(yield*this.ds.put(n),yield*this.markDeleted([i.id[0],i.id[1]+i.len],r)));break}if(!(r>i.len)){n.len+=i.len-r,yield*this.ds.delete(i.id);break}var o=yield*this.ds.findNext(i.id);if(yield*this.ds.delete(i.id),null==o||n.id[0]!==o.id[0])break;i=o,r=n.id[1]+n.len-i.id[1]}return yield*this.ds.put(n),n}*garbageCollectAfterSync(){(this.store.gc1.length>0||this.store.gc2.length>0)&&console.warn("gc should be empty after sync"),this.store.gc&&(yield*this.os.iterate(this,null,null,function*(e){if(e.gc&&(delete e.gc,yield*this.setOperation(e)),null!=e.parent){var t=yield*this.isDeleted(e.parent);if(t){if(e.gc=!0,!e.deleted&&(yield*this.markDeleted(e.id,null!=e.content?e.content.length:1),e.deleted=!0,null!=e.opContent&&(yield*this.deleteOperation(e.opContent)),null!=e.requires))for(var n=0;n<e.requires.length;n++)yield*this.deleteOperation(e.requires[n]);return yield*this.setOperation(e),void this.store.gc1.push(e.id)}}if(e.deleted){var r=null;null!=e.left&&(r=yield*this.getInsertion(e.left)),yield*this.store.addToGarbageCollector.call(this,e,r)}}))}*garbageCollectOperation(t){this.store.addToDebug("yield* this.garbageCollectOperation(",t,")");var n=yield*this.getOperation(t);if(yield*this.markGarbageCollected(t,null!=n&&null!=n.content?n.content.length:1),null!=n){var r=[],i;null!=n.opContent&&r.push(n.opContent),null!=n.requires&&(r=r.concat(n.requires));for(var o=0;o<r.length;o++){var s=yield*this.getOperation(r[o]);null!=s?(s.deleted||(yield*this.deleteOperation(s.id),s=yield*this.getOperation(s.id)),s.gc=!0,yield*this.setOperation(s),this.store.queueGarbageCollector(s.id)):yield*this.markGarbageCollected(r[o],1)}if(null!=n.left){var a=yield*this.getInsertion(n.left);a.right=n.right,yield*this.setOperation(a)}if(null!=n.right){var u=yield*this.getOperation(n.right);if(u.left=n.left,yield*this.setOperation(u),null!=n.originOf&&n.originOf.length>0){for(var l=n.left,c=null;null!=l&&(c=yield*this.getInsertion(l),!c.deleted);)l=c.left;for(var f in n.originOf){var h=yield*this.getOperation(n.originOf[f]);null!=h&&(h.origin=l,yield*this.setOperation(h))}null!=l&&(null==c.originOf?c.originOf=n.originOf:c.originOf=n.originOf.concat(c.originOf),yield*this.setOperation(c))}}if(null!=n.origin){var p=yield*this.getInsertion(n.origin);p.originOf=p.originOf.filter(function(n){return!e.utils.compareIds(t,n)}),yield*this.setOperation(p)}if(null!=n.parent&&(i=yield*this.getOperation(n.parent)),null!=i){var d=!1;null!=n.parentSub?e.utils.compareIds(i.map[n.parentSub],n.id)&&(d=!0,null!=n.right?i.map[n.parentSub]=n.right:delete i.map[n.parentSub]):(e.utils.compareIds(i.start,n.id)&&(d=!0,i.start=n.right),e.utils.matchesId(n,i.end)&&(d=!0,i.end=n.left)),d&&(yield*this.setOperation(i))}yield*this.removeOperation(n.id)}}*checkDeleteStoreForState(e){var t=yield*this.ds.findWithUpperBound([e.user,e.clock]);null!=t&&t.id[0]===e.user&&t.gc&&(e.clock=Math.max(e.clock,t.id[1]+t.len))}*updateState(e){var t=yield*this.getState(e);yield*this.checkDeleteStoreForState(t);for(var n=yield*this.getInsertion([e,t.clock]),r=null!=n&&null!=n.content?n.content.length:1;null!=n&&e===n.id[0]&&n.id[1]<=t.clock&&n.id[1]+r>t.clock;)t.clock+=r,yield*this.checkDeleteStoreForState(t),n=yield*this.os.findNext(n.id),r=null!=n&&null!=n.content?n.content.length:1;yield*this.setState(t)}*applyDeleteSet(e){var t=[];for(var n in e){var r=e[n],i=0,o=r[i];for(yield*this.ds.iterate(this,[n,0],[n,Number.MAX_VALUE],function*(e){for(;null!=o;){var s=0;if(e.id[1]+e.len<=o[0])break;o[0]<e.id[1]?(s=Math.min(e.id[1]-o[0],o[1]),t.push([n,o[0],s,o[2]])):(s=e.id[1]+e.len-o[0],o[2]&&!e.gc&&t.push([n,o[0],Math.min(s,o[1]),o[2]])),o[1]<=s?o=r[++i]:(o[0]=o[0]+s,o[1]=o[1]-s)}});i<r.length;i++)o=r[i],t.push([n,o[0],o[1],o[2]])}for(var s=0;s<t.length;s++){var a=t[s];if(yield*this.deleteOperation([a[0],a[1]],a[2]),a[3]){yield*this.markGarbageCollected([a[0],a[1]],a[2]);for(var u=a[1]+a[2];u>=a[1];){var l=yield*this.os.findWithUpperBound([a[0],u-1]);if(null==l)break;var c=null!=l.content?l.content.length:1;if(l.id[0]!==a[0]||l.id[1]+c<=a[1])break;l.id[1]+c>a[1]+a[2]&&(l=yield*this.getInsertionCleanEnd([a[0],a[1]+a[2]-1])),l.id[1]<a[1]&&(l=yield*this.getInsertionCleanStart([a[0],a[1]])),u=l.id[1],yield*this.garbageCollectOperation(l.id)}}if(this.store.forwardAppliedOperations){var f=[];f.push({struct:"Delete",target:[a[0],a[1]],length:a[2]}),this.store.y.connector.broadcastOps(f)}}}*isGarbageCollected(e){var t=yield*this.ds.findWithUpperBound(e);return null!=t&&t.id[0]===e[0]&&e[1]<t.id[1]+t.len&&t.gc}*getDeleteSet(){var e={};return yield*this.ds.iterate(this,null,null,function*(t){var n=t.id[0],r=t.id[1],i=t.len,o=t.gc,s=e[n];void 0===s&&(s=[],e[n]=s),s.push([r,i,o])}),e}*isDeleted(e){var t=yield*this.ds.findWithUpperBound(e);return null!=t&&t.id[0]===e[0]&&e[1]<t.id[1]+t.len}*setOperation(e){return yield*this.os.put(e),e}*addOperation(e){yield*this.os.put(e),this.store.forwardAppliedOperations&&"string"!=typeof e.id[1]&&this.store.y.connector.broadcastOps([e])}*tryCombineWithLeft(t){if(null!=t&&null!=t.left&&null!=t.content&&t.left[0]===t.id[0]&&e.utils.compareIds(t.left,t.origin)){var n=yield*this.getInsertion(t.left);null==n.content||n.id[1]+n.content.length!==t.id[1]||1!==n.originOf.length||n.gc||n.deleted||t.gc||t.deleted||(null!=t.originOf?n.originOf=t.originOf:delete n.originOf,n.content=n.content.concat(t.content),n.right=t.right,yield*this.os.delete(t.id),yield*this.setOperation(n))}}*getInsertion(e){var t=yield*this.os.findWithUpperBound(e);if(null==t)return null;var n=null!=t.content?t.content.length:1;return e[0]===t.id[0]&&e[1]<t.id[1]+n?t:null}*getInsertionCleanStartEnd(e){return yield*this.getInsertionCleanStart(e),yield*this.getInsertionCleanEnd(e)}*getInsertionCleanStart(t){var n=yield*this.getInsertion(t);if(null!=n){if(n.id[1]===t[1])return n;var r=e.utils.copyObject(n);n.content=r.content.splice(t[1]-n.id[1]),n.id=t;var i=e.utils.getLastId(r);return n.origin=i,r.originOf=[n.id],r.right=n.id,n.left=i,yield*this.setOperation(r),yield*this.setOperation(n),r.gc&&this.store.queueGarbageCollector(n.id),n}return null}*getInsertionCleanEnd(t){var n=yield*this.getInsertion(t);if(null!=n){if(null==n.content||n.id[1]+n.content.length-1===t[1])return n;var r=e.utils.copyObject(n);r.content=n.content.splice(t[1]-n.id[1]+1),r.id=[t[0],t[1]+1];var i=e.utils.getLastId(n);return r.origin=i,n.originOf=[r.id],n.right=r.id,r.left=i,yield*this.setOperation(r),yield*this.setOperation(n),n.gc&&this.store.queueGarbageCollector(r.id),n}return null}*getOperation(t){var n=yield*this.os.find(t);if("_"!==t[0]||null!=n)return n;var r=t[1].split("_");if(r.length>1){var i=r[0],o=e.Struct[i].create(t);return o.type=r[1],yield*this.setOperation(o),o}return console.error("Unexpected case. How can this happen?"),null}*removeOperation(e){yield*this.os.delete(e)}*setState(e){var t={id:[e.user],clock:e.clock};yield*this.ss.put(t)}*getState(e){var t=yield*this.ss.find([e]),n=null==t?null:t.clock;return null==n&&(n=0),{user:e,clock:n}}*getStateVector(){var e=[];return yield*this.ss.iterate(this,null,null,function*(t){e.push({user:t.id[0],clock:t.clock})}),e}*getStateSet(){var e={};return yield*this.ss.iterate(this,null,null,function*(t){e[t.id[0]]=t.clock}),e}*getOperations(t){null==t&&(t={});var n=[],r=yield*this.getStateVector();for(var i of r){var o=i.user;if("_"!==o){var s=t[o]||0;if(s>0){var a=yield*this.getInsertion([o,s]);null!=a&&(s=a.id[1],t[o]=s)}yield*this.os.iterate(this,[o,s],[o,Number.MAX_VALUE],function*(r){if(r=e.Struct[r.struct].encode(r),"Insert"!==r.struct)n.push(r);else if(null==r.right||r.right[1]<(t[r.right[0]]||0))for(var i=r,o=[r],s=r.right;;){if(null==i.left){r.left=null,n.push(r),e.utils.compareIds(i.id,r.id)||(i=e.Struct[r.struct].encode(i),i.right=o[o.length-1].id,n.push(i));break}for(i=yield*this.getInsertion(i.left);o.length>0&&e.utils.matchesId(i,o[o.length-1].origin);)o.pop();if(i.id[1]<(t[i.id[0]]||0)){r.left=e.utils.getLastId(i),n.push(r);break}if(e.utils.matchesId(i,r.origin))r.left=r.origin,n.push(r),r=e.Struct[r.struct].encode(i),r.right=s,o.length>0&&console.log("This should not happen .. :( please report this"),o=[r];else{var a=e.Struct[r.struct].encode(i);a.right=o[o.length-1].id,a.left=a.origin,n.push(a),o.push(i)}}})}}return n.reverse()}*getOperationsUntransformed(){var e=[];return yield*this.os.iterate(this,null,null,function*(t){"_"!==t.id[0]&&e.push(t)}),{untransformed:e}}*applyOperationsUntransformed(t,n){for(var r=t.untransformed,i=0;i<r.length;i++){var o=r[i];if(null!=o.parent&&"_"===o.parent[0]&&"Insert"===o.struct)if(null!=o.parentSub&&null==o.left){let e=yield*this.getOperation(o.parent);e.map[o.parentSub]=o.id,yield*this.setOperation(e)}else if(null==o.right||null==o.left){let t=yield*this.getOperation(o.parent);null==o.right&&(t.end=e.utils.getLastId(o)),null==o.left&&(t.start=o.id),yield*this.setOperation(t)}yield*this.os.put(o)}for(var s in n)yield*this.ss.put({id:[s],clock:n[s]})}*flush(){yield*this.os.flush(),yield*this.ss.flush(),yield*this.ds.flush()}}e.Transaction=t}},function(e,t,n){"use strict";e.exports=function(e){var t={Delete:{encode:function(e){return{target:e.target,length:e.length||0,struct:"Delete"}},requiredOps:function(e){return[]},execute:function*(e){return yield*this.deleteOperation(e.target,e.length||1)}},Insert:{encode:function(e){var t={id:e.id,left:e.left,right:e.right,origin:e.origin,parent:e.parent,struct:e.struct};return null!=e.parentSub&&(t.parentSub=e.parentSub),e.hasOwnProperty("opContent")?t.opContent=e.opContent:t.content=e.content.slice(),t},requiredOps:function(t){var n=[];return null!=t.left&&n.push(t.left),null!=t.right&&n.push(t.right),null==t.origin||e.utils.compareIds(t.left,t.origin)||n.push(t.origin),n.push(t.parent),null!=t.opContent&&n.push(t.opContent),n},getDistanceToOrigin:function*(t){if(null==t.left)return 0;for(var n=0,r=yield*this.getInsertion(t.left);!e.utils.matchesId(r,t.origin)&&(n++,null!=r.left);)r=yield*this.getInsertion(r.left);return n},execute:function*(n){var r,i=[];if(null!=n.origin){var o=yield*this.getInsertionCleanEnd(n.origin);null==o.originOf&&(o.originOf=[]),o.originOf.push(n.id),yield*this.setOperation(o),null!=o.right&&i.push(o.right)}var s=r=yield*t.Insert.getDistanceToOrigin.call(this,n),a,u,l;if(null!=n.left)a=yield*this.getInsertionCleanEnd(n.left),e.utils.compareIds(n.left,n.origin)||null==a.right||i.push(a.right),a=null==a.right?null:yield*this.getOperation(a.right);else{u=yield*this.getOperation(n.parent);let e=n.parentSub?u.map[n.parentSub]:u.start;l=null==e?null:yield*this.getOperation(e),a=l}for(null!=n.right&&(i.push(n.right),yield*this.getInsertionCleanStart(n.right));null!=a&&!e.utils.compareIds(a.id,n.right);){var c=yield*t.Insert.getDistanceToOrigin.call(this,a);if(c===r)a.id[0]<n.id[0]&&(n.left=e.utils.getLastId(a),s=r+1);else{if(!(c<r))break;r-s<=c&&(n.left=e.utils.getLastId(a),s=r+1)}r++,a=null!=a.right?yield*this.getInsertion(a.right):null}var f=null,h=null;for(null==u&&(u=yield*this.getOperation(n.parent)),null!=n.left?(f=yield*this.getInsertion(n.left),n.right=f.right,f.right=n.id,yield*this.setOperation(f)):n.right=n.parentSub?u.map[n.parentSub]||null:u.start,null!=n.right&&(h=yield*this.getOperation(n.right),h.left=e.utils.getLastId(n),null!=h.gc&&(null!=h.content&&h.content.length>1&&(h=yield*this.getInsertionCleanEnd(h.id)),this.store.removeFromGarbageCollector(h)),yield*this.setOperation(h)),null!=n.parentSub?(null==f&&(u.map[n.parentSub]=n.id,yield*this.setOperation(u)),null!=n.right&&(yield*this.deleteOperation(n.right,1,!0)),null!=n.left&&(yield*this.deleteOperation(n.id,1,!0))):null!=h&&null!=f||(null==h&&(u.end=e.utils.getLastId(n)),null==f&&(u.start=n.id),yield*this.setOperation(u)),r=0;r<i.length;r++){var p=yield*this.getOperation(i[r]);yield*this.tryCombineWithLeft(p)}}},List:{create:function(e){return{start:null,end:null,struct:"List",id:e}},encode:function(e){var t={struct:"List",id:e.id,type:e.type};return null!=e.requires&&(t.requires=e.requires),null!=e.info&&(t.info=e.info),t},requiredOps:function(){return[]},execute:function*(e){e.start=null,e.end=null},ref:function*(e,t){if(null==e.start)return null;for(var n=null,r=yield*this.getOperation(e.start);r.deleted||(n=r,t--),t>=0&&null!=r.right;)r=yield*this.getOperation(r.right);return n},map:function*(e,t){e=e.start;for(var n=[];null!=e;){var r=yield*this.getOperation(e);r.deleted||n.push(t(r)),e=r.right}return n}},Map:{create:function(e){return{id:e,map:{},struct:"Map"}},encode:function(e){var t={struct:"Map",type:e.type,id:e.id,map:{}};return null!=e.requires&&(t.requires=e.requires),null!=e.info&&(t.info=e.info),t},requiredOps:function(){return[]},execute:function*(){},get:function*(e,t){var n=e.map[t];if(null!=n){var r=yield*this.getOperation(n);return null==r||r.deleted?void 0:null==r.opContent?r.content[0]:yield*this.getType(r.opContent)}}}};e.Struct=t}},function(e,t,n){"use strict";e.exports=function(e){e.utils={},e.utils.bubbleEvent=function(e,t){for(e.eventHandler.callEventListeners(t),t.path=[];null!=e&&null!=e._deepEventHandler;){e._deepEventHandler.callEventListeners(t);var n=null;null!=e._parent&&(n=e.os.getType(e._parent)),null!=n&&null!=n._getPathToChild?(t.path=[n._getPathToChild(e._model)].concat(t.path),e=n):e=null}};class t{constructor(){this.eventListeners=[]}destroy(){this.eventListeners=null}addEventListener(e){this.eventListeners.push(e)}removeEventListener(e){this.eventListeners=this.eventListeners.filter(function(t){return e!==t})}removeAllEventListeners(){this.eventListeners=[]}callEventListeners(e){for(var t=0;t<this.eventListeners.length;t++)try{var n={};for(var r in e)n[r]=e[r];this.eventListeners[t](n)}catch(e){console.error('Your observer threw an error. This error was caught so that Yjs still can ensure data consistency! In order to debug this error you have to check "Pause On Caught Exceptions"',e)}}}e.utils.EventListenerHandler=t;class n extends t{constructor(e){super(),this.waiting=[],this.awaiting=0,this.onevent=e}destroy(){super.destroy(),this.waiting=null,this.onevent=null}receivedOp(e){if(this.awaiting<=0)this.onevent(e);else if("Delete"===e.struct){var t=this,n=function e(n){if(null==n.length)throw new Error("This shouldn't happen! d.length must be defined!");for(var r=0;r<t.waiting.length;r++){var i=t.waiting[r];if("Insert"===i.struct&&i.id[0]===n.target[0]){var o=i.hasOwnProperty("content")?i.content.length:1,s=n.target[1],a=n.target[1]+(n.length||1),u=i.id[1],l=i.id[1]+o;if(l<=s||a<=u)continue;if(u<s){if(s<l){if(l<a){i.content.splice(s-u),n.length=a-l,n.target=[n.target[0],l];continue}if(l===a)return void i.content.splice(s-u);var c={id:[i.id[0],a],content:i.content.slice(a-u),struct:"Insert"};return t.waiting.push(c),void i.content.splice(s-u)}}else{if(s===u){if(l<a){n.length=a-l,n.target=[n.target[0],l],i.content=[];continue}return l===a?void t.waiting.splice(r,1):(i.content=i.content.slice(a-u),void(i.id=[i.id[0],a]))}if(u<a){if(l<a)return t.waiting.splice(r,1),e({target:[n.target[0],s],length:u-s,struct:"Delete"}),void e({target:[n.target[0],l],length:l-a,struct:"Delete"});if(l===a){t.waiting.splice(r,1),r--,n.length-=o;continue}n.length=u-s,i.content.splice(0,a-u),i.id=[i.id[0],a];continue}}}}t.waiting.push(n)};null==e.key?n(e):this.waiting.push(e)}else this.waiting.push(e)}awaitAndPrematurelyCall(t){this.awaiting++,t.map(e.utils.copyOperation).forEach(this.onevent)}*awaitOps(t,n,r){function i(t){for(var n=[];t.length>0;)for(var r=0;r<t.length;r++){for(var i=!0,o=0;o<t.length;o++)if(e.utils.matchesId(t[o],t[r].left)){i=!1;break}i&&(n.push(t.splice(r,1)[0]),r--)}return n}var o=this.waiting.length;if(yield*n.apply(t,r),this.waiting.splice(o),this.awaiting>0&&this.awaiting--,0===this.awaiting&&this.waiting.length>0){for(let n=0;n<this.waiting.length;n++){var s=this.waiting[n];if("Insert"===s.struct){var a=yield*t.getInsertion(s.id);if(null!=a.parentSub&&null!=a.left)this.waiting.splice(n,1),n--;else if(e.utils.compareIds(a.id,s.id))if(null==a.left)s.left=null;else{for(var u=yield*t.getInsertion(a.left);null!=u.deleted;){if(null==u.left){u=null;break}u=yield*t.getInsertion(u.left)}s.left=null!=u?e.utils.getLastId(u):null}else s.left=[s.id[0],s.id[1]-1]}}if(null!=this._pullChanges&&this._pullChanges(),0===this.awaiting){var l=[],c=[];this.waiting.forEach(function(e){"Delete"===e.struct?c.push(e):l.push(e)}),this.waiting=[],l=i(l);for(var f=0;f<l.length;f++){if(0!==this.awaiting){this.waiting=this.waiting.concat(l.slice(f));break}this.onevent(l[f])}for(f=0;f<c.length;f++){if(0!==this.awaiting){this.waiting=this.waiting.concat(c.slice(f));break}this.onevent(c[f])}}}}awaitedInserts(t){for(var n=this.waiting.splice(this.waiting.length-t),r=0;r<n.length;r++){var i=n[r];if("Insert"!==i.struct)throw new Error("Expected Insert Operation!");for(var o=this.waiting.length-1;o>=0;o--){let t=this.waiting[o];"Insert"===t.struct&&(e.utils.matchesId(t,i.left)?(t.right=i.id,i.left=t.left):e.utils.compareIds(t.id,i.right)&&(t.left=e.utils.getLastId(i),i.right=t.right))}}this._tryCallEvents(t)}awaitedDeletes(t,n){for(var r=this.waiting.splice(this.waiting.length-t),i=0;i<r.length;i++){var o=r[i];if("Delete"!==o.struct)throw new Error("Expected Delete Operation!");if(null!=n)for(var s=0;s<this.waiting.length;s++){let t=this.waiting[s];"Insert"===t.struct&&e.utils.compareIds(o.target,t.left)&&(t.left=n)}}this._tryCallEvents(t)}_tryCallEvents(){function t(t){for(var n=[];t.length>0;)for(var r=0;r<t.length;r++){for(var i=!0,o=0;o<t.length;o++)if(e.utils.matchesId(t[o],t[r].left)){i=!1;break}i&&(n.push(t.splice(r,1)[0]),r--)}return n}if(this.awaiting>0&&this.awaiting--,0===this.awaiting&&this.waiting.length>0){var n=[],r=[];this.waiting.forEach(function(e){"Delete"===e.struct?r.push(e):n.push(e)}),n=t(n),n.forEach(this.onevent),r.forEach(this.onevent),this.waiting=[]}}}e.utils.EventHandler=n;class r{getPath(){var e=null;if(null!=this._parent&&(e=this.os.getType(this._parent)),null!=e&&null!=e._getPathToChild){var t=e._getPathToChild(this._model),n=e.getPath();return n.push(t),n}return[]}}e.utils.CustomType=r;class i{constructor(e){if(null==e.struct||null==e.initType||null==e.class||null==e.name||null==e.createType)throw new Error("Custom type was not initialized correctly!");this.struct=e.struct,this.initType=e.initType,this.createType=e.createType,this.class=e.class,this.name=e.name,null!=e.appendAdditionalInfo&&(this.appendAdditionalInfo=e.appendAdditionalInfo),this.parseArguments=(e.parseArguments||function(){return[this]}).bind(this),this.parseArguments.typeDefinition=this}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function s(e){return e=o(e),null!=e.content&&(e.content=e.content.map(function(e){return e})),e}function a(e,t){return e[0]<t[0]||e[0]===t[0]&&(e[1]<t[1]||typeof e[1]<typeof t[1])}function u(e,t){return e.target[0]===t[0]&&e.target[1]<=t[1]&&t[1]<e.target[1]+(e.length||1)}function l(e,t){return null==e||null==t?e===t:e[0]===t[0]&&e[1]===t[1]}function c(e,t){return null==t||null==e?t===e:t[0]===e.id[0]?null==e.content?t[1]===e.id[1]:t[1]>=e.id[1]&&t[1]<e.id[1]+e.content.length:void 0}function f(e){return null==e.content||1===e.content.length?e.id:[e.id[0],e.id[1]+e.content.length-1]}function h(e){for(var t=new Array(e),n=0;n<t.length;n++)t[n]={id:[null,null]};return t}function p(e){class t extends e{constructor(e,t){super(e,t),this.writeBuffer=h(5),this.readBuffer=h(10)}*find(e,t){var n,r,i;for(n=this.readBuffer.length-1;n>=0;n--)if(r=this.readBuffer[n],r.id[1]===e[1]&&r.id[0]===e[0]){for(;n<this.readBuffer.length-1;n++)this.readBuffer[n]=this.readBuffer[n+1];return this.readBuffer[this.readBuffer.length-1]=r,r}for(n=this.writeBuffer.length-1;n>=0;n--)if(r=this.writeBuffer[n],r.id[1]===e[1]&&r.id[0]===e[0]){i=r;break}if(n<0&&void 0===t&&(i=yield*super.find(e)),null!=i){for(n=0;n<this.readBuffer.length-1;n++)this.readBuffer[n]=this.readBuffer[n+1];this.readBuffer[this.readBuffer.length-1]=i}return i}*put(e){var t=e.id,n,r;for(n=this.writeBuffer.length-1;n>=0;n--)if(r=this.writeBuffer[n],r.id[1]===t[1]&&r.id[0]===t[0]){for(;n<this.writeBuffer.length-1;n++)this.writeBuffer[n]=this.writeBuffer[n+1];this.writeBuffer[this.writeBuffer.length-1]=e;break}if(n<0){var i=this.writeBuffer[0];for(null!==i.id[0]&&(yield*super.put(i)),n=0;n<this.writeBuffer.length-1;n++)this.writeBuffer[n]=this.writeBuffer[n+1];this.writeBuffer[this.writeBuffer.length-1]=e}for(n=0;n<this.readBuffer.length-1;n++)r=this.readBuffer[n+1],r.id[1]===t[1]&&r.id[0]===t[0]?this.readBuffer[n]=e:this.readBuffer[n]=r;this.readBuffer[this.readBuffer.length-1]=e}*delete(e){var t,n;for(t=0;t<this.readBuffer.length;t++)n=this.readBuffer[t],n.id[1]===e[1]&&n.id[0]===e[0]&&(this.readBuffer[t]={id:[null,null]});yield*this.flush(),yield*super.delete(e)}*findWithLowerBound(e){var t=yield*this.find(e,!0);return null!=t?t:(yield*this.flush(),yield*super.findWithLowerBound.apply(this,arguments))}*findWithUpperBound(e){var t=yield*this.find(e,!0);return null!=t?t:(yield*this.flush(),yield*super.findWithUpperBound.apply(this,arguments))}*findNext(){return yield*this.flush(),yield*super.findNext.apply(this,arguments)}*findPrev(){return yield*this.flush(),yield*super.findPrev.apply(this,arguments)}*iterate(){yield*this.flush(),yield*super.iterate.apply(this,arguments)}*flush(){for(var e=0;e<this.writeBuffer.length;e++){var t=this.writeBuffer[e];null!==t.id[0]&&(yield*super.put(t),this.writeBuffer[e]={id:[null,null]})}}}return t}function d(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,d)}e.utils.CustomTypeDefinition=i,e.utils.isTypeDefinition=function t(n){if(null!=n){if(n instanceof e.utils.CustomTypeDefinition)return[n];if(n.constructor===Array&&n[0]instanceof e.utils.CustomTypeDefinition)return n;if(n instanceof Function&&n.typeDefinition instanceof e.utils.CustomTypeDefinition)return[n.typeDefinition]}return!1},e.utils.copyObject=o,e.utils.copyOperation=s,e.utils.smaller=a,e.utils.inDeletionRange=u,e.utils.compareIds=l,e.utils.matchesId=c,e.utils.getLastId=f,e.utils.createSmallLookupBuffer=p,e.utils.generateGuid=d}},function(e,t,n){"use strict";e.exports=function(e){var t={users:{},buffers:{},removeUser:function(e){for(var t in this.users)this.users[t].userLeft(e);delete this.users[e],delete this.buffers[e]},addUser:function(e){for(var t in this.users[e.userId]=e,this.buffers[e.userId]={},this.users)if(t!==e.userId){var n=this.users[t];n.userJoined(e.userId,"master"),e.userJoined(n.userId,"master")}},whenTransactionsFinished:function(){var e=this;return new Promise(function(t,n){setTimeout(function(){var r=[];for(var i in e.users)r.push(e.users[i].y.db.whenTransactionsFinished());Promise.all(r).then(t,n)},10)})},flushOne:function e(){var n=[];for(var r in t.buffers){let e=t.buffers[r];var i=!1;for(let t in e)if(e[t].length>0){i=!0;break}i&&n.push(r)}if(n.length>0){var o=getRandom(n);let e=t.buffers[o],r=getRandom(Object.keys(e));var s=e[r].shift();0===e[r].length&&delete e[r];var a=t.users[o];return a.receiveMessage(s[0],s[1]).then(function(){return a.y.db.whenTransactionsFinished()},function(){})}return!1},flushAll:function(){return new Promise(function(e){function n(){var r=t.flushOne();if(r){for(;r;)r=t.flushOne();t.whenTransactionsFinished().then(n)}else r=t.flushOne(),r?r.then(function(){t.whenTransactionsFinished().then(n)}):e()}t.whenTransactionsFinished().then(n)})}};e.utils.globalRoom=t;var n=0;class r extends e.AbstractConnector{constructor(e,r){if(void 0===r)throw new Error("Options must not be undefined!");r.role="master",r.forwardToSyncingClients=!1,super(e,r),this.setUserId(n+++"").then(()=>{t.addUser(this)}),this.globalRoom=t,this.syncingClientDuration=0}receiveMessage(e,t){return super.receiveMessage(e,JSON.parse(JSON.stringify(t)))}send(e,n){var r=t.buffers[e];null!=r&&(null==r[this.userId]&&(r[this.userId]=[]),r[this.userId].push(JSON.parse(JSON.stringify([this.userId,n]))))}broadcast(e){for(var n in t.buffers){var r=t.buffers[n];null==r[this.userId]&&(r[this.userId]=[]),r[this.userId].push(JSON.parse(JSON.stringify([this.userId,e])))}}isDisconnected(){return null==t.users[this.userId]}reconnect(){return this.isDisconnected()&&(t.addUser(this),super.reconnect()),e.utils.globalRoom.flushAll()}disconnect(){var e=Promise.resolve();this.isDisconnected()||(t.removeUser(this.userId),e=super.disconnect());var n=this;return e.then(function(){return n.y.db.whenTransactionsFinished()})}flush(){var e=this;return async(function*(){for(var n=t.buffers[e.userId];Object.keys(n).length>0;){var r=getRandom(Object.keys(n)),i=n[r].shift();0===n[r].length&&delete n[r],yield this.receiveMessage(i[0],i[1])}yield e.whenTransactionsFinished()})}}e.Test=r}},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1697),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t,n){var r;function i(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function o(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=n.log||t.log||console.log.bind(console);l.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=i(e),"function"==typeof t.init&&t.init(n),n}function s(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function u(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o.debug=o.default=o,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1698),t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1699},function(e,t,n){"use strict";function r(e){n(1701)(e);class t extends e.Transaction{constructor(e){super(e),this.store=e,this.ss=e.ss,this.os=e.os,this.ds=e.ds}}var r=e.utils.RBTree,i=e.utils.createSmallLookupBuffer(r);class o extends e.AbstractDatabase{constructor(e,t){super(e,t),this.os=new i,this.ds=new r,this.ss=new i}logTable(){var e=this;this.requestTransaction(function*(){console.log("User: ",this.store.y.connector.userId,"=============================="),console.log("State Set (SS):",yield*this.getStateSet()),console.log("Operation Store (OS):"),yield*this.os.logTable(),console.log("Deletion Store (DS):"),yield*this.ds.logTable(),(this.store.gc1.length>0||this.store.gc2.length>0)&&console.warn("GC1|2 not empty!",this.store.gc1,this.store.gc2),"{}"!==JSON.stringify(this.store.listenersById)&&console.warn("listenersById not empty!"),"[]"!==JSON.stringify(this.store.listenersByIdExecuteNow)&&console.warn("listenersByIdExecuteNow not empty!"),this.store.transactionInProgress&&console.warn("Transaction still in progress!")},!0)}transact(e){for(var n=new t(this);null!==e;){for(var r=e.call(n),i=r.next();!i.done;)i=r.next(i.value);e=this.getNextRequest()}}*destroy(){yield*super.destroy(),delete this.os,delete this.ss,delete this.ds}}e.extend("memory",o)}e.exports=r,"undefined"!=typeof Y&&r(Y)},function(e,t,n){"use strict";e.exports=function(e){class t{constructor(e){if(this.val=e,this.color=!0,this._left=null,this._right=null,this._parent=null,null===e.id)throw new Error("You must define id!")}isRed(){return this.color}isBlack(){return!this.color}redden(){return this.color=!0,this}blacken(){return this.color=!1,this}get grandparent(){return this.parent.parent}get parent(){return this._parent}get sibling(){return this===this.parent.left?this.parent.right:this.parent.left}get left(){return this._left}get right(){return this._right}set left(e){null!==e&&(e._parent=this),this._left=e}set right(e){null!==e&&(e._parent=this),this._right=e}rotateLeft(e){var t=this.parent,n=this.right,r=this.right.left;if(n.left=this,this.right=r,null===t)e.root=n,n._parent=null;else if(t.left===this)t.left=n;else{if(t.right!==this)throw new Error("The elements are wrongly connected!");t.right=n}}next(){if(null!==this.right){for(var e=this.right;null!==e.left;)e=e.left;return e}for(var t=this;null!==t.parent&&t!==t.parent.left;)t=t.parent;return t.parent}prev(){if(null!==this.left){for(var e=this.left;null!==e.right;)e=e.right;return e}for(var t=this;null!==t.parent&&t!==t.parent.right;)t=t.parent;return t.parent}rotateRight(e){var t=this.parent,n=this.left,r=this.left.right;if(n.right=this,this.left=r,null===t)e.root=n,n._parent=null;else if(t.left===this)t.left=n;else{if(t.right!==this)throw new Error("The elements are wrongly connected!");t.right=n}}getUncle(){return this.parent===this.parent.parent.left?this.parent.parent.right:this.parent.parent.left}}class n{constructor(){this.root=null,this.length=0}*findNext(e){return yield*this.findWithLowerBound([e[0],e[1]+1])}*findPrev(e){return yield*this.findWithUpperBound([e[0],e[1]-1])}findNodeWithLowerBound(t){if(void 0===t)throw new Error("You must define from!");var n=this.root;if(null===n)return null;for(;;)if(null!==t&&!e.utils.smaller(t,n.val.id)||null===n.left){if(null===t||!e.utils.smaller(n.val.id,t))return n;if(null===n.right)return n.next();n=n.right}else n=n.left}findNodeWithUpperBound(t){if(void 0===t)throw new Error("You must define from!");var n=this.root;if(null===n)return null;for(;;)if(null!==t&&!e.utils.smaller(n.val.id,t)||null===n.right){if(null===t||!e.utils.smaller(t,n.val.id))return n;if(null===n.left)return n.prev();n=n.left}else n=n.right}findSmallestNode(){for(var e=this.root;null!=e&&null!=e.left;)e=e.left;return e}*findWithLowerBound(e){var t=this.findNodeWithLowerBound(e);return null==t?null:t.val}*findWithUpperBound(e){var t=this.findNodeWithUpperBound(e);return null==t?null:t.val}*iterate(t,n,r,i){var o;for(o=null===n?this.findSmallestNode():this.findNodeWithLowerBound(n);null!==o&&(null===r||e.utils.smaller(o.val.id,r)||e.utils.compareIds(o.val.id,r));)yield*i.call(t,o.val),o=o.next();return!0}*logTable(e,t,n){null==n&&(n=function(){return!0}),null==e&&(e=null),null==t&&(t=null);var r=[];yield*this.iterate(this,e,t,function*(e){if(n(e)){var t={};for(var i in e)"object"==typeof e[i]?t[i]=JSON.stringify(e[i]):t[i]=e[i];r.push(t)}}),null!=console.table&&console.table(r)}*find(e){var t;return(t=this.findNode(e))?t.val:null}findNode(t){if(null==t||t.constructor!==Array)throw new Error("Expect id to be an array!");var n=this.root;if(null===n)return!1;for(;;){if(null===n)return!1;if(e.utils.smaller(t,n.val.id))n=n.left;else{if(!e.utils.smaller(n.val.id,t))return n;n=n.right}}}*delete(e){if(null==e||e.constructor!==Array)throw new Error("id is expected to be an Array!");var n=this.findNode(e);if(null!=n){if(this.length--,null!==n.left&&null!==n.right){for(var r=n.left;null!==r.right;)r=r.right;n.val=r.val,n=r}var i,o=n.left||n.right;if(null===o?(i=!0,o=new t({id:0}),o.blacken(),n.right=o):i=!1,null!==n.parent){if(n.parent.left===n)n.parent.left=o;else{if(n.parent.right!==n)throw new Error("Impossible!");n.parent.right=o}if(n.isBlack()&&(o.isRed()?o.blacken():this._fixDelete(o)),this.root.blacken(),i)if(o.parent.left===o)o.parent.left=null;else{if(o.parent.right!==o)throw new Error("Impossible #3");o.parent.right=null}}else i?this.root=null:(this.root=o,o.blacken(),o._parent=null)}}_fixDelete(e){function t(e){return null===e||e.isBlack()}function n(e){return null!==e&&e.isRed()}if(null!==e.parent){var r=e.sibling;if(n(r)){if(e.parent.redden(),r.blacken(),e===e.parent.left)e.parent.rotateLeft(this);else{if(e!==e.parent.right)throw new Error("Impossible #2");e.parent.rotateRight(this)}r=e.sibling}e.parent.isBlack()&&r.isBlack()&&t(r.left)&&t(r.right)?(r.redden(),this._fixDelete(e.parent)):e.parent.isRed()&&r.isBlack()&&t(r.left)&&t(r.right)?(r.redden(),e.parent.blacken()):(e===e.parent.left&&r.isBlack()&&n(r.left)&&t(r.right)?(r.redden(),r.left.blacken(),r.rotateRight(this),r=e.sibling):e===e.parent.right&&r.isBlack()&&n(r.right)&&t(r.left)&&(r.redden(),r.right.blacken(),r.rotateLeft(this),r=e.sibling),r.color=e.parent.color,e.parent.blacken(),e===e.parent.left?(r.right.blacken(),e.parent.rotateLeft(this)):(r.left.blacken(),e.parent.rotateRight(this)))}}*put(n){if(null==n||null==n.id||n.id.constructor!==Array)throw new Error("v is expected to have an id property which is an Array!");var r=new t(n);if(null!==this.root){for(var i=this.root;;)if(e.utils.smaller(r.val.id,i.val.id)){if(null===i.left){i.left=r;break}i=i.left}else{if(!e.utils.smaller(i.val.id,r.val.id))return i.val=r.val,i;if(null===i.right){i.right=r;break}i=i.right}this._fixInsert(r)}else this.root=r;return this.length++,this.root.blacken(),r}_fixInsert(e){if(null!==e.parent){if(!e.parent.isBlack()){var t=e.getUncle();null!==t&&t.isRed()?(e.parent.blacken(),t.blacken(),e.grandparent.redden(),this._fixInsert(e.grandparent)):(e===e.parent.right&&e.parent===e.grandparent.left?(e.parent.rotateLeft(this),e=e.left):e===e.parent.left&&e.parent===e.grandparent.right&&(e.parent.rotateRight(this),e=e.right),e.parent.blacken(),e.grandparent.redden(),e===e.parent.left?e.grandparent.rotateRight(this):e.grandparent.rotateLeft(this))}}else e.blacken()}*flush(){}}e.utils.RBTree=n}},function(e,t,n){"use strict";function r(e){class t extends e.utils.CustomType{constructor(t,n,r){super(),this.os=t,this._model=n,this._content=r,this._parent=null,this._deepEventHandler=new e.utils.EventListenerHandler,this.eventHandler=new e.utils.EventHandler(t=>{if("Insert"===t.struct){if(this._content.some(function(n){return e.utils.compareIds(n.id,t.id)}))return;let o;if(null===t.left)o=0;else if(o=1+this._content.findIndex(function(n){return e.utils.compareIds(n.id,t.left)}),o<=0)throw new Error("Unexpected operation!");var n,r;if(t.hasOwnProperty("opContent")){this._content.splice(o,0,{id:t.id,type:t.opContent}),r=1;let e=this.os.getType(t.opContent);e._parent=this._model,n=[e]}else{var i=t.content.map(function(e,n){return{id:[t.id[0],t.id[1]+n],val:e}});i.length<3e4?this._content.splice.apply(this._content,[o,0].concat(i)):this._content=this._content.slice(0,o).concat(i).concat(this._content.slice(o)),n=t.content,r=t.content.length}e.utils.bubbleEvent(this,{type:"insert",object:this,index:o,values:n,length:r})}else{if("Delete"!==t.struct)throw new Error("Unexpected struct!");for(var o=0;o<this._content.length&&t.length>0;o++){var s=this._content[o];if(e.utils.inDeletionRange(t,s.id)){var a;for(a=1;a<t.length&&o+a<this._content.length&&e.utils.inDeletionRange(t,this._content[o+a].id);a++);s=this._content[o+a-1],t.length-=s.id[1]-t.target[1]+1,t.target=[s.id[0],s.id[1]+1];let n=this._content.splice(o,a),r=n.map(e=>null!=e.val?e.val:this.os.getType(e.type));e.utils.bubbleEvent(this,{type:"delete",object:this,index:o,values:r,_content:n,length:a})}}}})}_getPathToChild(t){return this._content.findIndex(n=>null!=n.type&&e.utils.compareIds(n.type,t))}_destroy(){this.eventHandler.destroy(),this.eventHandler=null,this._content=null,this._model=null,this._parent=null,this.os=null}get length(){return this._content.length}get(e){if(null==e||"number"!=typeof e)throw new Error("pos must be a number!");if(!(e>=this._content.length))return null==this._content[e].type?this._content[e].val:this.os.getType(this._content[e].type)}toArray(){return this._content.map((e,t)=>null!=e.type?this.os.getType(e.type):e.val)}push(e){return this.insert(this._content.length,e)}insert(t,n){if("number"!=typeof t)throw new Error("pos must be a number!");if(!Array.isArray(n))throw new Error("contents must be an Array of objects!");if(0!==n.length){if(t>this._content.length||t<0)throw new Error("This position exceeds the range of the array!");for(var r=0===t?null:this._content[t-1].id,i=[],o=r,s=0;s<n.length;){for(var a={left:o,origin:o,parent:this._model,struct:"Insert"},u=[],l;s<n.length;){var c=n[s++];if(l=e.utils.isTypeDefinition(c),l){if(u.length>0){s--;break}break}u.push(c)}if(u.length>0)a.content=u,a.id=this.os.getNextOpId(u.length);else{var f=this.os.getNextOpId(1);this.os.createType(l,f),a.opContent=f,a.id=this.os.getNextOpId(1)}i.push(a),o=a.id}var h=this.eventHandler;this.os.requestTransaction(function*(){var e;if(null!=r){var t=yield*this.getInsertionCleanEnd(r);e=t.right}else e=(yield*this.getOperation(i[0].parent)).start;for(var n=0;n<i.length;n++){var o=i[n];o.right=e}yield*h.awaitOps(this,this.applyCreatedOperations,[i])}),h.awaitAndPrematurelyCall(i)}}delete(t,n){if(null==n&&(n=1),"number"!=typeof n)throw new Error("length must be a number!");if("number"!=typeof t)throw new Error("pos must be a number!");if(t+n>this._content.length||t<0||n<0)throw new Error("The deletion range exceeds the range of the array!");if(0!==n){for(var r=this.eventHandler,i=[],o=0;o<n;o+=a){var s=this._content[t+o].id,a;for(a=1;o+a<n&&e.utils.compareIds(this._content[t+o+a].id,[s[0],s[1]+a]);a++);i.push({target:s,struct:"Delete",length:a})}this.os.requestTransaction(function*(){yield*r.awaitOps(this,this.applyCreatedOperations,[i])}),r.awaitAndPrematurelyCall(i)}}observe(e){this.eventHandler.addEventListener(e)}observeDeep(e){this._deepEventHandler.addEventListener(e)}unobserve(e){this.eventHandler.removeEventListener(e)}unobserveDeep(e){this._deepEventHandler.removeEventListener(e)}*_changed(e,t){if(!t.deleted){if("Insert"===t.struct){for(var n=t.left,r;null!=n&&(r=yield*e.getInsertion(n),r.deleted);)n=r.left;t.left=n,null!=t.opContent&&(yield*e.store.initType.call(e,t.opContent))}this.eventHandler.receivedOp(t)}}}e.extend("Array",new e.utils.CustomTypeDefinition({name:"Array",class:t,struct:"List",initType:function*n(r,i){var o=[],s=[];yield*e.Struct.List.map.call(this,i,function(e){e.hasOwnProperty("opContent")?(o.push({id:e.id,type:e.opContent}),s.push(e.opContent)):e.content.forEach(function(t,n){o.push({id:[e.id[0],e.id[1]+n],val:e.content[n]})})});for(var a=0;a<s.length;a++){var u=yield*this.store.initType.call(this,s[a]);u._parent=i.id}return new t(r,i.id,o)},createType:function e(n,r){return new t(n,r.id,[])}}))}e.exports=r,"undefined"!=typeof Y&&r(Y)},function(e,t,n){"use strict";var r=n(1704),i={major:0,minor:0};function o(e){e.requestModules(["Array"]).then(function(){class t extends e.Array.typeDefinition.class{constructor(e,t,n){super(e,t,n),this.textfields=[],this.aceInstances=[],this.codeMirrorInstances=[],this.monacoInstances=[]}toString(){return this._content.map(function(e){return e.val}).join("")}insert(e,t){for(var n=t.split(""),r=0;r<n.length;r++)/[\uD800-\uDFFF]/.test(n[r])&&(n[r]=n[r]+n[r+1],n[r+1]="",r++);super.insert(e,n)}delete(e,t){if(null==t&&(t=1),"number"!=typeof t)throw new Error("length must be a number!");if("number"!=typeof e)throw new Error("pos must be a number!");if(e+t>this._content.length||e<0||t<0)throw new Error("The deletion range exceeds the range of the array!");if(0!==t)if(this._content.length>e+t&&""===this._content[e+t].val&&2===this._content[e+t-1].val.length){let n=this._content[e+t-1].val[0];super.delete(e,t+1),super.insert(e,[n])}else if(e>0&&""===this._content[e].val&&2===this._content[e-1].val.length){let n=this._content[e-1].val[1];super.delete(e-1,t+1),super.insert(e-1,[n])}else super.delete(e,t)}unbindAll(){this.unbindTextareaAll(),this.unbindAceAll(),this.unbindCodeMirrorAll(),this.unbindMonacoAll()}unbindMonaco(e){var t=this.monacoInstances.findIndex(function(t){return t.editor===e});if(t>=0){var n=this.monacoInstances[t];this.unobserve(n.yCallback),n.disposeBinding(),this.monacoInstances.splice(t,1)}}unbindMonacoAll(){for(let e=this.monacoInstances.length-1;e>=0;e--)this.unbindMonaco(this.monacoInstances[e].editor)}bindMonaco(e,t){var n=this;t=t||{};var r=!0;function o(e){if(r){r=!1;try{e()}catch(e){throw r=!0,new Error(e)}r=!0}}function s(e){o(function(){for(var t=0,r=1;r<e.range.startLineNumber;t++)"\n"===n._content[t].val&&r++;var i=t+e.range.startColumn-1;e.rangeLength>0&&n.delete(i,e.rangeLength),n.insert(i,e.text)})}e.setValue(this.toString());var a=e.onDidChangeModelContent(s).dispose;function u(t){o(function(){let n=e.model.getPositionAt(t.index);var r,o;"insert"===t.type?(r=n,o=t.values.join("")):"delete"===t.type&&(r=e.model.modifyPosition(n,t.length),o="");var s={startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column},a={major:i.major,minor:i.minor++};e.executeEdits("Yjs",[{id:a,range:s,text:o,forceMoveMarkers:!0}])})}this.observe(u),this.monacoInstances.push({editor:e,yCallback:u,monacoCallback:s,disposeBinding:a})}unbindCodeMirror(e){var t=this.codeMirrorInstances.findIndex(function(t){return t.editor===e});if(t>=0){var n=this.codeMirrorInstances[t];this.unobserve(n.yCallback),n.editor.off("changes",n.codeMirrorCallback),this.codeMirrorInstances.splice(t,1)}}unbindCodeMirrorAll(){for(let e=this.codeMirrorInstances.length-1;e>=0;e--)this.unbindCodeMirror(this.codeMirrorInstances[e].editor)}bindCodeMirror(e,t){var n=this;t=t||{};var r=!0;function i(e){if(r){r=!1;try{e()}catch(e){throw r=!0,new Error(e)}r=!0}}function o(t,r){i(function(){for(var t=0;t<r.length;t++){var i=r[t],o=e.indexFromPos(i.from);if(i.removed.length>0){for(var s=0,a=0;a<i.removed.length;a++)s+=i.removed[a].length;s+=i.removed.length-1,n.delete(o,s)}n.insert(o,i.text.join("\n"))}})}function s(t){i(function(){let n=e.posFromIndex(t.index);if("insert"===t.type){let r=n;e.replaceRange(t.values.join(""),n,r)}else if("delete"===t.type){let r=e.posFromIndex(t.index+t.length);e.replaceRange("",n,r)}})}e.setValue(this.toString()),e.on("changes",o),this.observe(s),this.codeMirrorInstances.push({editor:e,yCallback:s,codeMirrorCallback:o})}unbindAce(e){var t=this.aceInstances.findIndex(function(t){return t.editor===e});if(t>=0){var n=this.aceInstances[t];this.unobserve(n.yCallback),n.editor.off("change",n.aceCallback),this.aceInstances.splice(t,1)}}unbindAceAll(){for(let e=this.aceInstances.length-1;e>=0;e--)this.unbindAce(this.aceInstances[e].editor)}bindAce(e,t){var n=this;t=t||{};var r=!0,i;function o(e){if(r){r=!1;try{e()}catch(e){throw r=!0,new Error(e)}r=!0}}function s(t){o(function(){var r,i,o=e.getSession().getDocument();"insert"===t.action?(r=o.positionToIndex(t.start,0),n.insert(r,t.lines.join("\n"))):"remove"===t.action&&(r=o.positionToIndex(t.start,0),i=t.lines.join("\n").length,n.delete(r,i))})}e.setValue(this.toString()),e.on("change",s),e.selection.clearSelection(),i="undefined"!=typeof ace&&null==t.aceClass?ace:t.aceClass;var a=t.aceRequire||i.require,u=a("ace/range").Range;function l(t){var n=e.getSession().getDocument();o(function(){if("insert"===t.type){let e=n.indexToPosition(t.index,0);n.insert(e,t.values.join(""))}else if("delete"===t.type){let r=n.indexToPosition(t.index,0),i=n.indexToPosition(t.index+t.length,0);var e=new u(r.row,r.column,i.row,i.column);n.remove(e)}})}this.observe(l),this.aceInstances.push({editor:e,yCallback:l,aceCallback:s})}bind(){var e=arguments[0];e instanceof Element?this.bindTextarea.apply(this,arguments):null!=e&&null!=e.session&&null!=e.getSession&&null!=e.setValue?this.bindAce.apply(this,arguments):null!=e&&null!=e.posFromIndex&&null!=e.replaceRange?this.bindCodeMirror.apply(this,arguments):null!=e&&null!=e.onDidChangeModelContent?this.bindMonaco.apply(this,arguments):console.error("Cannot bind, unsupported editor!")}unbindTextarea(e){var t=this.textfields.findIndex(function(t){return t.editor===e});if(t>=0){var n=this.textfields[t];this.unobserve(n.yCallback);var r=n.editor;r.removeEventListener("input",n.eventListener),this.textfields.splice(t,1)}}unbindTextareaAll(){for(let e=this.textfields.length-1;e>=0;e--)this.unbindTextarea(this.textfields[e].editor)}bindTextarea(e,t){t=t||window,null==t.getSelection&&(t=window);for(var n=0;n<this.textfields.length;n++)if(this.textfields[n].editor===e)return;var i=!0;function o(e){if(i){i=!1;try{e()}catch(e){throw i=!0,new Error(e)}i=!0}}var s=this,a,u,l,c;function f(e){o(()=>{var t,n;if("insert"===e.type){t=e.index,n=function(e){return e<=t?e:(e+=1,e)};var r=a(n);u(r)}else"delete"===e.type&&(t=e.index,n=function(e){return e<t?e:(e-=1,e)},r=a(n),u(r))})}e.value=this.toString(),null!=e.selectionStart&&null!=e.setSelectionRange?(a=function(t){var n=e.selectionStart,r=e.selectionEnd;return null!=t&&(n=t(n),r=t(r)),{left:n,right:r}},u=function(t){l(s.toString()),e.setSelectionRange(t.left,t.right)},l=function(t){e.value=t},c=function(){return e.value}):(a=function(n){var r={},i=t.getSelection(),o=e.textContent.length;r.left=Math.min(i.anchorOffset,o),r.right=Math.min(i.focusOffset,o),null!=n&&(r.left=n(r.left),r.right=n(r.right));var s=i.focusNode;return s===e||s===e.childNodes[0]?r.isReal=!0:r.isReal=!1,r},u=function(n){l(s.toString());var r=e.childNodes[0];if(n.isReal&&null!=r){n.left<0&&(n.left=0),n.right=Math.max(n.left,n.right),n.right>r.length&&(n.right=r.length),n.left=Math.min(n.left,n.right);var i=document.createRange();i.setStart(r,n.left),i.setEnd(r,n.right);var o=t.getSelection();o.removeAllRanges(),o.addRange(i)}},l=function(t){e.innerText=t},c=function(){return e.innerText}),l(this.toString()),this.observe(f);var h=function e(){o(function(){for(var e=a(function(e){return e}),t=s.toString(),n=c(),i=r(t,n,e.left),o=0,u=0;u<i.length;u++){var l=i[u];0===l[0]?o+=l[1].length:-1===l[0]?s.delete(o,l[1].length):(s.insert(o,l[1]),o+=l[1].length)}})};e.addEventListener("input",h),this.textfields.push({editor:e,yCallback:f,eventListener:h})}_destroy(){this.unbindAll(),this.textfields=null,this.aceInstances=null,super._destroy()}}e.extend("Text",new e.utils.CustomTypeDefinition({name:"Text",class:t,struct:"List",initType:function*n(r,i){var o=[];return yield*e.Struct.List.map.call(this,i,function(e){if(e.hasOwnProperty("opContent"))throw new Error("Text must not contain types!");e.content.forEach(function(t,n){o.push({id:[e.id[0],e.id[1]+n],val:e.content[n]})})}),new t(r,i.id,o)},createType:function e(n,r){return new t(n,r.id,[])}}))})}e.exports=o,"undefined"!=typeof Y&&o(Y)},function(e,t){var n=-1,r=1,i=0;function o(e,t,n,r){if(e===t)return e?[[i,e]]:[];if(null!=n){var o=v(e,t,n);if(o)return o}var a=l(e,t),u=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=c(e,t);var f=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var p=s(e,t);return u&&p.unshift([i,u]),f&&p.push([i,f]),h(p,r),p}function s(e,t){var s;if(!e)return[[r,t]];if(!t)return[[n,e]];var u=e.length>t.length?e:t,l=e.length>t.length?t:e,c=u.indexOf(l);if(-1!==c)return s=[[r,u.substring(0,c)],[i,l],[r,u.substring(c+l.length)]],e.length>t.length&&(s[0][0]=s[2][0]=n),s;if(1===l.length)return[[n,e],[r,t]];var h=f(e,t);if(h){var p=h[0],d=h[1],m=h[2],g=h[3],y=h[4],b=o(p,m),v=o(d,g);return b.concat([[i,y]],v)}return a(e,t)}function a(e,t){for(var i=e.length,o=t.length,s=Math.ceil((i+o)/2),a=s,l=2*s,c=new Array(l),f=new Array(l),h=0;h<l;h++)c[h]=-1,f[h]=-1;c[a+1]=0,f[a+1]=0;for(var p=i-o,d=p%2!=0,m=0,g=0,y=0,b=0,v=0;v<s;v++){for(var w=-v+m;w<=v-g;w+=2){var _=a+w,k;k=w===-v||w!==v&&c[_-1]<c[_+1]?c[_+1]:c[_-1]+1;for(var S=k-w;k<i&&S<o&&e.charAt(k)===t.charAt(S);)k++,S++;if(c[_]=k,k>i)g+=2;else if(S>o)m+=2;else if(d){var E=a+p-w;if(E>=0&&E<l&&-1!==f[E]){var x=i-f[E];if(k>=x)return u(e,t,k,S)}}}for(var C=-v+y;C<=v-b;C+=2){var E=a+C,x;x=C===-v||C!==v&&f[E-1]<f[E+1]?f[E+1]:f[E-1]+1;for(var A=x-C;x<i&&A<o&&e.charAt(i-x-1)===t.charAt(o-A-1);)x++,A++;if(f[E]=x,x>i)b+=2;else if(A>o)y+=2;else if(!d){var _=a+p-C;if(_>=0&&_<l&&-1!==c[_]){var k=c[_],S=a+k-_;if(x=i-x,k>=x)return u(e,t,k,S)}}}}return[[n,e],[r,t]]}function u(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),u=t.substring(r),l=o(i,s),c=o(a,u);return l.concat(c)}function l(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return p(e.charCodeAt(i-1))&&i--,i}function c(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return d(e.charCodeAt(e.length-i))&&i--,i}function f(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function i(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),i=-1,o="",s,a,u,f;-1!==(i=t.indexOf(r,i+1));){var h=l(e.substring(n),t.substring(i)),p=c(e.substring(0,n),t.substring(0,i));o.length<p+h&&(o=t.substring(i-p,i)+t.substring(i,i+h),s=e.substring(0,n-p),a=e.substring(n+h),u=t.substring(0,i-p),f=t.substring(i+h))}return 2*o.length>=e.length?[s,a,u,f,o]:null}var o=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),a,u,f,h,p;if(!o&&!s)return null;a=s?o&&o[4].length>s[4].length?o:s:o,e.length>t.length?(u=a[0],f=a[1],h=a[2],p=a[3]):(h=a[0],p=a[1],u=a[2],f=a[3]);var d=a[4];return[u,f,h,p,d]}function h(e,t){e.push([i,""]);for(var o=0,s=0,a=0,u="",f="",p;o<e.length;)if(o<e.length-1&&!e[o][1])e.splice(o,1);else switch(e[o][0]){case r:a++,f+=e[o][1],o++;break;case n:s++,u+=e[o][1],o++;break;case i:var d=o-a-s-1;if(t){if(d>=0&&g(e[d][1])){var y=e[d][1].slice(-1);if(e[d][1]=e[d][1].slice(0,-1),u=y+u,f=y+f,!e[d][1]){e.splice(d,1),o--;var b=d-1;e[b]&&e[b][0]===r&&(a++,f=e[b][1]+f,b--),e[b]&&e[b][0]===n&&(s++,u=e[b][1]+u,b--),d=b}}if(m(e[o][1])){var y=e[o][1].charAt(0);e[o][1]=e[o][1].slice(1),u+=y,f+=y}}if(o<e.length-1&&!e[o][1]){e.splice(o,1);break}if(u.length>0||f.length>0){u.length>0&&f.length>0&&(p=l(f,u),0!==p&&(d>=0?e[d][1]+=f.substring(0,p):(e.splice(0,0,[i,f.substring(0,p)]),o++),f=f.substring(p),u=u.substring(p)),p=c(f,u),0!==p&&(e[o][1]=f.substring(f.length-p)+e[o][1],f=f.substring(0,f.length-p),u=u.substring(0,u.length-p)));var v=a+s;0===u.length&&0===f.length?(e.splice(o-v,v),o-=v):0===u.length?(e.splice(o-v,v,[r,f]),o=o-v+1):0===f.length?(e.splice(o-v,v,[n,u]),o=o-v+1):(e.splice(o-v,v,[n,u],[r,f]),o=o-v+2)}0!==o&&e[o-1][0]===i?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,s=0,u="",f=""}""===e[e.length-1][1]&&e.pop();var w=!1;for(o=1;o<e.length-1;)e[o-1][0]===i&&e[o+1][0]===i&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)===e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),w=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),w=!0)),o++;w&&h(e,t)}function p(e){return e>=55296&&e<=56319}function d(e){return e>=56320&&e<=57343}function m(e){return d(e.charCodeAt(0))}function g(e){return p(e.charCodeAt(e.length-1))}function y(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function b(e,t,o,s){return g(e)||m(s)?null:y([[i,e],[n,t],[r,o],[i,s]])}function v(e,t,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,i="number"==typeof n?null:n.newRange,o=e.length,s=t.length;if(0===r.length&&(null===i||0===i.length)){var a=r.index,u=e.slice(0,a),l=e.slice(a),c=i?i.index:null,f=a+s-o;if((null===c||c===f)&&!(f<0||f>s)){var h=t.slice(0,f),p=t.slice(f);if(p===l){var d=Math.min(a,f),m=u.slice(0,d),g=h.slice(0,d);if(m===g){var y=u.slice(d),v=h.slice(d);return b(m,y,v,l)}}}if(null===c||c===a){var w=a,h=t.slice(0,w),p=t.slice(w);if(h===u){var _=Math.min(o-w,s-w),k=l.slice(l.length-_),S=p.slice(p.length-_);if(k===S){var y=l.slice(0,l.length-_),v=p.slice(0,p.length-_);return b(u,y,v,k)}}}}if(r.length>0&&i&&0===i.length){var m=e.slice(0,r.index),k=e.slice(r.index+r.length),d=m.length,_=k.length;if(!(s<d+_)){var g=t.slice(0,d),S=t.slice(s-_);if(m===g&&k===S){var y=e.slice(d,o-_),v=t.slice(d,s-_);return b(m,y,v,k)}}}return null}function w(e,t,n){return o(e,t,n,!0)}w.INSERT=r,w.DELETE=n,w.EQUAL=i,e.exports=w},function(e,t,n){"use strict";function r(e){class t extends e.utils.CustomType{constructor(t,n,r,i){super(),this._model=n.id,this._parent=null,this._deepEventHandler=new e.utils.EventListenerHandler,this.os=t,this.map=e.utils.copyObject(n.map),this.contents=r,this.opContents=i,this.eventHandler=new e.utils.EventHandler(t=>{var n,r="Delete"===t.struct?t.key:t.parentSub;if(n=null!=this.opContents[r]?this.os.getType(this.opContents[r]):this.contents[r],"Insert"===t.struct){var i;if(null===t.left&&!e.utils.compareIds(t.id,this.map[r]))null!=t.opContent?(i=this.os.getType(t.opContent),i._parent=this._model,delete this.contents[r],t.deleted?delete this.opContents[r]:this.opContents[r]=t.opContent):(i=t.content[0],delete this.opContents[r],t.deleted?delete this.contents[r]:this.contents[r]=t.content[0]),this.map[r]=t.id,void 0===n?e.utils.bubbleEvent(this,{name:r,object:this,type:"add",value:i}):e.utils.bubbleEvent(this,{name:r,object:this,oldValue:n,type:"update",value:i})}else{if("Delete"!==t.struct)throw new Error("Unexpected Operation!");e.utils.compareIds(this.map[r],t.target)&&(delete this.opContents[r],delete this.contents[r],e.utils.bubbleEvent(this,{name:r,object:this,oldValue:n,type:"delete"}))}})}_getPathToChild(t){return Object.keys(this.opContents).find(n=>e.utils.compareIds(this.opContents[n],t))}_destroy(){this.eventHandler.destroy(),this.eventHandler=null,this.contents=null,this.opContents=null,this._model=null,this._parent=null,this.os=null,this.map=null}get(e){if(null==e||"string"!=typeof e)throw new Error("You must specify a key (as string)!");return null==this.opContents[e]?this.contents[e]:this.os.getType(this.opContents[e])}keys(){return Object.keys(this.contents).concat(Object.keys(this.opContents))}keysPrimitives(){return Object.keys(this.contents)}keysTypes(){return Object.keys(this.opContents)}getPrimitive(t){if(null==t)return e.utils.copyObject(this.contents);if("string"!=typeof t)throw new Error("Key is expected to be a string!");return this.contents[t]}getType(e){if(null==e||"string"!=typeof e)throw new Error("You must specify a key (as string)!");return null!=this.opContents[e]?this.os.getType(this.opContents[e]):null}delete(t){var n=this.map[t];if(null!=n){var r={target:n,struct:"Delete"},i=this.eventHandler,o=e.utils.copyObject(r);o.key=t,this.os.requestTransaction(function*(){yield*i.awaitOps(this,this.applyCreatedOperations,[[r]])}),i.awaitAndPrematurelyCall([o])}}set(t,n){var r=this.map[t]||null,i={id:this.os.getNextOpId(1),left:null,right:r,origin:null,parent:this._model,parentSub:t,struct:"Insert"},o=this.eventHandler,s=e.utils.isTypeDefinition(n);if(!1!==s){var a=this.os.createType(s);return i.opContent=a._model,this.os.requestTransaction(function*(){yield*o.awaitOps(this,this.applyCreatedOperations,[[i]])}),o.awaitAndPrematurelyCall([i]),a}return i.content=[n],this.os.requestTransaction(function*(){yield*o.awaitOps(this,this.applyCreatedOperations,[[i]])}),o.awaitAndPrematurelyCall([i]),n}observe(e){this.eventHandler.addEventListener(e)}observeDeep(e){this._deepEventHandler.addEventListener(e)}unobserve(e){this.eventHandler.removeEventListener(e)}unobserveDeep(e){this._deepEventHandler.removeEventListener(e)}observePath(n,r){var i=this,o;function s(e){e.name===o&&r(i.get(o))}if(n.length<1)return r(this),function(){};if(1===n.length)return o=n[0],r(i.get(o)),this.observe(s),function(){i.unobserve(r)};var a,u=function(){var o=i.get(n[0]);o instanceof t||(o=i.set(n[0],e.Map)),a=o.observePath(n.slice(1),r)},l=function(e){e.name===n[0]&&(null!=a&&a(),"add"!==e.type&&"update"!==e.type||u())};return i.observe(l),u(),function(){null!=a&&a(),i.unobserve(l)}}*_changed(e,t){if("Delete"===t.struct){if(null==t.key){var n=yield*e.getOperation(t.target);t.key=n.parentSub}}else null!=t.opContent&&(yield*e.store.initType.call(e,t.opContent));this.eventHandler.receivedOp(t)}}e.extend("Map",new e.utils.CustomTypeDefinition({name:"Map",class:t,struct:"Map",initType:function*e(n,r){var i={},o={},s=r.map;for(var a in s){var u=yield*this.getOperation(s[a]);if(!u.deleted)if(null!=u.opContent){o[a]=u.opContent;var l=yield*this.store.initType.call(this,u.opContent);l._parent=r.id}else i[a]=u.content[0]}return new t(n,r,i,o)},createType:function e(n,r){return new t(n,r,{},{})}}))}e.exports=r,"undefined"!=typeof Y&&r(Y)},function(e,t,n){"use strict";const r=n(1707)("y-ipfs-connector"),i=n(6),o=n(1709),s=n(227),a=n(4).Buffer,u=n(1720),l=n(1721);function c(e){class t extends e.AbstractConnector{constructor(e,t){if(void 0===t)throw new Error("Options must not be undefined!");if(null==t.room)throw new Error("You must define a room name!");if(!t.ipfs)throw new Error("You must define a started IPFS object inside options");t.role||(t.role="master"),super(e,t),this._yConnectorOptions=t,this.ipfs=t.ipfs;const n=this.ipfsPubSubTopic="y-ipfs:rooms:"+t.room;this.roomEmitter=t.roomEmitter||new i,this.roomEmitter.peers=(()=>this._room.getPeers()),this.roomEmitter.id=(()=>n),this._receiveQueue=s(this._processQueue.bind(this),1),this._room=o(this.ipfs,n),this._room.setMaxListeners(1/0),this._room.on("error",e=>{console.error(e)}),this._room.on("message",e=>{if(this.ipfs._peerInfo&&e.from===this.ipfs._peerInfo.id.toB58String())return;const n=()=>{let n;n=this._yConnectorOptions.decode?this._yConnectorOptions.decode(e.data):l(e.data);const r=()=>{const t=l(n.payload);this.roomEmitter.emit("received message",e.from,t),null!==t.type&&this._queueReceiveMessage(e.from,t)};if(t.verifySignature){const i=n.signature&&a.from(n.signature,"base64");t.verifySignature.call(null,e.from,a.from(n.payload),i,(t,n)=>{t?console.error("Error verifying signature from peer "+e.from+". Discarding message.",t):n?r():console.error("Invalid signature from peer "+e.from+". Discarding message.")})}else r()};if(this._room.hasPeer(e.from))n();else{const t=r=>{r===e.from&&(this._room.removeListener("peer joined",t),n())};this._room.on("peer joined",t)}}),this._room.on("peer joined",e=>{this.roomEmitter.emit("peer joined",e),this.userJoined(e,"master")}),this._room.on("peer left",e=>{this.roomEmitter.emit("peer left",e),this.userLeft(e)}),this.ipfs.isOnline()?this._start():this.ipfs.once("ready",this._start.bind(this))}_queueReceiveMessage(e,t){this._receiveQueue.push({from:e,message:t})}_processQueue(e,t){const n=e.from,r=e.message;n===this._ipfsUserId?t():this._room.hasPeer(n)?(this.receiveMessage(n,r),t()):(this._receiveQueue.unshift(e),setTimeout(t,500))}_start(){const e=this.ipfs._peerInfo.id.toB58String();this._ipfsUserId=e,this.setUserId(e)}disconnect(){r("disconnect"),this._room.leave(),super.disconnect()}send(e,t){this._encodeMessage(t,(n,r)=>{if(n)throw n;this._yConnectorOptions.encode&&(r=this._yConnectorOptions.encode(r)),this._room.sendTo(e,r),this.roomEmitter.emit("sent message",e,t)})}broadcast(e){this._encodeMessage(e,(t,n)=>{if(t)throw t;this._yConnectorOptions.encode&&(n=this._yConnectorOptions.encode(n)),this._room.broadcast(n),this.roomEmitter.emit("sent message","broadcast",e)})}isDisconnected(){return!1}_encodeMessage(e,t){const n=f(e);this._yConnectorOptions.sign?this._yConnectorOptions.sign(a.from(n),(e,r)=>{if(e)return t(e);const i=r.toString("base64");t(null,u({signature:i,payload:n}))}):t(null,u({payload:n}))}}e.extend("ipfs",t)}function f(e){return JSON.stringify(e)}e.exports=c,"undefined"!=typeof Y&&c(Y)},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1708)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){"use strict";(function(t){const r=n(1710),i=n(6),o=n(1715),s=n(651),a=n(652),u=n(1717),l=n(653),c=n(1719),f=n(654),h={pollInterval:1e3};e.exports=((e,t,n)=>new p(e,t,n));class p extends i{constructor(e,t,n){if(super(),this._ipfs=e,this._topic=t,this._options=Object.assign({},s(h),s(n)),this._peers=[],this._connections={},this._handleDirectMessage=this._handleDirectMessage.bind(this),!this._ipfs.pubsub)throw new Error("This IPFS node does not have pubsub.");this._ipfs.isOnline()?this._start():this._ipfs.on("ready",this._start.bind(this)),this._ipfs.on("stop",this.leave.bind(this))}getPeers(){return this._peers.slice(0)}hasPeer(e){return this._peers.indexOf(e)>=0}leave(){return new Promise((e,t)=>{o.clearInterval(this._interval),Object.keys(this._connections).forEach(e=>{this._connections[e].stop()}),c.emitter.removeListener(this._topic,this._handleDirectMessage),this.once("stopped",()=>e()),this.emit("stopping")})}broadcast(e){let t=l(e);this._ipfs.pubsub.publish(this._topic,t,e=>{e&&this.emit("error",e)})}sendTo(e,n){let r=this._connections[e];r||(r=new u(e,this._ipfs,this),r.on("error",e=>this.emit("error",e)),this._connections[e]=r,r.once("disconnect",()=>{delete this._connections[e],this._peers=this._peers.filter(t=>t!==e),this.emit("peer left",e)}));const i=t.from([0]),o={to:e,from:this._ipfs._peerInfo.id.toB58String(),data:t.from(n).toString("hex"),seqno:i.toString("hex"),topicIDs:[this._topic],topicCIDs:[this._topic]};r.push(t.from(JSON.stringify(o)))}_start(){this._interval=o.setInterval(this._pollPeers.bind(this),this._options.pollInterval);const e=this._onMessage.bind(this);this._ipfs.pubsub.subscribe(this._topic,e,{},e=>{e?this.emit("error",e):this.emit("subscribed",this._topic)}),this.once("stopping",()=>{this._ipfs.pubsub.unsubscribe(this._topic,e,e=>{e?this.emit("error",e):this.emit("stopped")})}),f(this._ipfs).handle(a,c.handler),c.emitter.on(this._topic,this._handleDirectMessage)}_pollPeers(){this._ipfs.pubsub.peers(this._topic,(e,t)=>{if(e)return void this.emit("error",e);const n=t.sort();this._emitChanges(n)&&(this._peers=n)})}_emitChanges(e){const t=r(this._peers,e);return t.added.forEach(e=>this.emit("peer joined",e)),t.removed.forEach(e=>this.emit("peer left",e)),t.added.length>0||t.removed.length>0}_onMessage(e){this.emit("message",e)}_handleDirectMessage(e){if(e.to===this._ipfs._peerInfo.id.toB58String()){const t=Object.assign({},e);delete t.to,this.emit("message",t)}}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";const r=n(651),i=n(1711)("hyperdiff"),o=n(1714),s=e=>-1!==e;function a(){return{common:[],removed:[]}}function u(e,t,n){return n.every(n=>t[n]===e[n])}function l(e,t){return e.indexOf(t)}function c(e,t,n){return e.findIndex(function(e){return u(e,t,n)})}function f(e,t){return{first:e,second:r(t)}}function h(e,t){return t?c:l}function p(e,t,n){const r=n?[].concat(n):[],{first:a,second:u}=f(e,t),l=h(r,n);i("preconditions first=%j second=%j findIndex=%s",a,u,l.name);const c=a.reduce(function(e,t,n){const a=l(u,t,r),c=s(a)?"common":"removed";return e[c].push(t),o(u,a),i("index=%s value=%s collection=%s",n,t,c),e},{common:[],removed:[]});return c.added=u,i("added=%j removed=%j common%j",c.added,c.removed,c.common),c}e.exports=p},function(e,t,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function l(){try{return window.localStorage}catch(e){}}t=e.exports=n(1712),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,n(2))},function(e,t,n){function r(e){var n=0,r;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){var n;function i(){if(i.enabled){var e=i,r=+new Date,o=r-(n||r);e.diff=o,e.prev=n,e.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n}),t.formatArgs.call(e,s);var l=i.log||t.log||console.log.bind(console);l.apply(e,s)}}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=r(e),i.destroy=o,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function s(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&(e=r[n].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}}function a(){t.enable("")}function u(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=l,t.disable=a,t.enable=s,t.enabled=u,t.humanize=n(1713),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var a=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function u(e){return e>=o?Math.round(e/o)+"d":e>=i?Math.round(e/i)+"h":e>=r?Math.round(e/r)+"m":e>=n?Math.round(e/n)+"s":e+"ms"}function l(e){return c(e,o,"day")||c(e,i,"hour")||c(e,r,"minute")||c(e,n,"second")||e+" ms"}function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&!1===isNaN(e))return t.long?l(e):u(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(t){var n="Expected a function",r="__lodash_hash_undefined__",i=1/0,o=9007199254740991,s="[object Arguments]",a="[object Function]",u="[object GeneratorFunction]",l="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/,h=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/[\\^$.*+?()[\]{}|]/g,m=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,b="object"==typeof t&&t&&t.Object===Object&&t,v="object"==typeof self&&self&&self.Object===Object&&self,w=b||v||Function("return this")();function _(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function k(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function S(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function E(e,t){return null==e?void 0:e[t]}function x(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}var C=Array.prototype,A=Function.prototype,I=Object.prototype,T=w["__core-js_shared__"],j=(O=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""),O?"Symbol(src)_1."+O:""),O,P=A.toString,B=I.hasOwnProperty,R=I.toString,N=RegExp("^"+P.call(B).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=w.Symbol,L=I.propertyIsEnumerable,F=C.splice,D=M?M.isConcatSpreadable:void 0,U=Math.max,z=_e(w,"Map"),q=_e(Object,"create"),K=M?M.prototype:void 0,H=K?K.toString:void 0;function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function W(){this.__data__=q?q(null):{}}function $(e){return this.has(e)&&delete this.__data__[e]}function G(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return B.call(t,e)?t[e]:void 0}function Y(e){var t=this.__data__;return q?void 0!==t[e]:B.call(t,e)}function J(e,t){var n=this.__data__;return n[e]=q&&void 0===t?r:t,this}function Z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(){this.__data__=[]}function Q(e){var t=this.__data__,n=le(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():F.call(t,n,1),!0}function ee(e){var t=this.__data__,n=le(t,e);return n<0?void 0:t[n][1]}function te(e){return le(this.__data__,e)>-1}function ne(e,t){var n=this.__data__,r=le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function re(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(){this.__data__={hash:new V,map:new(z||Z),string:new V}}function oe(e){return we(this,e).delete(e)}function se(e){return we(this,e).get(e)}function ae(e){return we(this,e).has(e)}function ue(e,t){return we(this,e).set(e,t),this}function le(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}function ce(e,t){for(var n=-1,r=null==e,i=t.length,o=Array(i);++n<i;)o[n]=r?void 0:Ve(e,t[n]);return o}function fe(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=ke),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?fe(a,t-1,n,r,i):S(i,a):r||(i[i.length]=a)}return i}function he(e,t){t=Ee(t,e)?[t]:be(t);for(var n=0,r=t.length;null!=e&&n<r;)e=e[Te(t[n++])];return n&&n==r?e:void 0}function pe(e){if(!ze(e)||Ce(e))return!1;var t=De(e)||x(e)?N:g;return t.test(je(e))}function de(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;if(Se(i))F.call(e,i,1);else if(Ee(i,e))delete e[Te(i)];else{var s=be(i),a=Ae(e,s);null!=a&&delete a[Te(Oe(s))]}}}return e}function me(e,t){return t=U(void 0===t?e.length-1:t,0),function(){for(var n=arguments,r=-1,i=U(n.length-t,0),o=Array(i);++r<i;)o[r]=n[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=n[r];return s[t]=o,_(e,this,s)}}function ge(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function ye(e){if("string"==typeof e)return e;if(Ke(e))return H?H.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}function be(e){return Me(e)?e:Ie(e)}function ve(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ke(e),s=void 0!==t,a=null===t,u=t==t,l=Ke(t);if(!a&&!l&&!o&&e>t||o&&s&&u&&!a&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e<t||l&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!u)return-1}return 0}function we(e,t){var n=e.__data__;return xe(t)?n["string"==typeof t?"string":"hash"]:n.map}function _e(e,t){var n=E(e,t);return pe(n)?n:void 0}function ke(e){return Me(e)||Ne(e)||!!(D&&e&&e[D])}function Se(e,t){return t=null==t?o:t,!!t&&("number"==typeof e||y.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e,t){if(Me(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ke(e))||(f.test(e)||!c.test(e)||null!=t&&e in Object(t))}function xe(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ce(e){return!!j&&j in e}function Ae(e,t){return 1==t.length?e:he(e,ge(t,0,-1))}V.prototype.clear=W,V.prototype.delete=$,V.prototype.get=G,V.prototype.has=Y,V.prototype.set=J,Z.prototype.clear=X,Z.prototype.delete=Q,Z.prototype.get=ee,Z.prototype.has=te,Z.prototype.set=ne,re.prototype.clear=ie,re.prototype.delete=oe,re.prototype.get=se,re.prototype.has=ae,re.prototype.set=ue;var Ie=Be(function(e){e=He(e);var t=[];return h.test(e)&&t.push(""),e.replace(p,function(e,n,r,i){t.push(r?i.replace(m,"$1"):n||e)}),t});function Te(e){if("string"==typeof e||Ke(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function je(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Oe(e){var t=e?e.length:0;return t?e[t-1]:void 0}var Pe=me(function(e,t){t=fe(t,1);var n=e?e.length:0,r=ce(e,t);return de(e,k(t,function(e){return Se(e,n)?+e:e}).sort(ve)),r});function Be(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Be.Cache||re),r}function Re(e,t){return e===t||e!=e&&t!=t}function Ne(e){return Fe(e)&&B.call(e,"callee")&&(!L.call(e,"callee")||R.call(e)==s)}Be.Cache=re;var Me=Array.isArray;function Le(e){return null!=e&&Ue(e.length)&&!De(e)}function Fe(e){return qe(e)&&Le(e)}function De(e){var t=ze(e)?R.call(e):"";return t==a||t==u}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function qe(e){return!!e&&"object"==typeof e}function Ke(e){return"symbol"==typeof e||qe(e)&&R.call(e)==l}function He(e){return null==e?"":ye(e)}function Ve(e,t,n){var r=null==e?void 0:he(e,t);return void 0===r?n:r}e.exports=Pe}).call(this,n(8))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function t(){e._onTimeout&&e._onTimeout()},t))},n(1716),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(8))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r=1,i={},o=!1,s=e.document,a,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?p():d()?m():e.MessageChannel?g():s&&"onreadystatechange"in s.createElement("script")?y():b(),u.setImmediate=l,u.clearImmediate=c}function l(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return i[r]=o,a(r),r++}function c(e){delete i[e]}function f(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function h(e){if(o)setTimeout(h,0,e);else{var t=i[e];if(t){o=!0;try{f(t)}finally{c(e),o=!1}}}}function p(){a=function(e){t.nextTick(function(){h(e)})}}function d(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}function m(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&h(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),a=function(n){e.postMessage(t+n,"*")}}function g(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;h(t)},a=function(t){e.port2.postMessage(t)}}function y(){var e=s.documentElement;a=function(t){var n=s.createElement("script");n.onreadystatechange=function(){h(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}function b(){a=function(e){setTimeout(h,0,e)}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(2))},function(e,t,n){"use strict";const r=n(6),i=n(26),o=n(73),s=n(652),a=n(653),u=n(1718),l=n(654);e.exports=class e extends r{constructor(e,t,n){super(),this._id=e,this._ipfs=t,this._room=n,this._connection=null,this._connecting=!1}push(e){this._connection?this._connection.push(a(e)):(this.once("connect",()=>this.push(e)),this._connecting||this._getConnection())}stop(){this._connection&&this._connection.end()}_getConnection(){this._connecting=!0,this._getPeerAddresses(this._id,(e,t)=>{e?this.emit("error",e):t.length?l(this._ipfs).dialProtocol(t[0],s,(e,t)=>{if(e)return void this.emit("disconnect");this._connecting=!1;const n=o();this._connection=n,i(n,t,i.onEnd(()=>{delete this._connection,this.emit("disconnect")})),this.emit("connect",n)}):this.emit("disconnect")})}_getPeerAddresses(e,t){this._ipfs.swarm.peers((n,r)=>{n?t(n):t(null,r.filter(t=>u(t.peer)===e).map(e=>e.peer))})}}},function(e,t,n){"use strict";e.exports=(e=>(e.id&&"function"==typeof e.id.toB58String&&(e=e.id),e.toB58String()))},function(e,t,n){"use strict";(function(r){const i=n(26),o=n(6),s=new o;function a(e,t){t.getPeerInfo((e,n)=>{if(e)return void console.log(e);const o=n.id.toB58String();i(t,i.map(e=>{let t;try{t=JSON.parse(e.toString())}catch(e){return void s.emit("warning",e.message)}if(o!==t.from)return void s.emit("warning","no peerid match "+t.from);const n=t.topicIDs;if(Array.isArray(n))return t.data=r.from(t.data,"hex"),t.seqno=r.from(t.seqno,"hex"),n.forEach(e=>{s.emit(e,t)}),t;s.emit("warning","no topic IDs")}),i.onEnd(()=>{}))})}t=e.exports={handler:a,emitter:s}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(t){e.exports=(e=>t.from(JSON.stringify(e)))}).call(this,n(0).Buffer)},function(e,t,n){"use strict";e.exports=(e=>{const t=e.toString();let n;try{n=JSON.parse(t)}catch(e){throw console.error("Failed parsing",t),e}return n})},function(e,t,n){"use strict";function r(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,r)}function i(e){e.requestModules(["memory"]).then(function(){class t{constructor(e,t){this.store=e.objectStore(t)}*find(e){return yield this.store.get(e)}*put(e){yield this.store.put(e)}*delete(e){yield this.store.delete(e)}*findWithLowerBound(e){return yield this.store.openCursor(IDBKeyRange.lowerBound(e))}*findWithUpperBound(e){return yield this.store.openCursor(IDBKeyRange.upperBound(e),"prev")}*findNext(e){return yield*this.findWithLowerBound([e[0],e[1]+1])}*findPrev(e){return yield*this.findWithUpperBound([e[0],e[1]-1])}*iterate(e,t,n,r){var i=null,o;for(null!=t&&null!=n?i=IDBKeyRange.bound(t,n):null!=t?i=IDBKeyRange.lowerBound(t):null!=n&&(i=IDBKeyRange.upperBound(n)),o=null!=i?this.store.openCursor(i):this.store.openCursor();null!=(yield o);)yield*r.call(e,o.result.value),o.result.continue()}*flush(){}}function n(e){class t extends e{constructor(){super(...arguments),this.buffer=[],this._copyTo=null}copyTo(e){return this._copyTo=e,this}*put(e,t){t||this.buffer.push(this._copyTo.put(e)),yield*super.put(e)}*delete(e){this.buffer.push(this._copyTo.delete(e)),yield*super.delete(e)}*flush(){yield*super.flush();for(var e=0;e<this.buffer.length;e++)yield*this.buffer[e];yield*this._copyTo.flush()}}return t}e.utils.createStoreClone=n;var i=e.utils.createSmallLookupBuffer(t);class o extends e.Transaction{constructor(e){super(e);var t=e.db.transaction(["OperationStore","StateStore","DeleteStore"],"readwrite");this.store=e,this.ss=new i(t,"StateStore"),this.os=new i(t,"OperationStore"),this.ds=new i(t,"DeleteStore")}}class s extends e.AbstractDatabase{constructor(t,n){if(null==n.gc&&(n.gc=!1),super(t,n),null==n&&(n={}),this.options=n,null==n.namespace){if(null==t.options.connector.room)throw new Error("IndexedDB: expect a string (options.namespace)! (you can also skip this step if your connector has a room property)");n.namespace=t.options.connector.room}null!=n.idbVersion?this.idbVersion=n.idbVersion:this.idbVersion=5;var i=this;this.requestTransaction(function*(){i.db=yield indexedDB.open(n.namespace,i.idbVersion)}),n.cleanStart&&("undefined"!=typeof localStorage&&delete localStorage[JSON.stringify(["Yjs_indexeddb",n.namespace])],this.requestTransaction(function*(){yield this.os.store.clear(),yield this.ds.store.clear(),yield this.ss.store.clear()})),this.whenUserIdSet(function(e){"undefined"!=typeof localStorage&&null==localStorage[JSON.stringify(["Yjs_indexeddb",n.namespace])]&&(localStorage[JSON.stringify(["Yjs_indexeddb",n.namespace])]=JSON.stringify([e,0]))}),this.requestTransaction(function*(){var e=null;if("undefined"!=typeof localStorage&&(e=localStorage[JSON.stringify(["Yjs_indexeddb",n.namespace])]),null!=e){if(i.setUserId(e),"undefined"!=typeof localStorage){var t=JSON.parse(e);t[1]=t[1]+1,localStorage[JSON.stringify(["Yjs_indexeddb",n.namespace])]=JSON.stringify(t)}}else setTimeout(function(){null==i.userId&&i.setUserId(r())},200)});var o=[];this.communicationObserver=function(t){o.push(t),1===o.length&&i.requestTransaction(function*(){for(var t=[],n=0;n<o.length;n++){var r=o[n];(null==r.parent||o.every(function(t){return!e.utils.compareIds(t.id,r.parent)}))&&t.push(r)}for(o=[],n=0;n<t.length;n++)yield*this.store.operationAdded(this,t[n],!0)})},e.utils.localCommunication.addObserver(this.options.namespace,this.communicationObserver)}*operationAdded(t,n,r){yield*super.operationAdded(t,n),r||e.utils.localCommunication.broadcast(this.options.namespace,n)}transact(e){var t=null!=this.db?new o(this):null,n=this,r=e.call(t);function i(s){var a=s.value;if(s.done)return e=n.getNextRequest(),void(null!=e&&(null==t&&null!=n.db&&(t=new o(n)),r=e.call(t),i(r.next())));a.constructor===IDBRequest?(a.onsuccess=function(){var e=a.result;null!=e&&e.constructor===IDBCursorWithValue&&(e=e.value),i(r.next(e))},a.onerror=function(e){r.throw(e)}):a.constructor===IDBCursor?(a.onsuccess=function(){i(r.next(null!=a.result?a.result.value:null))},a.onerror=function(e){r.throw(e)}):a.constructor===IDBOpenDBRequest?(a.onsuccess=function(e){var t=e.target.result;i(r.next(t))},a.onerror=function(){r.throw("Couldn't open IndexedDB database!")},a.onupgradeneeded=function(e){var t=e.target.result;"undefined"!=typeof localStorage&&delete localStorage[JSON.stringify(["Yjs_indexeddb",n.options.namespace])],t.objectStoreNames.contains("OperationStore")&&(t.deleteObjectStore("OperationStore"),t.deleteObjectStore("DeleteStore"),t.deleteObjectStore("StateStore")),t.createObjectStore("OperationStore",{keyPath:"id"}),t.createObjectStore("DeleteStore",{keyPath:"id"}),t.createObjectStore("StateStore",{keyPath:"id"})}):r.throw("You must not yield this type!")}i(r.next())}*destroy(){this.db.close()}deleteDB(){return e.utils.localCommunication.removeObserver(this.options.namespace,this.communicationObserver),indexedDB.deleteDatabase(this.options.namespace),Promise.resolve()}}null==e.utils.localCommunication&&(e.utils.localCommunication={observer:{},addObserver:function(e,t){var n=this.observer[e];null==n&&(n=[],this.observer[e]=n),n.push(t)},removeObserver:function(e,t){this.observer[e]=this.observer[e].filter(function(e){return t!==e})},broadcast:function(e,t){"undefined"!=typeof localStorage&&localStorage.setItem(JSON.stringify(["__YJS__",e]),JSON.stringify(t)),this.observer[e].map(function(e){e(t)})}},"undefined"!=typeof localStorage&&addEventListener("storage",function(t){var n;try{var r=JSON.parse(t.key);if("__YJS__"!==r[0])return;n=r[1]}catch(e){return}var i=e.utils.localCommunication.observer[n];null!=i&&i.map(function(e){e(JSON.parse(t.newValue))})})),e.extend("indexeddb",s)})}e.exports=i,"undefined"!=typeof Y&&i(Y)},function(e,t,n){(function(r){const i=n(1724),o=n(20),s=n(32),a=n(61),u=n(5)("dweb-transports:webtorrent"),l=n(97),c=n(134),f=n(115);let h={};class p extends c{constructor(e){super(e),this.webtorrent=void 0,this.options=e,this.name="WEBTORRENT",this.supportURLs=["magnet"],this.supportFunctions=["fetch","createReadStream","seed"],this.supportFeatures=["noCache"],this.status=c.STATUS_LOADED}p_webtorrentstart(){let e=this;return new Promise((e,t)=>{this.webtorrent=new i(this.options),this.webtorrent.once("ready",()=>{u("ready"),e()}),this.webtorrent.once("error",e=>t(e)),this.webtorrent.on("warning",e=>{console.warn("WebTorrent Torrent WARNING: "+e.message)})})}static setup0(e){let t=c.mergeoptions(h,e.webtorrent);u("setup0: options=%o",t);let n=new p(t);return f.addtransport(n),n}async p_setup1(e){try{this.status=c.STATUS_STARTING,e&&e(this),await this.p_webtorrentstart(),await this.p_status()}catch(e){console.error(this.name,"failed to connect",e.message),this.status=c.STATUS_FAILED}return e&&e(this),this}p_stop(e){return new Promise((t,n)=>{this.webtorrent.destroy(r=>{this.status=c.STATUS_FAILED,e&&e(this),r?(u("Webtorrent error during stopping %o",r),n(r)):(u("Webtorrent stopped"),t())})})}async p_status(){return this.webtorrent&&this.webtorrent.ready?this.status=c.STATUS_CONNECTED:this.webtorrent?this.status=c.STATUS_STARTING:this.status=c.STATUS_FAILED,super.p_status()}webtorrentparseurl(e){if(!e)throw new l.CodingError("TransportWEBTORRENT.p_rawfetch: requires url");const t="string"==typeof e?e:e.href,n=t.indexOf("/");if(-1===n)throw new l.CodingError("TransportWEBTORRENT.p_rawfetch: invalid url - missing path component. Should look like magnet:xyzabc/path/to/file");const r=t.slice(0,n),i=t.slice(n+1);return{torrentId:r,path:i}}async p_webtorrentadd(e,t){return new Promise((n,r)=>{let i=this.webtorrent.get(e);i||(i=this.webtorrent.add(e,t),i.once("error",e=>{r(new l.TransportError("Torrent encountered a fatal error "+e.message))}),i.on("warning",e=>{console.warn("WebTorrent Torrent WARNING: "+e.message+" ("+i.name+")")})),i.ready?n(i):i.once("ready",()=>{n(i)})})}webtorrentfindfile(e,t){const n=e.name+"/"+t,r=e.files.find(e=>e.path===n);if(!r)throw new l.TransportError("Requested file ("+t+") not found within torrent ");return r}p_rawfetch(e){return new Promise((t,n)=>{const{torrentId:r,path:i}=this.webtorrentparseurl(e);this.p_webtorrentadd(r).then(e=>{e.deselect(0,e.pieces.length-1,!1);const r=this.webtorrentfindfile(e,i);r.getBuffer((r,i)=>{if(r)return n(new l.TransportError("Torrent encountered a fatal error "+r.message+" ("+e.name+")"));t(i)})}).catch(e=>n(e))})}seed({fileRelativePath:e,directoryPath:t,torrentRelativePath:n},r){if(n){const i=a.join(t,n);this.p_addTorrentFromTorrentFile(i,t).then(n=>{u("Added %s/%s to webtorrent",t,e),r(null)}).catch(n=>{n.message.includes("Cannot add duplicate torrent")?r(null):(u("addWebTorrent failed %s/%s",t,e),r(n))})}else r(null)}async _p_fileTorrentFromUrl(e){try{const{torrentId:t,path:n}=this.webtorrentparseurl(e),r=await this.p_webtorrentadd(t);r.deselect(0,r.pieces.length-1,!1);const i=this.webtorrentfindfile(r,n);return"undefined"!=typeof window&&(window.WEBTORRENT_TORRENT=r,window.WEBTORRENT_FILE=i,r.once("close",()=>{window.WEBTORRENT_TORRENT=null,window.WEBTORRENT_FILE=null})),i}catch(e){throw e}}async p_addTorrentFromTorrentFile(e,t){try{const n={path:t},r=this.webtorrent.get(e);if(r)r.rescanFiles();else{const t=await this.p_webtorrentadd(e,n);t.deselect(0,t.pieces.length-1,!1)}}catch(e){throw e}}async p_f_createReadStream(e,{wanturl:t=!1}={}){try{let n=await this._p_fileTorrentFromUrl(e),r=this;return t?e:function(e){return r.createReadStream(n,e)}}catch(e){throw e}}createReadStream(e,t){let n;u("reading from stream %s %o",e.name,t);try{n=new o.PassThrough;const r=e.createReadStream(t);return r.pipe(n),n}catch(e){u("createReadStream error %s",e),"function"==typeof n.destroy?n.destroy(e):n.emit("error",e)}}async p_createReadableStream(e,t){let n=await this._p_fileTorrentFromUrl(e);return new ReadableStream({start(r){u("start %s %o",e,t);const i=n.createReadStream(t);i.on("data",e=>{r.enqueue(e)}),i.on("end",()=>{r.close()})},cancel(n){throw new l.TransportError(`cancelled ${e}, ${t} ${n}`)}})}static async p_test(e){try{let n=await this.p_setup(e);console.log(n.name,"p_test setup",e,"complete");let i=await n.p_status();console.assert(i===c.STATUS_CONNECTED);let o="magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c&dn=Big+Buck+Bunny&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fbig-buck-bunny.torrent/Big Buck Bunny.en.srt",s=await n.p_rawfetch(o);s=s.toString(),t(s);const a=await n.createReadStream(o),u=[];function t(e){let t="00:00:02,000 --\x3e 00:00:05,000";console.assert(-1!==e.indexOf(t),"Should fetch 'Big Buck Bunny.en.srt' from the torrent"),console.assert(e.length,129,"'Big Buck Bunny.en.srt' was "+e.length)}a.on("data",e=>{u.push(e)}),a.on("end",()=>{const e=r.concat(u).toString();t(e)})}catch(e){throw console.log("Exception thrown in",n.name,"p_test():",e.message),e}}}f._transportclasses.WEBTORRENT=p,t=e.exports=p}).call(this,n(0).Buffer)},function(e,t,n){(function(t,r){const{Buffer:i}=n(4),{EventEmitter:o}=n(6),s=n(655),a=n(1725),u=n(5)("webtorrent"),l=n(1751),c=n(1752),f=n(204),h=n(673),p=n(61),d=n(254),m=n(148),g=n(372),y=n(1758),b=n(1759),v=n(373).version,w=v.replace(/\d*./g,e=>`0${e%100}`.slice(-2)).slice(0,4),_=`-WW${w}-`;class k extends o{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:i.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=i.from(_+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=i.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:i.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=i.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),t.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=t.WRTC)),"function"==typeof y?this._tcpPool=new y(this):r.nextTick(()=>{this._onListening()}),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.dht)),this.dht.once("error",e=>{this._destroy(e)}),this.dht.once("listening",()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)}),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==e.webSeeds;const n=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof c&&null!=e.blocklist?c(e.blocklist,{headers:{"user-agent":`WebTorrent/${v} (https://webtorrent.io)`}},(e,t)=>{if(e)return this.error(`Failed to load blocklist: ${e.message}`);this.blocked=t,n()}):r.nextTick(n)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter(e=>1!==e.progress),t=e.reduce((e,t)=>e+t.downloaded,0),n=e.reduce((e,t)=>e+(t.length||0),0)||1;return t/n}get ratio(){const e=this.torrents.reduce((e,t)=>e+t.uploaded,0),t=this.torrents.reduce((e,t)=>e+t.received,0)||1;return e/t}get(e){if(e instanceof b){if(this.torrents.includes(e))return e}else{let t;try{t=h(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const r=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===s.infoHash&&e!==s)return void s._destroy(new Error(`Cannot add duplicate torrent ${s.infoHash}`))},i=()=>{this.destroyed||("function"==typeof n&&n(s),this.emit("torrent",s))};function o(){s.removeListener("_infoHash",r),s.removeListener("ready",i),s.removeListener("close",o)}this._debug("add"),t=t?Object.assign({},t):{};const s=new b(e,this,t);return this.torrents.push(s),s.once("_infoHash",r),s.once("ready",i),s.once("close",o),s}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),t=t?Object.assign({},t):{},t.skipVerify=!0;const r="string"==typeof e;r&&(t.path=p.dirname(e)),t.createdBy||(t.createdBy=`WebTorrent/${w}`);const i=e=>{const t=[t=>{if(r)return t();e.load(l,t)}];this.dht&&t.push(t=>{e.once("dhtAnnounce",t)}),f(t,t=>{if(!this.destroyed)return t?e._destroy(t):void o(e)})},o=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},u=this.add(null,t,i);let l;return E(e)?e=Array.from(e):Array.isArray(e)||(e=[e]),f(e.map(e=>t=>{S(e)?s(e,t):t(null,e)}),(e,n)=>{if(!this.destroyed)return e?u._destroy(e):void a.parseInput(n,t,(e,r)=>{if(!this.destroyed){if(e)return u._destroy(e);l=r.map(e=>e.getStream),a(n,t,(e,t)=>{if(this.destroyed)return;if(e)return u._destroy(e);const n=this.get(t);n?u._destroy(new Error(`Cannot add duplicate torrent ${n.infoHash}`)):u._onTorrentId(t)})}})}),u}remove(e,t){this._debug("remove");const n=this.get(e);if(!n)throw new Error(`No torrent with id ${e}`);this._remove(e,t)}_remove(e,t){const n=this.get(e);n&&(this.torrents.splice(this.torrents.indexOf(n),1),n.destroy(t))}address(){return this.listening?this._tcpPool?this._tcpPool.server.address():{address:"0.0.0.0",family:"IPv4",port:0}:null}destroy(e){if(this.destroyed)throw new Error("client already destroyed");this._destroy(null,e)}_destroy(e,t){this._debug("client destroy"),this.destroyed=!0;const n=this.torrents.map(e=>t=>{e.destroy(t)});this._tcpPool&&n.push(e=>{this._tcpPool.destroy(e)}),this.dht&&n.push(e=>{this.dht.destroy(e)}),f(n,t),e&&this.emit("error",e),this.torrents=[],this._tcpPool=null,this.dht=null}_onListening(){if(this._debug("listening"),this.listening=!0,this._tcpPool){const e=this._tcpPool.server.address();e&&(this.torrentPort=e.port)}this.emit("listening")}_debug(){const e=[].slice.call(arguments);e[0]=`[${this._debugId}] ${e[0]}`,u(...e)}}function S(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}function E(e){return"undefined"!=typeof FileList&&e instanceof FileList}k.WEBRTC_SUPPORT=d.WEBRTC_SUPPORT,k.VERSION=v,e.exports=k}).call(this,n(8),n(2))},function(e,t,n){(function(t,r,i){const o=n(280),s=n(656),a=n(1734),u=n(61),l=n(1736),c=n(1742),f=n(15),h=n(1743),p=n(1744),d=n(667),m=n(28),g=n(204),y=n(205),b=n(20),v=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"],["wss://tracker.fastcast.nz"]];function w(e,t,n){"function"==typeof t&&([t,n]=[n,t]),t=t?Object.assign({},t):{},k(e,t,(e,r,i)=>{if(e)return n(e);t.singleFileTorrent=i,I(r,t,n)})}function _(e,t,n){"function"==typeof t&&([t,n]=[n,t]),t=t?Object.assign({},t):{},k(e,t,n)}function k(e,n,i){if(O(e)&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach(e=>{if(null==e)throw new Error(`invalid input type: ${e}`)}),e=e.map(e=>j(e)&&"string"==typeof e.path&&"function"==typeof f.stat?e.path:e),1!==e.length||"string"==typeof e[0]||e[0].name||(e[0].name=n.name);let o=null;e.forEach((t,n)=>{if("string"==typeof t)return;let r=t.fullPath||t.name;r||(r=`Unknown File ${n+1}`,t.unknownName=!0),t.path=r.split("/"),t.path[0]||t.path.shift(),t.path.length<2?o=null:0===n&&e.length>1?o=t.path[0]:t.path[0]!==o&&(o=null)}),e=e.filter(e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return C(t)&&p.not(t)}),o&&e.forEach(e=>{const n=(t.isBuffer(e)||P(e))&&!e.path;"string"==typeof e||n||e.path.shift()}),!n.name&&o&&(n.name=o),n.name||e.some(e=>"string"==typeof e?(n.name=u.basename(e),!0):e.unknownName?void 0:(n.name=e.path[e.path.length-1],!0)),n.name||(n.name=`Unnamed Torrent ${Date.now()}`);const s=e.reduce((e,t)=>e+Number("string"==typeof t),0);let a=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof f.stat)throw new Error("filesystem paths do not work in the browser");h(e[0],(e,t)=>{if(e)return i(e);a=t,l()})}else r.nextTick(()=>{l()});function l(){g(e.map(e=>n=>{const r={};if(j(e))r.getStream=B(e),r.length=e.size;else if(t.isBuffer(e))r.getStream=R(e),r.length=e.length;else{if(!P(e)){if("string"==typeof e){if("function"!=typeof f.stat)throw new Error("filesystem paths do not work in the browser");const t=s>1||a;return void S(e,t,n)}throw new Error("invalid input type")}r.getStream=M(e,r),r.length=0}r.path=e.path,n(null,r)}),(e,t)=>{if(e)return i(e);t=c(t),i(null,t,a)})}}function S(e,t,n){x(e,E,(r,i)=>{if(r)return n(r);i=Array.isArray(i)?c(i):[i],e=u.normalize(e),t&&(e=e.slice(0,e.lastIndexOf(u.sep)+1)),e[e.length-1]!==u.sep&&(e+=u.sep),i.forEach(t=>{t.getStream=N(t.path),t.path=t.path.replace(e,"").split(u.sep)}),n(null,i)})}function E(e,t){t=m(t),f.stat(e,(n,r)=>{if(n)return t(n);const i={length:r.size,path:e};t(null,i)})}function x(e,t,n){f.stat(e,(r,i)=>{if(r)return n(r);i.isDirectory()?f.readdir(e,(r,i)=>{if(r)return n(r);g(i.filter(C).filter(p.not).map(n=>r=>{x(u.join(e,n),t,r)}),n)}):i.isFile()&&t(e,n)})}function C(e){return"."!==e[0]}function A(e,n,r){r=m(r);const i=[];let o=0;const a=e.map(e=>e.getStream);let u=0,l=0,c=!1;const f=new d(a),h=new s(n,{zeroPadding:!1});function p(e){o+=e.length;const t=l;y(e,e=>{i[t]=e,u-=1,w()}),u+=1,l+=1}function g(){c=!0,w()}function b(e){v(),r(e)}function v(){f.removeListener("error",b),h.removeListener("data",p),h.removeListener("end",g),h.removeListener("error",b)}function w(){c&&0===u&&(v(),r(null,t.from(i.join(""),"hex"),o))}f.on("error",b),f.pipe(h).on("data",p).on("end",g).on("error",b)}function I(t,n,r){let s=n.announceList;s||("string"==typeof n.announce?s=[[n.announce]]:Array.isArray(n.announce)&&(s=n.announce.map(e=>[e]))),s||(s=[]),i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?s.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(s=s.concat(i.WEBTORRENT_ANNOUNCE.map(e=>[e])))),void 0===n.announce&&void 0===n.announceList&&(s=s.concat(e.exports.announceList)),"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const u={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==s.length&&(u.announce=s[0][0],u["announce-list"]=s),void 0!==n.comment&&(u.comment=n.comment),void 0!==n.createdBy&&(u["created by"]=n.createdBy),void 0!==n.private&&(u.info.private=Number(n.private)),void 0!==n.sslCert&&(u.info["ssl-cert"]=n.sslCert),void 0!==n.urlList&&(u["url-list"]=n.urlList);const l=n.pieceLength||a(t.reduce(T,0));u.info["piece length"]=l,A(t,l,(e,i,s)=>{if(e)return r(e);u.info.pieces=i,t.forEach(e=>{delete e.getStream}),n.singleFileTorrent?u.info.length=s:u.info.files=t,r(null,o.encode(u))})}function T(e,t){return e+t.length}function j(e){return"undefined"!=typeof Blob&&e instanceof Blob}function O(e){return"undefined"!=typeof FileList&&e instanceof FileList}function P(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}function B(e){return()=>new l(e)}function R(e){return()=>{const t=new b.PassThrough;return t.end(e),t}}function N(e){return()=>f.createReadStream(e)}function M(e,t){return()=>{const n=new b.Transform;return n._transform=function(e,n,r){t.length+=e.length,this.push(e),r()},e.pipe(n),n}}e.exports=w,e.exports.parseInput=_,e.exports.announceList=v}).call(this,n(0).Buffer,n(2),n(8))},function(e,t,n){var r=n(4).Buffer;function i(e,t,n){var o=[],s=null;return i._encode(o,e),s=r.concat(o),i.bytes=s.length,r.isBuffer(t)?(s.copy(t,n),t):s}i.bytes=-1,i._floatConversionDetected=!1,i.getType=function(e){return r.isBuffer(e)?"buffer":Array.isArray(e)?"array":ArrayBuffer.isView(e)?"arraybufferview":e instanceof Number?"number":e instanceof Boolean?"boolean":e instanceof ArrayBuffer?"arraybuffer":typeof e},i._encode=function(e,t){if(null!=t)switch(i.getType(t)){case"buffer":i.buffer(e,t);break;case"object":i.dict(e,t);break;case"array":i.list(e,t);break;case"string":i.string(e,t);break;case"number":case"boolean":i.number(e,t);break;case"arraybufferview":i.buffer(e,r.from(t.buffer,t.byteOffset,t.byteLength));break;case"arraybuffer":i.buffer(e,r.from(t))}};var o=r.from("e"),s=r.from("d"),a=r.from("l");i.buffer=function(e,t){e.push(r.from(t.length+":"),t)},i.string=function(e,t){e.push(r.from(r.byteLength(t)+":"+t))},i.number=function(e,t){var n=2147483648,o=t/n<<0,s=t%n<<0,a=o*n+s;e.push(r.from("i"+a+"e")),a===t||i._floatConversionDetected||(i._floatConversionDetected=!0,console.warn('WARNING: Possible data corruption detected with value "'+t+'":','Bencoding only defines support for integers, value was converted to "'+a+'"'),console.trace())},i.dict=function(e,t){e.push(s);for(var n=0,r,a=Object.keys(t).sort(),u=a.length;n<u;n++)r=a[n],null!=t[r]&&(i.string(e,r),i._encode(e,t[r]));e.push(o)},i.list=function(e,t){var n=0,r=t.length;for(e.push(a);n<r;n++)null!=t[n]&&i._encode(e,t[n]);e.push(o)},e.exports=i},function(e,t,n){var r=n(4).Buffer;const i=105,o=58,s=100,a=108,u=101;function l(e,t,n){for(var r=0,i=1,o=t;o<n;o++){var s=e[o];if(s<58&&s>=48)r=10*r+(s-48);else if(o!==t||43!==s){if(o!==t||45!==s){if(46===s)break;throw new Error("not a number: buffer["+o+"] = "+s)}i=-1}}return r*i}function c(e,t,n,i){return null==e||0===e.length?null:("number"!=typeof t&&null==i&&(i=t,t=void 0),"number"!=typeof n&&null==i&&(i=n,n=void 0),c.position=0,c.encoding=i||null,c.data=r.isBuffer(e)?e.slice(t,n):r.from(e),c.bytes=c.data.length,c.next())}c.bytes=0,c.position=0,c.data=null,c.encoding=null,c.next=function(){switch(c.data[c.position]){case 100:return c.dictionary();case 108:return c.list();case 105:return c.integer();default:return c.buffer()}},c.find=function(e){for(var t=c.position,n=c.data.length,r=c.data;t<n;){if(r[t]===e)return t;t++}throw new Error('Invalid data: Missing delimiter "'+String.fromCharCode(e)+'" [0x'+e.toString(16)+"]")},c.dictionary=function(){c.position++;for(var e={};101!==c.data[c.position];)e[c.buffer()]=c.next();return c.position++,e},c.list=function(){c.position++;for(var e=[];101!==c.data[c.position];)e.push(c.next());return c.position++,e},c.integer=function(){var e=c.find(101),t=l(c.data,c.position+1,e);return c.position+=e+1-c.position,t},c.buffer=function(){var e=c.find(58),t=l(c.data,c.position,e),n=++e+t;return c.position=n,c.encoding?c.data.toString(c.encoding,e,n):c.data.slice(e,n)},e.exports=c},function(e,t,n){t=e.exports=n(657),t.Stream=t,t.Readable=t,t.Writable=n(660),t.Duplex=n(160),t.Transform=n(661),t.PassThrough=n(1732)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1731);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(661),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){e.exports=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}},function(e,t,n){for(var r=n(1735),i=Math.pow(2,10),o=13,s=[];o++<22;)s.push(Math.pow(2,o));e.exports=function(e){return r(e/i,s)}},function(e,t){var n=Math.abs;function r(e,t,r){for(var i,o,s,a=1/0,u=0,l=t.length-1;u<=l&&(i=u+(l-u>>1),s=t[i]-e,s<0?u=i+1:s>0&&(l=i-1),s=n(s),s<a&&(a=s,o=i),t[i]!==e););return r?o:t[o]}e.exports=r},function(e,t,n){var r=n(1737).Readable,i=n(1),o=/^.*\.(\w+)$/,s=n(565);function a(e,t){var n=this;if(!(this instanceof a))return new a(e,t);t=t||{},r.call(this,t),this._offset=0,this._ready=!1,this._file=e,this._size=e.size,this._chunkSize=t.chunkSize||Math.max(this._size/1e3,204800),this.reader=new FileReader,this._generateHeaderBlocks(e,t,function(e,t){if(e)return n.emit("error",e);Array.isArray(t)&&t.forEach(function(e){n.push(e)}),n._ready=!0,n.emit("_ready")})}i(a,r),e.exports=a,a.prototype._generateHeaderBlocks=function(e,t,n){n(null,[])},a.prototype._read=function(){if(this._ready){var e=this,t=this.reader,n=this._offset,r=this._offset+this._chunkSize;if(r>this._size&&(r=this._size),n===this._size)return this.destroy(),void this.push(null);t.onload=function(){e._offset=r,e.push(s(t.result))},t.onerror=function(){e.emit("error",t.error)},t.readAsArrayBuffer(this._file.slice(n,r))}else this.once("_ready",this._read.bind(this))},a.prototype.destroy=function(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null}},function(e,t,n){t=e.exports=n(662),t.Stream=t,t.Readable=t,t.Writable=n(665),t.Duplex=n(161),t.Transform=n(666),t.PassThrough=n(1741)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1740);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(666),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){e.exports=function e(t,n){return n="number"==typeof n?n:1/0,n?r(t,1):Array.isArray(t)?t.map(function(e){return e}):t;function r(e,t){return e.reduce(function(e,i){return Array.isArray(i)&&t<n?e.concat(r(i,t+1)):e.concat(i)},[])}}},function(e,t,n){"use strict";var r=n(15);function i(e){return r.existsSync(e)&&r.statSync(e).isFile()}e.exports=function e(t,n){if(!n)return i(t);r.stat(t,function(e,t){return e?n(e):n(null,t.isFile())})},e.exports.sync=i},function(e,t,n){"use strict";t.regex=t.re=/^npm-debug\.log$|^\..*\.swp$|^\.DS_Store$|^\.AppleDouble$|^\.LSOverride$|^Icon\r$|^\._.*|^\.Spotlight-V100(?:$|\/)|\.Trashes|^__MACOSX$|~$|^Thumbs\.db$|^ehthumbs\.db$|^Desktop\.ini$|^@eaDir$/,t.is=(e=>t.re.test(e)),t.not=(e=>!t.is(e))},function(e,t,n){t=e.exports=n(668),t.Stream=t,t.Readable=t,t.Writable=n(671),t.Duplex=n(162),t.Transform=n(672),t.PassThrough=n(1749)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1748);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(672),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){!function t(n,r){e.exports=r()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(5),o=n(1),s=o.toHex,a=o.ceilHeapSize,u=n(6),l=function(e){for(e+=9;e%64>0;e+=1);return e},c=function(e,t){var n=new Uint8Array(e.buffer),r=t%4,i=t-r;switch(r){case 0:n[i+3]=0;case 1:n[i+2]=0;case 2:n[i+1]=0;case 3:n[i+0]=0}for(var o=1+(t>>2);o<e.length;o++)e[o]=0},f=function(e,t,n){e[t>>2]|=128<<24-(t%4<<3),e[14+(2+(t>>2)&-16)]=n/(1<<29)|0,e[15+(2+(t>>2)&-16)]=n<<3},h=function(e,t){var n=new Int32Array(e,t+320,5),r=new Int32Array(5),i=new DataView(r.buffer);return i.setInt32(0,n[0],!1),i.setInt32(4,n[1],!1),i.setInt32(8,n[2],!1),i.setInt32(12,n[3],!1),i.setInt32(16,n[4],!1),r},p=function(){function e(t){if(r(this,e),t=t||65536,t%64>0)throw new Error("Chunk size must be a multiple of 128 bit");this._offset=0,this._maxChunkLen=t,this._padMaxChunkLen=l(t),this._heap=new ArrayBuffer(a(this._padMaxChunkLen+320+20)),this._h32=new Int32Array(this._heap),this._h8=new Int8Array(this._heap),this._core=new i({Int32Array:Int32Array},{},this._heap)}return e.prototype._initState=function e(t,n){this._offset=0;var r=new Int32Array(t,n+320,5);r[0]=1732584193,r[1]=-271733879,r[2]=-1732584194,r[3]=271733878,r[4]=-1009589776},e.prototype._padChunk=function e(t,n){var r=l(t),i=new Int32Array(this._heap,0,r>>2);return c(i,t),f(i,t,n),r},e.prototype._write=function e(t,n,r,i){u(t,this._h8,this._h32,n,r,i||0)},e.prototype._coreCall=function e(t,n,r,i,o){var s=r;this._write(t,n,r),o&&(s=this._padChunk(r,i)),this._core.hash(s,this._padMaxChunkLen)},e.prototype.rawDigest=function e(t){var n=t.byteLength||t.length||t.size||0;this._initState(this._heap,this._padMaxChunkLen);var r=0,i=this._maxChunkLen;for(r=0;n>r+i;r+=i)this._coreCall(t,r,i,n,!1);return this._coreCall(t,r,n-r,n,!0),h(this._heap,this._padMaxChunkLen)},e.prototype.digest=function e(t){return s(this.rawDigest(t).buffer)},e.prototype.digestFromString=function e(t){return this.digest(t)},e.prototype.digestFromBuffer=function e(t){return this.digest(t)},e.prototype.digestFromArrayBuffer=function e(t){return this.digest(t)},e.prototype.resetState=function e(){return this._initState(this._heap,this._padMaxChunkLen),this},e.prototype.append=function e(t){var n=0,r=t.byteLength||t.length||t.size||0,i=this._offset%this._maxChunkLen,o=void 0;for(this._offset+=r;n<r;)o=Math.min(r-n,this._maxChunkLen-i),this._write(t,n,o,i),i+=o,n+=o,i===this._maxChunkLen&&(this._core.hash(this._maxChunkLen,this._padMaxChunkLen),i=0);return this},e.prototype.getState=function e(){var t=this._offset%this._maxChunkLen,n=void 0;if(t)n=this._heap.slice(0);else{var r=new Int32Array(this._heap,this._padMaxChunkLen+320,5);n=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}return{offset:this._offset,heap:n}},e.prototype.setState=function e(t){if(this._offset=t.offset,20===t.heap.byteLength){var n=new Int32Array(this._heap,this._padMaxChunkLen+320,5);n.set(new Int32Array(t.heap))}else this._h32.set(new Int32Array(t.heap));return this},e.prototype.rawEnd=function e(){var t=this._offset,n=t%this._maxChunkLen,r=this._padChunk(n,t);this._core.hash(r,this._padMaxChunkLen);var i=h(this._heap,this._padMaxChunkLen);return this._initState(this._heap,this._padMaxChunkLen),i},e.prototype.end=function e(){return s(this.rawEnd().buffer)},e}();e.exports=p,e.exports._core=i},function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);e.exports.toHex=function(e){for(var t=new Uint8Array(e),r=new Array(e.byteLength),i=0;i<r.length;i++)r[i]=n[t[i]];return r.join("")},e.exports.ceilHeapSize=function(e){var t=0;if(e<=65536)return 65536;if(e<16777216)for(t=1;t<e;t<<=1);else for(t=16777216;t<e;t+=16777216);return t},e.exports.isDedicatedWorkerScope=function(e){var t="WorkerGlobalScope"in e&&e instanceof e.WorkerGlobalScope,n="SharedWorkerGlobalScope"in e&&e instanceof e.SharedWorkerGlobalScope,r="ServiceWorkerGlobalScope"in e&&e instanceof e.ServiceWorkerGlobalScope;return t&&!n&&!r}},function(e,t,n){e.exports=function(){var e=n(0),t=function(e,t,n){try{return n(null,e.digest(t))}catch(e){return n(e)}},r=function(e,t,n,i,o){var s=new self.FileReader;s.onloadend=function a(){if(s.error)return o(s.error);var u=s.result;t+=s.result.byteLength;try{e.append(u)}catch(e){return void o(e)}t<i.size?r(e,t,n,i,o):o(null,e.end())},s.readAsArrayBuffer(i.slice(t,t+n))},i=!0;return self.onmessage=function(n){if(i){var o=n.data.data,s=n.data.file,a=n.data.id;if(void 0!==a&&(s||o)){var u=n.data.blockSize||4194304,l=new e(u);l.resetState();var c=function(e,t){e?self.postMessage({id:a,error:e.name}):self.postMessage({id:a,hash:t})};o&&t(l,o,c),s&&r(l,0,u,s,c)}}},function(){i=!1}}},function(e,t,n){var r=n(4),i=n(0),o=n(7),s=n(2),a=n(1),u=a.isDedicatedWorkerScope,l="undefined"!=typeof self&&u(self);i.disableWorkerBehaviour=l?s():function(){},i.createWorker=function(){var e=r(2),t=e.terminate;return e.terminate=function(){URL.revokeObjectURL(e.objectURL),t.call(e)},e},i.createHash=o,e.exports=i},function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}var i="[\\.|\\-|\\+|\\w|/|@]+",o="\\((/\\*.*?\\*/)?s?.*?("+i+").*?\\)";function s(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var u=t.toString(),l=u.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return a;for(var c=l[1],f=new RegExp("(\\\\n|\\W)"+s(c)+o,"g"),h;h=f.exec(u);)"dll-reference"!==h[3]&&a[r].push(h[3]);for(f=new RegExp("\\("+s(c)+'\\("(dll-reference\\s('+i+'))"\\)\\)'+o,"g");h=f.exec(u);)e[h[2]]||(a[r].push(h[1]),e[h[2]]=n(h[1]).m),a[h[2]]=a[h[2]]||[],a[h[2]].push(h[4]);return a}function u(e){var t=Object.keys(e);return t.reduce(function(t,n){return t||e[n].length>0},!1)}function l(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};u(n);)for(var o=Object.keys(n),s=0;s<o.length;s++){var l=o[s],c=n[l],f=c.pop();if(i[l]=i[l]||{},!i[l][f]&&e[l][f]){i[l][f]=!0,r[l]=r[l]||[],r[l].push(f);for(var h=a(e,e[l][f],l),p=Object.keys(h),d=0;d<p.length;d++)n[p[d]]=n[p[d]]||[],n[p[d]]=n[p[d]].concat(h[p[d]])}}return r}e.exports=function(e,t){t=t||{};var i={main:n.m},o=t.all?{main:Object.keys(i)}:l(i,e),s="";Object.keys(o).filter(function(e){return"main"!==e}).forEach(function(e){for(var t=0;o[e][t];)t++;o[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o[e].map(function(t){return JSON.stringify(t)+": "+i[e][t].toString()}).join(",")+"});\n"}),s=s+"("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.main.map(function(e){return JSON.stringify(e)+": "+i.main[e].toString()}).join(",")+"})(self);";var a=new window.Blob([s],{type:"text/javascript"});if(t.bare)return a;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,c=u.createObjectURL(a),f=new window.Worker(c);return f.objectURL=c,f}},function(e,t){e.exports=function e(t,n,r){"use asm";var i=new t.Int32Array(r);function o(e,t){e=e|0;t=t|0;var n=0,r=0,o=0,s=0,a=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,m=0,g=0;o=i[t+320>>2]|0;a=i[t+324>>2]|0;l=i[t+328>>2]|0;f=i[t+332>>2]|0;p=i[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){s=o;u=a;c=l;h=f;d=p;for(r=0;(r|0)<64;r=r+4|0){g=i[n+r>>2]|0;m=((o<<5|o>>>27)+(a&l|~a&f)|0)+((g+p|0)+1518500249|0)|0;p=f;f=l;l=a<<30|a>>>2;a=o;o=m;i[e+r>>2]=g}for(r=e+64|0;(r|0)<(e+80|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a&l|~a&f)|0)+((g+p|0)+1518500249|0)|0;p=f;f=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+80|0;(r|0)<(e+160|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a^l^f)|0)+((g+p|0)+1859775393|0)|0;p=f;f=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+160|0;(r|0)<(e+240|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a&l|a&f|l&f)|0)+((g+p|0)-1894007588|0)|0;p=f;f=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}for(r=e+240|0;(r|0)<(e+320|0);r=r+4|0){g=(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])<<1|(i[r-12>>2]^i[r-32>>2]^i[r-56>>2]^i[r-64>>2])>>>31;m=((o<<5|o>>>27)+(a^l^f)|0)+((g+p|0)-899497514|0)|0;p=f;f=l;l=a<<30|a>>>2;a=o;o=m;i[r>>2]=g}o=o+s|0;a=a+u|0;l=l+c|0;f=f+h|0;p=p+d|0}i[t+320>>2]=o;i[t+324>>2]=a;i[t+328>>2]=l;i[t+332>>2]=f;i[t+336>>2]=p}return{hash:o}}},function(e,t){var n=this,r=void 0;"undefined"!=typeof self&&void 0!==self.FileReaderSync&&(r=new self.FileReaderSync);var i=function(e,t,n,r,i,o){var s=void 0,a=o%4,u=(i+a)%4,l=i-u;switch(a){case 0:t[o]=e.charCodeAt(r+3);case 1:t[o+1-(a<<1)|0]=e.charCodeAt(r+2);case 2:t[o+2-(a<<1)|0]=e.charCodeAt(r+1);case 3:t[o+3-(a<<1)|0]=e.charCodeAt(r)}if(!(i<u+(4-a))){for(s=4-a;s<l;s=s+4|0)n[o+s>>2]=e.charCodeAt(r+s)<<24|e.charCodeAt(r+s+1)<<16|e.charCodeAt(r+s+2)<<8|e.charCodeAt(r+s+3);switch(u){case 3:t[o+l+1|0]=e.charCodeAt(r+l+2);case 2:t[o+l+2|0]=e.charCodeAt(r+l+1);case 1:t[o+l+3|0]=e.charCodeAt(r+l)}}},o=function(e,t,n,r,i,o){var s=void 0,a=o%4,u=(i+a)%4,l=i-u;switch(a){case 0:t[o]=e[r+3];case 1:t[o+1-(a<<1)|0]=e[r+2];case 2:t[o+2-(a<<1)|0]=e[r+1];case 3:t[o+3-(a<<1)|0]=e[r]}if(!(i<u+(4-a))){for(s=4-a;s<l;s=s+4|0)n[o+s>>2|0]=e[r+s]<<24|e[r+s+1]<<16|e[r+s+2]<<8|e[r+s+3];switch(u){case 3:t[o+l+1|0]=e[r+l+2];case 2:t[o+l+2|0]=e[r+l+1];case 1:t[o+l+3|0]=e[r+l]}}},s=function(e,t,n,i,o,s){var a=void 0,u=s%4,l=(o+u)%4,c=o-l,f=new Uint8Array(r.readAsArrayBuffer(e.slice(i,i+o)));switch(u){case 0:t[s]=f[3];case 1:t[s+1-(u<<1)|0]=f[2];case 2:t[s+2-(u<<1)|0]=f[1];case 3:t[s+3-(u<<1)|0]=f[0]}if(!(o<l+(4-u))){for(a=4-u;a<c;a=a+4|0)n[s+a>>2|0]=f[a]<<24|f[a+1]<<16|f[a+2]<<8|f[a+3];switch(l){case 3:t[s+c+1|0]=f[c+2];case 2:t[s+c+2|0]=f[c+1];case 1:t[s+c+3|0]=f[c]}}};e.exports=function(e,t,r,a,u,l){if("string"==typeof e)return i(e,t,r,a,u,l);if(e instanceof Array)return o(e,t,r,a,u,l);if(n&&n.Buffer&&n.Buffer.isBuffer(e))return o(e,t,r,a,u,l);if(e instanceof ArrayBuffer)return o(new Uint8Array(e),t,r,a,u,l);if(e.buffer instanceof ArrayBuffer)return o(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t,r,a,u,l);if(e instanceof Blob)return s(e,t,r,a,u,l);throw new Error("Unsupported data type.")}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=n(1),s=o.toHex,a=function(){function e(){r(this,e),this._rusha=new i,this._rusha.resetState()}return e.prototype.update=function e(t){return this._rusha.append(t),this},e.prototype.digest=function e(t){var e=this._rusha.rawEnd().buffer;if(!t)return e;if("hex"===t)return s(e);throw new Error("unsupported digest encoding")},e}();e.exports=function(){return new a}}])})},function(e,t){},function(e,t){},function(e,t,n){(function(t){e.exports=function e(n,r){if("undefined"==typeof Blob||!(n instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof r)throw new Error("second argument must be a function");var i=new FileReader;function o(e){i.removeEventListener("loadend",o,!1),e.error?r(e.error):r(null,t.from(i.result))}i.addEventListener("loadend",o,!1),i.readAsArrayBuffer(n)}}).call(this,n(0).Buffer)},function(e,t){},function(e,t,n){(function(t){e.exports=o,e.exports.decode=o,e.exports.encode=s;const r=n(1756),i=n(281);function o(e){const n={},o=e.split("magnet:?")[1],s=o&&o.length>=0?o.split("&"):[];let a;if(s.forEach(e=>{const t=e.split("=");if(2!==t.length)return;const r=t[0];let i=t[1];if("dn"===r&&(i=decodeURIComponent(i).replace(/\+/g," ")),"tr"!==r&&"xs"!==r&&"as"!==r&&"ws"!==r||(i=decodeURIComponent(i)),"kt"===r&&(i=decodeURIComponent(i).split("+")),"ix"===r&&(i=Number(i)),n[r])if(Array.isArray(n[r]))n[r].push(i);else{const e=n[r];n[r]=[e,i]}else n[r]=i}),n.xt){const e=Array.isArray(n.xt)?n.xt:[n.xt];e.forEach(e=>{if(a=e.match(/^urn:btih:(.{40})/))n.infoHash=a[1].toLowerCase();else if(a=e.match(/^urn:btih:(.{32})/)){const e=r.decode(a[1]);n.infoHash=t.from(e,"binary").toString("hex")}})}return n.infoHash&&(n.infoHashBuffer=t.from(n.infoHash,"hex")),n.dn&&(n.name=n.dn),n.kt&&(n.keywords=n.kt),"string"==typeof n.tr?n.announce=[n.tr]:Array.isArray(n.tr)?n.announce=n.tr:n.announce=[],n.urlList=[],("string"==typeof n.as||Array.isArray(n.as))&&(n.urlList=n.urlList.concat(n.as)),("string"==typeof n.ws||Array.isArray(n.ws))&&(n.urlList=n.urlList.concat(n.ws)),i(n.announce),i(n.urlList),n}function s(e){e=Object.assign({},e),e.infoHashBuffer&&(e.xt=`urn:btih:${e.infoHashBuffer.toString("hex")}`),e.infoHash&&(e.xt=`urn:btih:${e.infoHash}`),e.name&&(e.dn=e.name),e.keywords&&(e.kt=e.keywords),e.announce&&(e.tr=e.announce),e.urlList&&(e.ws=e.urlList,delete e.as);let t="magnet:?";return Object.keys(e).filter(e=>2===e.length).forEach((n,r)=>{const i=Array.isArray(e[n])?e[n]:[e[n]];i.forEach((e,i)=>{!(r>0||i>0)||"kt"===n&&0!==i||(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),t+="kt"===n&&i>0?`+${e}`:`${n}=${e}`})}),t}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(1757);t.encode=r.encode,t.decode=r.decode},function(e,t,n){"use strict";(function(e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",r=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];function i(e){var t=Math.floor(e.length/5);return e.length%5==0?t:t+1}t.encode=function(t){e.isBuffer(t)||(t=new e(t));for(var r=0,o=0,s=0,a=0,u=new e(8*i(t));r<t.length;){var l=t[r];s>3?(a=l&255>>s,s=(s+5)%8,a=a<<s|(r+1<t.length?t[r+1]:0)>>8-s,r++):(a=l>>8-(s+5)&31,s=(s+5)%8,0===s&&r++),u[o]=n.charCodeAt(a),o++}for(r=o;r<u.length;r++)u[r]=61;return u},t.decode=function(t){var n=0,i=0,o,s=0;e.isBuffer(t)||(t=new e(t));for(var a=new e(Math.ceil(5*t.length/8)),u=0;u<t.length&&61!==t[u];u++){var l=t[u]-48;if(!(l<r.length))throw new Error("Invalid input - it is not base32 encoded string");i=r[l],n<=3?(n=(n+5)%8,0===n?(o|=i,a[s]=o,s++,o=0):o|=255&i<<8-n):(n=(n+5)%8,o|=255&i>>>n,a[s]=o,s++,o=255&i<<8-n)}return a.slice(0,s)}}).call(this,n(0).Buffer)},function(e,t){},function(e,t,n){(function(t,r){const i=n(1760),o=n(282),s=n(1761),a=n(5)("webtorrent:torrent"),u=n(1767),l=n(6).EventEmitter,c=n(15),f=n(1786),h=n(371),p=n(1787),d=n(667),m=n(1788),g=n(1789),y=n(204),b=n(1790),v=n(673),w=n(61),_=n(1791),k=n(59),S=n(1792),E=n(205),x=n(372),C=n(281),A=n(1793),I=n(1796),T=n(1797),j=n(1798),O=n(1820),P=n(1829),B=n(1830),R=131072,N=3e4,M=5e3,L=3*_.BLOCK_LENGTH,F=.5,D=1,U=1e4,z=2,q=t.browser?1/0:2,K=[1e3,5e3,15e3],H=n(373).version,V=`WebTorrent/${H} (https://webtorrent.io)`;let W;try{W=w.join(c.statSync("/tmp")&&"/tmp","webtorrent")}catch(e){W=w.join("function"==typeof g.tmpdir?g.tmpdir():"/","webtorrent")}class $ extends l{constructor(e,t,n){super(),this._debugId="unknown infohash",this.client=t,this.announce=n.announce,this.urlList=n.urlList,this.path=n.path,this.skipVerify=!!n.skipVerify,this._store=n.store||f,this._getAnnounceOpts=n.getAnnounceOpts,this.strategy=n.strategy||"sequential",this.maxWebConns=n.maxWebConns||4,this._rechokeNumSlots=!1===n.uploads||0===n.uploads?0:+n.uploads||10,this._rechokeOptimisticWire=null,this._rechokeOptimisticTime=0,this._rechokeIntervalId=null,this.ready=!1,this.destroyed=!1,this.paused=!1,this.done=!1,this.metadata=null,this.store=null,this.files=[],this.pieces=[],this._amInterested=!1,this._selections=[],this._critical=[],this.wires=[],this._queue=[],this._peers={},this._peersLength=0,this.received=0,this.uploaded=0,this._downloadSpeed=x(),this._uploadSpeed=x(),this._servers=[],this._xsRequests=[],this._fileModtimes=n.fileModtimes,null!==e&&this._onTorrentId(e),this._debug("new torrent")}get timeRemaining(){return this.done?0:0===this.downloadSpeed?1/0:(this.length-this.downloaded)/this.downloadSpeed*1e3}get downloaded(){if(!this.bitfield)return 0;let e=0;for(let t=0,n=this.pieces.length;t<n;++t)if(this.bitfield.get(t))e+=t===n-1?this.lastPieceLength:this.pieceLength;else{const n=this.pieces[t];e+=n.length-n.missing}return e}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){return this.length?this.downloaded/this.length:0}get ratio(){return this.uploaded/(this.received||1)}get numPeers(){return this.wires.length}get torrentFileBlobURL(){if("undefined"==typeof window)throw new Error("browser-only property");return this.torrentFile?URL.createObjectURL(new Blob([this.torrentFile],{type:"application/x-bittorrent"})):null}get _numQueued(){return this._queue.length+(this._peersLength-this._numConns)}get _numConns(){let e=0;for(const t in this._peers)this._peers[t].connected&&(e+=1);return e}get swarm(){return console.warn("WebTorrent: `torrent.swarm` is deprecated. Use `torrent` directly instead."),this}_onTorrentId(e){if(this.destroyed)return;let n;try{n=v(e)}catch(e){}n?(this.infoHash=n.infoHash,this._debugId=n.infoHash.toString("hex").substring(0,7),t.nextTick(()=>{this.destroyed||this._onParsedTorrent(n)})):v.remote(e,(e,t)=>{if(!this.destroyed)return e?this._destroy(e):void this._onParsedTorrent(t)})}_onParsedTorrent(e){if(!this.destroyed){if(this._processParsedTorrent(e),!this.infoHash)return this._destroy(new Error("Malformed torrent data: No info hash"));this.path||(this.path=w.join(W,this.infoHash)),this._rechokeIntervalId=setInterval(()=>{this._rechoke()},U),this._rechokeIntervalId.unref&&this._rechokeIntervalId.unref(),this.emit("_infoHash",this.infoHash),this.destroyed||(this.emit("infoHash",this.infoHash),this.destroyed||(this.client.listening?this._onListening():this.client.once("listening",()=>{this._onListening()})))}}_processParsedTorrent(e){this._debugId=e.infoHash.toString("hex").substring(0,7),this.announce&&(e.announce=e.announce.concat(this.announce)),this.client.tracker&&r.WEBTORRENT_ANNOUNCE&&!this.private&&(e.announce=e.announce.concat(r.WEBTORRENT_ANNOUNCE)),this.urlList&&(e.urlList=e.urlList.concat(this.urlList)),C(e.announce),C(e.urlList),Object.assign(this,e),this.magnetURI=v.toMagnetURI(e),this.torrentFile=v.toTorrentFile(e)}_onListening(){if(this.discovery||this.destroyed)return;let e=this.client.tracker;e&&(e=Object.assign({},this.client.tracker,{getAnnounceOpts:()=>{const e={uploaded:this.uploaded,downloaded:this.downloaded,left:Math.max(this.length-this.downloaded,0)};return this.client.tracker.getAnnounceOpts&&Object.assign(e,this.client.tracker.getAnnounceOpts()),this._getAnnounceOpts&&Object.assign(e,this._getAnnounceOpts()),e}})),this.discovery=new u({infoHash:this.infoHash,announce:this.announce,peerId:this.client.peerId,dht:!this.private&&this.client.dht,tracker:e,port:this.client.torrentPort,userAgent:V}),this.discovery.on("error",e=>{this._destroy(e)}),this.discovery.on("peer",e=>{"string"==typeof e&&this.done||this.addPeer(e)}),this.discovery.on("trackerAnnounce",()=>{this.emit("trackerAnnounce"),0===this.numPeers&&this.emit("noPeers","tracker")}),this.discovery.on("dhtAnnounce",()=>{this.emit("dhtAnnounce"),0===this.numPeers&&this.emit("noPeers","dht")}),this.discovery.on("warning",e=>{this.emit("warning",e)}),this.info?this._onMetadata(this):this.xs&&this._getMetadataFromServer()}_getMetadataFromServer(){const e=this,t=Array.isArray(this.xs)?this.xs:[this.xs],n=t.map(e=>t=>{r(e,t)});function r(t,n){if(0!==t.indexOf("http://")&&0!==t.indexOf("https://"))return e.emit("warning",new Error(`skipping non-http xs param: ${t}`)),n(null);const r={url:t,method:"GET",headers:{"user-agent":V}};let i;try{i=h.concat(r,o)}catch(r){return e.emit("warning",new Error(`skipping invalid url xs param: ${t}`)),n(null)}function o(r,i,o){if(e.destroyed)return n(null);if(e.metadata)return n(null);if(r)return e.emit("warning",new Error(`http error from xs param: ${t}`)),n(null);if(200!==i.statusCode)return e.emit("warning",new Error(`non-200 status code ${i.statusCode} from xs param: ${t}`)),n(null);let s;try{s=v(o)}catch(r){}return s?s.infoHash!==e.infoHash?(e.emit("warning",new Error(`got torrent file with incorrect info hash from xs param: ${t}`)),n(null)):(e._onMetadata(s),void n(null)):(e.emit("warning",new Error(`got invalid torrent file from xs param: ${t}`)),n(null))}e._xsRequests.push(i)}y(n)}_onMetadata(e){if(this.metadata||this.destroyed)return;let t;if(this._debug("got metadata"),this._xsRequests.forEach(e=>{e.abort()}),this._xsRequests=[],e&&e.infoHash)t=e;else try{t=v(e)}catch(e){return this._destroy(e)}if(this._processParsedTorrent(t),this.metadata=this.torrentFile,this.client.enableWebSeeds&&this.urlList.forEach(e=>{this.addWebSeed(e)}),this._rarityMap=new P(this),this.store=new p(new this._store(this.pieceLength,{torrent:{infoHash:this.infoHash},files:this.files.map(e=>({path:w.join(this.path,e.path),length:e.length,offset:e.offset})),length:this.length,name:this.infoHash})),this.files=this.files.map(e=>new j(this,e)),this.so){const e=T.parse(this.so);this.files.forEach((t,n)=>{e.includes(n)&&this.files[n].select(!0)})}else 0!==this.pieces.length&&this.select(0,this.pieces.length-1,!1);this._hashes=this.pieces,this.pieces=this.pieces.map((e,t)=>{const n=t===this.pieces.length-1?this.lastPieceLength:this.pieceLength;return new _(n)}),this._reservations=this.pieces.map(()=>[]),this.bitfield=new o(this.pieces.length),this.wires.forEach(e=>{e.ut_metadata&&e.ut_metadata.setMetadata(this.metadata),this._onWireWithMetadata(e)});const n=e=>{if(e)return this._destroy(e);this._debug("done verifying"),this._onStore()};this.skipVerify?(this._markAllVerified(),this._onStore()):(this._debug("verifying existing torrent data"),this._fileModtimes&&this._store===f?this.getFileModtimes((e,t)=>{if(e)return this._destroy(e);const r=this.files.map((e,n)=>t[n]===this._fileModtimes[n]).every(e=>e);r?(this._markAllVerified(),this._onStore()):this._verifyPieces(n)}):this._verifyPieces(n)),this.emit("metadata")}getFileModtimes(e){const t=[];b(this.files.map((e,n)=>r=>{c.stat(w.join(this.path,e.path),(e,i)=>{if(e&&"ENOENT"!==e.code)return r(e);t[n]=i&&i.mtime.getTime(),r(null)})}),q,n=>{this._debug("done getting file modtimes"),e(n,t)})}_verifyPieces(e){b(this.pieces.map((e,n)=>r=>this.destroyed?r(new Error("torrent is destroyed")):e?void this.store.get(n,(e,i)=>this.destroyed?r(new Error("torrent is destroyed")):e?t.nextTick(r,null):void E(i,e=>{if(this.destroyed)return r(new Error("torrent is destroyed"));if(e===this._hashes[n]){if(!this.pieces[n])return;this._debug("piece verified %s",n),this._markVerified(n)}else this._debug("piece invalid %s",n);r(null)})):r(null)),q,e)}rescanFiles(e){e||(e=Z),this._verifyPieces(t=>{if(t)return e(t);this._checkDone(),e(null)})}_markAllVerified(){for(let e=0;e<this.pieces.length;e++)this._markVerified(e)}_markVerified(e){this.pieces[e]=null,this._reservations[e]=null,this.bitfield.set(e,!0)}_onStore(){this.destroyed||(this._debug("on store"),this.ready=!0,this.emit("ready"),this._checkDone(),this._updateSelections())}destroy(e){this._destroy(null,e)}_destroy(e,t){if(this.destroyed)return;this.destroyed=!0,this._debug("destroy"),this.client._remove(this),clearInterval(this._rechokeIntervalId),this._xsRequests.forEach(e=>{e.abort()}),this._rarityMap&&this._rarityMap.destroy();for(const e in this._peers)this.removePeer(e);this.files.forEach(e=>{e instanceof j&&e._destroy()});const n=this._servers.map(e=>t=>{e.destroy(t)});this.discovery&&n.push(e=>{this.discovery.destroy(e)}),this.store&&n.push(e=>{this.store.close(e)}),y(n,t),e&&(0===this.listenerCount("error")?this.client.emit("error",e):this.emit("error",e)),this.emit("close"),this.client=null,this.files=[],this.discovery=null,this.store=null,this._rarityMap=null,this._peers=null,this._servers=null,this._xsRequests=null}addPeer(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.infoHash)throw new Error("addPeer() must not be called before the `infoHash` event");if(this.client.blocked){let t;if("string"==typeof e){let n;try{n=i(e)}catch(t){return this._debug("ignoring peer: invalid %s",e),this.emit("invalidPeer",e),!1}t=n[0]}else"string"==typeof e.remoteAddress&&(t=e.remoteAddress);if(t&&this.client.blocked.contains(t))return this._debug("ignoring peer: blocked %s",e),"string"!=typeof e&&e.destroy(),this.emit("blockedPeer",e),!1}const t=!!this._addPeer(e);return t?this.emit("peer",e):this.emit("invalidPeer",e),t}_addPeer(e){if(this.destroyed)return"string"!=typeof e&&e.destroy(),null;if("string"==typeof e&&!this._validAddr(e))return this._debug("ignoring peer: invalid %s",e),null;const t=e&&e.id||e;if(this._peers[t])return this._debug("ignoring peer: duplicate (%s)",t),"string"!=typeof e&&e.destroy(),null;if(this.paused)return this._debug("ignoring peer: torrent is paused"),"string"!=typeof e&&e.destroy(),null;let n;return this._debug("add peer %s",t),n="string"==typeof e?O.createTCPOutgoingPeer(e,this):O.createWebRTCPeer(e,this),this._peers[n.id]=n,this._peersLength+=1,"string"==typeof e&&(this._queue.push(n),this._drain()),n}addWebSeed(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!/^https?:\/\/.+/.test(e))return this.emit("warning",new Error(`ignoring invalid web seed: ${e}`)),void this.emit("invalidPeer",e);if(this._peers[e])return this.emit("warning",new Error(`ignoring duplicate web seed: ${e}`)),void this.emit("invalidPeer",e);this._debug("add web seed %s",e);const t=O.createWebSeedPeer(e,this);this._peers[t.id]=t,this._peersLength+=1,this.emit("peer",e)}_addIncomingPeer(e){return this.destroyed?e.destroy(new Error("torrent is destroyed")):this.paused?e.destroy(new Error("torrent is paused")):(this._debug("add incoming peer %s",e.id),this._peers[e.id]=e,void(this._peersLength+=1))}removePeer(e){const t=e&&e.id||e;e=this._peers[t],e&&(this._debug("removePeer %s",t),delete this._peers[t],this._peersLength-=1,e.destroy(),this._drain())}select(e,t,n,r){if(this.destroyed)throw new Error("torrent is destroyed");if(e<0||t<e||this.pieces.length<=t)throw new Error("invalid selection ",e,":",t);n=Number(n)||0,this._debug("select %s-%s (priority %s)",e,t,n),this._selections.push({from:e,to:t,offset:0,priority:n,notify:r||Z}),this._selections.sort((e,t)=>t.priority-e.priority),this._updateSelections()}deselect(e,t,n){if(this.destroyed)throw new Error("torrent is destroyed");n=Number(n)||0,this._debug("deselect %s-%s (priority %s)",e,t,n);for(let r=0;r<this._selections.length;++r){const i=this._selections[r];if(i.from===e&&i.to===t&&i.priority===n){this._selections.splice(r,1);break}}this._updateSelections()}critical(e,t){if(this.destroyed)throw new Error("torrent is destroyed");this._debug("critical %s-%s",e,t);for(let n=e;n<=t;++n)this._critical[n]=!0;this._updateSelections()}_onWire(e,n){if(this._debug("got wire %s (%s)",e._debugId,n||"Unknown"),e.on("download",e=>{this.destroyed||(this.received+=e,this._downloadSpeed(e),this.client._downloadSpeed(e),this.emit("download",e),this.client.emit("download",e))}),e.on("upload",e=>{this.destroyed||(this.uploaded+=e,this._uploadSpeed(e),this.client._uploadSpeed(e),this.emit("upload",e),this.client.emit("upload",e))}),this.wires.push(e),n){const t=i(n);e.remoteAddress=t[0],e.remotePort=t[1]}this.client.dht&&this.client.dht.listening&&e.on("port",t=>{if(!this.destroyed&&!this.client.dht.destroyed){if(!e.remoteAddress)return this._debug("ignoring PORT from peer with no address");if(0===t||t>65536)return this._debug("ignoring invalid PORT from peer");this._debug("port: %s (from %s)",t,n),this.client.dht.addNode({host:e.remoteAddress,port:t})}}),e.on("timeout",()=>{this._debug("wire timeout (%s)",n),e.destroy()}),e.setTimeout(N,!0),e.setKeepAlive(!0),e.use(A(this.metadata)),e.ut_metadata.on("warning",e=>{this._debug("ut_metadata warning: %s",e.message)}),this.metadata||(e.ut_metadata.on("metadata",e=>{this._debug("got metadata via ut_metadata"),this._onMetadata(e)}),e.ut_metadata.fetch()),"function"!=typeof I||this.private||(e.use(I()),e.ut_pex.on("peer",e=>{this.done||(this._debug("ut_pex: got peer: %s (from %s)",e,n),this.addPeer(e))}),e.ut_pex.on("dropped",e=>{const t=this._peers[e];t&&!t.connected&&(this._debug("ut_pex: dropped peer: %s (from %s)",e,n),this.removePeer(e))}),e.once("close",()=>{e.ut_pex.reset()})),this.emit("wire",e,n),this.metadata&&t.nextTick(()=>{this._onWireWithMetadata(e)})}_onWireWithMetadata(e){let t=null;const n=()=>{this.destroyed||e.destroyed||(this._numQueued>2*(this._numConns-this.numPeers)&&e.amInterested?e.destroy():(t=setTimeout(n,M),t.unref&&t.unref()))};let r;const i=()=>{if(e.peerPieces.buffer.length===this.bitfield.buffer.length){for(r=0;r<this.pieces.length;++r)if(!e.peerPieces.get(r))return;e.isSeeder=!0,e.choke()}};e.on("bitfield",()=>{i(),this._update()}),e.on("have",()=>{i(),this._update()}),e.once("interested",()=>{e.unchoke()}),e.once("close",()=>{clearTimeout(t)}),e.on("choke",()=>{clearTimeout(t),t=setTimeout(n,M),t.unref&&t.unref()}),e.on("unchoke",()=>{clearTimeout(t),this._update()}),e.on("request",(t,n,r,i)=>{if(r>R)return e.destroy();this.pieces[t]||this.store.get(t,{offset:n,length:r},i)}),e.bitfield(this.bitfield),e.uninterested(),e.peerExtensions.dht&&this.client.dht&&this.client.dht.listening&&e.port(this.client.dht.address().port),"webSeed"!==e.type&&(t=setTimeout(n,M),t.unref&&t.unref()),e.isSeeder=!1,i()}_updateSelections(){this.ready&&!this.destroyed&&(t.nextTick(()=>{this._gcSelections()}),this._updateInterest(),this._update())}_gcSelections(){for(let e=0;e<this._selections.length;++e){const t=this._selections[e],n=t.offset;for(;this.bitfield.get(t.from+t.offset)&&t.from+t.offset<t.to;)t.offset+=1;n!==t.offset&&t.notify(),t.to===t.from+t.offset&&(this.bitfield.get(t.from+t.offset)&&(this._selections.splice(e,1),e-=1,t.notify(),this._updateInterest()))}this._selections.length||this.emit("idle")}_updateInterest(){const e=this._amInterested;this._amInterested=!!this._selections.length,this.wires.forEach(e=>{let t=!1;for(let n=0;n<this.pieces.length;++n)if(this.pieces[n]&&e.peerPieces.get(n)){t=!0;break}t?e.interested():e.uninterested()}),e!==this._amInterested&&(this._amInterested?this.emit("interested"):this.emit("uninterested"))}_update(){if(this.destroyed)return;const e=S(this.wires);let t;for(;t=e();)this._updateWireWrapper(t)}_updateWireWrapper(e){const t=this;"undefined"!=typeof window&&"function"==typeof window.requestIdleCallback?window.requestIdleCallback(function(){t._updateWire(e)}):t._updateWire(e)}_updateWire(e){const t=this;if(e.peerChoking)return;if(!e.downloaded)return o();const n=G(e,F);if(e.requests.length>=n)return;const r=G(e,D);function i(t,n,r,i){return o=>o>=t&&o<=n&&!(o in r)&&e.peerPieces.get(o)&&(!i||i(o))}function o(){if(e.requests.length)return;let n=t._selections.length;for(;n--;){const r=t._selections[n];let o;if("rarest"===t.strategy){const n=r.from+r.offset,s=r.to,a=s-n+1,u={};let l=0;const c=i(n,s,u);for(;l<a&&(o=t._rarityMap.getRarestPiece(c),!(o<0));){if(t._request(e,o,!1))return;u[o]=!0,l+=1}}else for(o=r.to;o>=r.from+r.offset;--o)if(e.peerPieces.get(o)&&t._request(e,o,!1))return}}function s(){const n=e.downloadSpeed()||1;if(n>L)return()=>!0;const r=Math.max(1,e.requests.length)*_.BLOCK_LENGTH/n;let i=10,o=0;return e=>{if(!i||t.bitfield.get(e))return!0;let s=t.pieces[e].missing;for(;o<t.wires.length;o++){const a=t.wires[o],u=a.downloadSpeed();if(!(u<L)&&(!(u<=n)&&a.peerPieces.get(e)&&!((s-=u*r)>0)))return i--,!1}return!0}}function a(e){let n=e;for(let r=e;r<t._selections.length&&t._selections[r].priority;r++)n=r;const r=t._selections[e];t._selections[e]=t._selections[n],t._selections[n]=r}function u(n){if(e.requests.length>=r)return!0;const o=s();for(let s=0;s<t._selections.length;s++){const u=t._selections[s];let l;if("rarest"===t.strategy){const c=u.from+u.offset,f=u.to,h=f-c+1,p={};let d=0;const m=i(c,f,p,o);for(;d<h&&(l=t._rarityMap.getRarestPiece(m),!(l<0));){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<r))return u.priority&&a(s),!0;p[l]=!0,d++}}else for(l=u.from+u.offset;l<=u.to;l++)if(e.peerPieces.get(l)&&o(l)){for(;t._request(e,l,t._critical[l]||n););if(!(e.requests.length<r))return u.priority&&a(s),!0}}return!1}u(!1)||u(!0)}_rechoke(){if(!this.ready)return;this._rechokeOptimisticTime>0?this._rechokeOptimisticTime-=1:this._rechokeOptimisticWire=null;const e=[];this.wires.forEach(t=>{t.isSeeder||t===this._rechokeOptimisticWire||e.push({wire:t,downloadSpeed:t.downloadSpeed(),uploadSpeed:t.uploadSpeed(),salt:Math.random(),isChoked:!0})}),e.sort(r);let t=0,n=0;for(;n<e.length&&t<this._rechokeNumSlots;++n)e[n].isChoked=!1,e[n].wire.peerInterested&&(t+=1);if(!this._rechokeOptimisticWire&&n<e.length&&this._rechokeNumSlots){const t=e.slice(n).filter(e=>e.wire.peerInterested),r=t[J(t.length)];r&&(r.isChoked=!1,this._rechokeOptimisticWire=r.wire,this._rechokeOptimisticTime=z)}function r(e,t){return e.downloadSpeed!==t.downloadSpeed?t.downloadSpeed-e.downloadSpeed:e.uploadSpeed!==t.uploadSpeed?t.uploadSpeed-e.uploadSpeed:e.wire.amChoking!==t.wire.amChoking?e.wire.amChoking?1:-1:e.salt-t.salt}e.forEach(e=>{e.wire.amChoking!==e.isChoked&&(e.isChoked?e.wire.choke():e.wire.unchoke())})}_hotswap(e,t){const n=e.downloadSpeed();if(n<_.BLOCK_LENGTH)return!1;if(!this._reservations[t])return!1;const r=this._reservations[t];if(!r)return!1;let i=1/0,o,s;for(s=0;s<r.length;s++){const t=r[s];if(!t||t===e)continue;const a=t.downloadSpeed();a>=L||(2*a>n||a>i||(o=t,i=a))}if(!o)return!1;for(s=0;s<r.length;s++)r[s]===o&&(r[s]=null);for(s=0;s<o.requests.length;s++){const e=o.requests[s];e.piece===t&&this.pieces[t].cancel(e.offset/_.BLOCK_LENGTH|0)}return this.emit("hotswap",o,e,t),!0}_request(e,n,r){const i=this,o=e.requests.length,s="webSeed"===e.type;if(i.bitfield.get(n))return!1;const a=s?Math.min(Y(e,D,i.pieceLength),i.maxWebConns):G(e,D);if(o>=a)return!1;const u=i.pieces[n];let l=s?u.reserveRemaining():u.reserve();if(-1===l&&r&&i._hotswap(e,n)&&(l=s?u.reserveRemaining():u.reserve()),-1===l)return!1;let c=i._reservations[n];c||(c=i._reservations[n]=[]);let f=c.indexOf(null);-1===f&&(f=c.length),c[f]=e;const h=u.chunkOffset(l),p=s?u.chunkLengthRemaining(l):u.chunkLength(l);function d(){t.nextTick(()=>{i._update()})}return e.request(n,h,p,function t(r,o){if(i.destroyed)return;if(!i.ready)return i.once("ready",()=>{t(r,o)});if(c[f]===e&&(c[f]=null),u!==i.pieces[n])return d();if(r)return i._debug("error getting piece %s (offset: %s length: %s) from %s: %s",n,h,p,`${e.remoteAddress}:${e.remotePort}`,r.message),s?u.cancelRemaining(l):u.cancel(l),void d();if(i._debug("got piece %s (offset: %s length: %s) from %s",n,h,p,`${e.remoteAddress}:${e.remotePort}`),!u.set(l,o,e))return d();const a=u.flush();E(a,e=>{if(!i.destroyed){if(e===i._hashes[n]){if(!i.pieces[n])return;i._debug("piece verified %s",n),i.pieces[n]=null,i._reservations[n]=null,i.bitfield.set(n,!0),i.store.put(n,a),i.wires.forEach(e=>{e.have(n)}),i._checkDone()&&!i.destroyed&&i.discovery.complete()}else i.pieces[n]=new _(u.length),i.emit("warning",new Error(`Piece ${n} failed verification`));d()}})}),!0}_checkDone(){if(this.destroyed)return;this.files.forEach(e=>{if(!e.done){for(let t=e._startPiece;t<=e._endPiece;++t)if(!this.bitfield.get(t))return;e.done=!0,e.emit("done"),this._debug(`file done: ${e.name}`)}});let e=!0;for(let t=0;t<this._selections.length;t++){const n=this._selections[t];for(let t=n.from;t<=n.to;t++)if(!this.bitfield.get(t)){e=!1;break}if(!e)break}return!this.done&&e&&(this.done=!0,this._debug(`torrent done: ${this.infoHash}`),this.emit("done")),this._gcSelections(),e}load(e,t){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.ready)return this.once("ready",()=>{this.load(e,t)});Array.isArray(e)||(e=[e]),t||(t=Z);const n=new d(e),r=new s(this.store,this.pieceLength);k(n,r,e=>{if(e)return t(e);this._markAllVerified(),this._checkDone(),t(null)})}createServer(e){if("function"!=typeof B)throw new Error("node.js-only method");if(this.destroyed)throw new Error("torrent is destroyed");const t=new B(this,e);return this._servers.push(t),t}pause(){this.destroyed||(this._debug("pause"),this.paused=!0)}resume(){this.destroyed||(this._debug("resume"),this.paused=!1,this._drain())}_debug(){const e=[].slice.call(arguments);e[0]=`[${this.client._debugId}] [${this._debugId}] ${e[0]}`,a(...e)}_drain(){if(this._debug("_drain numConns %s maxConns %s",this._numConns,this.client.maxConns),"function"!=typeof m.connect||this.destroyed||this.paused||this._numConns>=this.client.maxConns)return;this._debug("drain (%s queued, %s/%s peers)",this._numQueued,this.numPeers,this.client.maxConns);const e=this._queue.shift();if(!e)return;this._debug("tcp connect attempt to %s",e.addr);const t=i(e.addr),n={host:t[0],port:t[1]},r=e.conn=m.connect(n);r.once("connect",()=>{e.onConnect()}),r.once("error",t=>{e.destroy(t)}),e.startConnectTimeout(),r.on("close",()=>{if(this.destroyed)return;if(e.retries>=K.length)return void this._debug("conn %s closed: will not re-add (max %s attempts)",e.addr,K.length);const t=K[e.retries];this._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",e.addr,t,e.retries+1);const n=setTimeout(()=>{const t=this._addPeer(e.addr);t&&(t.retries=e.retries+1)},t);n.unref&&n.unref()})}_validAddr(e){let t;try{t=i(e)}catch(e){return!1}const n=t[0],r=t[1];return r>0&&r<65535&&!("127.0.0.1"===n&&r===this.client.torrentPort)}}function G(e,t){return 2+Math.ceil(t*e.downloadSpeed()/_.BLOCK_LENGTH)}function Y(e,t,n){return 1+Math.ceil(t*e.downloadSpeed()/n)}function J(e){return Math.random()*e|0}function Z(){}e.exports=$}).call(this,n(2),n(8))},function(e,t){const n=/^\[?([^\]]+)\]?:(\d+)$/;let r={},i=0;e.exports=function t(o){if(1e5===i&&e.exports.reset(),!r[o]){const e=n.exec(o);if(!e)throw new Error(`invalid addr: ${o}`);r[o]=[e[1],Number(e[2])],i+=1}return r[o]},e.exports.reset=function e(){r={},i=0}},function(e,t,n){const r=n(656),i=n(1762);class o extends i.Writable{constructor(e,t,n={}){if(super(n),!e||!e.put||!e.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(t=Number(t),!t)throw new Error("Second argument must be a chunk length");this._blockstream=new r(t,{zeroPadding:!1});let i=0;const o=t=>{this.destroyed||(e.put(i,t),i+=1)};this._blockstream.on("data",o).on("error",e=>{this.destroy(e)}),this.on("finish",()=>this._blockstream.end())}_write(e,t,n){this._blockstream.write(e,t,n)}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}}e.exports=o},function(e,t,n){t=e.exports=n(674),t.Stream=t,t.Readable=t,t.Writable=n(677),t.Duplex=n(163),t.Transform=n(678),t.PassThrough=n(1766)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1765);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(678),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){(function(t){const r=n(1768)("torrent-discovery"),i=n(1770),o=n(6).EventEmitter,s=n(204),a=n(1771);class u extends o{constructor(e){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!t.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._port=e.port,this._userAgent=e.userAgent,this.destroyed=!1,this._announce=e.announce||[],this._intervalMs=e.intervalMs||9e5,this._trackerOpts=null,this._dhtAnnouncing=!1,this._dhtTimeout=!1,this._internalDHT=!1,this._onWarning=(e=>{this.emit("warning",e)}),this._onError=(e=>{this.emit("error",e)}),this._onDHTPeer=((e,t)=>{t.toString("hex")===this.infoHash&&this.emit("peer",`${e.host}:${e.port}`,"dht")}),this._onTrackerPeer=(e=>{this.emit("peer",e,"tracker")}),this._onTrackerAnnounce=(()=>{this.emit("trackerAnnounce")});const n=(e,t)=>{const n=new i(t);return n.on("warning",this._onWarning),n.on("error",this._onError),n.listen(e),this._internalDHT=!0,n};!1===e.tracker?this.tracker=null:e.tracker&&"object"==typeof e.tracker?(this._trackerOpts=Object.assign({},e.tracker),this.tracker=this._createTracker()):this.tracker=this._createTracker(),!1===e.dht||"function"!=typeof i?this.dht=null:e.dht&&"function"==typeof e.dht.addNode?this.dht=e.dht:e.dht&&"object"==typeof e.dht?this.dht=n(e.dhtPort,e.dht):this.dht=n(e.dhtPort),this.dht&&(this.dht.on("peer",this._onDHTPeer),this._dhtAnnounce())}updatePort(e){e!==this._port&&(this._port=e,this.dht&&this._dhtAnnounce(),this.tracker&&(this.tracker.stop(),this.tracker.destroy(()=>{this.tracker=this._createTracker()})))}complete(e){this.tracker&&this.tracker.complete(e)}destroy(e){if(this.destroyed)return;this.destroyed=!0,clearTimeout(this._dhtTimeout);const t=[];this.tracker&&(this.tracker.stop(),this.tracker.removeListener("warning",this._onWarning),this.tracker.removeListener("error",this._onError),this.tracker.removeListener("peer",this._onTrackerPeer),this.tracker.removeListener("update",this._onTrackerAnnounce),t.push(e=>{this.tracker.destroy(e)})),this.dht&&this.dht.removeListener("peer",this._onDHTPeer),this._internalDHT&&(this.dht.removeListener("warning",this._onWarning),this.dht.removeListener("error",this._onError),t.push(e=>{this.dht.destroy(e)})),s(t,e),this.dht=null,this.tracker=null,this._announce=null}_createTracker(){const e=Object.assign({},this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),t=new a(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onTrackerPeer),t.on("update",this._onTrackerAnnounce),t.setInterval(this._intervalMs),t.start(),t}_dhtAnnounce(){this._dhtAnnouncing||(r("dht announce"),this._dhtAnnouncing=!0,clearTimeout(this._dhtTimeout),this.dht.announce(this.infoHash,this._port,e=>{this._dhtAnnouncing=!1,r("dht announce complete"),e&&this.emit("warning",e),this.emit("dhtAnnounce"),this.destroyed||(this._dhtTimeout=setTimeout(()=>{this._dhtAnnounce()},this._intervalMs+Math.floor(Math.random()*this._intervalMs/5)),this._dhtTimeout.unref&&this._dhtTimeout.unref())}))}}e.exports=u}).call(this,n(2))},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1769)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t){},function(e,t,n){(function(t){const{Buffer:r}=n(4),i=n(5)("bittorrent-tracker:client"),o=n(6),s=n(28),a=n(204),u=n(254),l=n(281),c=n(32),f=n(679),h=n(1773),p=n(1774),d=n(1775);class m extends o{constructor(e={}){if(super(),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");if(!t.browser&&!e.port)throw new Error("Option `port` is required");this.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),this._peerIdBuffer=r.from(this.peerId,"hex"),this._peerIdBinary=this._peerIdBuffer.toString("binary"),this.infoHash="string"==typeof e.infoHash?e.infoHash.toLowerCase():e.infoHash.toString("hex"),this._infoHashBuffer=r.from(this.infoHash,"hex"),this._infoHashBinary=this._infoHashBuffer.toString("binary"),i("new client %s",this.infoHash),this.destroyed=!1,this._port=e.port,this._getAnnounceOpts=e.getAnnounceOpts,this._rtcConfig=e.rtcConfig,this._userAgent=e.userAgent,this._wrtc="function"==typeof e.wrtc?e.wrtc():e.wrtc;let n="string"==typeof e.announce?[e.announce]:null==e.announce?[]:e.announce;n=n.map(e=>(e=e.toString(),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e)),n=l(n);const o=!1!==this._wrtc&&(!!this._wrtc||u.WEBRTC_SUPPORT),s=e=>{t.nextTick(()=>{this.emit("warning",e)})};this._trackers=n.map(e=>{const t=c.parse(e),n=t.port;if(n<0||n>65535)return s(new Error(`Invalid tracker port: ${e}`)),null;const r=t.protocol;return"http:"!==r&&"https:"!==r||"function"!=typeof h?"udp:"===r&&"function"==typeof p?new p(this,e):"ws:"!==r&&"wss:"!==r||!o?(s(new Error(`Unsupported tracker protocol: ${e}`)),null):"ws:"===r&&"undefined"!=typeof window&&"https:"===window.location.protocol?(s(new Error(`Unsupported tracker protocol: ${e}`)),null):new d(this,e):new h(this,e)}).filter(Boolean)}start(e){i("send `start`"),e=this._defaultAnnounceOpts(e),e.event="started",this._announce(e),this._trackers.forEach(e=>{e.setInterval()})}stop(e){i("send `stop`"),e=this._defaultAnnounceOpts(e),e.event="stopped",this._announce(e)}complete(e){i("send `complete`"),e||(e={}),e=this._defaultAnnounceOpts(e),e.event="completed",this._announce(e)}update(e){i("send `update`"),e=this._defaultAnnounceOpts(e),e.event&&delete e.event,this._announce(e)}_announce(e){this._trackers.forEach(t=>{t.announce(e)})}scrape(e){i("send `scrape`"),e||(e={}),this._trackers.forEach(t=>{t.scrape(e)})}setInterval(e){i("setInterval %d",e),this._trackers.forEach(t=>{t.setInterval(e)})}destroy(e){if(this.destroyed)return;this.destroyed=!0,i("destroy");const t=this._trackers.map(e=>t=>{e.destroy(t)});a(t,e),this._trackers=[],this._getAnnounceOpts=null}_defaultAnnounceOpts(e={}){return null==e.numwant&&(e.numwant=f.DEFAULT_ANNOUNCE_PEERS),null==e.uploaded&&(e.uploaded=0),null==e.downloaded&&(e.downloaded=0),this._getAnnounceOpts&&(e=Object.assign({},e,this._getAnnounceOpts())),e}}m.scrape=((e,t)=>{if(t=s(t),!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");const n=Object.assign({},e,{infoHash:Array.isArray(e.infoHash)?e.infoHash[0]:e.infoHash,peerId:r.from("01234567890123456789"),port:6881}),i=new m(n);i.once("error",t),i.once("warning",t);let o=Array.isArray(e.infoHash)?e.infoHash.length:1;const a={};return i.on("scrape",e=>{if(o-=1,a[e.infoHash]=e,0===o){i.destroy();const e=Object.keys(a);1===e.length?t(null,a[e[0]]):t(null,a)}}),e.infoHash=Array.isArray(e.infoHash)?e.infoHash.map(e=>r.from(e,"hex")):r.from(e.infoHash,"hex"),i.scrape({infoHash:e.infoHash}),i}),e.exports=m}).call(this,n(2))},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){const r=n(5)("bittorrent-tracker:websocket-tracker"),i=n(254),o=n(148),s=n(1776),a=n(679),u=n(1785),l={},c=1e4,f=18e5,h=12e4,p=5e4;class d extends u{constructor(e,t,n){super(e,t),r("new websocket tracker %s",t),this.peers={},this.socket=null,this.reconnecting=!1,this.retries=0,this.reconnectTimer=null,this.expectingResponse=!1,this._openSocket()}announce(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",()=>{this.announce(e)});const t=Object.assign({},e,{action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary});if(this._trackerId&&(t.trackerid=this._trackerId),"stopped"===e.event||"completed"===e.event)this._send(t);else{const n=Math.min(e.numwant,10);this._generateOffers(n,e=>{t.numwant=n,t.offers=e,this._send(t)})}}scrape(e){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",()=>{this.scrape(e)});const t=Array.isArray(e.infoHash)&&e.infoHash.length>0?e.infoHash.map(e=>e.toString("binary")):e.infoHash&&e.infoHash.toString("binary")||this.client._infoHashBinary,n={action:"scrape",info_hash:t};this._send(n)}destroy(e=m){if(this.destroyed)return e(null);this.destroyed=!0,clearInterval(this.interval),clearTimeout(this.reconnectTimer);for(const e in this.peers){const t=this.peers[e];clearTimeout(t.trackerTimeout),t.destroy()}if(this.peers=null,this.socket&&(this.socket.removeListener("connect",this._onSocketConnectBound),this.socket.removeListener("data",this._onSocketDataBound),this.socket.removeListener("close",this._onSocketCloseBound),this.socket.removeListener("error",this._onSocketErrorBound),this.socket=null),this._onSocketConnectBound=null,this._onSocketErrorBound=null,this._onSocketDataBound=null,this._onSocketCloseBound=null,l[this.announceUrl]&&(l[this.announceUrl].consumers-=1),l[this.announceUrl].consumers>0)return e();let t=l[this.announceUrl];if(delete l[this.announceUrl],t.on("error",m),t.once("close",e),!this.expectingResponse)return r();var n=setTimeout(r,a.DESTROY_TIMEOUT);function r(){n&&(clearTimeout(n),n=null),t.removeListener("data",r),t.destroy(),t=null}t.once("data",r)}_openSocket(){this.destroyed=!1,this.peers||(this.peers={}),this._onSocketConnectBound=(()=>{this._onSocketConnect()}),this._onSocketErrorBound=(e=>{this._onSocketError(e)}),this._onSocketDataBound=(e=>{this._onSocketData(e)}),this._onSocketCloseBound=(()=>{this._onSocketClose()}),this.socket=l[this.announceUrl],this.socket?l[this.announceUrl].consumers+=1:(this.socket=l[this.announceUrl]=new s(this.announceUrl),this.socket.consumers=1,this.socket.once("connect",this._onSocketConnectBound)),this.socket.on("data",this._onSocketDataBound),this.socket.once("close",this._onSocketCloseBound),this.socket.once("error",this._onSocketErrorBound)}_onSocketConnect(){this.destroyed||this.reconnecting&&(this.reconnecting=!1,this.retries=0,this.announce(this.client._defaultAnnounceOpts()))}_onSocketData(e){if(!this.destroyed){this.expectingResponse=!1;try{e=JSON.parse(e)}catch(e){return void this.client.emit("warning",new Error("Invalid tracker response"))}"announce"===e.action?this._onAnnounceResponse(e):"scrape"===e.action?this._onScrapeResponse(e):this._onSocketError(new Error(`invalid action in WS response: ${e.action}`))}}_onAnnounceResponse(e){if(e.info_hash!==this.client._infoHashBinary)return void r("ignoring websocket data from %s for %s (looking for %s: reused socket)",this.announceUrl,a.binaryToHex(e.info_hash),this.client.infoHash);if(e.peer_id&&e.peer_id===this.client._peerIdBinary)return;r("received %s from %s for %s",JSON.stringify(e),this.announceUrl,this.client.infoHash);const t=e["failure reason"];if(t)return this.client.emit("warning",new Error(t));const n=e["warning message"];n&&this.client.emit("warning",new Error(n));const i=e.interval||e["min interval"];i&&this.setInterval(1e3*i);const o=e["tracker id"];if(o&&(this._trackerId=o),null!=e.complete){const t=Object.assign({},e,{announce:this.announceUrl,infoHash:a.binaryToHex(e.info_hash)});this.client.emit("update",t)}let s;if(e.offer&&e.peer_id&&(r("creating peer (from remote offer)"),s=this._createPeer(),s.id=a.binaryToHex(e.peer_id),s.once("signal",t=>{const n={action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary,to_peer_id:e.peer_id,answer:t,offer_id:e.offer_id};this._trackerId&&(n.trackerid=this._trackerId),this._send(n)}),s.signal(e.offer),this.client.emit("peer",s)),e.answer&&e.peer_id){const t=a.binaryToHex(e.offer_id);s=this.peers[t],s?(s.id=a.binaryToHex(e.peer_id),s.signal(e.answer),this.client.emit("peer",s),clearTimeout(s.trackerTimeout),s.trackerTimeout=null,delete this.peers[t]):r(`got unexpected answer: ${JSON.stringify(e.answer)}`)}}_onScrapeResponse(e){e=e.files||{};const t=Object.keys(e);0!==t.length?t.forEach(t=>{const n=Object.assign(e[t],{announce:this.announceUrl,infoHash:a.binaryToHex(t)});this.client.emit("scrape",n)}):this.client.emit("warning",new Error("invalid scrape response"))}_onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectTimer())}_onSocketError(e){this.destroyed||(this.destroy(),this.client.emit("warning",e),this._startReconnectTimer())}_startReconnectTimer(){const e=Math.floor(Math.random()*h)+Math.min(Math.pow(2,this.retries)*c,f);this.reconnecting=!0,clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(()=>{this.retries++,this._openSocket()},e),this.reconnectTimer.unref&&this.reconnectTimer.unref(),r("reconnecting socket in %s ms",e)}_send(e){if(this.destroyed)return;this.expectingResponse=!0;const t=JSON.stringify(e);r("send %s",t),this.socket.send(t)}_generateOffers(e,t){const n=this,i=[];r("generating %s offers",e);for(let t=0;t<e;++t)s();function s(){const e=o(20).toString("hex");r("creating peer (from _generateOffers)");const t=n.peers[e]=n._createPeer({initiator:!0});t.once("signal",t=>{i.push({offer:t,offer_id:a.hexToBinary(e)}),u()}),t.trackerTimeout=setTimeout(()=>{r("tracker timeout: destroying peer"),t.trackerTimeout=null,delete n.peers[e],t.destroy()},p),t.trackerTimeout.unref&&t.trackerTimeout.unref()}function u(){i.length===e&&(r("generated %s offers",e),t(i))}u()}_createPeer(e){const t=this;e=Object.assign({trickle:!1,config:t.client._rtcConfig,wrtc:t.client._wrtc},e);const n=new i(e);return n.once("error",r),n.once("connect",o),n;function r(e){t.client.emit("warning",new Error(`Connection error: ${e.message}`)),n.destroy()}function o(){n.removeListener("error",r),n.removeListener("connect",o)}}}function m(){}d.prototype.DEFAULT_ANNOUNCE_INTERVAL=3e4,d._socketPool=l,e.exports=d},function(e,t,n){(function(t,r){e.exports=f;var i=n(1777)("simple-websocket"),o=n(1),s=n(148),a=n(1779),u=n(1784),l="function"!=typeof u?WebSocket:u,c=65536;function f(e){var n=this;if(!(n instanceof f))return new f(e);if(e||(e={}),"string"==typeof e&&(e={url:e}),null==e.url&&null==e.socket)throw new Error("Missing required `url` or `socket` option");if(null!=e.url&&null!=e.socket)throw new Error("Must specify either `url` or `socket` option, not both");if(n._id=s(4).toString("hex").slice(0,7),n._debug("new websocket: %o",e),e=Object.assign({allowHalfOpen:!1},e),a.Duplex.call(n,e),n.connected=!1,n.destroyed=!1,n._chunk=null,n._cb=null,n._interval=null,e.socket)n.url=e.socket.url,n._ws=e.socket;else{n.url=e.url;try{n._ws="function"==typeof u?new l(e.url,e):new l(e.url)}catch(e){return void t.nextTick(function(){n.destroy(e)})}}n._ws.binaryType="arraybuffer",n._ws.onopen=function(){n._onOpen()},n._ws.onmessage=function(e){n._onMessage(e)},n._ws.onclose=function(){n._onClose()},n._ws.onerror=function(){n.destroy(new Error("connection error to "+n.url))},n._onFinishBound=function(){n._onFinish()},n.once("finish",n._onFinishBound)}o(f,a.Duplex),f.WEBSOCKET_SUPPORT=!!l,f.prototype.send=function(e){this._ws.send(e)},f.prototype.destroy=function(e){this._destroy(e,function(){})},f.prototype._destroy=function(e,t){var n=this;if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.connected=!1,this.destroyed=!0,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._ws){var r=this._ws,i=function(){r.onclose=null};if(r.readyState===l.CLOSED)i();else try{r.onclose=i,r.close()}catch(e){i()}r.onopen=null,r.onmessage=null,r.onerror=function(){}}if(this._ws=null,e){if("undefined"!=typeof DOMException&&e instanceof DOMException){var o=e.code;e=new Error(e.message),e.code=o}this.emit("error",e)}this.emit("close"),t()}},f.prototype._read=function(){},f.prototype._write=function(e,t,n){if(this.destroyed)return n(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(e)}catch(e){return this.destroy(e)}"function"!=typeof u&&this._ws.bufferedAmount>65536?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=n):n(null)}else this._debug("write before connect"),this._chunk=e,this._cb=n},f.prototype._onFinish=function(){var e=this;function t(){setTimeout(function(){e.destroy()},1e3)}e.destroyed||(e.connected?t():e.once("connect",t))},f.prototype._onMessage=function(e){if(!this.destroyed){var t=e.data;t instanceof ArrayBuffer&&(t=r.from(t)),this.push(t)}},f.prototype._onOpen=function(){var e=this;if(!e.connected&&!e.destroyed){if(e.connected=!0,e._chunk){try{e.send(e._chunk)}catch(t){return e.destroy(t)}e._chunk=null,e._debug('sent chunk from "write before connect"');var t=e._cb;e._cb=null,t(null)}"function"!=typeof u&&(e._interval=setInterval(function(){e._onInterval()},150),e._interval.unref&&e._interval.unref()),e._debug("connect"),e.emit("connect")}},f.prototype._onInterval=function(){if(this._cb&&this._ws&&!(this._ws.bufferedAmount>65536)){this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);var e=this._cb;this._cb=null,e(null)}},f.prototype._onClose=function(){this.destroyed||(this._debug("on close"),this.destroy())},f.prototype._debug=function(){var e=[].slice.call(arguments);e[0]="["+this._id+"] "+e[0],i.apply(null,e)}}).call(this,n(2),n(0).Buffer)},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1778)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){t=e.exports=n(680),t.Stream=t,t.Readable=t,t.Writable=n(683),t.Duplex=n(164),t.Transform=n(684),t.PassThrough=n(1783)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1782);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(684),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){},function(e,t,n){const r=n(6);class i extends r{constructor(e,t){super(),this.client=e,this.announceUrl=t,this.interval=null,this.destroyed=!1}setInterval(e){null==e&&(e=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(this.interval),e&&(this.interval=setInterval(()=>{this.announce(this.client._defaultAnnounceOpts())},e),this.interval.unref&&this.interval.unref())}}e.exports=i},function(e,t,n){(function(t){function n(e,t){if(!(this instanceof n))return new n(e,t);if(t||(t={}),this.chunkLength=Number(e),!this.chunkLength)throw new Error("First argument must be a chunk length");this.chunks=[],this.closed=!1,this.length=Number(t.length)||1/0,this.length!==1/0&&(this.lastChunkLength=this.length%this.chunkLength||this.chunkLength,this.lastChunkIndex=Math.ceil(this.length/this.chunkLength)-1)}function r(e,n,r){t.nextTick(function(){e&&e(n,r)})}e.exports=n,n.prototype.put=function(e,t,n){if(this.closed)return r(n,new Error("Storage is closed"));var i=e===this.lastChunkIndex;return i&&t.length!==this.lastChunkLength?r(n,new Error("Last chunk length must be "+this.lastChunkLength)):i||t.length===this.chunkLength?(this.chunks[e]=t,void r(n,null)):r(n,new Error("Chunk length must be "+this.chunkLength))},n.prototype.get=function(e,t,n){if("function"==typeof t)return this.get(e,null,t);if(this.closed)return r(n,new Error("Storage is closed"));var i=this.chunks[e];if(!i){var o=new Error("Chunk not found");return o.notFound=!0,r(n,o)}if(!t)return r(n,null,i);var s=t.offset||0,a=t.length||i.length-s;r(n,null,i.slice(s,a+s))},n.prototype.close=n.prototype.destroy=function(e){if(this.closed)return r(e,new Error("Storage is closed"));this.closed=!0,this.chunks=null,r(e,null)}}).call(this,n(2))},function(e,t,n){(function(t){class n{constructor(e){if(this.store=e,this.chunkLength=e.chunkLength,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.mem=[]}put(e,t,n){this.mem[e]=t,this.store.put(e,t,t=>{this.mem[e]=null,n&&n(t)})}get(e,t,n){if("function"==typeof t)return this.get(e,null,t);const i=t&&t.offset||0,o=t&&t.length&&i+t.length,s=this.mem[e];if(s)return r(n,null,t?s.slice(i,o):s);this.store.get(e,t,n)}close(e){this.store.close(e)}destroy(e){this.store.destroy(e)}}function r(e,n,r){t.nextTick(()=>{e&&e(n,r)})}e.exports=n}).call(this,n(2))},function(e,t){},function(e,t){},function(e,t,n){(function(t){function n(e,n,r){if("number"!=typeof n)throw new Error("second argument must be a Number");var i,o,s,a,u,l=!0;function c(e){function n(){r&&r(e,i),r=null}l?t.nextTick(n):n()}function f(t,n,r){if(i[t]=r,n&&(u=!0),0==--s||n)c(n);else if(!u&&h<o){var l;a?(l=a[h],h+=1,e[l](function(e,t){f(l,e,t)})):(l=h,h+=1,e[l](function(e,t){f(l,e,t)}))}}Array.isArray(e)?(i=[],s=o=e.length):(a=Object.keys(e),i={},s=o=a.length);var h=n;s?a?a.some(function(t,r){if(e[t](function(e,n){f(t,e,n)}),r===n-1)return!0}):e.some(function(e,t){if(e(function(e,n){f(t,e,n)}),t===n-1)return!0}):c(null),l=!1}e.exports=n}).call(this,n(2))},function(e,t,n){(function(t){const n=16384;class r{constructor(e){this.length=e,this.missing=e,this.sources=null,this._chunks=Math.ceil(e/n),this._remainder=e%n||n,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,this._flushed=!1}chunkLength(e){return e===this._chunks-1?this._remainder:n}chunkLengthRemaining(e){return this.length-e*n}chunkOffset(e){return e*n}reserve(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1}reserveRemaining(){if(!this.init())return-1;if(this._reservations<this._chunks){const e=this._reservations;return this._reservations=this._chunks,e}return-1}cancel(e){this.init()&&this._cancellations.push(e)}cancelRemaining(e){this.init()&&(this._reservations=e)}get(e){return this.init()?this._buffer[e]:null}set(e,t,r){if(!this.init())return!1;const i=t.length,o=Math.ceil(i/n);for(let i=0;i<o;i++)if(!this._buffer[e+i]){const o=i*n,s=t.slice(o,o+n);this._buffered++,this._buffer[e+i]=s,this.missing-=s.length,this.sources.includes(r)||this.sources.push(r)}return this._buffered===this._chunks}flush(){if(!this._buffer||this._chunks!==this._buffered)return null;const e=t.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,e}init(){return!this._flushed&&(!!this._buffer||(this._buffer=new Array(this._chunks),this._cancellations=[],this.sources=[],!0))}}Object.defineProperty(r,"BLOCK_LENGTH",{value:n}),e.exports=r}).call(this,n(0).Buffer)},function(e,t){var n=function(e){var t=0;return function(){if(t===e.length)return null;var n=e.length-t,r=Math.random()*n|0,i=e[t+r],o=e[t];return e[t]=i,e[t+r]=o,t++,i}};e.exports=n},function(e,t,n){(function(t){const{EventEmitter:r}=n(6),i=n(280),o=n(282),s=n(1794)("ut_metadata"),a=n(205),u=1e7,l=1e3,c=16384;e.exports=(e=>{class n extends r{constructor(n){super(),this._wire=n,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new o(0,{grow:l}),t.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,n){this._infoHash=e}onExtendedHandshake(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||u<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/c),this._remainingRejects=2*this._numPieces,void(this._fetching&&this._requestPieces())):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(e){let t,n;try{const r=e.toString(),o=r.indexOf("ee")+2;t=i.decode(r.substring(0,o)),n=e.slice(o)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,t.total_size);break;case 2:this._onReject(t.piece)}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(e){if(this._metadataComplete)return!0;s("set metadata");try{const t=i.decode(e).info;t&&(e=i.encode(t))}catch(e){}return(!this._infoHash||this._infoHash===a.sync(e))&&(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",i.encode({info:i.decode(this.metadata)})),!0)}_send(e,n){let r=i.encode(e);t.isBuffer(n)&&(r=t.concat([r,n])),this._wire.extended("ut_metadata",r)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,n){const r={msg_type:1,piece:e};"number"==typeof n&&(r.total_size=n),this._send(r,t)}_reject(e){this._send({msg_type:2,piece:e})}_onRequest(e){if(!this._metadataComplete)return void this._reject(e);const t=e*c;let n=t+c;n>this._metadataSize&&(n=this._metadataSize);const r=this.metadata.slice(t,n);this._data(e,r,this._metadataSize)}_onData(e,t,n){t.length>c||(t.copy(this.metadata,e*c),this._bitfield.set(e),this._checkDone())}_onReject(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))}_requestPieces(){this.metadata=t.alloc(this._metadataSize);for(let e=0;e<this._numPieces;e++)this._request(e)}_checkDone(){let e=!0;for(let t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(!e)return;const t=this.setMetadata(this.metadata);t||this._failedMetadata()}_failedMetadata(){this._bitfield=new o(0,{grow:l}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return n.prototype.name="ut_metadata",n})}).call(this,n(0).Buffer)},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1795)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t){},function(e,t){function n(e){if(/^-?\d+$/.test(e))return parseInt(e,10);var t;if(t=e.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){var n=t[1],r=t[2],i=t[3];if(n&&i){n=parseInt(n),i=parseInt(i);var o=[],s=n<i?1:-1;"-"!=r&&".."!=r&&"‥"!=r||(i+=s);for(var a=n;a!=i;a+=s)o.push(a);return o}}return[]}e.exports.parse=function(e){var t=e.split(","),r=t.map(function(e){return n(e)});return 0===r.length?[]:1===r.length?Array.isArray(r[0])?r[0]:r:r.reduce(function(e,t){return Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.concat(t)})}},function(e,t,n){(function(t){const{EventEmitter:r}=n(6),{PassThrough:i}=n(20),o=n(255),s=n(61),a=n(1799),u=n(687),l=n(686),c=n(1818),f=n(1819);class h extends r{constructor(e,t){super(),this._torrent=e,this._destroyed=!1,this.name=t.name,this.path=t.path,this.length=t.length,this.offset=t.offset,this.done=!1;const n=t.offset,r=n+t.length-1;this._startPiece=n/this._torrent.pieceLength|0,this._endPiece=r/this._torrent.pieceLength|0,0===this.length&&(this.done=!0,this.emit("done"))}get downloaded(){if(!this._torrent.bitfield)return 0;const{pieces:e,bitfield:t,pieceLength:n}=this._torrent,{_startPiece:r,_endPiece:i}=this,o=e[r];let s=t.get(r)?n-this.offset%n:Math.max(o.length-o.missing-this.offset,0);for(let o=r+1;o<=i;++o)if(t.get(o))s+=n;else{const t=e[o];s+=t.length-t.missing}return Math.min(s,this.length)}get progress(){return this.length?this.downloaded/this.length:0}select(e){0!==this.length&&this._torrent.select(this._startPiece,this._endPiece,e)}deselect(){0!==this.length&&this._torrent.deselect(this._startPiece,this._endPiece,!1)}createReadStream(e){if(0===this.length){const e=new i;return t.nextTick(()=>{e.end()}),e}const n=new f(this,e);return this._torrent.select(n._startPiece,n._endPiece,!0,()=>{n._notify()}),o(n,()=>{this._destroyed||this._torrent.destroyed||this._torrent.deselect(n._startPiece,n._endPiece,!0)}),n}getBuffer(e){c(this.createReadStream(),this.length,e)}getBlob(e){if("undefined"==typeof window)throw new Error("browser-only method");u(this.createReadStream(),this._getMimeType(),e)}getBlobURL(e){if("undefined"==typeof window)throw new Error("browser-only method");l(this.createReadStream(),this._getMimeType(),e)}appendTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");a.append(this,e,t,n)}renderTo(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");a.render(this,e,t,n)}_getMimeType(){return a.mime[s.extname(this.name).toLowerCase()]}_destroy(){this._destroyed=!0,this._torrent=null}}e.exports=h}).call(this,n(2))},function(e,t,n){t.render=b,t.append=v,t.mime=n(1800);var r=n(1801)("render-media"),i=n(1803),o=n(685),s=n(61),a=n(686),u=n(1804),l=[".m4a",".m4v",".mp4"],c=[".m4v",".mkv",".mp4",".webm"],f=[".m4a",".mp3"],h=[].concat(c,f),p=[".aac",".oga",".ogg",".wav",".flac"],d=[".bmp",".gif",".jpeg",".jpg",".png",".svg"],m=[".css",".html",".js",".md",".pdf",".txt"],g=2e8,y="undefined"!=typeof window&&window.MediaSource;function b(e,t,n,r){"function"==typeof n&&(r=n,n={}),n||(n={}),r||(r=function(){}),k(e),E(n),"string"==typeof t&&(t=document.querySelector(t)),w(e,function(n){if(t.nodeName!==n.toUpperCase()){var r=s.extname(e.name).toLowerCase();throw new Error('Cannot render "'+r+'" inside a "'+t.nodeName.toLowerCase()+'" element, expected "'+n+'"')}return t},n,r)}function v(e,t,n,r){if("function"==typeof n&&(r=n,n={}),n||(n={}),r||(r=function(){}),k(e),E(n),"string"==typeof t&&(t=document.querySelector(t)),t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");function i(e){return"video"===e||"audio"===e?o(e):s(e)}function o(e){var r=s(e);return n.autoplay&&(r.autoplay=!0),n.muted&&(r.muted=!0),n.controls&&(r.controls=!0),t.appendChild(r),r}function s(e){var n=document.createElement(e);return t.appendChild(n),n}function a(e,t){e&&t&&t.remove(),r(e,t)}w(e,i,n,a)}function w(e,t,n,a){var f=s.extname(e.name).toLowerCase(),g=0,b;function v(){var i=c.indexOf(f)>=0?"video":"audio";function s(){r("Use `videostream` package for "+e.name),m(),b.addEventListener("error",p),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),u(e,b)}function a(){r("Use MediaSource API for "+e.name),m(),b.addEventListener("error",d),b.addEventListener("loadstart",k),b.addEventListener("canplay",E);var t=new o(b),n=t.createWriteStream(S(e.name));e.createReadStream().pipe(n),g&&(b.currentTime=g)}function h(){r("Use Blob URL for "+e.name),m(),b.addEventListener("error",I),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),_(e,function(e,t){if(e)return I(e);b.src=t,g&&(b.currentTime=g)})}function p(e){r("videostream error: fallback to MediaSource API: %o",e.message||e),b.removeEventListener("error",p),b.removeEventListener("canplay",E),a()}function d(t){if(r("MediaSource API error: fallback to Blob URL: %o",t.message||t),"number"==typeof e.length&&e.length>n.maxBlobLength)return r("File length too large for Blob URL approach: %d (max: %d)",e.length,n.maxBlobLength),I(new Error("File length too large for Blob URL approach: "+e.length+" (max: "+n.maxBlobLength+")"));b.removeEventListener("error",d),b.removeEventListener("canplay",E),h()}function m(){b||(b=t(i),b.addEventListener("progress",function(){g=b.currentTime}))}y?l.indexOf(f)>=0?s():a():h()}function w(){b=t("audio"),_(e,function(e,t){if(e)return I(e);b.addEventListener("error",I),b.addEventListener("loadstart",k),b.addEventListener("canplay",E),b.src=t})}function k(){b.removeEventListener("loadstart",k),n.autoplay&&b.play()}function E(){b.removeEventListener("canplay",E),a(null,b)}function x(){b=t("img"),_(e,function(t,n){if(t)return I(t);b.src=n,b.alt=e.name,a(null,b)})}function C(){_(e,function(e,n){if(e)return I(e);".pdf"!==f?(b=t("iframe"),b.sandbox="allow-forms allow-scripts",b.src=n):(b=t("object"),b.setAttribute("typemustmatch",!0),b.setAttribute("type","application/pdf"),b.setAttribute("data",n)),a(null,b)})}function A(){r('Unknown file extension "%s" - will attempt to render into iframe',f);var t="";function n(){i(t)?(r('File extension "%s" appears ascii, so will render.',f),C()):(r('File extension "%s" appears non-ascii, will not render.',f),a(new Error('Unsupported file type "'+f+'": Cannot append to DOM')))}e.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",function(e){t+=e}).on("end",n).on("error",a)}function I(t){t.message='Error rendering file "'+e.name+'": '+t.message,r(t.message),a(t)}h.indexOf(f)>=0?v():p.indexOf(f)>=0?w():d.indexOf(f)>=0?x():m.indexOf(f)>=0?C():A()}function _(e,n){var r=s.extname(e.name).toLowerCase();a(e.createReadStream(),t.mime[r],n)}function k(e){if(null==e)throw new Error("file cannot be null or undefined");if("string"!=typeof e.name)throw new Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function S(e){var t=s.extname(e).toLowerCase();return{".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[t]}function E(e){null==e.autoplay&&(e.autoplay=!1),null==e.muted&&(e.muted=!1),null==e.controls&&(e.controls=!0),null==e.maxBlobLength&&(e.maxBlobLength=g)}},function(e){e.exports={".3gp":"video/3gpp",".aac":"audio/aac",".aif":"audio/x-aiff",".aiff":"audio/x-aiff",".atom":"application/atom+xml",".avi":"video/x-msvideo",".bmp":"image/bmp",".bz2":"application/x-bzip2",".conf":"text/plain",".css":"text/css",".csv":"text/plain",".diff":"text/x-diff",".doc":"application/msword",".flv":"video/x-flv",".gif":"image/gif",".gz":"application/x-gzip",".htm":"text/html",".html":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".iso":"application/octet-stream",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpeg",".js":"application/javascript",".json":"application/json",".less":"text/css",".log":"text/plain",".m3u":"audio/x-mpegurl",".m4a":"audio/mp4",".m4v":"video/mp4",".manifest":"text/cache-manifest",".markdown":"text/x-markdown",".mathml":"application/mathml+xml",".md":"text/x-markdown",".mid":"audio/midi",".midi":"audio/midi",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4v":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogg":"application/ogg",".pdf":"application/pdf",".png":"image/png",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".ps":"application/postscript",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".rar":"application/x-rar-compressed",".rdf":"application/rdf+xml",".rss":"application/rss+xml",".rtf":"application/rtf",".svg":"image/svg+xml",".svgz":"image/svg+xml",".swf":"application/x-shockwave-flash",".tar":"application/x-tar",".tbz":"application/x-bzip-compressed-tar",".text":"text/plain",".tif":"image/tiff",".tiff":"image/tiff",".torrent":"application/x-bittorrent",".ttf":"application/x-font-ttf",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".xls":"application/vnd.ms-excel",".xml":"application/xml",".yaml":"text/yaml",".yml":"text/yaml",".zip":"application/zip"}},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1802)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t){var n=127;e.exports=function e(t){for(var n=0,r=t.length;n<r;++n)if(t.charCodeAt(n)>127)return!1;return!0}},function(e,t,n){var r=n(685),i=n(59),o=n(1805);function s(e,t,n){var i=this;if(!(this instanceof s))return new s(e,t,n);n=n||{},i.detailedError=null,i._elem=t,i._elemWrapper=new r(t),i._waitingFired=!1,i._trackMeta=null,i._file=e,i._tracks=null,"none"!==i._elem.preload&&i._createMuxer(),i._onError=function(e){i.detailedError=i._elemWrapper.detailedError,i.destroy()},i._onWaiting=function(){i._waitingFired=!0,i._muxer?i._tracks&&i._pump():i._createMuxer()},i._elem.autoplay&&(i._elem.preload="auto"),i._elem.addEventListener("waiting",i._onWaiting),i._elem.addEventListener("error",i._onError)}e.exports=s,s.prototype._createMuxer=function(){var e=this;e._muxer=new o(e._file),e._muxer.on("ready",function(t){e._tracks=t.map(function(t){var n=e._elemWrapper.createWriteStream(t.mime);n.on("error",function(t){e._elemWrapper.error(t)});var r={muxed:null,mediaSource:n,initFlushed:!1,onInitFlushed:null};return n.write(t.init,function(e){r.initFlushed=!0,r.onInitFlushed&&r.onInitFlushed(e)}),r}),(e._waitingFired||"auto"===e._elem.preload)&&e._pump()}),e._muxer.on("error",function(t){e._elemWrapper.error(t)})},s.prototype._pump=function(){var e=this,t=e._muxer.seek(e._elem.currentTime,!e._tracks);e._tracks.forEach(function(n,r){var o=function(){n.muxed&&(n.muxed.destroy(),n.mediaSource=e._elemWrapper.createWriteStream(n.mediaSource),n.mediaSource.on("error",function(t){e._elemWrapper.error(t)})),n.muxed=t[r],i(n.muxed,n.mediaSource)};n.initFlushed?o():n.onInitFlushed=function(t){t?e._elemWrapper.error(t):o()}})},s.prototype.destroy=function(){var e=this;this.destroyed||(this.destroyed=!0,this._elem.removeEventListener("waiting",this._onWaiting),this._elem.removeEventListener("error",this._onError),this._tracks&&this._tracks.forEach(function(e){e.muxed&&e.muxed.destroy()}),this._elem.src="")}},function(e,t,n){(function(t){var r=n(1806),i=n(6).EventEmitter,o=n(1),s=n(1807),a=n(283),u=n(1817);function l(e){var t=this;i.call(this),this._tracks=[],this._fragmentSequence=1,this._file=e,this._decoder=null,this._findMoov(0)}function c(e,t){var n=this;this._entries=e,this._countName=t||"count",this._index=0,this._offset=0,this.value=this._entries[0]}function f(){return{version:0,flags:0,entries:[]}}e.exports=l,o(l,i),l.prototype._findMoov=function(e){var t=this;t._decoder&&t._decoder.destroy(),t._decoder=s.decode();var n=t._file.createReadStream({start:e});n.pipe(t._decoder),t._decoder.once("box",function(r){"moov"===r.type?t._decoder.decode(function(e){n.destroy();try{t._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,t.emit("error",e)}}):(n.destroy(),t._findMoov(e+r.length))})},c.prototype.inc=function(){var e=this;this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]},l.prototype._processMoov=function(e){var n=this,r=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(var i=0;i<r.length;i++){var o=r[i],s=o.mdia.minf.stbl,u=s.stsd.entries[0],l=o.mdia.hdlr.handlerType,f,h;if("vide"===l&&"avc1"===u.type){if(this._hasVideo)continue;this._hasVideo=!0,f="avc1",u.avcC&&(f+="."+u.avcC.mimeCodec),h='video/mp4; codecs="'+f+'"'}else{if("soun"!==l||"mp4a"!==u.type)continue;if(this._hasAudio)continue;this._hasAudio=!0,f="mp4a",u.esds&&u.esds.mimeCodec&&(f+="."+u.esds.mimeCodec),h='audio/mp4; codecs="'+f+'"'}var p=[],d=0,m=0,g=0,y=0,b=0,v=0,w=new c(s.stts.entries),_=null;s.ctts&&(_=new c(s.ctts.entries));for(var k=0;;){var S=s.stsc.entries[b],E=s.stsz.entries[d],x=w.value.duration,C=_?_.value.compositionOffset:0,A=!0;s.stss&&(A=s.stss.entries[k]===d+1);var I=s.stco||s.co64;if(p.push({size:E,duration:x,dts:v,presentationOffset:C,sync:A,offset:y+I.entries[g]}),d++,d>=s.stsz.entries.length)break;if(m++,y+=E,m>=S.samplesPerChunk){m=0,y=0,g++;var T=s.stsc.entries[b+1];T&&g+1>=T.firstChunk&&b++}v+=x,w.inc(),_&&_.inc(),A&&k++}o.mdia.mdhd.duration=0,o.tkhd.duration=0;var j=S.sampleDescriptionId,O={type:"moov",mvhd:e.mvhd,traks:[{tkhd:o.tkhd,mdia:{mdhd:o.mdia.mdhd,hdlr:o.mdia.hdlr,elng:o.mdia.elng,minf:{vmhd:o.mdia.minf.vmhd,smhd:o.mdia.minf.smhd,dinf:o.mdia.minf.dinf,stbl:{stsd:s.stsd,stts:{version:0,flags:0,entries:[]},ctts:{version:0,flags:0,entries:[]},stsc:{version:0,flags:0,entries:[]},stsz:{version:0,flags:0,entries:[]},stco:{version:0,flags:0,entries:[]},stss:{version:0,flags:0,entries:[]}}}}}],mvex:{mehd:{fragmentDuration:e.mvhd.duration},trexs:[{trackId:o.tkhd.trackId,defaultSampleDescriptionIndex:j,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}};this._tracks.push({trackId:o.tkhd.trackId,timeScale:o.mdia.mdhd.timeScale,samples:p,currSample:null,currTime:null,moov:O,mime:h})}if(0!==this._tracks.length){e.mvhd.duration=0,this._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};var P=a.encode(this._ftyp),B=this._tracks.map(function(e){var n=a.encode(e.moov);return{mime:e.mime,init:t.concat([P,n])}});this.emit("ready",B)}else this.emit("error",new Error("no playable tracks"))},l.prototype.seek=function(e){var t=this;if(!t._tracks)throw new Error("Not ready yet; wait for 'ready' event");t._fileStream&&(t._fileStream.destroy(),t._fileStream=null);var n=-1;if(t._tracks.map(function(r,i){r.outStream&&r.outStream.destroy(),r.inStream&&(r.inStream.destroy(),r.inStream=null);var o=r.outStream=s.encode(),a=t._generateFragment(i,e);if(!a)return o.finalize();function u(e){o.destroyed||o.box(e.moof,function(n){if(n)return t.emit("error",n);if(!o.destroyed){var s=r.inStream.slice(e.ranges);s.pipe(o.mediaData(e.length,function(e){if(e)return t.emit("error",e);if(!o.destroyed){var n=t._generateFragment(i);if(!n)return o.finalize();u(n)}}))}})}(-1===n||a.ranges[0].start<n)&&(n=a.ranges[0].start),u(a)}),n>=0){var r=t._fileStream=t._file.createReadStream({start:n});t._tracks.forEach(function(e){e.inStream=new u(n,{highWaterMark:1e7}),r.pipe(e.inStream)})}return t._tracks.map(function(e){return e.outStream})},l.prototype._findSampleBefore=function(e,t){var n=this,i=this._tracks[e],o=Math.floor(i.timeScale*t),s=r(i.samples,o,function(e,t){var n=e.dts+e.presentationOffset;return n-t});for(-1===s?s=0:s<0&&(s=-s-2);!i.samples[s].sync;)s--;return s};var h=1;l.prototype._generateFragment=function(e,t){var n=this,r=this._tracks[e],i;if(i=void 0!==t?this._findSampleBefore(e,t):r.currSample,i>=r.samples.length)return null;for(var o=r.samples[i].dts,s=0,a=[],u=i;u<r.samples.length;u++){var l=r.samples[u];if(l.sync&&l.dts-o>=1*r.timeScale)break;s+=l.size;var c=a.length-1;c<0||a[c].end!==l.offset?a.push({start:l.offset,end:l.offset+l.size}):a[c].end+=l.size}return r.currSample=u,{moof:this._generateMoof(e,i,u),ranges:a,length:s}},l.prototype._generateMoof=function(e,t,n){for(var r=this,i=this._tracks[e],o=[],s=0,u=t;u<n;u++){var l=i.samples[u];l.presentationOffset<0&&(s=1),o.push({sampleDuration:l.duration,sampleSize:l.size,sampleFlags:l.sync?33554432:16842752,sampleCompositionTimeOffset:l.presentationOffset})}var c={type:"moof",mfhd:{sequenceNumber:this._fragmentSequence++},trafs:[{tfhd:{flags:131072,trackId:i.trackId},tfdt:{baseMediaDecodeTime:i.samples[t].dts},trun:{flags:3841,dataOffset:8,entries:o,version:s}}]};return c.trafs[0].trun.dataOffset+=a.encodingLength(c),c}}).call(this,n(0).Buffer)},function(e,t){e.exports=function(e,t,n,r,i){var o,s;if(void 0===r)r=0;else if(r|=0,r<0||r>=e.length)throw new RangeError("invalid lower bound");if(void 0===i)i=e.length-1;else if(i|=0,i<r||i>=e.length)throw new RangeError("invalid upper bound");for(;r<=i;)if(o=r+(i-r>>1),s=+n(e[o],t,o,e),s<0)r=o+1;else{if(!(s>0))return o;i=o-1}return~r}},function(e,t,n){t.decode=n(1808),t.encode=n(1816)},function(e,t,n){(function(t){var r=n(688),i=n(1),o=n(1813),s=n(283),a=n(130),u=a(0);function l(){if(!(this instanceof l))return new l;r.Writable.call(this),this.destroyed=!1,this._pending=0,this._missing=0,this._buf=null,this._str=null,this._cb=null,this._ondrain=null,this._writeBuffer=null,this._writeCb=null,this._ondrain=null,this._kick()}function c(e){this._parent=e,this.destroyed=!1,r.PassThrough.call(this)}e.exports=l,i(l,r.Writable),l.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))},l.prototype._write=function(e,t,n){if(!this.destroyed){for(var r=!this._str||!this._str._writableState.needDrain;e.length&&!this.destroyed;){if(!this._missing)return this._writeBuffer=e,void(this._writeCb=n);var i=e.length<this._missing?e.length:this._missing;if(this._buf?e.copy(this._buf,this._buf.length-this._missing):this._str&&(r=this._str.write(i===e.length?e:e.slice(0,i))),this._missing-=i,!this._missing){var o=this._buf,s=this._cb,a=this._str;this._buf=this._cb=this._str=this._ondrain=null,r=!0,a&&a.end(),s&&s(o)}e=i===e.length?u:e.slice(i)}if(this._pending&&!this._missing)return this._writeBuffer=e,void(this._writeCb=n);r?n():this._ondrain(n)}},l.prototype._buffer=function(e,t){this._missing=e,this._buf=a(e),this._cb=t},l.prototype._stream=function(e,t){var n=this;return this._missing=e,this._str=new c(this),this._ondrain=o(this._str,"drain"),this._pending++,this._str.on("end",function(){n._pending--,n._kick()}),this._cb=t,this._str},l.prototype._readBox=function(){var e=this;function n(r,i){e._buffer(r,function(r){i=i?t.concat([i,r]):r;var o=s.readHeaders(i);"number"==typeof o?n(o-i.length,i):(e._pending++,e._headers=o,e.emit("box",o))})}n(8)},l.prototype.stream=function(){var e=this;if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=this._headers;return this._headers=null,this._stream(t.contentLen,null)},l.prototype.decode=function(e){var t=this;if(!t._headers)throw new Error("this function can only be called once after 'box' is emitted");var n=t._headers;t._headers=null,t._buffer(n.contentLen,function(r){var i=s.decodeWithoutHeaders(n,r);e(i),t._pending--,t._kick()})},l.prototype.ignore=function(){var e=this;if(!e._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=e._headers;e._headers=null,this._missing=t.contentLen,this._cb=function(){e._pending--,e._kick()}},l.prototype._kick=function(){if(!this._pending&&(this._buf||this._str||this._readBox(),this._writeBuffer)){var e=this._writeCb,t=this._writeBuffer;this._writeBuffer=null,this._writeCb=null,this._write(t,null,e)}},i(c,r.PassThrough),c.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}).call(this,n(0).Buffer)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1811);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(693),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t){function n(e,t){var n=null;return e.on(t,function(e){if(n){var t=n;n=null,t(e)}}),function(e){n=e}}e.exports=n},function(e,t,n){var r=n(283),i=n(1815),o=n(130),s=n(278),a=n(694),u=20828448e5;t.fullBoxes={};var l=["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","co64","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"];function c(e,t,n){for(var r=t;r<n;r++)e[r]=0}function f(e,t,n){t.writeUInt32BE(Math.floor((e.getTime()+u)/1e3),n)}function h(e,t,n){t.writeUIntBE(Math.floor((e.getTime()+u)/1e3),n,6)}function p(e,t,n){t.writeUInt16BE(Math.floor(e)%65536,n),t.writeUInt16BE(Math.floor(256*e*256)%65536,n+2)}function d(e,t,n){t[n]=Math.floor(e)%256,t[n+1]=Math.floor(256*e)%256}function m(e,t,n){e||(e=[0,0,0,0,0,0,0,0,0]);for(var r=0;r<e.length;r++)p(e[r],t,n+4*r)}function g(e,t,n){var r=s(e,"utf8");r.copy(t,n),t[n+r.length]=0}function y(e){for(var t=new Array(e.length/4),n=0;n<t.length;n++)t[n]=w(e,4*n);return t}function b(e,t){return new Date(1e3*e.readUIntBE(t,6)-u)}function v(e,t){return new Date(1e3*e.readUInt32BE(t)-u)}function w(e,t){return e.readUInt16BE(t)+e.readUInt16BE(t+2)/65536}function _(e,t){return e[t]+e[t+1]/256}function k(e,t,n){var r;for(r=0;r<n&&0!==e[t+r];r++);return e.toString("utf8",t,t+r)}l.forEach(function(e){t.fullBoxes[e]=!0}),t.ftyp={},t.ftyp.encode=function(e,n,r){n=n?n.slice(r):o(t.ftyp.encodingLength(e));var i=e.compatibleBrands||[];n.write(e.brand,0,4,"ascii"),n.writeUInt32BE(e.brandVersion,4);for(var s=0;s<i.length;s++)n.write(i[s],8+4*s,4,"ascii");return t.ftyp.encode.bytes=8+4*i.length,n},t.ftyp.decode=function(e,t){e=e.slice(t);for(var n=e.toString("ascii",0,4),r=e.readUInt32BE(4),i=[],o=8;o<e.length;o+=4)i.push(e.toString("ascii",o,o+4));return{brand:n,brandVersion:r,compatibleBrands:i}},t.ftyp.encodingLength=function(e){return 8+4*(e.compatibleBrands||[]).length},t.mvhd={},t.mvhd.encode=function(e,n,r){return n=n?n.slice(r):o(96),f(e.ctime||new Date,n,0),f(e.mtime||new Date,n,4),n.writeUInt32BE(e.timeScale||0,8),n.writeUInt32BE(e.duration||0,12),p(e.preferredRate||0,n,16),d(e.preferredVolume||0,n,20),c(n,22,32),m(e.matrix,n,32),n.writeUInt32BE(e.previewTime||0,68),n.writeUInt32BE(e.previewDuration||0,72),n.writeUInt32BE(e.posterTime||0,76),n.writeUInt32BE(e.selectionTime||0,80),n.writeUInt32BE(e.selectionDuration||0,84),n.writeUInt32BE(e.currentTime||0,88),n.writeUInt32BE(e.nextTrackId||0,92),t.mvhd.encode.bytes=96,n},t.mvhd.decode=function(e,t){return e=e.slice(t),{ctime:v(e,0),mtime:v(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),preferredRate:w(e,16),preferredVolume:_(e,20),matrix:y(e.slice(32,68)),previewTime:e.readUInt32BE(68),previewDuration:e.readUInt32BE(72),posterTime:e.readUInt32BE(76),selectionTime:e.readUInt32BE(80),selectionDuration:e.readUInt32BE(84),currentTime:e.readUInt32BE(88),nextTrackId:e.readUInt32BE(92)}},t.mvhd.encodingLength=function(e){return 96},t.tkhd={},t.tkhd.encode=function(e,n,r){return n=n?n.slice(r):o(80),f(e.ctime||new Date,n,0),f(e.mtime||new Date,n,4),n.writeUInt32BE(e.trackId||0,8),c(n,12,16),n.writeUInt32BE(e.duration||0,16),c(n,20,28),n.writeUInt16BE(e.layer||0,28),n.writeUInt16BE(e.alternateGroup||0,30),n.writeUInt16BE(e.volume||0,32),m(e.matrix,n,36),n.writeUInt32BE(e.trackWidth||0,72),n.writeUInt32BE(e.trackHeight||0,76),t.tkhd.encode.bytes=80,n},t.tkhd.decode=function(e,t){return e=e.slice(t),{ctime:v(e,0),mtime:v(e,4),trackId:e.readUInt32BE(8),duration:e.readUInt32BE(16),layer:e.readUInt16BE(28),alternateGroup:e.readUInt16BE(30),volume:e.readUInt16BE(32),matrix:y(e.slice(36,72)),trackWidth:e.readUInt32BE(72),trackHeight:e.readUInt32BE(76)}},t.tkhd.encodingLength=function(e){return 80},t.mdhd={},t.mdhd.encode=function(e,n,r){return 1===e.version?(n=n?n.slice(r):o(32),h(e.ctime||new Date,n,0),h(e.mtime||new Date,n,8),n.writeUInt32BE(e.timeScale||0,16),n.writeUIntBE(e.duration||0,20,6),n.writeUInt16BE(e.language||0,28),n.writeUInt16BE(e.quality||0,30),t.mdhd.encode.bytes=32,n):(n=n?n.slice(r):o(20),f(e.ctime||new Date,n,0),f(e.mtime||new Date,n,4),n.writeUInt32BE(e.timeScale||0,8),n.writeUInt32BE(e.duration||0,12),n.writeUInt16BE(e.language||0,16),n.writeUInt16BE(e.quality||0,18),t.mdhd.encode.bytes=20,n)},t.mdhd.decode=function(e,t,n){e=e.slice(t);var r=n-t!=20;return r?{ctime:b(e,0),mtime:b(e,8),timeScale:e.readUInt32BE(16),duration:e.readUIntBE(20,6),language:e.readUInt16BE(28),quality:e.readUInt16BE(30)}:{ctime:v(e,0),mtime:v(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),language:e.readUInt16BE(16),quality:e.readUInt16BE(18)}},t.mdhd.encodingLength=function(e){return 1===e.version?32:20},t.vmhd={},t.vmhd.encode=function(e,n,r){n=n?n.slice(r):o(8),n.writeUInt16BE(e.graphicsMode||0,0);var i=e.opcolor||[0,0,0];return n.writeUInt16BE(i[0],2),n.writeUInt16BE(i[1],4),n.writeUInt16BE(i[2],6),t.vmhd.encode.bytes=8,n},t.vmhd.decode=function(e,t){return e=e.slice(t),{graphicsMode:e.readUInt16BE(0),opcolor:[e.readUInt16BE(2),e.readUInt16BE(4),e.readUInt16BE(6)]}},t.vmhd.encodingLength=function(e){return 8},t.smhd={},t.smhd.encode=function(e,n,r){return n=n?n.slice(r):o(4),n.writeUInt16BE(e.balance||0,0),c(n,2,4),t.smhd.encode.bytes=4,n},t.smhd.decode=function(e,t){return e=e.slice(t),{balance:e.readUInt16BE(0)}},t.smhd.encodingLength=function(e){return 4},t.stsd={},t.stsd.encode=function(e,n,i){n=n?n.slice(i):o(t.stsd.encodingLength(e));var s=e.entries||[];n.writeUInt32BE(s.length,0);for(var a=4,u=0;u<s.length;u++){var l=s[u];r.encode(l,n,a),a+=r.encode.bytes}return t.stsd.encode.bytes=a,n},t.stsd.decode=function(e,t,n){e=e.slice(t);for(var i=e.readUInt32BE(0),o=new Array(i),s=4,a=0;a<i;a++){var u=r.decode(e,s,n);o[a]=u,s+=u.length}return{entries:o}},t.stsd.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++)t+=r.encodingLength(e.entries[n]);return t},t.avc1=t.VisualSampleEntry={},t.VisualSampleEntry.encode=function(e,n,i){n=n?n.slice(i):o(t.VisualSampleEntry.encodingLength(e)),c(n,0,6),n.writeUInt16BE(e.dataReferenceIndex||0,6),c(n,8,24),n.writeUInt16BE(e.width||0,24),n.writeUInt16BE(e.height||0,26),n.writeUInt32BE(e.hResolution||4718592,28),n.writeUInt32BE(e.vResolution||4718592,32),c(n,36,40),n.writeUInt16BE(e.frameCount||1,40);var s=e.compressorName||"",a=Math.min(s.length,31);n.writeUInt8(a,42),n.write(s,43,a,"utf8"),n.writeUInt16BE(e.depth||24,74),n.writeInt16BE(-1,76);var u=78,l=e.children||[];l.forEach(function(e){r.encode(e,n,u),u+=r.encode.bytes}),t.VisualSampleEntry.encode.bytes=u},t.VisualSampleEntry.decode=function(e,t,n){e=e.slice(t);for(var i=n-t,o=Math.min(e.readUInt8(42),31),s={dataReferenceIndex:e.readUInt16BE(6),width:e.readUInt16BE(24),height:e.readUInt16BE(26),hResolution:e.readUInt32BE(28),vResolution:e.readUInt32BE(32),frameCount:e.readUInt16BE(40),compressorName:e.toString("utf8",43,43+o),depth:e.readUInt16BE(74),children:[]},a=78;i-a>=8;){var u=r.decode(e,a,i);s.children.push(u),s[u.type]=u,a+=u.length}return s},t.VisualSampleEntry.encodingLength=function(e){var t=78,n=e.children||[];return n.forEach(function(e){t+=r.encodingLength(e)}),t},t.avcC={},t.avcC.encode=function(e,n,r){n=n?n.slice(r):o(e.buffer.length),e.buffer.copy(n),t.avcC.encode.bytes=e.buffer.length},t.avcC.decode=function(e,t,n){return e=e.slice(t,n),{mimeCodec:e.toString("hex",1,4),buffer:s(e)}},t.avcC.encodingLength=function(e){return e.buffer.length},t.mp4a=t.AudioSampleEntry={},t.AudioSampleEntry.encode=function(e,n,i){n=n?n.slice(i):o(t.AudioSampleEntry.encodingLength(e)),c(n,0,6),n.writeUInt16BE(e.dataReferenceIndex||0,6),c(n,8,16),n.writeUInt16BE(e.channelCount||2,16),n.writeUInt16BE(e.sampleSize||16,18),c(n,20,24),n.writeUInt32BE(e.sampleRate||0,24);var s=28,a=e.children||[];a.forEach(function(e){r.encode(e,n,s),s+=r.encode.bytes}),t.AudioSampleEntry.encode.bytes=s},t.AudioSampleEntry.decode=function(e,t,n){e=e.slice(t,n);for(var i=n-t,o={dataReferenceIndex:e.readUInt16BE(6),channelCount:e.readUInt16BE(16),sampleSize:e.readUInt16BE(18),sampleRate:e.readUInt32BE(24),children:[]},s=28;i-s>=8;){var a=r.decode(e,s,i);o.children.push(a),o[a.type]=a,s+=a.length}return o},t.AudioSampleEntry.encodingLength=function(e){var t=28,n=e.children||[];return n.forEach(function(e){t+=r.encodingLength(e)}),t},t.esds={},t.esds.encode=function(e,n,r){n=n?n.slice(r):o(e.buffer.length),e.buffer.copy(n,0),t.esds.encode.bytes=e.buffer.length},t.esds.decode=function(e,t,n){e=e.slice(t,n);var r=i.Descriptor.decode(e,0,e.length),o="ESDescriptor"===r.tagName?r:{},a=o.DecoderConfigDescriptor||{},u=a.oti||0,l=a.DecoderSpecificInfo,c=l?(248&l.buffer.readUInt8(0))>>3:0,f=null;return u&&(f=u.toString(16),c&&(f+="."+c)),{mimeCodec:f,buffer:s(e.slice(0))}},t.esds.encodingLength=function(e){return e.buffer.length},t.stsz={},t.stsz.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.stsz.encodingLength(e)),n.writeUInt32BE(0,0),n.writeUInt32BE(i.length,4);for(var s=0;s<i.length;s++)n.writeUInt32BE(i[s],4*s+8);return t.stsz.encode.bytes=8+4*i.length,n},t.stsz.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=e.readUInt32BE(4),i=new Array(r),o=0;o<r;o++)i[o]=0===n?e.readUInt32BE(4*o+8):n;return{entries:i}},t.stsz.encodingLength=function(e){return 8+4*e.entries.length},t.stss=t.stco={},t.stco.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.stco.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++)n.writeUInt32BE(i[s],4*s+4);return t.stco.encode.bytes=4+4*i.length,n},t.stco.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++)r[i]=e.readUInt32BE(4*i+4);return{entries:r}},t.stco.encodingLength=function(e){return 4+4*e.entries.length},t.co64={},t.co64.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.co64.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++)a.encode(i[s],n,8*s+4);return t.co64.encode.bytes=4+8*i.length,n},t.co64.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++)r[i]=a.decode(e,8*i+4);return{entries:r}},t.co64.encodingLength=function(e){return 4+8*e.entries.length},t.stts={},t.stts.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.stts.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++){var a=8*s+4;n.writeUInt32BE(i[s].count||0,a),n.writeUInt32BE(i[s].duration||0,a+4)}return t.stts.encode.bytes=4+8*e.entries.length,n},t.stts.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++){var o=8*i+4;r[i]={count:e.readUInt32BE(o),duration:e.readUInt32BE(o+4)}}return{entries:r}},t.stts.encodingLength=function(e){return 4+8*e.entries.length},t.ctts={},t.ctts.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.ctts.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++){var a=8*s+4;n.writeUInt32BE(i[s].count||0,a),n.writeUInt32BE(i[s].compositionOffset||0,a+4)}return t.ctts.encode.bytes=4+8*i.length,n},t.ctts.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++){var o=8*i+4;r[i]={count:e.readUInt32BE(o),compositionOffset:e.readInt32BE(o+4)}}return{entries:r}},t.ctts.encodingLength=function(e){return 4+8*e.entries.length},t.stsc={},t.stsc.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.stsc.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++){var a=12*s+4;n.writeUInt32BE(i[s].firstChunk||0,a),n.writeUInt32BE(i[s].samplesPerChunk||0,a+4),n.writeUInt32BE(i[s].sampleDescriptionId||0,a+8)}return t.stsc.encode.bytes=4+12*i.length,n},t.stsc.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++){var o=12*i+4;r[i]={firstChunk:e.readUInt32BE(o),samplesPerChunk:e.readUInt32BE(o+4),sampleDescriptionId:e.readUInt32BE(o+8)}}return{entries:r}},t.stsc.encodingLength=function(e){return 4+12*e.entries.length},t.dref={},t.dref.encode=function(e,n,r){n=n?n.slice(r):o(t.dref.encodingLength(e));var i=e.entries||[];n.writeUInt32BE(i.length,0);for(var s=4,a=0;a<i.length;a++){var u=i[a],l=(u.buf?u.buf.length:0)+4+4;n.writeUInt32BE(l,s),s+=4,n.write(u.type,s,4,"ascii"),s+=4,u.buf&&(u.buf.copy(n,s),s+=u.buf.length)}return t.dref.encode.bytes=s,n},t.dref.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=4,o=0;o<n;o++){var s=e.readUInt32BE(i),a=e.toString("ascii",i+4,i+8),u=e.slice(i+8,i+s);i+=s,r[o]={type:a,buf:u}}return{entries:r}},t.dref.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++){var r=e.entries[n].buf;t+=(r?r.length:0)+4+4}return t},t.elst={},t.elst.encode=function(e,n,r){var i=e.entries||[];n=n?n.slice(r):o(t.elst.encodingLength(e)),n.writeUInt32BE(i.length,0);for(var s=0;s<i.length;s++){var a=12*s+4;n.writeUInt32BE(i[s].trackDuration||0,a),n.writeUInt32BE(i[s].mediaTime||0,a+4),p(i[s].mediaRate||0,n,a+8)}return t.elst.encode.bytes=4+12*i.length,n},t.elst.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),i=0;i<n;i++){var o=12*i+4;r[i]={trackDuration:e.readUInt32BE(o),mediaTime:e.readInt32BE(o+4),mediaRate:w(e,o+8)}}return{entries:r}},t.elst.encodingLength=function(e){return 4+12*e.entries.length},t.hdlr={},t.hdlr.encode=function(e,n,r){n=n?n.slice(r):o(t.hdlr.encodingLength(e));var i=21+(e.name||"").length;return n.fill(0,0,i),n.write(e.handlerType||"",4,4,"ascii"),g(e.name||"",n,20),t.hdlr.encode.bytes=i,n},t.hdlr.decode=function(e,t,n){return e=e.slice(t),{handlerType:e.toString("ascii",4,8),name:k(e,20,n)}},t.hdlr.encodingLength=function(e){return 21+(e.name||"").length},t.mehd={},t.mehd.encode=function(e,n,r){return n=n?n.slice(r):o(4),n.writeUInt32BE(e.fragmentDuration||0,0),t.mehd.encode.bytes=4,n},t.mehd.decode=function(e,t){return e=e.slice(t),{fragmentDuration:e.readUInt32BE(0)}},t.mehd.encodingLength=function(e){return 4},t.trex={},t.trex.encode=function(e,n,r){return n=n?n.slice(r):o(20),n.writeUInt32BE(e.trackId||0,0),n.writeUInt32BE(e.defaultSampleDescriptionIndex||0,4),n.writeUInt32BE(e.defaultSampleDuration||0,8),n.writeUInt32BE(e.defaultSampleSize||0,12),n.writeUInt32BE(e.defaultSampleFlags||0,16),t.trex.encode.bytes=20,n},t.trex.decode=function(e,t){return e=e.slice(t),{trackId:e.readUInt32BE(0),defaultSampleDescriptionIndex:e.readUInt32BE(4),defaultSampleDuration:e.readUInt32BE(8),defaultSampleSize:e.readUInt32BE(12),defaultSampleFlags:e.readUInt32BE(16)}},t.trex.encodingLength=function(e){return 20},t.mfhd={},t.mfhd.encode=function(e,n,r){return n=n?n.slice(r):o(4),n.writeUInt32BE(e.sequenceNumber||0,0),t.mfhd.encode.bytes=4,n},t.mfhd.decode=function(e,t){return{sequenceNumber:e.readUInt32BE(0)}},t.mfhd.encodingLength=function(e){return 4},t.tfhd={},t.tfhd.encode=function(e,n,r){return n=n?n.slice(r):o(4),n.writeUInt32BE(e.trackId,0),t.tfhd.encode.bytes=4,n},t.tfhd.decode=function(e,t){},t.tfhd.encodingLength=function(e){return 4},t.tfdt={},t.tfdt.encode=function(e,n,r){return n=n?n.slice(r):o(4),n.writeUInt32BE(e.baseMediaDecodeTime||0,0),t.tfdt.encode.bytes=4,n},t.tfdt.decode=function(e,t){},t.tfdt.encodingLength=function(e){return 4},t.trun={},t.trun.encode=function(e,n,r){n=n?n.slice(r):o(8+16*e.entries.length),n.writeUInt32BE(e.entries.length,0),n.writeInt32BE(e.dataOffset,4);for(var i=8,s=0;s<e.entries.length;s++){var a=e.entries[s];n.writeUInt32BE(a.sampleDuration,i),i+=4,n.writeUInt32BE(a.sampleSize,i),i+=4,n.writeUInt32BE(a.sampleFlags,i),i+=4,0===(e.version||0)?n.writeUInt32BE(a.sampleCompositionTimeOffset,i):n.writeInt32BE(a.sampleCompositionTimeOffset,i),i+=4}t.trun.encode.bytes=i},t.trun.decode=function(e,t){},t.trun.encodingLength=function(e){return 8+16*e.entries.length},t.mdat={},t.mdat.encode=function(e,n,r){e.buffer?(e.buffer.copy(n,r),t.mdat.encode.bytes=e.buffer.length):t.mdat.encode.bytes=t.mdat.encodingLength(e)},t.mdat.decode=function(e,t,n){return{buffer:s(e.slice(t,n))}},t.mdat.encodingLength=function(e){return e.buffer?e.buffer.length:e.contentLength}},function(e,t,n){var r=n(278),i={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};t.Descriptor={},t.Descriptor.decode=function(e,n,o){var s=e.readUInt8(n),a=n+1,u,l=0,c;do{u=e.readUInt8(a++),l=l<<7|127&u}while(128&u);var f=i[s];return c=t[f]?t[f].decode(e,a,o):{buffer:r(e.slice(a,a+l))},c.tag=s,c.tagName=f,c.length=a-n+l,c.contentsLen=l,c},t.DescriptorArray={},t.DescriptorArray.decode=function(e,n,r){for(var o=n,s={};o+2<=r;){var a=t.Descriptor.decode(e,o,r);o+=a.length;var u=i[a.tag]||"Descriptor"+a.tag;s[u]=a}return s},t.ESDescriptor={},t.ESDescriptor.decode=function(e,n,r){var i=e.readUInt8(n+2),o=n+3;if(128&i&&(o+=2),64&i){var s=e.readUInt8(o);o+=s+1}return 32&i&&(o+=2),t.DescriptorArray.decode(e,o,r)},t.DecoderConfigDescriptor={},t.DecoderConfigDescriptor.decode=function(e,n,r){var i=e.readUInt8(n),o=t.DescriptorArray.decode(e,n+13,r);return o.oti=i,o}},function(e,t,n){(function(t){var r=n(688),i=n(1),o=n(283),s=n(130);function a(){}function u(){if(!(this instanceof u))return new u;r.Readable.call(this),this.destroyed=!1,this._reading=!1,this._stream=null,this._drain=null,this._want=!1,this._onreadable=t,this._onend=n;var e=this;function t(){e._want&&(e._want=!1,e._read())}function n(){e._stream=null}}function l(e){this._parent=e,this.destroyed=!1,r.PassThrough.call(this)}e.exports=u,i(u,r.Readable),u.prototype.mediaData=u.prototype.mdat=function(e,t){var n=new l(this);return this.box({type:"mdat",contentLength:e,encodeBufferLen:8,stream:n},t),n},u.prototype.box=function(e,n){if(n||(n=a),this.destroyed)return n(new Error("Encoder is destroyed"));var r;if(e.encodeBufferLen&&(r=s(e.encodeBufferLen)),e.stream)e.buffer=null,r=o.encode(e,r),this.push(r),this._stream=e.stream,this._stream.on("readable",this._onreadable),this._stream.on("end",this._onend),this._stream.on("end",n),this._forward();else{r=o.encode(e,r);var i=this.push(r);if(i)return t.nextTick(n);this._drain=n}},u.prototype.destroy=function(e){if(!this.destroyed){if(this.destroyed=!0,this._stream&&this._stream.destroy&&this._stream.destroy(),this._stream=null,this._drain){var t=this._drain;this._drain=null,t(e)}e&&this.emit("error",e),this.emit("close")}},u.prototype.finalize=function(){this.push(null)},u.prototype._forward=function(){if(this._stream)for(;!this.destroyed;){var e=this._stream.read();if(!e)return void(this._want=!!this._stream);if(!this.push(e))return}},u.prototype._read=function(){if(!this._reading&&!this.destroyed){if(this._reading=!0,this._stream&&this._forward(),this._drain){var e=this._drain;this._drain=null,e()}this._reading=!1}},i(l,r.PassThrough),l.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}).call(this,n(2))},function(e,t,n){const{Writable:r,PassThrough:i}=n(20);class o extends r{constructor(e,t={}){super(t),this.destroyed=!1,this._queue=[],this._position=e||0,this._cb=null,this._buffer=null,this._out=null}_write(e,t,n){let r=!0;for(;;){if(this.destroyed)return;if(0===this._queue.length)return this._buffer=e,void(this._cb=n);this._buffer=null;var i=this._queue[0];const t=Math.max(i.start-this._position,0),o=i.end-this._position;if(t>=e.length)return this._position+=e.length,n(null);let s;if(o>e.length){this._position+=e.length,s=0===t?e:e.slice(t),r=i.stream.write(s)&&r;break}this._position+=o,s=0===t&&o===e.length?e:e.slice(t,o),r=i.stream.write(s)&&r,i.last&&i.stream.end(),e=e.slice(o),this._queue.shift()}r?n(null):i.stream.once("drain",n.bind(null,null))}slice(e){if(this.destroyed)return null;Array.isArray(e)||(e=[e]);const t=new i;return e.forEach((n,r)=>{this._queue.push({start:n.start,end:n.end,stream:t,last:r===e.length-1})}),this._buffer&&this._write(this._buffer,null,this._cb),t}destroy(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e))}}e.exports=o},function(e,t,n){(function(t){var r=n(28);e.exports=function e(n,i,o){o=r(o);var s=t.alloc(i),a=0;n.on("data",function(e){e.copy(s,a),a+=e.length}).on("end",function(){o(null,s)}).on("error",o)}}).call(this,n(0).Buffer)},function(e,t,n){const r=n(5)("webtorrent:file-stream"),i=n(20);class o extends i.Readable{constructor(e,t){super(t),this.destroyed=!1,this._torrent=e._torrent;const n=t&&t.start||0,r=t&&t.end&&t.end<e.length?t.end:e.length-1,i=e._torrent.pieceLength;this._startPiece=(n+e.offset)/i|0,this._endPiece=(r+e.offset)/i|0,this._piece=this._startPiece,this._offset=n+e.offset-this._startPiece*i,this._missing=r-n+1,this._reading=!1,this._notifying=!1,this._criticalLength=Math.min(1048576/i|0,2)}_read(){this._reading||(this._reading=!0,this._notify())}_notify(){if(!this._reading||0===this._missing)return;if(!this._torrent.bitfield.get(this._piece))return this._torrent.critical(this._piece,this._piece+this._criticalLength);if(this._notifying)return;if(this._notifying=!0,this._torrent.destroyed)return this._destroy(new Error("Torrent removed"));const e=this._piece;this._torrent.store.get(e,(t,n)=>{if(this._notifying=!1,!this.destroyed){if(t)return this._destroy(t);r("read %s (length %s) (err %s)",e,n.length,t&&t.message),this._offset&&(n=n.slice(this._offset),this._offset=0),this._missing<n.length&&(n=n.slice(0,this._missing)),this._missing-=n.length,r("pushing buffer of length %s",n.length),this._reading=!1,this.push(n),0===this._missing&&this.push(null)}}),this._piece+=1}destroy(e){this._destroy(null,e)}_destroy(e,t){this.destroyed||(this.destroyed=!0,this._torrent.destroyed||this._torrent.deselect(this._startPiece,this._endPiece,!0),e&&this.emit("error",e),this.emit("close"),t&&t())}}e.exports=o},function(e,t,n){const r=n(695),i=n(5)("webtorrent:peer"),o=n(696),s=n(1828),a=5e3,u=25e3,l=25e3;t.createWebRTCPeer=((e,t)=>{const n=new c(e.id,"webrtc");return n.conn=e,n.swarm=t,n.conn.connected?n.onConnect():(n.conn.once("connect",()=>{n.onConnect()}),n.conn.once("error",e=>{n.destroy(e)}),n.startConnectTimeout()),n}),t.createTCPIncomingPeer=(e=>{const t=`${e.remoteAddress}:${e.remotePort}`,n=new c(t,"tcpIncoming");return n.conn=e,n.addr=t,n.onConnect(),n}),t.createTCPOutgoingPeer=((e,t)=>{const n=new c(e,"tcpOutgoing");return n.addr=e,n.swarm=t,n}),t.createWebSeedPeer=((e,t)=>{const n=new c(e,"webSeed");return n.swarm=t,n.conn=new s(e,t),n.onConnect(),n});class c{constructor(e,t){this.id=e,this.type=t,i("new %s Peer %s",t,e),this.addr=null,this.conn=null,this.swarm=null,this.wire=null,this.connected=!1,this.destroyed=!1,this.timeout=null,this.retries=0,this.sentHandshake=!1}onConnect(){if(this.destroyed)return;this.connected=!0,i("Peer %s connected",this.id),clearTimeout(this.connectTimeout);const e=this.conn;e.once("end",()=>{this.destroy()}),e.once("close",()=>{this.destroy()}),e.once("finish",()=>{this.destroy()}),e.once("error",e=>{this.destroy(e)});const t=this.wire=new o;t.type=this.type,t.once("end",()=>{this.destroy()}),t.once("close",()=>{this.destroy()}),t.once("finish",()=>{this.destroy()}),t.once("error",e=>{this.destroy(e)}),t.once("handshake",(e,t)=>{this.onHandshake(e,t)}),this.startHandshakeTimeout(),e.pipe(t).pipe(e),this.swarm&&!this.sentHandshake&&this.handshake()}onHandshake(e,t){if(!this.swarm)return;if(this.destroyed)return;if(this.swarm.destroyed)return this.destroy(new Error("swarm already destroyed"));if(e!==this.swarm.infoHash)return this.destroy(new Error("unexpected handshake info hash for this swarm"));if(t===this.swarm.peerId)return this.destroy(new Error("refusing to connect to ourselves"));i("Peer %s got handshake %s",this.id,e),clearTimeout(this.handshakeTimeout),this.retries=0;let n=this.addr;!n&&this.conn.remoteAddress&&this.conn.remotePort&&(n=`${this.conn.remoteAddress}:${this.conn.remotePort}`),this.swarm._onWire(this.wire,n),this.swarm&&!this.swarm.destroyed&&(this.sentHandshake||this.handshake())}handshake(){const e={dht:!this.swarm.private&&!!this.swarm.client.dht};this.wire.handshake(this.swarm.infoHash,this.swarm.client.peerId,e),this.sentHandshake=!0}startConnectTimeout(){clearTimeout(this.connectTimeout),this.connectTimeout=setTimeout(()=>{this.destroy(new Error("connect timeout"))},"webrtc"===this.type?u:a),this.connectTimeout.unref&&this.connectTimeout.unref()}startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.handshakeTimeout=setTimeout(()=>{this.destroy(new Error("handshake timeout"))},l),this.handshakeTimeout.unref&&this.handshakeTimeout.unref()}destroy(e){if(this.destroyed)return;this.destroyed=!0,this.connected=!1,i("destroy %s (error: %s)",this.id,e&&(e.message||e)),clearTimeout(this.connectTimeout),clearTimeout(this.handshakeTimeout);const t=this.swarm,n=this.conn,o=this.wire;this.swarm=null,this.conn=null,this.wire=null,t&&o&&r(t.wires,t.wires.indexOf(o)),n&&(n.on("error",()=>{}),n.destroy()),o&&o.destroy(),t&&t.removePeer(this.id)}}},function(e,t,n){"use strict";(function(r){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)}}function a(){var e;return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)}function u(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}}function l(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(){try{return localStorage}catch(e){}}t.log=a,t.formatArgs=s,t.save=u,t.load=l,t.useColors=o,t.storage=c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1822)(t);var f=e.exports.formatters;f.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){"use strict";function r(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function s(){if(s.enabled){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=s,a=Number(new Date),u=a-(n||a);o.diff=u,o.prev=n,o.curr=a,n=a,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;l++;var i=r.formatters[n];if("function"==typeof i){var s=t[l];e=i.call(o,s),t.splice(l,1),l--}return e}),r.formatArgs.call(o,t);var c=o.log||r.log;c.apply(o,t)}}return s.namespace=e,s.enabled=r.enabled(e),s.useColors=r.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function i(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function s(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&(e=n[t].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(87),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}e.exports=r},function(e,t,n){t=e.exports=n(697),t.Stream=t,t.Readable=t,t.Writable=n(700),t.Duplex=n(166),t.Transform=n(701),t.PassThrough=n(1827)},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(4).Buffer,o=n(1826);function s(e,t,n){e.copy(t,n)}e.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function e(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function e(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=function e(){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}},e.prototype.clear=function e(){this.head=this.tail=null,this.length=0},e.prototype.join=function e(t){if(0===this.length)return"";for(var n=this.head,r=""+n.data;n=n.next;)r+=t+n.data;return r},e.prototype.concat=function e(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var n=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)s(r.data,n,o),o+=r.data.length,r=r.next;return n},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){"use strict";e.exports=o;var r=n(701),i=n(7);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){const r=n(282),i=n(4).Buffer,o=n(5)("webtorrent:webconn"),s=n(371),a=n(205),u=n(696),l=n(373).version;class c extends u{constructor(e,t){super(),this.url=e,this.webPeerId=a.sync(e),this._torrent=t,this._init()}_init(){this.setKeepAlive(!0),this.once("handshake",(e,t)=>{if(this.destroyed)return;this.handshake(e,this.webPeerId);const n=this._torrent.pieces.length,i=new r(n);for(let e=0;e<=n;e++)i.set(e,!0);this.bitfield(i)}),this.once("interested",()=>{o("interested"),this.unchoke()}),this.on("uninterested",()=>{o("uninterested")}),this.on("choke",()=>{o("choke")}),this.on("unchoke",()=>{o("unchoke")}),this.on("bitfield",()=>{o("bitfield")}),this.on("request",(e,t,n,r)=>{o("request pieceIndex=%d offset=%d length=%d",e,t,n),this.httpRequest(e,t,n,r)})}httpRequest(e,t,n,r){const a=e*this._torrent.pieceLength,u=a+t,c=u+n-1,f=this._torrent.files;let h;if(f.length<=1)h=[{url:this.url,start:u,end:c}];else{const e=f.filter(e=>e.offset<=c&&e.offset+e.length>u);if(e.length<1)return r(new Error("Could not find file corresponnding to web seed range request"));h=e.map(e=>{const t=e.offset+e.length-1,n=this.url+("/"===this.url[this.url.length-1]?"":"/")+e.path;return{url:n,fileOffsetInRange:Math.max(e.offset-u,0),start:Math.max(u-e.offset,0),end:Math.min(t,c-e.offset)}})}let p=0,d=!1,m;h.length>1&&(m=i.alloc(n)),h.forEach(i=>{const a=i.url,u=i.start,c=i.end;o("Requesting url=%s pieceIndex=%d offset=%d length=%d start=%d end=%d",a,e,t,n,u,c);const f={url:a,method:"GET",headers:{"user-agent":`WebTorrent/${l} (https://webtorrent.io)`,range:`bytes=${u}-${c}`}};function g(e,t){if(e.statusCode<200||e.statusCode>=300)return d=!0,r(new Error(`Unexpected HTTP status code ${e.statusCode}`));o("Got data of length %d",t.length),1===h.length?r(null,t):(t.copy(m,i.fileOffsetInRange),++p===h.length&&r(null,m))}s.concat(f,(e,t,n)=>{if(!d)return e?"undefined"==typeof window||a.startsWith(`${window.location.origin}/`)?(d=!0,r(e)):s.head(a,(t,n)=>{if(!d){if(t)return d=!0,r(t);if(n.statusCode<200||n.statusCode>=300)return d=!0,r(new Error(`Unexpected HTTP status code ${n.statusCode}`));if(n.url===a)return d=!0,r(e);f.url=n.url,s.concat(f,(e,t,n)=>{if(!d)return e?(d=!0,r(e)):void g(t,n)})}}):void g(t,n)})})}destroy(){super.destroy(),this._torrent=null}}e.exports=c},function(e,t){class n{constructor(e){this._torrent=e,this._numPieces=e.pieces.length,this._pieces=new Array(this._numPieces),this._onWire=(e=>{this.recalculate(),this._initWire(e)}),this._onWireHave=(e=>{this._pieces[e]+=1}),this._onWireBitfield=(()=>{this.recalculate()}),this._torrent.wires.forEach(e=>{this._initWire(e)}),this._torrent.on("wire",this._onWire),this.recalculate()}getRarestPiece(e){let t=[],n=1/0;for(let r=0;r<this._numPieces;++r){if(e&&!e(r))continue;const i=this._pieces[r];i===n?t.push(r):i<n&&(t=[r],n=i)}return t.length?t[Math.random()*t.length|0]:-1}destroy(){this._torrent.removeListener("wire",this._onWire),this._torrent.wires.forEach(e=>{this._cleanupWireEvents(e)}),this._torrent=null,this._pieces=null,this._onWire=null,this._onWireHave=null,this._onWireBitfield=null}_initWire(e){e._onClose=(()=>{this._cleanupWireEvents(e);for(let t=0;t<this._numPieces;++t)this._pieces[t]-=e.peerPieces.get(t)}),e.on("have",this._onWireHave),e.on("bitfield",this._onWireBitfield),e.once("close",e._onClose)}recalculate(){this._pieces.fill(0);for(const e of this._torrent.wires)for(let t=0;t<this._numPieces;++t)this._pieces[t]+=e.peerPieces.get(t)}_cleanupWireEvents(e){e.removeListener("have",this._onWireHave),e.removeListener("bitfield",this._onWireBitfield),e._onClose&&e.removeListener("close",e._onClose),e._onClose=null}}e.exports=n},function(e,t){},function(e,t,n){var r;const i=n(32);r="undefined"==typeof window?n(702).FS:n(702).WOLK;const o=n(220),s=n(5)("dweb-transports:wolk"),a=n(97),u=n(134),l=n(115),c=n(170);let f={wolk_addr:"https://cloud.wolk.com"};class h extends u{constructor(e){super(e),this.options=e,this.wolk=void 0,this.name="WOLK",this.supportURLs=["wolk"],this.supportFunctions=["fetch","connection","get","set"],this.supportFeatures=[],this.status=u.STATUS_LOADED}connection(e){s("connection call");var t=new r;return t}static setup0(e){let t=u.mergeoptions(f,e.wolk);s("setup options=%o",t);let n=new h(t);return n.wolk=new r,n.wolk.setProvider(n.options.wolk_addr),l.addtransport(n),n}async p_setup1(e){await this.wolk.init().then(async()=>{if(void 0==this.wolk.ecdsaKey||null==this.wolk.ecdsaKey){var e="user"+Math.floor(1e3*Math.random()+1);return s("createAccount because ecdsaKey null"),await this.wolk.createAccount(e).then(t=>{s("Account Created: ["+e+"] hash: "+t+" KEY: "+this.wolk.ecdsaKey)}).catch(e=>{throw new Error("Error Creating Account: "+e)})}}).catch(e=>{throw new Error("Error Initializing Wolk: "+e)});try{this.status=u.STATUS_STARTING,e&&e(this),await this.p_status()}catch(e){this.status=u.STATUS_FAILED}return e&&e(this),this}async p_status(){return this.wolk.getLatestBlockNumber().then(e=>(e>=0?(s("STATUS: connected? [1] = BN: %s",e),this.status=u.STATUS_CONNECTED):(s("STATUS: connected? [0] = BN: %s",e),this.status=u.STATUS_FAILED),this.status)).catch(e=>{console.error("Error getting bn: "+e)})}async p_rawstore(e){console.assert(e,"TransportWOLK.p_rawstore: requires chunkdata")}parseWolkUrl(e){var e=i.parse(e);if("wolk:"!=e.protocol)throw new a.TransportError("WOLK Error encountered retrieving val: url ("+e.href+") is not a valid WOLK url | protocol = "+e.protocol);let t=e.host;var n=e.path.split("/");let r=n[1],o=e.path.substring(r.length+2);var s="key";"wolk"==t&&"chunk"==r&&(s="chunk");let u=e.query;return{owner:t,bucket:r,path:o,urltype:s,query:u}}async p_rawfetch(e){var t=this.parseWolkUrl(e),n="";if("key"==t.urltype)return s("Checking Wolk NoSQL for: %s",e),this.wolk.getKey(t.owner,t.bucket,t.path,"latest").then(function(e){return e}).catch(e=>{throw new Error("ERROR: p_rawfetch - "+e)})}async p_newdatabase(e){}async p_newtable(e,t){}async p_set(e,t,n){var r=this.parseWolkUrl(e);if("string"==typeof t)return this.wolk.setKey(r.owner,r.bucket,t,o(n)).then(e=>e).catch(e=>{throw new Error("TransportWOLK - Error setting key value pair: "+e)});console.assert(!Array.isArray(t),"TransportWOLK - shouldnt be passsing an array as the keyvalues")}async p_get(e,t){var n=this.parseWolkUrl(e);if(s("Getting url: %s",JSON.stringify(n)),Array.isArray(t))throw new a.ToBeImplementedError("p_get(url, [keys]) isn't supported - because of ambiguity better to explicitly loop on set of keys");return this.wolk.getKey(n.owner,n.bucket,t,"latest").then(e=>e).catch(e=>{throw new a.TransportError("Error encountered getting keyvalues: "+e)})}async p_delete(e,t){var n=this.parseWolkUrl(e);if("string"==typeof t)return this.wolk.deleteKey(n.owner,n.bucket,t).then(e=>e).catch(e=>{throw new a.TransportError("Error deleting key(s): "+e)});t.map(e=>{this.wolk.deleteKey(n.owner,n.bucket,e)})}async p_keys(e){var t=this.parseWolkUrl(e);return this.listCollection(t.owner,t.bucket,{})}async p_getall(e){}}l._transportclasses.WOLK=h,t=e.exports=h},function(e,t,n){"use strict";(function(t){const r=n(703),i=n(1944),o=n(1953),s=n(61),a=n(1955),u=n(15),l=n(1978),c=n(1981),f="default",h="public.key",p="private.key",d="id_rsa.pub",m="id_rsa",g="friends.key",y="personal.key",b="wolk",v="chunk",w="buckets",_=160,k=1,S=2,E=3,x=4,C=5,A=6,I=7,T=8,j=9,O=0,P=1,B=2,R=1e6,N="Put",M="Get",L="Delete",F="Query",D="Scan",U=1,z=1;class q{constructor(){this.provider="https://cloud.wolk.com",this.keyDir="~/.wolk/keys",this.developerTrustLevel=U,this.userTrustLevel=z,this.setWolkTrustLevel()}async init(){return await this.loadDefaultAccount().then(e=>e).catch(e=>{throw console.log("WOLK: loadAccount error: "+e),e})}setKeyDir(e){this.keyDir=e}setProvider(e){this.provider=e}setDeveloperTrustLevel(e){this.developerTrustLevel=e}setUserTrustLevel(e){this.userTrustLevel=e}setWolkTrustLevel(){this.userTrustLevel>this.developerTrustLevel?this.wolkTrustLevel=this.userTrustLevel:this.wolkTrustLevel=this.developerTrustLevel}loadDefaultAccount(){let e=s.join(this.keyDir,f);if(u.existsSync(e)){let t=u.readFileSync(e,"utf8");return this.loadAccount(t).then(()=>t).catch(e=>{throw new c(0,"Unable to load defaultAccount ["+t+"]")})}throw new c(0,"No Default Account found: please create one")}async setDefaultAccount(e){e=e.toLowerCase();let t=s.join(this.keyDir,f);return await H(t,e,"utf8").then(()=>(this.defaultAccount=e,new Promise(function(t,n){t(e)})))}async createAccount(e,t){e=e.toLowerCase();let n=s.join(this.keyDir,e);if(u.existsSync(n))return console.log("Account Already Exists Setting as DEFAULT:",n),await this.setDefaultAccount(e).then(()=>this.loadDefaultAccount().then(()=>this.loadAccount(e).then(()=>"accountexistslocally").catch(t=>{console.error("[fs:createAccount] Error - loadAccount: "+e+" | "+t)})));{console.log("Creating necessary key files locally"),u.mkdirSync(n,{recursive:!0},e=>{if(e)throw e});let r=await a.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]),i=await a.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),o=await a.subtle.generateKey({name:"AES-CTR",length:256},!0,["encrypt","decrypt"]),l=await a.subtle.generateKey({name:"AES-CTR",length:256},!0,["encrypt","decrypt"]);this.rsaKey=r.privateKey,this.ecdsaKey=i.privateKey,this.friendsKey=o,this.personalKey=l;let b=await a.subtle.exportKey("jwk",r.publicKey),v=await a.subtle.exportKey("jwk",r.privateKey),w=await a.subtle.exportKey("jwk",i.publicKey),_=await a.subtle.exportKey("jwk",i.privateKey),k=await a.subtle.exportKey("jwk",o),S=await a.subtle.exportKey("jwk",l);return this.ecdsaPublicKey=JSON.stringify(w),this.ecdsaPrivateKey=JSON.stringify(_),this.rsaPrivateKey=JSON.stringify(v),this.rsaPublicKey=JSON.stringify(b),this.friendsExportKey=JSON.stringify(k),this.personalExportKey=JSON.stringify(S),H(s.join(n,m),this.rsaPrivateKey,"utf8").then(()=>H(s.join(n,d),this.rsaPublicKey,"utf8")).then(()=>H(s.join(n,h),this.ecdsaPublicKey,"utf8")).then(()=>H(s.join(n,p),this.ecdsaPrivateKey,"utf8")).then(()=>H(s.join(n,g),this.friendsExportKey,"utf8")).then(()=>H(s.join(n,y),this.personalExportKey,"utf8")).then(()=>{if(void 0==this.defaultAccount){this.defaultAccount=e;let t=s.join(this.keyDir,f);return H(t,e,"utf8")}return new Promise((e,t)=>{e("")})}).then(async()=>await this.loadDefaultAccount(e).then(async()=>{let n=await this.setName(e,JSON.stringify(b),t);return n})).catch(e=>{throw new c(0,"ERROR: createAccount "+e)})}}loadAccount(e){e=e.toLowerCase();let t=s.join(this.keyDir,e);return u.existsSync(t)||console.log("no such directory:",t),this.ecdsaPublicKey=u.readFileSync(s.join(t,h),"utf8"),this.ecdsaPrivateKey=u.readFileSync(s.join(t,p),"utf8"),this.rsaPrivateKey=u.readFileSync(s.join(t,m),"utf8"),this.rsaPublicKey=u.readFileSync(s.join(t,d),"utf8"),this.friendsExportKey=u.readFileSync(s.join(t,g),"utf8"),this.personalExportKey=u.readFileSync(s.join(t,y),"utf8"),a.subtle.importKey("jwk",JSON.parse(this.ecdsaPrivateKey),{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]).then((e,t)=>{this.ecdsaKey={},this.ecdsaKey.privateKey=e}).catch(e=>{})}setName(e,n,r){return e=e.toLowerCase(),this.post(e,{name:e,rsaPublicKey:t.from(n).toString("base64")},{},r)}determineProofValue(){let e=Math.random();return e<=this.wolkTrustLevel?1:0}getBlock(e,t){return this.get(W("wolk","block",e.toString(10)),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}getNode(e,t){return this.get(W("wolk","node",e.toString(10)),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}getPeers(e,t){return this.get(W("wolk","info"),{Proof:this.determineProofValue()},t).then(e=>("string"==typeof e&&(e=JSON.parse(e)),e.peers)).catch(e=>{throw e})}getPendingTxCount(e,t){return this.get(W("wolk","info"),{Proof:this.determineProofValue()},t).then(e=>("string"==typeof e&&(e=JSON.parse(e)),e.pendingTxCount)).catch(e=>{throw e})}updateNode(e,t,n){return this.patch(W("wolk","node",e.toString(10)),t,{},n)}getName(e,t){return e=e.toLowerCase(),this.get(W("wolk","name",e),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}getAccount(e,t){return e=e.toLowerCase(),this.get(W("wolk","account",e),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}getLatestBlockNumber(e){return this.get(W("wolk","block","latest"),{Proof:this.determineProofValue()},e).catch(e=>{throw e})}getBalance(e,t){return e=e.toLowerCase(),this.getAccount(e).then(e=>{var t=JSON.parse(e);return t.balance}).catch(e=>{throw e})}getTransaction(e,t){return this.get(W("wolk","tx",e),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}transfer(e,t,n){return this.post(W("wolk","transfer"),{recipient:e,amount:t},{},n)}createBucket(e,t,n,r){var i=K(t,O,n);return this.post(W(e,t),JSON.stringify(i),{},r)}createCollection(e,t,n,r){var i=K(t,P,n);return this.post(W(e,t),JSON.stringify(i),{},r)}listCollections(e,t){return this.get(e,{Proof:this.determineProofValue()},t).catch(e=>{throw e})}listCollection(e,t,n){return this.get(W(e,t),{Proof:this.determineProofValue()},n).catch(e=>{throw e})}deleteCollection(e,t,n){return this.delete(W(e,t),{},n)}scanCollection(e,t,n,r){return this.get(W(e,t),{Proof:this.determineProofValue()},r).catch(e=>{throw e})}setKey(e,t,n,r,i,o){return this.put(W(e,t,n),r,{WaitForTx:i},o)}getKey(e,t,n,r,i){return this.get(W(e,t,n),{Proof:this.determineProofValue()},i).catch(e=>{throw e})}getChunk(e,t,n){return this.get(W(b,v,e),{Proof:this.determineProofValue()},n).catch(e=>{throw e})}deleteKey(e,t,n,r){return this.delete(W(e,t,n),{},r)}createDatabase(e,t,n,r){return this.post(W(e,t),JSON.stringify({name:t,bucketType:B,requesterPays:0,encryption:"none"}),n,{},r)}listDatabases(e,t){return this.get(W(e),{Proof:this.determineProofValue()},t).catch(e=>{throw e})}deleteDatabase(e,t,n){return this.delete(W(e,collection),{},n)}executeSQL(e,t,n,r,i){return this.post(W(e,t,n),n,r,i)}async get(e,t,n){return this.wrequest("GET",e,null,t,n)}async post(e,t,n,r){return this.wrequest("POST",e,t,n,r)}async put(e,t,n,r){return this.wrequest("PUT",e,t,n,r)}async patch(e,t,n,r){return this.wrequest("PATCH",e,t,n,r)}async delete(e,t,n){return this.wrequest("DELETE",e,null,t,n)}sleep(e){return new Promise(t=>setTimeout(t,e))}computeHash(e){return t.from(this.toByteArray(l(t.from(e))))}toByteArray(e){for(var t=[];e.length>=2;)t.push(parseInt(e.substring(0,2),16)),e=e.substring(2,e.length);return t}async waitForTx(e,t){let n=!1,r=0;for(;!n;)if(this.getTransaction(e,function(e,r,i){if(e);else try{let e=JSON.parse(r);if(void 0!=e.BlockNumber)return n=!0,t(null,e)}catch(e){}}),await this.sleep(500),r++>15)return n=!0,t(new Error("timeout, tx not included"),null)}async wrequest(e,t,n,r,i){let o=this;return"function"==typeof i?this.wreq(e,t,n,r,i):new Promise((i,s)=>o.wreq(e,t,n,r,function(e,t){e?s(e):i(t)}))}async wreq(e,n,r,s,u){let l=e+"/"+n;"POST"!=e&&"PATCH"!=e||("object"==typeof r&&(r=JSON.stringify(r)),null!=r&&(l+=r));let f=t.from(l).toString("utf8"),h=this;var p={method:e,url:this.provider+"/"+n,headers:{Requester:this.ecdsaPublicKey,Msg:l},body:r,resolveWithFullResponse:!0};for(var d in s)p.headers[d]=s[d];var m="",g="",y;return void 0!=this.ecdsaKey&&(y=await a.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},this.ecdsaKey.privateKey,f).catch(function(e){console.error("ERR: crypto.subtle.sign "+e)}),p.headers.Sig=V(y)),i(p).then(e=>"200"==e.statusCode?(void 0!=e.headers.proof&&void 0!=e.headers["proof-type"]&&(m=e.headers.proof,g=e.headers["proof-type"]),e.body):(console.log("ERROR: StatusCode ",e.statusCode,JSON.stringify(e.status),JSON.stringify(e.statusText)),u(new c(e.statusCode,e.body),null))).then(function(e){if(1!=p.headers.Proof)return u(null,e);if(console.log("Checking Proof"),m.length>0)return ee(n,s,m,g,e).then(t=>{if(t)return u(null,e);{let t=412;return u(new c(t,"unverified proof"),e)}});{let e=412;return u(new c(e,"proof requested but not returned by wolk provider: ["+this.provider+"]"),null)}}).catch(o.StatusCodeError,function(e){var t=new c(e.statusCode,e.error);return u(t,null)}).catch(e=>{let t=503;return u(new c(503,e),null)})}}function K(e,t,n){var r={name:e,bucketType:t};return void 0!=n&&(r.requesterPays=0,r.encryption="none",r.shimURL=n.shimURL),r}function H(e,t,n){return new Promise(function(r,i){u.writeFile(e,t,n,function(e){e?i(e):r(t)})})}function V(e){return Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")}function W(...e){return e.map((e,t)=>0===t?e.trim().replace(/[\/]*$/g,""):e.trim().replace(/(^[\/]*|[\/]*$)/g,"")).filter(e=>e.length).join("/")}function $(e){return a.subtle.digest({name:"SHA-256"},e).catch(e=>{console.error("[fs.js:ComputeHash] error calling crypto.subtle.digest => "+e)})}function G(e){if(!e)return new Uint8Array;"0"==e[0]&&"x"==e[1]&&(e=e.substr(2,e.length-2));for(var t=[],n=0,r=e.length;n<r;n+=2)t.push(parseInt(e.substr(n,2),16));return new Uint8Array(t)}function Y(e,t){let n=t%8,r=19-(t>>3),i=(1<<n&e[r])>0;return i}function J(e,t){if(e.byteLength!=t.byteLength)return!1;for(var n=new Int8Array(e),r=new Int8Array(t),i=0;i!=e.byteLength;i++)if(n[i]!=r[i])return!1;return!0}function Z(e){let t=[];for(var n=0;n<e.Proof.length;n++)t.push(G(e.Proof[n]));let r={SMTTreeDepth:160,Key:G(e.Key),Proof:t,ProofBits:G(e.ProofBits)};return r}async function X(e){var t=new Array;t[0]=new Uint8Array(await $(new Uint8Array(0)));for(var n=1;n<e;n++)t[n]=await $(Uint8Array.of(...new Uint8Array(t[n-1]),...new Uint8Array(t[n-1])));return t}async function Q(e,t,n,r,i){var o=await X(160);let s=n,a=e.ProofBits,u=0;for(var l,c=0;c<e.SMTTreeDepth;c++)if(Y(a,c)){var f=e.Proof[u];s=Y(t,c)?await $(Uint8Array.of(...f,...new Uint8Array(s))):await $(Uint8Array.of(...new Uint8Array(s),...f)),u++}else s=Y(t,c)?await $(Uint8Array.of(...new Uint8Array(o[c]),...new Uint8Array(s))):await $(Uint8Array.of(...new Uint8Array(s),...new Uint8Array(o[c])));let h=V(s),p=V(r);return h==p?(i>1&&console.log("SUCCESS","merkleRootComputed",h),!0):(console.log("checkSMTProof FAIL-merkleRoot MISMATCH",h),!1)}function ee(e,t,n,r,i){if(void 0==t.Proof)return!0;switch(r){case"SMT":let t=JSON.parse(n);return te(t,0);case"NoSQLScan":case"NoSQL":let o=JSON.parse(n);return ne(r,o,e,0,i,0)}return!1}async function te(e,t){let n=Z(e.Proof);return await Q(n,G(e.KeyHash),G(e.TxHash),G(e.MerkleRoot),t)}async function ne(e,t,n,r,i,o){let s=ae(n);if(t.Collection!=s.collection)return console.log("Collection Mismatch",t.Collection,s.collection),!1;let a=await X(160);if("NoSQLScan"==e){if(void 0!=t.ScanProofs){console.log("NoSQLScan with ScanProofs");for(var u=0;u<t.ScanProofs.length;u++){let e=t.ScanProofs[u],n=Z(e.KeyProof);if(0==t.Collection.length){let r=await Q(n,n.Key,G(e.TxHash),G(t.SystemMerkleRoot),a,o);if(!r)return!1}else{let r=Q(n,n.Key,G(e.TxHash),G(t.CollectionMerkleRoot),a,o);if(!r)return!1}}}else if(0==t.Collection.length){if("0x44a00e7ae0499c6e377b95709f3851843976ea6c2a86eff46adfe15608d22005"!==t.SystemChunkHash)return!1;let e=Z(t.SystemProof),n=Q(e,e.Key,G(t.SystemChunkHash),G(t.KeyMerkleRoot),a,o);if(!n)return!1;console.log("NoSQLScan SUCCESS","ch",t.SystemChunkHash,"mr",t.KeyMerkleRoot)}else if("0x44a00e7ae0499c6e377b95709f3851843976ea6c2a86eff46adfe15608d22005"!==t.CollectionChunkHash)return!1;return console.log("NoSQLScan Proof Verified"),!0}if(t.Key!=s.path)return console.log(t),console.log("Key Mismatch: [",t.Key,"] key: [",s.path,"]"),!1;let l=Z(t.KeyProof),c=await re(s.path);if(!J(c,l.Key))return console.log("Key Mismatch",l.Key,"keyHash",c,"path",s.path),!1;let f=G(t.TxHash),h=G(t.CollectionMerkleRoot),p=await Q(l,c,f,h,a,o);if(!p)return console.log("KeyProof Verification FAILED"),!1;if(console.log("KeyProofCheck: ",p),void 0==t.Tx)return console.log("Tx not supplied"),!1;let d=G(t.Tx.txhash),m=s.owner,g=G(t.Tx.signer),y=Z(t.CollectionProof),b=await oe(m,s.collection);if(!J(y.Key,b))return console.log("Collection Mismatch",y.Key,"collHash",b),!1;let v=G(t.CollectionChunkHash),w=G(t.KeyMerkleRoot),_=await Q(y,b,v,w,a,o);if(!_)return console.log("CollectionProof Verification FAILED",y),!1;console.log("CollectionProof Verified");let k=Z(t.SystemProof),S=await re(m);if(!J(k.Key,S))return console.log("System Mismatch"),!1;let E=G(t.SystemChunkHash),x=await Q(k,S,E,w,a,o);return x?(console.log("SystemProof Verified"),!0):(console.log("SystemProof FAILED"),!1)}async function re(e){return new Uint8Array(await $(ie(e))).subarray(0,20)}function ie(e){var t=encodeURIComponent(e),n=t.replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}),r=new Uint8Array(n.length);return Array.prototype.forEach.call(n,function(e,t){r[t]=e.charCodeAt(0)}),r}async function oe(e,t){let n=await $(Uint8Array.of(...ie(e),...ie(t)));return new Uint8Array(n.slice(0,20))}function se(e){}function ae(e){let t=e.split("/");var n="",r="",i="",o={owner:"",collection:"",path:""};return t.length>0&&(o.owner=t.shift()),t.length>0&&(o.collection=t.shift()),t.length>0&&(o.path=t.join("/")),o}"undefined"!=typeof window&&void 0===window.WOLK&&(window.WOLK=q),e.exports=q}).call(this,n(0).Buffer)},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(15),i=n(32).parse,o=n(13),s=n(705),a=n(707).Store,u=n(1835).MemoryCookieStore,l=n(709).pathMatch,c=n(1836).version,f;try{f=n(213)}catch(e){console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization")}var h=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/,p=/[\x00-\x1F]/,d=["\n","\r","\0"],m=/[\x20-\x3A\x3C-\x7E]+/,g=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/,y={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],w=2147483647e3,_=0;function k(e,t,n,r){for(var i=0;i<e.length;){var o=e.charCodeAt(i);if(o<=47||o>=58)break;i++}return i<t||i>n?null:r||i==e.length?parseInt(e.substr(0,i),10):null}function S(e){var t=e.split(":"),n=[0,0,0];if(3!==t.length)return null;for(var r=0;r<3;r++){var i=2==r,o=k(t[r],1,2,i);if(null===o)return null;n[r]=o}return n}function E(e){e=String(e).substr(0,3).toLowerCase();var t=y[e];return t>=0?t:null}function x(e){if(e){var t=e.split(g);if(t){for(var n=null,r=null,i=null,o=null,s=null,a=null,u=0;u<t.length;u++){var l=t[u].trim(),c;if(l.length)null===i&&(c=S(l),c)?(n=c[0],r=c[1],i=c[2]):null!==o||(c=k(l,1,2,!0),null===c)?null!==s||(c=E(l),null===c)?null===a&&(c=k(l,2,4,!0),null!==c&&(a=c,a>=70&&a<=99?a+=1900:a>=0&&a<=69&&(a+=2e3))):s=c:o=c}if(!(null===o||null===s||null===a||null===i||o<1||o>31||a<1601||n>23||r>59||i>59))return new Date(Date.UTC(a,s,o,n,r,i))}}}function C(e){var t=e.getUTCDate();t=t>=10?t:"0"+t;var n=e.getUTCHours();n=n>=10?n:"0"+n;var r=e.getUTCMinutes();r=r>=10?r:"0"+r;var i=e.getUTCSeconds();return i=i>=10?i:"0"+i,v[e.getUTCDay()]+", "+t+" "+b[e.getUTCMonth()]+" "+e.getUTCFullYear()+" "+n+":"+r+":"+i+" GMT"}function A(e){return null==e?null:(e=e.trim().replace(/^\./,""),f&&/[^\u0001-\u007f]/.test(e)&&(e=f.toASCII(e)),e.toLowerCase())}function I(e,t,n){if(null==e||null==t)return null;if(!1!==n&&(e=A(e),t=A(t)),e==t)return!0;if(r.isIP(e))return!1;var i=e.indexOf(t);return!(i<=0)&&(e.length===t.length+i&&"."===e.substr(i-1,1))}function T(e){if(!e||"/"!==e.substr(0,1))return"/";if("/"===e)return e;var t=e.lastIndexOf("/");return 0===t?"/":e.slice(0,t)}function j(e){for(var t=0;t<d.length;t++){var n=e.indexOf(d[t]);-1!==n&&(e=e.substr(0,n))}return e}function O(e,t){e=j(e);var n=e.indexOf("="),r,i;if(t)0===n&&(e=e.substr(1),n=e.indexOf("="));else if(n<=0)return;if(n<=0?(r="",i=e.trim()):(r=e.substr(0,n).trim(),i=e.substr(n+1).trim()),!p.test(r)&&!p.test(i)){var o=new F;return o.key=r,o.value=i,o}}function P(e,t){t&&"object"==typeof t||(t={}),e=e.trim();var n=e.indexOf(";"),r=-1===n?e:e.substr(0,n),i=O(r,!!t.loose);if(i){if(-1===n)return i;var o=e.slice(n+1).trim();if(0===o.length)return i;for(var s=o.split(";");s.length;){var a=s.shift().trim();if(0!==a.length){var u=a.indexOf("="),l,c;switch(-1===u?(l=a,c=null):(l=a.substr(0,u),c=a.substr(u+1)),l=l.trim().toLowerCase(),c&&(c=c.trim()),l){case"expires":if(c){var f=x(c);f&&(i.expires=f)}break;case"max-age":if(c&&/^-?[0-9]+$/.test(c)){var h=parseInt(c,10);i.setMaxAge(h)}break;case"domain":if(c){var p=c.trim().replace(/^\./,"");p&&(i.domain=p.toLowerCase())}break;case"path":i.path=c&&"/"===c[0]?c:null;break;case"secure":i.secure=!0;break;case"httponly":i.httpOnly=!0;break;default:i.extensions=i.extensions||[],i.extensions.push(a)}}}return i}}function B(e){var t;try{t=JSON.parse(e)}catch(e){return e}return t}function R(e){if(!e)return null;var t;if("string"==typeof e){if(t=B(e),t instanceof Error)return null}else t=e;for(var n=new F,r=0;r<F.serializableProperties.length;r++){var i=F.serializableProperties[r];void 0!==t[i]&&t[i]!==F.prototype[i]&&("expires"===i||"creation"===i||"lastAccessed"===i?null===t[i]?n[i]=null:n[i]="Infinity"==t[i]?"Infinity":new Date(t[i]):n[i]=t[i])}return n}function N(e,t){var n=0,r=e.path?e.path.length:0,i=t.path?t.path.length:0;if(n=i-r,0!==n)return n;var o=e.creation?e.creation.getTime():w,s=t.creation?t.creation.getTime():w;return n=o-s,0!==n?n:(n=e.creationIndex-t.creationIndex,n)}function M(e){if("/"===e)return["/"];e.lastIndexOf("/")===e.length-1&&(e=e.substr(0,e.length-1));for(var t=[e];e.length>1;){var n=e.lastIndexOf("/");if(0===n)break;e=e.substr(0,n),t.push(e)}return t.push("/"),t}function L(e){if(e instanceof Object)return e;try{e=decodeURI(e)}catch(e){}return i(e)}function F(e){e=e||{},Object.keys(e).forEach(function(t){F.prototype.hasOwnProperty(t)&&F.prototype[t]!==e[t]&&"_"!==t.substr(0,1)&&(this[t]=e[t])},this),this.creation=this.creation||new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++F.cookiesCreated})}function D(e,t){"boolean"==typeof t?t={rejectPublicSuffixes:t}:null==t&&(t={}),null!=t.rejectPublicSuffixes&&(this.rejectPublicSuffixes=t.rejectPublicSuffixes),null!=t.looseMode&&(this.enableLooseMode=t.looseMode),e||(e=new u),this.store=e}F.cookiesCreated=0,F.parse=P,F.fromJSON=R,F.prototype.key="",F.prototype.value="",F.prototype.expires="Infinity",F.prototype.maxAge=null,F.prototype.domain=null,F.prototype.path=null,F.prototype.secure=!1,F.prototype.httpOnly=!1,F.prototype.extensions=null,F.prototype.hostOnly=null,F.prototype.pathIsDefault=null,F.prototype.creation=null,F.prototype.lastAccessed=null,Object.defineProperty(F.prototype,"creationIndex",{configurable:!0,enumerable:!1,writable:!0,value:0}),F.serializableProperties=Object.keys(F.prototype).filter(function(e){return!(F.prototype[e]instanceof Function||"creationIndex"===e||"_"===e.substr(0,1))}),F.prototype.inspect=function e(){var t=Date.now();return'Cookie="'+this.toString()+"; hostOnly="+(null!=this.hostOnly?this.hostOnly:"?")+"; aAge="+(this.lastAccessed?t-this.lastAccessed.getTime()+"ms":"?")+"; cAge="+(this.creation?t-this.creation.getTime()+"ms":"?")+'"'},o.inspect.custom&&(F.prototype[o.inspect.custom]=F.prototype.inspect),F.prototype.toJSON=function(){for(var e={},t=F.serializableProperties,n=0;n<t.length;n++){var r=t[n];this[r]!==F.prototype[r]&&("expires"===r||"creation"===r||"lastAccessed"===r?null===this[r]?e[r]=null:e[r]="Infinity"==this[r]?"Infinity":this[r].toISOString():"maxAge"===r?null!==this[r]&&(e[r]=this[r]==1/0||this[r]==-1/0?this[r].toString():this[r]):this[r]!==F.prototype[r]&&(e[r]=this[r]))}return e},F.prototype.clone=function(){return R(this.toJSON())},F.prototype.validate=function e(){if(!h.test(this.value))return!1;if(!(this.expires==1/0||this.expires instanceof Date||x(this.expires)))return!1;if(null!=this.maxAge&&this.maxAge<=0)return!1;if(null!=this.path&&!m.test(this.path))return!1;var t=this.cdomain();if(t){if(t.match(/\.$/))return!1;var n=s.getPublicSuffix(t);if(null==n)return!1}return!0},F.prototype.setExpires=function e(t){t instanceof Date?this.expires=t:this.expires=x(t)||"Infinity"},F.prototype.setMaxAge=function e(t){this.maxAge=t===1/0||t===-1/0?t.toString():t},F.prototype.cookieString=function e(){var t=this.value;return null==t&&(t=""),""===this.key?t:this.key+"="+t},F.prototype.toString=function e(){var t=this.cookieString();return this.expires!=1/0&&(this.expires instanceof Date?t+="; Expires="+C(this.expires):t+="; Expires="+this.expires),null!=this.maxAge&&this.maxAge!=1/0&&(t+="; Max-Age="+this.maxAge),this.domain&&!this.hostOnly&&(t+="; Domain="+this.domain),this.path&&(t+="; Path="+this.path),this.secure&&(t+="; Secure"),this.httpOnly&&(t+="; HttpOnly"),this.extensions&&this.extensions.forEach(function(e){t+="; "+e}),t},F.prototype.TTL=function e(t){if(null!=this.maxAge)return this.maxAge<=0?0:1e3*this.maxAge;var n=this.expires;return n!=1/0?(n instanceof Date||(n=x(n)||1/0),n==1/0?1/0:n.getTime()-(t||Date.now())):1/0},F.prototype.expiryTime=function e(t){if(null!=this.maxAge){var n=t||this.creation||new Date,r=this.maxAge<=0?-1/0:1e3*this.maxAge;return n.getTime()+r}return this.expires==1/0?1/0:this.expires.getTime()},F.prototype.expiryDate=function e(t){var n=this.expiryTime(t);return n==1/0?new Date(w):n==-1/0?new Date(0):new Date(n)},F.prototype.isPersistent=function e(){return null!=this.maxAge||this.expires!=1/0},F.prototype.cdomain=F.prototype.canonicalizedDomain=function e(){return null==this.domain?null:A(this.domain)},D.prototype.store=null,D.prototype.rejectPublicSuffixes=!0,D.prototype.enableLooseMode=!1;var U=[];function z(e){return function(){if(!this.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");var t=Array.prototype.slice.call(arguments),n,r;if(t.push(function e(t,i){n=t,r=i}),this[e].apply(this,t),n)throw n;return r}}U.push("setCookie"),D.prototype.setCookie=function(e,t,n,r){var i,o=L(t);n instanceof Function&&(r=n,n={});var a=A(o.hostname),u=this.enableLooseMode;if(null!=n.loose&&(u=n.loose),e instanceof F||(e=F.parse(e,{loose:u})),!e)return i=new Error("Cookie failed to parse"),r(n.ignoreError?null:i);var l=n.now||new Date;if(this.rejectPublicSuffixes&&e.domain){var c=s.getPublicSuffix(e.cdomain());if(null==c)return i=new Error("Cookie has domain set to a public suffix"),r(n.ignoreError?null:i)}if(e.domain){if(!I(a,e.cdomain(),!1))return i=new Error("Cookie not in this host's domain. Cookie:"+e.cdomain()+" Request:"+a),r(n.ignoreError?null:i);null==e.hostOnly&&(e.hostOnly=!1)}else e.hostOnly=!0,e.domain=a;if(e.path&&"/"===e.path[0]||(e.path=T(o.pathname),e.pathIsDefault=!0),!1===n.http&&e.httpOnly)return i=new Error("Cookie is HttpOnly and this isn't an HTTP API"),r(n.ignoreError?null:i);var f=this.store;function h(t,i){if(t)return r(t);var o=function(t){if(t)return r(t);r(null,e)};if(i){if(!1===n.http&&i.httpOnly)return t=new Error("old Cookie is HttpOnly and this isn't an HTTP API"),r(n.ignoreError?null:t);e.creation=i.creation,e.creationIndex=i.creationIndex,e.lastAccessed=l,f.updateCookie(i,e,o)}else e.creation=e.lastAccessed=l,f.putCookie(e,o)}f.updateCookie||(f.updateCookie=function(e,t,n){this.putCookie(t,n)}),f.findCookie(e.domain,e.path,e.key,h)},U.push("getCookies"),D.prototype.getCookies=function(e,t,n){var r=L(e);t instanceof Function&&(n=t,t={});var i=A(r.hostname),o=r.pathname||"/",s=t.secure;null!=s||!r.protocol||"https:"!=r.protocol&&"wss:"!=r.protocol||(s=!0);var a=t.http;null==a&&(a=!0);var u=t.now||Date.now(),c=!1!==t.expire,f=!!t.allPaths,h=this.store;function p(e){if(e.hostOnly){if(e.domain!=i)return!1}else if(!I(i,e.domain,!1))return!1;return!(!f&&!l(o,e.path))&&(!(e.secure&&!s)&&(!(e.httpOnly&&!a)&&(!(c&&e.expiryTime()<=u)||(h.removeCookie(e.domain,e.path,e.key,function(){}),!1))))}h.findCookies(i,f?null:o,function(e,r){if(e)return n(e);r=r.filter(p),!1!==t.sort&&(r=r.sort(N));var i=new Date;r.forEach(function(e){e.lastAccessed=i}),n(null,r)})},U.push("getCookieString"),D.prototype.getCookieString=function(){var e=Array.prototype.slice.call(arguments,0),t=e.pop(),n=function(e,n){e?t(e):t(null,n.sort(N).map(function(e){return e.cookieString()}).join("; "))};e.push(n),this.getCookies.apply(this,e)},U.push("getSetCookieStrings"),D.prototype.getSetCookieStrings=function(){var e=Array.prototype.slice.call(arguments,0),t=e.pop(),n=function(e,n){e?t(e):t(null,n.map(function(e){return e.toString()}))};e.push(n),this.getCookies.apply(this,e)},U.push("serialize"),D.prototype.serialize=function(e){var t=this.store.constructor.name;"Object"===t&&(t=null);var n={version:"tough-cookie@"+c,storeType:t,rejectPublicSuffixes:!!this.rejectPublicSuffixes,cookies:[]};if(!this.store.getAllCookies||"function"!=typeof this.store.getAllCookies)return e(new Error("store does not support getAllCookies and cannot be serialized"));this.store.getAllCookies(function(t,r){return t?e(t):(n.cookies=r.map(function(e){return e=e instanceof F?e.toJSON():e,delete e.creationIndex,e}),e(null,n))})},D.prototype.toJSON=function(){return this.serializeSync()},U.push("_importCookies"),D.prototype._importCookies=function(e,t){var n=this,r=e.cookies;if(!r||!Array.isArray(r))return t(new Error("serialized jar has no cookies array"));function i(e){if(e)return t(e);if(!r.length)return t(e,n);var o;try{o=R(r.shift())}catch(e){return t(e)}if(null===o)return i(null);n.store.putCookie(o,i)}r=r.slice(),i()},D.deserialize=function(e,t,n){var r;if(3!==arguments.length&&(n=t,t=null),"string"==typeof e){if(r=B(e),r instanceof Error)return n(r)}else r=e;var i=new D(t,r.rejectPublicSuffixes);i._importCookies(r,function(e){if(e)return n(e);n(null,i)})},D.deserializeSync=function(e,t){var n="string"==typeof e?JSON.parse(e):e,r=new D(t,n.rejectPublicSuffixes);if(!r.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");return r._importCookiesSync(n),r},D.fromJSON=D.deserializeSync,U.push("clone"),D.prototype.clone=function(e,t){1===arguments.length&&(t=e,e=null),this.serialize(function(n,r){if(n)return t(n);D.deserialize(e,r,t)})},U.forEach(function(e){D.prototype[e+"Sync"]=z(e)}),t.CookieJar=D,t.Cookie=F,t.Store=a,t.MemoryCookieStore=u,t.parseDate=x,t.formatDate=C,t.parse=P,t.fromJSON=R,t.domainMatch=I,t.defaultPath=T,t.pathMatch=l,t.getPublicSuffix=s.getPublicSuffix,t.cookieCompare=N,t.permuteDomain=n(708).permuteDomain,t.permutePath=M,t.canonicalDomain=A},function(e){e.exports=["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac","org.ac","ad","nom.ad","ae","co.ae","net.ae","org.ae","sch.ae","ac.ae","gov.ae","mil.ae","aero","accident-investigation.aero","accident-prevention.aero","aerobatic.aero","aeroclub.aero","aerodrome.aero","agents.aero","aircraft.aero","airline.aero","airport.aero","air-surveillance.aero","airtraffic.aero","air-traffic-control.aero","ambulance.aero","amusement.aero","association.aero","author.aero","ballooning.aero","broker.aero","caa.aero","cargo.aero","catering.aero","certification.aero","championship.aero","charter.aero","civilaviation.aero","club.aero","conference.aero","consultant.aero","consulting.aero","control.aero","council.aero","crew.aero","design.aero","dgca.aero","educator.aero","emergency.aero","engine.aero","engineer.aero","entertainment.aero","equipment.aero","exchange.aero","express.aero","federation.aero","flight.aero","freight.aero","fuel.aero","gliding.aero","government.aero","groundhandling.aero","group.aero","hanggliding.aero","homebuilt.aero","insurance.aero","journal.aero","journalist.aero","leasing.aero","logistics.aero","magazine.aero","maintenance.aero","media.aero","microlight.aero","modelling.aero","navigation.aero","parachuting.aero","paragliding.aero","passenger-association.aero","pilot.aero","press.aero","production.aero","recreation.aero","repbody.aero","res.aero","research.aero","rotorcraft.aero","safety.aero","scientist.aero","services.aero","show.aero","skydiving.aero","software.aero","student.aero","trader.aero","trading.aero","trainer.aero","union.aero","workinggroup.aero","works.aero","af","gov.af","com.af","org.af","net.af","edu.af","ag","com.ag","org.ag","net.ag","co.ag","nom.ag","ai","off.ai","com.ai","net.ai","org.ai","al","com.al","edu.al","gov.al","mil.al","net.al","org.al","am","co.am","com.am","commune.am","net.am","org.am","ao","ed.ao","gv.ao","og.ao","co.ao","pb.ao","it.ao","aq","ar","com.ar","edu.ar","gob.ar","gov.ar","int.ar","mil.ar","musica.ar","net.ar","org.ar","tur.ar","arpa","e164.arpa","in-addr.arpa","ip6.arpa","iris.arpa","uri.arpa","urn.arpa","as","gov.as","asia","at","ac.at","co.at","gv.at","or.at","au","com.au","net.au","org.au","edu.au","gov.au","asn.au","id.au","info.au","conf.au","oz.au","act.au","nsw.au","nt.au","qld.au","sa.au","tas.au","vic.au","wa.au","act.edu.au","nsw.edu.au","nt.edu.au","qld.edu.au","sa.edu.au","tas.edu.au","vic.edu.au","wa.edu.au","qld.gov.au","sa.gov.au","tas.gov.au","vic.gov.au","wa.gov.au","aw","com.aw","ax","az","com.az","net.az","int.az","gov.az","org.az","edu.az","info.az","pp.az","mil.az","name.az","pro.az","biz.az","ba","com.ba","edu.ba","gov.ba","mil.ba","net.ba","org.ba","bb","biz.bb","co.bb","com.bb","edu.bb","gov.bb","info.bb","net.bb","org.bb","store.bb","tv.bb","*.bd","be","ac.be","bf","gov.bf","bg","a.bg","b.bg","c.bg","d.bg","e.bg","f.bg","g.bg","h.bg","i.bg","j.bg","k.bg","l.bg","m.bg","n.bg","o.bg","p.bg","q.bg","r.bg","s.bg","t.bg","u.bg","v.bg","w.bg","x.bg","y.bg","z.bg","0.bg","1.bg","2.bg","3.bg","4.bg","5.bg","6.bg","7.bg","8.bg","9.bg","bh","com.bh","edu.bh","net.bh","org.bh","gov.bh","bi","co.bi","com.bi","edu.bi","or.bi","org.bi","biz","bj","asso.bj","barreau.bj","gouv.bj","bm","com.bm","edu.bm","gov.bm","net.bm","org.bm","bn","com.bn","edu.bn","gov.bn","net.bn","org.bn","bo","com.bo","edu.bo","gob.bo","int.bo","org.bo","net.bo","mil.bo","tv.bo","web.bo","academia.bo","agro.bo","arte.bo","blog.bo","bolivia.bo","ciencia.bo","cooperativa.bo","democracia.bo","deporte.bo","ecologia.bo","economia.bo","empresa.bo","indigena.bo","industria.bo","info.bo","medicina.bo","movimiento.bo","musica.bo","natural.bo","nombre.bo","noticias.bo","patria.bo","politica.bo","profesional.bo","plurinacional.bo","pueblo.bo","revista.bo","salud.bo","tecnologia.bo","tksat.bo","transporte.bo","wiki.bo","br","9guacu.br","abc.br","adm.br","adv.br","agr.br","aju.br","am.br","anani.br","aparecida.br","arq.br","art.br","ato.br","b.br","barueri.br","belem.br","bhz.br","bio.br","blog.br","bmd.br","boavista.br","bsb.br","campinagrande.br","campinas.br","caxias.br","cim.br","cng.br","cnt.br","com.br","contagem.br","coop.br","cri.br","cuiaba.br","curitiba.br","def.br","ecn.br","eco.br","edu.br","emp.br","eng.br","esp.br","etc.br","eti.br","far.br","feira.br","flog.br","floripa.br","fm.br","fnd.br","fortal.br","fot.br","foz.br","fst.br","g12.br","ggf.br","goiania.br","gov.br","ac.gov.br","al.gov.br","am.gov.br","ap.gov.br","ba.gov.br","ce.gov.br","df.gov.br","es.gov.br","go.gov.br","ma.gov.br","mg.gov.br","ms.gov.br","mt.gov.br","pa.gov.br","pb.gov.br","pe.gov.br","pi.gov.br","pr.gov.br","rj.gov.br","rn.gov.br","ro.gov.br","rr.gov.br","rs.gov.br","sc.gov.br","se.gov.br","sp.gov.br","to.gov.br","gru.br","imb.br","ind.br","inf.br","jab.br","jampa.br","jdf.br","joinville.br","jor.br","jus.br","leg.br","lel.br","londrina.br","macapa.br","maceio.br","manaus.br","maringa.br","mat.br","med.br","mil.br","morena.br","mp.br","mus.br","natal.br","net.br","niteroi.br","*.nom.br","not.br","ntr.br","odo.br","ong.br","org.br","osasco.br","palmas.br","poa.br","ppg.br","pro.br","psc.br","psi.br","pvh.br","qsl.br","radio.br","rec.br","recife.br","ribeirao.br","rio.br","riobranco.br","riopreto.br","salvador.br","sampa.br","santamaria.br","santoandre.br","saobernardo.br","saogonca.br","sjc.br","slg.br","slz.br","sorocaba.br","srv.br","taxi.br","tc.br","teo.br","the.br","tmp.br","trd.br","tur.br","tv.br","udi.br","vet.br","vix.br","vlog.br","wiki.br","zlg.br","bs","com.bs","net.bs","org.bs","edu.bs","gov.bs","bt","com.bt","edu.bt","gov.bt","net.bt","org.bt","bv","bw","co.bw","org.bw","by","gov.by","mil.by","com.by","of.by","bz","com.bz","net.bz","org.bz","edu.bz","gov.bz","ca","ab.ca","bc.ca","mb.ca","nb.ca","nf.ca","nl.ca","ns.ca","nt.ca","nu.ca","on.ca","pe.ca","qc.ca","sk.ca","yk.ca","gc.ca","cat","cc","cd","gov.cd","cf","cg","ch","ci","org.ci","or.ci","com.ci","co.ci","edu.ci","ed.ci","ac.ci","net.ci","go.ci","asso.ci","aéroport.ci","int.ci","presse.ci","md.ci","gouv.ci","*.ck","!www.ck","cl","gov.cl","gob.cl","co.cl","mil.cl","cm","co.cm","com.cm","gov.cm","net.cm","cn","ac.cn","com.cn","edu.cn","gov.cn","net.cn","org.cn","mil.cn","公司.cn","网络.cn","網絡.cn","ah.cn","bj.cn","cq.cn","fj.cn","gd.cn","gs.cn","gz.cn","gx.cn","ha.cn","hb.cn","he.cn","hi.cn","hl.cn","hn.cn","jl.cn","js.cn","jx.cn","ln.cn","nm.cn","nx.cn","qh.cn","sc.cn","sd.cn","sh.cn","sn.cn","sx.cn","tj.cn","xj.cn","xz.cn","yn.cn","zj.cn","hk.cn","mo.cn","tw.cn","co","arts.co","com.co","edu.co","firm.co","gov.co","info.co","int.co","mil.co","net.co","nom.co","org.co","rec.co","web.co","com","coop","cr","ac.cr","co.cr","ed.cr","fi.cr","go.cr","or.cr","sa.cr","cu","com.cu","edu.cu","org.cu","net.cu","gov.cu","inf.cu","cv","cw","com.cw","edu.cw","net.cw","org.cw","cx","gov.cx","cy","ac.cy","biz.cy","com.cy","ekloges.cy","gov.cy","ltd.cy","name.cy","net.cy","org.cy","parliament.cy","press.cy","pro.cy","tm.cy","cz","de","dj","dk","dm","com.dm","net.dm","org.dm","edu.dm","gov.dm","do","art.do","com.do","edu.do","gob.do","gov.do","mil.do","net.do","org.do","sld.do","web.do","dz","com.dz","org.dz","net.dz","gov.dz","edu.dz","asso.dz","pol.dz","art.dz","ec","com.ec","info.ec","net.ec","fin.ec","k12.ec","med.ec","pro.ec","org.ec","edu.ec","gov.ec","gob.ec","mil.ec","edu","ee","edu.ee","gov.ee","riik.ee","lib.ee","med.ee","com.ee","pri.ee","aip.ee","org.ee","fie.ee","eg","com.eg","edu.eg","eun.eg","gov.eg","mil.eg","name.eg","net.eg","org.eg","sci.eg","*.er","es","com.es","nom.es","org.es","gob.es","edu.es","et","com.et","gov.et","org.et","edu.et","biz.et","name.et","info.et","net.et","eu","fi","aland.fi","*.fj","*.fk","fm","fo","fr","asso.fr","com.fr","gouv.fr","nom.fr","prd.fr","tm.fr","aeroport.fr","avocat.fr","avoues.fr","cci.fr","chambagri.fr","chirurgiens-dentistes.fr","experts-comptables.fr","geometre-expert.fr","greta.fr","huissier-justice.fr","medecin.fr","notaires.fr","pharmacien.fr","port.fr","veterinaire.fr","ga","gb","gd","ge","com.ge","edu.ge","gov.ge","org.ge","mil.ge","net.ge","pvt.ge","gf","gg","co.gg","net.gg","org.gg","gh","com.gh","edu.gh","gov.gh","org.gh","mil.gh","gi","com.gi","ltd.gi","gov.gi","mod.gi","edu.gi","org.gi","gl","co.gl","com.gl","edu.gl","net.gl","org.gl","gm","gn","ac.gn","com.gn","edu.gn","gov.gn","org.gn","net.gn","gov","gp","com.gp","net.gp","mobi.gp","edu.gp","org.gp","asso.gp","gq","gr","com.gr","edu.gr","net.gr","org.gr","gov.gr","gs","gt","com.gt","edu.gt","gob.gt","ind.gt","mil.gt","net.gt","org.gt","gu","com.gu","edu.gu","gov.gu","guam.gu","info.gu","net.gu","org.gu","web.gu","gw","gy","co.gy","com.gy","edu.gy","gov.gy","net.gy","org.gy","hk","com.hk","edu.hk","gov.hk","idv.hk","net.hk","org.hk","公司.hk","教育.hk","敎育.hk","政府.hk","個人.hk","个人.hk","箇人.hk","網络.hk","网络.hk","组織.hk","網絡.hk","网絡.hk","组织.hk","組織.hk","組织.hk","hm","hn","com.hn","edu.hn","org.hn","net.hn","mil.hn","gob.hn","hr","iz.hr","from.hr","name.hr","com.hr","ht","com.ht","shop.ht","firm.ht","info.ht","adult.ht","net.ht","pro.ht","org.ht","med.ht","art.ht","coop.ht","pol.ht","asso.ht","edu.ht","rel.ht","gouv.ht","perso.ht","hu","co.hu","info.hu","org.hu","priv.hu","sport.hu","tm.hu","2000.hu","agrar.hu","bolt.hu","casino.hu","city.hu","erotica.hu","erotika.hu","film.hu","forum.hu","games.hu","hotel.hu","ingatlan.hu","jogasz.hu","konyvelo.hu","lakas.hu","media.hu","news.hu","reklam.hu","sex.hu","shop.hu","suli.hu","szex.hu","tozsde.hu","utazas.hu","video.hu","id","ac.id","biz.id","co.id","desa.id","go.id","mil.id","my.id","net.id","or.id","ponpes.id","sch.id","web.id","ie","gov.ie","il","ac.il","co.il","gov.il","idf.il","k12.il","muni.il","net.il","org.il","im","ac.im","co.im","com.im","ltd.co.im","net.im","org.im","plc.co.im","tt.im","tv.im","in","co.in","firm.in","net.in","org.in","gen.in","ind.in","nic.in","ac.in","edu.in","res.in","gov.in","mil.in","info","int","eu.int","io","com.io","iq","gov.iq","edu.iq","mil.iq","com.iq","org.iq","net.iq","ir","ac.ir","co.ir","gov.ir","id.ir","net.ir","org.ir","sch.ir","ایران.ir","ايران.ir","is","net.is","com.is","edu.is","gov.is","org.is","int.is","it","gov.it","edu.it","abr.it","abruzzo.it","aosta-valley.it","aostavalley.it","bas.it","basilicata.it","cal.it","calabria.it","cam.it","campania.it","emilia-romagna.it","emiliaromagna.it","emr.it","friuli-v-giulia.it","friuli-ve-giulia.it","friuli-vegiulia.it","friuli-venezia-giulia.it","friuli-veneziagiulia.it","friuli-vgiulia.it","friuliv-giulia.it","friulive-giulia.it","friulivegiulia.it","friulivenezia-giulia.it","friuliveneziagiulia.it","friulivgiulia.it","fvg.it","laz.it","lazio.it","lig.it","liguria.it","lom.it","lombardia.it","lombardy.it","lucania.it","mar.it","marche.it","mol.it","molise.it","piedmont.it","piemonte.it","pmn.it","pug.it","puglia.it","sar.it","sardegna.it","sardinia.it","sic.it","sicilia.it","sicily.it","taa.it","tos.it","toscana.it","trentin-sud-tirol.it","trentin-süd-tirol.it","trentin-sudtirol.it","trentin-südtirol.it","trentin-sued-tirol.it","trentin-suedtirol.it","trentino-a-adige.it","trentino-aadige.it","trentino-alto-adige.it","trentino-altoadige.it","trentino-s-tirol.it","trentino-stirol.it","trentino-sud-tirol.it","trentino-süd-tirol.it","trentino-sudtirol.it","trentino-südtirol.it","trentino-sued-tirol.it","trentino-suedtirol.it","trentino.it","trentinoa-adige.it","trentinoaadige.it","trentinoalto-adige.it","trentinoaltoadige.it","trentinos-tirol.it","trentinostirol.it","trentinosud-tirol.it","trentinosüd-tirol.it","trentinosudtirol.it","trentinosüdtirol.it","trentinosued-tirol.it","trentinosuedtirol.it","trentinsud-tirol.it","trentinsüd-tirol.it","trentinsudtirol.it","trentinsüdtirol.it","trentinsued-tirol.it","trentinsuedtirol.it","tuscany.it","umb.it","umbria.it","val-d-aosta.it","val-daosta.it","vald-aosta.it","valdaosta.it","valle-aosta.it","valle-d-aosta.it","valle-daosta.it","valleaosta.it","valled-aosta.it","valledaosta.it","vallee-aoste.it","vallée-aoste.it","vallee-d-aoste.it","vallée-d-aoste.it","valleeaoste.it","valléeaoste.it","valleedaoste.it","valléedaoste.it","vao.it","vda.it","ven.it","veneto.it","ag.it","agrigento.it","al.it","alessandria.it","alto-adige.it","altoadige.it","an.it","ancona.it","andria-barletta-trani.it","andria-trani-barletta.it","andriabarlettatrani.it","andriatranibarletta.it","ao.it","aosta.it","aoste.it","ap.it","aq.it","aquila.it","ar.it","arezzo.it","ascoli-piceno.it","ascolipiceno.it","asti.it","at.it","av.it","avellino.it","ba.it","balsan-sudtirol.it","balsan-südtirol.it","balsan-suedtirol.it","balsan.it","bari.it","barletta-trani-andria.it","barlettatraniandria.it","belluno.it","benevento.it","bergamo.it","bg.it","bi.it","biella.it","bl.it","bn.it","bo.it","bologna.it","bolzano-altoadige.it","bolzano.it","bozen-sudtirol.it","bozen-südtirol.it","bozen-suedtirol.it","bozen.it","br.it","brescia.it","brindisi.it","bs.it","bt.it","bulsan-sudtirol.it","bulsan-südtirol.it","bulsan-suedtirol.it","bulsan.it","bz.it","ca.it","cagliari.it","caltanissetta.it","campidano-medio.it","campidanomedio.it","campobasso.it","carbonia-iglesias.it","carboniaiglesias.it","carrara-massa.it","carraramassa.it","caserta.it","catania.it","catanzaro.it","cb.it","ce.it","cesena-forli.it","cesena-forlì.it","cesenaforli.it","cesenaforlì.it","ch.it","chieti.it","ci.it","cl.it","cn.it","co.it","como.it","cosenza.it","cr.it","cremona.it","crotone.it","cs.it","ct.it","cuneo.it","cz.it","dell-ogliastra.it","dellogliastra.it","en.it","enna.it","fc.it","fe.it","fermo.it","ferrara.it","fg.it","fi.it","firenze.it","florence.it","fm.it","foggia.it","forli-cesena.it","forlì-cesena.it","forlicesena.it","forlìcesena.it","fr.it","frosinone.it","ge.it","genoa.it","genova.it","go.it","gorizia.it","gr.it","grosseto.it","iglesias-carbonia.it","iglesiascarbonia.it","im.it","imperia.it","is.it","isernia.it","kr.it","la-spezia.it","laquila.it","laspezia.it","latina.it","lc.it","le.it","lecce.it","lecco.it","li.it","livorno.it","lo.it","lodi.it","lt.it","lu.it","lucca.it","macerata.it","mantova.it","massa-carrara.it","massacarrara.it","matera.it","mb.it","mc.it","me.it","medio-campidano.it","mediocampidano.it","messina.it","mi.it","milan.it","milano.it","mn.it","mo.it","modena.it","monza-brianza.it","monza-e-della-brianza.it","monza.it","monzabrianza.it","monzaebrianza.it","monzaedellabrianza.it","ms.it","mt.it","na.it","naples.it","napoli.it","no.it","novara.it","nu.it","nuoro.it","og.it","ogliastra.it","olbia-tempio.it","olbiatempio.it","or.it","oristano.it","ot.it","pa.it","padova.it","padua.it","palermo.it","parma.it","pavia.it","pc.it","pd.it","pe.it","perugia.it","pesaro-urbino.it","pesarourbino.it","pescara.it","pg.it","pi.it","piacenza.it","pisa.it","pistoia.it","pn.it","po.it","pordenone.it","potenza.it","pr.it","prato.it","pt.it","pu.it","pv.it","pz.it","ra.it","ragusa.it","ravenna.it","rc.it","re.it","reggio-calabria.it","reggio-emilia.it","reggiocalabria.it","reggioemilia.it","rg.it","ri.it","rieti.it","rimini.it","rm.it","rn.it","ro.it","roma.it","rome.it","rovigo.it","sa.it","salerno.it","sassari.it","savona.it","si.it","siena.it","siracusa.it","so.it","sondrio.it","sp.it","sr.it","ss.it","suedtirol.it","südtirol.it","sv.it","ta.it","taranto.it","te.it","tempio-olbia.it","tempioolbia.it","teramo.it","terni.it","tn.it","to.it","torino.it","tp.it","tr.it","trani-andria-barletta.it","trani-barletta-andria.it","traniandriabarletta.it","tranibarlettaandria.it","trapani.it","trento.it","treviso.it","trieste.it","ts.it","turin.it","tv.it","ud.it","udine.it","urbino-pesaro.it","urbinopesaro.it","va.it","varese.it","vb.it","vc.it","ve.it","venezia.it","venice.it","verbania.it","vercelli.it","verona.it","vi.it","vibo-valentia.it","vibovalentia.it","vicenza.it","viterbo.it","vr.it","vs.it","vt.it","vv.it","je","co.je","net.je","org.je","*.jm","jo","com.jo","org.jo","net.jo","edu.jo","sch.jo","gov.jo","mil.jo","name.jo","jobs","jp","ac.jp","ad.jp","co.jp","ed.jp","go.jp","gr.jp","lg.jp","ne.jp","or.jp","aichi.jp","akita.jp","aomori.jp","chiba.jp","ehime.jp","fukui.jp","fukuoka.jp","fukushima.jp","gifu.jp","gunma.jp","hiroshima.jp","hokkaido.jp","hyogo.jp","ibaraki.jp","ishikawa.jp","iwate.jp","kagawa.jp","kagoshima.jp","kanagawa.jp","kochi.jp","kumamoto.jp","kyoto.jp","mie.jp","miyagi.jp","miyazaki.jp","nagano.jp","nagasaki.jp","nara.jp","niigata.jp","oita.jp","okayama.jp","okinawa.jp","osaka.jp","saga.jp","saitama.jp","shiga.jp","shimane.jp","shizuoka.jp","tochigi.jp","tokushima.jp","tokyo.jp","tottori.jp","toyama.jp","wakayama.jp","yamagata.jp","yamaguchi.jp","yamanashi.jp","栃木.jp","愛知.jp","愛媛.jp","兵庫.jp","熊本.jp","茨城.jp","北海道.jp","千葉.jp","和歌山.jp","長崎.jp","長野.jp","新潟.jp","青森.jp","静岡.jp","東京.jp","石川.jp","埼玉.jp","三重.jp","京都.jp","佐賀.jp","大分.jp","大阪.jp","奈良.jp","宮城.jp","宮崎.jp","富山.jp","山口.jp","山形.jp","山梨.jp","岩手.jp","岐阜.jp","岡山.jp","島根.jp","広島.jp","徳島.jp","沖縄.jp","滋賀.jp","神奈川.jp","福井.jp","福岡.jp","福島.jp","秋田.jp","群馬.jp","香川.jp","高知.jp","鳥取.jp","鹿児島.jp","*.kawasaki.jp","*.kitakyushu.jp","*.kobe.jp","*.nagoya.jp","*.sapporo.jp","*.sendai.jp","*.yokohama.jp","!city.kawasaki.jp","!city.kitakyushu.jp","!city.kobe.jp","!city.nagoya.jp","!city.sapporo.jp","!city.sendai.jp","!city.yokohama.jp","aisai.aichi.jp","ama.aichi.jp","anjo.aichi.jp","asuke.aichi.jp","chiryu.aichi.jp","chita.aichi.jp","fuso.aichi.jp","gamagori.aichi.jp","handa.aichi.jp","hazu.aichi.jp","hekinan.aichi.jp","higashiura.aichi.jp","ichinomiya.aichi.jp","inazawa.aichi.jp","inuyama.aichi.jp","isshiki.aichi.jp","iwakura.aichi.jp","kanie.aichi.jp","kariya.aichi.jp","kasugai.aichi.jp","kira.aichi.jp","kiyosu.aichi.jp","komaki.aichi.jp","konan.aichi.jp","kota.aichi.jp","mihama.aichi.jp","miyoshi.aichi.jp","nishio.aichi.jp","nisshin.aichi.jp","obu.aichi.jp","oguchi.aichi.jp","oharu.aichi.jp","okazaki.aichi.jp","owariasahi.aichi.jp","seto.aichi.jp","shikatsu.aichi.jp","shinshiro.aichi.jp","shitara.aichi.jp","tahara.aichi.jp","takahama.aichi.jp","tobishima.aichi.jp","toei.aichi.jp","togo.aichi.jp","tokai.aichi.jp","tokoname.aichi.jp","toyoake.aichi.jp","toyohashi.aichi.jp","toyokawa.aichi.jp","toyone.aichi.jp","toyota.aichi.jp","tsushima.aichi.jp","yatomi.aichi.jp","akita.akita.jp","daisen.akita.jp","fujisato.akita.jp","gojome.akita.jp","hachirogata.akita.jp","happou.akita.jp","higashinaruse.akita.jp","honjo.akita.jp","honjyo.akita.jp","ikawa.akita.jp","kamikoani.akita.jp","kamioka.akita.jp","katagami.akita.jp","kazuno.akita.jp","kitaakita.akita.jp","kosaka.akita.jp","kyowa.akita.jp","misato.akita.jp","mitane.akita.jp","moriyoshi.akita.jp","nikaho.akita.jp","noshiro.akita.jp","odate.akita.jp","oga.akita.jp","ogata.akita.jp","semboku.akita.jp","yokote.akita.jp","yurihonjo.akita.jp","aomori.aomori.jp","gonohe.aomori.jp","hachinohe.aomori.jp","hashikami.aomori.jp","hiranai.aomori.jp","hirosaki.aomori.jp","itayanagi.aomori.jp","kuroishi.aomori.jp","misawa.aomori.jp","mutsu.aomori.jp","nakadomari.aomori.jp","noheji.aomori.jp","oirase.aomori.jp","owani.aomori.jp","rokunohe.aomori.jp","sannohe.aomori.jp","shichinohe.aomori.jp","shingo.aomori.jp","takko.aomori.jp","towada.aomori.jp","tsugaru.aomori.jp","tsuruta.aomori.jp","abiko.chiba.jp","asahi.chiba.jp","chonan.chiba.jp","chosei.chiba.jp","choshi.chiba.jp","chuo.chiba.jp","funabashi.chiba.jp","futtsu.chiba.jp","hanamigawa.chiba.jp","ichihara.chiba.jp","ichikawa.chiba.jp","ichinomiya.chiba.jp","inzai.chiba.jp","isumi.chiba.jp","kamagaya.chiba.jp","kamogawa.chiba.jp","kashiwa.chiba.jp","katori.chiba.jp","katsuura.chiba.jp","kimitsu.chiba.jp","kisarazu.chiba.jp","kozaki.chiba.jp","kujukuri.chiba.jp","kyonan.chiba.jp","matsudo.chiba.jp","midori.chiba.jp","mihama.chiba.jp","minamiboso.chiba.jp","mobara.chiba.jp","mutsuzawa.chiba.jp","nagara.chiba.jp","nagareyama.chiba.jp","narashino.chiba.jp","narita.chiba.jp","noda.chiba.jp","oamishirasato.chiba.jp","omigawa.chiba.jp","onjuku.chiba.jp","otaki.chiba.jp","sakae.chiba.jp","sakura.chiba.jp","shimofusa.chiba.jp","shirako.chiba.jp","shiroi.chiba.jp","shisui.chiba.jp","sodegaura.chiba.jp","sosa.chiba.jp","tako.chiba.jp","tateyama.chiba.jp","togane.chiba.jp","tohnosho.chiba.jp","tomisato.chiba.jp","urayasu.chiba.jp","yachimata.chiba.jp","yachiyo.chiba.jp","yokaichiba.chiba.jp","yokoshibahikari.chiba.jp","yotsukaido.chiba.jp","ainan.ehime.jp","honai.ehime.jp","ikata.ehime.jp","imabari.ehime.jp","iyo.ehime.jp","kamijima.ehime.jp","kihoku.ehime.jp","kumakogen.ehime.jp","masaki.ehime.jp","matsuno.ehime.jp","matsuyama.ehime.jp","namikata.ehime.jp","niihama.ehime.jp","ozu.ehime.jp","saijo.ehime.jp","seiyo.ehime.jp","shikokuchuo.ehime.jp","tobe.ehime.jp","toon.ehime.jp","uchiko.ehime.jp","uwajima.ehime.jp","yawatahama.ehime.jp","echizen.fukui.jp","eiheiji.fukui.jp","fukui.fukui.jp","ikeda.fukui.jp","katsuyama.fukui.jp","mihama.fukui.jp","minamiechizen.fukui.jp","obama.fukui.jp","ohi.fukui.jp","ono.fukui.jp","sabae.fukui.jp","sakai.fukui.jp","takahama.fukui.jp","tsuruga.fukui.jp","wakasa.fukui.jp","ashiya.fukuoka.jp","buzen.fukuoka.jp","chikugo.fukuoka.jp","chikuho.fukuoka.jp","chikujo.fukuoka.jp","chikushino.fukuoka.jp","chikuzen.fukuoka.jp","chuo.fukuoka.jp","dazaifu.fukuoka.jp","fukuchi.fukuoka.jp","hakata.fukuoka.jp","higashi.fukuoka.jp","hirokawa.fukuoka.jp","hisayama.fukuoka.jp","iizuka.fukuoka.jp","inatsuki.fukuoka.jp","kaho.fukuoka.jp","kasuga.fukuoka.jp","kasuya.fukuoka.jp","kawara.fukuoka.jp","keisen.fukuoka.jp","koga.fukuoka.jp","kurate.fukuoka.jp","kurogi.fukuoka.jp","kurume.fukuoka.jp","minami.fukuoka.jp","miyako.fukuoka.jp","miyama.fukuoka.jp","miyawaka.fukuoka.jp","mizumaki.fukuoka.jp","munakata.fukuoka.jp","nakagawa.fukuoka.jp","nakama.fukuoka.jp","nishi.fukuoka.jp","nogata.fukuoka.jp","ogori.fukuoka.jp","okagaki.fukuoka.jp","okawa.fukuoka.jp","oki.fukuoka.jp","omuta.fukuoka.jp","onga.fukuoka.jp","onojo.fukuoka.jp","oto.fukuoka.jp","saigawa.fukuoka.jp","sasaguri.fukuoka.jp","shingu.fukuoka.jp","shinyoshitomi.fukuoka.jp","shonai.fukuoka.jp","soeda.fukuoka.jp","sue.fukuoka.jp","tachiarai.fukuoka.jp","tagawa.fukuoka.jp","takata.fukuoka.jp","toho.fukuoka.jp","toyotsu.fukuoka.jp","tsuiki.fukuoka.jp","ukiha.fukuoka.jp","umi.fukuoka.jp","usui.fukuoka.jp","yamada.fukuoka.jp","yame.fukuoka.jp","yanagawa.fukuoka.jp","yukuhashi.fukuoka.jp","aizubange.fukushima.jp","aizumisato.fukushima.jp","aizuwakamatsu.fukushima.jp","asakawa.fukushima.jp","bandai.fukushima.jp","date.fukushima.jp","fukushima.fukushima.jp","furudono.fukushima.jp","futaba.fukushima.jp","hanawa.fukushima.jp","higashi.fukushima.jp","hirata.fukushima.jp","hirono.fukushima.jp","iitate.fukushima.jp","inawashiro.fukushima.jp","ishikawa.fukushima.jp","iwaki.fukushima.jp","izumizaki.fukushima.jp","kagamiishi.fukushima.jp","kaneyama.fukushima.jp","kawamata.fukushima.jp","kitakata.fukushima.jp","kitashiobara.fukushima.jp","koori.fukushima.jp","koriyama.fukushima.jp","kunimi.fukushima.jp","miharu.fukushima.jp","mishima.fukushima.jp","namie.fukushima.jp","nango.fukushima.jp","nishiaizu.fukushima.jp","nishigo.fukushima.jp","okuma.fukushima.jp","omotego.fukushima.jp","ono.fukushima.jp","otama.fukushima.jp","samegawa.fukushima.jp","shimogo.fukushima.jp","shirakawa.fukushima.jp","showa.fukushima.jp","soma.fukushima.jp","sukagawa.fukushima.jp","taishin.fukushima.jp","tamakawa.fukushima.jp","tanagura.fukushima.jp","tenei.fukushima.jp","yabuki.fukushima.jp","yamato.fukushima.jp","yamatsuri.fukushima.jp","yanaizu.fukushima.jp","yugawa.fukushima.jp","anpachi.gifu.jp","ena.gifu.jp","gifu.gifu.jp","ginan.gifu.jp","godo.gifu.jp","gujo.gifu.jp","hashima.gifu.jp","hichiso.gifu.jp","hida.gifu.jp","higashishirakawa.gifu.jp","ibigawa.gifu.jp","ikeda.gifu.jp","kakamigahara.gifu.jp","kani.gifu.jp","kasahara.gifu.jp","kasamatsu.gifu.jp","kawaue.gifu.jp","kitagata.gifu.jp","mino.gifu.jp","minokamo.gifu.jp","mitake.gifu.jp","mizunami.gifu.jp","motosu.gifu.jp","nakatsugawa.gifu.jp","ogaki.gifu.jp","sakahogi.gifu.jp","seki.gifu.jp","sekigahara.gifu.jp","shirakawa.gifu.jp","tajimi.gifu.jp","takayama.gifu.jp","tarui.gifu.jp","toki.gifu.jp","tomika.gifu.jp","wanouchi.gifu.jp","yamagata.gifu.jp","yaotsu.gifu.jp","yoro.gifu.jp","annaka.gunma.jp","chiyoda.gunma.jp","fujioka.gunma.jp","higashiagatsuma.gunma.jp","isesaki.gunma.jp","itakura.gunma.jp","kanna.gunma.jp","kanra.gunma.jp","katashina.gunma.jp","kawaba.gunma.jp","kiryu.gunma.jp","kusatsu.gunma.jp","maebashi.gunma.jp","meiwa.gunma.jp","midori.gunma.jp","minakami.gunma.jp","naganohara.gunma.jp","nakanojo.gunma.jp","nanmoku.gunma.jp","numata.gunma.jp","oizumi.gunma.jp","ora.gunma.jp","ota.gunma.jp","shibukawa.gunma.jp","shimonita.gunma.jp","shinto.gunma.jp","showa.gunma.jp","takasaki.gunma.jp","takayama.gunma.jp","tamamura.gunma.jp","tatebayashi.gunma.jp","tomioka.gunma.jp","tsukiyono.gunma.jp","tsumagoi.gunma.jp","ueno.gunma.jp","yoshioka.gunma.jp","asaminami.hiroshima.jp","daiwa.hiroshima.jp","etajima.hiroshima.jp","fuchu.hiroshima.jp","fukuyama.hiroshima.jp","hatsukaichi.hiroshima.jp","higashihiroshima.hiroshima.jp","hongo.hiroshima.jp","jinsekikogen.hiroshima.jp","kaita.hiroshima.jp","kui.hiroshima.jp","kumano.hiroshima.jp","kure.hiroshima.jp","mihara.hiroshima.jp","miyoshi.hiroshima.jp","naka.hiroshima.jp","onomichi.hiroshima.jp","osakikamijima.hiroshima.jp","otake.hiroshima.jp","saka.hiroshima.jp","sera.hiroshima.jp","seranishi.hiroshima.jp","shinichi.hiroshima.jp","shobara.hiroshima.jp","takehara.hiroshima.jp","abashiri.hokkaido.jp","abira.hokkaido.jp","aibetsu.hokkaido.jp","akabira.hokkaido.jp","akkeshi.hokkaido.jp","asahikawa.hokkaido.jp","ashibetsu.hokkaido.jp","ashoro.hokkaido.jp","assabu.hokkaido.jp","atsuma.hokkaido.jp","bibai.hokkaido.jp","biei.hokkaido.jp","bifuka.hokkaido.jp","bihoro.hokkaido.jp","biratori.hokkaido.jp","chippubetsu.hokkaido.jp","chitose.hokkaido.jp","date.hokkaido.jp","ebetsu.hokkaido.jp","embetsu.hokkaido.jp","eniwa.hokkaido.jp","erimo.hokkaido.jp","esan.hokkaido.jp","esashi.hokkaido.jp","fukagawa.hokkaido.jp","fukushima.hokkaido.jp","furano.hokkaido.jp","furubira.hokkaido.jp","haboro.hokkaido.jp","hakodate.hokkaido.jp","hamatonbetsu.hokkaido.jp","hidaka.hokkaido.jp","higashikagura.hokkaido.jp","higashikawa.hokkaido.jp","hiroo.hokkaido.jp","hokuryu.hokkaido.jp","hokuto.hokkaido.jp","honbetsu.hokkaido.jp","horokanai.hokkaido.jp","horonobe.hokkaido.jp","ikeda.hokkaido.jp","imakane.hokkaido.jp","ishikari.hokkaido.jp","iwamizawa.hokkaido.jp","iwanai.hokkaido.jp","kamifurano.hokkaido.jp","kamikawa.hokkaido.jp","kamishihoro.hokkaido.jp","kamisunagawa.hokkaido.jp","kamoenai.hokkaido.jp","kayabe.hokkaido.jp","kembuchi.hokkaido.jp","kikonai.hokkaido.jp","kimobetsu.hokkaido.jp","kitahiroshima.hokkaido.jp","kitami.hokkaido.jp","kiyosato.hokkaido.jp","koshimizu.hokkaido.jp","kunneppu.hokkaido.jp","kuriyama.hokkaido.jp","kuromatsunai.hokkaido.jp","kushiro.hokkaido.jp","kutchan.hokkaido.jp","kyowa.hokkaido.jp","mashike.hokkaido.jp","matsumae.hokkaido.jp","mikasa.hokkaido.jp","minamifurano.hokkaido.jp","mombetsu.hokkaido.jp","moseushi.hokkaido.jp","mukawa.hokkaido.jp","muroran.hokkaido.jp","naie.hokkaido.jp","nakagawa.hokkaido.jp","nakasatsunai.hokkaido.jp","nakatombetsu.hokkaido.jp","nanae.hokkaido.jp","nanporo.hokkaido.jp","nayoro.hokkaido.jp","nemuro.hokkaido.jp","niikappu.hokkaido.jp","niki.hokkaido.jp","nishiokoppe.hokkaido.jp","noboribetsu.hokkaido.jp","numata.hokkaido.jp","obihiro.hokkaido.jp","obira.hokkaido.jp","oketo.hokkaido.jp","okoppe.hokkaido.jp","otaru.hokkaido.jp","otobe.hokkaido.jp","otofuke.hokkaido.jp","otoineppu.hokkaido.jp","oumu.hokkaido.jp","ozora.hokkaido.jp","pippu.hokkaido.jp","rankoshi.hokkaido.jp","rebun.hokkaido.jp","rikubetsu.hokkaido.jp","rishiri.hokkaido.jp","rishirifuji.hokkaido.jp","saroma.hokkaido.jp","sarufutsu.hokkaido.jp","shakotan.hokkaido.jp","shari.hokkaido.jp","shibecha.hokkaido.jp","shibetsu.hokkaido.jp","shikabe.hokkaido.jp","shikaoi.hokkaido.jp","shimamaki.hokkaido.jp","shimizu.hokkaido.jp","shimokawa.hokkaido.jp","shinshinotsu.hokkaido.jp","shintoku.hokkaido.jp","shiranuka.hokkaido.jp","shiraoi.hokkaido.jp","shiriuchi.hokkaido.jp","sobetsu.hokkaido.jp","sunagawa.hokkaido.jp","taiki.hokkaido.jp","takasu.hokkaido.jp","takikawa.hokkaido.jp","takinoue.hokkaido.jp","teshikaga.hokkaido.jp","tobetsu.hokkaido.jp","tohma.hokkaido.jp","tomakomai.hokkaido.jp","tomari.hokkaido.jp","toya.hokkaido.jp","toyako.hokkaido.jp","toyotomi.hokkaido.jp","toyoura.hokkaido.jp","tsubetsu.hokkaido.jp","tsukigata.hokkaido.jp","urakawa.hokkaido.jp","urausu.hokkaido.jp","uryu.hokkaido.jp","utashinai.hokkaido.jp","wakkanai.hokkaido.jp","wassamu.hokkaido.jp","yakumo.hokkaido.jp","yoichi.hokkaido.jp","aioi.hyogo.jp","akashi.hyogo.jp","ako.hyogo.jp","amagasaki.hyogo.jp","aogaki.hyogo.jp","asago.hyogo.jp","ashiya.hyogo.jp","awaji.hyogo.jp","fukusaki.hyogo.jp","goshiki.hyogo.jp","harima.hyogo.jp","himeji.hyogo.jp","ichikawa.hyogo.jp","inagawa.hyogo.jp","itami.hyogo.jp","kakogawa.hyogo.jp","kamigori.hyogo.jp","kamikawa.hyogo.jp","kasai.hyogo.jp","kasuga.hyogo.jp","kawanishi.hyogo.jp","miki.hyogo.jp","minamiawaji.hyogo.jp","nishinomiya.hyogo.jp","nishiwaki.hyogo.jp","ono.hyogo.jp","sanda.hyogo.jp","sannan.hyogo.jp","sasayama.hyogo.jp","sayo.hyogo.jp","shingu.hyogo.jp","shinonsen.hyogo.jp","shiso.hyogo.jp","sumoto.hyogo.jp","taishi.hyogo.jp","taka.hyogo.jp","takarazuka.hyogo.jp","takasago.hyogo.jp","takino.hyogo.jp","tamba.hyogo.jp","tatsuno.hyogo.jp","toyooka.hyogo.jp","yabu.hyogo.jp","yashiro.hyogo.jp","yoka.hyogo.jp","yokawa.hyogo.jp","ami.ibaraki.jp","asahi.ibaraki.jp","bando.ibaraki.jp","chikusei.ibaraki.jp","daigo.ibaraki.jp","fujishiro.ibaraki.jp","hitachi.ibaraki.jp","hitachinaka.ibaraki.jp","hitachiomiya.ibaraki.jp","hitachiota.ibaraki.jp","ibaraki.ibaraki.jp","ina.ibaraki.jp","inashiki.ibaraki.jp","itako.ibaraki.jp","iwama.ibaraki.jp","joso.ibaraki.jp","kamisu.ibaraki.jp","kasama.ibaraki.jp","kashima.ibaraki.jp","kasumigaura.ibaraki.jp","koga.ibaraki.jp","miho.ibaraki.jp","mito.ibaraki.jp","moriya.ibaraki.jp","naka.ibaraki.jp","namegata.ibaraki.jp","oarai.ibaraki.jp","ogawa.ibaraki.jp","omitama.ibaraki.jp","ryugasaki.ibaraki.jp","sakai.ibaraki.jp","sakuragawa.ibaraki.jp","shimodate.ibaraki.jp","shimotsuma.ibaraki.jp","shirosato.ibaraki.jp","sowa.ibaraki.jp","suifu.ibaraki.jp","takahagi.ibaraki.jp","tamatsukuri.ibaraki.jp","tokai.ibaraki.jp","tomobe.ibaraki.jp","tone.ibaraki.jp","toride.ibaraki.jp","tsuchiura.ibaraki.jp","tsukuba.ibaraki.jp","uchihara.ibaraki.jp","ushiku.ibaraki.jp","yachiyo.ibaraki.jp","yamagata.ibaraki.jp","yawara.ibaraki.jp","yuki.ibaraki.jp","anamizu.ishikawa.jp","hakui.ishikawa.jp","hakusan.ishikawa.jp","kaga.ishikawa.jp","kahoku.ishikawa.jp","kanazawa.ishikawa.jp","kawakita.ishikawa.jp","komatsu.ishikawa.jp","nakanoto.ishikawa.jp","nanao.ishikawa.jp","nomi.ishikawa.jp","nonoichi.ishikawa.jp","noto.ishikawa.jp","shika.ishikawa.jp","suzu.ishikawa.jp","tsubata.ishikawa.jp","tsurugi.ishikawa.jp","uchinada.ishikawa.jp","wajima.ishikawa.jp","fudai.iwate.jp","fujisawa.iwate.jp","hanamaki.iwate.jp","hiraizumi.iwate.jp","hirono.iwate.jp","ichinohe.iwate.jp","ichinoseki.iwate.jp","iwaizumi.iwate.jp","iwate.iwate.jp","joboji.iwate.jp","kamaishi.iwate.jp","kanegasaki.iwate.jp","karumai.iwate.jp","kawai.iwate.jp","kitakami.iwate.jp","kuji.iwate.jp","kunohe.iwate.jp","kuzumaki.iwate.jp","miyako.iwate.jp","mizusawa.iwate.jp","morioka.iwate.jp","ninohe.iwate.jp","noda.iwate.jp","ofunato.iwate.jp","oshu.iwate.jp","otsuchi.iwate.jp","rikuzentakata.iwate.jp","shiwa.iwate.jp","shizukuishi.iwate.jp","sumita.iwate.jp","tanohata.iwate.jp","tono.iwate.jp","yahaba.iwate.jp","yamada.iwate.jp","ayagawa.kagawa.jp","higashikagawa.kagawa.jp","kanonji.kagawa.jp","kotohira.kagawa.jp","manno.kagawa.jp","marugame.kagawa.jp","mitoyo.kagawa.jp","naoshima.kagawa.jp","sanuki.kagawa.jp","tadotsu.kagawa.jp","takamatsu.kagawa.jp","tonosho.kagawa.jp","uchinomi.kagawa.jp","utazu.kagawa.jp","zentsuji.kagawa.jp","akune.kagoshima.jp","amami.kagoshima.jp","hioki.kagoshima.jp","isa.kagoshima.jp","isen.kagoshima.jp","izumi.kagoshima.jp","kagoshima.kagoshima.jp","kanoya.kagoshima.jp","kawanabe.kagoshima.jp","kinko.kagoshima.jp","kouyama.kagoshima.jp","makurazaki.kagoshima.jp","matsumoto.kagoshima.jp","minamitane.kagoshima.jp","nakatane.kagoshima.jp","nishinoomote.kagoshima.jp","satsumasendai.kagoshima.jp","soo.kagoshima.jp","tarumizu.kagoshima.jp","yusui.kagoshima.jp","aikawa.kanagawa.jp","atsugi.kanagawa.jp","ayase.kanagawa.jp","chigasaki.kanagawa.jp","ebina.kanagawa.jp","fujisawa.kanagawa.jp","hadano.kanagawa.jp","hakone.kanagawa.jp","hiratsuka.kanagawa.jp","isehara.kanagawa.jp","kaisei.kanagawa.jp","kamakura.kanagawa.jp","kiyokawa.kanagawa.jp","matsuda.kanagawa.jp","minamiashigara.kanagawa.jp","miura.kanagawa.jp","nakai.kanagawa.jp","ninomiya.kanagawa.jp","odawara.kanagawa.jp","oi.kanagawa.jp","oiso.kanagawa.jp","sagamihara.kanagawa.jp","samukawa.kanagawa.jp","tsukui.kanagawa.jp","yamakita.kanagawa.jp","yamato.kanagawa.jp","yokosuka.kanagawa.jp","yugawara.kanagawa.jp","zama.kanagawa.jp","zushi.kanagawa.jp","aki.kochi.jp","geisei.kochi.jp","hidaka.kochi.jp","higashitsuno.kochi.jp","ino.kochi.jp","kagami.kochi.jp","kami.kochi.jp","kitagawa.kochi.jp","kochi.kochi.jp","mihara.kochi.jp","motoyama.kochi.jp","muroto.kochi.jp","nahari.kochi.jp","nakamura.kochi.jp","nankoku.kochi.jp","nishitosa.kochi.jp","niyodogawa.kochi.jp","ochi.kochi.jp","okawa.kochi.jp","otoyo.kochi.jp","otsuki.kochi.jp","sakawa.kochi.jp","sukumo.kochi.jp","susaki.kochi.jp","tosa.kochi.jp","tosashimizu.kochi.jp","toyo.kochi.jp","tsuno.kochi.jp","umaji.kochi.jp","yasuda.kochi.jp","yusuhara.kochi.jp","amakusa.kumamoto.jp","arao.kumamoto.jp","aso.kumamoto.jp","choyo.kumamoto.jp","gyokuto.kumamoto.jp","kamiamakusa.kumamoto.jp","kikuchi.kumamoto.jp","kumamoto.kumamoto.jp","mashiki.kumamoto.jp","mifune.kumamoto.jp","minamata.kumamoto.jp","minamioguni.kumamoto.jp","nagasu.kumamoto.jp","nishihara.kumamoto.jp","oguni.kumamoto.jp","ozu.kumamoto.jp","sumoto.kumamoto.jp","takamori.kumamoto.jp","uki.kumamoto.jp","uto.kumamoto.jp","yamaga.kumamoto.jp","yamato.kumamoto.jp","yatsushiro.kumamoto.jp","ayabe.kyoto.jp","fukuchiyama.kyoto.jp","higashiyama.kyoto.jp","ide.kyoto.jp","ine.kyoto.jp","joyo.kyoto.jp","kameoka.kyoto.jp","kamo.kyoto.jp","kita.kyoto.jp","kizu.kyoto.jp","kumiyama.kyoto.jp","kyotamba.kyoto.jp","kyotanabe.kyoto.jp","kyotango.kyoto.jp","maizuru.kyoto.jp","minami.kyoto.jp","minamiyamashiro.kyoto.jp","miyazu.kyoto.jp","muko.kyoto.jp","nagaokakyo.kyoto.jp","nakagyo.kyoto.jp","nantan.kyoto.jp","oyamazaki.kyoto.jp","sakyo.kyoto.jp","seika.kyoto.jp","tanabe.kyoto.jp","uji.kyoto.jp","ujitawara.kyoto.jp","wazuka.kyoto.jp","yamashina.kyoto.jp","yawata.kyoto.jp","asahi.mie.jp","inabe.mie.jp","ise.mie.jp","kameyama.mie.jp","kawagoe.mie.jp","kiho.mie.jp","kisosaki.mie.jp","kiwa.mie.jp","komono.mie.jp","kumano.mie.jp","kuwana.mie.jp","matsusaka.mie.jp","meiwa.mie.jp","mihama.mie.jp","minamiise.mie.jp","misugi.mie.jp","miyama.mie.jp","nabari.mie.jp","shima.mie.jp","suzuka.mie.jp","tado.mie.jp","taiki.mie.jp","taki.mie.jp","tamaki.mie.jp","toba.mie.jp","tsu.mie.jp","udono.mie.jp","ureshino.mie.jp","watarai.mie.jp","yokkaichi.mie.jp","furukawa.miyagi.jp","higashimatsushima.miyagi.jp","ishinomaki.miyagi.jp","iwanuma.miyagi.jp","kakuda.miyagi.jp","kami.miyagi.jp","kawasaki.miyagi.jp","marumori.miyagi.jp","matsushima.miyagi.jp","minamisanriku.miyagi.jp","misato.miyagi.jp","murata.miyagi.jp","natori.miyagi.jp","ogawara.miyagi.jp","ohira.miyagi.jp","onagawa.miyagi.jp","osaki.miyagi.jp","rifu.miyagi.jp","semine.miyagi.jp","shibata.miyagi.jp","shichikashuku.miyagi.jp","shikama.miyagi.jp","shiogama.miyagi.jp","shiroishi.miyagi.jp","tagajo.miyagi.jp","taiwa.miyagi.jp","tome.miyagi.jp","tomiya.miyagi.jp","wakuya.miyagi.jp","watari.miyagi.jp","yamamoto.miyagi.jp","zao.miyagi.jp","aya.miyazaki.jp","ebino.miyazaki.jp","gokase.miyazaki.jp","hyuga.miyazaki.jp","kadogawa.miyazaki.jp","kawaminami.miyazaki.jp","kijo.miyazaki.jp","kitagawa.miyazaki.jp","kitakata.miyazaki.jp","kitaura.miyazaki.jp","kobayashi.miyazaki.jp","kunitomi.miyazaki.jp","kushima.miyazaki.jp","mimata.miyazaki.jp","miyakonojo.miyazaki.jp","miyazaki.miyazaki.jp","morotsuka.miyazaki.jp","nichinan.miyazaki.jp","nishimera.miyazaki.jp","nobeoka.miyazaki.jp","saito.miyazaki.jp","shiiba.miyazaki.jp","shintomi.miyazaki.jp","takaharu.miyazaki.jp","takanabe.miyazaki.jp","takazaki.miyazaki.jp","tsuno.miyazaki.jp","achi.nagano.jp","agematsu.nagano.jp","anan.nagano.jp","aoki.nagano.jp","asahi.nagano.jp","azumino.nagano.jp","chikuhoku.nagano.jp","chikuma.nagano.jp","chino.nagano.jp","fujimi.nagano.jp","hakuba.nagano.jp","hara.nagano.jp","hiraya.nagano.jp","iida.nagano.jp","iijima.nagano.jp","iiyama.nagano.jp","iizuna.nagano.jp","ikeda.nagano.jp","ikusaka.nagano.jp","ina.nagano.jp","karuizawa.nagano.jp","kawakami.nagano.jp","kiso.nagano.jp","kisofukushima.nagano.jp","kitaaiki.nagano.jp","komagane.nagano.jp","komoro.nagano.jp","matsukawa.nagano.jp","matsumoto.nagano.jp","miasa.nagano.jp","minamiaiki.nagano.jp","minamimaki.nagano.jp","minamiminowa.nagano.jp","minowa.nagano.jp","miyada.nagano.jp","miyota.nagano.jp","mochizuki.nagano.jp","nagano.nagano.jp","nagawa.nagano.jp","nagiso.nagano.jp","nakagawa.nagano.jp","nakano.nagano.jp","nozawaonsen.nagano.jp","obuse.nagano.jp","ogawa.nagano.jp","okaya.nagano.jp","omachi.nagano.jp","omi.nagano.jp","ookuwa.nagano.jp","ooshika.nagano.jp","otaki.nagano.jp","otari.nagano.jp","sakae.nagano.jp","sakaki.nagano.jp","saku.nagano.jp","sakuho.nagano.jp","shimosuwa.nagano.jp","shinanomachi.nagano.jp","shiojiri.nagano.jp","suwa.nagano.jp","suzaka.nagano.jp","takagi.nagano.jp","takamori.nagano.jp","takayama.nagano.jp","tateshina.nagano.jp","tatsuno.nagano.jp","togakushi.nagano.jp","togura.nagano.jp","tomi.nagano.jp","ueda.nagano.jp","wada.nagano.jp","yamagata.nagano.jp","yamanouchi.nagano.jp","yasaka.nagano.jp","yasuoka.nagano.jp","chijiwa.nagasaki.jp","futsu.nagasaki.jp","goto.nagasaki.jp","hasami.nagasaki.jp","hirado.nagasaki.jp","iki.nagasaki.jp","isahaya.nagasaki.jp","kawatana.nagasaki.jp","kuchinotsu.nagasaki.jp","matsuura.nagasaki.jp","nagasaki.nagasaki.jp","obama.nagasaki.jp","omura.nagasaki.jp","oseto.nagasaki.jp","saikai.nagasaki.jp","sasebo.nagasaki.jp","seihi.nagasaki.jp","shimabara.nagasaki.jp","shinkamigoto.nagasaki.jp","togitsu.nagasaki.jp","tsushima.nagasaki.jp","unzen.nagasaki.jp","ando.nara.jp","gose.nara.jp","heguri.nara.jp","higashiyoshino.nara.jp","ikaruga.nara.jp","ikoma.nara.jp","kamikitayama.nara.jp","kanmaki.nara.jp","kashiba.nara.jp","kashihara.nara.jp","katsuragi.nara.jp","kawai.nara.jp","kawakami.nara.jp","kawanishi.nara.jp","koryo.nara.jp","kurotaki.nara.jp","mitsue.nara.jp","miyake.nara.jp","nara.nara.jp","nosegawa.nara.jp","oji.nara.jp","ouda.nara.jp","oyodo.nara.jp","sakurai.nara.jp","sango.nara.jp","shimoichi.nara.jp","shimokitayama.nara.jp","shinjo.nara.jp","soni.nara.jp","takatori.nara.jp","tawaramoto.nara.jp","tenkawa.nara.jp","tenri.nara.jp","uda.nara.jp","yamatokoriyama.nara.jp","yamatotakada.nara.jp","yamazoe.nara.jp","yoshino.nara.jp","aga.niigata.jp","agano.niigata.jp","gosen.niigata.jp","itoigawa.niigata.jp","izumozaki.niigata.jp","joetsu.niigata.jp","kamo.niigata.jp","kariwa.niigata.jp","kashiwazaki.niigata.jp","minamiuonuma.niigata.jp","mitsuke.niigata.jp","muika.niigata.jp","murakami.niigata.jp","myoko.niigata.jp","nagaoka.niigata.jp","niigata.niigata.jp","ojiya.niigata.jp","omi.niigata.jp","sado.niigata.jp","sanjo.niigata.jp","seiro.niigata.jp","seirou.niigata.jp","sekikawa.niigata.jp","shibata.niigata.jp","tagami.niigata.jp","tainai.niigata.jp","tochio.niigata.jp","tokamachi.niigata.jp","tsubame.niigata.jp","tsunan.niigata.jp","uonuma.niigata.jp","yahiko.niigata.jp","yoita.niigata.jp","yuzawa.niigata.jp","beppu.oita.jp","bungoono.oita.jp","bungotakada.oita.jp","hasama.oita.jp","hiji.oita.jp","himeshima.oita.jp","hita.oita.jp","kamitsue.oita.jp","kokonoe.oita.jp","kuju.oita.jp","kunisaki.oita.jp","kusu.oita.jp","oita.oita.jp","saiki.oita.jp","taketa.oita.jp","tsukumi.oita.jp","usa.oita.jp","usuki.oita.jp","yufu.oita.jp","akaiwa.okayama.jp","asakuchi.okayama.jp","bizen.okayama.jp","hayashima.okayama.jp","ibara.okayama.jp","kagamino.okayama.jp","kasaoka.okayama.jp","kibichuo.okayama.jp","kumenan.okayama.jp","kurashiki.okayama.jp","maniwa.okayama.jp","misaki.okayama.jp","nagi.okayama.jp","niimi.okayama.jp","nishiawakura.okayama.jp","okayama.okayama.jp","satosho.okayama.jp","setouchi.okayama.jp","shinjo.okayama.jp","shoo.okayama.jp","soja.okayama.jp","takahashi.okayama.jp","tamano.okayama.jp","tsuyama.okayama.jp","wake.okayama.jp","yakage.okayama.jp","aguni.okinawa.jp","ginowan.okinawa.jp","ginoza.okinawa.jp","gushikami.okinawa.jp","haebaru.okinawa.jp","higashi.okinawa.jp","hirara.okinawa.jp","iheya.okinawa.jp","ishigaki.okinawa.jp","ishikawa.okinawa.jp","itoman.okinawa.jp","izena.okinawa.jp","kadena.okinawa.jp","kin.okinawa.jp","kitadaito.okinawa.jp","kitanakagusuku.okinawa.jp","kumejima.okinawa.jp","kunigami.okinawa.jp","minamidaito.okinawa.jp","motobu.okinawa.jp","nago.okinawa.jp","naha.okinawa.jp","nakagusuku.okinawa.jp","nakijin.okinawa.jp","nanjo.okinawa.jp","nishihara.okinawa.jp","ogimi.okinawa.jp","okinawa.okinawa.jp","onna.okinawa.jp","shimoji.okinawa.jp","taketomi.okinawa.jp","tarama.okinawa.jp","tokashiki.okinawa.jp","tomigusuku.okinawa.jp","tonaki.okinawa.jp","urasoe.okinawa.jp","uruma.okinawa.jp","yaese.okinawa.jp","yomitan.okinawa.jp","yonabaru.okinawa.jp","yonaguni.okinawa.jp","zamami.okinawa.jp","abeno.osaka.jp","chihayaakasaka.osaka.jp","chuo.osaka.jp","daito.osaka.jp","fujiidera.osaka.jp","habikino.osaka.jp","hannan.osaka.jp","higashiosaka.osaka.jp","higashisumiyoshi.osaka.jp","higashiyodogawa.osaka.jp","hirakata.osaka.jp","ibaraki.osaka.jp","ikeda.osaka.jp","izumi.osaka.jp","izumiotsu.osaka.jp","izumisano.osaka.jp","kadoma.osaka.jp","kaizuka.osaka.jp","kanan.osaka.jp","kashiwara.osaka.jp","katano.osaka.jp","kawachinagano.osaka.jp","kishiwada.osaka.jp","kita.osaka.jp","kumatori.osaka.jp","matsubara.osaka.jp","minato.osaka.jp","minoh.osaka.jp","misaki.osaka.jp","moriguchi.osaka.jp","neyagawa.osaka.jp","nishi.osaka.jp","nose.osaka.jp","osakasayama.osaka.jp","sakai.osaka.jp","sayama.osaka.jp","sennan.osaka.jp","settsu.osaka.jp","shijonawate.osaka.jp","shimamoto.osaka.jp","suita.osaka.jp","tadaoka.osaka.jp","taishi.osaka.jp","tajiri.osaka.jp","takaishi.osaka.jp","takatsuki.osaka.jp","tondabayashi.osaka.jp","toyonaka.osaka.jp","toyono.osaka.jp","yao.osaka.jp","ariake.saga.jp","arita.saga.jp","fukudomi.saga.jp","genkai.saga.jp","hamatama.saga.jp","hizen.saga.jp","imari.saga.jp","kamimine.saga.jp","kanzaki.saga.jp","karatsu.saga.jp","kashima.saga.jp","kitagata.saga.jp","kitahata.saga.jp","kiyama.saga.jp","kouhoku.saga.jp","kyuragi.saga.jp","nishiarita.saga.jp","ogi.saga.jp","omachi.saga.jp","ouchi.saga.jp","saga.saga.jp","shiroishi.saga.jp","taku.saga.jp","tara.saga.jp","tosu.saga.jp","yoshinogari.saga.jp","arakawa.saitama.jp","asaka.saitama.jp","chichibu.saitama.jp","fujimi.saitama.jp","fujimino.saitama.jp","fukaya.saitama.jp","hanno.saitama.jp","hanyu.saitama.jp","hasuda.saitama.jp","hatogaya.saitama.jp","hatoyama.saitama.jp","hidaka.saitama.jp","higashichichibu.saitama.jp","higashimatsuyama.saitama.jp","honjo.saitama.jp","ina.saitama.jp","iruma.saitama.jp","iwatsuki.saitama.jp","kamiizumi.saitama.jp","kamikawa.saitama.jp","kamisato.saitama.jp","kasukabe.saitama.jp","kawagoe.saitama.jp","kawaguchi.saitama.jp","kawajima.saitama.jp","kazo.saitama.jp","kitamoto.saitama.jp","koshigaya.saitama.jp","kounosu.saitama.jp","kuki.saitama.jp","kumagaya.saitama.jp","matsubushi.saitama.jp","minano.saitama.jp","misato.saitama.jp","miyashiro.saitama.jp","miyoshi.saitama.jp","moroyama.saitama.jp","nagatoro.saitama.jp","namegawa.saitama.jp","niiza.saitama.jp","ogano.saitama.jp","ogawa.saitama.jp","ogose.saitama.jp","okegawa.saitama.jp","omiya.saitama.jp","otaki.saitama.jp","ranzan.saitama.jp","ryokami.saitama.jp","saitama.saitama.jp","sakado.saitama.jp","satte.saitama.jp","sayama.saitama.jp","shiki.saitama.jp","shiraoka.saitama.jp","soka.saitama.jp","sugito.saitama.jp","toda.saitama.jp","tokigawa.saitama.jp","tokorozawa.saitama.jp","tsurugashima.saitama.jp","urawa.saitama.jp","warabi.saitama.jp","yashio.saitama.jp","yokoze.saitama.jp","yono.saitama.jp","yorii.saitama.jp","yoshida.saitama.jp","yoshikawa.saitama.jp","yoshimi.saitama.jp","aisho.shiga.jp","gamo.shiga.jp","higashiomi.shiga.jp","hikone.shiga.jp","koka.shiga.jp","konan.shiga.jp","kosei.shiga.jp","koto.shiga.jp","kusatsu.shiga.jp","maibara.shiga.jp","moriyama.shiga.jp","nagahama.shiga.jp","nishiazai.shiga.jp","notogawa.shiga.jp","omihachiman.shiga.jp","otsu.shiga.jp","ritto.shiga.jp","ryuoh.shiga.jp","takashima.shiga.jp","takatsuki.shiga.jp","torahime.shiga.jp","toyosato.shiga.jp","yasu.shiga.jp","akagi.shimane.jp","ama.shimane.jp","gotsu.shimane.jp","hamada.shimane.jp","higashiizumo.shimane.jp","hikawa.shimane.jp","hikimi.shimane.jp","izumo.shimane.jp","kakinoki.shimane.jp","masuda.shimane.jp","matsue.shimane.jp","misato.shimane.jp","nishinoshima.shimane.jp","ohda.shimane.jp","okinoshima.shimane.jp","okuizumo.shimane.jp","shimane.shimane.jp","tamayu.shimane.jp","tsuwano.shimane.jp","unnan.shimane.jp","yakumo.shimane.jp","yasugi.shimane.jp","yatsuka.shimane.jp","arai.shizuoka.jp","atami.shizuoka.jp","fuji.shizuoka.jp","fujieda.shizuoka.jp","fujikawa.shizuoka.jp","fujinomiya.shizuoka.jp","fukuroi.shizuoka.jp","gotemba.shizuoka.jp","haibara.shizuoka.jp","hamamatsu.shizuoka.jp","higashiizu.shizuoka.jp","ito.shizuoka.jp","iwata.shizuoka.jp","izu.shizuoka.jp","izunokuni.shizuoka.jp","kakegawa.shizuoka.jp","kannami.shizuoka.jp","kawanehon.shizuoka.jp","kawazu.shizuoka.jp","kikugawa.shizuoka.jp","kosai.shizuoka.jp","makinohara.shizuoka.jp","matsuzaki.shizuoka.jp","minamiizu.shizuoka.jp","mishima.shizuoka.jp","morimachi.shizuoka.jp","nishiizu.shizuoka.jp","numazu.shizuoka.jp","omaezaki.shizuoka.jp","shimada.shizuoka.jp","shimizu.shizuoka.jp","shimoda.shizuoka.jp","shizuoka.shizuoka.jp","susono.shizuoka.jp","yaizu.shizuoka.jp","yoshida.shizuoka.jp","ashikaga.tochigi.jp","bato.tochigi.jp","haga.tochigi.jp","ichikai.tochigi.jp","iwafune.tochigi.jp","kaminokawa.tochigi.jp","kanuma.tochigi.jp","karasuyama.tochigi.jp","kuroiso.tochigi.jp","mashiko.tochigi.jp","mibu.tochigi.jp","moka.tochigi.jp","motegi.tochigi.jp","nasu.tochigi.jp","nasushiobara.tochigi.jp","nikko.tochigi.jp","nishikata.tochigi.jp","nogi.tochigi.jp","ohira.tochigi.jp","ohtawara.tochigi.jp","oyama.tochigi.jp","sakura.tochigi.jp","sano.tochigi.jp","shimotsuke.tochigi.jp","shioya.tochigi.jp","takanezawa.tochigi.jp","tochigi.tochigi.jp","tsuga.tochigi.jp","ujiie.tochigi.jp","utsunomiya.tochigi.jp","yaita.tochigi.jp","aizumi.tokushima.jp","anan.tokushima.jp","ichiba.tokushima.jp","itano.tokushima.jp","kainan.tokushima.jp","komatsushima.tokushima.jp","matsushige.tokushima.jp","mima.tokushima.jp","minami.tokushima.jp","miyoshi.tokushima.jp","mugi.tokushima.jp","nakagawa.tokushima.jp","naruto.tokushima.jp","sanagochi.tokushima.jp","shishikui.tokushima.jp","tokushima.tokushima.jp","wajiki.tokushima.jp","adachi.tokyo.jp","akiruno.tokyo.jp","akishima.tokyo.jp","aogashima.tokyo.jp","arakawa.tokyo.jp","bunkyo.tokyo.jp","chiyoda.tokyo.jp","chofu.tokyo.jp","chuo.tokyo.jp","edogawa.tokyo.jp","fuchu.tokyo.jp","fussa.tokyo.jp","hachijo.tokyo.jp","hachioji.tokyo.jp","hamura.tokyo.jp","higashikurume.tokyo.jp","higashimurayama.tokyo.jp","higashiyamato.tokyo.jp","hino.tokyo.jp","hinode.tokyo.jp","hinohara.tokyo.jp","inagi.tokyo.jp","itabashi.tokyo.jp","katsushika.tokyo.jp","kita.tokyo.jp","kiyose.tokyo.jp","kodaira.tokyo.jp","koganei.tokyo.jp","kokubunji.tokyo.jp","komae.tokyo.jp","koto.tokyo.jp","kouzushima.tokyo.jp","kunitachi.tokyo.jp","machida.tokyo.jp","meguro.tokyo.jp","minato.tokyo.jp","mitaka.tokyo.jp","mizuho.tokyo.jp","musashimurayama.tokyo.jp","musashino.tokyo.jp","nakano.tokyo.jp","nerima.tokyo.jp","ogasawara.tokyo.jp","okutama.tokyo.jp","ome.tokyo.jp","oshima.tokyo.jp","ota.tokyo.jp","setagaya.tokyo.jp","shibuya.tokyo.jp","shinagawa.tokyo.jp","shinjuku.tokyo.jp","suginami.tokyo.jp","sumida.tokyo.jp","tachikawa.tokyo.jp","taito.tokyo.jp","tama.tokyo.jp","toshima.tokyo.jp","chizu.tottori.jp","hino.tottori.jp","kawahara.tottori.jp","koge.tottori.jp","kotoura.tottori.jp","misasa.tottori.jp","nanbu.tottori.jp","nichinan.tottori.jp","sakaiminato.tottori.jp","tottori.tottori.jp","wakasa.tottori.jp","yazu.tottori.jp","yonago.tottori.jp","asahi.toyama.jp","fuchu.toyama.jp","fukumitsu.toyama.jp","funahashi.toyama.jp","himi.toyama.jp","imizu.toyama.jp","inami.toyama.jp","johana.toyama.jp","kamiichi.toyama.jp","kurobe.toyama.jp","nakaniikawa.toyama.jp","namerikawa.toyama.jp","nanto.toyama.jp","nyuzen.toyama.jp","oyabe.toyama.jp","taira.toyama.jp","takaoka.toyama.jp","tateyama.toyama.jp","toga.toyama.jp","tonami.toyama.jp","toyama.toyama.jp","unazuki.toyama.jp","uozu.toyama.jp","yamada.toyama.jp","arida.wakayama.jp","aridagawa.wakayama.jp","gobo.wakayama.jp","hashimoto.wakayama.jp","hidaka.wakayama.jp","hirogawa.wakayama.jp","inami.wakayama.jp","iwade.wakayama.jp","kainan.wakayama.jp","kamitonda.wakayama.jp","katsuragi.wakayama.jp","kimino.wakayama.jp","kinokawa.wakayama.jp","kitayama.wakayama.jp","koya.wakayama.jp","koza.wakayama.jp","kozagawa.wakayama.jp","kudoyama.wakayama.jp","kushimoto.wakayama.jp","mihama.wakayama.jp","misato.wakayama.jp","nachikatsuura.wakayama.jp","shingu.wakayama.jp","shirahama.wakayama.jp","taiji.wakayama.jp","tanabe.wakayama.jp","wakayama.wakayama.jp","yuasa.wakayama.jp","yura.wakayama.jp","asahi.yamagata.jp","funagata.yamagata.jp","higashine.yamagata.jp","iide.yamagata.jp","kahoku.yamagata.jp","kaminoyama.yamagata.jp","kaneyama.yamagata.jp","kawanishi.yamagata.jp","mamurogawa.yamagata.jp","mikawa.yamagata.jp","murayama.yamagata.jp","nagai.yamagata.jp","nakayama.yamagata.jp","nanyo.yamagata.jp","nishikawa.yamagata.jp","obanazawa.yamagata.jp","oe.yamagata.jp","oguni.yamagata.jp","ohkura.yamagata.jp","oishida.yamagata.jp","sagae.yamagata.jp","sakata.yamagata.jp","sakegawa.yamagata.jp","shinjo.yamagata.jp","shirataka.yamagata.jp","shonai.yamagata.jp","takahata.yamagata.jp","tendo.yamagata.jp","tozawa.yamagata.jp","tsuruoka.yamagata.jp","yamagata.yamagata.jp","yamanobe.yamagata.jp","yonezawa.yamagata.jp","yuza.yamagata.jp","abu.yamaguchi.jp","hagi.yamaguchi.jp","hikari.yamaguchi.jp","hofu.yamaguchi.jp","iwakuni.yamaguchi.jp","kudamatsu.yamaguchi.jp","mitou.yamaguchi.jp","nagato.yamaguchi.jp","oshima.yamaguchi.jp","shimonoseki.yamaguchi.jp","shunan.yamaguchi.jp","tabuse.yamaguchi.jp","tokuyama.yamaguchi.jp","toyota.yamaguchi.jp","ube.yamaguchi.jp","yuu.yamaguchi.jp","chuo.yamanashi.jp","doshi.yamanashi.jp","fuefuki.yamanashi.jp","fujikawa.yamanashi.jp","fujikawaguchiko.yamanashi.jp","fujiyoshida.yamanashi.jp","hayakawa.yamanashi.jp","hokuto.yamanashi.jp","ichikawamisato.yamanashi.jp","kai.yamanashi.jp","kofu.yamanashi.jp","koshu.yamanashi.jp","kosuge.yamanashi.jp","minami-alps.yamanashi.jp","minobu.yamanashi.jp","nakamichi.yamanashi.jp","nanbu.yamanashi.jp","narusawa.yamanashi.jp","nirasaki.yamanashi.jp","nishikatsura.yamanashi.jp","oshino.yamanashi.jp","otsuki.yamanashi.jp","showa.yamanashi.jp","tabayama.yamanashi.jp","tsuru.yamanashi.jp","uenohara.yamanashi.jp","yamanakako.yamanashi.jp","yamanashi.yamanashi.jp","ke","ac.ke","co.ke","go.ke","info.ke","me.ke","mobi.ke","ne.ke","or.ke","sc.ke","kg","org.kg","net.kg","com.kg","edu.kg","gov.kg","mil.kg","*.kh","ki","edu.ki","biz.ki","net.ki","org.ki","gov.ki","info.ki","com.ki","km","org.km","nom.km","gov.km","prd.km","tm.km","edu.km","mil.km","ass.km","com.km","coop.km","asso.km","presse.km","medecin.km","notaires.km","pharmaciens.km","veterinaire.km","gouv.km","kn","net.kn","org.kn","edu.kn","gov.kn","kp","com.kp","edu.kp","gov.kp","org.kp","rep.kp","tra.kp","kr","ac.kr","co.kr","es.kr","go.kr","hs.kr","kg.kr","mil.kr","ms.kr","ne.kr","or.kr","pe.kr","re.kr","sc.kr","busan.kr","chungbuk.kr","chungnam.kr","daegu.kr","daejeon.kr","gangwon.kr","gwangju.kr","gyeongbuk.kr","gyeonggi.kr","gyeongnam.kr","incheon.kr","jeju.kr","jeonbuk.kr","jeonnam.kr","seoul.kr","ulsan.kr","kw","com.kw","edu.kw","emb.kw","gov.kw","ind.kw","net.kw","org.kw","ky","edu.ky","gov.ky","com.ky","org.ky","net.ky","kz","org.kz","edu.kz","net.kz","gov.kz","mil.kz","com.kz","la","int.la","net.la","info.la","edu.la","gov.la","per.la","com.la","org.la","lb","com.lb","edu.lb","gov.lb","net.lb","org.lb","lc","com.lc","net.lc","co.lc","org.lc","edu.lc","gov.lc","li","lk","gov.lk","sch.lk","net.lk","int.lk","com.lk","org.lk","edu.lk","ngo.lk","soc.lk","web.lk","ltd.lk","assn.lk","grp.lk","hotel.lk","ac.lk","lr","com.lr","edu.lr","gov.lr","org.lr","net.lr","ls","ac.ls","biz.ls","co.ls","edu.ls","gov.ls","info.ls","net.ls","org.ls","sc.ls","lt","gov.lt","lu","lv","com.lv","edu.lv","gov.lv","org.lv","mil.lv","id.lv","net.lv","asn.lv","conf.lv","ly","com.ly","net.ly","gov.ly","plc.ly","edu.ly","sch.ly","med.ly","org.ly","id.ly","ma","co.ma","net.ma","gov.ma","org.ma","ac.ma","press.ma","mc","tm.mc","asso.mc","md","me","co.me","net.me","org.me","edu.me","ac.me","gov.me","its.me","priv.me","mg","org.mg","nom.mg","gov.mg","prd.mg","tm.mg","edu.mg","mil.mg","com.mg","co.mg","mh","mil","mk","com.mk","org.mk","net.mk","edu.mk","gov.mk","inf.mk","name.mk","ml","com.ml","edu.ml","gouv.ml","gov.ml","net.ml","org.ml","presse.ml","*.mm","mn","gov.mn","edu.mn","org.mn","mo","com.mo","net.mo","org.mo","edu.mo","gov.mo","mobi","mp","mq","mr","gov.mr","ms","com.ms","edu.ms","gov.ms","net.ms","org.ms","mt","com.mt","edu.mt","net.mt","org.mt","mu","com.mu","net.mu","org.mu","gov.mu","ac.mu","co.mu","or.mu","museum","academy.museum","agriculture.museum","air.museum","airguard.museum","alabama.museum","alaska.museum","amber.museum","ambulance.museum","american.museum","americana.museum","americanantiques.museum","americanart.museum","amsterdam.museum","and.museum","annefrank.museum","anthro.museum","anthropology.museum","antiques.museum","aquarium.museum","arboretum.museum","archaeological.museum","archaeology.museum","architecture.museum","art.museum","artanddesign.museum","artcenter.museum","artdeco.museum","arteducation.museum","artgallery.museum","arts.museum","artsandcrafts.museum","asmatart.museum","assassination.museum","assisi.museum","association.museum","astronomy.museum","atlanta.museum","austin.museum","australia.museum","automotive.museum","aviation.museum","axis.museum","badajoz.museum","baghdad.museum","bahn.museum","bale.museum","baltimore.museum","barcelona.museum","baseball.museum","basel.museum","baths.museum","bauern.museum","beauxarts.museum","beeldengeluid.museum","bellevue.museum","bergbau.museum","berkeley.museum","berlin.museum","bern.museum","bible.museum","bilbao.museum","bill.museum","birdart.museum","birthplace.museum","bonn.museum","boston.museum","botanical.museum","botanicalgarden.museum","botanicgarden.museum","botany.museum","brandywinevalley.museum","brasil.museum","bristol.museum","british.museum","britishcolumbia.museum","broadcast.museum","brunel.museum","brussel.museum","brussels.museum","bruxelles.museum","building.museum","burghof.museum","bus.museum","bushey.museum","cadaques.museum","california.museum","cambridge.museum","can.museum","canada.museum","capebreton.museum","carrier.museum","cartoonart.museum","casadelamoneda.museum","castle.museum","castres.museum","celtic.museum","center.museum","chattanooga.museum","cheltenham.museum","chesapeakebay.museum","chicago.museum","children.museum","childrens.museum","childrensgarden.museum","chiropractic.museum","chocolate.museum","christiansburg.museum","cincinnati.museum","cinema.museum","circus.museum","civilisation.museum","civilization.museum","civilwar.museum","clinton.museum","clock.museum","coal.museum","coastaldefence.museum","cody.museum","coldwar.museum","collection.museum","colonialwilliamsburg.museum","coloradoplateau.museum","columbia.museum","columbus.museum","communication.museum","communications.museum","community.museum","computer.museum","computerhistory.museum","comunicações.museum","contemporary.museum","contemporaryart.museum","convent.museum","copenhagen.museum","corporation.museum","correios-e-telecomunicações.museum","corvette.museum","costume.museum","countryestate.museum","county.museum","crafts.museum","cranbrook.museum","creation.museum","cultural.museum","culturalcenter.museum","culture.museum","cyber.museum","cymru.museum","dali.museum","dallas.museum","database.museum","ddr.museum","decorativearts.museum","delaware.museum","delmenhorst.museum","denmark.museum","depot.museum","design.museum","detroit.museum","dinosaur.museum","discovery.museum","dolls.museum","donostia.museum","durham.museum","eastafrica.museum","eastcoast.museum","education.museum","educational.museum","egyptian.museum","eisenbahn.museum","elburg.museum","elvendrell.museum","embroidery.museum","encyclopedic.museum","england.museum","entomology.museum","environment.museum","environmentalconservation.museum","epilepsy.museum","essex.museum","estate.museum","ethnology.museum","exeter.museum","exhibition.museum","family.museum","farm.museum","farmequipment.museum","farmers.museum","farmstead.museum","field.museum","figueres.museum","filatelia.museum","film.museum","fineart.museum","finearts.museum","finland.museum","flanders.museum","florida.museum","force.museum","fortmissoula.museum","fortworth.museum","foundation.museum","francaise.museum","frankfurt.museum","franziskaner.museum","freemasonry.museum","freiburg.museum","fribourg.museum","frog.museum","fundacio.museum","furniture.museum","gallery.museum","garden.museum","gateway.museum","geelvinck.museum","gemological.museum","geology.museum","georgia.museum","giessen.museum","glas.museum","glass.museum","gorge.museum","grandrapids.museum","graz.museum","guernsey.museum","halloffame.museum","hamburg.museum","handson.museum","harvestcelebration.museum","hawaii.museum","health.museum","heimatunduhren.museum","hellas.museum","helsinki.museum","hembygdsforbund.museum","heritage.museum","histoire.museum","historical.museum","historicalsociety.museum","historichouses.museum","historisch.museum","historisches.museum","history.museum","historyofscience.museum","horology.museum","house.museum","humanities.museum","illustration.museum","imageandsound.museum","indian.museum","indiana.museum","indianapolis.museum","indianmarket.museum","intelligence.museum","interactive.museum","iraq.museum","iron.museum","isleofman.museum","jamison.museum","jefferson.museum","jerusalem.museum","jewelry.museum","jewish.museum","jewishart.museum","jfk.museum","journalism.museum","judaica.museum","judygarland.museum","juedisches.museum","juif.museum","karate.museum","karikatur.museum","kids.museum","koebenhavn.museum","koeln.museum","kunst.museum","kunstsammlung.museum","kunstunddesign.museum","labor.museum","labour.museum","lajolla.museum","lancashire.museum","landes.museum","lans.museum","läns.museum","larsson.museum","lewismiller.museum","lincoln.museum","linz.museum","living.museum","livinghistory.museum","localhistory.museum","london.museum","losangeles.museum","louvre.museum","loyalist.museum","lucerne.museum","luxembourg.museum","luzern.museum","mad.museum","madrid.museum","mallorca.museum","manchester.museum","mansion.museum","mansions.museum","manx.museum","marburg.museum","maritime.museum","maritimo.museum","maryland.museum","marylhurst.museum","media.museum","medical.museum","medizinhistorisches.museum","meeres.museum","memorial.museum","mesaverde.museum","michigan.museum","midatlantic.museum","military.museum","mill.museum","miners.museum","mining.museum","minnesota.museum","missile.museum","missoula.museum","modern.museum","moma.museum","money.museum","monmouth.museum","monticello.museum","montreal.museum","moscow.museum","motorcycle.museum","muenchen.museum","muenster.museum","mulhouse.museum","muncie.museum","museet.museum","museumcenter.museum","museumvereniging.museum","music.museum","national.museum","nationalfirearms.museum","nationalheritage.museum","nativeamerican.museum","naturalhistory.museum","naturalhistorymuseum.museum","naturalsciences.museum","nature.museum","naturhistorisches.museum","natuurwetenschappen.museum","naumburg.museum","naval.museum","nebraska.museum","neues.museum","newhampshire.museum","newjersey.museum","newmexico.museum","newport.museum","newspaper.museum","newyork.museum","niepce.museum","norfolk.museum","north.museum","nrw.museum","nuernberg.museum","nuremberg.museum","nyc.museum","nyny.museum","oceanographic.museum","oceanographique.museum","omaha.museum","online.museum","ontario.museum","openair.museum","oregon.museum","oregontrail.museum","otago.museum","oxford.museum","pacific.museum","paderborn.museum","palace.museum","paleo.museum","palmsprings.museum","panama.museum","paris.museum","pasadena.museum","pharmacy.museum","philadelphia.museum","philadelphiaarea.museum","philately.museum","phoenix.museum","photography.museum","pilots.museum","pittsburgh.museum","planetarium.museum","plantation.museum","plants.museum","plaza.museum","portal.museum","portland.museum","portlligat.museum","posts-and-telecommunications.museum","preservation.museum","presidio.museum","press.museum","project.museum","public.museum","pubol.museum","quebec.museum","railroad.museum","railway.museum","research.museum","resistance.museum","riodejaneiro.museum","rochester.museum","rockart.museum","roma.museum","russia.museum","saintlouis.museum","salem.museum","salvadordali.museum","salzburg.museum","sandiego.museum","sanfrancisco.museum","santabarbara.museum","santacruz.museum","santafe.museum","saskatchewan.museum","satx.museum","savannahga.museum","schlesisches.museum","schoenbrunn.museum","schokoladen.museum","school.museum","schweiz.museum","science.museum","scienceandhistory.museum","scienceandindustry.museum","sciencecenter.museum","sciencecenters.museum","science-fiction.museum","sciencehistory.museum","sciences.museum","sciencesnaturelles.museum","scotland.museum","seaport.museum","settlement.museum","settlers.museum","shell.museum","sherbrooke.museum","sibenik.museum","silk.museum","ski.museum","skole.museum","society.museum","sologne.museum","soundandvision.museum","southcarolina.museum","southwest.museum","space.museum","spy.museum","square.museum","stadt.museum","stalbans.museum","starnberg.museum","state.museum","stateofdelaware.museum","station.museum","steam.museum","steiermark.museum","stjohn.museum","stockholm.museum","stpetersburg.museum","stuttgart.museum","suisse.museum","surgeonshall.museum","surrey.museum","svizzera.museum","sweden.museum","sydney.museum","tank.museum","tcm.museum","technology.museum","telekommunikation.museum","television.museum","texas.museum","textile.museum","theater.museum","time.museum","timekeeping.museum","topology.museum","torino.museum","touch.museum","town.museum","transport.museum","tree.museum","trolley.museum","trust.museum","trustee.museum","uhren.museum","ulm.museum","undersea.museum","university.museum","usa.museum","usantiques.museum","usarts.museum","uscountryestate.museum","usculture.museum","usdecorativearts.museum","usgarden.museum","ushistory.museum","ushuaia.museum","uslivinghistory.museum","utah.museum","uvic.museum","valley.museum","vantaa.museum","versailles.museum","viking.museum","village.museum","virginia.museum","virtual.museum","virtuel.museum","vlaanderen.museum","volkenkunde.museum","wales.museum","wallonie.museum","war.museum","washingtondc.museum","watchandclock.museum","watch-and-clock.museum","western.museum","westfalen.museum","whaling.museum","wildlife.museum","williamsburg.museum","windmill.museum","workshop.museum","york.museum","yorkshire.museum","yosemite.museum","youth.museum","zoological.museum","zoology.museum","ירושלים.museum","иком.museum","mv","aero.mv","biz.mv","com.mv","coop.mv","edu.mv","gov.mv","info.mv","int.mv","mil.mv","museum.mv","name.mv","net.mv","org.mv","pro.mv","mw","ac.mw","biz.mw","co.mw","com.mw","coop.mw","edu.mw","gov.mw","int.mw","museum.mw","net.mw","org.mw","mx","com.mx","org.mx","gob.mx","edu.mx","net.mx","my","com.my","net.my","org.my","gov.my","edu.my","mil.my","name.my","mz","ac.mz","adv.mz","co.mz","edu.mz","gov.mz","mil.mz","net.mz","org.mz","na","info.na","pro.na","name.na","school.na","or.na","dr.na","us.na","mx.na","ca.na","in.na","cc.na","tv.na","ws.na","mobi.na","co.na","com.na","org.na","name","nc","asso.nc","nom.nc","ne","net","nf","com.nf","net.nf","per.nf","rec.nf","web.nf","arts.nf","firm.nf","info.nf","other.nf","store.nf","ng","com.ng","edu.ng","gov.ng","i.ng","mil.ng","mobi.ng","name.ng","net.ng","org.ng","sch.ng","ni","ac.ni","biz.ni","co.ni","com.ni","edu.ni","gob.ni","in.ni","info.ni","int.ni","mil.ni","net.ni","nom.ni","org.ni","web.ni","nl","no","fhs.no","vgs.no","fylkesbibl.no","folkebibl.no","museum.no","idrett.no","priv.no","mil.no","stat.no","dep.no","kommune.no","herad.no","aa.no","ah.no","bu.no","fm.no","hl.no","hm.no","jan-mayen.no","mr.no","nl.no","nt.no","of.no","ol.no","oslo.no","rl.no","sf.no","st.no","svalbard.no","tm.no","tr.no","va.no","vf.no","gs.aa.no","gs.ah.no","gs.bu.no","gs.fm.no","gs.hl.no","gs.hm.no","gs.jan-mayen.no","gs.mr.no","gs.nl.no","gs.nt.no","gs.of.no","gs.ol.no","gs.oslo.no","gs.rl.no","gs.sf.no","gs.st.no","gs.svalbard.no","gs.tm.no","gs.tr.no","gs.va.no","gs.vf.no","akrehamn.no","åkrehamn.no","algard.no","ålgård.no","arna.no","brumunddal.no","bryne.no","bronnoysund.no","brønnøysund.no","drobak.no","drøbak.no","egersund.no","fetsund.no","floro.no","florø.no","fredrikstad.no","hokksund.no","honefoss.no","hønefoss.no","jessheim.no","jorpeland.no","jørpeland.no","kirkenes.no","kopervik.no","krokstadelva.no","langevag.no","langevåg.no","leirvik.no","mjondalen.no","mjøndalen.no","mo-i-rana.no","mosjoen.no","mosjøen.no","nesoddtangen.no","orkanger.no","osoyro.no","osøyro.no","raholt.no","råholt.no","sandnessjoen.no","sandnessjøen.no","skedsmokorset.no","slattum.no","spjelkavik.no","stathelle.no","stavern.no","stjordalshalsen.no","stjørdalshalsen.no","tananger.no","tranby.no","vossevangen.no","afjord.no","åfjord.no","agdenes.no","al.no","ål.no","alesund.no","ålesund.no","alstahaug.no","alta.no","áltá.no","alaheadju.no","álaheadju.no","alvdal.no","amli.no","åmli.no","amot.no","åmot.no","andebu.no","andoy.no","andøy.no","andasuolo.no","ardal.no","årdal.no","aremark.no","arendal.no","ås.no","aseral.no","åseral.no","asker.no","askim.no","askvoll.no","askoy.no","askøy.no","asnes.no","åsnes.no","audnedaln.no","aukra.no","aure.no","aurland.no","aurskog-holand.no","aurskog-høland.no","austevoll.no","austrheim.no","averoy.no","averøy.no","balestrand.no","ballangen.no","balat.no","bálát.no","balsfjord.no","bahccavuotna.no","báhccavuotna.no","bamble.no","bardu.no","beardu.no","beiarn.no","bajddar.no","bájddar.no","baidar.no","báidár.no","berg.no","bergen.no","berlevag.no","berlevåg.no","bearalvahki.no","bearalváhki.no","bindal.no","birkenes.no","bjarkoy.no","bjarkøy.no","bjerkreim.no","bjugn.no","bodo.no","bodø.no","badaddja.no","bådåddjå.no","budejju.no","bokn.no","bremanger.no","bronnoy.no","brønnøy.no","bygland.no","bykle.no","barum.no","bærum.no","bo.telemark.no","bø.telemark.no","bo.nordland.no","bø.nordland.no","bievat.no","bievát.no","bomlo.no","bømlo.no","batsfjord.no","båtsfjord.no","bahcavuotna.no","báhcavuotna.no","dovre.no","drammen.no","drangedal.no","dyroy.no","dyrøy.no","donna.no","dønna.no","eid.no","eidfjord.no","eidsberg.no","eidskog.no","eidsvoll.no","eigersund.no","elverum.no","enebakk.no","engerdal.no","etne.no","etnedal.no","evenes.no","evenassi.no","evenášši.no","evje-og-hornnes.no","farsund.no","fauske.no","fuossko.no","fuoisku.no","fedje.no","fet.no","finnoy.no","finnøy.no","fitjar.no","fjaler.no","fjell.no","flakstad.no","flatanger.no","flekkefjord.no","flesberg.no","flora.no","fla.no","flå.no","folldal.no","forsand.no","fosnes.no","frei.no","frogn.no","froland.no","frosta.no","frana.no","fræna.no","froya.no","frøya.no","fusa.no","fyresdal.no","forde.no","førde.no","gamvik.no","gangaviika.no","gáŋgaviika.no","gaular.no","gausdal.no","gildeskal.no","gildeskål.no","giske.no","gjemnes.no","gjerdrum.no","gjerstad.no","gjesdal.no","gjovik.no","gjøvik.no","gloppen.no","gol.no","gran.no","grane.no","granvin.no","gratangen.no","grimstad.no","grong.no","kraanghke.no","kråanghke.no","grue.no","gulen.no","hadsel.no","halden.no","halsa.no","hamar.no","hamaroy.no","habmer.no","hábmer.no","hapmir.no","hápmir.no","hammerfest.no","hammarfeasta.no","hámmárfeasta.no","haram.no","hareid.no","harstad.no","hasvik.no","aknoluokta.no","ákŋoluokta.no","hattfjelldal.no","aarborte.no","haugesund.no","hemne.no","hemnes.no","hemsedal.no","heroy.more-og-romsdal.no","herøy.møre-og-romsdal.no","heroy.nordland.no","herøy.nordland.no","hitra.no","hjartdal.no","hjelmeland.no","hobol.no","hobøl.no","hof.no","hol.no","hole.no","holmestrand.no","holtalen.no","holtålen.no","hornindal.no","horten.no","hurdal.no","hurum.no","hvaler.no","hyllestad.no","hagebostad.no","hægebostad.no","hoyanger.no","høyanger.no","hoylandet.no","høylandet.no","ha.no","hå.no","ibestad.no","inderoy.no","inderøy.no","iveland.no","jevnaker.no","jondal.no","jolster.no","jølster.no","karasjok.no","karasjohka.no","kárášjohka.no","karlsoy.no","galsa.no","gálsá.no","karmoy.no","karmøy.no","kautokeino.no","guovdageaidnu.no","klepp.no","klabu.no","klæbu.no","kongsberg.no","kongsvinger.no","kragero.no","kragerø.no","kristiansand.no","kristiansund.no","krodsherad.no","krødsherad.no","kvalsund.no","rahkkeravju.no","ráhkkerávju.no","kvam.no","kvinesdal.no","kvinnherad.no","kviteseid.no","kvitsoy.no","kvitsøy.no","kvafjord.no","kvæfjord.no","giehtavuoatna.no","kvanangen.no","kvænangen.no","navuotna.no","návuotna.no","kafjord.no","kåfjord.no","gaivuotna.no","gáivuotna.no","larvik.no","lavangen.no","lavagis.no","loabat.no","loabát.no","lebesby.no","davvesiida.no","leikanger.no","leirfjord.no","leka.no","leksvik.no","lenvik.no","leangaviika.no","leaŋgaviika.no","lesja.no","levanger.no","lier.no","lierne.no","lillehammer.no","lillesand.no","lindesnes.no","lindas.no","lindås.no","lom.no","loppa.no","lahppi.no","láhppi.no","lund.no","lunner.no","luroy.no","lurøy.no","luster.no","lyngdal.no","lyngen.no","ivgu.no","lardal.no","lerdal.no","lærdal.no","lodingen.no","lødingen.no","lorenskog.no","lørenskog.no","loten.no","løten.no","malvik.no","masoy.no","måsøy.no","muosat.no","muosát.no","mandal.no","marker.no","marnardal.no","masfjorden.no","meland.no","meldal.no","melhus.no","meloy.no","meløy.no","meraker.no","meråker.no","moareke.no","moåreke.no","midsund.no","midtre-gauldal.no","modalen.no","modum.no","molde.no","moskenes.no","moss.no","mosvik.no","malselv.no","målselv.no","malatvuopmi.no","málatvuopmi.no","namdalseid.no","aejrie.no","namsos.no","namsskogan.no","naamesjevuemie.no","nååmesjevuemie.no","laakesvuemie.no","nannestad.no","narvik.no","narviika.no","naustdal.no","nedre-eiker.no","nes.akershus.no","nes.buskerud.no","nesna.no","nesodden.no","nesseby.no","unjarga.no","unjárga.no","nesset.no","nissedal.no","nittedal.no","nord-aurdal.no","nord-fron.no","nord-odal.no","norddal.no","nordkapp.no","davvenjarga.no","davvenjárga.no","nordre-land.no","nordreisa.no","raisa.no","ráisa.no","nore-og-uvdal.no","notodden.no","naroy.no","nærøy.no","notteroy.no","nøtterøy.no","odda.no","oksnes.no","øksnes.no","oppdal.no","oppegard.no","oppegård.no","orkdal.no","orland.no","ørland.no","orskog.no","ørskog.no","orsta.no","ørsta.no","os.hedmark.no","os.hordaland.no","osen.no","osteroy.no","osterøy.no","ostre-toten.no","østre-toten.no","overhalla.no","ovre-eiker.no","øvre-eiker.no","oyer.no","øyer.no","oygarden.no","øygarden.no","oystre-slidre.no","øystre-slidre.no","porsanger.no","porsangu.no","porsáŋgu.no","porsgrunn.no","radoy.no","radøy.no","rakkestad.no","rana.no","ruovat.no","randaberg.no","rauma.no","rendalen.no","rennebu.no","rennesoy.no","rennesøy.no","rindal.no","ringebu.no","ringerike.no","ringsaker.no","rissa.no","risor.no","risør.no","roan.no","rollag.no","rygge.no","ralingen.no","rælingen.no","rodoy.no","rødøy.no","romskog.no","rømskog.no","roros.no","røros.no","rost.no","røst.no","royken.no","røyken.no","royrvik.no","røyrvik.no","rade.no","råde.no","salangen.no","siellak.no","saltdal.no","salat.no","sálát.no","sálat.no","samnanger.no","sande.more-og-romsdal.no","sande.møre-og-romsdal.no","sande.vestfold.no","sandefjord.no","sandnes.no","sandoy.no","sandøy.no","sarpsborg.no","sauda.no","sauherad.no","sel.no","selbu.no","selje.no","seljord.no","sigdal.no","siljan.no","sirdal.no","skaun.no","skedsmo.no","ski.no","skien.no","skiptvet.no","skjervoy.no","skjervøy.no","skierva.no","skiervá.no","skjak.no","skjåk.no","skodje.no","skanland.no","skånland.no","skanit.no","skánit.no","smola.no","smøla.no","snillfjord.no","snasa.no","snåsa.no","snoasa.no","snaase.no","snåase.no","sogndal.no","sokndal.no","sola.no","solund.no","songdalen.no","sortland.no","spydeberg.no","stange.no","stavanger.no","steigen.no","steinkjer.no","stjordal.no","stjørdal.no","stokke.no","stor-elvdal.no","stord.no","stordal.no","storfjord.no","omasvuotna.no","strand.no","stranda.no","stryn.no","sula.no","suldal.no","sund.no","sunndal.no","surnadal.no","sveio.no","svelvik.no","sykkylven.no","sogne.no","søgne.no","somna.no","sømna.no","sondre-land.no","søndre-land.no","sor-aurdal.no","sør-aurdal.no","sor-fron.no","sør-fron.no","sor-odal.no","sør-odal.no","sor-varanger.no","sør-varanger.no","matta-varjjat.no","mátta-várjjat.no","sorfold.no","sørfold.no","sorreisa.no","sørreisa.no","sorum.no","sørum.no","tana.no","deatnu.no","time.no","tingvoll.no","tinn.no","tjeldsund.no","dielddanuorri.no","tjome.no","tjøme.no","tokke.no","tolga.no","torsken.no","tranoy.no","tranøy.no","tromso.no","tromsø.no","tromsa.no","romsa.no","trondheim.no","troandin.no","trysil.no","trana.no","træna.no","trogstad.no","trøgstad.no","tvedestrand.no","tydal.no","tynset.no","tysfjord.no","divtasvuodna.no","divttasvuotna.no","tysnes.no","tysvar.no","tysvær.no","tonsberg.no","tønsberg.no","ullensaker.no","ullensvang.no","ulvik.no","utsira.no","vadso.no","vadsø.no","cahcesuolo.no","čáhcesuolo.no","vaksdal.no","valle.no","vang.no","vanylven.no","vardo.no","vardø.no","varggat.no","várggát.no","vefsn.no","vaapste.no","vega.no","vegarshei.no","vegårshei.no","vennesla.no","verdal.no","verran.no","vestby.no","vestnes.no","vestre-slidre.no","vestre-toten.no","vestvagoy.no","vestvågøy.no","vevelstad.no","vik.no","vikna.no","vindafjord.no","volda.no","voss.no","varoy.no","værøy.no","vagan.no","vågan.no","voagat.no","vagsoy.no","vågsøy.no","vaga.no","vågå.no","valer.ostfold.no","våler.østfold.no","valer.hedmark.no","våler.hedmark.no","*.np","nr","biz.nr","info.nr","gov.nr","edu.nr","org.nr","net.nr","com.nr","nu","nz","ac.nz","co.nz","cri.nz","geek.nz","gen.nz","govt.nz","health.nz","iwi.nz","kiwi.nz","maori.nz","mil.nz","māori.nz","net.nz","org.nz","parliament.nz","school.nz","om","co.om","com.om","edu.om","gov.om","med.om","museum.om","net.om","org.om","pro.om","onion","org","pa","ac.pa","gob.pa","com.pa","org.pa","sld.pa","edu.pa","net.pa","ing.pa","abo.pa","med.pa","nom.pa","pe","edu.pe","gob.pe","nom.pe","mil.pe","org.pe","com.pe","net.pe","pf","com.pf","org.pf","edu.pf","*.pg","ph","com.ph","net.ph","org.ph","gov.ph","edu.ph","ngo.ph","mil.ph","i.ph","pk","com.pk","net.pk","edu.pk","org.pk","fam.pk","biz.pk","web.pk","gov.pk","gob.pk","gok.pk","gon.pk","gop.pk","gos.pk","info.pk","pl","com.pl","net.pl","org.pl","aid.pl","agro.pl","atm.pl","auto.pl","biz.pl","edu.pl","gmina.pl","gsm.pl","info.pl","mail.pl","miasta.pl","media.pl","mil.pl","nieruchomosci.pl","nom.pl","pc.pl","powiat.pl","priv.pl","realestate.pl","rel.pl","sex.pl","shop.pl","sklep.pl","sos.pl","szkola.pl","targi.pl","tm.pl","tourism.pl","travel.pl","turystyka.pl","gov.pl","ap.gov.pl","ic.gov.pl","is.gov.pl","us.gov.pl","kmpsp.gov.pl","kppsp.gov.pl","kwpsp.gov.pl","psp.gov.pl","wskr.gov.pl","kwp.gov.pl","mw.gov.pl","ug.gov.pl","um.gov.pl","umig.gov.pl","ugim.gov.pl","upow.gov.pl","uw.gov.pl","starostwo.gov.pl","pa.gov.pl","po.gov.pl","psse.gov.pl","pup.gov.pl","rzgw.gov.pl","sa.gov.pl","so.gov.pl","sr.gov.pl","wsa.gov.pl","sko.gov.pl","uzs.gov.pl","wiih.gov.pl","winb.gov.pl","pinb.gov.pl","wios.gov.pl","witd.gov.pl","wzmiuw.gov.pl","piw.gov.pl","wiw.gov.pl","griw.gov.pl","wif.gov.pl","oum.gov.pl","sdn.gov.pl","zp.gov.pl","uppo.gov.pl","mup.gov.pl","wuoz.gov.pl","konsulat.gov.pl","oirm.gov.pl","augustow.pl","babia-gora.pl","bedzin.pl","beskidy.pl","bialowieza.pl","bialystok.pl","bielawa.pl","bieszczady.pl","boleslawiec.pl","bydgoszcz.pl","bytom.pl","cieszyn.pl","czeladz.pl","czest.pl","dlugoleka.pl","elblag.pl","elk.pl","glogow.pl","gniezno.pl","gorlice.pl","grajewo.pl","ilawa.pl","jaworzno.pl","jelenia-gora.pl","jgora.pl","kalisz.pl","kazimierz-dolny.pl","karpacz.pl","kartuzy.pl","kaszuby.pl","katowice.pl","kepno.pl","ketrzyn.pl","klodzko.pl","kobierzyce.pl","kolobrzeg.pl","konin.pl","konskowola.pl","kutno.pl","lapy.pl","lebork.pl","legnica.pl","lezajsk.pl","limanowa.pl","lomza.pl","lowicz.pl","lubin.pl","lukow.pl","malbork.pl","malopolska.pl","mazowsze.pl","mazury.pl","mielec.pl","mielno.pl","mragowo.pl","naklo.pl","nowaruda.pl","nysa.pl","olawa.pl","olecko.pl","olkusz.pl","olsztyn.pl","opoczno.pl","opole.pl","ostroda.pl","ostroleka.pl","ostrowiec.pl","ostrowwlkp.pl","pila.pl","pisz.pl","podhale.pl","podlasie.pl","polkowice.pl","pomorze.pl","pomorskie.pl","prochowice.pl","pruszkow.pl","przeworsk.pl","pulawy.pl","radom.pl","rawa-maz.pl","rybnik.pl","rzeszow.pl","sanok.pl","sejny.pl","slask.pl","slupsk.pl","sosnowiec.pl","stalowa-wola.pl","skoczow.pl","starachowice.pl","stargard.pl","suwalki.pl","swidnica.pl","swiebodzin.pl","swinoujscie.pl","szczecin.pl","szczytno.pl","tarnobrzeg.pl","tgory.pl","turek.pl","tychy.pl","ustka.pl","walbrzych.pl","warmia.pl","warszawa.pl","waw.pl","wegrow.pl","wielun.pl","wlocl.pl","wloclawek.pl","wodzislaw.pl","wolomin.pl","wroclaw.pl","zachpomor.pl","zagan.pl","zarow.pl","zgora.pl","zgorzelec.pl","pm","pn","gov.pn","co.pn","org.pn","edu.pn","net.pn","post","pr","com.pr","net.pr","org.pr","gov.pr","edu.pr","isla.pr","pro.pr","biz.pr","info.pr","name.pr","est.pr","prof.pr","ac.pr","pro","aaa.pro","aca.pro","acct.pro","avocat.pro","bar.pro","cpa.pro","eng.pro","jur.pro","law.pro","med.pro","recht.pro","ps","edu.ps","gov.ps","sec.ps","plo.ps","com.ps","org.ps","net.ps","pt","net.pt","gov.pt","org.pt","edu.pt","int.pt","publ.pt","com.pt","nome.pt","pw","co.pw","ne.pw","or.pw","ed.pw","go.pw","belau.pw","py","com.py","coop.py","edu.py","gov.py","mil.py","net.py","org.py","qa","com.qa","edu.qa","gov.qa","mil.qa","name.qa","net.qa","org.qa","sch.qa","re","asso.re","com.re","nom.re","ro","arts.ro","com.ro","firm.ro","info.ro","nom.ro","nt.ro","org.ro","rec.ro","store.ro","tm.ro","www.ro","rs","ac.rs","co.rs","edu.rs","gov.rs","in.rs","org.rs","ru","ac.ru","edu.ru","gov.ru","int.ru","mil.ru","test.ru","rw","ac.rw","co.rw","coop.rw","gov.rw","mil.rw","net.rw","org.rw","sa","com.sa","net.sa","org.sa","gov.sa","med.sa","pub.sa","edu.sa","sch.sa","sb","com.sb","edu.sb","gov.sb","net.sb","org.sb","sc","com.sc","gov.sc","net.sc","org.sc","edu.sc","sd","com.sd","net.sd","org.sd","edu.sd","med.sd","tv.sd","gov.sd","info.sd","se","a.se","ac.se","b.se","bd.se","brand.se","c.se","d.se","e.se","f.se","fh.se","fhsk.se","fhv.se","g.se","h.se","i.se","k.se","komforb.se","kommunalforbund.se","komvux.se","l.se","lanbib.se","m.se","n.se","naturbruksgymn.se","o.se","org.se","p.se","parti.se","pp.se","press.se","r.se","s.se","t.se","tm.se","u.se","w.se","x.se","y.se","z.se","sg","com.sg","net.sg","org.sg","gov.sg","edu.sg","per.sg","sh","com.sh","net.sh","gov.sh","org.sh","mil.sh","si","sj","sk","sl","com.sl","net.sl","edu.sl","gov.sl","org.sl","sm","sn","art.sn","com.sn","edu.sn","gouv.sn","org.sn","perso.sn","univ.sn","so","com.so","net.so","org.so","sr","st","co.st","com.st","consulado.st","edu.st","embaixada.st","gov.st","mil.st","net.st","org.st","principe.st","saotome.st","store.st","su","sv","com.sv","edu.sv","gob.sv","org.sv","red.sv","sx","gov.sx","sy","edu.sy","gov.sy","net.sy","mil.sy","com.sy","org.sy","sz","co.sz","ac.sz","org.sz","tc","td","tel","tf","tg","th","ac.th","co.th","go.th","in.th","mi.th","net.th","or.th","tj","ac.tj","biz.tj","co.tj","com.tj","edu.tj","go.tj","gov.tj","int.tj","mil.tj","name.tj","net.tj","nic.tj","org.tj","test.tj","web.tj","tk","tl","gov.tl","tm","com.tm","co.tm","org.tm","net.tm","nom.tm","gov.tm","mil.tm","edu.tm","tn","com.tn","ens.tn","fin.tn","gov.tn","ind.tn","intl.tn","nat.tn","net.tn","org.tn","info.tn","perso.tn","tourism.tn","edunet.tn","rnrt.tn","rns.tn","rnu.tn","mincom.tn","agrinet.tn","defense.tn","turen.tn","to","com.to","gov.to","net.to","org.to","edu.to","mil.to","tr","av.tr","bbs.tr","bel.tr","biz.tr","com.tr","dr.tr","edu.tr","gen.tr","gov.tr","info.tr","mil.tr","k12.tr","kep.tr","name.tr","net.tr","org.tr","pol.tr","tel.tr","tsk.tr","tv.tr","web.tr","nc.tr","gov.nc.tr","tt","co.tt","com.tt","org.tt","net.tt","biz.tt","info.tt","pro.tt","int.tt","coop.tt","jobs.tt","mobi.tt","travel.tt","museum.tt","aero.tt","name.tt","gov.tt","edu.tt","tv","tw","edu.tw","gov.tw","mil.tw","com.tw","net.tw","org.tw","idv.tw","game.tw","ebiz.tw","club.tw","網路.tw","組織.tw","商業.tw","tz","ac.tz","co.tz","go.tz","hotel.tz","info.tz","me.tz","mil.tz","mobi.tz","ne.tz","or.tz","sc.tz","tv.tz","ua","com.ua","edu.ua","gov.ua","in.ua","net.ua","org.ua","cherkassy.ua","cherkasy.ua","chernigov.ua","chernihiv.ua","chernivtsi.ua","chernovtsy.ua","ck.ua","cn.ua","cr.ua","crimea.ua","cv.ua","dn.ua","dnepropetrovsk.ua","dnipropetrovsk.ua","dominic.ua","donetsk.ua","dp.ua","if.ua","ivano-frankivsk.ua","kh.ua","kharkiv.ua","kharkov.ua","kherson.ua","khmelnitskiy.ua","khmelnytskyi.ua","kiev.ua","kirovograd.ua","km.ua","kr.ua","krym.ua","ks.ua","kv.ua","kyiv.ua","lg.ua","lt.ua","lugansk.ua","lutsk.ua","lv.ua","lviv.ua","mk.ua","mykolaiv.ua","nikolaev.ua","od.ua","odesa.ua","odessa.ua","pl.ua","poltava.ua","rivne.ua","rovno.ua","rv.ua","sb.ua","sebastopol.ua","sevastopol.ua","sm.ua","sumy.ua","te.ua","ternopil.ua","uz.ua","uzhgorod.ua","vinnica.ua","vinnytsia.ua","vn.ua","volyn.ua","yalta.ua","zaporizhzhe.ua","zaporizhzhia.ua","zhitomir.ua","zhytomyr.ua","zp.ua","zt.ua","ug","co.ug","or.ug","ac.ug","sc.ug","go.ug","ne.ug","com.ug","org.ug","uk","ac.uk","co.uk","gov.uk","ltd.uk","me.uk","net.uk","nhs.uk","org.uk","plc.uk","police.uk","*.sch.uk","us","dni.us","fed.us","isa.us","kids.us","nsn.us","ak.us","al.us","ar.us","as.us","az.us","ca.us","co.us","ct.us","dc.us","de.us","fl.us","ga.us","gu.us","hi.us","ia.us","id.us","il.us","in.us","ks.us","ky.us","la.us","ma.us","md.us","me.us","mi.us","mn.us","mo.us","ms.us","mt.us","nc.us","nd.us","ne.us","nh.us","nj.us","nm.us","nv.us","ny.us","oh.us","ok.us","or.us","pa.us","pr.us","ri.us","sc.us","sd.us","tn.us","tx.us","ut.us","vi.us","vt.us","va.us","wa.us","wi.us","wv.us","wy.us","k12.ak.us","k12.al.us","k12.ar.us","k12.as.us","k12.az.us","k12.ca.us","k12.co.us","k12.ct.us","k12.dc.us","k12.de.us","k12.fl.us","k12.ga.us","k12.gu.us","k12.ia.us","k12.id.us","k12.il.us","k12.in.us","k12.ks.us","k12.ky.us","k12.la.us","k12.ma.us","k12.md.us","k12.me.us","k12.mi.us","k12.mn.us","k12.mo.us","k12.ms.us","k12.mt.us","k12.nc.us","k12.ne.us","k12.nh.us","k12.nj.us","k12.nm.us","k12.nv.us","k12.ny.us","k12.oh.us","k12.ok.us","k12.or.us","k12.pa.us","k12.pr.us","k12.ri.us","k12.sc.us","k12.tn.us","k12.tx.us","k12.ut.us","k12.vi.us","k12.vt.us","k12.va.us","k12.wa.us","k12.wi.us","k12.wy.us","cc.ak.us","cc.al.us","cc.ar.us","cc.as.us","cc.az.us","cc.ca.us","cc.co.us","cc.ct.us","cc.dc.us","cc.de.us","cc.fl.us","cc.ga.us","cc.gu.us","cc.hi.us","cc.ia.us","cc.id.us","cc.il.us","cc.in.us","cc.ks.us","cc.ky.us","cc.la.us","cc.ma.us","cc.md.us","cc.me.us","cc.mi.us","cc.mn.us","cc.mo.us","cc.ms.us","cc.mt.us","cc.nc.us","cc.nd.us","cc.ne.us","cc.nh.us","cc.nj.us","cc.nm.us","cc.nv.us","cc.ny.us","cc.oh.us","cc.ok.us","cc.or.us","cc.pa.us","cc.pr.us","cc.ri.us","cc.sc.us","cc.sd.us","cc.tn.us","cc.tx.us","cc.ut.us","cc.vi.us","cc.vt.us","cc.va.us","cc.wa.us","cc.wi.us","cc.wv.us","cc.wy.us","lib.ak.us","lib.al.us","lib.ar.us","lib.as.us","lib.az.us","lib.ca.us","lib.co.us","lib.ct.us","lib.dc.us","lib.fl.us","lib.ga.us","lib.gu.us","lib.hi.us","lib.ia.us","lib.id.us","lib.il.us","lib.in.us","lib.ks.us","lib.ky.us","lib.la.us","lib.ma.us","lib.md.us","lib.me.us","lib.mi.us","lib.mn.us","lib.mo.us","lib.ms.us","lib.mt.us","lib.nc.us","lib.nd.us","lib.ne.us","lib.nh.us","lib.nj.us","lib.nm.us","lib.nv.us","lib.ny.us","lib.oh.us","lib.ok.us","lib.or.us","lib.pa.us","lib.pr.us","lib.ri.us","lib.sc.us","lib.sd.us","lib.tn.us","lib.tx.us","lib.ut.us","lib.vi.us","lib.vt.us","lib.va.us","lib.wa.us","lib.wi.us","lib.wy.us","pvt.k12.ma.us","chtr.k12.ma.us","paroch.k12.ma.us","ann-arbor.mi.us","cog.mi.us","dst.mi.us","eaton.mi.us","gen.mi.us","mus.mi.us","tec.mi.us","washtenaw.mi.us","uy","com.uy","edu.uy","gub.uy","mil.uy","net.uy","org.uy","uz","co.uz","com.uz","net.uz","org.uz","va","vc","com.vc","net.vc","org.vc","gov.vc","mil.vc","edu.vc","ve","arts.ve","co.ve","com.ve","e12.ve","edu.ve","firm.ve","gob.ve","gov.ve","info.ve","int.ve","mil.ve","net.ve","org.ve","rec.ve","store.ve","tec.ve","web.ve","vg","vi","co.vi","com.vi","k12.vi","net.vi","org.vi","vn","com.vn","net.vn","org.vn","edu.vn","gov.vn","int.vn","ac.vn","biz.vn","info.vn","name.vn","pro.vn","health.vn","vu","com.vu","edu.vu","net.vu","org.vu","wf","ws","com.ws","net.ws","org.ws","gov.ws","edu.ws","yt","امارات","հայ","বাংলা","бг","бел","中国","中國","الجزائر","مصر","ею","გე","ελ","香港","公司.香港","教育.香港","政府.香港","個人.香港","網絡.香港","組織.香港","ಭಾರತ","ଭାରତ","ভাৰত","भारतम्","भारोत","ڀارت","ഭാരതം","भारत","بارت","بھارت","భారత్","ભારત","ਭਾਰਤ","ভারত","இந்தியா","ایران","ايران","عراق","الاردن","한국","қаз","ලංකා","இலங்கை","المغرب","мкд","мон","澳門","澳门","مليسيا","عمان","پاکستان","پاكستان","فلسطين","срб","пр.срб","орг.срб","обр.срб","од.срб","упр.срб","ак.срб","рф","قطر","السعودية","السعودیة","السعودیۃ","السعوديه","سودان","新加坡","சிங்கப்பூர்","سورية","سوريا","ไทย","ศึกษา.ไทย","ธุรกิจ.ไทย","รัฐบาล.ไทย","ทหาร.ไทย","เน็ต.ไทย","องค์กร.ไทย","تونس","台灣","台湾","臺灣","укр","اليمن","xxx","*.ye","ac.za","agric.za","alt.za","co.za","edu.za","gov.za","grondar.za","law.za","mil.za","net.za","ngo.za","nis.za","nom.za","org.za","school.za","tm.za","web.za","zm","ac.zm","biz.zm","co.zm","com.zm","edu.zm","gov.zm","info.zm","mil.zm","net.zm","org.zm","sch.zm","zw","ac.zw","co.zw","gov.zw","mil.zw","org.zw","aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","academy","accenture","accountant","accountants","aco","actor","adac","ads","adult","aeg","aetna","afamilycompany","afl","africa","agakhan","agency","aig","aigo","airbus","airforce","airtel","akdn","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","aol","apartments","app","apple","aquarelle","arab","aramco","archi","army","art","arte","asda","associates","athleta","attorney","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aws","axa","azure","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bbc","bbt","bbva","bcg","bcn","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bharti","bible","bid","bike","bing","bingo","bio","black","blackfriday","blockbuster","blog","bloomberg","blue","bms","bmw","bnl","bnpparibas","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","bradesco","bridgestone","broadway","broker","brother","brussels","budapest","bugatti","build","builders","business","buy","buzz","bzh","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","catering","catholic","cba","cbn","cbre","cbs","ceb","center","ceo","cern","cfa","cfd","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","coach","codes","coffee","college","cologne","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","corsica","country","coupon","coupons","courses","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cuisinella","cymru","cyou","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dnp","docs","doctor","dodge","dog","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","earth","eat","eco","edeka","education","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","ericsson","erni","esq","estate","esurance","etisalat","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","flickr","flights","flir","florist","flowers","fly","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","gal","gallery","gallo","gallup","game","games","gap","garden","gbiz","gdn","gea","gent","genting","george","ggee","gift","gifts","gives","giving","glade","glass","gle","global","globo","gmail","gmbh","gmo","gmx","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","grainger","graphics","gratis","green","gripe","grocery","group","guardian","gucci","guge","guide","guitars","guru","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hkt","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hsbc","hughes","hyatt","hyundai","ibm","icbc","ice","icu","ieee","ifm","ikano","imamat","imdb","immo","immobilien","inc","industries","infiniti","ing","ink","institute","insurance","insure","intel","international","intuit","investments","ipiranga","irish","iselect","ismaili","ist","istanbul","itau","itv","iveco","jaguar","java","jcb","jcp","jeep","jetzt","jewelry","jio","jll","jmp","jnj","joburg","jot","joy","jpmorgan","jprs","juegos","juniper","kaufen","kddi","kerryhotels","kerrylogistics","kerryproperties","kfh","kia","kim","kinder","kindle","kitchen","kiwi","koeln","komatsu","kosher","kpmg","kpn","krd","kred","kuokgroup","kyoto","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","ltd","ltda","lundbeck","lupin","luxe","luxury","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mckinsey","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","metlife","miami","microsoft","mini","mint","mit","mitsubishi","mlb","mls","mma","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","msd","mtn","mtr","mutual","nab","nadex","nagoya","nationwide","natura","navy","nba","nec","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nfl","ngo","nhk","nico","nike","nikon","ninja","nissan","nissay","nokia","northwesternmutual","norton","now","nowruz","nowtv","nra","nrw","ntt","nyc","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","organic","origins","osaka","otsuka","ott","ovh","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pet","pfizer","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","place","play","playstation","plumbing","plus","pnc","pohl","poker","politie","porn","pramerica","praxi","press","prime","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","pub","pwc","qpon","quebec","quest","qvc","racing","radio","raid","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","rocher","rocks","rodeo","rogers","room","rsvp","rugby","ruhr","run","rwe","ryukyu","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sbi","sbs","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","silk","sina","singles","site","ski","skin","sky","skype","sling","smart","smile","sncf","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","sport","spot","spreadbetting","srl","srt","stada","staples","star","starhub","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","sucks","supplies","supply","support","surf","surgery","suzuki","swatch","swiftcover","swiss","sydney","symantec","systems","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tci","tdk","team","tech","technology","telefonica","temasek","tennis","teva","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tjmaxx","tjx","tkmaxx","tmall","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tube","tui","tunes","tushu","tvs","ubank","ubs","uconnect","unicom","university","uno","uol","ups","vacations","vana","vanguard","vegas","ventures","verisign","versicherung","vet","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vistaprint","viva","vivo","vlaanderen","vodka","volkswagen","volvo","vote","voting","voto","voyage","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","慈善","集团","在线","大众汽车","点看","คอม","八卦","موقع","公益","公司","香格里拉","网站","移动","我爱你","москва","католик","онлайн","сайт","联通","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","商标","商店","商城","дети","ポイント","新闻","工行","家電","كوم","中文网","中信","娱乐","谷歌","電訊盈科","购物","クラウド","通販","网店","संगठन","餐厅","网络","ком","诺基亚","食品","飞利浦","手表","手机","ارامكو","العليان","اتصالات","بازار","موبايلي","ابوظبي","كاثوليك","همراه","닷컴","政府","شبكة","بيتك","عرب","机构","组织机构","健康","招聘","рус","珠宝","大拿","みんな","グーグル","世界","書籍","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","广东","政务","xyz","yachts","yahoo","yamaxun","yandex","yodobashi","yoga","yokohama","you","youtube","yun","zappos","zara","zero","zip","zone","zuerich","cc.ua","inf.ua","ltd.ua","beep.pl","barsy.ca","*.compute.estate","*.alces.network","alwaysdata.net","cloudfront.net","*.compute.amazonaws.com","*.compute-1.amazonaws.com","*.compute.amazonaws.com.cn","us-east-1.amazonaws.com","cn-north-1.eb.amazonaws.com.cn","cn-northwest-1.eb.amazonaws.com.cn","elasticbeanstalk.com","ap-northeast-1.elasticbeanstalk.com","ap-northeast-2.elasticbeanstalk.com","ap-northeast-3.elasticbeanstalk.com","ap-south-1.elasticbeanstalk.com","ap-southeast-1.elasticbeanstalk.com","ap-southeast-2.elasticbeanstalk.com","ca-central-1.elasticbeanstalk.com","eu-central-1.elasticbeanstalk.com","eu-west-1.elasticbeanstalk.com","eu-west-2.elasticbeanstalk.com","eu-west-3.elasticbeanstalk.com","sa-east-1.elasticbeanstalk.com","us-east-1.elasticbeanstalk.com","us-east-2.elasticbeanstalk.com","us-gov-west-1.elasticbeanstalk.com","us-west-1.elasticbeanstalk.com","us-west-2.elasticbeanstalk.com","*.elb.amazonaws.com","*.elb.amazonaws.com.cn","s3.amazonaws.com","s3-ap-northeast-1.amazonaws.com","s3-ap-northeast-2.amazonaws.com","s3-ap-south-1.amazonaws.com","s3-ap-southeast-1.amazonaws.com","s3-ap-southeast-2.amazonaws.com","s3-ca-central-1.amazonaws.com","s3-eu-central-1.amazonaws.com","s3-eu-west-1.amazonaws.com","s3-eu-west-2.amazonaws.com","s3-eu-west-3.amazonaws.com","s3-external-1.amazonaws.com","s3-fips-us-gov-west-1.amazonaws.com","s3-sa-east-1.amazonaws.com","s3-us-gov-west-1.amazonaws.com","s3-us-east-2.amazonaws.com","s3-us-west-1.amazonaws.com","s3-us-west-2.amazonaws.com","s3.ap-northeast-2.amazonaws.com","s3.ap-south-1.amazonaws.com","s3.cn-north-1.amazonaws.com.cn","s3.ca-central-1.amazonaws.com","s3.eu-central-1.amazonaws.com","s3.eu-west-2.amazonaws.com","s3.eu-west-3.amazonaws.com","s3.us-east-2.amazonaws.com","s3.dualstack.ap-northeast-1.amazonaws.com","s3.dualstack.ap-northeast-2.amazonaws.com","s3.dualstack.ap-south-1.amazonaws.com","s3.dualstack.ap-southeast-1.amazonaws.com","s3.dualstack.ap-southeast-2.amazonaws.com","s3.dualstack.ca-central-1.amazonaws.com","s3.dualstack.eu-central-1.amazonaws.com","s3.dualstack.eu-west-1.amazonaws.com","s3.dualstack.eu-west-2.amazonaws.com","s3.dualstack.eu-west-3.amazonaws.com","s3.dualstack.sa-east-1.amazonaws.com","s3.dualstack.us-east-1.amazonaws.com","s3.dualstack.us-east-2.amazonaws.com","s3-website-us-east-1.amazonaws.com","s3-website-us-west-1.amazonaws.com","s3-website-us-west-2.amazonaws.com","s3-website-ap-northeast-1.amazonaws.com","s3-website-ap-southeast-1.amazonaws.com","s3-website-ap-southeast-2.amazonaws.com","s3-website-eu-west-1.amazonaws.com","s3-website-sa-east-1.amazonaws.com","s3-website.ap-northeast-2.amazonaws.com","s3-website.ap-south-1.amazonaws.com","s3-website.ca-central-1.amazonaws.com","s3-website.eu-central-1.amazonaws.com","s3-website.eu-west-2.amazonaws.com","s3-website.eu-west-3.amazonaws.com","s3-website.us-east-2.amazonaws.com","t3l3p0rt.net","tele.amune.org","apigee.io","on-aptible.com","user.party.eus","pimienta.org","poivron.org","potager.org","sweetpepper.org","myasustor.com","go-vip.co","go-vip.net","wpcomstaging.com","myfritz.net","*.awdev.ca","*.advisor.ws","b-data.io","backplaneapp.io","app.banzaicloud.io","betainabox.com","bnr.la","blackbaudcdn.net","boomla.net","boxfuse.io","square7.ch","bplaced.com","bplaced.de","square7.de","bplaced.net","square7.net","browsersafetymark.io","uk0.bigv.io","dh.bytemark.co.uk","vm.bytemark.co.uk","mycd.eu","carrd.co","crd.co","uwu.ai","ae.org","ar.com","br.com","cn.com","com.de","com.se","de.com","eu.com","gb.com","gb.net","hu.com","hu.net","jp.net","jpn.com","kr.com","mex.com","no.com","qc.com","ru.com","sa.com","se.net","uk.com","uk.net","us.com","uy.com","za.bz","za.com","africa.com","gr.com","in.net","us.org","co.com","c.la","certmgr.org","xenapponazure.com","discourse.group","virtueeldomein.nl","cleverapps.io","*.lcl.dev","*.stg.dev","c66.me","cloud66.ws","cloud66.zone","jdevcloud.com","wpdevcloud.com","cloudaccess.host","freesite.host","cloudaccess.net","cloudcontrolled.com","cloudcontrolapp.com","workers.dev","wnext.app","co.ca","*.otap.co","co.cz","c.cdn77.org","cdn77-ssl.net","r.cdn77.net","rsc.cdn77.org","ssl.origin.cdn77-secure.org","cloudns.asia","cloudns.biz","cloudns.club","cloudns.cc","cloudns.eu","cloudns.in","cloudns.info","cloudns.org","cloudns.pro","cloudns.pw","cloudns.us","cloudeity.net","cnpy.gdn","co.nl","co.no","webhosting.be","hosting-cluster.nl","dyn.cosidns.de","dynamisches-dns.de","dnsupdater.de","internet-dns.de","l-o-g-i-n.de","dynamic-dns.info","feste-ip.net","knx-server.net","static-access.net","realm.cz","*.cryptonomic.net","cupcake.is","cyon.link","cyon.site","daplie.me","localhost.daplie.me","dattolocal.com","dattorelay.com","dattoweb.com","mydatto.com","dattolocal.net","mydatto.net","biz.dk","co.dk","firm.dk","reg.dk","store.dk","*.dapps.earth","*.bzz.dapps.earth","debian.net","dedyn.io","dnshome.de","online.th","shop.th","drayddns.com","dreamhosters.com","mydrobo.com","drud.io","drud.us","duckdns.org","dy.fi","tunk.org","dyndns-at-home.com","dyndns-at-work.com","dyndns-blog.com","dyndns-free.com","dyndns-home.com","dyndns-ip.com","dyndns-mail.com","dyndns-office.com","dyndns-pics.com","dyndns-remote.com","dyndns-server.com","dyndns-web.com","dyndns-wiki.com","dyndns-work.com","dyndns.biz","dyndns.info","dyndns.org","dyndns.tv","at-band-camp.net","ath.cx","barrel-of-knowledge.info","barrell-of-knowledge.info","better-than.tv","blogdns.com","blogdns.net","blogdns.org","blogsite.org","boldlygoingnowhere.org","broke-it.net","buyshouses.net","cechire.com","dnsalias.com","dnsalias.net","dnsalias.org","dnsdojo.com","dnsdojo.net","dnsdojo.org","does-it.net","doesntexist.com","doesntexist.org","dontexist.com","dontexist.net","dontexist.org","doomdns.com","doomdns.org","dvrdns.org","dyn-o-saur.com","dynalias.com","dynalias.net","dynalias.org","dynathome.net","dyndns.ws","endofinternet.net","endofinternet.org","endoftheinternet.org","est-a-la-maison.com","est-a-la-masion.com","est-le-patron.com","est-mon-blogueur.com","for-better.biz","for-more.biz","for-our.info","for-some.biz","for-the.biz","forgot.her.name","forgot.his.name","from-ak.com","from-al.com","from-ar.com","from-az.net","from-ca.com","from-co.net","from-ct.com","from-dc.com","from-de.com","from-fl.com","from-ga.com","from-hi.com","from-ia.com","from-id.com","from-il.com","from-in.com","from-ks.com","from-ky.com","from-la.net","from-ma.com","from-md.com","from-me.org","from-mi.com","from-mn.com","from-mo.com","from-ms.com","from-mt.com","from-nc.com","from-nd.com","from-ne.com","from-nh.com","from-nj.com","from-nm.com","from-nv.com","from-ny.net","from-oh.com","from-ok.com","from-or.com","from-pa.com","from-pr.com","from-ri.com","from-sc.com","from-sd.com","from-tn.com","from-tx.com","from-ut.com","from-va.com","from-vt.com","from-wa.com","from-wi.com","from-wv.com","from-wy.com","ftpaccess.cc","fuettertdasnetz.de","game-host.org","game-server.cc","getmyip.com","gets-it.net","go.dyndns.org","gotdns.com","gotdns.org","groks-the.info","groks-this.info","ham-radio-op.net","here-for-more.info","hobby-site.com","hobby-site.org","home.dyndns.org","homedns.org","homeftp.net","homeftp.org","homeip.net","homelinux.com","homelinux.net","homelinux.org","homeunix.com","homeunix.net","homeunix.org","iamallama.com","in-the-band.net","is-a-anarchist.com","is-a-blogger.com","is-a-bookkeeper.com","is-a-bruinsfan.org","is-a-bulls-fan.com","is-a-candidate.org","is-a-caterer.com","is-a-celticsfan.org","is-a-chef.com","is-a-chef.net","is-a-chef.org","is-a-conservative.com","is-a-cpa.com","is-a-cubicle-slave.com","is-a-democrat.com","is-a-designer.com","is-a-doctor.com","is-a-financialadvisor.com","is-a-geek.com","is-a-geek.net","is-a-geek.org","is-a-green.com","is-a-guru.com","is-a-hard-worker.com","is-a-hunter.com","is-a-knight.org","is-a-landscaper.com","is-a-lawyer.com","is-a-liberal.com","is-a-libertarian.com","is-a-linux-user.org","is-a-llama.com","is-a-musician.com","is-a-nascarfan.com","is-a-nurse.com","is-a-painter.com","is-a-patsfan.org","is-a-personaltrainer.com","is-a-photographer.com","is-a-player.com","is-a-republican.com","is-a-rockstar.com","is-a-socialist.com","is-a-soxfan.org","is-a-student.com","is-a-teacher.com","is-a-techie.com","is-a-therapist.com","is-an-accountant.com","is-an-actor.com","is-an-actress.com","is-an-anarchist.com","is-an-artist.com","is-an-engineer.com","is-an-entertainer.com","is-by.us","is-certified.com","is-found.org","is-gone.com","is-into-anime.com","is-into-cars.com","is-into-cartoons.com","is-into-games.com","is-leet.com","is-lost.org","is-not-certified.com","is-saved.org","is-slick.com","is-uberleet.com","is-very-bad.org","is-very-evil.org","is-very-good.org","is-very-nice.org","is-very-sweet.org","is-with-theband.com","isa-geek.com","isa-geek.net","isa-geek.org","isa-hockeynut.com","issmarterthanyou.com","isteingeek.de","istmein.de","kicks-ass.net","kicks-ass.org","knowsitall.info","land-4-sale.us","lebtimnetz.de","leitungsen.de","likes-pie.com","likescandy.com","merseine.nu","mine.nu","misconfused.org","mypets.ws","myphotos.cc","neat-url.com","office-on-the.net","on-the-web.tv","podzone.net","podzone.org","readmyblog.org","saves-the-whales.com","scrapper-site.net","scrapping.cc","selfip.biz","selfip.com","selfip.info","selfip.net","selfip.org","sells-for-less.com","sells-for-u.com","sells-it.net","sellsyourhome.org","servebbs.com","servebbs.net","servebbs.org","serveftp.net","serveftp.org","servegame.org","shacknet.nu","simple-url.com","space-to-rent.com","stuff-4-sale.org","stuff-4-sale.us","teaches-yoga.com","thruhere.net","traeumtgerade.de","webhop.biz","webhop.info","webhop.net","webhop.org","worse-than.tv","writesthisblog.com","ddnss.de","dyn.ddnss.de","dyndns.ddnss.de","dyndns1.de","dyn-ip24.de","home-webserver.de","dyn.home-webserver.de","myhome-server.de","ddnss.org","definima.net","definima.io","bci.dnstrace.pro","ddnsfree.com","ddnsgeek.com","giize.com","gleeze.com","kozow.com","loseyourip.com","ooguy.com","theworkpc.com","casacam.net","dynu.net","accesscam.org","camdvr.org","freeddns.org","mywire.org","webredirect.org","myddns.rocks","blogsite.xyz","dynv6.net","e4.cz","mytuleap.com","onred.one","staging.onred.one","enonic.io","customer.enonic.io","eu.org","al.eu.org","asso.eu.org","at.eu.org","au.eu.org","be.eu.org","bg.eu.org","ca.eu.org","cd.eu.org","ch.eu.org","cn.eu.org","cy.eu.org","cz.eu.org","de.eu.org","dk.eu.org","edu.eu.org","ee.eu.org","es.eu.org","fi.eu.org","fr.eu.org","gr.eu.org","hr.eu.org","hu.eu.org","ie.eu.org","il.eu.org","in.eu.org","int.eu.org","is.eu.org","it.eu.org","jp.eu.org","kr.eu.org","lt.eu.org","lu.eu.org","lv.eu.org","mc.eu.org","me.eu.org","mk.eu.org","mt.eu.org","my.eu.org","net.eu.org","ng.eu.org","nl.eu.org","no.eu.org","nz.eu.org","paris.eu.org","pl.eu.org","pt.eu.org","q-a.eu.org","ro.eu.org","ru.eu.org","se.eu.org","si.eu.org","sk.eu.org","tr.eu.org","uk.eu.org","us.eu.org","eu-1.evennode.com","eu-2.evennode.com","eu-3.evennode.com","eu-4.evennode.com","us-1.evennode.com","us-2.evennode.com","us-3.evennode.com","us-4.evennode.com","twmail.cc","twmail.net","twmail.org","mymailer.com.tw","url.tw","apps.fbsbx.com","ru.net","adygeya.ru","bashkiria.ru","bir.ru","cbg.ru","com.ru","dagestan.ru","grozny.ru","kalmykia.ru","kustanai.ru","marine.ru","mordovia.ru","msk.ru","mytis.ru","nalchik.ru","nov.ru","pyatigorsk.ru","spb.ru","vladikavkaz.ru","vladimir.ru","abkhazia.su","adygeya.su","aktyubinsk.su","arkhangelsk.su","armenia.su","ashgabad.su","azerbaijan.su","balashov.su","bashkiria.su","bryansk.su","bukhara.su","chimkent.su","dagestan.su","east-kazakhstan.su","exnet.su","georgia.su","grozny.su","ivanovo.su","jambyl.su","kalmykia.su","kaluga.su","karacol.su","karaganda.su","karelia.su","khakassia.su","krasnodar.su","kurgan.su","kustanai.su","lenug.su","mangyshlak.su","mordovia.su","msk.su","murmansk.su","nalchik.su","navoi.su","north-kazakhstan.su","nov.su","obninsk.su","penza.su","pokrovsk.su","sochi.su","spb.su","tashkent.su","termez.su","togliatti.su","troitsk.su","tselinograd.su","tula.su","tuva.su","vladikavkaz.su","vladimir.su","vologda.su","channelsdvr.net","fastly-terrarium.com","fastlylb.net","map.fastlylb.net","freetls.fastly.net","map.fastly.net","a.prod.fastly.net","global.prod.fastly.net","a.ssl.fastly.net","b.ssl.fastly.net","global.ssl.fastly.net","fastpanel.direct","fastvps-server.com","fhapp.xyz","fedorainfracloud.org","fedorapeople.org","cloud.fedoraproject.org","app.os.fedoraproject.org","app.os.stg.fedoraproject.org","mydobiss.com","filegear.me","filegear-au.me","filegear-de.me","filegear-gb.me","filegear-ie.me","filegear-jp.me","filegear-sg.me","firebaseapp.com","flynnhub.com","flynnhosting.net","freebox-os.com","freeboxos.com","fbx-os.fr","fbxos.fr","freebox-os.fr","freeboxos.fr","freedesktop.org","*.futurecms.at","*.ex.futurecms.at","*.in.futurecms.at","futurehosting.at","futuremailing.at","*.ex.ortsinfo.at","*.kunden.ortsinfo.at","*.statics.cloud","service.gov.uk","gehirn.ne.jp","usercontent.jp","lab.ms","github.io","githubusercontent.com","gitlab.io","glitch.me","cloudapps.digital","london.cloudapps.digital","homeoffice.gov.uk","ro.im","shop.ro","goip.de","run.app","a.run.app","*.0emm.com","appspot.com","blogspot.ae","blogspot.al","blogspot.am","blogspot.ba","blogspot.be","blogspot.bg","blogspot.bj","blogspot.ca","blogspot.cf","blogspot.ch","blogspot.cl","blogspot.co.at","blogspot.co.id","blogspot.co.il","blogspot.co.ke","blogspot.co.nz","blogspot.co.uk","blogspot.co.za","blogspot.com","blogspot.com.ar","blogspot.com.au","blogspot.com.br","blogspot.com.by","blogspot.com.co","blogspot.com.cy","blogspot.com.ee","blogspot.com.eg","blogspot.com.es","blogspot.com.mt","blogspot.com.ng","blogspot.com.tr","blogspot.com.uy","blogspot.cv","blogspot.cz","blogspot.de","blogspot.dk","blogspot.fi","blogspot.fr","blogspot.gr","blogspot.hk","blogspot.hr","blogspot.hu","blogspot.ie","blogspot.in","blogspot.is","blogspot.it","blogspot.jp","blogspot.kr","blogspot.li","blogspot.lt","blogspot.lu","blogspot.md","blogspot.mk","blogspot.mr","blogspot.mx","blogspot.my","blogspot.nl","blogspot.no","blogspot.pe","blogspot.pt","blogspot.qa","blogspot.re","blogspot.ro","blogspot.rs","blogspot.ru","blogspot.se","blogspot.sg","blogspot.si","blogspot.sk","blogspot.sn","blogspot.td","blogspot.tw","blogspot.ug","blogspot.vn","cloudfunctions.net","cloud.goog","codespot.com","googleapis.com","googlecode.com","pagespeedmobilizer.com","publishproxy.com","withgoogle.com","withyoutube.com","fin.ci","free.hr","caa.li","ua.rs","conf.se","hashbang.sh","hasura.app","hasura-app.io","hepforge.org","herokuapp.com","herokussl.com","myravendb.com","ravendb.community","ravendb.me","development.run","ravendb.run","bpl.biz","orx.biz","ng.city","ng.ink","biz.gl","col.ng","gen.ng","ltd.ng","sch.so","häkkinen.fi","*.moonscale.io","moonscale.net","iki.fi","dyn-berlin.de","in-berlin.de","in-brb.de","in-butter.de","in-dsl.de","in-dsl.net","in-dsl.org","in-vpn.de","in-vpn.net","in-vpn.org","biz.at","info.at","info.cx","ac.leg.br","al.leg.br","am.leg.br","ap.leg.br","ba.leg.br","ce.leg.br","df.leg.br","es.leg.br","go.leg.br","ma.leg.br","mg.leg.br","ms.leg.br","mt.leg.br","pa.leg.br","pb.leg.br","pe.leg.br","pi.leg.br","pr.leg.br","rj.leg.br","rn.leg.br","ro.leg.br","rr.leg.br","rs.leg.br","sc.leg.br","se.leg.br","sp.leg.br","to.leg.br","pixolino.com","ipifony.net","mein-iserv.de","test-iserv.de","myjino.ru","*.hosting.myjino.ru","*.landing.myjino.ru","*.spectrum.myjino.ru","*.vps.myjino.ru","*.triton.zone","*.cns.joyent.com","js.org","kaas.gg","khplay.nl","keymachine.de","knightpoint.systems","co.krd","edu.krd","git-repos.de","lcube-server.de","svn-repos.de","leadpages.co","lpages.co","lpusercontent.com","co.business","co.education","co.events","co.financial","co.network","co.place","co.technology","app.lmpm.com","linkitools.space","linkyard.cloud","linkyard-cloud.ch","members.linode.com","nodebalancer.linode.com","we.bs","loginline.app","loginline.dev","loginline.io","loginline.services","loginline.site","krasnik.pl","leczna.pl","lubartow.pl","lublin.pl","poniatowa.pl","swidnik.pl","uklugs.org","glug.org.uk","lug.org.uk","lugs.org.uk","barsy.bg","barsy.co.uk","barsyonline.co.uk","barsycenter.com","barsyonline.com","barsy.club","barsy.de","barsy.eu","barsy.in","barsy.info","barsy.io","barsy.me","barsy.menu","barsy.mobi","barsy.net","barsy.online","barsy.org","barsy.pro","barsy.pub","barsy.shop","barsy.site","barsy.support","barsy.uk","*.magentosite.cloud","mayfirst.info","mayfirst.org","hb.cldmail.ru","miniserver.com","memset.net","cloud.metacentrum.cz","custom.metacentrum.cz","flt.cloud.muni.cz","usr.cloud.muni.cz","meteorapp.com","eu.meteorapp.com","co.pl","azurecontainer.io","azurewebsites.net","azure-mobile.net","cloudapp.net","mozilla-iot.org","bmoattachments.org","net.ru","org.ru","pp.ru","ui.nabu.casa","pony.club","of.fashion","on.fashion","of.football","in.london","of.london","for.men","and.mom","for.mom","for.one","for.sale","of.work","to.work","nctu.me","bitballoon.com","netlify.com","4u.com","ngrok.io","nh-serv.co.uk","nfshost.com","dnsking.ch","mypi.co","n4t.co","001www.com","ddnslive.com","myiphost.com","forumz.info","16-b.it","32-b.it","64-b.it","soundcast.me","tcp4.me","dnsup.net","hicam.net","now-dns.net","ownip.net","vpndns.net","dynserv.org","now-dns.org","x443.pw","now-dns.top","ntdll.top","freeddns.us","crafting.xyz","zapto.xyz","nsupdate.info","nerdpol.ovh","blogsyte.com","brasilia.me","cable-modem.org","ciscofreak.com","collegefan.org","couchpotatofries.org","damnserver.com","ddns.me","ditchyourip.com","dnsfor.me","dnsiskinky.com","dvrcam.info","dynns.com","eating-organic.net","fantasyleague.cc","geekgalaxy.com","golffan.us","health-carereform.com","homesecuritymac.com","homesecuritypc.com","hopto.me","ilovecollege.info","loginto.me","mlbfan.org","mmafan.biz","myactivedirectory.com","mydissent.net","myeffect.net","mymediapc.net","mypsx.net","mysecuritycamera.com","mysecuritycamera.net","mysecuritycamera.org","net-freaks.com","nflfan.org","nhlfan.net","no-ip.ca","no-ip.co.uk","no-ip.net","noip.us","onthewifi.com","pgafan.net","point2this.com","pointto.us","privatizehealthinsurance.net","quicksytes.com","read-books.org","securitytactics.com","serveexchange.com","servehumour.com","servep2p.com","servesarcasm.com","stufftoread.com","ufcfan.org","unusualperson.com","workisboring.com","3utilities.com","bounceme.net","ddns.net","ddnsking.com","gotdns.ch","hopto.org","myftp.biz","myftp.org","myvnc.com","no-ip.biz","no-ip.info","no-ip.org","noip.me","redirectme.net","servebeer.com","serveblog.net","servecounterstrike.com","serveftp.com","servegame.com","servehalflife.com","servehttp.com","serveirc.com","serveminecraft.net","servemp3.com","servepics.com","servequake.com","sytes.net","webhop.me","zapto.org","stage.nodeart.io","nodum.co","nodum.io","pcloud.host","nyc.mn","nom.ae","nom.af","nom.ai","nom.al","nym.by","nym.bz","nom.cl","nom.gd","nom.ge","nom.gl","nym.gr","nom.gt","nym.gy","nom.hn","nym.ie","nom.im","nom.ke","nym.kz","nym.la","nym.lc","nom.li","nym.li","nym.lt","nym.lu","nym.me","nom.mk","nym.mn","nym.mx","nom.nu","nym.nz","nym.pe","nym.pt","nom.pw","nom.qa","nym.ro","nom.rs","nom.si","nym.sk","nom.st","nym.su","nym.sx","nom.tj","nym.tw","nom.ug","nom.uy","nom.vc","nom.vg","cya.gg","cloudycluster.net","nid.io","opencraft.hosting","operaunite.com","outsystemscloud.com","ownprovider.com","own.pm","ox.rs","oy.lc","pgfog.com","pagefrontapp.com","art.pl","gliwice.pl","krakow.pl","poznan.pl","wroc.pl","zakopane.pl","pantheonsite.io","gotpantheon.com","mypep.link","on-web.fr","*.platform.sh","*.platformsh.site","co.bn","xen.prgmr.com","priv.at","prvcy.page","*.dweb.link","protonet.io","chirurgiens-dentistes-en-france.fr","byen.site","instantcloud.cn","ras.ru","qa2.com","dev-myqnapcloud.com","alpha-myqnapcloud.com","myqnapcloud.com","*.quipelements.com","vapor.cloud","vaporcloud.io","rackmaze.com","rackmaze.net","*.on-rancher.cloud","*.on-rio.io","readthedocs.io","rhcloud.com","app.render.com","onrender.com","repl.co","repl.run","resindevice.io","devices.resinstaging.io","hzc.io","wellbeingzone.eu","ptplus.fit","wellbeingzone.co.uk","git-pages.rit.edu","sandcats.io","logoip.de","logoip.com","schokokeks.net","scrysec.com","firewall-gateway.com","firewall-gateway.de","my-gateway.de","my-router.de","spdns.de","spdns.eu","firewall-gateway.net","my-firewall.org","myfirewall.org","spdns.org","*.s5y.io","*.sensiosite.cloud","biz.ua","co.ua","pp.ua","shiftedit.io","myshopblocks.com","mo-siemens.io","1kapp.com","appchizi.com","applinzi.com","sinaapp.com","vipsinaapp.com","siteleaf.net","bounty-full.com","alpha.bounty-full.com","beta.bounty-full.com","stackhero-network.com","static.land","dev.static.land","sites.static.land","apps.lair.io","*.stolos.io","spacekit.io","customer.speedpartner.de","api.stdlib.com","storj.farm","utwente.io","soc.srcf.net","user.srcf.net","temp-dns.com","applicationcloud.io","scapp.io","syncloud.it","diskstation.me","dscloud.biz","dscloud.me","dscloud.mobi","dsmynas.com","dsmynas.net","dsmynas.org","familyds.com","familyds.net","familyds.org","i234.me","myds.me","synology.me","vpnplus.to","taifun-dns.de","gda.pl","gdansk.pl","gdynia.pl","med.pl","sopot.pl","edugit.org","telebit.app","telebit.io","*.telebit.xyz","gwiddle.co.uk","thingdustdata.com","cust.dev.thingdust.io","cust.disrec.thingdust.io","cust.prod.thingdust.io","cust.testing.thingdust.io","arvo.network","azimuth.network","bloxcms.com","townnews-staging.com","12hp.at","2ix.at","4lima.at","lima-city.at","12hp.ch","2ix.ch","4lima.ch","lima-city.ch","trafficplex.cloud","de.cool","12hp.de","2ix.de","4lima.de","lima-city.de","1337.pictures","clan.rip","lima-city.rocks","webspace.rocks","lima.zone","*.transurl.be","*.transurl.eu","*.transurl.nl","tuxfamily.org","dd-dns.de","diskstation.eu","diskstation.org","dray-dns.de","draydns.de","dyn-vpn.de","dynvpn.de","mein-vigor.de","my-vigor.de","my-wan.de","syno-ds.de","synology-diskstation.de","synology-ds.de","uber.space","*.uberspace.de","hk.com","hk.org","ltd.hk","inc.hk","virtualuser.de","virtual-user.de","lib.de.us","2038.io","router.management","v-info.info","voorloper.cloud","wafflecell.com","wedeploy.io","wedeploy.me","wedeploy.sh","remotewd.com","wmflabs.org","half.host","xnbay.com","u2.xnbay.com","u2-local.xnbay.com","cistron.nl","demon.nl","xs4all.space","official.academy","yolasite.com","ybo.faith","yombo.me","homelink.one","ybo.party","ybo.review","ybo.science","ybo.trade","nohost.me","noho.st","za.net","za.org","now.sh","bss.design","basicserver.io","virtualserver.io","site.builder.nu","enterprisecloud.nu","zone.id"]},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(707).Store,i=n(708).permuteDomain,o=n(709).pathMatch,s=n(13);function a(){r.call(this),this.idx={}}s.inherits(a,r),t.MemoryCookieStore=a,a.prototype.idx=null,a.prototype.synchronous=!0,a.prototype.inspect=function(){return"{ idx: "+s.inspect(this.idx,!1,2)+" }"},s.inspect.custom&&(a.prototype[s.inspect.custom]=a.prototype.inspect),a.prototype.findCookie=function(e,t,n,r){return this.idx[e]&&this.idx[e][t]?r(null,this.idx[e][t][n]||null):r(null,void 0)},a.prototype.findCookies=function(e,t,n){var r=[],s;if(!e)return n(null,[]);s=t?function e(n){Object.keys(n).forEach(function(e){if(o(t,e)){var i=n[e];for(var s in i)r.push(i[s])}})}:function e(t){for(var n in t){var i=t[n];for(var o in i)r.push(i[o])}};var a=i(e)||[e],u=this.idx;a.forEach(function(e){var t=u[e];t&&s(t)}),n(null,r)},a.prototype.putCookie=function(e,t){this.idx[e.domain]||(this.idx[e.domain]={}),this.idx[e.domain][e.path]||(this.idx[e.domain][e.path]={}),this.idx[e.domain][e.path][e.key]=e,t(null)},a.prototype.updateCookie=function(e,t,n){this.putCookie(t,n)},a.prototype.removeCookie=function(e,t,n,r){this.idx[e]&&this.idx[e][t]&&this.idx[e][t][n]&&delete this.idx[e][t][n],r(null)},a.prototype.removeCookies=function(e,t,n){return this.idx[e]&&(t?delete this.idx[e][t]:delete this.idx[e]),n(null)},a.prototype.getAllCookies=function(e){var t=[],n=this.idx,r=Object.keys(n);r.forEach(function(e){var r=Object.keys(n[e]);r.forEach(function(r){var i=Object.keys(n[e][r]);i.forEach(function(i){null!==i&&t.push(n[e][r][i])})})}),t.sort(function(e,t){return(e.creationIndex||0)-(t.creationIndex||0)}),e(null,t)}},function(e){e.exports={author:{name:"Jeremy Stashewsky",email:"jstash@gmail.com",website:"https://github.com/stash"},contributors:[{name:"Alexander Savin",website:"https://github.com/apsavin"},{name:"Ian Livingstone",website:"https://github.com/ianlivingstone"},{name:"Ivan Nikulin",website:"https://github.com/inikulin"},{name:"Lalit Kapoor",website:"https://github.com/lalitkapoor"},{name:"Sam Thompson",website:"https://github.com/sambthompson"},{name:"Sebastian Mayr",website:"https://github.com/Sebmaster"}],license:"BSD-3-Clause",name:"tough-cookie",description:"RFC6265 Cookies and Cookie Jar for node.js",keywords:["HTTP","cookie","cookies","set-cookie","cookiejar","jar","RFC6265","RFC2965"],version:"2.4.3",homepage:"https://github.com/salesforce/tough-cookie",repository:{type:"git",url:"git://github.com/salesforce/tough-cookie.git"},bugs:{url:"https://github.com/salesforce/tough-cookie/issues"},main:"./lib/cookie",files:["lib"],scripts:{test:"vows test/*_test.js",cover:"nyc --reporter=lcov --reporter=html vows test/*_test.js"},engines:{node:">=0.8"},devDependencies:{async:"^1.4.2",nyc:"^11.6.0","string.prototype.repeat":"^0.2.0",vows:"^0.8.1"},dependencies:{psl:"^1.1.24",punycode:"^1.4.1"}}},function(e,t,n){"use strict";(function(t){var r=n(154),i=n(202),o=n(32),s=n(13),a=n(57),u=n(1838),l=n(1848),c=n(1849),f=n(1851),h=n(1868),p=n(382),d=n(1871),m=n(1872),g=n(374),y=n(718),b=n(566).strict,v=n(375),w=n(704),_=n(1873),k=n(1874).Querystring,S=n(1877).Har,E=n(1933).Auth,x=n(1934).OAuth,C=n(1936),A=n(1937).Multipart,I=n(1940).Redirect,T=n(1941).Tunnel,j=n(1943),O=n(4).Buffer,P=v.safeStringify,B=v.isReadStream,R=v.toBase64,N=v.defer,M=v.copy,L=v.version,F=w.jar(),D={};function U(e,t){var n={};for(var r in t){var i=-1===e.indexOf(r);i&&(n[r]=t[r])}return n}function z(e,t){var n={};for(var r in t){var i=!(-1===e.indexOf(r)),o="function"==typeof t[r];i&&o||(n[r]=t[r])}return n}function q(){var e=this;return{uri:this.uri,method:this.method,headers:this.headers}}function K(){var e=this;return{statusCode:this.statusCode,body:this.body,headers:this.headers,request:q.call(this.request)}}function H(e){var t=this;e.har&&(this._har=new S(this),e=this._har.options(e)),a.Stream.call(this);var n=Object.keys(H.prototype),r=U(n,e);g(this,r),e=z(n,e),this.readable=!0,this.writable=!0,e.method&&(this.explicitMethod=!0),this._qs=new k(this),this._auth=new E(this),this._oauth=new x(this),this._multipart=new A(this),this._redirect=new I(this),this._tunnel=new T(this),this.init(e)}function V(){H.debug&&console.error("REQUEST %s",s.format.apply(s,arguments))}s.inherits(H,a.Stream),H.debug=t.env.NODE_DEBUG&&/\brequest\b/.test(t.env.NODE_DEBUG),H.prototype.debug=V,H.prototype.init=function(e){var t=this;for(var n in e||(e={}),t.headers=t.headers?M(t.headers):{},t.headers)void 0===t.headers[n]&&delete t.headers[n];if(p.httpify(t,t.headers),t.method||(t.method=e.method||"GET"),t.localAddress||(t.localAddress=e.localAddress),t._qs.init(e),V(e),t.pool||!1===t.pool||(t.pool=D),t.dests=t.dests||[],t.__isRequestRequest=!0,!t._callback&&t.callback&&(t._callback=t.callback,t.callback=function(){t._callbackCalled||(t._callbackCalled=!0,t._callback.apply(t,arguments))},t.on("error",t.callback.bind()),t.on("complete",t.callback.bind(t,null))),!t.uri&&t.url&&(t.uri=t.url,delete t.url),t.baseUrl){if("string"!=typeof t.baseUrl)return t.emit("error",new Error("options.baseUrl must be a string"));if("string"!=typeof t.uri)return t.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(0===t.uri.indexOf("//")||-1!==t.uri.indexOf("://"))return t.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var s=t.baseUrl.lastIndexOf("/")===t.baseUrl.length-1,a=0===t.uri.indexOf("/");s&&a?t.uri=t.baseUrl+t.uri.slice(1):s||a?t.uri=t.baseUrl+t.uri:""===t.uri?t.uri=t.baseUrl:t.uri=t.baseUrl+"/"+t.uri,delete t.baseUrl}if(!t.uri)return t.emit("error",new Error("options.uri is a required argument"));if("string"==typeof t.uri&&(t.uri=o.parse(t.uri)),t.uri.href||(t.uri.href=o.format(t.uri)),"unix:"===t.uri.protocol)return t.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if("unix"===t.uri.host&&t.enableUnixSocket(),!1===t.strictSSL&&(t.rejectUnauthorized=!1),t.uri.pathname||(t.uri.pathname="/"),!(t.uri.host||t.uri.hostname&&t.uri.port||t.uri.isUnix)){var u=o.format(t.uri),l='Invalid URI "'+u+'"';return 0===Object.keys(e).length&&(l+=". This can be caused by a crappy redirection."),t.abort(),t.emit("error",new Error(l))}if(t.hasOwnProperty("proxy")||(t.proxy=_(t.uri)),t.tunnel=t._tunnel.isEnabled(),t.proxy&&t._tunnel.setup(e),t._redirect.onRequest(e),t.setHost=!1,!t.hasHeader("host")){var c=t.originalHostHeaderName||"host";t.setHeader(c,t.uri.host),t.uri.port&&("80"===t.uri.port&&"http:"===t.uri.protocol||"443"===t.uri.port&&"https:"===t.uri.protocol)&&t.setHeader(c,t.uri.hostname),t.setHost=!0}if(t.jar(t._jar||e.jar),t.uri.port||("http:"===t.uri.protocol?t.uri.port=80:"https:"===t.uri.protocol&&(t.uri.port=443)),t.proxy&&!t.tunnel?(t.port=t.proxy.port,t.host=t.proxy.hostname):(t.port=t.uri.port,t.host=t.uri.hostname),e.form&&t.form(e.form),e.formData){var f=e.formData,m=t.form(),g=function(e,t){t&&t.hasOwnProperty("value")&&t.hasOwnProperty("options")?m.append(e,t.value,t.options):m.append(e,t)};for(var v in f)if(f.hasOwnProperty(v)){var w=f[v];if(w instanceof Array)for(var k=0;k<w.length;k++)g(v,w[k]);else g(v,w)}}if(e.qs&&t.qs(e.qs),t.uri.path?t.path=t.uri.path:t.path=t.uri.pathname+(t.uri.search||""),0===t.path.length&&(t.path="/"),e.aws&&t.aws(e.aws),e.hawk&&t.hawk(e.hawk),e.httpSignature&&t.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),t.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),t.gzip&&!t.hasHeader("accept-encoding")&&t.setHeader("accept-encoding","gzip, deflate"),t.uri.auth&&!t.hasHeader("authorization")){var S=t.uri.auth.split(":").map(function(e){return t._qs.unescape(e)});t.auth(S[0],S.slice(1).join(":"),!0)}if(!t.tunnel&&t.proxy&&t.proxy.auth&&!t.hasHeader("proxy-authorization")){var E=t.proxy.auth.split(":").map(function(e){return t._qs.unescape(e)}),x="Basic "+R(E.join(":"));t.setHeader("proxy-authorization",x)}function C(){var e;(b(t.body)&&(t.body=O.from(t.body)),t.hasHeader("content-length"))||(e="string"==typeof t.body?O.byteLength(t.body):Array.isArray(t.body)?t.body.reduce(function(e,t){return e+t.length},0):t.body.length,e?t.setHeader("content-length",e):t.emit("error",new Error("Argument error, options.body.")))}t.proxy&&!t.tunnel&&(t.path=t.uri.protocol+"//"+t.uri.host+t.path),e.json&&t.json(e.json),e.multipart&&t.multipart(e.multipart),e.time&&(t.timing=!0,t.elapsedTime=t.elapsedTime||0),t.body&&!y(t.body)&&C(),e.oauth?t.oauth(e.oauth):t._oauth.params&&t.hasHeader("authorization")&&t.oauth(t._oauth.params);var A=t.proxy&&!t.tunnel?t.proxy.protocol:t.uri.protocol,I={"http:":r,"https:":i},T=t.httpModules||{};if(t.httpModule=T[A]||I[A],!t.httpModule)return t.emit("error",new Error("Invalid protocol: "+A));if(e.ca&&(t.ca=e.ca),!t.agent)if(e.agentOptions&&(t.agentOptions=e.agentOptions),e.agentClass)t.agentClass=e.agentClass;else if(e.forever){var j=L();0===j.major&&j.minor<=10?t.agentClass="http:"===A?d:d.SSL:(t.agentClass=t.httpModule.Agent,t.agentOptions=t.agentOptions||{},t.agentOptions.keepAlive=!0)}else t.agentClass=t.httpModule.Agent;!1===t.pool?t.agent=!1:t.agent=t.agent||t.getNewAgent(),t.on("pipe",function(e){if(t.ntick&&t._started&&t.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),t.src=e,B(e))t.hasHeader("content-type")||t.setHeader("content-type",h.lookup(e.path));else{if(e.headers)for(var n in e.headers)t.hasHeader(n)||t.setHeader(n,e.headers[n]);t._json&&!t.hasHeader("content-type")&&t.setHeader("content-type","application/json"),e.method&&!t.explicitMethod&&(t.method=e.method)}}),N(function(){if(!t._aborted){var e=function(){if(t._form&&(t._auth.hasAuth?t._auth.hasAuth&&t._auth.sentAuth&&t._form.pipe(t):t._form.pipe(t)),t._multipart&&t._multipart.chunked&&t._multipart.body.pipe(t),t.body)y(t.body)?t.body.pipe(t):(C(),Array.isArray(t.body)?t.body.forEach(function(e){t.write(e)}):t.write(t.body),t.end());else if(t.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),t.requestBodyStream.pipe(t);else if(!t.src){if(t._auth.hasAuth&&!t._auth.sentAuth)return void t.end();"GET"!==t.method&&void 0!==t.method&&t.setHeader("content-length",0),t.end()}};t._form&&!t.hasHeader("content-length")?(t.setHeader(t._form.getHeaders(),!0),t._form.getLength(function(n,r){n||isNaN(r)||t.setHeader("content-length",r),e()})):e(),t.ntick=!0}})},H.prototype.getNewAgent=function(){var e=this,t=this.agentClass,n={};if(this.agentOptions)for(var r in this.agentOptions)n[r]=this.agentOptions[r];this.ca&&(n.ca=this.ca),this.ciphers&&(n.ciphers=this.ciphers),this.secureProtocol&&(n.secureProtocol=this.secureProtocol),this.secureOptions&&(n.secureOptions=this.secureOptions),void 0!==this.rejectUnauthorized&&(n.rejectUnauthorized=this.rejectUnauthorized),this.cert&&this.key&&(n.key=this.key,n.cert=this.cert),this.pfx&&(n.pfx=this.pfx),this.passphrase&&(n.passphrase=this.passphrase);var i="";t!==this.httpModule.Agent&&(i+=t.name);var s=this.proxy;"string"==typeof s&&(s=o.parse(s));var a=s&&"https:"===s.protocol||"https:"===this.uri.protocol;return a&&(n.ca&&(i&&(i+=":"),i+=n.ca),void 0!==n.rejectUnauthorized&&(i&&(i+=":"),i+=n.rejectUnauthorized),n.cert&&(i&&(i+=":"),i+=n.cert.toString("ascii")+n.key.toString("ascii")),n.pfx&&(i&&(i+=":"),i+=n.pfx.toString("ascii")),n.ciphers&&(i&&(i+=":"),i+=n.ciphers),n.secureProtocol&&(i&&(i+=":"),i+=n.secureProtocol),n.secureOptions&&(i&&(i+=":"),i+=n.secureOptions)),this.pool===D&&!i&&0===Object.keys(n).length&&this.httpModule.globalAgent?this.httpModule.globalAgent:(i=this.uri.protocol+i,this.pool[i]||(this.pool[i]=new t(n),this.pool.maxSockets&&(this.pool[i].maxSockets=this.pool.maxSockets)),this.pool[i])},H.prototype.start=function(){var e=this;if(e.timing)var t=(new Date).getTime(),n=j();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var r=M(e),i;delete r.auth,V("make request",e.uri.href),delete r.timeout;try{e.req=e.httpModule.request(r)}catch(t){return void e.emit("error",t)}e.timing&&(e.startTime=t,e.startTimeNow=n,e.timings={}),e.timeout&&!e.timeoutTimer&&(e.timeout<0?i=0:"number"==typeof e.timeout&&isFinite(e.timeout)&&(i=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(t){var n=t._connecting||t.connecting;if(e.timing&&(e.timings.socket=j()-e.startTimeNow,n)){var r=function(){e.timings.lookup=j()-e.startTimeNow},o=function(){e.timings.connect=j()-e.startTimeNow};t.once("lookup",r),t.once("connect",o),e.req.once("error",function(){t.removeListener("lookup",r),t.removeListener("connect",o)})}var s=function(){e.req.setTimeout(i,function(){if(e.req){e.abort();var t=new Error("ESOCKETTIMEDOUT");t.code="ESOCKETTIMEDOUT",t.connect=!1,e.emit("error",t)}})};if(void 0!==i)if(n){var a=function(){t.removeListener("connect",a),clearTimeout(e.timeoutTimer),e.timeoutTimer=null,s()};t.on("connect",a),e.req.on("error",function(e){t.removeListener("connect",a)}),e.timeoutTimer=setTimeout(function(){t.removeListener("connect",a),e.abort();var n=new Error("ETIMEDOUT");n.code="ETIMEDOUT",n.connect=!0,e.emit("error",n)},i)}else s();e.emit("socket",t)}),e.emit("request",e.req)}},H.prototype.onRequestError=function(e){var t=this;if(!this._aborted){if(this.req&&this.req._reusedSocket&&"ECONNRESET"===e.code&&this.agent.addRequestNoreuse)return this.agent={addRequest:this.agent.addRequestNoreuse.bind(this.agent)},this.start(),void this.req.end();this.timeout&&this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null),this.emit("error",e)}},H.prototype.onRequestResponse=function(e){var t=this;if(t.timing&&(t.timings.response=j()-t.startTimeNow),V("onRequestResponse",t.uri.href,e.statusCode,e.headers),e.on("end",function(){t.timing&&(t.timings.end=j()-t.startTimeNow,e.timingStart=t.startTime,t.timings.socket||(t.timings.socket=0),t.timings.lookup||(t.timings.lookup=t.timings.socket),t.timings.connect||(t.timings.connect=t.timings.lookup),t.timings.response||(t.timings.response=t.timings.connect),V("elapsed time",t.timings.end),t.elapsedTime+=Math.round(t.timings.end),e.elapsedTime=t.elapsedTime,e.timings=t.timings,e.timingPhases={wait:t.timings.socket,dns:t.timings.lookup-t.timings.socket,tcp:t.timings.connect-t.timings.lookup,firstByte:t.timings.response-t.timings.connect,download:t.timings.end-t.timings.response,total:t.timings.end}),V("response end",t.uri.href,e.statusCode,e.headers)}),t._aborted)return V("aborted",t.uri.href),void e.resume();if(t.response=e,e.request=t,e.toJSON=K,t.httpModule!==i||!t.strictSSL||e.hasOwnProperty("socket")&&e.socket.authorized){t.originalHost=t.getHeader("host"),t.originalHostHeaderName||(t.originalHostHeaderName=t.hasHeader("host")),t.setHost&&t.removeHeader("host"),t.timeout&&t.timeoutTimer&&(clearTimeout(t.timeoutTimer),t.timeoutTimer=null);var n=t._jar&&t._jar.setCookie?t._jar:F,r=function(e){try{n.setCookie(e,t.uri.href,{ignoreError:!0})}catch(e){t.emit("error",e)}};if(e.caseless=p(e.headers),e.caseless.has("set-cookie")&&!t._disableCookies){var o=e.caseless.has("set-cookie");Array.isArray(e.headers[o])?e.headers[o].forEach(r):r(e.headers[o])}if(!t._redirect.onResponse(e)){e.on("close",function(){t._ended||t.response.emit("end")}),e.once("end",function(){t._ended=!0});var s=function(e){return"HEAD"===t.method||e>=100&&e<200||204===e||304===e},a;if(t.gzip&&!s(e.statusCode)){var l=e.headers["content-encoding"]||"identity";l=l.trim().toLowerCase();var c={flush:u.Z_SYNC_FLUSH,finishFlush:u.Z_SYNC_FLUSH};"gzip"===l?(a=u.createGunzip(c),e.pipe(a)):"deflate"===l?(a=u.createInflate(c),e.pipe(a)):("identity"!==l&&V("ignoring unrecognized Content-Encoding "+l),a=e)}else a=e;t.encoding&&(0!==t.dests.length?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):a.setEncoding(t.encoding)),t._paused&&a.pause(),t.responseContent=a,t.emit("response",e),t.dests.forEach(function(e){t.pipeDest(e)}),a.on("data",function(n){t.timing&&!t.responseStarted&&(t.responseStartTime=(new Date).getTime(),e.responseStartTime=t.responseStartTime),t._destdata=!0,t.emit("data",n)}),a.once("end",function(e){t.emit("end",e)}),a.on("error",function(e){t.emit("error",e)}),a.on("close",function(){t.emit("close")}),t.callback?t.readResponseBody(e):t.on("end",function(){t._aborted?V("aborted",t.uri.href):t.emit("complete",e)}),V("finish init function",t.uri.href)}}else{V("strict ssl error",t.uri.href);var f=e.hasOwnProperty("socket")?e.socket.authorizationError:t.uri.href+" does not support SSL";t.emit("error",new Error("SSL Error: "+f))}},H.prototype.readResponseBody=function(e){var t=this;V("reading response's body");var n=[],r=0,i=[];t.on("data",function(e){O.isBuffer(e)?e.length&&(r+=e.length,n.push(e)):i.push(e)}),t.on("end",function(){if(V("end event",t.uri.href),t._aborted)return V("aborted",t.uri.href),n=[],void(r=0);if(r?(V("has body",t.uri.href,r),e.body=O.concat(n,r),null!==t.encoding&&(e.body=e.body.toString(t.encoding)),n=[],r=0):i.length&&("utf8"===t.encoding&&i[0].length>0&&"\ufeff"===i[0][0]&&(i[0]=i[0].substring(1)),e.body=i.join("")),t._json)try{e.body=JSON.parse(e.body,t._jsonReviver)}catch(e){V("invalid JSON received",t.uri.href)}V("emitting complete",t.uri.href),void 0!==e.body||t._json||(e.body=null===t.encoding?O.alloc(0):""),t.emit("complete",e,e.body)})},H.prototype.abort=function(){var e=this;this._aborted=!0,this.req?this.req.abort():this.response&&this.response.destroy(),this.emit("abort")},H.prototype.pipeDest=function(e){var t=this,n=this.response;if(e.headers&&!e.headersSent){if(n.caseless.has("content-type")){var r=n.caseless.has("content-type");e.setHeader?e.setHeader(r,n.headers[r]):e.headers[r]=n.headers[r]}if(n.caseless.has("content-length")){var i=n.caseless.has("content-length");e.setHeader?e.setHeader(i,n.headers[i]):e.headers[i]=n.headers[i]}}if(e.setHeader&&!e.headersSent){for(var o in n.headers)this.gzip&&"content-encoding"===o||e.setHeader(o,n.headers[o]);e.statusCode=n.statusCode}this.pipefilter&&this.pipefilter(n,e)},H.prototype.qs=function(e,t){var n=this,r;for(var i in r=!t&&this.uri.query?this._qs.parse(this.uri.query):{},e)r[i]=e[i];var s=this._qs.stringify(r);return""===s?this:(this.uri=o.parse(this.uri.href.split("?")[0]+"?"+s),this.url=this.uri,this.path=this.uri.path,"unix"===this.uri.host&&this.enableUnixSocket(),this)},H.prototype.form=function(e){var t=this;return e?(/^application\/x-www-form-urlencoded\b/.test(t.getHeader("content-type"))||t.setHeader("content-type","application/x-www-form-urlencoded"),t.body="string"==typeof e?t._qs.rfc3986(e.toString("utf8")):t._qs.stringify(e).toString("utf8"),t):(t._form=new m,t._form.on("error",function(e){e.message="form-data: "+e.message,t.emit("error",e),t.abort()}),t._form)},H.prototype.multipart=function(e){var t=this;return this._multipart.onRequest(e),this._multipart.chunked||(this.body=this._multipart.body),this},H.prototype.json=function(e){var t=this;return this.hasHeader("accept")||this.setHeader("accept","application/json"),"function"==typeof this.jsonReplacer&&(this._jsonReplacer=this.jsonReplacer),this._json=!0,"boolean"==typeof e?void 0!==this.body&&(/^application\/x-www-form-urlencoded\b/.test(this.getHeader("content-type"))?this.body=this._qs.rfc3986(this.body):this.body=P(this.body,this._jsonReplacer),this.hasHeader("content-type")||this.setHeader("content-type","application/json")):(this.body=P(e,this._jsonReplacer),this.hasHeader("content-type")||this.setHeader("content-type","application/json")),"function"==typeof this.jsonReviver&&(this._jsonReviver=this.jsonReviver),this},H.prototype.getHeader=function(e,t){var n=this,r,i,o;return t||(t=this.headers),Object.keys(t).forEach(function(n){n.length===e.length&&(i=new RegExp(e,"i"),o=n.match(i),o&&(r=t[n]))}),r},H.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),t=e[0],n=e[1];this.socketPath=t,this.uri.pathname=n,this.uri.path=n,this.uri.host=t,this.uri.hostname=t,this.uri.isUnix=!0},H.prototype.auth=function(e,t,n,r){var i=this;return this._auth.onRequest(e,t,n,r),this},H.prototype.aws=function(e,t){var n=this;if(!t)return this._aws=e,this;if(4===e.sign_version||"4"===e.sign_version){var r={host:this.uri.host,path:this.uri.path,method:this.method,headers:this.headers,body:this.body};e.service&&(r.service=e.service);var i=c.sign(r,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});this.setHeader("authorization",i.headers.Authorization),this.setHeader("x-amz-date",i.headers["X-Amz-Date"]),i.headers["X-Amz-Security-Token"]&&this.setHeader("x-amz-security-token",i.headers["X-Amz-Security-Token"])}else{var o=new Date;this.setHeader("date",o.toUTCString());var s={key:e.key,secret:e.secret,verb:this.method.toUpperCase(),date:o,contentType:this.getHeader("content-type")||"",md5:this.getHeader("content-md5")||"",amazonHeaders:l.canonicalizeHeaders(this.headers)},a=this.uri.path;e.bucket&&a?s.resource="/"+e.bucket+a:e.bucket&&!a?s.resource="/"+e.bucket:!e.bucket&&a?s.resource=a:e.bucket||a||(s.resource="/"),s.resource=l.canonicalizeResource(s.resource),this.setHeader("authorization",l.authorization(s))}return this},H.prototype.httpSignature=function(e){var t=this;return f.signRequest({getHeader:function(e){return t.getHeader(e,t.headers)},setHeader:function(e,n){t.setHeader(e,n)},method:t.method,path:t.path},e),V("httpSignature authorization",t.getHeader("authorization")),t},H.prototype.hawk=function(e){var t=this;this.setHeader("Authorization",C.header(this.uri,this.method,e))},H.prototype.oauth=function(e){var t=this;return this._oauth.onRequest(e),this},H.prototype.jar=function(e){var t=this,n;if(0===this._redirect.redirectsFollowed&&(this.originalCookieHeader=this.getHeader("cookie")),e){var r=e&&e.getCookieString?e:F,i=this.uri.href;r&&(n=r.getCookieString(i))}else n=!1,this._disableCookies=!0;return n&&n.length&&(this.originalCookieHeader?this.setHeader("cookie",this.originalCookieHeader+"; "+n):this.setHeader("cookie",n)),this._jar=e,this},H.prototype.pipe=function(e,t){var n=this;if(!this.response)return this.dests.push(e),a.Stream.prototype.pipe.call(this,e,t),e;if(this._destdata)this.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else{if(!this._ended)return a.Stream.prototype.pipe.call(this,e,t),this.pipeDest(e),e;this.emit("error",new Error("You cannot pipe after the response has been ended."))}},H.prototype.write=function(){var e=this;if(!this._aborted)return this._started||this.start(),this.req?this.req.write.apply(this.req,arguments):void 0},H.prototype.end=function(e){var t=this;this._aborted||(e&&this.write(e),this._started||this.start(),this.req&&this.req.end())},H.prototype.pause=function(){var e=this;this.responseContent?this.responseContent.pause.apply(this.responseContent,arguments):this._paused=!0},H.prototype.resume=function(){var e=this;this.responseContent?this.responseContent.resume.apply(this.responseContent,arguments):this._paused=!1},H.prototype.destroy=function(){var e=this;this._ended?this.response&&this.response.destroy():this.end()},H.defaultProxyHeaderWhiteList=T.defaultProxyHeaderWhiteList.slice(),H.defaultProxyHeaderExclusiveList=T.defaultProxyHeaderExclusiveList.slice(),H.prototype.toJSON=q,e.exports=H}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(0).Buffer,i=n(57).Transform,o=n(1839),s=n(13),a=n(18).ok,u=n(0).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(o),f=0;f<c.length;f++){var h=c[f];h.match(/^Z/)&&Object.defineProperty(t,h,{enumerable:!0,value:o[h],writable:!1})}for(var p={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},d=Object.keys(p),m=0;m<d.length;m++){var g=d[m];p[p[g]]=g}function y(e,t,n){var i=[],o=0;function s(){for(var t;null!==(t=e.read());)i.push(t),o+=t.length;e.once("readable",s)}function a(t){e.removeListener("end",c),e.removeListener("readable",s),n(t)}function c(){var t,s=null;o>=u?s=new RangeError(l):t=r.concat(i,o),i=[],e.close(),n(s,t)}e.on("error",a),e.on("end",c),e.end(t),s()}function b(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var n=e._finishFlushFlag;return e._processChunk(t,n)}function v(e){if(!(this instanceof v))return new v(e);A.call(this,e,o.DEFLATE)}function w(e){if(!(this instanceof w))return new w(e);A.call(this,e,o.INFLATE)}function _(e){if(!(this instanceof _))return new _(e);A.call(this,e,o.GZIP)}function k(e){if(!(this instanceof k))return new k(e);A.call(this,e,o.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);A.call(this,e,o.DEFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);A.call(this,e,o.INFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);A.call(this,e,o.UNZIP)}function C(e){return e===o.Z_NO_FLUSH||e===o.Z_PARTIAL_FLUSH||e===o.Z_SYNC_FLUSH||e===o.Z_FULL_FLUSH||e===o.Z_FINISH||e===o.Z_BLOCK}function A(e,n){var s=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!C(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:o.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(n);var a=this;this._hadError=!1,this._handle.onerror=function(e,n){I(a),a._hadError=!0;var r=new Error(e);r.errno=n,r.code=t.codes[n],a.emit("error",r)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var l=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(l=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,l,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function I(t,n){n&&e.nextTick(n),t._handle&&(t._handle.close(),t._handle=null)}function T(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=v,t.Inflate=w,t.Gzip=_,t.Gunzip=k,t.DeflateRaw=S,t.InflateRaw=E,t.Unzip=x,t.createDeflate=function(e){return new v(e)},t.createInflate=function(e){return new w(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new E(e)},t.createGzip=function(e){return new _(e)},t.createGunzip=function(e){return new k(e)},t.createUnzip=function(e){return new x(e)},t.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new v(t),e,n)},t.deflateSync=function(e,t){return b(new v(t),e)},t.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new _(t),e,n)},t.gzipSync=function(e,t){return b(new _(t),e)},t.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new S(t),e,n)},t.deflateRawSync=function(e,t){return b(new S(t),e)},t.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new x(t),e,n)},t.unzipSync=function(e,t){return b(new x(t),e)},t.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new w(t),e,n)},t.inflateSync=function(e,t){return b(new w(t),e)},t.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new k(t),e,n)},t.gunzipSync=function(e,t){return b(new k(t),e)},t.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new E(t),e,n)},t.inflateRawSync=function(e,t){return b(new E(t),e)},s.inherits(A,i),A.prototype.params=function(n,r,i){if(n<t.Z_MIN_LEVEL||n>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+n);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==n||this._strategy!==r){var s=this;this.flush(o.Z_SYNC_FLUSH,function(){a(s._handle,"zlib binding closed"),s._handle.params(n,r),s._hadError||(s._level=n,s._strategy=r,i&&i())})}else e.nextTick(i)},A.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},A.prototype.flush=function(t,n){var i=this,s=this._writableState;("function"==typeof t||void 0===t&&!n)&&(n=t,t=o.Z_FULL_FLUSH),s.ended?n&&e.nextTick(n):s.ending?n&&this.once("end",n):s.needDrain?n&&this.once("drain",function(){return i.flush(t,n)}):(this._flushFlag=t,this.write(r.alloc(0),"",n))},A.prototype.close=function(t){I(this,t),e.nextTick(T,this)},A.prototype._transform=function(e,t,n){var i,s=this._writableState,a=s.ending||s.ended,u=a&&(!e||s.length===e.length);return null===e||r.isBuffer(e)?this._handle?(u?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(e,i,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},A.prototype._processChunk=function(e,t,n){var i=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,f="function"==typeof n;if(!f){var h=[],p=0,d;this.on("error",function(e){d=e}),a(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,s,i,this._buffer,this._offset,o)}while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw d;if(p>=u)throw I(this),new RangeError(l);var g=r.concat(h,p);return I(this),g}a(this._handle,"zlib binding closed");var y=this._handle.write(t,e,s,i,this._buffer,this._offset,o);function b(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var d=o-l;if(a(d>=0,"have should not go down"),d>0){var m=c._buffer.slice(c._offset,c._offset+d);c._offset+=d,f?c.push(m):(h.push(m),p+=m.length)}if((0===l||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=r.allocUnsafe(c._chunkSize)),0===l){if(s+=i-u,i=u,!f)return!0;var g=c._handle.write(t,e,s,i,c._buffer,c._offset,c._chunkSize);return g.callback=b,void(g.buffer=e)}if(!f)return!1;n()}}y.buffer=e,y.callback=b},s.inherits(v,A),s.inherits(w,A),s.inherits(_,A),s.inherits(k,A),s.inherits(S,A),s.inherits(E,A),s.inherits(x,A)}).call(this,n(2))},function(e,t,n){"use strict";(function(e,r){var i=n(18),o=n(1840),s=n(1841),a=n(1844),u=n(1847);for(var l in u)t[l]=u[l];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;var c=31,f=139;function h(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}h.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||a.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},h.prototype.write=function(e,t,n,r,i,o,s){return this._write(!0,e,t,n,r,i,o,s)},h.prototype.writeSync=function(e,t,n,r,i,o,s){return this._write(!1,e,t,n,r,i,o,s)},h.prototype._write=function(n,o,s,a,u,l,c,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==t.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==t.Z_NO_FLUSH&&o!==t.Z_PARTIAL_FLUSH&&o!==t.Z_SYNC_FLUSH&&o!==t.Z_FULL_FLUSH&&o!==t.Z_FINISH&&o!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=e.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=f,this.strm.output=l,this.strm.next_out=c,this.flush=o,!n)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return r.nextTick(function(){h._process(),h._after()}),this},h.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},h.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},h.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},h.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},h.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},h.prototype.init=function(e,n,r,o,s){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(n>=-1&&n<=9,"invalid compression level"),i(r>=1&&r<=9,"invalid memlevel"),i(o===t.Z_FILTERED||o===t.Z_HUFFMAN_ONLY||o===t.Z_RLE||o===t.Z_FIXED||o===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(n,e,r,o,s),this._setDictionary()},h.prototype.params=function(){throw new Error("deflateParams Not supported")},h.prototype.reset=function(){this._reset(),this._setDictionary()},h.prototype._init=function(e,n,r,i,u){switch(this.level=e,this.windowBits=n,this.memLevel=r,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},h.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},h.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=h}).call(this,n(0).Buffer,n(2))},function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=r},function(e,t,n){"use strict";var r=n(284),i=n(1842),o=n(710),s=n(711),a=n(1843),u=0,l=1,c=3,f=4,h=5,p=0,d=1,m=-2,g=-3,y=-5,b=-1,v=1,w=2,_=3,k=4,S=0,E=2,x=8,C=9,A=15,I=8,T=29,j=256,O=286,P=30,B=19,R=2*O+1,N=15,M=3,L=258,F=L+M+1,D=32,U=42,z=69,q=73,K=91,H=103,V=113,W=666,$=1,G=2,Y=3,J=4,Z=3,X;function Q(e,t){return e.msg=a[t],t}function ee(e){return(e<<1)-(e>4?9:0)}function te(e){for(var t=e.length;--t>=0;)e[t]=0}function ne(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function re(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ne(e.strm)}function ie(e,t){e.pending_buf[e.pending++]=t}function oe(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function se(e,t,n,i){var a=e.avail_in;return a>i&&(a=i),0===a?0:(e.avail_in-=a,r.arraySet(t,e.input,e.next_in,a,n),1===e.state.wrap?e.adler=o(e.adler,t,a,n):2===e.state.wrap&&(e.adler=s(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)}function ae(e,t){var n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-F?e.strstart-(e.w_size-F):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+L,p=l[r+s-1],d=l[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do{if(i=t,l[i+s]===d&&l[i+s-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=L-(h-r),r=h-L,o>s){if(e.match_start=t,s=o,o>=a)break;p=l[r+s-1],d=l[r+s]}}}while((t=f[t&c])>u&&0!=--n);return s<=e.lookahead?s:e.lookahead}function ue(e){var t=e.w_size,n,i,o,s,a;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-F)){r.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,n=i;do{o=e.head[--n],e.head[n]=o>=t?o-t:0}while(--i);i=t,n=i;do{o=e.prev[--n],e.prev[n]=o>=t?o-t:0}while(--i);s+=t}if(0===e.strm.avail_in)break;if(i=se(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=i,e.lookahead+e.insert>=M)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+M-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<M)););}while(e.lookahead<F&&0!==e.strm.avail_in)}function le(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ue(e),0===e.lookahead&&t===u)return $;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,re(e,!1),0===e.strm.avail_out))return $;if(e.strstart-e.block_start>=e.w_size-F&&(re(e,!1),0===e.strm.avail_out))return $}return e.insert=0,t===f?(re(e,!0),0===e.strm.avail_out?Y:J):(e.strstart>e.block_start&&(re(e,!1),e.strm.avail_out),$)}function ce(e,t){for(var n,r;;){if(e.lookahead<F){if(ue(e),e.lookahead<F&&t===u)return $;if(0===e.lookahead)break}if(n=0,e.lookahead>=M&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-F&&(e.match_length=ae(e,n)),e.match_length>=M)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-M),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=M){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(re(e,!1),0===e.strm.avail_out))return $}return e.insert=e.strstart<M-1?e.strstart:M-1,t===f?(re(e,!0),0===e.strm.avail_out?Y:J):e.last_lit&&(re(e,!1),0===e.strm.avail_out)?$:G}function fe(e,t){for(var n,r,o;;){if(e.lookahead<F){if(ue(e),e.lookahead<F&&t===u)return $;if(0===e.lookahead)break}if(n=0,e.lookahead>=M&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=M-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-F&&(e.match_length=ae(e,n),e.match_length<=5&&(e.strategy===v||e.match_length===M&&e.strstart-e.match_start>4096)&&(e.match_length=M-1)),e.prev_length>=M&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-M,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-M),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=M-1,e.strstart++,r&&(re(e,!1),0===e.strm.avail_out))return $}else if(e.match_available){if(r=i._tr_tally(e,0,e.window[e.strstart-1]),r&&re(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return $}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<M-1?e.strstart:M-1,t===f?(re(e,!0),0===e.strm.avail_out?Y:J):e.last_lit&&(re(e,!1),0===e.strm.avail_out)?$:G}function he(e,t){for(var n,r,o,s,a=e.window;;){if(e.lookahead<=L){if(ue(e),e.lookahead<=L&&t===u)return $;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=M&&e.strstart>0&&(o=e.strstart-1,r=a[o],r===a[++o]&&r===a[++o]&&r===a[++o])){s=e.strstart+L;do{}while(r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&o<s);e.match_length=L-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=M?(n=i._tr_tally(e,1,e.match_length-M),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(re(e,!1),0===e.strm.avail_out))return $}return e.insert=0,t===f?(re(e,!0),0===e.strm.avail_out?Y:J):e.last_lit&&(re(e,!1),0===e.strm.avail_out)?$:G}function pe(e,t){for(var n;;){if(0===e.lookahead&&(ue(e),0===e.lookahead)){if(t===u)return $;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(re(e,!1),0===e.strm.avail_out))return $}return e.insert=0,t===f?(re(e,!0),0===e.strm.avail_out?Y:J):e.last_lit&&(re(e,!1),0===e.strm.avail_out)?$:G}function de(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function me(e){e.window_size=2*e.w_size,te(e.head),e.max_lazy_match=X[e.level].max_lazy,e.good_match=X[e.level].good_length,e.nice_match=X[e.level].nice_length,e.max_chain_length=X[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=M-1,e.match_available=0,e.ins_h=0}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*R),this.dyn_dtree=new r.Buf16(2*(2*P+1)),this.bl_tree=new r.Buf16(2*(2*B+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(N+1),this.heap=new r.Buf16(2*O+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*O+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=E,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?U:V,e.adler=2===t.wrap?0:1,t.last_flush=u,i._tr_init(t),p):Q(e,m)}function be(e){var t=ye(e);return t===p&&me(e.state),t}function ve(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m}function we(e,t,n,i,o,s){if(!e)return m;var a=1;if(t===b&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),o<1||o>C||n!==x||i<8||i>15||t<0||t>9||s<0||s>k)return Q(e,m);8===i&&(i=9);var u=new ge;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+M-1)/M),u.window=new r.Buf8(2*u.w_size),u.head=new r.Buf16(u.hash_size),u.prev=new r.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new r.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=n,be(e)}function _e(e,t){return we(e,t,x,A,I,S)}function ke(e,t){var n,r,o,a;if(!e||!e.state||t>h||t<0)return e?Q(e,m):m;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===W&&t!==f)return Q(e,0===e.avail_out?y:m);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===U)if(2===r.wrap)e.adler=0,ie(r,31),ie(r,139),ie(r,8),r.gzhead?(ie(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),ie(r,255&r.gzhead.time),ie(r,r.gzhead.time>>8&255),ie(r,r.gzhead.time>>16&255),ie(r,r.gzhead.time>>24&255),ie(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),ie(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(ie(r,255&r.gzhead.extra.length),ie(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=s(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=z):(ie(r,0),ie(r,0),ie(r,0),ie(r,0),ie(r,0),ie(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),ie(r,Z),r.status=V);else{var g=x+(r.w_bits-8<<4)<<8,b=-1;b=r.strategy>=w||r.level<2?0:r.level<6?1:6===r.level?2:3,g|=b<<6,0!==r.strstart&&(g|=D),g+=31-g%31,r.status=V,oe(r,g),0!==r.strstart&&(oe(r,e.adler>>>16),oe(r,65535&e.adler)),e.adler=1}if(r.status===z)if(r.gzhead.extra){for(o=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),ne(e),o=r.pending,r.pending!==r.pending_buf_size));)ie(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=q)}else r.status=q;if(r.status===q)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),ne(e),o=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,ie(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),0===a&&(r.gzindex=0,r.status=K)}else r.status=K;if(r.status===K)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),ne(e),o=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,ie(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>o&&(e.adler=s(e.adler,r.pending_buf,r.pending-o,o)),0===a&&(r.status=H)}else r.status=H;if(r.status===H&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ne(e),r.pending+2<=r.pending_buf_size&&(ie(r,255&e.adler),ie(r,e.adler>>8&255),e.adler=0,r.status=V)):r.status=V),0!==r.pending){if(ne(e),0===e.avail_out)return r.last_flush=-1,p}else if(0===e.avail_in&&ee(t)<=ee(n)&&t!==f)return Q(e,y);if(r.status===W&&0!==e.avail_in)return Q(e,y);if(0!==e.avail_in||0!==r.lookahead||t!==u&&r.status!==W){var v=r.strategy===w?pe(r,t):r.strategy===_?he(r,t):X[r.level].func(r,t);if(v!==Y&&v!==J||(r.status=W),v===$||v===Y)return 0===e.avail_out&&(r.last_flush=-1),p;if(v===G&&(t===l?i._tr_align(r):t!==h&&(i._tr_stored_block(r,0,0,!1),t===c&&(te(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),ne(e),0===e.avail_out))return r.last_flush=-1,p}return t!==f?p:r.wrap<=0?d:(2===r.wrap?(ie(r,255&e.adler),ie(r,e.adler>>8&255),ie(r,e.adler>>16&255),ie(r,e.adler>>24&255),ie(r,255&e.total_in),ie(r,e.total_in>>8&255),ie(r,e.total_in>>16&255),ie(r,e.total_in>>24&255)):(oe(r,e.adler>>>16),oe(r,65535&e.adler)),ne(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?p:d)}function Se(e){var t;return e&&e.state?(t=e.state.status,t!==U&&t!==z&&t!==q&&t!==K&&t!==H&&t!==V&&t!==W?Q(e,m):(e.state=null,t===V?Q(e,g):p)):m}function Ee(e,t){var n=t.length,i,s,a,u,l,c,f,h;if(!e||!e.state)return m;if(i=e.state,u=i.wrap,2===u||1===u&&i.status!==U||i.lookahead)return m;for(1===u&&(e.adler=o(e.adler,t,n,0)),i.wrap=0,n>=i.w_size&&(0===u&&(te(i.head),i.strstart=0,i.block_start=0,i.insert=0),h=new r.Buf8(i.w_size),r.arraySet(h,t,n-i.w_size,i.w_size,0),t=h,n=i.w_size),l=e.avail_in,c=e.next_in,f=e.input,e.avail_in=n,e.next_in=0,e.input=t,ue(i);i.lookahead>=M;){s=i.strstart,a=i.lookahead-(M-1);do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[s+M-1])&i.hash_mask,i.prev[s&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=s,s++}while(--a);i.strstart=s,i.lookahead=M-1,ue(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=M-1,i.match_available=0,e.next_in=c,e.input=f,e.avail_in=l,i.wrap=u,p}X=[new de(0,0,0,0,le),new de(4,4,8,4,ce),new de(4,5,16,8,ce),new de(4,6,32,32,ce),new de(4,4,16,16,fe),new de(8,16,32,32,fe),new de(8,16,128,128,fe),new de(8,32,128,256,fe),new de(32,128,258,1024,fe),new de(32,258,258,4096,fe)],t.deflateInit=_e,t.deflateInit2=we,t.deflateReset=be,t.deflateResetKeep=ye,t.deflateSetHeader=ve,t.deflate=ke,t.deflateEnd=Se,t.deflateSetDictionary=Ee,t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";var r=n(284),i=4,o=0,s=1,a=2;function u(e){for(var t=e.length;--t>=0;)e[t]=0}var l=0,c=1,f=2,h=3,p=258,d=29,m=256,g=m+1+d,y=30,b=19,v=2*g+1,w=15,_=16,k=7,S=256,E=16,x=17,C=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=512,P=new Array(2*(g+2));u(P);var B=new Array(2*y);u(B);var R=new Array(512);u(R);var N=new Array(256);u(N);var M=new Array(d);u(M);var L=new Array(y),F,D,U;function z(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function q(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function K(e){return e<256?R[e]:R[256+(e>>>7)]}function H(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function V(e,t,n){e.bi_valid>_-n?(e.bi_buf|=t<<e.bi_valid&65535,H(e,e.bi_buf),e.bi_buf=t>>_-e.bi_valid,e.bi_valid+=n-_):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function W(e,t,n){V(e,n[2*t],n[2*t+1])}function $(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function G(e){16===e.bi_valid?(H(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function Y(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,p,d,m=0;for(h=0;h<=w;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<v;l++)c=e.heap[l],h=n[2*n[2*c+1]+1]+1,h>u&&(h=u,m++),n[2*c+1]=h,c>r||(e.bl_count[h]++,p=0,c>=a&&(p=s[c-a]),d=n[2*c],e.opt_len+=d*(h+p),o&&(e.static_len+=d*(i[2*c+1]+p)));if(0!==m){do{for(h=u-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(c=e.bl_count[h];0!==c;)f=e.heap[--l],f>r||(n[2*f+1]!==h&&(e.opt_len+=(h-n[2*f+1])*n[2*f],n[2*f+1]=h),c--)}}function J(e,t,n){var r=new Array(w+1),i=0,o,s;for(o=1;o<=w;o++)r[o]=i=i+n[o-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=$(r[a]++,a))}}function Z(){var e,t,n,r,i,o=new Array(w+1);for(n=0,r=0;r<d-1;r++)for(M[r]=n,e=0;e<1<<A[r];e++)N[n++]=r;for(N[n-1]=r,i=0,r=0;r<16;r++)for(L[r]=i,e=0;e<1<<I[r];e++)R[i++]=r;for(i>>=7;r<y;r++)for(L[r]=i<<7,e=0;e<1<<I[r]-7;e++)R[256+i++]=r;for(t=0;t<=w;t++)o[t]=0;for(e=0;e<=143;)P[2*e+1]=8,e++,o[8]++;for(;e<=255;)P[2*e+1]=9,e++,o[9]++;for(;e<=279;)P[2*e+1]=7,e++,o[7]++;for(;e<=287;)P[2*e+1]=8,e++,o[8]++;for(J(P,g+1,o),e=0;e<y;e++)B[2*e+1]=5,B[2*e]=$(e,5);F=new z(P,A,m+1,g,w),D=new z(B,I,0,y,w),U=new z(new Array(0),T,0,b,k)}function X(e){var t;for(t=0;t<g;t++)e.dyn_ltree[2*t]=0;for(t=0;t<y;t++)e.dyn_dtree[2*t]=0;for(t=0;t<b;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*S]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Q(e){e.bi_valid>8?H(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ee(e,t,n,i){Q(e),i&&(H(e,n),H(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function te(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function ne(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&te(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!te(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function re(e,t,n){var r,i,o=0,s,a;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===r?W(e,i,t):(s=N[i],W(e,s+m+1,t),a=A[s],0!==a&&(i-=M[s],V(e,i,a)),r--,s=K(r),W(e,s,n),a=I[s],0!==a&&(r-=L[s],V(e,r,a)))}while(o<e.last_lit);W(e,S,t)}function ie(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,a,u=-1,l;for(e.heap_len=0,e.heap_max=v,s=0;s<o;s++)0!==n[2*s]?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[2*s+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[2*l]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[2*l+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)ne(e,n,s);l=o;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ne(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[2*l]=n[2*s]+n[2*a],e.depth[l]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[2*s+1]=n[2*a+1]=l,e.heap[1]=l++,ne(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Y(e,t),J(n,u,e.bl_count)}function oe(e,t,n){var r,i=-1,o,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=s,s=t[2*(r+1)+1],++a<u&&o===s||(a<l?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[2*E]++):a<=10?e.bl_tree[2*x]++:e.bl_tree[2*C]++,a=0,i=o,0===s?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4))}function se(e,t,n){var r,i=-1,o,s=t[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),r=0;r<=n;r++)if(o=s,s=t[2*(r+1)+1],!(++a<u&&o===s)){if(a<l)do{W(e,o,e.bl_tree)}while(0!=--a);else 0!==o?(o!==i&&(W(e,o,e.bl_tree),a--),W(e,E,e.bl_tree),V(e,a-3,2)):a<=10?(W(e,x,e.bl_tree),V(e,a-3,3)):(W(e,C,e.bl_tree),V(e,a-11,7));a=0,i=o,0===s?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4)}}function ae(e){var t;for(oe(e,e.dyn_ltree,e.l_desc.max_code),oe(e,e.dyn_dtree,e.d_desc.max_code),ie(e,e.bl_desc),t=b-1;t>=3&&0===e.bl_tree[2*j[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function ue(e,t,n,r){var i;for(V(e,t-257,5),V(e,n-1,5),V(e,r-4,4),i=0;i<r;i++)V(e,e.bl_tree[2*j[i]+1],3);se(e,e.dyn_ltree,t-1),se(e,e.dyn_dtree,n-1)}function le(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(n=32;n<m;n++)if(0!==e.dyn_ltree[2*n])return s;return o}u(L);var ce=!1;function fe(e){ce||(Z(),ce=!0),e.l_desc=new q(e.dyn_ltree,F),e.d_desc=new q(e.dyn_dtree,D),e.bl_desc=new q(e.bl_tree,U),e.bi_buf=0,e.bi_valid=0,X(e)}function he(e,t,n,r){V(e,(l<<1)+(r?1:0),3),ee(e,t,n,!0)}function pe(e){V(e,c<<1,3),W(e,S,P),G(e)}function de(e,t,n,r){var o,s,u=0;e.level>0?(e.strm.data_type===a&&(e.strm.data_type=le(e)),ie(e,e.l_desc),ie(e,e.d_desc),u=ae(e),o=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=o&&(o=s)):o=s=n+5,n+4<=o&&-1!==t?he(e,t,n,r):e.strategy===i||s===o?(V(e,(c<<1)+(r?1:0),3),re(e,P,B)):(V(e,(f<<1)+(r?1:0),3),ue(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),re(e,e.dyn_ltree,e.dyn_dtree)),X(e),r&&Q(e)}function me(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(N[n]+m+1)]++,e.dyn_dtree[2*K(t)]++),e.last_lit===e.lit_bufsize-1}t._tr_init=fe,t._tr_stored_block=he,t._tr_flush_block=de,t._tr_tally=me,t._tr_align=pe},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";var r=n(284),i=n(710),o=n(711),s=n(1845),a=n(1846),u=0,l=1,c=2,f=4,h=5,p=6,d=0,m=1,g=2,y=-2,b=-3,v=-4,w=-5,_=8,k=1,S=2,E=3,x=4,C=5,A=6,I=7,T=8,j=9,O=10,P=11,B=12,R=13,N=14,M=15,L=16,F=17,D=18,U=19,z=20,q=21,K=22,H=23,V=24,W=25,$=26,G=27,Y=28,J=29,Z=30,X=31,Q=32,ee=852,te=592,ne=15,re=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function oe(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function se(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=k,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(ee),t.distcode=t.distdyn=new r.Buf32(te),t.sane=1,t.back=-1,d):y}function ae(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,se(e)):y}function ue(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?y:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ae(e))):y}function le(e,t){var n,r;return e?(r=new oe,e.state=r,r.window=null,n=ue(e,t),n!==d&&(e.state=null),n):y}function ce(e){return le(e,re)}var fe=!0,he,pe;function de(e){if(fe){var t;for(he=new r.Buf32(512),pe=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(l,e.lens,0,288,he,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,pe,0,e.work,{bits:5}),fe=!1}e.lencode=he,e.lenbits=9,e.distcode=pe,e.distbits=5}function me(e,t,n,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new r.Buf8(s.wsize)),i>=s.wsize?(r.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>i&&(o=i),r.arraySet(s.window,t,n-i,o,s.wnext),i-=o,i?(r.arraySet(s.window,t,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}function ge(e,t){var n,ee,te,ne,re,oe,se,ae,ue,le,ce,fe,he,pe,ge=0,ye,be,ve,we,_e,ke,Se,Ee,xe=new r.Buf8(4),Ce,Ae,Ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return y;n=e.state,n.mode===B&&(n.mode=R),re=e.next_out,te=e.output,se=e.avail_out,ne=e.next_in,ee=e.input,oe=e.avail_in,ae=n.hold,ue=n.bits,le=oe,ce=se,Ee=d;e:for(;;)switch(n.mode){case k:if(0===n.wrap){n.mode=R;break}for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(2&n.wrap&&35615===ae){n.check=0,xe[0]=255&ae,xe[1]=ae>>>8&255,n.check=o(n.check,xe,2,0),ae=0,ue=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=Z;break}if((15&ae)!==_){e.msg="unknown compression method",n.mode=Z;break}if(ae>>>=4,ue-=4,Se=8+(15&ae),0===n.wbits)n.wbits=Se;else if(Se>n.wbits){e.msg="invalid window size",n.mode=Z;break}n.dmax=1<<Se,e.adler=n.check=1,n.mode=512&ae?O:B,ae=0,ue=0;break;case S:for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(n.flags=ae,(255&n.flags)!==_){e.msg="unknown compression method",n.mode=Z;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Z;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(xe[0]=255&ae,xe[1]=ae>>>8&255,n.check=o(n.check,xe,2,0)),ae=0,ue=0,n.mode=E;case E:for(;ue<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.head&&(n.head.time=ae),512&n.flags&&(xe[0]=255&ae,xe[1]=ae>>>8&255,xe[2]=ae>>>16&255,xe[3]=ae>>>24&255,n.check=o(n.check,xe,4,0)),ae=0,ue=0,n.mode=x;case x:for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(xe[0]=255&ae,xe[1]=ae>>>8&255,n.check=o(n.check,xe,2,0)),ae=0,ue=0,n.mode=C;case C:if(1024&n.flags){for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(xe[0]=255&ae,xe[1]=ae>>>8&255,n.check=o(n.check,xe,2,0)),ae=0,ue=0}else n.head&&(n.head.extra=null);n.mode=A;case A:if(1024&n.flags&&(fe=n.length,fe>oe&&(fe=oe),fe&&(n.head&&(Se=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,ee,ne,fe,Se)),512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,n.length-=fe),n.length))break e;n.length=0,n.mode=I;case I:if(2048&n.flags){if(0===oe)break e;fe=0;do{Se=ee[ne+fe++],n.head&&Se&&n.length<65536&&(n.head.name+=String.fromCharCode(Se))}while(Se&&fe<oe);if(512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,Se)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=T;case T:if(4096&n.flags){if(0===oe)break e;fe=0;do{Se=ee[ne+fe++],n.head&&Se&&n.length<65536&&(n.head.comment+=String.fromCharCode(Se))}while(Se&&fe<oe);if(512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,Se)break e}else n.head&&(n.head.comment=null);n.mode=j;case j:if(512&n.flags){for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Z;break}ae=0,ue=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=B;break;case O:for(;ue<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}e.adler=n.check=ie(ae),ae=0,ue=0,n.mode=P;case P:if(0===n.havedict)return e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ue,g;e.adler=n.check=1,n.mode=B;case B:if(t===h||t===p)break e;case R:if(n.last){ae>>>=7&ue,ue-=7&ue,n.mode=G;break}for(;ue<3;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}switch(n.last=1&ae,ae>>>=1,ue-=1,3&ae){case 0:n.mode=N;break;case 1:if(de(n),n.mode=z,t===p){ae>>>=2,ue-=2;break e}break;case 2:n.mode=F;break;case 3:e.msg="invalid block type",n.mode=Z}ae>>>=2,ue-=2;break;case N:for(ae>>>=7&ue,ue-=7&ue;ue<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Z;break}if(n.length=65535&ae,ae=0,ue=0,n.mode=M,t===p)break e;case M:n.mode=L;case L:if(fe=n.length,fe){if(fe>oe&&(fe=oe),fe>se&&(fe=se),0===fe)break e;r.arraySet(te,ee,ne,fe,re),oe-=fe,ne+=fe,se-=fe,re+=fe,n.length-=fe;break}n.mode=B;break;case F:for(;ue<14;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(n.nlen=257+(31&ae),ae>>>=5,ue-=5,n.ndist=1+(31&ae),ae>>>=5,ue-=5,n.ncode=4+(15&ae),ae>>>=4,ue-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Z;break}n.have=0,n.mode=D;case D:for(;n.have<n.ncode;){for(;ue<3;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.lens[Ie[n.have++]]=7&ae,ae>>>=3,ue-=3}for(;n.have<19;)n.lens[Ie[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Ce={bits:n.lenbits},Ee=a(u,n.lens,0,19,n.lencode,0,n.work,Ce),n.lenbits=Ce.bits,Ee){e.msg="invalid code lengths set",n.mode=Z;break}n.have=0,n.mode=U;case U:for(;n.have<n.nlen+n.ndist;){for(;ge=n.lencode[ae&(1<<n.lenbits)-1],ye=ge>>>24,be=ge>>>16&255,ve=65535&ge,!(ye<=ue);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(ve<16)ae>>>=ye,ue-=ye,n.lens[n.have++]=ve;else{if(16===ve){for(Ae=ye+2;ue<Ae;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(ae>>>=ye,ue-=ye,0===n.have){e.msg="invalid bit length repeat",n.mode=Z;break}Se=n.lens[n.have-1],fe=3+(3&ae),ae>>>=2,ue-=2}else if(17===ve){for(Ae=ye+3;ue<Ae;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}ae>>>=ye,ue-=ye,Se=0,fe=3+(7&ae),ae>>>=3,ue-=3}else{for(Ae=ye+7;ue<Ae;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}ae>>>=ye,ue-=ye,Se=0,fe=11+(127&ae),ae>>>=7,ue-=7}if(n.have+fe>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Z;break}for(;fe--;)n.lens[n.have++]=Se}}if(n.mode===Z)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Z;break}if(n.lenbits=9,Ce={bits:n.lenbits},Ee=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,Ce),n.lenbits=Ce.bits,Ee){e.msg="invalid literal/lengths set",n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,Ce={bits:n.distbits},Ee=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Ce),n.distbits=Ce.bits,Ee){e.msg="invalid distances set",n.mode=Z;break}if(n.mode=z,t===p)break e;case z:n.mode=q;case q:if(oe>=6&&se>=258){e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ue,s(e,ce),re=e.next_out,te=e.output,se=e.avail_out,ne=e.next_in,ee=e.input,oe=e.avail_in,ae=n.hold,ue=n.bits,n.mode===B&&(n.back=-1);break}for(n.back=0;ge=n.lencode[ae&(1<<n.lenbits)-1],ye=ge>>>24,be=ge>>>16&255,ve=65535&ge,!(ye<=ue);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(be&&0==(240&be)){for(we=ye,_e=be,ke=ve;ge=n.lencode[ke+((ae&(1<<we+_e)-1)>>we)],ye=ge>>>24,be=ge>>>16&255,ve=65535&ge,!(we+ye<=ue);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}ae>>>=we,ue-=we,n.back+=we}if(ae>>>=ye,ue-=ye,n.back+=ye,n.length=ve,0===be){n.mode=$;break}if(32&be){n.back=-1,n.mode=B;break}if(64&be){e.msg="invalid literal/length code",n.mode=Z;break}n.extra=15&be,n.mode=K;case K:if(n.extra){for(Ae=n.extra;ue<Ae;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,ue-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=H;case H:for(;ge=n.distcode[ae&(1<<n.distbits)-1],ye=ge>>>24,be=ge>>>16&255,ve=65535&ge,!(ye<=ue);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(0==(240&be)){for(we=ye,_e=be,ke=ve;ge=n.distcode[ke+((ae&(1<<we+_e)-1)>>we)],ye=ge>>>24,be=ge>>>16&255,ve=65535&ge,!(we+ye<=ue);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}ae>>>=we,ue-=we,n.back+=we}if(ae>>>=ye,ue-=ye,n.back+=ye,64&be){e.msg="invalid distance code",n.mode=Z;break}n.offset=ve,n.extra=15&be,n.mode=V;case V:if(n.extra){for(Ae=n.extra;ue<Ae;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,ue-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Z;break}n.mode=W;case W:if(0===se)break e;if(fe=ce-se,n.offset>fe){if(fe=n.offset-fe,fe>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Z;break}fe>n.wnext?(fe-=n.wnext,he=n.wsize-fe):he=n.wnext-fe,fe>n.length&&(fe=n.length),pe=n.window}else pe=te,he=re-n.offset,fe=n.length;fe>se&&(fe=se),se-=fe,n.length-=fe;do{te[re++]=pe[he++]}while(--fe);0===n.length&&(n.mode=q);break;case $:if(0===se)break e;te[re++]=n.length,se--,n.mode=q;break;case G:if(n.wrap){for(;ue<32;){if(0===oe)break e;oe--,ae|=ee[ne++]<<ue,ue+=8}if(ce-=se,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?o(n.check,te,ce,re-ce):i(n.check,te,ce,re-ce)),ce=se,(n.flags?ae:ie(ae))!==n.check){e.msg="incorrect data check",n.mode=Z;break}ae=0,ue=0}n.mode=Y;case Y:if(n.wrap&&n.flags){for(;ue<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ue,ue+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Z;break}ae=0,ue=0}n.mode=J;case J:Ee=m;break e;case Z:Ee=b;break e;case X:return v;case Q:default:return y}return e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ue,(n.wsize||ce!==e.avail_out&&n.mode<Z&&(n.mode<G||t!==f))&&me(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=X,v):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?o(n.check,te,ce,e.next_out-ce):i(n.check,te,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===B?128:0)+(n.mode===z||n.mode===M?256:0),(0===le&&0===ce||t===f)&&Ee===d&&(Ee=w),Ee)}function ye(e){if(!e||!e.state)return y;var t=e.state;return t.window&&(t.window=null),e.state=null,d}function be(e,t){var n;return e&&e.state?(n=e.state,0==(2&n.wrap)?y:(n.head=t,t.done=!1,d)):y}function ve(e,t){var n=t.length,r,o,s;return e&&e.state?(r=e.state,0!==r.wrap&&r.mode!==P?y:r.mode===P&&(o=1,o=i(o,t,n,0),o!==r.check)?b:(s=me(e,t,n,n),s?(r.mode=X,v):(r.havedict=1,d))):y}t.inflateReset=ae,t.inflateReset2=ue,t.inflateResetKeep=se,t.inflateInit=ce,t.inflateInit2=le,t.inflate=ge,t.inflateEnd=ye,t.inflateGetHeader=be,t.inflateSetDictionary=ve,t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";var r=30,i=12;e.exports=function e(t,n){var r,i,o,s,a,u,l,c,f,h,p,d,m,g,y,b,v,w,_,k,S,E,x,C,A;r=t.state,i=t.next_in,C=t.input,o=i+(t.avail_in-5),s=t.next_out,A=t.output,a=s-(n-t.avail_out),u=s+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,p=r.window,d=r.hold,m=r.bits,g=r.lencode,y=r.distcode,b=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{m<15&&(d+=C[i++]<<m,m+=8,d+=C[i++]<<m,m+=8),w=g[d&b];t:for(;;){if(_=w>>>24,d>>>=_,m-=_,_=w>>>16&255,0===_)A[s++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=g[(65535&w)+(d&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}t.msg="invalid literal/length code",r.mode=30;break e}k=65535&w,_&=15,_&&(m<_&&(d+=C[i++]<<m,m+=8),k+=d&(1<<_)-1,d>>>=_,m-=_),m<15&&(d+=C[i++]<<m,m+=8,d+=C[i++]<<m,m+=8),w=y[d&v];n:for(;;){if(_=w>>>24,d>>>=_,m-=_,_=w>>>16&255,!(16&_)){if(0==(64&_)){w=y[(65535&w)+(d&(1<<_)-1)];continue n}t.msg="invalid distance code",r.mode=30;break e}if(S=65535&w,_&=15,m<_&&(d+=C[i++]<<m,m+=8,m<_&&(d+=C[i++]<<m,m+=8)),S+=d&(1<<_)-1,S>l){t.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=_,m-=_,_=s-a,S>_){if(_=S-_,_>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break e}if(E=0,x=p,0===h){if(E+=c-_,_<k){k-=_;do{A[s++]=p[E++]}while(--_);E=s-S,x=A}}else if(h<_){if(E+=c+h-_,_-=h,_<k){k-=_;do{A[s++]=p[E++]}while(--_);if(E=0,h<k){_=h,k-=_;do{A[s++]=p[E++]}while(--_);E=s-S,x=A}}}else if(E+=h-_,_<k){k-=_;do{A[s++]=p[E++]}while(--_);E=s-S,x=A}for(;k>2;)A[s++]=x[E++],A[s++]=x[E++],A[s++]=x[E++],k-=3;k&&(A[s++]=x[E++],k>1&&(A[s++]=x[E++]))}else{E=s-S;do{A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],k-=3}while(k>2);k&&(A[s++]=A[E++],k>1&&(A[s++]=A[E++]))}break}}break}}while(i<o&&s<u);k=m>>3,i-=k,m-=k<<3,d&=(1<<m)-1,t.next_in=i,t.next_out=s,t.avail_in=i<o?o-i+5:5-(i-o),t.avail_out=s<u?u-s+257:257-(s-u),r.hold=d,r.bits=m}},function(e,t,n){"use strict";var r=n(284),i=15,o=852,s=592,a=0,u=1,l=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function e(t,n,i,o,s,a,u,l){var d=l.bits,m=0,g=0,y=0,b=0,v=0,w=0,_=0,k=0,S=0,E=0,x,C,A,I,T,j=null,O=0,P,B=new r.Buf16(16),R=new r.Buf16(16),N=null,M=0,L,F,D;for(m=0;m<=15;m++)B[m]=0;for(g=0;g<o;g++)B[n[i+g]]++;for(v=d,b=15;b>=1&&0===B[b];b--);if(v>b&&(v=b),0===b)return s[a++]=20971520,s[a++]=20971520,l.bits=1,0;for(y=1;y<b&&0===B[y];y++);for(v<y&&(v=y),k=1,m=1;m<=15;m++)if(k<<=1,k-=B[m],k<0)return-1;if(k>0&&(0===t||1!==b))return-1;for(R[1]=0,m=1;m<15;m++)R[m+1]=R[m]+B[m];for(g=0;g<o;g++)0!==n[i+g]&&(u[R[n[i+g]]++]=g);if(0===t?(j=N=u,P=19):1===t?(j=c,O-=257,N=f,M-=257,P=256):(j=h,N=p,P=-1),E=0,g=0,m=y,T=a,w=v,_=0,A=-1,S=1<<v,I=S-1,1===t&&S>852||2===t&&S>592)return 1;for(;;){L=m-_,u[g]<P?(F=0,D=u[g]):u[g]>P?(F=N[M+u[g]],D=j[O+u[g]]):(F=96,D=0),x=1<<m-_,C=1<<w,y=C;do{C-=x,s[T+(E>>_)+C]=L<<24|F<<16|D|0}while(0!==C);for(x=1<<m-1;E&x;)x>>=1;if(0!==x?(E&=x-1,E+=x):E=0,g++,0==--B[m]){if(m===b)break;m=n[i+u[g]]}if(m>v&&(E&I)!==A){for(0===_&&(_=v),T+=y,w=m-_,k=1<<w;w+_<b&&(k-=B[w+_],!(k<=0));)w++,k<<=1;if(S+=1<<w,1===t&&S>852||2===t&&S>592)return 1;A=E&I,s[A]=v<<24|w<<16|T-a|0}}return 0!==E&&(s[T+E]=m-_<<24|64<<16|0),l.bits=v,0}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){
/*!
* Copyright 2010 LearnBoost <dev@learnboost.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var r=n(15),i=n(32).parse,o=["acl","location","logging","notification","partNumber","policy","requestPayment","torrent","uploadId","uploads","versionId","versioning","versions","website"];function s(e){return"AWS "+e.key+":"+u(e)}function a(e){return r.createHmac("sha1",e.secret).update(e.message).digest("base64")}function u(e){return e.message=c(e),a(e)}function l(e){return e.message=f(e),a(e)}function c(e){var t=e.amazonHeaders||"";t&&(t+="\n");var n=[e.verb,e.md5,e.contentType,e.date?e.date.toUTCString():"",t+e.resource];return n.join("\n")}function f(e){return"GET\n\n\n"+e.date+"\n"+e.resource}function h(e){for(var t=[],n=Object.keys(e),r=0,i=n.length;r<i;++r){var o=n[r],s=e[o],o=o.toLowerCase();0===o.indexOf("x-amz")&&t.push(o+":"+s)}return t.sort().join("\n")}function p(e){var t=i(e,!0),n=t.pathname,r=[];return Object.keys(t.query).forEach(function(e){if(~o.indexOf(e)){var n=""==t.query[e]?"":"="+encodeURIComponent(t.query[e]);r.push(e+n)}}),n+(r.length?"?"+r.sort().join("&"):"")}e.exports=s,e.exports.authorization=s,e.exports.hmacSha1=a,e.exports.sign=u,e.exports.signQuery=l,e.exports.stringToSign=c,e.exports.queryStringToSign=f,e.exports.canonicalizeHeaders=h,e.exports.canonicalizeResource=p},function(e,t,n){(function(e){var r=t,i=n(32),o=n(169),s=n(15),a=n(1850),u=a(1e3);function l(e,t,n){return s.createHmac("sha256",e).update(t,"utf8").digest(n)}function c(e,t){return s.createHash("sha256").update(e,"utf8").digest(t)}function f(e){return e.replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function h(e,t){"string"==typeof e&&(e=i.parse(e));var n=e.headers=e.headers||{},r=this.matchHost(e.hostname||e.host||n.Host||n.host);this.request=e,this.credentials=t||this.defaultCredentials(),this.service=e.service||r[0]||"",this.region=e.region||r[1]||"us-east-1","email"===this.service&&(this.service="ses"),!e.method&&e.body&&(e.method="POST"),n.Host||n.host||(n.Host=e.hostname||e.host||this.createHost(),e.port&&(n.Host+=":"+e.port)),e.hostname||e.host||(e.hostname=n.Host||n.host),this.isCodeCommitGit="codecommit"===this.service&&"GIT"===e.method}h.prototype.matchHost=function(e){var t=(e||"").match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/),n=(t||[]).slice(1,3);return"es"===n[1]&&(n=n.reverse()),n},h.prototype.isSingleRegion=function(){return["s3","sdb"].indexOf(this.service)>=0&&"us-east-1"===this.region||["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0},h.prototype.createHost=function(){var e=this.isSingleRegion()?"":("s3"===this.service&&"us-east-1"!==this.region?"-":".")+this.region,t="ses"===this.service?"email":this.service;return t+e+".amazonaws.com"},h.prototype.prepareRequest=function(){this.parsePath();var t=this.request,n=t.headers,r;t.signQuery?(this.parsedPath.query=r=this.parsedPath.query||{},this.credentials.sessionToken&&(r["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||r["X-Amz-Expires"]||(r["X-Amz-Expires"]=86400),r["X-Amz-Date"]?this.datetime=r["X-Amz-Date"]:r["X-Amz-Date"]=this.getDateTime(),r["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",r["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),r["X-Amz-SignedHeaders"]=this.signedHeaders()):(t.doNotModifyHeaders||this.isCodeCommitGit||(!t.body||n["Content-Type"]||n["content-type"]||(n["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8"),!t.body||n["Content-Length"]||n["content-length"]||(n["Content-Length"]=e.byteLength(t.body)),!this.credentials.sessionToken||n["X-Amz-Security-Token"]||n["x-amz-security-token"]||(n["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||n["X-Amz-Content-Sha256"]||n["x-amz-content-sha256"]||(n["X-Amz-Content-Sha256"]=c(this.request.body||"","hex")),n["X-Amz-Date"]||n["x-amz-date"]?this.datetime=n["X-Amz-Date"]||n["x-amz-date"]:n["X-Amz-Date"]=this.getDateTime()),delete n.Authorization,delete n.authorization)},h.prototype.sign=function(){return this.parsedPath||this.prepareRequest(),this.request.signQuery?this.parsedPath.query["X-Amz-Signature"]=this.signature():this.request.headers.Authorization=this.authHeader(),this.request.path=this.formatPath(),this.request},h.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit&&(this.datetime=this.datetime.slice(0,-1))}return this.datetime},h.prototype.getDate=function(){return this.getDateTime().substr(0,8)},h.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")},h.prototype.signature=function(){var e=this.getDate(),t=[this.credentials.secretAccessKey,e,this.region,this.service].join(),n,r,i,o=u.get(t);return o||(n=l("AWS4"+this.credentials.secretAccessKey,e),r=l(n,this.region),i=l(r,this.service),o=l(i,"aws4_request"),u.set(t,o)),l(o,this.stringToSign(),"hex")},h.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),c(this.canonicalString(),"hex")].join("\n")},h.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,n=this.request.headers,r="",i="s3"!==this.service,s="s3"===this.service||this.request.doNotEncodePath,a="s3"===this.service,u="s3"===this.service,l;return l="s3"===this.service&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":n["X-Amz-Content-Sha256"]||n["x-amz-content-sha256"]||c(this.request.body||"","hex"),t&&(r=f(o.stringify(Object.keys(t).sort().reduce(function(e,n){return n?(e[n]=Array.isArray(t[n])?u?t[n][0]:t[n].slice().sort():t[n],e):e},{})))),"/"!==e&&(i&&(e=e.replace(/\/{2,}/g,"/")),e=e.split("/").reduce(function(e,t){return i&&".."===t?e.pop():i&&"."===t||(s&&(t=decodeURIComponent(t)),e.push(f(encodeURIComponent(t)))),e},[]).join("/"),"/"!==e[0]&&(e="/"+e),a&&(e=e.replace(/%2F/g,"/"))),[this.request.method||"GET",e,r,this.canonicalHeaders()+"\n",this.signedHeaders(),l].join("\n")},h.prototype.canonicalHeaders=function(){var e=this.request.headers;function t(e){return e.toString().trim().replace(/\s+/g," ")}return Object.keys(e).sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:1}).map(function(n){return n.toLowerCase()+":"+t(e[n])}).join("\n")},h.prototype.signedHeaders=function(){return Object.keys(this.request.headers).map(function(e){return e.toLowerCase()}).sort().join(";")},h.prototype.credentialString=function(){return[this.getDate(),this.region,this.service,"aws4_request"].join("/")},h.prototype.defaultCredentials=function(){var e=process.env;return{accessKeyId:e.AWS_ACCESS_KEY_ID||e.AWS_ACCESS_KEY,secretAccessKey:e.AWS_SECRET_ACCESS_KEY||e.AWS_SECRET_KEY,sessionToken:e.AWS_SESSION_TOKEN}},h.prototype.parsePath=function(){var e=this.request.path||"/",t=e.indexOf("?"),n=null;t>=0&&(n=o.parse(e.slice(t+1)),e=e.slice(0,t)),/[^0-9A-Za-z!'()*\-._~%/]/.test(e)&&(e=e.split("/").map(function(e){return encodeURIComponent(decodeURIComponent(e))}).join("/")),this.parsedPath={path:e,query:n}},h.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+f(o.stringify(t))):e},r.RequestSigner=h,r.sign=function(e,t){return new h(e,t).sign()}}).call(this,n(0).Buffer)},function(e,t){function n(e){this.capacity=0|e,this.map=Object.create(null),this.list=new r}function r(){this.firstNode=null,this.lastNode=null}function i(e,t){this.key=e,this.val=t,this.prev=null,this.next=null}e.exports=function(e){return new n(e)},n.prototype.get=function(e){var t=this.map[e];if(null!=t)return this.used(t),t.val},n.prototype.set=function(e,t){var n=this.map[e];if(null!=n)n.val=t;else{if(this.capacity||this.prune(),!this.capacity)return!1;n=new i(e,t),this.map[e]=n,this.capacity--}return this.used(n),!0},n.prototype.used=function(e){this.list.moveToFront(e)},n.prototype.prune=function(){var e=this.list.pop();null!=e&&(delete this.map[e.key],this.capacity++)},r.prototype.moveToFront=function(e){this.firstNode!=e&&(this.remove(e),null==this.firstNode?(this.firstNode=e,this.lastNode=e,e.prev=null,e.next=null):(e.prev=null,e.next=this.firstNode,e.next.prev=e,this.firstNode=e))},r.prototype.pop=function(){var e=this.lastNode;return null!=e&&this.remove(e),e},r.prototype.remove=function(e){this.firstNode==e?this.firstNode=e.next:null!=e.prev&&(e.prev.next=e.next),this.lastNode==e?this.lastNode=e.prev:null!=e.next&&(e.next.prev=e.prev)}},function(e,t,n){var r=n(1852),i=n(1861),o=n(1867),s=n(285);e.exports={parse:r.parseRequest,parseRequest:r.parseRequest,sign:i.signRequest,signRequest:i.signRequest,createSigner:i.createSigner,isSigner:i.isSigner,sshKeyToPEM:s.sshKeyToPEM,sshKeyFingerprint:s.fingerprint,pemToRsaSSHKey:s.pemToRsaSSHKey,verify:o.verifySignature,verifySignature:o.verifySignature,verifyHMAC:o.verifyHMAC}},function(e,t,n){var r=n(27),i=n(13),o=n(285),s=o.HASH_ALGOS,a=o.PK_ALGOS,u=o.HttpSignatureError,l=o.InvalidAlgorithmError,c=o.validateAlgorithm,f=0,h=1,p=0,d=1,m=2,g=3;function y(e){u.call(this,e,y)}function b(e){u.call(this,e,b)}function v(e){u.call(this,e,v)}function w(e){u.call(this,e,w)}function _(e){u.call(this,e,_)}i.inherits(y,u),i.inherits(b,u),i.inherits(v,u),i.inherits(w,u),i.inherits(_,u),e.exports={parseRequest:function e(t,n){r.object(t,"request"),r.object(t.headers,"request.headers"),void 0===n&&(n={}),void 0===n.headers&&(n.headers=[t.headers["x-date"]?"x-date":"date"]),r.object(n,"options"),r.arrayOfString(n.headers,"options.headers"),r.optionalFinite(n.clockSkew,"options.clockSkew");var i=n.authorizationHeaderName||"authorization";if(!t.headers[i])throw new w("no "+i+" header present in the request");n.clockSkew=n.clockSkew||300;var o=0,s=f,a=p,u="",k="",S={scheme:"",params:{},signingString:""},E=t.headers[i],x;for(o=0;o<E.length;o++){var C=E.charAt(o);switch(Number(s)){case f:" "!==C?S.scheme+=C:s=h;break;case h:switch(Number(a)){case p:var A=C.charCodeAt(0);if(A>=65&&A<=90||A>=97&&A<=122)u+=C;else{if("="!==C)throw new b("bad param format");if(0===u.length)throw new b("bad param format");a=d}break;case d:if('"'!==C)throw new b("bad param format");k="",a=m;break;case m:'"'===C?(S.params[u]=k,a=g):k+=C;break;case g:if(","!==C)throw new b("bad param format");u="",a=p;break;default:throw new Error("Invalid substate")}break;default:throw new Error("Invalid substate")}}if(S.params.headers&&""!==S.params.headers?S.params.headers=S.params.headers.split(" "):t.headers["x-date"]?S.params.headers=["x-date"]:S.params.headers=["date"],!S.scheme||"Signature"!==S.scheme)throw new b('scheme was not "Signature"');if(!S.params.keyId)throw new b("keyId was not specified");if(!S.params.algorithm)throw new b("algorithm was not specified");if(!S.params.signature)throw new b("signature was not specified");S.params.algorithm=S.params.algorithm.toLowerCase();try{c(S.params.algorithm)}catch(e){throw e instanceof l?new v(S.params.algorithm+" is not supported"):e}for(o=0;o<S.params.headers.length;o++){var I=S.params.headers[o].toLowerCase();if(S.params.headers[o]=I,"request-line"===I){if(n.strict)throw new _("request-line is not a valid header with strict parsing enabled.");S.signingString+=t.method+" "+t.url+" HTTP/"+t.httpVersion}else if("(request-target)"===I)S.signingString+="(request-target): "+t.method.toLowerCase()+" "+t.url;else{var T=t.headers[I];if(void 0===T)throw new w(I+" was not in the request");S.signingString+=I+": "+T}o+1<S.params.headers.length&&(S.signingString+="\n")}if(t.headers.date||t.headers["x-date"]){x=t.headers["x-date"]?new Date(t.headers["x-date"]):new Date(t.headers.date);var j=new Date,O=Math.abs(j.getTime()-x.getTime());if(O>1e3*n.clockSkew)throw new y("clock skew of "+O/1e3+"s was greater than "+n.clockSkew+"s")}if(n.headers.forEach(function(e){if(S.params.headers.indexOf(e.toLowerCase())<0)throw new w(e+" was not a signed header")}),n.algorithms&&-1===n.algorithms.indexOf(S.params.algorithm))throw new v(S.params.algorithm+" is not a supported algorithm");return S.algorithm=S.params.algorithm.toUpperCase(),S.keyId=S.params.keyId,S}}},function(e,t,n){var r=n(377),i=n(378),o=n(1854),s=n(1855);for(var a in e.exports={Reader:o,Writer:s},i)i.hasOwnProperty(a)&&(e.exports[a]=i[a]);for(var u in r)r.hasOwnProperty(u)&&(e.exports[u]=r[u])},function(e,t,n){var r=n(18),i=n(31).Buffer,o=n(378),s=n(377),a=s.newInvalidAsn1Error;function u(e){if(!e||!i.isBuffer(e))throw new TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}Object.defineProperty(u.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(u.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(u.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),u.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=255&this._buf[this._offset];return e||(this._offset+=1),t},u.prototype.peek=function(){return this.readByte(!0)},u.prototype.readLength=function(e){if(void 0===e&&(e=this._offset),e>=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(t&=127,0===t)throw a("Indefinite length not supported");if(t>4)throw a("encoding too long");if(this._size-e<t)return null;this._len=0;for(var n=0;n<t;n++)this._len=(this._len<<8)+(255&this._buf[e++])}else this._len=t;return e},u.prototype.readSequence=function(e){var t=this.peek();if(null===t)return null;if(void 0!==e&&e!==t)throw a("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var n=this.readLength(this._offset+1);return null===n?null:(this._offset=n,t)},u.prototype.readInt=function(){return this._readTag(o.Integer)},u.prototype.readBoolean=function(){return 0!==this._readTag(o.Boolean)},u.prototype.readEnumeration=function(){return this._readTag(o.Enumeration)},u.prototype.readString=function(e,t){e||(e=o.OctetString);var n=this.peek();if(null===n)return null;if(n!==e)throw a("Expected 0x"+e.toString(16)+": got 0x"+n.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>this._size-r)return null;if(this._offset=r,0===this.length)return t?i.alloc(0):"";var s=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?s:s.toString("utf8")},u.prototype.readOID=function(e){e||(e=o.OID);var t=this.readString(e,!0);if(null===t)return null;for(var n=[],r=0,i=0;i<t.length;i++){var s=255&t[i];r<<=7,r+=127&s,0==(128&s)&&(n.push(r),r=0)}return r=n.shift(),n.unshift(r%40),n.unshift(r/40>>0),n.join(".")},u.prototype._readTag=function(e){r.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw a("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var n=this.readLength(this._offset+1);if(null===n)return null;if(this.length>4)throw a("Integer too long: "+this.length);if(this.length>this._size-n)return null;this._offset=n;for(var i=this._buf[this._offset],o=0,s=0;s<this.length;s++)o<<=8,o|=255&this._buf[this._offset++];return 128==(128&i)&&4!==s&&(o-=1<<8*s),o>>0},e.exports=u},function(e,t,n){var r=n(18),i=n(31).Buffer,o=n(378),s=n(377),a=s.newInvalidAsn1Error,u={size:1024,growthFactor:8};function l(e,t){r.ok(e),r.equal(typeof e,"object"),r.ok(t),r.equal(typeof t,"object");var n=Object.getOwnPropertyNames(e);return n.forEach(function(n){if(!t[n]){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r)}}),t}function c(e){e=l(u,e||{}),this._buf=i.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}Object.defineProperty(c.prototype,"buffer",{get:function(){if(this._seq.length)throw a(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),c.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},c.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=o.Integer);for(var n=4;(0==(4286578688&e)||-8388608==(4286578688&e))&&n>1;)n--,e<<=8;if(n>4)throw a("BER ints cannot be > 0xffffffff");for(this._ensure(2+n),this._buf[this._offset++]=t,this._buf[this._offset++]=n;n-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},c.prototype.writeNull=function(){this.writeByte(o.Null),this.writeByte(0)},c.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=o.Enumeration),this.writeInt(e,t)},c.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=o.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},c.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=o.OctetString);var n=i.byteLength(e);this.writeByte(t),this.writeLength(n),n&&(this._ensure(n),this._buf.write(e,this._offset),this._offset+=n)},c.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!i.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},c.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(e){t.writeString(e)})},c.prototype.writeOID=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=o.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");function n(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t))}var r=e.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach(function(e){n(i,parseInt(e,10))});var s=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach(function(e){s.writeByte(e)})},c.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw a("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},c.prototype.startSequence=function(e){"number"!=typeof e&&(e=o.Sequence|o.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},c.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,n=this._offset-t;if(n<=127)this._shift(t,n,-2),this._buf[e]=n;else if(n<=255)this._shift(t,n,-1),this._buf[e]=129,this._buf[e+1]=n;else if(n<=65535)this._buf[e]=130,this._buf[e+1]=n>>8,this._buf[e+2]=n;else{if(!(n<=16777215))throw a("Sequence too long");this._shift(t,n,1),this._buf[e]=131,this._buf[e+1]=n>>16,this._buf[e+2]=n>>8,this._buf[e+3]=n}},c.prototype._shift=function(e,t,n){r.ok(void 0!==e),r.ok(void 0!==t),r.ok(n),this._buf.copy(this._buf,e+n,e,e+t),this._offset+=n},c.prototype._ensure=function(e){if(r.ok(e),this._size-this._offset<e){var t=this._size*this._options.growthFactor;t-this._offset<e&&(t+=e);var n=i.alloc(t);this._buf.copy(n,0,0,this._offset),this._buf=n,this._size=t}},e.exports=c},function(e,t){},function(e,t,n){var r=n(15),i=n(207).BigInteger,o=n(286).ECPointFp,s=n(31).Buffer;function a(e,t){return e.length>=t?e:a("0"+e,t)}t.ECCurves=n(1858),t.ECKey=function(e,t,n){var o,u=e(),l=u.getN(),c=Math.floor(l.bitLength()/8);if(t)if(n){var e=u.getCurve();this.P=e.decodePointHex(t.toString("hex"))}else{if(t.length!=c)return!1;o=new i(t.toString("hex"),16)}else{var f=l.subtract(i.ONE),h=new i(r.randomBytes(l.bitLength()));o=h.mod(f).add(i.ONE),this.P=u.getG().multiply(o)}this.P&&(this.PublicKey=s.from(u.getCurve().encodeCompressedPointHex(this.P),"hex")),o&&(this.PrivateKey=s.from(a(o.toString(16),2*c),"hex"),this.deriveSharedSecret=function(e){if(!e||!e.P)return!1;var t=e.P.multiply(o);return s.from(a(t.getX().toBigInteger().toString(16),2*c),"hex")})}},function(e,t,n){var r=n(207).BigInteger,i=n(286).ECCurveFp;function o(e,t,n,r){this.curve=e,this.g=t,this.n=n,this.h=r}function s(){return this.curve}function a(){return this.g}function u(){return this.n}function l(){return this.h}function c(e){return new r(e,16)}function f(){var e=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"),n=c("E87579C11079F43DD824993C2CEE5ED3"),s=c("FFFFFFFE0000000075A30D1B9038A115"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83");return new o(u,l,s,a)}function h(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"),t=r.ZERO,n=c("7"),s=c("0100000000000000000001B8FA16DFAB9ACA16B6B3"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE");return new o(u,l,s,a)}function p(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"),n=c("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"),s=c("0100000000000000000001F4C8F927AED3CA752257"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32");return new o(u,l,s,a)}function d(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"),t=r.ZERO,n=c("3"),s=c("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");return new o(u,l,s,a)}function m(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"),n=c("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"),s=c("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811");return new o(u,l,s,a)}function g(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"),n=c("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"),s=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");return new o(u,l,s,a)}function y(){var e=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),n=c("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),s=c("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),a=r.ONE,u=new i(e,t,n),l=u.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");return new o(u,l,s,a)}function b(e){return"secp128r1"==e?f():"secp160k1"==e?h():"secp160r1"==e?p():"secp192k1"==e?d():"secp192r1"==e?m():"secp224r1"==e?g():"secp256r1"==e?y():null}o.prototype.getCurve=s,o.prototype.getG=a,o.prototype.getN=u,o.prototype.getH=l,e.exports={secp128r1:f,secp160k1:h,secp160r1:p,secp192k1:d,secp192r1:m,secp224r1:g,secp256r1:y}},function(e,t,n){e.exports={read:b,verify:m,sign:k,signAsync:S,write:E,fromBuffer:v,toBuffer:x};var r=n(27),i=n(209),o=n(15),s=n(31).Buffer,a=n(55),u=n(46),l=n(50),c=n(212),f=n(114),h=n(102),p=n(47),d=n(211);function m(e,t){return!1}var g={user:1,host:2};Object.keys(g).forEach(function(e){g[g[e]]=e});var y=/^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;function b(e,t){s.isBuffer(e)&&(e=e.toString("ascii"));var n=e.trim().split(/[ \t\n]+/g);if(n.length<2||n.length>3)throw new Error("Not a valid SSH certificate line");var r=n[0],i=n[1];return i=s.from(i,"base64"),v(i,r)}function v(e,t,n){var o=new i({buffer:e}),s=o.readString();if(void 0!==t&&s!==t)throw new Error("SSH certificate algorithm mismatch");void 0===t&&(t=s);var l={signatures:{}};l.signatures.openssh={},l.signatures.openssh.nonce=o.readBuffer();var m={},b=m.parts=[];m.type=C(t);for(var v=a.info[m.type].parts.length;b.length<v;)b.push(o.readPart());r.ok(b.length>=1,"key must have at least one part");var _=a.info[m.type];if("ecdsa"===m.type){var k=y.exec(t);r.ok(null!==k),r.strictEqual(k[1],b[0].data.toString())}for(var S=0;S<_.parts.length;++S)if(b[S].name=_.parts[S],"curve"!==b[S].name&&!1!==_.normalize){var E=b[S];E.data=p.mpNormalize(E.data)}l.subjectKey=new u(m),l.serial=o.readInt64();var x=g[o.readInt()];r.string(x,"valid cert type"),l.signatures.openssh.keyId=o.readString();for(var A=[],I=o.readBuffer(),T=new i({buffer:I});!T.atEnd();)A.push(T.readString());0===A.length&&(A=["*"]),l.subjects=A.map(function(e){if("user"===x)return c.forUser(e);if("host"===x)return c.forHost(e);throw new Error("Unknown identity type "+x)}),l.validFrom=w(o.readInt64()),l.validUntil=w(o.readInt64());for(var j=[],O=new i({buffer:o.readBuffer()}),P;!O.atEnd();)P={critical:!0},P.name=O.readString(),P.data=O.readBuffer(),j.push(P);for(O=new i({buffer:o.readBuffer()});!O.atEnd();)P={critical:!1},P.name=O.readString(),P.data=O.readBuffer(),j.push(P);l.signatures.openssh.exts=j,o.readBuffer();var B=o.readBuffer();l.issuerKey=f.read(B),l.issuer=c.forHost("**");var R=o.readBuffer();return l.signatures.openssh.signature=h.parse(R,l.issuerKey.type,"ssh"),void 0!==n&&(n.remainder=o.remainder(),n.consumed=o._offset),new d(l)}function w(e){var t=4294967296*e.readUInt32BE(0);t+=e.readUInt32BE(4);var n=new Date;return n.setTime(1e3*t),n.sourceInt64=e,n}function _(e){if(void 0!==e.sourceInt64)return e.sourceInt64;var t=Math.round(e.getTime()/1e3),n=Math.floor(t/4294967296),r=Math.floor(t%4294967296),i=s.alloc(8);return i.writeUInt32BE(n,0),i.writeUInt32BE(r,4),i}function k(e,t){void 0===e.signatures.openssh&&(e.signatures.openssh={});try{var n=x(e,!0)}catch(t){return delete e.signatures.openssh,!1}var r=e.signatures.openssh,i=void 0;"rsa"!==t.type&&"dsa"!==t.type||(i="sha1");var o=t.createSign(i);return o.write(n),r.signature=o.sign(),!0}function S(e,t,n){void 0===e.signatures.openssh&&(e.signatures.openssh={});try{var r=x(e,!0)}catch(t){return delete e.signatures.openssh,void n(t)}var i=e.signatures.openssh;t(r,function(e,t){if(e)n(e);else{try{t.toBuffer("ssh")}catch(e){return void n(e)}i.signature=t,n()}})}function E(e,t){void 0===t&&(t={});var n=x(e),r=A(e.subjectKey)+" "+n.toString("base64");return t.comment&&(r=r+" "+t.comment),r}function x(e,t){r.object(e.signatures.openssh,"signature for openssh format");var n=e.signatures.openssh;void 0===n.nonce&&(n.nonce=o.randomBytes(16));var u=new i({});u.writeString(A(e.subjectKey)),u.writeBuffer(n.nonce);var l=e.subjectKey,c=a.info[l.type];c.parts.forEach(function(e){u.writePart(l.part[e])}),u.writeInt64(e.serial);var h=e.subjects[0].type;r.notStrictEqual(h,"unknown"),e.subjects.forEach(function(e){r.strictEqual(e.type,h)}),h=g[h],u.writeInt(h),void 0===n.keyId&&(n.keyId=e.subjects[0].type+"_"+(e.subjects[0].uid||e.subjects[0].hostname)),u.writeString(n.keyId);var p=new i({});e.subjects.forEach(function(e){h===g.host?p.writeString(e.hostname):h===g.user&&p.writeString(e.uid)}),u.writeBuffer(p.toBuffer()),u.writeInt64(_(e.validFrom)),u.writeInt64(_(e.validUntil));var d=n.exts;void 0===d&&(d=[]);var m=new i({});return d.forEach(function(e){!0===e.critical&&(m.writeString(e.name),m.writeBuffer(e.data))}),u.writeBuffer(m.toBuffer()),m=new i({}),d.forEach(function(e){!0!==e.critical&&(m.writeString(e.name),m.writeBuffer(e.data))}),u.writeBuffer(m.toBuffer()),u.writeBuffer(s.alloc(0)),p=f.write(e.issuerKey),u.writeBuffer(p),t||u.writeBuffer(n.signature.toBuffer("ssh")),u.toBuffer()}function C(e){if("ssh-rsa-cert-v01@openssh.com"===e)return"rsa";if("ssh-dss-cert-v01@openssh.com"===e)return"dsa";if(e.match(y))return"ecdsa";if("ssh-ed25519-cert-v01@openssh.com"===e)return"ed25519";throw new Error("Unsupported cert type "+e)}function A(e){if("rsa"===e.type)return"ssh-rsa-cert-v01@openssh.com";if("dsa"===e.type)return"ssh-dss-cert-v01@openssh.com";if("ecdsa"===e.type)return"ecdsa-sha2-"+e.curve+"-cert-v01@openssh.com";if("ed25519"===e.type)return"ssh-ed25519-cert-v01@openssh.com";throw new Error("Unsupported key type "+e.type)}},function(e,t,n){var r=n(717);e.exports={read:m,verify:r.verify,sign:r.sign,write:g};var i=n(27),o=n(103),s=n(31).Buffer,a=n(55),u=n(47),l=n(46),c=n(50),f=n(113),h=n(212),p=n(102),d=n(211);function m(e,t){"string"!=typeof e&&(i.buffer(e,"buf"),e=e.toString("ascii"));for(var n=e.trim().split(/[\r\n]+/g),o,a=-1,u;!o&&a<n.length;)o=n[++a].match(/[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);i.ok(o,"invalid PEM header");for(var l=n.length;!u&&l>0;)u=n[--l].match(/[-]+[ ]*END CERTIFICATE[ ]*[-]+/);i.ok(u,"invalid PEM footer"),n=n.slice(a,l+1);for(var c={};n=n.slice(1),o=n[0].match(/^([A-Za-z0-9-]+): (.+)$/),o;)c[o[1].toLowerCase()]=o[2];return n=n.slice(0,-1).join(""),e=s.from(n,"base64"),r.read(e,t)}function g(e,t){var n=r.write(e,t),i="CERTIFICATE",o=n.toString("base64"),a=o.length+o.length/64+18+16+2*i.length+10,u=s.alloc(a),l=0;l+=u.write("-----BEGIN "+i+"-----\n",l);for(var c=0;c<o.length;){var f=c+64;f>o.length&&(f=o.length),l+=u.write(o.slice(c,f),l),u[l++]=10,c=f}return l+=u.write("-----END "+i+"-----\n",l),u.slice(0,l)}},function(e,t,n){(function(t){var r=n(27),i=n(15),o=n(154),s=n(13),a=n(376),u=n(1862),l=n(285),c=n(13).format,f=l.HASH_ALGOS,h=l.PK_ALGOS,p=l.InvalidAlgorithmError,d=l.HttpSignatureError,m=l.validateAlgorithm,g='Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';function y(e){d.call(this,e,y)}function b(e){d.call(this,e,b)}function v(e){r.object(e,"options");var n=[];if(void 0!==e.algorithm&&(r.string(e.algorithm,"options.algorithm"),n=m(e.algorithm)),this.rs_alg=n,void 0!==e.sign)r.func(e.sign,"options.sign"),this.rs_signFunc=e.sign;else if("hmac"===n[0]&&void 0!==e.key){if(r.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,"string"!=typeof e.key&&!t.isBuffer(e.key))throw new TypeError("options.key for HMAC must be a string or Buffer");this.rs_signer=i.createHmac(n[1].toUpperCase(),e.key),this.rs_signer.sign=function(){var e=this.digest("base64");return{hashAlgorithm:n[1],toString:function(){return e}}}}else{if(void 0===e.key)throw new TypeError("options.sign (func) or options.key is required");var o=e.key;if(("string"==typeof o||t.isBuffer(o))&&(o=a.parsePrivateKey(o)),r.ok(a.PrivateKey.isPrivateKey(o,[1,2]),"options.key must be a sshpk.PrivateKey"),this.rs_key=o,r.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,!h[o.type])throw new p(o.type.toUpperCase()+" type keys are not supported");if(void 0!==n[0]&&o.type!==n[0])throw new p("options.key must be a "+n[0].toUpperCase()+" key, was given a "+o.type.toUpperCase()+" key instead");this.rs_signer=o.createSign(n[1])}this.rs_headers=[],this.rs_lines=[]}s.inherits(y,d),s.inherits(b,d),v.prototype.writeHeader=function(e,t){if(r.string(e,"header"),e=e.toLowerCase(),r.string(t,"value"),this.rs_headers.push(e),this.rs_signFunc)this.rs_lines.push(e+": "+t);else{var n=e+": "+t;this.rs_headers.length>0&&(n="\n"+n),this.rs_signer.update(n)}return t},v.prototype.writeDateHeader=function(){return this.writeHeader("date",u.rfc1123(new Date))},v.prototype.writeTarget=function(e,t){r.string(e,"method"),r.string(t,"path"),e=e.toLowerCase(),this.writeHeader("(request-target)",e+" "+t)},v.prototype.sign=function(e){if(r.func(e,"callback"),this.rs_headers.length<1)throw new Error("At least one header must be signed");var t,n;if(this.rs_signFunc){var i=this.rs_lines.join("\n"),o=this;this.rs_signFunc(i,function(i,s){if(i)e(i);else{try{r.object(s,"signature"),r.string(s.keyId,"signature.keyId"),r.string(s.algorithm,"signature.algorithm"),r.string(s.signature,"signature.signature"),t=m(s.algorithm),n=c(g,s.keyId,s.algorithm,o.rs_headers.join(" "),s.signature)}catch(t){return void e(t)}e(null,n)}})}else{try{var s=this.rs_signer.sign()}catch(t){return void e(t)}t=(this.rs_alg[0]||this.rs_key.type)+"-"+s.hashAlgorithm;var a=s.toString();n=c(g,this.rs_keyId,t,this.rs_headers.join(" "),a),e(null,n)}},e.exports={isSigner:function(e){return"object"==typeof e&&e instanceof v},createSigner:function e(t){return new v(t)},signRequest:function e(n,o){r.object(n,"request"),r.object(o,"options"),r.optionalString(o.algorithm,"options.algorithm"),r.string(o.keyId,"options.keyId"),r.optionalArrayOfString(o.headers,"options.headers"),r.optionalString(o.httpVersion,"options.httpVersion"),n.getHeader("Date")||n.setHeader("Date",u.rfc1123(new Date)),o.headers||(o.headers=["date"]),o.httpVersion||(o.httpVersion="1.1");var s=[],l;o.algorithm&&(o.algorithm=o.algorithm.toLowerCase(),s=m(o.algorithm));var d="",v;for(l=0;l<o.headers.length;l++){if("string"!=typeof o.headers[l])throw new TypeError("options.headers must be an array of Strings");var w=o.headers[l].toLowerCase();if("request-line"===w){if(o.strict)throw new b("request-line is not a valid header with strict parsing enabled.");d+=n.method+" "+n.path+" HTTP/"+o.httpVersion}else if("(request-target)"===w)d+="(request-target): "+n.method.toLowerCase()+" "+n.path;else{var _=n.getHeader(w);if(void 0===_||""===_)throw new y(w+" was not in the request");d+=w+": "+_}l+1<o.headers.length&&(d+="\n")}if(n.hasOwnProperty("_stringToSign")&&(n._stringToSign=d),"hmac"===s[0]){if("string"!=typeof o.key&&!t.isBuffer(o.key))throw new TypeError("options.key must be a string or Buffer");var k=i.createHmac(s[1].toUpperCase(),o.key);k.update(d),v=k.digest("base64")}else{var S=o.key;if(("string"==typeof S||t.isBuffer(S))&&(S=a.parsePrivateKey(o.key)),r.ok(a.PrivateKey.isPrivateKey(S,[1,2]),"options.key must be a sshpk.PrivateKey"),!h[S.type])throw new p(S.type.toUpperCase()+" type keys are not supported");if(void 0!==s[0]&&S.type!==s[0])throw new p("options.key must be a "+s[0].toUpperCase()+" key, was given a "+S.type.toUpperCase()+" key instead");var E=S.createSign(s[1]);E.update(d);var x=E.sign();if(!f[x.hashAlgorithm])throw new p(x.hashAlgorithm.toUpperCase()+" is not a supported hash algorithm");o.algorithm=S.type+"-"+x.hashAlgorithm,v=x.toString(),r.notStrictEqual(v,"","empty signature produced")}var C=o.authorizationHeaderName||"Authorization";return n.setHeader(C,c(g,o.keyId,o.algorithm,o.headers.join(" "),v)),!0}}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(27),i=n(13),o=n(1863),s=n(1864),a=n(1866);function u(e){var t,n,r="__deepCopy";if(e&&e[r])throw new Error("attempted deep copy of cyclic object");if(e&&e.constructor==Object){for(n in t={},e[r]=!0,e)n!=r&&(t[n]=u(e[n]));return delete e[r],t}if(e&&e.constructor==Array){for(t=[],e[r]=!0,n=0;n<e.length;n++)t.push(u(e[n]));return delete e[r],t}return e}function l(e,t){if(typeof e!=typeof t)return!1;if(null===e||null===t||"object"!=typeof e)return e===t;if(e.constructor!=t.constructor)return!1;var n;for(n in e){if(!t.hasOwnProperty(n))return!1;if(!l(e[n],t[n]))return!1}for(n in t)if(!e.hasOwnProperty(n))return!1;return!0}function c(e){var t;for(t in e)return!1;return!0}function f(e,t){return r.equal(typeof t,"string"),Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in e)f(e,n)&&t(n,e[n])}function p(e,t){return r.equal(typeof t,"string"),d(e,t)}function d(e,t){if(null!==e&&"object"==typeof e){if(e.hasOwnProperty(t))return e[t];var n=t.indexOf(".");if(-1!=n){var r=t.substr(0,n);if(e.hasOwnProperty(r))return d(e[r],t.substr(n+1))}}}function m(e,t,n){g(e,t,[],n)}function g(e,t,n,i){var o,s;if(0===t)return o=n.slice(0),o.push(e),void i(o);for(s in r.ok(null!==e),r.equal(typeof e,"object"),r.equal(typeof t,"number"),r.ok(t>=0),e)o=n.slice(0),o.push(s),g(e[s],t-1,o,i)}function y(e,t){if(0===t)return[e];r.ok(null!==e),r.equal(typeof e,"object"),r.equal(typeof t,"number"),r.ok(t>=0);var n=[],i;for(i in e)y(e[i],t-1).forEach(function(e){n.push([i].concat(e))});return n}function b(e,t){return e.substr(0,t.length)==t}function v(e,t){return e.substr(e.length-t.length,t.length)==t}function w(e){return"number"==typeof e&&(e=new Date(e)),r.ok(e.constructor===Date),o.sprintf("%4d-%02d-%02dT%02d:%02d:%02d.%03dZ",e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}t.deepCopy=u,t.deepEqual=l,t.isEmpty=c,t.hasKey=f,t.forEachKey=h,t.pluck=p,t.flattenObject=y,t.flattenIter=m,t.validateJsonObject=Y,t.validateJsonObjectJS=Y,t.randElt=J,t.extraProperties=ie,t.mergeObjects=oe,t.startsWith=b,t.endsWith=v,t.parseInteger=V,t.iso8601=w,t.rfc1123=S,t.parseDateTime=E,t.hrtimediff=X,t.hrtimeDiff=X,t.hrtimeAccum=ne,t.hrtimeAdd=re,t.hrtimeNanosec=Q,t.hrtimeMicrosec=ee,t.hrtimeMillisec=te;var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function S(e){return o.sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",k[e.getUTCDay()],e.getUTCDate(),_[e.getUTCMonth()],e.getUTCFullYear(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())}function E(e){var t=+e;return isNaN(t)?new Date(e):new Date(t)}var x=Number.MAX_SAFE_INTEGER||9007199254740991,C=Number.MIN_SAFE_INTEGER||-9007199254740991,A={base:10,allowSign:!0,allowPrefix:!1,allowTrailing:!1,allowImprecise:!1,trimWhitespace:!1,leadingZeroIsOctal:!1},I=48,T=57,j=65,O=66,P=79,B=84,R=88,N=90,M=97,L=98,F=111,D=116,U=120,z=122,q=48,K=55,H=87;function V(e,t){r.string(e,"str"),r.optionalObject(t,"options");var n=!1,i=A,o;t&&(n=f(t,"base"),i=oe(i,t),r.number(i.base,"options.base"),r.ok(i.base>=2,"options.base >= 2"),r.ok(i.base<=36,"options.base <= 36"),r.bool(i.allowSign,"options.allowSign"),r.bool(i.allowPrefix,"options.allowPrefix"),r.bool(i.allowTrailing,"options.allowTrailing"),r.bool(i.allowImprecise,"options.allowImprecise"),r.bool(i.trimWhitespace,"options.trimWhitespace"),r.bool(i.leadingZeroIsOctal,"options.leadingZeroIsOctal"),i.leadingZeroIsOctal&&r.ok(!n,'"base" and "leadingZeroIsOctal" are mutually exclusive'));var s=-1,a=i.base,u,l=1,c=0,h=0,p=e.length;if(i.trimWhitespace)for(;h<p&&$(e.charCodeAt(h));)++h;for(i.allowSign&&("-"===e[h]?(h+=1,l=-1):"+"===e[h]&&(h+=1)),"0"===e[h]&&(i.allowPrefix&&(s=G(e.charCodeAt(h+1)),-1===s||n&&s!==a||(a=s,h+=2)),-1===s&&i.leadingZeroIsOctal&&(a=8)),u=h;h<p&&(o=W(e.charCodeAt(h)),-1!==o&&o<a);++h)c*=a,c+=o;if(u===h)return new Error("invalid number: "+JSON.stringify(e));if(i.trimWhitespace)for(;h<p&&$(e.charCodeAt(h));)++h;if(h<p&&!i.allowTrailing)return new Error("trailing characters after number: "+JSON.stringify(e.slice(h)));if(0===c)return 0;var d=c*l;return!i.allowImprecise&&(c>x||d<C)?new Error("number is outside of the supported range: "+JSON.stringify(e.slice(u,h))):d}function W(e){return e>=I&&e<=T?e-q:e>=j&&e<=N?e-K:e>=M&&e<=z?e-H:-1}function $(e){return 32===e||e>=9&&e<=13||160===e||5760===e||6158===e||e>=8192&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e||65279===e}function G(e){return e===L||e===O?2:e===F||e===P?8:e===D||e===B?10:e===U||e===R?16:-1}function Y(e,t){var n=a.validate(t,e);if(0===n.errors.length)return null;var r=n.errors[0],i=r.property,o=r.message.toLowerCase(),u,l;-1!=(u=o.indexOf("the property "))&&-1!=(l=o.indexOf(" is not defined in the schema and the schema does not allow additional properties"))&&(u+="the property ".length,i=""===i?o.substr(u,l-u):i+"."+o.substr(u,l-u),o="unsupported property");var c=new s.VError('property "%s": %s',i,o);return c.jsv_details=r,c}function J(e){return r.ok(Array.isArray(e)&&e.length>0,"randElt argument must be a non-empty array"),e[Math.floor(Math.random()*e.length)]}function Z(e){r.ok(e[0]>=0&&e[1]>=0,"negative numbers not allowed in hrtimes"),r.ok(e[1]<1e9,"nanoseconds column overflow")}function X(e,t){Z(e),Z(t),r.ok(e[0]>t[0]||e[0]==t[0]&&e[1]>=t[1],"negative differences not allowed");var n=[e[0]-t[0],0];return e[1]>=t[1]?n[1]=e[1]-t[1]:(n[0]--,n[1]=1e9-(t[1]-e[1])),n}function Q(e){return Z(e),Math.floor(1e9*e[0]+e[1])}function ee(e){return Z(e),Math.floor(1e6*e[0]+e[1]/1e3)}function te(e){return Z(e),Math.floor(1e3*e[0]+e[1]/1e6)}function ne(e,t){return Z(e),Z(t),e[1]+=t[1],e[1]>=1e9&&(e[0]++,e[1]-=1e9),e[0]+=t[0],e}function re(e,t){Z(e);var n=[e[0],e[1]];return ne(n,t)}function ie(e,t){r.ok("object"==typeof e&&null!==e,"obj argument must be a non-null object"),r.ok(Array.isArray(t),"allowed argument must be an array of strings");for(var n=0;n<t.length;n++)r.ok("string"==typeof t[n],"allowed argument must be an array of strings");return Object.keys(e).filter(function(e){return-1===t.indexOf(e)})}function oe(e,t,n){var r,i;if(r={},n)for(i in n)r[i]=n[i];if(e)for(i in e)r[i]=e[i];if(t)for(i in t)r[i]=t[i];return r}},function(e,t,n){(function(e){var r=n(18),i=n(13);function o(e){var t=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),n=new RegExp(t),o=Array.prototype.slice.call(arguments,1),s,a,c,f,h,p,d,m,g,y="",b=1;for(r.equal("string",typeof e);null!==(g=n.exec(e));)if(y+=g[1],e=e.substring(g[0].length),s=g[2]||"",a=g[3]||0,c=g[4]||"",f=g[6],h=!1,d=!1,p=" ","%"!=f){if(0===o.length)throw new Error("too few args to sprintf");if(m=o.shift(),b++,s.match(/[\' #]/))throw new Error("unsupported flags: "+s);if(c.length>0)throw new Error("non-zero precision not supported");switch(s.match(/-/)&&(h=!0),s.match(/0/)&&(p="0"),s.match(/\+/)&&(d=!0),f){case"s":if(void 0===m||null===m)throw new Error("argument "+b+": attempted to print undefined or null as a string");y+=u(p,a,h,m.toString());break;case"d":m=Math.floor(m);case"f":d=d&&m>0?"+":"",y+=d+u(p,a,h,m.toString());break;case"x":y+=u(p,a,h,m.toString(16));break;case"j":0===a&&(a=10),y+=i.inspect(m,!1,a);break;case"r":y+=l(m);break;default:throw new Error("unsupported conversion: "+f)}}else y+="%";return y+=e,y}function s(){var t=Array.prototype.slice.call(arguments);t.unshift(e.stdout),a.apply(null,t)}function a(e){var t=Array.prototype.slice.call(arguments,1);return e.write(o.apply(this,t))}function u(e,t,n,r){for(var i=r;i.length<t;)n?i+=e:i=e+i;return i}function l(e){var t;if(!(e instanceof Error))throw new Error(o("invalid type for %%r: %j",e));if(t="EXCEPTION: "+e.constructor.name+": "+e.stack,e.cause&&"function"==typeof e.cause){var n=e.cause();n&&(t+="\nCaused by: "+l(n))}return t}t.sprintf=o,t.printf=s,t.fprintf=a}).call(this,n(2))},function(e,t,n){var r=n(27),i=n(13),o=n(1865),s=n(7).isError,a=o.sprintf;function u(e){var t,n,i,o,u;if(r.object(e,"args"),r.bool(e.strict,"args.strict"),r.array(e.argv,"args.argv"),t=e.argv,0===t.length)n={},i=[];else if(s(t[0]))n={cause:t[0]},i=t.slice(1);else if("object"==typeof t[0]){for(u in n={},t[0])n[u]=t[0][u];i=t.slice(1)}else r.string(t[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),n={},i=t;return r.object(n),n.strict||e.strict||(i=i.map(function(e){return null===e?"null":void 0===e?"undefined":e})),o=0===i.length?"":a.apply(null,i),{options:n,shortmessage:o}}function l(){var e,t,n,i,o,a,c;if(e=Array.prototype.slice.call(arguments,0),!(this instanceof l))return t=Object.create(l.prototype),l.apply(t,arguments),t;if(n=u({argv:e,strict:!1}),n.options.name&&(r.string(n.options.name,'error\'s "name" must be a string'),this.name=n.options.name),this.jse_shortmsg=n.shortmessage,a=n.shortmessage,i=n.options.cause,i&&(r.ok(s(i),"cause is not an Error"),this.jse_cause=i,n.options.skipCauseMessage||(a+=": "+i.message)),this.jse_info={},n.options.info)for(c in n.options.info)this.jse_info[c]=n.options.info[c];return this.message=a,Error.call(this,a),Error.captureStackTrace&&(o=n.options.constructorOpt||this.constructor,Error.captureStackTrace(this,o)),this}function c(){var e,t,n,r;return e=Array.prototype.slice.call(arguments,0),this instanceof c?(n=u({argv:e,strict:!0}),r=n.options,l.call(this,r,"%s",n.shortmessage),this):(t=Object.create(c.prototype),c.apply(t,arguments),t)}function f(e){r.array(e,"list of errors"),r.ok(e.length>0,"must be at least one error"),this.ase_errors=e,l.call(this,{cause:e[0]},"first of %d error%s",e.length,1==e.length?"":"s")}function h(){var e,t,n,r;return e=Array.prototype.slice.call(arguments,0),this instanceof h?(n=u({argv:e,strict:!1}),r=n.options,r.skipCauseMessage=!0,l.call(this,r,"%s",n.shortmessage),this):(t=Object.create(h.prototype),h.apply(t,e),t)}e.exports=l,l.VError=l,l.SError=c,l.WError=h,l.MultiError=f,i.inherits(l,Error),l.prototype.name="VError",l.prototype.toString=function e(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),t},l.prototype.cause=function e(){var t=l.cause(this);return null===t?void 0:t},l.cause=function(e){return r.ok(s(e),"err must be an Error"),s(e.jse_cause)?e.jse_cause:null},l.info=function(e){var t,n,i;if(r.ok(s(e),"err must be an Error"),n=l.cause(e),t=null!==n?l.info(n):{},"object"==typeof e.jse_info&&null!==e.jse_info)for(i in e.jse_info)t[i]=e.jse_info[i];return t},l.findCauseByName=function(e,t){var n;for(r.ok(s(e),"err must be an Error"),r.string(t,"name"),r.ok(t.length>0,"name cannot be empty"),n=e;null!==n;n=l.cause(n))if(r.ok(s(n)),n.name==t)return n;return null},l.hasCauseWithName=function(e,t){return null!==l.findCauseByName(e,t)},l.fullStack=function(e){r.ok(s(e),"err must be an Error");var t=l.cause(e);return t?e.stack+"\ncaused by: "+l.fullStack(t):e.stack},l.errorFromList=function(e){return r.arrayOfObject(e,"errors"),0===e.length?null:(e.forEach(function(e){r.ok(s(e))}),1==e.length?e[0]:new f(e))},l.errorForEach=function(e,t){r.ok(s(e),"err must be an Error"),r.func(t,"func"),e instanceof f?e.errors().forEach(function e(n){t(n)}):t(e)},i.inherits(c,l),i.inherits(f,l),f.prototype.name="MultiError",f.prototype.errors=function e(){return this.ase_errors.slice(0)},i.inherits(h,l),h.prototype.name="WError",h.prototype.toString=function e(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),this.jse_cause&&this.jse_cause.message&&(t+="; caused by "+this.jse_cause.toString()),t},h.prototype.cause=function e(t){return s(t)&&(this.jse_cause=t),this.jse_cause}},function(e,t,n){(function(e){var r=n(18),i=n(13);function o(e){var t=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),n=new RegExp(t),o=Array.prototype.slice.call(arguments,1),a=e,u,f,h,p,d,m,g,y,b,v="",w=1,_=0,k,S;for(r.equal("string",typeof a,"first argument must be a format string");null!==(b=n.exec(a));)if(v+=b[1],a=a.substring(b[0].length),S=b[0].substring(b[1].length),k=_+b[1].length+1,_+=b[0].length,u=b[2]||"",f=b[3]||0,h=b[4]||"",p=b[6],d=!1,g=!1,m=" ","%"!=p){if(0===o.length)throw s(e,k,S,"has no matching argument (too few arguments passed)");if(y=o.shift(),w++,u.match(/[\' #]/))throw s(e,k,S,"uses unsupported flags");if(h.length>0)throw s(e,k,S,"uses non-zero precision (not supported)");switch(u.match(/-/)&&(d=!0),u.match(/0/)&&(m="0"),u.match(/\+/)&&(g=!0),p){case"s":if(void 0===y||null===y)throw s(e,k,S,"attempted to print undefined or null as a string (argument "+w+" to sprintf)");v+=l(m,f,d,y.toString());break;case"d":y=Math.floor(y);case"f":g=g&&y>0?"+":"",v+=g+l(m,f,d,y.toString());break;case"x":v+=l(m,f,d,y.toString(16));break;case"j":0===f&&(f=10),v+=i.inspect(y,!1,f);break;case"r":v+=c(y);break;default:throw s(e,k,S,"is not supported")}}else v+="%";return v+=a,v}function s(e,t,n,i){return r.equal(typeof e,"string"),r.equal(typeof n,"string"),r.equal(typeof t,"number"),r.equal(typeof i,"string"),new Error('format string "'+e+'": conversion specifier "'+n+'" at character '+t+" "+i)}function a(){var t=Array.prototype.slice.call(arguments);t.unshift(e.stdout),u.apply(null,t)}function u(e){var t=Array.prototype.slice.call(arguments,1);return e.write(o.apply(this,t))}function l(e,t,n,r){for(var i=r;i.length<t;)n?i+=e:i=e+i;return i}function c(e){var t;if(!(e instanceof Error))throw new Error(o("invalid type for %%r: %j",e));if(t="EXCEPTION: "+e.constructor.name+": "+e.stack,e.cause&&"function"==typeof e.cause){var n=e.cause();n&&(t+="\nCaused by: "+c(n))}return t}t.sprintf=o,t.printf=a,t.fprintf=u}).call(this,n(2))},function(e,t,n){var r,i,o,s;o=this,s=function(){var e=n;e.Integer={type:"integer"};var t={String:String,Boolean:Boolean,Number:Number,Object:Object,Array:Array,Date:Date};function n(e,t){return n(e,t,{changing:!1})}e.validate=n,e.checkPropertyChange=function(e,t,r){return n(e,t,{changing:r||"property"})};var n=e._validate=function(e,n,r){r||(r={});var i=r.changing;function o(e){return e.type||t[e.name]==e&&e.name.toLowerCase()}var s=[];function a(e,t,n,l){var c;function f(e){s.push({property:n,message:e})}if(n+=n?"number"==typeof l?"["+l+"]":void 0===l?"":"."+l:l,("object"!=typeof t||t instanceof Array)&&(n||"function"!=typeof t)&&(!t||!o(t)))return"function"==typeof t?e instanceof t||f("is not an instance of the class/constructor "+t.name):t&&f("Invalid schema/property definition "+t),null;function h(e,t){if(e){if(!("string"!=typeof e||"any"==e||("null"==e?null===t:typeof t==e)||t instanceof Array&&"array"==e||t instanceof Date&&"date"==e||"integer"==e&&t%1==0))return[{property:n,message:typeof t+" value found, but a "+e+" is required"}];if(e instanceof Array){for(var r=[],i=0;i<e.length&&(r=h(e[i],t)).length;i++);if(r.length)return r}else if("object"==typeof e){var o=s;s=[],a(t,e,n);var u=s;return s=o,u}}return[]}if(i&&t.readonly&&f("is a readonly field, it can not be changed"),t.extends&&a(e,t.extends,n,l),void 0===e)t.required&&f("is missing and it is required");else if(s=s.concat(h(o(t),e)),t.disallow&&!h(t.disallow,e).length&&f(" disallowed value was matched"),null!==e){if(e instanceof Array){if(t.items){var p=t.items instanceof Array,d=t.items;for(l=0,c=e.length;l<c;l+=1)p&&(d=t.items[l]),r.coerce&&(e[l]=r.coerce(e[l],d)),s.concat(a(e[l],d,n,l))}t.minItems&&e.length<t.minItems&&f("There must be a minimum of "+t.minItems+" in the array"),t.maxItems&&e.length>t.maxItems&&f("There must be a maximum of "+t.maxItems+" in the array")}else(t.properties||t.additionalProperties)&&s.concat(u(e,t.properties,n,t.additionalProperties));if(t.pattern&&"string"==typeof e&&!e.match(t.pattern)&&f("does not match the regex pattern "+t.pattern),t.maxLength&&"string"==typeof e&&e.length>t.maxLength&&f("may only be "+t.maxLength+" characters long"),t.minLength&&"string"==typeof e&&e.length<t.minLength&&f("must be at least "+t.minLength+" characters long"),void 0!==typeof t.minimum&&typeof e==typeof t.minimum&&t.minimum>e&&f("must have a minimum value of "+t.minimum),void 0!==typeof t.maximum&&typeof e==typeof t.maximum&&t.maximum<e&&f("must have a maximum value of "+t.maximum),t.enum){var m=t.enum,g;c=m.length;for(var y=0;y<c;y++)if(m[y]===e){g=1;break}g||f("does not have a value in the enumeration "+m.join(", "))}"number"==typeof t.maxDecimal&&e.toString().match(new RegExp("\\.[0-9]{"+(t.maxDecimal+1)+",}"))&&f("may only have "+t.maxDecimal+" digits of decimal places")}return null}function u(e,t,n,o){if("object"==typeof t)for(var u in("object"!=typeof e||e instanceof Array)&&s.push({property:n,message:"an object is required"}),t)if(t.hasOwnProperty(u)){var l=e[u];if(void 0===l&&r.existingOnly)continue;var c=t[u];void 0===l&&c.default&&(l=e[u]=c.default),r.coerce&&u in e&&(l=e[u]=r.coerce(l,c)),a(l,c,n,u)}for(u in e){if(e.hasOwnProperty(u)&&("_"!=u.charAt(0)||"_"!=u.charAt(1))&&t&&!t[u]&&!1===o){if(r.filter){delete e[u];continue}s.push({property:n,message:typeof l+"The property "+u+" is not defined in the schema and the schema does not allow additional properties"})}var f=t&&t[u]&&t[u].requires;!f||f in e||s.push({property:n,message:"the presence of the property "+u+" requires that "+f+" also be present"}),l=e[u],!o||t&&"object"==typeof t&&u in t||(r.coerce&&(l=e[u]=r.coerce(l,o)),a(l,o,n,u)),!i&&l&&l.$schema&&(s=s.concat(a(l,l.$schema,n,u)))}return s}return n&&a(e,n,"",i||""),!i&&e&&e.$schema&&a(e,e.$schema,"",""),{valid:!s.length,errors:s}};return e.mustBeValid=function(e){if(!e.valid)throw new TypeError(e.errors.map(function(e){return"for property "+e.property+": "+e.message}).join(", \n"))},e},r=[],i=function(){return s()}.apply(t,r),void 0===i||(e.exports=i)},function(e,t,n){(function(t){var r=n(27),i=n(15),o=n(376),s=n(285),a=s.HASH_ALGOS,u=s.PK_ALGOS,l=s.InvalidAlgorithmError,c=s.HttpSignatureError,f=s.validateAlgorithm;e.exports={verifySignature:function e(n,i){r.object(n,"parsedSignature"),("string"==typeof i||t.isBuffer(i))&&(i=o.parseKey(i)),r.ok(o.Key.isKey(i,[1,1]),"pubkey must be a sshpk.Key");var s=f(n.algorithm);if("hmac"===s[0]||s[0]!==i.type)return!1;var a=i.createVerify(s[1]);return a.update(n.signingString),a.verify(n.params.signature,"base64")},verifyHMAC:function e(n,o){r.object(n,"parsedHMAC"),r.string(o,"secret");var s=f(n.algorithm);if("hmac"!==s[0])return!1;var a=s[1].toUpperCase(),u=i.createHmac(a,o);u.update(n.signingString);var l=i.createHmac(a,o);l.update(u.digest()),l=l.digest();var c=i.createHmac(a,o);return c.update(new t(n.params.signature,"base64")),c=c.digest(),"string"==typeof l?l===c:t.isBuffer(l)&&!l.equals?l.toString("binary")===c.toString("binary"):l.equals(c)}}}).call(this,n(0).Buffer)},function(e,t,n){"use strict";
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var r=n(1869),i=n(61).extname,o=/^\s*([^;\s]*)(?:;|\s|$)/,s=/^text\//i;function a(e){if(!e||"string"!=typeof e)return!1;var t=o.exec(e),n=t&&r[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!s.test(t[1]))&&"UTF-8"}function u(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n}function l(e){if(!e||"string"!=typeof e)return!1;var n=o.exec(e),r=n&&t.extensions[n[1].toLowerCase()];return!(!r||!r.length)&&r[0]}function c(e){if(!e||"string"!=typeof e)return!1;var n=i("x."+e).toLowerCase().substr(1);return n&&t.types[n]||!1}function f(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(r).forEach(function i(o){var s=r[o],a=s.extensions;if(a&&a.length){e[o]=a;for(var u=0;u<a.length;u++){var l=a[u];if(t[l]){var c=n.indexOf(r[t[l]].source),f=n.indexOf(s.source);if("application/octet-stream"!==t[l]&&(c>f||c===f&&"application/"===t[l].substr(0,12)))continue}t[l]=o}}})}t.charset=a,t.charsets={lookup:a},t.contentType=u,t.extension=l,t.extensions=Object.create(null),t.lookup=c,t.types=Object.create(null),f(t.extensions,t.types)},function(e,t,n){
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
e.exports=n(1870)},function(e){e.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0},"application/atsc-held+xml":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma","es"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0},"application/fhir+json":{source:"iana",compressible:!0},"application/fhir+xml":{source:"iana",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0},"application/mmt-usd+xml":{source:"iana",compressible:!0},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",compressible:!0},"application/msc-mixer+xml":{source:"iana",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana",compressible:!0},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",compressible:!0},"application/pidf-diff+xml":{source:"iana",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0},"application/route-s-tsid+xml":{source:"iana",compressible:!0},"application/route-usd+xml":{source:"iana",compressible:!0},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0},"application/urc-targetdesc+xml":{source:"iana",compressible:!0},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["keynote"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",compressible:!0},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0},"application/xcap-caps+xml":{source:"iana",compressible:!0},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana"},"image/avcs":{source:"iana"},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},function(e,t,n){e.exports=l,l.SSL=c;var r=n(13),i=n(154).Agent,o=n(15),s=n(15),a=n(202).Agent;function u(e,t){var n="";return n="string"==typeof e?e+":"+t:e.host+":"+e.port+":"+(e.localAddress?e.localAddress+":":":"),n}function l(e){var t=this;t.options=e||{},t.requests={},t.sockets={},t.freeSockets={},t.maxSockets=t.options.maxSockets||i.defaultMaxSockets,t.minSockets=t.options.minSockets||l.defaultMinSockets,t.on("free",function(e,n,r){var i=u(n,r);if(t.requests[i]&&t.requests[i].length)t.requests[i].shift().onSocket(e);else if(t.sockets[i].length<t.minSockets){t.freeSockets[i]||(t.freeSockets[i]=[]),t.freeSockets[i].push(e);var o=function(){e.destroy()};e._onIdleError=o,e.on("error",o)}else e.destroy()})}function c(e){l.call(this,e)}function f(e,t,n){return n="object"==typeof e?e:"object"==typeof t?t:"object"==typeof n?n:{},"number"==typeof e&&(n.port=e),"string"==typeof t&&(n.host=t),s.connect(n)}r.inherits(l,i),l.defaultMinSockets=5,l.prototype.createConnection=o.createConnection,l.prototype.addRequestNoreuse=i.prototype.addRequest,l.prototype.addRequest=function(e,t,n){var r=u(t,n);if("string"!=typeof t){var i=t;n=i.port,t=i.host}if(this.freeSockets[r]&&this.freeSockets[r].length>0&&!e.useChunkedEncodingByDefault){var o=this.freeSockets[r].pop();o.removeListener("error",o._onIdleError),delete o._onIdleError,e._reusedSocket=!0,e.onSocket(o)}else this.addRequestNoreuse(e,t,n)},l.prototype.removeSocket=function(e,t,n,r){if(this.sockets[t]){var i=this.sockets[t].indexOf(e);-1!==i&&this.sockets[t].splice(i,1)}else this.sockets[t]&&0===this.sockets[t].length&&(delete this.sockets[t],delete this.requests[t]);if(this.freeSockets[t]){var i=this.freeSockets[t].indexOf(e);-1!==i&&(this.freeSockets[t].splice(i,1),0===this.freeSockets[t].length&&delete this.freeSockets[t])}this.requests[t]&&this.requests[t].length&&this.createSocket(t,n,r).emit("free")},r.inherits(c,l),c.prototype.createConnection=f,c.prototype.addRequestNoreuse=a.prototype.addRequest},function(e,t){e.exports="object"==typeof self?self.FormData:window.FormData},function(e,t,n){"use strict";(function(t){function n(e){return e.replace(/^\.*/,".").toLowerCase()}function r(e){e=e.trim().toLowerCase();var t=e.split(":",2),r=n(t[0]),i=t[1],o=e.indexOf(":")>-1;return{hostname:r,port:i,hasPort:o}}function i(e,t){var i=e.port||("https:"===e.protocol?"443":"80"),o=n(e.hostname),s=t.split(",");return s.map(r).some(function(e){var t=o.indexOf(e.hostname),n=t>-1&&t===o.length-e.hostname.length;return e.hasPort?i===e.port&&n:n})}function o(e){var n=t.env.NO_PROXY||t.env.no_proxy||"";return"*"===n?null:""!==n&&i(e,n)?null:"http:"===e.protocol?t.env.HTTP_PROXY||t.env.http_proxy||null:"https:"===e.protocol&&(t.env.HTTPS_PROXY||t.env.https_proxy||t.env.HTTP_PROXY||t.env.http_proxy)||null}e.exports=o}).call(this,n(2))},function(e,t,n){"use strict";var r=n(719),i=n(169);function o(e){this.request=e,this.lib=null,this.useQuerystring=null,this.parseOptions=null,this.stringifyOptions=null}o.prototype.init=function(e){this.lib||(this.useQuerystring=e.useQuerystring,this.lib=this.useQuerystring?i:r,this.parseOptions=e.qsParseOptions||{},this.stringifyOptions=e.qsStringifyOptions||{})},o.prototype.stringify=function(e){return this.useQuerystring?this.rfc3986(this.lib.stringify(e,this.stringifyOptions.sep||null,this.stringifyOptions.eq||null,this.stringifyOptions)):this.lib.stringify(e,this.stringifyOptions)},o.prototype.parse=function(e){return this.useQuerystring?this.lib.parse(e,this.parseOptions.sep||null,this.parseOptions.eq||null,this.parseOptions):this.lib.parse(e,this.parseOptions)},o.prototype.rfc3986=function(e){return e.replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},o.prototype.unescape=i.unescape,t.Querystring=o},function(e,t,n){"use strict";var r=n(720),i=n(721),o={brackets:function e(t){return t+"[]"},indices:function e(t,n){return t+"["+n+"]"},repeat:function e(t){return t}},s=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function e(t){return s.call(t)},skipNulls:!1,strictNullHandling:!1},u=function e(t,n,i,o,s,u,l,c,f,h,p,d){var m=t;if("function"==typeof l)m=l(n,m);else if(m instanceof Date)m=h(m);else if(null===m){if(o)return u&&!d?u(n,a.encoder):n;m=""}if("string"==typeof m||"number"==typeof m||"boolean"==typeof m||r.isBuffer(m)){if(u){var g=d?n:u(n,a.encoder);return[p(g)+"="+p(u(m,a.encoder))]}return[p(n)+"="+p(String(m))]}var y=[],b;if(void 0===m)return y;if(Array.isArray(l))b=l;else{var v=Object.keys(m);b=c?v.sort(c):v}for(var w=0;w<b.length;++w){var _=b[w];s&&null===m[_]||(y=Array.isArray(m)?y.concat(e(m[_],i(n,_),i,o,s,u,l,c,f,h,p,d)):y.concat(e(m[_],n+(f?"."+_:"["+_+"]"),i,o,s,u,l,c,f,h,p,d)))}return y};e.exports=function(e,t){var n=e,s=t?r.assign({},t):{};if(null!==s.encoder&&void 0!==s.encoder&&"function"!=typeof s.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===s.delimiter?a.delimiter:s.delimiter,c="boolean"==typeof s.strictNullHandling?s.strictNullHandling:a.strictNullHandling,f="boolean"==typeof s.skipNulls?s.skipNulls:a.skipNulls,h="boolean"==typeof s.encode?s.encode:a.encode,p="function"==typeof s.encoder?s.encoder:a.encoder,d="function"==typeof s.sort?s.sort:null,m=void 0!==s.allowDots&&s.allowDots,g="function"==typeof s.serializeDate?s.serializeDate:a.serializeDate,y="boolean"==typeof s.encodeValuesOnly?s.encodeValuesOnly:a.encodeValuesOnly;if(void 0===s.format)s.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,s.format))throw new TypeError("Unknown format option provided.");var b=i.formatters[s.format],v,w;"function"==typeof s.filter?(w=s.filter,n=w("",n)):Array.isArray(s.filter)&&(w=s.filter,v=w);var _=[],k;if("object"!=typeof n||null===n)return"";k=s.arrayFormat in o?s.arrayFormat:"indices"in s?s.indices?"indices":"repeat":"indices";var S=o[k];v||(v=Object.keys(n)),d&&v.sort(d);for(var E=0;E<v.length;++E){var x=v[E];f&&null===n[x]||(_=_.concat(u(n[x],x,S,c,f,h?p:null,w,d,m,g,b,y)))}var C=_.join(l),A=!0===s.addQueryPrefix?"?":"";return C.length>0?A+C:""}},function(e,t,n){"use strict";var r=n(720),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},s=function e(t,n){for(var r={},s=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=n.parameterLimit===1/0?void 0:n.parameterLimit,u=s.split(n.delimiter,a),l=0;l<u.length;++l){var c=u[l],f=c.indexOf("]="),h=-1===f?c.indexOf("="):f+1,p,d;-1===h?(p=n.decoder(c,o.decoder),d=n.strictNullHandling?null:""):(p=n.decoder(c.slice(0,h),o.decoder),d=n.decoder(c.slice(h+1),o.decoder)),i.call(r,p)?r[p]=[].concat(r[p]).concat(d):r[p]=d}return r},a=function(e,t,n){for(var r=t,i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s)o=[],o=o.concat(r);else{o=n.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(a,10);!isNaN(u)&&s!==a&&String(u)===a&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[],o[u]=r):o[a]=r}r=o}return r},u=function e(t,n,r){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,l=s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;null!==(l=u.exec(o))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(l[1])}return l&&f.push("["+o.slice(l.index)+"]"),a(f,n,r)}};e.exports=function(e,t){var n=t?r.assign({},t):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!=typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"==typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:o.delimiter,n.depth="number"==typeof n.depth?n.depth:o.depth,n.arrayLimit="number"==typeof n.arrayLimit?n.arrayLimit:o.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"==typeof n.decoder?n.decoder:o.decoder,n.allowDots="boolean"==typeof n.allowDots?n.allowDots:o.allowDots,n.plainObjects="boolean"==typeof n.plainObjects?n.plainObjects:o.plainObjects,n.allowPrototypes="boolean"==typeof n.allowPrototypes?n.allowPrototypes:o.allowPrototypes,n.parameterLimit="number"==typeof n.parameterLimit?n.parameterLimit:o.parameterLimit,n.strictNullHandling="boolean"==typeof n.strictNullHandling?n.strictNullHandling:o.strictNullHandling,""===e||null===e||void 0===e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?s(e,n):e,a=n.plainObjects?Object.create(null):{},l=Object.keys(i),c=0;c<l.length;++c){var f=l[c],h=u(f,i[f],n);a=r.merge(a,h,n)}return r.compact(a)}},function(e,t,n){"use strict";var r=n(15),i=n(169),o=n(1878),s=n(374);function a(e){this.request=e}a.prototype.reducer=function(e,t){if(void 0===e[t.name])return e[t.name]=t.value,e;var n=[e[t.name],t.value];return e[t.name]=n,e},a.prototype.prep=function(e){if(e.queryObj={},e.headersObj={},e.postData.jsonObj=!1,e.postData.paramsObj=!1,e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(this.reducer,{})),e.headers&&e.headers.length&&(e.headersObj=e.headers.reduceRight(function(e,t){return e[t.name]=t.value,e},{})),e.cookies&&e.cookies.length){var t=e.cookies.map(function(e){return e.name+"="+e.value});t.length&&(e.headersObj.cookie=t.join("; "))}function n(t){return t.some(function(t){return 0===e.postData.mimeType.indexOf(t)})}if(n(["multipart/mixed","multipart/related","multipart/form-data","multipart/alternative"]))e.postData.mimeType="multipart/form-data";else if(n(["application/x-www-form-urlencoded"]))e.postData.params?(e.postData.paramsObj=e.postData.params.reduce(this.reducer,{}),e.postData.text=i.stringify(e.postData.paramsObj)):e.postData.text="";else if(n(["text/json","text/x-json","application/json","application/x-json"])&&(e.postData.mimeType="application/json",e.postData.text))try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){this.request.debug(t),e.postData.mimeType="text/plain"}return e},a.prototype.options=function(e){if(!e.har)return e;var t={};if(s(t,e.har),t.log&&t.log.entries&&(t=t.log.entries[0]),t.url=t.url||e.url||e.uri||e.baseUrl||"/",t.httpVersion=t.httpVersion||"HTTP/1.1",t.queryString=t.queryString||[],t.headers=t.headers||[],t.cookies=t.cookies||[],t.postData=t.postData||{},t.postData.mimeType=t.postData.mimeType||"application/octet-stream",t.bodySize=0,t.headersSize=0,t.postData.size=0,!o.request(t))return e;var n=this.prep(t);function i(e){return 0===n.postData.mimeType.indexOf(e)}return n.url&&(e.url=n.url),n.method&&(e.method=n.method),Object.keys(n.queryObj).length&&(e.qs=n.queryObj),Object.keys(n.headersObj).length&&(e.headers=n.headersObj),i("application/x-www-form-urlencoded")?e.form=n.postData.paramsObj:i("application/json")?n.postData.jsonObj&&(e.body=n.postData.jsonObj,e.json=!0):i("multipart/form-data")?(e.formData={},n.postData.params.forEach(function(t){var n={};t.fileName||t.fileName||t.contentType?(t.fileName&&!t.value?n.value=r.createReadStream(t.fileName):t.value&&(n.value=t.value),t.fileName&&(n.options={filename:t.fileName,contentType:t.contentType?t.contentType:null}),e.formData[t.name]=n):e.formData[t.name]=t.value})):n.postData.text&&(e.body=n.postData.text),e},t.Har=a},function(e,t,n){var r=n(1879),i=n(1912),o=n(1913),s;function a(){var e=new r({allErrors:!0});return e.addMetaSchema(n(1932)),e.addSchema(o),e}function u(e,t){t=t||{},s=s||a();var n=s.getSchema(e+".json");return new Promise(function(e,r){var o=n(t);o?e(t):r(new i(n.errors))})}t.afterRequest=function(e){return u("afterRequest",e)},t.beforeRequest=function(e){return u("beforeRequest",e)},t.browser=function(e){return u("browser",e)},t.cache=function(e){return u("cache",e)},t.content=function(e){return u("content",e)},t.cookie=function(e){return u("cookie",e)},t.creator=function(e){return u("creator",e)},t.entry=function(e){return u("entry",e)},t.har=function(e){return u("har",e)},t.header=function(e){return u("header",e)},t.log=function(e){return u("log",e)},t.page=function(e){return u("page",e)},t.pageTimings=function(e){return u("pageTimings",e)},t.postData=function(e){return u("postData",e)},t.query=function(e){return u("query",e)},t.request=function(e){return u("request",e)},t.response=function(e){return u("response",e)},t.timings=function(e){return u("timings",e)}},function(e,t,n){"use strict";var r=n(1880),i=n(383),o=n(1884),s=n(722),a=n(723),u=n(1885),l=n(1886),c=n(1907),f=n(167);e.exports=y,y.prototype.validate=b,y.prototype.compile=v,y.prototype.addSchema=w,y.prototype.addMetaSchema=_,y.prototype.validateSchema=k,y.prototype.getSchema=E,y.prototype.removeSchema=A,y.prototype.addFormat=M,y.prototype.errorsText=N,y.prototype._addSchema=T,y.prototype._compile=j,y.prototype.compileAsync=n(1908);var h=n(1909);y.prototype.addKeyword=h.add,y.prototype.getKeyword=h.get,y.prototype.removeKeyword=h.remove,y.prototype.validateKeyword=h.validate;var p=n(385);y.ValidationError=p.Validation,y.MissingRefError=p.MissingRef,y.$dataMetaSchema=c;var d="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],g=["/properties"];function y(e){if(!(this instanceof y))return new y(e);e=this._opts=f.copy(e)||{},q(this),this._schemas={},this._refs={},this._fragments={},this._formats=u(e.format),this._cache=e.cache||new o,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=O(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=a),this._metaOpts=z(this),e.formats&&D(this),L(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),F(this)}function b(e,t){var n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error('no schema with key or ref "'+e+'"')}else{var r=this._addSchema(e);n=r.validate||this._compile(r)}var i=n(t);return!0!==n.$async&&(this.errors=n.errors),i}function v(e,t){var n=this._addSchema(e,void 0,t);return n.validate||this._compile(n)}function w(e,t,n,r){if(Array.isArray(e)){for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,n,r);return this}var s=this._getId(e);if(void 0!==s&&"string"!=typeof s)throw new Error("schema id must be string");return t=i.normalizeId(t||s),U(this,t),this._schemas[t]=this._addSchema(e,n,r,!0),this}function _(e,t,n){return this.addSchema(e,t,n,!0),this}function k(e,t){var n=e.$schema;if(void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this._opts.defaultMeta||S(this),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,e);if(!r&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return r}function S(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(d)?d:void 0,e._opts.defaultMeta}function E(e){var t=C(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return x(this,e)}}function x(e,t){var n=i.schema.call(e,{schema:{}},t);if(n){var o=n.schema,a=n.root,u=n.baseId,l=r.call(e,o,a,void 0,u);return e._fragments[t]=new s({ref:t,fragment:!0,schema:o,root:a,baseId:u,validate:l}),l}}function C(e,t){return t=i.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function A(e){if(e instanceof RegExp)return I(this,this._schemas,e),I(this,this._refs,e),this;switch(typeof e){case"undefined":return I(this,this._schemas),I(this,this._refs),this._cache.clear(),this;case"string":var t=C(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var n=this._opts.serialize,r=n?n(e):e;this._cache.del(r);var o=this._getId(e);o&&(o=i.normalizeId(o),delete this._schemas[o],delete this._refs[o])}return this}function I(e,t,n){for(var r in t){var i=t[r];i.meta||n&&!n.test(r)||(e._cache.del(i.cacheKey),delete t[r])}}function T(e,t,n,r){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o=this._opts.serialize,a=o?o(e):e,u=this._cache.get(a);if(u)return u;r=r||!1!==this._opts.addUsedSchema;var l=i.normalizeId(this._getId(e));l&&r&&U(this,l);var c=!1!==this._opts.validateSchema&&!t,f;c&&!(f=l&&l==i.normalizeId(e.$schema))&&this.validateSchema(e,!0);var h=i.ids.call(this,e),p=new s({id:l,schema:e,localRefs:h,cacheKey:a,meta:n});return"#"!=l[0]&&r&&(this._refs[l]=p),this._cache.put(a,p),c&&f&&this.validateSchema(e,!0),p}function j(e,t){if(e.compiling)return e.validate=o,o.schema=e.schema,o.errors=null,o.root=t||o,!0===e.schema.$async&&(o.$async=!0),o;var n,i;e.compiling=!0,e.meta&&(n=this._opts,this._opts=this._metaOpts);try{i=r.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=n)}return e.validate=i,e.refs=i.refs,e.refVal=i.refVal,e.root=i.root,i;function o(){var t=e.validate,n=t.apply(this,arguments);return o.errors=t.errors,n}}function O(e){switch(e.schemaId){case"auto":return R;case"id":return P;default:return B}}function P(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function B(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function R(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function N(e,t){if(e=e||this.errors,!e)return"No errors";t=t||{};for(var n=void 0===t.separator?", ":t.separator,r=void 0===t.dataVar?"data":t.dataVar,i="",o=0;o<e.length;o++){var s=e[o];s&&(i+=r+s.dataPath+" "+s.message+n)}return i.slice(0,-n.length)}function M(e,t){return"string"==typeof t&&(t=new RegExp(t)),this._formats[e]=t,this}function L(e){var t;if(e._opts.$data&&(t=n(1911),e.addMetaSchema(t,t.$id,!0)),!1!==e._opts.meta){var r=n(729);e._opts.$data&&(r=c(r,g)),e.addMetaSchema(r,d,!0),e._refs["http://json-schema.org/schema"]=d}}function F(e){var t=e._opts.schemas;if(t)if(Array.isArray(t))e.addSchema(t);else for(var n in t)e.addSchema(t[n],n)}function D(e){for(var t in e._opts.formats){var n=e._opts.formats[t];e.addFormat(t,n)}}function U(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function z(e){for(var t=f.copy(e._opts),n=0;n<m.length;n++)delete t[m[n]];return t}function q(e){var t=e._opts.logger;if(!1===t)e.logger={log:K,warn:K,error:K};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}function K(){}},function(e,t,n){"use strict";var r=n(383),i=n(167),o=n(385),s=n(723),a=n(724),u=i.ucs2length,l=n(384),c=o.Validation;function f(e,t,n,d){var w=this,_=this._opts,k=[void 0],S={},E=[],x={},C=[],A={},I=[];t=t||{schema:e,refVal:k,refs:S};var T=h.call(this,e,t,d),j=this._compilations[T.index];if(T.compiling)return j.callValidate=N;var O=this._formats,P=this.RULES;try{var B=M(e,t,n,d);j.validate=B;var R=j.callValidate;return R&&(R.schema=B.schema,R.errors=null,R.refs=B.refs,R.refVal=B.refVal,R.root=B.root,R.$async=B.$async,_.sourceCode&&(R.source=B.source)),B}finally{p.call(this,e,t,d)}function N(){var e=j.validate,t=e.apply(this,arguments);return N.errors=e.errors,t}function M(e,n,s,h){var p=!n||n&&n.schema==e;if(n.schema!=t.schema)return f.call(w,e,n,s,h);var d=!0===e.$async,x=a({isTop:!0,schema:e,isRoot:p,baseId:h,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:P,validate:a,util:i,resolve:r,resolveRef:L,usePattern:q,useDefault:K,useCustomRule:H,opts:_,formats:O,logger:w.logger,self:w}),A;x=v(k,y)+v(E,m)+v(C,g)+v(I,b)+x,_.processCode&&(x=_.processCode(x));try{var T=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",x);A=T(w,P,O,t,k,C,I,l,u,c),k[0]=A}catch(e){throw w.logger.error("Error compiling schema, function code:",x),e}return A.schema=e,A.errors=null,A.refs=S,A.refVal=k,A.root=p?A:n,d&&(A.$async=!0),!0===_.sourceCode&&(A.source={code:x,patterns:E,defaults:C}),A}function L(e,i,o){i=r.url(e,i);var s=S[i],a,u;if(void 0!==s)return a=k[s],u="refVal["+s+"]",z(a,u);if(!o&&t.refs){var l=t.refs[i];if(void 0!==l)return a=t.refVal[l],u=F(i,a),z(a,u)}u=F(i);var c=r.call(w,M,t,i);if(void 0===c){var h=n&&n[i];h&&(c=r.inlineRef(h,_.inlineRefs)?h:f.call(w,h,t,n,e))}if(void 0!==c)return U(i,c),z(c,u);D(i)}function F(e,t){var n=k.length;return k[n]=t,S[e]=n,"refVal"+n}function D(e){delete S[e]}function U(e,t){var n=S[e];k[n]=t}function z(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function q(e){var t=x[e];return void 0===t&&(t=x[e]=E.length,E[t]=e),"pattern"+t}function K(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(null===e)return"null";var t=s(e),n=A[t];return void 0===n&&(n=A[t]=C.length,C[n]=e),"default"+n}}function H(e,t,n,r){if(!1!==w._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every(function(e){return Object.prototype.hasOwnProperty.call(n,e)}))throw new Error("parent schema must have all required keywords: "+i.join(","));var o=e.definition.validateSchema;if(o){var s=o(t);if(!s){var a="keyword schema is invalid: "+w.errorsText(o.errors);if("log"!=w._opts.validateSchema)throw new Error(a);w.logger.error(a)}}}var u=e.definition.compile,l=e.definition.inline,c=e.definition.macro,f;if(u)f=u.call(w,t,n,r);else if(c)f=c.call(w,t,n,r),!1!==_.validateSchema&&w.validateSchema(f,!0);else if(l)f=l.call(w,r,e.keyword,t,n);else if(f=e.definition.validate,!f)return;if(void 0===f)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=I.length;return I[h]=f,{code:"customRule"+h,validate:f}}}function h(e,t,n){var r=d.call(this,e,t,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function p(e,t,n){var r=d.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function d(e,t,n){for(var r=0;r<this._compilations.length;r++){var i=this._compilations[r];if(i.schema==e&&i.root==t&&i.baseId==n)return r}return-1}function m(e,t){return"var pattern"+e+" = new RegExp("+i.toQuotedString(t[e])+");"}function g(e){return"var default"+e+" = defaults["+e+"];"}function y(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function b(e){return"var customRule"+e+" = customRules["+e+"];"}function v(e,t){if(!e.length)return"";for(var n="",r=0;r<e.length;r++)n+=t(r,e);return n}e.exports=f},function(e,t,n){
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */var r,i;r=this,i=function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i<r;++i)t[i]=t[i].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return void 0!==e&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function s(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}function a(e){var r="[A-Za-z]",i="[\\x0D]",o="[0-9]",s="[\\x22]",a=t("[0-9]","[A-Fa-f]"),u="[\\x0A]",l="[\\x20]",c=n(n("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+n("%[89A-Fa-f]"+a+"%"+a+a)+"|"+n("%"+a+a)),f="[\\:\\/\\?\\#\\[\\]\\@]",h="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",p=t(f,h),d=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",m=e?"[\\uE000-\\uF8FF]":"[]",g=t(r,"[0-9]","[\\-\\.\\_\\~]",d),y=n(r+t(r,"[0-9]","[\\+\\-\\.]")+"*"),b=n(n(c+"|"+t(g,h,"[\\:]"))+"*"),v=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("[1-9][0-9]")+"|[0-9]"),w=n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]"),_=n(w+"\\."+w+"\\."+w+"\\."+w),k=n(a+"{1,4}"),S=n(n(k+"\\:"+k)+"|"+_),E=n(n(k+"\\:")+"{6}"+S),x=n("\\:\\:"+n(k+"\\:")+"{5}"+S),C=n(n(k)+"?\\:\\:"+n(k+"\\:")+"{4}"+S),A=n(n(n(k+"\\:")+"{0,1}"+k)+"?\\:\\:"+n(k+"\\:")+"{3}"+S),I=n(n(n(k+"\\:")+"{0,2}"+k)+"?\\:\\:"+n(k+"\\:")+"{2}"+S),T=n(n(n(k+"\\:")+"{0,3}"+k)+"?\\:\\:"+k+"\\:"+S),j=n(n(n(k+"\\:")+"{0,4}"+k)+"?\\:\\:"+S),O=n(n(n(k+"\\:")+"{0,5}"+k)+"?\\:\\:"+k),P=n(n(n(k+"\\:")+"{0,6}"+k)+"?\\:\\:"),B=n([E,x,C,A,I,T,j,O,P].join("|")),R=n(n(g+"|"+c)+"+"),N=n(B+"\\%25"+R),M=n(B+n("\\%25|\\%(?!"+a+"{2})")+R),L=n("[vV]"+a+"+\\."+t(g,h,"[\\:]")+"+"),F=n("\\["+n(M+"|"+B+"|"+L)+"\\]"),D=n(n(c+"|"+t(g,h))+"*"),U=n(F+"|"+_+"(?!"+D+")|"+D),z=n("[0-9]*"),q=n(n(b+"@")+"?"+U+n("\\:"+z)+"?"),K=n(c+"|"+t(g,h,"[\\:\\@]")),H=n(K+"*"),V=n(K+"+"),W=n(n(c+"|"+t(g,h,"[\\@]"))+"+"),$=n(n("\\/"+H)+"*"),G=n("\\/"+n(V+$)+"?"),Y=n(W+$),J=n(V+$),Z="(?!"+K+")",X=n($+"|"+G+"|"+Y+"|"+J+"|"+Z),Q=n(n(K+"|"+t("[\\/\\?]",m))+"*"),ee=n(n(K+"|[\\/\\?]")+"*"),te=n(n("\\/\\/"+q+$)+"|"+G+"|"+J+"|"+Z),ne=n(y+"\\:"+te+n("\\?"+Q)+"?"+n("\\#"+ee)+"?"),re=n(n("\\/\\/"+q+$)+"|"+G+"|"+Y+"|"+Z),ie=n(re+n("\\?"+Q)+"?"+n("\\#"+ee)+"?"),oe=n(ne+"|"+ie),se=n(y+"\\:"+te+n("\\?"+Q)+"?"),ae="^("+y+")\\:"+n(n("\\/\\/("+n("("+b+")@")+"?("+U+")"+n("\\:("+z+")")+"?)")+"?("+$+"|"+G+"|"+J+"|"+Z+")")+n("\\?("+Q+")")+"?"+n("\\#("+ee+")")+"?$",ue="^(){0}"+n(n("\\/\\/("+n("("+b+")@")+"?("+U+")"+n("\\:("+z+")")+"?)")+"?("+$+"|"+G+"|"+Y+"|"+Z+")")+n("\\?("+Q+")")+"?"+n("\\#("+ee+")")+"?$",le="^("+y+")\\:"+n(n("\\/\\/("+n("("+b+")@")+"?("+U+")"+n("\\:("+z+")")+"?)")+"?("+$+"|"+G+"|"+J+"|"+Z+")")+n("\\?("+Q+")")+"?$",ce="^"+n("\\#("+ee+")")+"?$",fe="^"+n("("+b+")@")+"?("+U+")"+n("\\:("+z+")")+"?$";return{NOT_SCHEME:new RegExp(t("[^]",r,"[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",g,h),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",g,h),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",g,h),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",g,h),"g"),NOT_QUERY:new RegExp(t("[^\\%]",g,h,"[\\:\\@\\/\\?]",m),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",g,h,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",g,h),"g"),UNRESERVED:new RegExp(g,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",g,p),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+_+")$"),IPV6ADDRESS:new RegExp("^\\[?("+B+")"+n(n("\\%25|\\%(?!"+a+"{2})")+"("+R+")")+"?\\]?$")}}var u=a(!1),l=a(!0),c=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,y=700,b=72,v=128,w="-",_=/^xn--/,k=/[^\0-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=35,C=Math.floor,A=String.fromCharCode;function I(e){throw new RangeError(E[e])}function T(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function j(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(S,".");var i=e.split("."),o=T(i,t).join(".");return r+o}function O(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}var P=function e(t){return String.fromCodePoint.apply(String,f(t))},B=function e(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36},R=function e(t,n){return t+22+75*(t<26)-((0!=n)<<5)},N=function e(t,n,r){var i=0;for(t=r?C(t/700):t>>1,t+=C(t/n);t>455;i+=36)t=C(t/35);return C(i+36*t/(t+38))},M=function e(t){var n=[],r=t.length,i=0,o=128,s=72,a=t.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)t.charCodeAt(u)>=128&&I("not-basic"),n.push(t.charCodeAt(u));for(var l=a>0?a+1:0;l<r;){for(var c=i,f=1,p=36;;p+=36){l>=r&&I("invalid-input");var d=B(t.charCodeAt(l++));(d>=36||d>C((h-i)/f))&&I("overflow"),i+=d*f;var m=p<=s?1:p>=s+26?26:p-s;if(d<m)break;var g=36-m;f>C(h/g)&&I("overflow"),f*=g}var y=n.length+1;s=N(i-c,y,0==c),C(i/y)>h-o&&I("overflow"),o+=C(i/y),i%=y,n.splice(i++,0,o)}return String.fromCodePoint.apply(String,n)},L=function e(t){var n=[];t=O(t);var r=t.length,i=128,o=0,s=72,a=!0,u=!1,l=void 0;try{for(var c=t[Symbol.iterator](),f;!(a=(f=c.next()).done);a=!0){var p=f.value;p<128&&n.push(A(p))}}catch(e){u=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}var d=n.length,m=d;for(d&&n.push("-");m<r;){var g=h,y=!0,b=!1,v=void 0;try{for(var w=t[Symbol.iterator](),_;!(y=(_=w.next()).done);y=!0){var k=_.value;k>=i&&k<g&&(g=k)}}catch(e){b=!0,v=e}finally{try{!y&&w.return&&w.return()}finally{if(b)throw v}}var S=m+1;g-i>C((h-o)/S)&&I("overflow"),o+=(g-i)*S,i=g;var E=!0,x=!1,T=void 0;try{for(var j=t[Symbol.iterator](),P;!(E=(P=j.next()).done);E=!0){var B=P.value;if(B<i&&++o>h&&I("overflow"),B==i){for(var M=o,L=36;;L+=36){var F=L<=s?1:L>=s+26?26:L-s;if(M<F)break;var D=M-F,U=36-F;n.push(A(R(F+D%U,0))),M=C(D/U)}n.push(A(R(M,0))),s=N(o,S,m==d),o=0,++m}}}catch(e){x=!0,T=e}finally{try{!E&&j.return&&j.return()}finally{if(x)throw T}}++o,++i}return n.join("")},F=function e(t){return j(t,function(e){return _.test(e)?M(e.slice(4).toLowerCase()):e})},D=function e(t){return j(t,function(e){return k.test(e)?"xn--"+L(e):e})},U={version:"2.1.0",ucs2:{decode:O,encode:P},decode:M,encode:L,toASCII:D,toUnicode:F},z={};function q(e){var t=e.charCodeAt(0),n=void 0;return n=t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase(),n}function K(e){for(var t="",n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var s=parseInt(e.substr(n+4,2),16),a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function H(e,t){function n(e){var n=K(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,q).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,q).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,q).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,q).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,q).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function W(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=c(n,2),i=r[1];return i?i.split(".").map(V).join("."):e}function $(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=c(n,3),i=r[1],o=r[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),u=a[0],l=a[1],f=l?l.split(":").map(V):[],h=u.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),y=0;y<d;++y)g[y]=f[y]||h[m+y]||"";p&&(g[d-1]=W(g[d-1],t));var b=g.reduce(function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e},[]),v=b.sort(function(e,t){return t.length-e.length})[0],w=void 0;if(v&&v.length>1){var _=g.slice(0,v.index),k=g.slice(v.index+v.length);w=_.join(":")+"::"+k.join(":")}else w=g.join(":");return o&&(w+="%"+o),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Y=void 0==="".match(/(){0}/)[1];function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?l:u;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){Y?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=$(W(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=z[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)H(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=U.toASCII(n.host.replace(r.PCT_ENCODED,K).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}H(n,u)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function Z(e,t){var n=!1!==t.iri?l:u,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push($(W(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"})),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}var X=/^\.\.?\//,Q=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Q))e=e.replace(Q,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(te);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?l:u,r=[],i=z[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(n.PCT_ENCODED,K).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}H(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=Z(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var s=e.path;t.absolutePath||i&&i.absolutePath||(s=ne(s)),void 0===o&&(s=s.replace(/^\/\//,"/%2F")),r.push(s)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i={};return r||(e=J(re(e,n),n),t=J(re(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=ne(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=ne(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=ne(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=ne(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function oe(e,t,n){var r=s({scheme:"null"},n);return re(ie(J(e,r),J(t,r),r,!0),r)}function se(e,t){return"string"==typeof e?e=re(J(e,t),t):"object"===r(e)&&(e=J(re(e,t),t)),e}function ae(e,t,n){return"string"==typeof e?e=re(J(e,n),n):"object"===r(e)&&(e=re(e,n)),"string"==typeof t?t=re(J(t,n),n):"object"===r(t)&&(t=re(t,n)),e===t}function ue(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:u.ESCAPE,q)}function le(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:u.PCT_ENCODED,K)}var ce={scheme:"http",domainHost:!0,parse:function e(t,n){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function e(t,n){return t.port!==("https"!==String(t.scheme).toLowerCase()?80:443)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},fe={scheme:"https",domainHost:ce.domainHost,parse:ce.parse,serialize:ce.serialize},he={},pe=!0,de="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",me="[0-9A-Fa-f]",ge=n(n("%[EFef][0-9A-Fa-f]%"+me+me+"%"+me+me)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+me+me)+"|"+n("%"+me+me)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",ve=t(be,'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",_e=new RegExp(de,"g"),ke=new RegExp(ge,"g"),Se=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',ve),"g"),Ee=new RegExp(t("[^]",de,we),"g"),xe=Ee;function Ce(e){var t=K(e);return t.match(_e)?t:e}var Ae={scheme:"mailto",parse:function e(t,n){var r=t,i=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,s={},a=r.query.split("&"),u=0,l=a.length;u<l;++u){var c=a[u].split("=");switch(c[0]){case"to":for(var f=c[1].split(","),h=0,p=f.length;h<p;++h)i.push(f[h]);break;case"subject":r.subject=le(c[1],n);break;case"body":r.body=le(c[1],n);break;default:o=!0,s[le(c[0],n)]=le(c[1],n)}}o&&(r.headers=s)}r.query=void 0;for(var d=0,m=i.length;d<m;++d){var g=i[d].split("@");if(g[0]=le(g[0]),n.unicodeSupport)g[1]=le(g[1],n).toLowerCase();else try{g[1]=U.toASCII(le(g[1],n).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}i[d]=g.join("@")}return r},serialize:function e(t,n){var r=t,s=o(t.to);if(s){for(var a=0,u=s.length;a<u;++a){var l=String(s[a]),c=l.lastIndexOf("@"),f=l.slice(0,c).replace(ke,Ce).replace(ke,i).replace(Se,q),h=l.slice(c+1);try{h=n.iri?U.toUnicode(h):U.toASCII(le(h,n).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(n.iri?"Unicode":"ASCII")+" via punycode: "+e}s[a]=f+"@"+h}r.path=s.join(",")}var p=t.headers=t.headers||{};t.subject&&(p.subject=t.subject),t.body&&(p.body=t.body);var d=[];for(var m in p)p[m]!==he[m]&&d.push(m.replace(ke,Ce).replace(ke,i).replace(Ee,q)+"="+p[m].replace(ke,Ce).replace(ke,i).replace(xe,q));return d.length&&(r.query=d.join("&")),r}},Ie=/^([^\:]+)\:(.*)/,Te={scheme:"urn",parse:function e(t,n){var r=t.path&&t.path.match(Ie),i=t;if(r){var o=n.scheme||i.scheme||"urn",s=r[1].toLowerCase(),a=r[2],u=o+":"+(n.nid||s),l=z[u];i.nid=s,i.nss=a,i.path=void 0,l&&(i=l.parse(i,n))}else i.error=i.error||"URN can not be parsed.";return i},serialize:function e(t,n){var r=n.scheme||t.scheme||"urn",i=t.nid,o=r+":"+(n.nid||i),s=z[o];s&&(t=s.serialize(t,n));var a=t,u=t.nss;return a.path=(i||n.nid)+":"+u,a}},je=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function e(t,n){var r=t;return r.uuid=r.nss,r.nss=void 0,n.tolerant||r.uuid&&r.uuid.match(je)||(r.error=r.error||"UUID is not valid."),r},serialize:function e(t,n){var r=t;return r.nss=(t.uuid||"").toLowerCase(),r}};z[ce.scheme]=ce,z[fe.scheme]=fe,z[Ae.scheme]=Ae,z[Te.scheme]=Te,z[Oe.scheme]=Oe,e.SCHEMES=z,e.pctEncChar=q,e.pctDecChars=K,e.parse=J,e.removeDotSegments=ne,e.serialize=re,e.resolveComponents=ie,e.resolve=oe,e.normalize=se,e.equal=ae,e.escapeComponent=ue,e.unescapeComponent=le,Object.defineProperty(e,"__esModule",{value:!0})},i(t)},function(e,t,n){"use strict";e.exports=function e(t){for(var n=0,r=t.length,i=0,o;i<r;)n++,o=t.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=t.charCodeAt(i),56320==(64512&o)&&i++);return n}},function(e,t,n){"use strict";var r=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),n=t.cb||n;var r="function"==typeof n?n:n.pre||function(){},o=n.post||function(){};i(t,r,o,e,"",e)};function i(e,t,n,s,a,u,l,c,f,h){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var p in t(s,a,u,l,c,f,h),s){var d=s[p];if(Array.isArray(d)){if(p in r.arrayKeywords)for(var m=0;m<d.length;m++)i(e,t,n,d[m],a+"/"+p+"/"+m,u,a,p,s,m)}else if(p in r.propsKeywords){if(d&&"object"==typeof d)for(var g in d)i(e,t,n,d[g],a+"/"+p+"/"+o(g),u,a,p,s,g)}else(p in r.keywords||e.allKeys&&!(p in r.skipKeywords))&&i(e,t,n,d,a+"/"+p,u,a,p,s)}n(s,a,u,l,c,f,h)}}function o(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},function(e,t,n){"use strict";var r=e.exports=function e(){this._cache={}};r.prototype.put=function e(t,n){this._cache[t]=n},r.prototype.get=function e(t){return this._cache[t]},r.prototype.del=function e(t){delete this._cache[t]},r.prototype.clear=function e(){this._cache={}}},function(e,t,n){"use strict";var r=n(167),i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,a=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,f=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,p=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function g(e){return e="full"==e?"full":"fast",r.copy(g[e])}function y(e){return e%4==0&&(e%100!=0||e%400==0)}function b(e){var t=e.match(i);if(!t)return!1;var n=+t[1],r=+t[2],s=+t[3];return r>=1&&r<=12&&s>=1&&s<=(2==r&&y(n)?29:o[r])}function v(e,t){var n=e.match(s);if(!n)return!1;var r=n[1],i=n[2],o=n[3],a=n[5];return(r<=23&&i<=59&&o<=59||23==r&&59==i&&60==o)&&(!t||a)}e.exports=g,g.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:f,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:C,uuid:h,"json-pointer":p,"json-pointer-uri-fragment":d,"relative-json-pointer":m},g.full={date:b,time:v,"date-time":_,uri:E,"uri-reference":l,"uri-template":c,url:f,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:k,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:C,uuid:h,"json-pointer":p,"json-pointer-uri-fragment":d,"relative-json-pointer":m};var w=/t|\s/i;function _(e){var t=e.split(w);return 2==t.length&&b(t[0])&&v(t[1],!0)}function k(e){return e.length<=255&&a.test(e)}var S=/\/|:/;function E(e){return S.test(e)&&u.test(e)}var x=/[^\\]\\Z/;function C(e){if(x.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(1887),i=n(167).toHash;e.exports=function e(){var t=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],n=["type","$comment"],o=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],s=["number","integer","string","array","object","boolean","null"];return t.all=i(n),t.types=i(s),t.forEach(function(e){e.rules=e.rules.map(function(e){var i;if("object"==typeof e){var o=Object.keys(e)[0];i=e[o],e=o,i.forEach(function(e){n.push(e),t.all[e]=!0})}n.push(e);var s=t.all[e]={keyword:e,code:r[e],implements:i};return s}),t.all.$comment={keyword:"$comment",code:r.$comment},e.type&&(t.types[e.type]=e)}),t.keywords=i(n.concat(o)),t.custom={},t}},function(e,t,n){"use strict";e.exports={$ref:n(1888),allOf:n(1889),anyOf:n(1890),$comment:n(1891),const:n(1892),contains:n(1893),dependencies:n(1894),enum:n(1895),format:n(1896),if:n(1897),items:n(1898),maximum:n(725),minimum:n(725),maxItems:n(726),minItems:n(726),maxLength:n(727),minLength:n(727),maxProperties:n(728),minProperties:n(728),multipleOf:n(1899),not:n(1900),oneOf:n(1901),pattern:n(1902),properties:n(1903),propertyNames:n(1904),required:n(1905),uniqueItems:n(1906),validate:n(724)}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.errSchemaPath+"/"+n,l=!t.opts.allErrors,c="data"+(s||""),f="valid"+o,h,p;if("#"==a||"#/"==a)t.isRoot?(h=t.async,p="validate"):(h=!0===t.root.schema.$async,p="root.refVal[0]");else{var d=t.resolveRef(t.baseId,a,t.isRoot);if(void 0===d){var m=t.MissingRefError.message(t.baseId,a);if("fail"==t.opts.missingRefs){t.logger.error(m);var g=g||[];g.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(u)+" , params: { ref: '"+t.util.escapeQuotes(a)+"' } ",!1!==t.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+t.util.escapeQuotes(a)+"' "),t.opts.verbose&&(i+=" , schema: "+t.util.toQuotedString(a)+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var y=i;i=g.pop(),!t.compositeRule&&l?t.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(i+=" if (false) { ")}else{if("ignore"!=t.opts.missingRefs)throw new t.MissingRefError(t.baseId,a,m);t.logger.warn(m),l&&(i+=" if (true) { ")}}else if(d.inline){var b=t.util.copy(t);b.level++;var v="valid"+b.level;b.schema=d.schema,b.schemaPath="",b.errSchemaPath=a;var w=t.validate(b).replace(/validate\.schema/g,d.code);i+=" "+w+" ",l&&(i+=" if ("+v+") { ")}else h=!0===d.$async||t.async&&!1!==d.$async,p=d.code}if(p){var g=g||[];g.push(i),i="",t.opts.passContext?i+=" "+p+".call(this, ":i+=" "+p+"( ",i+=" "+c+", (dataPath || '')",'""'!=t.errorPath&&(i+=" + "+t.errorPath);var _=s?"data"+(s-1||""):"parentData",k=s?t.dataPathArr[s]:"parentDataProperty";i+=" , "+_+" , "+k+", rootData) ";var S=i;if(i=g.pop(),h){if(!t.async)throw new Error("async schema referenced by sync schema");l&&(i+=" var "+f+"; "),i+=" try { await "+S+"; ",l&&(i+=" "+f+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(i+=" "+f+" = false; "),i+=" } ",l&&(i+=" if ("+f+") { ")}else i+=" if (!"+S+") { if (vErrors === null) vErrors = "+p+".errors; else vErrors = vErrors.concat("+p+".errors); errors = vErrors.length; } ",l&&(i+=" else { ")}return i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.schema[n],s=t.schemaPath+t.util.getProperty(n),a=t.errSchemaPath+"/"+n,u=!t.opts.allErrors,l=t.util.copy(t),c="";l.level++;var f="valid"+l.level,h=l.baseId,p=!0,d=o;if(d)for(var m,g=-1,y=d.length-1;g<y;)m=d[g+=1],t.util.schemaHasRules(m,t.RULES.all)&&(p=!1,l.schema=m,l.schemaPath=s+"["+g+"]",l.errSchemaPath=a+"/"+g,i+=" "+t.validate(l)+" ",l.baseId=h,u&&(i+=" if ("+f+") { ",c+="}"));return u&&(i+=p?" if (true) { ":" "+c.slice(0,-1)+" "),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p="errs__"+o,d=t.util.copy(t),m="";d.level++;var g="valid"+d.level,y=a.every(function(e){return t.util.schemaHasRules(e,t.RULES.all)});if(y){var b=d.baseId;i+=" var "+p+" = errors; var "+h+" = false; ";var v=t.compositeRule;t.compositeRule=d.compositeRule=!0;var w=a;if(w)for(var _,k=-1,S=w.length-1;k<S;)_=w[k+=1],d.schema=_,d.schemaPath=u+"["+k+"]",d.errSchemaPath=l+"/"+k,i+=" "+t.validate(d)+" ",d.baseId=b,i+=" "+h+" = "+h+" || "+g+"; if (!"+h+") { ",m+="}";t.compositeRule=d.compositeRule=v,i+=" "+m+" if (!"+h+") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: 'should match some schema in anyOf' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&c&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",t.opts.allErrors&&(i+=" } "),i=t.util.cleanUpCode(i)}else c&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.schema[n],s=t.errSchemaPath+"/"+n,a=!t.opts.allErrors,u=t.util.toQuotedString(o);return!0===t.opts.$comment?i+=" console.log("+u+");":"function"==typeof t.opts.$comment&&(i+=" self._opts.$comment("+u+", "+t.util.toQuotedString(s)+", validate.root.schema);"),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a,p||(i+=" var schema"+o+" = validate.schema"+u+";"),i+="var "+h+" = equal("+f+", schema"+o+"); if (!"+h+") { ";var m=m||[];m.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { allowedValue: schema"+o+" } ",!1!==t.opts.messages&&(i+=" , message: 'should be equal to constant' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p="errs__"+o,d=t.util.copy(t),m="";d.level++;var g="valid"+d.level,y="i"+o,b=d.dataLevel=t.dataLevel+1,v="data"+b,w=t.baseId,_=t.util.schemaHasRules(a,t.RULES.all);if(i+="var "+p+" = errors;var "+h+";",_){var k=t.compositeRule;t.compositeRule=d.compositeRule=!0,d.schema=a,d.schemaPath=u,d.errSchemaPath=l,i+=" var "+g+" = false; for (var "+y+" = 0; "+y+" < "+f+".length; "+y+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,y,t.opts.jsonPointers,!0);var S=f+"["+y+"]";d.dataPathArr[b]=y;var E=t.validate(d);d.baseId=w,t.util.varOccurences(E,v)<2?i+=" "+t.util.varReplace(E,v,S)+" ":i+=" var "+v+" = "+S+"; "+E+" ",i+=" if ("+g+") break; } ",t.compositeRule=d.compositeRule=k,i+=" if (!"+g+") {"}else i+=" if ("+f+".length == 0) {";var x=x||[];x.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: 'should contain a valid item' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var C=i;return i=x.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",_&&(i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "),t.opts.allErrors&&(i+=" } "),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="errs__"+o,p=t.util.copy(t),d="";p.level++;var m="valid"+p.level,g={},y={},b=t.opts.ownProperties;for(k in a){var v=a[k],w=Array.isArray(v)?y:g;w[k]=v}i+="var "+h+" = errors;";var _=t.errorPath;for(var k in i+="var missing"+o+";",y)if(w=y[k],w.length){if(i+=" if ( "+f+t.util.getProperty(k)+" !== undefined ",b&&(i+=" && Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(k)+"') "),c){i+=" && ( ";var S=w;if(S)for(var E,x=-1,C=S.length-1;x<C;){E=S[x+=1],x&&(i+=" || ");var A=t.util.getProperty(E),I=f+A;i+=" ( ( "+I+" === undefined ",b&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(E)+"') "),i+=") && (missing"+o+" = "+t.util.toQuotedString(t.opts.jsonPointers?E:A)+") ) "}i+=")) { ";var T="missing"+o,j="' + "+T+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(_,T,!0):_+" + "+T);var O=O||[];O.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { property: '"+t.util.escapeQuotes(k)+"', missingProperty: '"+j+"', depsCount: "+w.length+", deps: '"+t.util.escapeQuotes(1==w.length?w[0]:w.join(", "))+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should have ",1==w.length?i+="property "+t.util.escapeQuotes(w[0]):i+="properties "+t.util.escapeQuotes(w.join(", ")),i+=" when property "+t.util.escapeQuotes(k)+" is present' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var P=i;i=O.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var B=w;if(B)for(var E,R=-1,N=B.length-1;R<N;){E=B[R+=1];var A=t.util.getProperty(E),j=t.util.escapeQuotes(E),I=f+A;t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(_,E,t.opts.jsonPointers)),i+=" if ( "+I+" === undefined ",b&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(E)+"') "),i+=") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { property: '"+t.util.escapeQuotes(k)+"', missingProperty: '"+j+"', depsCount: "+w.length+", deps: '"+t.util.escapeQuotes(1==w.length?w[0]:w.join(", "))+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should have ",1==w.length?i+="property "+t.util.escapeQuotes(w[0]):i+="properties "+t.util.escapeQuotes(w.join(", ")),i+=" when property "+t.util.escapeQuotes(k)+" is present' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",c&&(d+="}",i+=" else { ")}t.errorPath=_;var M=p.baseId;for(var k in g){var v=g[k];t.util.schemaHasRules(v,t.RULES.all)&&(i+=" "+m+" = true; if ( "+f+t.util.getProperty(k)+" !== undefined ",b&&(i+=" && Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(k)+"') "),i+=") { ",p.schema=v,p.schemaPath=u+t.util.getProperty(k),p.errSchemaPath=l+"/"+t.util.escapeFragment(k),i+=" "+t.validate(p)+" ",p.baseId=M,i+=" } ",c&&(i+=" if ("+m+") { ",d+="}"))}return c&&(i+=" "+d+" if ("+h+" == errors) {"),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="i"+o,g="schema"+o;p||(i+=" var "+g+" = validate.schema"+u+";"),i+="var "+h+";",p&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=h+" = false;for (var "+m+"=0; "+m+"<"+g+".length; "+m+"++) if (equal("+f+", "+g+"["+m+"])) { "+h+" = true; break; }",p&&(i+=" } "),i+=" if (!"+h+") { ";var y=y||[];y.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { allowedValues: schema"+o+" } ",!1!==t.opts.messages&&(i+=" , message: 'should be equal to one of the allowed values' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var b=i;return i=y.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||"");if(!1===t.opts.format)return c&&(i+=" if (true) { "),i;var h=t.opts.$data&&a&&a.$data,p;h?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",p="schema"+o):p=a;var d=t.opts.unknownFormats,m=Array.isArray(d);if(h){var g="format"+o,y="isObject"+o,b="formatType"+o;i+=" var "+g+" = formats["+p+"]; var "+y+" = typeof "+g+" == 'object' && !("+g+" instanceof RegExp) && "+g+".validate; var "+b+" = "+y+" && "+g+".type || 'string'; if ("+y+") { ",t.async&&(i+=" var async"+o+" = "+g+".async; "),i+=" "+g+" = "+g+".validate; } if ( ",h&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" (","ignore"!=d&&(i+=" ("+p+" && !"+g+" ",m&&(i+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "),i+=") || "),i+=" ("+g+" && "+b+" == '"+r+"' && !(typeof "+g+" == 'function' ? ",t.async?i+=" (async"+o+" ? await "+g+"("+f+") : "+g+"("+f+")) ":i+=" "+g+"("+f+") ",i+=" : "+g+".test("+f+"))))) {"}else{var g=t.formats[a];if(!g){if("ignore"==d)return t.logger.warn('unknown format "'+a+'" ignored in schema at path "'+t.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(m&&d.indexOf(a)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+a+'" is used in schema at path "'+t.errSchemaPath+'"')}var y="object"==typeof g&&!(g instanceof RegExp)&&g.validate,b=y&&g.type||"string";if(y){var v=!0===g.async;g=g.validate}if(b!=r)return c&&(i+=" if (true) { "),i;if(v){if(!t.async)throw new Error("async format in sync schema");var w="formats"+t.util.getProperty(a)+".validate";i+=" if (!(await "+w+"("+f+"))) { "}else{i+=" if (! ";var w="formats"+t.util.getProperty(a);y&&(w+=".validate"),i+="function"==typeof g?" "+w+"("+f+") ":" "+w+".test("+f+") ",i+=") { "}}var _=_||[];_.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { format: ",i+=h?""+p:""+t.util.toQuotedString(a),i+=" } ",!1!==t.opts.messages&&(i+=" , message: 'should match format \"",i+=h?"' + "+p+" + '":""+t.util.escapeQuotes(a),i+="\"' "),t.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+t.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var k=i;return i=_.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p="errs__"+o,d=t.util.copy(t);d.level++;var m="valid"+d.level,g=t.schema.then,y=t.schema.else,b=void 0!==g&&t.util.schemaHasRules(g,t.RULES.all),v=void 0!==y&&t.util.schemaHasRules(y,t.RULES.all),w=d.baseId;if(b||v){var _;d.createErrors=!1,d.schema=a,d.schemaPath=u,d.errSchemaPath=l,i+=" var "+p+" = errors; var "+h+" = true; ";var k=t.compositeRule;t.compositeRule=d.compositeRule=!0,i+=" "+t.validate(d)+" ",d.baseId=w,d.createErrors=!0,i+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",t.compositeRule=d.compositeRule=k,b?(i+=" if ("+m+") { ",d.schema=t.schema.then,d.schemaPath=t.schemaPath+".then",d.errSchemaPath=t.errSchemaPath+"/then",i+=" "+t.validate(d)+" ",d.baseId=w,i+=" "+h+" = "+m+"; ",b&&v?(_="ifClause"+o,i+=" var "+_+" = 'then'; "):_="'then'",i+=" } ",v&&(i+=" else { ")):i+=" if (!"+m+") { ",v&&(d.schema=t.schema.else,d.schemaPath=t.schemaPath+".else",d.errSchemaPath=t.errSchemaPath+"/else",i+=" "+t.validate(d)+" ",d.baseId=w,i+=" "+h+" = "+m+"; ",b&&v?(_="ifClause"+o,i+=" var "+_+" = 'else'; "):_="'else'",i+=" } "),i+=" if (!"+h+") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { failingKeyword: "+_+" } ",!1!==t.opts.messages&&(i+=" , message: 'should match \"' + "+_+" + '\" schema' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&c&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { "),i=t.util.cleanUpCode(i)}else c&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p="errs__"+o,d=t.util.copy(t),m="";d.level++;var g="valid"+d.level,y="i"+o,b=d.dataLevel=t.dataLevel+1,v="data"+b,w=t.baseId;if(i+="var "+p+" = errors;var "+h+";",Array.isArray(a)){var _=t.schema.additionalItems;if(!1===_){i+=" "+h+" = "+f+".length <= "+a.length+"; ";var k=l;l=t.errSchemaPath+"/additionalItems",i+=" if (!"+h+") { ";var S=S||[];S.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { limit: "+a.length+" } ",!1!==t.opts.messages&&(i+=" , message: 'should NOT have more than "+a.length+" items' "),t.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var E=i;i=S.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+E+"]); ":i+=" validate.errors = ["+E+"]; return false; ":i+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l=k,c&&(m+="}",i+=" else { ")}var x=a;if(x)for(var C,A=-1,I=x.length-1;A<I;)if(C=x[A+=1],t.util.schemaHasRules(C,t.RULES.all)){i+=" "+g+" = true; if ("+f+".length > "+A+") { ";var T=f+"["+A+"]";d.schema=C,d.schemaPath=u+"["+A+"]",d.errSchemaPath=l+"/"+A,d.errorPath=t.util.getPathExpr(t.errorPath,A,t.opts.jsonPointers,!0),d.dataPathArr[b]=A;var j=t.validate(d);d.baseId=w,t.util.varOccurences(j,v)<2?i+=" "+t.util.varReplace(j,v,T)+" ":i+=" var "+v+" = "+T+"; "+j+" ",i+=" } ",c&&(i+=" if ("+g+") { ",m+="}")}if("object"==typeof _&&t.util.schemaHasRules(_,t.RULES.all)){d.schema=_,d.schemaPath=t.schemaPath+".additionalItems",d.errSchemaPath=t.errSchemaPath+"/additionalItems",i+=" "+g+" = true; if ("+f+".length > "+a.length+") { for (var "+y+" = "+a.length+"; "+y+" < "+f+".length; "+y+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,y,t.opts.jsonPointers,!0);var T=f+"["+y+"]";d.dataPathArr[b]=y;var j=t.validate(d);d.baseId=w,t.util.varOccurences(j,v)<2?i+=" "+t.util.varReplace(j,v,T)+" ":i+=" var "+v+" = "+T+"; "+j+" ",c&&(i+=" if (!"+g+") break; "),i+=" } } ",c&&(i+=" if ("+g+") { ",m+="}")}}else if(t.util.schemaHasRules(a,t.RULES.all)){d.schema=a,d.schemaPath=u,d.errSchemaPath=l,i+=" for (var "+y+" = 0; "+y+" < "+f+".length; "+y+"++) { ",d.errorPath=t.util.getPathExpr(t.errorPath,y,t.opts.jsonPointers,!0);var T=f+"["+y+"]";d.dataPathArr[b]=y;var j=t.validate(d);d.baseId=w,t.util.varOccurences(j,v)<2?i+=" "+t.util.varReplace(j,v,T)+" ":i+=" var "+v+" = "+T+"; "+j+" ",c&&(i+=" if (!"+g+") break; "),i+=" }"}return c&&(i+=" "+m+" if ("+p+" == errors) {"),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h=t.opts.$data&&a&&a.$data,p;h?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",p="schema"+o):p=a,i+="var division"+o+";if (",h&&(i+=" "+p+" !== undefined && ( typeof "+p+" != 'number' || "),i+=" (division"+o+" = "+f+" / "+p+", ",t.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+t.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var d=d||[];d.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { multipleOf: "+p+" } ",!1!==t.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+p:p+"'"),t.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="errs__"+o,p=t.util.copy(t);p.level++;var d="valid"+p.level;if(t.util.schemaHasRules(a,t.RULES.all)){p.schema=a,p.schemaPath=u,p.errSchemaPath=l,i+=" var "+h+" = errors; ";var m=t.compositeRule,g;t.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.opts.allErrors&&(g=p.opts.allErrors,p.opts.allErrors=!1),i+=" "+t.validate(p)+" ",p.createErrors=!0,g&&(p.opts.allErrors=g),t.compositeRule=p.compositeRule=m,i+=" if ("+d+") { ";var y=y||[];y.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: 'should NOT be valid' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var b=i;i=y.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",t.opts.allErrors&&(i+=" } ")}else i+=" var err = ",!1!==t.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(i+=" , message: 'should NOT be valid' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p="errs__"+o,d=t.util.copy(t),m="";d.level++;var g="valid"+d.level,y=d.baseId,b="prevValid"+o,v="passingSchemas"+o;i+="var "+p+" = errors , "+b+" = false , "+h+" = false , "+v+" = null; ";var w=t.compositeRule;t.compositeRule=d.compositeRule=!0;var _=a;if(_)for(var k,S=-1,E=_.length-1;S<E;)k=_[S+=1],t.util.schemaHasRules(k,t.RULES.all)?(d.schema=k,d.schemaPath=u+"["+S+"]",d.errSchemaPath=l+"/"+S,i+=" "+t.validate(d)+" ",d.baseId=y):i+=" var "+g+" = true; ",S&&(i+=" if ("+g+" && "+b+") { "+h+" = false; "+v+" = ["+v+", "+S+"]; } else { ",m+="}"),i+=" if ("+g+") { "+h+" = "+b+" = true; "+v+" = "+S+"; }";return t.compositeRule=d.compositeRule=w,i+=m+"if (!"+h+") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { passingSchemas: "+v+" } ",!1!==t.opts.messages&&(i+=" , message: 'should match exactly one schema in oneOf' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&c&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }",t.opts.allErrors&&(i+=" } "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h=t.opts.$data&&a&&a.$data,p;h?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",p="schema"+o):p=a;var d=h?"(new RegExp("+p+"))":t.usePattern(a);i+="if ( ",h&&(i+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "),i+=" !"+d+".test("+f+") ) { ";var m=m||[];m.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { pattern: ",i+=h?""+p:""+t.util.toQuotedString(a),i+=" } ",!1!==t.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+p+" + '":""+t.util.escapeQuotes(a),i+="\"' "),t.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+u:""+t.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="errs__"+o,p=t.util.copy(t),d="";p.level++;var m="valid"+p.level,g="key"+o,y="idx"+o,b=p.dataLevel=t.dataLevel+1,v="data"+b,w="dataProperties"+o,_=Object.keys(a||{}),k=t.schema.patternProperties||{},S=Object.keys(k),E=t.schema.additionalProperties,x=_.length||S.length,C=!1===E,A="object"==typeof E&&Object.keys(E).length,I=t.opts.removeAdditional,T=C||A||I,j=t.opts.ownProperties,O=t.baseId,P=t.schema.required;if(P&&(!t.opts.$data||!P.$data)&&P.length<t.opts.loopRequired)var B=t.util.toHash(P);if(i+="var "+h+" = errors;var "+m+" = true;",j&&(i+=" var "+w+" = undefined;"),T){if(i+=j?" "+w+" = "+w+" || Object.keys("+f+"); for (var "+y+"=0; "+y+"<"+w+".length; "+y+"++) { var "+g+" = "+w+"["+y+"]; ":" for (var "+g+" in "+f+") { ",x){if(i+=" var isAdditional"+o+" = !(false ",_.length)if(_.length>8)i+=" || validate.schema"+u+".hasOwnProperty("+g+") ";else{var R=_;if(R)for(var N,M=-1,L=R.length-1;M<L;)N=R[M+=1],i+=" || "+g+" == "+t.util.toQuotedString(N)+" "}if(S.length){var F=S;if(F)for(var D,U=-1,z=F.length-1;U<z;)D=F[U+=1],i+=" || "+t.usePattern(D)+".test("+g+") "}i+=" ); if (isAdditional"+o+") { "}if("all"==I)i+=" delete "+f+"["+g+"]; ";else{var q=t.errorPath,K="' + "+g+" + '";if(t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(t.errorPath,g,t.opts.jsonPointers)),C)if(I)i+=" delete "+f+"["+g+"]; ";else{i+=" "+m+" = false; ";var H=l;l=t.errSchemaPath+"/additionalProperties";var V=V||[];V.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { additionalProperty: '"+K+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),t.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var W=i;i=V.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+W+"]); ":i+=" validate.errors = ["+W+"]; return false; ":i+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=H,c&&(i+=" break; ")}else if(A)if("failing"==I){i+=" var "+h+" = errors; ";var $=t.compositeRule;t.compositeRule=p.compositeRule=!0,p.schema=E,p.schemaPath=t.schemaPath+".additionalProperties",p.errSchemaPath=t.errSchemaPath+"/additionalProperties",p.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,g,t.opts.jsonPointers);var G=f+"["+g+"]";p.dataPathArr[b]=g;var Y=t.validate(p);p.baseId=O,t.util.varOccurences(Y,v)<2?i+=" "+t.util.varReplace(Y,v,G)+" ":i+=" var "+v+" = "+G+"; "+Y+" ",i+=" if (!"+m+") { errors = "+h+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+f+"["+g+"]; } ",t.compositeRule=p.compositeRule=$}else{p.schema=E,p.schemaPath=t.schemaPath+".additionalProperties",p.errSchemaPath=t.errSchemaPath+"/additionalProperties",p.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,g,t.opts.jsonPointers);var G=f+"["+g+"]";p.dataPathArr[b]=g;var Y=t.validate(p);p.baseId=O,t.util.varOccurences(Y,v)<2?i+=" "+t.util.varReplace(Y,v,G)+" ":i+=" var "+v+" = "+G+"; "+Y+" ",c&&(i+=" if (!"+m+") break; ")}t.errorPath=q}x&&(i+=" } "),i+=" } ",c&&(i+=" if ("+m+") { ",d+="}")}var J=t.opts.useDefaults&&!t.compositeRule;if(_.length){var Z=_;if(Z)for(var N,X=-1,Q=Z.length-1;X<Q;){N=Z[X+=1];var ee=a[N];if(t.util.schemaHasRules(ee,t.RULES.all)){var te=t.util.getProperty(N),G=f+te,ne=J&&void 0!==ee.default;p.schema=ee,p.schemaPath=u+te,p.errSchemaPath=l+"/"+t.util.escapeFragment(N),p.errorPath=t.util.getPath(t.errorPath,N,t.opts.jsonPointers),p.dataPathArr[b]=t.util.toQuotedString(N);var Y=t.validate(p);if(p.baseId=O,t.util.varOccurences(Y,v)<2){Y=t.util.varReplace(Y,v,G);var re=G}else{var re=v;i+=" var "+v+" = "+G+"; "}if(ne)i+=" "+Y+" ";else{if(B&&B[N]){i+=" if ( "+re+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(N)+"') "),i+=") { "+m+" = false; ";var q=t.errorPath,H=l,ie=t.util.escapeQuotes(N);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(q,N,t.opts.jsonPointers)),l=t.errSchemaPath+"/required";var V=V||[];V.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+ie+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+ie+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var W=i;i=V.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+W+"]); ":i+=" validate.errors = ["+W+"]; return false; ":i+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=H,t.errorPath=q,i+=" } else { "}else c?(i+=" if ( "+re+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(N)+"') "),i+=") { "+m+" = true; } else { "):(i+=" if ("+re+" !== undefined ",j&&(i+=" && Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(N)+"') "),i+=" ) { ");i+=" "+Y+" } "}}c&&(i+=" if ("+m+") { ",d+="}")}}if(S.length){var oe=S;if(oe)for(var D,se=-1,ae=oe.length-1;se<ae;){D=oe[se+=1];var ee=k[D];if(t.util.schemaHasRules(ee,t.RULES.all)){p.schema=ee,p.schemaPath=t.schemaPath+".patternProperties"+t.util.getProperty(D),p.errSchemaPath=t.errSchemaPath+"/patternProperties/"+t.util.escapeFragment(D),i+=j?" "+w+" = "+w+" || Object.keys("+f+"); for (var "+y+"=0; "+y+"<"+w+".length; "+y+"++) { var "+g+" = "+w+"["+y+"]; ":" for (var "+g+" in "+f+") { ",i+=" if ("+t.usePattern(D)+".test("+g+")) { ",p.errorPath=t.util.getPathExpr(t.errorPath,g,t.opts.jsonPointers);var G=f+"["+g+"]";p.dataPathArr[b]=g;var Y=t.validate(p);p.baseId=O,t.util.varOccurences(Y,v)<2?i+=" "+t.util.varReplace(Y,v,G)+" ":i+=" var "+v+" = "+G+"; "+Y+" ",c&&(i+=" if (!"+m+") break; "),i+=" } ",c&&(i+=" else "+m+" = true; "),i+=" } ",c&&(i+=" if ("+m+") { ",d+="}")}}}return c&&(i+=" "+d+" if ("+h+" == errors) {"),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="errs__"+o,p=t.util.copy(t),d="";p.level++;var m="valid"+p.level;if(i+="var "+h+" = errors;",t.util.schemaHasRules(a,t.RULES.all)){p.schema=a,p.schemaPath=u,p.errSchemaPath=l;var g="key"+o,y="idx"+o,b="i"+o,v="' + "+g+" + '",w=p.dataLevel=t.dataLevel+1,_="data"+w,k="dataProperties"+o,S=t.opts.ownProperties,E=t.baseId;S&&(i+=" var "+k+" = undefined; "),i+=S?" "+k+" = "+k+" || Object.keys("+f+"); for (var "+y+"=0; "+y+"<"+k+".length; "+y+"++) { var "+g+" = "+k+"["+y+"]; ":" for (var "+g+" in "+f+") { ",i+=" var startErrs"+o+" = errors; ";var x=g,C=t.compositeRule;t.compositeRule=p.compositeRule=!0;var A=t.validate(p);p.baseId=E,t.util.varOccurences(A,_)<2?i+=" "+t.util.varReplace(A,_,x)+" ":i+=" var "+_+" = "+x+"; "+A+" ",t.compositeRule=p.compositeRule=C,i+=" if (!"+m+") { for (var "+b+"=startErrs"+o+"; "+b+"<errors; "+b+"++) { vErrors["+b+"].propertyName = "+g+"; } var err = ",!1!==t.createErrors?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { propertyName: '"+v+"' } ",!1!==t.opts.messages&&(i+=" , message: 'property name \\'"+v+"\\' is invalid' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&c&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),c&&(i+=" break; "),i+=" } }"}return c&&(i+=" if ("+h+" == errors) {"),i=t.util.cleanUpCode(i),i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p=t.opts.$data&&a&&a.$data,d;p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a;var m="schema"+o;if(!p)if(a.length<t.opts.loopRequired&&t.schema.properties&&Object.keys(t.schema.properties).length){var g=[],y=a;if(y)for(var b,v=-1,w=y.length-1;v<w;){b=y[v+=1];var _=t.schema.properties[b];_&&t.util.schemaHasRules(_,t.RULES.all)||(g[g.length]=b)}}else var g=a;if(p||g.length){var k=t.errorPath,S=p||g.length>=t.opts.loopRequired,E=t.opts.ownProperties;if(c)if(i+=" var missing"+o+"; ",S){p||(i+=" var "+m+" = validate.schema"+u+"; ");var x="i"+o,C="schema"+o+"["+x+"]",A="' + "+C+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(k,C,t.opts.jsonPointers)),i+=" var "+h+" = true; ",p&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=" for (var "+x+" = 0; "+x+" < "+m+".length; "+x+"++) { "+h+" = "+f+"["+m+"["+x+"]] !== undefined ",E&&(i+=" && Object.prototype.hasOwnProperty.call("+f+", "+m+"["+x+"]) "),i+="; if (!"+h+") break; } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var I=I||[];I.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+A+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+A+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var T=i;i=I.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var j=g;if(j)for(var O,x=-1,P=j.length-1;x<P;){O=j[x+=1],x&&(i+=" || ");var B=t.util.getProperty(O),R=f+B;i+=" ( ( "+R+" === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(O)+"') "),i+=") && (missing"+o+" = "+t.util.toQuotedString(t.opts.jsonPointers?O:B)+") ) "}i+=") { ";var C="missing"+o,A="' + "+C+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(k,C,!0):k+" + "+C);var I=I||[];I.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+A+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+A+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var T=i;i=I.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(S){p||(i+=" var "+m+" = validate.schema"+u+"; ");var x="i"+o,C="schema"+o+"["+x+"]",A="' + "+C+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(k,C,t.opts.jsonPointers)),p&&(i+=" if ("+m+" && !Array.isArray("+m+")) { var err = ",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+A+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+A+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+m+" !== undefined) { "),i+=" for (var "+x+" = 0; "+x+" < "+m+".length; "+x+"++) { if ("+f+"["+m+"["+x+"]] === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", "+m+"["+x+"]) "),i+=") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+A+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+A+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",p&&(i+=" } ")}else{var N=g;if(N)for(var O,M=-1,L=N.length-1;M<L;){O=N[M+=1];var B=t.util.getProperty(O),A=t.util.escapeQuotes(O),R=f+B;t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(k,O,t.opts.jsonPointers)),i+=" if ( "+R+" === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+t.util.escapeQuotes(O)+"') "),i+=") { var err = ",!1!==t.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { missingProperty: '"+A+"' } ",!1!==t.opts.messages&&(i+=" , message: '",t.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+A+"\\'",i+="' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t.errorPath=k}else c&&(i+=" if (true) {");return i}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f="data"+(s||""),h="valid"+o,p=t.opts.$data&&a&&a.$data,d;if(p?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",d="schema"+o):d=a,(a||p)&&!1!==t.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+d+" === false || "+d+" === undefined) "+h+" = true; else if (typeof "+d+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var m=t.schema.items&&t.schema.items.type,g=Array.isArray(m);if(!m||"object"==m||"array"==m||g&&(m.indexOf("object")>=0||m.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var y="checkDataType"+(g?"s":"");i+=" if ("+t.util[y](m,"item",!0)+") continue; ",g&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var b=b||[];b.push(i),i="",!1!==t.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { i: i, j: j } ",!1!==t.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),t.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+t.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var v=i;i=b.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var n=0;n<t.length;n++){e=JSON.parse(JSON.stringify(e));var i=t[n].split("/"),o=e,s;for(s=1;s<i.length;s++)o=o[i[s]];for(s=0;s<r.length;s++){var a=r[s],u=o[a];u&&(o[a]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]})}}return e}},function(e,t,n){"use strict";var r=n(385).MissingRef;function i(e,t,n){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(n=t,t=void 0);var s=a(e).then(function(){var n=o._addSchema(e,void 0,t);return n.validate||u(n)});return n&&s.then(function(e){n(null,e)},n),s;function a(e){var t=e.$schema;return t&&!o.getSchema(t)?i.call(o,{$ref:t},!0):Promise.resolve()}function u(e){try{return o._compile(e)}catch(e){if(e instanceof r)return n(e);throw e}function n(n){var r=n.missingSchema;if(l(r))throw new Error("Schema "+r+" is loaded but "+n.missingRef+" cannot be resolved");var i=o._loadingSchemas[r];return i||(i=o._loadingSchemas[r]=o._opts.loadSchema(r),i.then(s,s)),i.then(function(e){if(!l(r))return a(e).then(function(){l(r)||o.addSchema(e,r,void 0,t)})}).then(function(){return u(e)});function s(){delete o._loadingSchemas[r]}function l(e){return o._refs[e]||o._schemas[e]}}}}e.exports=i},function(e,t,n){"use strict";var r=/^[a-z_$][a-z0-9_$-]*$/i,i=n(1910),o=n(729);e.exports={add:a,get:u,remove:l,validate:c};var s={definitions:{simpleTypes:o.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:o.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}};function a(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!r.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var o=t.type;if(Array.isArray(o))for(var s=0;s<o.length;s++)u(e,o[s],t);else u(e,o,t);var a=t.metaSchema;a&&(t.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(a,!0))}function u(e,t,r){for(var o,s=0;s<n.length;s++){var a=n[s];if(a.type==t){o=a;break}}o||(o={type:t,rules:[]},n.push(o));var u={keyword:e,definition:r,custom:!0,code:i,implements:r.implements};o.rules.push(u),n.custom[e]=u}return n.keywords[e]=n.all[e]=!0,this}function u(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1}function l(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var n=0;n<t.length;n++)for(var r=t[n].rules,i=0;i<r.length;i++)if(r[i].keyword==e){r.splice(i,1);break}return this}function c(e,t){c.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(s,!0);if(n(e))return!0;if(c.errors=n.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}},function(e,t,n){"use strict";e.exports=function e(t,n,r){var i=" ",o=t.level,s=t.dataLevel,a=t.schema[n],u=t.schemaPath+t.util.getProperty(n),l=t.errSchemaPath+"/"+n,c=!t.opts.allErrors,f,h="data"+(s||""),p="valid"+o,d="errs__"+o,m=t.opts.$data&&a&&a.$data,g;m?(i+=" var schema"+o+" = "+t.util.getData(a.$data,s,t.dataPathArr)+"; ",g="schema"+o):g=a;var y=this,b="definition"+o,v=this.definition,w="",_,k,S,E,x;if(m&&v.$data){x="keywordValidate"+o;var C=v.validateSchema;i+=" var "+b+" = RULES.custom['"+n+"'].definition; var "+x+" = "+b+".validate;"}else{if(E=t.useCustomRule(this,a,t.schema,t),!E)return;g="validate.schema"+u,x=E.code,_=v.compile,k=v.inline,S=v.macro}var A=x+".errors",I="i"+o,T="ruleErr"+o,j=v.async;if(j&&!t.async)throw new Error("async keyword in sync schema");if(k||S||(i+=A+" = null;"),i+="var "+d+" = errors;var "+p+";",m&&v.$data&&(w+="}",i+=" if ("+g+" === undefined) { "+p+" = true; } else { ",C&&(w+="}",i+=" "+p+" = "+b+".validateSchema("+g+"); if ("+p+") { ")),k)v.statements?i+=" "+E.validate+" ":i+=" "+p+" = "+E.validate+"; ";else if(S){var O=t.util.copy(t),w="";O.level++;var P="valid"+O.level;O.schema=E.validate,O.schemaPath="";var B=t.compositeRule;t.compositeRule=O.compositeRule=!0;var R=t.validate(O).replace(/validate\.schema/g,x);t.compositeRule=O.compositeRule=B,i+=" "+R}else{var N=N||[];N.push(i),i="",i+=" "+x+".call( ",t.opts.passContext?i+="this":i+="self",_||!1===v.schema?i+=" , "+h+" ":i+=" , "+g+" , "+h+" , validate.schema"+t.schemaPath+" ",i+=" , (dataPath || '')",'""'!=t.errorPath&&(i+=" + "+t.errorPath);var M=s?"data"+(s-1||""):"parentData",L=s?t.dataPathArr[s]:"parentDataProperty";i+=" , "+M+" , "+L+" , rootData ) ";var F=i;i=N.pop(),!1===v.errors?(i+=" "+p+" = ",j&&(i+="await "),i+=F+"; "):j?(A="customErrors"+o,i+=" var "+A+" = null; try { "+p+" = await "+F+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+A+" = e.errors; else throw e; } "):i+=" "+A+" = null; "+p+" = "+F+"; "}if(v.modifying&&(i+=" if ("+M+") "+h+" = "+M+"["+L+"];"),i+=""+w,v.valid)c&&(i+=" if (true) { ");else{i+=" if ( ",void 0===v.valid?(i+=" !",i+=S?""+P:""+p):i+=" "+!v.valid+" ",i+=") { ",f=this.keyword;var N=N||[];N.push(i),i="";var N=N||[];N.push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(f||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var D=i;i=N.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+D+"]); ":i+=" validate.errors = ["+D+"]; return false; ":i+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var U=i;i=N.pop(),k?v.errors?"full"!=v.errors&&(i+=" for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+T+" = vErrors["+I+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+T+".schemaPath === undefined) { "+T+'.schemaPath = "'+l+'"; } ',t.opts.verbose&&(i+=" "+T+".schema = "+g+"; "+T+".data = "+h+"; "),i+=" } "):!1===v.errors?i+=" "+U+" ":(i+=" if ("+d+" == errors) { "+U+" } else { for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+T+" = vErrors["+I+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+T+".schemaPath === undefined) { "+T+'.schemaPath = "'+l+'"; } ',t.opts.verbose&&(i+=" "+T+".schema = "+g+"; "+T+".data = "+h+"; "),i+=" } } "):S?(i+=" var err = ",!1!==t.createErrors?(i+=" { keyword: '"+(f||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&c&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===v.errors?i+=" "+U+" ":(i+=" if (Array.isArray("+A+")) { if (vErrors === null) vErrors = "+A+"; else vErrors = vErrors.concat("+A+"); errors = vErrors.length; for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+T+" = vErrors["+I+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+t.errorPath+"; "+T+'.schemaPath = "'+l+'"; ',t.opts.verbose&&(i+=" "+T+".schema = "+g+"; "+T+".data = "+h+"; "),i+=" } } else { "+U+" } "),i+=" } ",c&&(i+=" else { ")}return i}},function(e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},function(e,t){function n(e){var t="validation failed";this.name="HARError",this.message=t,this.errors=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}n.prototype=Error.prototype,e.exports=n},function(e,t,n){"use strict";e.exports={afterRequest:n(1914),beforeRequest:n(1915),browser:n(1916),cache:n(1917),content:n(1918),cookie:n(1919),creator:n(1920),entry:n(1921),har:n(1922),header:n(1923),log:n(1924),page:n(1925),pageTimings:n(1926),postData:n(1927),query:n(1928),request:n(1929),response:n(1930),timings:n(1931)}},function(e){e.exports={$id:"afterRequest.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},function(e){e.exports={$id:"beforeRequest.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},function(e){e.exports={$id:"browser.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"cache.json#",$schema:"http://json-schema.org/draft-06/schema#",properties:{beforeRequest:{oneOf:[{type:"null"},{$ref:"beforeRequest.json#"}]},afterRequest:{oneOf:[{type:"null"},{$ref:"afterRequest.json#"}]},comment:{type:"string"}}}},function(e){e.exports={$id:"content.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["size","mimeType"],properties:{size:{type:"integer"},compression:{type:"integer"},mimeType:{type:"string"},text:{type:"string"},encoding:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"cookie.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},path:{type:"string"},domain:{type:"string"},expires:{type:["string","null"],format:"date-time"},httpOnly:{type:"boolean"},secure:{type:"boolean"},comment:{type:"string"}}}},function(e){e.exports={$id:"creator.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"entry.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",optional:!0,required:["startedDateTime","time","request","response","cache","timings"],properties:{pageref:{type:"string"},startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},time:{type:"number",min:0},request:{$ref:"request.json#"},response:{$ref:"response.json#"},cache:{$ref:"cache.json#"},timings:{$ref:"timings.json#"},serverIPAddress:{type:"string",oneOf:[{format:"ipv4"},{format:"ipv6"}]},connection:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"har.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["log"],properties:{log:{$ref:"log.json#"}}}},function(e){e.exports={$id:"header.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"log.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["version","creator","entries"],properties:{version:{type:"string"},creator:{$ref:"creator.json#"},browser:{$ref:"browser.json#"},pages:{type:"array",items:{$ref:"page.json#"}},entries:{type:"array",items:{$ref:"entry.json#"}},comment:{type:"string"}}}},function(e){e.exports={$id:"page.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",optional:!0,required:["startedDateTime","id","title","pageTimings"],properties:{startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"pageTimings.json#"},comment:{type:"string"}}}},function(e){e.exports={$id:"pageTimings.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",properties:{onContentLoad:{type:"number",min:-1},onLoad:{type:"number",min:-1},comment:{type:"string"}}}},function(e){e.exports={$id:"postData.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",optional:!0,required:["mimeType"],properties:{mimeType:{type:"string"},text:{type:"string"},params:{type:"array",required:["name"],properties:{name:{type:"string"},value:{type:"string"},fileName:{type:"string"},contentType:{type:"string"},comment:{type:"string"}}},comment:{type:"string"}}}},function(e){e.exports={$id:"query.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},function(e){e.exports={$id:"request.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],properties:{method:{type:"string"},url:{type:"string",format:"uri"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},queryString:{type:"array",items:{$ref:"query.json#"}},postData:{$ref:"postData.json#"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},function(e){e.exports={$id:"response.json#",$schema:"http://json-schema.org/draft-06/schema#",type:"object",required:["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},content:{$ref:"content.json#"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},function(e){e.exports={$id:"timings.json#",$schema:"http://json-schema.org/draft-06/schema#",required:["send","wait","receive"],properties:{dns:{type:"number",min:-1},connect:{type:"number",min:-1},blocked:{type:"number",min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",min:-1},comment:{type:"string"}}}},function(e){e.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"http://json-schema.org/draft-06/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},title:{type:"string"},description:{type:"string"},default:{},examples:{type:"array",items:{}},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:{},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:{}}},function(e,t,n){"use strict";var r=n(382),i=n(139),o=n(375),s=o.md5,a=o.toBase64;function u(e){this.request=e,this.hasAuth=!1,this.sentAuth=!1,this.bearerToken=null,this.user=null,this.pass=null}u.prototype.basic=function(e,t,n){var r=this;("string"!=typeof e||void 0!==t&&"string"!=typeof t)&&this.request.emit("error",new Error("auth() received invalid user or password")),this.user=e,this.pass=t,this.hasAuth=!0;var i=e+":"+(t||"");if(n||void 0===n){var o="Basic "+a(i);return this.sentAuth=!0,o}},u.prototype.bearer=function(e,t){var n=this;if(this.bearerToken=e,this.hasAuth=!0,t||void 0===t){"function"==typeof e&&(e=e());var r="Bearer "+(e||"");return this.sentAuth=!0,r}},u.prototype.digest=function(e,t,n){for(var r=this,o={},a=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;;){var u=a.exec(n);if(!u)break;o[u[1]]=u[2]||u[3]}var l=function(e,t,n,r,i,o){var a=s(t+":"+n+":"+r);return e&&"md5-sess"===e.toLowerCase()?s(a+":"+i+":"+o):a},c=/(^|,)\s*auth\s*($|,)/.test(o.qop)&&"auth",f=c&&"00000001",h=c&&i().replace(/-/g,""),p=l(o.algorithm,this.user,o.realm,this.pass,o.nonce,h),d=s(e+":"+t),m=s(c?p+":"+o.nonce+":"+f+":"+h+":"+c+":"+d:p+":"+o.nonce+":"+d),g={username:this.user,realm:o.realm,nonce:o.nonce,uri:t,qop:c,response:m,nc:f,cnonce:h,algorithm:o.algorithm,opaque:o.opaque};for(var y in n=[],g)g[y]&&("qop"===y||"nc"===y||"algorithm"===y?n.push(y+"="+g[y]):n.push(y+'="'+g[y]+'"'));return n="Digest "+n.join(", "),this.sentAuth=!0,n},u.prototype.onRequest=function(e,t,n,r){var i=this,o=this.request,s;void 0===r&&void 0===e?this.request.emit("error",new Error("no auth mechanism defined")):s=void 0!==r?this.bearer(r,n):this.basic(e,t,n),s&&o.setHeader("authorization",s)},u.prototype.onResponse=function(e){var t=this,n=this.request;if(!this.hasAuth||this.sentAuth)return null;var i=r(e.headers),o=i.get("www-authenticate"),s=o&&o.split(" ")[0].toLowerCase();switch(n.debug("reauth",s),s){case"basic":return this.basic(this.user,this.pass,!0);case"bearer":return this.bearer(this.bearerToken,!0);case"digest":return this.digest(n.method,n.path,o)}},t.Auth=u},function(e,t,n){"use strict";var r=n(32),i=n(719),o=n(382),s=n(139),a=n(1935),u=n(15),l=n(4).Buffer;function c(e){this.request=e,this.params=null}c.prototype.buildParams=function(e,t,n,r,i,o){var u={};for(var l in e)u["oauth_"+l]=e[l];u.oauth_version||(u.oauth_version="1.0"),u.oauth_timestamp||(u.oauth_timestamp=Math.floor(Date.now()/1e3).toString()),u.oauth_nonce||(u.oauth_nonce=s().replace(/-/g,"")),u.oauth_signature_method||(u.oauth_signature_method="HMAC-SHA1");var c=u.oauth_consumer_secret||u.oauth_private_key;delete u.oauth_consumer_secret,delete u.oauth_private_key;var f=u.oauth_token_secret;delete u.oauth_token_secret;var h=u.oauth_realm;delete u.oauth_realm,delete u.oauth_transport_method;var p=t.protocol+"//"+t.host+t.pathname,d=o.parse([].concat(r,i,o.stringify(u)).join("&"));return u.oauth_signature=a.sign(u.oauth_signature_method,n,p,d,c,f),h&&(u.realm=h),u},c.prototype.buildBodyHash=function(e,t){["HMAC-SHA1","RSA-SHA1"].indexOf(e.signature_method||"HMAC-SHA1")<0&&this.request.emit("error",new Error("oauth: "+e.signature_method+" signature_method not supported with body_hash signing."));var n=u.createHash("sha1");n.update(t||"");var r=n.digest("hex");return l.from(r,"hex").toString("base64")},c.prototype.concatParams=function(e,t,n){n=n||"";var r=Object.keys(e).filter(function(e){return"realm"!==e&&"oauth_signature"!==e}).sort();return e.realm&&r.splice(0,0,"realm"),r.push("oauth_signature"),r.map(function(t){return t+"="+n+a.rfc3986(e[t])+n}).join(t)},c.prototype.onRequest=function(e){var t=this;this.params=e;var n=this.request.uri||{},s=this.request.method||"",a=o(this.request.headers),u=this.request.body||"",l=this.request.qsLib||i,c,f,h=a.get("content-type")||"",p="application/x-www-form-urlencoded",d=e.transport_method||"header";h.slice(0,p.length)===p&&(h=p,c=u),n.query&&(f=n.query),"body"!==d||"POST"===s&&h===p||this.request.emit("error",new Error("oauth: transport_method of body requires POST and content-type "+p)),c||"boolean"!=typeof e.body_hash||(e.body_hash=this.buildBodyHash(e,this.request.body.toString()));var m=this.buildParams(e,n,s,f,c,l);switch(d){case"header":this.request.setHeader("Authorization","OAuth "+this.concatParams(m,",",'"'));break;case"query":var g=this.request.uri.href+=(f?"&":"?")+this.concatParams(m,"&");this.request.uri=r.parse(g),this.request.path=this.request.uri.path;break;case"body":this.request.body=(c?c+"&":"")+this.concatParams(m,"&");break;default:this.request.emit("error",new Error("oauth: transport_method invalid"))}},t.OAuth=c},function(e,t,n){var r=n(15);function i(e,t,n){return r.createHmac(n,e).update(t).digest("base64")}function o(e,t){return r.createSign("RSA-SHA1").update(t).sign(e,"base64")}function s(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}function a(e){var t,n,r=[];for(t in e)if(n=e[t],Array.isArray(n))for(var i=0;i<n.length;i++)r.push([t,n[i]]);else if("object"==typeof n)for(var o in n)r.push([t+"["+o+"]",n[o]]);else r.push([t,n]);return r}function u(e,t){return e>t?1:e<t?-1:0}function l(e,t,n){var r=a(n).map(function(e){return[s(e[0]),s(e[1]||"")]}).sort(function(e,t){return u(e[0],t[0])||u(e[1],t[1])}).map(function(e){return e.join("=")}).join("&"),i=[s(e?e.toUpperCase():"GET"),s(t),s(r)].join("&");return i}function c(e,t,n,r,o){var a=l(e,t,n),u=[r||"",o||""].map(s).join("&");return i(u,a,"sha1")}function f(e,t,n,r,o){var a=l(e,t,n),u=[r||"",o||""].map(s).join("&");return i(u,a,"sha256")}function h(e,t,n,r,i){var s=l(e,t,n),a=r||"";return o(a,s)}function p(e,t){var n=[e||"",t||""].map(s).join("&");return n}function d(e,t,n,r,i,o){var s,a=1;switch(e){case"RSA-SHA1":s=h;break;case"HMAC-SHA1":s=c;break;case"HMAC-SHA256":s=f;break;case"PLAINTEXT":s=p,a=4;break;default:throw new Error("Signature method not supported: "+e)}return s.apply(null,[].slice.call(arguments,a))}t.hmacsign=c,t.hmacsign256=f,t.rsasign=h,t.plaintext=p,t.sign=d,t.rfc3986=s,t.generateBase=l},function(e,t,n){"use strict";var r=n(15);function i(e){var t=6*(e+1),n=r.randomBytes(Math.ceil(t/8)),i=n.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return i.slice(0,e)}function o(e,t,n){var i=r.createHash(t);return i.update("hawk.1.payload\n"),i.update((n?n.split(";")[0].trim().toLowerCase():"")+"\n"),i.update(e||""),i.update("\n"),i.digest("base64")}t.calculateMac=function(e,t){var n="hawk.1.header\n"+t.ts+"\n"+t.nonce+"\n"+(t.method||"").toUpperCase()+"\n"+t.resource+"\n"+t.host.toLowerCase()+"\n"+t.port+"\n"+(t.hash||"")+"\n";t.ext&&(n+=t.ext.replace("\\","\\\\").replace("\n","\\n")),n+="\n",t.app&&(n=n+t.app+"\n"+(t.dlg||"")+"\n");var i=r.createHmac(e.algorithm,e.key).update(n),o=i.digest("base64");return o},t.header=function(e,n,r){var s=r.timestamp||Math.floor((Date.now()+(r.localtimeOffsetMsec||0))/1e3),a=r.credentials;if(!(a&&a.id&&a.key&&a.algorithm))return"";if(-1===["sha1","sha256"].indexOf(a.algorithm))return"";var u={ts:s,nonce:r.nonce||i(6),method:n,resource:e.pathname+(e.search||""),host:e.hostname,port:e.port||("http:"===e.protocol?80:443),hash:r.hash,ext:r.ext,app:r.app,dlg:r.dlg};u.hash||!r.payload&&""!==r.payload||(u.hash=o(r.payload,a.algorithm,r.contentType));var l=t.calculateMac(a,u),c=null!==u.ext&&void 0!==u.ext&&""!==u.ext,f='Hawk id="'+a.id+'", ts="'+u.ts+'", nonce="'+u.nonce+(u.hash?'", hash="'+u.hash:"")+(c?'", ext="'+u.ext.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):"")+'", mac="'+l+'"';return u.app&&(f=f+', app="'+u.app+(u.dlg?'", dlg="'+u.dlg:"")+'"'),f}},function(e,t,n){"use strict";var r=n(139),i=n(1938),o=n(718),s=n(4).Buffer;function a(e){this.request=e,this.boundary=r(),this.chunked=!1,this.body=null}a.prototype.isChunked=function(e){var t=this,n=!1,r=e.data||e;return r.forEach||t.request.emit("error",new Error("Argument error, options.multipart.")),void 0!==e.chunked&&(n=e.chunked),"chunked"===t.request.getHeader("transfer-encoding")&&(n=!0),n||r.forEach(function(e){void 0===e.body&&t.request.emit("error",new Error("Body attribute missing in multipart.")),o(e.body)&&(n=!0)}),n},a.prototype.setHeaders=function(e){var t=this;e&&!this.request.hasHeader("transfer-encoding")&&this.request.setHeader("transfer-encoding","chunked");var n=this.request.getHeader("content-type");n&&-1!==n.indexOf("multipart")?-1!==n.indexOf("boundary")?this.boundary=n.replace(/.*boundary=([^\s;]+).*/,"$1"):this.request.setHeader("content-type",n+"; boundary="+this.boundary):this.request.setHeader("content-type","multipart/related; boundary="+this.boundary)},a.prototype.build=function(e,t){var n=this,r=t?new i:[];function o(e){return"number"==typeof e&&(e=e.toString()),t?r.append(e):r.push(s.from(e))}return n.request.preambleCRLF&&o("\r\n"),e.forEach(function(e){var t="--"+n.boundary+"\r\n";Object.keys(e).forEach(function(n){"body"!==n&&(t+=n+": "+e[n]+"\r\n")}),t+="\r\n",o(t),o(e.body),o("\r\n")}),o("--"+n.boundary+"--"),n.request.postambleCRLF&&o("\r\n"),r},a.prototype.onRequest=function(e){var t=this,n=this.isChunked(e),r=e.data||e;this.setHeaders(n),this.chunked=n,this.body=this.build(r,n)},t.Multipart=a},function(e,t,n){(function(t){var r=n(13),i=n(57).Stream,o=n(1939);function s(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=s,r.inherits(s,i),s.create=function(e){var t=new this;for(var n in e=e||{},e)t[n]=e[n];return t},s.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!t.isBuffer(e)},s.prototype.append=function(e){var t=s.isStreamLike(e);if(t){if(!(e instanceof o)){var n=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},s.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},s.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},s.prototype._realGetNext=function(){var e=this._streams.shift();if(void 0!==e)if("function"==typeof e){var t=e;t(function(e){var t=s.isStreamLike(e);t&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this))}else this._pipeNext(e);else this.end()},s.prototype._pipeNext=function(e){this._currentStream=e;var t=s.isStreamLike(e);if(t)return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var n=e;this.write(n),this._getNext()},s.prototype._handleErrors=function(e){var t=this;e.on("error",function(e){t._emitError(e)})},s.prototype.write=function(e){this.emit("data",e)},s.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},s.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},s.prototype.end=function(){this._reset(),this.emit("end")},s.prototype.destroy=function(){this._reset(),this.emit("close")},s.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},s.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},s.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},s.prototype._emitError=function(e){this._reset(),this.emit("error",e)}}).call(this,n(0).Buffer)},function(e,t,n){var r=n(57).Stream,i=n(13);function o(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=o,i.inherits(o,r),o.create=function(e,t){var n=new this;for(var r in t=t||{},t)n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n},Object.defineProperty(o.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),o.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},o.prototype.resume=function(){this._released||this.release(),this.source.resume()},o.prototype.pause=function(){this.source.pause()},o.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},o.prototype.pipe=function(){var e=r.prototype.pipe.apply(this,arguments);return this.resume(),e},o.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},o.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},function(e,t,n){"use strict";var r=n(32),i=/^https?:/;function o(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}o.prototype.onRequest=function(e){var t=this;void 0!==e.maxRedirects&&(this.maxRedirects=e.maxRedirects),"function"==typeof e.followRedirect&&(this.allowRedirect=e.followRedirect),void 0!==e.followRedirect&&(this.followRedirects=!!e.followRedirect),void 0!==e.followAllRedirects&&(this.followAllRedirects=e.followAllRedirects),(this.followRedirects||this.followAllRedirects)&&(this.redirects=this.redirects||[]),void 0!==e.removeRefererHeader&&(this.removeRefererHeader=e.removeRefererHeader),void 0!==e.followOriginalHttpMethod&&(this.followOriginalHttpMethod=e.followOriginalHttpMethod)},o.prototype.redirectTo=function(e){var t=this,n=this.request,r=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var i=e.caseless.get("location");if(n.debug("redirect",i),this.followAllRedirects)r=i;else if(this.followRedirects)switch(n.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:r=i}}else if(401===e.statusCode){var o=n._auth.onResponse(e);o&&(n.setHeader("authorization",o),r=n.uri)}return r},o.prototype.onResponse=function(e){var t=this,n=this.request,o=this.redirectTo(e);if(!o||!this.allowRedirect.call(n,e))return!1;if(n.debug("redirect to",o),e.resume&&e.resume(),this.redirectsFollowed>=this.maxRedirects)return n.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+n.uri.href)),!1;this.redirectsFollowed+=1,i.test(o)||(o=r.resolve(n.uri.href,o));var s=n.uri;return n.uri=r.parse(o),n.uri.protocol!==s.protocol&&delete n.agent,this.redirects.push({statusCode:e.statusCode,redirectUri:o}),this.followAllRedirects&&"HEAD"!==n.method&&401!==e.statusCode&&307!==e.statusCode&&(n.method=this.followOriginalHttpMethod?n.method:"GET"),delete n.src,delete n.req,delete n._started,401!==e.statusCode&&307!==e.statusCode&&(delete n.body,delete n._form,n.headers&&(n.removeHeader("host"),n.removeHeader("content-type"),n.removeHeader("content-length"),n.uri.hostname!==n.originalHost.split(":")[0]&&n.removeHeader("authorization"))),this.removeRefererHeader||n.setHeader("referer",s.href),n.emit("redirect"),n.init(),!0},t.Redirect=o},function(e,t,n){"use strict";var r=n(32),i=n(1942),o=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],s=["proxy-authorization"];function a(e){var t=e.port,n=e.protocol,r=e.hostname+":";return r+=t||("https:"===n?"443":"80"),r}function u(e,t){var n=t.reduce(function(e,t){return e[t.toLowerCase()]=!0,e},{});return Object.keys(e).filter(function(e){return n[e.toLowerCase()]}).reduce(function(t,n){return t[n]=e[n],t},{})}function l(e,t){var n=e.proxy,r={proxy:{host:n.hostname,port:+n.port,proxyAuth:n.auth,headers:t},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return r}function c(e,t){var n="https:"===e.protocol?"https":"http",r="https:"===t.protocol?"Https":"Http";return[n,r].join("Over")}function f(e){var t=e.uri,n=e.proxy,r=c(t,n);return i[r]}function h(e){this.request=e,this.proxyHeaderWhiteList=o,this.proxyHeaderExclusiveList=[],void 0!==e.tunnel&&(this.tunnelOverride=e.tunnel)}h.prototype.isEnabled=function(){var e=this,t=this.request;return void 0!==this.tunnelOverride?this.tunnelOverride:"https:"===t.uri.protocol},h.prototype.setup=function(e){var t=this,n=this.request;if(e=e||{},"string"==typeof n.proxy&&(n.proxy=r.parse(n.proxy)),!n.proxy||!n.tunnel)return!1;e.proxyHeaderWhiteList&&(this.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(this.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=this.proxyHeaderExclusiveList.concat(s),o=this.proxyHeaderWhiteList.concat(i),c=u(n.headers,o);c.host=a(n.uri),i.forEach(n.removeHeader,n);var h=f(n),p=l(n,c);return n.agent=h(p),!0},h.defaultProxyHeaderWhiteList=o,h.defaultProxyHeaderExclusiveList=s,t.Tunnel=h},function(e,t,n){"use strict";(function(e){var r=n(15),i=n(15),o=n(154),s=n(202),a=n(6),u=n(18),l=n(13),c=n(4).Buffer,f;function h(e){var t=new g(e);return t.request=o.request,t}function p(e){var t=new g(e);return t.request=o.request,t.createSocket=y,t.defaultPort=443,t}function d(e){var t=new g(e);return t.request=s.request,t}function m(e){var t=new g(e);return t.request=s.request,t.createSocket=y,t.defaultPort=443,t}function g(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function e(n,r,i){for(var o=0,s=t.requests.length;o<s;++o){var a=t.requests[o];if(a.host===r&&a.port===i)return t.requests.splice(o,1),void a.request.onSocket(n)}n.destroy(),t.removeSocket(n)})}function y(e,t){var n=this;g.prototype.createSocket.call(n,e,function(r){var o=i.connect(0,b({},n.options,{servername:e.host,socket:r}));n.sockets[n.sockets.indexOf(r)]=o,t(o)})}function b(e){for(var t=1,n=arguments.length;t<n;++t){var r=arguments[t];if("object"==typeof r)for(var i=Object.keys(r),o=0,s=i.length;o<s;++o){var a=i[o];void 0!==r[a]&&(e[a]=r[a])}}return e}t.httpOverHttp=h,t.httpsOverHttp=p,t.httpOverHttps=d,t.httpsOverHttps=m,l.inherits(g,a.EventEmitter),g.prototype.addRequest=function e(t,n){var r=this;"string"==typeof n&&(n={host:n,port:arguments[2],path:arguments[3]}),this.sockets.length>=this.maxSockets?this.requests.push({host:n.host,port:n.port,request:t}):this.createConnection({host:n.host,port:n.port,request:t})},g.prototype.createConnection=function e(t){var n=this;n.createSocket(t,function(e){function r(){n.emit("free",e,t.host,t.port)}function i(t){n.removeSocket(e),e.removeListener("free",r),e.removeListener("close",i),e.removeListener("agentRemove",i)}e.on("free",r),e.on("close",i),e.on("agentRemove",i),t.request.onSocket(e)})},g.prototype.createSocket=function t(n,r){var i=this,o={};i.sockets.push(o);var s=b({},i.proxyOptions,{method:"CONNECT",path:n.host+":"+n.port,agent:!1});s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+c.from(s.proxyAuth).toString("base64")),f("making CONNECT request");var a=i.request(s);function l(e){e.upgrade=!0}function h(t,n,r){e.nextTick(function(){p(t,n,r)})}function p(e,t,s){if(a.removeAllListeners(),t.removeAllListeners(),200===e.statusCode)u.equal(s.length,0),f("tunneling connection has established"),i.sockets[i.sockets.indexOf(o)]=t,r(t);else{f("tunneling socket could not be established, statusCode=%d",e.statusCode);var l=new Error("tunneling socket could not be established, statusCode="+e.statusCode);l.code="ECONNRESET",n.request.emit("error",l),i.removeSocket(o)}}function d(e){a.removeAllListeners(),f("tunneling socket could not be established, cause=%s\n",e.message,e.stack);var t=new Error("tunneling socket could not be established, cause="+e.message);t.code="ECONNRESET",n.request.emit("error",t),i.removeSocket(o)}a.useChunkedEncodingByDefault=!1,a.once("response",l),a.once("upgrade",h),a.once("connect",p),a.once("error",d),a.end()},g.prototype.removeSocket=function e(t){var n=this.sockets.indexOf(t);if(-1!==n){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createConnection(r)}},f=e.env.NODE_DEBUG&&/\btunnel\b/.test(e.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=f}).call(this,n(2))},function(e,t,n){(function(t){(function(){var n,r,i,o,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-s)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},o=n(),a=1e9*t.uptime(),s=o-a):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var t=n(1945).getNewLibraryCopy(),r=n(1946),i=n(1949);try{var o=i(n.c,function(){return n(703)},function(){n(1950)},e)}catch(e){var s=n(226).EOL;throw console.error(s+"###"+s+'### The "request" library is not installed automatically anymore.'+s+'### But is a dependency of "request-promise".'+s+"### Please install it with:"+s+"### npm install request --save"+s+"###"+s),e}t.config({cancellation:!0}),r({request:o,PromiseImpl:t,expose:["then","catch","finally","cancel","promise"],constructorMixin:function(e,t,n){var r=this;n(function(){r.abort()})}}),o.bindCLS=function e(){throw new Error("CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage")},e.exports=o}).call(this,n(75)(e))},function(e,t,n){(function(t,n){var r,i;r=function(){var e,r,i;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof _dereq_&&_dereq_;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){var n=t[s][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";t.exports=function(e){var t=e._SomePromiseArray;function n(e){var n=new t(e),r=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),r}e.any=function(e){return n(e)},e.prototype.any=function(){return n(this)}}},{}],2:[function(e,n,r){"use strict";var i;try{throw new Error}catch(e){i=e}var o=e("./schedule"),s=e("./queue"),a=e("./util");function u(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new s(16),this._normalQueue=new s(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=o}function l(e,t,n){this._lateQueue.push(e,t,n),this._queueTick()}function c(e,t,n){this._normalQueue.push(e,t,n),this._queueTick()}function f(e){this._normalQueue._pushOne(e),this._queueTick()}function h(e){for(;e.length()>0;)p(e)}function p(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var n=e.shift(),r=e.shift();t.call(n,r)}}u.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},u.prototype.hasCustomScheduler=function(){return this._customScheduler},u.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},u.prototype.disableTrampolineIfNecessary=function(){a.hasDevTools&&(this._trampolineEnabled=!1)},u.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},u.prototype.fatalError=function(e,n){n?(t.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),t.exit(2)):this.throwLater(e)},u.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.hasDevTools?(u.prototype.invokeLater=function(e,t,n){this._trampolineEnabled?l.call(this,e,t,n):this._schedule(function(){setTimeout(function(){e.call(t,n)},100)})},u.prototype.invoke=function(e,t,n){this._trampolineEnabled?c.call(this,e,t,n):this._schedule(function(){e.call(t,n)})},u.prototype.settlePromises=function(e){this._trampolineEnabled?f.call(this,e):this._schedule(function(){e._settlePromises()})}):(u.prototype.invokeLater=l,u.prototype.invoke=c,u.prototype.settlePromises=f),u.prototype._drainQueues=function(){h(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,h(this._lateQueue)},u.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},u.prototype._reset=function(){this._isTickUsed=!1},n.exports=u,n.exports.firstLineError=i},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i=!1,o=function(e,t){this._reject(t)},s=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},a=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var l=n(o),c=new e(t);c._propagateFrom(this,1);var f=this._target();if(c._setBoundTo(l),l instanceof e){var h={promiseRejectionQueued:!1,promise:c,target:f,bindingPromise:l};f._then(t,s,void 0,c,h),l._then(a,u,void 0,c,h),c._setOnCancel(l)}else c._resolveCallback(f);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var r;function i(){try{Promise===o&&(Promise=r)}catch(e){}return o}"undefined"!=typeof Promise&&(r=Promise);var o=e("./promise")();o.noConflict=i,t.exports=o},{"./promise":22}],5:[function(e,t,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}t.exports=function(t){var n=e("./util"),r=n.canEvaluate,i=n.isIdentifier,o,s,a,u,l;function c(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function f(e){var t=this.pop(),n=c(e,t);return n.apply(e,this)}function h(e){return e[this]}function p(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}t.prototype.call=function(e){var t=[].slice.call(arguments,1),n;return t.push(e),this._then(f,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t="number"==typeof e,n;if(t)n=p;else if(r){var i=(void 0)(e);n=null!==i?i:h}else n=h;return this._then(n,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,r,i){var o=e("./util"),s=o.tryCatch,a=o.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n<e.length;++n)this._doInvokeOnCancel(e[n],t);else if(void 0!==e)if("function"==typeof e){if(!t){var r=s(e).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),u.throwLater(r.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),r=e("./es5").keys,i=n.tryCatch,o=n.errorObj;function s(e,s,a){return function(u){var l=a._boundValue();e:for(var c=0;c<e.length;++c){var f=e[c];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return i(s).call(l,u)}else if("function"==typeof f){var h=i(f).call(l,u);if(h===o)return h;if(h)return i(s).call(l,u)}else if(n.isObject(u)){for(var p=r(f),d=0;d<p.length;++d){var m=p[d];if(f[m]!=u[m])continue e}return i(s).call(l,u)}}return t}}return s}},{"./es5":13,"./util":36}],8:[function(e,t,n){"use strict";t.exports=function(e){var t=!1,n=[];function r(){this._trace=new r.CapturedTrace(o())}function i(){if(t)return new r}function o(){var e=n.length-1;if(e>=0)return n[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var e=n.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},r.CapturedTrace=null,r.create=i,r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=e.prototype._pushContext,i=e.prototype._popContext,s=e._peekContext,a=e.prototype._peekContext,u=e.prototype._promiseCreated;r.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=i,e._peekContext=s,e.prototype._peekContext=a,e.prototype._promiseCreated=u,t=!1},t=!0,e.prototype._pushContext=r.prototype._pushContext,e.prototype._popContext=r.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},r}},{}],9:[function(e,n,r){"use strict";n.exports=function(n,r){var i=n._getDomain,o=n._async,s=e("./errors").Warning,a=e("./util"),u=e("./es5"),l=a.canAttachTrace,c,f,h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,g=null,y=!1,b,v=!(0==a.env("BLUEBIRD_DEBUG")),w=!(0==a.env("BLUEBIRD_WARNINGS")||!v&&!a.env("BLUEBIRD_WARNINGS")),_=!(0==a.env("BLUEBIRD_LONG_STACK_TRACES")||!v&&!a.env("BLUEBIRD_LONG_STACK_TRACES")),k=0!=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){X("rejectionHandled",c,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),X("unhandledRejection",f,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return H(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=i();f="function"==typeof e?null===t?e:a.domainBind(t,e):void 0},n.onUnhandledRejectionHandled=function(e){var t=i();c="function"==typeof e?null===t?e:a.domainBind(t,e):void 0};var S=function(){};n.longStackTraces=function(){if(o.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ue.longStackTraces&&te()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace,i=n.prototype._dereferenceTrace;ue.longStackTraces=!0,S=function(){if(o.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,n.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),o.enableTrampoline(),ue.longStackTraces=!1},n.prototype._captureStackTrace=D,n.prototype._attachExtraTrace=U,n.prototype._dereferenceTrace=z,r.activateLongStackTraces(),o.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return ue.longStackTraces&&te()};var E=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return a.global.dispatchEvent(e),function(e,t){var n={detail:t,cancelable:!0};u.defineProperty(n,"promise",{value:t.promise}),u.defineProperty(n,"reason",{value:t.reason});var r=new CustomEvent(e.toLowerCase(),n);return!a.global.dispatchEvent(r)}}if("function"==typeof Event){var e=new Event("CustomEvent");return a.global.dispatchEvent(e),function(e,t){var n=new Event(e.toLowerCase(),{cancelable:!0});return n.detail=t,u.defineProperty(n,"promise",{value:t.promise}),u.defineProperty(n,"reason",{value:t.reason}),!a.global.dispatchEvent(n)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),a.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!a.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),x=a.isNode?function(){return t.emit.apply(t,arguments)}:a.global?function(e){var t="on"+e.toLowerCase(),n=a.global[t];return!!n&&(n.apply(a.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function C(e,t){return{promise:t}}var A={promiseCreated:C,promiseFulfilled:C,promiseRejected:C,promiseResolved:C,promiseCancelled:C,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:C},I=function(e){var t=!1;try{t=x.apply(null,arguments)}catch(e){o.throwLater(e),t=!0}var n=!1;try{n=E(e,A[e].apply(null,arguments))}catch(e){o.throwLater(e),n=!0}return n||t};function T(){return!1}function j(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+a.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function O(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?a.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function P(){return this._onCancelField}function B(e){this._onCancelField=e}function R(){this._cancellationParent=void 0,this._onCancelField=void 0}function N(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function M(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}n.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&S()),"warnings"in e){var t=e.warnings;ue.warnings=!!t,k=ue.warnings,a.isObject(t)&&"wForgottenReturn"in t&&(k=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ue.cancellation){if(o.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=R,n.prototype._propagateFrom=N,n.prototype._onCancel=P,n.prototype._setOnCancel=B,n.prototype._attachCancellationCallback=O,n.prototype._execute=j,L=N,ue.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!ue.monitoring?(ue.monitoring=!0,n.prototype._fireEvent=I):!e.monitoring&&ue.monitoring&&(ue.monitoring=!1,n.prototype._fireEvent=T)),n},n.prototype._fireEvent=T,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._dereferenceTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var L=M;function F(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function D(){this._trace=new se(this._peekContext())}function U(e,t){if(l(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=J(e);a.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),a.notEnumerableProp(e,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function q(e,t,n,r,i){if(void 0===e&&null!==t&&k){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(t._trace){for(var a=t._trace.stack.split("\n"),u=G(a),l=u.length-1;l>=0;--l){var c=u[l];if(!p.test(c)){var f=c.match(d);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var h=u[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var m="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(m,!0,t)}}function K(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),H(n)}function H(e,t,r){if(ue.warnings){var i=new s(e),o;if(t)r._attachExtraTrace(i);else if(ue.longStackTraces&&(o=n._peekContext()))o.attachExtraTrace(i);else{var a=J(i);i.stack=a.message+"\n"+a.stack.join("\n")}I("warning",i)||Z(i,"",!0)}}function V(e,t){for(var n=0;n<t.length-1;++n)t[n].push("From previous event:"),t[n]=t[n].join("\n");return n<t.length&&(t[n]=t[n].join("\n")),e+"\n"+t.join("\n")}function W(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}function $(e){for(var t=e[0],n=1;n<e.length;++n){for(var r=e[n],i=t.length-1,o=t[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=r[a];if(t[i]!==u)break;t.pop(),i--}t=r}}function G(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=" (No stack trace)"===r||m.test(r),o=i&&ne(r);i&&!o&&(y&&" "!==r.charAt(0)&&(r=" "+r),t.push(r))}return t}function Y(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),n=0;n<t.length;++n){var r=t[n];if(" (No stack trace)"===r||m.test(r))break}return n>0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}function J(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?Y(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:G(t)}}function Z(e,t,n){if("undefined"!=typeof console){var r;if(a.isObject(e)){var i=e.stack;r=t+g(i,e)}else r=t+String(e);"function"==typeof b?b(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function X(e,t,n,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(e){o.throwLater(e)}"unhandledRejection"===e?I(e,n,r)||i||Z(n,"Unhandled rejection "):I(e,r)}function Q(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():a.toString(e);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(t))try{var r=JSON.stringify(e);t=r}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+ee(t)+">, no stack trace)"}function ee(e){var t=41;return e.length<41?e:e.substr(0,38)+"..."}function te(){return"function"==typeof ae}var ne=function(){return!1},re=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function ie(e){var t=e.match(re);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function oe(e,t){if(te()){for(var n=(e.stack||"").split("\n"),r=(t.stack||"").split("\n"),i=-1,o=-1,s,a,u=0;u<n.length;++u){var l=ie(n[u]);if(l){s=l.fileName,i=l.line;break}}for(var u=0;u<r.length;++u){var l=ie(r[u]);if(l){a=l.fileName,o=l.line;break}}i<0||o<0||!s||!a||s!==a||i>=o||(ne=function(e){if(h.test(e))return!0;var t=ie(e);return!!(t&&t.fileName===s&&i<=t.line&&t.line<=o)})}}function se(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ae(this,se),t>32&&this.uncycle()}a.inherits(se,Error),r.CapturedTrace=se,se.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var o=t[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r<e;++r){var s=t[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var u=r>0?t[r-1]:this;a<e-1?(u._parent=t[a+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var l=u._length+1,c=r-2;c>=0;--c)t[c]._length=l,l++;return}}}},se.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=J(e),n=t.message,r=[t.stack],i=this;void 0!==i;)r.push(G(i.stack.split("\n"))),i=i._parent;$(r),W(r),a.notEnumerableProp(e,"stack",V(n,r)),a.notEnumerableProp(e,"__stackCleaned__",!0)}};var ae=function e(){var t=/^\s*at\s*/,n=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():Q(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=t,g=n;var r=Error.captureStackTrace;return ne=function(e){return h.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var i=new Error,o;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,g=n,y=!0,function e(t){t.stack=(new Error).stack};try{throw new Error}catch(e){o="stack"in e}return"stack"in i||!o||"number"!=typeof Error.stackTraceLimit?(g=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?Q(t):t.toString()},null):(m=t,g=n,function e(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&void 0!==console.warn&&(b=function(e){console.warn(e)},a.isNode&&t.stderr.isTTY?b=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:a.isNode||"string"!=typeof(new Error).stack||(b=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ue={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1};return _&&n.longStackTraces(),{longStackTraces:function(){return ue.longStackTraces},warnings:function(){return ue.warnings},cancellation:function(){return ue.cancellation},monitoring:function(){return ue.monitoring},propagateFromFunction:function(){return L},boundValueFunction:function(){return F},checkForgottenReturns:q,setBounds:oe,warn:H,deprecated:K,CapturedTrace:se,fireDomEvent:E,fireGlobalEvent:x}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.reduce,r=e.all;function i(){return r(this)}function o(e,r){return n(e,r,t,t)}e.prototype.each=function(e){return n(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return n(this,e,t,t)},e.each=function(e,r){return n(e,r,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=o}},{}],12:[function(e,t,n){"use strict";var r=e("./es5"),i=r.freeze,o=e("./util"),s=o.inherits,a=o.notEnumerableProp,u,l;function c(e,t){function n(r){if(!(this instanceof n))return new n(r);a(this,"message","string"==typeof r?r:t),a(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return s(n,Error),n}var f=c("Warning","warning"),h=c("CancellationError","cancellation error"),p=c("TimeoutError","timeout error"),d=c("AggregateError","aggregate error");try{u=TypeError,l=RangeError}catch(e){u=c("TypeError","type error"),l=c("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<m.length;++g)"function"==typeof Array.prototype[m[g]]&&(d.prototype[m[g]]=Array.prototype[m[g]]);r.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function b(e){if(!(this instanceof b))return new b(e);a(this,"name","OperationalError"),a(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(a(this,"message",e.message),a(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=e+i[o];r=i.join("\n"),t+=r+"\n"}return y--,t},s(b,Error);var v=Error.__BluebirdErrorTypes__;v||(v=i({CancellationError:h,TimeoutError:p,OperationalError:b,RejectionError:b,AggregateError:d}),r.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:u,RangeError:l,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,n){var r=function(){"use strict";return void 0===this}();if(r)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t},u=function(e,t){return{value:e[t]}},l=function(e,t,n){return e[t]=n.value,e},c=function(e){return e},f=function(e){try{return Object(e).constructor.prototype}catch(e){return s}},h=function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}};t.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:u,freeze:c,getPrototypeOf:f,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.map;e.prototype.filter=function(e,r){return n(this,e,r,t)},e.filter=function(e,r,i){return n(e,r,i,t)}}},{}],15:[function(e,t,n){"use strict";t.exports=function(t,n,r){var i=e("./util"),o=t.CancellationError,s=i.errorObj,a=e("./catch_filter")(r);function u(e,t,n){this.promise=e,this.type=t,this.handler=n,this.called=!1,this.cancelPromise=null}function l(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return p.call(this,this.promise._target()._settledValue())}function h(e){if(!c(this,e))return s.e=e,s}function p(e){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),e);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=n(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new l(this))}return p._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(c(this),s.e=e,s):(c(this),e)}return u.prototype.isFinallyHandler=function(){return 0===this.type},l.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new u(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,p,p)},t.prototype.tap=function(e){return this._passThrough(e,1,p)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,p);var r=new Array(n-1),o=0,s;for(s=0;s<n-1;++s){var u=arguments[s];if(!i.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(u)));r[o++]=u}r.length=o;var l=arguments[s];return this._passThrough(a(r,l,this),1,void 0,p)},u}},{"./catch_filter":7,"./util":36}],16:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o,s){var a=e("./errors"),u=a.TypeError,l=e("./util"),c=l.errorObj,f=l.tryCatch,h=[];function p(e,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(e);if(r._popContext(),s===c){r._pushContext();var a=t.reject(c.e);return r._popContext(),a}var u=i(s,r);if(u instanceof t)return u}return null}function d(e,n,i,o){if(s.cancellation()){var a=new t(r),u=this._finallyPromise=new t(r);this._promise=a.lastly(function(){return u}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new t(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(d,o),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var e=void 0!==this._generator.return,n;if(e)this._promise._pushContext(),n=f(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),n=f(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(n)}},d.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=f(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=f(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(e){var n=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var r=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(o instanceof t||(o=p(o,this._yieldHandlers,this._promise),null!==o)){o=o._target();var s=o._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?t._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()}else this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(t).yieldHandler,r=d,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=t,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new u("expecting a function but got "+l.classString(e));h.push(e)},t.spawn=function(e){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new d(e,this),i=r.promise();return r._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o,s){var a=e("./util"),u=a.canEvaluate,l=a.tryCatch,c=a.errorObj,f,h,p,d,m,g,y,b;t.join=function(){var e=arguments.length-1,t,r,i,o,s,a,u,l,c;e>0&&"function"==typeof arguments[e]&&(t=arguments[e]);var f=[].slice.call(arguments);t&&f.pop();var c=new n(f).promise();return void 0!==t?c.spread(t):c}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o,s){var a=t._getDomain,u=e("./util"),l=u.tryCatch,c=u.errorObj,f=t._async;function h(e,t,n,r){this.constructor$(e),this._promise._captureStackTrace();var i=a();this._callback=null===i?t:u.domainBind(i,t),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function p(e,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new h(e,n,s,o).promise()}u.inherits(h,n),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(n<0){if(n=-1*n-1,r[n]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=e,this._queue.push(n),!1;null!==a&&(a[n]=e);var f=this._promise,h=this._callback,p=f._boundValue();f._pushContext();var d=l(h).call(p,e,n,o),m=f._popContext();if(s.checkForgottenReturns(d,m,null!==a?"Promise.filter":"Promise.map",f),d===c)return this._reject(d.e),!0;var g=i(d,this._promise);if(g instanceof t){g=g._target();var y=g._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,r[n]=g,g._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(g._reason()),!0):(this._cancel(),!0);d=g._value()}r[n]=d}var b=++this._totalResolved;return b>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},h.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var r=e.pop();this._promiseFulfilled(n[r],r)}},h.prototype._filter=function(e,t){for(var n=t.length,r=new Array(n),i=0,o=0;o<n;++o)e[o]&&(r[i++]=t[o]);r.length=i,this._resolve(r)},h.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return p(this,e,t,null)},t.map=function(e,t,n,r){return p(e,t,n,r)}}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o){var s=e("./util"),a=s.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+s.classString(e));return function(){var r=new t(n);r._captureStackTrace(),r._pushContext();var i=a(e).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+s.classString(e));var r=new t(n),u;if(r._captureStackTrace(),r._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],c=arguments[2];u=s.isArray(l)?a(e).apply(c,l):a(e).call(c,l)}else u=a(e)();var f=r._popContext();return o.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},t.prototype._resolveFromSyncValue=function(e){e===s.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";var r=e("./util"),i=r.maybeWrapAsError,o=e("./errors"),s=o.OperationalError,a=e("./es5");function u(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}var l=/^(?:name|message|stack|cause)$/;function c(e){var t;if(u(e)){t=new s(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var n=a.keys(e),i=0;i<n.length;++i){var o=n[i];l.test(o)||(t[o]=e[o])}return t}return r.markAsOriginatingFromRejection(e),e}function f(e,t){return function(n,r){if(null!==e){if(n){var o=c(i(n));e._attachExtraTrace(o),e._reject(o)}else if(t){var s=[].slice.call(arguments,1);e._fulfill(s)}else e._fulfill(r);e=null}}}t.exports=f},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),r=t._async,i=n.tryCatch,o=n.errorObj;function s(e,t){var s=this;if(!n.isArray(e))return a.call(this,e,t);var u=i(t).apply(this._boundValue(),[null].concat(e));u===o&&r.throwLater(u.e)}function a(e,t){var n=this,s=this._boundValue(),a=void 0===e?i(t).call(s,null):i(t).call(s,null,e);a===o&&r.throwLater(a.e)}function u(e,t){var n=this;if(!e){var s=new Error(e+"");s.cause=e,e=s}var a=i(t).call(this._boundValue(),e);a===o&&r.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var n=a;void 0!==t&&Object(t).spread&&(n=s),this._then(n,u,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,n,r){"use strict";n.exports=function(){var r=function(){return new d("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new O.PromiseInspection(this._target())},o=function(e){return O.reject(new d(e))};function s(){}var a={},u=e("./util"),l;l=u.isNode?function(){var e=t.domain;return void 0===e&&(e=null),e}:function(){return null},u.notEnumerableProp(O,"_getDomain",l);var c=e("./es5"),f=e("./async"),h=new f;c.defineProperty(O,"_async",{value:h});var p=e("./errors"),d=O.TypeError=p.TypeError;O.RangeError=p.RangeError;var m=O.CancellationError=p.CancellationError;O.TimeoutError=p.TimeoutError,O.OperationalError=p.OperationalError,O.RejectionError=p.OperationalError,O.AggregateError=p.AggregateError;var g=function(){},y={},b={},v=e("./thenables")(O,g),w=e("./promise_array")(O,g,v,o,s),_=e("./context")(O),k=_.create,S=e("./debuggability")(O,_),E=S.CapturedTrace,x=e("./finally")(O,v,b),C=e("./catch_filter")(b),A=e("./nodeback"),I=u.errorObj,T=u.tryCatch;function j(e,t){if(null==e||e.constructor!==O)throw new d("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new d("expecting a function but got "+u.classString(t))}function O(e){e!==g&&j(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function P(e){this.promise._resolveCallback(e)}function B(e){this.promise._rejectCallback(e,!1)}function R(e){var t=new O(g);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return O.prototype.toString=function(){return"[object Promise]"},O.prototype.caught=O.prototype.catch=function(e){var t=arguments.length;if(t>1){var n=new Array(t-1),r=0,i;for(i=0;i<t-1;++i){var s=arguments[i];if(!u.isObject(s))return o("Catch statement predicate: expecting an object but got "+u.classString(s));n[r++]=s}if(n.length=r,e=arguments[i],"function"!=typeof e)throw new d("The last argument to .catch() must be a function, got "+u.toString(e));return this.then(void 0,C(n,e,this))}return this.then(void 0,e)},O.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},O.prototype.then=function(e,t){if(S.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+u.classString(e);arguments.length>1&&(n+=", "+u.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},O.prototype.done=function(e,t){var n=this._then(e,t,void 0,void 0,void 0);n._setIsFinal()},O.prototype.spread=function(e){return"function"!=typeof e?o("expecting a function but got "+u.classString(e)):this.all()._then(e,void 0,void 0,y,void 0)},O.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},O.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new w(this).promise()},O.prototype.error=function(e){return this.caught(u.originatesFromRejection,e)},O.getNewLibraryCopy=n.exports,O.is=function(e){return e instanceof O},O.fromNode=O.fromCallback=function(e){var t=new O(g);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=T(e)(A(t,n));return r===I&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},O.all=function(e){return new w(e).promise()},O.cast=function(e){var t=v(e);return t instanceof O||(t=new O(g),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},O.resolve=O.fulfilled=O.cast,O.reject=O.rejected=function(e){var t=new O(g);return t._captureStackTrace(),t._rejectCallback(e,!0),t},O.setScheduler=function(e){if("function"!=typeof e)throw new d("expecting a function but got "+u.classString(e));return h.setScheduler(e)},O.prototype._then=function(e,t,n,r,i){var o=void 0!==i,s=o?i:new O(g),a=this._target(),c=a._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&c)?this._boundValue():a===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=l();if(0!=(50397184&c)){var p,d,y=a._settlePromiseCtx;0!=(33554432&c)?(d=a._rejectionHandler0,p=e):0!=(16777216&c)?(d=a._fulfillmentHandler0,p=t,a._unsetRejectionIsUnhandled()):(y=a._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),a._attachExtraTrace(d),p=t),h.invoke(y,a,{handler:null===f?p:"function"==typeof p&&u.domainBind(f,p),promise:s,receiver:r,value:d})}else a._addCallbacks(e,t,s,r,f);return s},O.prototype._length=function(){return 65535&this._bitField},O.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},O.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},O.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},O.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},O.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},O.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},O.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},O.prototype._isFinal=function(){return(4194304&this._bitField)>0},O.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},O.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},O.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},O.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},O.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==a)return void 0===t&&this._isBound()?this._boundValue():t},O.prototype._promiseAt=function(e){return this[4*e-4+2]},O.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},O.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},O.prototype._boundValue=function(){},O.prototype._migrateCallback0=function(e){var t=e._bitField,n=e._fulfillmentHandler0,r=e._rejectionHandler0,i=e._promise0,o=e._receiverAt(0);void 0===o&&(o=a),this._addCallbacks(n,r,i,o,null)},O.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=a),this._addCallbacks(n,r,i,o,null)},O.prototype._addCallbacks=function(e,t,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:u.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:u.domainBind(i,t));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof e&&(this[s+0]=null===i?e:u.domainBind(i,e)),"function"==typeof t&&(this[s+1]=null===i?t:u.domainBind(i,t))}return this._setLength(o+1),o},O.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},O.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=v(e,this);if(!(n instanceof O))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a<s;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(i)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new m("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(r())}},O.prototype._rejectCallback=function(e,t,n){var r=u.ensureErrorObject(e),i=r===e;if(!i&&!n&&S.warnings()){var o="a promise was rejected with a non-error: "+u.classString(e);this._warn(o,!0)}this._attachExtraTrace(r,!!t&&i),this._reject(e)},O.prototype._resolveFromExecutor=function(e){if(e!==g){var t=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(e,function(e){t._resolveCallback(e)},function(e){t._rejectCallback(e,n)});n=!1,this._popContext(),void 0!==r&&t._rejectCallback(r,!0)}},O.prototype._settlePromiseFromHandler=function(e,t,n,r){var i=r._bitField;if(0==(65536&i)){var o;r._pushContext(),t===y?n&&"number"==typeof n.length?o=T(e).apply(this._boundValue(),n):(o=I,o.e=new d("cannot .spread() a non-array: "+u.classString(n))):o=T(e).call(t,n);var s=r._popContext();i=r._bitField,0==(65536&i)&&(o===b?r._reject(n):o===I?r._rejectCallback(o.e,!1):(S.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},O.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},O.prototype._followee=function(){return this._rejectionHandler0},O.prototype._setFollowee=function(e){this._rejectionHandler0=e},O.prototype._settlePromise=function(e,t,n,r){var o=e instanceof O,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(o&&e._invokeInternalOnCancel(),n instanceof x&&n.isFinallyHandler()?(n.cancelPromise=e,T(t).call(n,r)===I&&e._reject(I.e)):t===i?e._fulfill(i.call(n)):n instanceof s?n._promiseCancelled(e):o||e instanceof w?e._cancel():n.cancel()):"function"==typeof t?o?(u&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,n,r,e)):t.call(n,r,e):n instanceof s?n._isResolved()||(0!=(33554432&a)?n._promiseFulfilled(r,e):n._promiseRejected(r,e)):o&&(u&&e._setAsyncGuaranteed(),0!=(33554432&a)?e._fulfill(r):e._reject(r))},O.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,n=e.promise,r=e.receiver,i=e.value;"function"==typeof t?n instanceof O?this._settlePromiseFromHandler(t,r,i,n):t.call(r,i,n):n instanceof O&&n._reject(i)},O.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},O.prototype._settlePromise0=function(e,t,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,e,i,t)},O.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},O.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():h.settlePromises(this),this._dereferenceTrace())}},O.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return h.fatalError(e,u.isNode);(65535&t)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},O.prototype._fulfillPromises=function(e,t){for(var n=1;n<e;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,t)}},O.prototype._rejectPromises=function(e,t){for(var n=1;n<e;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,t)}},O.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},O.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&c.defineProperty(O.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),O.defer=O.pending=function(){S.deprecated("Promise.defer","new Promise");var e=new O(g);return{promise:e,resolve:P,reject:B}},u.notEnumerableProp(O,"_makeSelfResolutionError",r),e("./method")(O,g,v,o,S),e("./bind")(O,g,v,S),e("./cancel")(O,w,o,S),e("./direct_resolve")(O),e("./synchronous_inspection")(O),e("./join")(O,w,v,g,h,l),O.Promise=O,O.version="3.5.5",e("./call_get.js")(O),e("./generators.js")(O,o,g,v,s,S),e("./map.js")(O,w,o,v,g,S),e("./nodeify.js")(O),e("./promisify.js")(O,g),e("./props.js")(O,w,v,o),e("./race.js")(O,g,v,o),e("./reduce.js")(O,w,o,v,g,S),e("./settle.js")(O,w,S),e("./some.js")(O,w,o),e("./timers.js")(O,g,S),e("./using.js")(O,o,v,k,g,S),e("./any.js")(O),e("./each.js")(O,g),e("./filter.js")(O,g),u.toFastProperties(O),u.toFastProperties(O.prototype),R({a:1}),R({b:2}),R({c:3}),R(1),R(function(){}),R(void 0),R(!1),R(new O(g)),S.setBounds(f.firstLineError,u.lastLineError),O}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o){var s=e("./util"),a=s.isArray;function u(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function l(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(l,o),l.prototype.length=function(){return this._length},l.prototype.promise=function(){return this._promise},l.prototype._init=function e(n,o){var a=r(this._values,this._promise);if(a instanceof t){a=a._target();var l=a._bitField;if(this._values=a,0==(50397184&l))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(a._reason()):this._cancel();a=a._value()}if(a=s.asArray(a),null!==a)0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(u(o));else{var c=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(c,!1)}},l.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<n;++a){var u=r(e[a],i);u instanceof t?(u=u._target(),s=u._bitField):s=null,o?null!==s&&u.suppressUnhandledRejections():null!==s?0==(50397184&s)?(u._proxy(this,a),this._values[a]=u):o=0!=(33554432&s)?this._promiseFulfilled(u._value(),a):0!=(16777216&s)?this._promiseRejected(u._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(u,a)}o||i._setAsyncGuaranteed()},l.prototype._isResolved=function(){return null===this._values},l.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},l.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},l.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},l.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},l.prototype._promiseCancelled=function(){return this._cancel(),!0},l.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},l.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n<e.length;++n)e[n]instanceof t&&e[n].cancel()}},l.prototype.shouldCopyValues=function(){return!0},l.prototype.getActualLength=function(e){return e},l}},{"./util":36}],24:[function(e,t,n){"use strict";t.exports=function(t,n){var r={},i=e("./util"),o=e("./nodeback"),s=i.withAppended,a=i.maybeWrapAsError,u=i.canEvaluate,l=e("./errors").TypeError,c="Async",f={__isPromisified__:!0},h=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],p=new RegExp("^(?:"+h.join("|")+")$"),d=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function m(e){return!p.test(e)}function g(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function y(e,t,n){var r=i.getDataPropertyOrDefault(e,t+n,f);return!!r&&g(r)}function b(e,t,n){for(var r=0;r<e.length;r+=2){var i=e[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<e.length;s+=2)if(e[s]===o)throw new l("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}function v(e,t,n,r){for(var o=i.inheritedDataKeys(e),s=[],a=0;a<o.length;++a){var u=o[a],l=e[u],c=r===d||d(u,l,e);"function"!=typeof l||g(l)||y(e,u,t)||!r(u,l,e,c)||s.push(u,l)}return b(s,t,n),s}var w=function(e){return e.replace(/([$])/,"\\$")},_,k,S,E,x;function C(e,u,l,c,f,h){var p=function(){return this}(),d=e;function m(){var i=u;u===r&&(i=this);var l=new t(n);l._captureStackTrace();var c="string"==typeof d&&this!==p?this[d]:e,f=o(l,h);try{c.apply(i,s(arguments,f))}catch(e){l._rejectCallback(a(e),!0,!0)}return l._isFateSealed()||l._setAsyncGuaranteed(),l}return"string"==typeof d&&(e=c),i.notEnumerableProp(m,"__isPromisified__",!0),m}var A=u?void 0:C;function I(e,t,n,o,s){for(var a=new RegExp(w(t)+"$"),u=v(e,t,a,n),l=0,c=u.length;l<c;l+=2){var f=u[l],h=u[l+1],p=f+t;if(o===A)e[p]=A(f,r,f,h,t,s);else{var d=o(h,function(){return A(f,r,f,h,t,s)});i.notEnumerableProp(d,"__isPromisified__",!0),e[p]=d}}return i.toFastProperties(e),e}function T(e,t,n){return A(e,t,void 0,e,null,n)}t.promisify=function(e,t){if("function"!=typeof e)throw new l("expecting a function but got "+i.classString(e));if(g(e))return e;t=Object(t);var n=void 0===t.context?r:t.context,o=!!t.multiArgs,s=T(e,n,o);return i.copyDescriptors(e,s,m),s},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new l("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");t=Object(t);var n=!!t.multiArgs,r=t.suffix;"string"!=typeof r&&(r="Async");var o=t.filter;"function"!=typeof o&&(o=d);var s=t.promisifier;if("function"!=typeof s&&(s=A),!i.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(e),u=0;u<a.length;++u){var c=e[a[u]];"constructor"!==a[u]&&i.isClass(c)&&(I(c.prototype,r,o,s,n),I(c,r,o,s,n))}return I(e,r,o,s,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,n){"use strict";t.exports=function(t,n,r,i){var o=e("./util"),s=o.isObject,a=e("./es5"),u;"function"==typeof Map&&(u=Map);var l=function(){var e=0,t=0;function n(n,r){this[e]=n,this[e+t]=r,e++}return function r(i){t=i.size,e=0;var o=new Array(2*i.size);return i.forEach(n,o),o}}(),c=function(e){for(var t=new u,n=e.length/2|0,r=0;r<n;++r){var i=e[n+r],o=e[r];t.set(i,o)}return t};function f(e){var t=!1,n;if(void 0!==u&&e instanceof u)n=l(e),t=!0;else{var r=a.keys(e),i=r.length;n=new Array(2*i);for(var o=0;o<i;++o){var s=r[o];n[o]=e[s],n[o+i]=s}}this.constructor$(n),this._isMap=t,this._init$(void 0,t?-6:-3)}function h(e){var n,o=r(e);return s(o)?(n=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&n._propagateFrom(o,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}o.inherits(f,n),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();o<s;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return h(this)},t.props=function(e){return h(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function r(e,t,n,r,i){for(var o=0;o<i;++o)n[o+r]=e[o+t],e[o+t]=void 0}function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1);var n=this._front+t&this._capacity-1;this[n]=e,this._length=t+1},i.prototype.push=function(e,t,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(e),this._pushOne(t),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var n=this._front,i=this._length,o=n+i&t-1;r(this,0,this,t,o)},t.exports=i},{}],27:[function(e,t,n){"use strict";t.exports=function(t,n,r,i){var o=e("./util"),s=function(e){return e.then(function(t){return a(t,e)})};function a(e,a){var u=r(e);if(u instanceof t)return s(u);if(e=o.asArray(e),null===e)return i("expecting an array or an iterable object but got "+o.classString(e));var l=new t(n);void 0!==a&&l._propagateFrom(a,3);for(var c=l._fulfill,f=l._reject,h=0,p=e.length;h<p;++h){var d=e[h];(void 0!==d||h in e)&&t.cast(d)._then(c,f,void 0,l,null)}return l}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o,s){var a=t._getDomain,u=e("./util"),l=u.tryCatch;function c(e,n,r,i){this.constructor$(e);var s=a();this._fn=null===s?n:u.domainBind(s,n),void 0!==r&&(r=t.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function f(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function h(e,t,n,i){if("function"!=typeof t)return r("expecting a function but got "+u.classString(t));var o=new c(e,t,n,i);return o.promise()}function p(e){this.accum=e,this.array._gotAccum(e);var n=i(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(d,void 0,void 0,this,void 0)):d.call(this,n)}function d(e){var n=this.array,r=n._promise,i=l(n._fn),o;r._pushContext(),o=void 0!==n._eachValues?i.call(r._boundValue(),e,this.index,this.length):i.call(r._boundValue(),this.accum,e,this.index,this.length),o instanceof t&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}u.inherits(c,n),c.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},c.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var n,r;this._values=e;var i=e.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=t.resolve(e[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;r<i;++r){var o={accum:null,value:e[r],index:r,length:i,array:this};n=n._then(p,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(f,f,void 0,n,this)},t.prototype.reduce=function(e,t){return h(this,e,t,null)},t.reduce=function(e,t,n,r){return h(e,t,n,r)}}},{"./util":36}],29:[function(e,r,i){"use strict";var o=e("./util"),s,a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},u=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var l=n.setImmediate,c=t.nextTick;s=o.isRecentNode?function(e){l.call(n,e)}:function(e){c.call(t,e)}}else if("function"==typeof u&&"function"==typeof u.resolve){var f=u.resolve();s=function(e){f.then(e)}}else s="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var e=document.createElement("div"),t={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){e.classList.toggle("foo"),n=!1});i.observe(r,t);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function n(r){var i=new MutationObserver(function(){i.disconnect(),r()});i.observe(e,t),o()}}():"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:a;r.exports=s},{"./util":36}],30:[function(e,t,n){"use strict";t.exports=function(t,n,r){var i=t.PromiseInspection,o=e("./util");function s(e){this.constructor$(e)}o.inherits(s,n),s.prototype._promiseResolved=function(e,t){this._values[e]=t;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseFulfilled=function(e,t){var n=new i;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},s.prototype._promiseRejected=function(e,t){var n=new i;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new s(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,r){var i=e("./util"),o=e("./errors").RangeError,s=e("./errors").AggregateError,a=i.isArray,u={};function l(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new l(e),i=n.promise();return n.setHowMany(t),n.init(),i}i.inherits(l,n),l.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},l.prototype.init=function(){this._initialized=!0,this._init()},l.prototype.setUnwrap=function(){this._unwrap=!0},l.prototype.howMany=function(){return this._howMany},l.prototype.setHowMany=function(e){this._howMany=e},l.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},l.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},l.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},l.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new s,t=this.length();t<this._values.length;++t)this._values[t]!==u&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},l.prototype._fulfilled=function(){return this._totalResolved},l.prototype._rejected=function(){return this._values.length-this.length()},l.prototype._addRejected=function(e){this._values.push(e)},l.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},l.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},l.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},l.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return c(e,t)},t.prototype.some=function(e){return c(this,e)},t._SomePromiseArray=l}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return s.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return a.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){var r=e("./util"),i=r.errorObj,o=r.isObject;function s(e,r){if(o(e)){if(e instanceof t)return e;var s=u(e);if(s===i){r&&r._pushContext();var a=t.reject(s.e);return r&&r._popContext(),a}if("function"==typeof s){if(c(e)){var a=new t(n);return e._then(a._fulfill,a._reject,void 0,a,null),a}return f(e,s,r)}}return e}function a(e){return e.then}function u(e){try{return a(e)}catch(e){return i.e=e,i}}var l={}.hasOwnProperty;function c(e){try{return l.call(e,"_promise0")}catch(e){return!1}}function f(e,o,s){var a=new t(n),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var l=!0,c=r.tryCatch(o).call(e,f,h);function f(e){a&&(a._resolveCallback(e),a=null)}function h(e){a&&(a._rejectCallback(e,l,!0),a=null)}return l=!1,a&&c===i&&(a._rejectCallback(c.e,!0,!0),a=null),u}return s}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,r){var i=e("./util"),o=t.TimeoutError;function s(e){this.handle=e}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return u(+this).thenReturn(e)},u=t.delay=function(e,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(a,null,null,e,void 0),r.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(n),u=setTimeout(function(){o._fulfill()},+e),r.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return u(e,this)};var l=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};function c(e){return clearTimeout(this.handle),e}function f(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var n,i;e=+e;var o=new s(setTimeout(function e(){n.isPending()&&l(n,t,i)},e));return r.cancellation()?(i=this.then(),n=i._then(c,f,void 0,o,void 0),n._setOnCancel(o)):n=this._then(c,f,void 0,o,void 0),n}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,o,s){var a=e("./util"),u=e("./errors").TypeError,l=e("./util").inherits,c=a.errorObj,f=a.tryCatch,h={};function p(e){setTimeout(function(){throw e},0)}function d(e){var t=r(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function m(e,n){var i=0,s=e.length,a=new t(o);function u(){if(i>=s)return a._fulfill();var o=d(e[i++]);if(o instanceof t&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),e.promise)}catch(e){return p(e)}if(o instanceof t)return o._then(u,p,null,null,null)}u()}return u(),a}function g(e,t,n){this._data=e,this._promise=t,this._context=n}function y(e,t,n){this.constructor$(e,t,n)}function b(e){return g.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function v(e){this.length=e,this.promise=null,this[e-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},g.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=t!==h?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},g.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},l(y,g),y.prototype.doDispose=function(e,t){var n=this.data();return n.call(e,e,t)},v.prototype._resultCancelled=function(){for(var e=this.length,n=0;n<e;++n){var r=this[n];r instanceof t&&r.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[e-1],o;if("function"!=typeof i)return n("expecting a function but got "+a.classString(i));var u=!0;2===e&&Array.isArray(arguments[0])?(o=arguments[0],e=o.length,u=!1):(o=arguments,e--);for(var l=new v(e),h=0;h<e;++h){var p=o[h];if(g.isDisposer(p)){var d=p;p=p.promise(),p._setDisposable(d)}else{var y=r(p);y instanceof t&&(p=y._then(b,null,null,{resources:l,index:h},void 0))}l[h]=p}for(var w=new Array(l.length),h=0;h<w.length;++h)w[h]=t.resolve(l[h]).reflect();var _=t.all(w).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(n.isRejected())return c.e=n.error(),c;if(!n.isFulfilled())return void _.cancel();e[t]=n.value()}k._pushContext(),i=f(i);var r=u?i.apply(void 0,e):i(e),o=k._popContext();return s.checkForgottenReturns(r,o,"Promise.using",k),r}),k=_.lastly(function(){var e=new t.PromiseInspection(_);return m(l,e)});return l.promise=k,k._setOnCancel(l),k},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new y(e,this,i());throw new u}}},{"./errors":12,"./util":36}],36:[function(e,r,i){"use strict";var o=e("./es5"),s="undefined"==typeof navigator,a={e:{}},u,l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null;function c(){try{var e=u;return u=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function f(e){return u=e,c}var h=function(e,t){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=e,this.constructor$=t,t.prototype)n.call(t.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=t.prototype[r])}return r.prototype=t.prototype,e.prototype=new r,e.prototype};function p(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function d(e){return"function"==typeof e||"object"==typeof e&&null!==e}function m(e){return p(e)?new Error(A(e)):e}function g(e,t){var n=e.length,r=new Array(n+1),i;for(i=0;i<n;++i)r[i]=e[i];return r[i]=t,r}function y(e,t,n){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var r=Object.getOwnPropertyDescriptor(e,t);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function b(e,t,n){if(p(e))return e;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,r),e}function v(e){throw e}var w=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1};if(o.isES5){var n=Object.getOwnPropertyNames;return function(e){for(var r=[],i=Object.create(null);null!=e&&!t(e);){var s;try{s=n(e)}catch(e){return r}for(var a=0;a<s.length;++a){var u=s[a];if(!i[u]){i[u]=!0;var l=Object.getOwnPropertyDescriptor(e,u);null!=l&&null==l.get&&null==l.set&&r.push(u)}}e=o.getPrototypeOf(e)}return r}}var r={}.hasOwnProperty;return function(n){if(t(n))return[];var i=[];e:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<e.length;++s)if(r.call(e[s],o))continue e;i.push(o)}return i}}(),_=/this\s*\.\s*\S+\s*=/;function k(e){try{if("function"==typeof e){var t=o.names(e.prototype),n=o.isES5&&t.length>1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=_.test(e+"")&&o.names(e).length>0;if(n||r||i)return!0}return!1}catch(e){return!1}}function S(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.foo}return r(),r(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return E.test(e)}function C(e,t,n){for(var r=new Array(e),i=0;i<e;++i)r[i]=t+i+n;return r}function A(e){try{return e+""}catch(e){return"[no string representation]"}}function I(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function T(e){try{b(e,"isOperational",!0)}catch(e){}}function j(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function O(e){return I(e)&&o.propertyIsWritable(e,"stack")}var P="stack"in new Error?function(e){return O(e)?e:new Error(A(e))}:function(e){if(O(e))return e;try{throw new Error(A(e))}catch(e){return e}};function B(e){return{}.toString.call(e)}function R(e,t,n){for(var r=o.names(e),i=0;i<r.length;++i){var s=r[i];if(n(s))try{o.defineProperty(t,s,o.getDescriptor(e,s))}catch(e){}}}var N=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var M="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t=[],n=e[Symbol.iterator](),r;!(r=n.next()).done;)t.push(r.value);return t};N=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?M(e):null}}var L=void 0!==t&&"[object process]"===B(t).toLowerCase(),F=void 0!==t&&void 0!==t.env;function D(e){return F?t.env[e]:void 0}function U(){if("function"==typeof Promise)try{var e=new Promise(function(){});if("[object Promise]"==={}.toString.call(e))return Promise}catch(e){}}function z(e,t){return e.bind(t)}var q={isClass:k,isIdentifier:x,inheritedDataKeys:w,getDataPropertyOrDefault:y,thrower:v,isArray:o.isArray,asArray:N,notEnumerableProp:b,isPrimitive:p,isObject:d,isError:I,canEvaluate:s,errorObj:a,tryCatch:f,inherits:h,withAppended:g,maybeWrapAsError:m,toFastProperties:S,filledRange:C,toString:A,canAttachTrace:O,ensureErrorObject:P,originatesFromRejection:j,markAsOriginatingFromRejection:T,classString:B,copyDescriptors:R,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:L,hasEnvVariables:F,env:D,global:l,getNativePromise:U,domainBind:z},K;q.isRecentNode=q.isNode&&(t.versions&&t.versions.node?K=t.versions.node.split(".").map(Number):t.version&&(K=t.version.split(".").map(Number)),0===K[0]&&K[1]>10||K[0]>0),q.isNode&&q.toFastProperties(t);try{throw new Error}catch(e){q.lastLineError=e}r.exports=q},{"./es5":13}]},{},[4])(4)},e.exports=r(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,n(2),n(8))},function(e,t,n){"use strict";var r=n(1947),i=n(68),o=n(172),s=n(104);e.exports=function(e){var t="Please verify options";if(!s(e))throw new TypeError(t);if(!o(e.request))throw new TypeError(t+".request");if(!i(e.expose)||0===e.expose.length)throw new TypeError(t+".expose");var n=r({PromiseImpl:e.PromiseImpl,constructorMixin:e.constructorMixin}),a=e.request.Request.prototype.init;e.request.Request.prototype.init=function e(t){return!s(t)||this._callback||this._rp_promise||n.init.call(this,t),a.apply(this,arguments)};for(var u=!1,l=0;l<e.expose.length;l+=1){var c=e.expose[l];n["promise"===c?"exposePromise":"exposePromiseMethod"](e.request.Request.prototype,null,"_rp_promise",c),"then"===c&&(u=!0)}if(!u)throw new Error('Please expose "then"')}},function(e,t,n){"use strict";var r=n(730),i=n(172),o=n(104),s=n(338),a=n(1948);e.exports=function(e){var t="Please verify options";if(!o(e))throw new TypeError(t);if(!i(e.PromiseImpl))throw new TypeError(t+".PromiseImpl");if(!a(e.constructorMixin)&&!i(e.constructorMixin))throw new TypeError(t+".PromiseImpl");var n=e.PromiseImpl,u=e.constructorMixin,l={init:function(e){var t=this;t._rp_promise=new n(function(e,n){t._rp_resolve=e,t._rp_reject=n,u&&u.apply(t,arguments)}),t._rp_callbackOrig=e.callback,e.callback=t.callback=function e(n,r,i){l.callback.call(t,n,r,i)},s(e.method)&&(e.method=e.method.toUpperCase()),e.transform=e.transform||l.defaultTransformations[e.method],t._rp_options=e,t._rp_options.simple=!1!==e.simple,t._rp_options.resolveWithFullResponse=!0===e.resolveWithFullResponse,t._rp_options.transform2xxOnly=!0===e.transform2xxOnly},defaultTransformations:{HEAD:function(e,t,n){return n?t:t.headers}},callback:function(e,t,o){var s=this,a=!1,u=null;if(i(s._rp_callbackOrig))try{s._rp_callbackOrig.apply(s,arguments)}catch(e){a=!0,u=e}var l=!e&&/^2/.test(""+t.statusCode);if(e?s._rp_reject(new r.RequestError(e,s._rp_options,t)):s._rp_options.simple&&!l?i(s._rp_options.transform)&&!1===s._rp_options.transform2xxOnly?new n(function(e){e(s._rp_options.transform(o,t,s._rp_options.resolveWithFullResponse))}).then(function(e){s._rp_reject(new r.StatusCodeError(t.statusCode,o,s._rp_options,e))}).catch(function(e){s._rp_reject(new r.TransformError(e,s._rp_options,t))}):s._rp_reject(new r.StatusCodeError(t.statusCode,o,s._rp_options,t)):i(s._rp_options.transform)&&(l||!1===s._rp_options.transform2xxOnly)?new n(function(e){e(s._rp_options.transform(o,t,s._rp_options.resolveWithFullResponse))}).then(function(e){s._rp_resolve(e)}).catch(function(e){s._rp_reject(new r.TransformError(e,s._rp_options,t))}):s._rp_options.resolveWithFullResponse?s._rp_resolve(t):s._rp_resolve(o),a)throw u},exposePromiseMethod:function(e,t,n,r,i){if(i=i||r,i in e)throw new Error('Unable to expose method "'+i+'"');e[i]=function e(){var i=t||this;return i[n][r].apply(i[n],arguments)}},exposePromise:function(e,t,n,r){if(r=r||"promise",r in e)throw new Error('Unable to expose method "'+r+'"');e[r]=function e(){var r=t||this;return r[n]}}};return l}},function(e,t){function n(e){return void 0===e}e.exports=n},function(e,t,n){"use strict";var r=/\.node$/;function i(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n)}function o(e,t){return i(t,function(n){e[n]=t[n]}),e}function s(e){i(e,function(t){r.test(t)||delete e[t]})}e.exports=function(e,t,n,r){var a=o({},e);if(s(e),n){var u=!!r.children&&r.children.slice();n();var l=[];i(e,function(e){l.push(e)}),s(e),r.children&&(r.children=u);for(var c=0;c<l.length;c+=1)a[l[c]]&&(e[l[c]]=a[l[c]])}var f=t(),h=!!n&&o({},e);if(s(e),n)for(var p=0;p<l.length;p+=1)h[l[p]]&&(e[l[p]]=h[l[p]]);return o(e,a),f}},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(15),i=n(32).parse,o=n(13),s=n(731),a=n(732).Store,u=n(1951).MemoryCookieStore,l=n(734).pathMatch,c=n(1952),f;try{f=n(213)}catch(e){console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization")}var h=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/,p=/[\x00-\x1F]/,d=["\n","\r","\0"],m=/[\x20-\x3A\x3C-\x7E]+/,g=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/,y={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],w=2147483647e3,_=0;function k(e,t,n,r){for(var i=0;i<e.length;){var o=e.charCodeAt(i);if(o<=47||o>=58)break;i++}return i<t||i>n?null:r||i==e.length?parseInt(e.substr(0,i),10):null}function S(e){var t=e.split(":"),n=[0,0,0];if(3!==t.length)return null;for(var r=0;r<3;r++){var i=2==r,o=k(t[r],1,2,i);if(null===o)return null;n[r]=o}return n}function E(e){e=String(e).substr(0,3).toLowerCase();var t=y[e];return t>=0?t:null}function x(e){if(e){var t=e.split(g);if(t){for(var n=null,r=null,i=null,o=null,s=null,a=null,u=0;u<t.length;u++){var l=t[u].trim(),c;if(l.length)null===i&&(c=S(l),c)?(n=c[0],r=c[1],i=c[2]):null!==o||(c=k(l,1,2,!0),null===c)?null!==s||(c=E(l),null===c)?null===a&&(c=k(l,2,4,!0),null!==c&&(a=c,a>=70&&a<=99?a+=1900:a>=0&&a<=69&&(a+=2e3))):s=c:o=c}if(!(null===o||null===s||null===a||null===i||o<1||o>31||a<1601||n>23||r>59||i>59))return new Date(Date.UTC(a,s,o,n,r,i))}}}function C(e){var t=e.getUTCDate();t=t>=10?t:"0"+t;var n=e.getUTCHours();n=n>=10?n:"0"+n;var r=e.getUTCMinutes();r=r>=10?r:"0"+r;var i=e.getUTCSeconds();return i=i>=10?i:"0"+i,v[e.getUTCDay()]+", "+t+" "+b[e.getUTCMonth()]+" "+e.getUTCFullYear()+" "+n+":"+r+":"+i+" GMT"}function A(e){return null==e?null:(e=e.trim().replace(/^\./,""),f&&/[^\u0001-\u007f]/.test(e)&&(e=f.toASCII(e)),e.toLowerCase())}function I(e,t,n){if(null==e||null==t)return null;if(!1!==n&&(e=A(e),t=A(t)),e==t)return!0;if(r.isIP(e))return!1;var i=e.indexOf(t);return!(i<=0)&&(e.length===t.length+i&&"."===e.substr(i-1,1))}function T(e){if(!e||"/"!==e.substr(0,1))return"/";if("/"===e)return e;var t=e.lastIndexOf("/");return 0===t?"/":e.slice(0,t)}function j(e){for(var t=0;t<d.length;t++){var n=e.indexOf(d[t]);-1!==n&&(e=e.substr(0,n))}return e}function O(e,t){e=j(e);var n=e.indexOf("="),r,i;if(t)0===n&&(e=e.substr(1),n=e.indexOf("="));else if(n<=0)return;if(n<=0?(r="",i=e.trim()):(r=e.substr(0,n).trim(),i=e.substr(n+1).trim()),!p.test(r)&&!p.test(i)){var o=new F;return o.key=r,o.value=i,o}}function P(e,t){t&&"object"==typeof t||(t={}),e=e.trim();var n=e.indexOf(";"),r=-1===n?e:e.substr(0,n),i=O(r,!!t.loose);if(i){if(-1===n)return i;var o=e.slice(n+1).trim();if(0===o.length)return i;for(var s=o.split(";");s.length;){var a=s.shift().trim();if(0!==a.length){var u=a.indexOf("="),l,c;switch(-1===u?(l=a,c=null):(l=a.substr(0,u),c=a.substr(u+1)),l=l.trim().toLowerCase(),c&&(c=c.trim()),l){case"expires":if(c){var f=x(c);f&&(i.expires=f)}break;case"max-age":if(c&&/^-?[0-9]+$/.test(c)){var h=parseInt(c,10);i.setMaxAge(h)}break;case"domain":if(c){var p=c.trim().replace(/^\./,"");p&&(i.domain=p.toLowerCase())}break;case"path":i.path=c&&"/"===c[0]?c:null;break;case"secure":i.secure=!0;break;case"httponly":i.httpOnly=!0;break;default:i.extensions=i.extensions||[],i.extensions.push(a)}}}return i}}function B(e){var t;try{t=JSON.parse(e)}catch(e){return e}return t}function R(e){if(!e)return null;var t;if("string"==typeof e){if(t=B(e),t instanceof Error)return null}else t=e;for(var n=new F,r=0;r<F.serializableProperties.length;r++){var i=F.serializableProperties[r];void 0!==t[i]&&t[i]!==F.prototype[i]&&("expires"===i||"creation"===i||"lastAccessed"===i?null===t[i]?n[i]=null:n[i]="Infinity"==t[i]?"Infinity":new Date(t[i]):n[i]=t[i])}return n}function N(e,t){var n=0,r=e.path?e.path.length:0,i=t.path?t.path.length:0;if(n=i-r,0!==n)return n;var o=e.creation?e.creation.getTime():w,s=t.creation?t.creation.getTime():w;return n=o-s,0!==n?n:(n=e.creationIndex-t.creationIndex,n)}function M(e){if("/"===e)return["/"];e.lastIndexOf("/")===e.length-1&&(e=e.substr(0,e.length-1));for(var t=[e];e.length>1;){var n=e.lastIndexOf("/");if(0===n)break;e=e.substr(0,n),t.push(e)}return t.push("/"),t}function L(e){if(e instanceof Object)return e;try{e=decodeURI(e)}catch(e){}return i(e)}function F(e){e=e||{},Object.keys(e).forEach(function(t){F.prototype.hasOwnProperty(t)&&F.prototype[t]!==e[t]&&"_"!==t.substr(0,1)&&(this[t]=e[t])},this),this.creation=this.creation||new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++F.cookiesCreated})}function D(e,t){"boolean"==typeof t?t={rejectPublicSuffixes:t}:null==t&&(t={}),null!=t.rejectPublicSuffixes&&(this.rejectPublicSuffixes=t.rejectPublicSuffixes),null!=t.looseMode&&(this.enableLooseMode=t.looseMode),e||(e=new u),this.store=e}F.cookiesCreated=0,F.parse=P,F.fromJSON=R,F.prototype.key="",F.prototype.value="",F.prototype.expires="Infinity",F.prototype.maxAge=null,F.prototype.domain=null,F.prototype.path=null,F.prototype.secure=!1,F.prototype.httpOnly=!1,F.prototype.extensions=null,F.prototype.hostOnly=null,F.prototype.pathIsDefault=null,F.prototype.creation=null,F.prototype.lastAccessed=null,Object.defineProperty(F.prototype,"creationIndex",{configurable:!0,enumerable:!1,writable:!0,value:0}),F.serializableProperties=Object.keys(F.prototype).filter(function(e){return!(F.prototype[e]instanceof Function||"creationIndex"===e||"_"===e.substr(0,1))}),F.prototype.inspect=function e(){var t=Date.now();return'Cookie="'+this.toString()+"; hostOnly="+(null!=this.hostOnly?this.hostOnly:"?")+"; aAge="+(this.lastAccessed?t-this.lastAccessed.getTime()+"ms":"?")+"; cAge="+(this.creation?t-this.creation.getTime()+"ms":"?")+'"'},o.inspect.custom&&(F.prototype[o.inspect.custom]=F.prototype.inspect),F.prototype.toJSON=function(){for(var e={},t=F.serializableProperties,n=0;n<t.length;n++){var r=t[n];this[r]!==F.prototype[r]&&("expires"===r||"creation"===r||"lastAccessed"===r?null===this[r]?e[r]=null:e[r]="Infinity"==this[r]?"Infinity":this[r].toISOString():"maxAge"===r?null!==this[r]&&(e[r]=this[r]==1/0||this[r]==-1/0?this[r].toString():this[r]):this[r]!==F.prototype[r]&&(e[r]=this[r]))}return e},F.prototype.clone=function(){return R(this.toJSON())},F.prototype.validate=function e(){if(!h.test(this.value))return!1;if(!(this.expires==1/0||this.expires instanceof Date||x(this.expires)))return!1;if(null!=this.maxAge&&this.maxAge<=0)return!1;if(null!=this.path&&!m.test(this.path))return!1;var t=this.cdomain();if(t){if(t.match(/\.$/))return!1;var n=s.getPublicSuffix(t);if(null==n)return!1}return!0},F.prototype.setExpires=function e(t){t instanceof Date?this.expires=t:this.expires=x(t)||"Infinity"},F.prototype.setMaxAge=function e(t){this.maxAge=t===1/0||t===-1/0?t.toString():t},F.prototype.cookieString=function e(){var t=this.value;return null==t&&(t=""),""===this.key?t:this.key+"="+t},F.prototype.toString=function e(){var t=this.cookieString();return this.expires!=1/0&&(this.expires instanceof Date?t+="; Expires="+C(this.expires):t+="; Expires="+this.expires),null!=this.maxAge&&this.maxAge!=1/0&&(t+="; Max-Age="+this.maxAge),this.domain&&!this.hostOnly&&(t+="; Domain="+this.domain),this.path&&(t+="; Path="+this.path),this.secure&&(t+="; Secure"),this.httpOnly&&(t+="; HttpOnly"),this.extensions&&this.extensions.forEach(function(e){t+="; "+e}),t},F.prototype.TTL=function e(t){if(null!=this.maxAge)return this.maxAge<=0?0:1e3*this.maxAge;var n=this.expires;return n!=1/0?(n instanceof Date||(n=x(n)||1/0),n==1/0?1/0:n.getTime()-(t||Date.now())):1/0},F.prototype.expiryTime=function e(t){if(null!=this.maxAge){var n=t||this.creation||new Date,r=this.maxAge<=0?-1/0:1e3*this.maxAge;return n.getTime()+r}return this.expires==1/0?1/0:this.expires.getTime()},F.prototype.expiryDate=function e(t){var n=this.expiryTime(t);return n==1/0?new Date(w):n==-1/0?new Date(0):new Date(n)},F.prototype.isPersistent=function e(){return null!=this.maxAge||this.expires!=1/0},F.prototype.cdomain=F.prototype.canonicalizedDomain=function e(){return null==this.domain?null:A(this.domain)},D.prototype.store=null,D.prototype.rejectPublicSuffixes=!0,D.prototype.enableLooseMode=!1;var U=[];function z(e){return function(){if(!this.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");var t=Array.prototype.slice.call(arguments),n,r;if(t.push(function e(t,i){n=t,r=i}),this[e].apply(this,t),n)throw n;return r}}U.push("setCookie"),D.prototype.setCookie=function(e,t,n,r){var i,o=L(t);n instanceof Function&&(r=n,n={});var a=A(o.hostname),u=this.enableLooseMode;if(null!=n.loose&&(u=n.loose),e instanceof F||(e=F.parse(e,{loose:u})),!e)return i=new Error("Cookie failed to parse"),r(n.ignoreError?null:i);var l=n.now||new Date;if(this.rejectPublicSuffixes&&e.domain){var c=s.getPublicSuffix(e.cdomain());if(null==c)return i=new Error("Cookie has domain set to a public suffix"),r(n.ignoreError?null:i)}if(e.domain){if(!I(a,e.cdomain(),!1))return i=new Error("Cookie not in this host's domain. Cookie:"+e.cdomain()+" Request:"+a),r(n.ignoreError?null:i);null==e.hostOnly&&(e.hostOnly=!1)}else e.hostOnly=!0,e.domain=a;if(e.path&&"/"===e.path[0]||(e.path=T(o.pathname),e.pathIsDefault=!0),!1===n.http&&e.httpOnly)return i=new Error("Cookie is HttpOnly and this isn't an HTTP API"),r(n.ignoreError?null:i);var f=this.store;function h(t,i){if(t)return r(t);var o=function(t){if(t)return r(t);r(null,e)};if(i){if(!1===n.http&&i.httpOnly)return t=new Error("old Cookie is HttpOnly and this isn't an HTTP API"),r(n.ignoreError?null:t);e.creation=i.creation,e.creationIndex=i.creationIndex,e.lastAccessed=l,f.updateCookie(i,e,o)}else e.creation=e.lastAccessed=l,f.putCookie(e,o)}f.updateCookie||(f.updateCookie=function(e,t,n){this.putCookie(t,n)}),f.findCookie(e.domain,e.path,e.key,h)},U.push("getCookies"),D.prototype.getCookies=function(e,t,n){var r=L(e);t instanceof Function&&(n=t,t={});var i=A(r.hostname),o=r.pathname||"/",s=t.secure;null!=s||!r.protocol||"https:"!=r.protocol&&"wss:"!=r.protocol||(s=!0);var a=t.http;null==a&&(a=!0);var u=t.now||Date.now(),c=!1!==t.expire,f=!!t.allPaths,h=this.store;function p(e){if(e.hostOnly){if(e.domain!=i)return!1}else if(!I(i,e.domain,!1))return!1;return!(!f&&!l(o,e.path))&&(!(e.secure&&!s)&&(!(e.httpOnly&&!a)&&(!(c&&e.expiryTime()<=u)||(h.removeCookie(e.domain,e.path,e.key,function(){}),!1))))}h.findCookies(i,f?null:o,function(e,r){if(e)return n(e);r=r.filter(p),!1!==t.sort&&(r=r.sort(N));var i=new Date;r.forEach(function(e){e.lastAccessed=i}),n(null,r)})},U.push("getCookieString"),D.prototype.getCookieString=function(){var e=Array.prototype.slice.call(arguments,0),t=e.pop(),n=function(e,n){e?t(e):t(null,n.sort(N).map(function(e){return e.cookieString()}).join("; "))};e.push(n),this.getCookies.apply(this,e)},U.push("getSetCookieStrings"),D.prototype.getSetCookieStrings=function(){var e=Array.prototype.slice.call(arguments,0),t=e.pop(),n=function(e,n){e?t(e):t(null,n.map(function(e){return e.toString()}))};e.push(n),this.getCookies.apply(this,e)},U.push("serialize"),D.prototype.serialize=function(e){var t=this.store.constructor.name;"Object"===t&&(t=null);var n={version:"tough-cookie@"+c,storeType:t,rejectPublicSuffixes:!!this.rejectPublicSuffixes,cookies:[]};if(!this.store.getAllCookies||"function"!=typeof this.store.getAllCookies)return e(new Error("store does not support getAllCookies and cannot be serialized"));this.store.getAllCookies(function(t,r){return t?e(t):(n.cookies=r.map(function(e){return e=e instanceof F?e.toJSON():e,delete e.creationIndex,e}),e(null,n))})},D.prototype.toJSON=function(){return this.serializeSync()},U.push("_importCookies"),D.prototype._importCookies=function(e,t){var n=this,r=e.cookies;if(!r||!Array.isArray(r))return t(new Error("serialized jar has no cookies array"));function i(e){if(e)return t(e);if(!r.length)return t(e,n);var o;try{o=R(r.shift())}catch(e){return t(e)}if(null===o)return i(null);n.store.putCookie(o,i)}r=r.slice(),i()},D.deserialize=function(e,t,n){var r;if(3!==arguments.length&&(n=t,t=null),"string"==typeof e){if(r=B(e),r instanceof Error)return n(r)}else r=e;var i=new D(t,r.rejectPublicSuffixes);i._importCookies(r,function(e){if(e)return n(e);n(null,i)})},D.deserializeSync=function(e,t){var n="string"==typeof e?JSON.parse(e):e,r=new D(t,n.rejectPublicSuffixes);if(!r.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");return r._importCookiesSync(n),r},D.fromJSON=D.deserializeSync,D.prototype.clone=function(e,t){1===arguments.length&&(t=e,e=null),this.serialize(function(n,r){if(n)return t(n);D.deserialize(r,e,t)})},U.push("removeAllCookies"),D.prototype.removeAllCookies=function(e){var t=this.store;if(t.removeAllCookies instanceof Function&&t.removeAllCookies!==a.prototype.removeAllCookies)return t.removeAllCookies(e);t.getAllCookies(function(n,r){if(n)return e(n);if(0===r.length)return e(null);var i=0,o=[];function s(t){if(t&&o.push(t),i++,i===r.length)return e(o.length?o[0]:null)}r.forEach(function(e){t.removeCookie(e.domain,e.path,e.key,s)})})},D.prototype._cloneSync=z("clone"),D.prototype.cloneSync=function(e){if(!e.synchronous)throw new Error("CookieJar clone destination store is not synchronous; use async API instead.");return this._cloneSync(e)},U.forEach(function(e){D.prototype[e+"Sync"]=z(e)}),t.version=c,t.CookieJar=D,t.Cookie=F,t.Store=a,t.MemoryCookieStore=u,t.parseDate=x,t.formatDate=C,t.parse=P,t.fromJSON=R,t.domainMatch=I,t.defaultPath=T,t.pathMatch=l,t.getPublicSuffix=s.getPublicSuffix,t.cookieCompare=N,t.permuteDomain=n(733).permuteDomain,t.permutePath=M,t.canonicalDomain=A},function(e,t,n){"use strict";
/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/var r=n(732).Store,i=n(733).permuteDomain,o=n(734).pathMatch,s=n(13);function a(){r.call(this),this.idx={}}s.inherits(a,r),t.MemoryCookieStore=a,a.prototype.idx=null,a.prototype.synchronous=!0,a.prototype.inspect=function(){return"{ idx: "+s.inspect(this.idx,!1,2)+" }"},s.inspect.custom&&(a.prototype[s.inspect.custom]=a.prototype.inspect),a.prototype.findCookie=function(e,t,n,r){return this.idx[e]&&this.idx[e][t]?r(null,this.idx[e][t][n]||null):r(null,void 0)},a.prototype.findCookies=function(e,t,n){var r=[],s;if(!e)return n(null,[]);s=t?function e(n){Object.keys(n).forEach(function(e){if(o(t,e)){var i=n[e];for(var s in i)r.push(i[s])}})}:function e(t){for(var n in t){var i=t[n];for(var o in i)r.push(i[o])}};var a=i(e)||[e],u=this.idx;a.forEach(function(e){var t=u[e];t&&s(t)}),n(null,r)},a.prototype.putCookie=function(e,t){this.idx[e.domain]||(this.idx[e.domain]={}),this.idx[e.domain][e.path]||(this.idx[e.domain][e.path]={}),this.idx[e.domain][e.path][e.key]=e,t(null)},a.prototype.updateCookie=function(e,t,n){this.putCookie(t,n)},a.prototype.removeCookie=function(e,t,n,r){this.idx[e]&&this.idx[e][t]&&this.idx[e][t][n]&&delete this.idx[e][t][n],r(null)},a.prototype.removeCookies=function(e,t,n){return this.idx[e]&&(t?delete this.idx[e][t]:delete this.idx[e]),n(null)},a.prototype.removeAllCookies=function(e){return this.idx={},e(null)},a.prototype.getAllCookies=function(e){var t=[],n=this.idx,r=Object.keys(n);r.forEach(function(e){var r=Object.keys(n[e]);r.forEach(function(r){var i=Object.keys(n[e][r]);i.forEach(function(i){null!==i&&t.push(n[e][r][i])})})}),t.sort(function(e,t){return(e.creationIndex||0)-(t.creationIndex||0)}),e(null,t)}},function(e,t){e.exports="2.5.0"},function(e,t,n){"use strict";e.exports=n(1954)},function(e,t,n){"use strict";e.exports=n(730)},function(e,t,n){const r=n(1956);e.exports=new r},function(e,t,n){const r=n(15),i=n(1957),{QuotaExceededError:o,TypeMismatchError:s}=n(288),a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array],u={Int8Array:"getInt8",Uint8Array:"getUint8",Int16Array:"getInt16",Uint16Array:"getUint16",Int32Array:"getInt32",Uint32Array:"getUint32"};class l{getRandomValues(e){if(!a.some(t=>e instanceof t))throw new s;let t=e.byteLength;if(t>65536)throw new o;let n=e.constructor,i=u[n.name],l=t*e.length,c=r.randomBytes(l),f=new Uint8Array(c),h=new DataView(f.buffer);for(let n=0;n<l;n+=t){let r=h[i](n),o=n/t;e[o]=r}return e}get subtle(){return new i}}e.exports=l},function(e,t,n){const r=n(1958),i=n(1959),o=n(1960),s=n(1961),a=n(1962),{InvalidAccessError:u,NotSupportedError:l}=n(288),{TextEncoder:c,TextDecoder:f}=n(1975);class h{encrypt(e,t,n){n=n.slice();let r=a.normalize("encrypt",e);return r instanceof Error?Promise.reject(r):new Promise((i,o)=>{if(r.name!==t.algorithm.name)throw new u("Algorithm does not match key");if(!t.usages.includes("encrypt"))throw new u('Key usages must include "encrypt"');let s=r.encrypt(e,t,n);i(s)})}decrypt(e,t,n){let r=a.normalize("decrypt",e);return r instanceof Error?Promise.reject(r):(n=n.slice(),new Promise((i,o)=>{if(r.name!==t.algorithm.name)throw new u("Algorithm does not match key");if(!t.usages.includes("decrypt"))throw new u('Key usages must include "decrypt"');let s=r.decrypt(e,t,n);i(s)}))}sign(e,t,n){n=n.slice();let r=a.normalize("sign",e);return r instanceof Error?Promise.reject(r):new Promise((e,i)=>{if(r.name!==t.algorithm.name)throw new u("Algorithm does not match key");if(!t.usages.includes("sign"))throw new u('Key usages must include "sign"');let o=r.sign(t,n);e(o)})}verify(e,t,n,r){n=n.slice();let i=a.normalize("verify",e);return i instanceof Error?Promise.reject(i):(r=r.slice(),new Promise((e,o)=>{if(i.name!==t.algorithm.name)throw new u("Algorithm does not match key");if(!t.usages.includes("verify"))throw new u('Key usages must include "verify"');let s=i.verify(t,n,r);e(s)}))}digest(e,t){t=t.slice();let n=a.normalize("digest",e);return n instanceof Error?Promise.reject(n):new Promise((r,i)=>{try{let o=n.digest(e,t);return r(o)}catch(e){return i(e)}})}generateKey(e,t,n){let o=a.normalize("generateKey",e);return o instanceof Error?Promise.reject(o):new Promise((s,a)=>{try{let u=o.generateKey(e,t,n);if(u instanceof r){let{type:e,usages:t}=u,n="secret"===e||"private"===e,r=!t||0===t.length;if(n&&r)throw new SyntaxError}if(u instanceof i){let{privateKey:{usages:e}}=u;if(!e||0===e.length)throw new SyntaxError}s(u)}catch(e){return a(e)}})}deriveKey(e,t,n,r,i){return new Promise}deriveBits(e,t,n){return new Promise}importKey(e,t,n,r,i){let u=a.normalize("importKey",n);return u instanceof Error?Promise.reject(u):new Promise((a,l)=>{if("raw"===e||"pkcs8"===e||"spki"===e){if(t instanceof o)throw new TypeError;t=t.slice()}if("jwk"===e&&(t=new o(t),!(t instanceof o)))throw new TypeError("key is not a JSON Web Key");try{let o=u.importKey(e,t,n,r,i);if(!("secret"!==o.type&&"private"!==o.type||o.usages&&0!==o.usages.length))throw new SyntaxError;o.extractable=r,o.usages=s.normalize(i),a(o)}catch(e){return l(e)}})}exportKey(e,t){return new Promise((n,r)=>{try{let i=a.exportKey;if(!i[t.algorithm.name])throw new l(t.algorithm.name);if(!1===t.extractable)throw new u("Key is not extractable");let o=t.algorithm.exportKey(e,t);n(o)}catch(e){return r(e)}})}wrapKey(e,t,n,r){let i=a.normalize("wrapKey",r);return i instanceof Error&&(i=a.normalize("encrypt",r)),i instanceof Error?Promise.reject(i):new Promise((o,s)=>{try{if(i.name!==n.algorithm.name)throw new u("NormalizedAlgorthm name must be same as wrappingKey algorithm name");if(!n.usages.includes("wrapKey"))throw new u('Wrapping key usages must include "wrapKey"');let f=a.exportKey;if(!f[t.algorithm.name])throw new l(t.algorithm.name);if(!1===t.extractable)throw new u("Key is not extractable");return this.exportKey(e,t).then(t=>{let o;if(["raw","pkcs8","spki"].includes(e))o=t;else if("jwk"===e){let e=JSON.stringify(t);o=(new c).encode(e)}return i.wrapKey?i.wrapKey(e,o,n,r):i.encrypt?i.encrypt(r,n,new Uint8Array(o)):s(new l(i.name))}).then(o)}catch(e){return s(e)}})}unwrapKey(e,t,n,r,i,o,s){let c=a.normalize("unwrapKey",r);if(c instanceof Error&&(c=a.normalize("decrypt",r)),c instanceof Error)return Promise.reject(c);let h=a.normalize("importKey",i);return h instanceof Error?Promise.reject(h):new Promise((a,p)=>{try{if(c.name!==n.algorithm.name)throw new u("NormalizedAlgorthm name must be same as unwrappingKey algorithm name");if(!n.usages.includes("unwrapKey"))throw new u('Unwrapping key usages must include "unwrapKey"');let d,m;if(c.unwrapKey)d=c.unwrapKey(e,t,n,r,i,o,s);else{if(!c.decrypt)return p(new l(c.name));d=c.decrypt(r,n,t)}["raw","pkcs8","spki"].includes(e)?m=d:"jwk"===e&&(m=JSON.parse((new f).decode(d)));let g=h.importKey(e,m,i,o,s);return a(g)}catch(e){return p(e)}})}}e.exports=h},function(e,t){class n{constructor({type:e,extractable:t,algorithm:n,usages:r,handle:i}){this.type=e,this.extractable=t,this.algorithm=n,this.usages=r,Object.defineProperties(this,{handle:{enumerable:!1,writeable:!1,value:i}})}clone({type:e,extractable:t,algorithm:r,usages:i,handle:o},s){return new n({type:e,extractable:t,algorithm:r,usages:i,handle:o})}}e.exports=n},function(e,t){class n{constructor({publicKey:e,privateKey:t}){this.publicKey=e,this.privateKey=t}}e.exports=n},function(e,t){class n{constructor(e){Object.assign(this,e)}}e.exports=n},function(e,t){class n extends Array{constructor(e){super(),e.forEach(e=>this.push(e))}normalize(e){let t=[];for(let n=0;n<this.length;n++){let r=this[n];e.includes(r)&&t.push(r)}return t}}e.exports=new n(["encrypt","decrypt","sign","verify","deriveBits","wrapKey","unwrapKey"])},function(e,t,n){const r=n(1963),i=new r;i.define("RSA-OAEP","encrypt","../algorithms/RSA-OAEP"),i.define("AES-CTR","encrypt","../algorithms/AES-CTR"),i.define("AES-CBC","encrypt","../algorithms/AES-CBC"),i.define("AES-GCM","encrypt","../algorithms/AES-GCM"),i.define("RSA-OAEP","decrypt","../algorithms/RSA-OAEP"),i.define("AES-CTR","decrypt","../algorithms/AES-CTR"),i.define("AES-CBC","decrypt","../algorithms/AES-CBC"),i.define("AES-GCM","decrypt","../algorithms/AES-GCM"),i.define("RSASSA-PKCS1-v1_5","sign","../algorithms/RSASSA-PKCS1-v1_5"),i.define("RSA-PSS","sign","../algorithms/RSA-PSS"),i.define("ECDSA","sign","../algorithms/ECDSA"),i.define("EDDSA","sign","../algorithms/EDDSA"),i.define("HMAC","sign","../algorithms/HMAC"),i.define("RSASSA-PKCS1-v1_5","verify","../algorithms/RSASSA-PKCS1-v1_5"),i.define("RSA-PSS","verify","../algorithms/RSA-PSS"),i.define("ECDSA","verify","../algorithms/ECDSA"),i.define("EDDSA","verify","../algorithms/EDDSA"),i.define("HMAC","verify","../algorithms/HMAC"),i.define("SHA-1","digest","../algorithms/SHA"),i.define("SHA-256","digest","../algorithms/SHA"),i.define("SHA-384","digest","../algorithms/SHA"),i.define("SHA-512","digest","../algorithms/SHA"),i.define("RSASSA-PKCS1-v1_5","generateKey","../algorithms/RSASSA-PKCS1-v1_5"),i.define("RSA-PSS","generateKey","../algorithms/RSA-PSS"),i.define("RSA-OAEP","generateKey","../algorithms/RSA-OAEP"),i.define("ECDSA","generateKey","../algorithms/ECDSA"),i.define("EDDSA","generateKey","../algorithms/EDDSA"),i.define("AES-CTR","generateKey","../algorithms/AES-CTR"),i.define("AES-CBC","generateKey","../algorithms/AES-CBC"),i.define("AES-GCM","generateKey","../algorithms/AES-GCM"),i.define("AES-KW","generateKey","../algorithms/AES-KW"),i.define("HMAC","generateKey","../algorithms/HMAC"),i.define("RSASSA-PKCS1-v1_5","importKey","../algorithms/RSASSA-PKCS1-v1_5"),i.define("RSA-PSS","importKey","../algorithms/RSA-PSS"),i.define("RSA-OAEP","importKey","../algorithms/RSA-OAEP"),i.define("ECDSA","importKey","../algorithms/ECDSA"),i.define("EDDSA","importKey","../algorithms/EDDSA"),i.define("AES-CTR","importKey","../algorithms/AES-CTR"),i.define("AES-CBC","importKey","../algorithms/AES-CBC"),i.define("AES-GCM","importKey","../algorithms/AES-GCM"),i.define("AES-KW","importKey","../algorithms/AES-KW"),i.define("HMAC","importKey","../algorithms/HMAC"),i.define("RSASSA-PKCS1-v1_5","exportKey","../algorithms/RSASSA-PKCS1-v1_5"),i.define("RSA-PSS","exportKey","../algorithms/RSA-PSS"),i.define("RSA-OAEP","exportKey","../algorithms/RSA-OAEP"),i.define("EDDSA","exportKey","../algorithms/EDDSA"),i.define("ECDSA","exportKey","../algorithms/ECDSA"),i.define("AES-CTR","exportKey","../algorithms/AES-CTR"),i.define("AES-CBC","exportKey","../algorithms/AES-CBC"),i.define("AES-GCM","exportKey","../algorithms/AES-GCM"),i.define("AES-KW","exportKey","../algorithms/AES-KW"),i.define("HMAC","exportKey","../algorithms/HMAC"),i.define("RSA-OAEP","wrapKey","../algorithms/RSA-OAEP"),i.define("AES-CTR","wrapKey","../algorithms/AES-CTR"),i.define("AES-CBC","wrapKey","../algorithms/AES-CBC"),i.define("AES-GCM","wrapKey","../algorithms/AES-GCM"),i.define("AES-KW","wrapKey","../algorithms/AES-KW"),i.define("RSA-OAEP","unwrapKey","../algorithms/RSA-OAEP"),i.define("AES-CTR","unwrapKey","../algorithms/AES-CTR"),i.define("AES-CBC","unwrapKey","../algorithms/AES-CBC"),i.define("AES-GCM","unwrapKey","../algorithms/AES-GCM"),i.define("AES-KW","unwrapKey","../algorithms/AES-KW"),e.exports=i},function(e,t,n){const r=n(1964),i=n(1965),o=n(1973),{NotSupportedError:s}=n(288),a=["encrypt","decrypt","sign","verify","deriveBits","digest","wrapKey","unwrapKey","generateKey","importKey","exportKey","getLength"];class u{constructor(){a.forEach(e=>{this[e]=new o})}static get operations(){return a}define(e,t,n){let r=this[t];r[e]=n}normalize(e,t){if("string"==typeof t)return this.normalize(e,new i({name:t}));if("object"==typeof t){let i=this[e],o;try{o=new r(t)}catch(e){return e}let a=o.name,u,l;if(a=i.getCaseInsensitive(a),void 0===a)return new s(t.name);try{u=n(1974)(i[a]),l=new u(t),l.name=a}catch(e){return e}let c=u.dictionaries;for(let e=0;e<c.length;e++){let t=c[e],n=t.members;for(let e in n){let t=n[e],r=l[e];try{if("BufferSource"===t&&void 0!==r&&(l[e]=r.slice()),"HashAlgorithmIdentifier"===t){let t=this.normalize("digest",r);if(t instanceof Error)return t;l[e]=t}"AlgorithmIdentifier"===t&&(l[e]=this.normalize(WTF,r))}catch(e){return e}}}return l}}}e.exports=u},function(e,t){class n{constructor(e){if("string"==typeof e)this.name=e;else if(Object.assign(this,e),"string"!=typeof this.name)throw new Error("Algorithm name must be a string")}}e.exports=n},function(e,t,n){const{NotSupportedError:r}=n(288);class i{constructor(e){if(Object.assign(this,e),void 0===this.name)throw new Error("KeyAlgorithm must have a name")}}e.exports=i},function(e,t){class n extends Error{constructor(e){super(e)}}e.exports=n},function(e,t){class n extends Error{constructor(e){super(e)}}e.exports=n},function(e,t,n){const r=n(386);class i extends r{constructor(e){super(),this.message=`${e} is not a supported key format`}}e.exports=i},function(e,t,n){const r=n(386);class i extends r{constructor(e,t){super(),this.message=`Currently '${e}' is not a supported format. Please use '${t}' in the interim.`}}e.exports=i},function(e,t){class n extends Error{constructor(e){super(e)}}e.exports=n},function(e,t){class n extends Error{constructor(e){super(e)}}e.exports=n},function(e,t){class n extends Error{constructor(e){super(e)}}e.exports=n},function(e,t){class n{constructor(e){Object.assign(this,e)}getCaseInsensitive(e){for(let t in this)if(t.match(new RegExp(`^${e}$`,"i")))return t}}e.exports=n},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1974},function(e,t,n){var r=n(1976);e.exports={TextEncoder:r.TextEncoder,TextDecoder:r.TextDecoder}},function(e,t,n){!function(t){"use strict";function r(e,t,n){return t<=e&&e<=n}function i(e,t){return-1!==e.indexOf(t)}e.exports&&!t["encoding-indexes"]&&(t["encoding-indexes"]=n(1977)["encoding-indexes"]);var o=Math.floor;function s(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function a(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var o=t.charCodeAt(r);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(r===n-1)i.push(65533);else{var s=t.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&o,u=1023&s;i.push(65536+(a<<10)+u),r+=1}else i.push(65533)}r+=1}return i}function u(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}function l(e){return 0<=e&&e<=127}var c=l,f=-1;function h(e){this.tokens=[].slice.call(e),this.tokens.reverse()}h.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():f},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.shift());else this.tokens.unshift(e)}};var p=-1;function d(e,t){if(e)throw TypeError("Decoder error");return t||65533}function m(e){throw TypeError("The code point "+e+" could not be encoded.")}function g(){}function y(){}function b(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(w,e)?w[e]:null}g.prototype={handler:function(e,t){}},y.prototype={handler:function(e,t){}};var v=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],w={};v.forEach(function(e){e.encodings.forEach(function(e){e.labels.forEach(function(t){w[t]=e})})});var _={},k={},S,E;function x(e,t){return t&&t[e]||null}function C(e,t){var n=t.indexOf(e);return-1===n?null:n}function A(e){if(!("encoding-indexes"in t))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return t["encoding-indexes"][e]}function I(e){if(e>39419&&e<189e3||e>1237575)return null;if(7457===e)return 59335;var t=0,n=0,r=A("gb18030-ranges"),i;for(i=0;i<r.length;++i){var o=r[i];if(!(o[0]<=e))break;t=o[0],n=o[1]}return n+e-t}function T(e){if(59335===e)return 7457;var t=0,n=0,r=A("gb18030-ranges"),i;for(i=0;i<r.length;++i){var o=r[i];if(!(o[1]<=e))break;t=o[1],n=o[0]}return n+e-t}function j(e){S=S||A("jis0208").map(function(e,t){return r(t,8272,8835)?null:e});var t=S;return t.indexOf(e)}function O(e){E=E||A("big5").map(function(e,t){return t<5024?null:e});var t=E;return 9552===e||9566===e||9569===e||9578===e||21313===e||21317===e?t.lastIndexOf(e):C(e,t)}var P="utf-8";function B(e,t){if(!(this instanceof B))throw TypeError("Called as a function. Did you forget 'new'?");e=void 0!==e?String(e):P,t=s(t),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var n=b(e);if(null===n||"replacement"===n.name)throw RangeError("Unknown encoding: "+e);if(!k[n.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var r=this;return r._encoding=n,Boolean(t.fatal)&&(r._error_mode="fatal"),Boolean(t.ignoreBOM)&&(r._ignoreBOM=!0),Object.defineProperty||(this.encoding=r._encoding.name.toLowerCase(),this.fatal="fatal"===r._error_mode,this.ignoreBOM=r._ignoreBOM),r}function R(e,n){if(!(this instanceof R))throw TypeError("Called as a function. Did you forget 'new'?");n=s(n),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(n.fatal)?"fatal":"replacement";var r=this;if(Boolean(n.NONSTANDARD_allowLegacyEncoding)){e=void 0!==e?String(e):P;var i=b(e);if(null===i||"replacement"===i.name)throw RangeError("Unknown encoding: "+e);if(!_[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");r._encoding=i}else r._encoding=b("utf-8"),void 0!==e&&"console"in t&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=r._encoding.name.toLowerCase()),r}function N(e){var t=e.fatal,n=0,i=0,o=0,s=128,a=191;this.handler=function(e,u){if(u===f&&0!==o)return o=0,d(t);if(u===f)return p;if(0===o){if(r(u,0,127))return u;if(r(u,194,223))o=1,n=31&u;else if(r(u,224,239))224===u&&(s=160),237===u&&(a=159),o=2,n=15&u;else{if(!r(u,240,244))return d(t);240===u&&(s=144),244===u&&(a=143),o=3,n=7&u}return null}if(!r(u,s,a))return n=o=i=0,s=128,a=191,e.prepend(u),d(t);if(s=128,a=191,n=n<<6|63&u,i+=1,i!==o)return null;var l=n;return n=o=i=0,l}}function M(e){var t=e.fatal;this.handler=function(e,t){if(t===f)return p;if(c(t))return t;var n,i;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var o=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);o.push(128|63&s),n-=1}return o}}function L(e,t){var n=t.fatal;this.handler=function(t,r){if(r===f)return p;if(l(r))return r;var i=e[r-128];return null===i?d(n):i}}function F(e,t){var n=t.fatal;this.handler=function(t,n){if(n===f)return p;if(c(n))return n;var r=C(n,e);return null===r&&m(n),r+128}}function D(e){var t=e.fatal,n=0,i=0,o=0;this.handler=function(e,s){if(s===f&&0===n&&0===i&&0===o)return p;var a;if(s!==f||0===n&&0===i&&0===o||(n=0,i=0,o=0,d(t)),0!==o){a=null,r(s,48,57)&&(a=I(10*(126*(10*(n-129)+i-48)+o-129)+s-48));var u=[i,o,s];return n=0,i=0,o=0,null===a?(e.prepend(u),d(t)):a}if(0!==i)return r(s,129,254)?(o=s,null):(e.prepend([i,s]),n=0,i=0,d(t));if(0!==n){if(r(s,48,57))return i=s,null;var c=n,h=null;n=0;var m=s<127?64:65;return(r(s,64,126)||r(s,128,254))&&(h=190*(c-129)+(s-m)),a=null===h?null:x(h,A("gb18030")),null===a&&l(s)&&e.prepend(s),null===a?d(t):a}return l(s)?s:128===s?8364:r(s,129,254)?(n=s,null):d(t)}}function U(e,t){var n=e.fatal;this.handler=function(e,n){if(n===f)return p;if(c(n))return n;if(58853===n)return m(n);if(t&&8364===n)return 128;var r=C(n,A("gb18030"));if(null!==r){var i=o(r/190)+129,s=r%190,a=s<63?64:65;return[i,s+a]}if(t)return m(n);r=T(n);var u=o(r/10/126/10);r-=10*u*126*10;var l=o(r/10/126);r-=10*l*126;var h=o(r/10),d=r-10*h;return[u+129,l+48,h+129,d+48]}}function z(e){var t=e.fatal,n=0;this.handler=function(e,i){if(i===f&&0!==n)return n=0,d(t);if(i===f&&0===n)return p;if(0!==n){var o=n,s=null;n=0;var a=i<127?64:98;switch((r(i,64,126)||r(i,161,254))&&(s=157*(o-129)+(i-a)),s){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var u=null===s?null:x(s,A("big5"));return null===u&&l(i)&&e.prepend(i),null===u?d(t):u}return l(i)?i:r(i,129,254)?(n=i,null):d(t)}}function q(e){var t=e.fatal;this.handler=function(e,t){if(t===f)return p;if(c(t))return t;var n=O(t);if(null===n)return m(t);var r=o(n/157)+129;if(r<161)return m(t);var i=n%157,s=i<63?64:98;return[r,i+s]}}function K(e){var t=e.fatal,n=!1,i=0;this.handler=function(e,o){if(o===f&&0!==i)return i=0,d(t);if(o===f&&0===i)return p;if(142===i&&r(o,161,223))return i=0,65216+o;if(143===i&&r(o,161,254))return n=!0,i=o,null;if(0!==i){var s=i;i=0;var a=null;return r(s,161,254)&&r(o,161,254)&&(a=x(94*(s-161)+(o-161),A(n?"jis0212":"jis0208"))),n=!1,r(o,161,254)||e.prepend(o),null===a?d(t):a}return l(o)?o:142===o||143===o||r(o,161,254)?(i=o,null):d(t)}}function H(e){var t=e.fatal;this.handler=function(e,t){if(t===f)return p;if(c(t))return t;if(165===t)return 92;if(8254===t)return 126;if(r(t,65377,65439))return[142,t-65377+161];8722===t&&(t=65293);var n=C(t,A("jis0208"));if(null===n)return m(t);var i=o(n/94)+161,s=n%94+161;return[i,s]}}function V(e){var t=e.fatal,n=0,i=1,o=2,s=3,a=4,u=5,l=6,c=n,h=n,m=0,g=!1;this.handler=function(e,y){switch(c){default:case n:return 27===y?(c=u,null):r(y,0,127)&&14!==y&&15!==y&&27!==y?(g=!1,y):y===f?p:(g=!1,d(t));case i:return 27===y?(c=u,null):92===y?(g=!1,165):126===y?(g=!1,8254):r(y,0,127)&&14!==y&&15!==y&&27!==y&&92!==y&&126!==y?(g=!1,y):y===f?p:(g=!1,d(t));case o:return 27===y?(c=u,null):r(y,33,95)?(g=!1,65344+y):y===f?p:(g=!1,d(t));case s:return 27===y?(c=u,null):r(y,33,126)?(g=!1,m=y,c=a,null):y===f?p:(g=!1,d(t));case a:if(27===y)return c=u,d(t);if(r(y,33,126)){c=s;var b=94*(m-33)+y-33,v=x(b,A("jis0208"));return null===v?d(t):v}return y===f?(c=s,e.prepend(y),d(t)):(c=s,d(t));case u:return 36===y||40===y?(m=y,c=l,null):(e.prepend(y),g=!1,c=h,d(t));case l:var w=m;m=0;var _=null;if(40===w&&66===y&&(_=n),40===w&&74===y&&(_=i),40===w&&73===y&&(_=o),36!==w||64!==y&&66!==y||(_=s),null!==_){c=c=_;var k=g;return g=!0,k?d(t):null}return e.prepend([w,y]),g=!1,c=h,d(t)}}}function W(e){var t=e.fatal,n=0,r=1,i=2,s=n;this.handler=function(e,t){if(t===f&&s!==n)return e.prepend(t),s=n,[27,40,66];if(t===f&&s===n)return p;if(!(s!==n&&s!==r||14!==t&&15!==t&&27!==t))return m(65533);if(s===n&&c(t))return t;if(s===r&&(c(t)&&92!==t&&126!==t||165==t||8254==t)){if(c(t))return t;if(165===t)return 92;if(8254===t)return 126}if(c(t)&&s!==n)return e.prepend(t),s=n,[27,40,66];if((165===t||8254===t)&&s!==r)return e.prepend(t),s=r,[27,40,74];8722===t&&(t=65293);var a=C(t,A("jis0208"));if(null===a)return m(t);if(s!==i)return e.prepend(t),s=i,[27,36,66];var u=o(a/94)+33,l=a%94+33;return[u,l]}}function $(e){var t=e.fatal,n=0;this.handler=function(e,i){if(i===f&&0!==n)return n=0,d(t);if(i===f&&0===n)return p;if(0!==n){var o=n,s=null;n=0;var a=i<127?64:65,u=o<160?129:193;if((r(i,64,126)||r(i,128,252))&&(s=188*(o-u)+i-a),r(s,8836,10715))return 48508+s;var c=null===s?null:x(s,A("jis0208"));return null===c&&l(i)&&e.prepend(i),null===c?d(t):c}return l(i)||128===i?i:r(i,161,223)?65216+i:r(i,129,159)||r(i,224,252)?(n=i,null):d(t)}}function G(e){var t=e.fatal;this.handler=function(e,t){if(t===f)return p;if(c(t)||128===t)return t;if(165===t)return 92;if(8254===t)return 126;if(r(t,65377,65439))return t-65377+161;8722===t&&(t=65293);var n=j(t);if(null===n)return m(t);var i=o(n/188),s=i<31?129:193,a=n%188,u=a<63?64:65;return[i+s,a+u]}}function Y(e){var t=e.fatal,n=0;this.handler=function(e,i){if(i===f&&0!==n)return n=0,d(t);if(i===f&&0===n)return p;if(0!==n){var o=n,s=null;n=0,r(i,65,254)&&(s=190*(o-129)+(i-65));var a=null===s?null:x(s,A("euc-kr"));return null===s&&l(i)&&e.prepend(i),null===a?d(t):a}return l(i)?i:r(i,129,254)?(n=i,null):d(t)}}function J(e){var t=e.fatal;this.handler=function(e,t){if(t===f)return p;if(c(t))return t;var n=C(t,A("euc-kr"));if(null===n)return m(t);var r=o(n/190)+129,i=n%190+65;return[r,i]}}function Z(e,t){var n=e>>8,r=255&e;return t?[n,r]:[r,n]}function X(e,t){var n=t.fatal,i=null,o=null;this.handler=function(t,s){if(s===f&&(null!==i||null!==o))return d(n);if(s===f&&null===i&&null===o)return p;if(null===i)return i=s,null;var a;if(a=e?(i<<8)+s:(s<<8)+i,i=null,null!==o){var u=o;return o=null,r(a,56320,57343)?65536+1024*(u-55296)+(a-56320):(t.prepend(Z(a,e)),d(n))}return r(a,55296,56319)?(o=a,null):r(a,56320,57343)?d(n):a}}function Q(e,t){var n=t.fatal;this.handler=function(t,n){if(n===f)return p;if(r(n,0,65535))return Z(n,e);var i=Z(55296+(n-65536>>10),e),o=Z(56320+(n-65536&1023),e);return i.concat(o)}}function ee(e){var t=e.fatal;this.handler=function(e,t){return t===f?p:l(t)?t:63360+t-128}}function te(e){var t=e.fatal;this.handler=function(e,t){return t===f?p:c(t)?t:r(t,63360,63487)?t-63360+128:m(t)}}Object.defineProperty&&(Object.defineProperty(B.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(B.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(B.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),B.prototype.decode=function e(t,n){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),n=s(n),this._do_not_flush||(this._decoder=k[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(n.stream);for(var o=new h(r),a=[],l;;){var c=o.read();if(c===f)break;if(l=this._decoder.handler(o,c),l===p)break;null!==l&&(Array.isArray(l)?a.push.apply(a,l):a.push(l))}if(!this._do_not_flush){do{if(l=this._decoder.handler(o,o.read()),l===p)break;null!==l&&(Array.isArray(l)?a.push.apply(a,l):a.push(l))}while(!o.endOfStream());this._decoder=null}function d(e){return!i(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)||this._ignoreBOM||this._BOMseen||(e.length>0&&65279===e[0]?(this._BOMseen=!0,e.shift()):e.length>0&&(this._BOMseen=!0)),u(e)}return d.call(this,a)},Object.defineProperty&&Object.defineProperty(R.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),R.prototype.encode=function e(t,n){t=void 0===t?"":String(t),n=s(n),this._do_not_flush||(this._encoder=_[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(n.stream);for(var r=new h(a(t)),i=[],o;;){var u=r.read();if(u===f)break;if(o=this._encoder.handler(r,u),o===p)break;Array.isArray(o)?i.push.apply(i,o):i.push(o)}if(!this._do_not_flush){for(;o=this._encoder.handler(r,r.read()),o!==p;)Array.isArray(o)?i.push.apply(i,o):i.push(o);this._encoder=null}return new Uint8Array(i)},_["UTF-8"]=function(e){return new M(e)},k["UTF-8"]=function(e){return new N(e)},"encoding-indexes"in t&&v.forEach(function(e){"Legacy single-byte encodings"===e.heading&&e.encodings.forEach(function(e){var t=e.name,n=A(t.toLowerCase());k[t]=function(e){return new L(n,e)},_[t]=function(e){return new F(n,e)}})}),k.GBK=function(e){return new D(e)},_.GBK=function(e){return new U(e,!0)},_.gb18030=function(e){return new U(e)},k.gb18030=function(e){return new D(e)},_.Big5=function(e){return new q(e)},k.Big5=function(e){return new z(e)},_["EUC-JP"]=function(e){return new H(e)},k["EUC-JP"]=function(e){return new K(e)},_["ISO-2022-JP"]=function(e){return new W(e)},k["ISO-2022-JP"]=function(e){return new V(e)},_.Shift_JIS=function(e){return new G(e)},k.Shift_JIS=function(e){return new $(e)},_["EUC-KR"]=function(e){return new J(e)},k["EUC-KR"]=function(e){return new Y(e)},_["UTF-16BE"]=function(e){return new Q(!0,e)},k["UTF-16BE"]=function(e){return new X(!0,e)},_["UTF-16LE"]=function(e){return new Q(!1,e)},k["UTF-16LE"]=function(e){return new X(!1,e)},_["x-user-defined"]=function(e){return new te(e)},k["x-user-defined"]=function(e){return new ee(e)},t.TextEncoder||(t.TextEncoder=R),t.TextDecoder||(t.TextDecoder=B),e.exports&&(e.exports={TextEncoder:t.TextEncoder,TextDecoder:t.TextDecoder,EncodingIndexes:t["encoding-indexes"]})}(this||{})},function(e,t,n){!function(t){"use strict";e.exports&&(e.exports=t),t["encoding-indexes"]={big5:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,17392,19506,17923,17830,17784,160359,19831,17843,162993,19682,163013,15253,18230,18244,19527,19520,148159,144919,160594,159371,159954,19543,172881,18255,17882,19589,162924,19719,19108,18081,158499,29221,154196,137827,146950,147297,26189,22267,null,32149,22813,166841,15860,38708,162799,23515,138590,23204,13861,171696,23249,23479,23804,26478,34195,170309,29793,29853,14453,138579,145054,155681,16108,153822,15093,31484,40855,147809,166157,143850,133770,143966,17162,33924,40854,37935,18736,34323,22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,36934,13542,29636,155065,29894,40903,22451,18735,21580,16689,145038,22552,31346,162661,35727,18094,159368,16769,155033,31662,140476,40904,140481,140489,140492,40905,34052,144827,16564,40906,17633,175615,25281,28782,40907,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,12736,12737,12738,12739,12740,131340,12741,131281,131277,12742,12743,131275,139240,12744,131274,12745,12746,12747,12748,131342,12749,12750,256,193,461,192,274,201,282,200,332,211,465,210,null,7870,null,7872,202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,null,7871,null,7873,234,609,9178,9179,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,172969,135493,null,25866,null,null,20029,28381,40270,37343,null,null,161589,25745,20250,20264,20392,20822,20852,20892,20964,21153,21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,36711,36718,29713,31996,32205,26950,31433,21031,null,null,null,null,37260,30904,37214,32956,null,36107,33014,133607,null,null,32927,40647,19661,40393,40460,19518,171510,159758,40458,172339,13761,null,28314,33342,29977,null,18705,39532,39567,40857,31111,164972,138698,132560,142054,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,163204,21797,null,134210,134421,151851,21904,142534,14828,131905,36422,150968,169189,16467,164030,30586,142392,14900,18389,164189,158194,151018,25821,134524,135092,134357,135412,25741,36478,134806,134155,135012,142505,164438,148691,null,134470,170573,164073,18420,151207,142530,39602,14951,169460,16365,13574,152263,169940,161992,142660,40302,38933,null,17369,155813,25780,21731,142668,142282,135287,14843,135279,157402,157462,162208,25834,151634,134211,36456,139681,166732,132913,null,18443,131497,16378,22643,142733,null,148936,132348,155799,134988,134550,21881,16571,17338,null,19124,141926,135325,33194,39157,134556,25465,14846,141173,36288,22177,25724,15939,null,173569,134665,142031,142537,null,135368,145858,14738,14854,164507,13688,155209,139463,22098,134961,142514,169760,13500,27709,151099,null,null,161140,142987,139784,173659,167117,134778,134196,157724,32659,135375,141315,141625,13819,152035,134796,135053,134826,16275,134960,134471,135503,134732,null,134827,134057,134472,135360,135485,16377,140950,25650,135085,144372,161337,142286,134526,134527,142417,142421,14872,134808,135367,134958,173618,158544,167122,167321,167114,38314,21708,33476,21945,null,171715,39974,39606,161630,142830,28992,33133,33004,23580,157042,33076,14231,21343,164029,37302,134906,134671,134775,134907,13789,151019,13833,134358,22191,141237,135369,134672,134776,135288,135496,164359,136277,134777,151120,142756,23124,135197,135198,135413,135414,22428,134673,161428,164557,135093,134779,151934,14083,135094,135552,152280,172733,149978,137274,147831,164476,22681,21096,13850,153405,31666,23400,18432,19244,40743,18919,39967,39821,154484,143677,22011,13810,22153,20008,22786,138177,194680,38737,131206,20059,20155,13630,23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,149737,32594,31035,31993,32595,156266,13505,null,156491,32770,32896,157202,158033,21341,34916,35265,161970,35744,36125,38021,38264,38271,38376,167439,38886,39029,39118,39134,39267,17e4,40060,40479,40644,27503,63751,20023,131207,38429,25143,38050,null,20539,28158,171123,40870,15817,34959,147790,28791,23797,19232,152013,13657,154928,24866,166450,36775,37366,29073,26393,29626,144001,172295,15499,137600,19216,30948,29698,20910,165647,16393,27235,172730,16931,34319,133743,31274,170311,166634,38741,28749,21284,139390,37876,30425,166371,40871,30685,20131,20464,20668,20015,20247,40872,21556,32139,22674,22736,138678,24210,24217,24514,141074,25995,144377,26905,27203,146531,27903,null,29184,148741,29580,16091,150035,23317,29881,35715,154788,153237,31379,31724,31939,32364,33528,34199,40873,34960,40874,36537,40875,36815,34143,39392,37409,40876,167353,136255,16497,17058,23066,null,null,null,39016,26475,17014,22333,null,34262,149883,33471,160013,19585,159092,23931,158485,159678,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,143958,141206,17306,17718,null,23765,146202,35577,23672,15634,144721,23928,40882,29015,17752,147692,138787,19575,14712,13386,131492,158785,35532,20404,131641,22975,33132,38998,170234,24379,134047,null,139713,166253,16642,18107,168057,16135,40883,172469,16632,14294,18167,158790,16764,165554,160767,17773,14548,152730,17761,17691,19849,19579,19830,17898,16328,150287,13921,17630,17597,16877,23870,23880,23894,15868,14351,23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,26111,26195,15090,26258,15138,26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,28033,15599,28068,28081,28181,28184,28201,28294,166336,28347,28386,28378,40831,28392,28393,28452,28468,15686,147265,28545,28606,15722,15733,29111,23705,15754,28716,15761,28752,28756,28783,28799,28809,131877,17345,13809,134872,147159,22462,159443,28990,153568,13902,27042,166889,23412,31305,153825,169177,31333,31357,154028,31419,31408,31426,31427,29137,156813,16842,31450,31453,31466,16879,21682,154625,31499,31573,31529,152334,154878,31650,31599,33692,154548,158847,31696,33825,31634,31672,154912,15789,154725,33938,31738,31750,31797,154817,31812,31875,149634,31910,26237,148856,31945,31943,31974,31860,31987,31989,31950,32359,17693,159300,32093,159446,29837,32137,32171,28981,32179,32210,147543,155689,32228,15635,32245,137209,32229,164717,32285,155937,155994,32366,32402,17195,37996,32295,32576,32577,32583,31030,156368,39393,32663,156497,32675,136801,131176,17756,145254,17667,164666,32762,156809,32773,32776,32797,32808,32815,172167,158915,32827,32828,32865,141076,18825,157222,146915,157416,26405,32935,166472,33031,33050,22704,141046,27775,156824,151480,25831,136330,33304,137310,27219,150117,150165,17530,33321,133901,158290,146814,20473,136445,34018,33634,158474,149927,144688,137075,146936,33450,26907,194964,16859,34123,33488,33562,134678,137140,14017,143741,144730,33403,33506,33560,147083,159139,158469,158615,144846,15807,33565,21996,33669,17675,159141,33708,33729,33747,13438,159444,27223,34138,13462,159298,143087,33880,154596,33905,15827,17636,27303,33866,146613,31064,33960,158614,159351,159299,34014,33807,33681,17568,33939,34020,154769,16960,154816,17731,34100,23282,159385,17703,34163,17686,26559,34326,165413,165435,34241,159880,34306,136578,159949,194994,17770,34344,13896,137378,21495,160666,34430,34673,172280,34798,142375,34737,34778,34831,22113,34412,26710,17935,34885,34886,161248,146873,161252,34910,34972,18011,34996,34997,25537,35013,30583,161551,35207,35210,35238,35241,35239,35260,166437,35303,162084,162493,35484,30611,37374,35472,162393,31465,162618,147343,18195,162616,29052,35596,35615,152624,152933,35647,35660,35661,35497,150138,35728,35739,35503,136927,17941,34895,35995,163156,163215,195028,14117,163155,36054,163224,163261,36114,36099,137488,36059,28764,36113,150729,16080,36215,36265,163842,135188,149898,15228,164284,160012,31463,36525,36534,36547,37588,36633,36653,164709,164882,36773,37635,172703,133712,36787,18730,166366,165181,146875,24312,143970,36857,172052,165564,165121,140069,14720,159447,36919,165180,162494,36961,165228,165387,37032,165651,37060,165606,37038,37117,37223,15088,37289,37316,31916,166195,138889,37390,27807,37441,37474,153017,37561,166598,146587,166668,153051,134449,37676,37739,166625,166891,28815,23235,166626,166629,18789,37444,166892,166969,166911,37747,37979,36540,38277,38310,37926,38304,28662,17081,140922,165592,135804,146990,18911,27676,38523,38550,16748,38563,159445,25050,38582,30965,166624,38589,21452,18849,158904,131700,156688,168111,168165,150225,137493,144138,38705,34370,38710,18959,17725,17797,150249,28789,23361,38683,38748,168405,38743,23370,168427,38751,37925,20688,143543,143548,38793,38815,38833,38846,38848,38866,38880,152684,38894,29724,169011,38911,38901,168989,162170,19153,38964,38963,38987,39014,15118,160117,15697,132656,147804,153350,39114,39095,39112,39111,19199,159015,136915,21936,39137,39142,39148,37752,39225,150057,19314,170071,170245,39413,39436,39483,39440,39512,153381,14020,168113,170965,39648,39650,170757,39668,19470,39700,39725,165376,20532,39732,158120,14531,143485,39760,39744,171326,23109,137315,39822,148043,39938,39935,39948,171624,40404,171959,172434,172459,172257,172323,172511,40318,40323,172340,40462,26760,40388,139611,172435,172576,137531,172595,40249,172217,172724,40592,40597,40606,40610,19764,40618,40623,148324,40641,15200,14821,15645,20274,14270,166955,40706,40712,19350,37924,159138,40727,40726,40761,22175,22154,40773,39352,168075,38898,33919,40802,40809,31452,40846,29206,19390,149877,149947,29047,150008,148296,150097,29598,166874,137466,31135,166270,167478,37737,37875,166468,37612,37761,37835,166252,148665,29207,16107,30578,31299,28880,148595,148472,29054,137199,28835,137406,144793,16071,137349,152623,137208,14114,136955,137273,14049,137076,137425,155467,14115,136896,22363,150053,136190,135848,136134,136374,34051,145062,34051,33877,149908,160101,146993,152924,147195,159826,17652,145134,170397,159526,26617,14131,15381,15847,22636,137506,26640,16471,145215,147681,147595,147727,158753,21707,22174,157361,22162,135135,134056,134669,37830,166675,37788,20216,20779,14361,148534,20156,132197,131967,20299,20362,153169,23144,131499,132043,14745,131850,132116,13365,20265,131776,167603,131701,35546,131596,20120,20685,20749,20386,20227,150030,147082,20290,20526,20588,20609,20428,20453,20568,20732,20825,20827,20829,20830,28278,144789,147001,147135,28018,137348,147081,20904,20931,132576,17629,132259,132242,132241,36218,166556,132878,21081,21156,133235,21217,37742,18042,29068,148364,134176,149932,135396,27089,134685,29817,16094,29849,29716,29782,29592,19342,150204,147597,21456,13700,29199,147657,21940,131909,21709,134086,22301,37469,38644,37734,22493,22413,22399,13886,22731,23193,166470,136954,137071,136976,23084,22968,37519,23166,23247,23058,153926,137715,137313,148117,14069,27909,29763,23073,155267,23169,166871,132115,37856,29836,135939,28933,18802,37896,166395,37821,14240,23582,23710,24158,24136,137622,137596,146158,24269,23375,137475,137476,14081,137376,14045,136958,14035,33066,166471,138682,144498,166312,24332,24334,137511,137131,23147,137019,23364,34324,161277,34912,24702,141408,140843,24539,16056,140719,140734,168072,159603,25024,131134,131142,140827,24985,24984,24693,142491,142599,149204,168269,25713,149093,142186,14889,142114,144464,170218,142968,25399,173147,25782,25393,25553,149987,142695,25252,142497,25659,25963,26994,15348,143502,144045,149897,144043,21773,144096,137433,169023,26318,144009,143795,15072,16784,152964,166690,152975,136956,152923,152613,30958,143619,137258,143924,13412,143887,143746,148169,26254,159012,26219,19347,26160,161904,138731,26211,144082,144097,26142,153714,14545,145466,145340,15257,145314,144382,29904,15254,26511,149034,26806,26654,15300,27326,14435,145365,148615,27187,27218,27337,27397,137490,25873,26776,27212,15319,27258,27479,147392,146586,37792,37618,166890,166603,37513,163870,166364,37991,28069,28427,149996,28007,147327,15759,28164,147516,23101,28170,22599,27940,30786,28987,148250,148086,28913,29264,29319,29332,149391,149285,20857,150180,132587,29818,147192,144991,150090,149783,155617,16134,16049,150239,166947,147253,24743,16115,29900,29756,37767,29751,17567,159210,17745,30083,16227,150745,150790,16216,30037,30323,173510,15129,29800,166604,149931,149902,15099,15821,150094,16127,149957,149747,37370,22322,37698,166627,137316,20703,152097,152039,30584,143922,30478,30479,30587,149143,145281,14942,149744,29752,29851,16063,150202,150215,16584,150166,156078,37639,152961,30750,30861,30856,30930,29648,31065,161601,153315,16654,31131,33942,31141,27181,147194,31290,31220,16750,136934,16690,37429,31217,134476,149900,131737,146874,137070,13719,21867,13680,13994,131540,134157,31458,23129,141045,154287,154268,23053,131675,30960,23082,154566,31486,16889,31837,31853,16913,154547,155324,155302,31949,150009,137136,31886,31868,31918,27314,32220,32263,32211,32590,156257,155996,162632,32151,155266,17002,158581,133398,26582,131150,144847,22468,156690,156664,149858,32733,31527,133164,154345,154947,31500,155150,39398,34373,39523,27164,144447,14818,150007,157101,39455,157088,33920,160039,158929,17642,33079,17410,32966,33033,33090,157620,39107,158274,33378,33381,158289,33875,159143,34320,160283,23174,16767,137280,23339,137377,23268,137432,34464,195004,146831,34861,160802,23042,34926,20293,34951,35007,35046,35173,35149,153219,35156,161669,161668,166901,166873,166812,166393,16045,33955,18165,18127,14322,35389,35356,169032,24397,37419,148100,26068,28969,28868,137285,40301,35999,36073,163292,22938,30659,23024,17262,14036,36394,36519,150537,36656,36682,17140,27736,28603,140065,18587,28537,28299,137178,39913,14005,149807,37051,37015,21873,18694,37307,37892,166475,16482,166652,37927,166941,166971,34021,35371,38297,38311,38295,38294,167220,29765,16066,149759,150082,148458,16103,143909,38543,167655,167526,167525,16076,149997,150136,147438,29714,29803,16124,38721,168112,26695,18973,168083,153567,38749,37736,166281,166950,166703,156606,37562,23313,35689,18748,29689,147995,38811,38769,39224,134950,24001,166853,150194,38943,169178,37622,169431,37349,17600,166736,150119,166756,39132,166469,16128,37418,18725,33812,39227,39245,162566,15869,39323,19311,39338,39516,166757,153800,27279,39457,23294,39471,170225,19344,170312,39356,19389,19351,37757,22642,135938,22562,149944,136424,30788,141087,146872,26821,15741,37976,14631,24912,141185,141675,24839,40015,40019,40059,39989,39952,39807,39887,171565,39839,172533,172286,40225,19630,147716,40472,19632,40204,172468,172269,172275,170287,40357,33981,159250,159711,158594,34300,17715,159140,159364,159216,33824,34286,159232,145367,155748,31202,144796,144960,18733,149982,15714,37851,37566,37704,131775,30905,37495,37965,20452,13376,36964,152925,30781,30804,30902,30795,137047,143817,149825,13978,20338,28634,28633,28702,28702,21524,147893,22459,22771,22410,40214,22487,28980,13487,147884,29163,158784,151447,23336,137141,166473,24844,23246,23051,17084,148616,14124,19323,166396,37819,37816,137430,134941,33906,158912,136211,148218,142374,148417,22932,146871,157505,32168,155995,155812,149945,149899,166394,37605,29666,16105,29876,166755,137375,16097,150195,27352,29683,29691,16086,150078,150164,137177,150118,132007,136228,149989,29768,149782,28837,149878,37508,29670,37727,132350,37681,166606,166422,37766,166887,153045,18741,166530,29035,149827,134399,22180,132634,134123,134328,21762,31172,137210,32254,136898,150096,137298,17710,37889,14090,166592,149933,22960,137407,137347,160900,23201,14050,146779,14e3,37471,23161,166529,137314,37748,15565,133812,19094,14730,20724,15721,15692,136092,29045,17147,164376,28175,168164,17643,27991,163407,28775,27823,15574,147437,146989,28162,28428,15727,132085,30033,14012,13512,18048,16090,18545,22980,37486,18750,36673,166940,158656,22546,22472,14038,136274,28926,148322,150129,143331,135856,140221,26809,26983,136088,144613,162804,145119,166531,145366,144378,150687,27162,145069,158903,33854,17631,17614,159014,159057,158850,159710,28439,160009,33597,137018,33773,158848,159827,137179,22921,23170,137139,23137,23153,137477,147964,14125,23023,137020,14023,29070,37776,26266,148133,23150,23083,148115,27179,147193,161590,148571,148170,28957,148057,166369,20400,159016,23746,148686,163405,148413,27148,148054,135940,28838,28979,148457,15781,27871,194597,150095,32357,23019,23855,15859,24412,150109,137183,32164,33830,21637,146170,144128,131604,22398,133333,132633,16357,139166,172726,28675,168283,23920,29583,31955,166489,168992,20424,32743,29389,29456,162548,29496,29497,153334,29505,29512,16041,162584,36972,29173,149746,29665,33270,16074,30476,16081,27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,151388,29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,23646,30654,30667,22770,30744,28857,30748,16552,30777,30791,30801,30822,33864,152885,31027,26627,31026,16643,16649,31121,31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,31981,36755,28864,134351,32207,32212,32208,32253,32686,32692,29343,17303,32800,32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,38469,34699,17926,17943,34990,35071,35108,35143,35217,162151,35369,35384,35476,35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,39809,39901,39921,39924,19565,39968,14191,138178,40265,39994,40702,22096,40339,40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,40696,31432,40772,131220,131767,132e3,26906,38083,22956,132311,22592,38081,14265,132565,132629,132726,136890,22359,29043,133826,133837,134079,21610,194619,134091,21662,134139,134203,134227,134245,134268,24807,134285,22138,134325,134365,134381,134511,134578,134600,26965,39983,34725,134660,134670,134871,135056,134957,134771,23584,135100,24075,135260,135247,135286,26398,135291,135304,135318,13895,135359,135379,135471,135483,21348,33965,135907,136053,135990,35713,136567,136729,137155,137159,20088,28859,137261,137578,137773,137797,138282,138352,138412,138952,25283,138965,139029,29080,26709,139333,27113,14024,139900,140247,140282,141098,141425,141647,33533,141671,141715,142037,35237,142056,36768,142094,38840,142143,38983,39613,142412,null,142472,142519,154600,142600,142610,142775,142741,142914,143220,143308,143411,143462,144159,144350,24497,26184,26303,162425,144743,144883,29185,149946,30679,144922,145174,32391,131910,22709,26382,26904,146087,161367,155618,146961,147129,161278,139418,18640,19128,147737,166554,148206,148237,147515,148276,148374,150085,132554,20946,132625,22943,138920,15294,146687,148484,148694,22408,149108,14747,149295,165352,170441,14178,139715,35678,166734,39382,149522,149755,150037,29193,150208,134264,22885,151205,151430,132985,36570,151596,21135,22335,29041,152217,152601,147274,150183,21948,152646,152686,158546,37332,13427,152895,161330,152926,18200,152930,152934,153543,149823,153693,20582,13563,144332,24798,153859,18300,166216,154286,154505,154630,138640,22433,29009,28598,155906,162834,36950,156082,151450,35682,156674,156746,23899,158711,36662,156804,137500,35562,150006,156808,147439,156946,19392,157119,157365,141083,37989,153569,24981,23079,194765,20411,22201,148769,157436,20074,149812,38486,28047,158909,13848,35191,157593,157806,156689,157790,29151,157895,31554,168128,133649,157990,37124,158009,31301,40432,158202,39462,158253,13919,156777,131105,31107,158260,158555,23852,144665,33743,158621,18128,158884,30011,34917,159150,22710,14108,140685,159819,160205,15444,160384,160389,37505,139642,160395,37680,160486,149968,27705,38047,160848,134904,34855,35061,141606,164979,137137,28344,150058,137248,14756,14009,23568,31203,17727,26294,171181,170148,35139,161740,161880,22230,16607,136714,14753,145199,164072,136133,29101,33638,162269,168360,23143,19639,159919,166315,162301,162314,162571,163174,147834,31555,31102,163849,28597,172767,27139,164632,21410,159239,37823,26678,38749,164207,163875,158133,136173,143919,163912,23941,166960,163971,22293,38947,166217,23979,149896,26046,27093,21458,150181,147329,15377,26422,163984,164084,164142,139169,164175,164233,164271,164378,164614,164655,164746,13770,164968,165546,18682,25574,166230,30728,37461,166328,17394,166375,17375,166376,166726,166868,23032,166921,36619,167877,168172,31569,168208,168252,15863,168286,150218,36816,29327,22155,169191,169449,169392,169400,169778,170193,170313,170346,170435,170536,170766,171354,171419,32415,171768,171811,19620,38215,172691,29090,172799,19857,36882,173515,19868,134300,36798,21953,36794,140464,36793,150163,17673,32383,28502,27313,20202,13540,166700,161949,14138,36480,137205,163876,166764,166809,162366,157359,15851,161365,146615,153141,153942,20122,155265,156248,22207,134765,36366,23405,147080,150686,25566,25296,137206,137339,25904,22061,154698,21530,152337,15814,171416,19581,22050,22046,32585,155352,22901,146752,34672,19996,135146,134473,145082,33047,40286,36120,30267,40005,30286,30649,37701,21554,33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,134813,13774,22021,22001,26353,164578,13869,30004,22e3,21946,21655,21874,134209,134294,24272,151880,134774,142434,134818,40619,32090,21982,135285,25245,38765,21652,36045,29174,37238,25596,25529,25598,21865,142147,40050,143027,20890,13535,134567,20903,21581,21790,21779,30310,36397,157834,30129,32950,34820,34694,35015,33206,33820,135361,17644,29444,149254,23440,33547,157843,22139,141044,163119,147875,163187,159440,160438,37232,135641,37384,146684,173737,134828,134905,29286,138402,18254,151490,163833,135147,16634,40029,25887,142752,18675,149472,171388,135148,134666,24674,161187,135149,null,155720,135559,29091,32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,149016,22682,150382,33325,21579,22442,154261,133497,null,14930,140389,29556,171692,19721,39917,146686,171824,19547,151465,169374,171998,33884,146870,160434,157619,145184,25390,32037,147191,146988,14890,36872,21196,15988,13946,17897,132238,30272,23280,134838,30842,163630,22695,16575,22140,39819,23924,30292,173108,40581,19681,30201,14331,24857,143578,148466,null,22109,135849,22439,149859,171526,21044,159918,13741,27722,40316,31830,39737,22494,137068,23635,25811,169168,156469,160100,34477,134440,159010,150242,134513,null,20990,139023,23950,38659,138705,40577,36940,31519,39682,23761,31651,25192,25397,39679,31695,39722,31870,39726,31810,31878,39957,31740,39689,40727,39963,149822,40794,21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,38465,27008,20646,30022,137069,39386,21107,null,37209,38529,37212,null,37201,167575,25471,159011,27338,22033,37262,30074,25221,132092,29519,31856,154657,146685,null,149785,30422,39837,20010,134356,33726,34882,null,23626,27072,20717,22394,21023,24053,20174,27697,131570,20281,21660,21722,21146,36226,13822,24332,13811,null,27474,37244,40869,39831,38958,39092,39610,40616,40580,29050,31508,null,27642,34840,32632,null,22048,173642,36471,40787,null,36308,36431,40476,36353,25218,164733,36392,36469,31443,150135,31294,30936,27882,35431,30215,166490,40742,27854,34774,30147,172722,30803,194624,36108,29410,29553,35629,29442,29937,36075,150203,34351,24506,34976,17591,null,137275,159237,null,35454,140571,null,24829,30311,39639,40260,37742,39823,34805,null,34831,36087,29484,38689,39856,13782,29362,19463,31825,39242,155993,24921,19460,40598,24957,null,22367,24943,25254,25145,25294,14940,25058,21418,144373,25444,26626,13778,23895,166850,36826,167481,null,20697,138566,30982,21298,38456,134971,16485,null,30718,null,31938,155418,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,160902,32859,29936,33027,30500,35209,157644,30035,159441,34729,34766,33224,34700,35401,36013,35651,30507,29944,34010,13877,27058,36262,null,35241,29800,28089,34753,147473,29927,15835,29046,24740,24988,15569,29026,24695,null,32625,166701,29264,24809,19326,21024,15384,146631,155351,161366,152881,137540,135934,170243,159196,159917,23745,156077,166415,145015,131310,157766,151310,17762,23327,156492,40784,40614,156267,12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,12321,12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19968,20057,19969,19971,20035,20061,20102,20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,20800,20995,21242,21315,21449,21475,22303,22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,20887,20982,20998,20999,21e3,21243,21246,21247,21270,21305,21320,21319,21317,21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,29916,29926,29976,29983,29992,29993,3e4,30001,30002,30003,30091,30333,30382,30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,20073,20121,20132,20134,20133,20223,20233,20249,20234,20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,22930,22952,22942,22947,22937,22934,22925,22948,22931,22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,21658,21602,21608,21643,21629,21646,22266,22403,22391,22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,32937,32948,32938,32943,33253,33278,33293,33459,33437,33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,22865,22863,22862,22864,23004,23e3,23039,23011,23016,23043,23013,23018,23002,23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,27954,27946,27969,27941,27916,27953,27934,27927,27963,27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,31361,31487,31485,31869,32002,32005,32e3,32009,32007,32004,32006,32568,32654,32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,35331,35998,36e3,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,21769,21742,21738,21734,21799,21767,21757,21775,22275,22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,32020,32016,32021,32026,32028,32013,32025,32027,32570,32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,24246,24245,24254,24373,24375,24407,24428,24425,24427,24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,33333,33335,33334,33337,33678,33694,33688,33656,33698,33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,25954,25955,26001,26e3,26031,26222,26224,26228,26230,26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,36024,36234,36229,36225,36302,36317,36299,36314,36305,36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,28998,29032,29014,29242,29266,29495,29509,29503,29502,29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,39156,39165,39166,39347,39345,39348,39649,40169,40578,40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,32862,32858,32903,33104,33152,33167,33160,33162,33151,33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,26292,26289,27171,27167,27112,27137,27166,27161,27133,27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,39389,39376,39391,39387,39377,39381,39378,39385,39607,39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,36986,37172,37266,37664,37686,37624,37683,37679,37666,37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,35140,35128,35133,35244,35598,35607,35609,35611,35594,35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37e3,37291,37292,37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,40672,40725,40748,20787,22181,22750,22751,22754,23541,40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,38876,38907,39006,39e3,39003,39100,39237,39241,39446,39449,39693,39912,39911,39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,25885,25884,26005,26345,27387,27396,27386,27570,28748,29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,38002,38e3,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,24027,12083,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,710,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,65339,65341,10045,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8679,8632,8633,12751,131276,20058,131210,20994,17553,40880,20872,40881,161287,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,12003,null,null,null,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,32917,32921,32912,32914,32924,33424,33423,33413,33422,33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,27842,27834,27843,27846,27885,27890,27858,27869,27828,27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,24631,24633,24660,24690,24670,24645,24659,24647,24649,24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,32969,32975,32983,32998,32973,33279,33313,33428,33497,33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,26702,26692,26676,26653,26642,26644,26662,26664,26670,26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28e3,28055,28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,33607,33605,33612,33619,33566,33580,33611,33575,33608,34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,24720,24710,24766,24752,24762,24787,24788,24783,24804,24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,31531,31533,31535,31538,31544,31514,31523,31892,31896,31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,21902,22284,22569,22583,22553,22558,22567,22563,22568,22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,28252,28257,28209,28200,28256,28273,28267,28217,28194,28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,35e3,35008,35006,34998,35004,34999,35005,34994,35073,35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,24886,24882,24878,24902,24879,24911,24873,24896,25120,37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,27002,26952,26953,26933,26988,26931,26941,26981,26864,27e3,26932,26985,26944,26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,30873,30848,30870,30843,31100,31106,31101,31097,31249,31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,37470,37507,37422,37450,37446,37485,37484,37455,37472,37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,27050,27041,27038,27097,27031,27024,27074,27061,27045,27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,33972,33985,33997,33962,33946,33969,34e3,33949,33959,33979,33954,33940,33991,33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,34587,34627,34604,34625,34622,34630,34592,34610,34602,34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,25005,24991,24978,25002,24993,24973,24934,25011,25133,25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,33362,33360,33358,33361,34084,34107,34063,34048,34089,34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,39382,39384,39371,39383,39372,39603,39660,39659,39667,39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,24296,24293,24395,24508,24989,25e3,24982,25029,25012,25030,25025,25036,25018,25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,30261,30258,30256,30395,30438,30618,30621,30625,30620,30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,37634,37668,37631,37673,37689,37685,37674,37652,37644,37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,31730,31744,31743,31739,31758,31732,31755,31731,31746,31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,39421,39422,39420,39427,39614,39678,39677,39681,39676,39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,22169,22896,23356,23657,23658,24e3,24173,24174,25048,25055,25069,25070,25073,25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,35621,35639,35622,35638,35630,35620,35643,35645,35642,35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,31788,31803,31980,31978,32374,32373,32376,32368,32375,32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,26079,26344,26339,26340,27379,27376,27370,27368,27385,27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,4e4,39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,28740,28746,28744,28745,28741,28742,29213,29210,29209,29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,39502,39507,39508,39500,39503,39496,39498,39497,39506,39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,31990,32410,32408,32411,32409,33248,33249,34374,34375,34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,9584,9583,65517,132423,37595,132575,147397,34124,17077,29679,20917,13897,149826,166372,37700,137691,33518,146632,30780,26436,25311,149811,166314,131744,158643,135941,20395,140525,20488,159017,162436,144896,150193,140563,20521,131966,24484,131968,131911,28379,132127,20605,20737,13434,20750,39020,14147,33814,149924,132231,20832,144308,20842,134143,139516,131813,140592,132494,143923,137603,23426,34685,132531,146585,20914,20920,40244,20937,20943,20945,15580,20947,150182,20915,20962,21314,20973,33741,26942,145197,24443,21003,21030,21052,21173,21079,21140,21177,21189,31765,34114,21216,34317,158483,21253,166622,21833,28377,147328,133460,147436,21299,21316,134114,27851,136998,26651,29653,24650,16042,14540,136936,29149,17570,21357,21364,165547,21374,21375,136598,136723,30694,21395,166555,21408,21419,21422,29607,153458,16217,29596,21441,21445,27721,20041,22526,21465,15019,134031,21472,147435,142755,21494,134263,21523,28793,21803,26199,27995,21613,158547,134516,21853,21647,21668,18342,136973,134877,15796,134477,166332,140952,21831,19693,21551,29719,21894,21929,22021,137431,147514,17746,148533,26291,135348,22071,26317,144010,26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,166758,13859,135759,22342,147877,27758,28811,22338,14001,158846,22502,136214,22531,136276,148323,22566,150517,22620,22698,13665,22752,22748,135740,22779,23551,22339,172368,148088,37843,13729,22815,26790,14019,28249,136766,23076,21843,136850,34053,22985,134478,158849,159018,137180,23001,137211,137138,159142,28017,137256,136917,23033,159301,23211,23139,14054,149929,23159,14088,23190,29797,23251,159649,140628,15749,137489,14130,136888,24195,21200,23414,25992,23420,162318,16388,18525,131588,23509,24928,137780,154060,132517,23539,23453,19728,23557,138052,23571,29646,23572,138405,158504,23625,18653,23685,23785,23791,23947,138745,138807,23824,23832,23878,138916,23738,24023,33532,14381,149761,139337,139635,33415,14390,15298,24110,27274,24181,24186,148668,134355,21414,20151,24272,21416,137073,24073,24308,164994,24313,24315,14496,24316,26686,37915,24333,131521,194708,15070,18606,135994,24378,157832,140240,24408,140401,24419,38845,159342,24434,37696,166454,24487,23990,15711,152144,139114,159992,140904,37334,131742,166441,24625,26245,137335,14691,15815,13881,22416,141236,31089,15936,24734,24740,24755,149890,149903,162387,29860,20705,23200,24932,33828,24898,194726,159442,24961,20980,132694,24967,23466,147383,141407,25043,166813,170333,25040,14642,141696,141505,24611,24924,25886,25483,131352,25285,137072,25301,142861,25452,149983,14871,25656,25592,136078,137212,25744,28554,142902,38932,147596,153373,25825,25829,38011,14950,25658,14935,25933,28438,150056,150051,25989,25965,25951,143486,26037,149824,19255,26065,16600,137257,26080,26083,24543,144384,26136,143863,143864,26180,143780,143781,26187,134773,26215,152038,26227,26228,138813,143921,165364,143816,152339,30661,141559,39332,26370,148380,150049,15147,27130,145346,26462,26471,26466,147917,168173,26583,17641,26658,28240,37436,26625,144358,159136,26717,144495,27105,27147,166623,26995,26819,144845,26881,26880,15666,14849,144956,15232,26540,26977,166474,17148,26934,27032,15265,132041,33635,20624,27129,144985,139562,27205,145155,27293,15347,26545,27336,168348,15373,27421,133411,24798,27445,27508,141261,28341,146139,132021,137560,14144,21537,146266,27617,147196,27612,27703,140427,149745,158545,27738,33318,27769,146876,17605,146877,147876,149772,149760,146633,14053,15595,134450,39811,143865,140433,32655,26679,159013,159137,159211,28054,27996,28284,28420,149887,147589,159346,34099,159604,20935,27804,28189,33838,166689,28207,146991,29779,147330,31180,28239,23185,143435,28664,14093,28573,146992,28410,136343,147517,17749,37872,28484,28508,15694,28532,168304,15675,28575,147780,28627,147601,147797,147513,147440,147380,147775,20959,147798,147799,147776,156125,28747,28798,28839,28801,28876,28885,28886,28895,16644,15848,29108,29078,148087,28971,28997,23176,29002,29038,23708,148325,29007,37730,148161,28972,148570,150055,150050,29114,166888,28861,29198,37954,29205,22801,37955,29220,37697,153093,29230,29248,149876,26813,29269,29271,15957,143428,26637,28477,29314,29482,29483,149539,165931,18669,165892,29480,29486,29647,29610,134202,158254,29641,29769,147938,136935,150052,26147,14021,149943,149901,150011,29687,29717,26883,150054,29753,132547,16087,29788,141485,29792,167602,29767,29668,29814,33721,29804,14128,29812,37873,27180,29826,18771,150156,147807,150137,166799,23366,166915,137374,29896,137608,29966,29929,29982,167641,137803,23511,167596,37765,30029,30026,30055,30062,151426,16132,150803,30094,29789,30110,30132,30210,30252,30289,30287,30319,30326,156661,30352,33263,14328,157969,157966,30369,30373,30391,30412,159647,33890,151709,151933,138780,30494,30502,30528,25775,152096,30552,144044,30639,166244,166248,136897,30708,30729,136054,150034,26826,30895,30919,30931,38565,31022,153056,30935,31028,30897,161292,36792,34948,166699,155779,140828,31110,35072,26882,31104,153687,31133,162617,31036,31145,28202,160038,16040,31174,168205,31188],"euc-kr":[44034,44035,44037,44038,44043,44044,44045,44046,44047,44056,44062,44063,44065,44066,44067,44069,44070,44071,44072,44073,44074,44075,44078,44082,44083,44084,null,null,null,null,null,null,44085,44086,44087,44090,44091,44093,44094,44095,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44108,44110,44111,44112,44113,44114,44115,44117,null,null,null,null,null,null,44118,44119,44121,44122,44123,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44146,44147,44149,44150,44153,44155,44156,44157,44158,44159,44162,44167,44168,44173,44174,44175,44177,44178,44179,44181,44182,44183,44184,44185,44186,44187,44190,44194,44195,44196,44197,44198,44199,44203,44205,44206,44209,44210,44211,44212,44213,44214,44215,44218,44222,44223,44224,44226,44227,44229,44230,44231,44233,44234,44235,44237,44238,44239,44240,44241,44242,44243,44244,44246,44248,44249,44250,44251,44252,44253,44254,44255,44258,44259,44261,44262,44265,44267,44269,44270,44274,44276,44279,44280,44281,44282,44283,44286,44287,44289,44290,44291,44293,44295,44296,44297,44298,44299,44302,44304,44306,44307,44308,44309,44310,44311,44313,44314,44315,44317,44318,44319,44321,44322,44323,44324,44325,44326,44327,44328,44330,44331,44334,44335,44336,44337,44338,44339,null,null,null,null,null,null,44342,44343,44345,44346,44347,44349,44350,44351,44352,44353,44354,44355,44358,44360,44362,44363,44364,44365,44366,44367,44369,44370,44371,44373,44374,44375,null,null,null,null,null,null,44377,44378,44379,44380,44381,44382,44383,44384,44386,44388,44389,44390,44391,44392,44393,44394,44395,44398,44399,44401,44402,44407,44408,44409,44410,44414,44416,44419,44420,44421,44422,44423,44426,44427,44429,44430,44431,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44446,44447,44448,44449,44450,44451,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44472,44473,44474,44475,44476,44477,44478,44479,44482,44483,44485,44486,44487,44489,44490,44491,44492,44493,44494,44495,44498,44500,44501,44502,44503,44504,44505,44506,44507,44509,44510,44511,44513,44514,44515,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44538,44539,44541,44542,44546,44547,44548,44549,44550,44551,44554,44556,44558,44559,44560,44561,44562,44563,44565,44566,44567,44568,44569,44570,44571,44572,null,null,null,null,null,null,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44594,44595,44597,44598,44601,44603,44604,null,null,null,null,null,null,44605,44606,44607,44610,44612,44615,44616,44617,44619,44623,44625,44626,44627,44629,44631,44632,44633,44634,44635,44638,44642,44643,44644,44646,44647,44650,44651,44653,44654,44655,44657,44658,44659,44660,44661,44662,44663,44666,44670,44671,44672,44673,44674,44675,44678,44679,44680,44681,44682,44683,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44735,44737,44738,44739,44741,44742,44743,44744,44745,44746,44747,44750,44754,44755,44756,44757,44758,44759,44762,44763,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44777,44778,44780,44782,44783,44784,44785,44786,44787,44789,44790,44791,44793,44794,44795,44797,44798,44799,44800,44801,44802,44803,44804,44805,null,null,null,null,null,null,44806,44809,44810,44811,44812,44814,44815,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,null,null,null,null,null,null,44836,44837,44838,44839,44840,44841,44842,44843,44846,44847,44849,44851,44853,44854,44855,44856,44857,44858,44859,44862,44864,44868,44869,44870,44871,44874,44875,44876,44877,44878,44879,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44894,44895,44896,44897,44898,44899,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44922,44923,44924,44925,44926,44927,44929,44930,44931,44933,44934,44935,44937,44938,44939,44940,44941,44942,44943,44946,44947,44948,44950,44951,44952,44953,44954,44955,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44986,44987,44989,44990,44991,44993,44994,44995,44996,44997,44998,45002,45004,45007,45008,45009,45010,45011,45013,45014,45015,45016,45017,45018,45019,45021,45022,45023,45024,45025,null,null,null,null,null,null,45026,45027,45028,45029,45030,45031,45034,45035,45036,45037,45038,45039,45042,45043,45045,45046,45047,45049,45050,45051,45052,45053,45054,45055,45058,45059,null,null,null,null,null,null,45061,45062,45063,45064,45065,45066,45067,45069,45070,45071,45073,45074,45075,45077,45078,45079,45080,45081,45082,45083,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45126,45127,45129,45131,45133,45135,45136,45137,45138,45142,45144,45146,45147,45148,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45182,45183,45185,45186,45187,45189,45190,45191,45192,45193,45194,45195,45198,45200,45202,45203,45204,45205,45206,45207,45211,45213,45214,45219,45220,45221,45222,45223,45226,45232,45234,45238,45239,45241,45242,45243,45245,45246,45247,45248,45249,45250,45251,45254,45258,45259,45260,45261,45262,45263,45266,null,null,null,null,null,null,45267,45269,45270,45271,45273,45274,45275,45276,45277,45278,45279,45281,45282,45283,45284,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,null,null,null,null,null,null,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45322,45325,45326,45327,45329,45332,45333,45334,45335,45338,45342,45343,45344,45345,45346,45350,45351,45353,45354,45355,45357,45358,45359,45360,45361,45362,45363,45366,45370,45371,45372,45373,45374,45375,45378,45379,45381,45382,45383,45385,45386,45387,45388,45389,45390,45391,45394,45395,45398,45399,45401,45402,45403,45405,45406,45407,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45434,45435,45437,45438,45439,45441,45443,45444,45445,45446,45447,45450,45452,45454,45455,45456,45457,45461,45462,45463,45465,45466,45467,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,null,null,null,null,null,null,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45517,45518,45519,45521,45522,45523,45525,null,null,null,null,null,null,45526,45527,45528,45529,45530,45531,45534,45536,45537,45538,45539,45540,45541,45542,45543,45546,45547,45549,45550,45551,45553,45554,45555,45556,45557,45558,45559,45560,45562,45564,45566,45567,45568,45569,45570,45571,45574,45575,45577,45578,45581,45582,45583,45584,45585,45586,45587,45590,45592,45594,45595,45596,45597,45598,45599,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45621,45622,45623,45624,45625,45626,45627,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45657,45658,45659,45661,45662,45663,45665,45666,45667,45668,45669,45670,45671,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45686,45687,45688,45689,45690,45691,45693,45694,45695,45696,45697,45698,45699,45702,45703,45704,45706,45707,45708,45709,45710,null,null,null,null,null,null,45711,45714,45715,45717,45718,45719,45723,45724,45725,45726,45727,45730,45732,45735,45736,45737,45739,45741,45742,45743,45745,45746,45747,45749,45750,45751,null,null,null,null,null,null,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45770,45771,45773,45774,45775,45777,45779,45780,45781,45782,45783,45786,45788,45790,45791,45792,45793,45795,45799,45801,45802,45808,45809,45810,45814,45820,45821,45822,45826,45827,45829,45830,45831,45833,45834,45835,45836,45837,45838,45839,45842,45846,45847,45848,45849,45850,45851,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45911,45913,45914,45917,45920,45921,45922,45923,45926,45928,45930,45932,45933,45935,45938,45939,45941,45942,45943,45945,45946,45947,45948,45949,45950,45951,45954,45958,45959,45960,45961,45962,45963,45965,null,null,null,null,null,null,45966,45967,45969,45970,45971,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45986,45987,45988,45989,45990,45991,45993,45994,45995,45997,null,null,null,null,null,null,45998,45999,46e3,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46022,46023,46025,46026,46029,46031,46033,46034,46035,46038,46040,46042,46044,46046,46047,46049,46050,46051,46053,46054,46055,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46097,46098,46099,46100,46101,46102,46103,46105,46106,46107,46109,46110,46111,46113,46114,46115,46116,46117,46118,46119,46122,46124,46125,46126,46127,46128,46129,46130,46131,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46162,46163,46165,46166,46167,46169,46170,46171,46172,46173,46174,46175,46178,46180,46182,null,null,null,null,null,null,46183,46184,46185,46186,46187,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46209,46210,null,null,null,null,null,null,46211,46212,46213,46214,46215,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46238,46239,46240,46241,46242,46243,46245,46246,46247,46249,46250,46251,46253,46254,46255,46256,46257,46258,46259,46260,46262,46264,46266,46267,46268,46269,46270,46271,46273,46274,46275,46277,46278,46279,46281,46282,46283,46284,46285,46286,46287,46289,46290,46291,46292,46294,46295,46296,46297,46298,46299,46302,46303,46305,46306,46309,46311,46312,46313,46314,46315,46318,46320,46322,46323,46324,46325,46326,46327,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46358,46359,46361,46362,46365,46366,46367,46368,46369,46370,46371,46374,46379,46380,46381,46382,46383,46386,46387,46389,46390,46391,46393,46394,46395,46396,46397,46398,46399,46402,46406,null,null,null,null,null,null,46407,46408,46409,46410,46414,46415,46417,46418,46419,46421,46422,46423,46424,46425,46426,46427,46430,46434,46435,46436,46437,46438,46439,46440,46441,46442,null,null,null,null,null,null,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46498,46499,46501,46502,46503,46505,46508,46509,46510,46511,46514,46518,46519,46520,46521,46522,46526,46527,46529,46530,46531,46533,46534,46535,46536,46537,46538,46539,46542,46546,46547,46548,46549,46550,46551,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46610,46611,46613,46614,46615,46617,46618,46619,46620,46621,null,null,null,null,null,null,46622,46623,46624,46625,46626,46627,46628,46630,46631,46632,46633,46634,46635,46637,46638,46639,46640,46641,46642,46643,46645,46646,46647,46648,46649,46650,null,null,null,null,null,null,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46693,46694,46695,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46750,46751,46753,46754,46755,46757,46758,46759,46760,46761,46762,46765,46766,46767,46768,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46805,46806,46807,46808,46809,46810,46811,46812,46813,null,null,null,null,null,null,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46833,46834,46835,46837,46838,46839,46841,46842,null,null,null,null,null,null,46843,46844,46845,46846,46847,46850,46851,46852,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46890,46891,46893,46894,46897,46898,46899,46900,46901,46902,46903,46906,46908,46909,46910,46911,46912,46913,46914,46915,46917,46918,46919,46921,46922,46923,46925,46926,46927,46928,46929,46930,46931,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46945,46946,46947,46949,46950,46951,46953,46954,46955,46956,46957,46958,46959,46962,46964,46966,46967,46968,46969,46970,46971,46974,46975,46977,46978,46979,46981,46982,46983,46984,46985,46986,46987,46990,46995,46996,46997,47002,47003,47005,47006,47007,47009,47010,47011,47012,47013,47014,47015,47018,47022,47023,47024,47025,47026,47027,47030,47031,47033,47034,47035,47036,47037,47038,47039,47040,47041,null,null,null,null,null,null,47042,47043,47044,47045,47046,47048,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,null,null,null,null,null,null,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47086,47087,47089,47090,47091,47093,47094,47095,47096,47097,47098,47099,47102,47106,47107,47108,47109,47110,47114,47115,47117,47118,47119,47121,47122,47123,47124,47125,47126,47127,47130,47132,47134,47135,47136,47137,47138,47139,47142,47143,47145,47146,47147,47149,47150,47151,47152,47153,47154,47155,47158,47162,47163,47164,47165,47166,47167,47169,47170,47171,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47186,47188,47189,47190,47191,47192,47193,47194,47195,47198,47199,47201,47202,47203,47205,47206,47207,47208,47209,47210,47211,47214,47216,47218,47219,47220,47221,47222,47223,47225,47226,47227,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,null,null,null,null,null,null,47264,47265,47266,47267,47268,47269,47270,47271,47273,47274,47275,47276,47277,47278,47279,47281,47282,47283,47285,47286,47287,47289,47290,47291,47292,47293,null,null,null,null,null,null,47294,47295,47298,47300,47302,47303,47304,47305,47306,47307,47309,47310,47311,47313,47314,47315,47317,47318,47319,47320,47321,47322,47323,47324,47326,47328,47330,47331,47332,47333,47334,47335,47338,47339,47341,47342,47343,47345,47346,47347,47348,47349,47350,47351,47354,47356,47358,47359,47360,47361,47362,47363,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47385,47386,47387,47388,47389,47390,47391,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47422,47423,47425,47426,47427,47429,47430,47431,47432,47433,47434,47435,47437,47438,47440,47442,47443,47444,47445,47446,47447,47450,47451,47453,47454,47455,47457,47458,47459,47460,47461,47462,47463,47466,47468,47470,47471,47472,47473,47474,47475,47478,47479,47481,47482,47483,47485,null,null,null,null,null,null,47486,47487,47488,47489,47490,47491,47494,47496,47499,47500,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,null,null,null,null,null,null,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47534,47535,47537,47538,47539,47541,47542,47543,47544,47545,47546,47547,47550,47552,47554,47555,47556,47557,47558,47559,47562,47563,47565,47571,47572,47573,47574,47575,47578,47580,47583,47584,47586,47590,47591,47593,47594,47595,47597,47598,47599,47600,47601,47602,47603,47606,47611,47612,47613,47614,47615,47618,47619,47620,47621,47622,47623,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47674,47675,47677,47678,47679,47681,47683,47684,47685,47686,47687,47690,47692,47695,47696,47697,47698,47702,47703,47705,47706,47707,47709,47710,47711,47712,47713,47714,47715,47718,47722,47723,47724,47725,47726,47727,null,null,null,null,null,null,47730,47731,47733,47734,47735,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47750,47752,47753,47754,47755,47757,47758,47759,47760,47761,47762,null,null,null,null,null,null,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47786,47789,47790,47791,47793,47795,47796,47797,47798,47799,47802,47804,47806,47807,47808,47809,47810,47811,47813,47814,47815,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47869,47870,47871,47873,47874,47875,47877,47878,47879,47880,47881,47882,47883,47884,47886,47888,47890,47891,47892,47893,47894,47895,47897,47898,47899,47901,47902,47903,47905,47906,47907,47908,47909,47910,47911,47912,47914,47916,47917,47918,47919,47920,47921,47922,47923,47927,47929,47930,47935,47936,47937,47938,47939,47942,47944,47946,47947,47948,47950,47953,47954,null,null,null,null,null,null,47955,47957,47958,47959,47961,47962,47963,47964,47965,47966,47967,47968,47970,47972,47973,47974,47975,47976,47977,47978,47979,47981,47982,47983,47984,47985,null,null,null,null,null,null,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48e3,48001,48002,48003,48004,48005,48006,48007,48009,48010,48011,48013,48014,48015,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48037,48038,48039,48041,48042,48043,48045,48046,48047,48048,48049,48050,48051,48053,48054,48056,48057,48058,48059,48060,48061,48062,48063,48065,48066,48067,48069,48070,48071,48073,48074,48075,48076,48077,48078,48079,48081,48082,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48122,48123,48125,48126,48129,48131,48132,48133,48134,48135,48138,48142,48144,48146,48147,48153,48154,48160,48161,48162,48163,48166,48168,48170,48171,48172,48174,48175,48178,48179,48181,null,null,null,null,null,null,48182,48183,48185,48186,48187,48188,48189,48190,48191,48194,48198,48199,48200,48202,48203,48206,48207,48209,48210,48211,48212,48213,48214,48215,48216,48217,null,null,null,null,null,null,48218,48219,48220,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48262,48263,48265,48266,48269,48271,48272,48273,48274,48275,48278,48280,48283,48284,48285,48286,48287,48290,48291,48293,48294,48297,48298,48299,48300,48301,48302,48303,48306,48310,48311,48312,48313,48314,48315,48318,48319,48321,48322,48323,48325,48326,48327,48328,48329,48330,48331,48332,48334,48338,48339,48340,48342,48343,48345,48346,48347,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48375,48377,48378,48379,48381,48382,48383,48384,48385,48386,48387,48390,48392,48394,48395,48396,48397,48398,48399,48401,48402,48403,48405,48406,48407,48408,48409,48410,48411,48412,48413,null,null,null,null,null,null,48414,48415,48416,48417,48418,48419,48421,48422,48423,48424,48425,48426,48427,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,null,null,null,null,null,null,48442,48443,48444,48445,48446,48447,48449,48450,48451,48452,48453,48454,48455,48458,48459,48461,48462,48463,48465,48466,48467,48468,48469,48470,48471,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48485,48486,48487,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48514,48515,48517,48518,48523,48524,48525,48526,48527,48530,48532,48534,48535,48536,48539,48541,48542,48543,48544,48545,48546,48547,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48561,48562,48563,48564,48565,48566,48567,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48598,48599,48601,48602,48603,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48618,48619,48620,48621,48622,48623,48625,null,null,null,null,null,null,48626,48627,48629,48630,48631,48633,48634,48635,48636,48637,48638,48639,48641,48642,48644,48646,48647,48648,48649,48650,48651,48654,48655,48657,48658,48659,null,null,null,null,null,null,48661,48662,48663,48664,48665,48666,48667,48670,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48710,48711,48713,48714,48715,48717,48719,48720,48721,48722,48723,48726,48728,48732,48733,48734,48735,48738,48739,48741,48742,48743,48745,48747,48748,48749,48750,48751,48754,48758,48759,48760,48761,48762,48766,48767,48769,48770,48771,48773,48774,48775,48776,48777,48778,48779,48782,48786,48787,48788,48789,48790,48791,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48850,48851,null,null,null,null,null,null,48853,48854,48857,48858,48859,48860,48861,48862,48863,48865,48866,48870,48871,48872,48873,48874,48875,48877,48878,48879,48880,48881,48882,48883,48884,48885,null,null,null,null,null,null,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48898,48899,48900,48901,48902,48903,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48922,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48962,48963,48965,48966,48967,48969,48970,48971,48972,48973,48974,48975,48978,48979,48980,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49e3,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49045,49046,49047,49048,49049,49050,49051,49052,49053,null,null,null,null,null,null,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49073,49074,49075,49076,49077,49078,49079,49080,null,null,null,null,null,null,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49094,49095,49096,49097,49098,49099,49102,49103,49105,49106,49107,49109,49110,49111,49112,49113,49114,49115,49117,49118,49120,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49234,49235,49236,49237,49238,49239,49241,49242,49243,null,null,null,null,null,null,49245,49246,49247,49249,49250,49251,49252,49253,49254,49255,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,null,null,null,null,null,null,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49298,49299,49301,49302,49303,49305,49306,49307,49308,49309,49310,49311,49314,49316,49318,49319,49320,49321,49322,49323,49326,49329,49330,49335,49336,49337,49338,49339,49342,49346,49347,49348,49350,49351,49354,49355,49357,49358,49359,49361,49362,49363,49364,49365,49366,49367,49370,49374,49375,49376,49377,49378,49379,49382,49383,49385,49386,49387,49389,49390,49391,49392,49393,49394,49395,49398,49400,49402,49403,49404,49405,49406,49407,49409,49410,49411,49413,49414,49415,49417,49418,49419,49420,49421,49422,49423,49425,49426,49427,49428,49430,49431,49432,49433,49434,49435,49441,49442,49445,49448,49449,49450,49451,49454,49458,49459,49460,49461,49463,49466,49467,49469,49470,49471,49473,49474,49475,49476,49477,49478,49479,49482,49486,49487,49488,49489,49490,49491,49494,49495,null,null,null,null,null,null,49497,49498,49499,49501,49502,49503,49504,49505,49506,49507,49510,49514,49515,49516,49517,49518,49519,49521,49522,49523,49525,49526,49527,49529,49530,49531,null,null,null,null,null,null,49532,49533,49534,49535,49536,49537,49538,49539,49540,49542,49543,49544,49545,49546,49547,49551,49553,49554,49555,49557,49559,49560,49561,49562,49563,49566,49568,49570,49571,49572,49574,49575,49578,49579,49581,49582,49583,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49598,49599,49600,49601,49602,49603,49605,49606,49607,49609,49610,49611,49613,49614,49615,49616,49617,49618,49619,49621,49622,49625,49626,49627,49628,49629,49630,49631,49633,49634,49635,49637,49638,49639,49641,49642,49643,49644,49645,49646,49647,49650,49652,49653,49654,49655,49656,49657,49658,49659,49662,49663,49665,49666,49667,49669,49670,49671,49672,49673,49674,49675,49678,49680,49682,49683,49684,49685,49686,49687,49690,49691,49693,49694,49697,49698,49699,49700,49701,49702,49703,49706,49708,49710,49712,49715,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,null,null,null,null,null,null,49734,49735,49737,49738,49739,49740,49741,49742,49743,49746,49747,49749,49750,49751,49753,49754,49755,49756,49757,49758,49759,49761,49762,49763,49764,49766,null,null,null,null,null,null,49767,49768,49769,49770,49771,49774,49775,49777,49778,49779,49781,49782,49783,49784,49785,49786,49787,49790,49792,49794,49795,49796,49797,49798,49799,49802,49803,49804,49805,49806,49807,49809,49810,49811,49812,49813,49814,49815,49817,49818,49820,49822,49823,49824,49825,49826,49827,49830,49831,49833,49834,49835,49838,49839,49840,49841,49842,49843,49846,49848,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49886,49887,49889,49890,49893,49894,49895,49896,49897,49898,49902,49904,49906,49907,49908,49909,49911,49914,49917,49918,49919,49921,49922,49923,49924,49925,49926,49927,49930,49931,49934,49935,49936,49937,49938,49942,49943,49945,49946,49947,49949,49950,49951,49952,49953,49954,49955,49958,49959,49962,49963,49964,49965,49966,49967,49968,49969,49970,null,null,null,null,null,null,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49990,49991,49992,49993,49994,49995,49996,49997,null,null,null,null,null,null,49998,49999,5e4,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50026,50027,50029,50030,50031,50033,50035,50036,50037,50038,50039,50042,50043,50046,50047,50048,50049,50050,50051,50053,50054,50055,50057,50058,50059,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50138,50139,50141,50142,50145,50147,50148,50149,50150,50151,50154,50155,50156,50158,50159,50160,50161,50162,50163,50166,50167,50169,50170,50171,50172,50173,50174,null,null,null,null,null,null,50175,50176,50177,50178,50179,50180,50181,50182,50183,50185,50186,50187,50188,50189,50190,50191,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,null,null,null,null,null,null,50203,50204,50205,50206,50207,50208,50209,50210,50211,50213,50214,50215,50216,50217,50218,50219,50221,50222,50223,50225,50226,50227,50229,50230,50231,50232,50233,50234,50235,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50278,50279,50281,50282,50283,50285,50286,50287,50288,50289,50290,50291,50294,50295,50296,50298,50299,50300,50301,50302,50303,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50325,50326,50327,50328,50329,50330,50331,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50361,50362,50363,50365,50366,50367,50368,50369,50370,50371,50372,50373,null,null,null,null,null,null,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,null,null,null,null,null,null,50400,50401,50402,50403,50404,50405,50406,50407,50408,50410,50411,50412,50413,50414,50415,50418,50419,50421,50422,50423,50425,50427,50428,50429,50430,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50445,50446,50447,50449,50450,50451,50453,50454,50455,50456,50457,50458,50459,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50474,50475,50477,50478,50479,50481,50482,50483,50484,50485,50486,50487,50490,50492,50494,50495,50496,50497,50498,50499,50502,50503,50507,50511,50512,50513,50514,50518,50522,50523,50524,50527,50530,50531,50533,50534,50535,50537,50538,50539,50540,50541,50542,50543,50546,50550,50551,50552,50553,50554,50555,50558,50559,50561,50562,50563,50565,50566,50568,50569,50570,50571,50574,50576,50578,50579,50580,50582,50585,50586,50587,50589,50590,50591,50593,50594,50595,50596,50597,50598,50599,50600,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50614,null,null,null,null,null,null,50615,50618,50623,50624,50625,50626,50627,50635,50637,50639,50642,50643,50645,50646,50647,50649,50650,50651,50652,50653,50654,50655,50658,50660,50662,50663,null,null,null,null,null,null,50664,50665,50666,50667,50671,50673,50674,50675,50677,50680,50681,50682,50683,50690,50691,50692,50697,50698,50699,50701,50702,50703,50705,50706,50707,50708,50709,50710,50711,50714,50717,50718,50719,50720,50721,50722,50723,50726,50727,50729,50730,50731,50735,50737,50738,50742,50744,50746,50748,50749,50750,50751,50754,50755,50757,50758,50759,50761,50762,50763,50764,50765,50766,50767,50770,50774,50775,50776,50777,50778,50779,50782,50783,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50797,50798,50800,50802,50803,50804,50805,50806,50807,50810,50811,50813,50814,50815,50817,50818,50819,50820,50821,50822,50823,50826,50828,50830,50831,50832,50833,50834,50835,50838,50839,50841,50842,50843,50845,50846,50847,50848,50849,50850,50851,50854,50856,50858,50859,50860,50861,50862,50863,50866,50867,50869,50870,50871,50875,50876,50877,50878,50879,50882,50884,50886,50887,50888,50889,50890,50891,50894,null,null,null,null,null,null,50895,50897,50898,50899,50901,50902,50903,50904,50905,50906,50907,50910,50911,50914,50915,50916,50917,50918,50919,50922,50923,50925,50926,50927,50929,50930,null,null,null,null,null,null,50931,50932,50933,50934,50935,50938,50939,50940,50942,50943,50944,50945,50946,50947,50950,50951,50953,50954,50955,50957,50958,50959,50960,50961,50962,50963,50966,50968,50970,50971,50972,50973,50974,50975,50978,50979,50981,50982,50983,50985,50986,50987,50988,50989,50990,50991,50994,50996,50998,51e3,51001,51002,51003,51006,51007,51009,51010,51011,51013,51014,51015,51016,51017,51019,51022,51024,51033,51034,51035,51037,51038,51039,51041,51042,51043,51044,51045,51046,51047,51049,51050,51052,51053,51054,51055,51056,51057,51058,51059,51062,51063,51065,51066,51067,51071,51072,51073,51074,51078,51083,51084,51085,51087,51090,51091,51093,51097,51099,51100,51101,51102,51103,51106,51111,51112,51113,51114,51115,51118,51119,51121,51122,51123,51125,51126,51127,51128,51129,51130,51131,51134,51138,51139,51140,51141,51142,51143,51146,51147,51149,51151,51153,51154,51155,51156,51157,51158,51159,51161,51162,51163,51164,null,null,null,null,null,null,51166,51167,51168,51169,51170,51171,51173,51174,51175,51177,51178,51179,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,null,null,null,null,null,null,51195,51196,51197,51198,51199,51202,51203,51205,51206,51207,51209,51211,51212,51213,51214,51215,51218,51220,51223,51224,51225,51226,51227,51230,51231,51233,51234,51235,51237,51238,51239,51240,51241,51242,51243,51246,51248,51250,51251,51252,51253,51254,51255,51257,51258,51259,51261,51262,51263,51265,51266,51267,51268,51269,51270,51271,51274,51275,51278,51279,51280,51281,51282,51283,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51314,51315,51317,51318,51319,51321,51323,51324,51325,51326,51327,51330,51332,51336,51337,51338,51342,51343,51344,51345,51346,51347,51349,51350,51351,51352,51353,51354,51355,51356,51358,51360,51362,51363,51364,51365,51366,51367,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51390,51391,51392,51393,null,null,null,null,null,null,51394,51395,51397,51398,51399,51401,51402,51403,51405,51406,51407,51408,51409,51410,51411,51414,51416,51418,51419,51420,51421,51422,51423,51426,51427,51429,null,null,null,null,null,null,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51446,51447,51448,51449,51450,51451,51454,51455,51457,51458,51459,51463,51464,51465,51466,51467,51470,12288,12289,12290,183,8229,8230,168,12291,173,8213,8741,65340,8764,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,177,215,247,8800,8804,8805,8734,8756,176,8242,8243,8451,8491,65504,65505,65509,9794,9792,8736,8869,8978,8706,8711,8801,8786,167,8251,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8594,8592,8593,8595,8596,12307,8810,8811,8730,8765,8733,8757,8747,8748,8712,8715,8838,8839,8834,8835,8746,8745,8743,8744,65506,51472,51474,51475,51476,51477,51478,51479,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,null,null,null,null,null,null,51501,51502,51503,51504,51505,51506,51507,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,null,null,null,null,null,null,51528,51529,51530,51531,51532,51533,51534,51535,51538,51539,51541,51542,51543,51545,51546,51547,51548,51549,51550,51551,51554,51556,51557,51558,51559,51560,51561,51562,51563,51565,51566,51567,8658,8660,8704,8707,180,65374,711,728,733,730,729,184,731,161,191,720,8750,8721,8719,164,8457,8240,9665,9664,9655,9654,9828,9824,9825,9829,9831,9827,8857,9672,9635,9680,9681,9618,9636,9637,9640,9639,9638,9641,9832,9743,9742,9756,9758,182,8224,8225,8597,8599,8601,8598,8600,9837,9833,9834,9836,12927,12828,8470,13255,8482,13250,13272,8481,8364,174,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51569,51570,51571,51573,51574,51575,51576,51577,51578,51579,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51594,51595,51597,51598,51599,null,null,null,null,null,null,51601,51602,51603,51604,51605,51606,51607,51610,51612,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,null,null,null,null,null,null,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51650,51651,51653,51654,51657,51659,51660,51661,51662,51663,51666,51668,51671,51672,51675,65281,65282,65283,65284,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65510,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,51678,51679,51681,51683,51685,51686,51688,51689,51690,51691,51694,51698,51699,51700,51701,51702,51703,51706,51707,51709,51710,51711,51713,51714,51715,51716,null,null,null,null,null,null,51717,51718,51719,51722,51726,51727,51728,51729,51730,51731,51733,51734,51735,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,null,null,null,null,null,null,51750,51751,51752,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,51783,51784,51785,51786,51787,51790,51791,51793,51794,51795,51797,51798,51799,51800,51801,51802,51803,51806,51810,51811,51812,51813,51814,51815,51817,51818,null,null,null,null,null,null,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51838,51839,51840,51841,51842,51843,51845,51846,null,null,null,null,null,null,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,null,null,null,null,null,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51902,51903,51905,51906,51907,51909,null,null,null,null,null,null,51910,51911,51912,51913,51914,51915,51918,51920,51922,51924,51925,51926,51927,51930,51931,51932,51933,51934,51935,51937,51938,51939,51940,51941,51942,51943,null,null,null,null,null,null,51944,51945,51946,51947,51949,51950,51951,51952,51953,51954,51955,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51977,51978,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,9490,9489,9498,9497,9494,9493,9486,9485,9502,9503,9505,9506,9510,9511,9513,9514,9517,9518,9521,9522,9525,9526,9529,9530,9533,9534,9536,9537,9539,9540,9541,9542,9543,9544,9545,9546,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51979,51980,51981,51982,51983,51985,51986,51987,51989,51990,51991,51993,51994,51995,51996,51997,51998,51999,52002,52003,52004,52005,52006,52007,52008,52009,null,null,null,null,null,null,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52034,52035,52036,null,null,null,null,null,null,52037,52038,52039,52042,52043,52045,52046,52047,52049,52050,52051,52052,52053,52054,52055,52058,52059,52060,52062,52063,52064,52065,52066,52067,52069,52070,52071,52072,52073,52074,52075,52076,13205,13206,13207,8467,13208,13252,13219,13220,13221,13222,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13258,13197,13198,13199,13263,13192,13193,13256,13223,13224,13232,13233,13234,13235,13236,13237,13238,13239,13240,13241,13184,13185,13186,13187,13188,13242,13243,13244,13245,13246,13247,13200,13201,13202,13203,13204,8486,13248,13249,13194,13195,13196,13270,13253,13229,13230,13231,13275,13225,13226,13227,13228,13277,13264,13267,13251,13257,13276,13254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,null,null,null,null,null,null,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52125,52126,52127,52128,52129,52130,52131,null,null,null,null,null,null,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,198,208,170,294,null,306,null,319,321,216,338,186,222,358,330,null,12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,9424,9425,9426,9427,9428,9429,9430,9431,9432,9433,9434,9435,9436,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446,9447,9448,9449,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,189,8531,8532,188,190,8539,8540,8541,8542,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,null,null,null,null,null,null,52192,52193,52194,52195,52197,52198,52200,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,null,null,null,null,null,null,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52238,52239,52241,52242,52243,52245,52246,52247,52248,52249,52250,52251,52254,52255,52256,52259,52260,230,273,240,295,305,307,312,320,322,248,339,223,254,359,331,329,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819,12820,12821,12822,12823,12824,12825,12826,12827,9372,9373,9374,9375,9376,9377,9378,9379,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389,9390,9391,9392,9393,9394,9395,9396,9397,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,185,178,179,8308,8319,8321,8322,8323,8324,52261,52262,52266,52267,52269,52271,52273,52274,52275,52276,52277,52278,52279,52282,52287,52288,52289,52290,52291,52294,52295,52297,52298,52299,52301,52302,null,null,null,null,null,null,52303,52304,52305,52306,52307,52310,52314,52315,52316,52317,52318,52319,52321,52322,52323,52325,52327,52329,52330,52331,52332,52333,52334,52335,52337,52338,null,null,null,null,null,null,52339,52340,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,52372,52373,52374,52375,52378,52379,52381,52382,52383,52385,52386,52387,52388,52389,52390,52391,52394,52398,52399,52400,52401,52402,52403,52406,52407,52409,null,null,null,null,null,null,52410,52411,52413,52414,52415,52416,52417,52418,52419,52422,52424,52426,52427,52428,52429,52430,52431,52433,52434,52435,52437,52438,52439,52440,52441,52442,null,null,null,null,null,null,52443,52444,52445,52446,52447,52448,52449,52450,52451,52453,52454,52455,52456,52457,52458,52459,52461,52462,52463,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,52478,52479,52480,52482,52483,52484,52485,52486,52487,52490,52491,52493,52494,52495,52497,52498,52499,52500,52501,52502,52503,52506,52508,52510,52511,52512,null,null,null,null,null,null,52513,52514,52515,52517,52518,52519,52521,52522,52523,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52538,52539,52540,52541,52542,null,null,null,null,null,null,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52573,52574,52575,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,52577,52578,52579,52581,52582,52583,52584,52585,52586,52587,52590,52592,52594,52595,52596,52597,52598,52599,52601,52602,52603,52604,52605,52606,52607,52608,null,null,null,null,null,null,52609,52610,52611,52612,52613,52614,52615,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52630,52631,52633,52634,52635,52637,52638,52639,null,null,null,null,null,null,52640,52641,52642,52643,52646,52648,52650,52651,52652,52653,52654,52655,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52677,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52678,52679,52680,52681,52682,52683,52685,52686,52687,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,null,null,null,null,null,null,52706,52707,52708,52709,52710,52711,52713,52714,52715,52717,52718,52719,52721,52722,52723,52724,52725,52726,52727,52730,52732,52734,52735,52736,52737,52738,null,null,null,null,null,null,52739,52741,52742,52743,52745,52746,52747,52749,52750,52751,52752,52753,52754,52755,52757,52758,52759,52760,52762,52763,52764,52765,52766,52767,52770,52771,52773,52774,52775,52777,52778,52779,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52780,52781,52782,52783,52786,52788,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,null,null,null,null,null,null,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52826,52827,52829,52830,52834,52835,52836,52837,52838,52839,52842,52844,null,null,null,null,null,null,52846,52847,52848,52849,52850,52851,52854,52855,52857,52858,52859,52861,52862,52863,52864,52865,52866,52867,52870,52872,52874,52875,52876,52877,52878,52879,52882,52883,52885,52886,52887,52889,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52890,52891,52892,52893,52894,52895,52898,52902,52903,52904,52905,52906,52907,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,null,null,null,null,null,null,52923,52924,52925,52926,52927,52928,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,null,null,null,null,null,null,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52966,52967,52969,52970,52973,52974,52975,52976,52977,52978,52979,52982,52986,52987,52988,52989,52990,52991,44032,44033,44036,44039,44040,44041,44042,44048,44049,44050,44051,44052,44053,44054,44055,44057,44058,44059,44060,44061,44064,44068,44076,44077,44079,44080,44081,44088,44089,44092,44096,44107,44109,44116,44120,44124,44144,44145,44148,44151,44152,44154,44160,44161,44163,44164,44165,44166,44169,44170,44171,44172,44176,44180,44188,44189,44191,44192,44193,44200,44201,44202,44204,44207,44208,44216,44217,44219,44220,44221,44225,44228,44232,44236,44245,44247,44256,44257,44260,44263,44264,44266,44268,44271,44272,44273,44275,44277,44278,44284,44285,44288,44292,44294,52994,52995,52997,52998,52999,53001,53002,53003,53004,53005,53006,53007,53010,53012,53014,53015,53016,53017,53018,53019,53021,53022,53023,53025,53026,53027,null,null,null,null,null,null,53029,53030,53031,53032,53033,53034,53035,53038,53042,53043,53044,53045,53046,53047,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,null,null,null,null,null,null,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53078,53079,53081,53082,53083,53085,53086,53087,53088,53089,53090,53091,53094,53096,53098,53099,53100,44300,44301,44303,44305,44312,44316,44320,44329,44332,44333,44340,44341,44344,44348,44356,44357,44359,44361,44368,44372,44376,44385,44387,44396,44397,44400,44403,44404,44405,44406,44411,44412,44413,44415,44417,44418,44424,44425,44428,44432,44444,44445,44452,44471,44480,44481,44484,44488,44496,44497,44499,44508,44512,44516,44536,44537,44540,44543,44544,44545,44552,44553,44555,44557,44564,44592,44593,44596,44599,44600,44602,44608,44609,44611,44613,44614,44618,44620,44621,44622,44624,44628,44630,44636,44637,44639,44640,44641,44645,44648,44649,44652,44656,44664,53101,53102,53103,53106,53107,53109,53110,53111,53113,53114,53115,53116,53117,53118,53119,53121,53122,53123,53124,53126,53127,53128,53129,53130,53131,53133,null,null,null,null,null,null,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53154,53155,53156,53157,53158,53159,53161,null,null,null,null,null,null,53162,53163,53164,53165,53166,53167,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53189,53190,53191,53192,53193,53194,53195,44665,44667,44668,44669,44676,44677,44684,44732,44733,44734,44736,44740,44748,44749,44751,44752,44753,44760,44761,44764,44776,44779,44781,44788,44792,44796,44807,44808,44813,44816,44844,44845,44848,44850,44852,44860,44861,44863,44865,44866,44867,44872,44873,44880,44892,44893,44900,44901,44921,44928,44932,44936,44944,44945,44949,44956,44984,44985,44988,44992,44999,45e3,45001,45003,45005,45006,45012,45020,45032,45033,45040,45041,45044,45048,45056,45057,45060,45068,45072,45076,45084,45085,45096,45124,45125,45128,45130,45132,45134,45139,45140,45141,45143,45145,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53218,53219,53221,53222,53223,53225,null,null,null,null,null,null,53226,53227,53228,53229,53230,53231,53234,53236,53238,53239,53240,53241,53242,53243,53245,53246,53247,53249,53250,53251,53253,53254,53255,53256,53257,53258,null,null,null,null,null,null,53259,53260,53261,53262,53263,53264,53266,53267,53268,53269,53270,53271,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,45149,45180,45181,45184,45188,45196,45197,45199,45201,45208,45209,45210,45212,45215,45216,45217,45218,45224,45225,45227,45228,45229,45230,45231,45233,45235,45236,45237,45240,45244,45252,45253,45255,45256,45257,45264,45265,45268,45272,45280,45285,45320,45321,45323,45324,45328,45330,45331,45336,45337,45339,45340,45341,45347,45348,45349,45352,45356,45364,45365,45367,45368,45369,45376,45377,45380,45384,45392,45393,45396,45397,45400,45404,45408,45432,45433,45436,45440,45442,45448,45449,45451,45453,45458,45459,45460,45464,45468,45480,45516,45520,45524,45532,45533,53294,53295,53296,53297,53298,53299,53302,53303,53305,53306,53307,53309,53310,53311,53312,53313,53314,53315,53318,53320,53322,53323,53324,53325,53326,53327,null,null,null,null,null,null,53329,53330,53331,53333,53334,53335,53337,53338,53339,53340,53341,53342,53343,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53358,53359,null,null,null,null,null,null,53361,53362,53363,53365,53366,53367,53368,53369,53370,53371,53374,53375,53376,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,45535,45544,45545,45548,45552,45561,45563,45565,45572,45573,45576,45579,45580,45588,45589,45591,45593,45600,45620,45628,45656,45660,45664,45672,45673,45684,45685,45692,45700,45701,45705,45712,45713,45716,45720,45721,45722,45728,45729,45731,45733,45734,45738,45740,45744,45748,45768,45769,45772,45776,45778,45784,45785,45787,45789,45794,45796,45797,45798,45800,45803,45804,45805,45806,45807,45811,45812,45813,45815,45816,45817,45818,45819,45823,45824,45825,45828,45832,45840,45841,45843,45844,45845,45852,45908,45909,45910,45912,45915,45916,45918,45919,45924,45925,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53414,53415,53417,53418,53419,53421,53422,53423,53424,53425,53426,null,null,null,null,null,null,53427,53430,53432,53434,53435,53436,53437,53438,53439,53442,53443,53445,53446,53447,53450,53451,53452,53453,53454,53455,53458,53462,53463,53464,53465,53466,null,null,null,null,null,null,53467,53470,53471,53473,53474,53475,53477,53478,53479,53480,53481,53482,53483,53486,53490,53491,53492,53493,53494,53495,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,45927,45929,45931,45934,45936,45937,45940,45944,45952,45953,45955,45956,45957,45964,45968,45972,45984,45985,45992,45996,46020,46021,46024,46027,46028,46030,46032,46036,46037,46039,46041,46043,46045,46048,46052,46056,46076,46096,46104,46108,46112,46120,46121,46123,46132,46160,46161,46164,46168,46176,46177,46179,46181,46188,46208,46216,46237,46244,46248,46252,46261,46263,46265,46272,46276,46280,46288,46293,46300,46301,46304,46307,46308,46310,46316,46317,46319,46321,46328,46356,46357,46360,46363,46364,46372,46373,46375,46376,46377,46378,46384,46385,46388,46392,53509,53510,53511,53512,53513,53514,53515,53516,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,null,null,null,null,null,null,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53554,53555,53557,53558,53559,53561,53563,53564,53565,53566,null,null,null,null,null,null,53567,53570,53574,53575,53576,53577,53578,53579,53582,53583,53585,53586,53587,53589,53590,53591,53592,53593,53594,53595,53598,53600,53602,53603,53604,53605,53606,53607,53609,53610,53611,53613,46400,46401,46403,46404,46405,46411,46412,46413,46416,46420,46428,46429,46431,46432,46433,46496,46497,46500,46504,46506,46507,46512,46513,46515,46516,46517,46523,46524,46525,46528,46532,46540,46541,46543,46544,46545,46552,46572,46608,46609,46612,46616,46629,46636,46644,46664,46692,46696,46748,46749,46752,46756,46763,46764,46769,46804,46832,46836,46840,46848,46849,46853,46888,46889,46892,46895,46896,46904,46905,46907,46916,46920,46924,46932,46933,46944,46948,46952,46960,46961,46963,46965,46972,46973,46976,46980,46988,46989,46991,46992,46993,46994,46998,46999,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53629,53630,53631,53632,53633,53634,53635,53637,53638,53639,53641,53642,null,null,null,null,null,null,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53666,53667,53669,53670,53671,null,null,null,null,null,null,53673,53674,53675,53676,53677,53678,53679,53682,53684,53686,53687,53688,53689,53691,53693,53694,53695,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,47e3,47001,47004,47008,47016,47017,47019,47020,47021,47028,47029,47032,47047,47049,47084,47085,47088,47092,47100,47101,47103,47104,47105,47111,47112,47113,47116,47120,47128,47129,47131,47133,47140,47141,47144,47148,47156,47157,47159,47160,47161,47168,47172,47185,47187,47196,47197,47200,47204,47212,47213,47215,47217,47224,47228,47245,47272,47280,47284,47288,47296,47297,47299,47301,47308,47312,47316,47325,47327,47329,47336,47337,47340,47344,47352,47353,47355,47357,47364,47384,47392,47420,47421,47424,47428,47436,47439,47441,47448,47449,47452,47456,47464,47465,53712,53713,53714,53715,53716,53717,53718,53719,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,null,null,null,null,null,null,53739,53740,53741,53742,53743,53744,53745,53746,53747,53749,53750,53751,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,null,null,null,null,null,null,53768,53770,53771,53772,53773,53774,53775,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,47467,47469,47476,47477,47480,47484,47492,47493,47495,47497,47498,47501,47502,47532,47533,47536,47540,47548,47549,47551,47553,47560,47561,47564,47566,47567,47568,47569,47570,47576,47577,47579,47581,47582,47585,47587,47588,47589,47592,47596,47604,47605,47607,47608,47609,47610,47616,47617,47624,47637,47672,47673,47676,47680,47682,47688,47689,47691,47693,47694,47699,47700,47701,47704,47708,47716,47717,47719,47720,47721,47728,47729,47732,47736,47747,47748,47749,47751,47756,47784,47785,47787,47788,47792,47794,47800,47801,47803,47805,47812,47816,47832,47833,47868,53802,53803,53806,53807,53809,53810,53811,53813,53814,53815,53816,53817,53818,53819,53822,53824,53826,53827,53828,53829,53830,53831,53833,53834,53835,53836,null,null,null,null,null,null,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53853,53854,53855,53856,53857,53858,53859,53861,53862,53863,53864,null,null,null,null,null,null,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53890,53891,53893,53894,53895,53897,53898,53899,53900,47872,47876,47885,47887,47889,47896,47900,47904,47913,47915,47924,47925,47926,47928,47931,47932,47933,47934,47940,47941,47943,47945,47949,47951,47952,47956,47960,47969,47971,47980,48008,48012,48016,48036,48040,48044,48052,48055,48064,48068,48072,48080,48083,48120,48121,48124,48127,48128,48130,48136,48137,48139,48140,48141,48143,48145,48148,48149,48150,48151,48152,48155,48156,48157,48158,48159,48164,48165,48167,48169,48173,48176,48177,48180,48184,48192,48193,48195,48196,48197,48201,48204,48205,48208,48221,48260,48261,48264,48267,48268,48270,48276,48277,48279,53901,53902,53903,53906,53907,53908,53910,53911,53912,53913,53914,53915,53917,53918,53919,53921,53922,53923,53925,53926,53927,53928,53929,53930,53931,53933,null,null,null,null,null,null,53934,53935,53936,53938,53939,53940,53941,53942,53943,53946,53947,53949,53950,53953,53955,53956,53957,53958,53959,53962,53964,53965,53966,53967,53968,53969,null,null,null,null,null,null,53970,53971,53973,53974,53975,53977,53978,53979,53981,53982,53983,53984,53985,53986,53987,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54002,54003,54005,54006,54007,54009,54010,48281,48282,48288,48289,48292,48295,48296,48304,48305,48307,48308,48309,48316,48317,48320,48324,48333,48335,48336,48337,48341,48344,48348,48372,48373,48374,48376,48380,48388,48389,48391,48393,48400,48404,48420,48428,48448,48456,48457,48460,48464,48472,48473,48484,48488,48512,48513,48516,48519,48520,48521,48522,48528,48529,48531,48533,48537,48538,48540,48548,48560,48568,48596,48597,48600,48604,48617,48624,48628,48632,48640,48643,48645,48652,48653,48656,48660,48668,48669,48671,48708,48709,48712,48716,48718,48724,48725,48727,48729,48730,48731,48736,48737,48740,54011,54012,54013,54014,54015,54018,54020,54022,54023,54024,54025,54026,54027,54031,54033,54034,54035,54037,54039,54040,54041,54042,54043,54046,54050,54051,null,null,null,null,null,null,54052,54054,54055,54058,54059,54061,54062,54063,54065,54066,54067,54068,54069,54070,54071,54074,54078,54079,54080,54081,54082,54083,54086,54087,54088,54089,null,null,null,null,null,null,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,48744,48746,48752,48753,48755,48756,48757,48763,48764,48765,48768,48772,48780,48781,48783,48784,48785,48792,48793,48808,48848,48849,48852,48855,48856,48864,48867,48868,48869,48876,48897,48904,48905,48920,48921,48923,48924,48925,48960,48961,48964,48968,48976,48977,48981,49044,49072,49093,49100,49101,49104,49108,49116,49119,49121,49212,49233,49240,49244,49248,49256,49257,49296,49297,49300,49304,49312,49313,49315,49317,49324,49325,49327,49328,49331,49332,49333,49334,49340,49341,49343,49344,49345,49349,49352,49353,49356,49360,49368,49369,49371,49372,49373,49380,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54142,54143,54145,54146,54147,54149,54150,54151,null,null,null,null,null,null,54152,54153,54154,54155,54158,54162,54163,54164,54165,54166,54167,54170,54171,54173,54174,54175,54177,54178,54179,54180,54181,54182,54183,54186,54188,54190,null,null,null,null,null,null,54191,54192,54193,54194,54195,54197,54198,54199,54201,54202,54203,54205,54206,54207,54208,54209,54210,54211,54214,54215,54218,54219,54220,54221,54222,54223,54225,54226,54227,54228,54229,54230,49381,49384,49388,49396,49397,49399,49401,49408,49412,49416,49424,49429,49436,49437,49438,49439,49440,49443,49444,49446,49447,49452,49453,49455,49456,49457,49462,49464,49465,49468,49472,49480,49481,49483,49484,49485,49492,49493,49496,49500,49508,49509,49511,49512,49513,49520,49524,49528,49541,49548,49549,49550,49552,49556,49558,49564,49565,49567,49569,49573,49576,49577,49580,49584,49597,49604,49608,49612,49620,49623,49624,49632,49636,49640,49648,49649,49651,49660,49661,49664,49668,49676,49677,49679,49681,49688,49689,49692,49695,49696,49704,49705,49707,49709,54231,54233,54234,54235,54236,54237,54238,54239,54240,54242,54244,54245,54246,54247,54248,54249,54250,54251,54254,54255,54257,54258,54259,54261,54262,54263,null,null,null,null,null,null,54264,54265,54266,54267,54270,54272,54274,54275,54276,54277,54278,54279,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,null,null,null,null,null,null,54295,54296,54297,54298,54299,54300,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,49711,49713,49714,49716,49736,49744,49745,49748,49752,49760,49765,49772,49773,49776,49780,49788,49789,49791,49793,49800,49801,49808,49816,49819,49821,49828,49829,49832,49836,49837,49844,49845,49847,49849,49884,49885,49888,49891,49892,49899,49900,49901,49903,49905,49910,49912,49913,49915,49916,49920,49928,49929,49932,49933,49939,49940,49941,49944,49948,49956,49957,49960,49961,49989,50024,50025,50028,50032,50034,50040,50041,50044,50045,50052,50056,50060,50112,50136,50137,50140,50143,50144,50146,50152,50153,50157,50164,50165,50168,50184,50192,50212,50220,50224,54328,54329,54330,54331,54332,54333,54334,54335,54337,54338,54339,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,null,null,null,null,null,null,54356,54357,54358,54359,54360,54361,54362,54363,54365,54366,54367,54369,54370,54371,54373,54374,54375,54376,54377,54378,54379,54380,54382,54384,54385,54386,null,null,null,null,null,null,54387,54388,54389,54390,54391,54394,54395,54397,54398,54401,54403,54404,54405,54406,54407,54410,54412,54414,54415,54416,54417,54418,54419,54421,54422,54423,54424,54425,54426,54427,54428,54429,50228,50236,50237,50248,50276,50277,50280,50284,50292,50293,50297,50304,50324,50332,50360,50364,50409,50416,50417,50420,50424,50426,50431,50432,50433,50444,50448,50452,50460,50472,50473,50476,50480,50488,50489,50491,50493,50500,50501,50504,50505,50506,50508,50509,50510,50515,50516,50517,50519,50520,50521,50525,50526,50528,50529,50532,50536,50544,50545,50547,50548,50549,50556,50557,50560,50564,50567,50572,50573,50575,50577,50581,50583,50584,50588,50592,50601,50612,50613,50616,50617,50619,50620,50621,50622,50628,50629,50630,50631,50632,50633,50634,50636,50638,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,null,null,null,null,null,null,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54477,54478,54479,54481,54482,54483,54485,null,null,null,null,null,null,54486,54487,54488,54489,54490,54491,54493,54494,54496,54497,54498,54499,54500,54501,54502,54503,54505,54506,54507,54509,54510,54511,54513,54514,54515,54516,54517,54518,54519,54521,54522,54524,50640,50641,50644,50648,50656,50657,50659,50661,50668,50669,50670,50672,50676,50678,50679,50684,50685,50686,50687,50688,50689,50693,50694,50695,50696,50700,50704,50712,50713,50715,50716,50724,50725,50728,50732,50733,50734,50736,50739,50740,50741,50743,50745,50747,50752,50753,50756,50760,50768,50769,50771,50772,50773,50780,50781,50784,50796,50799,50801,50808,50809,50812,50816,50824,50825,50827,50829,50836,50837,50840,50844,50852,50853,50855,50857,50864,50865,50868,50872,50873,50874,50880,50881,50883,50885,50892,50893,50896,50900,50908,50909,50912,50913,50920,54526,54527,54528,54529,54530,54531,54533,54534,54535,54537,54538,54539,54541,54542,54543,54544,54545,54546,54547,54550,54552,54553,54554,54555,54556,54557,null,null,null,null,null,null,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,null,null,null,null,null,null,54584,54585,54586,54587,54590,54591,54593,54594,54595,54597,54598,54599,54600,54601,54602,54603,54606,54608,54610,54611,54612,54613,54614,54615,54618,54619,54621,54622,54623,54625,54626,54627,50921,50924,50928,50936,50937,50941,50948,50949,50952,50956,50964,50965,50967,50969,50976,50977,50980,50984,50992,50993,50995,50997,50999,51004,51005,51008,51012,51018,51020,51021,51023,51025,51026,51027,51028,51029,51030,51031,51032,51036,51040,51048,51051,51060,51061,51064,51068,51069,51070,51075,51076,51077,51079,51080,51081,51082,51086,51088,51089,51092,51094,51095,51096,51098,51104,51105,51107,51108,51109,51110,51116,51117,51120,51124,51132,51133,51135,51136,51137,51144,51145,51148,51150,51152,51160,51165,51172,51176,51180,51200,51201,51204,51208,51210,54628,54630,54631,54634,54636,54638,54639,54640,54641,54642,54643,54646,54647,54649,54650,54651,54653,54654,54655,54656,54657,54658,54659,54662,54666,54667,null,null,null,null,null,null,54668,54669,54670,54671,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54694,54695,null,null,null,null,null,null,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,51216,51217,51219,51221,51222,51228,51229,51232,51236,51244,51245,51247,51249,51256,51260,51264,51272,51273,51276,51277,51284,51312,51313,51316,51320,51322,51328,51329,51331,51333,51334,51335,51339,51340,51341,51348,51357,51359,51361,51368,51388,51389,51396,51400,51404,51412,51413,51415,51417,51424,51425,51428,51445,51452,51453,51456,51460,51461,51462,51468,51469,51471,51473,51480,51500,51508,51536,51537,51540,51544,51552,51553,51555,51564,51568,51572,51580,51592,51593,51596,51600,51608,51609,51611,51613,51648,51649,51652,51655,51656,51658,51664,51665,51667,54730,54731,54733,54734,54735,54737,54739,54740,54741,54742,54743,54746,54748,54750,54751,54752,54753,54754,54755,54758,54759,54761,54762,54763,54765,54766,null,null,null,null,null,null,54767,54768,54769,54770,54771,54774,54776,54778,54779,54780,54781,54782,54783,54786,54787,54789,54790,54791,54793,54794,54795,54796,54797,54798,54799,54802,null,null,null,null,null,null,54806,54807,54808,54809,54810,54811,54813,54814,54815,54817,54818,54819,54821,54822,54823,54824,54825,54826,54827,54828,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54842,54843,51669,51670,51673,51674,51676,51677,51680,51682,51684,51687,51692,51693,51695,51696,51697,51704,51705,51708,51712,51720,51721,51723,51724,51725,51732,51736,51753,51788,51789,51792,51796,51804,51805,51807,51808,51809,51816,51837,51844,51864,51900,51901,51904,51908,51916,51917,51919,51921,51923,51928,51929,51936,51948,51956,51976,51984,51988,51992,52e3,52001,52033,52040,52041,52044,52048,52056,52057,52061,52068,52088,52089,52124,52152,52180,52196,52199,52201,52236,52237,52240,52244,52252,52253,52257,52258,52263,52264,52265,52268,52270,52272,52280,52281,52283,54845,54846,54847,54849,54850,54851,54852,54854,54855,54858,54860,54862,54863,54864,54866,54867,54870,54871,54873,54874,54875,54877,54878,54879,54880,54881,null,null,null,null,null,null,54882,54883,54884,54885,54886,54888,54890,54891,54892,54893,54894,54895,54898,54899,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,null,null,null,null,null,null,54913,54914,54916,54918,54919,54920,54921,54922,54923,54926,54927,54929,54930,54931,54933,54934,54935,54936,54937,54938,54939,54940,54942,54944,54946,54947,54948,54949,54950,54951,54953,54954,52284,52285,52286,52292,52293,52296,52300,52308,52309,52311,52312,52313,52320,52324,52326,52328,52336,52341,52376,52377,52380,52384,52392,52393,52395,52396,52397,52404,52405,52408,52412,52420,52421,52423,52425,52432,52436,52452,52460,52464,52481,52488,52489,52492,52496,52504,52505,52507,52509,52516,52520,52524,52537,52572,52576,52580,52588,52589,52591,52593,52600,52616,52628,52629,52632,52636,52644,52645,52647,52649,52656,52676,52684,52688,52712,52716,52720,52728,52729,52731,52733,52740,52744,52748,52756,52761,52768,52769,52772,52776,52784,52785,52787,52789,54955,54957,54958,54959,54961,54962,54963,54964,54965,54966,54967,54968,54970,54972,54973,54974,54975,54976,54977,54978,54979,54982,54983,54985,54986,54987,null,null,null,null,null,null,54989,54990,54991,54992,54994,54995,54997,54998,55e3,55002,55003,55004,55005,55006,55007,55009,55010,55011,55013,55014,55015,55017,55018,55019,55020,55021,null,null,null,null,null,null,55022,55023,55025,55026,55027,55028,55030,55031,55032,55033,55034,55035,55038,55039,55041,55042,55043,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55058,55059,55060,52824,52825,52828,52831,52832,52833,52840,52841,52843,52845,52852,52853,52856,52860,52868,52869,52871,52873,52880,52881,52884,52888,52896,52897,52899,52900,52901,52908,52909,52929,52964,52965,52968,52971,52972,52980,52981,52983,52984,52985,52992,52993,52996,53e3,53008,53009,53011,53013,53020,53024,53028,53036,53037,53039,53040,53041,53048,53076,53077,53080,53084,53092,53093,53095,53097,53104,53105,53108,53112,53120,53125,53132,53153,53160,53168,53188,53216,53217,53220,53224,53232,53233,53235,53237,53244,53248,53252,53265,53272,53293,53300,53301,53304,53308,55061,55062,55063,55066,55067,55069,55070,55071,55073,55074,55075,55076,55077,55078,55079,55082,55084,55086,55087,55088,55089,55090,55091,55094,55095,55097,null,null,null,null,null,null,55098,55099,55101,55102,55103,55104,55105,55106,55107,55109,55110,55112,55114,55115,55116,55117,55118,55119,55122,55123,55125,55130,55131,55132,55133,55134,null,null,null,null,null,null,55135,55138,55140,55142,55143,55144,55146,55147,55149,55150,55151,55153,55154,55155,55157,55158,55159,55160,55161,55162,55163,55166,55167,55168,55170,55171,55172,55173,55174,55175,55178,55179,53316,53317,53319,53321,53328,53332,53336,53344,53356,53357,53360,53364,53372,53373,53377,53412,53413,53416,53420,53428,53429,53431,53433,53440,53441,53444,53448,53449,53456,53457,53459,53460,53461,53468,53469,53472,53476,53484,53485,53487,53488,53489,53496,53517,53552,53553,53556,53560,53562,53568,53569,53571,53572,53573,53580,53581,53584,53588,53596,53597,53599,53601,53608,53612,53628,53636,53640,53664,53665,53668,53672,53680,53681,53683,53685,53690,53692,53696,53720,53748,53752,53767,53769,53776,53804,53805,53808,53812,53820,53821,53823,53825,53832,53852,55181,55182,55183,55185,55186,55187,55188,55189,55190,55191,55194,55196,55198,55199,55200,55201,55202,55203,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,53860,53888,53889,53892,53896,53904,53905,53909,53916,53920,53924,53932,53937,53944,53945,53948,53951,53952,53954,53960,53961,53963,53972,53976,53980,53988,53989,54e3,54001,54004,54008,54016,54017,54019,54021,54028,54029,54030,54032,54036,54038,54044,54045,54047,54048,54049,54053,54056,54057,54060,54064,54072,54073,54075,54076,54077,54084,54085,54140,54141,54144,54148,54156,54157,54159,54160,54161,54168,54169,54172,54176,54184,54185,54187,54189,54196,54200,54204,54212,54213,54216,54217,54224,54232,54241,54243,54252,54253,54256,54260,54268,54269,54271,54273,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54280,54301,54336,54340,54364,54368,54372,54381,54383,54392,54393,54396,54399,54400,54402,54408,54409,54411,54413,54420,54441,54476,54480,54484,54492,54495,54504,54508,54512,54520,54523,54525,54532,54536,54540,54548,54549,54551,54588,54589,54592,54596,54604,54605,54607,54609,54616,54617,54620,54624,54629,54632,54633,54635,54637,54644,54645,54648,54652,54660,54661,54663,54664,54665,54672,54693,54728,54729,54732,54736,54738,54744,54745,54747,54749,54756,54757,54760,54764,54772,54773,54775,54777,54784,54785,54788,54792,54800,54801,54803,54804,54805,54812,54816,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54820,54829,54840,54841,54844,54848,54853,54856,54857,54859,54861,54865,54868,54869,54872,54876,54887,54889,54896,54897,54900,54915,54917,54924,54925,54928,54932,54941,54943,54945,54952,54956,54960,54969,54971,54980,54981,54984,54988,54993,54996,54999,55001,55008,55012,55016,55024,55029,55036,55037,55040,55044,55057,55064,55065,55068,55072,55080,55081,55083,55085,55092,55093,55096,55100,55108,55111,55113,55120,55121,55124,55126,55127,55128,55129,55136,55137,55139,55141,55145,55148,55152,55156,55164,55165,55169,55176,55177,55180,55184,55192,55193,55195,55197,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20285,20339,20551,20729,21152,21487,21621,21733,22025,23233,23478,26247,26550,26551,26607,27468,29634,30146,31292,33499,33540,34903,34952,35382,36040,36303,36603,36838,39381,21051,21364,21508,24682,24932,27580,29647,33050,35258,35282,38307,20355,21002,22718,22904,23014,24178,24185,25031,25536,26438,26604,26751,28567,30286,30475,30965,31240,31487,31777,32925,33390,33393,35563,38291,20075,21917,26359,28212,30883,31469,33883,35088,34638,38824,21208,22350,22570,23884,24863,25022,25121,25954,26577,27204,28187,29976,30131,30435,30640,32058,37039,37969,37970,40853,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21283,23724,30002,32987,37440,38296,21083,22536,23004,23713,23831,24247,24378,24394,24951,27743,30074,30086,31968,32115,32177,32652,33108,33313,34193,35137,35611,37628,38477,40007,20171,20215,20491,20977,22607,24887,24894,24936,25913,27114,28433,30117,30342,30422,31623,33445,33995,63744,37799,38283,21888,23458,22353,63745,31923,32697,37301,20520,21435,23621,24040,25298,25454,25818,25831,28192,28844,31067,36317,36382,63746,36989,37445,37624,20094,20214,20581,24062,24314,24838,26967,33137,34388,36423,37749,39467,20062,20625,26480,26688,20745,21133,21138,27298,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30652,37392,40660,21163,24623,36850,20552,25001,25581,25802,26684,27268,28608,33160,35233,38548,22533,29309,29356,29956,32121,32365,32937,35211,35700,36963,40273,25225,27770,28500,32080,32570,35363,20860,24906,31645,35609,37463,37772,20140,20435,20510,20670,20742,21185,21197,21375,22384,22659,24218,24465,24950,25004,25806,25964,26223,26299,26356,26775,28039,28805,28913,29855,29861,29898,30169,30828,30956,31455,31478,32069,32147,32789,32831,33051,33686,35686,36629,36885,37857,38915,38968,39514,39912,20418,21843,22586,22865,23395,23622,24760,25106,26690,26800,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26856,28330,30028,30328,30926,31293,31995,32363,32380,35336,35489,35903,38542,40388,21476,21481,21578,21617,22266,22993,23396,23611,24235,25335,25911,25925,25970,26272,26543,27073,27837,30204,30352,30590,31295,32660,32771,32929,33167,33510,33533,33776,34241,34865,34996,35493,63747,36764,37678,38599,39015,39640,40723,21741,26011,26354,26767,31296,35895,40288,22256,22372,23825,26118,26801,26829,28414,29736,34974,39908,27752,63748,39592,20379,20844,20849,21151,23380,24037,24656,24685,25329,25511,25915,29657,31354,34467,36002,38799,20018,23521,25096,26524,29916,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31185,33747,35463,35506,36328,36942,37707,38982,24275,27112,34303,37101,63749,20896,23448,23532,24931,26874,27454,28748,29743,29912,31649,32592,33733,35264,36011,38364,39208,21038,24669,25324,36866,20362,20809,21281,22745,24291,26336,27960,28826,29378,29654,31568,33009,37979,21350,25499,32619,20054,20608,22602,22750,24618,24871,25296,27088,39745,23439,32024,32945,36703,20132,20689,21676,21932,23308,23968,24039,25898,25934,26657,27211,29409,30350,30703,32094,32761,33184,34126,34527,36611,36686,37066,39171,39509,39851,19992,20037,20061,20167,20465,20855,21246,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21312,21475,21477,21646,22036,22389,22434,23495,23943,24272,25084,25304,25937,26552,26601,27083,27472,27590,27628,27714,28317,28792,29399,29590,29699,30655,30697,31350,32127,32777,33276,33285,33290,33503,34914,35635,36092,36544,36881,37041,37476,37558,39378,39493,40169,40407,40860,22283,23616,33738,38816,38827,40628,21531,31384,32676,35033,36557,37089,22528,23624,25496,31391,23470,24339,31353,31406,33422,36524,20518,21048,21240,21367,22280,25331,25458,27402,28099,30519,21413,29527,34152,36470,38357,26426,27331,28528,35437,36556,39243,63750,26231,27512,36020,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,39740,63751,21483,22317,22862,25542,27131,29674,30789,31418,31429,31998,33909,35215,36211,36917,38312,21243,22343,30023,31584,33740,37406,63752,27224,20811,21067,21127,25119,26840,26997,38553,20677,21156,21220,25027,26020,26681,27135,29822,31563,33465,33771,35250,35641,36817,39241,63753,20170,22935,25810,26129,27278,29748,31105,31165,33449,34942,34943,35167,63754,37670,20235,21450,24613,25201,27762,32026,32102,20120,20834,30684,32943,20225,20238,20854,20864,21980,22120,22331,22522,22524,22804,22855,22931,23492,23696,23822,24049,24190,24524,25216,26071,26083,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26398,26399,26462,26827,26820,27231,27450,27683,27773,27778,28103,29592,29734,29738,29826,29859,30072,30079,30849,30959,31041,31047,31048,31098,31637,32e3,32186,32648,32774,32813,32908,35352,35663,35912,36215,37665,37668,39138,39249,39438,39439,39525,40594,32202,20342,21513,25326,26708,37329,21931,20794,63755,63756,23068,25062,63757,25295,25343,63758,63759,63760,63761,63762,63763,37027,63764,63765,63766,63767,63768,35582,63769,63770,63771,63772,26262,63773,29014,63774,63775,38627,63776,25423,25466,21335,63777,26511,26976,28275,63778,30007,63779,63780,63781,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32013,63782,63783,34930,22218,23064,63784,63785,63786,63787,63788,20035,63789,20839,22856,26608,32784,63790,22899,24180,25754,31178,24565,24684,25288,25467,23527,23511,21162,63791,22900,24361,24594,63792,63793,63794,29785,63795,63796,63797,63798,63799,63800,39377,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,28611,63812,63813,33215,36786,24817,63814,63815,33126,63816,63817,23615,63818,63819,63820,63821,63822,63823,63824,63825,23273,35365,26491,32016,63826,63827,63828,63829,63830,63831,33021,63832,63833,23612,27877,21311,28346,22810,33590,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20025,20150,20294,21934,22296,22727,24406,26039,26086,27264,27573,28237,30701,31471,31774,32222,34507,34962,37170,37723,25787,28606,29562,30136,36948,21846,22349,25018,25812,26311,28129,28251,28525,28601,30192,32835,33213,34113,35203,35527,35674,37663,27795,30035,31572,36367,36957,21776,22530,22616,24162,25095,25758,26848,30070,31958,34739,40680,20195,22408,22382,22823,23565,23729,24118,24453,25140,25825,29619,33274,34955,36024,38538,40667,23429,24503,24755,20498,20992,21040,22294,22581,22615,23566,23648,23798,23947,24230,24466,24764,25361,25481,25623,26691,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26873,27330,28120,28193,28372,28644,29182,30428,30585,31153,31291,33796,35241,36077,36339,36424,36867,36884,36947,37117,37709,38518,38876,27602,28678,29272,29346,29544,30563,31167,31716,32411,35712,22697,24775,25958,26109,26302,27788,28958,29129,35930,38931,20077,31361,20189,20908,20941,21205,21516,24999,26481,26704,26847,27934,28540,30140,30643,31461,33012,33891,37509,20828,26007,26460,26515,30168,31431,33651,63834,35910,36887,38957,23663,33216,33434,36929,36975,37389,24471,23965,27225,29128,30331,31561,34276,35588,37159,39472,21895,25078,63835,30313,32645,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34367,34746,35064,37007,63836,27931,28889,29662,32097,33853,63837,37226,39409,63838,20098,21365,27396,27410,28734,29211,34349,40478,21068,36771,23888,25829,25900,27414,28651,31811,32412,34253,35172,35261,25289,33240,34847,24266,26391,28010,29436,29701,29807,34690,37086,20358,23821,24480,33802,20919,25504,30053,20142,20486,20841,20937,26753,27153,31918,31921,31975,33391,35538,36635,37327,20406,20791,21237,21570,24300,24942,25150,26053,27354,28670,31018,34268,34851,38317,39522,39530,40599,40654,21147,26310,27511,28701,31019,36706,38722,24976,25088,25891,28451,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29001,29833,32244,32879,34030,36646,36899,37706,20925,21015,21155,27916,28872,35010,24265,25986,27566,28610,31806,29557,20196,20278,22265,63839,23738,23994,24604,29618,31533,32666,32718,32838,36894,37428,38646,38728,38936,40801,20363,28583,31150,37300,38583,21214,63840,25736,25796,27347,28510,28696,29200,30439,32769,34310,34396,36335,36613,38706,39791,40442,40565,30860,31103,32160,33737,37636,40575,40595,35542,22751,24324,26407,28711,29903,31840,32894,20769,28712,29282,30922,36034,36058,36084,38647,20102,20698,23534,24278,26009,29134,30274,30637,32842,34044,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36988,39719,40845,22744,23105,23650,27155,28122,28431,30267,32047,32311,34078,35128,37860,38475,21129,26066,26611,27060,27969,28316,28687,29705,29792,30041,30244,30827,35628,39006,20845,25134,38520,20374,20523,23833,28138,32184,36650,24459,24900,26647,63841,38534,21202,32907,20956,20940,26974,31260,32190,33777,38517,20442,21033,21400,21519,21774,23653,24743,26446,26792,28012,29313,29432,29702,29827,63842,30178,31852,32633,32696,33673,35023,35041,37324,37328,38626,39881,21533,28542,29136,29848,34298,36522,38563,40023,40607,26519,28107,29747,33256,38678,30764,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31435,31520,31890,25705,29802,30194,30908,30952,39340,39764,40635,23518,24149,28448,33180,33707,37e3,19975,21325,23081,24018,24398,24930,25405,26217,26364,28415,28459,28771,30622,33836,34067,34875,36627,39237,39995,21788,25273,26411,27819,33545,35178,38778,20129,22916,24536,24537,26395,32178,32596,33426,33579,33725,36638,37017,22475,22969,23186,23504,26151,26522,26757,27599,29028,32629,36023,36067,36993,39749,33032,35978,38476,39488,40613,23391,27667,29467,30450,30431,33804,20906,35219,20813,20885,21193,26825,27796,30468,30496,32191,32236,38754,40629,28357,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34065,20901,21517,21629,26126,26269,26919,28319,30399,30609,33559,33986,34719,37225,37528,40180,34946,20398,20882,21215,22982,24125,24917,25720,25721,26286,26576,27169,27597,27611,29279,29281,29761,30520,30683,32791,33468,33541,35584,35624,35980,26408,27792,29287,30446,30566,31302,40361,27519,27794,22818,26406,33945,21359,22675,22937,24287,25551,26164,26483,28218,29483,31447,33495,37672,21209,24043,25006,25035,25098,25287,25771,26080,26969,27494,27595,28961,29687,30045,32326,33310,33538,34154,35491,36031,38695,40289,22696,40664,20497,21006,21563,21839,25991,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27766,32010,32011,32862,34442,38272,38639,21247,27797,29289,21619,23194,23614,23883,24396,24494,26410,26806,26979,28220,28228,30473,31859,32654,34183,35598,36855,38753,40692,23735,24758,24845,25003,25935,26107,26108,27665,27887,29599,29641,32225,38292,23494,34588,35600,21085,21338,25293,25615,25778,26420,27192,27850,29632,29854,31636,31893,32283,33162,33334,34180,36843,38649,39361,20276,21322,21453,21467,25292,25644,25856,26001,27075,27886,28504,29677,30036,30242,30436,30460,30928,30971,31020,32070,33324,34784,36820,38930,39151,21187,25300,25765,28196,28497,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30332,36299,37297,37474,39662,39747,20515,20621,22346,22952,23592,24135,24439,25151,25918,26041,26049,26121,26507,27036,28354,30917,32033,32938,33152,33323,33459,33953,34444,35370,35607,37030,38450,40848,20493,20467,63843,22521,24472,25308,25490,26479,28227,28953,30403,32972,32986,35060,35061,35097,36064,36649,37197,38506,20271,20336,24091,26575,26658,30333,30334,39748,24161,27146,29033,29140,30058,63844,32321,34115,34281,39132,20240,31567,32624,38309,20961,24070,26805,27710,27726,27867,29359,31684,33539,27861,29754,20731,21128,22721,25816,27287,29863,30294,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30887,34327,38370,38713,63845,21342,24321,35722,36776,36783,37002,21029,30629,40009,40712,19993,20482,20853,23643,24183,26142,26170,26564,26821,28851,29953,30149,31177,31453,36647,39200,39432,20445,22561,22577,23542,26222,27493,27921,28282,28541,29668,29995,33769,35036,35091,35676,36628,20239,20693,21264,21340,23443,24489,26381,31119,33145,33583,34068,35079,35206,36665,36667,39333,39954,26412,20086,20472,22857,23553,23791,23792,25447,26834,28925,29090,29739,32299,34028,34562,36898,37586,40179,19981,20184,20463,20613,21078,21103,21542,21648,22496,22827,23142,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23386,23413,23500,24220,63846,25206,25975,26023,28014,28325,29238,31526,31807,32566,33104,33105,33178,33344,33433,33705,35331,36e3,36070,36091,36212,36282,37096,37340,38428,38468,39385,40167,21271,20998,21545,22132,22707,22868,22894,24575,24996,25198,26128,27774,28954,30406,31881,31966,32027,33452,36033,38640,63847,20315,24343,24447,25282,23849,26379,26842,30844,32323,40300,19989,20633,21269,21290,21329,22915,23138,24199,24754,24970,25161,25209,26e3,26503,27047,27604,27606,27607,27608,27832,63848,29749,30202,30738,30865,31189,31192,31875,32203,32737,32933,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,33086,33218,33778,34586,35048,35513,35692,36027,37145,38750,39131,40763,22188,23338,24428,25996,27315,27567,27996,28657,28693,29277,29613,36007,36051,38971,24977,27703,32856,39425,20045,20107,20123,20181,20282,20284,20351,20447,20735,21490,21496,21766,21987,22235,22763,22882,23057,23531,23546,23556,24051,24107,24473,24605,25448,26012,26031,26614,26619,26797,27515,27801,27863,28195,28681,29509,30722,31038,31040,31072,31169,31721,32023,32114,32902,33293,33678,34001,34503,35039,35408,35422,35613,36060,36198,36781,37034,39164,39391,40605,21066,63849,26388,63850,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20632,21034,23665,25955,27733,29642,29987,30109,31639,33948,37240,38704,20087,25746,27578,29022,34217,19977,63851,26441,26862,28183,33439,34072,34923,25591,28545,37394,39087,19978,20663,20687,20767,21830,21930,22039,23360,23577,23776,24120,24202,24224,24258,24819,26705,27233,28248,29245,29248,29376,30456,31077,31665,32724,35059,35316,35443,35937,36062,38684,22622,29885,36093,21959,63852,31329,32034,33394,29298,29983,29989,63853,31513,22661,22779,23996,24207,24246,24464,24661,25234,25471,25933,26257,26329,26360,26646,26866,29312,29790,31598,32110,32214,32626,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32997,33298,34223,35199,35475,36893,37604,40653,40736,22805,22893,24109,24796,26132,26227,26512,27728,28101,28511,30707,30889,33990,37323,37675,20185,20682,20808,21892,23307,23459,25159,25982,26059,28210,29053,29697,29764,29831,29887,30316,31146,32218,32341,32680,33146,33203,33337,34330,34796,35445,36323,36984,37521,37925,39245,39854,21352,23633,26964,27844,27945,28203,33292,34203,35131,35373,35498,38634,40807,21089,26297,27570,32406,34814,36109,38275,38493,25885,28041,29166,63854,22478,22995,23468,24615,24826,25104,26143,26207,29481,29689,30427,30465,31596,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32854,32882,33125,35488,37266,19990,21218,27506,27927,31237,31545,32048,63855,36016,21484,22063,22609,23477,23567,23569,24034,25152,25475,25620,26157,26803,27836,28040,28335,28703,28836,29138,29990,30095,30094,30233,31505,31712,31787,32032,32057,34092,34157,34311,35380,36877,36961,37045,37559,38902,39479,20439,23660,26463,28049,31903,32396,35606,36118,36895,23403,24061,25613,33984,36956,39137,29575,23435,24730,26494,28126,35359,35494,36865,38924,21047,63856,28753,30862,37782,34928,37335,20462,21463,22013,22234,22402,22781,23234,23432,23723,23744,24101,24833,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,25101,25163,25480,25628,25910,25976,27193,27530,27700,27929,28465,29159,29417,29560,29703,29874,30246,30561,31168,31319,31466,31929,32143,32172,32353,32670,33065,33585,33936,34010,34282,34966,35504,35728,36664,36930,36995,37228,37526,37561,38539,38567,38568,38614,38656,38920,39318,39635,39706,21460,22654,22809,23408,23487,28113,28506,29087,29729,29881,32901,33789,24033,24455,24490,24642,26092,26642,26991,27219,27529,27957,28147,29667,30462,30636,31565,32020,33059,33308,33600,34036,34147,35426,35524,37255,37662,38918,39348,25100,34899,36848,37477,23815,23847,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23913,29791,33181,34664,28629,25342,32722,35126,35186,19998,20056,20711,21213,21319,25215,26119,32361,34821,38494,20365,21273,22070,22987,23204,23608,23630,23629,24066,24337,24643,26045,26159,26178,26558,26612,29468,30690,31034,32709,33940,33997,35222,35430,35433,35553,35925,35962,22516,23508,24335,24687,25325,26893,27542,28252,29060,31698,34645,35672,36606,39135,39166,20280,20353,20449,21627,23072,23480,24892,26032,26216,29180,30003,31070,32051,33102,33251,33688,34218,34254,34563,35338,36523,36763,63857,36805,22833,23460,23526,24713,23529,23563,24515,27777,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63858,28145,28683,29978,33455,35574,20160,21313,63859,38617,27663,20126,20420,20818,21854,23077,23784,25105,29273,33469,33706,34558,34905,35357,38463,38597,39187,40201,40285,22538,23731,23997,24132,24801,24853,25569,27138,28197,37122,37716,38990,39952,40823,23433,23736,25353,26191,26696,30524,38593,38797,38996,39839,26017,35585,36555,38332,21813,23721,24022,24245,26263,30284,33780,38343,22739,25276,29390,40232,20208,22830,24591,26171,27523,31207,40230,21395,21696,22467,23830,24859,26326,28079,30861,33406,38552,38724,21380,25212,25494,28082,32266,33099,38989,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27387,32588,40367,40474,20063,20539,20918,22812,24825,25590,26928,29242,32822,63860,37326,24369,63861,63862,32004,33509,33903,33979,34277,36493,63863,20335,63864,63865,22756,23363,24665,25562,25880,25965,26264,63866,26954,27171,27915,28673,29036,30162,30221,31155,31344,63867,32650,63868,35140,63869,35731,37312,38525,63870,39178,22276,24481,26044,28417,30208,31142,35486,39341,39770,40812,20740,25014,25233,27277,33222,20547,22576,24422,28937,35328,35578,23420,34326,20474,20796,22196,22852,25513,28153,23978,26989,20870,20104,20313,63871,63872,63873,22914,63874,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63875,27487,27741,63876,29877,30998,63877,33287,33349,33593,36671,36701,63878,39192,63879,63880,63881,20134,63882,22495,24441,26131,63883,63884,30123,32377,35695,63885,36870,39515,22181,22567,23032,23071,23476,63886,24310,63887,63888,25424,25403,63889,26941,27783,27839,28046,28051,28149,28436,63890,28895,28982,29017,63891,29123,29141,63892,30799,30831,63893,31605,32227,63894,32303,63895,34893,36575,63896,63897,63898,37467,63899,40182,63900,63901,63902,24709,28037,63903,29105,63904,63905,38321,21421,63906,63907,63908,26579,63909,28814,28976,29744,33398,33490,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63910,38331,39653,40573,26308,63911,29121,33865,63912,63913,22603,63914,63915,23992,24433,63916,26144,26254,27001,27054,27704,27891,28214,28481,28634,28699,28719,29008,29151,29552,63917,29787,63918,29908,30408,31310,32403,63919,63920,33521,35424,36814,63921,37704,63922,38681,63923,63924,20034,20522,63925,21e3,21473,26355,27757,28618,29450,30591,31330,33454,34269,34306,63926,35028,35427,35709,35947,63927,37555,63928,38675,38928,20116,20237,20425,20658,21320,21566,21555,21978,22626,22714,22887,23067,23524,24735,63929,25034,25942,26111,26212,26791,27738,28595,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28879,29100,29522,31613,34568,35492,39986,40711,23627,27779,29508,29577,37434,28331,29797,30239,31337,32277,34314,20800,22725,25793,29934,29973,30320,32705,37013,38605,39252,28198,29926,31401,31402,33253,34521,34680,35355,23113,23436,23451,26785,26880,28003,29609,29715,29740,30871,32233,32747,33048,33109,33694,35916,38446,38929,26352,24448,26106,26505,27754,29579,20525,23043,27498,30702,22806,23916,24013,29477,30031,63930,63931,20709,20985,22575,22829,22934,23002,23525,63932,63933,23970,25303,25622,25747,25854,63934,26332,63935,27208,63936,29183,29796,63937,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31368,31407,32327,32350,32768,33136,63938,34799,35201,35616,36953,63939,36992,39250,24958,27442,28020,32287,35109,36785,20433,20653,20887,21191,22471,22665,23481,24248,24898,27029,28044,28263,28342,29076,29794,29992,29996,32883,33592,33993,36362,37780,37854,63940,20110,20305,20598,20778,21448,21451,21491,23431,23507,23588,24858,24962,26100,29275,29591,29760,30402,31056,31121,31161,32006,32701,33419,34261,34398,36802,36935,37109,37354,38533,38632,38633,21206,24423,26093,26161,26671,29020,31286,37057,38922,20113,63941,27218,27550,28560,29065,32792,33464,34131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36939,38549,38642,38907,34074,39729,20112,29066,38596,20803,21407,21729,22291,22290,22435,23195,23236,23491,24616,24895,25588,27781,27961,28274,28304,29232,29503,29783,33489,34945,36677,36960,63942,38498,39e3,40219,26376,36234,37470,20301,20553,20702,21361,22285,22996,23041,23561,24944,26256,28205,29234,29771,32239,32963,33806,33894,34111,34655,34907,35096,35586,36949,38859,39759,20083,20369,20754,20842,63943,21807,21929,23418,23461,24188,24189,24254,24736,24799,24840,24841,25540,25912,26377,63944,26580,26586,63945,26977,26978,27833,27943,63946,28216,63947,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28641,29494,29495,63948,29788,30001,63949,30290,63950,63951,32173,33278,33848,35029,35480,35547,35565,36400,36418,36938,36926,36986,37193,37321,37742,63952,63953,22537,63954,27603,32905,32946,63955,63956,20801,22891,23609,63957,63958,28516,29607,32996,36103,63959,37399,38287,63960,63961,63962,63963,32895,25102,28700,32104,34701,63964,22432,24681,24903,27575,35518,37504,38577,20057,21535,28139,34093,38512,38899,39150,25558,27875,37009,20957,25033,33210,40441,20381,20506,20736,23452,24847,25087,25836,26885,27589,30097,30691,32681,33380,34191,34811,34915,35516,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,35696,37291,20108,20197,20234,63965,63966,22839,23016,63967,24050,24347,24411,24609,63968,63969,63970,63971,29246,29669,63972,30064,30157,63973,31227,63974,32780,32819,32900,33505,33617,63975,63976,36029,36019,36999,63977,63978,39156,39180,63979,63980,28727,30410,32714,32716,32764,35610,20154,20161,20995,21360,63981,21693,22240,23035,23493,24341,24525,28270,63982,63983,32106,33589,63984,34451,35469,63985,38765,38775,63986,63987,19968,20314,20350,22777,26085,28322,36920,37808,39353,20219,22764,22922,23001,24641,63988,63989,31252,63990,33615,36035,20837,21316,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63991,63992,63993,20173,21097,23381,33471,20180,21050,21672,22985,23039,23376,23383,23388,24675,24904,28363,28825,29038,29574,29943,30133,30913,32043,32773,33258,33576,34071,34249,35566,36039,38604,20316,21242,22204,26027,26152,28796,28856,29237,32189,33421,37196,38592,40306,23409,26855,27544,28538,30430,23697,26283,28507,31668,31786,34870,38620,19976,20183,21280,22580,22715,22767,22892,23559,24115,24196,24373,25484,26290,26454,27167,27299,27404,28479,29254,63994,29520,29835,31456,31911,33144,33247,33255,33674,33900,34083,34196,34255,35037,36115,37292,38263,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38556,20877,21705,22312,23472,25165,26448,26685,26771,28221,28371,28797,32289,35009,36001,36617,40779,40782,29229,31631,35533,37658,20295,20302,20786,21632,22992,24213,25269,26485,26990,27159,27822,28186,29401,29482,30141,31672,32053,33511,33785,33879,34295,35419,36015,36487,36889,37048,38606,40799,21219,21514,23265,23490,25688,25973,28404,29380,63995,30340,31309,31515,31821,32318,32735,33659,35627,36042,36196,36321,36447,36842,36857,36969,37841,20291,20346,20659,20840,20856,21069,21098,22625,22652,22880,23560,23637,24283,24731,25136,26643,27583,27656,28593,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29006,29728,3e4,30008,30033,30322,31564,31627,31661,31686,32399,35438,36670,36681,37439,37523,37666,37931,38651,39002,39019,39198,20999,25130,25240,27993,30308,31434,31680,32118,21344,23742,24215,28472,28857,31896,38673,39822,40670,25509,25722,34678,19969,20117,20141,20572,20597,21576,22979,23450,24128,24237,24311,24449,24773,25402,25919,25972,26060,26230,26232,26622,26984,27273,27491,27712,28096,28136,28191,28254,28702,28833,29582,29693,30010,30555,30855,31118,31243,31357,31934,32142,33351,35330,35562,35998,37165,37194,37336,37478,37580,37664,38662,38742,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38748,38914,40718,21046,21137,21884,22564,24093,24351,24716,25552,26799,28639,31085,31532,33229,34234,35069,35576,36420,37261,38500,38555,38717,38988,40778,20430,20806,20939,21161,22066,24340,24427,25514,25805,26089,26177,26362,26361,26397,26781,26839,27133,28437,28526,29031,29157,29226,29866,30522,31062,31066,31199,31264,31381,31895,31967,32068,32368,32903,34299,34468,35412,35519,36249,36481,36896,36973,37347,38459,38613,40165,26063,31751,36275,37827,23384,23562,21330,25305,29469,20519,23447,24478,24752,24939,26837,28121,29742,31278,32066,32156,32305,33131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36394,36405,37758,37912,20304,22352,24038,24231,25387,32618,20027,20303,20367,20570,23005,32964,21610,21608,22014,22863,23449,24030,24282,26205,26417,26609,26666,27880,27954,28234,28557,28855,29664,30087,31820,32002,32044,32162,33311,34523,35387,35461,36208,36490,36659,36913,37198,37202,37956,39376,31481,31909,20426,20737,20934,22472,23535,23803,26201,27197,27994,28310,28652,28940,30063,31459,34850,36897,36981,38603,39423,33537,20013,20210,34886,37325,21373,27355,26987,27713,33914,22686,24974,26366,25327,28893,29969,30151,32338,33976,35657,36104,20043,21482,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21675,22320,22336,24535,25345,25351,25711,25903,26088,26234,26525,26547,27490,27744,27802,28460,30693,30757,31049,31063,32025,32930,33026,33267,33437,33463,34584,35468,63996,36100,36286,36978,30452,31257,31287,32340,32887,21767,21972,22645,25391,25634,26185,26187,26733,27035,27524,27941,28337,29645,29800,29857,30043,30137,30433,30494,30603,31206,32265,32285,33275,34095,34967,35386,36049,36587,36784,36914,37805,38499,38515,38663,20356,21489,23018,23241,24089,26702,29894,30142,31209,31378,33187,34541,36074,36300,36845,26015,26389,63997,22519,28503,32221,36655,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37878,38598,24501,25074,28548,19988,20376,20511,21449,21983,23919,24046,27425,27492,30923,31642,63998,36425,36554,36974,25417,25662,30528,31364,37679,38015,40810,25776,28591,29158,29864,29914,31428,31762,32386,31922,32408,35738,36106,38013,39184,39244,21049,23519,25830,26413,32046,20717,21443,22649,24920,24921,25082,26028,31449,35730,35734,20489,20513,21109,21809,23100,24288,24432,24884,25950,26124,26166,26274,27085,28356,28466,29462,30241,31379,33081,33369,33750,33980,20661,22512,23488,23528,24425,25505,30758,32181,33756,34081,37319,37365,20874,26613,31574,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36012,20932,22971,24765,34389,20508,63999,21076,23610,24957,25114,25299,25842,26021,28364,30240,33034,36448,38495,38587,20191,21315,21912,22825,24029,25797,27849,28154,29588,31359,33307,34214,36068,36368,36983,37351,38369,38433,38854,20984,21746,21894,24505,25764,28552,32180,36639,36685,37941,20681,23574,27838,28155,29979,30651,31805,31844,35449,35522,22558,22974,24086,25463,29266,30090,30571,35548,36028,36626,24307,26228,28152,32893,33729,35531,38737,39894,64e3,21059,26367,28053,28399,32224,35558,36910,36958,39636,21021,21119,21736,24980,25220,25307,26786,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26898,26970,27189,28818,28966,30813,30977,30990,31186,31245,32918,33400,33493,33609,34121,35970,36229,37218,37259,37294,20419,22225,29165,30679,34560,35320,23544,24534,26449,37032,21474,22618,23541,24740,24961,25696,32317,32880,34085,37507,25774,20652,23828,26368,22684,25277,25512,26894,27e3,27166,28267,30394,31179,33467,33833,35535,36264,36861,37138,37195,37276,37648,37656,37786,38619,39478,39949,19985,30044,31069,31482,31569,31689,32302,33988,36441,36468,36600,36880,26149,26943,29763,20986,26414,40668,20805,24544,27798,34802,34909,34935,24756,33205,33795,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36101,21462,21561,22068,23094,23601,28810,32736,32858,33030,33261,36259,37257,39519,40434,20596,20164,21408,24827,28204,23652,20360,20516,21988,23769,24159,24677,26772,27835,28100,29118,30164,30196,30305,31258,31305,32199,32251,32622,33268,34473,36636,38601,39347,40786,21063,21189,39149,35242,19971,26578,28422,20405,23522,26517,27784,28024,29723,30759,37341,37756,34756,31204,31281,24555,20182,21668,21822,22702,22949,24816,25171,25302,26422,26965,33333,38464,39345,39389,20524,21331,21828,22396,64001,25176,64002,25826,26219,26589,28609,28655,29730,29752,35351,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37944,21585,22022,22374,24392,24986,27470,28760,28845,32187,35477,22890,33067,25506,30472,32829,36010,22612,25645,27067,23445,24081,28271,64003,34153,20812,21488,22826,24608,24907,27526,27760,27888,31518,32974,33492,36294,37040,39089,64004,25799,28580,25745,25860,20814,21520,22303,35342,24927,26742,64005,30171,31570,32113,36890,22534,27084,33151,35114,36864,38969,20600,22871,22956,25237,36879,39722,24925,29305,38358,22369,23110,24052,25226,25773,25850,26487,27874,27966,29228,29750,30772,32631,33453,36315,38935,21028,22338,26495,29256,29923,36009,36774,37393,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38442,20843,21485,25420,20329,21764,24726,25943,27803,28031,29260,29437,31255,35207,35997,24429,28558,28921,33192,24846,20415,20559,25153,29255,31687,32232,32745,36941,38829,39449,36022,22378,24179,26544,33805,35413,21536,23318,24163,24290,24330,25987,32954,34109,38281,38491,20296,21253,21261,21263,21638,21754,22275,24067,24598,25243,25265,25429,64006,27873,28006,30129,30770,32990,33071,33502,33889,33970,34957,35090,36875,37610,39165,39825,24133,26292,26333,28689,29190,64007,20469,21117,24426,24915,26451,27161,28418,29922,31080,34920,35961,39111,39108,39491,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21697,31263,26963,35575,35914,39080,39342,24444,25259,30130,30382,34987,36991,38466,21305,24380,24517,27852,29644,30050,30091,31558,33534,39325,20047,36924,19979,20309,21414,22799,24264,26160,27827,29781,33655,34662,36032,36944,38686,39957,22737,23416,34384,35604,40372,23506,24680,24717,26097,27735,28450,28579,28698,32597,32752,38289,38290,38480,38867,21106,36676,20989,21547,21688,21859,21898,27323,28085,32216,33382,37532,38519,40569,21512,21704,30418,34532,38308,38356,38492,20130,20233,23022,23270,24055,24658,25239,26477,26689,27782,28207,32568,32923,33322,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,64008,64009,38917,20133,20565,21683,22419,22874,23401,23475,25032,26999,28023,28707,34809,35299,35442,35559,36994,39405,39608,21182,26680,20502,24184,26447,33607,34892,20139,21521,22190,29670,37141,38911,39177,39255,39321,22099,22687,34395,35377,25010,27382,29563,36562,27463,38570,39511,22869,29184,36203,38761,20436,23796,24358,25080,26203,27883,28843,29572,29625,29694,30505,30541,32067,32098,32291,33335,34898,64010,36066,37449,39023,23377,31348,34880,38913,23244,20448,21332,22846,23805,25406,28025,29433,33029,33031,33698,37583,38960,20136,20804,21009,22411,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24418,27842,28366,28677,28752,28847,29074,29673,29801,33610,34722,34913,36872,37026,37795,39336,20846,24407,24800,24935,26291,34137,36426,37295,38795,20046,20114,21628,22741,22778,22909,23733,24359,25142,25160,26122,26215,27627,28009,28111,28246,28408,28564,28640,28649,28765,29392,29733,29786,29920,30355,31068,31946,32286,32993,33446,33899,33983,34382,34399,34676,35703,35946,37804,38912,39013,24785,25110,37239,23130,26127,28151,28222,29759,39746,24573,24794,31503,21700,24344,27742,27859,27946,28888,32005,34425,35340,40251,21270,21644,23301,27194,28779,30069,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31117,31166,33457,33775,35441,35649,36008,38772,64011,25844,25899,30906,30907,31339,20024,21914,22864,23462,24187,24739,25563,27489,26213,26707,28185,29029,29872,32008,36996,39529,39973,27963,28369,29502,35905,38346,20976,24140,24488,24653,24822,24880,24908,26179,26180,27045,27841,28255,28361,28514,29004,29852,30343,31681,31783,33618,34647,36945,38541,40643,21295,22238,24315,24458,24674,24724,25079,26214,26371,27292,28142,28590,28784,29546,32362,33214,33588,34516,35496,36036,21123,29554,23446,27243,37892,21742,22150,23389,25928,25989,26313,26783,28045,28102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29243,32948,37237,39501,20399,20505,21402,21518,21564,21897,21957,24127,24460,26429,29030,29661,36869,21211,21235,22628,22734,28932,29071,29179,34224,35347,26248,34216,21927,26244,29002,33841,21321,21913,27585,24409,24509,25582,26249,28999,35569,36637,40638,20241,25658,28875,30054,34407,24676,35662,40440,20807,20982,21256,27958,33016,40657,26133,27427,28824,30165,21507,23673,32007,35350,27424,27453,27462,21560,24688,27965,32725,33288,20694,20958,21916,22123,22221,23020,23305,24076,24985,24984,25137,26206,26342,29081,29113,29114,29351,31143,31232,32690,35440,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],gb18030:[19970,19972,19973,19974,19983,19986,19991,19999,2e4,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,20515,20516,20519,20523,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20539,20541,20543,20544,20545,20546,20548,20549,20550,20553,20554,20555,20557,20560,20561,20562,20563,20564,20566,20567,20568,20569,20571,20573,20574,20575,20576,20577,20578,20579,20580,20582,20583,20584,20585,20586,20587,20589,20590,20591,20592,20593,20594,20595,20596,20597,20600,20601,20602,20604,20605,20609,20610,20611,20612,20614,20615,20617,20618,20619,20620,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20644,20646,20650,20651,20653,20654,20655,20656,20657,20659,20660,20661,20662,20663,20664,20665,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20688,20689,20690,20691,20692,20693,20695,20696,20697,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20712,20713,20714,20715,20719,20720,20721,20722,20724,20726,20727,20728,20729,20730,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20744,20745,20746,20748,20749,20750,20751,20752,20753,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20802,20807,20810,20812,20814,20815,20816,20818,20819,20823,20824,20825,20827,20829,20830,20831,20832,20833,20835,20836,20838,20839,20841,20842,20847,20850,20858,20862,20863,20867,20868,20870,20871,20874,20875,20878,20879,20880,20881,20883,20884,20888,20890,20893,20894,20895,20897,20899,20902,20903,20904,20905,20906,20909,20910,20916,20920,20921,20922,20926,20927,20929,20930,20931,20933,20936,20938,20941,20942,20944,20946,20947,20948,20949,20950,20951,20952,20953,20954,20956,20958,20959,20962,20963,20965,20966,20967,20968,20969,20970,20972,20974,20977,20978,20980,20983,20990,20996,20997,21001,21003,21004,21007,21008,21011,21012,21013,21020,21022,21023,21025,21026,21027,21029,21030,21031,21034,21036,21039,21041,21042,21044,21045,21052,21054,21060,21061,21062,21063,21064,21065,21067,21070,21071,21074,21075,21077,21079,21080,21081,21082,21083,21085,21087,21088,21090,21091,21092,21094,21096,21099,21100,21101,21102,21104,21105,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21118,21120,21123,21124,21125,21126,21127,21129,21130,21131,21132,21133,21134,21135,21137,21138,21140,21141,21142,21143,21144,21145,21146,21148,21156,21157,21158,21159,21166,21167,21168,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21184,21185,21186,21188,21189,21190,21192,21194,21196,21197,21198,21199,21201,21203,21204,21205,21207,21209,21210,21211,21212,21213,21214,21216,21217,21218,21219,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21233,21234,21235,21236,21237,21238,21239,21240,21243,21244,21245,21249,21250,21251,21252,21255,21257,21258,21259,21260,21262,21265,21266,21267,21268,21272,21275,21276,21278,21279,21282,21284,21285,21287,21288,21289,21291,21292,21293,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21308,21309,21312,21314,21316,21318,21323,21324,21325,21328,21332,21336,21337,21339,21341,21349,21352,21354,21356,21357,21362,21366,21369,21371,21372,21373,21374,21376,21377,21379,21383,21384,21386,21390,21391,21392,21393,21394,21395,21396,21398,21399,21401,21403,21404,21406,21408,21409,21412,21415,21418,21419,21420,21421,21423,21424,21425,21426,21427,21428,21429,21431,21432,21433,21434,21436,21437,21438,21440,21443,21444,21445,21446,21447,21454,21455,21456,21458,21459,21461,21466,21468,21469,21470,21473,21474,21479,21492,21498,21502,21503,21504,21506,21509,21511,21515,21524,21528,21529,21530,21532,21538,21540,21541,21546,21552,21555,21558,21559,21562,21565,21567,21569,21570,21572,21573,21575,21577,21580,21581,21582,21583,21585,21594,21597,21598,21599,21600,21601,21603,21605,21607,21609,21610,21611,21612,21613,21614,21615,21616,21620,21625,21626,21630,21631,21633,21635,21637,21639,21640,21641,21642,21645,21649,21651,21655,21656,21660,21662,21663,21664,21665,21666,21669,21678,21680,21682,21685,21686,21687,21689,21690,21692,21694,21699,21701,21706,21707,21718,21720,21723,21728,21729,21730,21731,21732,21739,21740,21743,21744,21745,21748,21749,21750,21751,21752,21753,21755,21758,21760,21762,21763,21764,21765,21768,21770,21771,21772,21773,21774,21778,21779,21781,21782,21783,21784,21785,21786,21788,21789,21790,21791,21793,21797,21798,21800,21801,21803,21805,21810,21812,21813,21814,21816,21817,21818,21819,21821,21824,21826,21829,21831,21832,21835,21836,21837,21838,21839,21841,21842,21843,21844,21847,21848,21849,21850,21851,21853,21854,21855,21856,21858,21859,21864,21865,21867,21871,21872,21873,21874,21875,21876,21881,21882,21885,21887,21893,21894,21900,21901,21902,21904,21906,21907,21909,21910,21911,21914,21915,21918,21920,21921,21922,21923,21924,21925,21926,21928,21929,21930,21931,21932,21933,21934,21935,21936,21938,21940,21942,21944,21946,21948,21951,21952,21953,21954,21955,21958,21959,21960,21962,21963,21966,21967,21968,21973,21975,21976,21977,21978,21979,21982,21984,21986,21991,21993,21997,21998,22e3,22001,22004,22006,22008,22009,22010,22011,22012,22015,22018,22019,22020,22021,22022,22023,22026,22027,22029,22032,22033,22034,22035,22036,22037,22038,22039,22041,22042,22044,22045,22048,22049,22050,22053,22054,22056,22057,22058,22059,22062,22063,22064,22067,22069,22071,22072,22074,22076,22077,22078,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22095,22096,22097,22098,22099,22101,22102,22106,22107,22109,22110,22111,22112,22113,22115,22117,22118,22119,22125,22126,22127,22128,22130,22131,22132,22133,22135,22136,22137,22138,22141,22142,22143,22144,22145,22146,22147,22148,22151,22152,22153,22154,22155,22156,22157,22160,22161,22162,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22192,22193,22194,22195,22196,22197,22198,22200,22201,22202,22203,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22219,22220,22221,22222,22223,22224,22225,22226,22227,22229,22230,22232,22233,22236,22243,22245,22246,22247,22248,22249,22250,22252,22254,22255,22258,22259,22262,22263,22264,22267,22268,22272,22273,22274,22277,22279,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22301,22302,22304,22305,22306,22308,22309,22310,22311,22315,22321,22322,22324,22325,22326,22327,22328,22332,22333,22335,22337,22339,22340,22341,22342,22344,22345,22347,22354,22355,22356,22357,22358,22360,22361,22370,22371,22373,22375,22380,22382,22384,22385,22386,22388,22389,22392,22393,22394,22397,22398,22399,22400,22401,22407,22408,22409,22410,22413,22414,22415,22416,22417,22420,22421,22422,22423,22424,22425,22426,22428,22429,22430,22431,22437,22440,22442,22444,22447,22448,22449,22451,22453,22454,22455,22457,22458,22459,22460,22461,22462,22463,22464,22465,22468,22469,22470,22471,22472,22473,22474,22476,22477,22480,22481,22483,22486,22487,22491,22492,22494,22497,22498,22499,22501,22502,22503,22504,22505,22506,22507,22508,22510,22512,22513,22514,22515,22517,22518,22519,22523,22524,22526,22527,22529,22531,22532,22533,22536,22537,22538,22540,22542,22543,22544,22546,22547,22548,22550,22551,22552,22554,22555,22556,22557,22559,22562,22563,22565,22566,22567,22568,22569,22571,22572,22573,22574,22575,22577,22578,22579,22580,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22597,22598,22599,22600,22601,22602,22603,22606,22607,22608,22610,22611,22613,22614,22615,22617,22618,22619,22620,22621,22623,22624,22625,22626,22627,22628,22630,22631,22632,22633,22634,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22655,22658,22660,22662,22663,22664,22666,22667,22668,22669,22670,22671,22672,22673,22676,22677,22678,22679,22680,22683,22684,22685,22688,22689,22690,22691,22692,22693,22694,22695,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22717,22718,22719,22720,22722,22723,22724,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22738,22739,22740,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22757,22758,22759,22760,22761,22762,22765,22767,22769,22770,22772,22773,22775,22776,22778,22779,22780,22781,22782,22783,22784,22785,22787,22789,22790,22792,22793,22794,22795,22796,22798,22800,22801,22802,22803,22807,22808,22811,22813,22814,22816,22817,22818,22819,22822,22824,22828,22832,22834,22835,22837,22838,22843,22845,22846,22847,22848,22851,22853,22854,22858,22860,22861,22864,22866,22867,22873,22875,22876,22877,22878,22879,22881,22883,22884,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22901,22903,22906,22907,22908,22910,22911,22912,22917,22921,22923,22924,22926,22927,22928,22929,22932,22933,22936,22938,22939,22940,22941,22943,22944,22945,22946,22950,22951,22956,22957,22960,22961,22963,22964,22965,22966,22967,22968,22970,22972,22973,22975,22976,22977,22978,22979,22980,22981,22983,22984,22985,22988,22989,22990,22991,22997,22998,23001,23003,23006,23007,23008,23009,23010,23012,23014,23015,23017,23018,23019,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23034,23036,23037,23038,23040,23042,23050,23051,23053,23054,23055,23056,23058,23060,23061,23062,23063,23065,23066,23067,23069,23070,23073,23074,23076,23078,23079,23080,23082,23083,23084,23085,23086,23087,23088,23091,23093,23095,23096,23097,23098,23099,23101,23102,23103,23105,23106,23107,23108,23109,23111,23112,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23126,23127,23128,23129,23131,23132,23133,23134,23135,23136,23137,23139,23140,23141,23142,23144,23145,23147,23148,23149,23150,23151,23152,23153,23154,23155,23160,23161,23163,23164,23165,23166,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23187,23188,23189,23190,23191,23192,23193,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23211,23212,23213,23214,23215,23216,23217,23220,23222,23223,23225,23226,23227,23228,23229,23231,23232,23235,23236,23237,23238,23239,23240,23242,23243,23245,23246,23247,23248,23249,23251,23253,23255,23257,23258,23259,23261,23262,23263,23266,23268,23269,23271,23272,23274,23276,23277,23278,23279,23280,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23347,23349,23350,23352,23353,23354,23355,23356,23357,23358,23359,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23378,23382,23390,23392,23393,23399,23400,23403,23405,23406,23407,23410,23412,23414,23415,23416,23417,23419,23420,23422,23423,23426,23430,23434,23437,23438,23440,23441,23442,23444,23446,23455,23463,23464,23465,23468,23469,23470,23471,23473,23474,23479,23482,23483,23484,23488,23489,23491,23496,23497,23498,23499,23501,23502,23503,23505,23508,23509,23510,23511,23512,23513,23514,23515,23516,23520,23522,23523,23526,23527,23529,23530,23531,23532,23533,23535,23537,23538,23539,23540,23541,23542,23543,23549,23550,23552,23554,23555,23557,23559,23560,23563,23564,23565,23566,23568,23570,23571,23575,23577,23579,23582,23583,23584,23585,23587,23590,23592,23593,23594,23595,23597,23598,23599,23600,23602,23603,23605,23606,23607,23619,23620,23622,23623,23628,23629,23634,23635,23636,23638,23639,23640,23642,23643,23644,23645,23647,23650,23652,23655,23656,23657,23658,23659,23660,23661,23664,23666,23667,23668,23669,23670,23671,23672,23675,23676,23677,23678,23680,23683,23684,23685,23686,23687,23689,23690,23691,23694,23695,23698,23699,23701,23709,23710,23711,23712,23713,23716,23717,23718,23719,23720,23722,23726,23727,23728,23730,23732,23734,23737,23738,23739,23740,23742,23744,23746,23747,23749,23750,23751,23752,23753,23754,23756,23757,23758,23759,23760,23761,23763,23764,23765,23766,23767,23768,23770,23771,23772,23773,23774,23775,23776,23778,23779,23783,23785,23787,23788,23790,23791,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23804,23805,23806,23807,23808,23809,23812,23813,23816,23817,23818,23819,23820,23821,23823,23824,23825,23826,23827,23829,23831,23832,23833,23834,23836,23837,23839,23840,23841,23842,23843,23845,23848,23850,23851,23852,23855,23856,23857,23858,23859,23861,23862,23863,23864,23865,23866,23867,23868,23871,23872,23873,23874,23875,23876,23877,23878,23880,23881,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23897,23898,23900,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23914,23917,23918,23920,23921,23922,23923,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23962,23963,23964,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23992,23993,23994,23995,23996,23997,23998,23999,24e3,24001,24002,24003,24004,24006,24007,24008,24009,24010,24011,24012,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24028,24031,24032,24035,24036,24042,24044,24045,24048,24053,24054,24056,24057,24058,24059,24060,24063,24064,24068,24071,24073,24074,24075,24077,24078,24082,24083,24087,24094,24095,24096,24097,24098,24099,24100,24101,24104,24105,24106,24107,24108,24111,24112,24114,24115,24116,24117,24118,24121,24122,24126,24127,24128,24129,24131,24134,24135,24136,24137,24138,24139,24141,24142,24143,24144,24145,24146,24147,24150,24151,24152,24153,24154,24156,24157,24159,24160,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24181,24183,24185,24190,24193,24194,24195,24197,24200,24201,24204,24205,24206,24210,24216,24219,24221,24225,24226,24227,24228,24232,24233,24234,24235,24236,24238,24239,24240,24241,24242,24244,24250,24251,24252,24253,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24267,24268,24269,24270,24271,24272,24276,24277,24279,24280,24281,24282,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24297,24299,24300,24301,24302,24303,24304,24305,24306,24307,24309,24312,24313,24315,24316,24317,24325,24326,24327,24329,24332,24333,24334,24336,24338,24340,24342,24345,24346,24348,24349,24350,24353,24354,24355,24356,24360,24363,24364,24366,24368,24370,24371,24372,24373,24374,24375,24376,24379,24381,24382,24383,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24401,24404,24409,24410,24411,24412,24414,24415,24416,24419,24421,24423,24424,24427,24430,24431,24434,24436,24437,24438,24440,24442,24445,24446,24447,24451,24454,24461,24462,24463,24465,24467,24468,24470,24474,24475,24477,24478,24479,24480,24482,24483,24484,24485,24486,24487,24489,24491,24492,24495,24496,24497,24498,24499,24500,24502,24504,24505,24506,24507,24510,24511,24512,24513,24514,24519,24520,24522,24523,24526,24531,24532,24533,24538,24539,24540,24542,24543,24546,24547,24549,24550,24552,24553,24556,24559,24560,24562,24563,24564,24566,24567,24569,24570,24572,24583,24584,24585,24587,24588,24592,24593,24595,24599,24600,24602,24606,24607,24610,24611,24612,24620,24621,24622,24624,24625,24626,24627,24628,24630,24631,24632,24633,24634,24637,24638,24640,24644,24645,24646,24647,24648,24649,24650,24652,24654,24655,24657,24659,24660,24662,24663,24664,24667,24668,24670,24671,24672,24673,24677,24678,24686,24689,24690,24692,24693,24695,24702,24704,24705,24706,24709,24710,24711,24712,24714,24715,24718,24719,24720,24721,24723,24725,24727,24728,24729,24732,24734,24737,24738,24740,24741,24743,24745,24746,24750,24752,24755,24757,24758,24759,24761,24762,24765,24766,24767,24768,24769,24770,24771,24772,24775,24776,24777,24780,24781,24782,24783,24784,24786,24787,24788,24790,24791,24793,24795,24798,24801,24802,24803,24804,24805,24810,24817,24818,24821,24823,24824,24827,24828,24829,24830,24831,24834,24835,24836,24837,24839,24842,24843,24844,24848,24849,24850,24851,24852,24854,24855,24856,24857,24859,24860,24861,24862,24865,24866,24869,24872,24873,24874,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24896,24897,24898,24899,24900,24901,24902,24903,24905,24907,24909,24911,24912,24914,24915,24916,24918,24919,24920,24921,24922,24923,24924,24926,24927,24928,24929,24931,24932,24933,24934,24937,24938,24939,24940,24941,24942,24943,24945,24946,24947,24948,24950,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24972,24973,24975,24976,24977,24978,24979,24981,24982,24983,24984,24985,24986,24987,24988,24990,24991,24992,24993,24994,24995,24996,24997,24998,25002,25003,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25016,25017,25018,25019,25020,25021,25023,25024,25025,25027,25028,25029,25030,25031,25033,25036,25037,25038,25039,25040,25043,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25078,25079,25080,25081,25082,25083,25084,25085,25086,25088,25089,25090,25091,25092,25093,25095,25097,25107,25108,25113,25116,25117,25118,25120,25123,25126,25127,25128,25129,25131,25133,25135,25136,25137,25138,25141,25142,25144,25145,25146,25147,25148,25154,25156,25157,25158,25162,25167,25168,25173,25174,25175,25177,25178,25180,25181,25182,25183,25184,25185,25186,25188,25189,25192,25201,25202,25204,25205,25207,25208,25210,25211,25213,25217,25218,25219,25221,25222,25223,25224,25227,25228,25229,25230,25231,25232,25236,25241,25244,25245,25246,25251,25254,25255,25257,25258,25261,25262,25263,25264,25266,25267,25268,25270,25271,25272,25274,25278,25280,25281,25283,25291,25295,25297,25301,25309,25310,25312,25313,25316,25322,25323,25328,25330,25333,25336,25337,25338,25339,25344,25347,25348,25349,25350,25354,25355,25356,25357,25359,25360,25362,25363,25364,25365,25367,25368,25369,25372,25382,25383,25385,25388,25389,25390,25392,25393,25395,25396,25397,25398,25399,25400,25403,25404,25406,25407,25408,25409,25412,25415,25416,25418,25425,25426,25427,25428,25430,25431,25432,25433,25434,25435,25436,25437,25440,25444,25445,25446,25448,25450,25451,25452,25455,25456,25458,25459,25460,25461,25464,25465,25468,25469,25470,25471,25473,25475,25476,25477,25478,25483,25485,25489,25491,25492,25493,25495,25497,25498,25499,25500,25501,25502,25503,25505,25508,25510,25515,25519,25521,25522,25525,25526,25529,25531,25533,25535,25536,25537,25538,25539,25541,25543,25544,25546,25547,25548,25553,25555,25556,25557,25559,25560,25561,25562,25563,25564,25565,25567,25570,25572,25573,25574,25575,25576,25579,25580,25582,25583,25584,25585,25587,25589,25591,25593,25594,25595,25596,25598,25603,25604,25606,25607,25608,25609,25610,25613,25614,25617,25618,25621,25622,25623,25624,25625,25626,25629,25631,25634,25635,25636,25637,25639,25640,25641,25643,25646,25647,25648,25649,25650,25651,25653,25654,25655,25656,25657,25659,25660,25662,25664,25666,25667,25673,25675,25676,25677,25678,25679,25680,25681,25683,25685,25686,25687,25689,25690,25691,25692,25693,25695,25696,25697,25698,25699,25700,25701,25702,25704,25706,25707,25708,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25723,25724,25725,25726,25727,25728,25729,25731,25734,25736,25737,25738,25739,25740,25741,25742,25743,25744,25747,25748,25751,25752,25754,25755,25756,25757,25759,25760,25761,25762,25763,25765,25766,25767,25768,25770,25771,25775,25777,25778,25779,25780,25782,25785,25787,25789,25790,25791,25793,25795,25796,25798,25799,25800,25801,25802,25803,25804,25807,25809,25811,25812,25813,25814,25817,25818,25819,25820,25821,25823,25824,25825,25827,25829,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25857,25858,25859,25860,25861,25862,25863,25864,25866,25867,25868,25869,25870,25871,25872,25873,25875,25876,25877,25878,25879,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25894,25895,25896,25897,25898,25900,25901,25904,25905,25906,25907,25911,25914,25916,25917,25920,25921,25922,25923,25924,25926,25927,25930,25931,25933,25934,25936,25938,25939,25940,25943,25944,25946,25948,25951,25952,25953,25956,25957,25959,25960,25961,25962,25965,25966,25967,25969,25971,25973,25974,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25992,25993,25994,25997,25998,25999,26002,26004,26005,26006,26008,26010,26013,26014,26016,26018,26019,26022,26024,26026,26028,26030,26033,26034,26035,26036,26037,26038,26039,26040,26042,26043,26046,26047,26048,26050,26055,26056,26057,26058,26061,26064,26065,26067,26068,26069,26072,26073,26074,26075,26076,26077,26078,26079,26081,26083,26084,26090,26091,26098,26099,26100,26101,26104,26105,26107,26108,26109,26110,26111,26113,26116,26117,26119,26120,26121,26123,26125,26128,26129,26130,26134,26135,26136,26138,26139,26140,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26162,26163,26167,26168,26169,26170,26171,26173,26175,26176,26178,26180,26181,26182,26183,26184,26185,26186,26189,26190,26192,26193,26200,26201,26203,26204,26205,26206,26208,26210,26211,26213,26215,26217,26218,26219,26220,26221,26225,26226,26227,26229,26232,26233,26235,26236,26237,26239,26240,26241,26243,26245,26246,26248,26249,26250,26251,26253,26254,26255,26256,26258,26259,26260,26261,26264,26265,26266,26267,26268,26270,26271,26272,26273,26274,26275,26276,26277,26278,26281,26282,26283,26284,26285,26287,26288,26289,26290,26291,26293,26294,26295,26296,26298,26299,26300,26301,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26330,26334,26335,26336,26337,26338,26339,26340,26341,26343,26344,26346,26347,26348,26349,26350,26351,26353,26357,26358,26360,26362,26363,26365,26369,26370,26371,26372,26373,26374,26375,26380,26382,26383,26385,26386,26387,26390,26392,26393,26394,26396,26398,26400,26401,26402,26403,26404,26405,26407,26409,26414,26416,26418,26419,26422,26423,26424,26425,26427,26428,26430,26431,26433,26436,26437,26439,26442,26443,26445,26450,26452,26453,26455,26456,26457,26458,26459,26461,26466,26467,26468,26470,26471,26475,26476,26478,26481,26484,26486,26488,26489,26490,26491,26493,26496,26498,26499,26501,26502,26504,26506,26508,26509,26510,26511,26513,26514,26515,26516,26518,26521,26523,26527,26528,26529,26532,26534,26537,26540,26542,26545,26546,26548,26553,26554,26555,26556,26557,26558,26559,26560,26562,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26581,26582,26583,26587,26591,26593,26595,26596,26598,26599,26600,26602,26603,26605,26606,26610,26613,26614,26615,26616,26617,26618,26619,26620,26622,26625,26626,26627,26628,26630,26637,26640,26642,26644,26645,26648,26649,26650,26651,26652,26654,26655,26656,26658,26659,26660,26661,26662,26663,26664,26667,26668,26669,26670,26671,26672,26673,26676,26677,26678,26682,26683,26687,26695,26699,26701,26703,26706,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26730,26732,26733,26734,26735,26736,26737,26738,26739,26741,26744,26745,26746,26747,26748,26749,26750,26751,26752,26754,26756,26759,26760,26761,26762,26763,26764,26765,26766,26768,26769,26770,26772,26773,26774,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26787,26788,26789,26793,26794,26795,26796,26798,26801,26802,26804,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26817,26819,26820,26821,26822,26823,26824,26826,26828,26830,26831,26832,26833,26835,26836,26838,26839,26841,26843,26844,26845,26846,26847,26849,26850,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26863,26866,26867,26868,26870,26871,26872,26875,26877,26878,26879,26880,26882,26883,26884,26886,26887,26888,26889,26890,26892,26895,26897,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26913,26914,26915,26917,26918,26919,26920,26921,26922,26923,26924,26926,26927,26929,26930,26931,26933,26934,26935,26936,26938,26939,26940,26942,26944,26945,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26965,26966,26968,26969,26971,26972,26975,26977,26978,26980,26981,26983,26984,26985,26986,26988,26989,26991,26992,26994,26995,26996,26997,26998,27002,27003,27005,27006,27007,27009,27011,27013,27018,27019,27020,27022,27023,27024,27025,27026,27027,27030,27031,27033,27034,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27049,27050,27052,27054,27055,27056,27058,27059,27061,27062,27064,27065,27066,27068,27069,27070,27071,27072,27074,27075,27076,27077,27078,27079,27080,27081,27083,27085,27087,27089,27090,27091,27093,27094,27095,27096,27097,27098,27100,27101,27102,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27118,27119,27120,27121,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27134,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27161,27162,27163,27164,27165,27166,27168,27170,27171,27172,27173,27174,27175,27177,27179,27180,27181,27182,27184,27186,27187,27188,27190,27191,27192,27193,27194,27195,27196,27199,27200,27201,27202,27203,27205,27206,27208,27209,27210,27211,27212,27213,27214,27215,27217,27218,27219,27220,27221,27222,27223,27226,27228,27229,27230,27231,27232,27234,27235,27236,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27250,27251,27252,27253,27254,27255,27256,27258,27259,27261,27262,27263,27265,27266,27267,27269,27270,27271,27272,27273,27274,27275,27276,27277,27279,27282,27283,27284,27285,27286,27288,27289,27290,27291,27292,27293,27294,27295,27297,27298,27299,27300,27301,27302,27303,27304,27306,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27429,27430,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27443,27444,27445,27446,27448,27451,27452,27453,27455,27456,27457,27458,27460,27461,27464,27466,27467,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27482,27483,27484,27485,27486,27487,27488,27489,27496,27497,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27514,27517,27518,27519,27520,27525,27528,27532,27534,27535,27536,27537,27540,27541,27543,27544,27545,27548,27549,27550,27551,27552,27554,27555,27556,27557,27558,27559,27560,27561,27563,27564,27565,27566,27567,27568,27569,27570,27574,27576,27577,27578,27579,27580,27581,27582,27584,27587,27588,27590,27591,27592,27593,27594,27596,27598,27600,27601,27608,27610,27612,27613,27614,27615,27616,27618,27619,27620,27621,27622,27623,27624,27625,27628,27629,27630,27632,27633,27634,27636,27638,27639,27640,27642,27643,27644,27646,27647,27648,27649,27650,27651,27652,27656,27657,27658,27659,27660,27662,27666,27671,27676,27677,27678,27680,27683,27685,27691,27692,27693,27697,27699,27702,27703,27705,27706,27707,27708,27710,27711,27715,27716,27717,27720,27723,27724,27725,27726,27727,27729,27730,27731,27734,27736,27737,27738,27746,27747,27749,27750,27751,27755,27756,27757,27758,27759,27761,27763,27765,27767,27768,27770,27771,27772,27775,27776,27780,27783,27786,27787,27789,27790,27793,27794,27797,27798,27799,27800,27802,27804,27805,27806,27808,27810,27816,27820,27823,27824,27828,27829,27830,27831,27834,27840,27841,27842,27843,27846,27847,27848,27851,27853,27854,27855,27857,27858,27864,27865,27866,27868,27869,27871,27876,27878,27879,27881,27884,27885,27890,27892,27897,27903,27904,27906,27907,27909,27910,27912,27913,27914,27917,27919,27920,27921,27923,27924,27925,27926,27928,27932,27933,27935,27936,27937,27938,27939,27940,27942,27944,27945,27948,27949,27951,27952,27956,27958,27959,27960,27962,27967,27968,27970,27972,27977,27980,27984,27989,27990,27991,27992,27995,27997,27999,28001,28002,28004,28005,28007,28008,28011,28012,28013,28016,28017,28018,28019,28021,28022,28025,28026,28027,28029,28030,28031,28032,28033,28035,28036,28038,28039,28042,28043,28045,28047,28048,28050,28054,28055,28056,28057,28058,28060,28066,28069,28076,28077,28080,28081,28083,28084,28086,28087,28089,28090,28091,28092,28093,28094,28097,28098,28099,28104,28105,28106,28109,28110,28111,28112,28114,28115,28116,28117,28119,28122,28123,28124,28127,28130,28131,28133,28135,28136,28137,28138,28141,28143,28144,28146,28148,28149,28150,28152,28154,28157,28158,28159,28160,28161,28162,28163,28164,28166,28167,28168,28169,28171,28175,28178,28179,28181,28184,28185,28187,28188,28190,28191,28194,28198,28199,28200,28202,28204,28206,28208,28209,28211,28213,28214,28215,28217,28219,28220,28221,28222,28223,28224,28225,28226,28229,28230,28231,28232,28233,28234,28235,28236,28239,28240,28241,28242,28245,28247,28249,28250,28252,28253,28254,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28268,28269,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28288,28289,28290,28292,28295,28296,28298,28299,28300,28301,28302,28305,28306,28307,28308,28309,28310,28311,28313,28314,28315,28317,28318,28320,28321,28323,28324,28326,28328,28329,28331,28332,28333,28334,28336,28339,28341,28344,28345,28348,28350,28351,28352,28355,28356,28357,28358,28360,28361,28362,28364,28365,28366,28368,28370,28374,28376,28377,28379,28380,28381,28387,28391,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28405,28406,28407,28408,28410,28411,28412,28413,28414,28415,28416,28417,28419,28420,28421,28423,28424,28426,28427,28428,28429,28430,28432,28433,28434,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28449,28450,28451,28453,28454,28455,28456,28460,28462,28464,28466,28468,28469,28471,28472,28473,28474,28475,28476,28477,28479,28480,28481,28482,28483,28484,28485,28488,28489,28490,28492,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28505,28506,28507,28509,28511,28512,28513,28515,28516,28517,28519,28520,28521,28522,28523,28524,28527,28528,28529,28531,28533,28534,28535,28537,28539,28541,28542,28543,28544,28545,28546,28547,28549,28550,28551,28554,28555,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28573,28574,28575,28576,28578,28579,28580,28581,28582,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28596,28597,28599,28600,28602,28603,28604,28605,28606,28607,28609,28611,28612,28613,28614,28615,28616,28618,28619,28620,28621,28622,28623,28624,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28639,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28690,28691,28692,28693,28694,28695,28696,28697,28700,28701,28702,28703,28704,28705,28706,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28726,28727,28728,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28749,28750,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28782,28785,28786,28787,28788,28791,28793,28794,28795,28797,28801,28802,28803,28804,28806,28807,28808,28811,28812,28813,28815,28816,28817,28819,28823,28824,28826,28827,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28848,28850,28852,28853,28854,28858,28862,28863,28868,28869,28870,28871,28873,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28890,28892,28893,28894,28896,28897,28898,28899,28901,28906,28910,28912,28913,28914,28915,28916,28917,28918,28920,28922,28923,28924,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28939,28940,28941,28942,28943,28945,28946,28948,28951,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28967,28968,28969,28970,28971,28972,28973,28974,28978,28979,28980,28981,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28998,28999,29e3,29001,29003,29005,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29021,29023,29024,29025,29026,29027,29029,29033,29034,29035,29036,29037,29039,29040,29041,29044,29045,29046,29047,29049,29051,29052,29054,29055,29056,29057,29058,29059,29061,29062,29063,29064,29065,29067,29068,29069,29070,29072,29073,29074,29075,29077,29078,29079,29082,29083,29084,29085,29086,29089,29090,29091,29092,29093,29094,29095,29097,29098,29099,29101,29102,29103,29104,29105,29106,29108,29110,29111,29112,29114,29115,29116,29117,29118,29119,29120,29121,29122,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29135,29136,29137,29138,29139,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29153,29154,29155,29156,29158,29160,29161,29162,29163,29164,29165,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29225,29227,29229,29230,29231,29234,29235,29236,29242,29244,29246,29248,29249,29250,29251,29252,29253,29254,29257,29258,29259,29262,29263,29264,29265,29267,29268,29269,29271,29272,29274,29276,29278,29280,29283,29284,29285,29288,29290,29291,29292,29293,29296,29297,29299,29300,29302,29303,29304,29307,29308,29309,29314,29315,29317,29318,29319,29320,29321,29324,29326,29328,29329,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29358,29361,29362,29363,29365,29370,29371,29372,29373,29374,29375,29376,29381,29382,29383,29385,29386,29387,29388,29391,29393,29395,29396,29397,29398,29400,29402,29403,58566,58567,58568,58569,58570,58571,58572,58573,58574,58575,58576,58577,58578,58579,58580,58581,58582,58583,58584,58585,58586,58587,58588,58589,58590,58591,58592,58593,58594,58595,58596,58597,58598,58599,58600,58601,58602,58603,58604,58605,58606,58607,58608,58609,58610,58611,58612,58613,58614,58615,58616,58617,58618,58619,58620,58621,58622,58623,58624,58625,58626,58627,58628,58629,58630,58631,58632,58633,58634,58635,58636,58637,58638,58639,58640,58641,58642,58643,58644,58645,58646,58647,58648,58649,58650,58651,58652,58653,58654,58655,58656,58657,58658,58659,58660,58661,12288,12289,12290,183,713,711,168,12291,12293,8212,65374,8214,8230,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12310,12311,12304,12305,177,215,247,8758,8743,8744,8721,8719,8746,8745,8712,8759,8730,8869,8741,8736,8978,8857,8747,8750,8801,8780,8776,8765,8733,8800,8814,8815,8804,8805,8734,8757,8756,9794,9792,176,8242,8243,8451,65284,164,65504,65505,8240,167,8470,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,8251,8594,8592,8593,8595,12307,58662,58663,58664,58665,58666,58667,58668,58669,58670,58671,58672,58673,58674,58675,58676,58677,58678,58679,58680,58681,58682,58683,58684,58685,58686,58687,58688,58689,58690,58691,58692,58693,58694,58695,58696,58697,58698,58699,58700,58701,58702,58703,58704,58705,58706,58707,58708,58709,58710,58711,58712,58713,58714,58715,58716,58717,58718,58719,58720,58721,58722,58723,58724,58725,58726,58727,58728,58729,58730,58731,58732,58733,58734,58735,58736,58737,58738,58739,58740,58741,58742,58743,58744,58745,58746,58747,58748,58749,58750,58751,58752,58753,58754,58755,58756,58757,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,59238,59239,59240,59241,59242,59243,9352,9353,9354,9355,9356,9357,9358,9359,9360,9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,9347,9348,9349,9350,9351,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,8364,59245,12832,12833,12834,12835,12836,12837,12838,12839,12840,12841,59246,59247,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,59248,59249,58758,58759,58760,58761,58762,58763,58764,58765,58766,58767,58768,58769,58770,58771,58772,58773,58774,58775,58776,58777,58778,58779,58780,58781,58782,58783,58784,58785,58786,58787,58788,58789,58790,58791,58792,58793,58794,58795,58796,58797,58798,58799,58800,58801,58802,58803,58804,58805,58806,58807,58808,58809,58810,58811,58812,58813,58814,58815,58816,58817,58818,58819,58820,58821,58822,58823,58824,58825,58826,58827,58828,58829,58830,58831,58832,58833,58834,58835,58836,58837,58838,58839,58840,58841,58842,58843,58844,58845,58846,58847,58848,58849,58850,58851,58852,12288,65281,65282,65283,65509,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65340,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,58854,58855,58856,58857,58858,58859,58860,58861,58862,58863,58864,58865,58866,58867,58868,58869,58870,58871,58872,58873,58874,58875,58876,58877,58878,58879,58880,58881,58882,58883,58884,58885,58886,58887,58888,58889,58890,58891,58892,58893,58894,58895,58896,58897,58898,58899,58900,58901,58902,58903,58904,58905,58906,58907,58908,58909,58910,58911,58912,58913,58914,58915,58916,58917,58918,58919,58920,58921,58922,58923,58924,58925,58926,58927,58928,58929,58930,58931,58932,58933,58934,58935,58936,58937,58938,58939,58940,58941,58942,58943,58944,58945,58946,58947,58948,58949,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,59250,59251,59252,59253,59254,59255,59256,59257,59258,59259,59260,58950,58951,58952,58953,58954,58955,58956,58957,58958,58959,58960,58961,58962,58963,58964,58965,58966,58967,58968,58969,58970,58971,58972,58973,58974,58975,58976,58977,58978,58979,58980,58981,58982,58983,58984,58985,58986,58987,58988,58989,58990,58991,58992,58993,58994,58995,58996,58997,58998,58999,59e3,59001,59002,59003,59004,59005,59006,59007,59008,59009,59010,59011,59012,59013,59014,59015,59016,59017,59018,59019,59020,59021,59022,59023,59024,59025,59026,59027,59028,59029,59030,59031,59032,59033,59034,59035,59036,59037,59038,59039,59040,59041,59042,59043,59044,59045,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,59261,59262,59263,59264,59265,59266,59267,59268,59046,59047,59048,59049,59050,59051,59052,59053,59054,59055,59056,59057,59058,59059,59060,59061,59062,59063,59064,59065,59066,59067,59068,59069,59070,59071,59072,59073,59074,59075,59076,59077,59078,59079,59080,59081,59082,59083,59084,59085,59086,59087,59088,59089,59090,59091,59092,59093,59094,59095,59096,59097,59098,59099,59100,59101,59102,59103,59104,59105,59106,59107,59108,59109,59110,59111,59112,59113,59114,59115,59116,59117,59118,59119,59120,59121,59122,59123,59124,59125,59126,59127,59128,59129,59130,59131,59132,59133,59134,59135,59136,59137,59138,59139,59140,59141,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,59269,59270,59271,59272,59273,59274,59275,59276,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,59277,59278,59279,59280,59281,59282,59283,65077,65078,65081,65082,65087,65088,65085,65086,65089,65090,65091,65092,59284,59285,65083,65084,65079,65080,65073,59286,65075,65076,59287,59288,59289,59290,59291,59292,59293,59294,59295,59142,59143,59144,59145,59146,59147,59148,59149,59150,59151,59152,59153,59154,59155,59156,59157,59158,59159,59160,59161,59162,59163,59164,59165,59166,59167,59168,59169,59170,59171,59172,59173,59174,59175,59176,59177,59178,59179,59180,59181,59182,59183,59184,59185,59186,59187,59188,59189,59190,59191,59192,59193,59194,59195,59196,59197,59198,59199,59200,59201,59202,59203,59204,59205,59206,59207,59208,59209,59210,59211,59212,59213,59214,59215,59216,59217,59218,59219,59220,59221,59222,59223,59224,59225,59226,59227,59228,59229,59230,59231,59232,59233,59234,59235,59236,59237,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,59296,59297,59298,59299,59300,59301,59302,59303,59304,59305,59306,59307,59308,59309,59310,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,59311,59312,59313,59314,59315,59316,59317,59318,59319,59320,59321,59322,59323,714,715,729,8211,8213,8229,8245,8453,8457,8598,8599,8600,8601,8725,8735,8739,8786,8806,8807,8895,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584,9585,9586,9587,9601,9602,9603,9604,9605,9606,9607,9608,9609,9610,9611,9612,9613,9614,9615,9619,9620,9621,9660,9661,9698,9699,9700,9701,9737,8853,12306,12317,12318,59324,59325,59326,59327,59328,59329,59330,59331,59332,59333,59334,257,225,462,224,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,234,593,7743,324,328,505,609,59337,59338,59339,59340,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,59341,59342,59343,59344,59345,59346,59347,59348,59349,59350,59351,59352,59353,59354,59355,59356,59357,59358,59359,59360,59361,12321,12322,12323,12324,12325,12326,12327,12328,12329,12963,13198,13199,13212,13213,13214,13217,13252,13262,13265,13266,13269,65072,65506,65508,59362,8481,12849,59363,8208,59364,59365,59366,12540,12443,12444,12541,12542,12294,12445,12446,65097,65098,65099,65100,65101,65102,65103,65104,65105,65106,65108,65109,65110,65111,65113,65114,65115,65116,65117,65118,65119,65120,65121,65122,65123,65124,65125,65126,65128,65129,65130,65131,12350,12272,12273,12274,12275,12276,12277,12278,12279,12280,12281,12282,12283,12295,59380,59381,59382,59383,59384,59385,59386,59387,59388,59389,59390,59391,59392,9472,9473,9474,9475,9476,9477,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,9489,9490,9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506,9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,9521,9522,9523,9524,9525,9526,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536,9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,59393,59394,59395,59396,59397,59398,59399,59400,59401,59402,59403,59404,59405,59406,59407,29404,29405,29407,29410,29411,29412,29413,29414,29415,29418,29419,29429,29430,29433,29437,29438,29439,29440,29442,29444,29445,29446,29447,29448,29449,29451,29452,29453,29455,29456,29457,29458,29460,29464,29465,29466,29471,29472,29475,29476,29478,29479,29480,29485,29487,29488,29490,29491,29493,29494,29498,29499,29500,29501,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29518,29519,29521,29523,29524,29525,29526,29528,29529,29530,29531,29532,29533,29534,29535,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29550,29552,29553,57344,57345,57346,57347,57348,57349,57350,57351,57352,57353,57354,57355,57356,57357,57358,57359,57360,57361,57362,57363,57364,57365,57366,57367,57368,57369,57370,57371,57372,57373,57374,57375,57376,57377,57378,57379,57380,57381,57382,57383,57384,57385,57386,57387,57388,57389,57390,57391,57392,57393,57394,57395,57396,57397,57398,57399,57400,57401,57402,57403,57404,57405,57406,57407,57408,57409,57410,57411,57412,57413,57414,57415,57416,57417,57418,57419,57420,57421,57422,57423,57424,57425,57426,57427,57428,57429,57430,57431,57432,57433,57434,57435,57436,57437,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29567,29568,29569,29570,29571,29573,29574,29576,29578,29580,29581,29583,29584,29586,29587,29588,29589,29591,29592,29593,29594,29596,29597,29598,29600,29601,29603,29604,29605,29606,29607,29608,29610,29612,29613,29617,29620,29621,29622,29624,29625,29628,29629,29630,29631,29633,29635,29636,29637,29638,29639,29643,29644,29646,29650,29651,29652,29653,29654,29655,29656,29658,29659,29660,29661,29663,29665,29666,29667,29668,29670,29672,29674,29675,29676,29678,29679,29680,29681,29683,29684,29685,29686,29687,57438,57439,57440,57441,57442,57443,57444,57445,57446,57447,57448,57449,57450,57451,57452,57453,57454,57455,57456,57457,57458,57459,57460,57461,57462,57463,57464,57465,57466,57467,57468,57469,57470,57471,57472,57473,57474,57475,57476,57477,57478,57479,57480,57481,57482,57483,57484,57485,57486,57487,57488,57489,57490,57491,57492,57493,57494,57495,57496,57497,57498,57499,57500,57501,57502,57503,57504,57505,57506,57507,57508,57509,57510,57511,57512,57513,57514,57515,57516,57517,57518,57519,57520,57521,57522,57523,57524,57525,57526,57527,57528,57529,57530,57531,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29700,29703,29704,29707,29708,29709,29710,29713,29714,29715,29716,29717,29718,29719,29720,29721,29724,29725,29726,29727,29728,29729,29731,29732,29735,29737,29739,29741,29743,29745,29746,29751,29752,29753,29754,29755,29757,29758,29759,29760,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29782,29784,29789,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29806,29807,29809,29810,29811,29812,29813,29816,29817,29818,57532,57533,57534,57535,57536,57537,57538,57539,57540,57541,57542,57543,57544,57545,57546,57547,57548,57549,57550,57551,57552,57553,57554,57555,57556,57557,57558,57559,57560,57561,57562,57563,57564,57565,57566,57567,57568,57569,57570,57571,57572,57573,57574,57575,57576,57577,57578,57579,57580,57581,57582,57583,57584,57585,57586,57587,57588,57589,57590,57591,57592,57593,57594,57595,57596,57597,57598,57599,57600,57601,57602,57603,57604,57605,57606,57607,57608,57609,57610,57611,57612,57613,57614,57615,57616,57617,57618,57619,57620,57621,57622,57623,57624,57625,29819,29820,29821,29823,29826,29828,29829,29830,29832,29833,29834,29836,29837,29839,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29853,29855,29856,29857,29858,29859,29860,29861,29862,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29907,29908,29909,29910,29911,29912,29913,29914,29915,29917,29919,29921,29925,29927,29928,29929,29930,29931,29932,29933,29936,29937,29938,57626,57627,57628,57629,57630,57631,57632,57633,57634,57635,57636,57637,57638,57639,57640,57641,57642,57643,57644,57645,57646,57647,57648,57649,57650,57651,57652,57653,57654,57655,57656,57657,57658,57659,57660,57661,57662,57663,57664,57665,57666,57667,57668,57669,57670,57671,57672,57673,57674,57675,57676,57677,57678,57679,57680,57681,57682,57683,57684,57685,57686,57687,57688,57689,57690,57691,57692,57693,57694,57695,57696,57697,57698,57699,57700,57701,57702,57703,57704,57705,57706,57707,57708,57709,57710,57711,57712,57713,57714,57715,57716,57717,57718,57719,29939,29941,29944,29945,29946,29947,29948,29949,29950,29952,29953,29954,29955,29957,29958,29959,29960,29961,29962,29963,29964,29966,29968,29970,29972,29973,29974,29975,29979,29981,29982,29984,29985,29986,29987,29988,29990,29991,29994,29998,30004,30006,30009,30012,30013,30015,30017,30018,30019,30020,30022,30023,30025,30026,30029,30032,30033,30034,30035,30037,30038,30039,30040,30045,30046,30047,30048,30049,30050,30051,30052,30055,30056,30057,30059,30060,30061,30062,30063,30064,30065,30067,30069,30070,30071,30074,30075,30076,30077,30078,30080,30081,30082,30084,30085,30087,57720,57721,57722,57723,57724,57725,57726,57727,57728,57729,57730,57731,57732,57733,57734,57735,57736,57737,57738,57739,57740,57741,57742,57743,57744,57745,57746,57747,57748,57749,57750,57751,57752,57753,57754,57755,57756,57757,57758,57759,57760,57761,57762,57763,57764,57765,57766,57767,57768,57769,57770,57771,57772,57773,57774,57775,57776,57777,57778,57779,57780,57781,57782,57783,57784,57785,57786,57787,57788,57789,57790,57791,57792,57793,57794,57795,57796,57797,57798,57799,57800,57801,57802,57803,57804,57805,57806,57807,57808,57809,57810,57811,57812,57813,30088,30089,30090,30092,30093,30094,30096,30099,30101,30104,30107,30108,30110,30114,30118,30119,30120,30121,30122,30125,30134,30135,30138,30139,30143,30144,30145,30150,30155,30156,30158,30159,30160,30161,30163,30167,30169,30170,30172,30173,30175,30176,30177,30181,30185,30188,30189,30190,30191,30194,30195,30197,30198,30199,30200,30202,30203,30205,30206,30210,30212,30214,30215,30216,30217,30219,30221,30222,30223,30225,30226,30227,30228,30230,30234,30236,30237,30238,30241,30243,30247,30248,30252,30254,30255,30257,30258,30262,30263,30265,30266,30267,30269,30273,30274,30276,57814,57815,57816,57817,57818,57819,57820,57821,57822,57823,57824,57825,57826,57827,57828,57829,57830,57831,57832,57833,57834,57835,57836,57837,57838,57839,57840,57841,57842,57843,57844,57845,57846,57847,57848,57849,57850,57851,57852,57853,57854,57855,57856,57857,57858,57859,57860,57861,57862,57863,57864,57865,57866,57867,57868,57869,57870,57871,57872,57873,57874,57875,57876,57877,57878,57879,57880,57881,57882,57883,57884,57885,57886,57887,57888,57889,57890,57891,57892,57893,57894,57895,57896,57897,57898,57899,57900,57901,57902,57903,57904,57905,57906,57907,30277,30278,30279,30280,30281,30282,30283,30286,30287,30288,30289,30290,30291,30293,30295,30296,30297,30298,30299,30301,30303,30304,30305,30306,30308,30309,30310,30311,30312,30313,30314,30316,30317,30318,30320,30321,30322,30323,30324,30325,30326,30327,30329,30330,30332,30335,30336,30337,30339,30341,30345,30346,30348,30349,30351,30352,30354,30356,30357,30359,30360,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30373,30374,30375,30376,30377,30378,30379,30380,30381,30383,30384,30387,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30400,30401,30403,21834,38463,22467,25384,21710,21769,21696,30353,30284,34108,30702,33406,30861,29233,38552,38797,27688,23433,20474,25353,26263,23736,33018,26696,32942,26114,30414,20985,25942,29100,32753,34948,20658,22885,25034,28595,33453,25420,25170,21485,21543,31494,20843,30116,24052,25300,36299,38774,25226,32793,22365,38712,32610,29240,30333,26575,30334,25670,20336,36133,25308,31255,26001,29677,25644,25203,33324,39041,26495,29256,25198,25292,20276,29923,21322,21150,32458,37030,24110,26758,27036,33152,32465,26834,30917,34444,38225,20621,35876,33502,32990,21253,35090,21093,30404,30407,30409,30411,30412,30419,30421,30425,30426,30428,30429,30430,30432,30433,30434,30435,30436,30438,30439,30440,30441,30442,30443,30444,30445,30448,30451,30453,30454,30455,30458,30459,30461,30463,30464,30466,30467,30469,30470,30474,30476,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30491,30492,30493,30494,30497,30499,30500,30501,30503,30506,30507,30508,30510,30512,30513,30514,30515,30516,30521,30523,30525,30526,30527,30530,30532,30533,30534,30536,30537,30538,30539,30540,30541,30542,30543,30546,30547,30548,30549,30550,30551,30552,30553,30556,34180,38649,20445,22561,39281,23453,25265,25253,26292,35961,40077,29190,26479,30865,24754,21329,21271,36744,32972,36125,38049,20493,29384,22791,24811,28953,34987,22868,33519,26412,31528,23849,32503,29997,27893,36454,36856,36924,40763,27604,37145,31508,24444,30887,34006,34109,27605,27609,27606,24065,24199,30201,38381,25949,24330,24517,36767,22721,33218,36991,38491,38829,36793,32534,36140,25153,20415,21464,21342,36776,36777,36779,36941,26631,24426,33176,34920,40150,24971,21035,30250,24428,25996,28626,28392,23486,25672,20853,20912,26564,19993,31177,39292,28851,30557,30558,30559,30560,30564,30567,30569,30570,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30586,30587,30588,30593,30594,30595,30598,30599,30600,30601,30602,30603,30607,30608,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30625,30627,30628,30630,30632,30635,30637,30638,30639,30641,30642,30644,30646,30647,30648,30649,30650,30652,30654,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30670,30671,30672,30673,30674,30675,30676,30677,30678,30680,30681,30682,30685,30686,30687,30688,30689,30692,30149,24182,29627,33760,25773,25320,38069,27874,21338,21187,25615,38082,31636,20271,24091,33334,33046,33162,28196,27850,39539,25429,21340,21754,34917,22496,19981,24067,27493,31807,37096,24598,25830,29468,35009,26448,25165,36130,30572,36393,37319,24425,33756,34081,39184,21442,34453,27531,24813,24808,28799,33485,33329,20179,27815,34255,25805,31961,27133,26361,33609,21397,31574,20391,20876,27979,23618,36461,25554,21449,33580,33590,26597,30900,25661,23519,23700,24046,35815,25286,26612,35962,25600,25530,34633,39307,35863,32544,38130,20135,38416,39076,26124,29462,30694,30696,30698,30703,30704,30705,30706,30708,30709,30711,30713,30714,30715,30716,30723,30724,30725,30726,30727,30728,30730,30731,30734,30735,30736,30739,30741,30745,30747,30750,30752,30753,30754,30756,30760,30762,30763,30766,30767,30769,30770,30771,30773,30774,30781,30783,30785,30786,30787,30788,30790,30792,30793,30794,30795,30797,30799,30801,30803,30804,30808,30809,30810,30811,30812,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30831,30832,30833,30834,30835,30836,30837,30838,30840,30841,30842,30843,30845,30846,30847,30848,30849,30850,30851,22330,23581,24120,38271,20607,32928,21378,25950,30021,21809,20513,36229,25220,38046,26397,22066,28526,24034,21557,28818,36710,25199,25764,25507,24443,28552,37108,33251,36784,23576,26216,24561,27785,38472,36225,34924,25745,31216,22478,27225,25104,21576,20056,31243,24809,28548,35802,25215,36894,39563,31204,21507,30196,25345,21273,27744,36831,24347,39536,32827,40831,20360,23610,36196,32709,26021,28861,20805,20914,34411,23815,23456,25277,37228,30068,36364,31264,24833,31609,20167,32504,30597,19985,33261,21021,20986,27249,21416,36487,38148,38607,28353,38500,26970,30852,30853,30854,30856,30858,30859,30863,30864,30866,30868,30869,30870,30873,30877,30878,30880,30882,30884,30886,30888,30889,30890,30891,30892,30893,30894,30895,30901,30902,30903,30904,30906,30907,30908,30909,30911,30912,30914,30915,30916,30918,30919,30920,30924,30925,30926,30927,30929,30930,30931,30934,30935,30936,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30953,30954,30955,30957,30958,30959,30960,30961,30963,30965,30966,30968,30969,30971,30972,30973,30974,30975,30976,30978,30979,30980,30982,30983,30984,30985,30986,30987,30988,30784,20648,30679,25616,35302,22788,25571,24029,31359,26941,20256,33337,21912,20018,30126,31383,24162,24202,38383,21019,21561,28810,25462,38180,22402,26149,26943,37255,21767,28147,32431,34850,25139,32496,30133,33576,30913,38604,36766,24904,29943,35789,27492,21050,36176,27425,32874,33905,22257,21254,20174,19995,20945,31895,37259,31751,20419,36479,31713,31388,25703,23828,20652,33030,30209,31929,28140,32736,26449,23384,23544,30923,25774,25619,25514,25387,38169,25645,36798,31572,30249,25171,22823,21574,27513,20643,25140,24102,27526,20195,36151,34955,24453,36910,30989,30990,30991,30992,30993,30994,30996,30997,30998,30999,31e3,31001,31002,31003,31004,31005,31007,31008,31009,31010,31011,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31029,31030,31031,31032,31033,31037,31039,31042,31043,31044,31045,31047,31050,31051,31052,31053,31054,31055,31056,31057,31058,31060,31061,31064,31065,31073,31075,31076,31078,31081,31082,31083,31084,31086,31088,31089,31090,31091,31092,31093,31094,31097,31099,31100,31101,31102,31103,31106,31107,31110,31111,31112,31113,31115,31116,31117,31118,31120,31121,31122,24608,32829,25285,20025,21333,37112,25528,32966,26086,27694,20294,24814,28129,35806,24377,34507,24403,25377,20826,33633,26723,20992,25443,36424,20498,23707,31095,23548,21040,31291,24764,36947,30423,24503,24471,30340,36460,28783,30331,31561,30634,20979,37011,22564,20302,28404,36842,25932,31515,29380,28068,32735,23265,25269,24213,22320,33922,31532,24093,24351,36882,32532,39072,25474,28359,30872,28857,20856,38747,22443,30005,20291,30008,24215,24806,22880,28096,27583,30857,21500,38613,20939,20993,25481,21514,38035,35843,36300,29241,30879,34678,36845,35853,21472,31123,31124,31125,31126,31127,31128,31129,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31156,31157,31158,31159,31160,31164,31167,31170,31172,31173,31175,31176,31178,31180,31182,31183,31184,31187,31188,31190,31191,31193,31194,31195,31196,31197,31198,31200,31201,31202,31205,31208,31210,31212,31214,31217,31218,31219,31220,31221,31222,31223,31225,31226,31228,31230,31231,31233,31236,31237,31239,31240,31241,31242,31244,31247,31248,31249,31250,31251,31253,31254,31256,31257,31259,31260,19969,30447,21486,38025,39030,40718,38189,23450,35746,20002,19996,20908,33891,25026,21160,26635,20375,24683,20923,27934,20828,25238,26007,38497,35910,36887,30168,37117,30563,27602,29322,29420,35835,22581,30585,36172,26460,38208,32922,24230,28193,22930,31471,30701,38203,27573,26029,32526,22534,20817,38431,23545,22697,21544,36466,25958,39039,22244,38045,30462,36929,25479,21702,22810,22842,22427,36530,26421,36346,33333,21057,24816,22549,34558,23784,40517,20420,39069,35769,23077,24694,21380,25212,36943,37122,39295,24681,32780,20799,32819,23572,39285,27953,20108,31261,31263,31265,31266,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31284,31285,31286,31288,31290,31294,31296,31297,31298,31299,31300,31301,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31314,31315,31316,31317,31318,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31345,31346,31347,31349,31355,31356,31357,31358,31362,31365,31367,31369,31370,31371,31372,31374,31375,31376,31379,31380,31385,31386,31387,31390,31393,31394,36144,21457,32602,31567,20240,20047,38400,27861,29648,34281,24070,30058,32763,27146,30718,38034,32321,20961,28902,21453,36820,33539,36137,29359,39277,27867,22346,33459,26041,32938,25151,38450,22952,20223,35775,32442,25918,33778,38750,21857,39134,32933,21290,35837,21536,32954,24223,27832,36153,33452,37210,21545,27675,20998,32439,22367,28954,27774,31881,22859,20221,24575,24868,31914,20016,23553,26539,34562,23792,38155,39118,30127,28925,36898,20911,32541,35773,22857,20964,20315,21542,22827,25975,32932,23413,25206,25282,36752,24133,27679,31526,20239,20440,26381,31395,31396,31399,31401,31402,31403,31406,31407,31408,31409,31410,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31447,31448,31450,31451,31452,31453,31457,31458,31460,31463,31464,31465,31466,31467,31468,31470,31472,31473,31474,31475,31476,31477,31478,31479,31480,31483,31484,31486,31488,31489,31490,31493,31495,31497,31500,31501,31502,31504,31506,31507,31510,31511,31512,31514,31516,31517,31519,31521,31522,31523,31527,31529,31533,28014,28074,31119,34993,24343,29995,25242,36741,20463,37340,26023,33071,33105,24220,33104,36212,21103,35206,36171,22797,20613,20184,38428,29238,33145,36127,23500,35747,38468,22919,32538,21648,22134,22030,35813,25913,27010,38041,30422,28297,24178,29976,26438,26577,31487,32925,36214,24863,31174,25954,36195,20872,21018,38050,32568,32923,32434,23703,28207,26464,31705,30347,39640,33167,32660,31957,25630,38224,31295,21578,21733,27468,25601,25096,40509,33011,30105,21106,38761,33883,26684,34532,38401,38548,38124,20010,21508,32473,26681,36319,32789,26356,24218,32697,31535,31536,31538,31540,31541,31542,31543,31545,31547,31549,31551,31552,31553,31554,31555,31556,31558,31560,31562,31565,31566,31571,31573,31575,31577,31580,31582,31583,31585,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31599,31600,31603,31604,31606,31608,31610,31612,31613,31615,31617,31618,31619,31620,31622,31623,31624,31625,31626,31627,31628,31630,31631,31633,31634,31635,31638,31640,31641,31642,31643,31646,31647,31648,31651,31652,31653,31662,31663,31664,31666,31667,31669,31670,31671,31673,31674,31675,31676,31677,31678,31679,31680,31682,31683,31684,22466,32831,26775,24037,25915,21151,24685,40858,20379,36524,20844,23467,24339,24041,27742,25329,36129,20849,38057,21246,27807,33503,29399,22434,26500,36141,22815,36764,33735,21653,31629,20272,27837,23396,22993,40723,21476,34506,39592,35895,32929,25925,39038,22266,38599,21038,29916,21072,23521,25346,35074,20054,25296,24618,26874,20851,23448,20896,35266,31649,39302,32592,24815,28748,36143,20809,24191,36891,29808,35268,22317,30789,24402,40863,38394,36712,39740,35809,30328,26690,26588,36330,36149,21053,36746,28378,26829,38149,37101,22269,26524,35065,36807,21704,31685,31688,31689,31690,31691,31693,31694,31695,31696,31698,31700,31701,31702,31703,31704,31707,31708,31710,31711,31712,31714,31715,31716,31719,31720,31721,31723,31724,31725,31727,31728,31730,31731,31732,31733,31734,31736,31737,31738,31739,31741,31743,31744,31745,31746,31747,31748,31749,31750,31752,31753,31754,31757,31758,31760,31761,31762,31763,31764,31765,31767,31768,31769,31770,31771,31772,31773,31774,31776,31777,31778,31779,31780,31781,31784,31785,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31801,31802,31803,31804,31805,31806,31810,39608,23401,28023,27686,20133,23475,39559,37219,25e3,37039,38889,21547,28085,23506,20989,21898,32597,32752,25788,25421,26097,25022,24717,28938,27735,27721,22831,26477,33322,22741,22158,35946,27627,37085,22909,32791,21495,28009,21621,21917,33655,33743,26680,31166,21644,20309,21512,30418,35977,38402,27827,28088,36203,35088,40548,36154,22079,40657,30165,24456,29408,24680,21756,20136,27178,34913,24658,36720,21700,28888,34425,40511,27946,23439,24344,32418,21897,20399,29492,21564,21402,20505,21518,21628,20046,24573,29786,22774,33899,32993,34676,29392,31946,28246,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31861,31862,31863,31864,31865,31866,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31882,31883,31884,31885,31886,31887,31888,31891,31892,31894,31897,31898,31899,31904,31905,31907,31910,31911,31912,31913,31915,31916,31917,31919,31920,31924,31925,31926,31927,31928,31930,31931,24359,34382,21804,25252,20114,27818,25143,33457,21719,21326,29502,28369,30011,21010,21270,35805,27088,24458,24576,28142,22351,27426,29615,26707,36824,32531,25442,24739,21796,30186,35938,28949,28067,23462,24187,33618,24908,40644,30970,34647,31783,30343,20976,24822,29004,26179,24140,24653,35854,28784,25381,36745,24509,24674,34516,22238,27585,24724,24935,21321,24800,26214,36159,31229,20250,28905,27719,35763,35826,32472,33636,26127,23130,39746,27985,28151,35905,27963,20249,28779,33719,25110,24785,38669,36135,31096,20987,22334,22522,26426,30072,31293,31215,31637,31935,31936,31938,31939,31940,31942,31945,31947,31950,31951,31952,31953,31954,31955,31956,31960,31962,31963,31965,31966,31969,31970,31971,31972,31973,31974,31975,31977,31978,31979,31980,31981,31982,31984,31985,31986,31987,31988,31989,31990,31991,31993,31994,31996,31997,31998,31999,32e3,32001,32002,32003,32004,32005,32006,32007,32008,32009,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32035,32036,32037,32038,32040,32041,32042,32044,32045,32046,32048,32049,32050,32051,32052,32053,32054,32908,39269,36857,28608,35749,40481,23020,32489,32521,21513,26497,26840,36753,31821,38598,21450,24613,30142,27762,21363,23241,32423,25380,20960,33034,24049,34015,25216,20864,23395,20238,31085,21058,24760,27982,23492,23490,35745,35760,26082,24524,38469,22931,32487,32426,22025,26551,22841,20339,23478,21152,33626,39050,36158,30002,38078,20551,31292,20215,26550,39550,23233,27516,30417,22362,23574,31546,38388,29006,20860,32937,33392,22904,32516,33575,26816,26604,30897,30839,25315,25441,31616,20461,21098,20943,33616,27099,37492,36341,36145,35265,38190,31661,20214,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32111,32112,32113,32114,32115,32116,32117,32118,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,20581,33328,21073,39279,28176,28293,28071,24314,20725,23004,23558,27974,27743,30086,33931,26728,22870,35762,21280,37233,38477,34121,26898,30977,28966,33014,20132,37066,27975,39556,23047,22204,25605,38128,30699,20389,33050,29409,35282,39290,32564,32478,21119,25945,37237,36735,36739,21483,31382,25581,25509,30342,31224,34903,38454,25130,21163,33410,26708,26480,25463,30571,31469,27905,32467,35299,22992,25106,34249,33445,30028,20511,20171,30117,35819,23626,24062,31563,26020,37329,20170,27941,35167,32039,38182,20165,35880,36827,38771,26187,31105,36817,28908,28024,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32167,32168,32169,32170,32171,32172,32173,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,23613,21170,33606,20834,33550,30555,26230,40120,20140,24778,31934,31923,32463,20117,35686,26223,39048,38745,22659,25964,38236,24452,30153,38742,31455,31454,20928,28847,31384,25578,31350,32416,29590,38893,20037,28792,20061,37202,21417,25937,26087,33276,33285,21646,23601,30106,38816,25304,29401,30141,23621,39545,33738,23616,21632,30697,20030,27822,32858,25298,25454,24040,20855,36317,36382,38191,20465,21477,24807,28844,21095,25424,40515,23071,20518,30519,21367,32482,25733,25899,25225,25496,20500,29237,35273,20915,35776,32477,22343,33740,38055,20891,21531,23803,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32316,32317,32318,32319,32320,32322,32323,32324,32325,32326,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,20426,31459,27994,37089,39567,21888,21654,21345,21679,24320,25577,26999,20975,24936,21002,22570,21208,22350,30733,30475,24247,24951,31968,25179,25239,20130,28821,32771,25335,28900,38752,22391,33499,26607,26869,30933,39063,31185,22771,21683,21487,28212,20811,21051,23458,35838,32943,21827,22438,24691,22353,21549,31354,24656,23380,25511,25248,21475,25187,23495,26543,21741,31391,33510,37239,24211,35044,22840,22446,25358,36328,33007,22359,31607,20393,24555,23485,27454,21281,31568,29378,26694,30719,30518,26103,20917,20111,30420,23743,31397,33909,22862,39745,20608,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32412,32413,32414,32430,32436,32443,32444,32470,32484,32492,32505,32522,32528,32542,32567,32569,32571,32572,32573,32574,32575,32576,32577,32579,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32594,32595,39304,24871,28291,22372,26118,25414,22256,25324,25193,24275,38420,22403,25289,21895,34593,33098,36771,21862,33713,26469,36182,34013,23146,26639,25318,31726,38417,20848,28572,35888,25597,35272,25042,32518,28866,28389,29701,27028,29436,24266,37070,26391,28010,25438,21171,29282,32769,20332,23013,37226,28889,28061,21202,20048,38647,38253,34174,30922,32047,20769,22418,25794,32907,31867,27882,26865,26974,20919,21400,26792,29313,40654,31729,29432,31163,28435,29702,26446,37324,40100,31036,33673,33620,21519,26647,20029,21385,21169,30782,21382,21033,20616,20363,20432,32598,32601,32603,32604,32605,32606,32608,32611,32612,32613,32614,32615,32619,32620,32621,32623,32624,32627,32629,32630,32631,32632,32634,32635,32636,32637,32639,32640,32642,32643,32644,32645,32646,32647,32648,32649,32651,32653,32655,32656,32657,32658,32659,32661,32662,32663,32664,32665,32667,32668,32672,32674,32675,32677,32678,32680,32681,32682,32683,32684,32685,32686,32689,32691,32692,32693,32694,32695,32698,32699,32702,32704,32706,32707,32708,32710,32711,32712,32713,32715,32717,32719,32720,32721,32722,32723,32726,32727,32729,32730,32731,32732,32733,32734,32738,32739,30178,31435,31890,27813,38582,21147,29827,21737,20457,32852,33714,36830,38256,24265,24604,28063,24088,25947,33080,38142,24651,28860,32451,31918,20937,26753,31921,33391,20004,36742,37327,26238,20142,35845,25769,32842,20698,30103,29134,23525,36797,28518,20102,25730,38243,24278,26009,21015,35010,28872,21155,29454,29747,26519,30967,38678,20020,37051,40158,28107,20955,36161,21533,25294,29618,33777,38646,40836,38083,20278,32666,20940,28789,38517,23725,39046,21478,20196,28316,29705,27060,30827,39311,30041,21016,30244,27969,26611,20845,40857,32843,21657,31548,31423,32740,32743,32744,32746,32747,32748,32749,32751,32754,32756,32757,32758,32759,32760,32761,32762,32765,32766,32767,32770,32775,32776,32777,32778,32782,32783,32785,32787,32794,32795,32797,32798,32799,32801,32803,32804,32811,32812,32813,32814,32815,32816,32818,32820,32825,32826,32828,32830,32832,32833,32836,32837,32839,32840,32841,32846,32847,32848,32849,32851,32853,32854,32855,32857,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32875,32876,32877,32878,32879,32880,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,38534,22404,25314,38471,27004,23044,25602,31699,28431,38475,33446,21346,39045,24208,28809,25523,21348,34383,40065,40595,30860,38706,36335,36162,40575,28510,31108,24405,38470,25134,39540,21525,38109,20387,26053,23653,23649,32533,34385,27695,24459,29575,28388,32511,23782,25371,23402,28390,21365,20081,25504,30053,25249,36718,20262,20177,27814,32438,35770,33821,34746,32599,36923,38179,31657,39585,35064,33853,27931,39558,32476,22920,40635,29595,30721,34434,39532,39554,22043,21527,22475,20080,40614,21334,36808,33033,30610,39314,34542,28385,34067,26364,24930,28459,32894,32897,32898,32901,32904,32906,32909,32910,32911,32912,32913,32914,32916,32917,32919,32921,32926,32931,32934,32935,32936,32940,32944,32947,32949,32950,32952,32953,32955,32965,32967,32968,32969,32970,32971,32975,32976,32977,32978,32979,32980,32981,32984,32991,32992,32994,32995,32998,33006,33013,33015,33017,33019,33022,33023,33024,33025,33027,33028,33029,33031,33032,33035,33036,33045,33047,33049,33051,33052,33053,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33069,33070,33072,33075,33076,33077,33079,33081,33082,33083,33084,33085,33087,35881,33426,33579,30450,27667,24537,33725,29483,33541,38170,27611,30683,38086,21359,33538,20882,24125,35980,36152,20040,29611,26522,26757,37238,38665,29028,27809,30473,23186,38209,27599,32654,26151,23504,22969,23194,38376,38391,20204,33804,33945,27308,30431,38192,29467,26790,23391,30511,37274,38753,31964,36855,35868,24357,31859,31192,35269,27852,34588,23494,24130,26825,30496,32501,20885,20813,21193,23081,32517,38754,33495,25551,30596,34256,31186,28218,24217,22937,34065,28781,27665,25279,30399,25935,24751,38397,26126,34719,40483,38125,21517,21629,35884,25720,33088,33089,33090,33091,33092,33093,33095,33097,33101,33102,33103,33106,33110,33111,33112,33115,33116,33117,33118,33119,33121,33122,33123,33124,33126,33128,33130,33131,33132,33135,33138,33139,33141,33142,33143,33144,33153,33155,33156,33157,33158,33159,33161,33163,33164,33165,33166,33168,33170,33171,33172,33173,33174,33175,33177,33178,33182,33183,33184,33185,33186,33188,33189,33191,33193,33195,33196,33197,33198,33199,33200,33201,33202,33204,33205,33206,33207,33208,33209,33212,33213,33214,33215,33220,33221,33223,33224,33225,33227,33229,33230,33231,33232,33233,33234,33235,25721,34321,27169,33180,30952,25705,39764,25273,26411,33707,22696,40664,27819,28448,23518,38476,35851,29279,26576,25287,29281,20137,22982,27597,22675,26286,24149,21215,24917,26408,30446,30566,29287,31302,25343,21738,21584,38048,37027,23068,32435,27670,20035,22902,32784,22856,21335,30007,38590,22218,25376,33041,24700,38393,28118,21602,39297,20869,23273,33021,22958,38675,20522,27877,23612,25311,20320,21311,33147,36870,28346,34091,25288,24180,30910,25781,25467,24565,23064,37247,40479,23615,25423,32834,23421,21870,38218,38221,28037,24744,26592,29406,20957,23425,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33252,33253,33254,33256,33257,33259,33262,33263,33264,33265,33266,33269,33270,33271,33272,33273,33274,33277,33279,33283,33287,33288,33289,33290,33291,33294,33295,33297,33299,33301,33302,33303,33304,33305,33306,33309,33312,33316,33317,33318,33319,33321,33326,33330,33338,33340,33341,33343,33344,33345,33346,33347,33349,33350,33352,33354,33356,33357,33358,33360,33361,33362,33363,33364,33365,33366,33367,33369,33371,33372,33373,33374,33376,33377,33378,33379,33380,33381,33382,33383,33385,25319,27870,29275,25197,38062,32445,33043,27987,20892,24324,22900,21162,24594,22899,26262,34384,30111,25386,25062,31983,35834,21734,27431,40485,27572,34261,21589,20598,27812,21866,36276,29228,24085,24597,29750,25293,25490,29260,24472,28227,27966,25856,28504,30424,30928,30460,30036,21028,21467,20051,24222,26049,32810,32982,25243,21638,21032,28846,34957,36305,27873,21624,32986,22521,35060,36180,38506,37197,20329,27803,21943,30406,30768,25256,28921,28558,24429,34028,26842,30844,31735,33192,26379,40527,25447,30896,22383,30738,38713,25209,25259,21128,29749,27607,33386,33387,33388,33389,33393,33397,33398,33399,33400,33403,33404,33408,33409,33411,33413,33414,33415,33417,33420,33424,33427,33428,33429,33430,33434,33435,33438,33440,33442,33443,33447,33458,33461,33462,33466,33467,33468,33471,33472,33474,33475,33477,33478,33481,33488,33494,33497,33498,33501,33506,33511,33512,33513,33514,33516,33517,33518,33520,33522,33523,33525,33526,33528,33530,33532,33533,33534,33535,33536,33546,33547,33549,33552,33554,33555,33558,33560,33561,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33577,33578,33582,33584,33586,33591,33595,33597,21860,33086,30130,30382,21305,30174,20731,23617,35692,31687,20559,29255,39575,39128,28418,29922,31080,25735,30629,25340,39057,36139,21697,32856,20050,22378,33529,33805,24179,20973,29942,35780,23631,22369,27900,39047,23110,30772,39748,36843,31893,21078,25169,38138,20166,33670,33889,33769,33970,22484,26420,22275,26222,28006,35889,26333,28689,26399,27450,26646,25114,22971,19971,20932,28422,26578,27791,20854,26827,22855,27495,30054,23822,33040,40784,26071,31048,31041,39569,36215,23682,20062,20225,21551,22865,30732,22120,27668,36804,24323,27773,27875,35755,25488,33598,33599,33601,33602,33604,33605,33608,33610,33611,33612,33613,33614,33619,33621,33622,33623,33624,33625,33629,33634,33648,33649,33650,33651,33652,33653,33654,33657,33658,33662,33663,33664,33665,33666,33667,33668,33671,33672,33674,33675,33676,33677,33679,33680,33681,33684,33685,33686,33687,33689,33690,33693,33695,33697,33698,33699,33700,33701,33702,33703,33708,33709,33710,33711,33717,33723,33726,33727,33730,33731,33732,33734,33736,33737,33739,33741,33742,33744,33745,33746,33747,33749,33751,33753,33754,33755,33758,33762,33763,33764,33766,33767,33768,33771,33772,33773,24688,27965,29301,25190,38030,38085,21315,36801,31614,20191,35878,20094,40660,38065,38067,21069,28508,36963,27973,35892,22545,23884,27424,27465,26538,21595,33108,32652,22681,34103,24378,25250,27207,38201,25970,24708,26725,30631,20052,20392,24039,38808,25772,32728,23789,20431,31373,20999,33540,19988,24623,31363,38054,20405,20146,31206,29748,21220,33465,25810,31165,23517,27777,38738,36731,27682,20542,21375,28165,25806,26228,27696,24773,39031,35831,24198,29756,31351,31179,19992,37041,29699,27714,22234,37195,27845,36235,21306,34502,26354,36527,23624,39537,28192,33774,33775,33779,33780,33781,33782,33783,33786,33787,33788,33790,33791,33792,33794,33797,33799,33800,33801,33802,33808,33810,33811,33812,33813,33814,33815,33817,33818,33819,33822,33823,33824,33825,33826,33827,33833,33834,33835,33836,33837,33838,33839,33840,33842,33843,33844,33845,33846,33847,33849,33850,33851,33854,33855,33856,33857,33858,33859,33860,33861,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33874,33875,33876,33877,33878,33880,33885,33886,33887,33888,33890,33892,33893,33894,33895,33896,33898,33902,33903,33904,33906,33908,33911,33913,33915,33916,21462,23094,40843,36259,21435,22280,39079,26435,37275,27849,20840,30154,25331,29356,21048,21149,32570,28820,30264,21364,40522,27063,30830,38592,35033,32676,28982,29123,20873,26579,29924,22756,25880,22199,35753,39286,25200,32469,24825,28909,22764,20161,20154,24525,38887,20219,35748,20995,22922,32427,25172,20173,26085,25102,33592,33993,33635,34701,29076,28342,23481,32466,20887,25545,26580,32905,33593,34837,20754,23418,22914,36785,20083,27741,20837,35109,36719,38446,34122,29790,38160,38384,28070,33509,24369,25746,27922,33832,33134,40131,22622,36187,19977,21441,33917,33918,33919,33920,33921,33923,33924,33925,33926,33930,33933,33935,33936,33937,33938,33939,33940,33941,33942,33944,33946,33947,33949,33950,33951,33952,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33968,33969,33971,33973,33974,33975,33979,33980,33982,33984,33986,33987,33989,33990,33991,33992,33995,33996,33998,33999,34002,34004,34005,34007,34008,34009,34010,34011,34012,34014,34017,34018,34020,34023,34024,34025,34026,34027,34029,34030,34031,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34045,34046,34048,34049,34050,20254,25955,26705,21971,20007,25620,39578,25195,23234,29791,33394,28073,26862,20711,33678,30722,26432,21049,27801,32433,20667,21861,29022,31579,26194,29642,33515,26441,23665,21024,29053,34923,38378,38485,25797,36193,33203,21892,27733,25159,32558,22674,20260,21830,36175,26188,19978,23578,35059,26786,25422,31245,28903,33421,21242,38902,23569,21736,37045,32461,22882,36170,34503,33292,33293,36198,25668,23556,24913,28041,31038,35774,30775,30003,21627,20280,36523,28145,23072,32453,31070,27784,23457,23158,29978,32958,24910,28183,22768,29983,29989,29298,21319,32499,34051,34052,34053,34054,34055,34056,34057,34058,34059,34061,34062,34063,34064,34066,34068,34069,34070,34072,34073,34075,34076,34077,34078,34080,34082,34083,34084,34085,34086,34087,34088,34089,34090,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34110,34111,34112,34113,34114,34116,34117,34118,34119,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34135,34136,34138,34139,34140,34141,34143,34144,34145,34146,34147,34149,34150,34151,34153,34154,34155,34156,34157,34158,34159,34160,34161,34163,34165,34166,34167,34168,34172,34173,34175,34176,34177,30465,30427,21097,32988,22307,24072,22833,29422,26045,28287,35799,23608,34417,21313,30707,25342,26102,20160,39135,34432,23454,35782,21490,30690,20351,23630,39542,22987,24335,31034,22763,19990,26623,20107,25325,35475,36893,21183,26159,21980,22124,36866,20181,20365,37322,39280,27663,24066,24643,23460,35270,35797,25910,25163,39318,23432,23551,25480,21806,21463,30246,20861,34092,26530,26803,27530,25234,36755,21460,33298,28113,30095,20070,36174,23408,29087,34223,26257,26329,32626,34560,40653,40736,23646,26415,36848,26641,26463,25101,31446,22661,24246,25968,28465,34178,34179,34182,34184,34185,34186,34187,34188,34189,34190,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34205,34206,34207,34208,34209,34210,34211,34213,34214,34215,34217,34219,34220,34221,34225,34226,34227,34228,34229,34230,34232,34234,34235,34236,34237,34238,34239,34240,34242,34243,34244,34245,34246,34247,34248,34250,34251,34252,34253,34254,34257,34258,34260,34262,34263,34264,34265,34266,34267,34269,34270,34271,34272,34273,34274,34275,34277,34278,34279,34280,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,24661,21047,32781,25684,34928,29993,24069,26643,25332,38684,21452,29245,35841,27700,30561,31246,21550,30636,39034,33308,35828,30805,26388,28865,26031,25749,22070,24605,31169,21496,19997,27515,32902,23546,21987,22235,20282,20284,39282,24051,26494,32824,24578,39042,36865,23435,35772,35829,25628,33368,25822,22013,33487,37221,20439,32032,36895,31903,20723,22609,28335,23487,35785,32899,37240,33948,31639,34429,38539,38543,32485,39635,30862,23681,31319,36930,38567,31071,23385,25439,31499,34001,26797,21766,32553,29712,32034,38145,25152,22604,20182,23427,22905,22612,34297,34298,34300,34301,34302,34304,34305,34306,34307,34308,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34322,34323,34324,34325,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34344,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34361,34362,34363,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34386,34387,34389,34390,34391,34392,34393,34395,34396,34397,34399,34400,34401,34403,34404,34405,34406,34407,34408,34409,34410,29549,25374,36427,36367,32974,33492,25260,21488,27888,37214,22826,24577,27760,22349,25674,36138,30251,28393,22363,27264,30192,28525,35885,35848,22374,27631,34962,30899,25506,21497,28845,27748,22616,25642,22530,26848,33179,21776,31958,20504,36538,28108,36255,28907,25487,28059,28372,32486,33796,26691,36867,28120,38518,35752,22871,29305,34276,33150,30140,35466,26799,21076,36386,38161,25552,39064,36420,21884,20307,26367,22159,24789,28053,21059,23625,22825,28155,22635,3e4,29980,24684,33300,33094,25361,26465,36834,30522,36339,36148,38081,24086,21381,21548,28867,34413,34415,34416,34418,34419,34420,34421,34422,34423,34424,34435,34436,34437,34438,34439,34440,34441,34446,34447,34448,34449,34450,34452,34454,34455,34456,34457,34458,34459,34462,34463,34464,34465,34466,34469,34470,34475,34477,34478,34482,34483,34487,34488,34489,34491,34492,34493,34494,34495,34497,34498,34499,34501,34504,34508,34509,34514,34515,34517,34518,34519,34522,34524,34525,34528,34529,34530,34531,34533,34534,34535,34536,34538,34539,34540,34543,34549,34550,34551,34554,34555,34556,34557,34559,34561,34564,34565,34566,34571,34572,34574,34575,34576,34577,34580,34582,27712,24311,20572,20141,24237,25402,33351,36890,26704,37230,30643,21516,38108,24420,31461,26742,25413,31570,32479,30171,20599,25237,22836,36879,20984,31171,31361,22270,24466,36884,28034,23648,22303,21520,20820,28237,22242,25512,39059,33151,34581,35114,36864,21534,23663,33216,25302,25176,33073,40501,38464,39534,39548,26925,22949,25299,21822,25366,21703,34521,27964,23043,29926,34972,27498,22806,35916,24367,28286,29609,39037,20024,28919,23436,30871,25405,26202,30358,24779,23451,23113,19975,33109,27754,29579,20129,26505,32593,24448,26106,26395,24536,22916,23041,34585,34587,34589,34591,34592,34596,34598,34599,34600,34602,34603,34604,34605,34607,34608,34610,34611,34613,34614,34616,34617,34618,34620,34621,34624,34625,34626,34627,34628,34629,34630,34634,34635,34637,34639,34640,34641,34642,34644,34645,34646,34648,34650,34651,34652,34653,34654,34655,34657,34658,34662,34663,34664,34665,34666,34667,34668,34669,34671,34673,34674,34675,34677,34679,34680,34681,34682,34687,34688,34689,34692,34694,34695,34697,34698,34700,34702,34703,34704,34705,34706,34708,34709,34710,34712,34713,34714,34715,34716,34717,34718,34720,34721,34722,34723,34724,24013,24494,21361,38886,36829,26693,22260,21807,24799,20026,28493,32500,33479,33806,22996,20255,20266,23614,32428,26410,34074,21619,30031,32963,21890,39759,20301,28205,35859,23561,24944,21355,30239,28201,34442,25991,38395,32441,21563,31283,32010,38382,21985,32705,29934,25373,34583,28065,31389,25105,26017,21351,25569,27779,24043,21596,38056,20044,27745,35820,23627,26080,33436,26791,21566,21556,27595,27494,20116,25410,21320,33310,20237,20398,22366,25098,38654,26212,29289,21247,21153,24735,35823,26132,29081,26512,35199,30802,30717,26224,22075,21560,38177,29306,34725,34726,34727,34729,34730,34734,34736,34737,34738,34740,34742,34743,34744,34745,34747,34748,34750,34751,34753,34754,34755,34756,34757,34759,34760,34761,34764,34765,34766,34767,34768,34772,34773,34774,34775,34776,34777,34778,34780,34781,34782,34783,34785,34786,34787,34788,34790,34791,34792,34793,34795,34796,34797,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34810,34811,34812,34813,34815,34816,34817,34818,34820,34821,34822,34823,34824,34825,34827,34828,34829,34830,34831,34832,34833,34834,34836,34839,34840,34841,34842,34844,34845,34846,34847,34848,34851,31232,24687,24076,24713,33181,22805,24796,29060,28911,28330,27728,29312,27268,34989,24109,20064,23219,21916,38115,27927,31995,38553,25103,32454,30606,34430,21283,38686,36758,26247,23777,20384,29421,19979,21414,22799,21523,25472,38184,20808,20185,40092,32420,21688,36132,34900,33335,38386,28046,24358,23244,26174,38505,29616,29486,21439,33146,39301,32673,23466,38519,38480,32447,30456,21410,38262,39321,31665,35140,28248,20065,32724,31077,35814,24819,21709,20139,39033,24055,27233,20687,21521,35937,33831,30813,38660,21066,21742,22179,38144,28040,23477,28102,26195,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34867,34868,34869,34870,34871,34872,34874,34875,34877,34878,34879,34881,34882,34883,34886,34887,34888,34889,34890,34891,34894,34895,34896,34897,34898,34899,34901,34902,34904,34906,34907,34908,34909,34910,34911,34912,34918,34919,34922,34925,34927,34929,34931,34932,34933,34934,34936,34937,34938,34939,34940,34944,34947,34950,34951,34953,34954,34956,34958,34959,34960,34961,34963,34964,34965,34967,34968,34969,34970,34971,34973,34974,34975,34976,34977,34979,34981,34982,34983,34984,34985,34986,23567,23389,26657,32918,21880,31505,25928,26964,20123,27463,34638,38795,21327,25375,25658,37034,26012,32961,35856,20889,26800,21368,34809,25032,27844,27899,35874,23633,34218,33455,38156,27427,36763,26032,24571,24515,20449,34885,26143,33125,29481,24826,20852,21009,22411,24418,37026,34892,37266,24184,26447,24615,22995,20804,20982,33016,21256,27769,38596,29066,20241,20462,32670,26429,21957,38152,31168,34966,32483,22687,25100,38656,34394,22040,39035,24464,35768,33988,37207,21465,26093,24207,30044,24676,32110,23167,32490,32493,36713,21927,23459,24748,26059,29572,34988,34990,34991,34992,34994,34995,34996,34997,34998,35e3,35001,35002,35003,35005,35006,35007,35008,35011,35012,35015,35016,35018,35019,35020,35021,35023,35024,35025,35027,35030,35031,35034,35035,35036,35037,35038,35040,35041,35046,35047,35049,35050,35051,35052,35053,35054,35055,35058,35061,35062,35063,35066,35067,35069,35071,35072,35073,35075,35076,35077,35078,35079,35080,35081,35083,35084,35085,35086,35087,35089,35092,35093,35094,35095,35096,35100,35101,35102,35103,35104,35106,35107,35108,35110,35111,35112,35113,35116,35117,35118,35119,35121,35122,35123,35125,35127,36873,30307,30505,32474,38772,34203,23398,31348,38634,34880,21195,29071,24490,26092,35810,23547,39535,24033,27529,27739,35757,35759,36874,36805,21387,25276,40486,40493,21568,20011,33469,29273,34460,23830,34905,28079,38597,21713,20122,35766,28937,21693,38409,28895,28153,30416,20005,30740,34578,23721,24310,35328,39068,38414,28814,27839,22852,25513,30524,34893,28436,33395,22576,29141,21388,30746,38593,21761,24422,28976,23476,35866,39564,27523,22830,40495,31207,26472,25196,20335,30113,32650,27915,38451,27687,20208,30162,20859,26679,28478,36992,33136,22934,29814,35128,35129,35130,35131,35132,35133,35134,35135,35136,35138,35139,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35168,35169,35170,35171,35172,35173,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35196,35197,35198,35200,35202,35204,35205,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,25671,23591,36965,31377,35875,23002,21676,33280,33647,35201,32768,26928,22094,32822,29239,37326,20918,20063,39029,25494,19994,21494,26355,33099,22812,28082,19968,22777,21307,25558,38129,20381,20234,34915,39056,22839,36951,31227,20202,33008,30097,27778,23452,23016,24413,26885,34433,20506,24050,20057,30691,20197,33402,25233,26131,37009,23673,20159,24441,33222,36920,32900,30123,20134,35028,24847,27589,24518,20041,30410,28322,35811,35758,35850,35793,24322,32764,32716,32462,33589,33643,22240,27575,38899,38452,23035,21535,38134,28139,23493,39278,23609,24341,38544,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35267,35277,35283,35284,35285,35287,35288,35289,35291,35293,35295,35296,35297,35298,35300,35303,35304,35305,35306,35308,35309,35310,35312,35313,35314,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35329,35330,35331,35332,35333,35334,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,21360,33521,27185,23156,40560,24212,32552,33721,33828,33829,33639,34631,36814,36194,30408,24433,39062,30828,26144,21727,25317,20323,33219,30152,24248,38605,36362,34553,21647,27891,28044,27704,24703,21191,29992,24189,20248,24736,24551,23588,30001,37038,38080,29369,27833,28216,37193,26377,21451,21491,20305,37321,35825,21448,24188,36802,28132,20110,30402,27014,34398,24858,33286,20313,20446,36926,40060,24841,28189,28180,38533,20104,23089,38632,19982,23679,31161,23431,35821,32701,29577,22495,33419,37057,21505,36935,21947,23786,24481,24840,27442,29425,32946,35465,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35391,35392,35393,35394,35395,35396,35397,35398,35399,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35450,35451,35452,35453,35454,35455,35456,28020,23507,35029,39044,35947,39533,40499,28170,20900,20803,22435,34945,21407,25588,36757,22253,21592,22278,29503,28304,32536,36828,33489,24895,24616,38498,26352,32422,36234,36291,38053,23731,31908,26376,24742,38405,32792,20113,37095,21248,38504,20801,36816,34164,37213,26197,38901,23381,21277,30776,26434,26685,21705,28798,23472,36733,20877,22312,21681,25874,26242,36190,36163,33039,33900,36973,31967,20991,34299,26531,26089,28577,34468,36481,22122,36896,30338,28790,29157,36131,25321,21017,27901,36156,24590,22686,24974,26366,36192,25166,21939,28195,26413,36711,35457,35458,35459,35460,35461,35462,35463,35464,35467,35468,35469,35470,35471,35472,35473,35474,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,38113,38392,30504,26629,27048,21643,20045,28856,35784,25688,25995,23429,31364,20538,23528,30651,27617,35449,31896,27838,30415,26025,36759,23853,23637,34360,26632,21344,25112,31449,28251,32509,27167,31456,24432,28467,24352,25484,28072,26454,19976,24080,36134,20183,32960,30260,38556,25307,26157,25214,27836,36213,29031,32617,20806,32903,21484,36974,25240,21746,34544,36761,32773,38167,34071,36825,27993,29645,26015,30495,29956,30759,33275,36126,38024,20390,26517,30137,35786,38663,25391,38215,38453,33976,25379,30529,24449,29424,20105,24596,25972,25327,27491,25919,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,24103,30151,37073,35777,33437,26525,25903,21553,34584,30693,32930,33026,27713,20043,32455,32844,30452,26893,27542,25191,20540,20356,22336,25351,27490,36286,21482,26088,32440,24535,25370,25527,33267,33268,32622,24092,23769,21046,26234,31209,31258,36136,28825,30164,28382,27835,31378,20013,30405,24544,38047,34935,32456,31181,32959,37325,20210,20247,33311,21608,24030,27954,35788,31909,36724,32920,24090,21650,30385,23449,26172,39588,29664,26666,34523,26417,29482,35832,35803,36880,31481,28891,29038,25284,30633,22065,20027,33879,26609,21161,34496,36142,38136,31569,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35687,35688,35689,35690,35691,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35756,35761,35771,35783,35792,35818,35849,35870,20303,27880,31069,39547,25235,29226,25341,19987,30742,36716,25776,36186,31686,26729,24196,35013,22918,25758,22766,29366,26894,38181,36861,36184,22368,32512,35846,20934,25417,25305,21331,26700,29730,33537,37196,21828,30528,28796,27978,20857,21672,36164,23039,28363,28100,23388,32043,20180,31869,28371,23376,33258,28173,23383,39683,26837,36394,23447,32508,24635,32437,37049,36208,22863,25549,31199,36275,21330,26063,31062,35781,38459,32452,38075,32386,22068,37257,26368,32618,23562,36981,26152,24038,20304,26590,20570,20316,22352,24231,59408,59409,59410,59411,59412,35896,35897,35898,35899,35900,35901,35902,35903,35904,35906,35907,35908,35909,35912,35914,35915,35917,35918,35919,35920,35921,35922,35923,35924,35926,35927,35928,35929,35931,35932,35933,35934,35935,35936,35939,35940,35941,35942,35943,35944,35945,35948,35949,35950,35951,35952,35953,35954,35956,35957,35958,35959,35963,35964,35965,35966,35967,35968,35969,35971,35972,35974,35975,35976,35979,35981,35982,35983,35984,35985,35986,35987,35989,35990,35991,35993,35994,35995,35996,35997,35998,35999,36e3,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,20109,19980,20800,19984,24319,21317,19989,20120,19998,39730,23404,22121,20008,31162,20031,21269,20039,22829,29243,21358,27664,22239,32996,39319,27603,30590,40727,20022,20127,40720,20060,20073,20115,33416,23387,21868,22031,20164,21389,21405,21411,21413,21422,38757,36189,21274,21493,21286,21294,21310,36188,21350,21347,20994,21e3,21006,21037,21043,21055,21056,21068,21086,21089,21084,33967,21117,21122,21121,21136,21139,20866,32596,20155,20163,20169,20162,20200,20193,20203,20190,20251,20211,20258,20324,20213,20261,20263,20233,20267,20318,20327,25912,20314,20317,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,20319,20311,20274,20285,20342,20340,20369,20361,20355,20367,20350,20347,20394,20348,20396,20372,20454,20456,20458,20421,20442,20451,20444,20433,20447,20472,20521,20556,20467,20524,20495,20526,20525,20478,20508,20492,20517,20520,20606,20547,20565,20552,20558,20588,20603,20645,20647,20649,20666,20694,20742,20717,20716,20710,20718,20743,20747,20189,27709,20312,20325,20430,40864,27718,31860,20846,24061,40649,39320,20865,22804,21241,21261,35335,21264,20971,22809,20821,20128,20822,20147,34926,34980,20149,33044,35026,31104,23348,34819,32696,20907,20913,20925,20924,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36128,36177,36178,36183,36191,36197,36200,36201,36202,36204,36206,36207,36209,36210,36216,36217,36218,36219,36220,36221,36222,36223,36224,36226,36227,36230,36231,36232,36233,36236,36237,36238,36239,36240,36242,36243,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36256,36257,36258,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36274,36278,36279,36281,36283,36285,36288,36289,36290,36293,36295,36296,36297,36298,36301,36304,36306,36307,36308,20935,20886,20898,20901,35744,35750,35751,35754,35764,35765,35767,35778,35779,35787,35791,35790,35794,35795,35796,35798,35800,35801,35804,35807,35808,35812,35816,35817,35822,35824,35827,35830,35833,35836,35839,35840,35842,35844,35847,35852,35855,35857,35858,35860,35861,35862,35865,35867,35864,35869,35871,35872,35873,35877,35879,35882,35883,35886,35887,35890,35891,35893,35894,21353,21370,38429,38434,38433,38449,38442,38461,38460,38466,38473,38484,38495,38503,38508,38514,38516,38536,38541,38551,38576,37015,37019,37021,37017,37036,37025,37044,37043,37046,37050,36309,36312,36313,36316,36320,36321,36322,36325,36326,36327,36329,36333,36334,36336,36337,36338,36340,36342,36348,36350,36351,36352,36353,36354,36355,36356,36358,36359,36360,36363,36365,36366,36368,36369,36370,36371,36373,36374,36375,36376,36377,36378,36379,36380,36384,36385,36388,36389,36390,36391,36392,36395,36397,36400,36402,36403,36404,36406,36407,36408,36411,36412,36414,36415,36419,36421,36422,36428,36429,36430,36431,36432,36435,36436,36437,36438,36439,36440,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36455,36456,36458,36459,36462,36465,37048,37040,37071,37061,37054,37072,37060,37063,37075,37094,37090,37084,37079,37083,37099,37103,37118,37124,37154,37150,37155,37169,37167,37177,37187,37190,21005,22850,21154,21164,21165,21182,21759,21200,21206,21232,21471,29166,30669,24308,20981,20988,39727,21430,24321,30042,24047,22348,22441,22433,22654,22716,22725,22737,22313,22316,22314,22323,22329,22318,22319,22364,22331,22338,22377,22405,22379,22406,22396,22395,22376,22381,22390,22387,22445,22436,22412,22450,22479,22439,22452,22419,22432,22485,22488,22490,22489,22482,22456,22516,22511,22520,22500,22493,36467,36469,36471,36472,36473,36474,36475,36477,36478,36480,36482,36483,36484,36486,36488,36489,36490,36491,36492,36493,36494,36497,36498,36499,36501,36502,36503,36504,36505,36506,36507,36509,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36525,36526,36528,36529,36531,36532,36533,36534,36535,36536,36537,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,22539,22541,22525,22509,22528,22558,22553,22596,22560,22629,22636,22657,22665,22682,22656,39336,40729,25087,33401,33405,33407,33423,33418,33448,33412,33422,33425,33431,33433,33451,33464,33470,33456,33480,33482,33507,33432,33463,33454,33483,33484,33473,33449,33460,33441,33450,33439,33476,33486,33444,33505,33545,33527,33508,33551,33543,33500,33524,33490,33496,33548,33531,33491,33553,33562,33542,33556,33557,33504,33493,33564,33617,33627,33628,33544,33682,33596,33588,33585,33691,33630,33583,33615,33607,33603,33631,33600,33559,33632,33581,33594,33587,33638,33637,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,33640,33563,33641,33644,33642,33645,33646,33712,33656,33715,33716,33696,33706,33683,33692,33669,33660,33718,33705,33661,33720,33659,33688,33694,33704,33722,33724,33729,33793,33765,33752,22535,33816,33803,33757,33789,33750,33820,33848,33809,33798,33748,33759,33807,33795,33784,33785,33770,33733,33728,33830,33776,33761,33884,33873,33882,33881,33907,33927,33928,33914,33929,33912,33852,33862,33897,33910,33932,33934,33841,33901,33985,33997,34e3,34022,33981,34003,33994,33983,33978,34016,33953,33977,33972,33943,34021,34019,34060,29965,34104,34032,34105,34079,34106,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36714,36736,36748,36754,36765,36768,36769,36770,36772,36773,36774,36775,36778,36780,36781,36782,36783,36786,36787,36788,36789,36791,36792,36794,36795,36796,36799,36800,36803,36806,36809,36810,36811,36812,36813,36815,36818,36822,36823,36826,36832,36833,36835,36839,36844,36847,36849,36850,36852,36853,36854,36858,36859,36860,36862,36863,36871,36872,36876,36878,36883,36885,36888,34134,34107,34047,34044,34137,34120,34152,34148,34142,34170,30626,34115,34162,34171,34212,34216,34183,34191,34169,34222,34204,34181,34233,34231,34224,34259,34241,34268,34303,34343,34309,34345,34326,34364,24318,24328,22844,22849,32823,22869,22874,22872,21263,23586,23589,23596,23604,25164,25194,25247,25275,25290,25306,25303,25326,25378,25334,25401,25419,25411,25517,25590,25457,25466,25486,25524,25453,25516,25482,25449,25518,25532,25586,25592,25568,25599,25540,25566,25550,25682,25542,25534,25669,25665,25611,25627,25632,25612,25638,25633,25694,25732,25709,25750,36889,36892,36899,36900,36901,36903,36904,36905,36906,36907,36908,36912,36913,36914,36915,36916,36919,36921,36922,36925,36927,36928,36931,36933,36934,36936,36937,36938,36939,36940,36942,36948,36949,36950,36953,36954,36956,36957,36958,36959,36960,36961,36964,36966,36967,36969,36970,36971,36972,36975,36976,36977,36978,36979,36982,36983,36984,36985,36986,36987,36988,36990,36993,36996,36997,36998,36999,37001,37002,37004,37005,37006,37007,37008,37010,37012,37014,37016,37018,37020,37022,37023,37024,37028,37029,37031,37032,37033,37035,37037,37042,37047,37052,37053,37055,37056,25722,25783,25784,25753,25786,25792,25808,25815,25828,25826,25865,25893,25902,24331,24530,29977,24337,21343,21489,21501,21481,21480,21499,21522,21526,21510,21579,21586,21587,21588,21590,21571,21537,21591,21593,21539,21554,21634,21652,21623,21617,21604,21658,21659,21636,21622,21606,21661,21712,21677,21698,21684,21714,21671,21670,21715,21716,21618,21667,21717,21691,21695,21708,21721,21722,21724,21673,21674,21668,21725,21711,21726,21787,21735,21792,21757,21780,21747,21794,21795,21775,21777,21799,21802,21863,21903,21941,21833,21869,21825,21845,21823,21840,21820,37058,37059,37062,37064,37065,37067,37068,37069,37074,37076,37077,37078,37080,37081,37082,37086,37087,37088,37091,37092,37093,37097,37098,37100,37102,37104,37105,37106,37107,37109,37110,37111,37113,37114,37115,37116,37119,37120,37121,37123,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37146,37147,37148,37149,37151,37152,37153,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37168,37170,37171,37172,37173,37174,37175,37176,37178,37179,37180,37181,37182,37183,37184,37185,37186,37188,21815,21846,21877,21878,21879,21811,21808,21852,21899,21970,21891,21937,21945,21896,21889,21919,21886,21974,21905,21883,21983,21949,21950,21908,21913,21994,22007,21961,22047,21969,21995,21996,21972,21990,21981,21956,21999,21989,22002,22003,21964,21965,21992,22005,21988,36756,22046,22024,22028,22017,22052,22051,22014,22016,22055,22061,22104,22073,22103,22060,22093,22114,22105,22108,22092,22100,22150,22116,22129,22123,22139,22140,22149,22163,22191,22228,22231,22237,22241,22261,22251,22265,22271,22276,22282,22281,22300,24079,24089,24084,24081,24113,24123,24124,37189,37191,37192,37201,37203,37204,37205,37206,37208,37209,37211,37212,37215,37216,37222,37223,37224,37227,37229,37235,37242,37243,37244,37248,37249,37250,37251,37252,37254,37256,37258,37262,37263,37267,37268,37269,37270,37271,37272,37273,37276,37277,37278,37279,37280,37281,37284,37285,37286,37287,37288,37289,37291,37292,37296,37297,37298,37299,37302,37303,37304,37305,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37320,37323,37328,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37341,37342,37343,37344,37345,37346,37347,37348,37349,24119,24132,24148,24155,24158,24161,23692,23674,23693,23696,23702,23688,23704,23705,23697,23706,23708,23733,23714,23741,23724,23723,23729,23715,23745,23735,23748,23762,23780,23755,23781,23810,23811,23847,23846,23854,23844,23838,23814,23835,23896,23870,23860,23869,23916,23899,23919,23901,23915,23883,23882,23913,23924,23938,23961,23965,35955,23991,24005,24435,24439,24450,24455,24457,24460,24469,24473,24476,24488,24493,24501,24508,34914,24417,29357,29360,29364,29367,29368,29379,29377,29390,29389,29394,29416,29423,29417,29426,29428,29431,29441,29427,29443,29434,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,29435,29463,29459,29473,29450,29470,29469,29461,29474,29497,29477,29484,29496,29489,29520,29517,29527,29536,29548,29551,29566,33307,22821,39143,22820,22786,39267,39271,39272,39273,39274,39275,39276,39284,39287,39293,39296,39300,39303,39306,39309,39312,39313,39315,39316,39317,24192,24209,24203,24214,24229,24224,24249,24245,24254,24243,36179,24274,24273,24283,24296,24298,33210,24516,24521,24534,24527,24579,24558,24580,24545,24548,24574,24581,24582,24554,24557,24568,24601,24629,24614,24603,24591,24589,24617,24619,24586,24639,24609,24696,24697,24699,24698,24642,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,24682,24701,24726,24730,24749,24733,24707,24722,24716,24731,24812,24763,24753,24797,24792,24774,24794,24756,24864,24870,24853,24867,24820,24832,24846,24875,24906,24949,25004,24980,24999,25015,25044,25077,24541,38579,38377,38379,38385,38387,38389,38390,38396,38398,38403,38404,38406,38408,38410,38411,38412,38413,38415,38418,38421,38422,38423,38425,38426,20012,29247,25109,27701,27732,27740,27722,27811,27781,27792,27796,27788,27752,27753,27764,27766,27782,27817,27856,27860,27821,27895,27896,27889,27863,27826,27872,27862,27898,27883,27886,27825,27859,27887,27902,37544,37545,37546,37547,37548,37549,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,27961,27943,27916,27971,27976,27911,27908,27929,27918,27947,27981,27950,27957,27930,27983,27986,27988,27955,28049,28015,28062,28064,27998,28051,28052,27996,28e3,28028,28003,28186,28103,28101,28126,28174,28095,28128,28177,28134,28125,28121,28182,28075,28172,28078,28203,28270,28238,28267,28338,28255,28294,28243,28244,28210,28197,28228,28383,28337,28312,28384,28461,28386,28325,28327,28349,28347,28343,28375,28340,28367,28303,28354,28319,28514,28486,28487,28452,28437,28409,28463,28470,28491,28532,28458,28425,28457,28553,28557,28556,28536,28530,28540,28538,28625,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37739,28617,28583,28601,28598,28610,28641,28654,28638,28640,28655,28698,28707,28699,28729,28725,28751,28766,23424,23428,23445,23443,23461,23480,29999,39582,25652,23524,23534,35120,23536,36423,35591,36790,36819,36821,36837,36846,36836,36841,36838,36851,36840,36869,36868,36875,36902,36881,36877,36886,36897,36917,36918,36909,36911,36932,36945,36946,36944,36968,36952,36962,36955,26297,36980,36989,36994,37e3,36995,37003,24400,24407,24406,24408,23611,21675,23632,23641,23409,23651,23654,32700,24362,24361,24365,33396,24380,39739,23662,22913,22915,22925,22953,22954,22947,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37835,37836,37837,22935,22986,22955,22942,22948,22994,22962,22959,22999,22974,23045,23046,23005,23048,23011,23e3,23033,23052,23049,23090,23092,23057,23075,23059,23104,23143,23114,23125,23100,23138,23157,33004,23210,23195,23159,23162,23230,23275,23218,23250,23252,23224,23264,23267,23281,23254,23270,23256,23260,23305,23319,23318,23346,23351,23360,23573,23580,23386,23397,23411,23377,23379,23394,39541,39543,39544,39546,39551,39549,39552,39553,39557,39560,39562,39568,39570,39571,39574,39576,39579,39580,39581,39583,39584,39586,39587,39589,39591,32415,32417,32419,32421,32424,32425,37838,37839,37840,37841,37842,37843,37844,37845,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,32429,32432,32446,32448,32449,32450,32457,32459,32460,32464,32468,32471,32475,32480,32481,32488,32491,32494,32495,32497,32498,32525,32502,32506,32507,32510,32513,32514,32515,32519,32520,32523,32524,32527,32529,32530,32535,32537,32540,32539,32543,32545,32546,32547,32548,32549,32550,32551,32554,32555,32556,32557,32559,32560,32561,32562,32563,32565,24186,30079,24027,30014,37013,29582,29585,29614,29602,29599,29647,29634,29649,29623,29619,29632,29641,29640,29669,29657,39036,29706,29673,29671,29662,29626,29682,29711,29738,29787,29734,29733,29736,29744,29742,29740,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37996,37997,37998,37999,38e3,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38033,38038,38040,38087,38095,38099,38100,38106,38118,38139,38172,38176,29723,29722,29761,29788,29783,29781,29785,29815,29805,29822,29852,29838,29824,29825,29831,29835,29854,29864,29865,29840,29863,29906,29882,38890,38891,38892,26444,26451,26462,26440,26473,26533,26503,26474,26483,26520,26535,26485,26536,26526,26541,26507,26487,26492,26608,26633,26584,26634,26601,26544,26636,26585,26549,26586,26547,26589,26624,26563,26552,26594,26638,26561,26621,26674,26675,26720,26721,26702,26722,26692,26724,26755,26653,26709,26726,26689,26727,26688,26686,26698,26697,26665,26805,26767,26740,26743,26771,26731,26818,26990,26876,26911,26912,26873,38183,38195,38205,38211,38216,38219,38229,38234,38240,38254,38260,38261,38263,38264,38265,38266,38267,38268,38269,38270,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,26916,26864,26891,26881,26967,26851,26896,26993,26937,26976,26946,26973,27012,26987,27008,27032,27e3,26932,27084,27015,27016,27086,27017,26982,26979,27001,27035,27047,27067,27051,27053,27092,27057,27073,27082,27103,27029,27104,27021,27135,27183,27117,27159,27160,27237,27122,27204,27198,27296,27216,27227,27189,27278,27257,27197,27176,27224,27260,27281,27280,27305,27287,27307,29495,29522,27521,27522,27527,27524,27538,27539,27533,27546,27547,27553,27562,36715,36717,36721,36722,36723,36725,36726,36728,36727,36729,36730,36732,36734,36737,36738,36740,36743,36747,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38380,38399,38407,38419,38424,38427,38430,38432,38435,38436,38437,38438,38439,38440,38441,38443,38444,38445,38447,38448,38455,38456,38457,38458,38462,38465,38467,38474,38478,38479,38481,38482,38483,38486,38487,38488,38489,38490,38492,38493,38494,38496,38499,38501,38502,38507,38509,38510,38511,38512,38513,38515,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38535,38537,38538,36749,36750,36751,36760,36762,36558,25099,25111,25115,25119,25122,25121,25125,25124,25132,33255,29935,29940,29951,29967,29969,29971,25908,26094,26095,26096,26122,26137,26482,26115,26133,26112,28805,26359,26141,26164,26161,26166,26165,32774,26207,26196,26177,26191,26198,26209,26199,26231,26244,26252,26279,26269,26302,26331,26332,26342,26345,36146,36147,36150,36155,36157,36160,36165,36166,36168,36169,36167,36173,36181,36185,35271,35274,35275,35276,35278,35279,35280,35281,29294,29343,29277,29286,29295,29310,29311,29316,29323,29325,29327,29330,25352,25394,25520,38540,38542,38545,38546,38547,38549,38550,38554,38555,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38568,38569,38570,38571,38572,38573,38574,38575,38577,38578,38580,38581,38583,38584,38586,38587,38591,38594,38595,38600,38602,38603,38608,38609,38611,38612,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38625,38626,38627,38628,38629,38630,38631,38635,38636,38637,38638,38640,38641,38642,38644,38645,38648,38650,38651,38652,38653,38655,38658,38659,38661,38666,38667,38668,38672,38673,38674,38676,38677,38679,38680,38681,38682,38683,38685,38687,38688,25663,25816,32772,27626,27635,27645,27637,27641,27653,27655,27654,27661,27669,27672,27673,27674,27681,27689,27684,27690,27698,25909,25941,25963,29261,29266,29270,29232,34402,21014,32927,32924,32915,32956,26378,32957,32945,32939,32941,32948,32951,32999,33e3,33001,33002,32987,32962,32964,32985,32973,32983,26384,32989,33003,33009,33012,33005,33037,33038,33010,33020,26389,33042,35930,33078,33054,33068,33048,33074,33096,33100,33107,33140,33113,33114,33137,33120,33129,33148,33149,33133,33127,22605,23221,33160,33154,33169,28373,33187,33194,33228,26406,33226,33211,38689,38690,38691,38692,38693,38694,38695,38696,38697,38699,38700,38702,38703,38705,38707,38708,38709,38710,38711,38714,38715,38716,38717,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38740,38741,38743,38744,38746,38748,38749,38751,38755,38756,38758,38759,38760,38762,38763,38764,38765,38766,38767,38768,38769,38770,38773,38775,38776,38777,38778,38779,38781,38782,38783,38784,38785,38786,38787,38788,38790,38791,38792,38793,38794,38796,38798,38799,38800,38803,38805,38806,38807,38809,38810,38811,38812,38813,33217,33190,27428,27447,27449,27459,27462,27481,39121,39122,39123,39125,39129,39130,27571,24384,27586,35315,26e3,40785,26003,26044,26054,26052,26051,26060,26062,26066,26070,28800,28828,28822,28829,28859,28864,28855,28843,28849,28904,28874,28944,28947,28950,28975,28977,29043,29020,29032,28997,29042,29002,29048,29050,29080,29107,29109,29096,29088,29152,29140,29159,29177,29213,29224,28780,28952,29030,29113,25150,25149,25155,25160,25161,31035,31040,31046,31049,31067,31068,31059,31066,31074,31063,31072,31087,31079,31098,31109,31114,31130,31143,31155,24529,24528,38814,38815,38817,38818,38820,38821,38822,38823,38824,38825,38826,38828,38830,38832,38833,38835,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38888,38894,38895,38896,38897,38898,38900,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,24636,24669,24666,24679,24641,24665,24675,24747,24838,24845,24925,25001,24989,25035,25041,25094,32896,32895,27795,27894,28156,30710,30712,30720,30729,30743,30744,30737,26027,30765,30748,30749,30777,30778,30779,30751,30780,30757,30764,30755,30761,30798,30829,30806,30807,30758,30800,30791,30796,30826,30875,30867,30874,30855,30876,30881,30883,30898,30905,30885,30932,30937,30921,30956,30962,30981,30964,30995,31012,31006,31028,40859,40697,40699,40700,30449,30468,30477,30457,30471,30472,30490,30498,30489,30509,30502,30517,30520,30544,30545,30535,30531,30554,30568,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39e3,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,30562,30565,30591,30605,30589,30592,30604,30609,30623,30624,30640,30645,30653,30010,30016,30030,30027,30024,30043,30066,30073,30083,32600,32609,32607,35400,32616,32628,32625,32633,32641,32638,30413,30437,34866,38021,38022,38023,38027,38026,38028,38029,38031,38032,38036,38039,38037,38042,38043,38044,38051,38052,38059,38058,38061,38060,38063,38064,38066,38068,38070,38071,38072,38073,38074,38076,38077,38079,38084,38088,38089,38090,38091,38092,38093,38094,38096,38097,38098,38101,38102,38103,38105,38104,38107,38110,38111,38112,38114,38116,38117,38119,38120,38122,39023,39024,39025,39026,39027,39028,39051,39054,39058,39061,39065,39075,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39119,39120,39124,39126,39127,39131,39132,39133,39136,39137,39138,39139,39140,39141,39142,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,38121,38123,38126,38127,38131,38132,38133,38135,38137,38140,38141,38143,38147,38146,38150,38151,38153,38154,38157,38158,38159,38162,38163,38164,38165,38166,38168,38171,38173,38174,38175,38178,38186,38187,38185,38188,38193,38194,38196,38198,38199,38200,38204,38206,38207,38210,38197,38212,38213,38214,38217,38220,38222,38223,38226,38227,38228,38230,38231,38232,38233,38235,38238,38239,38237,38241,38242,38244,38245,38246,38247,38248,38249,38250,38251,38252,38255,38257,38258,38259,38202,30695,30700,38601,31189,31213,31203,31211,31238,23879,31235,31234,31262,31252,39176,39177,39178,39179,39180,39182,39183,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39268,39270,39283,39288,39289,39291,39294,39298,39299,39305,31289,31287,31313,40655,39333,31344,30344,30350,30355,30361,30372,29918,29920,29996,40480,40482,40488,40489,40490,40491,40492,40498,40497,40502,40504,40503,40505,40506,40510,40513,40514,40516,40518,40519,40520,40521,40523,40524,40526,40529,40533,40535,40538,40539,40540,40542,40547,40550,40551,40552,40553,40554,40555,40556,40561,40557,40563,30098,30100,30102,30112,30109,30124,30115,30131,30132,30136,30148,30129,30128,30147,30146,30166,30157,30179,30184,30182,30180,30187,30183,30211,30193,30204,30207,30224,30208,30213,30220,30231,30218,30245,30232,30229,30233,39308,39310,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39334,39335,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,30235,30268,30242,30240,30272,30253,30256,30271,30261,30275,30270,30259,30285,30302,30292,30300,30294,30315,30319,32714,31462,31352,31353,31360,31366,31368,31381,31398,31392,31404,31400,31405,31411,34916,34921,34930,34941,34943,34946,34978,35014,34999,35004,35017,35042,35022,35043,35045,35057,35098,35068,35048,35070,35056,35105,35097,35091,35099,35082,35124,35115,35126,35137,35174,35195,30091,32997,30386,30388,30684,32786,32788,32790,32796,32800,32802,32805,32806,32807,32809,32808,32817,32779,32821,32835,32838,32845,32850,32873,32881,35203,39032,39040,39043,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39049,39052,39053,39055,39060,39066,39067,39070,39071,39073,39074,39077,39078,34381,34388,34412,34414,34431,34426,34428,34427,34472,34445,34443,34476,34461,34471,34467,34474,34451,34473,34486,34500,34485,34510,34480,34490,34481,34479,34505,34511,34484,34537,34545,34546,34541,34547,34512,34579,34526,34548,34527,34520,34513,34563,34567,34552,34568,34570,34573,34569,34595,34619,34590,34597,34606,34586,34622,34632,34612,34609,34601,34615,34623,34690,34594,34685,34686,34683,34656,34672,34636,34670,34699,34643,34659,34684,34660,34649,34661,34707,34735,34728,34770,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39538,39555,39561,39565,39566,39572,39573,39577,39590,39593,39594,39595,39596,39597,39598,39599,39602,39603,39604,39605,39609,39611,39613,39614,39615,39619,39620,39622,39623,39624,39625,39626,39629,39630,39631,39632,39634,39636,39637,39638,39639,39641,39642,39643,39644,39645,39646,39648,39650,39651,39652,39653,39655,39656,39657,39658,39660,39662,39664,39665,39666,39667,39668,39669,39670,39671,39672,39674,39676,39677,39678,39679,39680,39681,39682,39684,39685,39686,34758,34696,34693,34733,34711,34691,34731,34789,34732,34741,34739,34763,34771,34749,34769,34752,34762,34779,34794,34784,34798,34838,34835,34814,34826,34843,34849,34873,34876,32566,32578,32580,32581,33296,31482,31485,31496,31491,31492,31509,31498,31531,31503,31559,31544,31530,31513,31534,31537,31520,31525,31524,31539,31550,31518,31576,31578,31557,31605,31564,31581,31584,31598,31611,31586,31602,31601,31632,31654,31655,31672,31660,31645,31656,31621,31658,31644,31650,31659,31668,31697,31681,31692,31709,31706,31717,31718,31722,31756,31742,31740,31759,31766,31755,39687,39689,39690,39691,39692,39693,39694,39696,39697,39698,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39712,39713,39714,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39728,39729,39731,39732,39733,39734,39735,39736,39737,39738,39741,39742,39743,39744,39750,39754,39755,39756,39758,39760,39762,39763,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,31775,31786,31782,31800,31809,31808,33278,33281,33282,33284,33260,34884,33313,33314,33315,33325,33327,33320,33323,33336,33339,33331,33332,33342,33348,33353,33355,33359,33370,33375,33384,34942,34949,34952,35032,35039,35166,32669,32671,32679,32687,32688,32690,31868,25929,31889,31901,31900,31902,31906,31922,31932,31933,31937,31943,31948,31949,31944,31941,31959,31976,33390,26280,32703,32718,32725,32741,32737,32742,32745,32750,32755,31992,32119,32166,32174,32327,32411,40632,40628,36211,36228,36244,36241,36273,36199,36205,35911,35913,37194,37200,37198,37199,37220,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,37218,37217,37232,37225,37231,37245,37246,37234,37236,37241,37260,37253,37264,37261,37265,37282,37283,37290,37293,37294,37295,37301,37300,37306,35925,40574,36280,36331,36357,36441,36457,36277,36287,36284,36282,36292,36310,36311,36314,36318,36302,36303,36315,36294,36332,36343,36344,36323,36345,36347,36324,36361,36349,36372,36381,36383,36396,36398,36387,36399,36410,36416,36409,36405,36413,36401,36425,36417,36418,36433,36434,36426,36464,36470,36476,36463,36468,36485,36495,36500,36496,36508,36510,35960,35970,35978,35973,35992,35988,26011,35286,35294,35290,35292,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,35301,35307,35311,35390,35622,38739,38633,38643,38639,38662,38657,38664,38671,38670,38698,38701,38704,38718,40832,40835,40837,40838,40839,40840,40841,40842,40844,40702,40715,40717,38585,38588,38589,38606,38610,30655,38624,37518,37550,37576,37694,37738,37834,37775,37950,37995,40063,40066,40069,40070,40071,40072,31267,40075,40078,40080,40081,40082,40084,40085,40090,40091,40094,40095,40096,40097,40098,40099,40101,40102,40103,40104,40105,40107,40109,40110,40112,40113,40114,40115,40116,40117,40118,40119,40122,40123,40124,40125,40132,40133,40134,40135,40138,40139,39996,39997,39998,39999,4e4,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40061,40062,40064,40067,40068,40073,40074,40076,40079,40083,40086,40087,40088,40089,40093,40106,40108,40111,40121,40126,40127,40128,40129,40130,40136,40137,40145,40146,40154,40155,40160,40161,40140,40141,40142,40143,40144,40147,40148,40149,40151,40152,40153,40156,40157,40159,40162,38780,38789,38801,38802,38804,38831,38827,38819,38834,38836,39601,39600,39607,40536,39606,39610,39612,39617,39616,39621,39618,39627,39628,39633,39749,39747,39751,39753,39752,39757,39761,39144,39181,39214,39253,39252,39647,39649,39654,39663,39659,39675,39661,39673,39688,39695,39699,39711,39715,40637,40638,32315,40578,40583,40584,40587,40594,37846,40605,40607,40667,40668,40669,40672,40671,40674,40681,40679,40677,40682,40687,40738,40748,40751,40761,40759,40765,40766,40772,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,57908,57909,57910,57911,57912,57913,57914,57915,57916,57917,57918,57919,57920,57921,57922,57923,57924,57925,57926,57927,57928,57929,57930,57931,57932,57933,57934,57935,57936,57937,57938,57939,57940,57941,57942,57943,57944,57945,57946,57947,57948,57949,57950,57951,57952,57953,57954,57955,57956,57957,57958,57959,57960,57961,57962,57963,57964,57965,57966,57967,57968,57969,57970,57971,57972,57973,57974,57975,57976,57977,57978,57979,57980,57981,57982,57983,57984,57985,57986,57987,57988,57989,57990,57991,57992,57993,57994,57995,57996,57997,57998,57999,58e3,58001,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,58002,58003,58004,58005,58006,58007,58008,58009,58010,58011,58012,58013,58014,58015,58016,58017,58018,58019,58020,58021,58022,58023,58024,58025,58026,58027,58028,58029,58030,58031,58032,58033,58034,58035,58036,58037,58038,58039,58040,58041,58042,58043,58044,58045,58046,58047,58048,58049,58050,58051,58052,58053,58054,58055,58056,58057,58058,58059,58060,58061,58062,58063,58064,58065,58066,58067,58068,58069,58070,58071,58072,58073,58074,58075,58076,58077,58078,58079,58080,58081,58082,58083,58084,58085,58086,58087,58088,58089,58090,58091,58092,58093,58094,58095,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,58096,58097,58098,58099,58100,58101,58102,58103,58104,58105,58106,58107,58108,58109,58110,58111,58112,58113,58114,58115,58116,58117,58118,58119,58120,58121,58122,58123,58124,58125,58126,58127,58128,58129,58130,58131,58132,58133,58134,58135,58136,58137,58138,58139,58140,58141,58142,58143,58144,58145,58146,58147,58148,58149,58150,58151,58152,58153,58154,58155,58156,58157,58158,58159,58160,58161,58162,58163,58164,58165,58166,58167,58168,58169,58170,58171,58172,58173,58174,58175,58176,58177,58178,58179,58180,58181,58182,58183,58184,58185,58186,58187,58188,58189,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40484,40487,40494,40496,40500,40507,40508,40512,40525,40528,40530,40531,40532,40534,40537,40541,40543,40544,40545,40546,40549,40558,40559,40562,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40576,40577,40579,40580,40581,40582,40585,40586,40588,40589,40590,40591,40592,40593,40596,40597,40598,40599,40600,40601,40602,40603,40604,40606,40608,40609,40610,40611,40612,40613,40615,40616,40617,40618,58190,58191,58192,58193,58194,58195,58196,58197,58198,58199,58200,58201,58202,58203,58204,58205,58206,58207,58208,58209,58210,58211,58212,58213,58214,58215,58216,58217,58218,58219,58220,58221,58222,58223,58224,58225,58226,58227,58228,58229,58230,58231,58232,58233,58234,58235,58236,58237,58238,58239,58240,58241,58242,58243,58244,58245,58246,58247,58248,58249,58250,58251,58252,58253,58254,58255,58256,58257,58258,58259,58260,58261,58262,58263,58264,58265,58266,58267,58268,58269,58270,58271,58272,58273,58274,58275,58276,58277,58278,58279,58280,58281,58282,58283,40619,40620,40621,40622,40623,40624,40625,40626,40627,40629,40630,40631,40633,40634,40636,40639,40640,40641,40642,40643,40645,40646,40647,40648,40650,40651,40652,40656,40658,40659,40661,40662,40663,40665,40666,40670,40673,40675,40676,40678,40680,40683,40684,40685,40686,40688,40689,40690,40691,40692,40693,40694,40695,40696,40698,40701,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40716,40719,40721,40722,40724,40725,40726,40728,40730,40731,40732,40733,40734,40735,40737,40739,40740,40741,40742,40743,40744,40745,40746,40747,40749,40750,40752,40753,58284,58285,58286,58287,58288,58289,58290,58291,58292,58293,58294,58295,58296,58297,58298,58299,58300,58301,58302,58303,58304,58305,58306,58307,58308,58309,58310,58311,58312,58313,58314,58315,58316,58317,58318,58319,58320,58321,58322,58323,58324,58325,58326,58327,58328,58329,58330,58331,58332,58333,58334,58335,58336,58337,58338,58339,58340,58341,58342,58343,58344,58345,58346,58347,58348,58349,58350,58351,58352,58353,58354,58355,58356,58357,58358,58359,58360,58361,58362,58363,58364,58365,58366,58367,58368,58369,58370,58371,58372,58373,58374,58375,58376,58377,40754,40755,40756,40757,40758,40760,40762,40764,40767,40768,40769,40770,40771,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40833,40834,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40860,40861,40862,40865,40866,40867,40868,40869,63788,63865,63893,63975,63985,58378,58379,58380,58381,58382,58383,58384,58385,58386,58387,58388,58389,58390,58391,58392,58393,58394,58395,58396,58397,58398,58399,58400,58401,58402,58403,58404,58405,58406,58407,58408,58409,58410,58411,58412,58413,58414,58415,58416,58417,58418,58419,58420,58421,58422,58423,58424,58425,58426,58427,58428,58429,58430,58431,58432,58433,58434,58435,58436,58437,58438,58439,58440,58441,58442,58443,58444,58445,58446,58447,58448,58449,58450,58451,58452,58453,58454,58455,58456,58457,58458,58459,58460,58461,58462,58463,58464,58465,58466,58467,58468,58469,58470,58471,64012,64013,64014,64015,64017,64019,64020,64024,64031,64032,64033,64035,64036,64039,64040,64041,11905,59414,59415,59416,11908,13427,13383,11912,11915,59422,13726,13850,13838,11916,11927,14702,14616,59430,14799,14815,14963,14800,59435,59436,15182,15470,15584,11943,59441,59442,11946,16470,16735,11950,17207,11955,11958,11959,59451,17329,17324,11963,17373,17622,18017,17996,59459,18211,18217,18300,18317,11978,18759,18810,18813,18818,18819,18821,18822,18847,18843,18871,18870,59476,59477,19619,19615,19616,19617,19575,19618,19731,19732,19733,19734,19735,19736,19737,19886,59492,58472,58473,58474,58475,58476,58477,58478,58479,58480,58481,58482,58483,58484,58485,58486,58487,58488,58489,58490,58491,58492,58493,58494,58495,58496,58497,58498,58499,58500,58501,58502,58503,58504,58505,58506,58507,58508,58509,58510,58511,58512,58513,58514,58515,58516,58517,58518,58519,58520,58521,58522,58523,58524,58525,58526,58527,58528,58529,58530,58531,58532,58533,58534,58535,58536,58537,58538,58539,58540,58541,58542,58543,58544,58545,58546,58547,58548,58549,58550,58551,58552,58553,58554,58555,58556,58557,58558,58559,58560,58561,58562,58563,58564,58565],"gb18030-ranges":[[0,128],[36,165],[38,169],[45,178],[50,184],[81,216],[89,226],[95,235],[96,238],[100,244],[103,248],[104,251],[105,253],[109,258],[126,276],[133,284],[148,300],[172,325],[175,329],[179,334],[208,364],[306,463],[307,465],[308,467],[309,469],[310,471],[311,473],[312,475],[313,477],[341,506],[428,594],[443,610],[544,712],[545,716],[558,730],[741,930],[742,938],[749,962],[750,970],[805,1026],[819,1104],[820,1106],[7922,8209],[7924,8215],[7925,8218],[7927,8222],[7934,8231],[7943,8241],[7944,8244],[7945,8246],[7950,8252],[8062,8365],[8148,8452],[8149,8454],[8152,8458],[8164,8471],[8174,8482],[8236,8556],[8240,8570],[8262,8596],[8264,8602],[8374,8713],[8380,8720],[8381,8722],[8384,8726],[8388,8731],[8390,8737],[8392,8740],[8393,8742],[8394,8748],[8396,8751],[8401,8760],[8406,8766],[8416,8777],[8419,8781],[8424,8787],[8437,8802],[8439,8808],[8445,8816],[8482,8854],[8485,8858],[8496,8870],[8521,8896],[8603,8979],[8936,9322],[8946,9372],[9046,9548],[9050,9588],[9063,9616],[9066,9622],[9076,9634],[9092,9652],[9100,9662],[9108,9672],[9111,9676],[9113,9680],[9131,9702],[9162,9735],[9164,9738],[9218,9793],[9219,9795],[11329,11906],[11331,11909],[11334,11913],[11336,11917],[11346,11928],[11361,11944],[11363,11947],[11366,11951],[11370,11956],[11372,11960],[11375,11964],[11389,11979],[11682,12284],[11686,12292],[11687,12312],[11692,12319],[11694,12330],[11714,12351],[11716,12436],[11723,12447],[11725,12535],[11730,12543],[11736,12586],[11982,12842],[11989,12850],[12102,12964],[12336,13200],[12348,13215],[12350,13218],[12384,13253],[12393,13263],[12395,13267],[12397,13270],[12510,13384],[12553,13428],[12851,13727],[12962,13839],[12973,13851],[13738,14617],[13823,14703],[13919,14801],[13933,14816],[14080,14964],[14298,15183],[14585,15471],[14698,15585],[15583,16471],[15847,16736],[16318,17208],[16434,17325],[16438,17330],[16481,17374],[16729,17623],[17102,17997],[17122,18018],[17315,18212],[17320,18218],[17402,18301],[17418,18318],[17859,18760],[17909,18811],[17911,18814],[17915,18820],[17916,18823],[17936,18844],[17939,18848],[17961,18872],[18664,19576],[18703,19620],[18814,19738],[18962,19887],[19043,40870],[33469,59244],[33470,59336],[33471,59367],[33484,59413],[33485,59417],[33490,59423],[33497,59431],[33501,59437],[33505,59443],[33513,59452],[33520,59460],[33536,59478],[33550,59493],[37845,63789],[37921,63866],[37948,63894],[38029,63976],[38038,63986],[38064,64016],[38065,64018],[38066,64021],[38069,64025],[38075,64034],[38076,64037],[38078,64042],[39108,65074],[39109,65093],[39113,65107],[39114,65112],[39115,65127],[39116,65132],[39265,65375],[39394,65510],[189e3,65536]],jis0208:[12288,12289,12290,65292,65294,12539,65306,65307,65311,65281,12443,12444,180,65344,168,65342,65507,65343,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,8213,8208,65295,65340,65374,8741,65372,8230,8229,8216,8217,8220,8221,65288,65289,12308,12309,65339,65341,65371,65373,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,65291,65293,177,215,247,65309,8800,65308,65310,8806,8807,8734,8756,9794,9792,176,8242,8243,8451,65509,65284,65504,65505,65285,65283,65286,65290,65312,167,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8251,12306,8594,8592,8593,8595,12307,null,null,null,null,null,null,null,null,null,null,null,8712,8715,8838,8839,8834,8835,8746,8745,null,null,null,null,null,null,null,null,8743,8744,65506,8658,8660,8704,8707,null,null,null,null,null,null,null,null,null,null,null,8736,8869,8978,8706,8711,8801,8786,8810,8811,8730,8765,8733,8757,8747,8748,null,null,null,null,null,null,null,8491,8240,9839,9837,9834,8224,8225,182,null,null,null,null,9711,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,null,null,null,null,null,null,null,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,null,null,null,null,null,null,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,null,null,null,null,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,13129,13076,13090,13133,13080,13095,13059,13110,13137,13143,13069,13094,13091,13099,13130,13115,13212,13213,13214,13198,13199,13252,13217,null,null,null,null,null,null,null,null,13179,12317,12319,8470,13261,8481,12964,12965,12966,12967,12968,12849,12850,12857,13182,13181,13180,8786,8801,8747,8750,8721,8730,8869,8736,8735,8895,8757,8745,8746,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20124,21782,23043,38463,21696,24859,25384,23030,36898,33909,33564,31312,24746,25569,28197,26093,33894,33446,39925,26771,22311,26017,25201,23451,22992,34427,39156,32098,32190,39822,25110,31903,34999,23433,24245,25353,26263,26696,38343,38797,26447,20197,20234,20301,20381,20553,22258,22839,22996,23041,23561,24799,24847,24944,26131,26885,28858,30031,30064,31227,32173,32239,32963,33806,34915,35586,36949,36986,21307,20117,20133,22495,32946,37057,30959,19968,22769,28322,36920,31282,33576,33419,39983,20801,21360,21693,21729,22240,23035,24341,39154,28139,32996,34093,38498,38512,38560,38907,21515,21491,23431,28879,32701,36802,38632,21359,40284,31418,19985,30867,33276,28198,22040,21764,27421,34074,39995,23013,21417,28006,29916,38287,22082,20113,36939,38642,33615,39180,21473,21942,23344,24433,26144,26355,26628,27704,27891,27945,29787,30408,31310,38964,33521,34907,35424,37613,28082,30123,30410,39365,24742,35585,36234,38322,27022,21421,20870,22290,22576,22852,23476,24310,24616,25513,25588,27839,28436,28814,28948,29017,29141,29503,32257,33398,33489,34199,36960,37467,40219,22633,26044,27738,29989,20985,22830,22885,24448,24540,25276,26106,27178,27431,27572,29579,32705,35158,40236,40206,40644,23713,27798,33659,20740,23627,25014,33222,26742,29281,20057,20474,21368,24681,28201,31311,38899,19979,21270,20206,20309,20285,20385,20339,21152,21487,22025,22799,23233,23478,23521,31185,26247,26524,26550,27468,27827,28779,29634,31117,31166,31292,31623,33457,33499,33540,33655,33775,33747,34662,35506,22057,36008,36838,36942,38686,34442,20420,23784,25105,29273,30011,33253,33469,34558,36032,38597,39187,39381,20171,20250,35299,22238,22602,22730,24315,24555,24618,24724,24674,25040,25106,25296,25913,39745,26214,26800,28023,28784,30028,30342,32117,33445,34809,38283,38542,35997,20977,21182,22806,21683,23475,23830,24936,27010,28079,30861,33995,34903,35442,37799,39608,28012,39336,34521,22435,26623,34510,37390,21123,22151,21508,24275,25313,25785,26684,26680,27579,29554,30906,31339,35226,35282,36203,36611,37101,38307,38548,38761,23398,23731,27005,38989,38990,25499,31520,27179,27263,26806,39949,28511,21106,21917,24688,25324,27963,28167,28369,33883,35088,36676,19988,39993,21494,26907,27194,38788,26666,20828,31427,33970,37340,37772,22107,40232,26658,33541,33841,31909,21e3,33477,29926,20094,20355,20896,23506,21002,21208,21223,24059,21914,22570,23014,23436,23448,23515,24178,24185,24739,24863,24931,25022,25563,25954,26577,26707,26874,27454,27475,27735,28450,28567,28485,29872,29976,30435,30475,31487,31649,31777,32233,32566,32752,32925,33382,33694,35251,35532,36011,36996,37969,38291,38289,38306,38501,38867,39208,33304,20024,21547,23736,24012,29609,30284,30524,23721,32747,36107,38593,38929,38996,39e3,20225,20238,21361,21916,22120,22522,22855,23305,23492,23696,24076,24190,24524,25582,26426,26071,26082,26399,26827,26820,27231,24112,27589,27671,27773,30079,31048,23395,31232,32e3,24509,35215,35352,36020,36215,36556,36637,39138,39438,39740,20096,20605,20736,22931,23452,25135,25216,25836,27450,29344,30097,31047,32681,34811,35516,35696,25516,33738,38816,21513,21507,21931,26708,27224,35440,30759,26485,40653,21364,23458,33050,34384,36870,19992,20037,20167,20241,21450,21560,23470,24339,24613,25937,26429,27714,27762,27875,28792,29699,31350,31406,31496,32026,31998,32102,26087,29275,21435,23621,24040,25298,25312,25369,28192,34394,35377,36317,37624,28417,31142,39770,20136,20139,20140,20379,20384,20689,20807,31478,20849,20982,21332,21281,21375,21483,21932,22659,23777,24375,24394,24623,24656,24685,25375,25945,27211,27841,29378,29421,30703,33016,33029,33288,34126,37111,37857,38911,39255,39514,20208,20957,23597,26241,26989,23616,26354,26997,29577,26704,31873,20677,21220,22343,24062,37670,26020,27427,27453,29748,31105,31165,31563,32202,33465,33740,34943,35167,35641,36817,37329,21535,37504,20061,20534,21477,21306,29399,29590,30697,33510,36527,39366,39368,39378,20855,24858,34398,21936,31354,20598,23507,36935,38533,20018,27355,37351,23633,23624,25496,31391,27795,38772,36705,31402,29066,38536,31874,26647,32368,26705,37740,21234,21531,34219,35347,32676,36557,37089,21350,34952,31041,20418,20670,21009,20804,21843,22317,29674,22411,22865,24418,24452,24693,24950,24935,25001,25522,25658,25964,26223,26690,28179,30054,31293,31995,32076,32153,32331,32619,33550,33610,34509,35336,35427,35686,36605,38938,40335,33464,36814,39912,21127,25119,25731,28608,38553,26689,20625,27424,27770,28500,31348,32080,34880,35363,26376,20214,20537,20518,20581,20860,21048,21091,21927,22287,22533,23244,24314,25010,25080,25331,25458,26908,27177,29309,29356,29486,30740,30831,32121,30476,32937,35211,35609,36066,36562,36963,37749,38522,38997,39443,40568,20803,21407,21427,24187,24358,28187,28304,29572,29694,32067,33335,35328,35578,38480,20046,20491,21476,21628,22266,22993,23396,24049,24235,24359,25144,25925,26543,28246,29392,31946,34996,32929,32993,33776,34382,35463,36328,37431,38599,39015,40723,20116,20114,20237,21320,21577,21566,23087,24460,24481,24735,26791,27278,29786,30849,35486,35492,35703,37264,20062,39881,20132,20348,20399,20505,20502,20809,20844,21151,21177,21246,21402,21475,21521,21518,21897,22353,22434,22909,23380,23389,23439,24037,24039,24055,24184,24195,24218,24247,24344,24658,24908,25239,25304,25511,25915,26114,26179,26356,26477,26657,26775,27083,27743,27946,28009,28207,28317,30002,30343,30828,31295,31968,32005,32024,32094,32177,32789,32771,32943,32945,33108,33167,33322,33618,34892,34913,35611,36002,36092,37066,37237,37489,30783,37628,38308,38477,38917,39321,39640,40251,21083,21163,21495,21512,22741,25335,28640,35946,36703,40633,20811,21051,21578,22269,31296,37239,40288,40658,29508,28425,33136,29969,24573,24794,39592,29403,36796,27492,38915,20170,22256,22372,22718,23130,24680,25031,26127,26118,26681,26801,28151,30165,32058,33390,39746,20123,20304,21449,21766,23919,24038,24046,26619,27801,29811,30722,35408,37782,35039,22352,24231,25387,20661,20652,20877,26368,21705,22622,22971,23472,24425,25165,25505,26685,27507,28168,28797,37319,29312,30741,30758,31085,25998,32048,33756,35009,36617,38555,21092,22312,26448,32618,36001,20916,22338,38442,22586,27018,32948,21682,23822,22524,30869,40442,20316,21066,21643,25662,26152,26388,26613,31364,31574,32034,37679,26716,39853,31545,21273,20874,21047,23519,25334,25774,25830,26413,27578,34217,38609,30352,39894,25420,37638,39851,30399,26194,19977,20632,21442,23665,24808,25746,25955,26719,29158,29642,29987,31639,32386,34453,35715,36059,37240,39184,26028,26283,27531,20181,20180,20282,20351,21050,21496,21490,21987,22235,22763,22987,22985,23039,23376,23629,24066,24107,24535,24605,25351,25903,23388,26031,26045,26088,26525,27490,27515,27663,29509,31049,31169,31992,32025,32043,32930,33026,33267,35222,35422,35433,35430,35468,35566,36039,36060,38604,39164,27503,20107,20284,20365,20816,23383,23546,24904,25345,26178,27425,28363,27835,29246,29885,30164,30913,31034,32780,32819,33258,33940,36766,27728,40575,24335,35672,40235,31482,36600,23437,38635,19971,21489,22519,22833,23241,23460,24713,28287,28422,30142,36074,23455,34048,31712,20594,26612,33437,23649,34122,32286,33294,20889,23556,25448,36198,26012,29038,31038,32023,32773,35613,36554,36974,34503,37034,20511,21242,23610,26451,28796,29237,37196,37320,37675,33509,23490,24369,24825,20027,21462,23432,25163,26417,27530,29417,29664,31278,33131,36259,37202,39318,20754,21463,21610,23551,25480,27193,32172,38656,22234,21454,21608,23447,23601,24030,20462,24833,25342,27954,31168,31179,32066,32333,32722,33261,33311,33936,34886,35186,35728,36468,36655,36913,37195,37228,38598,37276,20160,20303,20805,21313,24467,25102,26580,27713,28171,29539,32294,37325,37507,21460,22809,23487,28113,31069,32302,31899,22654,29087,20986,34899,36848,20426,23803,26149,30636,31459,33308,39423,20934,24490,26092,26991,27529,28147,28310,28516,30462,32020,24033,36981,37255,38918,20966,21021,25152,26257,26329,28186,24246,32210,32626,26360,34223,34295,35576,21161,21465,22899,24207,24464,24661,37604,38500,20663,20767,21213,21280,21319,21484,21736,21830,21809,22039,22888,22974,23100,23477,23558,23567,23569,23578,24196,24202,24288,24432,25215,25220,25307,25484,25463,26119,26124,26157,26230,26494,26786,27167,27189,27836,28040,28169,28248,28988,28966,29031,30151,30465,30813,30977,31077,31216,31456,31505,31911,32057,32918,33750,33931,34121,34909,35059,35359,35388,35412,35443,35937,36062,37284,37478,37758,37912,38556,38808,19978,19976,19998,20055,20887,21104,22478,22580,22732,23330,24120,24773,25854,26465,26454,27972,29366,30067,31331,33976,35698,37304,37664,22065,22516,39166,25325,26893,27542,29165,32340,32887,33394,35302,39135,34645,36785,23611,20280,20449,20405,21767,23072,23517,23529,24515,24910,25391,26032,26187,26862,27035,28024,28145,30003,30137,30495,31070,31206,32051,33251,33455,34218,35242,35386,36523,36763,36914,37341,38663,20154,20161,20995,22645,22764,23563,29978,23613,33102,35338,36805,38499,38765,31525,35535,38920,37218,22259,21416,36887,21561,22402,24101,25512,27700,28810,30561,31883,32736,34928,36930,37204,37648,37656,38543,29790,39620,23815,23913,25968,26530,36264,38619,25454,26441,26905,33733,38935,38592,35070,28548,25722,23544,19990,28716,30045,26159,20932,21046,21218,22995,24449,24615,25104,25919,25972,26143,26228,26866,26646,27491,28165,29298,29983,30427,31934,32854,22768,35069,35199,35488,35475,35531,36893,37266,38738,38745,25993,31246,33030,38587,24109,24796,25114,26021,26132,26512,30707,31309,31821,32318,33034,36012,36196,36321,36447,30889,20999,25305,25509,25666,25240,35373,31363,31680,35500,38634,32118,33292,34633,20185,20808,21315,21344,23459,23554,23574,24029,25126,25159,25776,26643,26676,27849,27973,27927,26579,28508,29006,29053,26059,31359,31661,32218,32330,32680,33146,33307,33337,34214,35438,36046,36341,36984,36983,37549,37521,38275,39854,21069,21892,28472,28982,20840,31109,32341,33203,31950,22092,22609,23720,25514,26366,26365,26970,29401,30095,30094,30990,31062,31199,31895,32032,32068,34311,35380,38459,36961,40736,20711,21109,21452,21474,20489,21930,22766,22863,29245,23435,23652,21277,24803,24819,25436,25475,25407,25531,25805,26089,26361,24035,27085,27133,28437,29157,20105,30185,30456,31379,31967,32207,32156,32865,33609,33624,33900,33980,34299,35013,36208,36865,36973,37783,38684,39442,20687,22679,24974,33235,34101,36104,36896,20419,20596,21063,21363,24687,25417,26463,28204,36275,36895,20439,23646,36042,26063,32154,21330,34966,20854,25539,23384,23403,23562,25613,26449,36956,20182,22810,22826,27760,35409,21822,22549,22949,24816,25171,26561,33333,26965,38464,39364,39464,20307,22534,23550,32784,23729,24111,24453,24608,24907,25140,26367,27888,28382,32974,33151,33492,34955,36024,36864,36910,38538,40667,39899,20195,21488,22823,31532,37261,38988,40441,28381,28711,21331,21828,23429,25176,25246,25299,27810,28655,29730,35351,37944,28609,35582,33592,20967,34552,21482,21481,20294,36948,36784,22890,33073,24061,31466,36799,26842,35895,29432,40008,27197,35504,20025,21336,22022,22374,25285,25506,26086,27470,28129,28251,28845,30701,31471,31658,32187,32829,32966,34507,35477,37723,22243,22727,24382,26029,26262,27264,27573,30007,35527,20516,30693,22320,24347,24677,26234,27744,30196,31258,32622,33268,34584,36933,39347,31689,30044,31481,31569,33988,36880,31209,31378,33590,23265,30528,20013,20210,23449,24544,25277,26172,26609,27880,34411,34935,35387,37198,37619,39376,27159,28710,29482,33511,33879,36015,19969,20806,20939,21899,23541,24086,24115,24193,24340,24373,24427,24500,25074,25361,26274,26397,28526,29266,30010,30522,32884,33081,33144,34678,35519,35548,36229,36339,37530,38263,38914,40165,21189,25431,30452,26389,27784,29645,36035,37806,38515,27941,22684,26894,27084,36861,37786,30171,36890,22618,26626,25524,27131,20291,28460,26584,36795,34086,32180,37716,26943,28528,22378,22775,23340,32044,29226,21514,37347,40372,20141,20302,20572,20597,21059,35998,21576,22564,23450,24093,24213,24237,24311,24351,24716,25269,25402,25552,26799,27712,30855,31118,31243,32224,33351,35330,35558,36420,36883,37048,37165,37336,40718,27877,25688,25826,25973,28404,30340,31515,36969,37841,28346,21746,24505,25764,36685,36845,37444,20856,22635,22825,23637,24215,28155,32399,29980,36028,36578,39003,28857,20253,27583,28593,3e4,38651,20814,21520,22581,22615,22956,23648,24466,26007,26460,28193,30331,33759,36077,36884,37117,37709,30757,30778,21162,24230,22303,22900,24594,20498,20826,20908,20941,20992,21776,22612,22616,22871,23445,23798,23947,24764,25237,25645,26481,26691,26812,26847,30423,28120,28271,28059,28783,29128,24403,30168,31095,31561,31572,31570,31958,32113,21040,33891,34153,34276,35342,35588,35910,36367,36867,36879,37913,38518,38957,39472,38360,20685,21205,21516,22530,23566,24999,25758,27934,30643,31461,33012,33796,36947,37509,23776,40199,21311,24471,24499,28060,29305,30563,31167,31716,27602,29420,35501,26627,27233,20984,31361,26932,23626,40182,33515,23493,37193,28702,22136,23663,24775,25958,27788,35930,36929,38931,21585,26311,37389,22856,37027,20869,20045,20970,34201,35598,28760,25466,37707,26978,39348,32260,30071,21335,26976,36575,38627,27741,20108,23612,24336,36841,21250,36049,32905,34425,24319,26085,20083,20837,22914,23615,38894,20219,22922,24525,35469,28641,31152,31074,23527,33905,29483,29105,24180,24565,25467,25754,29123,31896,20035,24316,20043,22492,22178,24745,28611,32013,33021,33075,33215,36786,35223,34468,24052,25226,25773,35207,26487,27874,27966,29750,30772,23110,32629,33453,39340,20467,24259,25309,25490,25943,26479,30403,29260,32972,32954,36649,37197,20493,22521,23186,26757,26995,29028,29437,36023,22770,36064,38506,36889,34687,31204,30695,33833,20271,21093,21338,25293,26575,27850,30333,31636,31893,33334,34180,36843,26333,28448,29190,32283,33707,39361,40614,20989,31665,30834,31672,32903,31560,27368,24161,32908,30033,30048,20843,37474,28300,30330,37271,39658,20240,32624,25244,31567,38309,40169,22138,22617,34532,38588,20276,21028,21322,21453,21467,24070,25644,26001,26495,27710,27726,29256,29359,29677,30036,32321,33324,34281,36009,31684,37318,29033,38930,39151,25405,26217,30058,30436,30928,34115,34542,21290,21329,21542,22915,24199,24444,24754,25161,25209,25259,26e3,27604,27852,30130,30382,30865,31192,32203,32631,32933,34987,35513,36027,36991,38750,39131,27147,31800,20633,23614,24494,26503,27608,29749,30473,32654,40763,26570,31255,21305,30091,39661,24422,33181,33777,32920,24380,24517,30050,31558,36924,26727,23019,23195,32016,30334,35628,20469,24426,27161,27703,28418,29922,31080,34920,35413,35961,24287,25551,30149,31186,33495,37672,37618,33948,34541,39981,21697,24428,25996,27996,28693,36007,36051,38971,25935,29942,19981,20184,22496,22827,23142,23500,20904,24067,24220,24598,25206,25975,26023,26222,28014,29238,31526,33104,33178,33433,35676,36e3,36070,36212,38428,38468,20398,25771,27494,33310,33889,34154,37096,23553,26963,39080,33914,34135,20239,21103,24489,24133,26381,31119,33145,35079,35206,28149,24343,25173,27832,20175,29289,39826,20998,21563,22132,22707,24996,25198,28954,22894,31881,31966,32027,38640,25991,32862,19993,20341,20853,22592,24163,24179,24330,26564,20006,34109,38281,38491,31859,38913,20731,22721,30294,30887,21029,30629,34065,31622,20559,22793,29255,31687,32232,36794,36820,36941,20415,21193,23081,24321,38829,20445,33303,37610,22275,25429,27497,29995,35036,36628,31298,21215,22675,24917,25098,26286,27597,31807,33769,20515,20472,21253,21574,22577,22857,23453,23792,23791,23849,24214,25265,25447,25918,26041,26379,27861,27873,28921,30770,32299,32990,33459,33804,34028,34562,35090,35370,35914,37030,37586,39165,40179,40300,20047,20129,20621,21078,22346,22952,24125,24536,24537,25151,26292,26395,26576,26834,20882,32033,32938,33192,35584,35980,36031,37502,38450,21536,38956,21271,20693,21340,22696,25778,26420,29287,30566,31302,37350,21187,27809,27526,22528,24140,22868,26412,32763,20961,30406,25705,30952,39764,40635,22475,22969,26151,26522,27598,21737,27097,24149,33180,26517,39850,26622,40018,26717,20134,20451,21448,25273,26411,27819,36804,20397,32365,40639,19975,24930,28288,28459,34067,21619,26410,39749,24051,31637,23724,23494,34588,28234,34001,31252,33032,22937,31885,27665,30496,21209,22818,28961,29279,30683,38695,40289,26891,23167,23064,20901,21517,21629,26126,30431,36855,37528,40180,23018,29277,28357,20813,26825,32191,32236,38754,40634,25720,27169,33538,22916,23391,27611,29467,30450,32178,32791,33945,20786,26408,40665,30446,26466,21247,39173,23588,25147,31870,36016,21839,24758,32011,38272,21249,20063,20918,22812,29242,32822,37326,24357,30690,21380,24441,32004,34220,35379,36493,38742,26611,34222,37971,24841,24840,27833,30290,35565,36664,21807,20305,20778,21191,21451,23461,24189,24736,24962,25558,26377,26586,28263,28044,29494,29495,30001,31056,35029,35480,36938,37009,37109,38596,34701,22805,20104,20313,19982,35465,36671,38928,20653,24188,22934,23481,24248,25562,25594,25793,26332,26954,27096,27915,28342,29076,29992,31407,32650,32768,33865,33993,35201,35617,36362,36965,38525,39178,24958,25233,27442,27779,28020,32716,32764,28096,32645,34746,35064,26469,33713,38972,38647,27931,32097,33853,37226,20081,21365,23888,27396,28651,34253,34349,35239,21033,21519,23653,26446,26792,29702,29827,30178,35023,35041,37324,38626,38520,24459,29575,31435,33870,25504,30053,21129,27969,28316,29705,30041,30827,31890,38534,31452,40845,20406,24942,26053,34396,20102,20142,20698,20001,20940,23534,26009,26753,28092,29471,30274,30637,31260,31975,33391,35538,36988,37327,38517,38936,21147,32209,20523,21400,26519,28107,29136,29747,33256,36650,38563,40023,40607,29792,22593,28057,32047,39006,20196,20278,20363,20919,21169,23994,24604,29618,31036,33491,37428,38583,38646,38666,40599,40802,26278,27508,21015,21155,28872,35010,24265,24651,24976,28451,29001,31806,32244,32879,34030,36899,37676,21570,39791,27347,28809,36034,36335,38706,21172,23105,24266,24324,26391,27004,27028,28010,28431,29282,29436,31725,32769,32894,34635,37070,20845,40595,31108,32907,37682,35542,20525,21644,35441,27498,36036,33031,24785,26528,40434,20121,20120,39952,35435,34241,34152,26880,28286,30871,33109,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24332,19984,19989,20010,20017,20022,20028,20031,20034,20054,20056,20098,20101,35947,20106,33298,24333,20110,20126,20127,20128,20130,20144,20147,20150,20174,20173,20164,20166,20162,20183,20190,20205,20191,20215,20233,20314,20272,20315,20317,20311,20295,20342,20360,20367,20376,20347,20329,20336,20369,20335,20358,20374,20760,20436,20447,20430,20440,20443,20433,20442,20432,20452,20453,20506,20520,20500,20522,20517,20485,20252,20470,20513,20521,20524,20478,20463,20497,20486,20547,20551,26371,20565,20560,20552,20570,20566,20588,20600,20608,20634,20613,20660,20658,20681,20682,20659,20674,20694,20702,20709,20717,20707,20718,20729,20725,20745,20737,20738,20758,20757,20756,20762,20769,20794,20791,20796,20795,20799,20800,20818,20812,20820,20834,31480,20841,20842,20846,20864,20866,22232,20876,20873,20879,20881,20883,20885,20886,20900,20902,20898,20905,20906,20907,20915,20913,20914,20912,20917,20925,20933,20937,20955,20960,34389,20969,20973,20976,20981,20990,20996,21003,21012,21006,21031,21034,21038,21043,21049,21071,21060,21067,21068,21086,21076,21098,21108,21097,21107,21119,21117,21133,21140,21138,21105,21128,21137,36776,36775,21164,21165,21180,21173,21185,21197,21207,21214,21219,21222,39149,21216,21235,21237,21240,21241,21254,21256,30008,21261,21264,21263,21269,21274,21283,21295,21297,21299,21304,21312,21318,21317,19991,21321,21325,20950,21342,21353,21358,22808,21371,21367,21378,21398,21408,21414,21413,21422,21424,21430,21443,31762,38617,21471,26364,29166,21486,21480,21485,21498,21505,21565,21568,21548,21549,21564,21550,21558,21545,21533,21582,21647,21621,21646,21599,21617,21623,21616,21650,21627,21632,21622,21636,21648,21638,21703,21666,21688,21669,21676,21700,21704,21672,21675,21698,21668,21694,21692,21720,21733,21734,21775,21780,21757,21742,21741,21754,21730,21817,21824,21859,21836,21806,21852,21829,21846,21847,21816,21811,21853,21913,21888,21679,21898,21919,21883,21886,21912,21918,21934,21884,21891,21929,21895,21928,21978,21957,21983,21956,21980,21988,21972,22036,22007,22038,22014,22013,22043,22009,22094,22096,29151,22068,22070,22066,22072,22123,22116,22063,22124,22122,22150,22144,22154,22176,22164,22159,22181,22190,22198,22196,22210,22204,22209,22211,22208,22216,22222,22225,22227,22231,22254,22265,22272,22271,22276,22281,22280,22283,22285,22291,22296,22294,21959,22300,22310,22327,22328,22350,22331,22336,22351,22377,22464,22408,22369,22399,22409,22419,22432,22451,22436,22442,22448,22467,22470,22484,22482,22483,22538,22486,22499,22539,22553,22557,22642,22561,22626,22603,22640,27584,22610,22589,22649,22661,22713,22687,22699,22714,22750,22715,22712,22702,22725,22739,22737,22743,22745,22744,22757,22748,22756,22751,22767,22778,22777,22779,22780,22781,22786,22794,22800,22811,26790,22821,22828,22829,22834,22840,22846,31442,22869,22864,22862,22874,22872,22882,22880,22887,22892,22889,22904,22913,22941,20318,20395,22947,22962,22982,23016,23004,22925,23001,23002,23077,23071,23057,23068,23049,23066,23104,23148,23113,23093,23094,23138,23146,23194,23228,23230,23243,23234,23229,23267,23255,23270,23273,23254,23290,23291,23308,23307,23318,23346,23248,23338,23350,23358,23363,23365,23360,23377,23381,23386,23387,23397,23401,23408,23411,23413,23416,25992,23418,23424,23427,23462,23480,23491,23495,23497,23508,23504,23524,23526,23522,23518,23525,23531,23536,23542,23539,23557,23559,23560,23565,23571,23584,23586,23592,23608,23609,23617,23622,23630,23635,23632,23631,23409,23660,23662,20066,23670,23673,23692,23697,23700,22939,23723,23739,23734,23740,23735,23749,23742,23751,23769,23785,23805,23802,23789,23948,23786,23819,23829,23831,23900,23839,23835,23825,23828,23842,23834,23833,23832,23884,23890,23886,23883,23916,23923,23926,23943,23940,23938,23970,23965,23980,23982,23997,23952,23991,23996,24009,24013,24019,24018,24022,24027,24043,24050,24053,24075,24090,24089,24081,24091,24118,24119,24132,24131,24128,24142,24151,24148,24159,24162,24164,24135,24181,24182,24186,40636,24191,24224,24257,24258,24264,24272,24271,24278,24291,24285,24282,24283,24290,24289,24296,24297,24300,24305,24307,24304,24308,24312,24318,24323,24329,24413,24412,24331,24337,24342,24361,24365,24376,24385,24392,24396,24398,24367,24401,24406,24407,24409,24417,24429,24435,24439,24451,24450,24447,24458,24456,24465,24455,24478,24473,24472,24480,24488,24493,24508,24534,24571,24548,24568,24561,24541,24755,24575,24609,24672,24601,24592,24617,24590,24625,24603,24597,24619,24614,24591,24634,24666,24641,24682,24695,24671,24650,24646,24653,24675,24643,24676,24642,24684,24683,24665,24705,24717,24807,24707,24730,24708,24731,24726,24727,24722,24743,24715,24801,24760,24800,24787,24756,24560,24765,24774,24757,24792,24909,24853,24838,24822,24823,24832,24820,24826,24835,24865,24827,24817,24845,24846,24903,24894,24872,24871,24906,24895,24892,24876,24884,24893,24898,24900,24947,24951,24920,24921,24922,24939,24948,24943,24933,24945,24927,24925,24915,24949,24985,24982,24967,25004,24980,24986,24970,24977,25003,25006,25036,25034,25033,25079,25032,25027,25030,25018,25035,32633,25037,25062,25059,25078,25082,25076,25087,25085,25084,25086,25088,25096,25097,25101,25100,25108,25115,25118,25121,25130,25134,25136,25138,25139,25153,25166,25182,25187,25179,25184,25192,25212,25218,25225,25214,25234,25235,25238,25300,25219,25236,25303,25297,25275,25295,25343,25286,25812,25288,25308,25292,25290,25282,25287,25243,25289,25356,25326,25329,25383,25346,25352,25327,25333,25424,25406,25421,25628,25423,25494,25486,25472,25515,25462,25507,25487,25481,25503,25525,25451,25449,25534,25577,25536,25542,25571,25545,25554,25590,25540,25622,25652,25606,25619,25638,25654,25885,25623,25640,25615,25703,25711,25718,25678,25898,25749,25747,25765,25769,25736,25788,25818,25810,25797,25799,25787,25816,25794,25841,25831,33289,25824,25825,25260,25827,25839,25900,25846,25844,25842,25850,25856,25853,25880,25884,25861,25892,25891,25899,25908,25909,25911,25910,25912,30027,25928,25942,25941,25933,25944,25950,25949,25970,25976,25986,25987,35722,26011,26015,26027,26039,26051,26054,26049,26052,26060,26066,26075,26073,26080,26081,26097,26482,26122,26115,26107,26483,26165,26166,26164,26140,26191,26180,26185,26177,26206,26205,26212,26215,26216,26207,26210,26224,26243,26248,26254,26249,26244,26264,26269,26305,26297,26313,26302,26300,26308,26296,26326,26330,26336,26175,26342,26345,26352,26357,26359,26383,26390,26398,26406,26407,38712,26414,26431,26422,26433,26424,26423,26438,26462,26464,26457,26467,26468,26505,26480,26537,26492,26474,26508,26507,26534,26529,26501,26551,26607,26548,26604,26547,26601,26552,26596,26590,26589,26594,26606,26553,26574,26566,26599,27292,26654,26694,26665,26688,26701,26674,26702,26803,26667,26713,26723,26743,26751,26783,26767,26797,26772,26781,26779,26755,27310,26809,26740,26805,26784,26810,26895,26765,26750,26881,26826,26888,26840,26914,26918,26849,26892,26829,26836,26855,26837,26934,26898,26884,26839,26851,26917,26873,26848,26863,26920,26922,26906,26915,26913,26822,27001,26999,26972,27e3,26987,26964,27006,26990,26937,26996,26941,26969,26928,26977,26974,26973,27009,26986,27058,27054,27088,27071,27073,27091,27070,27086,23528,27082,27101,27067,27075,27047,27182,27025,27040,27036,27029,27060,27102,27112,27138,27163,27135,27402,27129,27122,27111,27141,27057,27166,27117,27156,27115,27146,27154,27329,27171,27155,27204,27148,27250,27190,27256,27207,27234,27225,27238,27208,27192,27170,27280,27277,27296,27268,27298,27299,27287,34327,27323,27331,27330,27320,27315,27308,27358,27345,27359,27306,27354,27370,27387,27397,34326,27386,27410,27414,39729,27423,27448,27447,30428,27449,39150,27463,27459,27465,27472,27481,27476,27483,27487,27489,27512,27513,27519,27520,27524,27523,27533,27544,27541,27550,27556,27562,27563,27567,27570,27569,27571,27575,27580,27590,27595,27603,27615,27628,27627,27635,27631,40638,27656,27667,27668,27675,27684,27683,27742,27733,27746,27754,27778,27789,27802,27777,27803,27774,27752,27763,27794,27792,27844,27889,27859,27837,27863,27845,27869,27822,27825,27838,27834,27867,27887,27865,27882,27935,34893,27958,27947,27965,27960,27929,27957,27955,27922,27916,28003,28051,28004,27994,28025,27993,28046,28053,28644,28037,28153,28181,28170,28085,28103,28134,28088,28102,28140,28126,28108,28136,28114,28101,28154,28121,28132,28117,28138,28142,28205,28270,28206,28185,28274,28255,28222,28195,28267,28203,28278,28237,28191,28227,28218,28238,28196,28415,28189,28216,28290,28330,28312,28361,28343,28371,28349,28335,28356,28338,28372,28373,28303,28325,28354,28319,28481,28433,28748,28396,28408,28414,28479,28402,28465,28399,28466,28364,28478,28435,28407,28550,28538,28536,28545,28544,28527,28507,28659,28525,28546,28540,28504,28558,28561,28610,28518,28595,28579,28577,28580,28601,28614,28586,28639,28629,28652,28628,28632,28657,28654,28635,28681,28683,28666,28689,28673,28687,28670,28699,28698,28532,28701,28696,28703,28720,28734,28722,28753,28771,28825,28818,28847,28913,28844,28856,28851,28846,28895,28875,28893,28889,28937,28925,28956,28953,29029,29013,29064,29030,29026,29004,29014,29036,29071,29179,29060,29077,29096,29100,29143,29113,29118,29138,29129,29140,29134,29152,29164,29159,29173,29180,29177,29183,29197,29200,29211,29224,29229,29228,29232,29234,29243,29244,29247,29248,29254,29259,29272,29300,29310,29314,29313,29319,29330,29334,29346,29351,29369,29362,29379,29382,29380,29390,29394,29410,29408,29409,29433,29431,20495,29463,29450,29468,29462,29469,29492,29487,29481,29477,29502,29518,29519,40664,29527,29546,29544,29552,29560,29557,29563,29562,29640,29619,29646,29627,29632,29669,29678,29662,29858,29701,29807,29733,29688,29746,29754,29781,29759,29791,29785,29761,29788,29801,29808,29795,29802,29814,29822,29835,29854,29863,29898,29903,29908,29681,29920,29923,29927,29929,29934,29938,29936,29937,29944,29943,29956,29955,29957,29964,29966,29965,29973,29971,29982,29990,29996,30012,30020,30029,30026,30025,30043,30022,30042,30057,30052,30055,30059,30061,30072,30070,30086,30087,30068,30090,30089,30082,30100,30106,30109,30117,30115,30146,30131,30147,30133,30141,30136,30140,30129,30157,30154,30162,30169,30179,30174,30206,30207,30204,30209,30192,30202,30194,30195,30219,30221,30217,30239,30247,30240,30241,30242,30244,30260,30256,30267,30279,30280,30278,30300,30296,30305,30306,30312,30313,30314,30311,30316,30320,30322,30326,30328,30332,30336,30339,30344,30347,30350,30358,30355,30361,30362,30384,30388,30392,30393,30394,30402,30413,30422,30418,30430,30433,30437,30439,30442,34351,30459,30472,30471,30468,30505,30500,30494,30501,30502,30491,30519,30520,30535,30554,30568,30571,30555,30565,30591,30590,30585,30606,30603,30609,30624,30622,30640,30646,30649,30655,30652,30653,30651,30663,30669,30679,30682,30684,30691,30702,30716,30732,30738,31014,30752,31018,30789,30862,30836,30854,30844,30874,30860,30883,30901,30890,30895,30929,30918,30923,30932,30910,30908,30917,30922,30956,30951,30938,30973,30964,30983,30994,30993,31001,31020,31019,31040,31072,31063,31071,31066,31061,31059,31098,31103,31114,31133,31143,40779,31146,31150,31155,31161,31162,31177,31189,31207,31212,31201,31203,31240,31245,31256,31257,31264,31263,31104,31281,31291,31294,31287,31299,31319,31305,31329,31330,31337,40861,31344,31353,31357,31368,31383,31381,31384,31382,31401,31432,31408,31414,31429,31428,31423,36995,31431,31434,31437,31439,31445,31443,31449,31450,31453,31457,31458,31462,31469,31472,31490,31503,31498,31494,31539,31512,31513,31518,31541,31528,31542,31568,31610,31492,31565,31499,31564,31557,31605,31589,31604,31591,31600,31601,31596,31598,31645,31640,31647,31629,31644,31642,31627,31634,31631,31581,31641,31691,31681,31692,31695,31668,31686,31709,31721,31761,31764,31718,31717,31840,31744,31751,31763,31731,31735,31767,31757,31734,31779,31783,31786,31775,31799,31787,31805,31820,31811,31828,31823,31808,31824,31832,31839,31844,31830,31845,31852,31861,31875,31888,31908,31917,31906,31915,31905,31912,31923,31922,31921,31918,31929,31933,31936,31941,31938,31960,31954,31964,31970,39739,31983,31986,31988,31990,31994,32006,32002,32028,32021,32010,32069,32075,32046,32050,32063,32053,32070,32115,32086,32078,32114,32104,32110,32079,32099,32147,32137,32091,32143,32125,32155,32186,32174,32163,32181,32199,32189,32171,32317,32162,32175,32220,32184,32159,32176,32216,32221,32228,32222,32251,32242,32225,32261,32266,32291,32289,32274,32305,32287,32265,32267,32290,32326,32358,32315,32309,32313,32323,32311,32306,32314,32359,32349,32342,32350,32345,32346,32377,32362,32361,32380,32379,32387,32213,32381,36782,32383,32392,32393,32396,32402,32400,32403,32404,32406,32398,32411,32412,32568,32570,32581,32588,32589,32590,32592,32593,32597,32596,32600,32607,32608,32616,32617,32615,32632,32642,32646,32643,32648,32647,32652,32660,32670,32669,32666,32675,32687,32690,32697,32686,32694,32696,35697,32709,32710,32714,32725,32724,32737,32742,32745,32755,32761,39132,32774,32772,32779,32786,32792,32793,32796,32801,32808,32831,32827,32842,32838,32850,32856,32858,32863,32866,32872,32883,32882,32880,32886,32889,32893,32895,32900,32902,32901,32923,32915,32922,32941,20880,32940,32987,32997,32985,32989,32964,32986,32982,33033,33007,33009,33051,33065,33059,33071,33099,38539,33094,33086,33107,33105,33020,33137,33134,33125,33126,33140,33155,33160,33162,33152,33154,33184,33173,33188,33187,33119,33171,33193,33200,33205,33214,33208,33213,33216,33218,33210,33225,33229,33233,33241,33240,33224,33242,33247,33248,33255,33274,33275,33278,33281,33282,33285,33287,33290,33293,33296,33302,33321,33323,33336,33331,33344,33369,33368,33373,33370,33375,33380,33378,33384,33386,33387,33326,33393,33399,33400,33406,33421,33426,33451,33439,33467,33452,33505,33507,33503,33490,33524,33523,33530,33683,33539,33531,33529,33502,33542,33500,33545,33497,33589,33588,33558,33586,33585,33600,33593,33616,33605,33583,33579,33559,33560,33669,33690,33706,33695,33698,33686,33571,33678,33671,33674,33660,33717,33651,33653,33696,33673,33704,33780,33811,33771,33742,33789,33795,33752,33803,33729,33783,33799,33760,33778,33805,33826,33824,33725,33848,34054,33787,33901,33834,33852,34138,33924,33911,33899,33965,33902,33922,33897,33862,33836,33903,33913,33845,33994,33890,33977,33983,33951,34009,33997,33979,34010,34e3,33985,33990,34006,33953,34081,34047,34036,34071,34072,34092,34079,34069,34068,34044,34112,34147,34136,34120,34113,34306,34123,34133,34176,34212,34184,34193,34186,34216,34157,34196,34203,34282,34183,34204,34167,34174,34192,34249,34234,34255,34233,34256,34261,34269,34277,34268,34297,34314,34323,34315,34302,34298,34310,34338,34330,34352,34367,34381,20053,34388,34399,34407,34417,34451,34467,34473,34474,34443,34444,34486,34479,34500,34502,34480,34505,34851,34475,34516,34526,34537,34540,34527,34523,34543,34578,34566,34568,34560,34563,34555,34577,34569,34573,34553,34570,34612,34623,34615,34619,34597,34601,34586,34656,34655,34680,34636,34638,34676,34647,34664,34670,34649,34643,34659,34666,34821,34722,34719,34690,34735,34763,34749,34752,34768,38614,34731,34756,34739,34759,34758,34747,34799,34802,34784,34831,34829,34814,34806,34807,34830,34770,34833,34838,34837,34850,34849,34865,34870,34873,34855,34875,34884,34882,34898,34905,34910,34914,34923,34945,34942,34974,34933,34941,34997,34930,34946,34967,34962,34990,34969,34978,34957,34980,34992,35007,34993,35011,35012,35028,35032,35033,35037,35065,35074,35068,35060,35048,35058,35076,35084,35082,35091,35139,35102,35109,35114,35115,35137,35140,35131,35126,35128,35148,35101,35168,35166,35174,35172,35181,35178,35183,35188,35191,35198,35203,35208,35210,35219,35224,35233,35241,35238,35244,35247,35250,35258,35261,35263,35264,35290,35292,35293,35303,35316,35320,35331,35350,35344,35340,35355,35357,35365,35382,35393,35419,35410,35398,35400,35452,35437,35436,35426,35461,35458,35460,35496,35489,35473,35493,35494,35482,35491,35524,35533,35522,35546,35563,35571,35559,35556,35569,35604,35552,35554,35575,35550,35547,35596,35591,35610,35553,35606,35600,35607,35616,35635,38827,35622,35627,35646,35624,35649,35660,35663,35662,35657,35670,35675,35674,35691,35679,35692,35695,35700,35709,35712,35724,35726,35730,35731,35734,35737,35738,35898,35905,35903,35912,35916,35918,35920,35925,35938,35948,35960,35962,35970,35977,35973,35978,35981,35982,35988,35964,35992,25117,36013,36010,36029,36018,36019,36014,36022,36040,36033,36068,36067,36058,36093,36090,36091,36100,36101,36106,36103,36111,36109,36112,40782,36115,36045,36116,36118,36199,36205,36209,36211,36225,36249,36290,36286,36282,36303,36314,36310,36300,36315,36299,36330,36331,36319,36323,36348,36360,36361,36351,36381,36382,36368,36383,36418,36405,36400,36404,36426,36423,36425,36428,36432,36424,36441,36452,36448,36394,36451,36437,36470,36466,36476,36481,36487,36485,36484,36491,36490,36499,36497,36500,36505,36522,36513,36524,36528,36550,36529,36542,36549,36552,36555,36571,36579,36604,36603,36587,36606,36618,36613,36629,36626,36633,36627,36636,36639,36635,36620,36646,36659,36667,36665,36677,36674,36670,36684,36681,36678,36686,36695,36700,36706,36707,36708,36764,36767,36771,36781,36783,36791,36826,36837,36834,36842,36847,36999,36852,36869,36857,36858,36881,36885,36897,36877,36894,36886,36875,36903,36918,36917,36921,36856,36943,36944,36945,36946,36878,36937,36926,36950,36952,36958,36968,36975,36982,38568,36978,36994,36989,36993,36992,37002,37001,37007,37032,37039,37041,37045,37090,37092,25160,37083,37122,37138,37145,37170,37168,37194,37206,37208,37219,37221,37225,37235,37234,37259,37257,37250,37282,37291,37295,37290,37301,37300,37306,37312,37313,37321,37323,37328,37334,37343,37345,37339,37372,37365,37366,37406,37375,37396,37420,37397,37393,37470,37463,37445,37449,37476,37448,37525,37439,37451,37456,37532,37526,37523,37531,37466,37583,37561,37559,37609,37647,37626,37700,37678,37657,37666,37658,37667,37690,37685,37691,37724,37728,37756,37742,37718,37808,37804,37805,37780,37817,37846,37847,37864,37861,37848,37827,37853,37840,37832,37860,37914,37908,37907,37891,37895,37904,37942,37931,37941,37921,37946,37953,37970,37956,37979,37984,37986,37982,37994,37417,38e3,38005,38007,38013,37978,38012,38014,38017,38015,38274,38279,38282,38292,38294,38296,38297,38304,38312,38311,38317,38332,38331,38329,38334,38346,28662,38339,38349,38348,38357,38356,38358,38364,38369,38373,38370,38433,38440,38446,38447,38466,38476,38479,38475,38519,38492,38494,38493,38495,38502,38514,38508,38541,38552,38549,38551,38570,38567,38577,38578,38576,38580,38582,38584,38585,38606,38603,38601,38605,35149,38620,38669,38613,38649,38660,38662,38664,38675,38670,38673,38671,38678,38681,38692,38698,38704,38713,38717,38718,38724,38726,38728,38722,38729,38748,38752,38756,38758,38760,21202,38763,38769,38777,38789,38780,38785,38778,38790,38795,38799,38800,38812,38824,38822,38819,38835,38836,38851,38854,38856,38859,38876,38893,40783,38898,31455,38902,38901,38927,38924,38968,38948,38945,38967,38973,38982,38991,38987,39019,39023,39024,39025,39028,39027,39082,39087,39089,39094,39108,39107,39110,39145,39147,39171,39177,39186,39188,39192,39201,39197,39198,39204,39200,39212,39214,39229,39230,39234,39241,39237,39248,39243,39249,39250,39244,39253,39319,39320,39333,39341,39342,39356,39391,39387,39389,39384,39377,39405,39406,39409,39410,39419,39416,39425,39439,39429,39394,39449,39467,39479,39493,39490,39488,39491,39486,39509,39501,39515,39511,39519,39522,39525,39524,39529,39531,39530,39597,39600,39612,39616,39631,39633,39635,39636,39646,39647,39650,39651,39654,39663,39659,39662,39668,39665,39671,39675,39686,39704,39706,39711,39714,39715,39717,39719,39720,39721,39722,39726,39727,39730,39748,39747,39759,39757,39758,39761,39768,39796,39827,39811,39825,39830,39831,39839,39840,39848,39860,39872,39882,39865,39878,39887,39889,39890,39907,39906,39908,39892,39905,39994,39922,39921,39920,39957,39956,39945,39955,39948,39942,39944,39954,39946,39940,39982,39963,39973,39972,39969,39984,40007,39986,40006,39998,40026,40032,40039,40054,40056,40167,40172,40176,40201,40200,40171,40195,40198,40234,40230,40367,40227,40223,40260,40213,40210,40257,40255,40254,40262,40264,40285,40286,40292,40273,40272,40281,40306,40329,40327,40363,40303,40314,40346,40356,40361,40370,40388,40385,40379,40376,40378,40390,40399,40386,40409,40403,40440,40422,40429,40431,40445,40474,40475,40478,40565,40569,40573,40577,40584,40587,40588,40594,40597,40593,40605,40613,40617,40632,40618,40621,38753,40652,40654,40655,40656,40660,40668,40670,40669,40672,40677,40680,40687,40692,40694,40695,40697,40699,40700,40701,40711,40712,30391,40725,40737,40748,40766,40778,40786,40788,40803,40799,40800,40801,40806,40807,40812,40810,40823,40818,40822,40853,40860,40864,22575,27079,36953,29796,20956,29081,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,65506,65508,65287,65282,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,65506,65508,65287,65282,12849,8470,8481,8757,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],jis0212:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,728,711,184,729,733,175,731,730,65374,900,901,null,null,null,null,null,null,null,null,161,166,191,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,186,170,169,174,8482,164,8470,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,902,904,905,906,938,null,908,null,910,939,null,911,null,null,null,null,940,941,942,943,970,912,972,962,973,971,944,974,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,1119,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,198,272,null,294,null,306,null,321,319,null,330,216,338,null,358,222,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,230,273,240,295,305,307,312,322,320,329,331,248,339,223,359,254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,193,192,196,194,258,461,256,260,197,195,262,264,268,199,266,270,201,200,203,202,282,278,274,280,null,284,286,290,288,292,205,204,207,206,463,304,298,302,296,308,310,313,317,315,323,327,325,209,211,210,214,212,465,336,332,213,340,344,342,346,348,352,350,356,354,218,217,220,219,364,467,368,362,370,366,360,471,475,473,469,372,221,376,374,377,381,379,null,null,null,null,null,null,null,225,224,228,226,259,462,257,261,229,227,263,265,269,231,267,271,233,232,235,234,283,279,275,281,501,285,287,null,289,293,237,236,239,238,464,null,299,303,297,309,311,314,318,316,324,328,326,241,243,242,246,244,466,337,333,245,341,345,343,347,349,353,351,357,355,250,249,252,251,365,468,369,363,371,367,361,472,476,474,470,373,253,255,375,378,382,380,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19970,19972,19973,19980,19986,19999,20003,20004,20008,20011,20014,20015,20016,20021,20032,20033,20036,20039,20049,20058,20060,20067,20072,20073,20084,20085,20089,20095,20109,20118,20119,20125,20143,20153,20163,20176,20186,20187,20192,20193,20194,20200,20207,20209,20211,20213,20221,20222,20223,20224,20226,20227,20232,20235,20236,20242,20245,20246,20247,20249,20270,20273,20320,20275,20277,20279,20281,20283,20286,20288,20290,20296,20297,20299,20300,20306,20308,20310,20312,20319,20323,20330,20332,20334,20337,20343,20344,20345,20346,20349,20350,20353,20354,20356,20357,20361,20362,20364,20366,20368,20370,20371,20372,20375,20377,20378,20382,20383,20402,20407,20409,20411,20412,20413,20414,20416,20417,20421,20422,20424,20425,20427,20428,20429,20431,20434,20444,20448,20450,20464,20466,20476,20477,20479,20480,20481,20484,20487,20490,20492,20494,20496,20499,20503,20504,20507,20508,20509,20510,20514,20519,20526,20528,20530,20531,20533,20544,20545,20546,20549,20550,20554,20556,20558,20561,20562,20563,20567,20569,20575,20576,20578,20579,20582,20583,20586,20589,20592,20593,20539,20609,20611,20612,20614,20618,20622,20623,20624,20626,20627,20628,20630,20635,20636,20638,20639,20640,20641,20642,20650,20655,20656,20665,20666,20669,20672,20675,20676,20679,20684,20686,20688,20691,20692,20696,20700,20701,20703,20706,20708,20710,20712,20713,20719,20721,20726,20730,20734,20739,20742,20743,20744,20747,20748,20749,20750,20722,20752,20759,20761,20763,20764,20765,20766,20771,20775,20776,20780,20781,20783,20785,20787,20788,20789,20792,20793,20802,20810,20815,20819,20821,20823,20824,20831,20836,20838,20862,20867,20868,20875,20878,20888,20893,20897,20899,20909,20920,20922,20924,20926,20927,20930,20936,20943,20945,20946,20947,20949,20952,20958,20962,20965,20974,20978,20979,20980,20983,20993,20994,20997,21010,21011,21013,21014,21016,21026,21032,21041,21042,21045,21052,21061,21065,21077,21079,21080,21082,21084,21087,21088,21089,21094,21102,21111,21112,21113,21120,21122,21125,21130,21132,21139,21141,21142,21143,21144,21146,21148,21156,21157,21158,21159,21167,21168,21174,21175,21176,21178,21179,21181,21184,21188,21190,21192,21196,21199,21201,21204,21206,21211,21212,21217,21221,21224,21225,21226,21228,21232,21233,21236,21238,21239,21248,21251,21258,21259,21260,21265,21267,21272,21275,21276,21278,21279,21285,21287,21288,21289,21291,21292,21293,21296,21298,21301,21308,21309,21310,21314,21324,21323,21337,21339,21345,21347,21349,21356,21357,21362,21369,21374,21379,21383,21384,21390,21395,21396,21401,21405,21409,21412,21418,21419,21423,21426,21428,21429,21431,21432,21434,21437,21440,21445,21455,21458,21459,21461,21466,21469,21470,21472,21478,21479,21493,21506,21523,21530,21537,21543,21544,21546,21551,21553,21556,21557,21571,21572,21575,21581,21583,21598,21602,21604,21606,21607,21609,21611,21613,21614,21620,21631,21633,21635,21637,21640,21641,21645,21649,21653,21654,21660,21663,21665,21670,21671,21673,21674,21677,21678,21681,21687,21689,21690,21691,21695,21702,21706,21709,21710,21728,21738,21740,21743,21750,21756,21758,21759,21760,21761,21765,21768,21769,21772,21773,21774,21781,21802,21803,21810,21813,21814,21819,21820,21821,21825,21831,21833,21834,21837,21840,21841,21848,21850,21851,21854,21856,21857,21860,21862,21887,21889,21890,21894,21896,21902,21903,21905,21906,21907,21908,21911,21923,21924,21933,21938,21951,21953,21955,21958,21961,21963,21964,21966,21969,21970,21971,21975,21976,21979,21982,21986,21993,22006,22015,22021,22024,22026,22029,22030,22031,22032,22033,22034,22041,22060,22064,22067,22069,22071,22073,22075,22076,22077,22079,22080,22081,22083,22084,22086,22089,22091,22093,22095,22100,22110,22112,22113,22114,22115,22118,22121,22125,22127,22129,22130,22133,22148,22149,22152,22155,22156,22165,22169,22170,22173,22174,22175,22182,22183,22184,22185,22187,22188,22189,22193,22195,22199,22206,22213,22217,22218,22219,22223,22224,22220,22221,22233,22236,22237,22239,22241,22244,22245,22246,22247,22248,22257,22251,22253,22262,22263,22273,22274,22279,22282,22284,22289,22293,22298,22299,22301,22304,22306,22307,22308,22309,22313,22314,22316,22318,22319,22323,22324,22333,22334,22335,22341,22342,22348,22349,22354,22370,22373,22375,22376,22379,22381,22382,22383,22384,22385,22387,22388,22389,22391,22393,22394,22395,22396,22398,22401,22403,22412,22420,22423,22425,22426,22428,22429,22430,22431,22433,22421,22439,22440,22441,22444,22456,22461,22471,22472,22476,22479,22485,22493,22494,22500,22502,22503,22505,22509,22512,22517,22518,22520,22525,22526,22527,22531,22532,22536,22537,22497,22540,22541,22555,22558,22559,22560,22566,22567,22573,22578,22585,22591,22601,22604,22605,22607,22608,22613,22623,22625,22628,22631,22632,22648,22652,22655,22656,22657,22663,22664,22665,22666,22668,22669,22671,22672,22676,22678,22685,22688,22689,22690,22694,22697,22705,22706,22724,22716,22722,22728,22733,22734,22736,22738,22740,22742,22746,22749,22753,22754,22761,22771,22789,22790,22795,22796,22802,22803,22804,34369,22813,22817,22819,22820,22824,22831,22832,22835,22837,22838,22847,22851,22854,22866,22867,22873,22875,22877,22878,22879,22881,22883,22891,22893,22895,22898,22901,22902,22905,22907,22908,22923,22924,22926,22930,22933,22935,22943,22948,22951,22957,22958,22959,22960,22963,22967,22970,22972,22977,22979,22980,22984,22986,22989,22994,23005,23006,23007,23011,23012,23015,23022,23023,23025,23026,23028,23031,23040,23044,23052,23053,23054,23058,23059,23070,23075,23076,23079,23080,23082,23085,23088,23108,23109,23111,23112,23116,23120,23125,23134,23139,23141,23143,23149,23159,23162,23163,23166,23179,23184,23187,23190,23193,23196,23198,23199,23200,23202,23207,23212,23217,23218,23219,23221,23224,23226,23227,23231,23236,23238,23240,23247,23258,23260,23264,23269,23274,23278,23285,23286,23293,23296,23297,23304,23319,23348,23321,23323,23325,23329,23333,23341,23352,23361,23371,23372,23378,23382,23390,23400,23406,23407,23420,23421,23422,23423,23425,23428,23430,23434,23438,23440,23441,23443,23444,23446,23464,23465,23468,23469,23471,23473,23474,23479,23482,23484,23488,23489,23501,23503,23510,23511,23512,23513,23514,23520,23535,23537,23540,23549,23564,23575,23582,23583,23587,23590,23593,23595,23596,23598,23600,23602,23605,23606,23641,23642,23644,23650,23651,23655,23656,23657,23661,23664,23668,23669,23674,23675,23676,23677,23687,23688,23690,23695,23698,23709,23711,23712,23714,23715,23718,23722,23730,23732,23733,23738,23753,23755,23762,23773,23767,23790,23793,23794,23796,23809,23814,23821,23826,23851,23843,23844,23846,23847,23857,23860,23865,23869,23871,23874,23875,23878,23880,23893,23889,23897,23882,23903,23904,23905,23906,23908,23914,23917,23920,23929,23930,23934,23935,23937,23939,23944,23946,23954,23955,23956,23957,23961,23963,23967,23968,23975,23979,23984,23988,23992,23993,24003,24007,24011,24016,24014,24024,24025,24032,24036,24041,24056,24057,24064,24071,24077,24082,24084,24085,24088,24095,24096,24110,24104,24114,24117,24126,24139,24144,24137,24145,24150,24152,24155,24156,24158,24168,24170,24171,24172,24173,24174,24176,24192,24203,24206,24226,24228,24229,24232,24234,24236,24241,24243,24253,24254,24255,24262,24268,24267,24270,24273,24274,24276,24277,24284,24286,24293,24299,24322,24326,24327,24328,24334,24345,24348,24349,24353,24354,24355,24356,24360,24363,24364,24366,24368,24372,24374,24379,24381,24383,24384,24388,24389,24391,24397,24400,24404,24408,24411,24416,24419,24420,24423,24431,24434,24436,24437,24440,24442,24445,24446,24457,24461,24463,24470,24476,24477,24482,24487,24491,24484,24492,24495,24496,24497,24504,24516,24519,24520,24521,24523,24528,24529,24530,24531,24532,24542,24545,24546,24552,24553,24554,24556,24557,24558,24559,24562,24563,24566,24570,24572,24583,24586,24589,24595,24596,24599,24600,24602,24607,24612,24621,24627,24629,24640,24647,24648,24649,24652,24657,24660,24662,24663,24669,24673,24679,24689,24702,24703,24706,24710,24712,24714,24718,24721,24723,24725,24728,24733,24734,24738,24740,24741,24744,24752,24753,24759,24763,24766,24770,24772,24776,24777,24778,24779,24782,24783,24788,24789,24793,24795,24797,24798,24802,24805,24818,24821,24824,24828,24829,24834,24839,24842,24844,24848,24849,24850,24851,24852,24854,24855,24857,24860,24862,24866,24874,24875,24880,24881,24885,24886,24887,24889,24897,24901,24902,24905,24926,24928,24940,24946,24952,24955,24956,24959,24960,24961,24963,24964,24971,24973,24978,24979,24983,24984,24988,24989,24991,24992,24997,25e3,25002,25005,25016,25017,25020,25024,25025,25026,25038,25039,25045,25052,25053,25054,25055,25057,25058,25063,25065,25061,25068,25069,25071,25089,25091,25092,25095,25107,25109,25116,25120,25122,25123,25127,25129,25131,25145,25149,25154,25155,25156,25158,25164,25168,25169,25170,25172,25174,25178,25180,25188,25197,25199,25203,25210,25213,25229,25230,25231,25232,25254,25256,25267,25270,25271,25274,25278,25279,25284,25294,25301,25302,25306,25322,25330,25332,25340,25341,25347,25348,25354,25355,25357,25360,25363,25366,25368,25385,25386,25389,25397,25398,25401,25404,25409,25410,25411,25412,25414,25418,25419,25422,25426,25427,25428,25432,25435,25445,25446,25452,25453,25457,25460,25461,25464,25468,25469,25471,25474,25476,25479,25482,25488,25492,25493,25497,25498,25502,25508,25510,25517,25518,25519,25533,25537,25541,25544,25550,25553,25555,25556,25557,25564,25568,25573,25578,25580,25586,25587,25589,25592,25593,25609,25610,25616,25618,25620,25624,25630,25632,25634,25636,25637,25641,25642,25647,25648,25653,25661,25663,25675,25679,25681,25682,25683,25684,25690,25691,25692,25693,25695,25696,25697,25699,25709,25715,25716,25723,25725,25733,25735,25743,25744,25745,25752,25753,25755,25757,25759,25761,25763,25766,25768,25772,25779,25789,25790,25791,25796,25801,25802,25803,25804,25806,25808,25809,25813,25815,25828,25829,25833,25834,25837,25840,25845,25847,25851,25855,25857,25860,25864,25865,25866,25871,25875,25876,25878,25881,25883,25886,25887,25890,25894,25897,25902,25905,25914,25916,25917,25923,25927,25929,25936,25938,25940,25951,25952,25959,25963,25978,25981,25985,25989,25994,26002,26005,26008,26013,26016,26019,26022,26030,26034,26035,26036,26047,26050,26056,26057,26062,26064,26068,26070,26072,26079,26096,26098,26100,26101,26105,26110,26111,26112,26116,26120,26121,26125,26129,26130,26133,26134,26141,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26161,26163,26169,26167,26176,26181,26182,26186,26188,26193,26190,26199,26200,26201,26203,26204,26208,26209,26363,26218,26219,26220,26238,26227,26229,26239,26231,26232,26233,26235,26240,26236,26251,26252,26253,26256,26258,26265,26266,26267,26268,26271,26272,26276,26285,26289,26290,26293,26299,26303,26304,26306,26307,26312,26316,26318,26319,26324,26331,26335,26344,26347,26348,26350,26362,26373,26375,26382,26387,26393,26396,26400,26402,26419,26430,26437,26439,26440,26444,26452,26453,26461,26470,26476,26478,26484,26486,26491,26497,26500,26510,26511,26513,26515,26518,26520,26521,26523,26544,26545,26546,26549,26555,26556,26557,26617,26560,26562,26563,26565,26568,26569,26578,26583,26585,26588,26593,26598,26608,26610,26614,26615,26706,26644,26649,26653,26655,26664,26663,26668,26669,26671,26672,26673,26675,26683,26687,26692,26693,26698,26700,26709,26711,26712,26715,26731,26734,26735,26736,26737,26738,26741,26745,26746,26747,26748,26754,26756,26758,26760,26774,26776,26778,26780,26785,26787,26789,26793,26794,26798,26802,26811,26821,26824,26828,26831,26832,26833,26835,26838,26841,26844,26845,26853,26856,26858,26859,26860,26861,26864,26865,26869,26870,26875,26876,26877,26886,26889,26890,26896,26897,26899,26902,26903,26929,26931,26933,26936,26939,26946,26949,26953,26958,26967,26971,26979,26980,26981,26982,26984,26985,26988,26992,26993,26994,27002,27003,27007,27008,27021,27026,27030,27032,27041,27045,27046,27048,27051,27053,27055,27063,27064,27066,27068,27077,27080,27089,27094,27095,27106,27109,27118,27119,27121,27123,27125,27134,27136,27137,27139,27151,27153,27157,27162,27165,27168,27172,27176,27184,27186,27188,27191,27195,27198,27199,27205,27206,27209,27210,27214,27216,27217,27218,27221,27222,27227,27236,27239,27242,27249,27251,27262,27265,27267,27270,27271,27273,27275,27281,27291,27293,27294,27295,27301,27307,27311,27312,27313,27316,27325,27326,27327,27334,27337,27336,27340,27344,27348,27349,27350,27356,27357,27364,27367,27372,27376,27377,27378,27388,27389,27394,27395,27398,27399,27401,27407,27408,27409,27415,27419,27422,27428,27432,27435,27436,27439,27445,27446,27451,27455,27462,27466,27469,27474,27478,27480,27485,27488,27495,27499,27502,27504,27509,27517,27518,27522,27525,27543,27547,27551,27552,27554,27555,27560,27561,27564,27565,27566,27568,27576,27577,27581,27582,27587,27588,27593,27596,27606,27610,27617,27619,27622,27623,27630,27633,27639,27641,27647,27650,27652,27653,27657,27661,27662,27664,27666,27673,27679,27686,27687,27688,27692,27694,27699,27701,27702,27706,27707,27711,27722,27723,27725,27727,27730,27732,27737,27739,27740,27755,27757,27759,27764,27766,27768,27769,27771,27781,27782,27783,27785,27796,27797,27799,27800,27804,27807,27824,27826,27828,27842,27846,27853,27855,27856,27857,27858,27860,27862,27866,27868,27872,27879,27881,27883,27884,27886,27890,27892,27908,27911,27914,27918,27919,27921,27923,27930,27942,27943,27944,27751,27950,27951,27953,27961,27964,27967,27991,27998,27999,28001,28005,28007,28015,28016,28028,28034,28039,28049,28050,28052,28054,28055,28056,28074,28076,28084,28087,28089,28093,28095,28100,28104,28106,28110,28111,28118,28123,28125,28127,28128,28130,28133,28137,28143,28144,28148,28150,28156,28160,28164,28190,28194,28199,28210,28214,28217,28219,28220,28228,28229,28232,28233,28235,28239,28241,28242,28243,28244,28247,28252,28253,28254,28258,28259,28264,28275,28283,28285,28301,28307,28313,28320,28327,28333,28334,28337,28339,28347,28351,28352,28353,28355,28359,28360,28362,28365,28366,28367,28395,28397,28398,28409,28411,28413,28420,28424,28426,28428,28429,28438,28440,28442,28443,28454,28457,28458,28463,28464,28467,28470,28475,28476,28461,28495,28497,28498,28499,28503,28505,28506,28509,28510,28513,28514,28520,28524,28541,28542,28547,28551,28552,28555,28556,28557,28560,28562,28563,28564,28566,28570,28575,28576,28581,28582,28583,28584,28590,28591,28592,28597,28598,28604,28613,28615,28616,28618,28634,28638,28648,28649,28656,28661,28665,28668,28669,28672,28677,28678,28679,28685,28695,28704,28707,28719,28724,28727,28729,28732,28739,28740,28744,28745,28746,28747,28756,28757,28765,28766,28750,28772,28773,28780,28782,28789,28790,28798,28801,28805,28806,28820,28821,28822,28823,28824,28827,28836,28843,28848,28849,28852,28855,28874,28881,28883,28884,28885,28886,28888,28892,28900,28922,28931,28932,28933,28934,28935,28939,28940,28943,28958,28960,28971,28973,28975,28976,28977,28984,28993,28997,28998,28999,29002,29003,29008,29010,29015,29018,29020,29022,29024,29032,29049,29056,29061,29063,29068,29074,29082,29083,29088,29090,29103,29104,29106,29107,29114,29119,29120,29121,29124,29131,29132,29139,29142,29145,29146,29148,29176,29182,29184,29191,29192,29193,29203,29207,29210,29213,29215,29220,29227,29231,29236,29240,29241,29249,29250,29251,29253,29262,29263,29264,29267,29269,29270,29274,29276,29278,29280,29283,29288,29291,29294,29295,29297,29303,29304,29307,29308,29311,29316,29321,29325,29326,29331,29339,29352,29357,29358,29361,29364,29374,29377,29383,29385,29388,29397,29398,29400,29407,29413,29427,29428,29434,29435,29438,29442,29444,29445,29447,29451,29453,29458,29459,29464,29465,29470,29474,29476,29479,29480,29484,29489,29490,29493,29498,29499,29501,29507,29517,29520,29522,29526,29528,29533,29534,29535,29536,29542,29543,29545,29547,29548,29550,29551,29553,29559,29561,29564,29568,29569,29571,29573,29574,29582,29584,29587,29589,29591,29592,29596,29598,29599,29600,29602,29605,29606,29610,29611,29613,29621,29623,29625,29628,29629,29631,29637,29638,29641,29643,29644,29647,29650,29651,29654,29657,29661,29665,29667,29670,29671,29673,29684,29685,29687,29689,29690,29691,29693,29695,29696,29697,29700,29703,29706,29713,29722,29723,29732,29734,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29753,29760,29763,29764,29766,29767,29771,29773,29777,29778,29783,29789,29794,29798,29799,29800,29803,29805,29806,29809,29810,29824,29825,29829,29830,29831,29833,29839,29840,29841,29842,29848,29849,29850,29852,29855,29856,29857,29859,29862,29864,29865,29866,29867,29870,29871,29873,29874,29877,29881,29883,29887,29896,29897,29900,29904,29907,29912,29914,29915,29918,29919,29924,29928,29930,29931,29935,29940,29946,29947,29948,29951,29958,29970,29974,29975,29984,29985,29988,29991,29993,29994,29999,30006,30009,30013,30014,30015,30016,30019,30023,30024,30030,30032,30034,30039,30046,30047,30049,30063,30065,30073,30074,30075,30076,30077,30078,30081,30085,30096,30098,30099,30101,30105,30108,30114,30116,30132,30138,30143,30144,30145,30148,30150,30156,30158,30159,30167,30172,30175,30176,30177,30180,30183,30188,30190,30191,30193,30201,30208,30210,30211,30212,30215,30216,30218,30220,30223,30226,30227,30229,30230,30233,30235,30236,30237,30238,30243,30245,30246,30249,30253,30258,30259,30261,30264,30265,30266,30268,30282,30272,30273,30275,30276,30277,30281,30283,30293,30297,30303,30308,30309,30317,30318,30319,30321,30324,30337,30341,30348,30349,30357,30363,30364,30365,30367,30368,30370,30371,30372,30373,30374,30375,30376,30378,30381,30397,30401,30405,30409,30411,30412,30414,30420,30425,30432,30438,30440,30444,30448,30449,30454,30457,30460,30464,30470,30474,30478,30482,30484,30485,30487,30489,30490,30492,30498,30504,30509,30510,30511,30516,30517,30518,30521,30525,30526,30530,30533,30534,30538,30541,30542,30543,30546,30550,30551,30556,30558,30559,30560,30562,30564,30567,30570,30572,30576,30578,30579,30580,30586,30589,30592,30596,30604,30605,30612,30613,30614,30618,30623,30626,30631,30634,30638,30639,30641,30645,30654,30659,30665,30673,30674,30677,30681,30686,30687,30688,30692,30694,30698,30700,30704,30705,30708,30712,30715,30725,30726,30729,30733,30734,30737,30749,30753,30754,30755,30765,30766,30768,30773,30775,30787,30788,30791,30792,30796,30798,30802,30812,30814,30816,30817,30819,30820,30824,30826,30830,30842,30846,30858,30863,30868,30872,30881,30877,30878,30879,30884,30888,30892,30893,30896,30897,30898,30899,30907,30909,30911,30919,30920,30921,30924,30926,30930,30931,30933,30934,30948,30939,30943,30944,30945,30950,30954,30962,30963,30976,30966,30967,30970,30971,30975,30982,30988,30992,31002,31004,31006,31007,31008,31013,31015,31017,31021,31025,31028,31029,31035,31037,31039,31044,31045,31046,31050,31051,31055,31057,31060,31064,31067,31068,31079,31081,31083,31090,31097,31099,31100,31102,31115,31116,31121,31123,31124,31125,31126,31128,31131,31132,31137,31144,31145,31147,31151,31153,31156,31160,31163,31170,31172,31175,31176,31178,31183,31188,31190,31194,31197,31198,31200,31202,31205,31210,31211,31213,31217,31224,31228,31234,31235,31239,31241,31242,31244,31249,31253,31259,31262,31265,31271,31275,31277,31279,31280,31284,31285,31288,31289,31290,31300,31301,31303,31304,31308,31317,31318,31321,31324,31325,31327,31328,31333,31335,31338,31341,31349,31352,31358,31360,31362,31365,31366,31370,31371,31376,31377,31380,31390,31392,31395,31404,31411,31413,31417,31419,31420,31430,31433,31436,31438,31441,31451,31464,31465,31467,31468,31473,31476,31483,31485,31486,31495,31508,31519,31523,31527,31529,31530,31531,31533,31534,31535,31536,31537,31540,31549,31551,31552,31553,31559,31566,31573,31584,31588,31590,31593,31594,31597,31599,31602,31603,31607,31620,31625,31630,31632,31633,31638,31643,31646,31648,31653,31660,31663,31664,31666,31669,31670,31674,31675,31676,31677,31682,31685,31688,31690,31700,31702,31703,31705,31706,31707,31720,31722,31730,31732,31733,31736,31737,31738,31740,31742,31745,31746,31747,31748,31750,31753,31755,31756,31758,31759,31769,31771,31776,31781,31782,31784,31788,31793,31795,31796,31798,31801,31802,31814,31818,31829,31825,31826,31827,31833,31834,31835,31836,31837,31838,31841,31843,31847,31849,31853,31854,31856,31858,31865,31868,31869,31878,31879,31887,31892,31902,31904,31910,31920,31926,31927,31930,31931,31932,31935,31940,31943,31944,31945,31949,31951,31955,31956,31957,31959,31961,31962,31965,31974,31977,31979,31989,32003,32007,32008,32009,32015,32017,32018,32019,32022,32029,32030,32035,32038,32042,32045,32049,32060,32061,32062,32064,32065,32071,32072,32077,32081,32083,32087,32089,32090,32092,32093,32101,32103,32106,32112,32120,32122,32123,32127,32129,32130,32131,32133,32134,32136,32139,32140,32141,32145,32150,32151,32157,32158,32166,32167,32170,32179,32182,32183,32185,32194,32195,32196,32197,32198,32204,32205,32206,32215,32217,32256,32226,32229,32230,32234,32235,32237,32241,32245,32246,32249,32250,32264,32272,32273,32277,32279,32284,32285,32288,32295,32296,32300,32301,32303,32307,32310,32319,32324,32325,32327,32334,32336,32338,32344,32351,32353,32354,32357,32363,32366,32367,32371,32376,32382,32385,32390,32391,32394,32397,32401,32405,32408,32410,32413,32414,32572,32571,32573,32574,32575,32579,32580,32583,32591,32594,32595,32603,32604,32605,32609,32611,32612,32613,32614,32621,32625,32637,32638,32639,32640,32651,32653,32655,32656,32657,32662,32663,32668,32673,32674,32678,32682,32685,32692,32700,32703,32704,32707,32712,32718,32719,32731,32735,32739,32741,32744,32748,32750,32751,32754,32762,32765,32766,32767,32775,32776,32778,32781,32782,32783,32785,32787,32788,32790,32797,32798,32799,32800,32804,32806,32812,32814,32816,32820,32821,32823,32825,32826,32828,32830,32832,32836,32864,32868,32870,32877,32881,32885,32897,32904,32910,32924,32926,32934,32935,32939,32952,32953,32968,32973,32975,32978,32980,32981,32983,32984,32992,33005,33006,33008,33010,33011,33014,33017,33018,33022,33027,33035,33046,33047,33048,33052,33054,33056,33060,33063,33068,33072,33077,33082,33084,33093,33095,33098,33100,33106,33111,33120,33121,33127,33128,33129,33133,33135,33143,33153,33168,33156,33157,33158,33163,33166,33174,33176,33179,33182,33186,33198,33202,33204,33211,33227,33219,33221,33226,33230,33231,33237,33239,33243,33245,33246,33249,33252,33259,33260,33264,33265,33266,33269,33270,33272,33273,33277,33279,33280,33283,33295,33299,33300,33305,33306,33309,33313,33314,33320,33330,33332,33338,33347,33348,33349,33350,33355,33358,33359,33361,33366,33372,33376,33379,33383,33389,33396,33403,33405,33407,33408,33409,33411,33412,33415,33417,33418,33422,33425,33428,33430,33432,33434,33435,33440,33441,33443,33444,33447,33448,33449,33450,33454,33456,33458,33460,33463,33466,33468,33470,33471,33478,33488,33493,33498,33504,33506,33508,33512,33514,33517,33519,33526,33527,33533,33534,33536,33537,33543,33544,33546,33547,33620,33563,33565,33566,33567,33569,33570,33580,33581,33582,33584,33587,33591,33594,33596,33597,33602,33603,33604,33607,33613,33614,33617,33621,33622,33623,33648,33656,33661,33663,33664,33666,33668,33670,33677,33682,33684,33685,33688,33689,33691,33692,33693,33702,33703,33705,33708,33726,33727,33728,33735,33737,33743,33744,33745,33748,33757,33619,33768,33770,33782,33784,33785,33788,33793,33798,33802,33807,33809,33813,33817,33709,33839,33849,33861,33863,33864,33866,33869,33871,33873,33874,33878,33880,33881,33882,33884,33888,33892,33893,33895,33898,33904,33907,33908,33910,33912,33916,33917,33921,33925,33938,33939,33941,33950,33958,33960,33961,33962,33967,33969,33972,33978,33981,33982,33984,33986,33991,33992,33996,33999,34003,34012,34023,34026,34031,34032,34033,34034,34039,34098,34042,34043,34045,34050,34051,34055,34060,34062,34064,34076,34078,34082,34083,34084,34085,34087,34090,34091,34095,34099,34100,34102,34111,34118,34127,34128,34129,34130,34131,34134,34137,34140,34141,34142,34143,34144,34145,34146,34148,34155,34159,34169,34170,34171,34173,34175,34177,34181,34182,34185,34187,34188,34191,34195,34200,34205,34207,34208,34210,34213,34215,34228,34230,34231,34232,34236,34237,34238,34239,34242,34247,34250,34251,34254,34221,34264,34266,34271,34272,34278,34280,34285,34291,34294,34300,34303,34304,34308,34309,34317,34318,34320,34321,34322,34328,34329,34331,34334,34337,34343,34345,34358,34360,34362,34364,34365,34368,34370,34374,34386,34387,34390,34391,34392,34393,34397,34400,34401,34402,34403,34404,34409,34412,34415,34421,34422,34423,34426,34445,34449,34454,34456,34458,34460,34465,34470,34471,34472,34477,34481,34483,34484,34485,34487,34488,34489,34495,34496,34497,34499,34501,34513,34514,34517,34519,34522,34524,34528,34531,34533,34535,34440,34554,34556,34557,34564,34565,34567,34571,34574,34575,34576,34579,34580,34585,34590,34591,34593,34595,34600,34606,34607,34609,34610,34617,34618,34620,34621,34622,34624,34627,34629,34637,34648,34653,34657,34660,34661,34671,34673,34674,34683,34691,34692,34693,34694,34695,34696,34697,34699,34700,34704,34707,34709,34711,34712,34713,34718,34720,34723,34727,34732,34733,34734,34737,34741,34750,34751,34753,34760,34761,34762,34766,34773,34774,34777,34778,34780,34783,34786,34787,34788,34794,34795,34797,34801,34803,34808,34810,34815,34817,34819,34822,34825,34826,34827,34832,34841,34834,34835,34836,34840,34842,34843,34844,34846,34847,34856,34861,34862,34864,34866,34869,34874,34876,34881,34883,34885,34888,34889,34890,34891,34894,34897,34901,34902,34904,34906,34908,34911,34912,34916,34921,34929,34937,34939,34944,34968,34970,34971,34972,34975,34976,34984,34986,35002,35005,35006,35008,35018,35019,35020,35021,35022,35025,35026,35027,35035,35038,35047,35055,35056,35057,35061,35063,35073,35078,35085,35086,35087,35093,35094,35096,35097,35098,35100,35104,35110,35111,35112,35120,35121,35122,35125,35129,35130,35134,35136,35138,35141,35142,35145,35151,35154,35159,35162,35163,35164,35169,35170,35171,35179,35182,35184,35187,35189,35194,35195,35196,35197,35209,35213,35216,35220,35221,35227,35228,35231,35232,35237,35248,35252,35253,35254,35255,35260,35284,35285,35286,35287,35288,35301,35305,35307,35309,35313,35315,35318,35321,35325,35327,35332,35333,35335,35343,35345,35346,35348,35349,35358,35360,35362,35364,35366,35371,35372,35375,35381,35383,35389,35390,35392,35395,35397,35399,35401,35405,35406,35411,35414,35415,35416,35420,35421,35425,35429,35431,35445,35446,35447,35449,35450,35451,35454,35455,35456,35459,35462,35467,35471,35472,35474,35478,35479,35481,35487,35495,35497,35502,35503,35507,35510,35511,35515,35518,35523,35526,35528,35529,35530,35537,35539,35540,35541,35543,35549,35551,35564,35568,35572,35573,35574,35580,35583,35589,35590,35595,35601,35612,35614,35615,35594,35629,35632,35639,35644,35650,35651,35652,35653,35654,35656,35666,35667,35668,35673,35661,35678,35683,35693,35702,35704,35705,35708,35710,35713,35716,35717,35723,35725,35727,35732,35733,35740,35742,35743,35896,35897,35901,35902,35909,35911,35913,35915,35919,35921,35923,35924,35927,35928,35931,35933,35929,35939,35940,35942,35944,35945,35949,35955,35957,35958,35963,35966,35974,35975,35979,35984,35986,35987,35993,35995,35996,36004,36025,36026,36037,36038,36041,36043,36047,36054,36053,36057,36061,36065,36072,36076,36079,36080,36082,36085,36087,36088,36094,36095,36097,36099,36105,36114,36119,36123,36197,36201,36204,36206,36223,36226,36228,36232,36237,36240,36241,36245,36254,36255,36256,36262,36267,36268,36271,36274,36277,36279,36281,36283,36288,36293,36294,36295,36296,36298,36302,36305,36308,36309,36311,36313,36324,36325,36327,36332,36336,36284,36337,36338,36340,36349,36353,36356,36357,36358,36363,36369,36372,36374,36384,36385,36386,36387,36390,36391,36401,36403,36406,36407,36408,36409,36413,36416,36417,36427,36429,36430,36431,36436,36443,36444,36445,36446,36449,36450,36457,36460,36461,36463,36464,36465,36473,36474,36475,36482,36483,36489,36496,36498,36501,36506,36507,36509,36510,36514,36519,36521,36525,36526,36531,36533,36538,36539,36544,36545,36547,36548,36551,36559,36561,36564,36572,36584,36590,36592,36593,36599,36601,36602,36589,36608,36610,36615,36616,36623,36624,36630,36631,36632,36638,36640,36641,36643,36645,36647,36648,36652,36653,36654,36660,36661,36662,36663,36666,36672,36673,36675,36679,36687,36689,36690,36691,36692,36693,36696,36701,36702,36709,36765,36768,36769,36772,36773,36774,36789,36790,36792,36798,36800,36801,36806,36810,36811,36813,36816,36818,36819,36821,36832,36835,36836,36840,36846,36849,36853,36854,36859,36862,36866,36868,36872,36876,36888,36891,36904,36905,36911,36906,36908,36909,36915,36916,36919,36927,36931,36932,36940,36955,36957,36962,36966,36967,36972,36976,36980,36985,36997,37e3,37003,37004,37006,37008,37013,37015,37016,37017,37019,37024,37025,37026,37029,37040,37042,37043,37044,37046,37053,37068,37054,37059,37060,37061,37063,37064,37077,37079,37080,37081,37084,37085,37087,37093,37074,37110,37099,37103,37104,37108,37118,37119,37120,37124,37125,37126,37128,37133,37136,37140,37142,37143,37144,37146,37148,37150,37152,37157,37154,37155,37159,37161,37166,37167,37169,37172,37174,37175,37177,37178,37180,37181,37187,37191,37192,37199,37203,37207,37209,37210,37211,37217,37220,37223,37229,37236,37241,37242,37243,37249,37251,37253,37254,37258,37262,37265,37267,37268,37269,37272,37278,37281,37286,37288,37292,37293,37294,37296,37297,37298,37299,37302,37307,37308,37309,37311,37314,37315,37317,37331,37332,37335,37337,37338,37342,37348,37349,37353,37354,37356,37357,37358,37359,37360,37361,37367,37369,37371,37373,37376,37377,37380,37381,37382,37383,37385,37386,37388,37392,37394,37395,37398,37400,37404,37405,37411,37412,37413,37414,37416,37422,37423,37424,37427,37429,37430,37432,37433,37434,37436,37438,37440,37442,37443,37446,37447,37450,37453,37454,37455,37457,37464,37465,37468,37469,37472,37473,37477,37479,37480,37481,37486,37487,37488,37493,37494,37495,37496,37497,37499,37500,37501,37503,37512,37513,37514,37517,37518,37522,37527,37529,37535,37536,37540,37541,37543,37544,37547,37551,37554,37558,37560,37562,37563,37564,37565,37567,37568,37569,37570,37571,37573,37574,37575,37576,37579,37580,37581,37582,37584,37587,37589,37591,37592,37593,37596,37597,37599,37600,37601,37603,37605,37607,37608,37612,37614,37616,37625,37627,37631,37632,37634,37640,37645,37649,37652,37653,37660,37661,37662,37663,37665,37668,37669,37671,37673,37674,37683,37684,37686,37687,37703,37704,37705,37712,37713,37714,37717,37719,37720,37722,37726,37732,37733,37735,37737,37738,37741,37743,37744,37745,37747,37748,37750,37754,37757,37759,37760,37761,37762,37768,37770,37771,37773,37775,37778,37781,37784,37787,37790,37793,37795,37796,37798,37800,37803,37812,37813,37814,37818,37801,37825,37828,37829,37830,37831,37833,37834,37835,37836,37837,37843,37849,37852,37854,37855,37858,37862,37863,37881,37879,37880,37882,37883,37885,37889,37890,37892,37896,37897,37901,37902,37903,37909,37910,37911,37919,37934,37935,37937,37938,37939,37940,37947,37951,37949,37955,37957,37960,37962,37964,37973,37977,37980,37983,37985,37987,37992,37995,37997,37998,37999,38001,38002,38020,38019,38264,38265,38270,38276,38280,38284,38285,38286,38301,38302,38303,38305,38310,38313,38315,38316,38324,38326,38330,38333,38335,38342,38344,38345,38347,38352,38353,38354,38355,38361,38362,38365,38366,38367,38368,38372,38374,38429,38430,38434,38436,38437,38438,38444,38449,38451,38455,38456,38457,38458,38460,38461,38465,38482,38484,38486,38487,38488,38497,38510,38516,38523,38524,38526,38527,38529,38530,38531,38532,38537,38545,38550,38554,38557,38559,38564,38565,38566,38569,38574,38575,38579,38586,38602,38610,23986,38616,38618,38621,38622,38623,38633,38639,38641,38650,38658,38659,38661,38665,38682,38683,38685,38689,38690,38691,38696,38705,38707,38721,38723,38730,38734,38735,38741,38743,38744,38746,38747,38755,38759,38762,38766,38771,38774,38775,38776,38779,38781,38783,38784,38793,38805,38806,38807,38809,38810,38814,38815,38818,38828,38830,38833,38834,38837,38838,38840,38841,38842,38844,38846,38847,38849,38852,38853,38855,38857,38858,38860,38861,38862,38864,38865,38868,38871,38872,38873,38877,38878,38880,38875,38881,38884,38895,38897,38900,38903,38904,38906,38919,38922,38937,38925,38926,38932,38934,38940,38942,38944,38947,38950,38955,38958,38959,38960,38962,38963,38965,38949,38974,38980,38983,38986,38993,38994,38995,38998,38999,39001,39002,39010,39011,39013,39014,39018,39020,39083,39085,39086,39088,39092,39095,39096,39098,39099,39103,39106,39109,39112,39116,39137,39139,39141,39142,39143,39146,39155,39158,39170,39175,39176,39185,39189,39190,39191,39194,39195,39196,39199,39202,39206,39207,39211,39217,39218,39219,39220,39221,39225,39226,39227,39228,39232,39233,39238,39239,39240,39245,39246,39252,39256,39257,39259,39260,39262,39263,39264,39323,39325,39327,39334,39344,39345,39346,39349,39353,39354,39357,39359,39363,39369,39379,39380,39385,39386,39388,39390,39399,39402,39403,39404,39408,39412,39413,39417,39421,39422,39426,39427,39428,39435,39436,39440,39441,39446,39454,39456,39458,39459,39460,39463,39469,39470,39475,39477,39478,39480,39495,39489,39492,39498,39499,39500,39502,39505,39508,39510,39517,39594,39596,39598,39599,39602,39604,39605,39606,39609,39611,39614,39615,39617,39619,39622,39624,39630,39632,39634,39637,39638,39639,39643,39644,39648,39652,39653,39655,39657,39660,39666,39667,39669,39673,39674,39677,39679,39680,39681,39682,39683,39684,39685,39688,39689,39691,39692,39693,39694,39696,39698,39702,39705,39707,39708,39712,39718,39723,39725,39731,39732,39733,39735,39737,39738,39741,39752,39755,39756,39765,39766,39767,39771,39774,39777,39779,39781,39782,39784,39786,39787,39788,39789,39790,39795,39797,39799,39800,39801,39807,39808,39812,39813,39814,39815,39817,39818,39819,39821,39823,39824,39828,39834,39837,39838,39846,39847,39849,39852,39856,39857,39858,39863,39864,39867,39868,39870,39871,39873,39879,39880,39886,39888,39895,39896,39901,39903,39909,39911,39914,39915,39919,39923,39927,39928,39929,39930,39933,39935,39936,39938,39947,39951,39953,39958,39960,39961,39962,39964,39966,39970,39971,39974,39975,39976,39977,39978,39985,39989,39990,39991,39997,40001,40003,40004,40005,40009,40010,40014,40015,40016,40019,40020,40022,40024,40027,40029,40030,40031,40035,40041,40042,40028,40043,40040,40046,40048,40050,40053,40055,40059,40166,40178,40183,40185,40203,40194,40209,40215,40216,40220,40221,40222,40239,40240,40242,40243,40244,40250,40252,40261,40253,40258,40259,40263,40266,40275,40276,40287,40291,40290,40293,40297,40298,40299,40304,40310,40311,40315,40316,40318,40323,40324,40326,40330,40333,40334,40338,40339,40341,40342,40343,40344,40353,40362,40364,40366,40369,40373,40377,40380,40383,40387,40391,40393,40394,40404,40405,40406,40407,40410,40414,40415,40416,40421,40423,40425,40427,40430,40432,40435,40436,40446,40458,40450,40455,40462,40464,40465,40466,40469,40470,40473,40476,40477,40570,40571,40572,40576,40578,40579,40580,40581,40583,40590,40591,40598,40600,40603,40606,40612,40616,40620,40622,40623,40624,40627,40628,40629,40646,40648,40651,40661,40671,40676,40679,40684,40685,40686,40688,40689,40690,40693,40696,40703,40706,40707,40713,40719,40720,40721,40722,40724,40726,40727,40729,40730,40731,40735,40738,40742,40746,40747,40751,40753,40754,40756,40759,40761,40762,40764,40765,40767,40769,40771,40772,40773,40774,40775,40787,40789,40790,40791,40792,40794,40797,40798,40808,40809,40813,40814,40815,40816,40817,40819,40821,40826,40829,40847,40848,40849,40850,40852,40854,40855,40862,40865,40866,40867,40869,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]}}(this||{})},function(e,t,n){!function(t){"use strict";var r={};e.exports?(r.bytesToHex=n(1979).bytesToHex,r.convertString=n(1980),e.exports=l):(r.bytesToHex=t.convertHex.bytesToHex,r.convertString=t.convertString,t.sha256=l);var i=[];!function(){function e(e){for(var t=Math.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)e(n)&&(i[r]=t(Math.pow(n,1/3)),r++),n++}();var o=function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},s=function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},a=[],u=function(e,t,n){for(var r=e[0],o=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7],p=0;p<64;p++){if(p<16)a[p]=0|t[n+p];else{var d=a[p-15],m=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=a[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;a[p]=m+a[p-7]+y+a[p-16]}var b=l&c^~l&f,v=r&o^r&s^o&s,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),k=h+_+b+i[p]+a[p],S=w+v;h=f,f=c,c=l,l=u+k|0,u=s,s=o,o=r,r=k+S|0}e[0]=e[0]+r|0,e[1]=e[1]+o|0,e[2]=e[2]+s|0,e[3]=e[3]+u|0,e[4]=e[4]+l|0,e[5]=e[5]+c|0,e[6]=e[6]+f|0,e[7]=e[7]+h|0};function l(e,t){e.constructor===String&&(e=r.convertString.UTF8.stringToBytes(e));var n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i=o(e),a=8*e.length;i[a>>5]|=128<<24-a%32,i[15+(a+64>>9<<4)]=a;for(var l=0;l<i.length;l+=16)u(n,i,l);var c=s(n);return t&&t.asBytes?c:t&&t.asString?r.convertString.bytesToString(c):r.bytesToHex(c)}l.x2=function(e,t){return l(l(e,{asBytes:!0}),t)}}(this)},function(e,t,n){!function(t){"use strict";var n={bytesToHex:function(e){return r(e)},hexToBytes:function(e){if(e.length%2==1)throw new Error("hexToBytes can't have a string with an odd number of characters.");return 0===e.indexOf("0x")&&(e=e.slice(2)),e.match(/../g).map(function(e){return parseInt(e,16)})}};function r(e){return e.map(function(e){return i(e.toString(16),2)}).join("")}function i(e,t){return e.length>t?e:Array(t-e.length+1).join("0")+e}e.exports?e.exports=n:t.convertHex=n}(this)},function(e,t,n){!function(t){"use strict";var n={bytesToString:function(e){return e.map(function(e){return String.fromCharCode(e)}).join("")},stringToBytes:function(e){return e.split("").map(function(e){return e.charCodeAt(0)})}};n.UTF8={bytesToString:function(e){return decodeURIComponent(escape(n.bytesToString(e)))},stringToBytes:function(e){return n.stringToBytes(unescape(encodeURIComponent(e)))}},e.exports?e.exports=n:t.convertString=n}(this)},function(e,t){class n extends Error{constructor(e="200",...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,n),this.statusCode=e,this.date=new Date}}e.exports=n},function(e,t,n){const r=n(1983),i=0,o=1,s=2,a=0,u=0;class l{constructor(){this.provider="https://cloud.wolk.com",this.developerTrustLevel=a,this.userTrustLevel=u,this.setWolkTrustLevel()}async init(){return this.dbPromise=r.openDb("names",1,e=>{e.createObjectStore("names",{keyPath:"name"})}),await this.dbPromise.then(async e=>await this.loadAccounts()).catch(e=>{throw console.log("WOLK: loadAccount error: "+e),new Error("Error loading accounts: "+e)})}setProvider(e){this.provider=e}setDeveloperTrustLevel(e){this.developerTrustLevel=e}setUserTrustLevel(e){this.userTrustLevel=e}setWolkTrustLevel(){this.userTrustLevel>this.developerTrustLevel?this.wolkTrustLevel=this.userTrustLevel:this.wolkTrustLevel=this.developerTrustLevel}determineProofValue(){let e=Math.random();return e<=this.wolkTrustLevel?1:0}loadAccounts(e){var t=this,n=null;return this.dbPromise.then(e=>e.transaction(["names"],"readonly").objectStore("names").getAll()).then(e=>{if(e.length>0){let r=e[e.length-1];console.log("WOLK: last Account",r);var n=r.ecdsaPrivateKey;return"object"==typeof r.ecdsaPrivateKey||(n=JSON.parse(r.ecdsaPrivateKey)),window.crypto.subtle.importKey("jwk",n,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]).then(function(e){t.ecdsaKey={},t.ecdsaKey.privateKey=e,t.ecdsaPublicKey=r.ecdsaPublicKey,console.log("WOLK: loadAccounts",e);var n=r.rsaPrivateKey;return"object"==typeof r.rsaPrivateKey||(n=JSON.parse(r.rsaPrivateKey)),window.crypto.subtle.importKey("jwk",n,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(function(e){t.rsaKey=e,console.log("Loaded")}).catch(function(e){console.error(e)})}).catch(function(e){console.error(e)})}console.log("# of Accounts",e.length)}).catch(e=>{console.log(e)})}async createAccount(e,t){let n=this;e=e.toLowerCase(),console.log("createAccount",e),await window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(r=>{var i={};return window.crypto.subtle.exportKey("jwk",r.privateKey).then(function(e){return i.rsaPrivateKey=e,window.crypto.subtle.exportKey("jwk",r.publicKey)}).then(function(e){return i.rsaPrivateKey=e,window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"])}).then(function(r){return window.crypto.subtle.exportKey("jwk",r.privateKey).then(function(e){return i.ecdsaPrivateKey=e,window.crypto.subtle.exportKey("jwk",r.publicKey)}).then(function(o){return i.ecdsaPublicKey=o,i.name=e,console.log(i),n.dbPromise.then(e=>e.transaction(["names"],"readwrite").objectStore("names").put(i)).then(()=>(n.ecdsaPublicKey=JSON.stringify(i.ecdsaPublicKey),n.ecdsaPrivateKey=i.ecdsaPrivateKey,n.ecdsaKey=r,n.setName(e,JSON.stringify(i.rsaPublicKey),t))).catch(e=>{i={},console.error("ERROR sending name: "+e)})}).catch(e=>{i={},console.error("ERROR setting up keys: "+e)})}).catch(e=>{i={},console.err("ERROR parsing ecdsaKey: "+e)})}).catch(e=>{account={},console.err("ERROR generating account: "+e)})}setName(e,t,n){return this.post(e,{name:e,rsaPublicKey:btoa(t)},{},n)}getBlock(e,t){return this.get(joinPath("wolk","block",e.toString(10)),{},t)}getNode(e,t){return this.get(joinPath("wolk","node",e.toString(10)),{},t)}updateNode(e,t,n){return this.patch(joinPath("wolk","node",e.toString(10)),t,{},n)}getPeers(e,t){return this.get(joinPath("wolk","info"),{},t)}getName(e,t){return this.get(joinPath("wolk","name",e),{Proof:this.determineProofValue()},t)}getAccount(e,t){return this.get(joinPath("wolk","account",e),{Proof:this.determineProofValue()},t)}getLatestBlockNumber(e){return this.get(joinPath("wolk","block","latest"),{},e)}getTransaction(e,t){return this.get(joinPath("wolk","tx",e),{},t)}transfer(e,t,n){return this.post(joinPath("wolk","transfer"),{recipient:e,amount:t},{},n)}createCollection(e,t,n){return this.post(joinPath(e,t),JSON.stringify({name:t,bucketType:o,requesterPays:0,encryption:"none"}),{},n)}listCollections(e,t){return this.get(e,{Proof:this.determineProofValue()},t)}listCollection(e,t,n){return this.get(joinPath(e,t),{Proof:this.determineProofValue()},n)}deleteCollection(e,t,n){return this.delete(joinPath(e,t),{},n)}scanCollection(e,t,n,r){return this.get(joinPath(e,t),{Proof:this.determineProofValue()},r)}setKey(e,t,n,r,i){return this.put(joinPath(e,t,n),r,{},i)}getKey(e,t,n,r,i){return this.get(joinPath(e,t,n),{Proof:this.determineProofValue()},i)}deleteKey(e,t,n,r){return this.delete(joinPath(e,t,n),{},r)}createDatabase(e,t,n,r){return this.post(joinPath(e,t),JSON.stringify({name:t,bucketType:s,requesterPays:0,encryption:"none"}),n,{},r)}listDatabases(e,t){return this.get(joinPath(e),{Proof:this.determineProofValue()},t)}deleteDatabase(e,t,n){return this.delete(joinPath(e,collection),{},n)}executeSQL(e,t,n,r,i){return this.post(joinPath(e,t,n),n,r,i)}async get(e,t,n){return this.wrequest("GET",e,null,t,n)}async post(e,t,n,r){return this.wrequest("POST",e,t,n,r)}async put(e,t,n,r){return this.wrequest("PUT",e,t,n,r)}async patch(e,t,n,r){return this.wrequest("PATCH",e,t,n,r)}async delete(e,t,n){return this.wrequest("DELETE",e,null,t,n)}sleep(e){return new Promise(t=>setTimeout(t,e))}async waitForTx(e,t){let n=!1,r=0;for(;!n;)if(this.getTransaction(e,function(e,r,i){if(e);else try{let e=JSON.parse(r);if(void 0!=e.BlockNumber)return n=!0,t(null,e)}catch(e){}}),await this.sleep(500),r++>15)return n=!0,t(new Error("timeout, tx not included"),null)}async wrequest(e,t,n,r,i){let o=new TextEncoder("utf-8"),s=e+"/"+t;"POST"!=e&&"PATCH"!=e||("object"==typeof n&&(n=JSON.stringify(n)),null!=n&&(s+=n));let a=o.encode(s),u=this;var l={method:e,headers:{Requester:u.ecdsaPublicKey,Msg:s},body:n};if("function"!=typeof i)return console.log("WOLK: Promise route"),window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},this.ecdsaKey.privateKey,a).then(function(e){l.headers.Sig=c(e);var n=u.provider+"/"+t;return fetch(n,l).then(function(e){return e.ok?e.text():(console.log("ERROR:",e.status,e.statusText),e)}).then(function(e){let t=!0;return e}).catch(function(e){console.log(e)})}).catch(function(e){console.error(e)});window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},this.ecdsaKey.privateKey,a).then(function(e){l.headers.Sig=c(e);var n=u.provider+"/"+t;fetch(n,l).then(function(e){return e.ok?e.text():(console.log("ERROR:",e.status,e.statusText),i(new Error(e.text()),null,!1))}).then(function(e){let t=!0;return i(null,e,!0)}).catch(function(e){console.log(e)})}).catch(function(e){console.error(e)})}}function c(e){return Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")}function f(e,t){return e+t}joinPath=((...e)=>e.map((e,t)=>0===t?e.trim().replace(/[\/]*$/g,""):e.trim().replace(/(^[\/]*|[\/]*$)/g,"")).filter(e=>e.length).join("/")),"undefined"!=typeof window&&void 0===window.WOLK&&(window.WOLK=l),e.exports=l},function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e){return Array.prototype.slice.call(e)}function n(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function r(e,t,r){var i,o=new Promise(function(o,s){i=e[t].apply(e,r),n(i).then(o,s)});return o.request=i,o}function i(e,t,n){var i=r(e,t,n);return i.then(function(e){if(e)return new c(e,i.request)})}function o(e,t,n){n.forEach(function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})})}function s(e,t,n,i){i.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return r(this[t],i,arguments)})})}function a(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})})}function u(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return i(this[t],r,arguments)})})}function l(e){this._index=e}function c(e,t){this._cursor=e,this._request=t}function f(e){this._store=e}function h(e){this._tx=e,this.complete=new Promise(function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}})}function p(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new h(n)}function d(e){this._db=e}function m(e,t,n){var i=r(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){n&&n(new p(o.result,e.oldVersion,o.transaction))}),i.then(function(e){return new d(e)})}function g(e){return r(indexedDB,"deleteDatabase",[e])}o(l,"_index",["name","keyPath","multiEntry","unique"]),s(l,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(l,"_index",IDBIndex,["openCursor","openKeyCursor"]),o(c,"_cursor",["direction","key","primaryKey","value"]),s(c,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(c.prototype[e]=function(){var t=this,r=arguments;return Promise.resolve().then(function(){return t._cursor[e].apply(t._cursor,r),n(t._request).then(function(e){if(e)return new c(e,t._request)})})})}),f.prototype.createIndex=function(){return new l(this._store.createIndex.apply(this._store,arguments))},f.prototype.index=function(){return new l(this._store.index.apply(this._store,arguments))},o(f,"_store",["name","keyPath","indexNames","autoIncrement"]),s(f,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(f,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),a(f,"_store",IDBObjectStore,["deleteIndex"]),h.prototype.objectStore=function(){return new f(this._tx.objectStore.apply(this._tx,arguments))},o(h,"_tx",["objectStoreNames","mode"]),a(h,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new f(this._db.createObjectStore.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),a(p,"_db",IDBDatabase,["deleteObjectStore","close"]),d.prototype.transaction=function(){return new h(this._db.transaction.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),a(d,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(e){[f,l].forEach(function(n){e in n.prototype&&(n.prototype[e.replace("open","iterate")]=function(){var n=t(arguments),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})})}),[l,f].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise(function(i){n.iterateCursor(e,function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)})})})}),e.openDb=m,e.deleteDb=g,Object.defineProperty(e,"__esModule",{value:!0})},i(t)},function(e,t,n){(function(r){const i=n(32);r.env.GUN_ENV="false";const o=n(168);n(1986),n(735),n(736),n(1987),n(1989);const s=n(5)("dweb-transports:gun"),a=n(220),u=n(97),l=n(134),c=n(115),f=n(170);let h={peers:["https://dweb.me:4246/gun"],localStorage:!1};class p extends l{constructor(e){super(e),this.options=e,this.gun=void 0,this.name="GUN",this.supportURLs=["gun"],this.supportFunctions=["fetch","connection","get","set","getall","keys","newdatabase","newtable","monitor","add","list","listmonitor","newlisturls"],this.supportFeatures=[],this.status=l.STATUS_LOADED}connection(e){e=i.parse(e);let t=e.pathname.split("/");return t.shift(),t.shift(),s("path=",t),this.gun.path(t)}static setup0(e){let t=l.mergeoptions(h,e.gun);s("options %o",t);let n=new p(t);return n.gun=new o(n.options),c.addtransport(n),n}async p_setup1(e){try{this.status=l.STATUS_STARTING,e&&e(this),await this.p_status()}catch(e){console.error(this.name,"failed to start",e),this.status=l.STATUS_FAILED}return e&&e(this),this}async p_status(){return this.status=l.STATUS_CONNECTED,this.status}async p_rawfetch(e){e=i.parse(e);let t=this.connection(e),n=await this._p_once(t);if(!n)throw new u.TransportError("GUN unable to retrieve: "+e.href);let r="string"==typeof n?JSON.parse(n):n;if(r.metadata&&r.metadata.thumbnaillinks&&r.metadata.thumbnaillinks.find(e=>e.includes("ipfs/zb2")))throw new u.TransportError("GUN retrieving legacy data at: "+e.href);return r}async p_rawlist(e){try{let t=this.connection(e),n=await this._p_once(t),r=n?Object.keys(n).filter(e=>"_"!==e).sort().map(e=>n[e]):[];return s("p_rawlist found",...f.consolearr(r)),r}catch(e){throw e}}listmonitor(e,t,{current:n=!1}={}){let r=this.connection(e);n?r.map().on((e,n)=>t("set",n,JSON.parse(e))):r.once(e=>{this.monitored=e?Object.keys(e):[],r.map().on((e,n)=>{this.monitored.includes(n)||"_"===n||(this.monitored.push(n),t(JSON.parse(e)))})})}async p_rawadd(e,t){console.assert(e&&t.urls.length&&t.signature&&t.signedby.length,"TransportGUN.p_rawadd args",e,t),this.connection(e).set(a(t.preflight(Object.assign({},t))))}async p_newlisturls(e){let t=await this._p_newgun(e);return[t,t]}async _p_newgun(e){return e.hasOwnProperty("keypair")&&(e=e.keypair.signingexport()),`gun:/gun/${encodeURIComponent(e)}`}async p_newdatabase(e){let t=await this._p_newgun(e);return{publicurl:t,privateurl:t}}async p_newtable(e,t){if(!e)throw new u.CodingError("p_newtable currently requires a pubkey");let n=await this.p_newdatabase(e);return{privateurl:`${n.privateurl}/${t}`,publicurl:`${n.publicurl}/${t}`}}async p_set(e,t,n){let r=this.connection(e);"string"==typeof t?r.path(t).put(a(n)):(console.assert(!Array.isArray(t),"TransportGUN - shouldnt be passsing an array as the keyvalues"),r.put(Object.keys(t).reduce(function(e,n){return e[n]=a(t[n]),e},{})))}async p_get(e,t){let n=this.connection(e);if(Array.isArray(t))throw new u.ToBeImplementedError("p_get(url, [keys]) isn't supported - because of ambiguity better to explicitly loop on set of keys or use getall and filter");{let e=await this._p_once(n.get(t));return"string"==typeof e?JSON.parse(e):e}}async p_delete(e,t){let n=this.connection(e);"string"==typeof t?n.path(t).put(null):t.map(e=>n.path(e).put(null))}_p_once(e){return new Promise(t=>e.once(t,{wait:2e3}))}async p_keys(e){let t=await this._p_once(this.connection(e));return Object.keys(t).filter(e=>"_"!==e&&null!==t[e])}async p_getall(e){let t=await this._p_once(this.connection(e));return Object.keys(t).filter(e=>"_"!==e&&null!==t[e]).reduce(function(e,n){return e[n]=JSON.parse(t[n]),e},{})}async monitor(e,t,{current:n=!1}={}){let r=this.connection(e);n?r.map().on((e,n)=>t("set",n,JSON.parse(e))):r.once(e=>{this.monitored=Object.assign({},e),r.map().on((e,n)=>{e!==this.monitored[n]&&"_"!==n&&(this.monitored[n]=e,t("set",n,JSON.parse(e)))})})}static async p_test(){s("p_test");try{let e=this.setup0({});await e.p_setup1(),await e.p_setup2(),e.p_test_kvt("gun:/gun/NACL")}catch(e){throw console.warn("Exception thrown in TransportGUN.test:",e.message),e}}static async demo_bugs(){let e=new o;e.get("foo").get("bar").put("baz"),console.log("Expect {bar: 'baz'} but get {_:..., bar: 'baz'}"),e.get("foo").once(e=>console.log(e)),e.get("zip").get("bar").set("alice"),console.log("Expect {12345: 'alice'} but get {_:..., 12345: 'alice'}"),e.get("foo").once(e=>console.log(e))}}c._transportclasses.GUN=p,t=e.exports=p}).call(this,n(2))},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=1985},function(e,t,n){var r="undefined"!=typeof window?window.Gun:n(168);r.chain.path=function(e,t){var n=this,r=this,i;if("string"==typeof e){if(i=e.split(t||"."),1===i.length)return r=this.get(e),r;e=i}if(e instanceof Array){if(e.length>1){r=this;for(var o=0,s=e.length;o<s;o++)r=r.get(e[o])}else r=this.get(e[0]);return r}return e||0==e?(r=this.get(""+e),r):this}},function(e,t,n){var r="undefined"!=typeof window?window.Gun:n(168);r.on("create",function(e){r.TESTING&&(e.opt.file="radatatest"),this.to.next(e);var t=e.opt,i;if(!1!==t.radisk){var o=r.window&&r.window.Radisk||n(736),s=o.Radix;t.store=t.store||!r.window&&n(1988)(t);var a=o(t),u=String.fromCharCode(27);e.on("put",function(t){this.to.next(t);var n=t["#"]||r.text.random(3),s=!t["@"],l=s?0:i;function c(t,r){l--,c.err||((c.err=t)?e.on("in",{"@":n,err:t}):l||e.on("in",{"@":n,ok:1}))}t.rad&&!s||r.graph.is(t.put,null,function(e,t,n,f){s&&++l,e=o.encode(e,null,u)+">"+o.encode(r.state.is(n,t),null,u),a(f+u+t,e,s?c:i)})}),e.on("get",function(t){this.to.next(t);var n=t["#"],l=t.get,c=t.get["#"],f=t.get["."]||"",h={},p,d,m,g,y;function b(e,t,n,i){if(e){t=(m+t).split(u);var s=t.slice(0,1)[0];t=t.slice(-1)[0],h.count=(h.count||0)+e.length,g=e.lastIndexOf(">");var a=o.decode(e.slice(g+1),null,u);return e=o.decode(e.slice(0,g),null,u),(p=p||{})[s]=r.state.ify(p[s],t,a,e,s),!!(h.limit&&h.limit<=h.count)||void 0}}"string"==typeof c?m=c:c&&(i!==(g=c["*"])&&(h.limit=y=1),i!==c[">"]&&(h.start=c[">"]),i!==c["<"]&&(h.end=c["<"]),m=y?""+g:g||c["="],y=null),m&&!h.limit&&("string"==typeof f?m=m+u+(h.atom=f):f&&(i!==f[">"]&&(h.start=f[">"],h.limit=1),i!==f["<"]&&(h.end=f["<"],h.limit=1),i!==(g=f["*"])&&(h.limit=y=1),m&&(m=m+u+(y?""+(g||""):g||(h.atom=f["="]||""))))),((g=l["%"])||h.limit)&&(h.limit=g<=(h.pack||1e5)?g:1),(f["-"]||(c||{})["-"])&&(h.reverse=!0),a(m||"",function(t,r,o){r&&("string"!=typeof r&&(h.atom?r=i:s.map(r,b)),!p&&r&&b(r,"")),e.on("in",{"@":n,put:p,err:t||i,rad:s})},h)})}})},function(e,t,n){function r(e){e=e||{},e.log=e.log||console.log,e.file=String(e.file||"radata");var t=n(15),i,o=function e(){};if(r[e.file])return console.log("Warning: reusing same fs store and options as 1st."),r[e.file];function s(e,n,r){t.rename(e,n,function(i){if(i)if("EXDEV"===i.code){var o=t.createReadStream(e),s=t.createWriteStream(n);o.on("error",r),s.on("error",r),o.on("close",function(){t.unlink(e,r)}),o.pipe(s)}else r(i);else r()})}return r[e.file]=o,o.put=function(n,r,i){var o=Math.random().toString(36).slice(-3),a=e.file+"-"+n+"-"+o+".tmp";t.writeFile(a,r,function(t,r){if(t)return i(t);s(a,e.file+"/"+n,i)})},o.get=function(n,r){t.readFile(e.file+"/"+n,function(t,n){if(t){if("ENOENT"===(t.code||"").toUpperCase())return r(null);e.log("ERROR:",t)}r(t,n)})},t.existsSync(e.file)||t.mkdirSync(e.file),o}e.exports=r},function(e,t,n){!function(){function t(e){e=e||{},e.file=String(e.file||"radata"),e.chunk=e.chunk||1048576;var n=null,r;try{e.indexedDB=e.indexedDB||indexedDB}catch(e){}try{if(!e.indexedDB||"file:"==location.protocol){var i={},o={};return i.put=function(e,t,n){o[e]=t,n(null,1)},i.get=function(e,t){t(null,o[e]||r)},console.log("Warning: No indexedDB exists to persist data to!"),i}}catch(e){}var i=function e(){};return t[e.file]?(console.log("Warning: reusing same IndexedDB store and options as 1st."),t[e.file]):(t[e.file]=i,i.start=function(){var t=indexedDB.open(e.file,1);t.onupgradeneeded=function(t){t.target.result.createObjectStore(e.file)},t.onsuccess=function(){n=t.result},t.onerror=function(e){console.log(e||1)}},i.start(),i.put=function(t,r,o){if(n){var s=n.transaction([e.file],"readwrite"),a=s.objectStore(e.file),u=a.put(r,""+t);u.onsuccess=a.onsuccess=s.onsuccess=function(){o(null,1)},u.onabort=a.onabort=s.onabort=function(e){o(e||"put.tx.abort")},u.onerror=a.onerror=s.onerror=function(e){o(e||"put.tx.error")}}else setTimeout(function(){i.put(t,r,o)},1)},i.get=function(t,r){if(n){var o=n.transaction([e.file],"readonly"),s=o.objectStore(e.file),a=s.get(""+t);a.onsuccess=function(){r(null,a.result)},a.onabort=function(e){r(e||4)},a.onerror=function(e){r(e||5)}}else setTimeout(function(){i.get(t,r)},9)},setInterval(function(){n&&n.close(),n=null,i.start()},15e3),i)}if("undefined"!=typeof window)(t.window=window).RindexedDB=t;else try{e.exports=t}catch(e){}try{var r=t.window.Gun||n(168);r.on("create",function(e){this.to.next(e),e.opt.store=e.opt.store||t(e.opt)})}catch(e){}}()}]);