Socket
Socket
Sign inDemoInstall

@walletconnect/modal

Package Overview
Dependencies
Maintainers
10
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/modal - npm Package Compare versions

Comparing version 2.5.0-4093655 to 2.5.0-a269475-2

2

dist/cdn/bundle.js

@@ -6,2 +6,2 @@ const Lr=Symbol(),cr=Object.getPrototypeOf,nr=new WeakMap,Wr=t=>t&&(nr.has(t)?nr.get(t):cr(t)===Object.prototype||cr(t)===Array.prototype),Nr=t=>Wr(t)&&t[Lr]||null,fr=(t,r=!0)=>{nr.set(t,r)},er=t=>typeof t=="object"&&t!==null,P=new WeakMap,z=new WeakSet,Or=(t=Object.is,r=(u,h)=>new Proxy(u,h),e=u=>er(u)&&!z.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},i=new WeakMap,o=(u,h,l=n)=>{const E=i.get(u);if(E?.[0]===h)return E[1];const x=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return fr(x,!0),i.set(u,[h,x]),Reflect.ownKeys(u).forEach(F=>{if(Object.getOwnPropertyDescriptor(x,F))return;const v=Reflect.get(u,F),W={value:v,enumerable:!0,configurable:!0};if(z.has(v))fr(v,!1);else if(v instanceof Promise)delete W.value,W.get=()=>l(v);else if(P.has(v)){const[R,q]=P.get(v);W.value=o(R,q(),l)}Object.defineProperty(x,F,W)}),x},s=new WeakMap,c=[1,1],f=u=>{if(!er(u))throw new Error("object required");const h=s.get(u);if(h)return h;let l=c[0];const E=new Set,x=(d,w=++c[0])=>{l!==w&&(l=w,E.forEach(p=>p(d,w)))};let F=c[1];const v=(d=++c[1])=>(F!==d&&!E.size&&(F=d,R.forEach(([w])=>{const p=w[1](d);p>l&&(l=p)})),l),W=d=>(w,p)=>{const g=[...w];g[1]=[d,...g[1]],x(g,p)},R=new Map,q=(d,w)=>{if((import.meta.env&&import.meta.env.MODE)!=="production"&&R.has(d))throw new Error("prop listener already exists");if(E.size){const p=w[3](W(d));R.set(d,[w,p])}else R.set(d,[w])},ur=d=>{var w;const p=R.get(d);p&&(R.delete(d),(w=p[1])==null||w.call(p))},Mr=d=>(E.add(d),E.size===1&&R.forEach(([p,g],O)=>{if((import.meta.env&&import.meta.env.MODE)!=="production"&&g)throw new Error("remove already exists");const b=p[3](W(O));R.set(O,[p,b])}),()=>{E.delete(d),E.size===0&&R.forEach(([p,g],O)=>{g&&(g(),R.set(O,[p]))})}),rr=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),$=r(rr,{deleteProperty(d,w){const p=Reflect.get(d,w);ur(w);const g=Reflect.deleteProperty(d,w);return g&&x(["delete",[w],p]),g},set(d,w,p,g){const O=Reflect.has(d,w),b=Reflect.get(d,w,g);if(O&&(t(b,p)||s.has(p)&&t(b,s.get(p))))return!0;ur(w),er(p)&&(p=Nr(p)||p);let K=p;if(p instanceof Promise)p.then(M=>{p.status="fulfilled",p.value=M,x(["resolve",[w],M])}).catch(M=>{p.status="rejected",p.reason=M,x(["reject",[w],M])});else{!P.has(p)&&e(p)&&(K=f(p));const M=!z.has(K)&&P.get(K);M&&q(w,M)}return Reflect.set(d,w,K,g),x(["set",[w],p,b]),!0}});s.set(u,$);const Pr=[rr,v,o,Mr];return P.set($,Pr),Reflect.ownKeys(u).forEach(d=>{const w=Object.getOwnPropertyDescriptor(u,d);"value"in w&&($[d]=u[d],delete w.value,delete w.writable),Object.defineProperty(rr,d,w)}),$})=>[f,P,z,t,r,e,n,i,o,s,c],[Yr]=Or();function L(t={}){return Yr(t)}function k(t,r,e){const n=P.get(t);(import.meta.env&&import.meta.env.MODE)!=="production"&&!n&&console.warn("Please use proxy object");let i;const o=[],s=n[3];let c=!1;const u=s(h=>{if(o.push(h),e){r(o.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,c&&r(o.splice(0))}))});return c=!0,()=>{c=!1,u()}}function kr(t,r){const e=P.get(t);(import.meta.env&&import.meta.env.MODE)!=="production"&&!e&&console.warn("Please use proxy object");const[n,i,o]=e;return o(n,i(),r)}var lr=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},T=[],U=[],br=typeof Uint8Array<"u"?Uint8Array:Array,or=!1;function mr(){or=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,e=t.length;r<e;++r)T[r]=t[r],U[t.charCodeAt(r)]=r;U["-".charCodeAt(0)]=62,U["_".charCodeAt(0)]=63}function Vr(t){or||mr();var r,e,n,i,o,s,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=t[c-2]==="="?2:t[c-1]==="="?1:0,s=new br(c*3/4-o),n=o>0?c-4:c;var f=0;for(r=0,e=0;r<n;r+=4,e+=3)i=U[t.charCodeAt(r)]<<18|U[t.charCodeAt(r+1)]<<12|U[t.charCodeAt(r+2)]<<6|U[t.charCodeAt(r+3)],s[f++]=i>>16&255,s[f++]=i>>8&255,s[f++]=i&255;return o===2?(i=U[t.charCodeAt(r)]<<2|U[t.charCodeAt(r+1)]>>4,s[f++]=i&255):o===1&&(i=U[t.charCodeAt(r)]<<10|U[t.charCodeAt(r+1)]<<4|U[t.charCodeAt(r+2)]>>2,s[f++]=i>>8&255,s[f++]=i&255),s}function $r(t){return T[t>>18&63]+T[t>>12&63]+T[t>>6&63]+T[t&63]}function Kr(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push($r(n));return i.join("")}function hr(t){or||mr();for(var r,e=t.length,n=e%3,i="",o=[],s=16383,c=0,f=e-n;c<f;c+=s)o.push(Kr(t,c,c+s>f?f:c+s));return n===1?(r=t[e-1],i+=T[r>>2],i+=T[r<<4&63],i+="=="):n===2&&(r=(t[e-2]<<8)+t[e-1],i+=T[r>>10],i+=T[r>>4&63],i+=T[r<<2&63],i+="="),o.push(i),o.join("")}function G(t,r,e,n,i){var o,s,c=i*8-n-1,f=(1<<c)-1,u=f>>1,h=-7,l=e?i-1:0,E=e?-1:1,x=t[r+l];for(l+=E,o=x&(1<<-h)-1,x>>=-h,h+=c;h>0;o=o*256+t[r+l],l+=E,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=s*256+t[r+l],l+=E,h-=8);if(o===0)o=1-u;else{if(o===f)return s?NaN:(x?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-u}return(x?-1:1)*s*Math.pow(2,o-n)}function yr(t,r,e,n,i,o){var s,c,f,u=o*8-i-1,h=(1<<u)-1,l=h>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=n?0:o-1,F=n?1:-1,v=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,s=h):(s=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+l>=1?r+=E/f:r+=E*Math.pow(2,1-l),r*f>=2&&(s++,f/=2),s+l>=h?(c=0,s=h):s+l>=1?(c=(r*f-1)*Math.pow(2,i),s=s+l):(c=r*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[e+x]=c&255,x+=F,c/=256,i-=8);for(s=s<<i|c,u+=i;u>0;t[e+x]=s&255,x+=F,s/=256,u-=8);t[e+x-F]|=v*128}var zr={}.toString,Ar=Array.isArray||function(t){return zr.call(t)=="[object Array]"};/*!

* @license MIT
*/var jr=50;a.TYPED_ARRAY_SUPPORT=lr.TYPED_ARRAY_SUPPORT!==void 0?lr.TYPED_ARRAY_SUPPORT:!0;H();function H(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function D(t,r){if(H()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=a.prototype):(t===null&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return sr(this,t)}return gr(this,t,r,e)}a.poolSize=8192;a._augment=function(t){return t.__proto__=a.prototype,t};function gr(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Gr(t,r,e,n):typeof r=="string"?Jr(t,r,e):Xr(t,r)}a.from=function(t,r,e){return gr(null,t,r,e)};a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]);function Ir(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Hr(t,r,e,n){return Ir(r),r<=0?D(t,r):e!==void 0?typeof n=="string"?D(t,r).fill(e,n):D(t,r).fill(e):D(t,r)}a.alloc=function(t,r,e){return Hr(null,t,r,e)};function sr(t,r){if(Ir(r),t=D(t,r<0?0:ar(r)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}a.allocUnsafe=function(t){return sr(null,t)};a.allocUnsafeSlow=function(t){return sr(null,t)};function Jr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Fr(r,e)|0;t=D(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function ir(t,r){var e=r.length<0?0:ar(r.length)|0;t=D(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Gr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),a.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=a.prototype):t=ir(t,r),t}function Xr(t,r){if(B(r)){var e=ar(r.length)|0;return t=D(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||de(r.length)?D(t,0):ir(t,r);if(r.type==="Buffer"&&Ar(r.data))return ir(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ar(t){if(t>=H())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H().toString(16)+" bytes");return t|0}a.isBuffer=xe;function B(t){return!!(t!=null&&t._isBuffer)}a.compare=function(r,e){if(!B(r)||!B(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(r[o]!==e[o]){n=r[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,e){if(!Ar(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<r.length;++n){var s=r[n];if(!B(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};function Fr(t,r){if(B(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Br(t).length;default:if(n)return J(t).length;r=(""+r).toLowerCase(),n=!0}}a.byteLength=Fr;function Qr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return ae(this,r,e);case"utf8":case"utf-8":return vr(this,r,e);case"ascii":return oe(this,r,e);case"latin1":case"binary":return se(this,r,e);case"base64":return ne(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function N(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)N(this,e,e+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)N(this,e,e+3),N(this,e+1,e+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)N(this,e,e+7),N(this,e+1,e+6),N(this,e+2,e+5),N(this,e+3,e+4);return this};a.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?vr(this,0,r):Qr.apply(this,arguments)};a.prototype.equals=function(r){if(!B(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",e=jr;return this.length>0&&(r=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(r+=" ... ")),"<Buffer "+r+">"};a.prototype.compare=function(r,e,n,i,o){if(!B(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var s=o-i,c=n-e,f=Math.min(s,c),u=this.slice(i,o),h=r.slice(e,n),l=0;l<f;++l)if(u[l]!==h[l]){s=u[l],c=h[l];break}return s<c?-1:c<s?1:0};function Rr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),B(r))return r.length===0?-1:pr(t,r,e,n,i);if(typeof r=="number")return r=r&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):pr(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function pr(t,r,e,n,i){var o=1,s=t.length,c=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;o=2,s/=2,c/=2,e/=2}function f(x,F){return o===1?x[F]:x.readUInt16BE(F*o)}var u;if(i){var h=-1;for(u=e;u<s;u++)if(f(t,u)===f(r,h===-1?0:u-h)){if(h===-1&&(h=u),u-h+1===c)return h*o}else h!==-1&&(u-=u-h),h=-1}else for(e+c>s&&(e=s-c),u=e;u>=0;u--){for(var l=!0,E=0;E<c;E++)if(f(t,u+E)!==f(r,E)){l=!1;break}if(l)return u}return-1}a.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};a.prototype.indexOf=function(r,e,n){return Rr(this,r,e,n,!0)};a.prototype.lastIndexOf=function(r,e,n){return Rr(this,r,e,n,!1)};function Zr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var c=parseInt(r.substr(s*2,2),16);if(isNaN(c))return s;t[e+s]=c}return s}function qr(t,r,e,n){return Z(J(r,t.length-e),t,e,n)}function Ur(t,r,e,n){return Z(pe(r),t,e,n)}function re(t,r,e,n){return Ur(t,r,e,n)}function ee(t,r,e,n){return Z(Br(r),t,e,n)}function te(t,r,e,n){return Z(we(r,t.length-e),t,e,n)}a.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Zr(this,r,e,n);case"utf8":case"utf-8":return qr(this,r,e,n);case"ascii":return Ur(this,r,e,n);case"latin1":case"binary":return re(this,r,e,n);case"base64":return ee(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,r,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(t,r,e){return r===0&&e===t.length?hr(t):hr(t.slice(r,e))}function vr(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],s=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=e){var f,u,h,l;switch(c){case 1:o<128&&(s=o);break;case 2:f=t[i+1],(f&192)===128&&(l=(o&31)<<6|f&63,l>127&&(s=l));break;case 3:f=t[i+1],u=t[i+2],(f&192)===128&&(u&192)===128&&(l=(o&15)<<12|(f&63)<<6|u&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:f=t[i+1],u=t[i+2],h=t[i+3],(f&192)===128&&(u&192)===128&&(h&192)===128&&(l=(o&15)<<18|(f&63)<<12|(u&63)<<6|h&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=c}return ie(n)}var wr=4096;function ie(t){var r=t.length;if(r<=wr)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=wr));return e}function oe(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function se(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function ae(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=he(t[o]);return i}function ue(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=a.prototype;else{var o=e-r;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+r]}return i};function y(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r],o=1,s=0;++s<e&&(o*=256);)i+=this[r+s]*o;return i};a.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r+--e],o=1;e>0&&(o*=256);)i+=this[r+--e]*o;return i};a.prototype.readUInt8=function(r,e){return e||y(r,1,this.length),this[r]};a.prototype.readUInt16LE=function(r,e){return e||y(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUInt16BE=function(r,e){return e||y(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUInt32LE=function(r,e){return e||y(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUInt32BE=function(r,e){return e||y(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r],o=1,s=0;++s<e&&(o*=256);)i+=this[r+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=e,o=1,s=this[r+--i];i>0&&(o*=256);)s+=this[r+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(r,e){return e||y(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,e){e||y(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,e){e||y(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,e){return e||y(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,e){return e||y(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,e){return e||y(r,4,this.length),G(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,e){return e||y(r,4,this.length),G(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,e){return e||y(r,8,this.length),G(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,e){return e||y(r,8,this.length),G(this,r,!1,52,8)};function I(t,r,e,n,i,o){if(!B(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,r,e,n,o,0)}var s=1,c=0;for(this[e]=r&255;++c<n&&(s*=256);)this[e+c]=r/s&255;return e+n};a.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,r,e,n,o,0)}var s=n-1,c=1;for(this[e+s]=r&255;--s>=0&&(c*=256);)this[e+s]=r/c&255;return e+n};a.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function X(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}a.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):X(this,r,e,!0),e+2};a.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):X(this,r,e,!1),e+2};function Q(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>(n?i:3-i)*8&255}a.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):Q(this,r,e,!0),e+4};a.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Q(this,r,e,!1),e+4};a.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,r,e,n,o-1,-o)}var s=0,c=1,f=0;for(this[e]=r&255;++s<n&&(c*=256);)r<0&&f===0&&this[e+s-1]!==0&&(f=1),this[e+s]=(r/c>>0)-f&255;return e+n};a.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,r,e,n,o-1,-o)}var s=n-1,c=1,f=0;for(this[e+s]=r&255;--s>=0&&(c*=256);)r<0&&f===0&&this[e+s+1]!==0&&(f=1),this[e+s]=(r/c>>0)-f&255;return e+n};a.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};a.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):X(this,r,e,!0),e+2};a.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):X(this,r,e,!1),e+2};a.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):Q(this,r,e,!0),e+4};a.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Q(this,r,e,!1),e+4};function Cr(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function _r(t,r,e,n,i){return i||Cr(t,r,e,4),yr(t,r,e,n,23,4),e+4}a.prototype.writeFloatLE=function(r,e,n){return _r(this,r,e,!0,n)};a.prototype.writeFloatBE=function(r,e,n){return _r(this,r,e,!1,n)};function Tr(t,r,e,n,i){return i||Cr(t,r,e,8),yr(t,r,e,n,52,8),e+8}a.prototype.writeDoubleLE=function(r,e,n){return Tr(this,r,e,!0,n)};a.prototype.writeDoubleBE=function(r,e,n){return Tr(this,r,e,!1,n)};a.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var o=i-n,s;if(this===r&&n<e&&e<i)for(s=o-1;s>=0;--s)r[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)r[s+e]=this[s+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+o),e);return o};a.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var s;if(typeof r=="number")for(s=e;s<n;++s)this[s]=r;else{var c=B(r)?r:J(new a(r,i).toString()),f=c.length;for(s=0;s<n-e;++s)this[s+e]=c[s%f]}return this};var ce=/[^+\/0-9A-Za-z-_]/g;function fe(t){if(t=le(t).replace(ce,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function le(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function he(t){return t<16?"0"+t.toString(16):t.toString(16)}function J(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],s=0;s<n;++s){if(e=t.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function pe(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function we(t,r){for(var e,n,i,o=[],s=0;s<t.length&&!((r-=2)<0);++s)e=t.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Br(t){return Vr(fe(t))}function Z(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function de(t){return t!==t}function xe(t){return t!=null&&(!!t._isBuffer||Dr(t)||Ee(t))}function Dr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ee(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Dr(t.slice(0,0))}const m=L({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Sr={state:m,subscribe(t){return k(m,()=>t(m))},push(t,r){t!==m.view&&(m.view=t,r&&(m.data=r),m.history.push(t))},reset(t){m.view=t,m.history=[t]},replace(t){m.history.length>1&&(m.history[m.history.length-1]=t,m.view=t)},goBack(){if(m.history.length>1){m.history.pop();const[t]=m.history.slice(-1);m.view=t}},setData(t){m.data=t}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return _.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},isArray(t){return Array.isArray(t)&&t.length>0},formatNativeUrl(t,r,e){if(_.isHttpUrl(t))return this.formatUniversalUrl(t,r,e);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,e);const i=encodeURIComponent(r);return`${n}wc?uri=${i}`},formatUniversalUrl(t,r,e){if(!_.isHttpUrl(t))return this.formatNativeUrl(t,r,e);let n=t;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,e);const i=encodeURIComponent(r);return`${n}wc?uri=${i}`},async wait(t){return new Promise(r=>{setTimeout(r,t)})},openHref(t,r){window.open(t,r,"noreferrer noopener")},setWalletConnectDeepLink(t,r){localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:r}))},setWalletConnectAndroidDeepLink(t){const[r]=t.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:r,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)},setModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.4.8-4560daf-2")},getWalletRouterData(){var t;const r=(t=Sr.state.data)==null?void 0:t.Wallet;if(!r)throw new Error('Missing "Wallet" view data');return r}},me=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),A=L({enabled:me,userSessionId:"",events:[],connectedWalletId:void 0}),ye={state:A,subscribe(t){return k(A.events,()=>t(kr(A.events[A.events.length-1])))},initialize(){A.enabled&&typeof crypto<"u"&&(A.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){A.connectedWalletId=t},click(t){if(A.enabled){const r={type:"CLICK",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}},track(t){if(A.enabled){const r={type:"TRACK",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}},view(t){if(A.enabled){const r={type:"VIEW",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}}},C=L({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),S={state:C,subscribe(t){return k(C,()=>t(C))},setChains(t){C.chains=t},setWalletConnectUri(t){C.walletConnectUri=t},setIsCustomDesktop(t){C.isCustomDesktop=t},setIsCustomMobile(t){C.isCustomMobile=t},setIsDataLoaded(t){C.isDataLoaded=t},setIsUiLoaded(t){C.isUiLoaded=t},setIsAuth(t){C.isAuth=t}},j=L({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),Ae={state:j,subscribe(t){return k(j,()=>t(j))},setConfig(t){var r,e;ye.initialize(),S.setChains(t.chains),S.setIsAuth(Boolean(t.enableAuthMode)),S.setIsCustomMobile(Boolean((r=t.mobileWallets)==null?void 0:r.length)),S.setIsCustomDesktop(Boolean((e=t.desktopWallets)==null?void 0:e.length)),_.setModalVersionInStorage(),Object.assign(j,t)}};_.isMobile();L({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]});const Y=L({open:!1}),tr={state:Y,subscribe(t){return k(Y,()=>t(Y))},async open(t){return new Promise(r=>{const{isUiLoaded:e,isDataLoaded:n}=S.state;if(S.setWalletConnectUri(t?.uri),S.setChains(t?.chains),Sr.reset("ConnectWallet"),e&&n)Y.open=!0,r();else{const i=setInterval(()=>{const o=S.state;o.isUiLoaded&&o.isDataLoaded&&(clearInterval(i),Y.open=!0,r())},200)}})},close(){Y.open=!1}};var ge=Object.defineProperty,dr=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,xr=(t,r,e)=>r in t?ge(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,Re=(t,r)=>{for(var e in r||(r={}))Ie.call(r,e)&&xr(t,e,r[e]);if(dr)for(var e of dr(r))Fe.call(r,e)&&xr(t,e,r[e]);return t};function Ue(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const V=L({themeMode:Ue()?"dark":"light"}),Er={state:V,subscribe(t){return k(V,()=>t(V))},setThemeConfig(t){const{themeMode:r,themeVariables:e}=t;r&&(V.themeMode=r),e&&(V.themeVariables=Re({},e))}};L({open:!1,message:"",variant:"success"});typeof window<"u"&&(window.Buffer||(window.Buffer=a),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Ce{constructor(r){this.openModal=tr.open,this.closeModal=tr.close,this.subscribeModal=tr.subscribe,this.setTheme=Er.setThemeConfig,Er.setThemeConfig(r),Ae.setConfig(r),this.initUi()}async initUi(){if(typeof window<"u"){await import("./index-4b4ad5a2.js");const r=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",r),S.setIsUiLoaded(!0)}}}export{Ce as WalletConnectModal};
*/var jr=50;a.TYPED_ARRAY_SUPPORT=lr.TYPED_ARRAY_SUPPORT!==void 0?lr.TYPED_ARRAY_SUPPORT:!0;H();function H(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function D(t,r){if(H()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=a.prototype):(t===null&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(t,r,e);if(typeof t=="number"){if(typeof r=="string")throw new Error("If encoding is specified then the first argument must be a string");return sr(this,t)}return gr(this,t,r,e)}a.poolSize=8192;a._augment=function(t){return t.__proto__=a.prototype,t};function gr(t,r,e,n){if(typeof r=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer?Gr(t,r,e,n):typeof r=="string"?Jr(t,r,e):Xr(t,r)}a.from=function(t,r,e){return gr(null,t,r,e)};a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]);function Ir(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Hr(t,r,e,n){return Ir(r),r<=0?D(t,r):e!==void 0?typeof n=="string"?D(t,r).fill(e,n):D(t,r).fill(e):D(t,r)}a.alloc=function(t,r,e){return Hr(null,t,r,e)};function sr(t,r){if(Ir(r),t=D(t,r<0?0:ar(r)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}a.allocUnsafe=function(t){return sr(null,t)};a.allocUnsafeSlow=function(t){return sr(null,t)};function Jr(t,r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Fr(r,e)|0;t=D(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function ir(t,r){var e=r.length<0?0:ar(r.length)|0;t=D(t,e);for(var n=0;n<e;n+=1)t[n]=r[n]&255;return t}function Gr(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?r=new Uint8Array(r):n===void 0?r=new Uint8Array(r,e):r=new Uint8Array(r,e,n),a.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=a.prototype):t=ir(t,r),t}function Xr(t,r){if(B(r)){var e=ar(r.length)|0;return t=D(t,e),t.length===0||r.copy(t,0,0,e),t}if(r){if(typeof ArrayBuffer<"u"&&r.buffer instanceof ArrayBuffer||"length"in r)return typeof r.length!="number"||de(r.length)?D(t,0):ir(t,r);if(r.type==="Buffer"&&Ar(r.data))return ir(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ar(t){if(t>=H())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H().toString(16)+" bytes");return t|0}a.isBuffer=xe;function B(t){return!!(t!=null&&t._isBuffer)}a.compare=function(r,e){if(!B(r)||!B(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var n=r.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(r[o]!==e[o]){n=r[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,e){if(!Ar(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<r.length;++n)e+=r[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<r.length;++n){var s=r[n];if(!B(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};function Fr(t,r){if(B(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;if(e===0)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Br(t).length;default:if(n)return J(t).length;r=(""+r).toLowerCase(),n=!0}}a.byteLength=Fr;function Qr(t,r,e){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,r>>>=0,e<=r))return"";for(t||(t="utf8");;)switch(t){case"hex":return ae(this,r,e);case"utf8":case"utf-8":return vr(this,r,e);case"ascii":return oe(this,r,e);case"latin1":case"binary":return se(this,r,e);case"base64":return ne(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function N(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<r;e+=2)N(this,e,e+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<r;e+=4)N(this,e,e+3),N(this,e+1,e+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<r;e+=8)N(this,e,e+7),N(this,e+1,e+6),N(this,e+2,e+5),N(this,e+3,e+4);return this};a.prototype.toString=function(){var r=this.length|0;return r===0?"":arguments.length===0?vr(this,0,r):Qr.apply(this,arguments)};a.prototype.equals=function(r){if(!B(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",e=jr;return this.length>0&&(r=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(r+=" ... ")),"<Buffer "+r+">"};a.prototype.compare=function(r,e,n,i,o){if(!B(r))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var s=o-i,c=n-e,f=Math.min(s,c),u=this.slice(i,o),h=r.slice(e,n),l=0;l<f;++l)if(u[l]!==h[l]){s=u[l],c=h[l];break}return s<c?-1:c<s?1:0};function Rr(t,r,e,n,i){if(t.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),B(r))return r.length===0?-1:pr(t,r,e,n,i);if(typeof r=="number")return r=r&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):pr(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function pr(t,r,e,n,i){var o=1,s=t.length,c=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||r.length<2)return-1;o=2,s/=2,c/=2,e/=2}function f(x,F){return o===1?x[F]:x.readUInt16BE(F*o)}var u;if(i){var h=-1;for(u=e;u<s;u++)if(f(t,u)===f(r,h===-1?0:u-h)){if(h===-1&&(h=u),u-h+1===c)return h*o}else h!==-1&&(u-=u-h),h=-1}else for(e+c>s&&(e=s-c),u=e;u>=0;u--){for(var l=!0,E=0;E<c;E++)if(f(t,u+E)!==f(r,E)){l=!1;break}if(l)return u}return-1}a.prototype.includes=function(r,e,n){return this.indexOf(r,e,n)!==-1};a.prototype.indexOf=function(r,e,n){return Rr(this,r,e,n,!0)};a.prototype.lastIndexOf=function(r,e,n){return Rr(this,r,e,n,!1)};function Zr(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var c=parseInt(r.substr(s*2,2),16);if(isNaN(c))return s;t[e+s]=c}return s}function qr(t,r,e,n){return Z(J(r,t.length-e),t,e,n)}function Ur(t,r,e,n){return Z(pe(r),t,e,n)}function re(t,r,e,n){return Ur(t,r,e,n)}function ee(t,r,e,n){return Z(Br(r),t,e,n)}function te(t,r,e,n){return Z(we(r,t.length-e),t,e,n)}a.prototype.write=function(r,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return Zr(this,r,e,n);case"utf8":case"utf-8":return qr(this,r,e,n);case"ascii":return Ur(this,r,e,n);case"latin1":case"binary":return re(this,r,e,n);case"base64":return ee(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,r,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(t,r,e){return r===0&&e===t.length?hr(t):hr(t.slice(r,e))}function vr(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],s=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=e){var f,u,h,l;switch(c){case 1:o<128&&(s=o);break;case 2:f=t[i+1],(f&192)===128&&(l=(o&31)<<6|f&63,l>127&&(s=l));break;case 3:f=t[i+1],u=t[i+2],(f&192)===128&&(u&192)===128&&(l=(o&15)<<12|(f&63)<<6|u&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:f=t[i+1],u=t[i+2],h=t[i+3],(f&192)===128&&(u&192)===128&&(h&192)===128&&(l=(o&15)<<18|(f&63)<<12|(u&63)<<6|h&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=c}return ie(n)}var wr=4096;function ie(t){var r=t.length;if(r<=wr)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=wr));return e}function oe(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]&127);return n}function se(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function ae(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=he(t[o]);return i}function ue(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,e){var n=this.length;r=~~r,e=e===void 0?n:~~e,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<r&&(e=r);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(r,e),i.__proto__=a.prototype;else{var o=e-r;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+r]}return i};function y(t,r,e){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r],o=1,s=0;++s<e&&(o*=256);)i+=this[r+s]*o;return i};a.prototype.readUIntBE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r+--e],o=1;e>0&&(o*=256);)i+=this[r+--e]*o;return i};a.prototype.readUInt8=function(r,e){return e||y(r,1,this.length),this[r]};a.prototype.readUInt16LE=function(r,e){return e||y(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUInt16BE=function(r,e){return e||y(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUInt32LE=function(r,e){return e||y(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUInt32BE=function(r,e){return e||y(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=this[r],o=1,s=0;++s<e&&(o*=256);)i+=this[r+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(r,e,n){r=r|0,e=e|0,n||y(r,e,this.length);for(var i=e,o=1,s=this[r+--i];i>0&&(o*=256);)s+=this[r+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(r,e){return e||y(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,e){e||y(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,e){e||y(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,e){return e||y(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,e){return e||y(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,e){return e||y(r,4,this.length),G(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,e){return e||y(r,4,this.length),G(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,e){return e||y(r,8,this.length),G(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,e){return e||y(r,8,this.length),G(this,r,!1,52,8)};function I(t,r,e,n,i,o){if(!B(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,r,e,n,o,0)}var s=1,c=0;for(this[e]=r&255;++c<n&&(s*=256);)this[e+c]=r/s&255;return e+n};a.prototype.writeUIntBE=function(r,e,n,i){if(r=+r,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;I(this,r,e,n,o,0)}var s=n-1,c=1;for(this[e+s]=r&255;--s>=0&&(c*=256);)this[e+s]=r/c&255;return e+n};a.prototype.writeUInt8=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=r&255,e+1};function X(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}a.prototype.writeUInt16LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):X(this,r,e,!0),e+2};a.prototype.writeUInt16BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):X(this,r,e,!1),e+2};function Q(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>(n?i:3-i)*8&255}a.prototype.writeUInt32LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=r&255):Q(this,r,e,!0),e+4};a.prototype.writeUInt32BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Q(this,r,e,!1),e+4};a.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,r,e,n,o-1,-o)}var s=0,c=1,f=0;for(this[e]=r&255;++s<n&&(c*=256);)r<0&&f===0&&this[e+s-1]!==0&&(f=1),this[e+s]=(r/c>>0)-f&255;return e+n};a.prototype.writeIntBE=function(r,e,n,i){if(r=+r,e=e|0,!i){var o=Math.pow(2,8*n-1);I(this,r,e,n,o-1,-o)}var s=n-1,c=1,f=0;for(this[e+s]=r&255;--s>=0&&(c*=256);)r<0&&f===0&&this[e+s+1]!==0&&(f=1),this[e+s]=(r/c>>0)-f&255;return e+n};a.prototype.writeInt8=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),r<0&&(r=255+r+1),this[e]=r&255,e+1};a.prototype.writeInt16LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8):X(this,r,e,!0),e+2};a.prototype.writeInt16BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=r&255):X(this,r,e,!1),e+2};a.prototype.writeInt32LE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=r&255,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):Q(this,r,e,!0),e+4};a.prototype.writeInt32BE=function(r,e,n){return r=+r,e=e|0,n||I(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),a.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=r&255):Q(this,r,e,!1),e+4};function Cr(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function _r(t,r,e,n,i){return i||Cr(t,r,e,4),yr(t,r,e,n,23,4),e+4}a.prototype.writeFloatLE=function(r,e,n){return _r(this,r,e,!0,n)};a.prototype.writeFloatBE=function(r,e,n){return _r(this,r,e,!1,n)};function Tr(t,r,e,n,i){return i||Cr(t,r,e,8),yr(t,r,e,n,52,8),e+8}a.prototype.writeDoubleLE=function(r,e,n){return Tr(this,r,e,!0,n)};a.prototype.writeDoubleBE=function(r,e,n){return Tr(this,r,e,!1,n)};a.prototype.copy=function(r,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e<i-n&&(i=r.length-e+n);var o=i-n,s;if(this===r&&n<e&&e<i)for(s=o-1;s>=0;--s)r[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)r[s+e]=this[s+n];else Uint8Array.prototype.set.call(r,this.subarray(n,n+o),e);return o};a.prototype.fill=function(r,e,n,i){if(typeof r=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),r.length===1){var o=r.charCodeAt(0);o<256&&(r=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof r=="number"&&(r=r&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var s;if(typeof r=="number")for(s=e;s<n;++s)this[s]=r;else{var c=B(r)?r:J(new a(r,i).toString()),f=c.length;for(s=0;s<n-e;++s)this[s+e]=c[s%f]}return this};var ce=/[^+\/0-9A-Za-z-_]/g;function fe(t){if(t=le(t).replace(ce,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function le(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function he(t){return t<16?"0"+t.toString(16):t.toString(16)}function J(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],s=0;s<n;++s){if(e=t.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function pe(t){for(var r=[],e=0;e<t.length;++e)r.push(t.charCodeAt(e)&255);return r}function we(t,r){for(var e,n,i,o=[],s=0;s<t.length&&!((r-=2)<0);++s)e=t.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Br(t){return Vr(fe(t))}function Z(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function de(t){return t!==t}function xe(t){return t!=null&&(!!t._isBuffer||Dr(t)||Ee(t))}function Dr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ee(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Dr(t.slice(0,0))}const m=L({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Sr={state:m,subscribe(t){return k(m,()=>t(m))},push(t,r){t!==m.view&&(m.view=t,r&&(m.data=r),m.history.push(t))},reset(t){m.view=t,m.history=[t]},replace(t){m.history.length>1&&(m.history[m.history.length-1]=t,m.view=t)},goBack(){if(m.history.length>1){m.history.pop();const[t]=m.history.slice(-1);m.view=t}},setData(t){m.data=t}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return _.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},isArray(t){return Array.isArray(t)&&t.length>0},formatNativeUrl(t,r,e){if(_.isHttpUrl(t))return this.formatUniversalUrl(t,r,e);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,e);const i=encodeURIComponent(r);return`${n}wc?uri=${i}`},formatUniversalUrl(t,r,e){if(!_.isHttpUrl(t))return this.formatNativeUrl(t,r,e);let n=t;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,e);const i=encodeURIComponent(r);return`${n}wc?uri=${i}`},async wait(t){return new Promise(r=>{setTimeout(r,t)})},openHref(t,r){window.open(t,r,"noreferrer noopener")},setWalletConnectDeepLink(t,r){localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:r}))},setWalletConnectAndroidDeepLink(t){const[r]=t.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:r,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)},setModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.5.0-a269475")},getWalletRouterData(){var t;const r=(t=Sr.state.data)==null?void 0:t.Wallet;if(!r)throw new Error('Missing "Wallet" view data');return r}},me=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),A=L({enabled:me,userSessionId:"",events:[],connectedWalletId:void 0}),ye={state:A,subscribe(t){return k(A.events,()=>t(kr(A.events[A.events.length-1])))},initialize(){A.enabled&&typeof crypto<"u"&&(A.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){A.connectedWalletId=t},click(t){if(A.enabled){const r={type:"CLICK",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}},track(t){if(A.enabled){const r={type:"TRACK",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}},view(t){if(A.enabled){const r={type:"VIEW",name:t.name,userSessionId:A.userSessionId,timestamp:Date.now(),data:t};A.events.push(r)}}},C=L({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),S={state:C,subscribe(t){return k(C,()=>t(C))},setChains(t){C.chains=t},setWalletConnectUri(t){C.walletConnectUri=t},setIsCustomDesktop(t){C.isCustomDesktop=t},setIsCustomMobile(t){C.isCustomMobile=t},setIsDataLoaded(t){C.isDataLoaded=t},setIsUiLoaded(t){C.isUiLoaded=t},setIsAuth(t){C.isAuth=t}},j=L({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),Ae={state:j,subscribe(t){return k(j,()=>t(j))},setConfig(t){var r,e;ye.initialize(),S.setChains(t.chains),S.setIsAuth(Boolean(t.enableAuthMode)),S.setIsCustomMobile(Boolean((r=t.mobileWallets)==null?void 0:r.length)),S.setIsCustomDesktop(Boolean((e=t.desktopWallets)==null?void 0:e.length)),_.setModalVersionInStorage(),Object.assign(j,t)}};_.isMobile();L({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]});const Y=L({open:!1}),tr={state:Y,subscribe(t){return k(Y,()=>t(Y))},async open(t){return new Promise(r=>{const{isUiLoaded:e,isDataLoaded:n}=S.state;if(S.setWalletConnectUri(t?.uri),S.setChains(t?.chains),Sr.reset("ConnectWallet"),e&&n)Y.open=!0,r();else{const i=setInterval(()=>{const o=S.state;o.isUiLoaded&&o.isDataLoaded&&(clearInterval(i),Y.open=!0,r())},200)}})},close(){Y.open=!1}};var ge=Object.defineProperty,dr=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,xr=(t,r,e)=>r in t?ge(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,Re=(t,r)=>{for(var e in r||(r={}))Ie.call(r,e)&&xr(t,e,r[e]);if(dr)for(var e of dr(r))Fe.call(r,e)&&xr(t,e,r[e]);return t};function Ue(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const V=L({themeMode:Ue()?"dark":"light"}),Er={state:V,subscribe(t){return k(V,()=>t(V))},setThemeConfig(t){const{themeMode:r,themeVariables:e}=t;r&&(V.themeMode=r),e&&(V.themeVariables=Re({},e))}};L({open:!1,message:"",variant:"success"});typeof window<"u"&&(window.Buffer||(window.Buffer=a),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Ce{constructor(r){this.openModal=tr.open,this.closeModal=tr.close,this.subscribeModal=tr.subscribe,this.setTheme=Er.setThemeConfig,Er.setThemeConfig(r),Ae.setConfig(r),this.initUi()}async initUi(){if(typeof window<"u"){await import("./index-4b4ad5a2.js");const r=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",r),S.setIsUiLoaded(!0)}}}export{Ce as WalletConnectModal};
{
"name": "@walletconnect/modal",
"version": "2.5.0-4093655",
"version": "2.5.0-a269475-2",
"main": "dist/index.js",

@@ -21,4 +21,4 @@ "unpkg": "dist/cdn/bundle.js",

"dependencies": {
"@walletconnect/modal-core": "2.4.8-4560daf-2",
"@walletconnect/modal-ui": "2.4.8-4560daf-2"
"@walletconnect/modal-core": "2.5.0-a269475-2",
"@walletconnect/modal-ui": "2.5.0-a269475-2"
},

@@ -25,0 +25,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc