@aeternity/aepp-sdk
Version:
SDK for the æternity blockchain
2 lines • 689 kB
JavaScript
/*! For license information please see aepp-sdk.browser-script.cjs.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},160:function(e,t,n){"use strict";var r=n(3948),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(e)}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),d=n(1626),p=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",C="entries",S=function(){return this};e.exports=function(e,t,n,s,h,y,T){c(n,t,s);var P,A,z,I=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||I(h),k="Array"===t&&q.entries||R;if(k&&(P=u(k.call(new e)))!==Object.prototype&&P.next&&(i||u(P)===w||(l?l(P,w):o(P[b])||p(P,b,S)),m(P,E,!0,!0),i&&(f[E]=S)),g&&h===_&&R&&R.name!==_&&(!i&&N?d(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(A={values:I(_),keys:y?O:I(x),entries:I(C)},T)for(z in A)(v||M||!(z in q))&&p(q,z,A[z]);else r({target:t,proto:!0,forced:v||M},A);return i&&!T||q[b]===O||p(q,b,O,{name:h}),f[t]=O,A}},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(d=1,c=new Array(m-1);d<m;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,d=n?-1:1,p=e[t+m];for(m+=d,i=p&(1<<-l)-1,p>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?d/c:d*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+p]=255&o,p+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*f}},359:function(e,t,n){"use strict";n(366)("replaceAll")},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.f(e)})}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},392:function(e,t,n){var r=n(2861).Buffer;function a(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}a.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,a=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%a,u=Math.min(i-o,a-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%a==0&&this._update(n)}return this._len+=i,this},a.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,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=a},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,d=7===e,p=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),C=0,S=g||c,T=t?S(h,x):n||d?S(h,0):void 0;x>C;C++)if((p||C in b)&&(w=_(N=b[C],C,v),e))if(t)T[C]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return C;case 2:u(T,N)}else switch(e){case 4:return!1;case 7:u(T,N)}return m?-1:a||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},751:function(e,t,n){"use strict";var r=n(1091),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(u,e))return u[e]}})},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:d(i(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function m(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const a=e[t];n.set(a,r),r+=a.length}return n}function p(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:m,utf8ToBytes:p};const g={encode:n,decode:s};t.default=g},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),d=n(9724);n(6128);var p=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,C=e.proto,S=x?r:_?r[b]:r[b]&&r[b].prototype,T=x?u:u[b]||m(u,b,{})[b],P=T.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&S&&d(S,f),g=T[f],a&&(N=e.dontCallGetSet?(v=o(S,f))&&v.value:S[f]),y=a&&N?N:t[f],(n||C||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?p(y):C&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(T,f,w),C&&(d(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&P&&(n||!P[f])&&m(P,f,y)))}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},1281:function(){},1372:function(e,t,n){"use strict";n(366)("metadata")},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),d=a(n),p=m.length;return d<0||d>=p?e?"":void 0:(r=c(m,d))<55296||r>56319||d+1===p||(l=c(m,d+1))<56320||l>57343?e?o(m,d):r:e?u(m,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(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 v(e){var t=e.c.length-1;return y(e.e/m)==t&&e.c[t]%2!=0}function b(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,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,C,S,T,P,A,z,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,$=1,G=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,p,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,p=e;p>=10;p/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(p=y.search(/e/i))>0?(l<0&&(l=p),l+=+y.slice(p+1),y=y.substring(0,p)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=p=0,f=y.length;p<f;p++)if(n.indexOf(s=y.charAt(p))<0){if("."==s){if(p>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,p=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(p=0;48===y.charCodeAt(p);p++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(p,++f)){if(f-=p,h&&j.DEBUG&&f>15&&(e>d||e!==o(e)))throw Error(u+g.s*e);if((l=l-p-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],p=(l+1)%m,l<0&&(p+=m),p<f){for(p&&g.c.push(+y.slice(0,p)),f-=m;p<f;)g.c.push(+y.slice(p,p+=m));p=m-(y=y.slice(p)).length}else p-=f;for(;p--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,d,h,f,y=e.c,g=p;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,d=y[h=0],f=o(d/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));d=f=0,a=1,c=(i%=m)-m+1}else{for(d=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(d/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?d:d%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?d/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(d/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.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")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),G=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:$,POW_PRECISION:G,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(_=9007199254740992,C=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],d=new j(E);if(null==e?e=M:w(e,0,f),a=s(e/m),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!U)for(;u<a;)(i=C())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=p[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return d.e=r,d.c=l,d}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,d,p,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=G,G=0,r=r.replace(".",""),p=(f=new j(a)).pow(r.length-y),G=m,f.c=t(x(g(p.c),p.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=s,h=(p=n(p,f,N,w,i)).c,d=p.r,l=p.e),y=h[u=l+N+1],m=i/2,d=d||u<0||null!=h[u+1],d=w<4?(null!=y||d)&&(0==w||w==(p.s<0?3:2)):y>m||y==m&&(4==w||d||6==w&&1&h[u-1]||w==(p.s<0?8:7)),u<1||!h[0])r=d?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,d,p,h,f,g,N,w,v,b,x,_,C,S,T,P,A,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(d=r.e-a.e)+1,c||(c=l,d=y(r.e/m)-y(a.e/m),z=z/m|0),p=0;E[p]==(I[p]||0);p++);if(E[p]>(I[p]||0)&&d--,z<0)v.push(1),h=!0;else{for(S=I.length,P=E.length,p=0,z+=2,(f=o(c/(E[0]+1)))>1&&(E=e(E,f,c),I=e(I,f,c),P=E.length,S=I.length),C=P,x=(b=I.slice(0,P)).length;x<P;b[x++]=0);A=E.slice(),A=[0].concat(A),T=E[0],E[1]>=c/2&&T++;do{if(f=0,(u=t(E,b,P,x))<0){if(_=b[0],P!=x&&(_=_*c+(b[1]||0)),(f=o(_/T))>1)for(f>=c&&(f=c-1),N=(g=e(E,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,P<N?A:E,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=E.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(E,b,P,x)<1;)f++,n(b,P<x?A:E,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[p++]=f,b[0]?b[x++]=I[C]||0:(b=[I[C]],x=1)}while((C++<S||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,z=v[0];z>=10;z/=10,p++);W(w,i+(w.e=p+d*m-1)+1,s,h)}else w.e=d,w.r=+h;return w}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(A.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(S,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(T,"$1").replace(P,"0.$1")),t!=i))return new j(i,a);if(j.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 j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return N(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,u,l,d,p,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);G&&(i=s(G/m+2))}for(u?(n=new j(.5),l&&(e.s=1),d=v(e)):d=(a=Math.abs(+K(e)))%2,p=new j(E);;){if(d){if(!(p=p.times(h)).c)break;i?p.c.length>i&&(p.c.length=i):r&&(p=p.mod(t))}if(a){if(0===(a=o(a/2)))break;d=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)d=v(e);else{if(0==(a=+K(e)))break;d=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?p:(l&&(p=E.div(p)),t?p.mod(t):i?W(p,G,q,void 0):p)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===N(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return N(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return N(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=N(this,new j(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,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,d=s.c,p=e.c;if(!c||!u){if(!d||!p)return d?(e.s=-t,e):new j(p?s:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new j(d[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),d=d.slice(),o=c-u){for((i=o<0)?(o=-o,a=d):(u=c,a=p),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=d.length)<(t=p.length))?o:t,o=t=0;t<r;t++)if(d[t]!=p[t]){i=d[t]<p[t];break}if(i&&(a=d,d=p,p=a,e.s=-e.s),(t=(r=p.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=l-1;r>o;){if(d[--r]<p[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=p[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?J(e,d,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,d,p,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(p=_.length)&&(N=x,x=_,_=N,a=c,c=p,p=a),a=c+p,N=[];a--;N.push(0));for(w=l,v=h,a=p;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(d=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*d,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],d=s[1],p=a.s<0,h=p?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),p&&(m="-"+m)}r=d?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):m}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,u,l,d,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(E)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(E),d=r=new j(E),a=l=new j(E),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=p[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:d:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,d=l.plus(h.times(i=d)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(d)),r=r.plus(i.times(a)),l.s=d.s=N.s,f=n(d,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[d,a]:[l,r],B=o,f},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&w(e,1,f),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},1626:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},1660:function(e,t,n){"use strict";n(366)("species")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.sham=!0)},2046:function(e){"use strict";e.exports={}},2156:function(e){"use strict";e.exports=function(){}},2159:function(e,t,n){"use strict";var r=n(2250),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},2230:function(e,t,n){"use strict";n(366)("replace")},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.Array},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},2596:function(e,t,n){"use strict";n(366)("hasInstance")},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(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 a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},3045:function(e,t,n){"use strict";var r=n(1907),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},3121:function(e,t,n){"use strict";var r=n(5482),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("Symbol")(t);return u[t]=n,l[n]=t,n}})},3325:function(e,t,n){"use strict";n(366)("unscopables")},3377:function(e,t,n){"use strict";n(366)("matchAll")},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},3643:function(){},3648:function(e,t,n){"use strict";var r=n(9447),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},3669:function(e,t,n){"use strict";var r=n(366),a=n(3467);r("toPrimitive"),a()},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),d=n(8280),p=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),C=n(4284),S=n(2220),T=n(2574),P=n(8055),A=n(9251),z=n(5816),I=n(2522),E=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),U=n(4932),$=n(726).forEach,G=I("hidden"),V="Symbol",D="prototype",L=U.set,j=U.getterFor(V),F=Object[D],H=a.Symbol,J=H&&H[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,X=C.f,Z=b.f,ee=T.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(F,t);r&&delete F[t],X(e,t,n),r&&e!==F&&X(F,t,r)},oe=c&&l((function(){return 7!==N(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===F&&ue(re,t,n),p(e);var r=f(t);return p(n),m(ne,r)?(n.enumerable?(m(e,G)&&e[G][r]&&(e[G][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,G)||X(e,G,g(1,N(null))),e[G][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){p(e);var n=h(t),r=w(n).concat(he(n));return $(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===F&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,G)&&this[G][t])||n)},de=function(e,t){var n=h(e),r=f(t);if(n!==F||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,G)&&n[G][r]||(a.enumerable=!0),a}},pe=function(e){var t=Z(h(e)),n=[];return $(t,(function(e){m(ne,e)||m(E,e)||te(n,e)})),n},he=function(e){var t=e===F,n=Z(t?re:h(e)),r=[];return $(n,(function(e){!m(ne,e)||t&&!m(F,e)||te(r,ne[e])})),r};u||(H=function(){if(d(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===F&&i(n,re,e),m(r,G)&&m(r[G],t)&&(r[G][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(F,t,{configurable:!0,set:n}),ce(t,e)},P(J=H[D],"toString",(function(){return j(this).tag})),P(H,"withoutSetter",(function(e){return ce(M(e),e)})),T.f=me,C.f=ue,S.f=le,_.f=de,v.f=b.f=pe,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(A(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||P(F,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),$(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pe}),k(),B(H,V),E[G]=!0},3742:function(e){"use strict";e.exports={}},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},3846:function(e,t,n){"use strict";var r=n(9447),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},3930:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(t.callee)?"Arguments":r}},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},4010:function(e,t,n){"use strict";var r=n(1793),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},4107:function(e,t,n){var r=n(6698),a=n(392),i=n(2861).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],o=new Array(64);function c(){this.init(),this._w=o,a.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function m(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(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}r(c,a),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+p(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+d(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=i.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=c},4123:function(e,t,n){"use strict";n(366)("match")},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],d=m[o],p=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,d,p),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,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,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].map((function(e){return 2*e}))),l=new Uint32Array(32),m=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const p=new Uint8Array([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]);function h(e,t,n,r){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");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(p,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return