@burstjs/contracts
Advanced tools
Comparing version 0.6.0-beta.4 to 0.6.0-beta.5
module.exports = { | ||
input: "./src/index.ts", | ||
output: { | ||
moduleName: "b$contracts", | ||
fileName: "burstjs.contracts[min].js", | ||
format: ["iife", "iife-min"], | ||
dir: "./dist" | ||
}, | ||
extendRollupConfig: (conf) => { | ||
conf.inputConfig.preserveSymlinks = true; | ||
return conf | ||
}, | ||
env: { | ||
NODE_ENV: "production" | ||
}, | ||
plugins: { | ||
['node-resolve']: { | ||
jsnext: true, | ||
preferBuiltins: true, | ||
browser: true | ||
input: "./src/index.ts", | ||
output: { | ||
moduleName: "b$contracts", | ||
fileName: "burstjs.contracts[min].js", | ||
format: ["iife", "iife-min"], | ||
dir: "./dist" | ||
}, | ||
commonjs: { | ||
namedExports: { | ||
'@burstjs/util': [ | ||
'BurstValue', | ||
'FeeQuantPlanck', | ||
'OneBurstPlanck', | ||
'convertHexStringToDecString', | ||
'convertDecStringToHexString', | ||
'convertHexStringToString', | ||
'convertHexEndianess', | ||
'convertHexStringToByteArray', | ||
'convertByteArrayToHexString' | ||
] | ||
}, | ||
extendRollupConfig: (conf) => { | ||
conf.inputConfig.preserveSymlinks = true; | ||
return conf | ||
}, | ||
} | ||
env: { | ||
NODE_ENV: "production" | ||
}, | ||
plugins: { | ||
['node-resolve']: { | ||
jsnext: true, | ||
preferBuiltins: true, | ||
browser: true | ||
}, | ||
commonjs: { | ||
namedExports: { | ||
'@burstjs/util': [ | ||
'BurstValue', | ||
'FeeQuantPlanck', | ||
'OneBurstPlanck', | ||
'convertHexStringToDecString', | ||
'convertDecStringToHexString', | ||
'convertHexStringToString', | ||
'convertHexEndianess', | ||
'convertHexStringToByteArray', | ||
'convertByteArrayToHexString' | ||
] | ||
}, | ||
}, | ||
} | ||
}; |
@@ -1,2 +0,2 @@ | ||
var b$contracts=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}function o(e){return e&&e.default||e}var i=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AddressPrefix="BURST",t.GenesisBlockTime=Date.UTC(2014,7,11,2,0,0,0)/1e3,t.initialCodeword=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t.gexp=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],t.glog=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],t.cwmap=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11],t.alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".split(""),t.base32Length=13,t.ginv=(e=>t.gexp[31-t.glog[e]]),t.gmult=((e,r)=>{if(0===e||0===r)return 0;const n=(t.glog[e]+t.glog[r])%31;return t.gexp[n]})});r(i);i.AddressPrefix,i.GenesisBlockTime,i.initialCodeword,i.gexp,i.glog,i.cwmap,i.alphabet,i.base32Length,i.ginv,i.gmult;var a=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._burstTimestamp=e}static fromBurstTimestamp(e){return new r(e)}static fromDate(e){const t=new r(0);return t.setDate(e),t}getBurstTimestamp(){return this._burstTimestamp}setBurstTimestamp(e){this._burstTimestamp=e}getEpoch(){return 1e3*(i.GenesisBlockTime+this._burstTimestamp)}getDate(){return new Date(this.getEpoch())}setDate(e){this._burstTimestamp=Math.round(e.getTime()/1e3)-i.GenesisBlockTime}equals(e){return this._burstTimestamp===e._burstTimestamp}before(e){return this._burstTimestamp<e._burstTimestamp}after(e){return this._burstTimestamp>e._burstTimestamp}}t.BurstTime=r});r(a);a.BurstTime;var u=n(function(e){!function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",u=a+"Number primitive has more than 15 significant digits: ",s=1e14,c=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,g=1e9;function d(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=c-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(e,t){var r,n,o=e.c,i=t.c,a=e.s,u=t.s,s=e.e,c=t.e;if(!a||!u)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-u:a;if(a!=u)return a;if(r=a<0,n=s==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return s>c^r?1:-1;for(u=(s=o.length)<(c=i.length)?s:c,a=0;a<u;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return s==c?0:s>c^r?1:-1}function v(e,t,r,n){if(e<t||e>r||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function y(e){var t=e.c.length-1;return d(e.e/c)==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 w(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(r=function e(t){var r,_,S,A,T,B,x,O,E,P=V.prototype={constructor:V,toString:null,valueOf:null},N=new V(1),k=20,C=4,D=-7,M=21,j=-1e7,U=1e7,I=!1,R=1,F=0,H={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function V(e,t){var r,o,a,s,f,h,g,d,p=this;if(!(p instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>U?p.c=p.e=null:e.e<j?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,f=e;f>=10;f/=10,s++);return void(s>U?p.c=p.e=null:(p.e=s,p.c=[e]))}d=String(e)}else{if(!n.test(d=String(e)))return S(p,d,h);p.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(s=d.indexOf("."))>-1&&(d=d.replace(".","")),(f=d.search(/e/i))>0?(s<0&&(s=f),s+=+d.slice(f+1),d=d.substring(0,f)):s<0&&(s=d.length)}else{if(v(t,2,L.length,"Base"),10==t)return q(p=new V(e),k+p.e+1,C);if(d=String(e),h="number"==typeof e){if(0*e!=0)return S(p,d,h,t);if(p.s=1/e<0?(d=d.slice(1),-1):1,V.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else p.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=L.slice(0,t),s=f=0,g=d.length;f<g;f++)if(r.indexOf(o=d.charAt(f))<0){if("."==o){if(f>s){s=g;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,f=-1,s=0;continue}return S(p,String(e),h,t)}h=!1,(s=(d=_(d,t,10,p.s)).indexOf("."))>-1?d=d.replace(".",""):s=d.length}for(f=0;48===d.charCodeAt(f);f++);for(g=d.length;48===d.charCodeAt(--g););if(d=d.slice(f,++g)){if(g-=f,h&&V.DEBUG&&g>15&&(e>l||e!==i(e)))throw Error(u+p.s*e);if((s=s-f-1)>U)p.c=p.e=null;else if(s<j)p.c=[p.e=0];else{if(p.e=s,p.c=[],f=(s+1)%c,s<0&&(f+=c),f<g){for(f&&p.c.push(+d.slice(0,f)),g-=c;f<g;)p.c.push(+d.slice(f,f+=c));f=c-(d=d.slice(f)).length}else f-=g;for(;f--;d+="0");p.c.push(+d)}}else p.c=[p.e=0]}function $(e,t,r,n){var o,i,a,u,s;if(null==r?r=C:v(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)s=p(e.c),s=1==n||2==n&&(a<=D||a>=M)?b(s,a):w(s,a,"0");else if(i=(e=q(new V(e),t,r)).e,u=(s=p(e.c)).length,1==n||2==n&&(t<=i||i<=D)){for(;u<t;s+="0",u++);s=b(s,i)}else if(t-=a,s=w(s,i,"0"),i+1>u){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=i-u)>0)for(i+1==u&&(s+=".");t--;s+="0");return e.s<0&&o?"-"+s:s}function G(e,t){for(var r,n=1,o=new V(e[0]);n<e.length;n++){if(!(r=new V(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function z(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*c-1)>U?e.c=e.e=null:r<j?e.c=[e.e=0]:(e.e=r,e.c=t),e}function q(e,t,r,n){var a,u,l,h,g,d,p,m=e.c,v=f;if(m){e:{for(a=1,h=m[0];h>=10;h/=10,a++);if((u=t-a)<0)u+=c,l=t,p=(g=m[d=0])/v[a-l-1]%10|0;else if((d=o((u+1)/c))>=m.length){if(!n)break e;for(;m.length<=d;m.push(0));g=p=0,a=1,l=(u%=c)-c+1}else{for(g=h=m[d],a=1;h>=10;h/=10,a++);p=(l=(u%=c)-c+a)<0?0:g/v[a-l-1]%10|0}if(n=n||t<0||null!=m[d+1]||(l<0?g:g%v[a-l-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(u>0?l>0?g/v[a-l]:0:m[d-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=v[(c-t%c)%c],e.e=-t||0):m[0]=e.e=0,e;if(0==u?(m.length=d,h=1,d--):(m.length=d+1,h=v[c-u],m[d]=l>0?i(g/v[a-l]%v[l])*h:0),n)for(;;){if(0==d){for(u=1,l=m[0];l>=10;l/=10,u++);for(l=m[0]+=h,h=1;l>=10;l/=10,h++);u!=h&&(e.e++,m[0]==s&&(m[0]=1));break}if(m[d]+=h,m[d]!=s)break;m[d--]=0,h=1}for(u=m.length;0===m[--u];m.pop());}e.e>U?e.c=e.e=null:e.e<j&&(e.c=[e.e=0])}return e}function Z(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=D||r>=M?b(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,g,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),C=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-g,0,t),v(r[1],0,g,t),D=r[0],M=r[1]):(v(r,-g,g,t),D=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-g,-1,t),v(r[1],1,g,t),j=r[0],U=r[1];else{if(v(r,-g,g,t),!r)throw Error(a+t+" cannot be zero: "+r);j=-(U=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(a+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw I=!r,Error(a+"crypto unavailable");I=r}else I=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),R=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,g,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(a+t+" not an object: "+r);H=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);L=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:C,EXPONENTIAL_AT:[D,M],RANGE:[j,U],CRYPTO:I,MODULO_MODE:R,POW_PRECISION:F,FORMAT:H,ALPHABET:L}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,o=e.e,u=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===u||-1===u)&&o>=-g&&o<=g&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%c)<1&&(t+=c),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=s||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===u||1===u||-1===u))return!0;throw Error(a+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return G(arguments,P.lt)},V.minimum=V.min=function(){return G(arguments,P.gt)},V.random=(A=9007199254740992*Math.random()&2097151?function(){return i(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,u,s,l=0,h=[],d=new V(N);if(null==e?e=k:v(e,0,g),u=o(e/c),I)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(u*=2));l<u;)(s=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(h.push(s%1e14),l+=2);l=u/2}else{if(!crypto.randomBytes)throw I=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(u*=7);l<u;)(s=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(h.push(s%1e14),l+=7);l=u/7}if(!I)for(;l<u;)(s=A())<9e15&&(h[l++]=s%1e14);for(u=h[--l],e%=c,u&&e&&(s=f[c-e],h[l]=i(u/s)*s);0===h[l];h.pop(),l--);if(l<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=c);for(l=1,s=h[0];s>=10;s/=10,l++);l<c&&(n-=c-l)}return d.e=n,d.c=h,d}),V.sum=function(){for(var e=1,t=arguments,r=new V(t[0]);e<t.length;)r=r.plus(t[e++]);return r},_=function(){function e(e,t,r,n){for(var o,i,a=[0],u=0,s=e.length;u<s;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(u++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(t,n,o,i,a){var u,s,c,l,f,h,g,d,m=t.indexOf("."),v=k,y=C;for(m>=0&&(l=F,F=0,t=t.replace(".",""),h=(d=new V(n)).pow(t.length-m),F=l,d.c=e(w(p(h.c),h.e,"0"),10,o,"0123456789"),d.e=d.c.length),c=l=(g=e(t,n,o,a?(u=L,"0123456789"):(u="0123456789",L))).length;0==g[--l];g.pop());if(!g[0])return u.charAt(0);if(m<0?--c:(h.c=g,h.e=c,h.s=i,g=(h=r(h,d,v,y,o)).c,f=h.r,c=h.e),m=g[s=c+v+1],l=o/2,f=f||s<0||null!=g[s+1],f=y<4?(null!=m||f)&&(0==y||y==(h.s<0?3:2)):m>l||m==l&&(4==y||f||6==y&&1&g[s-1]||y==(h.s<0?8:7)),s<1||!g[0])t=f?w(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(g.length=s,f)for(--o;++g[--s]>o;)g[s]=0,s||(++c,g=[1].concat(g));for(l=g.length;!g[--l];);for(m=0,t="";m<=l;t+=u.charAt(g[m++]));t=w(t,c,u.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,o,i,a,u=0,s=e.length,c=t%h,l=t/h|0;for(e=e.slice();s--;)u=((o=c*(i=e[s]%h)+(n=l*i+(a=e[s]/h|0)*c)%h*h+u)/r|0)+(n/h|0)+l*a,e[s]=o%r;return u&&(e=[u].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,a,u,l){var f,h,g,p,m,v,y,b,w,_,S,A,T,B,x,O,E,P=n.s==o.s?1:-1,N=n.c,k=o.c;if(!(N&&N[0]&&k&&k[0]))return new V(n.s&&o.s&&(N?!k||N[0]!=k[0]:k)?N&&0==N[0]||!k?0*P:P/0:NaN);for(w=(b=new V(P)).c=[],P=a+(h=n.e-o.e)+1,l||(l=s,h=d(n.e/c)-d(o.e/c),P=P/c|0),g=0;k[g]==(N[g]||0);g++);if(k[g]>(N[g]||0)&&h--,P<0)w.push(1),p=!0;else{for(B=N.length,O=k.length,g=0,P+=2,(m=i(l/(k[0]+1)))>1&&(k=e(k,m,l),N=e(N,m,l),O=k.length,B=N.length),T=O,S=(_=N.slice(0,O)).length;S<O;_[S++]=0);E=k.slice(),E=[0].concat(E),x=k[0],k[1]>=l/2&&x++;do{if(m=0,(f=t(k,_,O,S))<0){if(A=_[0],O!=S&&(A=A*l+(_[1]||0)),(m=i(A/x))>1)for(m>=l&&(m=l-1),y=(v=e(k,m,l)).length,S=_.length;1==t(v,_,y,S);)m--,r(v,O<y?E:k,y,l),y=v.length,f=1;else 0==m&&(f=m=1),y=(v=k.slice()).length;if(y<S&&(v=[0].concat(v)),r(_,v,S,l),S=_.length,-1==f)for(;t(k,_,O,S)<1;)m++,r(_,O<S?E:k,S,l),S=_.length}else 0===f&&(m++,_=[0]);w[g++]=m,_[0]?_[S++]=N[T]||0:(_=[N[T]],S=1)}while((T++<B||null!=_[0])&&P--);p=null!=_[0],w[0]||w.splice(0,1)}if(l==s){for(g=1,P=w[0];P>=10;P/=10,g++);q(b,a+(b.e=g+h*c-1)+1,u,p)}else b.e=h,b.r=+p;return b}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,x=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,r,n){var o,i=r?t:t.replace(E,"");if(O.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t}),n&&(o=n,i=i.replace(B,"$1").replace(x,"0.$1")),t!=i))return new V(i,o);if(V.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return m(this,new V(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,o,i=this;if(null!=e)return v(e,0,g),null==t?t=C:v(t,0,8),q(new V(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-d(this.e/c))*c,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new V(e,t),k,C)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new V(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,u,s,l,f,h,g,d=this;if((e=new V(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+Z(e));if(null!=t&&(t=new V(t)),l=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return g=new V(Math.pow(+Z(d),l?2-y(e):+Z(e))),t?g.mod(t):g;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||l&&d.c[1]>=24e7:d.c[0]<8e13||l&&d.c[0]<=9999975e7)))return s=d.s<0&&y(e)?-0:0,d.e>-1&&(s=1/s),new V(f?1/s:s);F&&(s=o(F/c+2))}for(l?(r=new V(.5),f&&(e.s=1),h=y(e)):h=(u=Math.abs(+Z(e)))%2,g=new V(N);;){if(h){if(!(g=g.times(d)).c)break;s?g.c.length>s&&(g.c.length=s):n&&(g=g.mod(t))}if(u){if(0===(u=i(u/2)))break;h=u%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)h=y(e);else{if(0==(u=+Z(e)))break;h=u%2}d=d.times(d),s?d.c&&d.c.length>s&&(d.c.length=s):n&&(d=d.mod(t))}return n?g:(f&&(g=N.div(g)),t?g.mod(t):s?q(g,F,C,void 0):g)},P.integerValue=function(e){var t=new V(this);return null==e?e=C:v(e,0,8),q(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===m(this,new V(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return m(this,new V(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=m(this,new V(e,t)))||0===t},P.isInteger=function(){return!!this.c&&d(this.e/c)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return m(this,new V(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=m(this,new V(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,o,i,a=this,u=a.s;if(t=(e=new V(e,t)).s,!u||!t)return new V(NaN);if(u!=t)return e.s=-t,a.plus(e);var l=a.e/c,f=e.e/c,h=a.c,g=e.c;if(!l||!f){if(!h||!g)return h?(e.s=-t,e):new V(g?a:NaN);if(!h[0]||!g[0])return g[0]?(e.s=-t,e):new V(h[0]?a:3==C?-0:0)}if(l=d(l),f=d(f),h=h.slice(),u=l-f){for((i=u<0)?(u=-u,o=h):(f=l,o=g),o.reverse(),t=u;t--;o.push(0));o.reverse()}else for(n=(i=(u=h.length)<(t=g.length))?u:t,u=t=0;t<n;t++)if(h[t]!=g[t]){i=h[t]<g[t];break}if(i&&(o=h,h=g,g=o,e.s=-e.s),(t=(n=g.length)-(r=h.length))>0)for(;t--;h[r++]=0);for(t=s-1;n>u;){if(h[--n]<g[n]){for(r=n;r&&!h[--r];h[r]=t);--h[r],h[n]+=s}h[n]-=g[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?z(e,h,f):(e.s=3==C?-1:1,e.c=[e.e=0],e)},P.modulo=P.mod=function(e,t){var n,o,i=this;return e=new V(e,t),!i.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||i.c&&!i.c[0]?new V(i):(9==R?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,R),(e=i.minus(n.times(e))).c[0]||1!=R||(e.s=i.s),e)},P.multipliedBy=P.times=function(e,t){var r,n,o,i,a,u,l,f,g,p,m,v,y,b,w,_=this,S=_.c,A=(e=new V(e,t)).c;if(!(S&&A&&S[0]&&A[0]))return!_.s||!e.s||S&&!S[0]&&!A||A&&!A[0]&&!S?e.c=e.e=e.s=null:(e.s*=_.s,S&&A?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=d(_.e/c)+d(e.e/c),e.s*=_.s,(l=S.length)<(p=A.length)&&(y=S,S=A,A=y,o=l,l=p,p=o),o=l+p,y=[];o--;y.push(0));for(b=s,w=h,o=p;--o>=0;){for(r=0,m=A[o]%w,v=A[o]/w|0,i=o+(a=l);i>o;)r=((f=m*(f=S[--a]%w)+(u=v*f+(g=S[a]/w|0)*m)%w*w+y[i]+r)/b|0)+(u/w|0)+v*g,y[i--]=f%b;y[i]=r}return r?++n:y.splice(0,1),z(e,y,n)},P.negated=function(){var e=new V(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/c,a=e.e/c,u=n.c,l=e.c;if(!i||!a){if(!u||!l)return new V(o/0);if(!u[0]||!l[0])return l[0]?e:new V(u[0]?n:0*o)}if(i=d(i),a=d(a),u=u.slice(),o=i-a){for(o>0?(a=i,r=l):(o=-o,r=u),r.reverse();o--;r.push(0));r.reverse()}for((o=u.length)-(t=l.length)<0&&(r=l,l=u,u=r,t=o),o=0;t;)o=(u[--t]=u[t]+l[t]+o)/s|0,u[t]=s===u[t]?0:u[t]%s;return o&&(u=[o].concat(u),++a),z(e,u,a)},P.precision=P.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return v(e,1,g),null==t?t=C:v(t,0,8),q(new V(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*c+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},P.shiftedBy=function(e){return v(e,-l,l),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,o,i,a=this,u=a.c,s=a.s,c=a.e,l=k+4,f=new V("0.5");if(1!==s||!u||!u[0])return new V(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+Z(a)))||s==1/0?(((t=p(u)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=d((c+1)/2)-(c<0||c%2),n=new V(t=s==1/0?"1e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new V(s+""),n.c[0])for((s=(c=n.e)+l)<3&&(s=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),p(i.c).slice(0,s)===(t=p(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(n,n.e+k+2,1),e=!n.times(n).eq(a));break}if(!o&&(q(i,i.e+k+2,0),i.times(i).eq(a))){n=i;break}l+=4,s+=4,o=1}return q(n,n.e+k+1,C,e)},P.toExponential=function(e,t){return null!=e&&(v(e,0,g),e++),$(this,e,t,1)},P.toFixed=function(e,t){return null!=e&&(v(e,0,g),e=e+this.e+1),$(this,e,t)},P.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=H;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,u=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=u[0],h=u[1],g=o.s<0,d=g?f.slice(1):f,p=d.length;if(c&&(i=s,s=c,c=i,p-=i),s>0&&p>0){for(i=p%s||s,f=d.substr(0,i);i<p;i+=s)f+=l+d.substr(i,s);c>0&&(f+=l+d.slice(i)),g&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,o,i,u,s,l,h,g,d,m,v,y=this,b=y.c;if(null!=e&&(!(l=new V(e)).isInteger()&&(l.c||1!==l.s)||l.lt(N)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Z(l));if(!b)return new V(y);for(t=new V(N),g=n=new V(N),o=h=new V(N),v=p(b),u=t.e=v.length-y.e-1,t.c[0]=f[(s=u%c)<0?c+s:s],e=!e||l.comparedTo(t)>0?u>0?t:g:l,s=U,U=1/0,l=new V(v),h.c[0]=0;d=r(l,t,0,1),1!=(i=n.plus(d.times(o))).comparedTo(e);)n=o,o=i,g=h.plus(d.times(i=g)),h=i,t=l.minus(d.times(i=t)),l=i;return i=r(e.minus(n),o,0,1),h=h.plus(i.times(g)),n=n.plus(i.times(o)),h.s=g.s=y.s,m=r(g,o,u*=2,C).minus(y).abs().comparedTo(r(h,n,u,C).minus(y).abs())<1?[g,o]:[h,n],U=s,m},P.toNumber=function(){return+Z(this)},P.toPrecision=function(e,t){return null!=e&&v(e,1,g),$(this,e,t,2)},P.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=D||o>=M?b(p(r.c),o):w(p(r.c),o,"0"):10===e?t=w(p((r=q(new V(r),k+o+1,C)).c),r.e,"0"):(v(e,2,L.length,"Base"),t=_(w(p(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return Z(this)},P._isBigNumber=!0,null!=t&&V.set(t),V}()).default=r.BigNumber=r,e.exports?e.exports=r:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=r)}(t)}),s=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BurstSymbol="Ƀ",t.BurstPlanckSymbol="ƀ",t.FeeQuantPlanck=735e3,t.OneBurstPlanck=1e8});r(s);s.BurstSymbol,s.BurstPlanckSymbol,s.FeeQuantPlanck,s.OneBurstPlanck;var c=n(function(e,t){var r;function n(e){if(!e||!/^-?\d*(\.\d+)?$/.test(e))throw new Error(`Invalid value: ${e}`)}Object.defineProperty(t,"__esModule",{value:!0}),u.default.config({EXPONENTIAL_AT:[-9,20]}),function(e){e[e.PLANCK=0]="PLANCK",e[e.BURST=1]="BURST"}(r=t.BurstValueFormat||(t.BurstValueFormat={}));class o{constructor(e){n(e),this._planck=new u.default(e)}static Zero(){return new o("0")}static fromPlanck(e){return new o(e)}static fromBurst(e){const t=new o("0");return t.setBurst("number"==typeof e?e.toString(10):e),t}getRaw(){return this._planck}getPlanck(){return this._planck.toString()}setPlanck(e){n(e),this._planck=new u.default(e)}getBurst(){return this._planck.dividedBy(1e8).toString()}setBurst(e){n(e),this._planck=new u.default(e).multipliedBy(1e8)}equals(e){return this._planck.eq(e._planck)}lessOrEqual(e){return this._planck.lte(e._planck)}less(e){return this._planck.lt(e._planck)}greaterOrEqual(e){return this._planck.gte(e._planck)}greater(e){return this._planck.gt(e._planck)}add(e){return this._planck=this._planck.plus(e._planck),this}subtract(e){return this._planck=this._planck.minus(e._planck),this}multiply(e){return this._planck=this._planck.multipliedBy(e),this}divide(e){if(0===e)throw new Error("Division by zero");return this._planck=this._planck.div(e),this}toString(e=r.BURST){return e===r.BURST?`${s.BurstSymbol} ${this.getBurst()}`:`${s.BurstPlanckSymbol} ${this._planck}`}clone(){return o.fromPlanck(this.getPlanck())}}t.BurstValue=o});r(c);c.BurstValueFormat,c.BurstValue;var l=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=(e=>{0===e.indexOf(`${i.AddressPrefix}-`)&&(e=e.substr(6));const t=i.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=i.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>i.alphabet.length)){if(r>16)return!1;t[i.cwmap[r]]=o,r++}}if(17!==r)return!1;let n=0;for(let e=1;e<5;e++){let r=0;for(let n=0;n<31;n++){if(n>12&&n<27)continue;let o=n;n>26&&(o-=14),r^=i.gmult(t[o],i.gexp[e*n%31])}n|=r}return 0===n}),t.isBurstAddress=(e=>{if(!new RegExp(`${i.AddressPrefix}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{5}(-w+)?`,"i").test(e))return!1;const r=e.lastIndexOf("-"),n=e.substr(r+1);return e=n.length>5?e.substr(0,r):e,t.isValid(e)})});r(l);l.isValid,l.isBurstAddress;var f=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf(`${i.AddressPrefix}-`))return;e=e.substr(6);const t=i.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=i.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>i.alphabet.length)){if(r>16)return;t[i.cwmap[r]]=o,r++}}if(!l.isValid(e))return;let n=i.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=t[n-e-1];let a,u="",s=0;do{a=0,s=0;for(let e=0;e<n;e++)(s=32*s+o[e])>=10?(o[a]=Math.floor(s/10),s%=10,a+=1):a>0&&(o[a]=0,a+=1);n=a,u+=s}while(n>0);return u.split("").reverse().join("")})});r(f);f.convertAddressToNumericId;var h=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBase36StringToHexString=(e=>new u.default(e,36).toString(16))});r(h);h.convertBase36StringToHexString;const g="function"==typeof atob,d="function"==typeof btoa,p="function"==typeof Buffer,m="function"==typeof TextDecoder?new TextDecoder:void 0,v="function"==typeof TextEncoder?new TextEncoder:void 0,y=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],b=(e=>{let t={};return y.forEach((e,r)=>t[e]=r),t})(),w=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_=String.fromCharCode.bind(String),S="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),A=e=>e.replace(/[+\/]/g,e=>"+"==e?"-":"_").replace(/=+$/m,""),T=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),B=e=>{let t,r,n,o,i="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");i+=y[(t=r<<16|n<<8|o)>>18&63]+y[t>>12&63]+y[t>>6&63]+y[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},x=d?e=>btoa(e):p?e=>Buffer.from(e,"binary").toString("base64"):B,O=p?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(_.apply(null,e.subarray(r,r+4096)));return x(t.join(""))},E=(e,t=!1)=>t?A(O(e)):O(e),P=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?_(192|t>>>6)+_(128|63&t):_(224|t>>>12&15)+_(128|t>>>6&63)+_(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return _(240|t>>>18&7)+_(128|t>>>12&63)+_(128|t>>>6&63)+_(128|63&t)},N=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,k=e=>e.replace(N,P),C=p?e=>Buffer.from(e,"utf8").toString("base64"):v?e=>O(v.encode(e)):e=>x(k(e)),D=(e,t=!1)=>t?A(C(e)):C(e),M=e=>D(e,!0),j=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,U=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return _(55296+(t>>>10))+_(56320+(1023&t));case 3:return _((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=e=>e.replace(j,U),R=e=>{if(e=e.replace(/\s+/g,""),!w.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let i=0;i<e.length;)t=b[e.charAt(i++)]<<18|b[e.charAt(i++)]<<12|(r=b[e.charAt(i++)])<<6|(n=b[e.charAt(i++)]),o+=64===r?_(t>>16&255):64===n?_(t>>16&255,t>>8&255):_(t>>16&255,t>>8&255,255&t);return o},F=g?e=>atob(T(e)):p?e=>Buffer.from(e,"base64").toString("binary"):R,H=p?e=>S(Buffer.from(e,"base64")):e=>S(F(e),e=>e.charCodeAt(0)),L=e=>H($(e)),V=p?e=>Buffer.from(e,"base64").toString("utf8"):m?e=>m.decode(H(e)):e=>I(F(e)),$=e=>T(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),G=e=>V($(e)),z=e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},q=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Z=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,q(t));e("fromBase64",function(){return G(this)}),e("toBase64",function(e){return D(this,e)}),e("toBase64URI",function(){return D(this,!0)}),e("toBase64URL",function(){return D(this,!0)}),e("toUint8Array",function(){return L(this)})},Q=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,q(t));e("toBase64",function(e){return E(this,e)}),e("toBase64URI",function(){return E(this,!0)}),e("toBase64URL",function(){return E(this,!0)})},W=()=>{Z(),Q()},X={version:"3.6.0",VERSION:"3.6.0",atob:F,atobPolyfill:R,btoa:x,btoaPolyfill:B,fromBase64:G,toBase64:D,encode:D,encodeURI:M,encodeURL:M,utob:k,btou:I,decode:G,isValid:z,fromUint8Array:E,toUint8Array:L,extendString:Z,extendUint8Array:Q,extendBuiltins:W};var J=o(Object.freeze({__proto__:null,version:"3.6.0",VERSION:"3.6.0",atob:F,atobPolyfill:R,btoa:x,btoaPolyfill:B,fromBase64:G,toBase64:D,utob:k,encode:D,encodeURI:M,encodeURL:M,btou:I,decode:G,isValid:z,fromUint8Array:E,toUint8Array:L,extendString:Z,extendUint8Array:Q,extendBuiltins:W,Base64:X})),K=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBase64StringToString=(e=>J.Base64.decode(e))});r(K);K.convertBase64StringToString;var Y=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToEpochTime=(e=>1e3*(i.GenesisBlockTime+e))});r(Y);Y.convertBurstTimeToEpochTime;var ee=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToDate=(e=>new Date(Y.convertBurstTimeToEpochTime(e)))});r(ee);ee.convertBurstTimeToDate;var te=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertByteArrayToHexString=((e,t=!1)=>{const r=[];for(let t=0;t<e.length;t++)r.push((e[t]>>>4).toString(16)),r.push((15&e[t]).toString(16));return t?r.join("").toUpperCase():r.join("")})});r(te);te.convertByteArrayToHexString;var re=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertByteArrayToString=((e,t=0,r=null)=>{if(0===r)return"";let n=e;if(0!==t){const o=null===r?e.length-t:r;!function(e,t,r=0){if(r<0)throw new Error("Start index should not be negative");if(e.length<r+t)throw new Error("Need at least "+t+" bytes to convert to an integer")}(n,o,t),n=e.slice(t,t+o)}return decodeURIComponent(escape(String.fromCharCode.apply(null,Array.from(n))))})});r(re);re.convertByteArrayToString;var ne=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-i.GenesisBlockTime)});r(ne);ne.convertDateToBurstTime;String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>=e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))});var oe=Object.freeze({__proto__:null}),ie=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.twosComplementBinary=(e=>{let t=e.multipliedBy(-1).toString(2);for(;t.length%8;)t="0"+t;const r="1"===t[0]&&-1!==t.slice(1).indexOf("1")?"11111111":"";return t=t.split("").map(e=>"0"===e?"1":"0").join(""),new u.default(r+t,2).plus(1)})});r(ie);ie.twosComplementBinary;o(oe);var ae=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDecStringToHexString=((e,t=2)=>{let r="string"==typeof e?new u.default(e):e;if(r.isNaN())throw new Error(`Invalid decimal argument: [${e}] - Expected a valid decimal value`);if(t<0)throw new Error(`Invalid padding argument: [${t}] - Expected a positive value`);const n=r.lt(0);n&&(r=ie.twosComplementBinary(r));const o=r.toString(16),i=Math.ceil(o.length/t);return o.padStart(i*t,n?"f":"0")})});r(ae);ae.convertDecStringToHexString;var ue=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexEndianess=(e=>{let t="";const r=e;for(let e=r.length-1;e>=0;e-=2)t+=r[e-1]+r[e];return t})});r(ue);ue.convertHexEndianess;var se=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToBase36String=(e=>new u.default(e,16).toString(36))});r(se);se.convertHexStringToBase36String;var ce=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToByteArray=(e=>{if(e.length%2)throw new Error(`Invalid Hex String: ${e}`);const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=parseInt(e.substr(r,2),16);if(Number.isNaN(n))throw new Error(`Invalid Hex String: ${e}`);t[r/2]=n}return t})});r(ce);ce.convertHexStringToByteArray;var le=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToDecString=(e=>{const t=[0];let r,n,o;for(r=0;r<e.length;r+=1){for(o=parseInt(e.charAt(r),16),n=0;n<t.length;n+=1)t[n]=16*t[n]+o,o=t[n]/10|0,t[n]%=10;for(;o>0;)t.push(o%10),o=o/10|0}return t.reverse().join("")})});r(le);le.convertHexStringToDecString;var fe=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToString=(e=>re.convertByteArrayToString(ce.convertHexStringToByteArray(e)))});r(fe);fe.convertHexStringToString;var he=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNQTStringToNumber=(e=>{if(null==e||""===e)throw new Error("Invalid argument");return parseFloat(e)/1e8})});r(he);he.convertNQTStringToNumber;var ge=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNumberToNQTString=(e=>{if(null==e)throw new Error("Invalid argument");return parseFloat(e.toString()).toFixed(8).replace(".","")})});r(ge);ge.convertNumberToNQTString;var de=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const t=[],r=i.initialCodeword.slice();let n=0,o=e.length;for(let r=0;r<o;r++)t[r]=e.charCodeAt(r)-"0".charCodeAt(0);let a=0,u=0;do{a=0,u=0;for(let e=0;e<o;e++)(a=10*a+t[e])>=32?(t[u]=a>>5,a&=31,u++):u>0&&(t[u]=0,u++);o=u,r[n]=a,n++}while(o>0);const s=[0,0,0,0];for(let e=i.base32Length-1;e>=0;e--){const t=r[e]^s[3];s[3]=s[2]^i.gmult(30,t),s[2]=s[1]^i.gmult(6,t),s[1]=s[0]^i.gmult(9,t),s[0]=i.gmult(17,t)}r[13]=s[0],r[14]=s[1],r[15]=s[2],r[16]=s[3];let c=i.AddressPrefix+"-";for(let e=0;e<17;e++)c+=i.alphabet[r[i.cwmap[e]]],3==(3&e)&&e<13&&(c+="-");return c})});r(de);de.convertNumericIdToAddress;var pe=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToBase64String=((e,t=!0)=>t?J.Base64.encodeURI(e):J.Base64.encode(e))});r(pe);pe.convertStringToBase64String;var me=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToByteArray=(e=>{const t=unescape(encodeURIComponent(e)),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r})});r(me);me.convertStringToByteArray;var ve=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHexString=(e=>te.convertByteArrayToHexString(me.convertStringToByteArray(e)))});r(ve);ve.convertStringToHexString;var ye=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.Hexadecimal=1]="Hexadecimal",e[e.Base64=2]="Base64"}(t.EncoderFormat||(t.EncoderFormat={}))});r(ye);ye.EncoderFormat;var be=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDeeplink=(e=>{const{encoderFormat:t=ye.EncoderFormat.Base64,domain:r,action:n,payload:o}=e;let i=`burst.${r}://v1`;return n&&(i+=`?action=${n}`),o&&(i+=`&payload=${function(e,t){let r=e;switch("string"!=typeof e&&(r=JSON.stringify(e)),t){case ye.EncoderFormat.Hexadecimal:return ve.convertStringToHexString(r);case ye.EncoderFormat.Base64:return pe.convertStringToBase64String(r);case ye.EncoderFormat.Text:default:return r}}(o,t)}`),i})});r(be);be.createDeeplink;var we=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=/^burst.(.+):\/\/(v.+?)\??/i;t.parseDeeplink=(e=>{const t=()=>{throw new Error("Invalid deeplink: "+e)},n=(e,r)=>(e.startsWith(r+"=")||t(),e.split("=")[1]),o=e.match(r);o&&3===o.length||t();const i={domain:o[1],version:o[2],action:void 0,payload:void 0,decodedPayload:void 0};try{const r=e.indexOf("?");if(-1!==r){const o=e.substring(r+1).split("&");o.length>=1&&(o.length>2&&t(),i.action=n(o[0],"action"),2===o.length&&(i.payload=n(o[1],"payload")))}}catch(e){t()}return i})});r(we);we.parseDeeplink;var _e=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sumNQTStringToNumber=function(...e){return e.reduce((e,t)=>e+he.convertNQTStringToNumber(t),0)}});r(_e);_e.sumNQTStringToNumber;var Se=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(ye)});r(Se);var Ae=n(function(e,t){function r(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),r(a),r(c),r(s),r(f),r(h),r(K),r(ee),r(Y),r(te),r(re),r(ne),r(ae),r(ue),r(se),r(ce),r(le),r(fe),r(he),r(ge),r(de),r(pe),r(me),r(ve),r(be),r(l),r(we),r(_e),r(Se)});r(Ae);var Te=Ae.BurstValue,Be=Ae.FeeQuantPlanck,xe=Ae.OneBurstPlanck,Oe=Ae.convertHexStringToDecString,Ee=Ae.convertDecStringToHexString,Pe=Ae.convertHexStringToString,Ne=Ae.convertHexEndianess;Ae.convertHexStringToByteArray,Ae.convertByteArrayToHexString;function ke(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=16*t,o=n+r;if(o>e.machineData.length)throw new Error("Insufficient length for variable at position: ".concat(n," (and given length: ").concat(r,")"));if(o%2!=0)throw new Error("Invalid position: ".concat(n," (or given length: ").concat(r,") - must be at least multiple of 2"));return Ne(e.machineData.substr(n,r))}function Ce(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function De(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Me=256;function je(e){return Math.ceil(e.length/2/Me)}var Ue=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._contract=t}var t,r,n;return t=e,(r=[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return je(this._contract.machineCode)}},{key:"getVariableAsString",value:function(t){var r=this.getHexDataAt(t,e.VariableLength);return Pe(r.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(t,r){var n=this.getHexDataAt(t,r*e.VariableLength);return Pe(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return Oe(this.getVariable(e))}},{key:"getVariable",value:function(t){return this.getHexDataAt(t,e.VariableLength)}},{key:"getHexDataAt",value:function(t,r){var n=r||this._contract.machineData.length-e.VariableLength*t;return ke(this._contract,t,n)}}])&&Ce(t.prototype,r),n&&Ce(t,n),e}();Ue.VariableLength=16;var Ie=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e};return e.CodePageSize=Me,e.ContractDataView=Ue,e.calculateMinimumCreationFee=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Te.fromPlanck((t?10*Be:xe).toString(10)).multiply(2+je(e)+1)},e.countCodePages=je,e.generateMethodCall=function(e){var t=e.methodArgs?[e.methodHash].concat(De(e.methodArgs)):[e.methodHash];if(t.length>4)throw new Error("At maximum ".concat(3," are supported"));return t.map(Ie).map(function(e){return Ee(e,16)}).map(Ne).join("")},e.getContractDatablock=ke,e}({}); | ||
var b$contracts=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}function o(e){return e&&e.default||e}var i=n(function(e,r){var n=t&&t.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,u)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.asyncRetry=function e(t){return n(this,void 0,void 0,function*(){const{asyncFn:r,onFailureAsync:n,retryCount:o=1,maxRetrials:i=20}=t;try{return yield r()}catch(t){if(o>i)throw t;if(!(yield n(t,o)))throw t;yield e({asyncFn:r,onFailureAsync:n,retryCount:o+1})}})}});r(i);i.asyncRetry;var a=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AddressPrefix="BURST",t.GenesisBlockTime=Date.UTC(2014,7,11,2,0,0,0)/1e3,t.initialCodeword=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t.gexp=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],t.glog=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],t.cwmap=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11],t.alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".split(""),t.base32Length=13,t.ginv=(e=>t.gexp[31-t.glog[e]]),t.gmult=((e,r)=>{if(0===e||0===r)return 0;const n=(t.glog[e]+t.glog[r])%31;return t.gexp[n]})});r(a);a.AddressPrefix,a.GenesisBlockTime,a.initialCodeword,a.gexp,a.glog,a.cwmap,a.alphabet,a.base32Length,a.ginv,a.gmult;var u=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._burstTimestamp=e}static fromBurstTimestamp(e){return new r(e)}static fromDate(e){const t=new r(0);return t.setDate(e),t}getBurstTimestamp(){return this._burstTimestamp}setBurstTimestamp(e){this._burstTimestamp=e}getEpoch(){return 1e3*(a.GenesisBlockTime+this._burstTimestamp)}getDate(){return new Date(this.getEpoch())}setDate(e){this._burstTimestamp=Math.round(e.getTime()/1e3)-a.GenesisBlockTime}equals(e){return this._burstTimestamp===e._burstTimestamp}before(e){return this._burstTimestamp<e._burstTimestamp}after(e){return this._burstTimestamp>e._burstTimestamp}}t.BurstTime=r});r(u);u.BurstTime;var c=n(function(e){!function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",u=a+"Number primitive has more than 15 significant digits: ",c=1e14,s=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,d=1e9;function g(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=s-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function v(e,t){var r,n,o=e.c,i=t.c,a=e.s,u=t.s,c=e.e,s=t.e;if(!a||!u)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-u:a;if(a!=u)return a;if(r=a<0,n=c==s,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>s^r?1:-1;for(u=(c=o.length)<(s=i.length)?c:s,a=0;a<u;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==s?0:c>s^r?1:-1}function m(e,t,r,n){if(e<t||e>r||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function y(e){var t=e.c.length-1;return g(e.e/s)==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 w(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(r=function e(t){var r,_,S,A,T,B,x,O,P,E=V.prototype={constructor:V,toString:null,valueOf:null},N=new V(1),k=20,C=4,D=-7,M=21,j=-1e7,U=1e7,F=!1,I=1,R=0,H={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function V(e,t){var r,o,a,c,f,h,d,g,p=this;if(!(p instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>U?p.c=p.e=null:e.e<j?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>U?p.c=p.e=null:(p.e=c,p.c=[e]))}g=String(e)}else{if(!n.test(g=String(e)))return S(p,g,h);p.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(f=g.search(/e/i))>0?(c<0&&(c=f),c+=+g.slice(f+1),g=g.substring(0,f)):c<0&&(c=g.length)}else{if(m(t,2,L.length,"Base"),10==t)return q(p=new V(e),k+p.e+1,C);if(g=String(e),h="number"==typeof e){if(0*e!=0)return S(p,g,h,t);if(p.s=1/e<0?(g=g.slice(1),-1):1,V.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else p.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=L.slice(0,t),c=f=0,d=g.length;f<d;f++)if(r.indexOf(o=g.charAt(f))<0){if("."==o){if(f>c){c=d;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,f=-1,c=0;continue}return S(p,String(e),h,t)}h=!1,(c=(g=_(g,t,10,p.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(f=0;48===g.charCodeAt(f);f++);for(d=g.length;48===g.charCodeAt(--d););if(g=g.slice(f,++d)){if(d-=f,h&&V.DEBUG&&d>15&&(e>l||e!==i(e)))throw Error(u+p.s*e);if((c=c-f-1)>U)p.c=p.e=null;else if(c<j)p.c=[p.e=0];else{if(p.e=c,p.c=[],f=(c+1)%s,c<0&&(f+=s),f<d){for(f&&p.c.push(+g.slice(0,f)),d-=s;f<d;)p.c.push(+g.slice(f,f+=s));f=s-(g=g.slice(f)).length}else f-=d;for(;f--;g+="0");p.c.push(+g)}}else p.c=[p.e=0]}function $(e,t,r,n){var o,i,a,u,c;if(null==r?r=C:m(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=p(e.c),c=1==n||2==n&&(a<=D||a>=M)?b(c,a):w(c,a,"0");else if(i=(e=q(new V(e),t,r)).e,u=(c=p(e.c)).length,1==n||2==n&&(t<=i||i<=D)){for(;u<t;c+="0",u++);c=b(c,i)}else if(t-=a,c=w(c,i,"0"),i+1>u){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-u)>0)for(i+1==u&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function G(e,t){for(var r,n=1,o=new V(e[0]);n<e.length;n++){if(!(r=new V(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function z(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*s-1)>U?e.c=e.e=null:r<j?e.c=[e.e=0]:(e.e=r,e.c=t),e}function q(e,t,r,n){var a,u,l,h,d,g,p,v=e.c,m=f;if(v){e:{for(a=1,h=v[0];h>=10;h/=10,a++);if((u=t-a)<0)u+=s,l=t,p=(d=v[g=0])/m[a-l-1]%10|0;else if((g=o((u+1)/s))>=v.length){if(!n)break e;for(;v.length<=g;v.push(0));d=p=0,a=1,l=(u%=s)-s+1}else{for(d=h=v[g],a=1;h>=10;h/=10,a++);p=(l=(u%=s)-s+a)<0?0:d/m[a-l-1]%10|0}if(n=n||t<0||null!=v[g+1]||(l<0?d:d%m[a-l-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(u>0?l>0?d/m[a-l]:0:v[g-1])%10&1||r==(e.s<0?8:7)),t<1||!v[0])return v.length=0,n?(t-=e.e+1,v[0]=m[(s-t%s)%s],e.e=-t||0):v[0]=e.e=0,e;if(0==u?(v.length=g,h=1,g--):(v.length=g+1,h=m[s-u],v[g]=l>0?i(d/m[a-l]%m[l])*h:0),n)for(;;){if(0==g){for(u=1,l=v[0];l>=10;l/=10,u++);for(l=v[0]+=h,h=1;l>=10;l/=10,h++);u!=h&&(e.e++,v[0]==c&&(v[0]=1));break}if(v[g]+=h,v[g]!=c)break;v[g--]=0,h=1}for(u=v.length;0===v[--u];v.pop());}e.e>U?e.c=e.e=null:e.e<j&&(e.c=[e.e=0])}return e}function Z(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=D||r>=M?b(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(m(r=e[t],0,d,t),k=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(m(r=e[t],0,8,t),C=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(m(r[0],-d,0,t),m(r[1],0,d,t),D=r[0],M=r[1]):(m(r,-d,d,t),D=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)m(r[0],-d,-1,t),m(r[1],1,d,t),j=r[0],U=r[1];else{if(m(r,-d,d,t),!r)throw Error(a+t+" cannot be zero: "+r);j=-(U=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(a+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(a+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(m(r=e[t],0,9,t),I=r),e.hasOwnProperty(t="POW_PRECISION")&&(m(r=e[t],0,d,t),R=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(a+t+" not an object: "+r);H=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);L=r}}return{DECIMAL_PLACES:k,ROUNDING_MODE:C,EXPONENTIAL_AT:[D,M],RANGE:[j,U],CRYPTO:F,MODULO_MODE:I,POW_PRECISION:R,FORMAT:H,ALPHABET:L}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,o=e.e,u=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===u||-1===u)&&o>=-d&&o<=d&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%s)<1&&(t+=s),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=c||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===u||1===u||-1===u))return!0;throw Error(a+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return G(arguments,E.lt)},V.minimum=V.min=function(){return G(arguments,E.gt)},V.random=(A=9007199254740992*Math.random()&2097151?function(){return i(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,u,c,l=0,h=[],g=new V(N);if(null==e?e=k:m(e,0,d),u=o(e/s),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(u*=2));l<u;)(c=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(h.push(c%1e14),l+=2);l=u/2}else{if(!crypto.randomBytes)throw F=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(u*=7);l<u;)(c=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(h.push(c%1e14),l+=7);l=u/7}if(!F)for(;l<u;)(c=A())<9e15&&(h[l++]=c%1e14);for(u=h[--l],e%=s,u&&e&&(c=f[s-e],h[l]=i(u/c)*c);0===h[l];h.pop(),l--);if(l<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=s);for(l=1,c=h[0];c>=10;c/=10,l++);l<s&&(n-=s-l)}return g.e=n,g.c=h,g}),V.sum=function(){for(var e=1,t=arguments,r=new V(t[0]);e<t.length;)r=r.plus(t[e++]);return r},_=function(){function e(e,t,r,n){for(var o,i,a=[0],u=0,c=e.length;u<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(u++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(t,n,o,i,a){var u,c,s,l,f,h,d,g,v=t.indexOf("."),m=k,y=C;for(v>=0&&(l=R,R=0,t=t.replace(".",""),h=(g=new V(n)).pow(t.length-v),R=l,g.c=e(w(p(h.c),h.e,"0"),10,o,"0123456789"),g.e=g.c.length),s=l=(d=e(t,n,o,a?(u=L,"0123456789"):(u="0123456789",L))).length;0==d[--l];d.pop());if(!d[0])return u.charAt(0);if(v<0?--s:(h.c=d,h.e=s,h.s=i,d=(h=r(h,g,m,y,o)).c,f=h.r,s=h.e),v=d[c=s+m+1],l=o/2,f=f||c<0||null!=d[c+1],f=y<4?(null!=v||f)&&(0==y||y==(h.s<0?3:2)):v>l||v==l&&(4==y||f||6==y&&1&d[c-1]||y==(h.s<0?8:7)),c<1||!d[0])t=f?w(u.charAt(1),-m,u.charAt(0)):u.charAt(0);else{if(d.length=c,f)for(--o;++d[--c]>o;)d[c]=0,c||(++s,d=[1].concat(d));for(l=d.length;!d[--l];);for(v=0,t="";v<=l;t+=u.charAt(d[v++]));t=w(t,s,u.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,o,i,a,u=0,c=e.length,s=t%h,l=t/h|0;for(e=e.slice();c--;)u=((o=s*(i=e[c]%h)+(n=l*i+(a=e[c]/h|0)*s)%h*h+u)/r|0)+(n/h|0)+l*a,e[c]=o%r;return u&&(e=[u].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,a,u,l){var f,h,d,p,v,m,y,b,w,_,S,A,T,B,x,O,P,E=n.s==o.s?1:-1,N=n.c,k=o.c;if(!(N&&N[0]&&k&&k[0]))return new V(n.s&&o.s&&(N?!k||N[0]!=k[0]:k)?N&&0==N[0]||!k?0*E:E/0:NaN);for(w=(b=new V(E)).c=[],E=a+(h=n.e-o.e)+1,l||(l=c,h=g(n.e/s)-g(o.e/s),E=E/s|0),d=0;k[d]==(N[d]||0);d++);if(k[d]>(N[d]||0)&&h--,E<0)w.push(1),p=!0;else{for(B=N.length,O=k.length,d=0,E+=2,(v=i(l/(k[0]+1)))>1&&(k=e(k,v,l),N=e(N,v,l),O=k.length,B=N.length),T=O,S=(_=N.slice(0,O)).length;S<O;_[S++]=0);P=k.slice(),P=[0].concat(P),x=k[0],k[1]>=l/2&&x++;do{if(v=0,(f=t(k,_,O,S))<0){if(A=_[0],O!=S&&(A=A*l+(_[1]||0)),(v=i(A/x))>1)for(v>=l&&(v=l-1),y=(m=e(k,v,l)).length,S=_.length;1==t(m,_,y,S);)v--,r(m,O<y?P:k,y,l),y=m.length,f=1;else 0==v&&(f=v=1),y=(m=k.slice()).length;if(y<S&&(m=[0].concat(m)),r(_,m,S,l),S=_.length,-1==f)for(;t(k,_,O,S)<1;)v++,r(_,O<S?P:k,S,l),S=_.length}else 0===f&&(v++,_=[0]);w[d++]=v,_[0]?_[S++]=N[T]||0:(_=[N[T]],S=1)}while((T++<B||null!=_[0])&&E--);p=null!=_[0],w[0]||w.splice(0,1)}if(l==c){for(d=1,E=w[0];E>=10;E/=10,d++);q(b,a+(b.e=d+h*s-1)+1,u,p)}else b.e=h,b.r=+p;return b}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,x=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,r,n){var o,i=r?t:t.replace(P,"");if(O.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t}),n&&(o=n,i=i.replace(B,"$1").replace(x,"0.$1")),t!=i))return new V(i,o);if(V.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return v(this,new V(e,t))},E.decimalPlaces=E.dp=function(e,t){var r,n,o,i=this;if(null!=e)return m(e,0,d),null==t?t=C:m(t,0,8),q(new V(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-g(this.e/s))*s,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(e,t){return r(this,new V(e,t),k,C)},E.dividedToIntegerBy=E.idiv=function(e,t){return r(this,new V(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var r,n,u,c,l,f,h,d,g=this;if((e=new V(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+Z(e));if(null!=t&&(t=new V(t)),l=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return d=new V(Math.pow(+Z(g),l?2-y(e):+Z(e))),t?d.mod(t):d;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!f&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||l&&g.c[1]>=24e7:g.c[0]<8e13||l&&g.c[0]<=9999975e7)))return c=g.s<0&&y(e)?-0:0,g.e>-1&&(c=1/c),new V(f?1/c:c);R&&(c=o(R/s+2))}for(l?(r=new V(.5),f&&(e.s=1),h=y(e)):h=(u=Math.abs(+Z(e)))%2,d=new V(N);;){if(h){if(!(d=d.times(g)).c)break;c?d.c.length>c&&(d.c.length=c):n&&(d=d.mod(t))}if(u){if(0===(u=i(u/2)))break;h=u%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)h=y(e);else{if(0==(u=+Z(e)))break;h=u%2}g=g.times(g),c?g.c&&g.c.length>c&&(g.c.length=c):n&&(g=g.mod(t))}return n?d:(f&&(d=N.div(d)),t?d.mod(t):c?q(d,R,C,void 0):d)},E.integerValue=function(e){var t=new V(this);return null==e?e=C:m(e,0,8),q(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===v(this,new V(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return v(this,new V(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=v(this,new V(e,t)))||0===t},E.isInteger=function(){return!!this.c&&g(this.e/s)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return v(this,new V(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=v(this,new V(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var r,n,o,i,a=this,u=a.s;if(t=(e=new V(e,t)).s,!u||!t)return new V(NaN);if(u!=t)return e.s=-t,a.plus(e);var l=a.e/s,f=e.e/s,h=a.c,d=e.c;if(!l||!f){if(!h||!d)return h?(e.s=-t,e):new V(d?a:NaN);if(!h[0]||!d[0])return d[0]?(e.s=-t,e):new V(h[0]?a:3==C?-0:0)}if(l=g(l),f=g(f),h=h.slice(),u=l-f){for((i=u<0)?(u=-u,o=h):(f=l,o=d),o.reverse(),t=u;t--;o.push(0));o.reverse()}else for(n=(i=(u=h.length)<(t=d.length))?u:t,u=t=0;t<n;t++)if(h[t]!=d[t]){i=h[t]<d[t];break}if(i&&(o=h,h=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=h.length))>0)for(;t--;h[r++]=0);for(t=c-1;n>u;){if(h[--n]<d[n]){for(r=n;r&&!h[--r];h[r]=t);--h[r],h[n]+=c}h[n]-=d[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?z(e,h,f):(e.s=3==C?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var n,o,i=this;return e=new V(e,t),!i.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||i.c&&!i.c[0]?new V(i):(9==I?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,I),(e=i.minus(n.times(e))).c[0]||1!=I||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var r,n,o,i,a,u,l,f,d,p,v,m,y,b,w,_=this,S=_.c,A=(e=new V(e,t)).c;if(!(S&&A&&S[0]&&A[0]))return!_.s||!e.s||S&&!S[0]&&!A||A&&!A[0]&&!S?e.c=e.e=e.s=null:(e.s*=_.s,S&&A?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=g(_.e/s)+g(e.e/s),e.s*=_.s,(l=S.length)<(p=A.length)&&(y=S,S=A,A=y,o=l,l=p,p=o),o=l+p,y=[];o--;y.push(0));for(b=c,w=h,o=p;--o>=0;){for(r=0,v=A[o]%w,m=A[o]/w|0,i=o+(a=l);i>o;)r=((f=v*(f=S[--a]%w)+(u=m*f+(d=S[a]/w|0)*v)%w*w+y[i]+r)/b|0)+(u/w|0)+m*d,y[i--]=f%b;y[i]=r}return r?++n:y.splice(0,1),z(e,y,n)},E.negated=function(){var e=new V(this);return e.s=-e.s||null,e},E.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/s,a=e.e/s,u=n.c,l=e.c;if(!i||!a){if(!u||!l)return new V(o/0);if(!u[0]||!l[0])return l[0]?e:new V(u[0]?n:0*o)}if(i=g(i),a=g(a),u=u.slice(),o=i-a){for(o>0?(a=i,r=l):(o=-o,r=u),r.reverse();o--;r.push(0));r.reverse()}for((o=u.length)-(t=l.length)<0&&(r=l,l=u,u=r,t=o),o=0;t;)o=(u[--t]=u[t]+l[t]+o)/c|0,u[t]=c===u[t]?0:u[t]%c;return o&&(u=[o].concat(u),++a),z(e,u,a)},E.precision=E.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return m(e,1,d),null==t?t=C:m(t,0,8),q(new V(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*s+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},E.shiftedBy=function(e){return m(e,-l,l),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,n,o,i,a=this,u=a.c,c=a.s,s=a.e,l=k+4,f=new V("0.5");if(1!==c||!u||!u[0])return new V(!c||c<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(c=Math.sqrt(+Z(a)))||c==1/0?(((t=p(u)).length+s)%2==0&&(t+="0"),c=Math.sqrt(+t),s=g((s+1)/2)-(s<0||s%2),n=new V(t=c==1/0?"1e"+s:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new V(c+""),n.c[0])for((c=(s=n.e)+l)<3&&(c=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),p(i.c).slice(0,c)===(t=p(n.c)).slice(0,c)){if(n.e<s&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(n,n.e+k+2,1),e=!n.times(n).eq(a));break}if(!o&&(q(i,i.e+k+2,0),i.times(i).eq(a))){n=i;break}l+=4,c+=4,o=1}return q(n,n.e+k+1,C,e)},E.toExponential=function(e,t){return null!=e&&(m(e,0,d),e++),$(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(m(e,0,d),e=e+this.e+1),$(this,e,t)},E.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=H;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,u=n.split("."),c=+r.groupSize,s=+r.secondaryGroupSize,l=r.groupSeparator||"",f=u[0],h=u[1],d=o.s<0,g=d?f.slice(1):f,p=g.length;if(s&&(i=c,c=s,s=i,p-=i),c>0&&p>0){for(i=p%c||c,f=g.substr(0,i);i<p;i+=c)f+=l+g.substr(i,c);s>0&&(f+=l+g.slice(i)),d&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},E.toFraction=function(e){var t,n,o,i,u,c,l,h,d,g,v,m,y=this,b=y.c;if(null!=e&&(!(l=new V(e)).isInteger()&&(l.c||1!==l.s)||l.lt(N)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+Z(l));if(!b)return new V(y);for(t=new V(N),d=n=new V(N),o=h=new V(N),m=p(b),u=t.e=m.length-y.e-1,t.c[0]=f[(c=u%s)<0?s+c:c],e=!e||l.comparedTo(t)>0?u>0?t:d:l,c=U,U=1/0,l=new V(m),h.c[0]=0;g=r(l,t,0,1),1!=(i=n.plus(g.times(o))).comparedTo(e);)n=o,o=i,d=h.plus(g.times(i=d)),h=i,t=l.minus(g.times(i=t)),l=i;return i=r(e.minus(n),o,0,1),h=h.plus(i.times(d)),n=n.plus(i.times(o)),h.s=d.s=y.s,v=r(d,o,u*=2,C).minus(y).abs().comparedTo(r(h,n,u,C).minus(y).abs())<1?[d,o]:[h,n],U=c,v},E.toNumber=function(){return+Z(this)},E.toPrecision=function(e,t){return null!=e&&m(e,1,d),$(this,e,t,2)},E.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=D||o>=M?b(p(r.c),o):w(p(r.c),o,"0"):10===e?t=w(p((r=q(new V(r),k+o+1,C)).c),r.e,"0"):(m(e,2,L.length,"Base"),t=_(w(p(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return Z(this)},E._isBigNumber=!0,null!=t&&V.set(t),V}()).default=r.BigNumber=r,e.exports?e.exports=r:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=r)}(t)}),s=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BurstSymbol="Ƀ",t.BurstPlanckSymbol="ƀ",t.FeeQuantPlanck=735e3,t.OneBurstPlanck=1e8});r(s);s.BurstSymbol,s.BurstPlanckSymbol,s.FeeQuantPlanck,s.OneBurstPlanck;var l=n(function(e,t){var r;function n(e){if(!e||!/^-?\d*(\.\d+)?$/.test(e))throw new Error(`Invalid value: ${e}`)}Object.defineProperty(t,"__esModule",{value:!0}),c.default.config({EXPONENTIAL_AT:[-9,20]}),function(e){e[e.PLANCK=0]="PLANCK",e[e.BURST=1]="BURST"}(r=t.BurstValueFormat||(t.BurstValueFormat={}));class o{constructor(e){"string"==typeof e&&n(e),this._planck=new c.default(e)}static Zero(){return new o("0")}static fromPlanck(e){return new o(e)}static fromBurst(e){const t=new o("0");return t.setBurst("number"==typeof e?e.toString(10):e),t}getRaw(){return this._planck}getPlanck(){return this._planck.toString()}setPlanck(e){n(e),this._planck=new c.default(e)}getBurst(){return this._planck.dividedBy(1e8).toString()}setBurst(e){n(e),this._planck=new c.default(e).multipliedBy(1e8)}equals(e){return this._planck.eq(e._planck)}lessOrEqual(e){return this._planck.lte(e._planck)}less(e){return this._planck.lt(e._planck)}greaterOrEqual(e){return this._planck.gte(e._planck)}greater(e){return this._planck.gt(e._planck)}add(e){return this._planck=this._planck.plus(e._planck),this}subtract(e){return this._planck=this._planck.minus(e._planck),this}multiply(e){return this._planck=this._planck.multipliedBy(e),this}divide(e){if(0===e)throw new Error("Division by zero");return this._planck=this._planck.div(e),this}toString(e=r.BURST){return e===r.BURST?`${s.BurstSymbol} ${this.getBurst()}`:`${s.BurstPlanckSymbol} ${this._planck}`}clone(){return o.fromPlanck(this.getPlanck())}}t.BurstValue=o});r(l);l.BurstValueFormat,l.BurstValue;var f=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=(e=>{0===e.indexOf(`${a.AddressPrefix}-`)&&(e=e.substr(6));const t=a.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=a.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>a.alphabet.length)){if(r>16)return!1;t[a.cwmap[r]]=o,r++}}if(17!==r)return!1;let n=0;for(let e=1;e<5;e++){let r=0;for(let n=0;n<31;n++){if(n>12&&n<27)continue;let o=n;n>26&&(o-=14),r^=a.gmult(t[o],a.gexp[e*n%31])}n|=r}return 0===n}),t.isBurstAddress=(e=>{if(!new RegExp(`${a.AddressPrefix}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{5}(-w+)?`,"i").test(e))return!1;const r=e.lastIndexOf("-"),n=e.substr(r+1);return e=n.length>5?e.substr(0,r):e,t.isValid(e)})});r(f);f.isValid,f.isBurstAddress;var h=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf(`${a.AddressPrefix}-`))return;e=e.substr(6);const t=a.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=a.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>a.alphabet.length)){if(r>16)return;t[a.cwmap[r]]=o,r++}}if(!f.isValid(e))return;let n=a.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=t[n-e-1];let i,u="",c=0;do{i=0,c=0;for(let e=0;e<n;e++)(c=32*c+o[e])>=10?(o[i]=Math.floor(c/10),c%=10,i+=1):i>0&&(o[i]=0,i+=1);n=i,u+=c}while(n>0);return u.split("").reverse().join("")})});r(h);h.convertAddressToNumericId;var d=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBase36StringToHexString=(e=>new c.default(e,36).toString(16))});r(d);d.convertBase36StringToHexString;const g="function"==typeof atob,p="function"==typeof btoa,v="function"==typeof Buffer,m="function"==typeof TextDecoder?new TextDecoder:void 0,y="function"==typeof TextEncoder?new TextEncoder:void 0,b=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],w=(e=>{let t={};return b.forEach((e,r)=>t[e]=r),t})(),_=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,S=String.fromCharCode.bind(String),A="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),T=e=>e.replace(/[+\/]/g,e=>"+"==e?"-":"_").replace(/=+$/m,""),B=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),x=e=>{let t,r,n,o,i="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");i+=b[(t=r<<16|n<<8|o)>>18&63]+b[t>>12&63]+b[t>>6&63]+b[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},O=p?e=>btoa(e):v?e=>Buffer.from(e,"binary").toString("base64"):x,P=v?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(S.apply(null,e.subarray(r,r+4096)));return O(t.join(""))},E=(e,t=!1)=>t?T(P(e)):P(e),N=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?S(192|t>>>6)+S(128|63&t):S(224|t>>>12&15)+S(128|t>>>6&63)+S(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return S(240|t>>>18&7)+S(128|t>>>12&63)+S(128|t>>>6&63)+S(128|63&t)},k=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,C=e=>e.replace(k,N),D=v?e=>Buffer.from(e,"utf8").toString("base64"):y?e=>P(y.encode(e)):e=>O(C(e)),M=(e,t=!1)=>t?T(D(e)):D(e),j=e=>M(e,!0),U=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,F=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return S(55296+(t>>>10))+S(56320+(1023&t));case 3:return S((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return S((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},I=e=>e.replace(U,F),R=e=>{if(e=e.replace(/\s+/g,""),!_.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let i=0;i<e.length;)t=w[e.charAt(i++)]<<18|w[e.charAt(i++)]<<12|(r=w[e.charAt(i++)])<<6|(n=w[e.charAt(i++)]),o+=64===r?S(t>>16&255):64===n?S(t>>16&255,t>>8&255):S(t>>16&255,t>>8&255,255&t);return o},H=g?e=>atob(B(e)):v?e=>Buffer.from(e,"base64").toString("binary"):R,L=v?e=>A(Buffer.from(e,"base64")):e=>A(H(e),e=>e.charCodeAt(0)),V=e=>L(G(e)),$=v?e=>Buffer.from(e,"base64").toString("utf8"):m?e=>m.decode(L(e)):e=>I(H(e)),G=e=>B(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),z=e=>$(G(e)),q=e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Q=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Z(t));e("fromBase64",function(){return z(this)}),e("toBase64",function(e){return M(this,e)}),e("toBase64URI",function(){return M(this,!0)}),e("toBase64URL",function(){return M(this,!0)}),e("toUint8Array",function(){return V(this)})},W=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Z(t));e("toBase64",function(e){return E(this,e)}),e("toBase64URI",function(){return E(this,!0)}),e("toBase64URL",function(){return E(this,!0)})},X=()=>{Q(),W()},J={version:"3.6.0",VERSION:"3.6.0",atob:H,atobPolyfill:R,btoa:O,btoaPolyfill:x,fromBase64:z,toBase64:M,encode:M,encodeURI:j,encodeURL:j,utob:C,btou:I,decode:z,isValid:q,fromUint8Array:E,toUint8Array:V,extendString:Q,extendUint8Array:W,extendBuiltins:X};var K=o(Object.freeze({__proto__:null,version:"3.6.0",VERSION:"3.6.0",atob:H,atobPolyfill:R,btoa:O,btoaPolyfill:x,fromBase64:z,toBase64:M,utob:C,encode:M,encodeURI:j,encodeURL:j,btou:I,decode:z,isValid:q,fromUint8Array:E,toUint8Array:V,extendString:Q,extendUint8Array:W,extendBuiltins:X,Base64:J})),Y=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBase64StringToString=(e=>K.Base64.decode(e))});r(Y);Y.convertBase64StringToString;var ee=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToEpochTime=(e=>1e3*(a.GenesisBlockTime+e))});r(ee);ee.convertBurstTimeToEpochTime;var te=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToDate=(e=>new Date(ee.convertBurstTimeToEpochTime(e)))});r(te);te.convertBurstTimeToDate;var re=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertByteArrayToHexString=((e,t=!1)=>{const r=[];for(let t=0;t<e.length;t++)r.push((e[t]>>>4).toString(16)),r.push((15&e[t]).toString(16));return t?r.join("").toUpperCase():r.join("")})});r(re);re.convertByteArrayToHexString;var ne=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertByteArrayToString=((e,t=0,r=null)=>{if(0===r)return"";let n=e;if(0!==t){const o=null===r?e.length-t:r;!function(e,t,r=0){if(r<0)throw new Error("Start index should not be negative");if(e.length<r+t)throw new Error("Need at least "+t+" bytes to convert to an integer")}(n,o,t),n=e.slice(t,t+o)}return decodeURIComponent(escape(String.fromCharCode.apply(null,Array.from(n))))})});r(ne);ne.convertByteArrayToString;var oe=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-a.GenesisBlockTime)});r(oe);oe.convertDateToBurstTime;String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>=e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))});var ie=Object.freeze({__proto__:null}),ae=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.twosComplementBinary=(e=>{let t=e.multipliedBy(-1).toString(2);for(;t.length%8;)t="0"+t;const r="1"===t[0]&&-1!==t.slice(1).indexOf("1")?"11111111":"";return t=t.split("").map(e=>"0"===e?"1":"0").join(""),new c.default(r+t,2).plus(1)})});r(ae);ae.twosComplementBinary;o(ie);var ue=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDecStringToHexString=((e,t=2)=>{let r="string"==typeof e?new c.default(e):e;if(r.isNaN())throw new Error(`Invalid decimal argument: [${e}] - Expected a valid decimal value`);if(t<0)throw new Error(`Invalid padding argument: [${t}] - Expected a positive value`);const n=r.lt(0);n&&(r=ae.twosComplementBinary(r));const o=r.toString(16),i=Math.ceil(o.length/t);return o.padStart(i*t,n?"f":"0")})});r(ue);ue.convertDecStringToHexString;var ce=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexEndianess=(e=>{let t="";const r=e;for(let e=r.length-1;e>=0;e-=2)t+=r[e-1]+r[e];return t})});r(ce);ce.convertHexEndianess;var se=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToBase36String=(e=>new c.default(e,16).toString(36))});r(se);se.convertHexStringToBase36String;var le=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToByteArray=(e=>{if(e.length%2)throw new Error(`Invalid Hex String: ${e}`);const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=parseInt(e.substr(r,2),16);if(Number.isNaN(n))throw new Error(`Invalid Hex String: ${e}`);t[r/2]=n}return t})});r(le);le.convertHexStringToByteArray;var fe=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToDecString=(e=>{const t=[0];let r,n,o;for(r=0;r<e.length;r+=1){for(o=parseInt(e.charAt(r),16),n=0;n<t.length;n+=1)t[n]=16*t[n]+o,o=t[n]/10|0,t[n]%=10;for(;o>0;)t.push(o%10),o=o/10|0}return t.reverse().join("")})});r(fe);fe.convertHexStringToDecString;var he=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToString=(e=>ne.convertByteArrayToString(le.convertHexStringToByteArray(e)))});r(he);he.convertHexStringToString;var de=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNQTStringToNumber=(e=>{if(null==e||""===e)throw new Error("Invalid argument");return parseFloat(e)/1e8})});r(de);de.convertNQTStringToNumber;var ge=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNumberToNQTString=(e=>{if(null==e)throw new Error("Invalid argument");return parseFloat(e.toString()).toFixed(8).replace(".","")})});r(ge);ge.convertNumberToNQTString;var pe=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const t=[],r=a.initialCodeword.slice();let n=0,o=e.length;for(let r=0;r<o;r++)t[r]=e.charCodeAt(r)-"0".charCodeAt(0);let i=0,u=0;do{i=0,u=0;for(let e=0;e<o;e++)(i=10*i+t[e])>=32?(t[u]=i>>5,i&=31,u++):u>0&&(t[u]=0,u++);o=u,r[n]=i,n++}while(o>0);const c=[0,0,0,0];for(let e=a.base32Length-1;e>=0;e--){const t=r[e]^c[3];c[3]=c[2]^a.gmult(30,t),c[2]=c[1]^a.gmult(6,t),c[1]=c[0]^a.gmult(9,t),c[0]=a.gmult(17,t)}r[13]=c[0],r[14]=c[1],r[15]=c[2],r[16]=c[3];let s=a.AddressPrefix+"-";for(let e=0;e<17;e++)s+=a.alphabet[r[a.cwmap[e]]],3==(3&e)&&e<13&&(s+="-");return s})});r(pe);pe.convertNumericIdToAddress;var ve=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToBase64String=((e,t=!0)=>t?K.Base64.encodeURI(e):K.Base64.encode(e))});r(ve);ve.convertStringToBase64String;var me=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToByteArray=(e=>{const t=unescape(encodeURIComponent(e)),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r})});r(me);me.convertStringToByteArray;var ye=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHexString=(e=>re.convertByteArrayToHexString(me.convertStringToByteArray(e)))});r(ye);ye.convertStringToHexString;var be=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.Hexadecimal=1]="Hexadecimal",e[e.Base64=2]="Base64"}(t.EncoderFormat||(t.EncoderFormat={}))});r(be);be.EncoderFormat;var we=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDeeplink=(e=>{const{encoderFormat:t=be.EncoderFormat.Base64,domain:r,action:n,payload:o}=e;let i=`burst.${r}://v1`;return n&&(i+=`?action=${n}`),o&&(i+=`&payload=${function(e,t){let r=e;switch("string"!=typeof e&&(r=JSON.stringify(e)),t){case be.EncoderFormat.Hexadecimal:return ye.convertStringToHexString(r);case be.EncoderFormat.Base64:return ve.convertStringToBase64String(r);case be.EncoderFormat.Text:default:return r}}(o,t)}`),i})});r(we);we.createDeeplink;var _e=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=/^burst.(.+):\/\/(v.+?)\??/i;t.parseDeeplink=(e=>{const t=()=>{throw new Error("Invalid deeplink: "+e)},n=(e,r)=>(e.startsWith(r+"=")||t(),e.split("=")[1]),o=e.match(r);o&&3===o.length||t();const i={domain:o[1],version:o[2],action:void 0,payload:void 0,decodedPayload:void 0};try{const r=e.indexOf("?");if(-1!==r){const o=e.substring(r+1).split("&");o.length>=1&&(o.length>2&&t(),i.action=n(o[0],"action"),2===o.length&&(i.payload=n(o[1],"payload")))}}catch(e){t()}return i})});r(_e);_e.parseDeeplink;var Se=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sumNQTStringToNumber=function(...e){return e.reduce((e,t)=>e+de.convertNQTStringToNumber(t),0)}});r(Se);Se.sumNQTStringToNumber;var Ae=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(be)});r(Ae);var Te=n(function(e,t){function r(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),r(i),r(u),r(l),r(s),r(h),r(d),r(Y),r(te),r(ee),r(re),r(ne),r(oe),r(ue),r(ce),r(se),r(le),r(fe),r(he),r(de),r(ge),r(pe),r(ve),r(me),r(ye),r(we),r(f),r(_e),r(Se),r(Ae)});r(Te);var Be=Te.BurstValue,xe=Te.FeeQuantPlanck,Oe=Te.OneBurstPlanck,Pe=Te.convertHexStringToDecString,Ee=Te.convertDecStringToHexString,Ne=Te.convertHexStringToString,ke=Te.convertHexEndianess;Te.convertHexStringToByteArray,Te.convertByteArrayToHexString;function Ce(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=16*t,o=n+r;if(o>e.machineData.length)throw new Error("Insufficient length for variable at position: ".concat(n," (and given length: ").concat(r,")"));if(o%2!=0)throw new Error("Invalid position: ".concat(n," (or given length: ").concat(r,") - must be at least multiple of 2"));return ke(e.machineData.substr(n,r))}function De(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Me(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var je=256;function Ue(e){return Math.ceil(e.length/2/je)}var Fe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._contract=t}var t,r,n;return t=e,(r=[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return Ue(this._contract.machineCode)}},{key:"getVariableAsString",value:function(t){var r=this.getHexDataAt(t,e.VariableLength);return Ne(r.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(t,r){var n=this.getHexDataAt(t,r*e.VariableLength);return Ne(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return Pe(this.getVariable(e))}},{key:"getVariable",value:function(t){return this.getHexDataAt(t,e.VariableLength)}},{key:"getHexDataAt",value:function(t,r){var n=r||this._contract.machineData.length-e.VariableLength*t;return Ce(this._contract,t,n)}}])&&De(t.prototype,r),n&&De(t,n),e}();Fe.VariableLength=16;var Ie=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e};return e.CodePageSize=je,e.ContractDataView=Fe,e.calculateMinimumCreationFee=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Be.fromPlanck((t?10*xe:Oe).toString(10)).multiply(2+Ue(e)+1)},e.countCodePages=Ue,e.generateMethodCall=function(e){var t=e.methodArgs?[e.methodHash].concat(Me(e.methodArgs)):[e.methodHash];if(t.length>4)throw new Error("At maximum ".concat(3," are supported"));return t.map(Ie).map(function(e){return Ee(e,16)}).map(ke).join("")},e.getContractDatablock=Ce,e}({}); | ||
//# sourceMappingURL=burstjs.contracts.min.js.map |
{ | ||
"name": "@burstjs/contracts", | ||
"version": "0.6.0-beta.4", | ||
"version": "0.6.0-beta.5", | ||
"description": "Smart Contracts package for BURST", | ||
@@ -47,3 +47,3 @@ "contributors": [ | ||
"dependencies": { | ||
"@burstjs/util": "^0.6.0-beta.4" | ||
"@burstjs/util": "^0.6.0-beta.5" | ||
}, | ||
@@ -55,3 +55,3 @@ "husky": { | ||
}, | ||
"gitHead": "b99e3b1355d6cfc9680d25cd666e203d131fc890", | ||
"gitHead": "3f8f40435d9c379feee73f457bb2953777614c7c", | ||
"publishConfig": { | ||
@@ -58,0 +58,0 @@ "access": "public" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
473234
4451
Updated@burstjs/util@^0.6.0-beta.5