Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@burstjs/contracts

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/contracts - npm Package Compare versions

Comparing version 0.5.0-beta.3 to 0.5.0-beta.4

2

dist/burstjs.contracts.min.js

@@ -1,2 +0,2 @@

var b$contracts=function(e,t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o(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]})});n(i);i.GenesisBlockTime,i.initialCodeword,i.gexp,i.glog,i.cwmap,i.alphabet,i.base32Length,i.ginv,i.gmult;var a=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=(e=>{0===e.indexOf("BURST-")&&(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=>/^BURST\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{5}/i.test(e)&&t.isValid(e))});n(a);a.isValid,a.isBurstAddress;var c=o(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=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(!a.isValid(e))return;let n=i.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=t[n-e-1];let c,u="",l=0;do{c=0,l=0;for(let e=0;e<n;e++)(l=32*l+o[e])>=10?(o[c]=Math.floor(l/10),l%=10,c+=1):c>0&&(o[c]=0,c+=1);n=c,u+=l}while(n>0);return u.split("").reverse().join("")})});n(c);c.convertAddressToNumericId;var u=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToEpochTime=(e=>1e3*(i.GenesisBlockTime+e))});n(u);u.convertBurstTimeToEpochTime;var l=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBurstTimeToDate=(e=>new Date(u.convertBurstTimeToEpochTime(e)))});n(l);l.convertBurstTimeToDate;var s=o(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("")})});n(s);s.convertByteArrayToHexString;var f=o(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))))})});n(f);f.convertByteArrayToString;var h=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-i.GenesisBlockTime)});n(h);h.convertDateToBurstTime;var g=o(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})});n(g);g.convertHexEndianess;var d=o(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})});n(d);d.convertHexStringToByteArray;var p=o(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("")})});n(p);p.convertHexStringToDecString;var v=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexStringToString=(e=>f.convertByteArrayToString(d.convertHexStringToByteArray(e)))});n(v);v.convertHexStringToString;var m=o(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})});n(m);m.convertNQTStringToNumber;var y=o(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(".","")})});n(y);y.convertNumberToNQTString;var w=o(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,c=0;do{a=0,c=0;for(let e=0;e<o;e++)(a=10*a+t[e])>=32?(t[c]=a>>5,a&=31,c++):c>0&&(t[c]=0,c++);o=c,r[n]=a,n++}while(o>0);const u=[0,0,0,0];for(let e=i.base32Length-1;e>=0;e--){const t=r[e]^u[3];u[3]=u[2]^i.gmult(30,t),u[2]=u[1]^i.gmult(6,t),u[1]=u[0]^i.gmult(9,t),u[0]=i.gmult(17,t)}r[13]=u[0],r[14]=u[1],r[15]=u[2],r[16]=u[3];let l="BURST-";for(let e=0;e<17;e++)l+=i.alphabet[r[i.cwmap[e]]],3==(3&e)&&e<13&&(l+="-");return l})});n(w);w.convertNumericIdToAddress;var b=o(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})});n(b);b.convertStringToByteArray;var A=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToHexString=(e=>s.convertByteArrayToHexString(b.convertStringToByteArray(e)))});n(A);A.convertStringToHexString;var S=o(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={}))});n(S);S.EncoderFormat;var T=o(function(e,n){var o;o="undefined"!=typeof self?self:"undefined"!=typeof window?window:r,e.exports=function(r){var n,o=r.Base64;if(e.exports)if("undefined"!=typeof navigator&&"ReactNative"==navigator.product);else try{n=t.Buffer}catch(e){}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(i),c=String.fromCharCode,u=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t)}var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(l,u)},f=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),n=[i.charAt(r>>>18),i.charAt(r>>>12&63),t>=2?"=":i.charAt(r>>>6&63),t>=1?"=":i.charAt(63&r)];return n.join("")},h=r.btoa?function(e){return r.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,f)},g=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(e){return(e.constructor===n.constructor?e:n.from(e)).toString("base64")}:function(e){return(e.constructor===n.constructor?e:new n(e)).toString("base64")}:function(e){return h(s(e))},d=function(e,t){return t?g(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):g(String(e))},p=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),v=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),r=t-65536;return c(55296+(r>>>10))+c(56320+(1023&r));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(p,v)},y=function(e){var t=e.length,r=t%4,n=(t>0?a[e.charAt(0)]<<18:0)|(t>1?a[e.charAt(1)]<<12:0)|(t>2?a[e.charAt(2)]<<6:0)|(t>3?a[e.charAt(3)]:0),o=[c(n>>>16),c(n>>>8&255),c(255&n)];return o.length-=[0,0,2,1][r],o.join("")},w=r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/[\s\S]{1,4}/g,y)},b=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(e){return(e.constructor===n.constructor?e:n.from(e,"base64")).toString()}:function(e){return(e.constructor===n.constructor?e:new n(e,"base64")).toString()}:function(e){return m(w(e))},A=function(e){return b(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};if(r.Base64={VERSION:"2.4.8",atob:w,btoa:h,fromBase64:A,toBase64:d,utob:s,encode:d,encodeURI:function(e){return d(e,!0)},btou:m,decode:A,noConflict:function(){var e=r.Base64;return r.Base64=o,e}},"function"==typeof Object.defineProperty){var S=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",S(function(e){return d(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",S(function(){return d(this,!0)}))}}return r.Meteor&&(Base64=r.Base64),e.exports&&(e.exports.Base64=r.Base64),{Base64:r.Base64}}(o)}),O=(T.Base64,o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertStringToBase64String=((e,t=!0)=>t?T.Base64.encodeURI(e):T.Base64.encode(e))}));n(O);O.convertStringToBase64String;var N=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createDeeplink=(e=>{const{encoderFormat:t=S.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 S.EncoderFormat.Hexadecimal:return A.convertStringToHexString(r);case S.EncoderFormat.Base64:return O.convertStringToBase64String(r);case S.EncoderFormat.Text:default:return r}}(o,t)}`),i})});n(N);N.createDeeplink;var B=o(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})});n(B);B.parseDeeplink;var _=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sumNQTStringToNumber=function(...e){return e.reduce((e,t)=>e+m.convertNQTStringToNumber(t),0)}});n(_);_.sumNQTStringToNumber;var x=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(S)});n(x);var E=o(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(c),r(l),r(u),r(s),r(f),r(h),r(g),r(d),r(p),r(v),r(m),r(y),r(w),r(b),r(A),r(N),r(a),r(B),r(_),r(x)});n(E);var C=E.convertNumberToNQTString,P=(E.convertNQTStringToNumber,E.convertHexStringToDecString),D=E.convertHexStringToString,j=E.convertHexEndianess;E.convertHexStringToByteArray,E.convertByteArrayToHexString;function M(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 j(e.machineData.substr(n,r))}function I(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 U(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 R=256;function H(e){return Math.ceil(e.length/2/R)}var L=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 H(this._contract.machineCode)}},{key:"getVariableAsString",value:function(t){var r=this.getHexDataAt(t,e.VariableLength);return D(r.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(t,r){var n=this.getHexDataAt(t,r*e.VariableLength);return D(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return P(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 M(this._contract,t,n)}}])&&I(t.prototype,r),n&&I(t,n),e}();L.VariableLength=16,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 F=o(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,l=14,s=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=l-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,c=t.s,u=e.e,l=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==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>l^r?1:-1;for(c=(u=o.length)<(l=i.length)?u:l,a=0;a<c;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==l?0:u>l^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 d(e.e/l)==t&&e.c[t]%2!=0}function w(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function b(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,A,S,T,O,N,B,_,x,E=V.prototype={constructor:V,toString:null,valueOf:null},C=new V(1),P=20,D=4,j=-7,M=21,I=-1e7,U=1e7,R=!1,H=1,L=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz";function V(e,t){var r,o,a,u,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<I?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(u=0,f=e;f>=10;f/=10,u++);return void(u>U?p.c=p.e=null:(p.e=u,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}(u=d.indexOf("."))>-1&&(d=d.replace(".","")),(f=d.search(/e/i))>0?(u<0&&(u=f),u+=+d.slice(f+1),d=d.substring(0,f)):u<0&&(u=d.length)}else{if(m(t,2,k.length,"Base"),10==t)return z(p=new V(e),P+p.e+1,D);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(c+e)}else p.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=k.slice(0,t),u=f=0,g=d.length;f<g;f++)if(r.indexOf(o=d.charAt(f))<0){if("."==o){if(f>u){u=g;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,f=-1,u=0;continue}return S(p,String(e),h,t)}h=!1,(u=(d=A(d,t,10,p.s)).indexOf("."))>-1?d=d.replace(".",""):u=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>s||e!==i(e)))throw Error(c+p.s*e);if((u=u-f-1)>U)p.c=p.e=null;else if(u<I)p.c=[p.e=0];else{if(p.e=u,p.c=[],f=(u+1)%l,u<0&&(f+=l),f<g){for(f&&p.c.push(+d.slice(0,f)),g-=l;f<g;)p.c.push(+d.slice(f,f+=l));f=l-(d=d.slice(f)).length}else f-=g;for(;f--;d+="0");p.c.push(+d)}}else p.c=[p.e=0]}function G(e,t,r,n){var o,i,a,c,u;if(null==r?r=D:m(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=p(e.c),u=1==n||2==n&&(a<=j||a>=M)?w(u,a):b(u,a,"0");else if(i=(e=z(new V(e),t,r)).e,c=(u=p(e.c)).length,1==n||2==n&&(t<=i||i<=j)){for(;c<t;u+="0",c++);u=w(u,i)}else if(t-=a,u=b(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 $(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 q(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*l-1)>U?e.c=e.e=null:r<I?e.c=[e.e=0]:(e.e=r,e.c=t),e}function z(e,t,r,n){var a,c,s,h,g,d,p,v=e.c,m=f;if(v){e:{for(a=1,h=v[0];h>=10;h/=10,a++);if((c=t-a)<0)c+=l,s=t,p=(g=v[d=0])/m[a-s-1]%10|0;else if((d=o((c+1)/l))>=v.length){if(!n)break e;for(;v.length<=d;v.push(0));g=p=0,a=1,s=(c%=l)-l+1}else{for(g=h=v[d],a=1;h>=10;h/=10,a++);p=(s=(c%=l)-l+a)<0?0:g/m[a-s-1]%10|0}if(n=n||t<0||null!=v[d+1]||(s<0?g:g%m[a-s-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(c>0?s>0?g/m[a-s]:0:v[d-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[(l-t%l)%l],e.e=-t||0):v[0]=e.e=0,e;if(0==c?(v.length=d,h=1,d--):(v.length=d+1,h=m[l-c],v[d]=s>0?i(g/m[a-s]%m[s])*h:0),n)for(;;){if(0==d){for(c=1,s=v[0];s>=10;s/=10,c++);for(s=v[0]+=h,h=1;s>=10;s/=10,h++);c!=h&&(e.e++,v[0]==u&&(v[0]=1));break}if(v[d]+=h,v[d]!=u)break;v[d--]=0,h=1}for(c=v.length;0===v[--c];v.pop());}e.e>U?e.c=e.e=null:e.e<I&&(e.c=[e.e=0])}return e}function Q(e){var t,r=e.e;return null===r?e.toString():(t=p(e.c),t=r<=j||r>=M?w(t,r):b(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,g,t),P=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(m(r=e[t],0,8,t),D=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(m(r[0],-g,0,t),m(r[1],0,g,t),j=r[0],M=r[1]):(m(r,-g,g,t),j=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)m(r[0],-g,-1,t),m(r[1],1,g,t),I=r[0],U=r[1];else{if(m(r,-g,g,t),!r)throw Error(a+t+" cannot be zero: "+r);I=-(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 R=!r,Error(a+"crypto unavailable");R=r}else R=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(m(r=e[t],0,9,t),H=r),e.hasOwnProperty(t="POW_PRECISION")&&(m(r=e[t],0,g,t),L=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);k=r}}return{DECIMAL_PLACES:P,ROUNDING_MODE:D,EXPONENTIAL_AT:[j,M],RANGE:[I,U],CRYPTO:R,MODULO_MODE:H,POW_PRECISION:L,FORMAT:F,ALPHABET:k}},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,c=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===c||-1===c)&&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)%l)<1&&(t+=l),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)},V.maximum=V.max=function(){return $(arguments,E.lt)},V.minimum=V.min=function(){return $(arguments,E.gt)},V.random=(T=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,s=0,h=[],d=new V(C);if(null==e?e=P:m(e,0,g),c=o(e/l),R)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(c*=2));s<c;)(u=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(h.push(u%1e14),s+=2);s=c/2}else{if(!crypto.randomBytes)throw R=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(c*=7);s<c;)(u=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(h.push(u%1e14),s+=7);s=c/7}if(!R)for(;s<c;)(u=T())<9e15&&(h[s++]=u%1e14);for(c=h[--s],e%=l,c&&e&&(u=f[l-e],h[s]=i(c/u)*u);0===h[s];h.pop(),s--);if(s<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=l);for(s=1,u=h[0];u>=10;u/=10,s++);s<l&&(n-=l-s)}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},A=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,l,s,f,h,g,d,v=t.indexOf("."),m=P,y=D;for(v>=0&&(s=L,L=0,t=t.replace(".",""),h=(d=new V(n)).pow(t.length-v),L=s,d.c=e(b(p(h.c),h.e,"0"),10,o,"0123456789"),d.e=d.c.length),l=s=(g=e(t,n,o,a?(c=k,"0123456789"):(c="0123456789",k))).length;0==g[--s];g.pop());if(!g[0])return c.charAt(0);if(v<0?--l:(h.c=g,h.e=l,h.s=i,g=(h=r(h,d,m,y,o)).c,f=h.r,l=h.e),v=g[u=l+m+1],s=o/2,f=f||u<0||null!=g[u+1],f=y<4?(null!=v||f)&&(0==y||y==(h.s<0?3:2)):v>s||v==s&&(4==y||f||6==y&&1&g[u-1]||y==(h.s<0?8:7)),u<1||!g[0])t=f?b(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(g.length=u,f)for(--o;++g[--u]>o;)g[u]=0,u||(++l,g=[1].concat(g));for(s=g.length;!g[--s];);for(v=0,t="";v<=s;t+=c.charAt(g[v++]));t=b(t,l,c.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,o,i,a,c=0,u=e.length,l=t%h,s=t/h|0;for(e=e.slice();u--;)c=((o=l*(i=e[u]%h)+(n=s*i+(a=e[u]/h|0)*l)%h*h+c)/r|0)+(n/h|0)+s*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,s){var f,h,g,p,v,m,y,w,b,A,S,T,O,N,B,_,x,E=n.s==o.s?1:-1,C=n.c,P=o.c;if(!(C&&C[0]&&P&&P[0]))return new V(n.s&&o.s&&(C?!P||C[0]!=P[0]:P)?C&&0==C[0]||!P?0*E:E/0:NaN);for(b=(w=new V(E)).c=[],E=a+(h=n.e-o.e)+1,s||(s=u,h=d(n.e/l)-d(o.e/l),E=E/l|0),g=0;P[g]==(C[g]||0);g++);if(P[g]>(C[g]||0)&&h--,E<0)b.push(1),p=!0;else{for(N=C.length,_=P.length,g=0,E+=2,(v=i(s/(P[0]+1)))>1&&(P=e(P,v,s),C=e(C,v,s),_=P.length,N=C.length),O=_,S=(A=C.slice(0,_)).length;S<_;A[S++]=0);x=P.slice(),x=[0].concat(x),B=P[0],P[1]>=s/2&&B++;do{if(v=0,(f=t(P,A,_,S))<0){if(T=A[0],_!=S&&(T=T*s+(A[1]||0)),(v=i(T/B))>1)for(v>=s&&(v=s-1),y=(m=e(P,v,s)).length,S=A.length;1==t(m,A,y,S);)v--,r(m,_<y?x:P,y,s),y=m.length,f=1;else 0==v&&(f=v=1),y=(m=P.slice()).length;if(y<S&&(m=[0].concat(m)),r(A,m,S,s),S=A.length,-1==f)for(;t(P,A,_,S)<1;)v++,r(A,_<S?x:P,S,s),S=A.length}else 0===f&&(v++,A=[0]);b[g++]=v,A[0]?A[S++]=C[O]||0:(A=[C[O]],S=1)}while((O++<N||null!=A[0])&&E--);p=null!=A[0],b[0]||b.splice(0,1)}if(s==u){for(g=1,E=b[0];E>=10;E/=10,g++);z(w,a+(w.e=g+h*l-1)+1,c,p)}else w.e=h,w.r=+p;return w}}(),O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,N=/^([^.]+)\.$/,B=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,r,n){var o,i=r?t:t.replace(x,"");if(_.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(O,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(N,"$1").replace(B,"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,g),null==t?t=D:m(t,0,8),z(new V(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-d(this.e/l))*l,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),P,D)},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,c,u,s,f,h,g,d=this;if((e=new V(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+Q(e));if(null!=t&&(t=new V(t)),s=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(+Q(d),s?2-y(e):+Q(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||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return u=d.s<0&&y(e)?-0:0,d.e>-1&&(u=1/u),new V(f?1/u:u);L&&(u=o(L/l+2))}for(s?(r=new V(.5),f&&(e.s=1),h=y(e)):h=(c=Math.abs(+Q(e)))%2,g=new V(C);;){if(h){if(!(g=g.times(d)).c)break;u?g.c.length>u&&(g.c.length=u):n&&(g=g.mod(t))}if(c){if(0===(c=i(c/2)))break;h=c%2}else if(z(e=e.times(r),e.e+1,1),e.e>14)h=y(e);else{if(0==(c=+Q(e)))break;h=c%2}d=d.times(d),u?d.c&&d.c.length>u&&(d.c.length=u):n&&(d=d.mod(t))}return n?g:(f&&(g=C.div(g)),t?g.mod(t):u?z(g,L,D,void 0):g)},E.integerValue=function(e){var t=new V(this);return null==e?e=D:m(e,0,8),z(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&&d(this.e/l)>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,c=a.s;if(t=(e=new V(e,t)).s,!c||!t)return new V(NaN);if(c!=t)return e.s=-t,a.plus(e);var s=a.e/l,f=e.e/l,h=a.c,g=e.c;if(!s||!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==D?-0:0)}if(s=d(s),f=d(f),h=h.slice(),c=s-f){for((i=c<0)?(c=-c,o=h):(f=s,o=g),o.reverse(),t=c;t--;o.push(0));o.reverse()}else for(n=(i=(c=h.length)<(t=g.length))?c:t,c=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=u-1;n>c;){if(h[--n]<g[n]){for(r=n;r&&!h[--r];h[r]=t);--h[r],h[n]+=u}h[n]-=g[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?q(e,h,f):(e.s=3==D?-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==H?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,H),(e=i.minus(n.times(e))).c[0]||1!=H||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var r,n,o,i,a,c,s,f,g,p,v,m,y,w,b,A=this,S=A.c,T=(e=new V(e,t)).c;if(!(S&&T&&S[0]&&T[0]))return!A.s||!e.s||S&&!S[0]&&!T||T&&!T[0]&&!S?e.c=e.e=e.s=null:(e.s*=A.s,S&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=d(A.e/l)+d(e.e/l),e.s*=A.s,(s=S.length)<(p=T.length)&&(y=S,S=T,T=y,o=s,s=p,p=o),o=s+p,y=[];o--;y.push(0));for(w=u,b=h,o=p;--o>=0;){for(r=0,v=T[o]%b,m=T[o]/b|0,i=o+(a=s);i>o;)r=((f=v*(f=S[--a]%b)+(c=m*f+(g=S[a]/b|0)*v)%b*b+y[i]+r)/w|0)+(c/b|0)+m*g,y[i--]=f%w;y[i]=r}return r?++n:y.splice(0,1),q(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/l,a=e.e/l,c=n.c,s=e.c;if(!i||!a){if(!c||!s)return new V(o/0);if(!c[0]||!s[0])return s[0]?e:new V(c[0]?n:0*o)}if(i=d(i),a=d(a),c=c.slice(),o=i-a){for(o>0?(a=i,r=s):(o=-o,r=c),r.reverse();o--;r.push(0));r.reverse()}for((o=c.length)-(t=s.length)<0&&(r=s,s=c,c=r,t=o),o=0;t;)o=(c[--t]=c[t]+s[t]+o)/u|0,c[t]=u===c[t]?0:c[t]%u;return o&&(c=[o].concat(c),++a),q(e,c,a)},E.precision=E.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return m(e,1,g),null==t?t=D:m(t,0,8),z(new V(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*l+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,-s,s),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,n,o,i,a=this,c=a.c,u=a.s,l=a.e,s=P+4,f=new V("0.5");if(1!==u||!c||!c[0])return new V(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);if(0==(u=Math.sqrt(+Q(a)))||u==1/0?(((t=p(c)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=d((l+1)/2)-(l<0||l%2),n=new V(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new V(u+""),n.c[0])for((u=(l=n.e)+s)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,s,1))),p(i.c).slice(0,u)===(t=p(n.c)).slice(0,u)){if(n.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(z(n,n.e+P+2,1),e=!n.times(n).eq(a));break}if(!o&&(z(i,i.e+P+2,0),i.times(i).eq(a))){n=i;break}s+=4,u+=4,o=1}return z(n,n.e+P+1,D,e)},E.toExponential=function(e,t){return null!=e&&(m(e,0,g),e++),G(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(m(e,0,g),e=e+this.e+1),G(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=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,l=+r.secondaryGroupSize,s=r.groupSeparator||"",f=c[0],h=c[1],g=o.s<0,d=g?f.slice(1):f,p=d.length;if(l&&(i=u,u=l,l=i,p-=i),u>0&&p>0){for(i=p%u||u,f=d.substr(0,i);i<p;i+=u)f+=s+d.substr(i,u);l>0&&(f+=s+d.slice(i)),g&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},E.toFraction=function(e){var t,n,o,i,c,u,s,h,g,d,v,m,y=this,w=y.c;if(null!=e&&(!(s=new V(e)).isInteger()&&(s.c||1!==s.s)||s.lt(C)))throw Error(a+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+Q(s));if(!w)return new V(y);for(t=new V(C),g=n=new V(C),o=h=new V(C),m=p(w),c=t.e=m.length-y.e-1,t.c[0]=f[(u=c%l)<0?l+u:u],e=!e||s.comparedTo(t)>0?c>0?t:g:s,u=U,U=1/0,s=new V(m),h.c[0]=0;d=r(s,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=s.minus(d.times(i=t)),s=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,v=r(g,o,c*=2,D).minus(y).abs().comparedTo(r(h,n,c,D).minus(y).abs())<1?[g,o]:[h,n],U=u,v},E.toNumber=function(){return+Q(this)},E.toPrecision=function(e,t){return null!=e&&m(e,1,g),G(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<=j||o>=M?w(p(r.c),o):b(p(r.c),o,"0"):10===e?t=b(p((r=z(new V(r),P+o+1,D)).c),r.e,"0"):(m(e,2,k.length,"Base"),t=A(b(p(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return Q(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)}(r)}),k=function(e){for(var t=e.multipliedBy(-1).toString(2);t.length%8;)t="0"+t;var r="1"===t[0]&&-1!==t.slice(1).indexOf("1")?"11111111":"";return t=t.split("").map(function(e){return"0"===e?"1":"0"}).join(""),new F(r+t,2).plus(1)},V=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e};return e.CodePageSize=R,e.ContractDataView=L,e.calculateMinimumCreationFee=function(e){return C(2+H(e)+1)},e.countCodePages=H,e.generateMethodCall=function(e){var t=e.methodArgs?[e.methodHash].concat(U(e.methodArgs)):[e.methodHash];if(t.length>4)throw new Error("At maximum ".concat(3," are supported"));return t.map(V).map(function(e){return function(e){var t=new F(e);t.lt(0)&&(t=k(t));var r=t.toString(16);return r.length%2?"0"+r:r}(e).padStart(16,"0")}).map(j).join("")},e.getContractDatablock=M,e}({},buffer);
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,r){return e(r={exports:{}},r.exports),r.exports}var internal=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.GenesisBlockTime=Date.UTC(2014,7,11,2,0,0,0)/1e3,r.initialCodeword=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r.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],r.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],r.cwmap=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11],r.alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".split(""),r.base32Length=13,r.ginv=(e=>r.gexp[31-r.glog[e]]),r.gmult=((e,t)=>{if(0===e||0===t)return 0;const n=(r.glog[e]+r.glog[t])%31;return r.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,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValid=(e=>{0===e.indexOf("BURST-")&&(e=e.substr(6));const r=internal.initialCodeword.slice();let t=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(t>16)return!1;r[internal.cwmap[t]]=o,t++}}if(17!==t)return!1;let n=0;for(let e=1;e<5;e++){let t=0;for(let n=0;n<31;n++){if(n>12&&n<27)continue;let o=n;n>26&&(o-=14),t^=internal.gmult(r[o],internal.gexp[e*n%31])}n|=t}return 0===n}),r.isBurstAddress=(e=>/^BURST\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{5}/i.test(e)&&r.isValid(e))});unwrapExports(isBurstAddress);var isBurstAddress_1=isBurstAddress.isValid,isBurstAddress_2=isBurstAddress.isBurstAddress,convertAddressToNumericId=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf("BURST-"))return;e=e.substr(6);const r=internal.initialCodeword.slice();let t=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(t>16)return;r[internal.cwmap[t]]=o,t++}}if(!isBurstAddress.isValid(e))return;let n=internal.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=r[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,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToEpochTime=(e=>1e3*(internal.GenesisBlockTime+e))});unwrapExports(convertBurstTimeToEpochTime);var convertBurstTimeToEpochTime_1=convertBurstTimeToEpochTime.convertBurstTimeToEpochTime,convertBurstTimeToDate=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToDate=(e=>new Date(convertBurstTimeToEpochTime.convertBurstTimeToEpochTime(e)))});unwrapExports(convertBurstTimeToDate);var convertBurstTimeToDate_1=convertBurstTimeToDate.convertBurstTimeToDate,convertByteArrayToHexString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToHexString=((e,r=!1)=>{const t=[];for(let r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return r?t.join("").toUpperCase():t.join("")})});unwrapExports(convertByteArrayToHexString);var convertByteArrayToHexString_1=convertByteArrayToHexString.convertByteArrayToHexString,convertByteArrayToString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToString=((e,r=0,t=null)=>{if(0===t)return"";let n=e;if(0!==r){const o=null===t?e.length-r:t;!function(e,r,t=0){if(t<0)throw new Error("Start index should not be negative");if(e.length<t+r)throw new Error("Need at least "+r+" bytes to convert to an integer")}(n,o,r),n=e.slice(r,r+o)}return decodeURIComponent(escape(String.fromCharCode.apply(null,Array.from(n))))})});unwrapExports(convertByteArrayToString);var convertByteArrayToString_1=convertByteArrayToString.convertByteArrayToString,convertDateToBurstTime=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-internal.GenesisBlockTime)});unwrapExports(convertDateToBurstTime);var convertDateToBurstTime_1=convertDateToBurstTime.convertDateToBurstTime,convertHexEndianess=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexEndianess=(e=>{let r="";const t=e;for(let e=t.length-1;e>=0;e-=2)r+=t[e-1]+t[e];return r})});unwrapExports(convertHexEndianess);var convertHexEndianess_1=convertHexEndianess.convertHexEndianess,convertHexStringToByteArray=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToByteArray=(e=>{if(e.length%2)throw new Error(`Invalid Hex String: ${e}`);const r=new Uint8Array(e.length/2);for(let t=0;t<e.length;t+=2){const n=parseInt(e.substr(t,2),16);if(Number.isNaN(n))throw new Error(`Invalid Hex String: ${e}`);r[t/2]=n}return r})});unwrapExports(convertHexStringToByteArray);var convertHexStringToByteArray_1=convertHexStringToByteArray.convertHexStringToByteArray,convertHexStringToDecString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToDecString=(e=>{const r=[0];let t,n,o;for(t=0;t<e.length;t+=1){for(o=parseInt(e.charAt(t),16),n=0;n<r.length;n+=1)r[n]=16*r[n]+o,o=r[n]/10|0,r[n]%=10;for(;o>0;)r.push(o%10),o=o/10|0}return r.reverse().join("")})});unwrapExports(convertHexStringToDecString);var convertHexStringToDecString_1=convertHexStringToDecString.convertHexStringToDecString,convertHexStringToString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToString=(e=>convertByteArrayToString.convertByteArrayToString(convertHexStringToByteArray.convertHexStringToByteArray(e)))});unwrapExports(convertHexStringToString);var convertHexStringToString_1=convertHexStringToString.convertHexStringToString,convertNQTStringToNumber=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.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,r){Object.defineProperty(r,"__esModule",{value:!0}),r.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,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const r=[],t=internal.initialCodeword.slice();let n=0,o=e.length;for(let t=0;t<o;t++)r[t]=e.charCodeAt(t)-"0".charCodeAt(0);let i=0,a=0;do{i=0,a=0;for(let e=0;e<o;e++)(i=10*i+r[e])>=32?(r[a]=i>>5,i&=31,a++):a>0&&(r[a]=0,a++);o=a,t[n]=i,n++}while(o>0);const c=[0,0,0,0];for(let e=internal.base32Length-1;e>=0;e--){const r=t[e]^c[3];c[3]=c[2]^internal.gmult(30,r),c[2]=c[1]^internal.gmult(6,r),c[1]=c[0]^internal.gmult(9,r),c[0]=internal.gmult(17,r)}t[13]=c[0],t[14]=c[1],t[15]=c[2],t[16]=c[3];let u="BURST-";for(let e=0;e<17;e++)u+=internal.alphabet[t[internal.cwmap[e]]],3==(3&e)&&e<13&&(u+="-");return u})});unwrapExports(convertNumericIdToAddress);var convertNumericIdToAddress_1=convertNumericIdToAddress.convertNumericIdToAddress,convertStringToByteArray=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToByteArray=(e=>{const r=unescape(encodeURIComponent(e)),t=new Uint8Array(r.length);for(let e=0;e<r.length;++e)t[e]=r.charCodeAt(e);return t})});unwrapExports(convertStringToByteArray);var convertStringToByteArray_1=convertStringToByteArray.convertStringToByteArray,convertStringToHexString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToHexString=(e=>convertByteArrayToHexString.convertByteArrayToHexString(convertStringToByteArray.convertStringToByteArray(e)))});unwrapExports(convertStringToHexString);var convertStringToHexString_1=convertStringToHexString.convertStringToHexString,createDeeplinkArgs=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.Hexadecimal=1]="Hexadecimal",e[e.Base64=2]="Base64"}(r.EncoderFormat||(r.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.2",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var r={},t=0,n=e.length;t<n;t++)r[e.charAt(t)]=t;return r}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2)return(r=e.charCodeAt(0))<128?e:r<2048?fromCharCode(192|r>>>6)+fromCharCode(128|63&r):fromCharCode(224|r>>>12&15)+fromCharCode(128|r>>>6&63)+fromCharCode(128|63&r);var r=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|r>>>18&7)+fromCharCode(128|r>>>12&63)+fromCharCode(128|r>>>6&63)+fromCharCode(128|63&r)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var r=[0,2,1][e.length%3],t=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(t>>>18),b64chars.charAt(t>>>12&63),r>=2?"=":b64chars.charAt(t>>>6&63),r>=1?"=":b64chars.charAt(63&t)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)?e.toString("base64"):btoa(utob(String(e)))},encode=function(e,r){return r?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(e)},encodeURI=function(e){return encode(e,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(e){switch(e.length){case 4:var r=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(r>>>10))+fromCharCode(56320+(1023&r));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 r=e.length,t=r%4,n=(r>0?b64tab[e.charAt(0)]<<18:0)|(r>1?b64tab[e.charAt(1)]<<12:0)|(r>2?b64tab[e.charAt(2)]<<6:0)|(r>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return o.length-=[0,0,2,1][t],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,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToBase64String=((e,r=!0)=>r?base64.Base64.encodeURI(e):base64.Base64.encode(e))});unwrapExports(convertStringToBase64String);var convertStringToBase64String_1=convertStringToBase64String.convertStringToBase64String,createDeeplink=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeeplink=(e=>{const{encoderFormat:r=createDeeplinkArgs.EncoderFormat.Base64,domain:t,action:n,payload:o}=e;let i=`burst.${t}://v1`;return n&&(i+=`?action=${n}`),o&&(i+=`&payload=${function(e,r){let t=e;switch("string"!=typeof e&&(t=JSON.stringify(e)),r){case createDeeplinkArgs.EncoderFormat.Hexadecimal:return convertStringToHexString.convertStringToHexString(t);case createDeeplinkArgs.EncoderFormat.Base64:return convertStringToBase64String.convertStringToBase64String(t);case createDeeplinkArgs.EncoderFormat.Text:default:return t}}(o,r)}`),i})});unwrapExports(createDeeplink);var createDeeplink_1=createDeeplink.createDeeplink,parseDeeplink=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const t=/^burst.(.+):\/\/(v.+?)\??/i;r.parseDeeplink=(e=>{const r=()=>{throw new Error("Invalid deeplink: "+e)},n=(e,t)=>(e.startsWith(t+"=")||r(),e.split("=")[1]),o=e.match(t);o&&3===o.length||r();const i={domain:o[1],version:o[2],action:void 0,payload:void 0,decodedPayload:void 0};try{const t=e.indexOf("?");if(-1!==t){const o=e.substring(t+1).split("&");o.length>=1&&(o.length>2&&r(),i.action=n(o[0],"action"),2===o.length&&(i.payload=n(o[1],"payload")))}}catch(e){r()}return i})});unwrapExports(parseDeeplink);var parseDeeplink_1=parseDeeplink.parseDeeplink,sumNQTStringToNumber_1=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sumNQTStringToNumber=function(...e){return e.reduce((e,r)=>e+convertNQTStringToNumber.convertNQTStringToNumber(r),0)}});unwrapExports(sumNQTStringToNumber_1);var sumNQTStringToNumber_2=sumNQTStringToNumber_1.sumNQTStringToNumber,typings=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(createDeeplinkArgs)});unwrapExports(typings);var out=createCommonjsModule(function(e,r){function t(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}Object.defineProperty(r,"__esModule",{value:!0}),t(convertAddressToNumericId),t(convertBurstTimeToDate),t(convertBurstTimeToEpochTime),t(convertByteArrayToHexString),t(convertByteArrayToString),t(convertDateToBurstTime),t(convertHexEndianess),t(convertHexStringToByteArray),t(convertHexStringToDecString),t(convertHexStringToString),t(convertNQTStringToNumber),t(convertNumberToNQTString),t(convertNumericIdToAddress),t(convertStringToByteArray),t(convertStringToHexString),t(createDeeplink),t(isBurstAddress),t(parseDeeplink),t(sumNQTStringToNumber_1),t(typings)});unwrapExports(out);var out_1=out.convertNumberToNQTString,out_2=out.convertNQTStringToNumber,out_3=out.convertHexStringToDecString,out_4=out.convertHexStringToString,out_5=out.convertHexEndianess,out_6=out.convertHexStringToByteArray,out_7=out.convertByteArrayToHexString;function getContractDatablock(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=16*r,o=n+t;if(o>e.machineData.length)throw new Error("Insufficient length for variable at position: ".concat(n," (and given length: ").concat(t,")"));if(o%2!=0)throw new Error("Invalid position: ".concat(n," (or given length: ").concat(t,") - must be at least multiple of 2"));return out_5(e.machineData.substr(n,t))}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}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(r){_classCallCheck(this,e),this._contract=r}return _createClass(e,[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return countCodePages(this._contract.machineCode)}},{key:"getVariableAsString",value:function(r){var t=this.getHexDataAt(r,e.VariableLength);return out_4(t.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(r,t){var n=this.getHexDataAt(r,t*e.VariableLength);return out_4(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return out_3(this.getVariable(e))}},{key:"getVariable",value:function(r){return this.getHexDataAt(r,e.VariableLength)}},{key:"getHexDataAt",value:function(r,t){var n=t||this._contract.machineData.length-e.VariableLength*r;return getContractDatablock(this._contract,r,n)}}]),e}();function calculateMinimumCreationFee(e){return out_1(2+countCodePages(e)+1)}ContractDataView.VariableLength=16,String.prototype.padStart||(String.prototype.padStart=function(e,r){return e>>=0,r=String(void 0!==r?r:" "),this.length>=e?String(this):((e-=this.length)>r.length&&(r+=r.repeat(e/r.length)),r.slice(0,e)+String(this))});var bignumber=createCommonjsModule(function(e){!function(r){var t,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 r=0|e;return e>0||e===r?r:r-1}function h(e){for(var r,t,n=1,o=e.length,i=e[0]+"";n<o;){for(r=e[n++]+"",t=s-r.length;t--;r="0"+r);i+=r}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(e,r){var t,n,o=e.c,i=r.c,a=e.s,c=r.s,u=e.e,s=r.e;if(!a||!c)return null;if(t=o&&!o[0],n=i&&!i[0],t||n)return t?n?0:-c:a;if(a!=c)return a;if(t=a<0,n=u==s,!o||!i)return n?0:!o^t?1:-1;if(!n)return u>s^t?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]^t?1:-1;return u==s?0:u>s^t?1:-1}function v(e,r,t,n){if(e<r||e>t||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<r||e>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var r=e.c.length-1;return p(e.e/s)==r&&e.c[r]%2!=0}function T(e,r){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(r<0?"e":"e+")+r}function y(e,r,t){var n,o;if(r<0){for(o=t+".";++r;o+=t);e=o+e}else if(++r>(n=e.length)){for(o=t,r-=n;--r;o+=t);e+=o}else r<n&&(e=e.slice(0,r)+"."+e.slice(r));return e}(t=function e(r){var t,S,w,A,_,x,C,B,N,E=Q.prototype={constructor:Q,toString:null,valueOf:null},O=new Q(1),D=20,j=4,M=-7,H=21,P=-1e7,k=1e7,I=!1,F=1,U=0,R={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function Q(e,r){var t,o,a,u,f,g,d,p,h=this;if(!(h instanceof Q))return new Q(e,r);if(null==r){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>k?h.c=h.e=null:e.e<P?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>k?h.c=h.e=null:(h.e=u,h.c=[e]))}p=String(e)}else{if(!n.test(p=String(e)))return w(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(r,2,L.length,"Base"),10==r)return z(h=new Q(e),D+h.e+1,j);if(p=String(e),g="number"==typeof e){if(0*e!=0)return w(h,p,g,r);if(h.s=1/e<0?(p=p.slice(1),-1):1,Q.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(t=L.slice(0,r),u=f=0,d=p.length;f<d;f++)if(t.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 w(h,String(e),g,r)}g=!1,(u=(p=S(p,r,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&&Q.DEBUG&&d>15&&(e>l||e!==i(e)))throw Error(c+h.s*e);if((u=u-f-1)>k)h.c=h.e=null;else if(u<P)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 V(e,r,t,n){var o,i,a,c,u;if(null==t?t=j:v(t,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==r)u=h(e.c),u=1==n||2==n&&(a<=M||a>=H)?T(u,a):y(u,a,"0");else if(i=(e=z(new Q(e),r,t)).e,c=(u=h(e.c)).length,1==n||2==n&&(r<=i||i<=M)){for(;c<r;u+="0",c++);u=T(u,i)}else if(r-=a,u=y(u,i,"0"),i+1>c){if(--r>0)for(u+=".";r--;u+="0");}else if((r+=i-c)>0)for(i+1==c&&(u+=".");r--;u+="0");return e.s<0&&o?"-"+u:u}function G(e,r){for(var t,n=1,o=new Q(e[0]);n<e.length;n++){if(!(t=new Q(e[n])).s){o=t;break}r.call(o,t)&&(o=t)}return o}function $(e,r,t){for(var n=1,o=r.length;!r[--o];r.pop());for(o=r[0];o>=10;o/=10,n++);return(t=n+t*s-1)>k?e.c=e.e=null:t<P?e.c=[e.e=0]:(e.e=t,e.c=r),e}function z(e,r,t,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=r-a)<0)c+=s,l=r,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||r<0||null!=m[p+1]||(l<0?d:d%v[a-l-1]),n=t<4?(h||n)&&(0==t||t==(e.s<0?3:2)):h>5||5==h&&(4==t||n||6==t&&(c>0?l>0?d/v[a-l]:0:m[p-1])%10&1||t==(e.s<0?8:7)),r<1||!m[0])return m.length=0,n?(r-=e.e+1,m[0]=v[(s-r%s)%s],e.e=-r||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>k?e.c=e.e=null:e.e<P&&(e.c=[e.e=0])}return e}function q(e){var r,t=e.e;return null===t?e.toString():(r=h(e.c),r=t<=M||t>=H?T(r,t):y(r,t,"0"),e.s<0?"-"+r:r)}return Q.clone=e,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.EUCLID=9,Q.config=Q.set=function(e){var r,t;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(v(t=e[r],0,d,r),D=t),e.hasOwnProperty(r="ROUNDING_MODE")&&(v(t=e[r],0,8,r),j=t),e.hasOwnProperty(r="EXPONENTIAL_AT")&&((t=e[r])&&t.pop?(v(t[0],-d,0,r),v(t[1],0,d,r),M=t[0],H=t[1]):(v(t,-d,d,r),M=-(H=t<0?-t:t))),e.hasOwnProperty(r="RANGE"))if((t=e[r])&&t.pop)v(t[0],-d,-1,r),v(t[1],1,d,r),P=t[0],k=t[1];else{if(v(t,-d,d,r),!t)throw Error(a+r+" cannot be zero: "+t);P=-(k=t<0?-t:t)}if(e.hasOwnProperty(r="CRYPTO")){if((t=e[r])!==!!t)throw Error(a+r+" not true or false: "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw I=!t,Error(a+"crypto unavailable");I=t}else I=t}if(e.hasOwnProperty(r="MODULO_MODE")&&(v(t=e[r],0,9,r),F=t),e.hasOwnProperty(r="POW_PRECISION")&&(v(t=e[r],0,d,r),U=t),e.hasOwnProperty(r="FORMAT")){if("object"!=typeof(t=e[r]))throw Error(a+r+" not an object: "+t);R=t}if(e.hasOwnProperty(r="ALPHABET")){if("string"!=typeof(t=e[r])||/^.$|[+-.\s]|(.).*\1/.test(t))throw Error(a+r+" invalid: "+t);L=t}}return{DECIMAL_PLACES:D,ROUNDING_MODE:j,EXPONENTIAL_AT:[M,H],RANGE:[P,k],CRYPTO:I,MODULO_MODE:F,POW_PRECISION:U,FORMAT:R,ALPHABET:L}},Q.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!Q.DEBUG)return!0;var r,t,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((r=(o+1)%s)<1&&(r+=s),String(n[0]).length==r){for(r=0;r<n.length;r++)if((t=n[r])<0||t>=u||t!==i(t))break e;if(0!==t)return!0}}}else if(null===n&&null===o&&(null===c||1===c||-1===c))return!0;throw Error(a+"Invalid BigNumber: "+e)},Q.maximum=Q.max=function(){return G(arguments,E.lt)},Q.minimum=Q.min=function(){return G(arguments,E.gt)},Q.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 r,t,n,c,u,l=0,g=[],p=new Q(O);if(null==e?e=D:v(e,0,d),c=o(e/s),I)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(c*=2));l<c;)(u=131072*r[l]+(r[l+1]>>>11))>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),r[l]=t[0],r[l+1]=t[1]):(g.push(u%1e14),l+=2);l=c/2}else{if(!crypto.randomBytes)throw I=!1,Error(a+"crypto unavailable");for(r=crypto.randomBytes(c*=7);l<c;)(u=281474976710656*(31&r[l])+1099511627776*r[l+1]+4294967296*r[l+2]+16777216*r[l+3]+(r[l+4]<<16)+(r[l+5]<<8)+r[l+6])>=9e15?crypto.randomBytes(7).copy(r,l):(g.push(u%1e14),l+=7);l=c/7}if(!I)for(;l<c;)(u=A())<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}),Q.sum=function(){for(var e=1,r=arguments,t=new Q(r[0]);e<r.length;)t=t.plus(r[e++]);return t},S=function(){function e(e,r,t,n){for(var o,i,a=[0],c=0,u=e.length;c<u;){for(i=a.length;i--;a[i]*=r);for(a[0]+=n.indexOf(e.charAt(c++)),o=0;o<a.length;o++)a[o]>t-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/t|0,a[o]%=t)}return a.reverse()}return function(r,n,o,i,a){var c,u,s,l,f,g,d,p,m=r.indexOf("."),v=D,b=j;for(m>=0&&(l=U,U=0,r=r.replace(".",""),g=(p=new Q(n)).pow(r.length-m),U=l,p.c=e(y(h(g.c),g.e,"0"),10,o,"0123456789"),p.e=p.c.length),s=l=(d=e(r,n,o,a?(c=L,"0123456789"):(c="0123456789",L))).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=t(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])r=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,r="";m<=l;r+=c.charAt(d[m++]));r=y(r,s,c.charAt(0))}return r}}(),t=function(){function e(e,r,t){var n,o,i,a,c=0,u=e.length,s=r%g,l=r/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)/t|0)+(n/g|0)+l*a,e[u]=o%t;return c&&(e=[c].concat(e)),e}function r(e,r,t,n){var o,i;if(t!=n)i=t>n?1:-1;else for(o=i=0;o<t;o++)if(e[o]!=r[o]){i=e[o]>r[o]?1:-1;break}return i}function t(e,r,t,n){for(var o=0;t--;)e[t]-=o,o=e[t]<r[t]?1:0,e[t]=o*n+e[t]-r[t];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,_,x,C,B,N,E=n.s==o.s?1:-1,O=n.c,D=o.c;if(!(O&&O[0]&&D&&D[0]))return new Q(n.s&&o.s&&(O?!D||O[0]!=D[0]:D)?O&&0==O[0]||!D?0*E:E/0:NaN);for(y=(T=new Q(E)).c=[],E=a+(g=n.e-o.e)+1,l||(l=u,g=p(n.e/s)-p(o.e/s),E=E/s|0),d=0;D[d]==(O[d]||0);d++);if(D[d]>(O[d]||0)&&g--,E<0)y.push(1),h=!0;else{for(x=O.length,B=D.length,d=0,E+=2,(m=i(l/(D[0]+1)))>1&&(D=e(D,m,l),O=e(O,m,l),B=D.length,x=O.length),_=B,w=(S=O.slice(0,B)).length;w<B;S[w++]=0);N=D.slice(),N=[0].concat(N),C=D[0],D[1]>=l/2&&C++;do{if(m=0,(f=r(D,S,B,w))<0){if(A=S[0],B!=w&&(A=A*l+(S[1]||0)),(m=i(A/C))>1)for(m>=l&&(m=l-1),b=(v=e(D,m,l)).length,w=S.length;1==r(v,S,b,w);)m--,t(v,B<b?N:D,b,l),b=v.length,f=1;else 0==m&&(f=m=1),b=(v=D.slice()).length;if(b<w&&(v=[0].concat(v)),t(S,v,w,l),w=S.length,-1==f)for(;r(D,S,B,w)<1;)m++,t(S,B<w?N:D,w,l),w=S.length}else 0===f&&(m++,S=[0]);y[d++]=m,S[0]?S[w++]=O[_]||0:(S=[O[_]],w=1)}while((_++<x||null!=S[0])&&E--);h=null!=S[0],y[0]||y.splice(0,1)}if(l==u){for(d=1,E=y[0];E>=10;E/=10,d++);z(T,a+(T.e=d+g*s-1)+1,c,h)}else T.e=g,T.r=+h;return T}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,C=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,r,t,n){var o,i=t?r:r.replace(N,"");if(B.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!t&&(i=i.replace(_,function(e,r,t){return o="x"==(t=t.toLowerCase())?16:"b"==t?2:8,n&&n!=o?e:r}),n&&(o=n,i=i.replace(x,"$1").replace(C,"0.$1")),r!=i))return new Q(i,o);if(Q.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+r);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new Q(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,r){return m(this,new Q(e,r))},E.decimalPlaces=E.dp=function(e,r){var t,n,o,i=this;if(null!=e)return v(e,0,d),null==r?r=j:v(r,0,8),z(new Q(i),e+i.e+1,r);if(!(t=i.c))return null;if(n=((o=t.length-1)-p(this.e/s))*s,o=t[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(e,r){return t(this,new Q(e,r),D,j)},E.dividedToIntegerBy=E.idiv=function(e,r){return t(this,new Q(e,r),0,1)},E.exponentiatedBy=E.pow=function(e,r){var t,n,c,u,l,f,g,d,p=this;if((e=new Q(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+q(e));if(null!=r&&(r=new Q(r)),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 Q(Math.pow(+q(p),l?2-b(e):+q(e))),r?d.mod(r):d;if(f=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new Q(NaN);(n=!f&&p.isInteger()&&r.isInteger())&&(p=p.mod(r))}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 Q(f?1/u:u);U&&(u=o(U/s+2))}for(l?(t=new Q(.5),f&&(e.s=1),g=b(e)):g=(c=Math.abs(+q(e)))%2,d=new Q(O);;){if(g){if(!(d=d.times(p)).c)break;u?d.c.length>u&&(d.c.length=u):n&&(d=d.mod(r))}if(c){if(0===(c=i(c/2)))break;g=c%2}else if(z(e=e.times(t),e.e+1,1),e.e>14)g=b(e);else{if(0==(c=+q(e)))break;g=c%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):n&&(p=p.mod(r))}return n?d:(f&&(d=O.div(d)),r?d.mod(r):u?z(d,U,j,void 0):d)},E.integerValue=function(e){var r=new Q(this);return null==e?e=j:v(e,0,8),z(r,r.e+1,e)},E.isEqualTo=E.eq=function(e,r){return 0===m(this,new Q(e,r))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,r){return m(this,new Q(e,r))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,r){return 1===(r=m(this,new Q(e,r)))||0===r},E.isInteger=function(){return!!this.c&&p(this.e/s)>this.c.length-2},E.isLessThan=E.lt=function(e,r){return m(this,new Q(e,r))<0},E.isLessThanOrEqualTo=E.lte=function(e,r){return-1===(r=m(this,new Q(e,r)))||0===r},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,r){var t,n,o,i,a=this,c=a.s;if(r=(e=new Q(e,r)).s,!c||!r)return new Q(NaN);if(c!=r)return e.s=-r,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=-r,e):new Q(d?a:NaN);if(!g[0]||!d[0])return d[0]?(e.s=-r,e):new Q(g[0]?a:3==j?-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(),r=c;r--;o.push(0));o.reverse()}else for(n=(i=(c=g.length)<(r=d.length))?c:r,c=r=0;r<n;r++)if(g[r]!=d[r]){i=g[r]<d[r];break}if(i&&(o=g,g=d,d=o,e.s=-e.s),(r=(n=d.length)-(t=g.length))>0)for(;r--;g[t++]=0);for(r=u-1;n>c;){if(g[--n]<d[n]){for(t=n;t&&!g[--t];g[t]=r);--g[t],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==j?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,r){var n,o,i=this;return e=new Q(e,r),!i.c||!e.s||e.c&&!e.c[0]?new Q(NaN):!e.c||i.c&&!i.c[0]?new Q(i):(9==F?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,F),(e=i.minus(n.times(e))).c[0]||1!=F||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,r){var t,n,o,i,a,c,l,f,d,h,m,v,b,T,y,S=this,w=S.c,A=(e=new Q(e,r)).c;if(!(w&&A&&w[0]&&A[0]))return!S.s||!e.s||w&&!w[0]&&!A||A&&!A[0]&&!w?e.c=e.e=e.s=null:(e.s*=S.s,w&&A?(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=w.length)<(h=A.length)&&(b=w,w=A,A=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(t=0,m=A[o]%y,v=A[o]/y|0,i=o+(a=l);i>o;)t=((f=m*(f=w[--a]%y)+(c=v*f+(d=w[a]/y|0)*m)%y*y+b[i]+t)/T|0)+(c/y|0)+v*d,b[i--]=f%T;b[i]=t}return t?++n:b.splice(0,1),$(e,b,n)},E.negated=function(){var e=new Q(this);return e.s=-e.s||null,e},E.plus=function(e,r){var t,n=this,o=n.s;if(r=(e=new Q(e,r)).s,!o||!r)return new Q(NaN);if(o!=r)return e.s=-r,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 Q(o/0);if(!c[0]||!l[0])return l[0]?e:new Q(c[0]?n:0*o)}if(i=p(i),a=p(a),c=c.slice(),o=i-a){for(o>0?(a=i,t=l):(o=-o,t=c),t.reverse();o--;t.push(0));t.reverse()}for((o=c.length)-(r=l.length)<0&&(t=l,l=c,c=t,r=o),o=0;r;)o=(c[--r]=c[r]+l[r]+o)/u|0,c[r]=u===c[r]?0:c[r]%u;return o&&(c=[o].concat(c),++a),$(e,c,a)},E.precision=E.sd=function(e,r){var t,n,o,i=this;if(null!=e&&e!==!!e)return v(e,1,d),null==r?r=j:v(r,0,8),z(new Q(i),e,r);if(!(t=i.c))return null;if(n=(o=t.length-1)*s+1,o=t[o]){for(;o%10==0;o/=10,n--);for(o=t[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},E.shiftedBy=function(e){return v(e,-l,l),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,r,n,o,i,a=this,c=a.c,u=a.s,s=a.e,l=D+4,f=new Q("0.5");if(1!==u||!c||!c[0])return new Q(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);if(0==(u=Math.sqrt(+q(a)))||u==1/0?(((r=h(c)).length+s)%2==0&&(r+="0"),u=Math.sqrt(+r),s=p((s+1)/2)-(s<0||s%2),n=new Q(r=u==1/0?"1e"+s:(r=u.toExponential()).slice(0,r.indexOf("e")+1)+s)):n=new Q(u+""),n.c[0])for((u=(s=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(t(a,i,l,1))),h(i.c).slice(0,u)===(r=h(n.c)).slice(0,u)){if(n.e<s&&--u,"9999"!=(r=r.slice(u-3,u+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(z(n,n.e+D+2,1),e=!n.times(n).eq(a));break}if(!o&&(z(i,i.e+D+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return z(n,n.e+D+1,j,e)},E.toExponential=function(e,r){return null!=e&&(v(e,0,d),e++),V(this,e,r,1)},E.toFixed=function(e,r){return null!=e&&(v(e,0,d),e=e+this.e+1),V(this,e,r)},E.toFormat=function(e,r,t){var n,o=this;if(null==t)null!=e&&r&&"object"==typeof r?(t=r,r=null):e&&"object"==typeof e?(t=e,e=r=null):t=R;else if("object"!=typeof t)throw Error(a+"Argument not an object: "+t);if(n=o.toFixed(e,r),o.c){var i,c=n.split("."),u=+t.groupSize,s=+t.secondaryGroupSize,l=t.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+(t.decimalSeparator||"")+((s=+t.fractionGroupSize)?g.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):g):f}return(t.prefix||"")+n+(t.suffix||"")},E.toFraction=function(e){var r,n,o,i,c,u,l,g,d,p,m,v,b=this,T=b.c;if(null!=e&&(!(l=new Q(e)).isInteger()&&(l.c||1!==l.s)||l.lt(O)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+q(l));if(!T)return new Q(b);for(r=new Q(O),d=n=new Q(O),o=g=new Q(O),v=h(T),c=r.e=v.length-b.e-1,r.c[0]=f[(u=c%s)<0?s+u:u],e=!e||l.comparedTo(r)>0?c>0?r:d:l,u=k,k=1/0,l=new Q(v),g.c[0]=0;p=t(l,r,0,1),1!=(i=n.plus(p.times(o))).comparedTo(e);)n=o,o=i,d=g.plus(p.times(i=d)),g=i,r=l.minus(p.times(i=r)),l=i;return i=t(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=t(d,o,c*=2,j).minus(b).abs().comparedTo(t(g,n,c,j).minus(b).abs())<1?[d,o]:[g,n],k=u,m},E.toNumber=function(){return+q(this)},E.toPrecision=function(e,r){return null!=e&&v(e,1,d),V(this,e,r,2)},E.toString=function(e){var r,t=this,n=t.s,o=t.e;return null===o?n?(r="Infinity",n<0&&(r="-"+r)):r="NaN":(null==e?r=o<=M||o>=H?T(h(t.c),o):y(h(t.c),o,"0"):10===e?r=y(h((t=z(new Q(t),D+o+1,j)).c),t.e,"0"):(v(e,2,L.length,"Base"),r=S(y(h(t.c),o,"0"),10,e,n,!0)),n<0&&t.c[0]&&(r="-"+r)),r},E.valueOf=E.toJSON=function(){return q(this)},E._isBigNumber=!0,null!=r&&Q.set(r),Q}()).default=t.BigNumber=t,e.exports?e.exports=t:(r||(r="undefined"!=typeof self&&self?self:window),r.BigNumber=t)}(commonjsGlobal)}),numericToHex=function(e){var r=new bignumber(e);r.lt(0)&&(r=twosComplementBinary(r));var t=r.toString(16);return t.length%2?"0"+t:t},twosComplementBinary=function(e){for(var r=e.multipliedBy(-1).toString(2);r.length%8;)r="0"+r;var t="1"===r[0]&&-1!==r.slice(1).indexOf("1")?"11111111":"";return r=r.split("").map(function(e){return"0"===e?"1":"0"}).join(""),new bignumber(t+r,2).plus(1)},convertArgument=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e},generateMethodCall=function(e){var r=e.methodArgs?[e.methodHash].concat(_toConsumableArray(e.methodArgs)):[e.methodHash];if(r.length>4)throw new Error("At maximum ".concat(3," are supported"));return r.map(convertArgument).map(function(e){return numericToHex(e).padStart(16,"0")}).map(out_5).join("")};return exports.CodePageSize=CodePageSize,exports.ContractDataView=ContractDataView,exports.calculateMinimumCreationFee=calculateMinimumCreationFee,exports.countCodePages=countCodePages,exports.generateMethodCall=generateMethodCall,exports.getContractDatablock=getContractDatablock,exports}({});
//# sourceMappingURL=burstjs.contracts.min.js.map
{
"name": "@burstjs/contracts",
"version": "0.5.0-beta.3",
"version": "0.5.0-beta.4",
"description": "Smart Contracts package for BURST",

@@ -47,3 +47,3 @@ "contributors": [

"dependencies": {
"@burstjs/util": "^0.5.0-beta.3",
"@burstjs/util": "^0.5.0-beta.4",
"bignumber.js": "^9.0.0"

@@ -56,3 +56,3 @@ },

},
"gitHead": "3559a36c870f655b4e5db78761b0c2341695d12d",
"gitHead": "44e637c36498bc4a2937228dbd774c13f17e1488",
"publishConfig": {

@@ -59,0 +59,0 @@ "access": "public"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc