(function(nt,oe){typeof exports=="object"&&typeof module<"u"?module.exports=oe():typeof define=="function"&&define.amd?define(oe):(nt=typeof globalThis<"u"?globalThis:nt||self,nt.RDT=oe())})(this,function(){"use strict";var m0=Object.defineProperty;var y0=(nt,oe,Dt)=>oe in nt?m0(nt,oe,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):nt[oe]=Dt;var bl=(nt,oe,Dt)=>y0(nt,typeof oe!="symbol"?oe+"":oe,Dt);var Il;function nt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oe={},Dt={};Dt.byteLength=vl,Dt.toByteArray=Cl,Dt.fromByteArray=El;for(var It=[],it=[],Al=typeof Uint8Array<"u"?Uint8Array:Array,Mi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yr=0,Ml=Mi.length;yr0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function vl(t){var e=is(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Nl(t,e,r){return(e+r)*3/4-r}function Cl(t){var e,r=is(t),n=r[0],i=r[1],o=new Al(Nl(t,n,i)),s=0,a=i>0?n-4:n,l;for(l=0;l>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=it[t.charCodeAt(l)]<<2|it[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=it[t.charCodeAt(l)]<<10|it[t.charCodeAt(l+1)]<<4|it[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Sl(t){return It[t>>18&63]+It[t>>12&63]+It[t>>6&63]+It[t&63]}function Dl(t,e,r){for(var n,i=[],o=e;oa?a:s+o));return n===1?(e=t[r-1],i.push(It[e>>2]+It[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(It[e>>10]+It[e>>4&63]+It[e<<2&63]+"=")),i.join("")}var vi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */vi.read=function(t,e,r,n,i){var o,s,a=i*8-n-1,l=(1<>1,h=-7,f=r?i-1:0,m=r?-1:1,y=t[e+f];for(f+=m,o=y&(1<<-h)-1,y>>=-h,h+=a;h>0;o=o*256+t[e+f],f+=m,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=s*256+t[e+f],f+=m,h-=8);if(o===0)o=1-d;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-d}return(y?-1:1)*s*Math.pow(2,o-n)},vi.write=function(t,e,r,n,i,o){var s,a,l,d=o*8-i-1,h=(1<>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:o-1,w=n?1:-1,A=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?e+=m/l:e+=m*Math.pow(2,1-f),e*l>=2&&(s++,l/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*l-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+y]=a&255,y+=w,a/=256,i-=8);for(s=s<0;t[r+y]=s&255,y+=w,s/=256,d-=8);t[r+y-w]|=A*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */(function(t){const e=Dt,r=vi,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=B,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const p=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(p,c),p.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const c=new Uint8Array(p);return Object.setPrototypeOf(c,a.prototype),c}function a(p,c,u){if(typeof p=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(p)}return l(p,c,u)}a.poolSize=8192;function l(p,c,u){if(typeof p=="string")return m(p,c);if(ArrayBuffer.isView(p))return w(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(rt(p,ArrayBuffer)||p&&rt(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(rt(p,SharedArrayBuffer)||p&&rt(p.buffer,SharedArrayBuffer)))return A(p,c,u);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return a.from(g,c,u);const I=T(p);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return a.from(p[Symbol.toPrimitive]("string"),c,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}a.from=function(p,c,u){return l(p,c,u)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function d(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function h(p,c,u){return d(p),p<=0?s(p):c!==void 0?typeof u=="string"?s(p).fill(c,u):s(p).fill(c):s(p)}a.alloc=function(p,c,u){return h(p,c,u)};function f(p){return d(p),s(p<0?0:M(p)|0)}a.allocUnsafe=function(p){return f(p)},a.allocUnsafeSlow=function(p){return f(p)};function m(p,c){if((typeof c!="string"||c==="")&&(c="utf8"),!a.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const u=C(p,c)|0;let g=s(u);const I=g.write(p,c);return I!==u&&(g=g.slice(0,I)),g}function y(p){const c=p.length<0?0:M(p.length)|0,u=s(c);for(let g=0;g=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function B(p){return+p!=p&&(p=0),a.alloc(+p)}a.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==a.prototype},a.compare=function(c,u){if(rt(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),rt(u,Uint8Array)&&(u=a.from(u,u.offset,u.byteLength)),!a.isBuffer(c)||!a.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===u)return 0;let g=c.length,I=u.length;for(let x=0,v=Math.min(g,I);xI.length?(a.isBuffer(v)||(v=a.from(v)),v.copy(I,x)):Uint8Array.prototype.set.call(I,v,x);else if(a.isBuffer(v))v.copy(I,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=v.length}return I};function C(p,c){if(a.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||rt(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const u=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&u===0)return 0;let I=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return qr(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return xi(p).length;default:if(I)return g?-1:qr(p).length;c=(""+c).toLowerCase(),I=!0}}a.byteLength=C;function b(p,c,u){let g=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,c>>>=0,u<=c))return"";for(p||(p="utf8");;)switch(p){case"hex":return E(this,c,u);case"utf8":case"utf-8":return dt(this,c,u);case"ascii":return Ct(this,c,u);case"latin1":case"binary":return Z(this,c,u);case"base64":return ue(this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,c,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}a.prototype._isBuffer=!0;function D(p,c,u){const g=p[c];p[c]=p[u],p[u]=g}a.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;uu&&(c+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(c,u,g,I,x){if(rt(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(u===void 0&&(u=0),g===void 0&&(g=c?c.length:0),I===void 0&&(I=0),x===void 0&&(x=this.length),u<0||g>c.length||I<0||x>this.length)throw new RangeError("out of range index");if(I>=x&&u>=g)return 0;if(I>=x)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,I>>>=0,x>>>=0,this===c)return 0;let v=x-I,ne=g-u;const xe=Math.min(v,ne),ye=this.slice(I,x),Ae=c.slice(u,g);for(let ge=0;ge2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Xr(u)&&(u=I?0:p.length-1),u<0&&(u=p.length+u),u>=p.length){if(I)return-1;u=p.length-1}else if(u<0)if(I)u=0;else return-1;if(typeof c=="string"&&(c=a.from(c,g)),a.isBuffer(c))return c.length===0?-1:_(p,c,u,g,I);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(p,c,u):Uint8Array.prototype.lastIndexOf.call(p,c,u):_(p,[c],u,g,I);throw new TypeError("val must be string, number or Buffer")}function _(p,c,u,g,I){let x=1,v=p.length,ne=c.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||c.length<2)return-1;x=2,v/=2,ne/=2,u/=2}function xe(Ae,ge){return x===1?Ae[ge]:Ae.readUInt16BE(ge*x)}let ye;if(I){let Ae=-1;for(ye=u;yev&&(u=v-ne),ye=u;ye>=0;ye--){let Ae=!0;for(let ge=0;geI&&(g=I)):g=I;const x=c.length;g>x/2&&(g=x/2);let v;for(v=0;v>>0,isFinite(g)?(g=g>>>0,I===void 0&&(I="utf8")):(I=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const x=this.length-u;if((g===void 0||g>x)&&(g=x),c.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");let v=!1;for(;;)switch(I){case"hex":return W(this,c,u,g);case"utf8":case"utf-8":return $(this,c,u,g);case"ascii":case"latin1":case"binary":return R(this,c,u,g);case"base64":return ie(this,c,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,c,u,g);default:if(v)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),v=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(p,c,u){return c===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(c,u))}function dt(p,c,u){u=Math.min(p.length,u);const g=[];let I=c;for(;I239?4:x>223?3:x>191?2:1;if(I+ne<=u){let xe,ye,Ae,ge;switch(ne){case 1:x<128&&(v=x);break;case 2:xe=p[I+1],(xe&192)===128&&(ge=(x&31)<<6|xe&63,ge>127&&(v=ge));break;case 3:xe=p[I+1],ye=p[I+2],(xe&192)===128&&(ye&192)===128&&(ge=(x&15)<<12|(xe&63)<<6|ye&63,ge>2047&&(ge<55296||ge>57343)&&(v=ge));break;case 4:xe=p[I+1],ye=p[I+2],Ae=p[I+3],(xe&192)===128&&(ye&192)===128&&(Ae&192)===128&&(ge=(x&15)<<18|(xe&63)<<12|(ye&63)<<6|Ae&63,ge>65535&&ge<1114112&&(v=ge))}}v===null?(v=65533,ne=1):v>65535&&(v-=65536,g.push(v>>>10&1023|55296),v=56320|v&1023),g.push(v),I+=ne}return Nt(g)}const Ve=4096;function Nt(p){const c=p.length;if(c<=Ve)return String.fromCharCode.apply(String,p);let u="",g=0;for(;gg)&&(u=g);let I="";for(let x=c;xg&&(c=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),uu)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(c,u,g){c=c>>>0,u=u>>>0,g||U(c,u,this.length);let I=this[c],x=1,v=0;for(;++v>>0,u=u>>>0,g||U(c,u,this.length);let I=this[c+--u],x=1;for(;u>0&&(x*=256);)I+=this[c+--u]*x;return I},a.prototype.readUint8=a.prototype.readUInt8=function(c,u){return c=c>>>0,u||U(c,1,this.length),this[c]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(c,u){return c=c>>>0,u||U(c,2,this.length),this[c]|this[c+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(c,u){return c=c>>>0,u||U(c,2,this.length),this[c]<<8|this[c+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(c,u){return c=c>>>0,u||U(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(c,u){return c=c>>>0,u||U(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},a.prototype.readBigUInt64LE=yt(function(c){c=c>>>0,He(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&St(c,this.length-8);const I=u+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,x=this[++c]+this[++c]*2**8+this[++c]*2**16+g*2**24;return BigInt(I)+(BigInt(x)<>>0,He(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&St(c,this.length-8);const I=u*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],x=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g;return(BigInt(I)<>>0,u=u>>>0,g||U(c,u,this.length);let I=this[c],x=1,v=0;for(;++v=x&&(I-=Math.pow(2,8*u)),I},a.prototype.readIntBE=function(c,u,g){c=c>>>0,u=u>>>0,g||U(c,u,this.length);let I=u,x=1,v=this[c+--I];for(;I>0&&(x*=256);)v+=this[c+--I]*x;return x*=128,v>=x&&(v-=Math.pow(2,8*u)),v},a.prototype.readInt8=function(c,u){return c=c>>>0,u||U(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},a.prototype.readInt16LE=function(c,u){c=c>>>0,u||U(c,2,this.length);const g=this[c]|this[c+1]<<8;return g&32768?g|4294901760:g},a.prototype.readInt16BE=function(c,u){c=c>>>0,u||U(c,2,this.length);const g=this[c+1]|this[c]<<8;return g&32768?g|4294901760:g},a.prototype.readInt32LE=function(c,u){return c=c>>>0,u||U(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},a.prototype.readInt32BE=function(c,u){return c=c>>>0,u||U(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},a.prototype.readBigInt64LE=yt(function(c){c=c>>>0,He(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&St(c,this.length-8);const I=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(g<<24);return(BigInt(I)<>>0,He(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&St(c,this.length-8);const I=(u<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(I)<>>0,u||U(c,4,this.length),r.read(this,c,!0,23,4)},a.prototype.readFloatBE=function(c,u){return c=c>>>0,u||U(c,4,this.length),r.read(this,c,!1,23,4)},a.prototype.readDoubleLE=function(c,u){return c=c>>>0,u||U(c,8,this.length),r.read(this,c,!0,52,8)},a.prototype.readDoubleBE=function(c,u){return c=c>>>0,u||U(c,8,this.length),r.read(this,c,!1,52,8)};function Y(p,c,u,g,I,x){if(!a.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>I||cp.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(c,u,g,I){if(c=+c,u=u>>>0,g=g>>>0,!I){const ne=Math.pow(2,8*g)-1;Y(this,c,u,g,ne,0)}let x=1,v=0;for(this[u]=c&255;++v>>0,g=g>>>0,!I){const ne=Math.pow(2,8*g)-1;Y(this,c,u,g,ne,0)}let x=g-1,v=1;for(this[u+x]=c&255;--x>=0&&(v*=256);)this[u+x]=c/v&255;return u+g},a.prototype.writeUint8=a.prototype.writeUInt8=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,1,255,0),this[u]=c&255,u+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,2,65535,0),this[u]=c&255,this[u+1]=c>>>8,u+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,2,65535,0),this[u]=c>>>8,this[u+1]=c&255,u+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,4,4294967295,0),this[u+3]=c>>>24,this[u+2]=c>>>16,this[u+1]=c>>>8,this[u]=c&255,u+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,4,4294967295,0),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4};function S(p,c,u,g,I){Oe(c,g,I,p,u,7);let x=Number(c&BigInt(4294967295));p[u++]=x,x=x>>8,p[u++]=x,x=x>>8,p[u++]=x,x=x>>8,p[u++]=x;let v=Number(c>>BigInt(32)&BigInt(4294967295));return p[u++]=v,v=v>>8,p[u++]=v,v=v>>8,p[u++]=v,v=v>>8,p[u++]=v,u}function k(p,c,u,g,I){Oe(c,g,I,p,u,7);let x=Number(c&BigInt(4294967295));p[u+7]=x,x=x>>8,p[u+6]=x,x=x>>8,p[u+5]=x,x=x>>8,p[u+4]=x;let v=Number(c>>BigInt(32)&BigInt(4294967295));return p[u+3]=v,v=v>>8,p[u+2]=v,v=v>>8,p[u+1]=v,v=v>>8,p[u]=v,u+8}a.prototype.writeBigUInt64LE=yt(function(c,u=0){return S(this,c,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=yt(function(c,u=0){return k(this,c,u,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(c,u,g,I){if(c=+c,u=u>>>0,!I){const xe=Math.pow(2,8*g-1);Y(this,c,u,g,xe-1,-xe)}let x=0,v=1,ne=0;for(this[u]=c&255;++x>0)-ne&255;return u+g},a.prototype.writeIntBE=function(c,u,g,I){if(c=+c,u=u>>>0,!I){const xe=Math.pow(2,8*g-1);Y(this,c,u,g,xe-1,-xe)}let x=g-1,v=1,ne=0;for(this[u+x]=c&255;--x>=0&&(v*=256);)c<0&&ne===0&&this[u+x+1]!==0&&(ne=1),this[u+x]=(c/v>>0)-ne&255;return u+g},a.prototype.writeInt8=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,1,127,-128),c<0&&(c=255+c+1),this[u]=c&255,u+1},a.prototype.writeInt16LE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,2,32767,-32768),this[u]=c&255,this[u+1]=c>>>8,u+2},a.prototype.writeInt16BE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,2,32767,-32768),this[u]=c>>>8,this[u+1]=c&255,u+2},a.prototype.writeInt32LE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,4,2147483647,-2147483648),this[u]=c&255,this[u+1]=c>>>8,this[u+2]=c>>>16,this[u+3]=c>>>24,u+4},a.prototype.writeInt32BE=function(c,u,g){return c=+c,u=u>>>0,g||Y(this,c,u,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4},a.prototype.writeBigInt64LE=yt(function(c,u=0){return S(this,c,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=yt(function(c,u=0){return k(this,c,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function z(p,c,u,g,I,x){if(u+g>p.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function q(p,c,u,g,I){return c=+c,u=u>>>0,I||z(p,c,u,4),r.write(p,c,u,g,23,4),u+4}a.prototype.writeFloatLE=function(c,u,g){return q(this,c,u,!0,g)},a.prototype.writeFloatBE=function(c,u,g){return q(this,c,u,!1,g)};function Q(p,c,u,g,I){return c=+c,u=u>>>0,I||z(p,c,u,8),r.write(p,c,u,g,52,8),u+8}a.prototype.writeDoubleLE=function(c,u,g){return Q(this,c,u,!0,g)},a.prototype.writeDoubleBE=function(c,u,g){return Q(this,c,u,!1,g)},a.prototype.copy=function(c,u,g,I){if(!a.isBuffer(c))throw new TypeError("argument should be a Buffer");if(g||(g=0),!I&&I!==0&&(I=this.length),u>=c.length&&(u=c.length),u||(u=0),I>0&&I=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),c.length-u>>0,g=g===void 0?this.length:g>>>0,c||(c=0);let x;if(typeof c=="number")for(x=u;x2**32?I=De(String(u)):typeof u=="bigint"&&(I=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(I=De(I)),I+="n"),g+=` It must be ${c}. Received ${I}`,g},RangeError);function De(p){let c="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)c=`_${p.slice(u-3,u)}${c}`;return`${p.slice(0,u)}${c}`}function de(p,c,u){He(c,"offset"),(p[c]===void 0||p[c+u]===void 0)&&St(c,p.length-(u+1))}function Oe(p,c,u,g,I,x){if(p>u||p= 0${v} and < 2${v} ** ${(x+1)*8}${v}`:ne=`>= -(2${v} ** ${(x+1)*8-1}${v}) and < 2 ** ${(x+1)*8-1}${v}`,new le.ERR_OUT_OF_RANGE("value",ne,p)}de(g,I,x)}function He(p,c){if(typeof p!="number")throw new le.ERR_INVALID_ARG_TYPE(c,"number",p)}function St(p,c,u){throw Math.floor(p)!==p?(He(p,u),new le.ERR_OUT_OF_RANGE("offset","an integer",p)):c<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${c}`,p)}const Vr=/[^+/0-9A-Za-z-_]/g;function wi(p){if(p=p.split("=")[0],p=p.trim().replace(Vr,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function qr(p,c){c=c||1/0;let u;const g=p.length;let I=null;const x=[];for(let v=0;v55295&&u<57344){if(!I){if(u>56319){(c-=3)>-1&&x.push(239,191,189);continue}else if(v+1===g){(c-=3)>-1&&x.push(239,191,189);continue}I=u;continue}if(u<56320){(c-=3)>-1&&x.push(239,191,189),I=u;continue}u=(I-55296<<10|u-56320)+65536}else I&&(c-=3)>-1&&x.push(239,191,189);if(I=null,u<128){if((c-=1)<0)break;x.push(u)}else if(u<2048){if((c-=2)<0)break;x.push(u>>6|192,u&63|128)}else if(u<65536){if((c-=3)<0)break;x.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((c-=4)<0)break;x.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return x}function rs(p){const c=[];for(let u=0;u>8,I=u%256,x.push(I),x.push(g);return x}function xi(p){return e.toByteArray(wi(p))}function Qr(p,c,u,g){let I;for(I=0;I=c.length||I>=p.length);++I)c[I+u]=p[I];return I}function rt(p,c){return p instanceof c||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===c.name}function Xr(p){return p!==p}const vn=function(){const p="0123456789abcdef",c=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let I=0;I<16;++I)c[g+I]=p[u]+p[I]}return c}();function yt(p){return typeof BigInt>"u"?Ai:p}function Ai(){throw new Error("BigInt not supported")}})(oe);const Tl=()=>{globalThis.Buffer||(globalThis.Buffer=oe.Buffer)};var Ni=function(t,e){return Ni=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ni(t,e)};function bt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ni(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function kl(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(h){try{d(n.next(h))}catch(f){s(f)}}function l(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?o(h.value):i(h.value).then(a,l)}d((n=n.apply(t,e||[])).next())})}function os(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(d){return function(h){return l([d,h])}}function l(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kt(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function br(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n1||a(m,y)})})}function a(m,y){try{l(n[m](y))}catch(w){f(o[0][3],w)}}function l(m){m.value instanceof wr?Promise.resolve(m.value.v).then(d,h):f(o[0][2],m)}function d(m){a("next",m)}function h(m){a("throw",m)}function f(m,y){m(y),o.shift(),o.length&&a(o[0][0],o[0][1])}}function zl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Ir=="function"?Ir(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(d){o({value:d,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function pe(t){return typeof t=="function"}function Ci(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Si=Ci(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription: `+r.map(function(n,i){return i+1+") "+n.toString()}).join(` `):"",this.name="UnsubscriptionError",this.errors=r}});function Nn(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var ht=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Ir(s),l=a.next();!l.done;l=a.next()){var d=l.value;d.remove(this)}}catch(A){e={error:A}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}else s.remove(this);var h=this.initialTeardown;if(pe(h))try{h()}catch(A){o=A instanceof Si?A.errors:[A]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=Ir(f),y=m.next();!y.done;y=m.next()){var w=y.value;try{cs(w)}catch(A){o=o??[],A instanceof Si?o=br(br([],Kt(o)),Kt(A.errors)):o.push(A)}}}catch(A){n={error:A}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}if(o)throw new Si(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)cs(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Nn(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Nn(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ss=ht.EMPTY;function as(t){return t instanceof ht||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}function cs(t){pe(t)?t():t.unsubscribe()}var us={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ls={setTimeout:function(t,e){for(var r=[],n=2;n0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?ss:(this.currentObservers=null,a.push(r),new ht(function(){n.currentObservers=null,Nn(a,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,s=n.isStopped;i?r.error(o):s&&r.complete()},e.prototype.asObservable=function(){var r=new Ze;return r.source=this,r},e.create=function(r,n){return new ps(r,n)},e}(Ze),ps=function(t){bt(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:ss},e}(Me),ze=function(t){bt(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(Me),ki={now:function(){return(ki.delegate||Date).now()},delegate:void 0},fs=function(t){bt(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ki);var o=t.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,s=n._infiniteTimeWindow,a=n._timestampProvider,l=n._windowTime;i||(o.push(r),!s&&o.push(a.now()+l)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,s=i._buffer,a=s.slice(),l=0;l=2;return function(n){return n.pipe(En,Sd(1),r?Cd(e):Dd(function(){return new Bi}))}}function zs(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new Me}:e,n=t.resetOnError,i=n===void 0?!0:n,o=t.resetOnComplete,s=o===void 0?!0:o,a=t.resetOnRefCountZero,l=a===void 0?!0:a;return function(d){var h,f,m,y=0,w=!1,A=!1,T=function(){f==null||f.unsubscribe(),f=void 0},M=function(){T(),h=m=void 0,w=A=!1},B=function(){var C=h;M(),C==null||C.unsubscribe()};return qe(function(C,b){y++,!A&&!w&&T();var D=m=m??r();b.add(function(){y--,y===0&&!A&&!w&&(f=Li(B,l))}),D.subscribe(b),!h&&y>0&&(h=new xr({next:function(j){return D.next(j)},error:function(j){A=!0,T(),f=Li(M,i,j),D.error(j)},complete:function(){w=!0,T(),f=Li(M,s),D.complete()}}),Xe(C).subscribe(h))})(d)}}function Li(t,e){for(var r=[],n=2;n{const n=e.isOk()?{type:"Ok",value:e.value}:{type:"Err",value:e.error},i=r.withStackTrace?new Error().stack:void 0;return{data:n,message:t,stack:i}};function Pi(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(h){try{d(n.next(h))}catch(f){s(f)}}function l(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?o(h.value):i(h.value).then(a,l)}d((n=n.apply(t,[])).next())})}function Ls(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function nr(t){return this instanceof nr?(this.v=t,this):new nr(t)}function Bd(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(m){n[m]&&(i[m]=function(y){return new Promise(function(w,A){o.push([m,y,w,A])>1||a(m,y)})})}function a(m,y){try{l(n[m](y))}catch(w){f(o[0][3],w)}}function l(m){m.value instanceof nr?Promise.resolve(m.value.v).then(d,h):f(o[0][2],m)}function d(m){a("next",m)}function h(m){a("throw",m)}function f(m,y){m(y),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Ld(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(s){return(r=!r)?{value:nr(t[i](s)),done:i==="return"}:o?o(s):s}:o}}function Pd(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Ls=="function"?Ls(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(d){o({value:d,done:a})},s)}}class te{constructor(e){this._promise=e}static fromSafePromise(e){const r=e.then(n=>new ir(n));return new te(r)}static fromPromise(e,r){const n=e.then(i=>new ir(i)).catch(i=>new Nr(r(i)));return new te(n)}static combine(e){return Rd(e)}static combineWithAllErrors(e){return Ud(e)}map(e){return new te(this._promise.then(r=>Pi(this,void 0,void 0,function*(){return r.isErr()?new Nr(r.error):new ir(yield e(r.value))})))}mapErr(e){return new te(this._promise.then(r=>Pi(this,void 0,void 0,function*(){return r.isOk()?new ir(r.value):new Nr(yield e(r.error))})))}andThen(e){return new te(this._promise.then(r=>{if(r.isErr())return new Nr(r.error);const n=e(r.value);return n instanceof te?n._promise:n}))}orElse(e){return new te(this._promise.then(r=>Pi(this,void 0,void 0,function*(){return r.isErr()?e(r.error):new ir(r.value)})))}match(e,r){return this._promise.then(n=>n.match(e,r))}unwrapOr(e){return this._promise.then(r=>r.unwrapOr(e))}safeUnwrap(){return Bd(this,arguments,function*(){return yield nr(yield nr(yield*Ld(Pd(yield nr(this._promise.then(r=>r.safeUnwrap()))))))})}then(e,r){return this._promise.then(e,r)}}const $e=t=>new te(Promise.resolve(new ir(t))),Et=t=>new te(Promise.resolve(new Nr(t)));te.fromPromise,te.fromSafePromise;const Od=t=>e=>[...e,t],Ps=t=>t.reduce((e,r)=>e.isOk()?r.isErr()?se(r.error):e.map(Od(r.value)):e,re([])),Rd=t=>te.fromSafePromise(Promise.all(t)).andThen(Ps),Os=t=>t.reduce((e,r)=>r.isErr()?e.isErr()?se([...e.error,r.error]):se([r.error]):e.isErr()?e:re([...e.value,r.value]),re([])),Ud=t=>te.fromSafePromise(Promise.all(t)).andThen(Os);var vr;(function(t){function e(i,o){return(...s)=>{try{const a=i(...s);return re(a)}catch(a){return se(o?o(a):a)}}}t.fromThrowable=e;function r(i){return Ps(i)}t.combine=r;function n(i){return Os(i)}t.combineWithAllErrors=n})(vr||(vr={}));const re=t=>new ir(t),se=t=>new Nr(t);class ir{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return re(e(this.value))}mapErr(e){return re(this.value)}andThen(e){return e(this.value)}orElse(e){return re(this.value)}asyncAndThen(e){return e(this.value)}asyncMap(e){return te.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,r){return e(this.value)}safeUnwrap(){const e=this.value;return function*(){return e}()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Bs("Called `_unsafeUnwrapErr` on an Ok",this,e)}}class Nr{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return se(this.error)}mapErr(e){return se(e(this.error))}andThen(e){return se(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return Et(this.error)}asyncMap(e){return Et(this.error)}unwrapOr(e){return e}match(e,r){return r(this.error)}safeUnwrap(){const e=this.error;return function*(){throw yield se(e),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(e){throw Bs("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}}vr.fromThrowable;const Rs=({maxDelayTime:t=1e4,multiplier:e=2,timeout:r,interval:n=2e3}={})=>{const i=new Me;let o=0;const s=wt(Ar(0),i.pipe(Be(()=>(o=o+1,o)))).pipe(st(l=>{const d=l*n*e,h=d>t?t:d;return Jr(h).pipe(Be(()=>re(l)))})),a=r?wt(s,Jr(r).pipe(Be(()=>se({error:"timeout"})))):s;return{trigger:i,withBackoff$:a}},at=t=>t,Tt=t=>{try{return re(JSON.parse(t))}catch(e){return se(at(e))}},Us=t=>t,Wd=t=>te.fromPromise(t,Us).mapErr(e=>({reason:"FailedToFetch",error:e,status:0})),Oi=t=>Wd(t).andThen(e=>te.fromPromise(e.text(),Us).andThen(r=>r?Tt(r):$e(r)).mapErr(r=>({status:e.status,reason:"FailedToParseResponseToJson",error:r})).andThen(r=>e.ok?$e({status:e.status,data:r}):Et({status:e.status,reason:"RequestStatusNotOk",data:r}))),Zd={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Ws={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},ve={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ye={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Bt={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class N{static getFirstMatch(e,r){const n=r.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,r){const n=r.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,r,n){if(e.test(r))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(r.push(0),!(r[0]===1&&r[1]<5)){if(r[0]===1&&r[1]<6)return"Cupcake";if(r[0]===1&&r[1]>=6)return"Donut";if(r[0]===2&&r[1]<2)return"Eclair";if(r[0]===2&&r[1]===2)return"Froyo";if(r[0]===2&&r[1]>2)return"Gingerbread";if(r[0]===3)return"Honeycomb";if(r[0]===4&&r[1]<1)return"Ice Cream Sandwich";if(r[0]===4&&r[1]<4)return"Jelly Bean";if(r[0]===4&&r[1]>=4)return"KitKat";if(r[0]===5)return"Lollipop";if(r[0]===6)return"Marshmallow";if(r[0]===7)return"Nougat";if(r[0]===8)return"Oreo";if(r[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,r,n=!1){const i=N.getVersionPrecision(e),o=N.getVersionPrecision(r);let s=Math.max(i,o),a=0;const l=N.map([e,r],d=>{const h=s-N.getVersionPrecision(d),f=d+new Array(h+1).join(".0");return N.map(f.split("."),m=>new Array(20-m.length).join("0")+m).reverse()});for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{n[l]=s[l]})}return e}static getBrowserAlias(e){return Zd[e]}static getBrowserTypeByAlias(e){return Ws[e]||""}}const fe=/version\/(\d+(\.?_?\d+)+)/i,_d=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=N.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=N.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=N.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=N.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=N.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=N.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=N.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=N.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=N.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=N.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=N.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=N.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=N.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=N.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=N.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=N.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=N.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=N.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=N.getFirstMatch(fe,t)||N.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=N.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=N.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=N.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=N.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=N.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=N.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=N.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=N.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=N.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=N.getFirstMatch(fe,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=/^(.*)\/(.*) /,r=/^(.*)\/(.*)[ \t]\((.*)/,i=t.search("\\(")!==-1?r:e;return{name:N.getFirstMatch(i,t),version:N.getSecondMatch(i,t)}}}],Fd=[{test:[/Roku\/DVP/],describe(t){const e=N.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Ye.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=N.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Ye.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=N.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=N.getWindowsVersionName(e);return{name:Ye.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Ye.iOS},r=N.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=N.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=N.getMacOSVersionName(e),n={name:Ye.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=N.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Ye.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=N.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=N.getAndroidVersionName(e),n={name:Ye.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=N.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:Ye.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=N.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||N.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||N.getFirstMatch(/\bbb(\d+)/i,t);return{name:Ye.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=N.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Ye.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=N.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Ye.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:Ye.Linux}}},{test:[/CrOS/],describe(){return{name:Ye.ChromeOS}}},{test:[/PlayStation 4/],describe(t){const e=N.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:Ye.PlayStation4,version:e}}}],Gd=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){const e=N.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:ve.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:ve.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:ve.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:ve.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:ve.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:ve.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:ve.tablet}}},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=N.getFirstMatch(/(ipod|iphone)/i,t);return{type:ve.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:ve.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:ve.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:ve.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:ve.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:ve.mobile,vendor:"Microsoft"}}},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:ve.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:ve.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:ve.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:ve.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:ve.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:ve.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:ve.tv}}}],Hd=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Bt.Blink};const r=N.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Bt.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){const e={name:Bt.Trident},r=N.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){return t.test(/presto/i)},describe(t){const e={name:Bt.Presto},r=N.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:Bt.Gecko},r=N.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Bt.Blink}}},{test:[/(apple)?webkit/i],describe(t){const e={name:Bt.WebKit},r=N.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class Zs{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=N.find(_d,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=N.find(Fd,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=N.find(Gd,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=N.find(Hd,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return N.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const i={};let o=0;if(Object.keys(e).forEach(a=>{const l=e[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(r[a]=l,n+=1)}),n>0){const a=Object.keys(r),l=N.find(a,h=>this.isOS(h));if(l){const h=this.satisfies(r[l]);if(h!==void 0)return h}const d=N.find(a,h=>this.isPlatform(h));if(d){const h=this.satisfies(r[d]);if(h!==void 0)return h}}if(o>0){const a=Object.keys(i),l=N.find(a,d=>this.isBrowser(d,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const o=N.getBrowserTypeByAlias(i);return r&&o&&(i=o.toLowerCase()),i===n}compareVersion(e){let r=[0],n=e,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),r.indexOf(N.compareVersions(o,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(r=>this.is(r))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */class _s{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new Zs(e,r)}static parse(e){return new Zs(e).getResult()}static get BROWSER_MAP(){return Ws}static get ENGINE_MAP(){return Bt}static get OS_MAP(){return Ye}static get PLATFORMS_MAP(){return ve}}const Cr=(t=window.navigator.userAgent)=>{const e=_s.parse(t);return e.platform.type==="mobile"||e.platform.type==="tablet"},Ri={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function Ui(t,e,r,n=!1){const i=String(e),o=(a,l)=>`\x1B[${l[0]}m${a}\x1B[${l[1]}m`,s=(a,l)=>l!=null&&typeof l=="string"?o(a,Ri[l]):l!=null&&Array.isArray(l)?l.reduce((d,h)=>s(d,h),a):l!=null&&l[a.trim()]!=null?s(a,l[a.trim()]):l!=null&&l["*"]!=null?s(a,l["*"]):a;return i.replace(/{{(.+?)}}/g,(a,l)=>{var h;const d=r[l]!=null?r[l]:n?"":a;return t.stylePrettyLogs?s(d,(h=t==null?void 0:t.prettyLogStyles)==null?void 0:h[l])+o("",Ri.reset):d})}function Fs(t){const e=new Set;return JSON.stringify(t,(r,n)=>{if(typeof n=="object"&&n!==null){if(e.has(n))return"[Circular]";e.add(n)}return n})}function _e(t,e){const r={seen:[],stylize:Gs};return e!=null&&qs(r,e),Sr(r.showHidden)&&(r.showHidden=!1),Sr(r.depth)&&(r.depth=2),Sr(r.colors)&&(r.colors=!0),Sr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Yd),zn(r,t,r.depth)}_e.colors=Ri,_e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function $d(t){return typeof t=="boolean"}function Sr(t){return t==null}function Gs(t){return t}function Yd(t,e){var n,i,o,s;const r=_e.styles[e];return r!=null&&((i=(n=_e==null?void 0:_e.colors)==null?void 0:n[r])==null?void 0:i[0])!=null&&((s=(o=_e==null?void 0:_e.colors)==null?void 0:o[r])==null?void 0:s[1])!=null?"\x1B["+_e.colors[r][0]+"m"+t+"\x1B["+_e.colors[r][1]+"m":t}function kn(t){return typeof t=="function"}function Hs(t){return typeof t=="string"}function Vd(t){return typeof t=="number"}function $s(t){return t===null}function Ys(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Wi(t){return jn(t)&&_i(t)==="[object RegExp]"}function jn(t){return typeof t=="object"&&t!==null}function Zi(t){return jn(t)&&(_i(t)==="[object Error]"||t instanceof Error)}function Vs(t){return jn(t)&&_i(t)==="[object Date]"}function _i(t){return Object.prototype.toString.call(t)}function qd(t){const e={};return t.forEach(r=>{e[r]=!0}),e}function Qd(t,e,r,n,i){const o=[];for(let s=0,a=e.length;s{s.match(/^\d+$/)||o.push(Gi(t,e,r,n,s,!0))}),o}function Fi(t){return"["+Error.prototype.toString.call(t)+"]"}function zn(t,e,r=0){if(t.customInspect&&e!=null&&kn(e)&&(e==null?void 0:e.inspect)!==_e&&!(e!=null&&e.constructor&&(e==null?void 0:e.constructor.prototype)===e)){if(typeof e.inspect!="function"&&e.toString!=null)return e.toString();let h=e==null?void 0:e.inspect(r,t);return Hs(h)||(h=zn(t,h,r)),h}const n=Lt(t,e);if(n)return n;let i=Object.keys(e);const o=qd(i);try{t.showHidden&&Object.getOwnPropertyNames&&(i=Object.getOwnPropertyNames(e))}catch{}if(Zi(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Fi(e);if(i.length===0)if(kn(t.stylize)){if(kn(e)){const h=e.name?": "+e.name:"";return t.stylize("[Function"+h+"]","special")}if(Wi(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Vs(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Zi(e))return Fi(e)}else return e;let s="",a=!1,l=[`{ `,` }`];if(Array.isArray(e)&&(a=!0,l=[`[ `,` ]`]),kn(e)&&(s=" [Function"+(e.name?": "+e.name:"")+"]"),Wi(e)&&(s=" "+RegExp.prototype.toString.call(e)),Vs(e)&&(s=" "+Date.prototype.toUTCString.call(e)),Zi(e)&&(s=" "+Fi(e)),i.length===0&&(!a||e.length==0))return l[0]+s+l[1];if(r<0)return Wi(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);let d;return a?d=Qd(t,e,r,o,i):d=i.map(h=>Gi(t,e,r,o,h,a)),t.seen.pop(),Xd(d,s,l)}function Gi(t,e,r,n,i,o){let s,a,l;l={value:void 0};try{l.value=e[i]}catch{}try{Object.getOwnPropertyDescriptor&&(l=Object.getOwnPropertyDescriptor(e,i)||l)}catch{}if(l.get?l.set?a=t.stylize("[Getter/Setter]","special"):a=t.stylize("[Getter]","special"):l.set&&(a=t.stylize("[Setter]","special")),Ys(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(l.value)<0?($s(r)?a=zn(t,l.value,void 0):a=zn(t,l.value,r-1),a.indexOf(` `)>-1&&(o?a=a.split(` `).map(d=>" "+d).join(` `).substr(2):a=` `+a.split(` `).map(d=>" "+d).join(` `))):a=t.stylize("[Circular]","special")),Sr(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,"\\'").replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function Lt(t,e){if(Sr(e))return t.stylize("undefined","undefined");if(Hs(e)){const r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\\'")+"'";return t.stylize(r,"string")}if(Vd(e))return t.stylize(""+e,"number");if($d(e))return t.stylize(""+e,"boolean");if($s(e))return t.stylize("null","null")}function Xd(t,e,r){return r[0]+(e===""?"":e+` `)+" "+t.join(`, `)+" "+r[1]}function qs(t,e){if(!e||!jn(e))return t;const r=Object.keys(e);let n=r.length;for(;n--;)t[r[n]]=e[r[n]];return t}function Jd(t,...e){const r={seen:[],stylize:Gs};t!=null&&qs(r,t);const n=e[0];let i=0,o="",s="";if(typeof n=="string"){if(e.length===1)return n;let a,l=0;for(let d=0;d!o.includes("Error: ")))==null?void 0:i[t])}function Qs(t){var e,r,n;return(n=(r=(e=t==null?void 0:t.stack)==null?void 0:e.split(` `))==null?void 0:r.filter(i=>!i.includes("Error: ")))==null?void 0:n.reduce((i,o)=>(i.push(Xs(o)),i),[])}function Xs(t){const e=globalThis.location.origin,r={fullFilePath:void 0,fileName:void 0,fileNameWithLine:void 0,fileColumn:void 0,fileLine:void 0,filePath:void 0,filePathWithLine:void 0,method:void 0};if(t!=null){const n=t.match(eh);if(n){r.filePath=n[1].replace(/\?.*$/,""),r.fullFilePath=`${e}${r.filePath}`;const i=r.filePath.split("/");r.fileName=i[i.length-1],r.fileLine=n[2],r.fileColumn=n[3],r.filePathWithLine=`${r.filePath}:${r.fileLine}`,r.fileNameWithLine=`${r.fileName}:${r.fileLine}`}}return r}function Hi(t){return t instanceof Error}function nh(t,e){return t.reduce((r,n)=>(Hi(n)?r.errors.push(ih(n,e)):r.args.push(n),r),{args:[],errors:[]})}function ih(t,e){const r=Qs(t).map(i=>Ui(e,e.prettyErrorStackTemplate,{...i},!0)),n={errorName:` ${t.name} `,errorMessage:t.message,errorStack:r.join(` `)};return Ui(e,e.prettyErrorTemplate,n)}function oh(t,e,r,n){const i=(r.length>0&&e.length>0?` `:"")+r.join(` `);n.prettyInspectOptions.colors=n.stylePrettyLogs,console.log(t+Jd(n.prettyInspectOptions,...e)+i)}function sh(t){console.log(Fs(t))}function I0(t){}function ct(t,e=2,r=0){return t!=null&&isNaN(t)?"":(t=t!=null?t+r:t,e===2?t==null?"--":t<10?"0"+t:t.toString():t==null?"---":t<10?"00"+t:t<100?"0"+t:t.toString())}class ah{constructor(e,r,n=4){var l,d,h,f,m,y,w;this.logObj=r,this.stackDepthLevel=n;const i=![typeof window,typeof document].includes("undefined"),o=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";this.runtime=i?"browser":o?"nodejs":"unknown";const s=i?(((window==null?void 0:window.chrome)||window.Intl&&(Intl==null?void 0:Intl.v8BreakIterator))&&"CSS"in window)!=null:!1,a=i?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1;this.stackDepthLevel=a?4:this.stackDepthLevel,this.settings={type:(e==null?void 0:e.type)??"pretty",name:e==null?void 0:e.name,parentNames:e==null?void 0:e.parentNames,minLevel:(e==null?void 0:e.minLevel)??0,argumentsArrayName:e==null?void 0:e.argumentsArrayName,hideLogPositionForProduction:(e==null?void 0:e.hideLogPositionForProduction)??!1,prettyLogTemplate:(e==null?void 0:e.prettyLogTemplate)??"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} {{filePathWithLine}}{{nameWithDelimiterPrefix}} ",prettyErrorTemplate:(e==null?void 0:e.prettyErrorTemplate)??` {{errorName}} {{errorMessage}} error stack: {{errorStack}}`,prettyErrorStackTemplate:(e==null?void 0:e.prettyErrorStackTemplate)??` • {{fileName}} {{method}} {{filePathWithLine}}`,prettyErrorParentNamesSeparator:(e==null?void 0:e.prettyErrorParentNamesSeparator)??":",prettyErrorLoggerNameDelimiter:(e==null?void 0:e.prettyErrorLoggerNameDelimiter)??" ",stylePrettyLogs:(e==null?void 0:e.stylePrettyLogs)??!0,prettyLogTimeZone:(e==null?void 0:e.prettyLogTimeZone)??"UTC",prettyLogStyles:(e==null?void 0:e.prettyLogStyles)??{logLevelName:{"*":["bold","black","bgWhiteBright","dim"],SILLY:["bold","white"],TRACE:["bold","whiteBright"],DEBUG:["bold","green"],INFO:["bold","blue"],WARN:["bold","yellow"],ERROR:["bold","red"],FATAL:["bold","redBright"]},dateIsoStr:"white",filePathWithLine:"white",name:["white","bold"],nameWithDelimiterPrefix:["white","bold"],nameWithDelimiterSuffix:["white","bold"],errorName:["bold","bgRedBright","whiteBright"],fileName:["yellow"],fileNameWithLine:"white"},prettyInspectOptions:(e==null?void 0:e.prettyInspectOptions)??{colors:!0,compact:!1,depth:1/0},metaProperty:(e==null?void 0:e.metaProperty)??"_meta",maskPlaceholder:(e==null?void 0:e.maskPlaceholder)??"[***]",maskValuesOfKeys:(e==null?void 0:e.maskValuesOfKeys)??["password"],maskValuesOfKeysCaseInsensitive:(e==null?void 0:e.maskValuesOfKeysCaseInsensitive)??!1,maskValuesRegEx:e==null?void 0:e.maskValuesRegEx,prefix:[...(e==null?void 0:e.prefix)??[]],attachedTransports:[...(e==null?void 0:e.attachedTransports)??[]],overwrite:{mask:(l=e==null?void 0:e.overwrite)==null?void 0:l.mask,toLogObj:(d=e==null?void 0:e.overwrite)==null?void 0:d.toLogObj,addMeta:(h=e==null?void 0:e.overwrite)==null?void 0:h.addMeta,formatMeta:(f=e==null?void 0:e.overwrite)==null?void 0:f.formatMeta,formatLogObj:(m=e==null?void 0:e.overwrite)==null?void 0:m.formatLogObj,transportFormatted:(y=e==null?void 0:e.overwrite)==null?void 0:y.transportFormatted,transportJSON:(w=e==null?void 0:e.overwrite)==null?void 0:w.transportJSON}},this.settings.stylePrettyLogs=this.settings.stylePrettyLogs&&i&&!s?!1:this.settings.stylePrettyLogs}log(e,r,...n){var f,m,y,w,A,T,M,B,C,b,D,j,_,W;if(e0?this._mask(i):i,s=this.logObj!=null?this._recursiveCloneAndExecuteFunctions(this.logObj):void 0,a=((y=this.settings.overwrite)==null?void 0:y.toLogObj)!=null?(w=this.settings.overwrite)==null?void 0:w.toLogObj(o,s):this._toLogObj(o,s),l=((A=this.settings.overwrite)==null?void 0:A.addMeta)!=null?(T=this.settings.overwrite)==null?void 0:T.addMeta(a,e,r):this._addMetaToLogObj(a,e,r);let d,h;return((M=this.settings.overwrite)==null?void 0:M.formatMeta)!=null&&(d=(B=this.settings.overwrite)==null?void 0:B.formatMeta(l==null?void 0:l[this.settings.metaProperty])),((C=this.settings.overwrite)==null?void 0:C.formatLogObj)!=null&&(h=(b=this.settings.overwrite)==null?void 0:b.formatLogObj(o,this.settings)),this.settings.type==="pretty"&&(d=d??this._prettyFormatLogObjMeta(l==null?void 0:l[this.settings.metaProperty]),h=h??nh(o,this.settings)),d!=null&&h!=null?((D=this.settings.overwrite)==null?void 0:D.transportFormatted)!=null?(j=this.settings.overwrite)==null||j.transportFormatted(d,h.args,h.errors,this.settings):oh(d,h.args,h.errors,this.settings):((_=this.settings.overwrite)==null?void 0:_.transportJSON)!=null?(W=this.settings.overwrite)==null||W.transportJSON(l):this.settings.type!=="hidden"&&sh(l),this.settings.attachedTransports!=null&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach($=>{$(l)}),l}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,r){var o,s,a;const n={...this.settings,...e,parentNames:((o=this.settings)==null?void 0:o.parentNames)!=null&&((s=this.settings)==null?void 0:s.name)!=null?[...this.settings.parentNames,this.settings.name]:((a=this.settings)==null?void 0:a.name)!=null?[this.settings.name]:void 0,prefix:[...this.settings.prefix,...(e==null?void 0:e.prefix)??[]]};return new this.constructor(n,r??this.logObj,this.stackDepthLevel)}_mask(e){const r=this.settings.maskValuesOfKeysCaseInsensitive!==!0?this.settings.maskValuesOfKeys:this.settings.maskValuesOfKeys.map(n=>n.toLowerCase());return e==null?void 0:e.map(n=>this._recursiveCloneAndMaskValuesOfKeys(n,r))}_recursiveCloneAndMaskValuesOfKeys(e,r,n=[]){return n.includes(e)?{...e}:(typeof e=="object"&&e!=null&&n.push(e),void 0?e:e instanceof Map?new Map(e):e instanceof Set?new Set(e):Array.isArray(e)?e.map(i=>this._recursiveCloneAndMaskValuesOfKeys(i,r,n)):e instanceof Date?new Date(e.getTime()):Hi(e)?Object.getOwnPropertyNames(e).reduce((i,o)=>{var s;return i[o]=r.includes(((s=this.settings)==null?void 0:s.maskValuesOfKeysCaseInsensitive)!==!0?o:o.toLowerCase())?this.settings.maskPlaceholder:this._recursiveCloneAndMaskValuesOfKeys(e[o],r,n),i},this._cloneError(e)):e!=null&&typeof e=="object"?Object.getOwnPropertyNames(e).reduce((i,o)=>{var s;return i[o]=r.includes(((s=this.settings)==null?void 0:s.maskValuesOfKeysCaseInsensitive)!==!0?o:o.toLowerCase())?this.settings.maskPlaceholder:this._recursiveCloneAndMaskValuesOfKeys(e[o],r,n),i},Object.create(Object.getPrototypeOf(e))):(i=>{var o,s;return(s=(o=this.settings)==null?void 0:o.maskValuesRegEx)==null||s.forEach(a=>{var l;i=(l=i==null?void 0:i.toString())==null?void 0:l.replace(a,this.settings.maskPlaceholder)}),i})(e))}_recursiveCloneAndExecuteFunctions(e,r=[]){return r.includes(e)?{...e}:(typeof e=="object"&&r.push(e),Array.isArray(e)?e.map(n=>this._recursiveCloneAndExecuteFunctions(n,r)):e instanceof Date?new Date(e.getTime()):e&&typeof e=="object"?Object.getOwnPropertyNames(e).reduce((n,i)=>(Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i)),n[i]=typeof e[i]=="function"?e[i]():this._recursiveCloneAndExecuteFunctions(e[i],r),n),Object.create(Object.getPrototypeOf(e))):e)}_toLogObj(e,r={}){return e=e==null?void 0:e.map(n=>Hi(n)?this._toErrorObject(n):n),this.settings.argumentsArrayName==null?e.length===1&&!Array.isArray(e[0])&&(e[0],void 0)!==!0&&!(e[0]instanceof Date)?r=typeof e[0]=="object"&&e[0]!=null?{...e[0],...r}:{0:e[0],...r}:r={...r,...e}:r={...r,[this.settings.argumentsArrayName]:e},r}_cloneError(e){const r=e.constructor,n=new r(e.message);Object.assign(n,e);const i=Object.getOwnPropertyNames(n);for(const o of i){const s=Object.getOwnPropertyDescriptor(n,o);s&&(s.writable=!0,Object.defineProperty(n,o,s))}return n}_toErrorObject(e){return{nativeError:e,name:e.name??"Error",message:e.message,stack:Qs(e)}}_addMetaToLogObj(e,r,n){return{...e,[this.settings.metaProperty]:th(r,n,this.stackDepthLevel,this.settings.hideLogPositionForProduction,this.settings.name,this.settings.parentNames)}}_prettyFormatLogObjMeta(e){var s,a,l,d,h,f,m,y,w,A,T,M,B,C,b,D,j,_,W,$;if(e==null)return"";let r=this.settings.prettyLogTemplate;const n={};r.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}")?r=r.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}","{{dateIsoStr}}"):this.settings.prettyLogTimeZone==="UTC"?(n.yyyy=((s=e==null?void 0:e.date)==null?void 0:s.getUTCFullYear())??"----",n.mm=ct((a=e==null?void 0:e.date)==null?void 0:a.getUTCMonth(),2,1),n.dd=ct((l=e==null?void 0:e.date)==null?void 0:l.getUTCDate(),2),n.hh=ct((d=e==null?void 0:e.date)==null?void 0:d.getUTCHours(),2),n.MM=ct((h=e==null?void 0:e.date)==null?void 0:h.getUTCMinutes(),2),n.ss=ct((f=e==null?void 0:e.date)==null?void 0:f.getUTCSeconds(),2),n.ms=ct((m=e==null?void 0:e.date)==null?void 0:m.getUTCMilliseconds(),3)):(n.yyyy=((y=e==null?void 0:e.date)==null?void 0:y.getFullYear())??"----",n.mm=ct((w=e==null?void 0:e.date)==null?void 0:w.getMonth(),2,1),n.dd=ct((A=e==null?void 0:e.date)==null?void 0:A.getDate(),2),n.hh=ct((T=e==null?void 0:e.date)==null?void 0:T.getHours(),2),n.MM=ct((M=e==null?void 0:e.date)==null?void 0:M.getMinutes(),2),n.ss=ct((B=e==null?void 0:e.date)==null?void 0:B.getSeconds(),2),n.ms=ct((C=e==null?void 0:e.date)==null?void 0:C.getMilliseconds(),3));const i=this.settings.prettyLogTimeZone==="UTC"?e==null?void 0:e.date:new Date(((b=e==null?void 0:e.date)==null?void 0:b.getTime())-((D=e==null?void 0:e.date)==null?void 0:D.getTimezoneOffset())*6e4);n.rawIsoStr=i==null?void 0:i.toISOString(),n.dateIsoStr=i==null?void 0:i.toISOString().replace("T"," ").replace("Z",""),n.logLevelName=e==null?void 0:e.logLevelName,n.fileNameWithLine=((j=e==null?void 0:e.path)==null?void 0:j.fileNameWithLine)??"",n.filePathWithLine=((_=e==null?void 0:e.path)==null?void 0:_.filePathWithLine)??"",n.fullFilePath=((W=e==null?void 0:e.path)==null?void 0:W.fullFilePath)??"";let o=($=this.settings.parentNames)==null?void 0:$.join(this.settings.prettyErrorParentNamesSeparator);return o=o!=null&&(e==null?void 0:e.name)!=null?o+this.settings.prettyErrorParentNamesSeparator:void 0,n.name=(e==null?void 0:e.name)!=null||o!=null?(o??"")+(e==null?void 0:e.name):"",n.nameWithDelimiterPrefix=n.name.length>0?this.settings.prettyErrorLoggerNameDelimiter+n.name:"",n.nameWithDelimiterSuffix=n.name.length>0?n.name+this.settings.prettyErrorLoggerNameDelimiter:"",Ui(this.settings,r,n)}}let ch=class extends ah{constructor(e,r){super(e,r,5)}log(e,r,...n){return super.log(e,r,...n)}silly(...e){return super.log(0,"SILLY",...e)}trace(...e){return super.log(1,"TRACE",...e)}debug(...e){return super.log(2,"DEBUG",...e)}info(...e){return super.log(3,"INFO",...e)}warn(...e){return super.log(4,"WARN",...e)}error(...e){return super.log(5,"ERROR",...e)}fatal(...e){return super.log(6,"FATAL",...e)}getSubLogger(e,r){return super.getSubLogger(e,r)}};const uh=t=>new ch({minLevel:t??2,prettyLogTemplate:"{{hh}}:{{MM}}:{{ss}}:{{ms}} {{name}} {{logLevelName}} "}),Kr=t=>{try{return re(JSON.stringify(t))}catch(e){return se(e)}},lh=t=>Kr(t).andThen(Tt),Js=t=>te.fromPromise(Mr(t),e=>e).andThen(e=>e);var dh=class extends Error{constructor(e){super(e[0].message);bl(this,"issues");this.name="ValiError",this.issues=e}};function Ks(t,e,r,n,i){return{issues:[{context:t,reference:e,input:r,label:n,received:i}]}}function ea(t){return{output:t}}function Pt(t,e){return Array.isArray(t)?[void 0,t]:[t,e]}var ut;function ta(t){return{lang:(t==null?void 0:t.lang)??(ut==null?void 0:ut.lang),message:t==null?void 0:t.message,abortEarly:(t==null?void 0:t.abortEarly)??(ut==null?void 0:ut.abortEarly),abortPipeEarly:(t==null?void 0:t.abortPipeEarly)??(ut==null?void 0:ut.abortPipeEarly),skipPipe:(t==null?void 0:t.skipPipe)??(ut==null?void 0:ut.skipPipe)}}var $i;function hh(t){return $i==null?void 0:$i.get(t)}var Yi;function ph(t){return Yi==null?void 0:Yi.get(t)}var Vi;function fh(t,e){var r;return(r=Vi==null?void 0:Vi.get(t))==null?void 0:r.get(e)}function ra(t,e,r,n,i){const o=e.message??fh(r,i.lang)??(t?ph(i.lang):null)??(n==null?void 0:n.message)??hh(i.lang)??i.message;return typeof o=="function"?o(i):o}function en(t,e,r){return{typed:t,output:e,issues:r}}function tn(t){let e=typeof t;return e==="object"&&(e=t?Object.getPrototypeOf(t).constructor.name:"null"),e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e}function gh(t,e,r){const n=r.received??tn(r.input),i={reason:t.type,context:r.context.type,expected:r.context.expects,received:n,message:`Invalid ${r.label}: ${r.context.expects?`Expected ${r.context.expects} but r`:"R"}eceived ${n}`,input:r.input,requirement:r.context.requirement,path:r.path,lang:e==null?void 0:e.lang,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe};return i.message=ra(!1,r.context,r.reference,e,i),i}function Ot(t,e,r,n){if(t.pipe&&!(r!=null&&r.skipPipe))for(const i of t.pipe){const o=i._parse(e);if(o.issues){for(const s of o.issues){const a=gh(t,r,s);n?n.push(a):n=[a]}if(r!=null&&r.abortEarly||r!=null&&r.abortPipeEarly)break}else e=o.output}return en(!0,e,n)}function qi(t,e,r){if(!t||typeof t=="object"&&!Array.isArray(t)){const[o,s]=Pt(e,r);return[t,o,s]}const[n,i]=Pt(t,e);return[void 0,n,i]}function xt(t,e,r,n,i){const o=tn(r),s=(i==null?void 0:i.expected)??t.expects,a={reason:(i==null?void 0:i.reason)??"type",context:t.type,expected:s,received:o,message:`Invalid type: Expected ${s} but received ${o}`,input:r,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:n==null?void 0:n.lang,abortEarly:n==null?void 0:n.abortEarly,abortPipeEarly:n==null?void 0:n.abortPipeEarly,skipPipe:n==null?void 0:n.skipPipe};return a.message=ra(!0,t,e,n,a),{typed:!1,output:r,issues:[a]}}function mh(t){return typeof t.default=="function"?t.default():t.default}function lt(t,e,r){const[n,i]=Pt(e,r);return{type:"array",expects:"Array",async:!1,item:t,message:n,pipe:i,_parse(o,s){if(Array.isArray(o)){let a=!0,l;const d=[];for(let h=0;ho.expects))].join(" | "),async:!1,options:t,message:n,pipe:i,_parse(o,s){let a,l,d;for(const h of this.options){const f=h._parse(o,s);if(f.typed)if(f.issues)d?d.push(f):d=[f];else{a=f;break}else l?l.push(f):l=[f]}if(a)return Ot(this,a.output,s);if(d!=null&&d.length){const h=d[0];return Ot(this,h.output,s,d.length===1?h.issues:xt(this,Te,o,s,{reason:"union",issues:na(d)}).issues)}return(l==null?void 0:l.length)===1?l[0]:xt(this,Te,o,s,{issues:na(l)})}}}function Bn(t,e,r,n){const[i,o]=Pt(r,n);let s;return{type:"variant",expects:"Object",async:!1,key:t,options:e,message:i,pipe:o,_parse(a,l){if(a&&typeof a=="object"){if(this.key in a||!s){let h,f;const m=y=>{for(const w of y)if(w.type==="object"){const A=w.entries[this.key],T=A._parse(a[this.key],l);if(s||(h?h.push(A.expects):h=[A.expects]),!T.issues){const M=w._parse(a,l);if(!M.issues){f=M;break}(!f||!f.typed&&M.typed)&&(f=M)}}else if(w.type==="variant"&&(m(w.options),f&&!f.issues))break};if(m(this.options),s=s||[...new Set(h)].join(" | "),f)return f.typed?Ot(this,f.output,l,f.issues):f}const d=a[this.key];return xt(this,Bn,d,l,{expected:s,path:[{type:"object",origin:"value",input:a,key:this.key,value:d}]})}return xt(this,Bn,a,l)}}}function Ln(t,e,r,n){const[i,o,s]=qi(e,r,n);return O(t.reduce((a,l)=>({...a,...l.entries}),{}),i,o,s)}function ia(t,e,r){const n=t._parse(e,ta(r));if(n.issues)throw new dh(n.issues);return n.output}function yh(t,e,r,n){const[i,o,s]=qi(e,r,n);return O(Object.entries(t.entries).reduce((a,[l,d])=>({...a,[l]:V(d)}),{}),i,o,s)}function Ih(t,e,r){const n=t._parse(e,ta(r));return{typed:n.typed,success:!n.issues,output:n.output,issues:n.issues}}function Qi(t,e){return{type:"custom",expects:null,async:!1,message:e,requirement:t,_parse(r){return this.requirement(r)?ea(r):Ks(this,Qi,r,"input")}}}function oa(t,e){return{type:"min_value",expects:`>=${t instanceof Date?t.toJSON():tn(t)}`,async:!1,message:e,requirement:t,_parse(r){return r>=this.requirement?ea(r):Ks(this,oa,r,"value",r instanceof Date?r.toJSON():tn(r))}}}const Xi=O({address:F(),label:F(),appearanceId:Dr()}),Er=O({publicKey:F(),signature:F(),curve:Te([X("curve25519"),X("secp256k1")])}),sa=O({accountAddress:F(),proof:Er}),Tr=O({identityAddress:F(),label:F()}),Ji={western:"western",eastern:"eastern"},aa=Te([X(Ji.eastern),X(Ji.western)]),Ki=O({variant:aa,familyName:F(),nickname:F(),givenNames:F()}),pt=O({quantifier:Te([X("exactly"),X("atLeast")]),quantity:Dr([oa(0,"The number must be at least 0.")])}),Pn=O({challenge:V(F()),numberOfAccounts:pt}),On=O({accounts:lt(Xi),challenge:V(F()),proofs:V(lt(sa))},[Qi(t=>{var e;return t.challenge||t!=null&&t.proofs?!!(t.challenge&&((e=t==null?void 0:t.proofs)!=null&&e.length)):!0},"missing challenge or proofs")]),rn=O({isRequestingName:V(Ee()),numberOfRequestedEmailAddresses:V(pt),numberOfRequestedPhoneNumbers:V(pt)}),Rn=O({name:V(Ki),emailAddresses:V(lt(F())),phoneNumbers:V(lt(F()))}),ca=O({accounts:Ee(),personaData:Ee()}),bh=O({persona:Tr,challenge:V(F()),proof:V(Er)},[Qi(t=>t.challenge||t.proof?!!(t.challenge&&t.proof):!0,"missing challenge or proof")]),ua=O({discriminator:X("unauthorizedRequest"),oneTimeAccounts:V(Pn),oneTimePersonaData:V(rn)}),la=O({discriminator:X("usePersona"),identityAddress:F()}),da=O({discriminator:X("loginWithoutChallenge")}),ha=O({discriminator:X("loginWithChallenge"),challenge:F()}),pa=Te([da,ha]),fa=Te([la,pa]),ga=O({discriminator:X("authorizedRequest"),auth:fa,reset:V(ca),oneTimeAccounts:V(Pn),ongoingAccounts:V(Pn),oneTimePersonaData:V(rn),ongoingPersonaData:V(rn)}),ma=Te([ua,ga]),ya=O({transactionManifest:F(),version:Dr(),blobs:V(lt(F())),message:V(F())}),Ia=O({discriminator:X("transaction"),send:ya}),ba=O({transactionIntentHash:F()}),wh=O({discriminator:X("transaction"),send:ba}),wa=O({discriminator:X("cancelRequest")}),xa=Te([ma,Ia,wa]),Un=O({version:X(2),networkId:Dr(),dAppDefinitionAddress:F(),origin:F()}),Aa=O({interactionId:F(),metadata:Un,items:xa}),xh=O({discriminator:X("unauthorizedRequest"),oneTimeAccounts:V(On),oneTimePersonaData:V(Rn)}),Ma=O({discriminator:X("loginWithoutChallenge"),persona:Tr}),va=O({discriminator:X("loginWithChallenge"),persona:Tr,challenge:F(),proof:Er}),Na=Te([Ma,va]),Ah=O({discriminator:X("usePersona"),persona:Tr}),Ca=Te([Ah,Na]),Sa=O({discriminator:X("authorizedRequest"),auth:Ca,oneTimeAccounts:V(On),ongoingAccounts:V(On),oneTimePersonaData:V(Rn),ongoingPersonaData:V(Rn)}),Da=Te([xh,Sa]),Mh=Te([Da,wh]),Ea=O({discriminator:X("success"),interactionId:F(),items:Mh}),Ta=O({discriminator:X("failure"),interactionId:F(),error:F(),message:V(F())}),eo=Te([Ea,Ta]),nn={extensionStatus:"extensionStatus",openPopup:"openPopup",cancelWalletInteraction:"cancelWalletInteraction",walletInteraction:"walletInteraction"},ka=O({interactionId:F(),discriminator:X(nn.extensionStatus)}),ja=O({interactionId:F(),discriminator:X(nn.openPopup)}),za=O({interactionId:F(),discriminator:X(nn.walletInteraction),interaction:Aa,sessionId:V(F())}),Ba=O({interactionId:F(),discriminator:X(nn.cancelWalletInteraction),metadata:Un}),vh=Te([ka,ja,za,Ba]),or={extensionStatus:"extensionStatus",receivedByExtension:"receivedByExtension",receivedByWallet:"receivedByWallet",requestCancelSuccess:"requestCancelSuccess",requestCancelFail:"requestCancelFail"},Nh=O({eventType:X(or.extensionStatus),interactionId:F(),isWalletLinked:Ee(),isExtensionAvailable:Ee(),canHandleSessions:V(Ee())}),La=O({eventType:Te([X(or.extensionStatus),X(or.receivedByExtension),X(or.receivedByWallet),X(or.requestCancelSuccess),X(or.requestCancelFail)]),interactionId:F()});Te([La,eo]);const on={outgoingMessage:"radix#chromeExtension#send",incomingMessage:"radix#chromeExtension#receive"},Pa=X("offer"),Oa=X("answer"),Ra=X("iceCandidate"),Ua=X("iceCandidates");Te([Pa,Oa,Ra,Ua]);const Wa=Te([X("wallet"),X("extension")]),sn=O({requestId:F(),targetClientId:F(),encryptedPayload:F(),source:V(Wa),connectionId:V(F())}),Ch=Ln([sn,O({method:Oa,payload:O({sdp:F()})})]),Sh=Ln([sn,O({method:Pa,payload:O({sdp:F()})})]),to=O({candidate:F(),sdpMid:F(),sdpMLineIndex:Dr()}),Dh=Ln([sn,O({method:Ra,payload:to})]),Eh=Ln([sn,O({method:Ua,payload:lt(to)})]),Wn={rejectedByUser:"rejectedByUser",missingExtension:"missingExtension",canceledByUser:"canceledByUser",walletRequestValidation:"walletRequestValidation",walletResponseValidation:"walletResponseValidation",wrongNetwork:"wrongNetwork",failedToPrepareTransaction:"failedToPrepareTransaction",failedToCompileTransaction:"failedToCompileTransaction",failedToSignTransaction:"failedToSignTransaction",failedToSubmitTransaction:"failedToSubmitTransaction",failedToPollSubmittedTransaction:"failedToPollSubmittedTransaction",submittedTransactionWasDuplicate:"submittedTransactionWasDuplicate",submittedTransactionHasFailedTransactionStatus:"submittedTransactionHasFailedTransactionStatus",submittedTransactionHasRejectedTransactionStatus:"submittedTransactionHasRejectedTransactionStatus",failedToFindAccountWithEnoughFundsToLockFee:"failedToFindAccountWithEnoughFundsToLockFee",wrongAccountType:"wrongAccountType",unknownWebsite:"unknownWebsite",radixJsonNotFound:"radixJsonNotFound",unknownDappDefinitionAddress:"unknownDappDefinitionAddress",invalidPersona:"invalidPersona"},Th=new Map().set(Wn.missingExtension,"extension could not be found").set(Wn.rejectedByUser,"user rejected request").set(Wn.canceledByUser,"user has canceled the request"),he=(t,e,r,n)=>({error:t,interactionId:e,message:r||Th.get(t)||"",jsError:n}),ro=t=>{const r=vr.fromThrowable(n=>ia(eo,n),n=>n)(t);return r.isErr()?Et(he("walletResponseValidation","","Invalid input")):r.isOk()?r.value.discriminator==="success"?$e(r.value):Et(r.value):Et(he("walletResponseValidation",""))},kh=()=>[...globalThis.crypto.getRandomValues(new Uint8Array(32))].map(t=>t.toString(16).padStart(2,"0")).join(""),Za=t=>typeof t=="string"&&/^[0-9a-f]{64}$/i.test(t),jh=t=>Ih(Bo,t),_a=()=>({onConnect:new Me,onDisconnect:new Me,onUpdateSharedAccounts:new Me,connected:new fs(1),requestItems:new ze([]),onCancelRequestItem:new Me,onIgnoreTransactionItem:new Me,accounts:new ze([]),onShowPopover:new Me,status:new ze("default"),loggedInTimestamp:new ze(""),isMobile:new ze(Cr()),isWalletLinked:new ze(!1),showPopoverMenu:new ze(!1),isExtensionAvailable:new ze(!1),fullWidth:new ze(!1),activeTab:new ze("sharing"),mode:new ze("light"),theme:new ze("radix-blue"),avatarUrl:new ze(""),personaLabel:new ze(""),personaData:new ze([]),dAppName:new ze(""),onLinkClick:new Me});function no(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function zh(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Zn(t,...e){if(!zh(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function io(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");no(t.outputLen),no(t.blockLen)}function _n(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Bh(t,e){Zn(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),At=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Fa(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function an(t){return typeof t=="string"&&(t=Fa(t)),Zn(t),t}function Lh(...t){let e=0;for(let n=0;nt().update(an(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function $a(t=32){if(oo&&typeof oo.getRandomValues=="function")return oo.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}function Ph(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),l=n?4:0,d=n?0:4;t.setUint32(e+l,s,n),t.setUint32(e+d,a,n)}const Oh=(t,e,r)=>t&e^~t&r,Rh=(t,e,r)=>t&e^t&r^e&r;class Ya extends Ga{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=so(this.buffer)}update(e){_n(this);const{view:r,buffer:n,blockLen:i}=this;e=an(e);const o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let f=s;fh.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f>ao&Fn)}:{h:Number(t>>ao&Fn)|0,l:Number(t&Fn)|0}}function Uh(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;iBigInt(t>>>0)<>>0),Zh=(t,e,r)=>t>>>r,_h=(t,e,r)=>t<<32-r|e>>>r,Fh=(t,e,r)=>t>>>r|e<<32-r,Gh=(t,e,r)=>t<<32-r|e>>>r,Hh=(t,e,r)=>t<<64-r|e>>>r-32,$h=(t,e,r)=>t>>>r-32|e<<64-r,Yh=(t,e)=>e,Vh=(t,e)=>t,qh=(t,e,r)=>t<>>32-r,Qh=(t,e,r)=>e<>>32-r,Xh=(t,e,r)=>e<>>64-r,Jh=(t,e,r)=>t<>>64-r;function Kh(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const K={fromBig:Va,split:Uh,toBig:Wh,shrSH:Zh,shrSL:_h,rotrSH:Fh,rotrSL:Gh,rotrBH:Hh,rotrBL:$h,rotr32H:Yh,rotr32L:Vh,rotlSH:qh,rotlSL:Qh,rotlBH:Xh,rotlBL:Jh,add:Kh,add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/2**32|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)},[ep,tp]=K.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Rt=new Uint32Array(80),Ut=new Uint32Array(80);class rp extends Ya{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:d,El:h,Fh:f,Fl:m,Gh:y,Gl:w,Hh:A,Hl:T}=this;return[e,r,n,i,o,s,a,l,d,h,f,m,y,w,A,T]}set(e,r,n,i,o,s,a,l,d,h,f,m,y,w,A,T){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=d|0,this.El=h|0,this.Fh=f|0,this.Fl=m|0,this.Gh=y|0,this.Gl=w|0,this.Hh=A|0,this.Hl=T|0}process(e,r){for(let C=0;C<16;C++,r+=4)Rt[C]=e.getUint32(r),Ut[C]=e.getUint32(r+=4);for(let C=16;C<80;C++){const b=Rt[C-15]|0,D=Ut[C-15]|0,j=K.rotrSH(b,D,1)^K.rotrSH(b,D,8)^K.shrSH(b,D,7),_=K.rotrSL(b,D,1)^K.rotrSL(b,D,8)^K.shrSL(b,D,7),W=Rt[C-2]|0,$=Ut[C-2]|0,R=K.rotrSH(W,$,19)^K.rotrBH(W,$,61)^K.shrSH(W,$,6),ie=K.rotrSL(W,$,19)^K.rotrBL(W,$,61)^K.shrSL(W,$,6),me=K.add4L(_,ie,Ut[C-7],Ut[C-16]),ue=K.add4H(me,j,R,Rt[C-7],Rt[C-16]);Rt[C]=ue|0,Ut[C]=me|0}let{Ah:n,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:d,Dl:h,Eh:f,El:m,Fh:y,Fl:w,Gh:A,Gl:T,Hh:M,Hl:B}=this;for(let C=0;C<80;C++){const b=K.rotrSH(f,m,14)^K.rotrSH(f,m,18)^K.rotrBH(f,m,41),D=K.rotrSL(f,m,14)^K.rotrSL(f,m,18)^K.rotrBL(f,m,41),j=f&y^~f&A,_=m&w^~m&T,W=K.add5L(B,D,_,tp[C],Ut[C]),$=K.add5H(W,M,b,j,ep[C],Rt[C]),R=W|0,ie=K.rotrSH(n,i,28)^K.rotrBH(n,i,34)^K.rotrBH(n,i,39),me=K.rotrSL(n,i,28)^K.rotrBL(n,i,34)^K.rotrBL(n,i,39),ue=n&o^n&a^o&a,dt=i&s^i&l^s&l;M=A|0,B=T|0,A=y|0,T=w|0,y=f|0,w=m|0,{h:f,l:m}=K.add(d|0,h|0,$|0,R|0),d=a|0,h=l|0,a=o|0,l=s|0,o=n|0,s=i|0;const Ve=K.add3L(R,me,dt);n=K.add3H(Ve,$,ie,ue),i=Ve|0}({h:n,l:i}=K.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:s}=K.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=K.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:d,l:h}=K.add(this.Dh|0,this.Dl|0,d|0,h|0),{h:f,l:m}=K.add(this.Eh|0,this.El|0,f|0,m|0),{h:y,l:w}=K.add(this.Fh|0,this.Fl|0,y|0,w|0),{h:A,l:T}=K.add(this.Gh|0,this.Gl|0,A|0,T|0),{h:M,l:B}=K.add(this.Hh|0,this.Hl|0,M|0,B|0),this.set(n,i,o,s,a,l,d,h,f,m,y,w,A,T,M,B)}roundClean(){Rt.fill(0),Ut.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const qa=Ha(()=>new rp);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const np=BigInt(1),ip=BigInt(2);function co(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function uo(t){if(!co(t))throw new Error("Uint8Array expected")}const op=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function lo(t){uo(t);let e="";for(let r=0;r=kt._0&&t<=kt._9)return t-kt._0;if(t>=kt._A&&t<=kt._F)return t-(kt._A-10);if(t>=kt._a&&t<=kt._f)return t-(kt._a-10)}function Ja(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,o=0;i(ip<typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||co(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Hn(t,e,r={}){const n=(i,o,s)=>{const a=cp[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=t[i];if(!(s&&l===void 0)&&!a(l,t))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return t}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Le=BigInt(0),Ne=BigInt(1),sr=BigInt(2),up=BigInt(3),ho=BigInt(4),tc=BigInt(5),rc=BigInt(8);BigInt(9),BigInt(16);function Ce(t,e){const r=t%e;return r>=Le?r:e+r}function nc(t,e,r){if(r<=Le||e 0");if(r===Ne)return Le;let n=Ne;for(;e>Le;)e&Ne&&(n=n*t%r),t=t*t%r,e>>=Ne;return n}function ft(t,e,r){let n=t;for(;e-- >Le;)n*=n,n%=r;return n}function ic(t,e){if(t===Le||e<=Le)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Ce(t,e),n=e,i=Le,o=Ne;for(;r!==Le;){const a=n/r,l=n%r,d=i-o*a;n=r,r=l,i=o,o=d}if(n!==Ne)throw new Error("invert: does not exist");return Ce(i,e)}function lp(t){const e=(t-Ne)/sr;let r,n,i;for(r=t-Ne,n=0;r%sr===Le;r/=sr,n++);for(i=sr;i(Ce(t,e)&Ne)===Ne,pp=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fp(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=pp.reduce((n,i)=>(n[i]="function",n),e);return Hn(t,r)}function gp(t,e,r){if(r 0");if(r===Le)return t.ONE;if(r===Ne)return e;let n=t.ONE,i=e;for(;r>Le;)r&Ne&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Ne;return n}function mp(t,e){const r=new Array(e.length),n=e.reduce((o,s,a)=>t.is0(s)?o:(r[a]=o,t.mul(o,s)),t.ONE),i=t.inv(n);return e.reduceRight((o,s,a)=>t.is0(s)?o:(r[a]=t.mul(o,r[a]),t.mul(o,s)),i),r}function oc(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function yp(t,e,r=!1,n={}){if(t<=Le)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=oc(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=dp(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:ap(i),ZERO:Le,ONE:Ne,create:l=>Ce(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return Le<=l&&ll===Le,isOdd:l=>(l&Ne)===Ne,neg:l=>Ce(-l,t),eql:(l,d)=>l===d,sqr:l=>Ce(l*l,t),add:(l,d)=>Ce(l+d,t),sub:(l,d)=>Ce(l-d,t),mul:(l,d)=>Ce(l*d,t),pow:(l,d)=>gp(a,l,d),div:(l,d)=>Ce(l*ic(d,t),t),sqrN:l=>l*l,addN:(l,d)=>l+d,subN:(l,d)=>l-d,mulN:(l,d)=>l*d,inv:l=>ic(l,t),sqrt:n.sqrt||(l=>s(a,l)),invertBatch:l=>mp(a,l),cmov:(l,d,h)=>h?d:l,toBytes:l=>r?Gn(l,o):Ka(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?kr(l):sp(l)}});return Object.freeze(a)}function Ip(t,e){if(!t.isOdd)throw new Error("Field doesn't have isOdd");const r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bp=BigInt(0),po=BigInt(1);function wp(t,e){const r=(i,o)=>{const s=o.negate();return i?s:o},n=i=>{const o=Math.ceil(e/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:r,unsafeLadder(i,o){let s=t.ZERO,a=i;for(;o>bp;)o&po&&(s=s.add(a)),a=a.double(),o>>=po;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=n(o),l=[];let d=i,h=d;for(let f=0;f>=y,T>l&&(T-=m,s+=po);const M=A,B=A+Math.abs(T)-1,C=w%2!==0,b=T<0;T===0?h=h.add(r(C,o[M])):d=d.add(r(b,o[B]))}return{p:d,f:h}},wNAFCached(i,o,s,a){const l=i._WINDOW_SIZE||1;let d=o.get(i);return d||(d=this.precomputeWindow(i,l),l!==1&&o.set(i,a(d))),this.wNAF(l,d,s)}}}function xp(t){return fp(t.Fp),Hn(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...oc(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gt=BigInt(0),Je=BigInt(1),$n=BigInt(2),Ap=BigInt(8),Mp={zip215:!0};function vp(t){const e=xp(t);return Hn(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function fo(t){const e=vp(t),{Fp:r,n,prehash:i,hash:o,randomBytes:s,nByteLength:a,h:l}=e,d=$n<{try{return{isValid:!0,value:r.sqrt(Z*r.inv(E))}}catch{return{isValid:!1,value:gt}}}),m=e.adjustScalarBytes||(Z=>Z),y=e.domain||((Z,E,G)=>{if(E.length||G)throw new Error("Contexts/pre-hash are not supported");return Z}),w=Z=>typeof Z=="bigint"&>w(Z)&&w(E)&&ZZ===gt||A(Z,d);function M(Z,E){if(A(Z,E))return Z;throw new Error(`Expected valid scalar < ${E}, got ${typeof Z} ${Z}`)}function B(Z){return Z===gt?Z:M(Z,n)}const C=new Map;function b(Z){if(!(Z instanceof D))throw new Error("ExtendedPoint expected")}class D{constructor(E,G,U,Y){if(this.ex=E,this.ey=G,this.ez=U,this.et=Y,!T(E))throw new Error("x required");if(!T(G))throw new Error("y required");if(!T(U))throw new Error("z required");if(!T(Y))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(E){if(E instanceof D)throw new Error("extended point not allowed");const{x:G,y:U}=E||{};if(!T(G)||!T(U))throw new Error("invalid affine point");return new D(G,U,Je,h(G*U))}static normalizeZ(E){const G=r.invertBatch(E.map(U=>U.ez));return E.map((U,Y)=>U.toAffine(G[Y])).map(D.fromAffine)}_setWindowSize(E){this._WINDOW_SIZE=E,C.delete(this)}assertValidity(){const{a:E,d:G}=e;if(this.is0())throw new Error("bad point: ZERO");const{ex:U,ey:Y,ez:S,et:k}=this,z=h(U*U),q=h(Y*Y),Q=h(S*S),le=h(Q*Q),P=h(z*E),De=h(Q*h(P+q)),de=h(le+h(G*h(z*q)));if(De!==de)throw new Error("bad point: equation left != right (1)");const Oe=h(U*Y),He=h(S*k);if(Oe!==He)throw new Error("bad point: equation left != right (2)")}equals(E){b(E);const{ex:G,ey:U,ez:Y}=this,{ex:S,ey:k,ez:z}=E,q=h(G*z),Q=h(S*Y),le=h(U*z),P=h(k*Y);return q===Q&&le===P}is0(){return this.equals(D.ZERO)}negate(){return new D(h(-this.ex),this.ey,this.ez,h(-this.et))}double(){const{a:E}=e,{ex:G,ey:U,ez:Y}=this,S=h(G*G),k=h(U*U),z=h($n*h(Y*Y)),q=h(E*S),Q=G+U,le=h(h(Q*Q)-S-k),P=q+k,De=P-z,de=q-k,Oe=h(le*De),He=h(P*de),St=h(le*de),Vr=h(De*P);return new D(Oe,He,Vr,St)}add(E){b(E);const{a:G,d:U}=e,{ex:Y,ey:S,ez:k,et:z}=this,{ex:q,ey:Q,ez:le,et:P}=E;if(G===BigInt(-1)){const rt=h((S-Y)*(Q+q)),Xr=h((S+Y)*(Q-q)),vn=h(Xr-rt);if(vn===gt)return this.double();const yt=h(k*$n*P),Ai=h(z*$n*le),p=Ai+yt,c=Xr+rt,u=Ai-yt,g=h(p*vn),I=h(c*u),x=h(p*u),v=h(vn*c);return new D(g,I,v,x)}const De=h(Y*q),de=h(S*Q),Oe=h(z*U*P),He=h(k*le),St=h((Y+S)*(q+Q)-De-de),Vr=He-Oe,wi=He+Oe,qr=h(de-G*De),rs=h(St*Vr),ns=h(wi*qr),xi=h(St*qr),Qr=h(Vr*wi);return new D(rs,ns,Qr,xi)}subtract(E){return this.add(E.negate())}wNAF(E){return W.wNAFCached(this,C,E,D.normalizeZ)}multiply(E){const{p:G,f:U}=this.wNAF(M(E,n));return D.normalizeZ([G,U])[0]}multiplyUnsafe(E){let G=B(E);return G===gt?_:this.equals(_)||G===Je?this:this.equals(j)?this.wNAF(G).p:W.unsafeLadder(this,G)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}isTorsionFree(){return W.unsafeLadder(this,n).is0()}toAffine(E){const{ex:G,ey:U,ez:Y}=this,S=this.is0();E==null&&(E=S?Ap:r.inv(Y));const k=h(G*E),z=h(U*E),q=h(Y*E);if(S)return{x:gt,y:Je};if(q!==Je)throw new Error("invZ was invalid");return{x:k,y:z}}clearCofactor(){const{h:E}=e;return E===Je?this:this.multiplyUnsafe(E)}static fromHex(E,G=!1){const{d:U,a:Y}=e,S=r.BYTES;E=Mt("pointHex",E,S);const k=E.slice(),z=E[S-1];k[S-1]=z&-129;const q=kr(k);q===gt||(G?M(q,d):M(q,r.ORDER));const Q=h(q*q),le=h(Q-Je),P=h(U*Q-Y);let{isValid:De,value:de}=f(le,P);if(!De)throw new Error("Point.fromHex: invalid y coordinate");const Oe=(de&Je)===Je,He=(z&128)!==0;if(!G&&de===gt&&He)throw new Error("Point.fromHex: x=0 and x_0=1");return He!==Oe&&(de=h(-de)),D.fromAffine({x:de,y:q})}static fromPrivateKey(E){return ie(E).point}toRawBytes(){const{x:E,y:G}=this.toAffine(),U=Gn(G,r.BYTES);return U[U.length-1]|=E&Je?128:0,U}toHex(){return lo(this.toRawBytes())}}D.BASE=new D(e.Gx,e.Gy,Je,h(e.Gx*e.Gy)),D.ZERO=new D(gt,Je,Je,gt);const{BASE:j,ZERO:_}=D,W=wp(D,a*8);function $(Z){return Ce(Z,n)}function R(Z){return $(kr(Z))}function ie(Z){const E=a;Z=Mt("private key",Z,E);const G=Mt("hashed private key",o(Z),2*E),U=m(G.slice(0,E)),Y=G.slice(E,2*E),S=R(U),k=j.multiply(S),z=k.toRawBytes();return{head:U,prefix:Y,scalar:S,point:k,pointBytes:z}}function me(Z){return ie(Z).pointBytes}function ue(Z=new Uint8Array,...E){const G=ec(...E);return R(o(y(G,Mt("context",Z),!!i)))}function dt(Z,E,G={}){Z=Mt("message",Z),i&&(Z=i(Z));const{prefix:U,scalar:Y,pointBytes:S}=ie(E),k=ue(G.context,U,Z),z=j.multiply(k).toRawBytes(),q=ue(G.context,z,S,Z),Q=$(k+q*Y);B(Q);const le=ec(z,Gn(Q,r.BYTES));return Mt("result",le,a*2)}const Ve=Mp;function Nt(Z,E,G,U=Ve){const{context:Y,zip215:S}=U,k=r.BYTES;Z=Mt("signature",Z,2*k),E=Mt("message",E),i&&(E=i(E));const z=kr(Z.slice(k,2*k));let q,Q,le;try{q=D.fromHex(G,S),Q=D.fromHex(Z.slice(0,k),S),le=j.multiplyUnsafe(z)}catch{return!1}if(!S&&q.isSmallOrder())return!1;const P=ue(Y,Q.toRawBytes(),q.toRawBytes(),E);return Q.add(q.multiplyUnsafe(P)).subtract(le).clearCofactor().equals(D.ZERO)}return j._setWindowSize(8),{CURVE:e,getPublicKey:me,sign:dt,verify:Nt,ExtendedPoint:D,utils:{getExtendedPublicKey:ie,randomPrivateKey:()=>s(r.BYTES),precompute(Z=8,E=D.BASE){return E._setWindowSize(Z),E.multiply(BigInt(3)),E}}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cn=BigInt(0),go=BigInt(1);function Np(t){return Hn(t,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...t})}function Cp(t){const e=Np(t),{P:r}=e,n=C=>Ce(C,r),i=e.montgomeryBits,o=Math.ceil(i/8),s=e.nByteLength,a=e.adjustScalarBytes||(C=>C),l=e.powPminus2||(C=>nc(C,r-BigInt(2),r));function d(C,b,D){const j=n(C*(b-D));return b=n(b-j),D=n(D+j),[b,D]}function h(C){if(typeof C=="bigint"&&cn<=C&&C=cn;Ve--){const Nt=j>>Ve&go;me^=Nt,ue=d(me,W,R),W=ue[0],R=ue[1],ue=d(me,$,ie),$=ue[0],ie=ue[1],me=Nt;const Ct=W+$,Z=n(Ct*Ct),E=W-$,G=n(E*E),U=Z-G,Y=R+ie,S=R-ie,k=n(S*Ct),z=n(Y*E),q=k+z,Q=k-z;R=n(q*q),ie=n(_*n(Q*Q)),W=n(Z*G),$=n(U*(Z+n(f*U)))}ue=d(me,W,R),W=ue[0],R=ue[1],ue=d(me,$,ie),$=ue[0],ie=ue[1];const dt=l($);return n(W*dt)}function y(C){return Gn(n(C),o)}function w(C){const b=Mt("u coordinate",C,o);return s===32&&(b[31]&=127),kr(b)}function A(C){const b=Mt("scalar",C),D=b.length;if(D!==o&&D!==s)throw new Error(`Expected ${o} or ${s} bytes, got ${D}`);return kr(a(b))}function T(C,b){const D=w(b),j=A(C),_=m(D,j);if(_===cn)throw new Error("Invalid private or public key received");return y(_)}const M=y(e.Gu);function B(C){return T(C,M)}return{scalarMult:T,scalarMultBase:B,getSharedSecret:(C,b)=>T(C,b),getPublicKey:C=>B(C),utils:{randomPrivateKey:()=>e.randomBytes(e.nByteLength)},GuBytes:M}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const un=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),sc=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const Sp=BigInt(1),mo=BigInt(2),Dp=BigInt(5),ac=BigInt(10),Ep=BigInt(20),Tp=BigInt(40),cc=BigInt(80);function uc(t){const e=un,n=t*t%e*t%e,i=ft(n,mo,e)*n%e,o=ft(i,Sp,e)*t%e,s=ft(o,Dp,e)*o%e,a=ft(s,ac,e)*s%e,l=ft(a,Ep,e)*a%e,d=ft(l,Tp,e)*l%e,h=ft(d,cc,e)*d%e,f=ft(h,cc,e)*d%e,m=ft(f,ac,e)*s%e;return{pow_p_5_8:ft(m,mo,e)*t%e,b2:n}}function lc(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function kp(t,e){const r=un,n=Ce(e*e*e,r),i=Ce(n*n*e,r),o=uc(t*i).pow_p_5_8;let s=Ce(t*n*o,r);const a=Ce(e*s*s,r),l=s,d=Ce(s*sc,r),h=a===t,f=a===Ce(-t,r),m=a===Ce(-t*sc,r);return h&&(s=l),(f||m)&&(s=d),hp(s,r)&&(s=Ce(-s,r)),{isValid:h||f,value:s}}const jt=yp(un,void 0,!0),yo={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:jt,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:qa,randomBytes:$a,adjustScalarBytes:lc,uvRatio:kp},dc=fo(yo);function hc(t,e,r){if(e.length>255)throw new Error("Context is too big");return Lh(Fa("SigEd25519 no Ed25519 collisions"),new Uint8Array([r?1:0,e.length]),e,t)}({...yo},{...yo});const Io=Cp({P:un,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:t=>{const e=un,{pow_p_5_8:r,b2:n}=uc(t);return Ce(ft(r,BigInt(3),e)*n,e)},adjustScalarBytes:lc,randomBytes:$a}),jp=(jt.ORDER+BigInt(3))/BigInt(8);jt.pow(mo,jp),jt.sqrt(jt.neg(jt.ONE)),(jt.ORDER-BigInt(5))/BigInt(8),BigInt(486662),Ip(jt,jt.neg(BigInt(486664))),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class pc extends Ga{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,io(e);const n=an(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let s=0;snew pc(t,e).update(r).digest();bo.create=(t,e)=>new pc(t,e);function zp(t,e,r){return io(t),r===void 0&&(r=new Uint8Array(t.outputLen)),bo(t,an(r),an(e))}const wo=new Uint8Array([0]),Bp=new Uint8Array;function Lp(t,e,r,n=32){if(io(t),no(n),n>255*t.outputLen)throw new Error("Length should be <= 255*HashLen");const i=Math.ceil(n/t.outputLen),o=new Uint8Array(i*t.outputLen),s=bo.create(t,e),a=s._cloneInto(),l=new Uint8Array(s.outputLen);for(let d=0;dLp(t,zp(t,e,r),n,i),Op=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Wt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Zt=new Uint32Array(64);class Rp extends Ya{constructor(){super(64,32,8,!1),this.A=Wt[0]|0,this.B=Wt[1]|0,this.C=Wt[2]|0,this.D=Wt[3]|0,this.E=Wt[4]|0,this.F=Wt[5]|0,this.G=Wt[6]|0,this.H=Wt[7]|0}get(){const{A:e,B:r,C:n,D:i,E:o,F:s,G:a,H:l}=this;return[e,r,n,i,o,s,a,l]}set(e,r,n,i,o,s,a,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=l|0}process(e,r){for(let f=0;f<16;f++,r+=4)Zt[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const m=Zt[f-15],y=Zt[f-2],w=At(m,7)^At(m,18)^m>>>3,A=At(y,17)^At(y,19)^y>>>10;Zt[f]=A+Zt[f-7]+w+Zt[f-16]|0}let{A:n,B:i,C:o,D:s,E:a,F:l,G:d,H:h}=this;for(let f=0;f<64;f++){const m=At(a,6)^At(a,11)^At(a,25),y=h+m+Oh(a,l,d)+Op[f]+Zt[f]|0,A=(At(n,2)^At(n,13)^At(n,22))+Rh(n,i,o)|0;h=d,d=l,l=a,a=s+y|0,s=o,o=i,i=n,n=y+A|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(n,i,o,s,a,l,d,h)}roundClean(){Zt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Up=Ha(()=>new Rp),ln=t=>oe.Buffer.from(t).toString("hex"),fc=(t=ln(Io.utils.randomPrivateKey()))=>({getPrivateKey:()=>t,x25519:{getPublicKey:()=>ln(Io.getPublicKey(t)),calculateSharedSecret:(i,o)=>{try{const s=Io.getSharedSecret(t,i),a=Pp(Up,s,oe.Buffer.from(o,"utf-8"),"RCfM",32);return re(ln(a))}catch(s){return se(s)}}},ed25519:{getPublicKey:()=>ln(dc.getPublicKey(t)),sign:i=>{try{return re(ln(dc.sign(i,t)))}catch(o){return se(o)}}}}),Wp="Input must be an string, Buffer or Uint8Array";function Zp(t){let e;if(t instanceof Uint8Array)e=t;else if(typeof t=="string")e=new TextEncoder().encode(t);else throw new Error(Wp);return e}function _p(t){return Array.prototype.map.call(t,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}function Yn(t){return(4294967296+t).toString(16).substring(1)}function Fp(t,e,r){let n=` `+t+" = ";for(let i=0;i=4294967296&&i++,t[e]=n,t[e+1]=i}function mc(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function yc(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function _t(t,e,r,n,i,o){const s=dn[i],a=dn[i+1],l=dn[o],d=dn[o+1];qn(J,t,e),mc(J,t,s,a);let h=J[n]^J[t],f=J[n+1]^J[t+1];J[n]=f,J[n+1]=h,qn(J,r,n),h=J[e]^J[r],f=J[e+1]^J[r+1],J[e]=h>>>24^f<<8,J[e+1]=f>>>24^h<<8,qn(J,t,e),mc(J,t,l,d),h=J[n]^J[t],f=J[n+1]^J[t+1],J[n]=h>>>16^f<<16,J[n+1]=f>>>16^h<<16,qn(J,r,n),h=J[e]^J[r],f=J[e+1]^J[r+1],J[e]=f>>>31^h<<1,J[e+1]=h>>>31^f<<1}const Ic=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Hp=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Fe=new Uint8Array(Hp.map(function(t){return t*2})),J=new Uint32Array(32),dn=new Uint32Array(32);function bc(t,e){let r=0;for(r=0;r<16;r++)J[r]=t.h[r],J[r+16]=Ic[r];for(J[24]=J[24]^t.t,J[25]=J[25]^t.t/4294967296,e&&(J[28]=~J[28],J[29]=~J[29]),r=0;r<32;r++)dn[r]=yc(t.b,4*r);for(r=0;r<12;r++)_t(0,8,16,24,Fe[r*16+0],Fe[r*16+1]),_t(2,10,18,26,Fe[r*16+2],Fe[r*16+3]),_t(4,12,20,28,Fe[r*16+4],Fe[r*16+5]),_t(6,14,22,30,Fe[r*16+6],Fe[r*16+7]),_t(0,10,20,30,Fe[r*16+8],Fe[r*16+9]),_t(2,12,22,24,Fe[r*16+10],Fe[r*16+11]),_t(4,14,16,26,Fe[r*16+12],Fe[r*16+13]),_t(6,8,18,28,Fe[r*16+14],Fe[r*16+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^J[r]^J[r+16]}const Ft=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function wc(t,e,r,n){if(t===0||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};Ft.fill(0),Ft[0]=t,e&&(Ft[1]=e.length),Ft[2]=1,Ft[3]=1,r&&Ft.set(r,32),n&&Ft.set(n,48);for(let o=0;o<16;o++)i.h[o]=Ic[o]^yc(Ft,o*4);return e&&(xo(i,e),i.c=128),i}function xo(t,e){for(let r=0;r>2]>>8*(r&3);return e}function Ac(t,e,r,n,i){r=r||64,t=Vn.normalizeInput(t),n&&(n=Vn.normalizeInput(n)),i&&(i=Vn.normalizeInput(i));const o=wc(r,e,n,i);return xo(o,t),xc(o)}function $p(t,e,r,n,i){const o=Ac(t,e,r,n,i);return Vn.toHex(o)}var Yp={blake2b:Ac,blake2bHex:$p,blake2bInit:wc,blake2bUpdate:xo,blake2bFinal:xc};const Mc=gc;function Vp(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Gt(t,e,r,n,i,o){ce[t]=ce[t]+ce[e]+i,ce[n]=Qn(ce[n]^ce[t],16),ce[r]=ce[r]+ce[n],ce[e]=Qn(ce[e]^ce[r],12),ce[t]=ce[t]+ce[e]+o,ce[n]=Qn(ce[n]^ce[t],8),ce[r]=ce[r]+ce[n],ce[e]=Qn(ce[e]^ce[r],7)}function Qn(t,e){return t>>>e^t<<32-e}const vc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ge=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),ce=new Uint32Array(16),Ue=new Uint32Array(16);function Nc(t,e){let r=0;for(r=0;r<8;r++)ce[r]=t.h[r],ce[r+8]=vc[r];for(ce[12]^=t.t,ce[13]^=t.t/4294967296,e&&(ce[14]=~ce[14]),r=0;r<16;r++)Ue[r]=Vp(t.b,4*r);for(r=0;r<10;r++)Gt(0,4,8,12,Ue[Ge[r*16+0]],Ue[Ge[r*16+1]]),Gt(1,5,9,13,Ue[Ge[r*16+2]],Ue[Ge[r*16+3]]),Gt(2,6,10,14,Ue[Ge[r*16+4]],Ue[Ge[r*16+5]]),Gt(3,7,11,15,Ue[Ge[r*16+6]],Ue[Ge[r*16+7]]),Gt(0,5,10,15,Ue[Ge[r*16+8]],Ue[Ge[r*16+9]]),Gt(1,6,11,12,Ue[Ge[r*16+10]],Ue[Ge[r*16+11]]),Gt(2,7,8,13,Ue[Ge[r*16+12]],Ue[Ge[r*16+13]]),Gt(3,4,9,14,Ue[Ge[r*16+14]],Ue[Ge[r*16+15]]);for(r=0;r<8;r++)t.h[r]^=ce[r]^ce[r+8]}function Cc(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(vc),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(Ao(n,e),n.c=64),n}function Ao(t,e){for(let r=0;r>2]>>8*(r&3)&255;return e}function Dc(t,e,r){r=r||32,t=Mc.normalizeInput(t);const n=Cc(r,e);return Ao(n,t),Sc(n)}function qp(t,e,r){const n=Dc(t,e,r);return Mc.toHex(n)}var Qp={blake2s:Dc,blake2sHex:qp,blake2sInit:Cc,blake2sUpdate:Ao,blake2sFinal:Sc};const hn=Yp,pn=Qp;var Xp={blake2b:hn.blake2b,blake2bHex:hn.blake2bHex,blake2bInit:hn.blake2bInit,blake2bUpdate:hn.blake2bUpdate,blake2bFinal:hn.blake2bFinal,blake2s:pn.blake2s,blake2sHex:pn.blake2sHex,blake2sInit:pn.blake2sInit,blake2sUpdate:pn.blake2sUpdate,blake2sFinal:pn.blake2sFinal};const Jp=nt(Xp),Kp=t=>{const e=new ArrayBuffer(t.length),r=new Uint8Array(e);for(let n=0;nnew Uint8Array(Kp(t)),Ec=t=>{try{return re(Jp.blake2bHex(ef(t),void 0,32)).map(e=>oe.Buffer.from(e,"hex"))}catch(e){return se(e)}};var Tc=Symbol.for("immer-nothing"),kc=Symbol.for("immer-draftable"),Ke=Symbol.for("immer-state");function mt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var jr=Object.getPrototypeOf;function zr(t){return!!t&&!!t[Ke]}function ar(t){var e;return t?jc(t)||Array.isArray(t)||!!t[kc]||!!((e=t.constructor)!=null&&e[kc])||Kn(t)||ei(t):!1}var tf=Object.prototype.constructor.toString();function jc(t){if(!t||typeof t!="object")return!1;const e=jr(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===tf}function Xn(t,e){Jn(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Jn(t){const e=t[Ke];return e?e.type_:Array.isArray(t)?1:Kn(t)?2:ei(t)?3:0}function Mo(t,e){return Jn(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function zc(t,e,r){const n=Jn(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function rf(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Kn(t){return t instanceof Map}function ei(t){return t instanceof Set}function cr(t){return t.copy_||t.base_}function vo(t,e){if(Kn(t))return new Map(t);if(ei(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);if(!e&&jc(t))return jr(t)?{...t}:Object.assign(Object.create(null),t);const r=Object.getOwnPropertyDescriptors(t);delete r[Ke];let n=Reflect.ownKeys(r);for(let i=0;i1&&(t.set=t.add=t.clear=t.delete=nf),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>No(n,!0))),t}function nf(){mt(2)}function ti(t){return Object.isFrozen(t)}var of={};function ur(t){const e=of[t];return e||mt(0,t),e}var fn;function Bc(){return fn}function sf(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Lc(t,e){e&&(ur("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Co(t){So(t),t.drafts_.forEach(af),t.drafts_=null}function So(t){t===fn&&(fn=t.parent_)}function Pc(t){return fn=sf(fn,t)}function af(t){const e=t[Ke];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Oc(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[Ke].modified_&&(Co(e),mt(4)),ar(t)&&(t=ri(e,t),e.parent_||ni(e,t)),e.patches_&&ur("Patches").generateReplacementPatches_(r[Ke].base_,t,e.patches_,e.inversePatches_)):t=ri(e,r,[]),Co(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Tc?t:void 0}function ri(t,e,r){if(ti(e))return e;const n=e[Ke];if(!n)return Xn(e,(i,o)=>Rc(t,n,e,i,o,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return ni(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Xn(o,(a,l)=>Rc(t,n,i,a,l,r,s)),ni(t,i,!1),r&&t.patches_&&ur("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function Rc(t,e,r,n,i,o,s){if(zr(i)){const a=o&&e&&e.type_!==3&&!Mo(e.assigned_,n)?o.concat(n):void 0,l=ri(t,i,a);if(zc(r,n,l),zr(l))t.canAutoFreeze_=!1;else return}else s&&r.add(i);if(ar(i)&&!ti(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ri(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ni(t,i)}}function ni(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&No(e,r)}function cf(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:Bc(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Do;r&&(i=[n],o=gn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return n.draft_=a,n.revoke_=s,a}var Do={get(t,e){if(e===Ke)return t;const r=cr(t);if(!Mo(r,e))return uf(t,r,e);const n=r[e];return t.finalized_||!ar(n)?n:n===Eo(t.base_,e)?(ko(t),t.copy_[e]=jo(n,t)):n},has(t,e){return e in cr(t)},ownKeys(t){return Reflect.ownKeys(cr(t))},set(t,e,r){const n=Uc(cr(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=Eo(cr(t),e),o=i==null?void 0:i[Ke];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(rf(r,i)&&(r!==void 0||Mo(t.base_,e)))return!0;ko(t),To(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ko(t),To(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=cr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){mt(11)},getPrototypeOf(t){return jr(t.base_)},setPrototypeOf(){mt(12)}},gn={};Xn(Do,(t,e)=>{gn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),gn.deleteProperty=function(t,e){return gn.set.call(this,t,e,void 0)},gn.set=function(t,e,r){return Do.set.call(this,t[0],e,r,t[0])};function Eo(t,e){const r=t[Ke];return(r?cr(r):t)[e]}function uf(t,e,r){var i;const n=Uc(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function Uc(t,e){if(!(e in t))return;let r=jr(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=jr(r)}}function To(t){t.modified_||(t.modified_=!0,t.parent_&&To(t.parent_))}function ko(t){t.copy_||(t.copy_=vo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var lf=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const o=r;r=e;const s=this;return function(l=o,...d){return s.produce(l,h=>r.call(this,h,...d))}}typeof r!="function"&&mt(6),n!==void 0&&typeof n!="function"&&mt(7);let i;if(ar(e)){const o=Pc(this),s=jo(e,void 0);let a=!0;try{i=r(s),a=!1}finally{a?Co(o):So(o)}return Lc(o,n),Oc(i,o)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===Tc&&(i=void 0),this.autoFreeze_&&No(i,!0),n){const o=[],s=[];ur("Patches").generateReplacementPatches_(e,i,o,s),n(o,s)}return i}else mt(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let n,i;return[this.produce(e,r,(s,a)=>{n=s,i=a}),n,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){ar(t)||mt(8),zr(t)&&(t=df(t));const e=Pc(this),r=jo(t,void 0);return r[Ke].isManual_=!0,So(e),r}finishDraft(t,e){const r=t&&t[Ke];(!r||!r.isManual_)&&mt(9);const{scope_:n}=r;return Lc(n,e),Oc(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=ur("Patches").applyPatches_;return zr(t)?n(t,e):this.produce(t,i=>n(i,e))}};function jo(t,e){const r=Kn(t)?ur("MapSet").proxyMap_(t,e):ei(t)?ur("MapSet").proxySet_(t,e):cf(t,e);return(e?e.scope_:Bc()).drafts_.push(r),r}function df(t){return zr(t)||mt(10,t),Wc(t)}function Wc(t){if(!ar(t)||ti(t))return t;const e=t[Ke];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=vo(t,e.scope_.immer_.useStrictShallowCopy_)}else r=vo(t,!0);return Xn(r,(n,i)=>{zc(r,n,Wc(i))}),e&&(e.finalized_=!1),r}var et=new lf,Se=et.produce;et.produceWithPatches.bind(et),et.setAutoFreeze.bind(et),et.setUseStrictShallowCopy.bind(et),et.applyPatches.bind(et),et.createDraft.bind(et),et.finishDraft.bind(et),O({numberOfAccounts:pt,withProof:V(Ee()),reset:V(Ee())});const Zc=()=>{let e=Se({numberOfAccounts:{quantifier:"atLeast",quantity:1}},()=>{});const a={atLeast:l=>(e=Se(e,d=>{d.numberOfAccounts.quantifier="atLeast",d.numberOfAccounts.quantity=l}),a),exactly:l=>(e=Se(e,d=>{d.numberOfAccounts.quantifier="exactly",d.numberOfAccounts.quantity=l}),a),withProof:(l=!0)=>(e=Se(e,d=>{d.withProof=l}),a),reset:(l=!0)=>(e=Se(e,d=>{d.reset=l}),a),_toObject:()=>({accounts:e})};return a};O({withProof:V(Ee())});const hf=(t={withProof:!1})=>{let e=Se(t,()=>{});const i={withProof:(o=!0)=>(e=Se(e,s=>{s.withProof=o}),i),_toObject:()=>({persona:e})};return i};yh(O({fullName:Ee(),emailAddresses:pt,phoneNumbers:pt,reset:Ee()}));const _c=(t={})=>{let e=Se(t,()=>{});const r=(d=!0)=>(e=Se(e,h=>{h.fullName=d}),l),n=d=>({atLeast:h=>(e=Se(e,f=>{f[d]={quantifier:"atLeast",quantity:h}}),l),exactly:h=>(e=Se(e,f=>{f[d]={quantifier:"exactly",quantity:h}}),l)}),l={fullName:r,emailAddresses:(d=!0)=>(n("emailAddresses").exactly(d?1:0),l),phoneNumbers:(d=!0)=>(n("phoneNumbers").exactly(d?1:0),l),reset:(d=!0)=>(e=Se(e,h=>{h.reset=d}),l),_toObject:()=>({personaData:e})};return l},Fc=t=>({_toObject:()=>({...t})}),pf={accounts:Zc,personaData:_c,persona:hf,config:Fc},ff={accounts:Zc,personaData:_c},Gc=(t,e)=>{const r=[null,void 0,!1,!0];if(r.includes(t)||r.includes(e)||typeof t=="number"||typeof e=="number")return Object.is(t,e);const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(const o of n){const s=t[o],a=e[o],l=Hc(s)&&Hc(a);if(l&&!Gc(s,a)||!l&&s!==a)return!1}return!0},Hc=t=>t!=null&&typeof t=="object",$c=(t,e)=>{var r,n,i,o,s,a,l,d,h,f,m;if(t.discriminator==="authorizedRequest"){const y=((r=t.reset)==null?void 0:r.accounts)||((n=t.reset)==null?void 0:n.personaData),w=!!(t.oneTimeAccounts||t.oneTimePersonaData),A=t.auth.discriminator==="loginWithChallenge"||!!((i=t.oneTimeAccounts)!=null&&i.challenge)||!!((o=t.ongoingAccounts)!=null&&o.challenge);if(y||w||A)return!1;let T=!1;if(t.ongoingAccounts){const{quantifier:M,quantity:B}=t.ongoingAccounts.numberOfAccounts;T=((l=(a=(s=e.sharedData)==null?void 0:s.ongoingAccounts)==null?void 0:a.numberOfAccounts)==null?void 0:l.quantifier)===M&&((f=(h=(d=e.sharedData)==null?void 0:d.ongoingAccounts)==null?void 0:h.numberOfAccounts)==null?void 0:f.quantity)===B}return t.ongoingPersonaData&&(T=Gc(t.ongoingPersonaData,(m=e.sharedData)==null?void 0:m.ongoingPersonaData)),T}return!1},gf=O({accounts:V(O({numberOfAccounts:pt,reset:Ee(),oneTime:Ee(),challenge:V(F())})),personaData:V(O({fullName:V(Ee()),phoneNumbers:V(pt),emailAddresses:V(pt),reset:Ee(),oneTime:V(Ee())})),persona:V(O({identityAddress:V(F()),label:V(F()),challenge:V(F())}))}),mf=t=>{const{persona:e,accounts:r,personaData:n}=t,i=!!e,o=(r==null?void 0:r.reset)||(n==null?void 0:n.reset),s=r&&!(r!=null&&r.oneTime),a=n&&!(n!=null&&n.oneTime);return!!(o||s||a||i)},yf=t=>{var e,r,n;return(e=t.persona)!=null&&e.challenge?{discriminator:"loginWithChallenge",challenge:t.persona.challenge}:(r=t.persona)!=null&&r.identityAddress?{discriminator:"usePersona",identityAddress:(n=t.persona)==null?void 0:n.identityAddress}:{discriminator:"loginWithoutChallenge"}},Yc=t=>e=>{var i,o;const r={...e},{accounts:n}=t;if(n){const s={challenge:n.challenge,numberOfAccounts:n.numberOfAccounts},a=r.discriminator==="authorizedRequest"&&!((i=t.accounts)!=null&&i.oneTime),l=r.discriminator==="authorizedRequest";(o=t.accounts)!=null&&o.oneTime?r.oneTimeAccounts=s:(a||l)&&(r.ongoingAccounts=s)}return r},Vc=t=>e=>{var n,i;const r={...e};if(t.personaData){const{fullName:o,phoneNumbers:s,emailAddresses:a}=t.personaData;(n=t.personaData)!=null&&n.oneTime&&(r.oneTimePersonaData={isRequestingName:o,numberOfRequestedPhoneNumbers:s,numberOfRequestedEmailAddresses:a});const l=r.discriminator==="authorizedRequest"&&!((i=t.personaData)!=null&&i.oneTime),d=r.discriminator==="authorizedRequest";(l||d)&&(r.ongoingPersonaData={isRequestingName:o,numberOfRequestedPhoneNumbers:s,numberOfRequestedEmailAddresses:a})}return r},If=t=>e=>{const{accounts:r,personaData:n}=t;return{...e,reset:{accounts:!!(r!=null&&r.reset),personaData:!!(n!=null&&n.reset)}}},bf=t=>re({discriminator:"unauthorizedRequest"}).map(Yc(t)).map(Vc(t)),wf=t=>re({discriminator:"authorizedRequest",auth:yf(t)}).map(Yc(t)).map(Vc(t)).map(If(t)),xf=(t,e)=>re(t?Se(e,r=>{r.accounts&&(r.accounts.oneTime=!1,r.accounts.reset=!1),r.personaData&&(r.personaData.oneTime=!1,r.personaData.reset=!1)}):e),qc=(t,e)=>xf(t,e).andThen(r=>mf(r)?wf(r):bf(r)),Qc=({dataRequestState:t,isConnect:e,challenge:r,oneTime:n,walletData:i})=>qc(e,Se({},o=>{var s;if(t.accounts&&(o.accounts={numberOfAccounts:t.accounts.numberOfAccounts||{quantifier:"atLeast",quantity:1},oneTime:n,reset:!!t.accounts.reset,challenge:t.accounts.withProof?r:void 0}),t.personaData&&(o.personaData={...t.personaData,reset:!!t.personaData.reset,oneTime:n}),!n){const a=i.persona;i.persona&&(o.persona=a),(s=t.persona)!=null&&s.withProof&&(o.persona={...o.persona??{},challenge:r}),Object.values(t).length===0&&(o.persona={challenge:void 0})}})),zo=(t,e)=>{const{items:r}=t;return r.discriminator==="authorizedRequest"?Se({},n=>{n.persona={proof:!1},r.auth.discriminator==="loginWithChallenge"&&(n.persona.proof=!!r.auth.challenge),r.ongoingAccounts&&(n.ongoingAccounts={proof:!!r.ongoingAccounts.challenge,numberOfAccounts:r.ongoingAccounts.numberOfAccounts}),r.ongoingPersonaData&&(n.ongoingPersonaData=r.ongoingPersonaData)}):e},Xc=t=>Se({},e=>{t.ongoingAccounts&&(e.accounts={numberOfAccounts:t.ongoingAccounts.numberOfAccounts,withProof:t.ongoingAccounts.proof,reset:!0}),t.ongoingPersonaData&&(e.personaData={fullName:t.ongoingPersonaData.isRequestingName,phoneNumbers:t.ongoingPersonaData.numberOfRequestedPhoneNumbers,emailAddresses:t.ongoingPersonaData.numberOfRequestedEmailAddresses,reset:!1}),t.persona&&(e.persona={withProof:!1})}),lr={persona:"persona",account:"account"},Jc=O({challenge:F(),proof:Er,address:F(),type:X(lr.persona)}),Kc=O({challenge:F(),proof:Er,address:F(),type:X(lr.account)}),Bo=Bn("type",[Jc,Kc]),eu=O({entry:X("fullName"),fields:Ki}),tu=O({entry:X("emailAddresses"),fields:lt(F())}),ru=O({entry:X("phoneNumbers"),fields:lt(F())}),nu=Bn("entry",[eu,tu,ru]),iu=O({accounts:lt(Xi),personaData:lt(nu),persona:V(Tr),proofs:lt(Bo)}),ou=O({persona:V(O({proof:Ee()})),ongoingAccounts:V(O({numberOfAccounts:V(pt),proof:Ee()})),ongoingPersonaData:V(rn)}),Af=O({loggedInTimestamp:F(),walletData:iu,sharedData:ou}),su={accounts:[],personaData:[],proofs:[],persona:void 0},au=t=>{var m;(m=t==null?void 0:t.logger)==null||m.getSubLogger({name:"StateModule"});const e=t.providers.storageModule,r=new ht,n=y=>e.setState(y),i=()=>e.getState().orElse(()=>$e(s)).andThen(y=>re(y||s)),o=y=>i().andThen(w=>n({...w,...y})),s={walletData:su,loggedInTimestamp:"",sharedData:{}},a=()=>e.setState(s).map(()=>{h()});i().map(()=>h()).orElse(()=>a());const d=new ze(void 0),h=()=>{e.getState().map(y=>{d.next(y==null?void 0:y.walletData)})},f=d.asObservable().pipe(Re(y=>!!y));return{setState:n,patchState:o,getState:i,walletData$:f,emitWalletData:h,getWalletData:()=>d.value,reset:a,storage$:e.storage$,destroy:()=>{r.unsubscribe()}}},Mf=t=>e=>{var n,i,o;let r=[];if(t.discriminator==="authorizedRequest"){const s=((n=t.oneTimeAccounts)==null?void 0:n.accounts)??[],a=((i=t.ongoingAccounts)==null?void 0:i.accounts)??[];r=[...s,...a]}else t.discriminator==="unauthorizedRequest"&&(r=((o=t.oneTimeAccounts)==null?void 0:o.accounts)??[]);return Se(e,s=>{s.accounts=r})},Lo=t=>{const e=[];return t.name&&e.push({entry:"fullName",fields:t.name}),t.emailAddresses&&e.push({entry:"emailAddresses",fields:t.emailAddresses}),t.phoneNumbers&&e.push({entry:"phoneNumbers",fields:t.phoneNumbers}),e},vf=t=>e=>Se(e,r=>{t.discriminator==="authorizedRequest"?(t.oneTimePersonaData&&(r.personaData=Lo(t.oneTimePersonaData)),t.ongoingPersonaData&&(r.personaData=Lo(t.ongoingPersonaData))):t.discriminator==="unauthorizedRequest"&&t.oneTimePersonaData&&(r.personaData=Lo(t.oneTimePersonaData))}),Nf=t=>e=>Se(e,r=>{var n;t.discriminator==="authorizedRequest"&&(r.persona=(n=t.auth)==null?void 0:n.persona)}),Cf=t=>e=>Se(e,r=>{var n,i,o,s,a,l;if(r.proofs=[],t.discriminator==="authorizedRequest"){if(t.auth.discriminator==="loginWithChallenge"&&r.proofs.push({challenge:t.auth.challenge,proof:t.auth.proof,address:t.auth.persona.identityAddress,type:lr.persona}),(n=t.ongoingAccounts)!=null&&n.challenge&&((i=t.ongoingAccounts.proofs)!=null&&i.length)){const d=t.ongoingAccounts.challenge,h=t.ongoingAccounts.proofs.map(({accountAddress:f,proof:m})=>({proof:m,address:f,challenge:d,type:lr.account}));r.proofs.push(...h)}if((o=t.oneTimeAccounts)!=null&&o.challenge&&((s=t.oneTimeAccounts.proofs)!=null&&s.length)){const d=t.oneTimeAccounts.challenge,h=t.oneTimeAccounts.proofs.map(({accountAddress:f,proof:m})=>({proof:m,address:f,challenge:d,type:lr.account}));r.proofs.push(...h)}}if(t.discriminator==="unauthorizedRequest"&&(a=t.oneTimeAccounts)!=null&&a.challenge&&(l=t.oneTimeAccounts.proofs)!=null&&l.length){const d=t.oneTimeAccounts.challenge,h=t.oneTimeAccounts.proofs.map(({accountAddress:f,proof:m})=>({proof:m,address:f,challenge:d,type:lr.account}));r.proofs.push(...h)}}),Po=t=>$e({accounts:[],personaData:[],proofs:[],persona:void 0}).map(Mf(t)).map(vf(t)).map(Nf(t)).map(Cf(t)),cu=t=>{var o,s;const e=t.accounts??[],r=((o=t==null?void 0:t.persona)==null?void 0:o.label)??"",n=!!(t!=null&&t.persona),i=(s=t==null?void 0:t.personaData)==null?void 0:s.map(a=>{if(a.entry==="fullName"){const{variant:l,givenNames:d,familyName:h,nickname:f}=a.fields;return{value:l==="western"?`${d}${f?` "${f}" `:" "}${h}`:`${h}${f?` "${f}" `:" "}${d}`,field:"fullName"}}else{if(a.entry==="emailAddresses")return{value:a.fields[0],field:"emailAddress"};if(a.entry==="phoneNumbers")return{value:a.fields[0],field:"phoneNumber"}}}).filter(a=>{var l;return!!a&&!!((l=a.value)!=null&&l.trim())});return{accounts:e,personaLabel:r,connected:n,personaData:i}},uu=t=>{const e=new ze(t),r=()=>e.next(t),n=d=>e.next(d),i=()=>e.getValue(),o=(...d)=>d.filter(h=>typeof h._toObject=="function").reduce((h,f)=>({...h,...f._toObject()}),{});return{reset:r,setState:(...d)=>{d.length===0?r():n(o(...d))},getState:i,patchState:(...d)=>{d.length!==0&&n({...i(),...o(...d)})},removeState:(...d)=>{n(Se(i(),h=>{d.forEach(f=>{delete h[f]})}))},toDataRequestState:o,state$:e.asObservable()}},Sf=({interactionId:t,dAppDefinitionAddress:e,origin:r,logger:n})=>{const i="C",o=oe.Buffer.from("C","ascii"),s=e.length,a=oe.Buffer.from(s.toString(16),"hex"),l=oe.Buffer.from(e,"utf-8"),d=oe.Buffer.from(r,"utf-8"),h=oe.Buffer.from(t,"utf-8"),f=oe.Buffer.concat([o,h,a,l,d]);return Ec(f).map(y=>(n==null||n.debug({method:"createSignatureMessage",messagePartsRaw:[i,t,s,e,r],messageParts:[o.toString("hex"),h.toString("hex"),a.toString("hex"),l.toString("hex"),d.toString("hex")],message:f.toString("hex"),blake2bHash:y.toString("hex")}),oe.Buffer.from(y).toString("hex"))).mapErr(y=>({reason:"couldNotHashMessage",jsError:y}))},Df={dApp:"dApp"},lu=t=>{const{storageModule:e,KeyPairModule:r}=t.providers,n=d=>re(r(d)),i=d=>e.getItemById(d).andThen(h=>h?n(h.secret):$e(void 0)),o=d=>re(r()).asyncAndThen(h=>e.setItems({[d]:{secret:h.getPrivateKey(),createdAt:Date.now()}}).map(()=>h)),s=d=>i(d).andThen(h=>h?$e(h):o(d)).mapErr(h=>({reason:"couldNotGetOrCreateIdentity",jsError:h}));return{get:d=>s(d),deriveSharedSecret:(d,h)=>i(d).mapErr(()=>({reason:"couldNotDeriveSharedSecret"})).andThen(f=>f?f.x25519.calculateSharedSecret(h,t.dAppDefinitionAddress).mapErr(()=>({reason:"FailedToDeriveSharedSecret"})):se({reason:"DappIdentityNotFound"})),createSignature:({kind:d,interactionId:h,dAppDefinitionAddress:f,origin:m})=>s(d).andThen(y=>Sf({interactionId:h,dAppDefinitionAddress:f,origin:m,logger:t.logger}).andThen(w=>y.ed25519.sign(w).map(A=>({signature:A,publicKey:y.x25519.getPublicKey(),identity:y.ed25519.getPublicKey()})).mapErr(A=>({reason:"couldNotSignMessage",jsError:A}))))}},Ef={pending:"pending",success:"success",fail:"fail",cancelled:"cancelled",ignored:"ignored"},du=t=>{var f;const e=(f=t==null?void 0:t.logger)==null?void 0:f.getSubLogger({name:"RequestItemModule"}),r=new ht,n=t.providers.storageModule,i=({type:m,walletInteraction:y,isOneTimeRequest:w})=>({type:m,status:"pending",createdAt:Date.now(),interactionId:y.interactionId,showCancel:!0,walletInteraction:y,isOneTimeRequest:w}),o=m=>{const y=i(m);return e==null||e.debug({method:"addRequestItem",item:y}),n.setItems({[y.interactionId]:y}).map(()=>y)},s=(m,y)=>(e==null||e.debug({method:"patchRequestItemStatus",item:{id:m,...y}}),n.patchItem(m,y)),a=m=>(e==null||e.debug({method:"cancelRequestItem",id:m}),s(m,{status:"fail",error:Wn.canceledByUser})),l=({id:m,status:y,error:w,transactionIntentHash:A})=>n.getItemById(m).mapErr(()=>({reason:"couldNotReadFromStore"})).andThen(T=>{if(T){const M={...T,status:T.status===Ef.ignored?T.status:y};return M.status==="fail"&&(M.error=w),M.status==="success"&&M.type==="sendTransaction"&&(M.transactionIntentHash=A),["success","fail","ignored","cancelled"].includes(M.status)&&(delete M.walletInteraction,delete M.walletResponse),e==null||e.debug({method:"updateRequestItemStatus",updated:M}),n.setItems({[m]:M}).mapErr(()=>({reason:"couldNotWriteToStore"}))}return Et({reason:"itemNotFound"})}),d=()=>n.getItemList().map(m=>m.filter(y=>y.status==="pending")),h=n.storage$.pipe(st(()=>n.getItemList()),Be(m=>{if(m.isOk())return m.value}),Re(m=>!!m));return{add:o,cancel:a,updateStatus:l,patch:s,getById:m=>n.getItemById(m),getPending:d,requests$:h,clear:n.clear,destroy:()=>{r.unsubscribe()}}};for(var We=[],Oo=0;Oo<256;++Oo)We.push((Oo+256).toString(16).slice(1));function Tf(t,e=0){return(We[t[e+0]]+We[t[e+1]]+We[t[e+2]]+We[t[e+3]]+"-"+We[t[e+4]]+We[t[e+5]]+"-"+We[t[e+6]]+We[t[e+7]]+"-"+We[t[e+8]]+We[t[e+9]]+"-"+We[t[e+10]]+We[t[e+11]]+We[t[e+12]]+We[t[e+13]]+We[t[e+14]]+We[t[e+15]]).toLowerCase()}var ii,kf=new Uint8Array(16);function jf(){if(!ii&&(ii=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ii))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ii(kf)}var zf=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const hu={randomUUID:zf};function Br(t,e,r){if(hu.randomUUID&&!e&&!t)return hu.randomUUID();t=t||{};var n=t.random||(t.rng||jf)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Tf(n)}const pu=t=>{const e=t.providers.storageModule,r=()=>e.getItemList().mapErr(a=>({reason:"couldNotReadSessionFromStore",jsError:a})).map(a=>a[0]),n=a=>e.getItemById(a).mapErr(l=>({reason:"couldNotGetSessionById",jsError:l})),i=()=>{const a=Br(),l={sessionId:a,createdAt:Date.now()};return e.setItems({[a]:l}).map(()=>l).mapErr(d=>({reason:"couldNotCreateSession",jsError:d}))};return{getCurrentSession:()=>r().andThen(a=>a?$e(a):i()),getSession:r,store:e,getSessionById:n,patchSession:(a,l)=>e.patchItem(a,l).mapErr(d=>({reason:"couldNotPatchSession",jsError:d}))}},fu=()=>({outgoingMessageSubject:new Me,incomingMessageSubject:new Me,responseSubject:new Me,messageLifeCycleEventSubject:new Me}),gu=t=>{var y;let e=!1;const r=(y=t==null?void 0:t.logger)==null?void 0:y.getSubLogger({name:"ConnectorExtensionModule"}),n=(t==null?void 0:t.subjects)??fu(),i=new ht,o=(t==null?void 0:t.extensionDetectionTime)??200,s=t.providers.requestItemModule,a=t.providers.storageModule.getPartition("connectorExtension");i.add(n.incomingMessageSubject.pipe(ee(w=>{r==null||r.debug({method:"incomingMessageSubject",message:w}),"eventType"in w?n.messageLifeCycleEventSubject.next(w):n.responseSubject.next(w)})).subscribe()),i.add(n.outgoingMessageSubject.pipe(ee(w=>{r==null||r.debug({method:"outgoingMessageSubject",payload:w}),window.dispatchEvent(new CustomEvent(on.outgoingMessage,{detail:w}))})).subscribe());const l=w=>e?a.getState().andThen(A=>{const T=w.items.discriminator==="authorizedRequest",M=T?(A==null?void 0:A.sessionId)||Br():A==null?void 0:A.sessionId,B={interactionId:w.interactionId,interaction:w,sessionId:M,discriminator:"walletInteraction"};return T?a.setState({sessionId:M}).map(()=>B):$e(B)}):$e(w),d=w=>{const A=w.detail;n.incomingMessageSubject.next(A)};addEventListener(on.incomingMessage,d);const h=(w,A)=>{const T=new Me,M=n.responseSubject.pipe(Re(R=>R.interactionId===w.interactionId),tr(R=>s.patch(R.interactionId,{walletResponse:R}).mapErr(()=>he("requestItemPatchError",R.interactionId)).map(()=>R))),B=n.messageLifeCycleEventSubject.pipe(Re(({interactionId:R,eventType:ie})=>w.interactionId===R&&["requestCancelSuccess","requestCancelFail"].includes(ie)),Be(R=>{const ie=he("canceledByUser",R.interactionId);return r==null||r.debug("🔵⬆️❌ walletRequestCanceled",ie),R})),C=()=>(n.outgoingMessageSubject.next({interactionId:w.interactionId,metadata:w.metadata,...e?{discriminator:"cancelWalletInteraction"}:{items:{discriminator:"cancelRequest"}}}),setTimeout(()=>{T.next(se(he("canceledByUser",w.interactionId)))}),te.fromSafePromise(Mr(wt(M.pipe(Be(()=>"requestCancelFail")),B.pipe(Be(({eventType:R})=>R))))));A.requestControl&&A.requestControl({cancelRequest:()=>C().andThen(R=>R==="requestCancelSuccess"?re("requestCancelSuccess"):se("requestCancelFail")),getRequest:()=>w});const b=wt(M,T).pipe(Tn()),D=n.messageLifeCycleEventSubject.pipe(Re(({interactionId:R})=>w.interactionId===R),ee(R=>{A.eventCallback&&A.eventCallback(R.eventType)}),jd(M),zs()),j=D.subscribe(),_=Jr(o).pipe(Be(()=>se(he("missingExtension",w.interactionId)))),W=wt(_,D).pipe(Tn(),Re(R=>!("eventType"in R))),$=m.pipe(Re(R=>R.isExtensionAvailable),st(()=>Ar(l(w))),ee(R=>{R.map(ie=>{n.outgoingMessageSubject.next(ie)})}),Re(R=>!1));return Js(wt(b,W,$).pipe(ee(()=>{j.unsubscribe()})))},f=n.messageLifeCycleEventSubject.pipe(Re(w=>w.eventType==="extensionStatus")),m=Ar(!0).pipe(ee(()=>{n.outgoingMessageSubject.next({interactionId:Br(),discriminator:"extensionStatus"})}),st(()=>vd(f,wt(f,Jr(o).pipe(Be(()=>({eventType:"extensionStatus",isWalletLinked:!1,isExtensionAvailable:!1,canHandleSessions:!1})))))),ee(w=>{e=w.canHandleSessions||!1}),kd(1));return{id:"connector-extension",isSupported:()=>!Cr(),send:h,isAvailable$:m.pipe(Be(({isExtensionAvailable:w})=>w)),isLinked$:m.pipe(Be(({isWalletLinked:w})=>w)),showQrCode:()=>{window.dispatchEvent(new CustomEvent(on.outgoingMessage,{detail:{discriminator:"openPopup"}}))},disconnect:()=>{a.clear()},destroy:()=>{i.unsubscribe(),removeEventListener(on.incomingMessage,d)}}},mu=t=>{var s;const{walletUrl:e}=t,r=_s.parse(window.navigator.userAgent),{platform:n}=r,i=(s=t==null?void 0:t.logger)==null?void 0:s.getSubLogger({name:"DeepLinkModule"});return i==null||i.debug({platform:n,userAgent:window.navigator.userAgent,userAgentParsed:r}),{deepLinkToWallet:a=>{var d;const l=new URL(e);return Object.entries(a).forEach(([h,f])=>{l.searchParams.append(h,f)}),i==null||i.debug({method:"deepLinkToWallet",data:{...a}}),Cr()&&((d=globalThis.location)!=null&&d.href)?(globalThis.location.href=l.toString(),$e(void 0)):Et(he("UnhandledEnvironment",""))}}},Bf=t=>{let e=0,r=t.length;const n=o=>{if(o<0)return se(Error("'byteCount' must not be negative"));if(o===0)return re(oe.Buffer.alloc(0));if(e+o>t.length)return se(Error("Out of buffer's boundary"));const s=oe.Buffer.alloc(o);return t.copy(s,0,e,e+o),s.length!==o?se(Error("Incorrect length of newly read buffer...")):(e+=o,r-=o,re(s))},i=()=>r<0?se(Error("Incorrect implementation, read too many bytes.")):re(r===0);return{readNextBuffer:n,finishedParsing:i,remainingBytes:()=>i().andThen(o=>{if(o)return re(oe.Buffer.alloc(0));const s=oe.Buffer.alloc(r);return t.copy(s,0,e),re(s)})}},Lf=t=>Bf(t).readNextBuffer,Pf=({iv:t,ciphertext:e,authTag:r})=>oe.Buffer.concat([t,e,r]),Of=({ciphertext:t,authTag:e})=>oe.Buffer.concat([t,e]),Rf=t=>{const e=Lf(t),r=12,n=16;return vr.combine([e(r),e(t.length-r-n),e(n)]).map(([i,o,s])=>({iv:i,ciphertext:o,authTag:s,combined:Pf({iv:i,ciphertext:o,authTag:s}),ciphertextAndAuthTag:Of({ciphertext:o,authTag:s})}))},Uf=()=>{const t=(a,l,d)=>te.fromPromise(crypto.subtle.decrypt({name:"AES-GCM",iv:d},l,a),at).map(oe.Buffer.from),e=(a,l,d)=>te.fromPromise(crypto.subtle.encrypt({name:"AES-GCM",iv:d},l,a),at).map(oe.Buffer.from),r=a=>te.fromPromise(crypto.subtle.importKey("raw",a,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]),at),n=(a,l)=>oe.Buffer.concat([a,l]),i=(a,l,d)=>r(l).andThen(h=>t(a,h,d)),o=(a,l,d=s())=>r(l).andThen(h=>e(a,h,d)).map(h=>({combined:n(d,h),iv:d,ciphertext:h})),s=()=>oe.Buffer.from(crypto.getRandomValues(new Uint8Array(12)));return{encrypt:o,decrypt:i,createIV:s}},Wf=t=>{var o;const e=t.baseUrl,r=(o=t.logger)==null?void 0:o.getSubLogger({name:"RadixConnectRelayApi"}),n=s=>(r==null||r.debug({method:`callApi.${s.method}`,body:s}),Oi(fetch(e,{method:"POST",body:JSON.stringify(s)})).map(a=>(r==null||r.debug({method:`callApi.${s.method}.success`,response:a}),a)).mapErr(a=>(r==null||r.debug({method:`callApi.${s.method}.error`,error:a}),he("RadixConnectRelayRequestFailed",s.interactionId??""))));return{getResponses:s=>n({method:"getResponses",sessionId:s}).map(a=>a.data)}};var yu={exports:{}},Ro={},Uo={};Object.defineProperty(Uo,"__esModule",{value:!0});function Zf(t){var e=4,r=t.length,n=r%e;if(!n)return t;var i=r,o=e-n,s=r+o,a=Buffer.alloc(s);for(a.write(t);o--;)a.write("=",i++);return a.toString()}Uo.default=Zf,Object.defineProperty(Ro,"__esModule",{value:!0});var _f=Uo;function Iu(t,e){return e===void 0&&(e="utf8"),Buffer.isBuffer(t)?Zo(t.toString("base64")):Zo(Buffer.from(t,e).toString("base64"))}function Ff(t,e){return e===void 0&&(e="utf8"),Buffer.from(Wo(t),"base64").toString(e)}function Wo(t){return t=t.toString(),_f.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function Zo(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Gf(t){return Buffer.from(Wo(t),"base64")}var Lr=Iu;Lr.encode=Iu,Lr.decode=Ff,Lr.toBase64=Wo,Lr.fromBase64=Zo,Lr.toBuffer=Gf,Ro.default=Lr,function(t){t.exports=Ro.default,t.exports.default=t.exports}(yu);var Hf=yu.exports;const $f=nt(Hf),Yf=t=>$f.encode(Buffer.from(JSON.stringify(t))),bu=t=>{var D;const e=(D=t.logger)==null?void 0:D.getSubLogger({name:"RadixConnectRelayModule"}),{baseUrl:r,providers:n,walletUrl:i}=t,{requestItemModule:o,storageModule:s}=n,a=s.getPartition("walletResponses"),l=(n==null?void 0:n.encryptionModule)??Uf(),d=(n==null?void 0:n.deepLinkModule)??mu({logger:e,walletUrl:i}),h=(n==null?void 0:n.identityModule)??lu({logger:e,dAppDefinitionAddress:t.dAppDefinitionAddress,providers:{storageModule:s.getPartition("identities"),KeyPairModule:fc}}),f=(n==null?void 0:n.sessionModule)??pu({providers:{storageModule:s.getPartition("sessions")}}),m=Wf({baseUrl:`${r}/api/v1`,logger:e}),y=new ht,w=(j=1500)=>new Promise(_=>setTimeout(_,j)),A=j=>"error"in j?Et({reason:j.error}):h.get("dApp").andThen(_=>_.x25519.calculateSharedSecret(j.publicKey,t.dAppDefinitionAddress).mapErr(()=>({reason:"FailedToDeriveSharedSecret"})).asyncAndThen(W=>C(W,j.data))),T=async()=>{await o.getPending().andThen(j=>j.length===0?$e(void 0):f.getCurrentSession().andThen(_=>m.getResponses(_.sessionId)).andThen(_=>te.combine(_.map(W=>A(W))).andThen(W=>a.setItems(W.reduce(($,R)=>($[R.interactionId]=R,$),{}))))),await w(),T()};T();const M=({session:j,walletInteraction:_,signature:W,publicKey:$,identity:R})=>o.getById(_.interactionId).mapErr(()=>he("FailedToGetPendingItems",_.interactionId)).andThen(ie=>ie?re(ie):se(he("PendingItemNotFound",_.interactionId))).andThen(()=>o.patch(_.interactionId,{sentToWallet:!0}).andThen(()=>d.deepLinkToWallet({sessionId:j.sessionId,request:Yf(_),signature:W,publicKey:$,identity:R,origin:_.metadata.origin,dAppDefinitionAddress:_.metadata.dAppDefinitionAddress}))).mapErr(()=>he("FailedToSendDappRequest",_.interactionId)),B=(j,_)=>te.combine([f.getCurrentSession().mapErr(W=>he(W.reason,j.interactionId)),h.get("dApp").mapErr(W=>he(W.reason,j.interactionId))]).andThen(([W,$])=>h.createSignature({dAppDefinitionAddress:j.metadata.dAppDefinitionAddress,interactionId:j.interactionId,origin:j.metadata.origin,kind:"dApp"}).mapErr(R=>he(R.reason,j.interactionId)).andThen(({signature:R})=>M({session:W,walletInteraction:j,signature:R,identity:$.ed25519.getPublicKey(),publicKey:$.x25519.getPublicKey()})).andThen(()=>b(j.interactionId))),C=(j,_)=>Rf(Buffer.from(_,"hex")).asyncAndThen(({ciphertextAndAuthTag:W,iv:$})=>l.decrypt(W,Buffer.from(j,"hex"),$)).andThen(W=>Tt(W.toString("utf-8"))).mapErr(W=>({reason:"FailedToDecryptWalletResponseData",jsError:W})),b=j=>te.fromPromise(new Promise(async(_,W)=>{var ie;let $,R;for(e==null||e.debug({method:"waitForWalletResponse",interactionId:j});!$;){const me=await o.getById(j);if(me.isOk()&&(e==null||e.trace({method:"waitForWalletResponse.requestItemResult",requestItemResult:me.value}),((ie=me.value)==null?void 0:ie.status)!=="pending")){R=he("RequestItemNotPending",j,"request not in pending state");break}const ue=await a.getItemById(j);ue.isOk()&&ue.value&&($=ue.value,await a.removeItemById(j),await o.patch(j,{walletResponse:ue.value})),$||await w()}return $?_($):W(R)}),_=>_);return{id:"radix-connect-relay",isSupported:()=>Cr(),send:B,disconnect:()=>{},destroy:()=>{y.unsubscribe()}}},wu=t=>{var f;const e={version:2,dAppDefinitionAddress:t.dAppDefinitionAddress,networkId:t.networkId,origin:t.origin||window.location.origin};ia(Un,e);const r=(f=t==null?void 0:t.logger)==null?void 0:f.getSubLogger({name:"WalletSdk"}),n=t.providers.transports,i=async m=>m,o=t.requestInterceptor??i;r==null||r.debug({metadata:e});const s=(m,y=Br())=>({items:m,interactionId:y,metadata:e}),a=m=>te.fromPromise(o(m),y=>he("requestInterceptorError",m.interactionId,y.message)),l=m=>{const y=n.find(w=>w.isSupported());return y?re(y):se({error:"SupportedTransportNotFound",interactionId:m,message:"No supported transport found"})};return{request:({interactionId:m=Br(),items:y},w={})=>a({items:y,interactionId:m,metadata:e}).andThen(A=>l(A.interactionId).asyncAndThen(T=>T.send(A,w).andThen(ro))),sendTransaction:({interactionId:m=Br(),items:y},w={})=>a({interactionId:m,items:y,metadata:e}).andThen(A=>l(m).asyncAndThen(T=>T.send(A,w).andThen(ro))),createWalletInteraction:s,getTransport:l}},_o={Unknown:"Unknown",CommittedSuccess:"CommittedSuccess",CommittedFailure:"CommittedFailure",Pending:"Pending",Rejected:"Rejected"},Ht={Mainnet:1,Stokenet:2,Gilganet:32,Enkinet:33,Hammunet:34,Nergalnet:35,Mardunet:36,Dumunet:37},xu={Mainnet:{networkName:"Mainnet",networkId:Ht.Mainnet,gatewayUrl:"https://mainnet.radixdlt.com",dashboardUrl:"https://dashboard.radixdlt.com"},Stokenet:{networkName:"Stokenet",networkId:Ht.Stokenet,gatewayUrl:"https://babylon-stokenet-gateway.radixdlt.com",dashboardUrl:"https://stokenet-dashboard.radixdlt.com"},Mardunet:{networkName:"Mardunet",networkId:Ht.Mardunet,gatewayUrl:"https://mardunet-gateway.radixdlt.com",dashboardUrl:"https://mardunet-dashboard.rdx-works-main.extratools.works"},Gilganet:{networkName:"Gilganet",networkId:Ht.Gilganet,gatewayUrl:"https://gilganet-gateway.radixdlt.com",dashboardUrl:"https://gilganet-dashboard.rdx-works-main.extratools.works"},Enkinet:{networkName:"Enkinet",networkId:Ht.Enkinet,gatewayUrl:"https://enkinet-gateway.radixdlt.com",dashboardUrl:"https://enkinet-dashboard.rdx-works-main.extratools.works"},Hammunet:{networkName:"Hammunet",networkId:Ht.Hammunet,gatewayUrl:"https://hammunet-gateway.radixdlt.com",dashboardUrl:"https://hammunet-dashboard.rdx-works-main.extratools.works"},Dumunet:{networkName:"Dumunet",networkId:Ht.Dumunet,gatewayUrl:"https://dumunet-gateway.radixdlt.com",dashboardUrl:"https://dumunet-dashboard.rdx-works-main.extratools.works"}},Fo=Object.values(xu).reduce((t,e)=>(t[e.networkId]=e,t),{}),Au=({networkId:t,dAppDefinitionAddress:e,gatewayBaseUrl:r,applicationName:n,applicationVersion:i})=>({basePath:r??Fo[t].gatewayUrl,applicationName:n??"Unknown",applicationVersion:i??"Unknown",applicationDappDefinitionAddress:e}),Vf="2.1.0",Mu=({basePath:t,applicationName:e,applicationVersion:r,applicationDappDefinitionAddress:n})=>{const i=(a,l)=>Oi(fetch(`${t}${a}`,{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json","RDX-Client-Name":"@radixdlt/radix-dapp-toolkit","RDX-Client-Version":Vf,"RDX-App-Name":e,"RDX-App-Version":r,"RDX-App-Dapp-Definition":n}})).map(d=>d.data);return{getTransactionStatus:a=>i("/transaction/status",{intent_hash:a}),getEntityMetadataPage:a=>i("/state/entity/page/metadata",{address:a})}},vu=t=>{var i,o;const e=(i=t.logger)==null?void 0:i.getSubLogger({name:"GatewayModule"}),r=((o=t==null?void 0:t.providers)==null?void 0:o.gatewayApiService)??Mu(t.clientConfig);return{pollTransactionStatus:s=>{const a=Rs(t.retryConfig),l=new Set(["CommittedSuccess","CommittedFailure","Rejected"]);return te.fromPromise(Mr(a.withBackoff$.pipe(st(d=>d.isErr()?[se(he("failedToPollSubmittedTransaction","",void 0,{error:d.error,context:"GatewayModule.pollTransactionStatus.retry.withBackoff$",transactionIntentHash:s}))]:(e==null||e.debug(`pollingTxStatus retry #${d.value+1}`),r.getTransactionStatus(s).map(h=>{if(l.has(h.status))return h;a.trigger.next()}).orElse(h=>h.reason==="FailedToFetch"?(e==null||e.debug({error:h,context:"unexpected error, retrying"}),a.trigger.next(),re(void 0)):(e==null||e.debug(h),se(he("failedToPollSubmittedTransaction","",void 0,{error:h,transactionIntentHash:s,context:"GatewayModule.pollTransactionStatus.getTransactionStatus"})))))),Re(d=>d.isOk()&&!!d.value||d.isErr()),Tn())),d=>d).andThen(d=>d)},gatewayApi:r,configuration:t.clientConfig}},Nu=t=>{var Y;const e=(Y=t.logger)==null?void 0:Y.getSubLogger({name:"WalletRequestModule"}),r=t.useCache,n=t.networkId,i=new Me,o=new Me,s=new Me,a=t.providers.gatewayModule,l=t.dAppDefinitionAddress,d=t.providers.stateModule,h=t.providers.storageModule,f=t.providers.dataRequestStateModule??uu({}),m=t.providers.requestItemModule??du({logger:e,providers:{storageModule:h.getPartition("requests")}}),y=t.providers.transports??[gu({logger:e,providers:{requestItemModule:m,storageModule:h}}),bu({logger:e,walletUrl:"radixWallet://connect",baseUrl:"https://radix-connect-relay.radixdlt.com",dAppDefinitionAddress:t.dAppDefinitionAddress,providers:{requestItemModule:m,storageModule:h}})],w=t.providers.walletRequestSdk??wu({logger:e,networkId:n,origin:t.origin,dAppDefinitionAddress:l,requestInterceptor:t.requestInterceptor,providers:{transports:y}}),A=S=>{const k=new Me;return{eventCallback:z=>{k.next(z)},requestControl:({cancelRequest:z,getRequest:q})=>{Mr(k.pipe(Re(Q=>Q==="receivedByWallet"),Be(()=>q()),ee(Q=>{Q.items.discriminator==="transaction"&&m.patch(S,{showCancel:!1})}))),Mr(i.pipe(Re(Q=>Q===S),st(()=>m.cancel(S).andThen(()=>z())))),Mr(o.pipe(Re(Q=>Q===S),st(()=>m.updateStatus({id:S,status:"ignored"}).andThen(()=>z()))))}}};let T=()=>Promise.resolve(""),M,B;const C=S=>{var k,z;return((k=S.accounts)==null?void 0:k.withProof)||((z=S.persona)==null?void 0:z.withProof)},b=S=>C(S)?te.fromPromise(T(),()=>he("ChallengeGeneratorError","","failed to generate challenge")).andThen(k=>Za(k)?re(k):se(he("ChallengeValidationError","","challenge is invalid"))):$e(void 0),D=S=>{M=k=>S(k)},j=S=>{B=k=>te.fromPromise(S(k),()=>({error:"LoginRejectedByDapp",message:"Login rejected by dApp"}))},_=(...S)=>R({dataRequestState:f.toDataRequestState(...S),isConnect:!1,oneTime:!0}),W=(S,k)=>k.discriminator==="success"&&k.items.discriminator==="authorizedRequest"?te.combine([Po(k.items),d.getState()]).andThen(([z,q])=>d.setState({loggedInTimestamp:Date.now().toString(),walletData:z,sharedData:zo(S,q.sharedData)}).andThen(()=>m.updateStatus({id:k.interactionId,status:"success"}))):$e(void 0),$=S=>w.request(S,A(S.interactionId)).map(k=>(e==null||e.debug({method:"sendDataRequest.successResponse",response:k}),k)).mapErr(k=>(e==null||e.debug({method:"sendDataRequest.errorResponse",error:k}),m.updateStatus({id:S.interactionId,status:"fail",error:k.error}),k)),R=({isConnect:S,oneTime:k,dataRequestState:z})=>te.combine([b(z),d.getState().mapErr(()=>he("FailedToReadRdtState",""))]).andThen(([q,Q])=>Qc({dataRequestState:z,isConnect:S,oneTime:k,challenge:q,walletData:Q.walletData}).mapErr(()=>he("FailedToTransformWalletRequest","")).asyncAndThen(le=>{const P=w.createWalletInteraction(le);if($c(le,Q)&&r)return $e(Q.walletData);const De=!Q.walletData.persona&&le.discriminator==="authorizedRequest";return m.add({type:De?"loginRequest":"dataRequest",walletInteraction:P,isOneTimeRequest:k}).mapErr(({message:de})=>he("FailedToCreateRequestItem",P.interactionId,de)).andThen(()=>$(P).andThen(de=>de.discriminator==="success"&&de.items.discriminator!=="transaction"?re(de.items):se(he("WalletResponseFailure",de.interactionId,"expected data response"))).andThen(Po).andThen(de=>B?B(de).andThen(()=>m.updateStatus({id:P.interactionId,status:"success"}).mapErr(Oe=>he(Oe.reason,P.interactionId)).map(()=>de)).mapErr(Oe=>(m.updateStatus({id:P.interactionId,status:"fail",error:Oe.error}),he(Oe.error,P.interactionId))):m.updateStatus({id:P.interactionId,status:"success"}).map(()=>de).mapErr(Oe=>he(Oe.reason,P.interactionId))).map(de=>(s.next("success"),k||d.setState({loggedInTimestamp:Date.now().toString(),walletData:de,sharedData:zo(P,Q.sharedData)}).map(()=>{d.emitWalletData()}),de)).mapErr(de=>(s.next("fail"),de)))})).mapErr(q=>(e==null||e.error(q),q)),ie=(...S)=>(f.setState(...S),{sendRequest:()=>R({dataRequestState:f.getState(),isConnect:!1,oneTime:!1})}),me=()=>d.getState().mapErr(S=>(e==null||e.error(S),{error:"FailedToReadRdtState",message:"failed to read rdt state",jsError:S})).andThen(S=>R({dataRequestState:Xc(S.sharedData),isConnect:!1,oneTime:!1})),ue=new ht;ue.add(m.requests$.pipe(tr(S=>{const k=S.filter(z=>z.status==="pending"&&z.walletResponse).map(z=>W(z.walletInteraction,z.walletResponse));return te.combineWithAllErrors(k)})).subscribe());const dt=S=>{const k=w.createWalletInteraction({discriminator:"transaction",send:{blobs:S.blobs,transactionManifest:S.transactionManifest,message:S.message,version:S.version??1}});return m.add({type:"sendTransaction",walletInteraction:k,isOneTimeRequest:!1}),w.sendTransaction(k,A(k.interactionId)).mapErr(z=>(m.updateStatus({id:k.interactionId,status:"fail",error:z.error}),s.next("fail"),e==null||e.debug({method:"sendTransaction.errorResponse",response:z}),z)).andThen(z=>(e==null||e.debug({method:"sendTransaction.successResponse",response:z}),z.discriminator==="success"&&z.items.discriminator==="transaction"?re(z.items.send):z.discriminator==="failure"?se(he(z.error,z.interactionId,z.message)):se(he("WalletResponseFailure",z.interactionId)))).andThen(({transactionIntentHash:z})=>(S.onTransactionId&&S.onTransactionId(z),a.pollTransactionStatus(z).map(q=>({transactionIntentHash:z,status:q.status})))).andThen(z=>{const Q=[_o.Rejected,_o.CommittedFailure].includes(z.status);e==null||e.debug({method:"sendTransaction.pollTransactionStatus.completed",response:z});const le=Q?"fail":"success";return m.updateStatus({id:k.interactionId,status:le,transactionIntentHash:z.transactionIntentHash}).mapErr(()=>he("FailedToUpdateRequestItem",k.interactionId)).andThen(()=>(s.next(le),Q?se(he("TransactionNotSuccessful",k.interactionId)):re(z)))})},Ve=()=>y.find(S=>S.isSupported()),Nt=()=>m.getPending(),Ct=S=>{i.next(S),m.cancel(S),s.next("fail")},Z=S=>{o.next(S),m.updateStatus({id:S,status:"ignored"}),s.next("fail")},E=S=>{T=S},G=()=>{m.getPending().map(S=>{S.forEach(k=>{k.showCancel&&i.next(k.interactionId)})}),d.reset(),m.clear(),y.forEach(S=>S==null?void 0:S.disconnect())},U=()=>{var S;d.destroy(),m.destroy(),(S=t.providers.transports)==null||S.forEach(k=>k.destroy()),ue.unsubscribe()};return{sendRequest:S=>{const k=R({isConnect:S.isConnect,oneTime:S.oneTime,dataRequestState:f.getState()});return M&&k.map(z=>{M(re(z))}).mapErr(z=>{M(se(z))}),k},sendTransaction:dt,cancelRequest:Ct,ignoreTransaction:Z,requestItemModule:m,provideChallengeGenerator:E,provideDataRequestControl:j,provideConnectResponseCallback:D,sendOneTimeRequest:_,setRequestDataState:ie,getPendingRequests:Nt,getTransport:Ve,updateSharedAccounts:me,dataRequestStateModule:f,interactionStatusChange$:s.asObservable(),requestItems$:m.requests$,disconnect:G,destroy:U}},qf=()=>![typeof window,typeof document].includes("undefined"),Qf=()=>({status$:rr,onConnect$:rr,onDisconnect$:rr,onUpdateSharedAccounts$:rr,onShowPopover$:rr,onCancelRequestItem$:rr,onLinkClick$:rr,setStatus:()=>{},setMode:()=>{},setTheme:()=>{},setActiveTab:()=>{},setIsMobile:()=>{},setIsWalletLinked:()=>{},setIsExtensionAvailable:()=>{},setConnected:()=>{},setLoggedInTimestamp:()=>{},setRequestItems:()=>{},setAccounts:()=>{},setPersonaData:()=>{},setPersonaLabel:()=>{},setDappName:()=>{},destroy:()=>{},disconnect:()=>{}}),Cu=t=>{var C;if(!qf())return Qf();Promise.resolve().then(()=>g0);const e=(C=t==null?void 0:t.logger)==null?void 0:C.getSubLogger({name:"ConnectButtonModule"}),r=t.subjects||_a(),n=t.dAppDefinitionAddress,{baseUrl:i,accountsPath:o,transactionPath:s}=t.explorer??{baseUrl:Fo[t.networkId].dashboardUrl,transactionPath:"/transaction/",accountsPath:"/account/"},a=t.providers.storageModule,l=t.providers.stateModule,d=t.providers.gatewayModule,h=t.providers.walletRequestModule,f=b=>{b()},m=t.onConnect||f,y=h.getTransport(),w=()=>document.querySelector("radix-connect-button"),A=new ht,T=ot(window,"onConnectButtonRender");A.add(T.pipe(Be(()=>w()),Re(b=>!!b),st(b=>{e==null||e.debug({observable:"onConnectButtonRender$"});const D=ot(b,"onConnect").pipe(ee(()=>{m(P=>r.onConnect.next(P))})),j=ot(b,"onDisconnect").pipe(ee(()=>r.onDisconnect.next())),_=ot(b,"onLinkClick").pipe(ee(P=>{r.onLinkClick.next(P.detail)})),W=ot(b,"onDestroy").pipe(Be(()=>(e==null||e.debug({observable:"onDestroy$"}),!0))),$=ot(b,"onCancelRequestItem").pipe(ee(P=>{const De=P.detail.id;e==null||e.debug({method:"onCancelRequestItem",id:De}),r.onCancelRequestItem.next(De)})),R=ot(b,"onIgnoreTransactionItem").pipe(ee(P=>{const De=P.detail.id;e==null||e.debug({method:"onIgnoreTransactionItem",id:De}),r.onIgnoreTransactionItem.next(De)})),ie=ot(b,"onUpdateSharedAccounts").pipe(ee(()=>{e==null||e.debug("onUpdateSharedAccounts"),r.onUpdateSharedAccounts.next()})),me=ot(b,"onShowPopover").pipe(ee(()=>r.onShowPopover.next())),ue=r.isWalletLinked.pipe(ee(P=>b.isWalletLinked=P)),dt=r.isExtensionAvailable.pipe(ee(P=>b.isExtensionAvailable=P)),Ve=r.status.pipe(ee(P=>b.status=P)),Nt=r.mode.pipe(ee(P=>b.mode=P)),Ct=r.connected.pipe(ee(P=>b.connected=P)),Z=r.isMobile.pipe(ee(P=>b.isMobile=P)),E=r.loggedInTimestamp.pipe(ee(P=>b.loggedInTimestamp=P)),G=r.activeTab.pipe(ee(P=>b.activeTab=P)),U=r.requestItems.pipe(ee(P=>b.requestItems=P)),Y=r.showPopoverMenu.pipe(ee(P=>{P?b.setAttribute("showPopoverMenu","true"):b.removeAttribute("showPopoverMenu")})),S=r.accounts.pipe(ee(P=>b.accounts=P)),k=r.personaData.pipe(ee(P=>b.personaData=P)),z=r.personaLabel.pipe(ee(P=>b.personaLabel=P)),q=r.dAppName.pipe(ee(P=>b.dAppName=P)),Q=r.theme.pipe(ee(P=>b.theme=P)),le=wt(D,Ve,Q,Nt,Ct,Y,U,E,Z,G,ue,dt,j,$,R,S,k,z,ie,me,q,_).pipe(Be(()=>!1));return wt(le,W).pipe(Re(P=>!!P),Tn(),Td(()=>{e==null||e.debug({observable:"onConnectButtonRender$.finalize"})}))})).subscribe()),A.add((y&&y.isAvailable$||Ar(!0)).pipe(ee(b=>r.isExtensionAvailable.next(b))).subscribe()),A.add((y&&y.isLinked$||Ar(!0)).pipe(ee(b=>r.isWalletLinked.next(b))).subscribe()),A.add(r.onLinkClick.pipe(ee(({type:b,data:D})=>{if(["account","transaction"].includes(b)){if(!i||!window)return;const j=`${i}${b==="transaction"?s:o}${D}`;window.open(j)}else b==="setupGuide"?window.open("https://wallet.radixdlt.com"):b==="getWallet"?window.open("https://app.radixdlt.com/qr-code"):b==="showQrCode"&&(y!=null&&y.showQrCode)&&y.showQrCode()})).subscribe());const M={status$:r.status.asObservable(),onConnect$:r.onConnect.asObservable(),onDisconnect$:r.onDisconnect.asObservable(),onShowPopover$:r.onShowPopover.asObservable(),onUpdateSharedAccounts$:r.onUpdateSharedAccounts.asObservable(),onCancelRequestItem$:r.onCancelRequestItem.asObservable(),onIgnoreTransactionItem$:r.onIgnoreTransactionItem.asObservable(),onLinkClick$:r.onLinkClick.asObservable(),setStatus:b=>r.status.next(b),setTheme:b=>r.theme.next(b),setMode:b=>r.mode.next(b),setActiveTab:b=>r.activeTab.next(b),setIsMobile:b=>r.isMobile.next(b),setIsWalletLinked:b=>r.isWalletLinked.next(b),setIsExtensionAvailable:b=>r.isExtensionAvailable.next(b),setLoggedInTimestamp:b=>r.loggedInTimestamp.next(b),setConnected:b=>r.connected.next(b),setShowPopoverMenu:b=>r.showPopoverMenu.next(b),setRequestItems:b=>r.requestItems.next(b),setAccounts:b=>r.accounts.next(b),setPersonaData:b=>r.personaData.next(b),setPersonaLabel:b=>r.personaLabel.next(b),setDappName:b=>r.dAppName.next(b),disconnect:()=>{r.connected.next(!1),r.status.next("default")},destroy:()=>{A.unsubscribe()}},B=()=>l.getState().map(b=>{const{personaData:D,accounts:j,personaLabel:_,connected:W}=cu(b.walletData);M.setLoggedInTimestamp(b.loggedInTimestamp),M.setAccounts(j),M.setPersonaData(D),M.setPersonaLabel(_),M.setConnected(W)});return A.add(l.storage$.pipe(st(()=>B())).subscribe()),A.add(r.onCancelRequestItem.pipe(ee(b=>{h.cancelRequest(b)})).subscribe()),A.add(r.onIgnoreTransactionItem.pipe(ee(b=>{h.ignoreTransaction(b)})).subscribe()),A.add(h.requestItems$.pipe(ee(b=>{b.find(j=>j.status==="pending")&&M.setStatus("pending"),M.setRequestItems([...b].reverse())})).subscribe()),A.add(r.onShowPopover.pipe(ee(()=>{h.getPendingRequests().map(b=>{b.length>0&&r.activeTab.next("requests")})})).subscribe()),A.add(r.onConnect.pipe(st(()=>l.reset().andThen(()=>h.sendRequest({isConnect:!0,oneTime:!1})).map(()=>Cr()&&r.showPopoverMenu.next(!1)))).subscribe()),A.add(r.onUpdateSharedAccounts.pipe(st(()=>h.updateSharedAccounts())).subscribe()),A.add(r.onDisconnect.pipe(ee(()=>{r.connected.next(!1),r.status.next("default"),h.disconnect(),t.onDisconnect&&t.onDisconnect()})).subscribe()),A.add(a.storage$.pipe(st(()=>a.getState().map(b=>{b!=null&&b.status&&r.status.next(b.status)}))).subscribe()),A.add(h.interactionStatusChange$.pipe(tr(b=>(a.setState({status:b==="success"?"success":"error"}),Jr(2e3).pipe(ee(()=>{h.getPendingRequests().map(j=>{a.setState({status:j.length?"pending":"default"})})}))))).subscribe()),n&&d.gatewayApi.getEntityMetadataPage(n).map(b=>{var D,j,_;return(_=(j=(D=b==null?void 0:b.items.find(W=>W.key==="name"))==null?void 0:D.value)==null?void 0:j.typed)==null?void 0:_.value}).map(b=>{r.dAppName.next(b??"Unnamed dApp")}),M},Xf={pending:"pending",success:"success",default:"default",error:"error"},Go=(t,e)=>{const r=e?`${t}:${e}`:t,n=()=>new Promise((M,B)=>{try{M(localStorage.getItem(r))}catch(C){B(C)}}),i=M=>new Promise((B,C)=>{try{localStorage.setItem(r,M),B()}catch(b){C(b)}}),o=()=>te.fromPromise(n(),at).andThen(M=>M?Tt(M):re({})),s=()=>te.fromPromise(n(),at).andThen(M=>M?Tt(M):re(void 0)),a=M=>te.fromPromise(n(),at).andThen(B=>B?Tt(B):re(void 0)).map(B=>B?B[M]:void 0),l=M=>o().andThen(B=>{const{[M]:C,...b}=B;return Kr(b).asyncAndThen(D=>te.fromPromise(i(D),at).map(()=>{window.dispatchEvent(new StorageEvent("storage",{key:r,oldValue:JSON.stringify(B),newValue:D}))}))}),d=(M,B)=>a(M).andThen(C=>C?h({[M]:{...C,...B}}):se(new Error("Item not found"))),h=M=>o().andThen(B=>Kr({...B,...M}).asyncAndThen(C=>te.fromPromise(i(C),at).map(()=>{window.dispatchEvent(new StorageEvent("storage",{key:r,oldValue:JSON.stringify(B),newValue:C}))}))),f=()=>o().map(Object.values),m=M=>s().andThen(B=>Kr({...B??{},...M}).asyncAndThen(C=>te.fromPromise(i(C),at).map(()=>{window.dispatchEvent(new StorageEvent("storage",{key:r,oldValue:JSON.stringify(B),newValue:C}))}))),y=M=>s().mapErr(()=>({reason:"FailedToReadFromLocalStorage"})).andThen(B=>B?m({...B,...M}).mapErr(()=>({reason:"FailedToWriteToLocalStorage"})):se({reason:"PatchingStateFailed"})),w=M=>Go(t,M),A=wt(ot(window,"storage"),Ar({key:r,newValue:null,oldValue:null})).pipe(Re(M=>M.key===r),tr(M=>{const{key:B,newValue:C,oldValue:b}=M;if(!B)return[];const[D,j,_,W]=B.split(":");if(D==="rdt"&&j&&_){const $=b?Tt(b):re(void 0),R=C?Tt(C):re(void 0);return[vr.combine([$,R]).map(([ie,me])=>({key:B,partition:W,newValue:me,oldValue:ie}))]}return[]}),Re(M=>M.isOk()),Be(({value:M})=>M));return{getItems:o,getItemById:a,removeItemById:l,patchItem:d,setItems:h,getItemList:f,getPartition:w,setState:m,getState:s,patchState:y,clear:()=>te.fromPromise(new Promise(M=>M(localStorage.removeItem(r))),at),storage$:A}};Tl();const Jf=Object.freeze(Object.defineProperty({__proto__:null,Account:Xi,AccountProof:sa,AccountsRequestItem:Pn,AccountsRequestResponseItem:On,AnswerIO:Ch,AuthLoginRequestItem:pa,AuthLoginRequestResponseItem:Na,AuthLoginWithChallengeRequestItem:ha,AuthLoginWithChallengeRequestResponseItem:va,AuthLoginWithoutChallengeRequestItem:da,AuthLoginWithoutChallengeRequestResponseItem:Ma,AuthRequestItem:fa,AuthRequestResponseItem:Ca,AuthUsePersonaRequestItem:la,CancelRequest:wa,CancelWalletInteractionExtensionInteraction:Ba,ConnectButtonModule:Cu,ConnectButtonStatus:Xf,ConnectButtonSubjects:_a,ConnectorExtensionModule:gu,ConnectorExtensionSubjects:fu,Curve25519:fc,DataRequestBuilder:pf,DataRequestStateModule:uu,DeepLinkModule:mu,ExponentialBackoff:Rs,ExtensionInteraction:vh,GatewayApiService:Mu,GatewayModule:vu,IceCandidateIO:Dh,IceCandidatePayloadIO:to,IceCandidatesIO:Eh,IdentityKind:Df,IdentityModule:lu,LocalStorageModule:Go,Logger:uh,LoginRequestResponseItem:bh,MessageLifeCycleEvent:La,MessageLifeCycleExtensionStatusEvent:Nh,Metadata:Un,NumberOfValues:pt,OfferIO:Sh,OneTimeDataRequestBuilder:ff,OpenPopupExtensionInteraction:ja,Persona:Tr,PersonaDataName:Ki,PersonaDataNameVariant:aa,PersonaDataRequestItem:rn,PersonaDataRequestResponseItem:Rn,Proof:Er,RadixConnectRelayModule:bu,RadixDappToolkit:t=>{const e=t.dAppDefinitionAddress??t.applicationDappDefinitionAddress,{networkId:r,providers:n,logger:i,onDisconnect:o,gatewayBaseUrl:s,applicationName:a,applicationVersion:l,useCache:d=!0}=t||{},h=(n==null?void 0:n.storageModule)??Go(`rdt:${e}:${r}`),f=(n==null?void 0:n.stateModule)??au({logger:i,providers:{storageModule:h.getPartition("state")}}),m=(n==null?void 0:n.gatewayModule)??vu({logger:i,clientConfig:Au({networkId:r,dAppDefinitionAddress:e,gatewayBaseUrl:s,applicationName:a,applicationVersion:l})}),y=(n==null?void 0:n.walletRequestModule)??Nu({logger:i,useCache:d,networkId:r,dAppDefinitionAddress:e,requestInterceptor:t.requestInterceptor,providers:{stateModule:f,storageModule:h,gatewayModule:m}}),w=(n==null?void 0:n.connectButtonModule)??Cu({logger:i,networkId:r,explorer:t.explorer,onDisconnect:o,dAppDefinitionAddress:e,providers:{stateModule:f,walletRequestModule:y,gatewayModule:m,storageModule:h.getPartition("connectButton")}});return{walletApi:{setRequestData:y.setRequestDataState,sendRequest:()=>y.sendRequest({isConnect:!1,oneTime:!1}),provideChallengeGenerator:A=>y.provideChallengeGenerator(A),dataRequestControl:A=>{y.provideDataRequestControl(A)},provideConnectResponseCallback:y.provideConnectResponseCallback,updateSharedAccounts:()=>y.updateSharedAccounts(),sendOneTimeRequest:y.sendOneTimeRequest,sendTransaction:A=>y.sendTransaction(A),walletData$:f.walletData$,getWalletData:f.getWalletData},buttonApi:{setTheme:w.setTheme,setMode:w.setMode,status$:w.status$},gatewayApi:{clientConfig:m.configuration},disconnect:()=>{y.disconnect(),w.disconnect(),o&&o()},destroy:()=>{f.destroy(),y.destroy(),w.destroy()}}},RadixNetwork:Ht,RadixNetworkConfig:xu,RadixNetworkConfigById:Fo,RdtState:Af,RequestItemModule:du,ResetRequestItem:ca,SendTransactionItem:ya,SendTransactionResponseItem:ba,SessionModule:pu,SharedData:ou,SignalingServerMessage:sn,SignedChallenge:Bo,SignedChallengeAccount:Kc,SignedChallengePersona:Jc,Sources:Wa,StateModule:au,StatusExtensionInteraction:ka,TransactionStatus:_o,TransformRdtDataRequestToWalletRequestInput:gf,WalletAuthorizedRequestItems:ga,WalletAuthorizedRequestResponseItems:Sa,WalletData:iu,WalletDataPersonaData:nu,WalletDataPersonaDataEmailAddresses:tu,WalletDataPersonaDataFullName:eu,WalletDataPersonaDataPhoneNumbersAddresses:ru,WalletInteraction:Aa,WalletInteractionExtensionInteraction:za,WalletInteractionFailureResponse:Ta,WalletInteractionItems:xa,WalletInteractionResponse:eo,WalletInteractionSuccessResponse:Ea,WalletRequestItems:ma,WalletRequestModule:Nu,WalletRequestResponseItems:Da,WalletRequestSdk:wu,WalletTransactionItems:Ia,WalletUnauthorizedRequestItems:ua,blake2b:Ec,canDataRequestBeResolvedByRdtState:$c,config:Fc,eventType:on,extensionInteractionDiscriminator:nn,fetchWrapper:Oi,generateGatewayApiConfig:Au,generateRolaChallenge:kh,isMobile:Cr,messageLifeCycleEventType:or,parseJSON:Tt,parseSignedChallenge:jh,personaDataFullNameVariant:Ji,proofType:lr,removeUndefined:lh,stringify:Kr,toWalletRequest:Qc,transformRdtDataRequestToWalletRequest:qc,transformSharedDataToDataRequestState:Xc,transformWalletDataToConnectButton:cu,transformWalletRequestToSharedData:zo,transformWalletResponseToRdtWalletData:Po,typedError:at,unwrapObservable:Js,validateRolaChallenge:Za,validateWalletResponse:ro,walletDataDefault:su},Symbol.toStringTag,{value:"Module"}));/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const oi=globalThis,Ho=oi.ShadowRoot&&(oi.ShadyCSS===void 0||oi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$o=Symbol(),Su=new WeakMap;let Du=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==$o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(Ho&&e===void 0){const n=r!==void 0&&r.length===1;n&&(e=Su.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Su.set(r,e))}return e}toString(){return this.cssText}};const ae=t=>new Du(typeof t=="string"?t:t+"",void 0,$o),be=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,o)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new Du(r,t,$o)},Kf=(t,e)=>{if(Ho)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of e){const n=document.createElement("style"),i=oi.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Eu=Ho?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return ae(r)})(t):t;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:eg,defineProperty:tg,getOwnPropertyDescriptor:rg,getOwnPropertyNames:ng,getOwnPropertySymbols:ig,getPrototypeOf:og}=Object,$t=globalThis,Tu=$t.trustedTypes,sg=Tu?Tu.emptyScript:"",Yo=$t.reactiveElementPolyfillSupport,mn=(t,e)=>t,si={toAttribute(t,e){switch(e){case Boolean:t=t?sg:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Vo=(t,e)=>!eg(t,e),ku={attribute:!0,type:String,converter:si,reflect:!1,hasChanged:Vo};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$t.litPropertyMetadata??($t.litPropertyMetadata=new WeakMap);let Pr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=ku){if(r.state&&(r.attribute=!1),this._$Ei(),this.elementProperties.set(e,r),!r.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&tg(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){const{get:i,set:o}=rg(this.prototype,e)??{get(){return this[r]},set(s){this[r]=s}};return{get(){return i==null?void 0:i.call(this)},set(s){const a=i==null?void 0:i.call(this);o.call(this,s),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ku}static _$Ei(){if(this.hasOwnProperty(mn("elementProperties")))return;const e=og(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(mn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mn("properties"))){const r=this.properties,n=[...ng(r),...ig(r)];for(const i of n)this.createProperty(i,r[i])}const e=this[Symbol.metadata];if(e!==null){const r=litPropertyMetadata.get(e);if(r!==void 0)for(const[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)r.unshift(Eu(i))}else e!==void 0&&r.push(Eu(e));return r}static _$Eu(e,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(r=>r(this))}addController(e){var r;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)==null||r.call(e))}removeController(e){var r;(r=this._$EO)==null||r.delete(e)}_$E_(){const e=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kf(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$EC(e,r){var o;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const s=(((o=n.converter)==null?void 0:o.toAttribute)!==void 0?n.converter:si).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){var o;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((o=s.converter)==null?void 0:o.fromAttribute)!==void 0?s.converter:si;this._$Em=i,this[i]=a.fromAttribute(r,s.type),this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??Vo)(this[e],r))return;this.P(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,r,n){this._$AL.has(e)||this._$AL.set(e,r),n.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,s]of i)s.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],s)}let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(r)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){var r;(r=this._$EO)==null||r.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(r=>this._$EC(r,this[r]))),this._$EU()}updated(e){}firstUpdated(e){}};Pr.elementStyles=[],Pr.shadowRootOptions={mode:"open"},Pr[mn("elementProperties")]=new Map,Pr[mn("finalized")]=new Map,Yo==null||Yo({ReactiveElement:Pr}),($t.reactiveElementVersions??($t.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const yn=globalThis,ai=yn.trustedTypes,ju=ai?ai.createPolicy("lit-html",{createHTML:t=>t}):void 0,zu="$lit$",Yt=`lit$${(Math.random()+"").slice(9)}$`,Bu="?"+Yt,ag=`<${Bu}>`,dr=document,In=()=>dr.createComment(""),bn=t=>t===null||typeof t!="object"&&typeof t!="function",Lu=Array.isArray,cg=t=>Lu(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",qo=`[ \f\r]`,wn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pu=/-->/g,Ou=/>/g,hr=RegExp(`>|${qo}(?:([^\\s"'>=/]+)(${qo}*=${qo}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ru=/'/g,Uu=/"/g,Wu=/^(?:script|style|textarea|title)$/i,ug=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),H=ug(1),Vt=Symbol.for("lit-noChange"),Pe=Symbol.for("lit-nothing"),Zu=new WeakMap,pr=dr.createTreeWalker(dr,129);function _u(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ju!==void 0?ju.createHTML(e):e}const lg=(t,e)=>{const r=t.length-1,n=[];let i,o=e===2?"":"",s=wn;for(let a=0;a"?(s=i??wn,f=-1):h[1]===void 0?f=-2:(f=s.lastIndex-h[2].length,d=h[1],s=h[3]===void 0?hr:h[3]==='"'?Uu:Ru):s===Uu||s===Ru?s=hr:s===Pu||s===Ou?s=wn:(s=hr,i=void 0);const y=s===hr&&t[a+1].startsWith("/>")?" ":"";o+=s===wn?l+ag:f>=0?(n.push(d),l.slice(0,f)+zu+l.slice(f)+Yt+y):l+Yt+(f===-2?a:y)}return[_u(t,o+(t[r]||"")+(e===2?"":"")),n]};let Qo=class wl{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,s=0;const a=e.length-1,l=this.parts,[d,h]=lg(e,r);if(this.el=wl.createElement(d,n),pr.currentNode=this.el.content,r===2){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=pr.nextNode())!==null&&l.length0){i.textContent=ai?ai.emptyScript:"";for(let y=0;y2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Pe}_$AI(e,r=this,n,i){const o=this.strings;let s=!1;if(o===void 0)e=Or(this,e,r,0),s=!bn(e)||e!==this._$AH&&e!==Vt,s&&(this._$AH=e);else{const a=e;let l,d;for(e=o[0],l=0;l{const n=(r==null?void 0:r.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const o=(r==null?void 0:r.renderBefore)??null;n._$litPart$=i=new Xo(e.insertBefore(In(),o),o,void 0,r??{})}return i._$AI(t),i};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class Ie extends Pr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mg(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Vt}}Ie._$litElement$=!0,Ie.finalized=!0,(Il=globalThis.litElementHydrateSupport)==null||Il.call(globalThis,{LitElement:Ie});const Ko=globalThis.litElementPolyfillSupport;Ko==null||Ko({LitElement:Ie}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ke=t=>(e,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const yg={attribute:!0,type:String,converter:si,reflect:!1,hasChanged:Vo},Ig=(t=yg,e,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(r.name,t),n==="accessor"){const{name:s}=r;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(s,l,t)},init(a){return a!==void 0&&this.P(s,void 0,t),a}}}if(n==="setter"){const{name:s}=r;return function(a){const l=this[s];e.call(this,a),this.requestUpdate(s,l,t)}}throw Error("Unsupported decorator location: "+n)};function L(t){return(e,r)=>typeof r=="object"?Ig(t,e,r):((n,i,o)=>{const s=i.hasOwnProperty(o);return i.constructor.createProperty(o,s?{...n,wrapped:!0}:n),s?Object.getOwnPropertyDescriptor(i,o):void 0})(t,e,r)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Fu(t){return L({...t,state:!0,attribute:!1})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Gu={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hu=t=>(...e)=>({_$litDirective$:t,values:e});let $u=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const tt=Hu(class extends $u{constructor(t){var e;if(super(t),t.type!==Gu.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var n,i;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!((n=this.nt)!=null&&n.has(o))&&this.st.add(o);return this.render(e)}const r=t.element.classList;for(const o of this.st)o in e||(r.remove(o),this.st.delete(o));for(const o in e){const s=!!e[o];s===this.st.has(o)||(i=this.nt)!=null&&i.has(o)||(s?(r.add(o),this.st.add(o)):(r.remove(o),this.st.delete(o)))}return Vt}});/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Yu="important",bg=" !"+Yu,es=Hu(class extends $u{constructor(t){var e;if(super(t),t.type!==Gu.ATTRIBUTE||t.name!=="style"||((e=t.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return n==null?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(t,[e]){const{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?r.removeProperty(n):r[n]=null);for(const n in e){const i=e[n];if(i!=null){this.ft.add(n);const o=typeof i=="string"&&i.endsWith(bg);n.includes("-")||o?r.setProperty(n,o?i.slice(0,-11):i,o?Yu:""):r[n]=i}}return Vt}}),Vu=be`:host{--color-radix-green-1:#00ab84;--color-radix-green-2:#00c389;--color-radix-green-3:#21ffbe;--color-radix-blue-1:#060f8f;--color-radix-blue-2:#052cc0;--color-radix-blue-3:#20e4ff;--color-light:#ffffff;--color-dark:#000000;--color-accent-red:#ef4136;--color-accent-blue:#00aeef;--color-accent-yellow:#fff200;--color-alert:#e59700;--color-radix-error-red-1:#c82020;--color-radix-error-red-2:#fcebeb;--color-grey-1:#003057;--color-grey-2:#8a8fa4;--color-grey-3:#ced0d6;--color-grey-4:#e2e5ed;--color-grey-5:#f4f5f9}`,ui=be`:host{font-family:'IBM Plex Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif}:host([mode=light]){--radix-popover-background:color-mix(in srgb, #efefef 50%, transparent);--radix-popover-border-color:var(--color-grey-3);--radix-popover-text-color:var(--color-grey-1);--radix-popover-tabs-background:color-mix( in srgb, var(--color-grey-2) 15%, transparent );--radix-popover-tabs-button-active-background:var(--color-light);--radix-link-color:var(--color-radix-blue-2);--radix-card-background:var(--color-light);--radix-card-text-color:var(--color-grey-1);--radix-card-text-dimmed-color:var(--color-grey-2);--radix-card-inverted-background:var(--color-grey-1);--radix-card-inverted-text-color:var(--color-light);--radix-avatar-border-color:var(--color-grey-5);--radix-mask-background:color-mix( in srgb, var(--color-light) 50%, transparent );--radix-button-background:color-mix( in srgb, var(--color-light) 80%, transparent );--radix-button-background-hover:var(--color-light);--radix-button-background-pressed:var(--color-grey-5);--radix-button-text-color:var(--color-radix-blue-2);--radix-button-disabled-background:color-mix( in srgb, var(--color-light) 80%, transparent );--radix-button-disabled-text-color:var(--color-grey-3);color:var(--color-grey-1)}:host([mode=dark]){--radix-popover-background:color-mix(in srgb, #000000 50%, transparent);--radix-popover-border-color:var(--color-dark);--radix-popover-text-color:var(--color-light);--radix-popover-tabs-background:color-mix( in srgb, var(--color-dark) 60%, transparent );--radix-popover-tabs-button-active-text-color:var(--color-light);--radix-popover-tabs-button-active-background:#515151;--radix-link-color:var(--color-white);--radix-card-background:#515151;--radix-card-text-color:var(--color-light);--radix-card-text-dimmed-color:var(--color-grey-3);--radix-card-inverted-background:var(--color-grey-5);--radix-card-inverted-text-color:var(--color-grey-1);--radix-avatar-border-color:#656565;--radix-mask-background:color-mix( in srgb, var(--color-dark) 40%, transparent );--radix-button-background:color-mix( in srgb, var(--color-dark) 40%, transparent );--radix-button-background-hover:var(--color-dark);--radix-button-background-pressed:#414141;--radix-button-text-color:var(--color-light);--radix-button-disabled-background:color-mix( in srgb, var(--color-dark) 40%, transparent );--radix-button-disabled-text-color:color-mix( in srgb, var(--color-light) 20%, transparent );color:var(--color-light)}:host([theme=radix-blue]){--radix-connect-button-background:var(--color-radix-blue-2);--radix-connect-button-background-hover:var(--color-radix-blue-1);--radix-connect-button-border-color:var(--color-radix-blue-2);--radix-connect-button-text-color:var(--color-light)}:host([theme=black]){--radix-connect-button-background:var(--color-dark);--radix-connect-button-background-hover:#3e3e3e;--radix-connect-button-border-color:var(--color-dark);--radix-connect-button-text-color:var(--color-light)}:host([theme=white-with-outline]){--radix-connect-button-background:var(--color-light);--radix-connect-button-background-hover:var(--color-grey-5);--radix-connect-button-border-color:var(--color-dark);--radix-connect-button-text-color:var(--color-dark)}:host([theme=white]){--radix-connect-button-background:var(--color-light);--radix-connect-button-background-hover:var(--color-grey-5);--radix-connect-button-border-color:var(--color-light);--radix-connect-button-text-color:var(--color-dark)}`;var wg=Object.defineProperty,xg=Object.getOwnPropertyDescriptor,qu=(t,e,r,n)=>{for(var i=n>1?void 0:n?xg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&wg(e,r,i),i};let li=class extends Ie{constructor(){super(...arguments),this.active="sharing"}onClick(t,e){this.dispatchEvent(new CustomEvent("onClick",{detail:{value:t,event:e},bubbles:!0,composed:!0}))}render(){return H`
`}};li.styles=[be`:host{display:block;width:100%;user-select:none}.tabs{width:calc(100% - 10px);display:grid;grid-template-columns:1fr 1fr;justify-content:space-between;padding:5px;border-radius:12px;position:relative;background:var(--radix-popover-tabs-background)}button{border:unset;font-size:14px;background:0 0;text-align:center;flex:1;border-radius:8px;font-weight:600;color:var(--radix-popover-text-color);width:100%;height:32px;z-index:1;margin:0;padding:0}button:not(.active){cursor:pointer}.active-indicator{width:calc(50% - 5px);height:32px;border-radius:8px;position:absolute;box-shadow:0 4px 5px 0 #0000001a;background:var(--radix-popover-tabs-button-active-background);top:5px;transition:transform 125ms cubic-bezier(.45,0,.55,1)}:host([active=sharing]) .active-indicator{transform:translateX(5px)}:host([active=requests]) .active-indicator{transform:translateX(calc(100% + 5px))}button:focus,button:focus-visible{outline:0 auto -webkit-focus-ring-color}`],qu([L({type:String,reflect:!0})],li.prototype,"active",2),li=qu([ke("radix-tabs-menu")],li);const Ag=t=>{if(typeof btoa=="function")return btoa(t);if(typeof Buffer=="function")return Buffer.from(t,"utf-8").toString("base64");throw new Error("Failed to determine the platform specific encoder")},Qu="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNzU4XzE0NjkpIj4KICAgICAgICA8cGF0aAogICAgICAgICAgICBkPSJNMTkgNi40MUwxNy41OSA1TDEyIDEwLjU5TDYuNDEgNUw1IDYuNDFMMTAuNTkgMTJMNSAxNy41OUw2LjQxIDE5TDEyIDEzLjQxTDE3LjU5IDE5TDE5IDE3LjU5TDEzLjQxIDEyTDE5IDYuNDFaIgogICAgICAgICAgICBmaWxsPSIjMzIzMjMyIiAvPgogICAgPC9nPgogICAgPGRlZnM+CiAgICAgICAgPGNsaXBQYXRoIGlkPSJjbGlwMF8xNzU4XzE0NjkiPgogICAgICAgICAgICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIiAvPgogICAgICAgIDwvY2xpcFBhdGg+CiAgICA8L2RlZnM+Cjwvc3ZnPgogICAg";var Mg=Object.defineProperty,vg=Object.getOwnPropertyDescriptor,xn=(t,e,r,n)=>{for(var i=n>1?void 0:n?vg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Mg(e,r,i),i};let fr=class extends Ie{constructor(){super(...arguments),this.connected=!1,this.compact=!1,this.isMobile=!1,this.showCloseButton=!1,this.svgBorder=`data:image/svg+xml;base64,${Ag('')}`}closePopover(){this.dispatchEvent(new CustomEvent("onClosePopover",{bubbles:!0,composed:!0}))}closeButton(){return H``}render(){return H`
${this.showCloseButton?this.closeButton():""}
`}};fr.styles=[ui,be`:host{user-select:none;display:inline-flex;background-position:center top;background-repeat:no-repeat;justify-content:center;align-items:flex-start;background:var(--radix-popover-background);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);box-sizing:border-box;max-height:100vh;border-radius:12px;padding:12px;border:1px solid var(--radix-popover-border-color);box-shadow:0 11px 35px 0 #00000047}:host([isMobile]){max-width:100%;max-height:calc(100% - 5px)}#radix-popover-content{width:344px;display:flex;justify-content:flex-start;align-items:center;flex-direction:column;overflow:auto}#close-button{-webkit-mask-image:url('${ae(Qu)}');mask-image:url('${ae(Qu)}');background-color:var(--radix-card-text-color);width:24px;height:24px;background-repeat:no-repeat;align-self:flex-start;margin-bottom:10px;cursor:pointer}#close-button:hover{opacity:.8}@-webkit-keyframes slide-bottom{0%{-webkit-transform:translateY(-10px);transform:translateY(-10px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes slide-bottom{0%{-webkit-transform:translateY(-10px);transform:translateY(-10px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@-webkit-keyframes slide-up{0%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}100%{-webkit-transform:translateY(-10px);transform:translateY(-10px);opacity:0}}@keyframes slide-up{0%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}100%{-webkit-transform:translateY(-10px);transform:translateY(-10px);opacity:0}}:host(.hide){pointer-events:none;-webkit-animation:slide-up .2s cubic-bezier(.25,.46,.45,.94) both;animation:slide-up .2s cubic-bezier(.25,.46,.45,.94) both}:host(.show){-webkit-animation:slide-bottom .2s cubic-bezier(.25,.46,.45,.94) both;animation:slide-bottom .2s cubic-bezier(.25,.46,.45,.94) both}`],xn([L({type:Boolean})],fr.prototype,"connected",2),xn([L({type:Boolean})],fr.prototype,"compact",2),xn([L({type:Boolean,reflect:!0})],fr.prototype,"isMobile",2),xn([L({type:Boolean,reflect:!0})],fr.prototype,"showCloseButton",2),fr=xn([ke("radix-popover")],fr);const Ng=32,Cg=32,di=138;var Sg=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,hi=(t,e,r,n)=>{for(var i=n>1?void 0:n?Dg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Sg(e,r,i),i};const Xu=H`
`,Eg=be`.loading-spinner-container{display:flex}@container (max-width: ${di-16}px){margin-right:0}.loading-spinner{width:22px;height:22px;min-width:22px;min-height:22px;border:2px solid var(--radix-connect-button-text-color);border-left-color:color-mix(in srgb,var(--radix-connect-button-text-color) 30%,transparent);border-top-color:color-mix(in srgb,var(--radix-connect-button-text-color) 30%,transparent);border-bottom-color:color-mix(in srgb,var(--radix-connect-button-text-color) 30%,transparent);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite;align-self:center}@keyframes rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}`;let Rr=class extends Ie{constructor(){super(...arguments),this.size=48,this.weight=5,this.color="var(--color-grey-2)"}render(){return H`
`}};Rr.styles=[be`.loading-spinner-container{display:flex}.loading-spinner{border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite;align-self:center}@keyframes rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}`],hi([L({type:Number})],Rr.prototype,"size",2),hi([L({type:Number})],Rr.prototype,"weight",2),hi([L({type:String})],Rr.prototype,"color",2),Rr=hi([ke("radix-loading-spinner")],Rr);const Ju="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxNiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNzYzNzEgMTEuNzE4M0M1LjUxNDM0IDExLjcxODMgNS4yNzcyNiAxMS41OTg2IDUuMTI4NjIgMTEuMzkyNUwyLjAyNDQyIDcuMDcwOTdIMFY1LjQ5NzU4SDIuNDI0ODhDMi42NzY3MSA1LjQ5NzU4IDIuOTEyNTYgNS42MTg1MiAzLjA1OTk3IDUuODIzMzdMNS41OTY2NCA5LjM1MzkxTDkuNDY3MzcgMC40NzEzOThDOS41OTI2NiAwLjE4NTEwNCA5Ljg3Mzk3IDAgMTAuMTg0OCAwSDE1LjAyMzVWMS41NzMzOEgxMC42OTdMNi40ODExIDExLjI0NjlDNi4zNjgwOSAxMS41MDYxIDYuMTI2MDkgMTEuNjgzOCA1Ljg0NjAxIDExLjcxMzRDNS44MjAyMSAxMS43MTcxIDUuNzkxOTYgMTEuNzE4MyA1Ljc2MzcxIDExLjcxODNaIiBmaWxsPSJ3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Ljg0NDIgMjMuMDUyMyAxOC45NDgyIDE4Ljk0ODNDMjMuMDUyMSAxNC44NDQ0IDIzLjA1MjEgOC4xNTU5MSAxOC45NDgyIDQuMDUxOTVaTTUuNTQxNDUgMTcuNDU4N0MyLjI1Njc5IDE0LjE3NCAyLjI1Njc5IDguODI2MjQgNS41NDE0NSA1LjU0MTU5QzguODI2MSAyLjI1Njk0IDE0LjE3MzkgMi4yNTY5NCAxNy40NTg2IDUuNTQxNTlDMjAuNzQzMiA4LjgyNjI0IDIwLjc0MzIgMTQuMTc0IDE3LjQ1ODYgMTcuNDU4N0MxNC4xNzM5IDIwLjc0MzMgOC44MjYxIDIwLjc0MzMgNS41NDE0NSAxNy40NTg3WiIKICAgICAgICBmaWxsPSJ3aGl0ZSIgLz4KPC9zdmc+CiAgICA=",Ur={pending:"pending",success:"success",error:"error",default:"default"},Wr={pending:"pending",success:"success",fail:"fail",cancelled:"cancelled",ignored:"ignored"};var jg=Object.defineProperty,zg=Object.getOwnPropertyDescriptor,An=(t,e,r,n)=>{for(var i=n>1?void 0:n?zg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&jg(e,r,i),i};let gr=class extends Ie{constructor(){super(...arguments),this.status=Ur.default,this.connected=!1,this.fullWidth=!1,this.theme="radix-blue"}onClick(t){this.dispatchEvent(new CustomEvent("onClick",{detail:t,bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),setTimeout(()=>{const t=this.shadowRoot.querySelector("button");this.resizeObserver=new ResizeObserver(()=>{this.dispatchEvent(new CustomEvent("onResize",{bubbles:!0,composed:!1,detail:t}))}),this.resizeObserver.observe(t)})}disconnectedCallback(){var t;super.disconnectedCallback();const e=this.shadowRoot.querySelector("button");(t=this.resizeObserver)==null||t.unobserve(e)}render(){const t=()=>this.status===Ur.pending&&this.connected?H`${Xu} `:this.status===Ur.pending?Xu:!this.connected&&["success","error"].includes(this.status)?"":H``,e=this.status!=="pending"&&!this.connected,r=this.connected;return H` `}};gr.styles=[ui,Eg,be` :host { width: max(var(--radix-connect-button-width, 138px), 40px); min-width: 40px; display: flex; justify-content: flex-end; container-type: inline-size; user-select: none; --radix-connect-button-text-color: var(--color-light); } :host([full-width]) > button { width: 100%; } :host([full-width]) { width: 100%; display: inline-block; } ::slotted(*) { overflow: hidden; display: block; white-space: nowrap; text-overflow: ellipsis; text-align: left; width: auto; } .gradient ::slotted(*) { padding: 0 4px; } button { width: max(var(--radix-connect-button-width, 138px), 40px); height: var(--radix-connect-button-height, 40px); min-width: ${Cg}px; min-height: ${Ng}px; border-radius: var(--radix-connect-button-border-radius, 0); background-color: var(--radix-connect-button-background); border: 1px solid var(--radix-connect-button-border-color); color: var(--radix-connect-button-text-color); font-size: 14px; align-content: center; align-items: center; font-family: inherit; cursor: pointer; font-weight: 600; transition: background-color 0.1s cubic-bezier(0.45, 0, 0.55, 1); display: flex; gap: 3px; justify-content: center; padding: 0 10px; } button::before { min-height: 0.94em; min-width: 1.25em; display: block; -webkit-mask-position: center right; mask-position: center right; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; background-color: var(--radix-connect-button-text-color); width: 16px; } button:hover { background-color: var(--radix-connect-button-background-hover); } button.logo::before { content: ''; mask-image: url(${ae(Ju)}); -webkit-mask-image: url(${ae(Ju)}); } button.gradient.logo::before { background-color: var(--color-light); } :host([status='pending']) > button.gradient::before { display: none; } button.gradient { border: 1px solid transparent; background-repeat: no-repeat; background-origin: border-box; background-size: cover; background-position: center; background-color: var(--color-radix-blue-2); color: var(--color-light); background-image: url(${ae(Tg)}); padding-right: 7px; } button.gradient::before { content: ''; background-color: var(--color-light); } :host([status='default']) > button.gradient::before { mask-image: url(${ae(Ku)}); -webkit-mask-image: url(${ae(Ku)}); width: 22px; min-width: 22px; height: 22px; -webkit-mask-position: center; mask-position: center; } :host([status='success']) > button::before { mask-image: url(${ae(el)}); -webkit-mask-image: url(${ae(el)}); width: 22px; min-width: 22px; height: 22px; -webkit-mask-position: center; mask-position: center; } :host([status='error']) > button::before { mask-image: url(${ae(tl)}); -webkit-mask-image: url(${ae(tl)}); width: 22px; min-width: 22px; height: 22px; -webkit-mask-position: center; mask-position: center; } button.gradient:hover { background-color: var(--color-radix-blue-1); } button:focus, button:focus-visible { outline: 0px auto -webkit-focus-ring-color; } @container (width < ${di-.1}px) { button { width: var(--radix-connect-button-height, 40px); max-width: ${di}px; max-height: ${di}px; justify-content: center; padding: 0; } button::before { -webkit-mask-position: center; mask-position: center; } button.gradient { background-image: url(${ae(kg)}); padding: 0; } button.logo::before { font-size: 16px; } ::slotted(*) { display: none; } } `],An([L({type:String,reflect:!0})],gr.prototype,"status",2),An([L({type:Boolean})],gr.prototype,"connected",2),An([L({type:Boolean,reflect:!0})],gr.prototype,"fullWidth",2),An([L({type:String,reflect:!0})],gr.prototype,"theme",2),gr=An([ke("radix-button")],gr);const rl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMDU5Xzg3NikiPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgIGQ9Ik0xMiAyLjVDNi40OCAyLjUgMiA2Ljk4IDIgMTIuNUMyIDE4LjAyIDYuNDggMjIuNSAxMiAyMi41QzE3LjUyIDIyLjUgMjIgMTguMDIgMjIgMTIuNUMyMiA2Ljk4IDE3LjUyIDIuNSAxMiAyLjVaTTEyIDIwLjVDNy41OCAyMC41IDQgMTYuOTIgNCAxMi41QzQgOC4wOCA3LjU4IDQuNSAxMiA0LjVDMTYuNDIgNC41IDIwIDguMDggMjAgMTIuNUMyMCAxNi45MiAxNi40MiAyMC41IDEyIDIwLjVaIgogICAgICAgICAgICBmaWxsPSIjMDAzMDU3IiAvPgogICAgPC9nPgogIC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pZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KICAgIDwvY2xpcFBhdGg+CiAgPC9kZWZzPgo8L3N2Zz4=",sl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI4MjJfMTkzMykiPgo8cGF0aCBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJDMiAxNy41MiA2LjQ4IDIyIDEyIDIyQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyQzIyIDYuNDggMTcuNTIgMiAxMiAyWk0xNyAxM0g3VjExSDE3VjEzWiIgZmlsbD0iIzAwMzA1NyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI4MjJfMTkzMyI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",Bg=t=>{const e=new Date;return t.getDate()==e.getDate()&&t.getMonth()==e.getMonth()&&t.getFullYear()==e.getFullYear()},Lg=t=>{const e=new Date;return e.setDate(e.getDate()-1),t.getDate()==e.getDate()&&t.getMonth()==e.getMonth()&&t.getFullYear()==e.getFullYear()},al=(t,e=" ")=>{const r=new Date(Number(t)),n=Bg(r),i=Lg(r),o=r.toLocaleTimeString("en-Gb",{hour:"numeric",minute:"numeric",hour12:!1});return n?`Today${e}${o}`:i?`Yesterday${e}${o}`:`${r.getDate()} ${r.toLocaleString("en-US",{month:"short"})}${e}${o}`};var Pg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,pi=(t,e,r,n)=>{for(var i=n>1?void 0:n?Og(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Pg(e,r,i),i};let Zr=class extends Ie{constructor(){super(...arguments),this.header=""}render(){const t=()=>this.timestamp?H`
${al(this.timestamp)}
`:"",e=`${this.icon?"30px":""} 1fr ${this.timestamp?"42px":""}`;return H`
${this.header}
${t()}
`}};Zr.styles=[be`:host{background-color:var(--radix-card-background);color:var(--radix-card-text-color);display:block;padding:11px 20px;user-select:none;border-radius:12px;width:100%;box-sizing:border-box}:host(.inverted){background-color:var(--radix-card-inverted-background);color:var(--radix-card-inverted-text-color)}:host(.inverted) .card i::before{background-color:var(--radix-card-inverted-text-color)}:host(.dimmed) .card i::before{background-color:var(--radix-card-text-dimmed-color)}:host(.dimmed) .content{color:var(--radix-card-text-dimmed-color)}.timestamp{text-align:right;color:var(--radix-card-text-dimmed-color);font-size:12px}.card{display:grid;align-items:center;column-gap:10px}i::before{content:'';display:block;-webkit-mask-size:cover;mask-size:cover;background-color:var(--radix-card-text-color)}span{display:block;font-weight:600;font-size:14px}p{margin:0}:host([icon=unchecked]) i::before{-webkit-mask-image:url('${ae(rl)}');mask-image:url('${ae(rl)}');width:24px;height:24px}:host([icon=pending]) i::before{-webkit-mask-image:url('${ae(il)}');mask-image:url('${ae(il)}');width:24px;height:24px;transform-origin:center;animation:spinner .75s infinite linear}@keyframes spinner{100%{transform:rotate(360deg)}}:host([icon=ignored]) i::before{-webkit-mask-image:url('${ae(sl)}');mask-image:url('${ae(sl)}');width:24px;height:24px}:host([icon=checked]) i::before{-webkit-mask-image:url('${ae(nl)}');mask-image:url('${ae(nl)}');width:24px;height:24px}:host([icon=error]) i::before{-webkit-mask-image:url('${ae(ol)}');mask-image:url('${ae(ol)}');width:24px;height:24px}`],pi([L({type:String,reflect:!0})],Zr.prototype,"icon",2),pi([L({type:String})],Zr.prototype,"header",2),pi([L({type:String,reflect:!0})],Zr.prototype,"timestamp",2),Zr=pi([ke("radix-card")],Zr);const cl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE0MDNfMTI3MSkiPgo8cGF0aCBkPSJNNS45OTkzNSAzLjgzMzk4VjUuMTY3MzJIMTAuMzkyN0wyLjY2NjAyIDEyLjg5NEwzLjYwNjAyIDEzLjgzNEwxMS4zMzI3IDYuMTA3MzJWMTAuNTAwN0gxMi42NjZWMy44MzM5OEg1Ljk5OTM1WiIgZmlsbD0iIzhBOEZBNCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzE0MDNfMTI3MSI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgMC41KSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=";var Rg=Object.defineProperty,Ug=Object.getOwnPropertyDescriptor,ul=(t,e,r,n)=>{for(var i=n>1?void 0:n?Ug(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Rg(e,r,i),i};let fi=class extends Ie{constructor(){super(...arguments),this.displayText=""}render(){return H`${this.displayText} `}};fi.styles=[be`.link{color:var(--radix-link-color);font-weight:600;text-decoration:none;display:flex;gap:4px;align-items:center;font-size:14px;cursor:pointer}.icon-north-east-arrow::before{content:'';display:block;-webkit-mask-size:cover;mask-size:cover;background-color:var(--radix-card-text-dimmed-color);-webkit-mask-image:url('${ae(cl)}');mask-image:url('${ae(cl)}');width:16px;height:16px}`],ul([L({type:String})],fi.prototype,"displayText",2),fi=ul([ke("radix-link")],fi);const ll="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAYAAABxlTA0AAAACXBIWXMA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DExLjM3NTEgOS43NDk5OCAxMS4zNzUxWiIKICAgICAgICAgICAgZmlsbD0id2hpdGUiIC8+CiAgICA8L2c+Cjwvc3ZnPgogICAg",dl=t=>t?`${t.slice(0,4)}...${t.slice(t.length-6,t.length)}`:"";var Zg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,_r=(t,e,r,n)=>{for(var i=n>1?void 0:n?_g(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Zg(e,r,i),i};let qt=class extends Ie{constructor(){super(...arguments),this.address="",this.label="",this.appearanceId=0,this.tooltipVisible=!1,this.copiedTooltipTimeout=1500}disconnectedCallback(){this.setTimeoutInstance&&clearTimeout(this.setTimeoutInstance),super.disconnectedCallback()}render(){return H`${this.label} ${dl(this.address)} `}};qt.styles=[be`:host{display:flex;width:100%;box-sizing:border-box;justify-content:space-between;margin-top:.5rem;border-radius:12px;color:var(--color-light);font-size:14px;height:40px;align-items:center;padding:0 20px}.tooltip-wrapper{all:unset;display:inline-flex;position:relative}.tooltip-wrapper::after,.tooltip-wrapper::before{transition:opacity .1s ease-out .2s}.tooltip-wrapper::after{background:#000;color:#fff;border-radius:8px;content:attr(aria-label);padding:.5rem 1rem;position:absolute;white-space:nowrap;z-index:10;opacity:0;pointer-events:none;transform:translate(-70%,-30%);bottom:100%}.tooltip-wrapper::before{content:'';position:absolute;z-index:10;opacity:0;pointer-events:none;width:0;height:0;border:8px solid transparent;border-top-color:#000;transform:translate(-15%,25%);bottom:100%}.tooltip-wrapper.tooltip-visible::after,.tooltip-wrapper.tooltip-visible::before{opacity:1}.label{font-weight:600;color:var(--color-light);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:10px}a{color:var(--color-light);display:flex;align-items:center;gap:4px;opacity:.8;font-size:12px}i{background-image:url('${ae(Wg)}');display:inline-block;background-repeat:no-repeat;background-size:cover;background-position:center bottom;width:13px;height:13px}.label,a,i{text-shadow:0 4px 3px rgba(0,0,0,.08)}:host([appearanceId='0']){background:linear-gradient(276.58deg,#01e2a0 -.6%,#052cc0 102.8%)}:host([appearanceId='1']){background:linear-gradient(276.33deg,#ff43ca -14.55%,#052cc0 102.71%)}:host([appearanceId='2']){background:linear-gradient(276.33deg,#20e4ff -14.55%,#052cc0 102.71%)}:host([appearanceId='3']){background:linear-gradient(94.8deg,#00ab84 -1.2%,#052cc0 103.67%)}:host([appearanceId='4']){background:linear-gradient(94.62deg,#ce0d98 -10.14%,#052cc0 104.1%)}:host([appearanceId='5']){background:linear-gradient(276.33deg,#052cc0 -14.55%,#0dcae4 102.71%)}:host([appearanceId='6']){background:linear-gradient(90.89deg,#003057 -2.21%,#03d597 102.16%)}:host([appearanceId='7']){background:linear-gradient(276.23deg,#f31dbe -2.1%,#003057 102.67%)}:host([appearanceId='8']){background:linear-gradient(276.48deg,#003057 -.14%,#052cc0 102.77%)}:host([appearanceId='9']){background:linear-gradient(276.32deg,#1af4b5 -5.15%,#0ba97d 102.7%)}:host([appearanceId='10']){background:linear-gradient(276.23deg,#e225b3 -2.1%,#7e0d5f 102.67%)}:host([appearanceId='11']){background:linear-gradient(276.48deg,#1f48e2 -.14%,#040b72 102.77%)}`],_r([L({type:String})],qt.prototype,"address",2),_r([L({type:String})],qt.prototype,"label",2),_r([L({type:Number,reflect:!0})],qt.prototype,"appearanceId",2),_r([Fu()],qt.prototype,"tooltipVisible",2),_r([Fu()],qt.prototype,"setTimeoutInstance",2),qt=_r([ke("radix-account")],qt);var Fg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,Qt=(t,e,r,n)=>{for(var i=n>1?void 0:n?Gg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Fg(e,r,i),i};let vt=class extends Ie{constructor(){super(...arguments),this.type="dataRequest",this.status="pending",this.showCancel=!1,this.showIgnore=!1,this.timestamp="",this.id="",this.transactionIntentHash=""}render(){const t=this.getIconFromStatus(),e=this.getStylingFromStatus(),r={sendTransaction:{pending:"Pending Transaction",fail:"Transaction Failed",cancelled:"Transaction Cancelled",ignored:"Transaction Ignored",success:"Send transaction",content:H`${this.renderTxIntentHash()} ${this.status==="pending"?H`
Open your Radix Wallet app to review the transaction ${this.showCancel?H`
Cancel
`:H`
Ignore
`}
`:""}`},dataRequest:{pending:"Data Request Pending",fail:"Data Request Rejected",cancelled:"Data Request Rejected",ignored:"",success:"Data Request",content:this.getRequestContentTemplate("Open Your Radix Wallet App to complete the request")},loginRequest:{pending:"Login Request Pending",fail:"Login Request Rejected",cancelled:"Login Request Rejected",success:"Login Request",ignored:"",content:this.getRequestContentTemplate("Open Your Radix Wallet App to complete the request")}};return H`${r[this.type].content}`}getRequestContentTemplate(t){return this.status===Wr.pending?H`
${t} ${this.showCancel?H`
Cancel
`:""}
`:""}isErrorStatus(t){return[Wr.cancelled,Wr.fail,Wr.ignored].includes(t)}getIconFromStatus(){return this.status===Wr.pending?"pending":this.status===Wr.ignored?"ignored":this.isErrorStatus(this.status)?"error":"checked"}getStylingFromStatus(){return tt({dimmed:this.isErrorStatus(this.status),inverted:this.status==="pending"})}onCancel(t){this.dispatchEvent(new CustomEvent("onCancelRequestItem",{detail:{...t,id:this.id},bubbles:!0,composed:!0}))}onIgnore(t){this.dispatchEvent(new CustomEvent("onIgnoreTransactionItem",{detail:{...t,id:this.id},bubbles:!0,composed:!0}))}renderTxIntentHash(){return this.transactionIntentHash?H`
ID:
`:""}};vt.styles=[be`:host{display:flex;width:100%;margin-bottom:10px}.text-dimmed{color:var(--radix-card-text-dimmed-color);margin-right:5px}.transaction{font-weight:600;text-decoration:none;display:flex;align-items:center;font-size:14px}.cancel{cursor:pointer;text-decoration:underline}.request-content{margin-top:5px;display:flex;flex-direction:column;gap:10px;font-size:14px}`],Qt([L({type:String})],vt.prototype,"type",2),Qt([L({type:String})],vt.prototype,"status",2),Qt([L({type:Boolean})],vt.prototype,"showCancel",2),Qt([L({type:Boolean})],vt.prototype,"showIgnore",2),Qt([L({type:String})],vt.prototype,"timestamp",2),Qt([L({type:String})],vt.prototype,"id",2),Qt([L({type:String})],vt.prototype,"transactionIntentHash",2),vt=Qt([ke("radix-request-card")],vt);var Hg=Object.defineProperty,$g=Object.getOwnPropertyDescriptor,hl=(t,e,r,n)=>{for(var i=n>1?void 0:n?$g(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Hg(e,r,i),i};let gi=class extends Ie{constructor(){super(...arguments),this.requestItems=[]}render(){return(this.requestItems||[]).map(t=>H``)}};gi.styles=[ui],hl([L({type:Array})],gi.prototype,"requestItems",2),gi=hl([ke("radix-request-cards")],gi);var Yg=(t,e,r,n)=>{for(var i=e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=s(i)||i);return i};let ts=class extends Ie{render(){return H``}};ts.styles=[be`button{transition:background-color .1s cubic-bezier(.45,0,.55,1);border-radius:12px;border:none;background:var(--radix-button-background);color:var(--radix-button-text-color);font-size:14px;font-weight:600;padding:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px}button:hover{background:var(--radix-button-background-hover)}button:active{background:var(--radix-button-background-pressed)}:host(.primary) button{background:var(--color-radix-blue-2);color:var(--color-light)}:host(.full) button{width:100%}:host(.disabled) button,:host(.primary.disabled) button{background:var(--radix-button-disabled-background);color:var(--radix-button-disabled-text-color);cursor:default;pointer-events:none}`],ts=Yg([ke("radix-themed-button")],ts);var Vg=Object.defineProperty,qg=Object.getOwnPropertyDescriptor,Fr=(t,e,r,n)=>{for(var i=n>1?void 0:n?qg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Vg(e,r,i),i};let Xt=class extends Ie{constructor(){super(...arguments),this.isMobile=!1,this.status=Ur.default,this.isWalletLinked=!1,this.isExtensionAvailable=!1,this.requestItems=[]}render(){let t=this.renderConnectTemplate();return!this.isExtensionAvailable&&!this.isMobile?t=this.renderCeNotInstalledTemplate():!this.isWalletLinked&&!this.isMobile?t=this.renderCeNotLinkedTemplate():this.status===Ur.pending&&(t=this.renderRequestItemsTemplate()),H`
Radix Logo Connect Your Radix Wallet
${t}`}renderRequestItemsTemplate(){return H``}connectNowButtonTemplate(){const t=(!this.isExtensionAvailable||!this.isWalletLinked)&&!this.isMobile,e=this.isMobile?H``:H``;return H`Connect Now${e}`}renderCeNotInstalledTemplate(){return H`
Before you can connect your Radix Wallet, you need the Radix Connector browser extension.
${this.connectNowButtonTemplate()}`}renderCeNotLinkedTemplate(){return H`
To connect your Radix Wallet, you need to link it to your Radix Connector browser extension using a QR code.
Open QR Code to Link Wallet${this.connectNowButtonTemplate()}`}renderConnectTemplate(){return H`${this.connectNowButtonTemplate()}`}};Xt.styles=[be`:host{width:100%;box-sizing:border-box}.wrapper.connect-your-wallet{display:flex;align-items:center;margin:12px .5rem 1.5rem;line-height:23px;justify-content:center;gap:12px}.request-cards{display:block;max-height:410px;overflow-y:auto}.card{margin-bottom:10px}.info{margin-bottom:20px;padding:0 20px;font-size:14px;line-height:18px;text-align:center}.cta-link{display:flex;justify-content:center;margin:25px 0}.text.connect{color:var(--color-text-primary);font-size:18px;width:7.2rem;font-weight:600;text-align:left}.subtitle{color:var(--radix-card-text-dimmed-color)}.mobile-wrapper{display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:18px;margin-top:25px;font-size:14px}.mobile-wrapper .header{font-size:18px;font-weight:600;margin-bottom:5px}.mobile-wrapper .content{font-size:16px;margin-bottom:5px}`],Fr([L({type:Boolean})],Xt.prototype,"isMobile",2),Fr([L({type:String})],Xt.prototype,"status",2),Fr([L({type:Boolean})],Xt.prototype,"isWalletLinked",2),Fr([L({type:Boolean})],Xt.prototype,"isExtensionAvailable",2),Fr([L({type:Array})],Xt.prototype,"requestItems",2),Xt=Fr([ke("radix-not-connected-page")],Xt);const Qg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZp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bmVhcl8xMTI4MV80MTQwKSIgc3Ryb2tlPSIjQ0VEMEQ2IiBzdHJva2Utd2lkdGg9IjEuNDU0NTUiLz4KPC9nPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzExMjgxXzQxNDAiIHgxPSIzMS42MzU3IiB5MT0iNDUuMDkxIiB4Mj0iMzEuNjM1NyIgeTI9IjU3LjgxODIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0UyRTVFRCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNFMkU1RUQiIHN0b3Atb3BhY2l0eT0iMCIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=";var Xg=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,Mn=(t,e,r,n)=>{for(var i=n>1?void 0:n?Jg(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Xg(e,r,i),i};let mr=class extends Ie{constructor(){super(...arguments),this.persona="",this.personaData=[]}render(){return H`
${this.persona}
    ${(this.personaData||[]).map(t=>H`
  • ${t}
  • `)}
`}};mr.styles=[be`:host{display:flex;width:100%}.avatar{background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:50%;width:60px;height:60px;align-self:center;border:2px solid var(--radix-avatar-border-color)}.placeholder{width:64px;height:64px;background-image:url('${ae(Qg)}')}.persona-card{display:grid;gap:20px;align-items:flex-start;grid-template-columns:1fr 230px}.persona-card.center{align-items:center}.persona{font-size:14px;font-weight:600;text-overflow:ellipsis;overflow:hidden;display:block;white-space:nowrap}ul{margin-top:5px;margin-bottom:0;padding-inline-start:20px}li{font-size:12px;word-break:break-word;line-height:18px}`],Mn([L({type:String,reflect:!0})],mr.prototype,"icon",2),Mn([L({type:String})],mr.prototype,"persona",2),Mn([L({type:String})],mr.prototype,"avat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C9zdmc+CiAgICA=",fl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTg4XzQyNCkiPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgIGQ9Ik0xMi43NSA1LjI1TDExLjY5MjUgNi4zMDc1TDEzLjYyNzUgOC4yNUg2VjkuNzVIMTMuNjI3NUwxMS42OTI1IDExLjY4NUwxMi43NSAxMi43NUwxNi41IDlMMTIuNzUgNS4yNVpNMyAzLjc1SDlWMi4yNUgzQzIuMTc1IDIuMjUgMS41IDIuOTI1IDEuNSAzLjc1VjE0LjI1QzEuNSAxNS4wNzUgMi4xNzUgMTUuNzUgMyAxNS43NUg5VjE0LjI1SDNWMy43NVoiCiAgICAgICAgICAgIGZpbGw9IiMwNTJDQzAiIC8+CiAgICA8L2c+CiAgICA8ZGVmcz4KICAgICAgICA8Y2xpcFBhdGggaWQ9ImNsaXAwXzExODhfNDI0Ij4KICAgICAgICAgICAgPHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiBmaWxsPSJ3aGl0ZSIgLz4KICAgICAgICA8L2NsaXBQYXRoPgogICAgPC9kZWZzPgo8L3N2Zz4KICAgIA==",gl=be`:host{width:100%}.header{font-size:12px;font-weight:400;margin:15px 0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;text-align:center}.content{overflow:auto;width:100%;margin-bottom:0;position:relative;-webkit-mask-image:linear-gradient(180deg,#000 90%,transparent 100%);mask-image:linear-gradient(180deg,#000 90%,transparent 95%)}`;var Kg=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,Gr=(t,e,r,n)=>{for(var i=n>1?void 0:n?e0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&Kg(e,r,i),i};let Jt=class extends Ie{constructor(){super(...arguments),this.avatarUrl="",this.persona="",this.dAppName="",this.personaData=[],this.accounts=[]}onUpdateData(t){this.dispatchEvent(new CustomEvent("onUpdateData",{detail:t,bubbles:!0,composed:!0}))}onLogout(t){this.dispatchEvent(new CustomEvent("onLogout",{detail:t,bubbles:!0,composed:!0}))}render(){return H`
Sharing with ${this.dAppName}
${(this.accounts||[]).map(({label:t,address:e,appearanceId:r})=>H``)}
Update Account Sharing
Log Out
`}};Jt.styles=[gl,be`:host{width:100%}.icon::before{content:'';-webkit-mask-position:center;mask-position:center;-webkit-mask-size:cover;mask-size:cover;background:var(--radix-button-text-color);display:block;width:20px;height:20px}.icon.disabled::before{background:var(--radix-button-disabled-text-color)}.content{max-height:193px;overflow-x:hidden;padding-bottom:19px}.buttons{display:grid;bottom:0;width:100%;grid-template-columns:1fr 115px;grid-gap:10px;width:100%;padding-top:5px;align-items:end}.update-data::before{-webkit-mask-image:url('${ae(pl)}');mask-image:url('${ae(pl)}')}.logout::before{-webkit-mask-image:url('${ae(fl)}');mask-image:url('${ae(fl)}')}`],Gr([L({type:String})],Jt.prototype,"avatarUrl",2),Gr([L({type:String})],Jt.prototype,"persona",2),Gr([L({type:String})],Jt.prototype,"dAppName",2),Gr([L({type:Array})],Jt.prototype,"personaData",2),Gr([L({type:Array})],Jt.prototype,"accounts",2),Jt=Gr([ke("radix-sharing-page")],Jt);const t0="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzc1IiBoZWlnaHQ9IjU1OSIgdmlld0JveD0iMCAwIDM3NSA1NTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yXzUzKSI+CjxwYXRoIGQ9Ik0wIDBIMzc1VjU1OUgwVjBaIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB3aWR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ZUdyYXBoaWMiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9InNoYXBlIi8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249Ijc1IiByZXN1bHQ9ImVmZmVjdDFfZm9yZWdyb3VuZEJsdXJfMl81MyIvPgo8L2ZpbHRlcj4KPGZpbHRlciBpZD0iZmlsdGVyM19mXzJfNTMiIHg9Ijg0LjE0NjgiIHk9Ii02OS42MTcxIiB3aWR0aD0iNTk1LjAyNyIgaGVpZ2h0PSI5MjQuNTIzIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9InNoYXBlIi8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249Ijc1IiByZXN1bHQ9ImVmZmVjdDFfZm9yZWdyb3VuZEJsdXJfMl81MyIvPgo8L2ZpbHRlcj4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yXzUzIj4KPHBhdGggZD0iTTAgMEgzNzVWNTU5SDBWMFoiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,ml=(t,e,r,n)=>{for(var i=n>1?void 0:n?n0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&r0(e,r,i),i};let mi=class extends Ie{constructor(){super(...arguments),this.isBranded=!1}render(){return H``}};mi.styles=[be`:host{position:fixed;top:0;left:0;right:unset;height:100%;width:100%;padding:16px;box-sizing:border-box;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;transition:opacity .2s;background:var(--radix-mask-background);z-index:2147483647}:host([isBranded]){align-items:flex-start;background:#000;background-image:url('${ae(t0)}');background-size:cover}:host(.hide){opacity:0;pointer-events:none}:host(.show){opacity:1}`],ml([L({type:Boolean,reflect:!0})],mi.prototype,"isBranded",2),mi=ml([ke("radix-mask")],mi);var i0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,yi=(t,e,r,n)=>{for(var i=n>1?void 0:n?o0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&i0(e,r,i),i};let Hr=class extends Ie{constructor(){super(...arguments),this.requestItems=[],this.dAppName="",this.loggedInTimestamp=""}render(){return H`
Connected to ${this.dAppName}
${this.loggedInTimestamp?H`
Since logged in: ${al(this.loggedInTimestamp,", ")}
`:""}
${(this.requestItems||[]).map(t=>H``)}
`}};Hr.styles=[gl,be`.subheader{color:var(--radix-card-text-dimmed-color);margin-top:-12px;margin-bottom:15px;text-align:center;font-size:12px}.content{padding-bottom:25px;max-height:calc(100vh - 270px)}@media (min-height:580px){.content{max-height:360px}}`],yi([L({type:Array})],Hr.prototype,"requestItems",2),yi([L({type:String})],Hr.prototype,"dAppName",2),yi([L({type:String})],Hr.prototype,"loggedInTimestamp",2),Hr=yi([ke("radix-requests-page")],Hr);var s0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,je=(t,e,r,n)=>{for(var i=n>1?void 0:n?a0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&s0(e,r,i),i};let we=class extends Ie{constructor(){super(),this.theme="radix-blue",this.dAppName="",this.personaLabel="",this.connected=!1,this.status=Ur.default,this.loggedInTimestamp="",this.showPopoverMenu=!1,this.requestItems=[],this.accounts=[],this.personaData=[],this.isMobile=!1,this.isWalletLinked=!1,this.isExtensionAvailable=!1,this.fullWidth=!1,this.activeTab="sharing",this.mode="light",this.avatarUrl="",this.compact=!1,this.pristine=!0,this.fontGoogleApiHref="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,600",this.initialBodyOverflow=document.body.style.overflow,this.initialBackdropFilter="",this.parentElementWithBackdropFilter=null,this.injectFontCSS(),this.windowClickEventHandler=t=>{this.showPopoverMenu&&(this.contains(t.target)||(this.showPopoverMenu=!1))},document.addEventListener("click",this.windowClickEventHandler)}get hasSharedData(){return!!(this.accounts.length||this.personaData.length)}attributeChangedCallback(t,e,r){super.attributeChangedCallback(t,e,r),t==="showpopovermenu"&&(this.pristine=!1,this.toggleBodyOverflow())}connectedCallback(){super.connectedCallback(),window.dispatchEvent(new Event("onConnectButtonRender")),this.dispatchEvent(new CustomEvent("onRender",{bubbles:!0,composed:!0}))}disconnectedCallback(){document.removeEventListener("click",this.windowClickEventHandler),this.dispatchEvent(new CustomEvent("onDestroy",{bubbles:!0,composed:!0}))}injectFontCSS(){if(this.shouldSkipFontInjection())return;const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",this.fontGoogleApiHref),document.head.append(t)}shouldSkipFontInjection(){return!!document.head.querySelector(`link[href|="${this.fontGoogleApiHref}"]`)||document.fonts.check("16px IBM Plex Sans")}togglePopoverMenu(){this.pristine=!1,this.showPopoverMenu=!this.showPopoverMenu,this.toggleBodyOverflow(),this.toggleParentBackdropFilter(),this.showPopoverMenu&&this.dispatchEvent(new CustomEvent("onShowPopover",{bubbles:!0,composed:!0}))}toggleBodyOverflow(){this.isMobile&&(document.body.style.overflow=this.showPopoverMenu&&this.isMobile?"hidden":this.initialBodyOverflow)}toggleParentBackdropFilter(){if(this.isMobile)if(!this.showPopoverMenu&&this.parentElementWithBackdropFilter){setTimeout(()=>{var t;(t=this.parentElementWithBackdropFilter)==null||t.style.setProperty("backdrop-filter",this.initialBackdropFilter),this.initialBackdropFilter="",this.parentElementWithBackdropFilter=null},180);return}else{const t=this.findParentWithBackdropFilter(this);if(t===null)return;this.initialBackdropFilter=t.backdropFilter,this.parentElementWithBackdropFilter=t.element,t.element.style.backdropFilter="none"}}findParentWithBackdropFilter(t){if(!t)return null;const e=window.getComputedStyle(t).getPropertyValue("backdrop-filter");return e!=="none"?{element:t,backdropFilter:e}:this.findParentWithBackdropFilter(t.parentElement)}connectButtonTemplate(){const t=this.connected?this.personaLabel:"Connect";return H`
${t}
`}connectTemplate(){if(!this.connected)return H``}renderSharingTemplate(){return H``}renderRequestItemsTemplate(){return H``}get showPopoverCloseButton(){return this.isMobile}popoverTemplate(){return this.pristine?"":H`${this.renderPopoverContentTemplate()}`}renderPopoverContentTemplate(){return this.connected?H`${this.activeTab==="sharing"?this.renderSharingTemplate():this.renderRequestItemsTemplate()}`:this.connectTemplate()}render(){return H`${this.connectButtonTemplate()} ${this.isMobile?H`${this.popoverTemplate()}`:this.popoverTemplate()}`}};we.styles=[Vu,ui,be`:root{font-family:'IBM Plex Sans';margin:0;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:rgba(255,255,255,.87);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}:host{all:initial;text-align:left;font-family:'IBM Plex Sans';position:relative;z-index:1000;display:inline-block}.mobile-wrapper{display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:18px;margin-top:25px;font-size:14px}.mobile-wrapper .header{font-size:18px;font-weight:600;margin-bottom:5px}.mobile-wrapper .content{font-size:16px;margin-bottom:5px}.popoverPosition{position:absolute;top:calc(100% + .5rem);right:0}`],je([L({type:String})],we.prototype,"theme",2),je([L({type:String})],we.prototype,"dAppName",2),je([L({type:String})],we.prototype,"personaLabel",2),je([L({type:Boolean})],we.prototype,"connected",2),je([L({type:String})],we.prototype,"status",2),je([L({type:String})],we.prototype,"loggedInTimestamp",2),je([L({type:Boolean,reflect:!0})],we.prototype,"showPopoverMenu",2),je([L({type:Array})],we.prototype,"requestItems",2),je([L({type:Array})],we.prototype,"accounts",2),je([L({type:Array})],we.prototype,"personaData",2),je([L({type:Boolean})],we.prototype,"isMobile",2),je([L({type:Boolean})],we.prototype,"isWalletLinked",2),je([L({type:Boolean})],we.prototype,"isExtensionAvailable",2),je([L({type:Boolean})],we.prototype,"fullWidth",2),je([L({type:String})],we.prototype,"activeTab",2),je([L({type:String,reflect:!0})],we.prototype,"mode",2),je([L({type:String})],we.prototype,"avatarUrl",2),je([L({type:Boolean,state:!0})],we.prototype,"compact",2),we=je([ke("radix-connect-button")],we);var c0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,yl=(t,e,r,n)=>{for(var i=n>1?void 0:n?u0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&c0(e,r,i),i};let Ii=class extends Ie{constructor(){super(...arguments),this.header="Radix Wallet Connector"}render(){return H`
${this.header}
`}};Ii.styles=[be`.radix-wallet-connector-card{background:#fff;padding:24px;border-radius:16px;position:relative;margin-top:60px;text-align:center;box-shadow:0 4px 7px 0 #00000040}.radix-wallet-connector-card__logo{position:absolute;left:0;right:0}.radix-wallet-connector-card__logo img{width:78px;height:78px;transform:translateY(-66px);box-shadow:0 4px 10px 0 rgba(0,0,0,.25);border-radius:16px}.radix-wallet-connector-card__header{margin-top:32px;margin-bottom:24px;font-size:18px;color:var(--color-grey-2)}`],yl([L({type:String})],Ii.prototype,"header",2),Ii=yl([ke("radix-wallet-connector-card")],Ii);const l0="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMjkiIHZpZXdCb3g9IjAgMCAzNCAyOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE3IDUuOTg1TDI4LjI5NSAyNS41SDUuNzA1TDE3IDUuOTg1Wk0xNyAwTDAuNSAyOC41SDMzLjVMMTcgMFpNMTguNSAyMUgxNS41VjI0SDE4LjVWMjFaTTE4LjUgMTJIMTUuNVYxOEgxOC41VjEyWiIgZmlsbD0iI0YwMDAwMCIvPgo8L3N2Zz4K";var d0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,bi=(t,e,r,n)=>{for(var i=n>1?void 0:n?h0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&d0(e,r,i),i};let $r=class extends Ie{constructor(){super(...arguments),this.header="",this.subheader="",this.isError=!1}render(){return H`
${this.isError?H`Warning`:""}

${this.header}

${this.subheader?H`

${this.subheader}

`:""}
`}};$r.styles=[be`.connector-error{display:flex;align-items:center;flex-direction:column;gap:16px}h1{font-size:24px;font-weight:700;margin:0;color:var(--color-grey-1)}.error{color:#f00000}h3{margin:0;color:var(--color-grey-2);font-size:16px;font-weight:500}`],bi([L({type:String})],$r.prototype,"header",2),bi([L({type:String})],$r.prototype,"subheader",2),bi([L({type:Boolean})],$r.prototype,"isError",2),$r=bi([ke("radix-wallet-connector-info")],$r);var p0=Object.defineProperty,f0=Object.getOwnPropertyDescriptor,Yr=(t,e,r,n)=>{for(var i=n>1?void 0:n?f0(e,r):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(n?s(e,r,i):s(i))||i);return n&&i&&p0(e,r,i),i};let zt=class extends Ie{constructor(){super(...arguments),this.header="",this.subheader="",this.isError=!1,this.isLoading=!1,this.isHidden=!0}render(){return this.isHidden?H``:H`${this.isLoading?H`
`:H``}
`}};zt.styles=[Vu,be`.loading-container{display:flex;justify-content:center;padding:18px 0}`],Yr([L({type:String})],zt.prototype,"header",2),Yr([L({type:String})],zt.prototype,"subheader",2),Yr([L({type:Boolean})],zt.prototype,"isError",2),Yr([L({type:Boolean})],zt.prototype,"isLoading",2),Yr([L({type:Boolean})],zt.prototype,"isHidden",2),zt=Yr([ke("radix-rcfm-page")],zt);const g0=Object.freeze(Object.defineProperty({__proto__:null,get ConnectButton(){return we},get RadixRcfmPage(){return zt}},Symbol.toStringTag,{value:"Module"}));return Jf});