@burstjs/contracts
Advanced tools
Comparing version 0.6.0-alpha.9 to 0.6.0-beta.1
@@ -1,2 +0,2 @@ | ||
var b$contracts=function(exports){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e}var internal=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),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]})});unwrapExports(internal);var internal_1=internal.GenesisBlockTime,internal_2=internal.initialCodeword,internal_3=internal.gexp,internal_4=internal.glog,internal_5=internal.cwmap,internal_6=internal.alphabet,internal_7=internal.base32Length,internal_8=internal.ginv,internal_9=internal.gmult,isBurstAddress=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=(e=>{0===e.indexOf("BURST-")&&(e=e.substr(6));const t=internal.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=internal.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>internal.alphabet.length)){if(r>16)return!1;t[internal.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^=internal.gmult(t[o],internal.gexp[e*n%31])}n|=r}return 0===n}),t.isBurstAddress=(e=>/^BURST\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{5}/i.test(e)&&t.isValid(e))});unwrapExports(isBurstAddress);var isBurstAddress_1=isBurstAddress.isValid,isBurstAddress_2=isBurstAddress.isBurstAddress,convertAddressToNumericId=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf("BURST-"))return;e=e.substr(6);const t=internal.initialCodeword.slice();let r=0;for(let n=0;n<e.length;n++){const o=internal.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>internal.alphabet.length)){if(r>16)return;t[internal.cwmap[r]]=o,r++}}if(!isBurstAddress.isValid(e))return;let n=internal.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=t[n-e-1];let i,a="",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,a+=c}while(n>0);return a.split("").reverse().join("")})});unwrapExports(convertAddressToNumericId);var convertAddressToNumericId_1=convertAddressToNumericId.convertAddressToNumericId,convertBurstTimeToEpochTime=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToEpochTime=(e=>1e3*(internal.GenesisBlockTime+e))});unwrapExports(convertBurstTimeToEpochTime);var convertBurstTimeToEpochTime_1=convertBurstTimeToEpochTime.convertBurstTimeToEpochTime,convertBurstTimeToDate=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToDate=(e=>new Date(convertBurstTimeToEpochTime.convertBurstTimeToEpochTime(e)))});unwrapExports(convertBurstTimeToDate);var convertBurstTimeToDate_1=convertBurstTimeToDate.convertBurstTimeToDate,convertByteArrayToHexString=createCommonjsModule(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("")})});unwrapExports(convertByteArrayToHexString);var convertByteArrayToHexString_1=convertByteArrayToHexString.convertByteArrayToHexString,convertByteArrayToString=createCommonjsModule(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))))})});unwrapExports(convertByteArrayToString);var convertByteArrayToString_1=convertByteArrayToString.convertByteArrayToString,convertDateToBurstTime=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-internal.GenesisBlockTime)});unwrapExports(convertDateToBurstTime);var convertDateToBurstTime_1=convertDateToBurstTime.convertDateToBurstTime,convertHexEndianess=createCommonjsModule(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})});unwrapExports(convertHexEndianess);var convertHexEndianess_1=convertHexEndianess.convertHexEndianess,convertHexStringToByteArray=createCommonjsModule(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})});unwrapExports(convertHexStringToByteArray);var convertHexStringToByteArray_1=convertHexStringToByteArray.convertHexStringToByteArray,convertHexStringToDecString=createCommonjsModule(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("")})});unwrapExports(convertHexStringToDecString);var convertHexStringToDecString_1=convertHexStringToDecString.convertHexStringToDecString;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 padStartPolyfill=Object.freeze({__proto__:null}),bignumber=createCommonjsModule(function(e){!function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",c=a+"Number primitive has more than 15 significant digits: ",u=1e14,s=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,d=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function h(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 m(e,t){var r,n,o=e.c,i=t.c,a=e.s,c=t.s,u=e.e,s=t.e;if(!a||!c)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-c:a;if(a!=c)return a;if(r=a<0,n=u==s,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>s^r?1:-1;for(c=(u=o.length)<(s=i.length)?u:s,a=0;a<c;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==s?0:u>s^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 b(e){var t=e.c.length-1;return p(e.e/s)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function y(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,_,w,A,B,x,C,E,N=L.prototype={constructor:L,toString:null,valueOf:null},O=new L(1),D=20,k=4,P=-7,j=21,M=-1e7,H=1e7,I=!1,U=1,R=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},V="0123456789abcdefghijklmnopqrstuvwxyz";function L(e,t){var r,o,a,u,f,g,d,p,h=this;if(!(h instanceof L))return new L(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>H?h.c=h.e=null:e.e<M?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((g="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,f=e;f>=10;f/=10,u++);return void(u>H?h.c=h.e=null:(h.e=u,h.c=[e]))}p=String(e)}else{if(!n.test(p=String(e)))return _(h,p,g);h.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(f=p.search(/e/i))>0?(u<0&&(u=f),u+=+p.slice(f+1),p=p.substring(0,f)):u<0&&(u=p.length)}else{if(v(t,2,V.length,"Base"),10==t)return q(h=new L(e),D+h.e+1,k);if(p=String(e),g="number"==typeof e){if(0*e!=0)return _(h,p,g,t);if(h.s=1/e<0?(p=p.slice(1),-1):1,L.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(c+e)}else h.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=V.slice(0,t),u=f=0,d=p.length;f<d;f++)if(r.indexOf(o=p.charAt(f))<0){if("."==o){if(f>u){u=d;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,f=-1,u=0;continue}return _(h,String(e),g,t)}g=!1,(u=(p=S(p,t,10,h.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(f=0;48===p.charCodeAt(f);f++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(f,++d)){if(d-=f,g&&L.DEBUG&&d>15&&(e>l||e!==i(e)))throw Error(c+h.s*e);if((u=u-f-1)>H)h.c=h.e=null;else if(u<M)h.c=[h.e=0];else{if(h.e=u,h.c=[],f=(u+1)%s,u<0&&(f+=s),f<d){for(f&&h.c.push(+p.slice(0,f)),d-=s;f<d;)h.c.push(+p.slice(f,f+=s));f=s-(p=p.slice(f)).length}else f-=d;for(;f--;p+="0");h.c.push(+p)}}else h.c=[h.e=0]}function Q(e,t,r,n){var o,i,a,c,u;if(null==r?r=k:v(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=h(e.c),u=1==n||2==n&&(a<=P||a>=j)?T(u,a):y(u,a,"0");else if(i=(e=q(new L(e),t,r)).e,c=(u=h(e.c)).length,1==n||2==n&&(t<=i||i<=P)){for(;c<t;u+="0",c++);u=T(u,i)}else if(t-=a,u=y(u,i,"0"),i+1>c){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-c)>0)for(i+1==c&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function G(e,t){for(var r,n=1,o=new L(e[0]);n<e.length;n++){if(!(r=new L(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function $(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)>H?e.c=e.e=null:r<M?e.c=[e.e=0]:(e.e=r,e.c=t),e}function q(e,t,r,n){var a,c,l,g,d,p,h,m=e.c,v=f;if(m){e:{for(a=1,g=m[0];g>=10;g/=10,a++);if((c=t-a)<0)c+=s,l=t,h=(d=m[p=0])/v[a-l-1]%10|0;else if((p=o((c+1)/s))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));d=h=0,a=1,l=(c%=s)-s+1}else{for(d=g=m[p],a=1;g>=10;g/=10,a++);h=(l=(c%=s)-s+a)<0?0:d/v[a-l-1]%10|0}if(n=n||t<0||null!=m[p+1]||(l<0?d:d%v[a-l-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(c>0?l>0?d/v[a-l]:0:m[p-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[(s-t%s)%s],e.e=-t||0):m[0]=e.e=0,e;if(0==c?(m.length=p,g=1,p--):(m.length=p+1,g=v[s-c],m[p]=l>0?i(d/v[a-l]%v[l])*g:0),n)for(;;){if(0==p){for(c=1,l=m[0];l>=10;l/=10,c++);for(l=m[0]+=g,g=1;l>=10;l/=10,g++);c!=g&&(e.e++,m[0]==u&&(m[0]=1));break}if(m[p]+=g,m[p]!=u)break;m[p--]=0,g=1}for(c=m.length;0===m[--c];m.pop());}e.e>H?e.c=e.e=null:e.e<M&&(e.c=[e.e=0])}return e}function z(e){var t,r=e.e;return null===r?e.toString():(t=h(e.c),t=r<=P||r>=j?T(t,r):y(t,r,"0"),e.s<0?"-"+t:t)}return L.clone=e,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.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,d,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-d,0,t),v(r[1],0,d,t),P=r[0],j=r[1]):(v(r,-d,d,t),P=-(j=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-d,-1,t),v(r[1],1,d,t),M=r[0],H=r[1];else{if(v(r,-d,d,t),!r)throw Error(a+t+" cannot be zero: "+r);M=-(H=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),U=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(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);F=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);V=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:k,EXPONENTIAL_AT:[P,j],RANGE:[M,H],CRYPTO:I,MODULO_MODE:U,POW_PRECISION:R,FORMAT:F,ALPHABET:V}},L.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!L.DEBUG)return!0;var t,r,n=e.c,o=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===c||-1===c)&&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>=u||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===c||1===c||-1===c))return!0;throw Error(a+"Invalid BigNumber: "+e)},L.maximum=L.max=function(){return G(arguments,N.lt)},L.minimum=L.min=function(){return G(arguments,N.gt)},L.random=(w=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,c,u,l=0,g=[],p=new L(O);if(null==e?e=D:v(e,0,d),c=o(e/s),I)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(c*=2));l<c;)(u=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(g.push(u%1e14),l+=2);l=c/2}else{if(!crypto.randomBytes)throw I=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(c*=7);l<c;)(u=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):(g.push(u%1e14),l+=7);l=c/7}if(!I)for(;l<c;)(u=w())<9e15&&(g[l++]=u%1e14);for(c=g[--l],e%=s,c&&e&&(u=f[s-e],g[l]=i(c/u)*u);0===g[l];g.pop(),l--);if(l<0)g=[n=0];else{for(n=-1;0===g[0];g.splice(0,1),n-=s);for(l=1,u=g[0];u>=10;u/=10,l++);l<s&&(n-=s-l)}return p.e=n,p.c=g,p}),L.sum=function(){for(var e=1,t=arguments,r=new L(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){function e(e,t,r,n){for(var o,i,a=[0],c=0,u=e.length;c<u;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(c++)),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 c,u,s,l,f,g,d,p,m=t.indexOf("."),v=D,b=k;for(m>=0&&(l=R,R=0,t=t.replace(".",""),g=(p=new L(n)).pow(t.length-m),R=l,p.c=e(y(h(g.c),g.e,"0"),10,o,"0123456789"),p.e=p.c.length),s=l=(d=e(t,n,o,a?(c=V,"0123456789"):(c="0123456789",V))).length;0==d[--l];d.pop());if(!d[0])return c.charAt(0);if(m<0?--s:(g.c=d,g.e=s,g.s=i,d=(g=r(g,p,v,b,o)).c,f=g.r,s=g.e),m=d[u=s+v+1],l=o/2,f=f||u<0||null!=d[u+1],f=b<4?(null!=m||f)&&(0==b||b==(g.s<0?3:2)):m>l||m==l&&(4==b||f||6==b&&1&d[u-1]||b==(g.s<0?8:7)),u<1||!d[0])t=f?y(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=u,f)for(--o;++d[--u]>o;)d[u]=0,u||(++s,d=[1].concat(d));for(l=d.length;!d[--l];);for(m=0,t="";m<=l;t+=c.charAt(d[m++]));t=y(t,s,c.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,o,i,a,c=0,u=e.length,s=t%g,l=t/g|0;for(e=e.slice();u--;)c=((o=s*(i=e[u]%g)+(n=l*i+(a=e[u]/g|0)*s)%g*g+c)/r|0)+(n/g|0)+l*a,e[u]=o%r;return c&&(e=[c].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,c,l){var f,g,d,h,m,v,b,T,y,S,_,w,A,B,x,C,E,N=n.s==o.s?1:-1,O=n.c,D=o.c;if(!(O&&O[0]&&D&&D[0]))return new L(n.s&&o.s&&(O?!D||O[0]!=D[0]:D)?O&&0==O[0]||!D?0*N:N/0:NaN);for(y=(T=new L(N)).c=[],N=a+(g=n.e-o.e)+1,l||(l=u,g=p(n.e/s)-p(o.e/s),N=N/s|0),d=0;D[d]==(O[d]||0);d++);if(D[d]>(O[d]||0)&&g--,N<0)y.push(1),h=!0;else{for(B=O.length,C=D.length,d=0,N+=2,(m=i(l/(D[0]+1)))>1&&(D=e(D,m,l),O=e(O,m,l),C=D.length,B=O.length),A=C,_=(S=O.slice(0,C)).length;_<C;S[_++]=0);E=D.slice(),E=[0].concat(E),x=D[0],D[1]>=l/2&&x++;do{if(m=0,(f=t(D,S,C,_))<0){if(w=S[0],C!=_&&(w=w*l+(S[1]||0)),(m=i(w/x))>1)for(m>=l&&(m=l-1),b=(v=e(D,m,l)).length,_=S.length;1==t(v,S,b,_);)m--,r(v,C<b?E:D,b,l),b=v.length,f=1;else 0==m&&(f=m=1),b=(v=D.slice()).length;if(b<_&&(v=[0].concat(v)),r(S,v,_,l),_=S.length,-1==f)for(;t(D,S,C,_)<1;)m++,r(S,C<_?E:D,_,l),_=S.length}else 0===f&&(m++,S=[0]);y[d++]=m,S[0]?S[_++]=O[A]||0:(S=[O[A]],_=1)}while((A++<B||null!=S[0])&&N--);h=null!=S[0],y[0]||y.splice(0,1)}if(l==u){for(d=1,N=y[0];N>=10;N/=10,d++);q(T,a+(T.e=d+g*s-1)+1,c,h)}else T.e=g,T.r=+h;return T}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,x=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,_=function(e,t,r,n){var o,i=r?t:t.replace(E,"");if(C.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(A,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 L(i,o);if(L.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new L(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return m(this,new L(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,o,i=this;if(null!=e)return v(e,0,d),null==t?t=k:v(t,0,8),q(new L(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-p(this.e/s))*s,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return r(this,new L(e,t),D,k)},N.dividedToIntegerBy=N.idiv=function(e,t){return r(this,new L(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var r,n,c,u,l,f,g,d,p=this;if((e=new L(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+z(e));if(null!=t&&(t=new L(t)),l=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return d=new L(Math.pow(+z(p),l?2-b(e):+z(e))),t?d.mod(t):d;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new L(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return u=p.s<0&&b(e)?-0:0,p.e>-1&&(u=1/u),new L(f?1/u:u);R&&(u=o(R/s+2))}for(l?(r=new L(.5),f&&(e.s=1),g=b(e)):g=(c=Math.abs(+z(e)))%2,d=new L(O);;){if(g){if(!(d=d.times(p)).c)break;u?d.c.length>u&&(d.c.length=u):n&&(d=d.mod(t))}if(c){if(0===(c=i(c/2)))break;g=c%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)g=b(e);else{if(0==(c=+z(e)))break;g=c%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):n&&(p=p.mod(t))}return n?d:(f&&(d=O.div(d)),t?d.mod(t):u?q(d,R,k,void 0):d)},N.integerValue=function(e){var t=new L(this);return null==e?e=k:v(e,0,8),q(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===m(this,new L(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return m(this,new L(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=m(this,new L(e,t)))||0===t},N.isInteger=function(){return!!this.c&&p(this.e/s)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return m(this,new L(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=m(this,new L(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,o,i,a=this,c=a.s;if(t=(e=new L(e,t)).s,!c||!t)return new L(NaN);if(c!=t)return e.s=-t,a.plus(e);var l=a.e/s,f=e.e/s,g=a.c,d=e.c;if(!l||!f){if(!g||!d)return g?(e.s=-t,e):new L(d?a:NaN);if(!g[0]||!d[0])return d[0]?(e.s=-t,e):new L(g[0]?a:3==k?-0:0)}if(l=p(l),f=p(f),g=g.slice(),c=l-f){for((i=c<0)?(c=-c,o=g):(f=l,o=d),o.reverse(),t=c;t--;o.push(0));o.reverse()}else for(n=(i=(c=g.length)<(t=d.length))?c:t,c=t=0;t<n;t++)if(g[t]!=d[t]){i=g[t]<d[t];break}if(i&&(o=g,g=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=g.length))>0)for(;t--;g[r++]=0);for(t=u-1;n>c;){if(g[--n]<d[n]){for(r=n;r&&!g[--r];g[r]=t);--g[r],g[n]+=u}g[n]-=d[n]}for(;0==g[0];g.splice(0,1),--f);return g[0]?$(e,g,f):(e.s=3==k?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var n,o,i=this;return e=new L(e,t),!i.c||!e.s||e.c&&!e.c[0]?new L(NaN):!e.c||i.c&&!i.c[0]?new L(i):(9==U?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,U),(e=i.minus(n.times(e))).c[0]||1!=U||(e.s=i.s),e)},N.multipliedBy=N.times=function(e,t){var r,n,o,i,a,c,l,f,d,h,m,v,b,T,y,S=this,_=S.c,w=(e=new L(e,t)).c;if(!(_&&w&&_[0]&&w[0]))return!S.s||!e.s||_&&!_[0]&&!w||w&&!w[0]&&!_?e.c=e.e=e.s=null:(e.s*=S.s,_&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p(S.e/s)+p(e.e/s),e.s*=S.s,(l=_.length)<(h=w.length)&&(b=_,_=w,w=b,o=l,l=h,h=o),o=l+h,b=[];o--;b.push(0));for(T=u,y=g,o=h;--o>=0;){for(r=0,m=w[o]%y,v=w[o]/y|0,i=o+(a=l);i>o;)r=((f=m*(f=_[--a]%y)+(c=v*f+(d=_[a]/y|0)*m)%y*y+b[i]+r)/T|0)+(c/y|0)+v*d,b[i--]=f%T;b[i]=r}return r?++n:b.splice(0,1),$(e,b,n)},N.negated=function(){var e=new L(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new L(e,t)).s,!o||!t)return new L(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/s,a=e.e/s,c=n.c,l=e.c;if(!i||!a){if(!c||!l)return new L(o/0);if(!c[0]||!l[0])return l[0]?e:new L(c[0]?n:0*o)}if(i=p(i),a=p(a),c=c.slice(),o=i-a){for(o>0?(a=i,r=l):(o=-o,r=c),r.reverse();o--;r.push(0));r.reverse()}for((o=c.length)-(t=l.length)<0&&(r=l,l=c,c=r,t=o),o=0;t;)o=(c[--t]=c[t]+l[t]+o)/u|0,c[t]=u===c[t]?0:c[t]%u;return o&&(c=[o].concat(c),++a),$(e,c,a)},N.precision=N.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return v(e,1,d),null==t?t=k:v(t,0,8),q(new L(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},N.shiftedBy=function(e){return v(e,-l,l),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,n,o,i,a=this,c=a.c,u=a.s,s=a.e,l=D+4,f=new L("0.5");if(1!==u||!c||!c[0])return new L(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);if(0==(u=Math.sqrt(+z(a)))||u==1/0?(((t=h(c)).length+s)%2==0&&(t+="0"),u=Math.sqrt(+t),s=p((s+1)/2)-(s<0||s%2),n=new L(t=u==1/0?"1e"+s:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new L(u+""),n.c[0])for((u=(s=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),h(i.c).slice(0,u)===(t=h(n.c)).slice(0,u)){if(n.e<s&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(n,n.e+D+2,1),e=!n.times(n).eq(a));break}if(!o&&(q(i,i.e+D+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return q(n,n.e+D+1,k,e)},N.toExponential=function(e,t){return null!=e&&(v(e,0,d),e++),Q(this,e,t,1)},N.toFixed=function(e,t){return null!=e&&(v(e,0,d),e=e+this.e+1),Q(this,e,t)},N.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=F;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,c=n.split("."),u=+r.groupSize,s=+r.secondaryGroupSize,l=r.groupSeparator||"",f=c[0],g=c[1],d=o.s<0,p=d?f.slice(1):f,h=p.length;if(s&&(i=u,u=s,s=i,h-=i),u>0&&h>0){for(i=h%u||u,f=p.substr(0,i);i<h;i+=u)f+=l+p.substr(i,u);s>0&&(f+=l+p.slice(i)),d&&(f="-"+f)}n=g?f+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?g.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):g):f}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,n,o,i,c,u,l,g,d,p,m,v,b=this,T=b.c;if(null!=e&&(!(l=new L(e)).isInteger()&&(l.c||1!==l.s)||l.lt(O)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+z(l));if(!T)return new L(b);for(t=new L(O),d=n=new L(O),o=g=new L(O),v=h(T),c=t.e=v.length-b.e-1,t.c[0]=f[(u=c%s)<0?s+u:u],e=!e||l.comparedTo(t)>0?c>0?t:d:l,u=H,H=1/0,l=new L(v),g.c[0]=0;p=r(l,t,0,1),1!=(i=n.plus(p.times(o))).comparedTo(e);)n=o,o=i,d=g.plus(p.times(i=d)),g=i,t=l.minus(p.times(i=t)),l=i;return i=r(e.minus(n),o,0,1),g=g.plus(i.times(d)),n=n.plus(i.times(o)),g.s=d.s=b.s,m=r(d,o,c*=2,k).minus(b).abs().comparedTo(r(g,n,c,k).minus(b).abs())<1?[d,o]:[g,n],H=u,m},N.toNumber=function(){return+z(this)},N.toPrecision=function(e,t){return null!=e&&v(e,1,d),Q(this,e,t,2)},N.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<=P||o>=j?T(h(r.c),o):y(h(r.c),o,"0"):10===e?t=y(h((r=q(new L(r),D+o+1,k)).c),r.e,"0"):(v(e,2,V.length,"Base"),t=S(y(h(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return z(this)},N._isBigNumber=!0,null!=t&&L.set(t),L}()).default=r.BigNumber=r,e.exports?e.exports=r:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=r)}(commonjsGlobal)});getCjsExportFromNamespace(padStartPolyfill);var convertDecStringToHexString=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.convertDecStringToHexString=((e,t=2)=>{let r="string"==typeof e?new bignumber.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=(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 bignumber.default(r+t,2).plus(1)})(r));const o=r.toString(16),i=Math.ceil(o.length/t);return o.padStart(i*t,n?"f":"0")})});unwrapExports(convertDecStringToHexString);var convertDecStringToHexString_1=convertDecStringToHexString.convertDecStringToHexString,convertHexStringToString=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToString=(e=>convertByteArrayToString.convertByteArrayToString(convertHexStringToByteArray.convertHexStringToByteArray(e)))});unwrapExports(convertHexStringToString);var convertHexStringToString_1=convertHexStringToString.convertHexStringToString,convertNQTStringToNumber=createCommonjsModule(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})});unwrapExports(convertNQTStringToNumber);var convertNQTStringToNumber_1=convertNQTStringToNumber.convertNQTStringToNumber,convertNumberToNQTString=createCommonjsModule(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(".","")})});unwrapExports(convertNumberToNQTString);var convertNumberToNQTString_1=convertNumberToNQTString.convertNumberToNQTString,convertNumericIdToAddress=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const t=[],r=internal.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,a=0;do{i=0,a=0;for(let e=0;e<o;e++)(i=10*i+t[e])>=32?(t[a]=i>>5,i&=31,a++):a>0&&(t[a]=0,a++);o=a,r[n]=i,n++}while(o>0);const c=[0,0,0,0];for(let e=internal.base32Length-1;e>=0;e--){const t=r[e]^c[3];c[3]=c[2]^internal.gmult(30,t),c[2]=c[1]^internal.gmult(6,t),c[1]=c[0]^internal.gmult(9,t),c[0]=internal.gmult(17,t)}r[13]=c[0],r[14]=c[1],r[15]=c[2],r[16]=c[3];let u="BURST-";for(let e=0;e<17;e++)u+=internal.alphabet[r[internal.cwmap[e]]],3==(3&e)&&e<13&&(u+="-");return u})});unwrapExports(convertNumericIdToAddress);var convertNumericIdToAddress_1=convertNumericIdToAddress.convertNumericIdToAddress,convertStringToByteArray=createCommonjsModule(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})});unwrapExports(convertStringToByteArray);var convertStringToByteArray_1=convertStringToByteArray.convertStringToByteArray,convertStringToHexString=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHexString=(e=>convertByteArrayToHexString.convertByteArrayToHexString(convertStringToByteArray.convertStringToByteArray(e)))});unwrapExports(convertStringToHexString);var convertStringToHexString_1=convertStringToHexString.convertStringToHexString,createDeeplinkArgs=createCommonjsModule(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={}))});unwrapExports(createDeeplinkArgs);var createDeeplinkArgs_1=createDeeplinkArgs.EncoderFormat,base64=createCommonjsModule(function(module,exports){var global,factory;global="undefined"!=typeof self?self:"undefined"!=typeof window?window:commonjsGlobal,factory=function(global){global=global||{};var _Base64=global.Base64,version="2.5.1",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?fromCharCode(192|t>>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(r>>>18),b64chars.charAt(r>>>12&63),t>=2?"=":b64chars.charAt(r>>>6&63),t>=1?"=":b64chars.charAt(63&r)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][-¿]","[à-ï][-¿]{2}","[ð-÷][-¿]{3}"].join("|"),"g"),cb_btou=function(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 fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,r=t%4,n=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return o.length-=[0,0,2,1][r],o.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),module.exports&&(module.exports.Base64=global.Base64),{Base64:global.Base64}},module.exports=factory(global)}),base64_1=base64.Base64,convertStringToBase64String=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToBase64String=((e,t=!0)=>t?base64.Base64.encodeURI(e):base64.Base64.encode(e))});unwrapExports(convertStringToBase64String);var convertStringToBase64String_1=convertStringToBase64String.convertStringToBase64String,createDeeplink=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDeeplink=(e=>{const{encoderFormat:t=createDeeplinkArgs.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 createDeeplinkArgs.EncoderFormat.Hexadecimal:return convertStringToHexString.convertStringToHexString(r);case createDeeplinkArgs.EncoderFormat.Base64:return convertStringToBase64String.convertStringToBase64String(r);case createDeeplinkArgs.EncoderFormat.Text:default:return r}}(o,t)}`),i})});unwrapExports(createDeeplink);var createDeeplink_1=createDeeplink.createDeeplink,parseDeeplink=createCommonjsModule(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})});unwrapExports(parseDeeplink);var parseDeeplink_1=parseDeeplink.parseDeeplink,sumNQTStringToNumber_1=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sumNQTStringToNumber=function(...e){return e.reduce((e,t)=>e+convertNQTStringToNumber.convertNQTStringToNumber(t),0)}});unwrapExports(sumNQTStringToNumber_1);var sumNQTStringToNumber_2=sumNQTStringToNumber_1.sumNQTStringToNumber,typings=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(createDeeplinkArgs)});unwrapExports(typings);var constants=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BurstSymbol="Ƀ",t.BurstPlanckSymbol="ƀ",t.FeeQuantPlanck=735e3,t.OneBurstPlanck=1e8});unwrapExports(constants);var constants_1=constants.BurstSymbol,constants_2=constants.BurstPlanckSymbol,constants_3=constants.FeeQuantPlanck,constants_4=constants.OneBurstPlanck,burstTime=createCommonjsModule(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*(internal.GenesisBlockTime+this._burstTimestamp)}getDate(){return new Date(this.getEpoch())}setDate(e){this._burstTimestamp=Math.round(e.getTime()/1e3)-internal.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});unwrapExports(burstTime);var burstTime_1=burstTime.BurstTime,burstValue=createCommonjsModule(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}),bignumber.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 bignumber.default(e)}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 bignumber.default(e)}getBurst(){return this._planck.dividedBy(1e8).toString()}setBurst(e){n(e),this._planck=new bignumber.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?`${constants.BurstSymbol} ${this.getBurst()}`:`${constants.BurstPlanckSymbol} ${this._planck}`}clone(){return o.fromPlanck(this.getPlanck())}}t.BurstValue=o});unwrapExports(burstValue);var burstValue_1=burstValue.BurstValueFormat,burstValue_2=burstValue.BurstValue,out=createCommonjsModule(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(convertAddressToNumericId),r(convertBurstTimeToDate),r(convertBurstTimeToEpochTime),r(convertByteArrayToHexString),r(convertByteArrayToString),r(convertDateToBurstTime),r(convertHexEndianess),r(convertHexStringToByteArray),r(convertHexStringToDecString),r(convertDecStringToHexString),r(convertHexStringToString),r(convertNQTStringToNumber),r(convertNumberToNQTString),r(convertNumericIdToAddress),r(convertStringToByteArray),r(convertStringToHexString),r(createDeeplink),r(isBurstAddress),r(parseDeeplink),r(sumNQTStringToNumber_1),r(typings),r(constants),r(burstTime),r(burstValue)});unwrapExports(out);var out_1=out.BurstValue,out_2=out.FeeQuantPlanck,out_3=out.OneBurstPlanck,out_4=out.convertHexStringToDecString,out_5=out.convertDecStringToHexString,out_6=out.convertHexStringToString,out_7=out.convertHexEndianess,out_8=out.convertHexStringToByteArray,out_9=out.convertByteArrayToHexString;function getContractDatablock(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 out_7(e.machineData.substr(n,r))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var CodePageSize=256;function countCodePages(e){return Math.ceil(e.length/2/CodePageSize)}var ContractDataView=function(){function e(t){_classCallCheck(this,e),this._contract=t}return _createClass(e,[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return countCodePages(this._contract.machineCode)}},{key:"getVariableAsString",value:function(t){var r=this.getHexDataAt(t,e.VariableLength);return out_6(r.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(t,r){var n=this.getHexDataAt(t,r*e.VariableLength);return out_6(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return out_4(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 getContractDatablock(this._contract,t,n)}}]),e}();function calculateMinimumCreationFee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return out_1.fromPlanck((t?10*out_2:out_3).toString(10)).multiply(2+countCodePages(e)+1)}ContractDataView.VariableLength=16;var convertArgument=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e},generateMethodCall=function(e){var t=e.methodArgs?[e.methodHash].concat(_toConsumableArray(e.methodArgs)):[e.methodHash];if(t.length>4)throw new Error("At maximum ".concat(3," are supported"));return t.map(convertArgument).map(function(e){return out_5(e,16)}).map(out_7).join("")};return exports.CodePageSize=CodePageSize,exports.ContractDataView=ContractDataView,exports.calculateMinimumCreationFee=calculateMinimumCreationFee,exports.countCodePages=countCodePages,exports.generateMethodCall=generateMethodCall,exports.getContractDatablock=getContractDatablock,exports}({}); | ||
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}({}); | ||
//# sourceMappingURL=burstjs.contracts.min.js.map |
{ | ||
"name": "@burstjs/contracts", | ||
"version": "0.6.0-alpha.9", | ||
"version": "0.6.0-beta.1", | ||
"description": "Smart Contracts package for BURST", | ||
@@ -47,3 +47,3 @@ "contributors": [ | ||
"dependencies": { | ||
"@burstjs/util": "^0.6.0-alpha.9" | ||
"@burstjs/util": "^0.6.0-beta.1" | ||
}, | ||
@@ -55,3 +55,3 @@ "husky": { | ||
}, | ||
"gitHead": "7e6cc334ef794e7046b009eeed55f96b6a351d8e", | ||
"gitHead": "8a6a48a9bd4ce272ca59b9b7a3c572bfeafc8d63", | ||
"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
467809
4410
Updated@burstjs/util@^0.6.0-beta.1