/*! For license information please see index.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Borc=e():t.Borc=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=11)}([function(t,e,r){"use strict";(function(t){var n=r(14),i=r(5),s=r(15);function u(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(u()=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function g(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return N(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var s,u=1,o=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,o/=2,a/=2,r/=2}function h(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var f=-1;for(s=r;so&&(r=o-a),s=r;s>=0;s--){for(var c=!0,p=0;pi&&(n=i):n=i;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var u=0;u>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function N(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(s=t[i+1]))&&(a=(31&h)<<6|63&s)>127&&(f=a);break;case 3:s=t[i+1],u=t[i+2],128==(192&s)&&128==(192&u)&&(a=(15&h)<<12|(63&s)<<6|63&u)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:s=t[i+1],u=t[i+2],o=t[i+3],128==(192&s)&&128==(192&u)&&128==(192&o)&&(a=(15&h)<<18|(63&s)<<12|(63&u)<<6|63&o)>65535&&a<1114112&&(f=a)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0),o=Math.min(s,u),h=this.slice(n,i),f=t.slice(e,r),c=0;ci)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return v(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",s=e;sr)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,s){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function M(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(t,e,r,n,s){return s||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,s){return s||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},a.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+i]=t/s&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var s=0,u=1,o=0;for(this[e]=255&t;++s>0)-o&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var s=r-1,u=1,o=0;for(this[e+s]=255&t;--s>=0&&(u*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/u>>0)-o&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(s<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function k(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(4))},function(t,e,r){"use strict";var n;!function(i){var s,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,a=Math.floor,h="[BigNumber Error] ",f=h+"Number primitive has more than 15 significant digits: ",c=1e14,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],l=1e9;function g(t){var e=0|t;return t>0||t===e?e:e-1}function d(t){for(var e,r,n=1,i=t.length,s=t[0]+"";nh^r?1:-1;for(o=(a=i.length)<(h=s.length)?a:h,u=0;us[u]^r?1:-1;return a==h?0:a>h^r?1:-1}function _(t,e,r,n){if(tr||t!==a(t))throw Error(h+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return g(t.e/14)==e&&t.c[e]%2!=0}function m(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function E(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else eF?d.c=d.e=null:t.e=10;c/=10,h++);return void(h>F?d.c=d.e=null:(d.e=h,d.c=[t]))}g=String(t)}else{if(!u.test(g=String(t)))return i(d,g,p);d.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(h=g.indexOf("."))>-1&&(g=g.replace(".","")),(c=g.search(/e/i))>0?(h<0&&(h=c),h+=+g.slice(c+1),g=g.substring(0,c)):h<0&&(h=g.length)}else{if(_(e,2,C.length,"Base"),10==e)return H(d=new Y(t),R+d.e+1,U);if(g=String(t),p="number"==typeof t){if(0*t!=0)return i(d,g,p,e);if(d.s=1/t<0?(g=g.slice(1),-1):1,Y.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else d.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=C.slice(0,e),h=c=0,l=g.length;ch){h=l;continue}}else if(!o&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){o=!0,c=-1,h=0;continue}return i(d,String(t),p,e)}p=!1,(h=(g=n(g,e,10,d.s)).indexOf("."))>-1?g=g.replace(".",""):h=g.length}for(c=0;48===g.charCodeAt(c);c++);for(l=g.length;48===g.charCodeAt(--l););if(g=g.slice(c,++l)){if(l-=c,p&&Y.DEBUG&&l>15&&(t>9007199254740991||t!==a(t)))throw Error(f+d.s*t);if((h=h-c-1)>F)d.c=d.e=null;else if(h=P)?m(a,u):E(a,u,"0");else if(s=(t=H(new Y(t),e,r)).e,o=(a=d(t.c)).length,1==n||2==n&&(e<=s||s<=B)){for(;oo){if(--e>0)for(a+=".";e--;a+="0");}else if((e+=s-o)>0)for(s+1==o&&(a+=".");e--;a+="0");return t.s<0&&i?"-"+a:a}function k(t,e){for(var r,n=1,i=new Y(t[0]);n=10;i/=10,n++);return(r=n+14*r-1)>F?t.c=t.e=null:r=10;h/=10,i++);if((s=e-i)<0)s+=14,u=e,g=(f=d[l=0])/y[i-u-1]%10|0;else if((l=o((s+1)/14))>=d.length){if(!n)break t;for(;d.length<=l;d.push(0));f=g=0,i=1,u=(s%=14)-14+1}else{for(f=h=d[l],i=1;h>=10;h/=10,i++);g=(u=(s%=14)-14+i)<0?0:f/y[i-u-1]%10|0}if(n=n||e<0||null!=d[l+1]||(u<0?f:f%y[i-u-1]),n=r<4?(g||n)&&(0==r||r==(t.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(s>0?u>0?f/y[i-u]:0:d[l-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,n?(e-=t.e+1,d[0]=y[(14-e%14)%14],t.e=-e||0):d[0]=t.e=0,t;if(0==s?(d.length=l,h=1,l--):(d.length=l+1,h=y[14-s],d[l]=u>0?a(f/y[i-u]%y[u])*h:0),n)for(;;){if(0==l){for(s=1,u=d[0];u>=10;u/=10,s++);for(u=d[0]+=h,h=1;u>=10;u/=10,h++);s!=h&&(t.e++,d[0]==c&&(d[0]=1));break}if(d[l]+=h,d[l]!=c)break;d[l--]=0,h=1}for(s=d.length;0===d[--s];d.pop());}t.e>F?t.c=t.e=null:t.e=P?m(e,r):E(e,r,"0"),t.s<0?"-"+e:e)}return Y.clone=t,Y.ROUND_UP=0,Y.ROUND_DOWN=1,Y.ROUND_CEIL=2,Y.ROUND_FLOOR=3,Y.ROUND_HALF_UP=4,Y.ROUND_HALF_DOWN=5,Y.ROUND_HALF_EVEN=6,Y.ROUND_HALF_CEIL=7,Y.ROUND_HALF_FLOOR=8,Y.EUCLID=9,Y.config=Y.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(h+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(r=t[e],0,l,e),R=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(r=t[e],0,8,e),U=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(_(r[0],-l,0,e),_(r[1],0,l,e),B=r[0],P=r[1]):(_(r,-l,l,e),B=-(P=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)_(r[0],-l,-1,e),_(r[1],1,l,e),O=r[0],F=r[1];else{if(_(r,-l,l,e),!r)throw Error(h+e+" cannot be zero: "+r);O=-(F=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(h+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw L=!r,Error(h+"crypto unavailable");L=r}else L=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(r=t[e],0,9,e),M=r),t.hasOwnProperty(e="POW_PRECISION")&&(_(r=t[e],0,l,e),x=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(h+e+" not an object: "+r);D=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(h+e+" invalid: "+r);C=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:U,EXPONENTIAL_AT:[B,P],RANGE:[O,F],CRYPTO:L,MODULO_MODE:M,POW_PRECISION:x,FORMAT:D,ALPHABET:C}},Y.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!Y.DEBUG)return!0;var e,r,n=t.c,i=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-l&&i<=l&&i===a(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e=c||r!==a(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(h+"Invalid BigNumber: "+t)},Y.maximum=Y.max=function(){return k(arguments,T.lt)},Y.minimum=Y.min=function(){return k(arguments,T.gt)},Y.random=(s=9007199254740992*Math.random()&2097151?function(){return a(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,u,f=0,c=[],g=new Y(I);if(null==t?t=R:_(t,0,l),i=o(t/14),L)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));f>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[f]=r[0],e[f+1]=r[1]):(c.push(u%1e14),f+=2);f=i/2}else{if(!crypto.randomBytes)throw L=!1,Error(h+"crypto unavailable");for(e=crypto.randomBytes(i*=7);f=9e15?crypto.randomBytes(7).copy(e,f):(c.push(u%1e14),f+=7);f=i/7}if(!L)for(;f=10;u/=10,f++);f<14&&(n-=14-f)}return g.e=n,g.c=c,g}),Y.sum=function(){for(var t=1,e=arguments,r=new Y(e[0]);tr-1&&(null==u[i+1]&&(u[i+1]=0),u[i+1]+=u[i]/r|0,u[i]%=r)}return u.reverse()}return function(e,n,i,s,u){var o,a,h,f,c,p,l,g,y=e.indexOf("."),_=R,w=U;for(y>=0&&(f=x,x=0,e=e.replace(".",""),p=(g=new Y(n)).pow(e.length-y),x=f,g.c=t(E(d(p.c),p.e,"0"),10,i,"0123456789"),g.e=g.c.length),h=f=(l=t(e,n,i,u?(o=C,"0123456789"):(o="0123456789",C))).length;0==l[--f];l.pop());if(!l[0])return o.charAt(0);if(y<0?--h:(p.c=l,p.e=h,p.s=s,l=(p=r(p,g,_,w,i)).c,c=p.r,h=p.e),y=l[a=h+_+1],f=i/2,c=c||a<0||null!=l[a+1],c=w<4?(null!=y||c)&&(0==w||w==(p.s<0?3:2)):y>f||y==f&&(4==w||c||6==w&&1&l[a-1]||w==(p.s<0?8:7)),a<1||!l[0])e=c?E(o.charAt(1),-_,o.charAt(0)):o.charAt(0);else{if(l.length=a,c)for(--i;++l[--a]>i;)l[a]=0,a||(++h,l=[1].concat(l));for(f=l.length;!l[--f];);for(y=0,e="";y<=f;e+=o.charAt(l[y++]));e=E(e,h,o.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,s,u,o=0,a=t.length,h=e%1e7,f=e/1e7|0;for(t=t.slice();a--;)o=((i=h*(s=t[a]%1e7)+(n=f*s+(u=t[a]/1e7|0)*h)%1e7*1e7+o)/r|0)+(n/1e7|0)+f*u,t[a]=i%r;return o&&(t=[o].concat(t)),t}function e(t,e,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;ie[i]?1:-1;break}return s}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,s,u,o){var h,f,p,l,d,y,_,w,m,E,b,v,S,A,N,T,I,R=n.s==i.s?1:-1,U=n.c,B=i.c;if(!(U&&U[0]&&B&&B[0]))return new Y(n.s&&i.s&&(U?!B||U[0]!=B[0]:B)?U&&0==U[0]||!B?0*R:R/0:NaN);for(m=(w=new Y(R)).c=[],R=s+(f=n.e-i.e)+1,o||(o=c,f=g(n.e/14)-g(i.e/14),R=R/14|0),p=0;B[p]==(U[p]||0);p++);if(B[p]>(U[p]||0)&&f--,R<0)m.push(1),l=!0;else{for(A=U.length,T=B.length,p=0,R+=2,(d=a(o/(B[0]+1)))>1&&(B=t(B,d,o),U=t(U,d,o),T=B.length,A=U.length),S=T,b=(E=U.slice(0,T)).length;b=o/2&&N++;do{if(d=0,(h=e(B,E,T,b))<0){if(v=E[0],T!=b&&(v=v*o+(E[1]||0)),(d=a(v/N))>1)for(d>=o&&(d=o-1),_=(y=t(B,d,o)).length,b=E.length;1==e(y,E,_,b);)d--,r(y,T<_?I:B,_,o),_=y.length,h=1;else 0==d&&(h=d=1),_=(y=B.slice()).length;if(_=10;R/=10,p++);H(w,s+(w.e=p+14*f-1)+1,u,l)}else w.e=f,w.r=+l;return w}}(),b=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,S=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,s=r?e:e.replace(N,"");if(A.test(s))t.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(b,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,s=s.replace(v,"$1").replace(S,"0.$1")),e!=s))return new Y(s,i);if(Y.DEBUG)throw Error(h+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},T.absoluteValue=T.abs=function(){var t=new Y(this);return t.s<0&&(t.s=1),t},T.comparedTo=function(t,e){return y(this,new Y(t,e))},T.decimalPlaces=T.dp=function(t,e){var r,n,i,s=this;if(null!=t)return _(t,0,l),null==e?e=U:_(e,0,8),H(new Y(s),t+s.e+1,e);if(!(r=s.c))return null;if(n=14*((i=r.length-1)-g(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},T.dividedBy=T.div=function(t,e){return r(this,new Y(t,e),R,U)},T.dividedToIntegerBy=T.idiv=function(t,e){return r(this,new Y(t,e),0,1)},T.exponentiatedBy=T.pow=function(t,e){var r,n,i,s,u,f,c,p,l=this;if((t=new Y(t)).c&&!t.isInteger())throw Error(h+"Exponent not an integer: "+z(t));if(null!=e&&(e=new Y(e)),u=t.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!t.c||!t.c[0])return p=new Y(Math.pow(+z(l),u?2-w(t):+z(t))),e?p.mod(e):p;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new Y(NaN);(n=!f&&l.isInteger()&&e.isInteger())&&(l=l.mod(e))}else{if(t.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||u&&l.c[1]>=24e7:l.c[0]<8e13||u&&l.c[0]<=9999975e7)))return s=l.s<0&&w(t)?-0:0,l.e>-1&&(s=1/s),new Y(f?1/s:s);x&&(s=o(x/14+2))}for(u?(r=new Y(.5),f&&(t.s=1),c=w(t)):c=(i=Math.abs(+z(t)))%2,p=new Y(I);;){if(c){if(!(p=p.times(l)).c)break;s?p.c.length>s&&(p.c.length=s):n&&(p=p.mod(e))}if(i){if(0===(i=a(i/2)))break;c=i%2}else if(H(t=t.times(r),t.e+1,1),t.e>14)c=w(t);else{if(0===(i=+z(t)))break;c=i%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(e))}return n?p:(f&&(p=I.div(p)),e?p.mod(e):s?H(p,x,U,void 0):p)},T.integerValue=function(t){var e=new Y(this);return null==t?t=U:_(t,0,8),H(e,e.e+1,t)},T.isEqualTo=T.eq=function(t,e){return 0===y(this,new Y(t,e))},T.isFinite=function(){return!!this.c},T.isGreaterThan=T.gt=function(t,e){return y(this,new Y(t,e))>0},T.isGreaterThanOrEqualTo=T.gte=function(t,e){return 1===(e=y(this,new Y(t,e)))||0===e},T.isInteger=function(){return!!this.c&&g(this.e/14)>this.c.length-2},T.isLessThan=T.lt=function(t,e){return y(this,new Y(t,e))<0},T.isLessThanOrEqualTo=T.lte=function(t,e){return-1===(e=y(this,new Y(t,e)))||0===e},T.isNaN=function(){return!this.s},T.isNegative=function(){return this.s<0},T.isPositive=function(){return this.s>0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.minus=function(t,e){var r,n,i,s,u=this,o=u.s;if(e=(t=new Y(t,e)).s,!o||!e)return new Y(NaN);if(o!=e)return t.s=-e,u.plus(t);var a=u.e/14,h=t.e/14,f=u.c,p=t.c;if(!a||!h){if(!f||!p)return f?(t.s=-e,t):new Y(p?u:NaN);if(!f[0]||!p[0])return p[0]?(t.s=-e,t):new Y(f[0]?u:3==U?-0:0)}if(a=g(a),h=g(h),f=f.slice(),o=a-h){for((s=o<0)?(o=-o,i=f):(h=a,i=p),i.reverse(),e=o;e--;i.push(0));i.reverse()}else for(n=(s=(o=f.length)<(e=p.length))?o:e,o=e=0;e0)for(;e--;f[r++]=0);for(e=c-1;n>o;){if(f[--n]=0;){for(r=0,l=E[i]%1e7,d=E[i]/1e7|0,s=i+(u=a);s>i;)r=((h=l*(h=m[--u]%1e7)+(o=d*h+(f=m[u]/1e7|0)*l)%1e7*1e7+y[s]+r)/_|0)+(o/1e7|0)+d*f,y[s--]=h%_;y[s]=r}return r?++n:y.splice(0,1),G(t,y,n)},T.negated=function(){var t=new Y(this);return t.s=-t.s||null,t},T.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new Y(t,e)).s,!i||!e)return new Y(NaN);if(i!=e)return t.s=-e,n.minus(t);var s=n.e/14,u=t.e/14,o=n.c,a=t.c;if(!s||!u){if(!o||!a)return new Y(i/0);if(!o[0]||!a[0])return a[0]?t:new Y(o[0]?n:0*i)}if(s=g(s),u=g(u),o=o.slice(),i=s-u){for(i>0?(u=s,r=a):(i=-i,r=o),r.reverse();i--;r.push(0));r.reverse()}for((i=o.length)-(e=a.length)<0&&(r=a,a=o,o=r,e=i),i=0;e;)i=(o[--e]=o[e]+a[e]+i)/c|0,o[e]=c===o[e]?0:o[e]%c;return i&&(o=[i].concat(o),++u),G(t,o,u)},T.precision=T.sd=function(t,e){var r,n,i,s=this;if(null!=t&&t!==!!t)return _(t,1,l),null==e?e=U:_(e,0,8),H(new Y(s),t,e);if(!(r=s.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&s.e+1>n&&(n=s.e+1),n},T.shiftedBy=function(t){return _(t,-9007199254740991,9007199254740991),this.times("1e"+t)},T.squareRoot=T.sqrt=function(){var t,e,n,i,s,u=this,o=u.c,a=u.s,h=u.e,f=R+4,c=new Y("0.5");if(1!==a||!o||!o[0])return new Y(!a||a<0&&(!o||o[0])?NaN:o?u:1/0);if(0==(a=Math.sqrt(+z(u)))||a==1/0?(((e=d(o)).length+h)%2==0&&(e+="0"),a=Math.sqrt(+e),h=g((h+1)/2)-(h<0||h%2),n=new Y(e=a==1/0?"1e"+h:(e=a.toExponential()).slice(0,e.indexOf("e")+1)+h)):n=new Y(a+""),n.c[0])for((a=(h=n.e)+f)<3&&(a=0);;)if(s=n,n=c.times(s.plus(r(u,s,f,1))),d(s.c).slice(0,a)===(e=d(n.c)).slice(0,a)){if(n.e0&&d>0){for(s=d%o||o,c=g.substr(0,s);s0&&(c+=f+g.slice(s)),l&&(c="-"+c)}n=p?c+(r.decimalSeparator||"")+((a=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):c}return(r.prefix||"")+n+(r.suffix||"")},T.toFraction=function(t){var e,n,i,s,u,o,a,f,c,l,g,y,_=this,w=_.c;if(null!=t&&(!(a=new Y(t)).isInteger()&&(a.c||1!==a.s)||a.lt(I)))throw Error(h+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+z(a));if(!w)return new Y(_);for(e=new Y(I),c=n=new Y(I),i=f=new Y(I),y=d(w),u=e.e=y.length-_.e-1,e.c[0]=p[(o=u%14)<0?14+o:o],t=!t||a.comparedTo(e)>0?u>0?e:c:a,o=F,F=1/0,a=new Y(y),f.c[0]=0;l=r(a,e,0,1),1!=(s=n.plus(l.times(i))).comparedTo(t);)n=i,i=s,c=f.plus(l.times(s=c)),f=s,e=a.minus(l.times(s=e)),a=s;return s=r(t.minus(n),i,0,1),f=f.plus(s.times(c)),n=n.plus(s.times(i)),f.s=c.s=_.s,g=r(c,i,u*=2,U).minus(_).abs().comparedTo(r(f,n,u,U).minus(_).abs())<1?[c,i]:[f,n],F=o,g},T.toNumber=function(){return+z(this)},T.toPrecision=function(t,e){return null!=t&&_(t,1,l),j(this,t,e,2)},T.toString=function(t){var e,r=this,i=r.s,s=r.e;return null===s?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=s<=B||s>=P?m(d(r.c),s):E(d(r.c),s,"0"):10===t?e=E(d((r=H(new Y(r),R+s+1,U)).c),r.e,"0"):(_(t,2,C.length,"Base"),e=n(E(d(r.c),s,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},T.valueOf=T.toJSON=function(){return z(this)},T._isBigNumber=!0,null!=e&&Y.set(e),Y}()).default=s.BigNumber=s,void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){"use strict";const n=r(1).BigNumber;e.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},e.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},e.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},e.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},e.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},e.SHIFT32=Math.pow(2,32),e.SHIFT16=Math.pow(2,16),e.MAX_SAFE_HIGH=2097151,e.NEG_ONE=new n(-1),e.TEN=new n(10),e.TWO=new n(2),e.PARENT={ARRAY:0,OBJECT:1,MAP:2,TAG:3,BYTE_STRING:4,UTF8_STRING:5}},function(t,e,r){"use strict";const{Buffer:n}=r(0),i=r(1).BigNumber,s=r(2),u=s.SHIFT32,o=s.SHIFT16;e.parseHalf=function(t){var e,r,n;return n=128&t[0]?-1:1,e=(124&t[0])>>2,r=(3&t[0])<<8|t[1],e?31===e?n*(r?NaN:Infinity):n*Math.pow(2,e-25)*(1024+r):5.960464477539063e-8*n*r},e.arrayBufferToBignumber=function(t){const e=t.byteLength;let r="";for(let i=0;i{const e=new Map,r=Object.keys(t),n=r.length;for(let i=0;it*o+e,e.buildInt64=(t,r,n,s)=>{const o=e.buildInt32(t,r),a=e.buildInt32(n,s);return o>2097151?new i(o).times(u).plus(a):o*u+a},e.writeHalf=function(t,e){const r=n.allocUnsafe(4);r.writeFloatBE(e,0);const i=r.readUInt32BE(0);if(0!=(8191&i))return!1;var s=i>>16&32768;const u=i>>23&255,o=8388607&i;if(u>=113&&u<=142)s+=(u-112<<10)+(o>>13);else{if(!(u>=103&&u<113))return!1;if(o&(1<<126-u)-1)return!1;s+=o+8388608>>126-u}return t.writeUInt16BE(s,0),!0},e.keySorter=function(t,e){var r=t[0].byteLength,n=e[0].byteLength;return r>n?1:n>r?-1:t[0].compare(e[0])},e.isNegativeZero=t=>0===t&&1/t<0,e.nextPowerOf2=t=>{let e=0;if(t&&!(t&t-1))return t;for(;0!==t;)t>>=1,e+=1;return 1<>1,f=-7,c=r?i-1:0,p=r?-1:1,l=t[e+c];for(c+=p,s=l&(1<<-f)-1,l>>=-f,f+=o;f>0;s=256*s+t[e+c],c+=p,f-=8);for(u=s&(1<<-f)-1,s>>=-f,f+=n;f>0;u=256*u+t[e+c],c+=p,f-=8);if(0===s)s=1-h;else{if(s===a)return u?NaN:1/0*(l?-1:1);u+=Math.pow(2,n),s-=h}return(l?-1:1)*u*Math.pow(2,s-n)},e.write=function(t,e,r,n,i,s){var u,o,a,h=8*s-i-1,f=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:s-1,g=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,u=f):(u=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-u))<1&&(u--,a*=2),(e+=u+c>=1?p/a:p*Math.pow(2,1-c))*a>=2&&(u++,a/=2),u+c>=f?(o=0,u=f):u+c>=1?(o=(e*a-1)*Math.pow(2,i),u+=c):(o=e*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[r+l]=255&o,l+=g,o/=256,i-=8);for(u=u<0;t[r+l]=255&u,l+=g,u/=256,h-=8);t[r+l-g]|=128*d}},function(t,e,r){"use strict";(function(e){const{Buffer:n}=r(0),i=r(5),s=r(1).BigNumber,u=r(16),o=r(3),a=r(2),h=r(7),f=r(8),{URL:c}=r(9);class p{constructor(t){!(t=t||{}).size||t.size<65536?t.size=65536:t.size=o.nextPowerOf2(t.size),this._heap=new ArrayBuffer(t.size),this._heap8=new Uint8Array(this._heap),this._buffer=n.from(this._heap),this._reset(),this._knownTags=Object.assign({0:t=>new Date(t),1:t=>new Date(1e3*t),2:t=>o.arrayBufferToBignumber(t),3:t=>a.NEG_ONE.minus(o.arrayBufferToBignumber(t)),4:t=>a.TEN.pow(t[0]).times(t[1]),5:t=>a.TWO.pow(t[0]).times(t[1]),32:t=>new c(t),35:t=>new RegExp(t)},t.tags),this.parser=u(e,{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 t=this._parents.pop();if(t.length>0)throw new Error("Missing ".concat(t.length," elements"));switch(t.type){case a.PARENT.TAG:this._push(this.createTag(t.ref[0],t.ref[1]));break;case a.PARENT.BYTE_STRING:this._push(this.createByteString(t.ref,t.length));break;case a.PARENT.UTF8_STRING:this._push(this.createUtf8String(t.ref,t.length));break;case a.PARENT.MAP:if(t.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createMap(t.ref,t.length));break;case a.PARENT.OBJECT:if(t.values%2>0)throw new Error("Odd number of elements in the map");this._push(this.createObject(t.ref,t.length));break;case a.PARENT.ARRAY:this._push(this.createArray(t.ref,t.length))}this._currentParent&&this._currentParent.type===a.PARENT.TAG&&this._dec()}_dec(){const t=this._currentParent;t.length<0||(t.length--,0===t.length&&this._closeParent())}_push(t,e){const r=this._currentParent;switch(r.values++,r.type){case a.PARENT.ARRAY:case a.PARENT.BYTE_STRING:case a.PARENT.UTF8_STRING:r.length>-1?this._ref[this._ref.length-r.length]=t:this._ref.push(t),this._dec();break;case a.PARENT.OBJECT:null!=r.tmpKey?(this._ref[r.tmpKey]=t,r.tmpKey=null,this._dec()):(r.tmpKey=t,"string"!=typeof r.tmpKey&&(r.type=a.PARENT.MAP,r.ref=o.buildMap(r.ref)));break;case a.PARENT.MAP:null!=r.tmpKey?(this._ref.set(r.tmpKey,t),r.tmpKey=null,this._dec()):r.tmpKey=t;break;case a.PARENT.TAG:this._ref.push(t),e||this._dec();break;default:throw new Error("Unknown parent type")}}_createParent(t,e,r){this._parents[this._depth]={type:e,length:r,ref:t,values:0,tmpKey:null}}_reset(){this._res=[],this._parents=[{type:a.PARENT.ARRAY,length:-1,ref:this._res,values:0,tmpKey:null}]}createTag(t,e){const r=this._knownTags[t];return r?r(e):new f(t,e)}createMap(t,e){return t}createObject(t,e){return t}createArray(t,e){return t}createByteString(t,e){return n.concat(t)}createByteStringFromHeap(t,e){return t===e?n.alloc(0):n.from(this._heap.slice(t,e))}createInt(t){return t}createInt32(t,e){return o.buildInt32(t,e)}createInt64(t,e,r,n){return o.buildInt64(t,e,r,n)}createFloat(t){return t}createFloatSingle(t,e,r,n){return i.read([t,e,r,n],0,!1,23,4)}createFloatDouble(t,e,r,n,s,u,o,a){return i.read([t,e,r,n,s,u,o,a],0,!1,52,8)}createInt32Neg(t,e){return-1-o.buildInt32(t,e)}createInt64Neg(t,e,r,n){const i=o.buildInt32(t,e),u=o.buildInt32(r,n);return i>a.MAX_SAFE_HIGH?a.NEG_ONE.minus(new s(i).times(a.SHIFT32).plus(u)):-1-(i*a.SHIFT32+u)}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(t,e){return t.join("")}createUtf8StringFromHeap(t,e){return t===e?"":this._buffer.toString("utf8",t,e)}createSimpleUnassigned(t){return new h(t)}pushInt(t){this._push(this.createInt(t))}pushInt32(t,e){this._push(this.createInt32(t,e))}pushInt64(t,e,r,n){this._push(this.createInt64(t,e,r,n))}pushFloat(t){this._push(this.createFloat(t))}pushFloatSingle(t,e,r,n){this._push(this.createFloatSingle(t,e,r,n))}pushFloatDouble(t,e,r,n,i,s,u,o){this._push(this.createFloatDouble(t,e,r,n,i,s,u,o))}pushInt32Neg(t,e){this._push(this.createInt32Neg(t,e))}pushInt64Neg(t,e,r,n){this._push(this.createInt64Neg(t,e,r,n))}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([],a.PARENT.ARRAY,-1)}pushArrayStartFixed(t){this._createArrayStartFixed(t)}pushArrayStartFixed32(t,e){const r=o.buildInt32(t,e);this._createArrayStartFixed(r)}pushArrayStartFixed64(t,e,r,n){const i=o.buildInt64(t,e,r,n);this._createArrayStartFixed(i)}pushObjectStart(){this._createObjectStartFixed(-1)}pushObjectStartFixed(t){this._createObjectStartFixed(t)}pushObjectStartFixed32(t,e){const r=o.buildInt32(t,e);this._createObjectStartFixed(r)}pushObjectStartFixed64(t,e,r,n){const i=o.buildInt64(t,e,r,n);this._createObjectStartFixed(i)}pushByteStringStart(){this._parents[this._depth]={type:a.PARENT.BYTE_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushByteString(t,e){this._push(this.createByteStringFromHeap(t,e))}pushUtf8StringStart(){this._parents[this._depth]={type:a.PARENT.UTF8_STRING,length:-1,ref:[],values:0,tmpKey:null}}pushUtf8String(t,e){this._push(this.createUtf8StringFromHeap(t,e))}pushSimpleUnassigned(t){this._push(this.createSimpleUnassigned(t))}pushTagStart(t){this._parents[this._depth]={type:a.PARENT.TAG,length:1,ref:[t]}}pushTagStart4(t,e){this.pushTagStart(o.buildInt32(t,e))}pushTagStart8(t,e,r,n){this.pushTagStart(o.buildInt64(t,e,r,n))}pushTagUnassigned(t){this._push(this.createTag(t))}pushBreak(){if(this._currentParent.length>-1)throw new Error("Unexpected break");this._closeParent()}_createObjectStartFixed(t){0!==t?this._createParent({},a.PARENT.OBJECT,t):this._push(this.createObject({}))}_createArrayStartFixed(t){0!==t?this._createParent(new Array(t),a.PARENT.ARRAY,t):this._push(this.createArray([]))}_decode(t){if(0===t.byteLength)throw new Error("Input too short");this._reset(),this._heap8.set(t);const e=this.parser.parse(t.byteLength);if(this._depth>1){for(;0===this._currentParent.length;)this._closeParent();if(this._depth>1)throw new Error("Undeterminated nesting")}if(e>0)throw new Error("Failed to parse");if(0===this._res.length)throw new Error("No valid result")}decodeFirst(t){return this._decode(t),this._res[0]}decodeAll(t){return this._decode(t),this._res}static decode(t,e){return"string"==typeof t&&(t=n.from(t,e||"hex")),new p({size:t.length}).decodeFirst(t)}static decodeAll(t,e){return"string"==typeof t&&(t=n.from(t,e||"hex")),new p({size:t.length}).decodeAll(t)}}p.decodeFirst=p.decode,t.exports=p}).call(this,r(4))},function(t,e,r){"use strict";const n=r(2),i=n.MT,s=n.SIMPLE,u=n.SYMS;class o{constructor(t){if("number"!=typeof t)throw new Error("Invalid Simple type: "+typeof t);if(t<0||t>255||(0|t)!==t)throw new Error("value must be a small positive integer: "+t);this.value=t}toString(){return"simple("+this.value+")"}inspect(){return"simple("+this.value+")"}encodeCBOR(t){return t._pushInt(this.value,i.SIMPLE_FLOAT)}static isSimple(t){return t instanceof o}static decode(t,e){switch(null==e&&(e=!0),t){case s.FALSE:return!1;case s.TRUE:return!0;case s.NULL:return e?null:u.NULL;case s.UNDEFINED:return e?void 0:u.UNDEFINED;case-1:if(!e)throw new Error("Invalid BREAK");return u.BREAK;default:return new o(t)}}}t.exports=o},function(t,e,r){"use strict";class n{constructor(t,e,r){if(this.tag=t,this.value=e,this.err=r,"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"".concat(this.tag,"(").concat(JSON.stringify(this.value),")")}encodeCBOR(t){return t._pushTag(this.tag),t.pushAny(this.value)}convert(t){var e,r;if("function"!=typeof(r=null!=t?t[this.tag]:void 0)&&"function"!=typeof(r=n["_tag"+this.tag]))return this;try{return r.call(n,this.value)}catch(i){return e=i,this.err=e,this}}}t.exports=n},function(t,e,r){"use strict";const{URLWithLegacySupport:n,format:i,URLSearchParams:s,defaultBase:u}=r(10),o=r(17);t.exports={URL:n,URLSearchParams:s,format:i,relative:o,defaultBase:u}},function(t,e,r){"use strict";const n=self.location?self.location.protocol+"//"+self.location.host:"",i=self.URL;t.exports={URLWithLegacySupport:class{constructor(t="",e=n){this.super=new i(t,e),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(t){this.super.hash=t}set host(t){this.super.host=t}set hostname(t){this.super.hostname=t}set href(t){this.super.href=t}set origin(t){this.super.origin=t}set password(t){this.super.password=t}set pathname(t){this.super.pathname=t}set port(t){this.super.port=t}set protocol(t){this.super.protocol=t}set search(t){this.super.search=t}set searchParams(t){this.super.searchParams=t}set username(t){this.super.username=t}createObjectURL(t){return this.super.createObjectURL(t)}revokeObjectURL(t){this.super.revokeObjectURL(t)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}},URLSearchParams:self.URLSearchParams,defaultBase:n,format:function(t){if("string"==typeof t){return new i(t).toString()}if(!(t instanceof i)){const e=t.username&&t.password?"".concat(t.username,":").concat(t.password,"@"):"",r=t.auth?t.auth+"@":"",n=t.port?":"+t.port:"",i=t.protocol?t.protocol+"//":"",s=t.host||"",u=t.hostname||"",o=t.search||(t.query?"?"+t.query:""),a=t.hash||"",h=t.pathname||"",f=t.path||h+o;return"".concat(i).concat(e||r).concat(s||u+n).concat(f).concat(a)}}}},function(t,e,r){t.exports=r(12)},function(t,e,r){"use strict";e.Diagnose=r(13),e.Decoder=r(6),e.Encoder=r(18),e.Simple=r(7),e.Tagged=r(8),e.decodeAll=e.Decoder.decodeAll,e.decodeFirst=e.Decoder.decodeFirst,e.diagnose=e.Diagnose.diagnose,e.encode=e.Encoder.encode,e.decode=e.Decoder.decode,e.leveldb={decode:e.Decoder.decodeAll,encode:e.Encoder.encode,buffer:!0,name:"cbor"}},function(t,e,r){"use strict";const{Buffer:n}=r(0),i=r(6),s=r(3);class u extends i{createTag(t,e){return"".concat(t,"(").concat(e,")")}createInt(t){return super.createInt(t).toString()}createInt32(t,e){return super.createInt32(t,e).toString()}createInt64(t,e,r,n){return super.createInt64(t,e,r,n).toString()}createInt32Neg(t,e){return super.createInt32Neg(t,e).toString()}createInt64Neg(t,e,r,n){return super.createInt64Neg(t,e,r,n).toString()}createTrue(){return"true"}createFalse(){return"false"}createFloat(t){const e=super.createFloat(t);return s.isNegativeZero(t)?"-0_1":"".concat(e,"_1")}createFloatSingle(t,e,r,n){const i=super.createFloatSingle(t,e,r,n);return"".concat(i,"_2")}createFloatDouble(t,e,r,n,i,s,u,o){const a=super.createFloatDouble(t,e,r,n,i,s,u,o);return"".concat(a,"_3")}createByteString(t,e){const r=t.join(", ");return-1===e?"(_ ".concat(r,")"):"h'".concat(r)}createByteStringFromHeap(t,e){const r=n.from(super.createByteStringFromHeap(t,e)).toString("hex");return"h'".concat(r,"'")}createInfinity(){return"Infinity_1"}createInfinityNeg(){return"-Infinity_1"}createNaN(){return"NaN_1"}createNaNNeg(){return"-NaN_1"}createNull(){return"null"}createUndefined(){return"undefined"}createSimpleUnassigned(t){return"simple(".concat(t,")")}createArray(t,e){const r=super.createArray(t,e);return-1===e?"[_ ".concat(r.join(", "),"]"):"[".concat(r.join(", "),"]")}createMap(t,e){const r=super.createMap(t),n=Array.from(r.keys()).reduce(o(r),"");return-1===e?"{_ ".concat(n,"}"):"{".concat(n,"}")}createObject(t,e){const r=super.createObject(t),n=Object.keys(r).reduce(o(r),"");return-1===e?"{_ ".concat(n,"}"):"{".concat(n,"}")}createUtf8String(t,e){const r=t.join(", ");return-1===e?"(_ ".concat(r,")"):'"'.concat(r,'"')}createUtf8StringFromHeap(t,e){const r=n.from(super.createUtf8StringFromHeap(t,e)).toString("utf8");return'"'.concat(r,'"')}static diagnose(t,e){return"string"==typeof t&&(t=n.from(t,e||"hex")),(new u).decodeFirst(t)}}function o(t){return(e,r)=>e?"".concat(e,", ").concat(r,": ").concat(t[r]):"".concat(r,": ").concat(t[r])}t.exports=u},function(t,e,r){"use strict";e.byteLength=function(t){var e=h(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=h(t),u=n[0],o=n[1],a=new s(function(t,e,r){return 3*(e+r)/4-r}(0,u,o)),f=0,c=o>0?u-4:u;for(r=0;r>16&255,a[f++]=e>>8&255,a[f++]=255&e;2===o&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[f++]=255&e);1===o&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[f++]=e>>8&255,a[f++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],u=0,o=r-i;uo?o:u+16383));1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=u.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,s,u=[],o=e;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e,r){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,r){"use strict";t.exports=function(t,e,r){"use asm";var n=new t.Uint8Array(r);var i=e.pushInt;var s=e.pushInt32;var u=e.pushInt32Neg;var o=e.pushInt64;var a=e.pushInt64Neg;var h=e.pushFloat;var f=e.pushFloatSingle;var c=e.pushFloatDouble;var p=e.pushTrue;var l=e.pushFalse;var g=e.pushUndefined;var d=e.pushNull;var y=e.pushInfinity;var _=e.pushInfinityNeg;var w=e.pushNaN;var m=e.pushNaNNeg;var E=e.pushArrayStart;var b=e.pushArrayStartFixed;var v=e.pushArrayStartFixed32;var S=e.pushArrayStartFixed64;var A=e.pushObjectStart;var N=e.pushObjectStartFixed;var T=e.pushObjectStartFixed32;var I=e.pushObjectStartFixed64;var R=e.pushByteString;var U=e.pushByteStringStart;var B=e.pushUtf8String;var P=e.pushUtf8StringStart;var O=e.pushSimpleUnassigned;var F=e.pushTagStart;var L=e.pushTagStart4;var M=e.pushTagStart8;var x=e.pushTagUnassigned;var D=e.pushBreak;var C=t.Math.pow;var Y=0;var j=0;var k=0;function G(t){t=t|0;Y=0;j=t;while((Y|0)<(j|0)){k=Jt[n[Y]&255](n[Y]|0)|0;if((k|0)>0){break}}return k|0}function H(t){t=t|0;if(((Y|0)+(t|0)|0)<(j|0)){return 0}return 1}function z(t){t=t|0;return n[t|0]<<8|n[t+1|0]|0}function W(t){t=t|0;return n[t|0]<<24|n[t+1|0]<<16|n[t+2|0]<<8|n[t+3|0]|0}function K(t){t=t|0;i(t|0);Y=Y+1|0;return 0}function q(t){t=t|0;if(H(1)|0){return 1}i(n[Y+1|0]|0);Y=Y+2|0;return 0}function X(t){t=t|0;if(H(2)|0){return 1}i(z(Y+1|0)|0);Y=Y+3|0;return 0}function $(t){t=t|0;if(H(4)|0){return 1}s(z(Y+1|0)|0,z(Y+3|0)|0);Y=Y+5|0;return 0}function J(t){t=t|0;if(H(8)|0){return 1}o(z(Y+1|0)|0,z(Y+3|0)|0,z(Y+5|0)|0,z(Y+7|0)|0);Y=Y+9|0;return 0}function V(t){t=t|0;i(-1-(t-32|0)|0);Y=Y+1|0;return 0}function Z(t){t=t|0;if(H(1)|0){return 1}i(-1-(n[Y+1|0]|0)|0);Y=Y+2|0;return 0}function Q(t){t=t|0;var e=0;if(H(2)|0){return 1}e=z(Y+1|0)|0;i(-1-(e|0)|0);Y=Y+3|0;return 0}function tt(t){t=t|0;if(H(4)|0){return 1}u(z(Y+1|0)|0,z(Y+3|0)|0);Y=Y+5|0;return 0}function et(t){t=t|0;if(H(8)|0){return 1}a(z(Y+1|0)|0,z(Y+3|0)|0,z(Y+5|0)|0,z(Y+7|0)|0);Y=Y+9|0;return 0}function rt(t){t=t|0;var e=0;var r=0;var n=0;n=t-64|0;if(H(n|0)|0){return 1}e=Y+1|0;r=(Y+1|0)+(n|0)|0;R(e|0,r|0);Y=r|0;return 0}function nt(t){t=t|0;var e=0;var r=0;var i=0;if(H(1)|0){return 1}i=n[Y+1|0]|0;e=Y+2|0;r=(Y+2|0)+(i|0)|0;if(H(i+1|0)|0){return 1}R(e|0,r|0);Y=r|0;return 0}function it(t){t=t|0;var e=0;var r=0;var n=0;if(H(2)|0){return 1}n=z(Y+1|0)|0;e=Y+3|0;r=(Y+3|0)+(n|0)|0;if(H(n+2|0)|0){return 1}R(e|0,r|0);Y=r|0;return 0}function st(t){t=t|0;var e=0;var r=0;var n=0;if(H(4)|0){return 1}n=W(Y+1|0)|0;e=Y+5|0;r=(Y+5|0)+(n|0)|0;if(H(n+4|0)|0){return 1}R(e|0,r|0);Y=r|0;return 0}function ut(t){t=t|0;return 1}function ot(t){t=t|0;U();Y=Y+1|0;return 0}function at(t){t=t|0;var e=0;var r=0;var n=0;n=t-96|0;if(H(n|0)|0){return 1}e=Y+1|0;r=(Y+1|0)+(n|0)|0;B(e|0,r|0);Y=r|0;return 0}function ht(t){t=t|0;var e=0;var r=0;var i=0;if(H(1)|0){return 1}i=n[Y+1|0]|0;e=Y+2|0;r=(Y+2|0)+(i|0)|0;if(H(i+1|0)|0){return 1}B(e|0,r|0);Y=r|0;return 0}function ft(t){t=t|0;var e=0;var r=0;var n=0;if(H(2)|0){return 1}n=z(Y+1|0)|0;e=Y+3|0;r=(Y+3|0)+(n|0)|0;if(H(n+2|0)|0){return 1}B(e|0,r|0);Y=r|0;return 0}function ct(t){t=t|0;var e=0;var r=0;var n=0;if(H(4)|0){return 1}n=W(Y+1|0)|0;e=Y+5|0;r=(Y+5|0)+(n|0)|0;if(H(n+4|0)|0){return 1}B(e|0,r|0);Y=r|0;return 0}function pt(t){t=t|0;return 1}function lt(t){t=t|0;P();Y=Y+1|0;return 0}function gt(t){t=t|0;b(t-128|0);Y=Y+1|0;return 0}function dt(t){t=t|0;if(H(1)|0){return 1}b(n[Y+1|0]|0);Y=Y+2|0;return 0}function yt(t){t=t|0;if(H(2)|0){return 1}b(z(Y+1|0)|0);Y=Y+3|0;return 0}function _t(t){t=t|0;if(H(4)|0){return 1}v(z(Y+1|0)|0,z(Y+3|0)|0);Y=Y+5|0;return 0}function wt(t){t=t|0;if(H(8)|0){return 1}S(z(Y+1|0)|0,z(Y+3|0)|0,z(Y+5|0)|0,z(Y+7|0)|0);Y=Y+9|0;return 0}function mt(t){t=t|0;E();Y=Y+1|0;return 0}function Et(t){t=t|0;var e=0;e=t-160|0;if(H(e|0)|0){return 1}N(e|0);Y=Y+1|0;return 0}function bt(t){t=t|0;if(H(1)|0){return 1}N(n[Y+1|0]|0);Y=Y+2|0;return 0}function vt(t){t=t|0;if(H(2)|0){return 1}N(z(Y+1|0)|0);Y=Y+3|0;return 0}function St(t){t=t|0;if(H(4)|0){return 1}T(z(Y+1|0)|0,z(Y+3|0)|0);Y=Y+5|0;return 0}function At(t){t=t|0;if(H(8)|0){return 1}I(z(Y+1|0)|0,z(Y+3|0)|0,z(Y+5|0)|0,z(Y+7|0)|0);Y=Y+9|0;return 0}function Nt(t){t=t|0;A();Y=Y+1|0;return 0}function Tt(t){t=t|0;F(t-192|0|0);Y=Y+1|0;return 0}function It(t){t|0;F(t|0);Y=Y+1|0;return 0}function Rt(t){t|0;F(t|0);Y=Y+1|0;return 0}function Ut(t){t|0;F(t|0);Y=Y+1|0;return 0}function Bt(t){t|0;F(t|0);Y=Y+1|0;return 0}function Pt(t){t=t|0;F(t-192|0|0);Y=Y+1|0;return 0}function Ot(t){t|0;F(t|0);Y=Y+1|0;return 0}function Ft(t){t|0;F(t|0);Y=Y+1|0;return 0}function Lt(t){t|0;F(t|0);Y=Y+1|0;return 0}function Mt(t){t=t|0;if(H(1)|0){return 1}F(n[Y+1|0]|0);Y=Y+2|0;return 0}function xt(t){t=t|0;if(H(2)|0){return 1}F(z(Y+1|0)|0);Y=Y+3|0;return 0}function Dt(t){t=t|0;if(H(4)|0){return 1}L(z(Y+1|0)|0,z(Y+3|0)|0);Y=Y+5|0;return 0}function Ct(t){t=t|0;if(H(8)|0){return 1}M(z(Y+1|0)|0,z(Y+3|0)|0,z(Y+5|0)|0,z(Y+7|0)|0);Y=Y+9|0;return 0}function Yt(t){t=t|0;O((t|0)-224|0);Y=Y+1|0;return 0}function jt(t){t=t|0;l();Y=Y+1|0;return 0}function kt(t){t=t|0;p();Y=Y+1|0;return 0}function Gt(t){t=t|0;d();Y=Y+1|0;return 0}function Ht(t){t=t|0;g();Y=Y+1|0;return 0}function zt(t){t=t|0;if(H(1)|0){return 1}O(n[Y+1|0]|0);Y=Y+2|0;return 0}function Wt(t){t=t|0;var e=0;var r=0;var i=1.0;var s=0.0;var u=0.0;var o=0.0;if(H(2)|0){return 1}e=n[Y+1|0]|0;r=n[Y+2|0]|0;if((e|0)&0x80){i=-1.0}s=+(((e|0)&0x7C)>>2);u=+(((e|0)&0x03)<<8|r);if(+s==0.0){h(+(+i*+5.9604644775390625e-8*+u))}else if(+s==31.0){if(+i==1.0){if(+u>0.0){w()}else{y()}}else{if(+u>0.0){m()}else{_()}}}else{h(+(+i*C(+2,+(+s-25.0))*+(1024.0+u)))}Y=Y+3|0;return 0}function Kt(t){t=t|0;if(H(4)|0){return 1}f(n[Y+1|0]|0,n[Y+2|0]|0,n[Y+3|0]|0,n[Y+4|0]|0);Y=Y+5|0;return 0}function qt(t){t=t|0;if(H(8)|0){return 1}c(n[Y+1|0]|0,n[Y+2|0]|0,n[Y+3|0]|0,n[Y+4|0]|0,n[Y+5|0]|0,n[Y+6|0]|0,n[Y+7|0]|0,n[Y+8|0]|0);Y=Y+9|0;return 0}function Xt(t){t=t|0;return 1}function $t(t){t=t|0;D();Y=Y+1|0;return 0}var Jt=[K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,q,X,$,J,Xt,Xt,Xt,Xt,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,Z,Q,tt,et,Xt,Xt,Xt,Xt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,rt,nt,it,st,ut,Xt,Xt,Xt,ot,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,at,ht,ft,ct,pt,Xt,Xt,Xt,lt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,gt,dt,yt,_t,wt,Xt,Xt,Xt,mt,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,Et,bt,vt,St,At,Xt,Xt,Xt,Nt,Tt,Tt,Tt,Tt,Tt,Tt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Pt,Mt,xt,Dt,Ct,Xt,Xt,Xt,Xt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,Yt,jt,kt,Gt,Ht,zt,Wt,Kt,qt,Xt,Xt,Xt,$t];return{parse:G}}},function(t,e,r){"use strict";const{URLWithLegacySupport:n,format:i}=r(10);t.exports=(t,e={},r={},s)=>{let u,o=e.protocol?e.protocol.replace(":",""):"http";o=(r[o]||s||o)+":";try{u=new n(t)}catch(h){u={}}const a=Object.assign({},e,{protocol:o||u.protocol,host:e.host||u.host});return new n(t,i(a)).toString()}},function(t,e,r){"use strict";const{Buffer:n}=r(0),{URL:i}=r(9),s=r(1).BigNumber,u=r(3),o=r(2),a=o.MT,h=o.NUMBYTES,f=o.SHIFT32,c=o.SYMS,p=o.TAG,l=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.TWO,g=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.FOUR,d=o.MT.SIMPLE_FLOAT<<5|o.NUMBYTES.EIGHT,y=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.TRUE,_=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.FALSE,w=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.UNDEFINED,m=o.MT.SIMPLE_FLOAT<<5|o.SIMPLE.NULL,E=new s("0x20000000000000"),b=n.from("f97e00","hex"),v=n.from("f9fc00","hex"),S=n.from("f97c00","hex");class A{constructor(t){t=t||{},this.streaming="function"==typeof t.stream,this.onData=t.stream,this.semanticTypes=[[i,this._pushUrl],[s,this._pushBigNumber]];const e=t.genTypes||[],r=e.length;for(let n=0;n[e,t[e]]))}_pushRawMap(t,e){e=e.map((function(t){return t[0]=A.encode(t[0]),t})).sort(u.keySorter);for(var r=0;r