@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
1 lines • 182 kB
JavaScript
"use strict";var za=Object.create;var Ue=Object.defineProperty,Wa=Object.defineProperties,Ha=Object.getOwnPropertyDescriptor,ja=Object.getOwnPropertyDescriptors,Ga=Object.getOwnPropertyNames,Qe=Object.getOwnPropertySymbols,qa=Object.getPrototypeOf,Co=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable;var On=(e,o,n)=>o in e?Ue(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,b=(e,o)=>{for(var n in o||(o={}))Co.call(o,n)&&On(e,n,o[n]);if(Qe)for(var n of Qe(o))Bn.call(o,n)&&On(e,n,o[n]);return e},S=(e,o)=>Wa(e,ja(o));var Te=(e,o)=>{var n={};for(var t in e)Co.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&Qe)for(var t of Qe(e))o.indexOf(t)<0&&Bn.call(e,t)&&(n[t]=e[t]);return n};var y=(e,o)=>()=>(e&&(o=e(e=0)),o);var eo=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports),me=(e,o)=>{for(var n in o)Ue(e,n,{get:o[n],enumerable:!0})},Un=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Ga(o))!Co.call(e,a)&&a!==n&&Ue(e,a,{get:()=>o[a],enumerable:!(t=Ha(o,a))||t.enumerable});return e};var T=(e,o,n)=>(n=e!=null?za(qa(e)):{},Un(o||!e||!e.__esModule?Ue(n,"default",{value:e,enumerable:!0}):n,e)),Ve=e=>Un(Ue({},"__esModule",{value:!0}),e);var Vn=(e,o,n)=>new Promise((t,a)=>{var i=d=>{try{l(n.next(d))}catch(u){a(u)}},s=d=>{try{l(n.throw(d))}catch(u){a(u)}},l=d=>d.done?t(d.value):Promise.resolve(d.value).then(i,s);l((n=n.apply(e,o)).next())});var Wn=eo(oo=>{"use strict";r();oo.byteLength=Xa;oo.toByteArray=Ya;oo.fromByteArray=ei;var W=[],B=[],Ka=typeof Uint8Array!="undefined"?Uint8Array:Array,Fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(se=0,$n=Fo.length;se<$n;++se)W[se]=Fo[se],B[Fo.charCodeAt(se)]=se;var se,$n;B["-".charCodeAt(0)]=62;B["_".charCodeAt(0)]=63;function zn(e){var o=e.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=o);var t=n===o?0:4-n%4;return[n,t]}function Xa(e){var o=zn(e),n=o[0],t=o[1];return(n+t)*3/4-t}function Za(e,o,n){return(o+n)*3/4-n}function Ya(e){var o,n=zn(e),t=n[0],a=n[1],i=new Ka(Za(e,t,a)),s=0,l=a>0?t-4:t,d;for(d=0;d<l;d+=4)o=B[e.charCodeAt(d)]<<18|B[e.charCodeAt(d+1)]<<12|B[e.charCodeAt(d+2)]<<6|B[e.charCodeAt(d+3)],i[s++]=o>>16&255,i[s++]=o>>8&255,i[s++]=o&255;return a===2&&(o=B[e.charCodeAt(d)]<<2|B[e.charCodeAt(d+1)]>>4,i[s++]=o&255),a===1&&(o=B[e.charCodeAt(d)]<<10|B[e.charCodeAt(d+1)]<<4|B[e.charCodeAt(d+2)]>>2,i[s++]=o>>8&255,i[s++]=o&255),i}function Ja(e){return W[e>>18&63]+W[e>>12&63]+W[e>>6&63]+W[e&63]}function Qa(e,o,n){for(var t,a=[],i=o;i<n;i+=3)t=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),a.push(Ja(t));return a.join("")}function ei(e){for(var o,n=e.length,t=n%3,a=[],i=16383,s=0,l=n-t;s<l;s+=i)a.push(Qa(e,s,s+i>l?l:s+i));return t===1?(o=e[n-1],a.push(W[o>>2]+W[o<<4&63]+"==")):t===2&&(o=(e[n-2]<<8)+e[n-1],a.push(W[o>>10]+W[o>>4&63]+W[o<<2&63]+"=")),a.join("")}});var Hn=eo(Po=>{r();Po.read=function(e,o,n,t,a){var i,s,l=a*8-t-1,d=(1<<l)-1,u=d>>1,h=-7,f=n?a-1:0,w=n?-1:1,k=e[o+f];for(f+=w,i=k&(1<<-h)-1,k>>=-h,h+=l;h>0;i=i*256+e[o+f],f+=w,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=t;h>0;s=s*256+e[o+f],f+=w,h-=8);if(i===0)i=1-u;else{if(i===d)return s?NaN:(k?-1:1)*(1/0);s=s+Math.pow(2,t),i=i-u}return(k?-1:1)*s*Math.pow(2,i-t)};Po.write=function(e,o,n,t,a,i){var s,l,d,u=i*8-a-1,h=(1<<u)-1,f=h>>1,w=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=t?0:i-1,R=t?1:-1,C=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(l=isNaN(o)?1:0,s=h):(s=Math.floor(Math.log(o)/Math.LN2),o*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+f>=1?o+=w/d:o+=w*Math.pow(2,1-f),o*d>=2&&(s++,d/=2),s+f>=h?(l=0,s=h):s+f>=1?(l=(o*d-1)*Math.pow(2,a),s=s+f):(l=o*Math.pow(2,f-1)*Math.pow(2,a),s=0));a>=8;e[n+k]=l&255,k+=R,l/=256,a-=8);for(s=s<<a|l,u+=a;u>0;e[n+k]=s&255,k+=R,s/=256,u-=8);e[n+k-R]|=C*128}});var tt=eo(Se=>{"use strict";r();var Ro=Wn(),we=Hn(),jn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Se.Buffer=_;Se.SlowBuffer=ii;Se.INSPECT_MAX_BYTES=50;var no=2147483647;Se.kMaxLength=no;_.TYPED_ARRAY_SUPPORT=oi();!_.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 oi(){try{var e=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(e,o),e.foo()===42}catch(n){return!1}}Object.defineProperty(_.prototype,"parent",{enumerable:!0,get:function(){if(!!_.isBuffer(this))return this.buffer}});Object.defineProperty(_.prototype,"offset",{enumerable:!0,get:function(){if(!!_.isBuffer(this))return this.byteOffset}});function K(e){if(e>no)throw new RangeError('The value "'+e+'" is invalid for option "size"');var o=new Uint8Array(e);return Object.setPrototypeOf(o,_.prototype),o}function _(e,o,n){if(typeof e=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Uo(e)}return Kn(e,o,n)}_.poolSize=8192;function Kn(e,o,n){if(typeof e=="string")return ti(e,o);if(ArrayBuffer.isView(e))return ri(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return Oo(e,o,n);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var t=e.valueOf&&e.valueOf();if(t!=null&&t!==e)return _.from(t,o,n);var a=ai(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return _.from(e[Symbol.toPrimitive]("string"),o,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}_.from=function(e,o,n){return Kn(e,o,n)};Object.setPrototypeOf(_.prototype,Uint8Array.prototype);Object.setPrototypeOf(_,Uint8Array);function Xn(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ni(e,o,n){return Xn(e),e<=0?K(e):o!==void 0?typeof n=="string"?K(e).fill(o,n):K(e).fill(o):K(e)}_.alloc=function(e,o,n){return ni(e,o,n)};function Uo(e){return Xn(e),K(e<0?0:Vo(e)|0)}_.allocUnsafe=function(e){return Uo(e)};_.allocUnsafeSlow=function(e){return Uo(e)};function ti(e,o){if((typeof o!="string"||o==="")&&(o="utf8"),!_.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var n=Zn(e,o)|0,t=K(n),a=t.write(e,o);return a!==n&&(t=t.slice(0,a)),t}function Mo(e){for(var o=e.length<0?0:Vo(e.length)|0,n=K(o),t=0;t<o;t+=1)n[t]=e[t]&255;return n}function ri(e){if(H(e,Uint8Array)){var o=new Uint8Array(e);return Oo(o.buffer,o.byteOffset,o.byteLength)}return Mo(e)}function Oo(e,o,n){if(o<0||e.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<o+(n||0))throw new RangeError('"length" is outside of buffer bounds');var t;return o===void 0&&n===void 0?t=new Uint8Array(e):n===void 0?t=new Uint8Array(e,o):t=new Uint8Array(e,o,n),Object.setPrototypeOf(t,_.prototype),t}function ai(e){if(_.isBuffer(e)){var o=Vo(e.length)|0,n=K(o);return n.length===0||e.copy(n,0,0,o),n}if(e.length!==void 0)return typeof e.length!="number"||$o(e.length)?K(0):Mo(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Mo(e.data)}function Vo(e){if(e>=no)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+no.toString(16)+" bytes");return e|0}function ii(e){return+e!=e&&(e=0),_.alloc(+e)}_.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==_.prototype};_.compare=function(o,n){if(H(o,Uint8Array)&&(o=_.from(o,o.offset,o.byteLength)),H(n,Uint8Array)&&(n=_.from(n,n.offset,n.byteLength)),!_.isBuffer(o)||!_.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===n)return 0;for(var t=o.length,a=n.length,i=0,s=Math.min(t,a);i<s;++i)if(o[i]!==n[i]){t=o[i],a=n[i];break}return t<a?-1:a<t?1:0};_.isEncoding=function(o){switch(String(o).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}};_.concat=function(o,n){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return _.alloc(0);var t;if(n===void 0)for(n=0,t=0;t<o.length;++t)n+=o[t].length;var a=_.allocUnsafe(n),i=0;for(t=0;t<o.length;++t){var s=o[t];if(H(s,Uint8Array))i+s.length>a.length?_.from(s).copy(a,i):Uint8Array.prototype.set.call(a,s,i);else if(_.isBuffer(s))s.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length}return a};function Zn(e,o){if(_.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,t=arguments.length>2&&arguments[2]===!0;if(!t&&n===0)return 0;for(var a=!1;;)switch(o){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Bo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return nt(e).length;default:if(a)return t?-1:Bo(e).length;o=(""+o).toLowerCase(),a=!0}}_.byteLength=Zn;function pi(e,o,n){var t=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,o>>>=0,n<=o))return"";for(e||(e="utf8");;)switch(e){case"hex":return hi(this,o,n);case"utf8":case"utf-8":return Jn(this,o,n);case"ascii":return gi(this,o,n);case"latin1":case"binary":return fi(this,o,n);case"base64":return li(this,o,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xi(this,o,n);default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}}_.prototype._isBuffer=!0;function _e(e,o,n){var t=e[o];e[o]=e[n],e[n]=t}_.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<o;n+=2)_e(this,n,n+1);return this};_.prototype.swap32=function(){var o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<o;n+=4)_e(this,n,n+3),_e(this,n+1,n+2);return this};_.prototype.swap64=function(){var o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<o;n+=8)_e(this,n,n+7),_e(this,n+1,n+6),_e(this,n+2,n+5),_e(this,n+3,n+4);return this};_.prototype.toString=function(){var o=this.length;return o===0?"":arguments.length===0?Jn(this,0,o):pi.apply(this,arguments)};_.prototype.toLocaleString=_.prototype.toString;_.prototype.equals=function(o){if(!_.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:_.compare(this,o)===0};_.prototype.inspect=function(){var o="",n=Se.INSPECT_MAX_BYTES;return o=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(o+=" ... "),"<Buffer "+o+">"};jn&&(_.prototype[jn]=_.prototype.inspect);_.prototype.compare=function(o,n,t,a,i){if(H(o,Uint8Array)&&(o=_.from(o,o.offset,o.byteLength)),!_.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(n===void 0&&(n=0),t===void 0&&(t=o?o.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),n<0||t>o.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&n>=t)return 0;if(a>=i)return-1;if(n>=t)return 1;if(n>>>=0,t>>>=0,a>>>=0,i>>>=0,this===o)return 0;for(var s=i-a,l=t-n,d=Math.min(s,l),u=this.slice(a,i),h=o.slice(n,t),f=0;f<d;++f)if(u[f]!==h[f]){s=u[f],l=h[f];break}return s<l?-1:l<s?1:0};function Yn(e,o,n,t,a){if(e.length===0)return-1;if(typeof n=="string"?(t=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,$o(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0)if(a)n=0;else return-1;if(typeof o=="string"&&(o=_.from(o,t)),_.isBuffer(o))return o.length===0?-1:Gn(e,o,n,t,a);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,o,n):Uint8Array.prototype.lastIndexOf.call(e,o,n):Gn(e,[o],n,t,a);throw new TypeError("val must be string, number or Buffer")}function Gn(e,o,n,t,a){var i=1,s=e.length,l=o.length;if(t!==void 0&&(t=String(t).toLowerCase(),t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le")){if(e.length<2||o.length<2)return-1;i=2,s/=2,l/=2,n/=2}function d(k,R){return i===1?k[R]:k.readUInt16BE(R*i)}var u;if(a){var h=-1;for(u=n;u<s;u++)if(d(e,u)===d(o,h===-1?0:u-h)){if(h===-1&&(h=u),u-h+1===l)return h*i}else h!==-1&&(u-=u-h),h=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,w=0;w<l;w++)if(d(e,u+w)!==d(o,w)){f=!1;break}if(f)return u}return-1}_.prototype.includes=function(o,n,t){return this.indexOf(o,n,t)!==-1};_.prototype.indexOf=function(o,n,t){return Yn(this,o,n,t,!0)};_.prototype.lastIndexOf=function(o,n,t){return Yn(this,o,n,t,!1)};function ci(e,o,n,t){n=Number(n)||0;var a=e.length-n;t?(t=Number(t),t>a&&(t=a)):t=a;var i=o.length;t>i/2&&(t=i/2);for(var s=0;s<t;++s){var l=parseInt(o.substr(s*2,2),16);if($o(l))return s;e[n+s]=l}return s}function mi(e,o,n,t){return to(Bo(o,e.length-n),e,n,t)}function si(e,o,n,t){return to(Ti(o),e,n,t)}function _i(e,o,n,t){return to(nt(o),e,n,t)}function di(e,o,n,t){return to(wi(o,e.length-n),e,n,t)}_.prototype.write=function(o,n,t,a){if(n===void 0)a="utf8",t=this.length,n=0;else if(t===void 0&&typeof n=="string")a=n,t=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(t)?(t=t>>>0,a===void 0&&(a="utf8")):(a=t,t=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-n;if((t===void 0||t>i)&&(t=i),o.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var s=!1;;)switch(a){case"hex":return ci(this,o,n,t);case"utf8":case"utf-8":return mi(this,o,n,t);case"ascii":case"latin1":case"binary":return si(this,o,n,t);case"base64":return _i(this,o,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return di(this,o,n,t);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0}};_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function li(e,o,n){return o===0&&n===e.length?Ro.fromByteArray(e):Ro.fromByteArray(e.slice(o,n))}function Jn(e,o,n){n=Math.min(e.length,n);for(var t=[],a=o;a<n;){var i=e[a],s=null,l=i>239?4:i>223?3:i>191?2:1;if(a+l<=n){var d,u,h,f;switch(l){case 1:i<128&&(s=i);break;case 2:d=e[a+1],(d&192)===128&&(f=(i&31)<<6|d&63,f>127&&(s=f));break;case 3:d=e[a+1],u=e[a+2],(d&192)===128&&(u&192)===128&&(f=(i&15)<<12|(d&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:d=e[a+1],u=e[a+2],h=e[a+3],(d&192)===128&&(u&192)===128&&(h&192)===128&&(f=(i&15)<<18|(d&63)<<12|(u&63)<<6|h&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,l=1):s>65535&&(s-=65536,t.push(s>>>10&1023|55296),s=56320|s&1023),t.push(s),a+=l}return ui(t)}var qn=4096;function ui(e){var o=e.length;if(o<=qn)return String.fromCharCode.apply(String,e);for(var n="",t=0;t<o;)n+=String.fromCharCode.apply(String,e.slice(t,t+=qn));return n}function gi(e,o,n){var t="";n=Math.min(e.length,n);for(var a=o;a<n;++a)t+=String.fromCharCode(e[a]&127);return t}function fi(e,o,n){var t="";n=Math.min(e.length,n);for(var a=o;a<n;++a)t+=String.fromCharCode(e[a]);return t}function hi(e,o,n){var t=e.length;(!o||o<0)&&(o=0),(!n||n<0||n>t)&&(n=t);for(var a="",i=o;i<n;++i)a+=Si[e[i]];return a}function xi(e,o,n){for(var t=e.slice(o,n),a="",i=0;i<t.length-1;i+=2)a+=String.fromCharCode(t[i]+t[i+1]*256);return a}_.prototype.slice=function(o,n){var t=this.length;o=~~o,n=n===void 0?t:~~n,o<0?(o+=t,o<0&&(o=0)):o>t&&(o=t),n<0?(n+=t,n<0&&(n=0)):n>t&&(n=t),n<o&&(n=o);var a=this.subarray(o,n);return Object.setPrototypeOf(a,_.prototype),a};function N(e,o,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+o>n)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUintLE=_.prototype.readUIntLE=function(o,n,t){o=o>>>0,n=n>>>0,t||N(o,n,this.length);for(var a=this[o],i=1,s=0;++s<n&&(i*=256);)a+=this[o+s]*i;return a};_.prototype.readUintBE=_.prototype.readUIntBE=function(o,n,t){o=o>>>0,n=n>>>0,t||N(o,n,this.length);for(var a=this[o+--n],i=1;n>0&&(i*=256);)a+=this[o+--n]*i;return a};_.prototype.readUint8=_.prototype.readUInt8=function(o,n){return o=o>>>0,n||N(o,1,this.length),this[o]};_.prototype.readUint16LE=_.prototype.readUInt16LE=function(o,n){return o=o>>>0,n||N(o,2,this.length),this[o]|this[o+1]<<8};_.prototype.readUint16BE=_.prototype.readUInt16BE=function(o,n){return o=o>>>0,n||N(o,2,this.length),this[o]<<8|this[o+1]};_.prototype.readUint32LE=_.prototype.readUInt32LE=function(o,n){return o=o>>>0,n||N(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216};_.prototype.readUint32BE=_.prototype.readUInt32BE=function(o,n){return o=o>>>0,n||N(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])};_.prototype.readIntLE=function(o,n,t){o=o>>>0,n=n>>>0,t||N(o,n,this.length);for(var a=this[o],i=1,s=0;++s<n&&(i*=256);)a+=this[o+s]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*n)),a};_.prototype.readIntBE=function(o,n,t){o=o>>>0,n=n>>>0,t||N(o,n,this.length);for(var a=n,i=1,s=this[o+--a];a>0&&(i*=256);)s+=this[o+--a]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*n)),s};_.prototype.readInt8=function(o,n){return o=o>>>0,n||N(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]};_.prototype.readInt16LE=function(o,n){o=o>>>0,n||N(o,2,this.length);var t=this[o]|this[o+1]<<8;return t&32768?t|4294901760:t};_.prototype.readInt16BE=function(o,n){o=o>>>0,n||N(o,2,this.length);var t=this[o+1]|this[o]<<8;return t&32768?t|4294901760:t};_.prototype.readInt32LE=function(o,n){return o=o>>>0,n||N(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24};_.prototype.readInt32BE=function(o,n){return o=o>>>0,n||N(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]};_.prototype.readFloatLE=function(o,n){return o=o>>>0,n||N(o,4,this.length),we.read(this,o,!0,23,4)};_.prototype.readFloatBE=function(o,n){return o=o>>>0,n||N(o,4,this.length),we.read(this,o,!1,23,4)};_.prototype.readDoubleLE=function(o,n){return o=o>>>0,n||N(o,8,this.length),we.read(this,o,!0,52,8)};_.prototype.readDoubleBE=function(o,n){return o=o>>>0,n||N(o,8,this.length),we.read(this,o,!1,52,8)};function F(e,o,n,t,a,i){if(!_.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>a||o<i)throw new RangeError('"value" argument is out of bounds');if(n+t>e.length)throw new RangeError("Index out of range")}_.prototype.writeUintLE=_.prototype.writeUIntLE=function(o,n,t,a){if(o=+o,n=n>>>0,t=t>>>0,!a){var i=Math.pow(2,8*t)-1;F(this,o,n,t,i,0)}var s=1,l=0;for(this[n]=o&255;++l<t&&(s*=256);)this[n+l]=o/s&255;return n+t};_.prototype.writeUintBE=_.prototype.writeUIntBE=function(o,n,t,a){if(o=+o,n=n>>>0,t=t>>>0,!a){var i=Math.pow(2,8*t)-1;F(this,o,n,t,i,0)}var s=t-1,l=1;for(this[n+s]=o&255;--s>=0&&(l*=256);)this[n+s]=o/l&255;return n+t};_.prototype.writeUint8=_.prototype.writeUInt8=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,1,255,0),this[n]=o&255,n+1};_.prototype.writeUint16LE=_.prototype.writeUInt16LE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,2,65535,0),this[n]=o&255,this[n+1]=o>>>8,n+2};_.prototype.writeUint16BE=_.prototype.writeUInt16BE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,2,65535,0),this[n]=o>>>8,this[n+1]=o&255,n+2};_.prototype.writeUint32LE=_.prototype.writeUInt32LE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,4,4294967295,0),this[n+3]=o>>>24,this[n+2]=o>>>16,this[n+1]=o>>>8,this[n]=o&255,n+4};_.prototype.writeUint32BE=_.prototype.writeUInt32BE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,4,4294967295,0),this[n]=o>>>24,this[n+1]=o>>>16,this[n+2]=o>>>8,this[n+3]=o&255,n+4};_.prototype.writeIntLE=function(o,n,t,a){if(o=+o,n=n>>>0,!a){var i=Math.pow(2,8*t-1);F(this,o,n,t,i-1,-i)}var s=0,l=1,d=0;for(this[n]=o&255;++s<t&&(l*=256);)o<0&&d===0&&this[n+s-1]!==0&&(d=1),this[n+s]=(o/l>>0)-d&255;return n+t};_.prototype.writeIntBE=function(o,n,t,a){if(o=+o,n=n>>>0,!a){var i=Math.pow(2,8*t-1);F(this,o,n,t,i-1,-i)}var s=t-1,l=1,d=0;for(this[n+s]=o&255;--s>=0&&(l*=256);)o<0&&d===0&&this[n+s+1]!==0&&(d=1),this[n+s]=(o/l>>0)-d&255;return n+t};_.prototype.writeInt8=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,1,127,-128),o<0&&(o=255+o+1),this[n]=o&255,n+1};_.prototype.writeInt16LE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,2,32767,-32768),this[n]=o&255,this[n+1]=o>>>8,n+2};_.prototype.writeInt16BE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,2,32767,-32768),this[n]=o>>>8,this[n+1]=o&255,n+2};_.prototype.writeInt32LE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,4,2147483647,-2147483648),this[n]=o&255,this[n+1]=o>>>8,this[n+2]=o>>>16,this[n+3]=o>>>24,n+4};_.prototype.writeInt32BE=function(o,n,t){return o=+o,n=n>>>0,t||F(this,o,n,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[n]=o>>>24,this[n+1]=o>>>16,this[n+2]=o>>>8,this[n+3]=o&255,n+4};function Qn(e,o,n,t,a,i){if(n+t>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function et(e,o,n,t,a){return o=+o,n=n>>>0,a||Qn(e,o,n,4,34028234663852886e22,-34028234663852886e22),we.write(e,o,n,t,23,4),n+4}_.prototype.writeFloatLE=function(o,n,t){return et(this,o,n,!0,t)};_.prototype.writeFloatBE=function(o,n,t){return et(this,o,n,!1,t)};function ot(e,o,n,t,a){return o=+o,n=n>>>0,a||Qn(e,o,n,8,17976931348623157e292,-17976931348623157e292),we.write(e,o,n,t,52,8),n+8}_.prototype.writeDoubleLE=function(o,n,t){return ot(this,o,n,!0,t)};_.prototype.writeDoubleBE=function(o,n,t){return ot(this,o,n,!1,t)};_.prototype.copy=function(o,n,t,a){if(!_.isBuffer(o))throw new TypeError("argument should be a Buffer");if(t||(t=0),!a&&a!==0&&(a=this.length),n>=o.length&&(n=o.length),n||(n=0),a>0&&a<t&&(a=t),a===t||o.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),o.length-n<a-t&&(a=o.length-n+t);var i=a-t;return this===o&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(n,t,a):Uint8Array.prototype.set.call(o,this.subarray(t,a),n),i};_.prototype.fill=function(o,n,t,a){if(typeof o=="string"){if(typeof n=="string"?(a=n,n=0,t=this.length):typeof t=="string"&&(a=t,t=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!_.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(o.length===1){var i=o.charCodeAt(0);(a==="utf8"&&i<128||a==="latin1")&&(o=i)}}else typeof o=="number"?o=o&255:typeof o=="boolean"&&(o=Number(o));if(n<0||this.length<n||this.length<t)throw new RangeError("Out of range index");if(t<=n)return this;n=n>>>0,t=t===void 0?this.length:t>>>0,o||(o=0);var s;if(typeof o=="number")for(s=n;s<t;++s)this[s]=o;else{var l=_.isBuffer(o)?o:_.from(o,a),d=l.length;if(d===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(s=0;s<t-n;++s)this[s+n]=l[s%d]}return this};var yi=/[^+/0-9A-Za-z-_]/g;function bi(e){if(e=e.split("=")[0],e=e.trim().replace(yi,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Bo(e,o){o=o||1/0;for(var n,t=e.length,a=null,i=[],s=0;s<t;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(o-=3)>-1&&i.push(239,191,189);continue}else if(s+1===t){(o-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(o-=3)>-1&&i.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&(o-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((o-=1)<0)break;i.push(n)}else if(n<2048){if((o-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((o-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((o-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function Ti(e){for(var o=[],n=0;n<e.length;++n)o.push(e.charCodeAt(n)&255);return o}function wi(e,o){for(var n,t,a,i=[],s=0;s<e.length&&!((o-=2)<0);++s)n=e.charCodeAt(s),t=n>>8,a=n%256,i.push(a),i.push(t);return i}function nt(e){return Ro.toByteArray(bi(e))}function to(e,o,n,t){for(var a=0;a<t&&!(a+n>=o.length||a>=e.length);++a)o[a+n]=e[a];return a}function H(e,o){return e instanceof o||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===o.name}function $o(e){return e!==e}var Si=function(){for(var e="0123456789abcdef",o=new Array(256),n=0;n<16;++n)for(var t=n*16,a=0;a<16;++a)o[t+a]=e[n]+e[a];return o}()});var ct=eo((sc,pt)=>{r();var A=pt.exports={},j,G;function zo(){throw new Error("setTimeout has not been defined")}function Wo(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?j=setTimeout:j=zo}catch(e){j=zo}try{typeof clearTimeout=="function"?G=clearTimeout:G=Wo}catch(e){G=Wo}})();function rt(e){if(j===setTimeout)return setTimeout(e,0);if((j===zo||!j)&&setTimeout)return j=setTimeout,setTimeout(e,0);try{return j(e,0)}catch(o){try{return j.call(null,e,0)}catch(n){return j.call(this,e,0)}}}function ki(e){if(G===clearTimeout)return clearTimeout(e);if((G===Wo||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(e);try{return G(e)}catch(o){try{return G.call(null,e)}catch(n){return G.call(this,e)}}}var X=[],ke=!1,de,ro=-1;function vi(){!ke||!de||(ke=!1,de.length?X=de.concat(X):ro=-1,X.length&&at())}function at(){if(!ke){var e=rt(vi);ke=!0;for(var o=X.length;o;){for(de=X,X=[];++ro<o;)de&&de[ro].run();ro=-1,o=X.length}de=null,ke=!1,ki(e)}}A.nextTick=function(e){var o=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)o[n-1]=arguments[n];X.push(new it(e,o)),X.length===1&&!ke&&rt(at)};function it(e,o){this.fun=e,this.array=o}it.prototype.run=function(){this.fun.apply(null,this.array)};A.title="browser";A.browser=!0;A.env={};A.argv=[];A.version="";A.versions={};function Z(){}A.on=Z;A.addListener=Z;A.once=Z;A.off=Z;A.removeListener=Z;A.removeAllListeners=Z;A.emit=Z;A.prependListener=Z;A.prependOnceListener=Z;A.listeners=function(e){return[]};A.binding=function(e){throw new Error("process.binding is not supported")};A.cwd=function(){return"/"};A.chdir=function(e){throw new Error("process.chdir is not supported")};A.umask=function(){return 0}});var p,c,_c,r=y(()=>{p=T(tt()),c=T(ct()),_c=function(e){function o(){var t=this||self;return delete e.prototype.__magic__,t}if(typeof globalThis=="object")return globalThis;if(this)return o();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:o});var n=__magic__;return n}(Object)});var L=y(()=>{"use strict";r()});var st=y(()=>{"use strict";r()});var _t=y(()=>{"use strict";r()});var $=y(()=>{"use strict";r()});var dt=y(()=>{"use strict";r()});var lt=y(()=>{"use strict";r()});var ut=y(()=>{"use strict";r()});var gt=y(()=>{"use strict";r()});var te=y(()=>{"use strict";r();_t();L();$();dt();lt();ut();gt()});var Ho,ft,Dc,ht,Cc,xt,yt,Fc,Pc,bt=y(()=>{"use strict";r();te();Ho={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://maiar.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://devnet-wallet.elrond.com",apiAddress:"https://devnet-api.elrond.com",explorerAddress:"http://devnet-explorer.elrond.com",apiTimeout:"4000"},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://maiar.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://testnet-wallet.elrond.com",apiAddress:"https://testnet-api.elrond.com",explorerAddress:"http://testnet-explorer.elrond.com",apiTimeout:"4000"},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://maiar.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://wallet.elrond.com",apiAddress:"https://api.elrond.com",explorerAddress:"https://explorer.elrond.com",apiTimeout:"4000"}},{chainId:ft,egldLabel:Dc}=Ho["devnet"],{chainId:ht,egldLabel:Cc}=Ho["testnet"],{chainId:xt,egldLabel:yt}=Ho["mainnet"],Fc={["devnet"]:ft,["testnet"]:ht,["mainnet"]:xt},Pc={[ft]:"devnet",[ht]:"testnet",[xt]:"mainnet"}});var jo=y(()=>{"use strict";r()});var Tt=y(()=>{"use strict";r()});var wt,Go=y(()=>{"use strict";r();wt="transaction-status-toast-id"});var qo,Ko,D,ve,St,io,kt,z,I=y(()=>{"use strict";r();st();bt();jo();Tt();Go();qo=5e4,Ko=1e9,D=18,ve=4,St=1,io="logout",kt="login",z="0"});var po,Zo=y(()=>{"use strict";r();po=()=>Date.now()/1e3});var Lt=y(()=>{"use strict";r()});var Dt=y(()=>{"use strict";r()});var Ct=y(()=>{"use strict";r();Zo();Lt();Dt()});var Jo={};me(Jo,{getItem:()=>Ni,localStorageKeys:()=>le,removeItem:()=>Li,setItem:()=>Ei});var le,Yo,Ei,Ni,Li,$e=y(()=>{"use strict";r();Ct();le={loginExpiresAt:"dapp-core-login-expires-at",logoutEvent:"dapp-core-logout-event"},Yo=typeof localStorage!="undefined",Ei=({key:e,data:o,expires:n})=>{!Yo||localStorage.setItem(String(e),JSON.stringify({expires:n,data:o}))},Ni=e=>{if(!Yo)return;let o=localStorage.getItem(String(e));if(!o)return null;let n=JSON.parse(o);return!n||!n.hasOwnProperty("expires")||!n.hasOwnProperty("data")?null:po()>=n.expires?(localStorage.removeItem(String(e)),null):n.data},Li=e=>{!Yo||localStorage.removeItem(String(e))}});var Qo={};me(Qo,{clear:()=>Mt,getItem:()=>Pt,removeItem:()=>Rt,setItem:()=>Ft,storage:()=>Di});var Ft,Pt,Rt,Mt,Di,Ot=y(()=>{"use strict";r();Ft=({key:e,data:o,expires:n})=>{sessionStorage.setItem(String(e),JSON.stringify({expires:n,data:o}))},Pt=e=>{let o=sessionStorage.getItem(String(e));if(!o)return null;let n=JSON.parse(o);return!n||!n.hasOwnProperty("expires")||!n.hasOwnProperty("data")?null:Date.now()>=n.expires?(sessionStorage.removeItem(String(e)),null):n.data},Rt=e=>sessionStorage.removeItem(String(e)),Mt=()=>sessionStorage.clear(),Di={setItem:Ft,getItem:Pt,removeItem:Rt,clear:Mt}});var Ae,co=y(()=>{"use strict";r();$e();Ot();Ae={session:Qo,local:Jo}});function ze(){return new Date().setHours(new Date().getHours()+24)}function We(e){Ae.local.setItem({key:le.loginExpiresAt,data:e,expires:e})}var en=y(()=>{"use strict";r();co();$e()});var on,P,mo,re=y(()=>{"use strict";r();on=require("@reduxjs/toolkit");I();P=(0,on.createAction)(io),mo=(0,on.createAction)(kt,e=>({payload:e}))});var Ut,Bt,Vt,Im,Em,Nm,Lm,Dm,Cm,$t,zt,nn=y(()=>{"use strict";r();Ut=require("@reduxjs/toolkit");en();$();re();Bt={loginMethod:"",walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,walletLogin:null,extensionLogin:null,isLoginSessionInvalid:!1},Vt=(0,Ut.createSlice)({name:"loginInfoSlice",initialState:Bt,reducers:{setLoginMethod:(e,o)=>{e.loginMethod=o.payload},setTokenLogin:(e,o)=>{e.tokenLogin=o.payload},setTokenLoginSignature:(e,o)=>{(e==null?void 0:e.tokenLogin)!=null&&(e.tokenLogin.signature=o.payload)},setWalletLogin:(e,o)=>{e.walletLogin=o.payload},setWalletConnectLogin:(e,o)=>{e.walletConnectLogin=o.payload},setLedgerLogin:(e,o)=>{e.ledgerLogin=o.payload},invalidateLoginSession:e=>{e.isLoginSessionInvalid=!0}},extraReducers:e=>{e.addCase(P,()=>Bt),e.addCase(mo,(o,n)=>{o.loginMethod=n.payload.loginMethod,We(ze())})}}),{setLoginMethod:Im,setWalletConnectLogin:Em,setLedgerLogin:Nm,setTokenLogin:Lm,setTokenLoginSignature:Dm,setWalletLogin:Cm,invalidateLoginSession:$t}=Vt.actions,zt=Vt.reducer});var Wt=y(()=>{"use strict";r()});var Ht=y(()=>{"use strict";r();Wt()});function tn(e){return e[Math.floor(Math.random()*e.length)]}var jt=y(()=>{"use strict";r()});var Gt=y(()=>{"use strict";r();jo()});var qt=y(()=>{"use strict";r();Ht();jt();Gt()});var Kt,Xt,rn,Fi,Zt,Km,Xm,Yt,an=y(()=>{"use strict";r();Kt=require("@reduxjs/toolkit"),Xt=T(require("lodash.omit"));qt();rn={id:"not-configured",chainId:"",name:"NOT CONFIGURED",egldLabel:"",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"",walletConnectBridgeAddress:"",walletConnectV2RelayAddress:"",walletConnectV2ProjectId:"",walletAddress:"",apiAddress:"",explorerAddress:"",apiTimeout:"4000"},Fi={network:rn,chainID:"-1"},Zt=(0,Kt.createSlice)({name:"appConfig",initialState:Fi,reducers:{initializeNetworkConfig:(e,o)=>{let n=tn(o.payload.walletConnectBridgeAddresses),t=tn(o.payload.walletConnectV2RelayAddresses),a=(0,Xt.default)(o.payload,"walletConnectBridgeAddresses","walletConnectV2RelayAddresses");e.network=S(b(b({},e.network),a),{walletConnectBridgeAddress:n,walletConnectV2RelayAddress:t})},setChainID:(e,o)=>{e.chainID=o.payload}}}),{initializeNetworkConfig:Km,setChainID:Xm}=Zt.actions,Yt=Zt.reducer});var cn,Jt,Qt,so,pn,er,or,ts,nr,rs,as,is,ps,cs,ms,ss,tr,mn=y(()=>{"use strict";r();cn=require("@elrondnetwork/erdjs"),Jt=require("@reduxjs/toolkit"),Qt=require("redux-persist");I();co();$e();re();so={balance:"...",address:"",nonce:0,txCount:0,scrCount:0,claimableRewards:z},pn={address:"",websocketEvent:null,accounts:{"":so},ledgerAccount:null,publicKey:"",walletConnectAccount:null,isAccountLoading:!0,accountLoadingError:null},er=(0,Jt.createSlice)({name:"accountInfoSlice",initialState:pn,reducers:{setAddress:(e,o)=>{let n=o.payload;e.address=n,e.publicKey=new cn.Address(n).hex()},setAccount:(e,o)=>{let n=e.address===o.payload.address;e.accounts={[e.address]:n?o.payload:so},e.isAccountLoading=!1,e.accountLoadingError=null},setAccountNonce:(e,o)=>{let{address:n}=e;e.accounts[n].nonce=o.payload},setAccountShard:(e,o)=>{e.shard=o.payload},setLedgerAccount:(e,o)=>{e.ledgerAccount=o.payload},updateLedgerAccount:(e,o)=>{e.ledgerAccount!=null&&(e.ledgerAccount.index=o.payload.index,e.ledgerAccount.address=o.payload.address)},setWalletConnectAccount:(e,o)=>{e.walletConnectAccount=o.payload},setIsAccountLoading:(e,o)=>{e.isAccountLoading=o.payload,e.accountLoadingError=null},setAccountLoadingError:(e,o)=>{e.accountLoadingError=o.payload,e.isAccountLoading=!1},setWebsocketEvent:(e,o)=>{e.websocketEvent={timestamp:Date.now(),message:o.payload}}},extraReducers:e=>{e.addCase(P,()=>(Ae.local.removeItem(le.loginExpiresAt),pn)),e.addCase(mo,(o,n)=>{let{address:t}=n.payload;o.address=t,o.publicKey=new cn.Address(t).hex()}),e.addCase(Qt.REHYDRATE,(o,n)=>{var u;if(!((u=n.payload)!=null&&u.account))return;let{account:t}=n.payload,{address:a,shard:i,accounts:s,publicKey:l}=t;o.address=a,o.shard=i;let d=s&&a in s;o.accounts=d?s:pn.accounts,o.publicKey=l})}}),{setAccount:or,setAddress:ts,setAccountNonce:nr,setAccountShard:rs,setLedgerAccount:as,updateLedgerAccount:is,setWalletConnectAccount:ps,setIsAccountLoading:cs,setAccountLoadingError:ms,setWebsocketEvent:ss}=er.actions,tr=er.reducer});function rr(e){return e!=null&&(zi(e)||Gi(e))}function _o(e){return e!=null&&(Wi(e)||qi(e))}function lo(e){return e!=null&&(Hi(e)||Ki(e))}function ar(e){return e!=null&&ji(e)}function zi(e){return e!=null&&Ri.includes(e)}function Wi(e){return e!=null&&Mi.includes(e)}function Hi(e){return e!=null&&Oi.includes(e)}function ji(e){return e!=null&&Bi.includes(e)}function Gi(e){return e!=null&&Ui.includes(e)}function qi(e){return e!=null&&Vi.includes(e)}function Ki(e){return e!=null&&$i.includes(e)}var Ri,Mi,Oi,Bi,Ui,Vi,$i,_n=y(()=>{"use strict";r();$();Ri=["sent"],Mi=["success"],Oi=["fail","cancelled","timedOut"],Bi=["timedOut"],Ui=["pending"],Vi=["success"],$i=["fail","invalid"]});var ir,pr,He,Xi,cr,ys,bs,Ts,ws,Ss,ks,vs,As,Is,Es,uo,go=y(()=>{"use strict";r();ir=require("@reduxjs/toolkit"),pr=require("redux-persist");$();_n();re();He={signedTransactions:{},transactionsToSign:null,signTransactionsError:null,signTransactionsCancelMessage:null,customTransactionInformationForSessionId:{}},Xi={signWithoutSending:!1,sessionInformation:null,redirectAfterSign:!1},cr=(0,ir.createSlice)({name:"transactionsSlice",initialState:He,reducers:{moveTransactionsToSignedState:(e,o)=>{var d,u;let{sessionId:n,transactions:t,errorMessage:a,status:i,redirectRoute:s}=o.payload,l=((d=e.customTransactionInformationForSessionId)==null?void 0:d[n])||Xi;e.signedTransactions[n]={transactions:t,status:i,errorMessage:a,redirectRoute:s,customTransactionInformation:l},((u=e==null?void 0:e.transactionsToSign)==null?void 0:u.sessionId)===n&&(e.transactionsToSign=He.transactionsToSign)},clearSignedTransaction:(e,o)=>{e.signedTransactions[o.payload]&&delete e.signedTransactions[o.payload]},clearTransactionToSign:e=>{e!=null&&e.transactionsToSign&&(e.transactionsToSign=null)},updateSignedTransaction:(e,o)=>{e.signedTransactions=b(b({},e.signedTransactions),o.payload)},updateSignedTransactions:(e,o)=>{let{sessionId:n,status:t,errorMessage:a,transactions:i}=o.payload;e.signedTransactions[n]!=null&&(e.signedTransactions[n].status=t,a!=null&&(e.signedTransactions[n].errorMessage=a),i!=null&&(e.signedTransactions[n].transactions=i))},updateSignedTransactionStatus:(e,o)=>{var l,d,u,h,f,w;let{sessionId:n,status:t,errorMessage:a,transactionHash:i}=o.payload,s=(d=(l=e.signedTransactions)==null?void 0:l[n])==null?void 0:d.transactions;if(s!=null){e.signedTransactions[n].transactions=s.map(C=>C.hash===i?S(b({},C),{status:t,errorMessage:a}):C);let k=(h=(u=e.signedTransactions[n])==null?void 0:u.transactions)==null?void 0:h.every(C=>_o(C.status)),R=(w=(f=e.signedTransactions[n])==null?void 0:f.transactions)==null?void 0:w.every(C=>lo(C.status));k&&(e.signedTransactions[n].status="success"),R&&(e.signedTransactions[n].status="fail")}},setTransactionsToSign:(e,o)=>{e.transactionsToSign=o.payload;let{sessionId:n,customTransactionInformation:t}=o.payload;e.customTransactionInformationForSessionId[n]=t,e.signTransactionsError=null},clearAllTransactionsToSign:e=>{e.transactionsToSign=He.transactionsToSign,e.signTransactionsError=null},clearAllSignedTransactions:e=>{e.signedTransactions=He.signedTransactions},setSignTransactionsError:(e,o)=>{e.signTransactionsError=o.payload},setSignTransactionsCancelMessage:(e,o)=>{e.signTransactionsCancelMessage=o.payload}},extraReducers:e=>{e.addCase(P,()=>He),e.addCase(pr.REHYDRATE,(o,n)=>{var s;if(o.signTransactionsCancelMessage=null,!((s=n.payload)!=null&&s.transactions))return;let{signedTransactions:t,customTransactionInformationForSessionId:a}=n.payload.transactions,i=Object.entries(t).reduce((l,[d,u])=>{let h=new Date(d),f=new Date;return f.setHours(f.getHours()+5),f-h>0||(l[d]=u),l},{});a!=null&&(o.customTransactionInformationForSessionId=a),t!=null&&(o.signedTransactions=i)})}}),{updateSignedTransactionStatus:ys,updateSignedTransactions:bs,setTransactionsToSign:Ts,clearAllTransactionsToSign:ws,clearAllSignedTransactions:Ss,clearSignedTransaction:ks,clearTransactionToSign:vs,setSignTransactionsError:As,setSignTransactionsCancelMessage:Is,moveTransactionsToSignedState:Es}=cr.actions,uo=cr.reducer});var mr,ln,un,gn,Zi,dn,sr,Cs,Fs,Ps,fo,ho=y(()=>{"use strict";r();mr=require("@reduxjs/toolkit");re();ln="Transaction failed",un="Transaction successful",gn="Processing transaction",Zi="Transaction submitted",dn={},sr=(0,mr.createSlice)({name:"transactionsInfo",initialState:dn,reducers:{setTransactionsDisplayInfo(e,o){let{sessionId:n,transactionsDisplayInfo:t}=o.payload;n!=null&&(e[n]={errorMessage:(t==null?void 0:t.errorMessage)||ln,successMessage:(t==null?void 0:t.successMessage)||un,processingMessage:(t==null?void 0:t.processingMessage)||gn,submittedMessage:(t==null?void 0:t.submittedMessage)||Zi,transactionDuration:t==null?void 0:t.transactionDuration})},clearTransactionsInfoForSessionId(e,o){o.payload!=null&&delete e[o.payload]},clearTransactionsInfo:()=>dn},extraReducers:e=>{e.addCase(P,()=>dn)}}),{clearTransactionsInfo:Cs,setTransactionsDisplayInfo:Fs,clearTransactionsInfoForSessionId:Ps}=sr.actions,fo=sr.reducer});var dr,_r,lr,Bs,Us,Vs,$s,ur,fn=y(()=>{"use strict";r();dr=require("@reduxjs/toolkit");re();_r={},lr=(0,dr.createSlice)({name:"modalsSlice",initialState:_r,reducers:{setTxSubmittedModal:(e,o)=>{e.txSubmittedModal=o.payload},setNotificationModal:(e,o)=>{e.notificationModal=o.payload},clearTxSubmittedModal:e=>{e.txSubmittedModal=void 0},clearNotificationModal:e=>{e.notificationModal=void 0}},extraReducers:e=>{e.addCase(P,()=>_r)}}),{setTxSubmittedModal:Bs,setNotificationModal:Us,clearTxSubmittedModal:Vs,clearNotificationModal:$s}=lr.actions,ur=lr.reducer});var fr,hr,gr,xr,Xs,Zs,Ys,Js,Qs,e_,xo,yo=y(()=>{"use strict";r();fr=require("@reduxjs/toolkit"),hr=require("redux-persist");Go();te();Zo();re();gr={customToasts:[],transactionToasts:[],failTransactionToast:null},xr=(0,fr.createSlice)({name:"toastsSlice",initialState:gr,reducers:{addCustomToast:(e,o)=>{e.customToasts.push(S(b({},o.payload),{type:"custom",toastId:o.payload.toastId||`custom-toast-${e.customToasts.length+1}`}))},removeCustomToast:(e,o)=>{e.customToasts=e.customToasts.filter(n=>n.toastId!==o.payload)},addTransactionToast:(e,o)=>{e.transactionToasts.push({type:"transaction",startTimestamp:po(),toastId:o.payload||`custom-toast-${e.transactionToasts.length+1}`})},removeTransactionToast:(e,o)=>{e.transactionToasts=e.transactionToasts.filter(n=>n.toastId!==o.payload)},addFailTransactionToast:(e,o)=>{e.failTransactionToast=S(b({},o.payload),{toastId:wt})},removeFailTransactionToast:e=>{e.failTransactionToast=null}},extraReducers:e=>{e.addCase(P,()=>gr),e.addCase(hr.REHYDRATE,(o,n)=>{var a,i;let t=(i=(a=n.customToasts)==null?void 0:a.filter(s=>!("component"in s)))!=null?i:[];o.customToasts=t})}}),{addCustomToast:Xs,removeCustomToast:Zs,addTransactionToast:Ys,removeTransactionToast:Js,addFailTransactionToast:Qs,removeFailTransactionToast:e_}=xr.actions,xo=xr.reducer});var Ie=y(()=>{"use strict";r();nn();an();mn();go();ho();fn();yo()});var hn=y(()=>{"use strict";r()});var wr,Tr,Sr,b_,T_,w_,S_,k_,v_,kr,vr=y(()=>{"use strict";r();wr=require("@reduxjs/toolkit");re();Tr={visible:!1,modal:{showHeader:!0,showFooter:!1,headerText:"",footerText:""}},Sr=(0,wr.createSlice)({name:"dappModalsSlice",initialState:Tr,reducers:{setDappModalVisibility:(e,o)=>{e.visible=o.payload},setDappModalHeaderVisibility:(e,o)=>{e.modal.showHeader=o.payload},setDappModalFooterVisibility:(e,o)=>{e.modal.showFooter=o.payload},setDappModalHeaderText:(e,o)=>{e.modal.headerText=o.payload},setDappModalFooterText:(e,o)=>{e.modal.footerText=o.payload},setDappModalConfig:(e,o)=>{e.modal=b({},o.payload)}},extraReducers:e=>{e.addCase(P,()=>Tr)}}),{setDappModalVisibility:b_,setDappModalHeaderVisibility:T_,setDappModalFooterVisibility:w_,setDappModalHeaderText:S_,setDappModalFooterText:k_,setDappModalConfig:v_}=Sr.actions,kr=Sr.reducer});var Ar,ep,op,Ee,To=y(()=>{"use strict";r();Ar=require("@reduxjs/toolkit");hn();mn();vr();nn();fn();an();yo();ho();go();ep={["account"]:tr,["networkConfig"]:Yt,["loginInfo"]:zt,["modals"]:ur,["dappModal"]:kr,["toasts"]:xo,["transactions"]:uo,["transactionsInfo"]:fo},op=(e={})=>(0,Ar.combineReducers)(b(b({},ep),e)),Ee=op});var Nr={};me(Nr,{default:()=>cp});function xn(e,o=[]){return{key:e,version:1,storage:Er.default,blacklist:o}}var ue,Ir,Er,np,tp,rp,ap,ip,pp,cp,Lr=y(()=>{"use strict";r();ue=require("redux-persist"),Ir=T(require("redux-persist/lib/storage")),Er=T(require("redux-persist/lib/storage/session"));To();Ie();yo();ho();go();hn();np={2:e=>S(b({},e),{networkConfig:rn})};tp=xn("dapp-core-transactionsInfo"),rp=xn("dapp-core-transactions",["transactionsToSign"]),ap=xn("dapp-core-toasts"),ip={key:"dapp-core-store",version:2,storage:Ir.default,whitelist:["account","loginInfo","modals","networkConfig"],migrate:(0,ue.createMigrate)(np,{debug:!1})},pp={["toasts"]:(0,ue.persistReducer)(ap,xo),["transactions"]:(0,ue.persistReducer)(rp,uo),["transactionsInfo"]:(0,ue.persistReducer)(tp,fo)},cp=(0,ue.persistReducer)(ip,Ee(pp))});var Dr={};me(Dr,{default:()=>mp});var mp,Cr=y(()=>{"use strict";r();To();mp=Ee()});var Fr={};me(Fr,{default:()=>_p});var U,sp,_p,Pr=y(()=>{"use strict";r();U=require("redux-persist"),sp=[U.FLUSH,U.REHYDRATE,U.PAUSE,U.PERSIST,U.PURGE,U.REGISTER],_p=sp});var Or={};me(Or,{default:()=>Mr});function Mr(e){return(0,Rr.persistStore)(e)}var Rr,Br=y(()=>{"use strict";r();Rr=require("redux-persist")});var rc={};me(rc,{TransactionAction:()=>tc});module.exports=Ve(rc);r();var Oe=T(require("react"));r();L();r();L();var mt=e=>{var o,n;switch(e.name){case"transfer":return["Transfer",{token:(o=e.arguments)==null?void 0:o.transfers},"to",{address:(n=e.arguments)==null?void 0:n.receiver}];default:return[]}};r();var vt=T(require("bignumber.js"));I();L();var At=e=>{var o,n,t,a,i,s,l,d,u,h,f,w;switch(e.name){case"claimLockedAssets":return["Claim locked assets"];case"enterFarm":case"enterFarmProxy":return["Enter farm with",{token:(o=e.arguments)==null?void 0:o.transfers}];case"enterFarmAndLockRewards":case"enterFarmAndLockRewardsProxy":return["Enter farm and lock rewards with",{token:(n=e.arguments)==null?void 0:n.transfers}];case"exitFarm":case"exitFarmProxy":return["Exit farm with",{token:(t=e.arguments)==null?void 0:t.transfers}];case"claimRewards":case"claimRewardsProxy":return["Claim rewards",{token:(a=e.arguments)==null?void 0:a.transfers}];case"compoundRewards":case"compoundRewardsProxy":return["Reinvest rewards",{token:(i=e.arguments)==null?void 0:i.transfers}];case"swapTokensFixedInput":case"swap":return e.description?[e.description]:[];case"swapTokensFixedOutput":return e.description?[e.description]:[];case"addLiquidity":case"addLiquidityProxy":return["Added liquidity for",{token:[(s=e.arguments)==null?void 0:s.transfers[0]]},"and",{token:[(l=e.arguments)==null?void 0:l.transfers[1]]}];case"removeLiquidity":case"removeLiquidityProxy":return["Removed liquidity with ",{token:(d=e.arguments)==null?void 0:d.transfers}];case"mergeLockedAssetTokens":let k=z;if((u=e.arguments)!=null&&u.transfers){let R=e.arguments.transfers.map(({value:C})=>C);k=vt.default.sum.apply(null,R).toString(10)}return[`Merge ${(h=e.arguments)==null?void 0:h.transfers.length}`,{tokenNoLink:[(f=e.arguments)==null?void 0:f.transfers[0]]},"positions into a single",{tokenNoLink:[(w=e.arguments)==null?void 0:w.transfers[0]]},"position of value",{value:k}];case"wrapEgld":case"unwrapEgld":default:return e.description?[e.description]:[]}};r();L();var It=e=>{var o,n,t,a,i,s,l,d,u,h,f,w;switch(e.name){case"delegate":case"stake":return["Delegate",{egldValue:(o=e.arguments)==null?void 0:o.value},"to staking provider",{providerName:(n=e.arguments)==null?void 0:n.providerName,providerAvatar:(t=e.arguments)==null?void 0:t.providerAvatar}];case"unDelegate":return["Undelegate",{egldValue:(a=e.arguments)==null?void 0:a.value},"from staking provider",{providerName:(i=e.arguments)==null?void 0:i.providerName,providerAvatar:(s=e.arguments)==null?void 0:s.providerAvatar}];case"claimRewards":return["Claim rewards from staking provider",{providerName:(l=e.arguments)==null?void 0:l.providerName,providerAvatar:(d=e.arguments)==null?void 0:d.providerAvatar}];case"reDelegateRewards":return["Redelegate rewards from staking provider",{providerName:(u=e.arguments)==null?void 0:u.providerName,providerAvatar:(h=e.arguments)==null?void 0:h.providerAvatar}];case"withdraw":return["Withdraw from staking provider",{providerName:(f=e.arguments)==null?void 0:f.providerName,providerAvatar:(w=e.arguments)==null?void 0:w.providerAvatar}];default:return[]}};var Et=e=>{if(!e.arguments)return e.description?[e.description]:[e.name];switch(e.category){case"esdtNft":return mt(e);case"mex":return At(e);case"stake":return It(e);default:return e.description?[e.description]:[]}};r();var v=T(require("react")),be=T(require("classnames"));r();var Xo=T(require("react")),Ii=e=>Xo.createElement("svg",b({"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"globe",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",className:"svg-inline--fa fa-globe fa-w-16 fa-5x"},e),Xo.createElement("path",{fill:"#6c757d",d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm179.3 160h-67.2c-6.7-36.5-17.5-68.8-31.2-94.7 42.9 19 77.7 52.7 98.4 94.7zM248 56c18.6 0 48.6 41.2 63.2 112H184.8C199.4 97.2 229.4 56 248 56zM48 256c0-13.7 1.4-27.1 4-40h77.7c-1 13.1-1.7 26.3-1.7 40s.7 26.9 1.7 40H52c-2.6-12.9-4-26.3-4-40zm20.7 88h67.2c6.7 36.5 17.5 68.8 31.2 94.7-42.9-19-77.7-52.7-98.4-94.7zm67.2-176H68.7c20.7-42 55.5-75.7 98.4-94.7-13.7 25.9-24.5 58.2-31.2 94.7zM248 456c-18.6 0-48.6-41.2-63.2-112h126.5c-14.7 70.8-44.7 112-63.3 112zm70.1-160H177.9c-1.1-12.8-1.9-26-1.9-40s.8-27.2 1.9-40h140.3c1.1 12.8 1.9 26 1.9 40s-.9 27.2-2 40zm10.8 142.7c13.7-25.9 24.4-58.2 31.2-94.7h67.2c-20.7 42-55.5 75.7-98.4 94.7zM366.3 296c1-13.1 1.7-26.3 1.7-40s-.7-26.9-1.7-40H444c2.6 12.9 4 26.3 4 40s-1.4 27.1-4 40h-77.7z",className:""})),Nt=Ii;r();r();var Cn=T(require("react")),xa=require("@fortawesome/free-solid-svg-icons"),ya=require("@fortawesome/react-fontawesome"),ba=T(require("classnames"));r();r();var Hr=require("react"),Le=require("react-redux");r();var yn=require("@reduxjs/toolkit"),zr=require("react-redux/es/utils/Subscription");Ie();r();var yr=T(require("lodash.throttle"));I();Ie();en();co();$e();var Yi=[io],Ji=(0,yr.default)(()=>{We(ze())},5e3),br=e=>o=>n=>{var d;if(Yi.includes(n.type))return o(n);let t=e.getState(),a=Ae.local.getItem(le.loginExpiresAt);if(