diff --git a/dist/vcw.es.js b/dist/vcw.es.js index 33d32d9..0ddbe03 100644 --- a/dist/vcw.es.js +++ b/dist/vcw.es.js @@ -2150,10 +2150,9 @@ const switchOrAddChain = async (chainId, chainConfig) => { await window.ethereum.request({ method: "wallet_addEthereumChain", params: [ - { - chainId: chainIdHex, - chainConfig - } + __spreadValues({ + chainId: chainIdHex + }, chainConfig) ] }); } catch (addError) { diff --git a/dist/vcw.umd.js b/dist/vcw.umd.js index ba7e49c..b4658a2 100644 --- a/dist/vcw.umd.js +++ b/dist/vcw.umd.js @@ -1 +1 @@ -var ne=Object.defineProperty,ie=Object.defineProperties;var se=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Y=(v,h,k)=>h in v?ne(v,h,{enumerable:!0,configurable:!0,writable:!0,value:k}):v[h]=k,Z=(v,h)=>{for(var k in h||(h={}))oe.call(h,k)&&Y(v,k,h[k]);if(Q)for(var k of Q(h))le.call(h,k)&&Y(v,k,h[k]);return v},rr=(v,h)=>ie(v,se(h));(function(v,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],h):(v=typeof globalThis!="undefined"?globalThis:v||self,h(v.vcw={},v.Vue))})(this,function(v,h){"use strict";var k="",C=(r,e)=>{const t=r.__vccOpts||r;for(const[a,n]of e)t[a]=n;return t};const er={},tr=r=>(h.pushScopeId("data-v-3468742b"),r=r(),h.popScopeId(),r),ar={class:"loadingio-spinner-rolling-9f4hja5xffr"},nr=[tr(()=>h.createElementVNode("div",{class:"ldio-gpklibk3god"},[h.createElementVNode("div")],-1))];function ir(r,e){return h.openBlock(),h.createElementBlock("div",ar,nr)}var sr=C(er,[["render",ir],["__scopeId","data-v-3468742b"]]),ue="";const or=["title"],lr={key:0,class:"v-address-box"},hr={key:1};var ur=C(h.defineComponent({props:{address:null,dark:{type:Boolean}},setup(r){return(e,t)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["v-btn v-address-btn",[e.$attrs.onClick?"v-address-btn-clickable":null,r.dark?"v-address-btn-dark":"v-address-btn-light"]]),title:r.address},[r.address?(h.openBlock(),h.createElementBlock("div",lr,[h.renderSlot(e.$slots,"default",{},void 0,!0),h.createElementVNode("b",null,h.toDisplayString(r.address.substring(0,6)+"..."+r.address.substring(r.address.length-4)),1)])):(h.openBlock(),h.createElementBlock("span",hr,"Connected"))],10,or))}}),[["__scopeId","data-v-16b91a1b"]]),M=function(r){r==null&&(r=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,r.constructor==Array?this.init_by_array(r,r.length):this.init_seed(r)};M.prototype.init_seed=function(r){for(this.mt[0]=r>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((r&4294901760)>>>16)*1812433253<<16)+(r&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},M.prototype.init_by_array=function(r,e){var t,a,n;for(this.init_seed(19650218),t=1,a=0,n=this.N>e?this.N:e;n;n--){var s=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(((s&4294901760)>>>16)*1664525<<16)+(s&65535)*1664525)+r[a]+a,this.mt[t]>>>=0,t++,a++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1),a>=e&&(a=0)}for(n=this.N-1;n;n--){var s=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(((s&4294901760)>>>16)*1566083941<<16)+(s&65535)*1566083941)-t,this.mt[t]>>>=0,t++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1)}this.mt[0]=2147483648},M.prototype.random_int=function(){var r,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var t;for(this.mti==this.N+1&&this.init_seed(5489),t=0;t>>1^e[r&1];for(;t>>1^e[r&1];r=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^r>>>1^e[r&1],this.mti=0}return r=this.mt[this.mti++],r^=r>>>11,r^=r<<7&2636928640,r^=r<<15&4022730752,r^=r>>>18,r>>>0},M.prototype.random_int31=function(){return this.random_int()>>>1},M.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},M.prototype.random=function(){return this.random_int()*(1/4294967296)},M.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},M.prototype.random_long=function(){var r=this.random_int()>>>5,e=this.random_int()>>>6;return(r*67108864+e)*(1/9007199254740992)};var cr=M,V={exports:{}},dr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},K={exports:{}},vr=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},fr=vr,gr=Array.prototype.concat,mr=Array.prototype.slice,D=K.exports=function(e){for(var t=[],a=0,n=e.length;a=4&&r[3]!==1&&(e=", "+r[3]),"hwb("+r[0]+", "+r[1]+"%, "+r[2]+"%"+e+")"},b.to.keyword=function(r){return J[r.slice(0,3)]};function x(r,e,t){return Math.min(Math.max(e,r),t)}function $(r){var e=Math.round(r).toString(16).toUpperCase();return e.length<2?"0"+e:e}var P={exports:{}},pr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_=pr,j={};for(var I in _)_.hasOwnProperty(I)&&(j[_[I]]=I);var u=P.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var p in u)if(u.hasOwnProperty(p)){if(!("channels"in u[p]))throw new Error("missing channels property: "+p);if(!("labels"in u[p]))throw new Error("missing channel labels property: "+p);if(u[p].labels.length!==u[p].channels)throw new Error("channel and label counts mismatch: "+p);var br=u[p].channels,yr=u[p].labels;delete u[p].channels,delete u[p].labels,Object.defineProperty(u[p],"channels",{value:br}),Object.defineProperty(u[p],"labels",{value:yr})}u.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),s=Math.max(e,t,a),i=s-n,o,l,c;return s===n?o=0:e===s?o=(t-a)/i:t===s?o=2+(a-e)/i:a===s&&(o=4+(e-t)/i),o=Math.min(o*60,360),o<0&&(o+=360),c=(n+s)/2,s===n?l=0:c<=.5?l=i/(s+n):l=i/(2-s-n),[o,l*100,c*100]},u.rgb.hsv=function(r){var e,t,a,n,s,i=r[0]/255,o=r[1]/255,l=r[2]/255,c=Math.max(i,o,l),g=c-Math.min(i,o,l),w=function(W){return(c-W)/6/g+1/2};return g===0?n=s=0:(s=g/c,e=w(i),t=w(o),a=w(l),i===c?n=a-t:o===c?n=1/3+e-a:l===c&&(n=2/3+t-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]},u.rgb.hwb=function(r){var e=r[0],t=r[1],a=r[2],n=u.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,a));return a=1-1/255*Math.max(e,Math.max(t,a)),[n,s*100,a*100]},u.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n,s,i,o;return o=Math.min(1-e,1-t,1-a),n=(1-e-o)/(1-o)||0,s=(1-t-o)/(1-o)||0,i=(1-a-o)/(1-o)||0,[n*100,s*100,i*100,o*100]};function wr(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}u.rgb.keyword=function(r){var e=j[r];if(e)return e;var t=1/0,a;for(var n in _)if(_.hasOwnProperty(n)){var s=_[n],i=wr(r,s);i.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var n=e*.4124+t*.3576+a*.1805,s=e*.2126+t*.7152+a*.0722,i=e*.0193+t*.1192+a*.9505;return[n*100,s*100,i*100]},u.rgb.lab=function(r){var e=u.rgb.xyz(r),t=e[0],a=e[1],n=e[2],s,i,o;return t/=95.047,a/=100,n/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*a-16,i=500*(t-a),o=200*(a-n),[s,i,o]},u.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100,n,s,i,o,l;if(t===0)return l=a*255,[l,l,l];a<.5?s=a*(1+t):s=a+t-a*t,n=2*a-s,o=[0,0,0];for(var c=0;c<3;c++)i=e+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?l=n+(s-n)*6*i:2*i<1?l=s:3*i<2?l=n+(s-n)*(2/3-i)*6:l=n,o[c]=l*255;return o},u.hsl.hsv=function(r){var e=r[0],t=r[1]/100,a=r[2]/100,n=t,s=Math.max(a,.01),i,o;return a*=2,t*=a<=1?a:2-a,n*=s<=1?s:2-s,o=(a+t)/2,i=a===0?2*n/(s+n):2*t/(a+t),[e,i*100,o*100]},u.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,a=r[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),i=255*a*(1-t),o=255*a*(1-t*s),l=255*a*(1-t*(1-s));switch(a*=255,n){case 0:return[a,l,i];case 1:return[o,a,i];case 2:return[i,a,l];case 3:return[i,o,a];case 4:return[l,i,a];case 5:return[a,i,o]}},u.hsv.hsl=function(r){var e=r[0],t=r[1]/100,a=r[2]/100,n=Math.max(a,.01),s,i,o;return o=(2-t)*a,s=(2-t)*n,i=t*n,i/=s<=1?s:2-s,i=i||0,o/=2,[e,i*100,o*100]},u.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100,n=t+a,s,i,o,l;n>1&&(t/=n,a/=n),s=Math.floor(6*e),i=1-a,o=6*e-s,(s&1)!==0&&(o=1-o),l=t+o*(i-t);var c,g,w;switch(s){default:case 6:case 0:c=i,g=l,w=t;break;case 1:c=l,g=i,w=t;break;case 2:c=t,g=i,w=l;break;case 3:c=t,g=l,w=i;break;case 4:c=l,g=t,w=i;break;case 5:c=i,g=t,w=l;break}return[c*255,g*255,w*255]},u.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,a=r[2]/100,n=r[3]/100,s,i,o;return s=1-Math.min(1,e*(1-n)+n),i=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,a*(1-n)+n),[s*255,i*255,o*255]},u.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,a=r[2]/100,n,s,i;return n=e*3.2406+t*-1.5372+a*-.4986,s=e*-.9689+t*1.8758+a*.0415,i=e*.0557+t*-.204+a*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[n*255,s*255,i*255]},u.xyz.lab=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return e/=95.047,t/=100,a/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,n=116*t-16,s=500*(e-t),i=200*(t-a),[n,s,i]},u.lab.xyz=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;s=(e+16)/116,n=t/500+s,i=s-a/200;var o=Math.pow(s,3),l=Math.pow(n,3),c=Math.pow(i,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,n*=95.047,s*=100,i*=108.883,[n,s,i]},u.lab.lch=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return n=Math.atan2(a,t),s=n*360/2/Math.PI,s<0&&(s+=360),i=Math.sqrt(t*t+a*a),[e,i,s]},u.lch.lab=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return i=a/360*2*Math.PI,n=t*Math.cos(i),s=t*Math.sin(i),[e,n,s]},u.rgb.ansi16=function(r){var e=r[0],t=r[1],a=r[2],n=1 in arguments?arguments[1]:u.rgb.hsv(r)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(a/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return n===2&&(s+=60),s},u.hsv.ansi16=function(r){return u.rgb.ansi16(u.hsv.rgb(r),r[2])},u.rgb.ansi256=function(r){var e=r[0],t=r[1],a=r[2];if(e===t&&t===a)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(a/255*5);return n},u.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,a=(e&1)*t*255,n=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[a,n,s]},u.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,a=Math.floor(r/36)/5*255,n=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[a,n,s]},u.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(o){return o+o}).join(""));var a=parseInt(t,16),n=a>>16&255,s=a>>8&255,i=a&255;return[n,s,i]},u.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.max(Math.max(e,t),a),s=Math.min(Math.min(e,t),a),i=n-s,o,l;return i<1?o=s/(1-i):o=0,i<=0?l=0:n===e?l=(t-a)/i%6:n===t?l=2+(a-e)/i:l=4+(e-t)/i+4,l/=6,l%=1,[l*360,i*100,o*100]},u.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=1,n=0;return t<.5?a=2*e*t:a=2*e*(1-t),a<1&&(n=(t-.5*a)/(1-a)),[r[0],a*100,n*100]},u.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=e*t,n=0;return a<1&&(n=(t-a)/(1-a)),[r[0],a*100,n*100]},u.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100;if(t===0)return[a*255,a*255,a*255];var n=[0,0,0],s=e%1*6,i=s%1,o=1-i,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=i,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=i;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=i,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-t)*a,[(t*n[0]+l)*255,(t*n[1]+l)*255,(t*n[2]+l)*255]},u.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,a=e+t*(1-e),n=0;return a>0&&(n=e/a),[r[0],n*100,a*100]},u.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,a=t*(1-e)+.5*e,n=0;return a>0&&a<.5?n=e/(2*a):a>=.5&&a<1&&(n=e/(2*(1-a))),[r[0],n*100,a*100]},u.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,a=e+t*(1-e);return[r[0],(a-e)*100,(1-a)*100]},u.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=1-t,n=a-e,s=0;return n<1&&(s=(a-n)/(1-n)),[r[0],n*100,s*100]},u.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]},u.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]},u.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]},u.gray.hsl=u.gray.hsv=function(r){return[0,0,r[0]]},u.gray.hwb=function(r){return[0,100,r[0]]},u.gray.cmyk=function(r){return[0,0,0,r[0]]},u.gray.lab=function(r){return[r[0],0,0]},u.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,a=t.toString(16).toUpperCase();return"000000".substring(a.length)+a},u.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]};var z=P.exports;function kr(){for(var r={},e=Object.keys(z),t=e.length,a=0;a1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Er(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var a=r(t);if(typeof a=="object")for(var n=a.length,s=0;s>16&255,r>>8&255,r&255],this.valpha=1;else{this.valpha=1;var i=Object.keys(r);"alpha"in r&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof r.alpha=="number"?r.alpha:0);var o=i.sort().join("");if(!(o in T))throw new Error("Unable to parse color from object: "+JSON.stringify(r));this.model=T[o];var l=y[this.model].labels,c=[];for(t=0;tt?(e+.05)/(t+.05):(t+.05)/(e+.05)},level:function(r){var e=this.contrast(r);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var r=this.rgb().color,e=(r[0]*299+r[1]*587+r[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var r=this.rgb(),e=0;e<3;e++)r.color[e]=255-r.color[e];return r},lighten:function(r){var e=this.hsl();return e.color[2]+=e.color[2]*r,e},darken:function(r){var e=this.hsl();return e.color[2]-=e.color[2]*r,e},saturate:function(r){var e=this.hsl();return e.color[1]+=e.color[1]*r,e},desaturate:function(r){var e=this.hsl();return e.color[1]-=e.color[1]*r,e},whiten:function(r){var e=this.hwb();return e.color[1]+=e.color[1]*r,e},blacken:function(r){var e=this.hwb();return e.color[2]+=e.color[2]*r,e},grayscale:function(){var r=this.rgb().color,e=r[0]*.3+r[1]*.59+r[2]*.11;return m.rgb(e,e,e)},fade:function(r){return this.alpha(this.valpha-this.valpha*r)},opaquer:function(r){return this.alpha(this.valpha+this.valpha*r)},rotate:function(r){var e=this.hsl(),t=e.color[0];return t=(t+r)%360,t=t<0?360+t:t,e.color[0]=t,e},mix:function(r,e){if(!r||!r.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof r);var t=r.rgb(),a=this.rgb(),n=e===void 0?.5:e,s=2*n-1,i=t.alpha()-a.alpha(),o=((s*i===-1?s:(s+i)/(1+s*i))+1)/2,l=1-o;return m.rgb(o*t.red()+l*a.red(),o*t.green()+l*a.green(),o*t.blue()+l*a.blue(),t.alpha()*n+a.alpha()*(1-n))}},Object.keys(y).forEach(function(r){if(H.indexOf(r)===-1){var e=y[r].channels;m.prototype[r]=function(){if(this.model===r)return new m(this);if(arguments.length)return new m(arguments,r);var t=typeof arguments[e]=="number"?e:this.valpha;return new m(qr(y[this.model][r].raw(this.color)).concat(t),r)},m[r]=function(t){return typeof t=="number"&&(t=U(R.call(arguments),e)),new m(t,r)}}});function $r(r,e){return Number(r.toFixed(e))}function zr(r){return function(e){return $r(e,r)}}function d(r,e,t){return r=Array.isArray(r)?r:[r],r.forEach(function(a){(q[a]||(q[a]=[]))[e]=t}),r=r[0],function(a){var n;return arguments.length?(t&&(a=t(a)),n=this[r](),n.color[e]=a,n):(n=this[r]().color[e],t&&(n=t(n)),n)}}function f(r){return function(e){return Math.max(0,Math.min(r,e))}}function qr(r){return Array.isArray(r)?r:[r]}function U(r,e){for(var t=0;t["#01888C","#FC7500","#034F5D","#F73F01","#FC1960","#C7144C","#F3C100","#1598F2","#2465E1","#F19E02"]}},data(){return{generator:null,svgns:"http://www.w3.org/2000/svg"}},watch:{seed:{handler(){this.icon()}},address:{handler(){this.icon()}},diameter:{handler(){this.icon()}}},mounted(){this.icon()},methods:{addressToNumber(r){return parseInt(r.slice(2,10),16)},async icon(){const r=this.address?this.addressToNumber(this.address):this.seed;this.$refs.jazzicon.innerHTML="";const e=await this.generateIdenticon(this.diameter,r);await this.$refs.jazzicon.append(e)},newPaper(r,e){const t=document.createElement("div");return t.style.borderRadius=`${r/2}px`,t.style.overflow="hidden",t.style.padding="0px",t.style.margin="0px",t.style.width=""+r+"px",t.style.height=""+r+"px",t.style.display="inline-block",t.style.background=e,{container:t}},generateIdenticon(r,e){this.generator=new cr(e);const t=this.hueShift(this.colors.slice(),this.generator),n=this.newPaper(r,this.genColor(t)).container,s=document.createElementNS(this.svgns,"svg");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",r),s.setAttributeNS(null,"height",r),n.appendChild(s);for(let i=0;ie.address&&e.address.length>0&&e.address.startsWith("0x"));return(a,n)=>(h.openBlock(),h.createElementBlock("div",Rr,[h.createVNode(h.Transition,{name:"pending-txn-transition"},{default:h.withCtx(()=>[r.txnCount&&h.unref(t)?h.renderSlot(a.$slots,"pending",{key:0},()=>[h.createElementVNode("div",Tr,[h.renderSlot(a.$slots,"spinner",{},()=>[h.createVNode(sr)],!0),h.createElementVNode("span",Ur,h.toDisplayString(r.txnCount)+" pending ",1)])],!0):h.createCommentVNode("",!0)]),_:3}),h.unref(t)?h.renderSlot(a.$slots,"addressButton",{key:1},()=>[h.createVNode(ur,h.mergeProps(a.$attrs,{address:r.address,dark:r.dark,title:r.address}),{default:h.withCtx(()=>[h.renderSlot(a.$slots,"identicon",{},()=>[h.createVNode(X,{address:r.address,diameter:15,style:{"margin-top":"3px"}},null,8,["address"])],!0)]),_:3},16,["address","dark","title"])],!0):h.renderSlot(a.$slots,"connectWalletButton",{key:0},()=>[h.createElementVNode("button",h.mergeProps(a.$attrs,{class:["v-btn v-connect-btn",r.dark?"v-connect-btn-dark":"v-connect-btn-light"]}),[h.renderSlot(a.$slots,"default",{},()=>[Wr],!0)],16)],!0)]))}}));var G=C(Kr,[["__scopeId","data-v-61db7636"]]);const N=typeof window.ethereum!="undefined"&&window.ethereum.isMetaMask;async function Dr(){if(N)try{return await window.ethereum.request({method:"eth_requestAccounts"})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}async function Lr(){if(N)try{return await window.ethereum.request({method:"eth_accounts"})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}async function Jr(){if(N)try{return await window.ethereum.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}const jr=async(r,e,t,a=18,n="ERC20")=>{await window.ethereum.request({method:"wallet_watchAsset",params:{type:n,options:{address:e,symbol:r,decimals:a,image:t}}})},Hr=async(r,e)=>{const t="0x"+parseInt(r.toString(),10).toString(16);try{await window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(a){if(a.code===4902&&e)try{await window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:t,chainConfig:e}]})}catch{throw new Error("Couldn't add network, it's possible that user has rejected the change")}else throw new Error("Couldn't switch networks. Error: "+a)}},Xr=r=>{N&&(h.onMounted(()=>{window.ethereum.on("accountsChanged",r)}),h.onUnmounted(()=>{window.ethereum.removeListener("accountsChanged",r)}))},Gr=r=>{N&&(h.onMounted(()=>{window.ethereum.on("chainChanged",r)}),h.onUnmounted(()=>{window.ethereum.removeListener("chainChanged",r)}))},Qr=()=>({isMetaMask:N,connect:Dr,getAccounts:Lr,switchAccounts:Jr,addTokenToWallet:jr,switchOrAddChain:Hr,onAccountsChanged:Xr,onChainChanged:Gr});var Yr={install:r=>{r.component("ConnectWalletButton",G)}};v.ConnectWalletButton=G,v.Jazzicon=X,v.default=Yr,v.useMetaMaskWallet=Qr,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); +var ne=Object.defineProperty,ie=Object.defineProperties;var se=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Z=(v,h,k)=>h in v?ne(v,h,{enumerable:!0,configurable:!0,writable:!0,value:k}):v[h]=k,V=(v,h)=>{for(var k in h||(h={}))oe.call(h,k)&&Z(v,k,h[k]);if(Y)for(var k of Y(h))le.call(h,k)&&Z(v,k,h[k]);return v},rr=(v,h)=>ie(v,se(h));(function(v,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],h):(v=typeof globalThis!="undefined"?globalThis:v||self,h(v.vcw={},v.Vue))})(this,function(v,h){"use strict";var k="",C=(r,e)=>{const t=r.__vccOpts||r;for(const[a,n]of e)t[a]=n;return t};const er={},tr=r=>(h.pushScopeId("data-v-3468742b"),r=r(),h.popScopeId(),r),ar={class:"loadingio-spinner-rolling-9f4hja5xffr"},nr=[tr(()=>h.createElementVNode("div",{class:"ldio-gpklibk3god"},[h.createElementVNode("div")],-1))];function ir(r,e){return h.openBlock(),h.createElementBlock("div",ar,nr)}var sr=C(er,[["render",ir],["__scopeId","data-v-3468742b"]]),ue="";const or=["title"],lr={key:0,class:"v-address-box"},hr={key:1};var ur=C(h.defineComponent({props:{address:null,dark:{type:Boolean}},setup(r){return(e,t)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["v-btn v-address-btn",[e.$attrs.onClick?"v-address-btn-clickable":null,r.dark?"v-address-btn-dark":"v-address-btn-light"]]),title:r.address},[r.address?(h.openBlock(),h.createElementBlock("div",lr,[h.renderSlot(e.$slots,"default",{},void 0,!0),h.createElementVNode("b",null,h.toDisplayString(r.address.substring(0,6)+"..."+r.address.substring(r.address.length-4)),1)])):(h.openBlock(),h.createElementBlock("span",hr,"Connected"))],10,or))}}),[["__scopeId","data-v-16b91a1b"]]),M=function(r){r==null&&(r=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,r.constructor==Array?this.init_by_array(r,r.length):this.init_seed(r)};M.prototype.init_seed=function(r){for(this.mt[0]=r>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((r&4294901760)>>>16)*1812433253<<16)+(r&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},M.prototype.init_by_array=function(r,e){var t,a,n;for(this.init_seed(19650218),t=1,a=0,n=this.N>e?this.N:e;n;n--){var s=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(((s&4294901760)>>>16)*1664525<<16)+(s&65535)*1664525)+r[a]+a,this.mt[t]>>>=0,t++,a++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1),a>=e&&(a=0)}for(n=this.N-1;n;n--){var s=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(((s&4294901760)>>>16)*1566083941<<16)+(s&65535)*1566083941)-t,this.mt[t]>>>=0,t++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1)}this.mt[0]=2147483648},M.prototype.random_int=function(){var r,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var t;for(this.mti==this.N+1&&this.init_seed(5489),t=0;t>>1^e[r&1];for(;t>>1^e[r&1];r=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^r>>>1^e[r&1],this.mti=0}return r=this.mt[this.mti++],r^=r>>>11,r^=r<<7&2636928640,r^=r<<15&4022730752,r^=r>>>18,r>>>0},M.prototype.random_int31=function(){return this.random_int()>>>1},M.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},M.prototype.random=function(){return this.random_int()*(1/4294967296)},M.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},M.prototype.random_long=function(){var r=this.random_int()>>>5,e=this.random_int()>>>6;return(r*67108864+e)*(1/9007199254740992)};var cr=M,K={exports:{}},dr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},D={exports:{}},vr=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},fr=vr,gr=Array.prototype.concat,mr=Array.prototype.slice,L=D.exports=function(e){for(var t=[],a=0,n=e.length;a=4&&r[3]!==1&&(e=", "+r[3]),"hwb("+r[0]+", "+r[1]+"%, "+r[2]+"%"+e+")"},b.to.keyword=function(r){return j[r.slice(0,3)]};function x(r,e,t){return Math.min(Math.max(e,r),t)}function $(r){var e=Math.round(r).toString(16).toUpperCase();return e.length<2?"0"+e:e}var P={exports:{}},pr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_=pr,H={};for(var I in _)_.hasOwnProperty(I)&&(H[_[I]]=I);var u=P.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var p in u)if(u.hasOwnProperty(p)){if(!("channels"in u[p]))throw new Error("missing channels property: "+p);if(!("labels"in u[p]))throw new Error("missing channel labels property: "+p);if(u[p].labels.length!==u[p].channels)throw new Error("channel and label counts mismatch: "+p);var br=u[p].channels,yr=u[p].labels;delete u[p].channels,delete u[p].labels,Object.defineProperty(u[p],"channels",{value:br}),Object.defineProperty(u[p],"labels",{value:yr})}u.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),s=Math.max(e,t,a),i=s-n,o,l,c;return s===n?o=0:e===s?o=(t-a)/i:t===s?o=2+(a-e)/i:a===s&&(o=4+(e-t)/i),o=Math.min(o*60,360),o<0&&(o+=360),c=(n+s)/2,s===n?l=0:c<=.5?l=i/(s+n):l=i/(2-s-n),[o,l*100,c*100]},u.rgb.hsv=function(r){var e,t,a,n,s,i=r[0]/255,o=r[1]/255,l=r[2]/255,c=Math.max(i,o,l),g=c-Math.min(i,o,l),w=function(W){return(c-W)/6/g+1/2};return g===0?n=s=0:(s=g/c,e=w(i),t=w(o),a=w(l),i===c?n=a-t:o===c?n=1/3+e-a:l===c&&(n=2/3+t-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]},u.rgb.hwb=function(r){var e=r[0],t=r[1],a=r[2],n=u.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,a));return a=1-1/255*Math.max(e,Math.max(t,a)),[n,s*100,a*100]},u.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n,s,i,o;return o=Math.min(1-e,1-t,1-a),n=(1-e-o)/(1-o)||0,s=(1-t-o)/(1-o)||0,i=(1-a-o)/(1-o)||0,[n*100,s*100,i*100,o*100]};function wr(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}u.rgb.keyword=function(r){var e=H[r];if(e)return e;var t=1/0,a;for(var n in _)if(_.hasOwnProperty(n)){var s=_[n],i=wr(r,s);i.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var n=e*.4124+t*.3576+a*.1805,s=e*.2126+t*.7152+a*.0722,i=e*.0193+t*.1192+a*.9505;return[n*100,s*100,i*100]},u.rgb.lab=function(r){var e=u.rgb.xyz(r),t=e[0],a=e[1],n=e[2],s,i,o;return t/=95.047,a/=100,n/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*a-16,i=500*(t-a),o=200*(a-n),[s,i,o]},u.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100,n,s,i,o,l;if(t===0)return l=a*255,[l,l,l];a<.5?s=a*(1+t):s=a+t-a*t,n=2*a-s,o=[0,0,0];for(var c=0;c<3;c++)i=e+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?l=n+(s-n)*6*i:2*i<1?l=s:3*i<2?l=n+(s-n)*(2/3-i)*6:l=n,o[c]=l*255;return o},u.hsl.hsv=function(r){var e=r[0],t=r[1]/100,a=r[2]/100,n=t,s=Math.max(a,.01),i,o;return a*=2,t*=a<=1?a:2-a,n*=s<=1?s:2-s,o=(a+t)/2,i=a===0?2*n/(s+n):2*t/(a+t),[e,i*100,o*100]},u.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,a=r[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),i=255*a*(1-t),o=255*a*(1-t*s),l=255*a*(1-t*(1-s));switch(a*=255,n){case 0:return[a,l,i];case 1:return[o,a,i];case 2:return[i,a,l];case 3:return[i,o,a];case 4:return[l,i,a];case 5:return[a,i,o]}},u.hsv.hsl=function(r){var e=r[0],t=r[1]/100,a=r[2]/100,n=Math.max(a,.01),s,i,o;return o=(2-t)*a,s=(2-t)*n,i=t*n,i/=s<=1?s:2-s,i=i||0,o/=2,[e,i*100,o*100]},u.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100,n=t+a,s,i,o,l;n>1&&(t/=n,a/=n),s=Math.floor(6*e),i=1-a,o=6*e-s,(s&1)!==0&&(o=1-o),l=t+o*(i-t);var c,g,w;switch(s){default:case 6:case 0:c=i,g=l,w=t;break;case 1:c=l,g=i,w=t;break;case 2:c=t,g=i,w=l;break;case 3:c=t,g=l,w=i;break;case 4:c=l,g=t,w=i;break;case 5:c=i,g=t,w=l;break}return[c*255,g*255,w*255]},u.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,a=r[2]/100,n=r[3]/100,s,i,o;return s=1-Math.min(1,e*(1-n)+n),i=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,a*(1-n)+n),[s*255,i*255,o*255]},u.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,a=r[2]/100,n,s,i;return n=e*3.2406+t*-1.5372+a*-.4986,s=e*-.9689+t*1.8758+a*.0415,i=e*.0557+t*-.204+a*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[n*255,s*255,i*255]},u.xyz.lab=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return e/=95.047,t/=100,a/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,n=116*t-16,s=500*(e-t),i=200*(t-a),[n,s,i]},u.lab.xyz=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;s=(e+16)/116,n=t/500+s,i=s-a/200;var o=Math.pow(s,3),l=Math.pow(n,3),c=Math.pow(i,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,n*=95.047,s*=100,i*=108.883,[n,s,i]},u.lab.lch=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return n=Math.atan2(a,t),s=n*360/2/Math.PI,s<0&&(s+=360),i=Math.sqrt(t*t+a*a),[e,i,s]},u.lch.lab=function(r){var e=r[0],t=r[1],a=r[2],n,s,i;return i=a/360*2*Math.PI,n=t*Math.cos(i),s=t*Math.sin(i),[e,n,s]},u.rgb.ansi16=function(r){var e=r[0],t=r[1],a=r[2],n=1 in arguments?arguments[1]:u.rgb.hsv(r)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(a/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return n===2&&(s+=60),s},u.hsv.ansi16=function(r){return u.rgb.ansi16(u.hsv.rgb(r),r[2])},u.rgb.ansi256=function(r){var e=r[0],t=r[1],a=r[2];if(e===t&&t===a)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(a/255*5);return n},u.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,a=(e&1)*t*255,n=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[a,n,s]},u.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,a=Math.floor(r/36)/5*255,n=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[a,n,s]},u.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(o){return o+o}).join(""));var a=parseInt(t,16),n=a>>16&255,s=a>>8&255,i=a&255;return[n,s,i]},u.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.max(Math.max(e,t),a),s=Math.min(Math.min(e,t),a),i=n-s,o,l;return i<1?o=s/(1-i):o=0,i<=0?l=0:n===e?l=(t-a)/i%6:n===t?l=2+(a-e)/i:l=4+(e-t)/i+4,l/=6,l%=1,[l*360,i*100,o*100]},u.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=1,n=0;return t<.5?a=2*e*t:a=2*e*(1-t),a<1&&(n=(t-.5*a)/(1-a)),[r[0],a*100,n*100]},u.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=e*t,n=0;return a<1&&(n=(t-a)/(1-a)),[r[0],a*100,n*100]},u.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,a=r[2]/100;if(t===0)return[a*255,a*255,a*255];var n=[0,0,0],s=e%1*6,i=s%1,o=1-i,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=i,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=i;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=i,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-t)*a,[(t*n[0]+l)*255,(t*n[1]+l)*255,(t*n[2]+l)*255]},u.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,a=e+t*(1-e),n=0;return a>0&&(n=e/a),[r[0],n*100,a*100]},u.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,a=t*(1-e)+.5*e,n=0;return a>0&&a<.5?n=e/(2*a):a>=.5&&a<1&&(n=e/(2*(1-a))),[r[0],n*100,a*100]},u.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,a=e+t*(1-e);return[r[0],(a-e)*100,(1-a)*100]},u.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,a=1-t,n=a-e,s=0;return n<1&&(s=(a-n)/(1-n)),[r[0],n*100,s*100]},u.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]},u.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]},u.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]},u.gray.hsl=u.gray.hsv=function(r){return[0,0,r[0]]},u.gray.hwb=function(r){return[0,100,r[0]]},u.gray.cmyk=function(r){return[0,0,0,r[0]]},u.gray.lab=function(r){return[r[0],0,0]},u.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,a=t.toString(16).toUpperCase();return"000000".substring(a.length)+a},u.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]};var z=P.exports;function kr(){for(var r={},e=Object.keys(z),t=e.length,a=0;a1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Er(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var a=r(t);if(typeof a=="object")for(var n=a.length,s=0;s>16&255,r>>8&255,r&255],this.valpha=1;else{this.valpha=1;var i=Object.keys(r);"alpha"in r&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof r.alpha=="number"?r.alpha:0);var o=i.sort().join("");if(!(o in T))throw new Error("Unable to parse color from object: "+JSON.stringify(r));this.model=T[o];var l=y[this.model].labels,c=[];for(t=0;tt?(e+.05)/(t+.05):(t+.05)/(e+.05)},level:function(r){var e=this.contrast(r);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var r=this.rgb().color,e=(r[0]*299+r[1]*587+r[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var r=this.rgb(),e=0;e<3;e++)r.color[e]=255-r.color[e];return r},lighten:function(r){var e=this.hsl();return e.color[2]+=e.color[2]*r,e},darken:function(r){var e=this.hsl();return e.color[2]-=e.color[2]*r,e},saturate:function(r){var e=this.hsl();return e.color[1]+=e.color[1]*r,e},desaturate:function(r){var e=this.hsl();return e.color[1]-=e.color[1]*r,e},whiten:function(r){var e=this.hwb();return e.color[1]+=e.color[1]*r,e},blacken:function(r){var e=this.hwb();return e.color[2]+=e.color[2]*r,e},grayscale:function(){var r=this.rgb().color,e=r[0]*.3+r[1]*.59+r[2]*.11;return m.rgb(e,e,e)},fade:function(r){return this.alpha(this.valpha-this.valpha*r)},opaquer:function(r){return this.alpha(this.valpha+this.valpha*r)},rotate:function(r){var e=this.hsl(),t=e.color[0];return t=(t+r)%360,t=t<0?360+t:t,e.color[0]=t,e},mix:function(r,e){if(!r||!r.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof r);var t=r.rgb(),a=this.rgb(),n=e===void 0?.5:e,s=2*n-1,i=t.alpha()-a.alpha(),o=((s*i===-1?s:(s+i)/(1+s*i))+1)/2,l=1-o;return m.rgb(o*t.red()+l*a.red(),o*t.green()+l*a.green(),o*t.blue()+l*a.blue(),t.alpha()*n+a.alpha()*(1-n))}},Object.keys(y).forEach(function(r){if(X.indexOf(r)===-1){var e=y[r].channels;m.prototype[r]=function(){if(this.model===r)return new m(this);if(arguments.length)return new m(arguments,r);var t=typeof arguments[e]=="number"?e:this.valpha;return new m(qr(y[this.model][r].raw(this.color)).concat(t),r)},m[r]=function(t){return typeof t=="number"&&(t=U(R.call(arguments),e)),new m(t,r)}}});function $r(r,e){return Number(r.toFixed(e))}function zr(r){return function(e){return $r(e,r)}}function d(r,e,t){return r=Array.isArray(r)?r:[r],r.forEach(function(a){(q[a]||(q[a]=[]))[e]=t}),r=r[0],function(a){var n;return arguments.length?(t&&(a=t(a)),n=this[r](),n.color[e]=a,n):(n=this[r]().color[e],t&&(n=t(n)),n)}}function f(r){return function(e){return Math.max(0,Math.min(r,e))}}function qr(r){return Array.isArray(r)?r:[r]}function U(r,e){for(var t=0;t["#01888C","#FC7500","#034F5D","#F73F01","#FC1960","#C7144C","#F3C100","#1598F2","#2465E1","#F19E02"]}},data(){return{generator:null,svgns:"http://www.w3.org/2000/svg"}},watch:{seed:{handler(){this.icon()}},address:{handler(){this.icon()}},diameter:{handler(){this.icon()}}},mounted(){this.icon()},methods:{addressToNumber(r){return parseInt(r.slice(2,10),16)},async icon(){const r=this.address?this.addressToNumber(this.address):this.seed;this.$refs.jazzicon.innerHTML="";const e=await this.generateIdenticon(this.diameter,r);await this.$refs.jazzicon.append(e)},newPaper(r,e){const t=document.createElement("div");return t.style.borderRadius=`${r/2}px`,t.style.overflow="hidden",t.style.padding="0px",t.style.margin="0px",t.style.width=""+r+"px",t.style.height=""+r+"px",t.style.display="inline-block",t.style.background=e,{container:t}},generateIdenticon(r,e){this.generator=new cr(e);const t=this.hueShift(this.colors.slice(),this.generator),n=this.newPaper(r,this.genColor(t)).container,s=document.createElementNS(this.svgns,"svg");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",r),s.setAttributeNS(null,"height",r),n.appendChild(s);for(let i=0;ie.address&&e.address.length>0&&e.address.startsWith("0x"));return(a,n)=>(h.openBlock(),h.createElementBlock("div",Rr,[h.createVNode(h.Transition,{name:"pending-txn-transition"},{default:h.withCtx(()=>[r.txnCount&&h.unref(t)?h.renderSlot(a.$slots,"pending",{key:0},()=>[h.createElementVNode("div",Tr,[h.renderSlot(a.$slots,"spinner",{},()=>[h.createVNode(sr)],!0),h.createElementVNode("span",Ur,h.toDisplayString(r.txnCount)+" pending ",1)])],!0):h.createCommentVNode("",!0)]),_:3}),h.unref(t)?h.renderSlot(a.$slots,"addressButton",{key:1},()=>[h.createVNode(ur,h.mergeProps(a.$attrs,{address:r.address,dark:r.dark,title:r.address}),{default:h.withCtx(()=>[h.renderSlot(a.$slots,"identicon",{},()=>[h.createVNode(G,{address:r.address,diameter:15,style:{"margin-top":"3px"}},null,8,["address"])],!0)]),_:3},16,["address","dark","title"])],!0):h.renderSlot(a.$slots,"connectWalletButton",{key:0},()=>[h.createElementVNode("button",h.mergeProps(a.$attrs,{class:["v-btn v-connect-btn",r.dark?"v-connect-btn-dark":"v-connect-btn-light"]}),[h.renderSlot(a.$slots,"default",{},()=>[Wr],!0)],16)],!0)]))}}));var Q=C(Kr,[["__scopeId","data-v-61db7636"]]);const N=typeof window.ethereum!="undefined"&&window.ethereum.isMetaMask;async function Dr(){if(N)try{return await window.ethereum.request({method:"eth_requestAccounts"})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}async function Lr(){if(N)try{return await window.ethereum.request({method:"eth_accounts"})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}async function Jr(){if(N)try{return await window.ethereum.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})}catch(r){return"Error: Unable to execute request: "+r.message}else return"Error: MetaMask not detected"}const jr=async(r,e,t,a=18,n="ERC20")=>{await window.ethereum.request({method:"wallet_watchAsset",params:{type:n,options:{address:e,symbol:r,decimals:a,image:t}}})},Hr=async(r,e)=>{const t="0x"+parseInt(r.toString(),10).toString(16);try{await window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(a){if(a.code===4902&&e)try{await window.ethereum.request({method:"wallet_addEthereumChain",params:[V({chainId:t},e)]})}catch{throw new Error("Couldn't add network, it's possible that user has rejected the change")}else throw new Error("Couldn't switch networks. Error: "+a)}},Xr=r=>{N&&(h.onMounted(()=>{window.ethereum.on("accountsChanged",r)}),h.onUnmounted(()=>{window.ethereum.removeListener("accountsChanged",r)}))},Gr=r=>{N&&(h.onMounted(()=>{window.ethereum.on("chainChanged",r)}),h.onUnmounted(()=>{window.ethereum.removeListener("chainChanged",r)}))},Qr=()=>({isMetaMask:N,connect:Dr,getAccounts:Lr,switchAccounts:Jr,addTokenToWallet:jr,switchOrAddChain:Hr,onAccountsChanged:Xr,onChainChanged:Gr});var Yr={install:r=>{r.component("ConnectWalletButton",Q)}};v.ConnectWalletButton=Q,v.Jazzicon=G,v.default=Yr,v.useMetaMaskWallet=Qr,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package.json b/package.json index 41959cd..d498283 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vue-connect-wallet", "description": "Vue UI Button + Utils for Connecting a web3 Wallet (TS Support)", "private": false, - "version": "0.1.6", + "version": "0.1.7", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build",