@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
92 lines (72 loc) • 30.5 kB
JavaScript
"use strict";var vr=Object.create;var D=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var Ur=Object.getOwnPropertyNames;var Ir=Object.getPrototypeOf,Cr=Object.prototype.hasOwnProperty;var Lr=(t,r)=>()=>(t&&(r=t(t=0)),r);var N=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Sr=(t,r)=>{for(var e in r)D(t,e,{get:r[e],enumerable:!0})},rr=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Ur(r))!Cr.call(t,o)&&o!==e&&D(t,o,{get:()=>r[o],enumerable:!(n=Tr(r,o))||n.enumerable});return t};var er=(t,r,e)=>(e=t!=null?vr(Ir(t)):{},rr(r||!t||!t.__esModule?D(e,"default",{value:t,enumerable:!0}):e,t)),Rr=t=>rr(D({},"__esModule",{value:!0}),t);var or=N(W=>{"use strict";x();W.byteLength=kr;W.toByteArray=Nr;W.fromByteArray=qr;var b=[],w=[],Mr=typeof Uint8Array!="undefined"?Uint8Array:Array,G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(T=0,tr=G.length;T<tr;++T)b[T]=G[T],w[G.charCodeAt(T)]=T;var T,tr;w["-".charCodeAt(0)]=62;w["_".charCodeAt(0)]=63;function nr(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");e===-1&&(e=r);var n=e===r?0:4-e%4;return[e,n]}function kr(t){var r=nr(t),e=r[0],n=r[1];return(e+n)*3/4-n}function Dr(t,r,e){return(r+e)*3/4-e}function Nr(t){var r,e=nr(t),n=e[0],o=e[1],i=new Mr(Dr(t,n,o)),u=0,a=o>0?n-4:n,c;for(c=0;c<a;c+=4)r=w[t.charCodeAt(c)]<<18|w[t.charCodeAt(c+1)]<<12|w[t.charCodeAt(c+2)]<<6|w[t.charCodeAt(c+3)],i[u++]=r>>16&255,i[u++]=r>>8&255,i[u++]=r&255;return o===2&&(r=w[t.charCodeAt(c)]<<2|w[t.charCodeAt(c+1)]>>4,i[u++]=r&255),o===1&&(r=w[t.charCodeAt(c)]<<10|w[t.charCodeAt(c+1)]<<4|w[t.charCodeAt(c+2)]>>2,i[u++]=r>>8&255,i[u++]=r&255),i}function Wr(t){return b[t>>18&63]+b[t>>12&63]+b[t>>6&63]+b[t&63]}function Yr(t,r,e){for(var n,o=[],i=r;i<e;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(Wr(n));return o.join("")}function qr(t){for(var r,e=t.length,n=e%3,o=[],i=16383,u=0,a=e-n;u<a;u+=i)o.push(Yr(t,u,u+i>a?a:u+i));return n===1?(r=t[e-1],o.push(b[r>>2]+b[r<<4&63]+"==")):n===2&&(r=(t[e-2]<<8)+t[e-1],o.push(b[r>>10]+b[r>>4&63]+b[r<<2&63]+"=")),o.join("")}});var ir=N(z=>{x();z.read=function(t,r,e,n,o){var i,u,a=o*8-n-1,c=(1<<a)-1,f=c>>1,d=-7,h=e?o-1:0,y=e?-1:1,m=t[r+h];for(h+=y,i=m&(1<<-d)-1,m>>=-d,d+=a;d>0;i=i*256+t[r+h],h+=y,d-=8);for(u=i&(1<<-d)-1,i>>=-d,d+=n;d>0;u=u*256+t[r+h],h+=y,d-=8);if(i===0)i=1-f;else{if(i===c)return u?NaN:(m?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-f}return(m?-1:1)*u*Math.pow(2,i-n)};z.write=function(t,r,e,n,o,i){var u,a,c,f=i*8-o-1,d=(1<<f)-1,h=d>>1,y=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,C=n?1:-1,Ar=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=d):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+h>=1?r+=y/c:r+=y*Math.pow(2,1-h),r*c>=2&&(u++,c/=2),u+h>=d?(a=0,u=d):u+h>=1?(a=(r*c-1)*Math.pow(2,o),u=u+h):(a=r*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[e+m]=a&255,m+=C,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[e+m]=u&255,m+=C,u/=256,f-=8);t[e+m-C]|=Ar*128}});var yr=N(S=>{"use strict";x();var J=or(),L=ir(),ur=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;S.Buffer=p;S.SlowBuffer=Qr;S.INSPECT_MAX_BYTES=50;var q=2147483647;S.kMaxLength=q;p.TYPED_ARRAY_SUPPORT=Hr();!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Hr(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),t.foo()===42}catch(e){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(!!p.isBuffer(this))return this.buffer}});Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(!!p.isBuffer(this))return this.byteOffset}});function B(t){if(t>q)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,p.prototype),r}function p(t,r,e){if(typeof t=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return O(t)}return cr(t,r,e)}p.poolSize=8192;function cr(t,r,e){if(typeof t=="string")return Gr(t,r);if(ArrayBuffer.isView(t))return zr(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(E(t,ArrayBuffer)||t&&E(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(E(t,SharedArrayBuffer)||t&&E(t.buffer,SharedArrayBuffer)))return V(t,r,e);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return p.from(n,r,e);var o=Jr(t);if(o)return o;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return p.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}p.from=function(t,r,e){return cr(t,r,e)};Object.setPrototypeOf(p.prototype,Uint8Array.prototype);Object.setPrototypeOf(p,Uint8Array);function hr(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Xr(t,r,e){return hr(t),t<=0?B(t):r!==void 0?typeof e=="string"?B(t).fill(r,e):B(t).fill(r):B(t)}p.alloc=function(t,r,e){return Xr(t,r,e)};function O(t){return hr(t),B(t<0?0:Z(t)|0)}p.allocUnsafe=function(t){return O(t)};p.allocUnsafeSlow=function(t){return O(t)};function Gr(t,r){if((typeof r!="string"||r==="")&&(r="utf8"),!p.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=fr(t,r)|0,n=B(e),o=n.write(t,r);return o!==e&&(n=n.slice(0,o)),n}function Q(t){for(var r=t.length<0?0:Z(t.length)|0,e=B(r),n=0;n<r;n+=1)e[n]=t[n]&255;return e}function zr(t){if(E(t,Uint8Array)){var r=new Uint8Array(t);return V(r.buffer,r.byteOffset,r.byteLength)}return Q(t)}function V(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&e===void 0?n=new Uint8Array(t):e===void 0?n=new Uint8Array(t,r):n=new Uint8Array(t,r,e),Object.setPrototypeOf(n,p.prototype),n}function Jr(t){if(p.isBuffer(t)){var r=Z(t.length)|0,e=B(r);return e.length===0||t.copy(e,0,0,r),e}if(t.length!==void 0)return typeof t.length!="number"||$(t.length)?B(0):Q(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Q(t.data)}function Z(t){if(t>=q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+q.toString(16)+" bytes");return t|0}function Qr(t){return+t!=t&&(t=0),p.alloc(+t)}p.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==p.prototype};p.compare=function(r,e){if(E(r,Uint8Array)&&(r=p.from(r,r.offset,r.byteLength)),E(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(r)||!p.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===e)return 0;for(var n=r.length,o=e.length,i=0,u=Math.min(n,o);i<u;++i)if(r[i]!==e[i]){n=r[i],o=e[i];break}return n<o?-1:o<n?1:0};p.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};p.concat=function(r,e){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return p.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var o=p.allocUnsafe(e),i=0;for(n=0;n<r.length;++n){var u=r[n];if(E(u,Uint8Array))i+u.length>o.length?p.from(u).copy(o,i):Uint8Array.prototype.set.call(o,u,i);else if(p.isBuffer(u))u.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=u.length}return o};function fr(t,r){if(p.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||E(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return wr(t).length;default:if(o)return n?-1:K(t).length;r=(""+r).toLowerCase(),o=!0}}p.byteLength=fr;function Vr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return ne(this,r,e);case"utf8":case"utf-8":return lr(this,r,e);case"ascii":return ee(this,r,e);case"latin1":case"binary":return te(this,r,e);case"base64":return jr(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}p.prototype._isBuffer=!0;function U(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}p.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)U(this,e,e+1);return this};p.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)U(this,e,e+3),U(this,e+1,e+2);return this};p.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)U(this,e,e+7),U(this,e+1,e+6),U(this,e+2,e+5),U(this,e+3,e+4);return this};p.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?lr(this,0,r):Vr.apply(this,arguments)};p.prototype.toLocaleString=p.prototype.toString;p.prototype.equals=function(r){if(!p.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:p.compare(this,r)===0};p.prototype.inspect=function(){var r="",e=S.INSPECT_MAX_BYTES;return r=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(r+=" ... "),"<Buffer "+r+">"};ur&&(p.prototype[ur]=p.prototype.inspect);p.prototype.compare=function(r,e,n,o,i){if(E(r,Uint8Array)&&(r=p.from(r,r.offset,r.byteLength)),!p.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),e<0||n>r.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&e>=n)return 0;if(o>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,i>>>=0,this===r)return 0;for(var u=i-o,a=n-e,c=Math.min(u,a),f=this.slice(o,i),d=r.slice(e,n),h=0;h<c;++h)if(f[h]!==d[h]){u=f[h],a=d[h];break}return u<a?-1:a<u?1:0};function dr(t,r,e,n,o){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,$(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof r=="string"&&(r=p.from(r,n)),p.isBuffer(r))return r.length===0?-1:pr(t,r,e,n,o);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):pr(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function pr(t,r,e,n,o){var i=1,u=t.length,a=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;i=2,u/=2,a/=2,e/=2}function c(m,C){return i===1?m[C]:m.readUInt16BE(C*i)}var f;if(o){var d=-1;for(f=e;f<u;f++)if(c(t,f)===c(r,d===-1?0:f-d)){if(d===-1&&(d=f),f-d+1===a)return d*i}else d!==-1&&(f-=f-d),d=-1}else for(e+a>u&&(e=u-a),f=e;f>=0;f--){for(var h=!0,y=0;y<a;y++)if(c(t,f+y)!==c(r,y)){h=!1;break}if(h)return f}return-1}p.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};p.prototype.indexOf=function(r,e,n){return dr(this,r,e,n,!0)};p.prototype.lastIndexOf=function(r,e,n){return dr(this,r,e,n,!1)};function Kr(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n),n>o&&(n=o)):n=o;var i=r.length;n>i/2&&(n=i/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(u*2,2),16);if($(a))return u;t[e+u]=a}return u}function Or(t,r,e,n){return H(K(r,t.length-e),t,e,n)}function Zr(t,r,e,n){return H(pe(r),t,e,n)}function $r(t,r,e,n){return H(wr(r),t,e,n)}function Pr(t,r,e,n){return H(ae(r,t.length-e),t,e,n)}p.prototype.write=function(r,e,n,o){if(e===void 0)o="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")o=e,n=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-e;if((n===void 0||n>i)&&(n=i),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return Kr(this,r,e,n);case"utf8":case"utf-8":return Or(this,r,e,n);case"ascii":case"latin1":case"binary":return Zr(this,r,e,n);case"base64":return $r(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pr(this,r,e,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jr(t,r,e){return r===0&&e===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(r,e))}function lr(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i=t[o],u=null,a=i>239?4:i>223?3:i>191?2:1;if(o+a<=e){var c,f,d,h;switch(a){case 1:i<128&&(u=i);break;case 2:c=t[o+1],(c&192)===128&&(h=(i&31)<<6|c&63,h>127&&(u=h));break;case 3:c=t[o+1],f=t[o+2],(c&192)===128&&(f&192)===128&&(h=(i&15)<<12|(c&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(u=h));break;case 4:c=t[o+1],f=t[o+2],d=t[o+3],(c&192)===128&&(f&192)===128&&(d&192)===128&&(h=(i&15)<<18|(c&63)<<12|(f&63)<<6|d&63,h>65535&&h<1114112&&(u=h))}}u===null?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=a}return re(n)}var ar=4096;function re(t){var r=t.length;if(r<=ar)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=ar));return e}function ee(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]&127);return n}function te(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function ne(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=ce[t[i]];return o}function oe(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}p.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var o=this.subarray(r,e);return Object.setPrototypeOf(o,p.prototype),o};function s(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(r,e,n){r=r>>>0,e=e>>>0,n||s(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return o};p.prototype.readUintBE=p.prototype.readUIntBE=function(r,e,n){r=r>>>0,e=e>>>0,n||s(r,e,this.length);for(var o=this[r+--e],i=1;e>0&&(i*=256);)o+=this[r+--e]*i;return o};p.prototype.readUint8=p.prototype.readUInt8=function(r,e){return r=r>>>0,e||s(r,1,this.length),this[r]};p.prototype.readUint16LE=p.prototype.readUInt16LE=function(r,e){return r=r>>>0,e||s(r,2,this.length),this[r]|this[r+1]<<8};p.prototype.readUint16BE=p.prototype.readUInt16BE=function(r,e){return r=r>>>0,e||s(r,2,this.length),this[r]<<8|this[r+1]};p.prototype.readUint32LE=p.prototype.readUInt32LE=function(r,e){return r=r>>>0,e||s(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};p.prototype.readUint32BE=p.prototype.readUInt32BE=function(r,e){return r=r>>>0,e||s(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};p.prototype.readIntLE=function(r,e,n){r=r>>>0,e=e>>>0,n||s(r,e,this.length);for(var o=this[r],i=1,u=0;++u<e&&(i*=256);)o+=this[r+u]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o};p.prototype.readIntBE=function(r,e,n){r=r>>>0,e=e>>>0,n||s(r,e,this.length);for(var o=e,i=1,u=this[r+--o];o>0&&(i*=256);)u+=this[r+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*e)),u};p.prototype.readInt8=function(r,e){return r=r>>>0,e||s(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};p.prototype.readInt16LE=function(r,e){r=r>>>0,e||s(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};p.prototype.readInt16BE=function(r,e){r=r>>>0,e||s(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};p.prototype.readInt32LE=function(r,e){return r=r>>>0,e||s(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};p.prototype.readInt32BE=function(r,e){return r=r>>>0,e||s(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};p.prototype.readFloatLE=function(r,e){return r=r>>>0,e||s(r,4,this.length),L.read(this,r,!0,23,4)};p.prototype.readFloatBE=function(r,e){return r=r>>>0,e||s(r,4,this.length),L.read(this,r,!1,23,4)};p.prototype.readDoubleLE=function(r,e){return r=r>>>0,e||s(r,8,this.length),L.read(this,r,!0,52,8)};p.prototype.readDoubleBE=function(r,e){return r=r>>>0,e||s(r,8,this.length),L.read(this,r,!1,52,8)};function _(t,r,e,n,o,i){if(!p.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(r,e,n,o){if(r=+r,e=e>>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;_(this,r,e,n,i,0)}var u=1,a=0;for(this[e]=r&255;++a<n&&(u*=256);)this[e+a]=r/u&255;return e+n};p.prototype.writeUintBE=p.prototype.writeUIntBE=function(r,e,n,o){if(r=+r,e=e>>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;_(this,r,e,n,i,0)}var u=n-1,a=1;for(this[e+u]=r&255;--u>=0&&(a*=256);)this[e+u]=r/a&255;return e+n};p.prototype.writeUint8=p.prototype.writeUInt8=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,1,255,0),this[e]=r&255,e+1};p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,2,65535,0),this[e]=r&255,this[e+1]=r>>>8,e+2};p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=r&255,e+2};p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255,e+4};p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4};p.prototype.writeIntLE=function(r,e,n,o){if(r=+r,e=e>>>0,!o){var i=Math.pow(2,8*n-1);_(this,r,e,n,i-1,-i)}var u=0,a=1,c=0;for(this[e]=r&255;++u<n&&(a*=256);)r<0&&c===0&&this[e+u-1]!==0&&(c=1),this[e+u]=(r/a>>0)-c&255;return e+n};p.prototype.writeIntBE=function(r,e,n,o){if(r=+r,e=e>>>0,!o){var i=Math.pow(2,8*n-1);_(this,r,e,n,i-1,-i)}var u=n-1,a=1,c=0;for(this[e+u]=r&255;--u>=0&&(a*=256);)r<0&&c===0&&this[e+u+1]!==0&&(c=1),this[e+u]=(r/a>>0)-c&255;return e+n};p.prototype.writeInt8=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=r&255,e+1};p.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,2,32767,-32768),this[e]=r&255,this[e+1]=r>>>8,e+2};p.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=r&255,e+2};p.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,4,2147483647,-2147483648),this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4};p.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e>>>0,n||_(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255,e+4};function sr(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function _r(t,r,e,n,o){return r=+r,e=e>>>0,o||sr(t,r,e,4,34028234663852886e22,-34028234663852886e22),L.write(t,r,e,n,23,4),e+4}p.prototype.writeFloatLE=function(r,e,n){return _r(this,r,e,!0,n)};p.prototype.writeFloatBE=function(r,e,n){return _r(this,r,e,!1,n)};function mr(t,r,e,n,o){return r=+r,e=e>>>0,o||sr(t,r,e,8,17976931348623157e292,-17976931348623157e292),L.write(t,r,e,n,52,8),e+8}p.prototype.writeDoubleLE=function(r,e,n){return mr(this,r,e,!0,n)};p.prototype.writeDoubleBE=function(r,e,n){return mr(this,r,e,!1,n)};p.prototype.copy=function(r,e,n,o){if(!p.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),e>=r.length&&(e=r.length),e||(e=0),o>0&&o<n&&(o=n),o===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-e<o-n&&(o=r.length-e+n);var i=o-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,n,o):Uint8Array.prototype.set.call(r,this.subarray(n,o),e),i};p.prototype.fill=function(r,e,n,o){if(typeof r=="string"){if(typeof e=="string"?(o=e,e=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!p.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(r.length===1){var i=r.charCodeAt(0);(o==="utf8"&&i<128||o==="latin1")&&(r=i)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=e;u<n;++u)this[u]=r;else{var a=p.isBuffer(r)?r:p.from(r,o),c=a.length;if(c===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-e;++u)this[u+e]=a[u%c]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ue(t){if(t=t.split("=")[0],t=t.trim().replace(ie,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function K(t,r){r=r||1/0;for(var e,n=t.length,o=null,i=[],u=0;u<n;++u){if(e=t.charCodeAt(u),e>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return i}function pe(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function ae(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}function wr(t){return J.toByteArray(ue(t))}function H(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function E(t,r){return t instanceof r||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===r.name}function $(t){return t!==t}var ce=function(){for(var t="0123456789abcdef",r=new Array(256),e=0;e<16;++e)for(var n=e*16,o=0;o<16;++o)r[n+o]=t[e]+t[o];return r}()});var Fr=N((ye,gr)=>{x();var l=gr.exports={},g,F;function P(){throw new Error("setTimeout has not been defined")}function j(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=P}catch(t){g=P}try{typeof clearTimeout=="function"?F=clearTimeout:F=j}catch(t){F=j}})();function xr(t){if(g===setTimeout)return setTimeout(t,0);if((g===P||!g)&&setTimeout)return g=setTimeout,setTimeout(t,0);try{return g(t,0)}catch(r){try{return g.call(null,t,0)}catch(e){return g.call(this,t,0)}}}function he(t){if(F===clearTimeout)return clearTimeout(t);if((F===j||!F)&&clearTimeout)return F=clearTimeout,clearTimeout(t);try{return F(t)}catch(r){try{return F.call(null,t)}catch(e){return F.call(this,t)}}}var A=[],R=!1,I,X=-1;function fe(){!R||!I||(R=!1,I.length?A=I.concat(A):X=-1,A.length&&br())}function br(){if(!R){var t=xr(fe);R=!0;for(var r=A.length;r;){for(I=A,A=[];++X<r;)I&&I[X].run();X=-1,r=A.length}I=null,R=!1,he(t)}}l.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];A.push(new Er(t,r)),A.length===1&&!R&&xr(br)};function Er(t,r){this.fun=t,this.array=r}Er.prototype.run=function(){this.fun.apply(null,this.array)};l.title="browser";l.browser=!0;l.env={};l.argv=[];l.version="";l.versions={};function v(){}l.on=v;l.addListener=v;l.once=v;l.off=v;l.removeListener=v;l.removeAllListeners=v;l.emit=v;l.prependListener=v;l.prependOnceListener=v;l.listeners=function(t){return[]};l.binding=function(t){throw new Error("process.binding is not supported")};l.cwd=function(){return"/"};l.chdir=function(t){throw new Error("process.chdir is not supported")};l.umask=function(){return 0}});var M,k,xe,x=Lr(()=>{M=er(yr()),k=er(Fr()),xe=function(t){function r(){var n=this||self;return delete t.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();t.defineProperty(t.prototype,"__magic__",{configurable:!0,get:r});var e=__magic__;return e}(Object)});var le={};Sr(le,{css:()=>Br,default:()=>de});module.exports=Rr(le);x();var Br=`.dapp-core-component__border__border {
border: 1px solid #dee2e6;
}
.dapp-core-component__border__border-top {
border-top: 1px solid #dee2e6;
}
.dapp-core-component__border__border-right {
border-right: 1px solid #dee2e6;
}
.dapp-core-component__border__border-bottom {
border-bottom: 1px solid #dee2e6;
}
.dapp-core-component__border__border-left {
border-left: 1px solid #dee2e6;
}
.dapp-core-component__border__border-0 {
border: 0;
}
.dapp-core-component__border__border-top-0 {
border-top: 0;
}
.dapp-core-component__border__border-right-0 {
border-right: 0;
}
.dapp-core-component__border__border-bottom-0 {
border-bottom: 0;
}
.dapp-core-component__border__border-left-0 {
border-left: 0;
}
.dapp-core-component__border__rounded-sm {
border-radius: 0.2rem;
}
.dapp-core-component__border__rounded {
border-radius: 0.25rem;
}
.dapp-core-component__border__rounded-top {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.dapp-core-component__border__rounded-right {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
}
.dapp-core-component__border__rounded-bottom {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
.dapp-core-component__border__rounded-left {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
.dapp-core-component__border__rounded-lg {
border-radius: 0.3rem;
}
.dapp-core-component__border__rounded-circle {
border-radius: 50%;
}
.dapp-core-component__border__rounded-pill {
border-radius: 50rem;
}
.dapp-core-component__border__rounded-0 {
border-radius: 0;
}`;document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(Br));var de={border:"dapp-core-component__border__border","border-top":"dapp-core-component__border__border-top",borderTop:"dapp-core-component__border__border-top","border-right":"dapp-core-component__border__border-right",borderRight:"dapp-core-component__border__border-right","border-bottom":"dapp-core-component__border__border-bottom",borderBottom:"dapp-core-component__border__border-bottom","border-left":"dapp-core-component__border__border-left",borderLeft:"dapp-core-component__border__border-left","border-0":"dapp-core-component__border__border-0",border0:"dapp-core-component__border__border-0","border-top-0":"dapp-core-component__border__border-top-0",borderTop0:"dapp-core-component__border__border-top-0","border-right-0":"dapp-core-component__border__border-right-0",borderRight0:"dapp-core-component__border__border-right-0","border-bottom-0":"dapp-core-component__border__border-bottom-0",borderBottom0:"dapp-core-component__border__border-bottom-0","border-left-0":"dapp-core-component__border__border-left-0",borderLeft0:"dapp-core-component__border__border-left-0","rounded-sm":"dapp-core-component__border__rounded-sm",roundedSm:"dapp-core-component__border__rounded-sm",rounded:"dapp-core-component__border__rounded","rounded-top":"dapp-core-component__border__rounded-top",roundedTop:"dapp-core-component__border__rounded-top","rounded-right":"dapp-core-component__border__rounded-right",roundedRight:"dapp-core-component__border__rounded-right","rounded-bottom":"dapp-core-component__border__rounded-bottom",roundedBottom:"dapp-core-component__border__rounded-bottom","rounded-left":"dapp-core-component__border__rounded-left",roundedLeft:"dapp-core-component__border__rounded-left","rounded-lg":"dapp-core-component__border__rounded-lg",roundedLg:"dapp-core-component__border__rounded-lg","rounded-circle":"dapp-core-component__border__rounded-circle",roundedCircle:"dapp-core-component__border__rounded-circle","rounded-pill":"dapp-core-component__border__rounded-pill",roundedPill:"dapp-core-component__border__rounded-pill","rounded-0":"dapp-core-component__border__rounded-0",rounded0:"dapp-core-component__border__rounded-0"};0&&(module.exports={css});
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
//# sourceMappingURL=border.js.map