1function ir(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ir(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ir(e))&&(r&&(r+=" "),r+=t);return r}function Pn(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function ar(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Ko(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Pn(e.outputLen),Pn(e.blockLen)}function at(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Zo(e,t){ar(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const St=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cr=e=>e instanceof Uint8Array,Bt=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ce=(e,t)=>e<<32-t|e>>>t,Jo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Jo)throw new Error("Non little-endian hardware is not supported");function Yo(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Qt(e){if(typeof e=="string"&&(e=Yo(e)),!cr(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function Xo(...e){const t=new Uint8Array(e.reduce((r,o)=>r+o.length,0));let n=0;return e.forEach(r=>{if(!cr(r))throw new Error("Uint8Array expected");t.set(r,n),n+=r.length}),t}let lr=class{clone(){return this._cloneInto()}};function Qo(e){const t=r=>e().update(Qt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function fr(e=32){if(St&&typeof St.getRandomValues=="function")return St.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function es(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),a=r?4:0,l=r?0:4;e.setUint32(t+a,i,r),e.setUint32(t+l,c,r)}let ts=class extends lr{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Bt(this.buffer)}update(t){at(this);const{view:n,buffer:r,blockLen:o}=this;t=Qt(t);const s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const a=Bt(t);for(;o<=s-i;i+=o)this.process(a,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){at(this),Zo(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;es(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Bt(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)c.setUint32(4*f,d[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.length=o,t.pos=c,t.finished=s,t.destroyed=i,o%n&&t.buffer.set(r),t}};const ns=(e,t,n)=>e&t^~e&n,rs=(e,t,n)=>e&t^e&n^t&n,os=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,2756
1734187,3204031479,3329325298]),Ee=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ke=new Uint32Array(64);let ss=class extends ts{constructor(){super(64,32,8,!1),this.A=Ee[0]|0,this.B=Ee[1]|0,this.C=Ee[2]|0,this.D=Ee[3]|0,this.E=Ee[4]|0,this.F=Ee[5]|0,this.G=Ee[6]|0,this.H=Ee[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:a}=this;return[t,n,r,o,s,i,c,a]}set(t,n,r,o,s,i,c,a){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=a|0}process(t,n){for(let f=0;f<16;f++,n+=4)ke[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const v=ke[f-15],b=ke[f-2],p=ce(v,7)^ce(v,18)^v>>>3,u=ce(b,17)^ce(b,19)^b>>>10;ke[f]=u+ke[f-7]+p+ke[f-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:a,G:l,H:d}=this;for(let f=0;f<64;f++){const v=ce(c,6)^ce(c,11)^ce(c,25),b=d+v+ns(c,a,l)+os[f]+ke[f]|0,u=(ce(r,2)^ce(r,13)^ce(r,22))+rs(r,o,s)|0;d=l,l=a,a=c,c=i+b|0,i=s,s=o,o=r,r=b+u|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,a=a+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,o,s,i,c,a,l,d)}roundClean(){ke.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Pt=Qo(()=>new ss);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const dr=BigInt(0),ht=BigInt(1),is=BigInt(2),pt=e=>e instanceof Uint8Array,as=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function je(e){if(!pt(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=as[e[n]];return t}function ur(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function en(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}function We(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const o=r*2,s=e.slice(o,o+2),i=Number.parseInt(s,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");n[r]=i}return n}function te(e){return en(je(e))}function tn(e){if(!pt(e))throw new Error("Uint8Array expected");return en(je(Uint8Array.from(e).reverse()))}function Le(e,t){return We(e.toString(16).padStart(t*2,"0"))}function nn(e,t){return Le(e,t).reverse()}function cs(e){return We(ur(e))}function Y(e,t,n){let r;if(typeof t=="string")try{r=We(t)}catch(s){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${s}`)}else if(pt(t))r=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(`${e} expected ${n} bytes, got ${o}`);return r}function Ue(...e){const t=new Uint8Array(e.reduce((r,o)=>r+o.length,0));let n=0;return e.forEach(r=>{if(!pt(r))throw new Error("Uint8Array expected");t.set(r,n),n+=r.length}),t}function ls(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fs(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ds(e){let t;for(t=0;e>dr;e>>=ht,t+=1);return t}function us(e,t){return e>>BigInt(t)&ht}const hs=(e,t,n)=>e|(n?ht:dr)<<BigInt(t),rn=e=>(is<<BigInt(e-1))-ht,It=e=>new Uint8Array(e),Hn=e=>Uint8Array.from(e);function hr(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=It(e),o=It(e),s=0;const i=()=>{r.fill(1),o.fill(0),s=0},c=(...f)=>n(o,r,...f),a=(f=It())=>{o=c(Hn([0]),f),r=c(),f.length!==0&&(o=c(Hn([1]),f),r=c())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const v=[];for(;f<t;){r=c();const b=r.slice();v.push(b),f+=r.length}return Ue(...v)};return(f,v)=>{i(),a(f);let b;for(;!(b=v(l()));)a();return i(),b}}const ps={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function tt(e,t,n={}){const r=(o,s,i)=>{const c=ps[s];if(typeof c!="function")throw new Error(`Invalid validator "${s}", expected function`);const a=e[o];if(!(i&&a===void 0)&&!c(a,e))throw new Error(`Invalid param ${String(o)}=${a} (${typeof a}), expected ${s}`)};for(const[o,s]of Object.entries(t))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return e}const gs=Object.freeze(Object.defineProperty({__proto__:null,bitGet:us,bitLen:ds,bitMask:rn,bitSet:hs,bytesToHex:je,bytesToNumberBE:te,bytesToNumberLE:tn,concatBytes:Ue,createHmacDrbg:hr,ensureBytes:Y,equalBytes:ls,hexToBytes:We,hexToNumber:en,numberToBytesBE:Le,numberToBytesLE:nn,numberToHexUnpadded:ur,numberToVarBytesBE:cs,utf8ToBytes:fs,validateObject:tt},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Z=BigInt(0),F=BigInt(1),$e=BigInt(2),ys=BigInt(3),Ht=BigInt(4),zn=BigInt(5),qn=BigInt(8);BigInt(9);BigInt(16);function J(e,t){const n=e%t;return n>=Z?n:t+n}function ws(e,t,n){if(n<=Z||t<Z)throw new Error("Expected power/modulo > 0");if(n===F)return Z;let r=F;for(;t>Z;)t&F&&(r=r*e%n),e=e*e%n,t>>=F;return r}function re(e,t,n){let r=e;for(;t-- >Z;)r*=r,r%=n;return r}function zt(e,t){if(e===Z||t<=Z)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=J(e,t),r=t,o=Z,s=F;for(;n!==Z;){const c=r/n,a=r%n,l=o-s*c;r=n,n=a,o=s,s=l}if(r!==F)throw new Error("invert: does not exist");return J(o,t)}function ms(e){const t=(e-F)/$e;let n,r,o;for(n=e-F,r=0;n%$e===Z;n/=$e,r++);for(o=$e;o<e&&ws(o,t,e)!==e-F;o++);if(r===1){const i=(e+F)/Ht;return function(a,l){const d=a.pow(l,i);
vendor: 4,394 bytes, line 1
1if(!a.eql(a.sqr(d),l))throw new Error("Cannot find square root");return d}}const s=(n+F)/$e;return function(c,a){if(c.pow(a,t)===c.neg(c.ONE))throw new Error("Cannot find square root");let l=r,d=c.pow(c.mul(c.ONE,o),n),f=c.pow(a,s),v=c.pow(a,n);for(;!c.eql(v,c.ONE);){if(c.eql(v,c.ZERO))return c.ZERO;let b=1;for(let u=c.sqr(v);b<l&&!c.eql(u,c.ONE);b++)u=c.sqr(u);const p=c.pow(d,F<<BigInt(l-b-1));d=c.sqr(p),f=c.mul(f,p),v=c.mul(v,d),l=b}return f}}function bs(e){if(e%Ht===ys){const t=(e+F)/Ht;return function(r,o){const s=r.pow(o,t);if(!r.eql(r.sqr(s),o))throw new Error("Cannot find square root");return s}}if(e%qn===zn){const t=(e-zn)/qn;return function(r,o){const s=r.mul(o,$e),i=r.pow(s,t),c=r.mul(o,i),a=r.mul(r.mul(c,$e),i),l=r.mul(c,r.sub(a,r.ONE));if(!r.eql(r.sqr(l),o))throw new Error("Cannot find square root");return l}}return ms(e)}const xs=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function vs(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=xs.reduce((r,o)=>(r[o]="function",r),t);return tt(e,n)}function Es(e,t,n){if(n<Z)throw new Error("Expected power > 0");if(n===Z)return e.ONE;if(n===F)return t;let r=e.ONE,o=t;for(;n>Z;)n&F&&(r=e.mul(r,o)),o=e.sqr(o),n>>=F;return r}function ks(e,t){const n=new Array(t.length),r=t.reduce((s,i,c)=>e.is0(i)?s:(n[c]=s,e.mul(s,i)),e.ONE),o=e.inv(r);return t.reduceRight((s,i,c)=>e.is0(i)?s:(n[c]=e.mul(s,n[c]),e.mul(s,i)),o),n}function pr(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function As(e,t,n=!1,r={}){if(e<=Z)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=pr(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const i=bs(e),c=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:rn(o),ZERO:Z,ONE:F,create:a=>J(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof a}`);return Z<=a&&a<e},is0:a=>a===Z,isOdd:a=>(a&F)===F,neg:a=>J(-a,e),eql:(a,l)=>a===l,sqr:a=>J(a*a,e),add:(a,l)=>J(a+l,e),sub:(a,l)=>J(a-l,e),mul:(a,l)=>J(a*l,e),pow:(a,l)=>Es(c,a,l),div:(a,l)=>J(a*zt(l,e),e),sqrN:a=>a*a,addN:(a,l)=>a+l,subN:(a,l)=>a-l,mulN:(a,l)=>a*l,inv:a=>zt(a,e),sqrt:r.sqrt||(a=>i(c,a)),invertBatch:a=>ks(c,a),cmov:(a,l,d)=>d?l:a,toBytes:a=>n?nn(a,s):Le(a,s),fromBytes:a=>{if(a.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${a.length}`);return n?tn(a):te(a)}});return Object.freeze(c)}function gr(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function yr(e){const t=gr(e);return t+Math.ceil(t/2)}function Ss(e,t,n=!1){const r=e.length,o=gr(t),s=yr(t);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const i=n?te(e):tn(e),c=J(i,t-F)+F;return n?nn(c,o):Le(c,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Bs=BigInt(0),_t=BigInt(1);function Is(e,t){const n=(o,s)=>{const i=s.negate();return o?i:s},r=o=>{const s=Math.ceil(t/o)+1,i=2**(o-1);return{windows:s,windowSize:i}};return{constTimeNegate:n,unsafeLadder(o,s){let i=e.ZERO,c=o;for(;s>Bs;)s&_t&&(i=i.add(c)),c=c.double(),s>>=_t;return i},precomputeWindow(o,s){const{windows:i,windowSize:c}=r(s),a=[];let l=o,d=l;for(let f=0;f<i;f++){d=l,a.push(d);for(let v=1;v<c;v++)d=d.add(l),a.push(d);l=d.double()}return a},wNAF(o,s,i){const{windows:c,windowSize:a}=r(o);let l=e.ZERO,d=e.BASE;const f=BigInt(2**o-1),v=2**o,b=BigInt(o);for(let p=0;p<c;p++){const u=p*a;let h=Number(i&f);i>>=b,h>a&&(h-=v,i+=_t);const g=u,k=u+Math.abs(h)-1,_=p%2!==0,C=h<0;h===0?d=d.add(n(_,s[g])):l=l.add(n(C,s[k]))}return{p:l,f:d}},wNAFCached(o,s,i,c){const a=o._WINDOW_SIZE||1;let l=s.get(o);return l||(l=this.precomputeWindow(o,a),a!==1&&s.set(o,c(l))),this.wNAF(a,l,i)}}}function wr(e){return vs(e.Fp),tt(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...pr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _s(e){const t=wr(e);tt(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});
1const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:Ls,hexToBytes:Rs}=gs,Te={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Te;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Ls(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Te,n=typeof e=="string"?Rs(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:o,l:s}=Te._parseInt(n.subarray(2)),{d:i,l:c}=Te._parseInt(s);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:i}},hexFromSig(e){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const d=l.toString(16);return d.length&1?`0${d}`:d},r=t(n(e.s)),o=t(n(e.r)),s=r.length/2,i=o.length/2,c=n(s),a=n(i);return`30${n(i+s+4)}02${a}${o}02${c}${r}`}},pe=BigInt(0),oe=BigInt(1);BigInt(2);const jn=BigInt(3);BigInt(4);function Cs(e){const t=_s(e),{Fp:n}=t,r=t.toBytes||((p,u,h)=>{const g=u.toAffine();return Ue(Uint8Array.from([4]),n.toBytes(g.x),n.toBytes(g.y))}),o=t.fromBytes||(p=>{const u=p.subarray(1),h=n.fromBytes(u.subarray(0,n.BYTES)),g=n.fromBytes(u.subarray(n.BYTES,2*n.BYTES));return{x:h,y:g}});function s(p){const{a:u,b:h}=t,g=n.sqr(p),k=n.mul(g,p);return n.add(n.add(k,n.mul(p,u)),h)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function i(p){return typeof p=="bigint"&&pe<p&&p<t.n}function c(p){if(!i(p))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function a(p){const{allowedPrivateKeyLengths:u,nByteLength:h,wrapPrivateKey:g,n:k}=t;if(u&&typeof p!="bigint"){if(p instanceof Uint8Array&&(p=je(p)),typeof p!="string"||!u.includes(p.length))throw new Error("Invalid key");p=p.padStart(h*2,"0")}let _;try{_=typeof p=="bigint"?p:te(Y("private key",p,h))}catch{throw new Error(`private key must be ${h} bytes, hex or bigint, not ${typeof p}`)}return g&&(_=J(_,k)),c(_),_}const l=new Map;function d(p){if(!(p instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(u,h,g){if(this.px=u,this.py=h,this.pz=g,u==null||!n.isValid(u))throw new Error("x required");if(h==null||!n.isValid(h))throw new Error("y required");if(g==null||!n.isValid(g))throw new Error("z required")}static fromAffine(u){const{x:h,y:g}=u||{};if(!u||!n.isValid(h)||!n.isValid(g))throw new Error("invalid affine point");if(u instanceof f)throw new Error("projective point not allowed");const k=_=>n.eql(_,n.ZERO);return k(h)&&k(g)?f.ZERO:new f(h,g,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(u){const h=n.invertBatch(u.map(g=>g.pz));return u.map((g,k)=>g.toAffine(h[k])).map(f.fromAffine)}static fromHex(u){const h=f.fromAffine(o(Y("pointHex",u)));return h.assertValidity(),h}static fromPrivateKey(u){return f.BASE.multiply(a(u))}_setWindowSize(u){this._WINDOW_SIZE=u,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:u,y:h}=this.toAffine();if(!n.isValid(u)||!n.isValid(h))throw new Error("bad point: x or y not FE");const g=n.sqr(h),k=s(u);if(!n.eql(g,k))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:u}=this.toAffine();if(n.isOdd)return!n.isOdd(u);throw new Error("Field doesn't support isOdd")}equals(u){d(u);const{px:h,py:g,pz:k}=this,{px:_,py:C,pz:L}=u,E=n.eql(n.mul(h,L),n.mul(_,k)),B=n.eql(n.mul(g,L),n.mul(C,k));return E&&B}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:u,b:h}=t,g=n.mul(h,jn),{px:k,py:_,pz:C}=this;let L=n.ZERO,E=n.ZERO,B=n.ZERO,y=n.mul(k,k),N=n.mul(_,_),T=n.mul(C,C),R=n.mul(k,_);return R=n.add(R,R),B=n.mul(k,C),B=n.add(B,B),L=n.mul(u,B),E=n.mul(g,T),E=n.add(L,E),L=n.sub(N,E),E=n.add(N,E),E=n.mul(L,E),L=n.mul(R,L),B=n.mul(g,B),T=n.mul(u,T),R=n.sub(y,T),R=n.mul(u,R),R=n.add(R,B),B=n.add(y,y),y=n.add(B,y),y=n.add(y,T),y=n.mul(y,R),E=n.add(E,y),T=n.mul(_,C),T=n.add(T,T),y=n.mul(T,R),L=n.sub(L,y),B=n.mul(T,N),B=n.add(B,B),B=n.add(B,B),new f(L,E,B)}add(u){d(u);const{px:h,py:g,pz:k}=this,{px:_,py:C,pz:L}=u;let E=n.ZERO,B=n.ZERO,y=n.ZERO;const N=t.a,T=n.mul(t.b,jn);let R=n.mul(h,_),P=n.mul(g,C),z=n.mul(k,L),V=n.add(h,g),w=n.add(_,C);V=n.mul(V,w),w=n.add(R,P),V=n.sub(V,w),w=n.add(h,k);let x=n.add(_,L);return w=n.mul(w,x),x=n.add(R,z),w=n.sub(w,x),x=n.add(g,k),E=n.add(C,L),x=n.mul(x,E),E=n.add(P,z),x=n.sub(x,E),y=n.mul(N,w),E=n.mul(T,z),y=n.add(E,y),E=n.sub(P,y),y=n.add(P,y),B=n.mul(E,y),P=n.add(R,R),P=n.add(P,R),z=n.mul(N,z),w=n.mul(T,w),P=n.add(P,z),z=n.sub(R,z),z=n.mul(N,z),w=n.add(w,z),R=n.mul(P,w),B=n.add(B,R),R=n.mul(x,w),E=n.mul(V,E),E=n.sub(E,R),R=n.mul(V,P),y=n.mul(x,y),y=n.add(y,R),new f(E,B,y)}subtract(u){return this.add(u.negate())}is0(){return this.equals(f.ZERO)}wNAF(u){return b.wNAFCached(this,l,u,h=>{const g=n.invertBatch(h.map(k=>k.pz));return h.map((k,_)=>k.toAffine(g[_])).map(f.fromAffine)})}multiplyUnsafe(u){const h=f.ZERO;if(u===pe)return h;if(c(u),u===oe)return this;
1const{endo:g}=t;if(!g)return b.unsafeLadder(this,u);let{k1neg:k,k1:_,k2neg:C,k2:L}=g.splitScalar(u),E=h,B=h,y=this;for(;_>pe||L>pe;)_&oe&&(E=E.add(y)),L&oe&&(B=B.add(y)),y=y.double(),_>>=oe,L>>=oe;return k&&(E=E.negate()),C&&(B=B.negate()),B=new f(n.mul(B.px,g.beta),B.py,B.pz),E.add(B)}multiply(u){c(u);let h=u,g,k;const{endo:_}=t;if(_){const{k1neg:C,k1:L,k2neg:E,k2:B}=_.splitScalar(h);let{p:y,f:N}=this.wNAF(L),{p:T,f:R}=this.wNAF(B);y=b.constTimeNegate(C,y),T=b.constTimeNegate(E,T),T=new f(n.mul(T.px,_.beta),T.py,T.pz),g=y.add(T),k=N.add(R)}else{const{p:C,f:L}=this.wNAF(h);g=C,k=L}return f.normalizeZ([g,k])[0]}multiplyAndAddUnsafe(u,h,g){const k=f.BASE,_=(L,E)=>E===pe||E===oe||!L.equals(k)?L.multiplyUnsafe(E):L.multiply(E),C=_(this,h).add(_(u,g));return C.is0()?void 0:C}toAffine(u){const{px:h,py:g,pz:k}=this,_=this.is0();u==null&&(u=_?n.ONE:n.inv(k));const C=n.mul(h,u),L=n.mul(g,u),E=n.mul(k,u);if(_)return{x:n.ZERO,y:n.ZERO};if(!n.eql(E,n.ONE))throw new Error("invZ was invalid");return{x:C,y:L}}isTorsionFree(){const{h:u,isTorsionFree:h}=t;if(u===oe)return!0;if(h)return h(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:u,clearCofactor:h}=t;return u===oe?this:h?h(f,this):this.multiplyUnsafe(t.h)}toRawBytes(u=!0){return this.assertValidity(),r(f,this,u)}toHex(u=!0){return je(this.toRawBytes(u))}}f.BASE=new f(t.Gx,t.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,b=Is(f,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:a,weierstrassEquation:s,isWithinCurveOrder:i}}function $s(e){const t=wr(e);return tt(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Ts(e){const t=$s(e),{Fp:n,n:r}=t,o=n.BYTES+1,s=2*n.BYTES+1;function i(w){return pe<w&&w<n.ORDER}function c(w){return J(w,r)}function a(w){return zt(w,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:v}=Cs({...t,toBytes(w,x,I){const m=x.toAffine(),$=n.toBytes(m.x),O=Ue;return I?O(Uint8Array.from([x.hasEvenY()?2:3]),$):O(Uint8Array.from([4]),$,n.toBytes(m.y))},fromBytes(w){const x=w.length,I=w[0],m=w.subarray(1);if(x===o&&(I===2||I===3)){const $=te(m);if(!i($))throw new Error("Point is not on curve");const O=f($);let q=n.sqrt(O);const M=(q&oe)===oe;return(I&1)===1!==M&&(q=n.neg(q)),{x:$,y:q}}else if(x===s&&I===4){const $=n.fromBytes(m.subarray(0,n.BYTES)),O=n.fromBytes(m.subarray(n.BYTES,2*n.BYTES));return{x:$,y:O}}else throw new Error(`Point of length ${x} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}}),b=w=>je(Le(w,t.nByteLength));function p(w){const x=r>>oe;return w>x}function u(w){return p(w)?c(-w):w}const h=(w,x,I)=>te(w.slice(x,I));class g{constructor(x,I,m){this.r=x,this.s=I,this.recovery=m,this.assertValidity()}static fromCompact(x){const I=t.nByteLength;return x=Y("compactSignature",x,I*2),new g(h(x,0,I),h(x,I,2*I))}static fromDER(x){const{r:I,s:m}=Te.toSig(Y("DER",x));return new g(I,m)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(x){return new g(this.r,this.s,x)}recoverPublicKey(x){const{r:I,s:m,recovery:$}=this,O=B(Y("msgHash",x));if($==null||![0,1,2,3].includes($))throw new Error("recovery id invalid");const q=$===2||$===3?I+t.n:I;if(q>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const M=($&1)===0?"02":"03",j=l.fromHex(M+b(q)),D=a(q),se=c(-O*D),ve=c(m*D),W=l.BASE.multiplyAndAddUnsafe(j,se,ve);if(!W)throw new Error("point at infinify");return W.assertValidity(),W}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return We(this.toDERHex())}toDERHex(){return Te.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return We(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const k={isValidPrivateKey(w){try{return d(w),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const w=yr(t.n);return Ss(t.randomBytes(w),t.n)},precompute(w=8,x=l.BASE){return x._setWindowSize(w),x.multiply(BigInt(3)),x}};function _(w,x=!0){return l.fromPrivateKey(w).toRawBytes(x)}function C(w){const x=w instanceof Uint8Array,I=typeof w=="string",m=(x||I)&&w.length;return x?m===o||m===s:I?m===2*o||m===2*s:w instanceof l}function L(w,x,I=!0){if(C(w))throw new Error("first arg must be private key");if(!C(x))throw new Error("second arg must be public key");return l.fromHex(x).multiply(d(w)).toRawBytes(I)}
1const E=t.bits2int||function(w){const x=te(w),I=w.length*8-t.nBitLength;return I>0?x>>BigInt(I):x},B=t.bits2int_modN||function(w){return c(E(w))},y=rn(t.nBitLength);function N(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(pe<=w&&w<y))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Le(w,t.nByteLength)}function T(w,x,I=R){if(["recovered","canonical"].some(ne=>ne in I))throw new Error("sign() legacy options not supported");const{hash:m,randomBytes:$}=t;let{lowS:O,prehash:q,extraEntropy:M}=I;O==null&&(O=!0),w=Y("msgHash",w),q&&(w=Y("prehashed msgHash",m(w)));const j=B(w),D=d(x),se=[N(D),N(j)];if(M!=null){const ne=M===!0?$(n.BYTES):M;se.push(Y("extraEntropy",ne))}const ve=Ue(...se),W=j;function Oe(ne){const ie=E(ne);if(!v(ie))return;const Me=a(ie),ee=l.BASE.multiply(ie).toAffine(),Pe=c(ee.x);if(Pe===pe)return;const nt=c(Me*c(W+Pe*D));if(nt===pe)return;let On=(ee.x===Pe?0:2)|Number(ee.y&oe),Mn=nt;return O&&p(nt)&&(Mn=u(nt),On^=1),new g(Pe,Mn,On)}return{seed:ve,k2sig:Oe}}const R={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};function z(w,x,I=R){const{seed:m,k2sig:$}=T(w,x,I),O=t;return hr(O.hash.outputLen,O.nByteLength,O.hmac)(m,$)}l.BASE._setWindowSize(8);function V(w,x,I,m=P){const $=w;if(x=Y("msgHash",x),I=Y("publicKey",I),"strict"in m)throw new Error("options.strict was renamed to lowS");const{lowS:O,prehash:q}=m;let M,j;try{if(typeof $=="string"||$ instanceof Uint8Array)try{M=g.fromDER($)}catch(ee){if(!(ee instanceof Te.Err))throw ee;M=g.fromCompact($)}else if(typeof $=="object"&&typeof $.r=="bigint"&&typeof $.s=="bigint"){const{r:ee,s:Pe}=$;M=new g(ee,Pe)}else throw new Error("PARSE");j=l.fromHex(I)}catch(ee){if(ee.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(O&&M.hasHighS())return!1;q&&(x=t.hash(x));const{r:D,s:se}=M,ve=B(x),W=a(se),Oe=c(ve*W),ne=c(D*W),ie=l.BASE.multiplyAndAddUnsafe(j,Oe,ne)?.toAffine();return ie?c(ie.x)===D:!1}return{CURVE:t,getPublicKey:_,getSharedSecret:L,sign:z,verify:V,ProjectivePoint:l,Signature:g,utils:k}}let mr=class extends lr{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Ko(t);const r=Qt(n);if(this.iHash=t.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 o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),s.fill(0)}update(t){return at(this),this.iHash.update(t),this}digestInto(t){at(this),ar(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const br=(e,t,n)=>new mr(e,t).update(n).digest();br.create=(e,t)=>new mr(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Us(e){return{hash:e,hmac:(t,...n)=>br(e,t,Xo(...n)),randomBytes:fr}}function Ns(e,t){const n=r=>Ts({...e,...Us(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ct=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),xr=BigInt(1),lt=BigInt(2),Wn=(e,t)=>(e+t/lt)/t;function vr(e){const t=gt,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),c=BigInt(44),a=BigInt(88),l=e*e*e%t,d=l*l*e%t,f=re(d,n,t)*d%t,v=re(f,n,t)*d%t,b=re(v,lt,t)*l%t,p=re(b,o,t)*b%t,u=re(p,s,t)*p%t,h=re(u,c,t)*u%t,g=re(h,a,t)*h%t,k=re(g,c,t)*u%t,_=re(k,n,t)*d%t,C=re(_,i,t)*p%t,L=re(C,r,t)*l%t,E=re(L,lt,t);if(!qt.eql(qt.sqr(E),e))throw new Error("Cannot find square root");return E}const qt=As(gt,void 0,void 0,{sqrt:vr}),Ge=Ns({a:BigInt(0),b:BigInt(7),Fp:qt,n:ct,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ct,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-xr*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,i=BigInt("0x100000000000000000000000000000000"),c=Wn(s*e,t),a=Wn(-r*e,t);let l=J(e-c*n-a*o,t),d=J(-c*r-a*s,t);const f=l>i,v=d>i;if(f&&(l=t-l),v&&(d=t-d),l>i||d>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:v,k2:d}}}},Pt),yt=BigInt(0),Er=e=>typeof e=="bigint"&&yt<e&&e<gt,Os=e=>typeof e=="bigint"&&yt<e&&e<ct,Vn={};function ft(e,...t){let n=Vn[e];if(n===void 0){const r=Pt(Uint8Array.from(e,o=>
1o.charCodeAt(0)));n=Ue(r,r),Vn[e]=n}return Pt(Ue(n,...t))}const on=e=>e.toRawBytes(!0).slice(1),jt=e=>Le(e,32),Lt=e=>J(e,gt),Qe=e=>J(e,ct),sn=Ge.ProjectivePoint,Ms=(e,t,n)=>sn.BASE.multiplyAndAddUnsafe(e,t,n);function Wt(e){let t=Ge.utils.normPrivateKeyToScalar(e),n=sn.fromPrivateKey(t);return{scalar:n.hasEvenY()?t:Qe(-t),bytes:on(n)}}function kr(e){if(!Er(e))throw new Error("bad x: need 0 < x < p");const t=Lt(e*e),n=Lt(t*e+BigInt(7));let r=vr(n);r%lt!==yt&&(r=Lt(-r));const o=new sn(e,r,xr);return o.assertValidity(),o}function Ar(...e){return Qe(te(ft("BIP0340/challenge",...e)))}function Ps(e){return Wt(e).bytes}function Hs(e,t,n=fr(32)){const r=Y("message",e),{bytes:o,scalar:s}=Wt(t),i=Y("auxRand",n,32),c=jt(s^te(ft("BIP0340/aux",i))),a=ft("BIP0340/nonce",c,o,r),l=Qe(te(a));if(l===yt)throw new Error("sign failed: k is zero");const{bytes:d,scalar:f}=Wt(l),v=Ar(d,o,r),b=new Uint8Array(64);if(b.set(d,0),b.set(jt(Qe(f+v*s)),32),!Sr(b,r,o))throw new Error("sign: Invalid signature produced");return b}function Sr(e,t,n){const r=Y("signature",e,64),o=Y("message",t),s=Y("publicKey",n,32);try{const i=kr(te(s)),c=te(r.subarray(0,32));if(!Er(c))return!1;const a=te(r.subarray(32,64));if(!Os(a))return!1;const l=Ar(jt(c),on(i),o),d=Ms(i,a,Qe(-l));return!(!d||!d.hasEvenY()||d.toAffine().x!==c)}catch{return!1}}const Je={getPublicKey:Ps,sign:Hs,verify:Sr,utils:{randomPrivateKey:Ge.utils.randomPrivateKey,lift_x:kr,pointToBytes:on,numberToBytesBE:Le,bytesToNumberBE:te,taggedHash:ft,mod:J}},Rt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const an=e=>e instanceof Uint8Array,Ct=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),le=(e,t)=>e<<32-t|e>>>t,zs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!zs)throw new Error("Non little-endian hardware is not supported");const qs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function X(e){if(!an(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=qs[e[n]];return t}function Ne(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const o=r*2,s=e.slice(o,o+2),i=Number.parseInt(s,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");n[r]=i}return n}function js(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function et(e){if(typeof e=="string"&&(e=js(e)),!an(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function wt(...e){const t=new Uint8Array(e.reduce((r,o)=>r+o.length,0));let n=0;return e.forEach(r=>{if(!an(r))throw new Error("Uint8Array expected");t.set(r,n),n+=r.length}),t}class Br{clone(){return this._cloneInto()}}function Ir(e){const t=r=>e().update(et(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function _r(e=32){if(Rt&&typeof Rt.getRandomValues=="function")return Rt.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function Vt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Ws(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function Lr(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Vs(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Vt(e.outputLen),Vt(e.blockLen)}function Gs(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ds(e,t){Lr(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const fe={number:Vt,bool:Ws,bytes:Lr,hash:Vs,exists:Gs,output:Ds};function Fs(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),a=r?4:0,l=r?0:4;e.setUint32(t+a,i,r),e.setUint32(t+l,c,r)}class Ks extends Br{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ct(this.buffer)}update(t){fe.exists(this);const{view:n,buffer:r,blockLen:o}=this;t=et(t);const s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const a=Ct(t);for(;o<=s-i;i+=o)this.process(a,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){fe.exists(this),fe.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;Fs(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Ct(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)c.setUint32(4*f,d[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.length=o,t.pos=c,t.finished=s,t.destroyed=i,o%n&&t.buffer.set(r),t}}const Zs=(e,t,n)=>e&t^~e&n,Js=(e,t,n)=>e&t^e&n^t&n,Ys=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,2756
1734187,3204031479,3329325298]),Ae=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Se=new Uint32Array(64);class Rr extends Ks{constructor(){super(64,32,8,!1),this.A=Ae[0]|0,this.B=Ae[1]|0,this.C=Ae[2]|0,this.D=Ae[3]|0,this.E=Ae[4]|0,this.F=Ae[5]|0,this.G=Ae[6]|0,this.H=Ae[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:a}=this;return[t,n,r,o,s,i,c,a]}set(t,n,r,o,s,i,c,a){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=a|0}process(t,n){for(let f=0;f<16;f++,n+=4)Se[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const v=Se[f-15],b=Se[f-2],p=le(v,7)^le(v,18)^v>>>3,u=le(b,17)^le(b,19)^b>>>10;Se[f]=u+Se[f-7]+p+Se[f-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:a,G:l,H:d}=this;for(let f=0;f<64;f++){const v=le(c,6)^le(c,11)^le(c,25),b=d+v+Zs(c,a,l)+Ys[f]+Se[f]|0,u=(le(r,2)^le(r,13)^le(r,22))+Js(r,o,s)|0;d=l,l=a,a=c,c=i+b|0,i=s,s=o,o=r,r=b+u|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,a=a+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,o,s,i,c,a,l,d)}roundClean(){Se.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class Xs extends Rr{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const De=Ir(()=>new Rr);Ir(()=>new Xs);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Fe(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function me(...e){const t=(o,s)=>i=>o(s(i)),n=Array.from(e).reverse().reduce((o,s)=>o?t(o,s.encode):s.encode,void 0),r=e.reduce((o,s)=>o?t(o,s.decode):s.decode,void 0);return{encode:n,decode:r}}function be(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(Fe(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function xe(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function mt(e,t="="){if(Fe(e),typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of n)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Cr(e){if(typeof e!="function")throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function Gn(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],s=Array.from(e);for(s.forEach(i=>{if(Fe(i),i<0||i>=t)throw new Error(`Wrong integer: ${i}`)});;){let i=0,c=!0;for(let a=r;a<s.length;a++){const l=s[a],d=t*i+l;if(!Number.isSafeInteger(d)||t*i/t!==i||d-l!==t*i)throw new Error("convertRadix: carry overflow");if(i=d%n,s[a]=Math.floor(d/n),!Number.isSafeInteger(s[a])||s[a]*n+i!==d)throw new Error("convertRadix: carry overflow");if(c)s[a]?c=!1:r=a;else continue}if(o.push(i),c)break}for(let i=0;i<e.length-1&&e[i]===0;i++)o.push(0);return o.reverse()}const $r=(e,t)=>t?$r(t,e%t):e,dt=(e,t)=>
1e+(t-$r(e,t));function Gt(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(dt(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${dt(t,n)}`);let o=0,s=0;const i=2**n-1,c=[];for(const a of e){if(Fe(a),a>=2**t)throw new Error(`convertRadix2: invalid data word=${a} from=${t}`);if(o=o<<t|a,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((o>>s-n&i)>>>0);o&=2**s-1}if(o=o<<n-s&i,!r&&s>=t)throw new Error("Excess padding");if(!r&&o)throw new Error(`Non-zero padding: ${o}`);return r&&s>0&&c.push(o>>>0),c}function Qs(e){return Fe(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return Gn(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(Gn(t,e,2**8))}}}function Re(e,t=!1){if(Fe(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(dt(8,e)>32||dt(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return Gt(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(Gt(n,e,8,t))}}}function Dn(e){if(typeof e!="function")throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}const ei=me(Re(4),be("0123456789ABCDEF"),xe("")),ti=me(Re(5),be("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),mt(5),xe(""));me(Re(5),be("0123456789ABCDEFGHIJKLMNOPQRSTUV"),mt(5),xe(""));me(Re(5),be("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),xe(""),Cr(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));const we=me(Re(6),be("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),mt(6),xe("")),ni=me(Re(6),be("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),mt(6),xe("")),cn=e=>me(Qs(58),be(e),xe("")),Dt=cn("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");cn("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");cn("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const Fn=[0,2,3,5,6,7,9,10,11],ri={encode(e){let t="";for(let n=0;n<e.length;n+=8){const r=e.subarray(n,n+8);t+=Dt.encode(r).padStart(Fn[r.length],"1")}return t},decode(e){let t=[];for(let n=0;n<e.length;n+=11){const r=e.slice(n,n+11),o=Fn.indexOf(r.length),s=Dt.decode(r);for(let i=0;i<s.length-o;i++)if(s[i]!==0)throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(t)}},Ft=me(be("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),xe("")),Kn=[996825010,642813549,513874426,1027748829,705979059];function Ye(e){const t=e>>25;let n=(e&33554431)<<5;for(let r=0;r<Kn.length;r++)(t>>r&1)===1&&(n^=Kn[r]);return n}function Zn(e,t,n=1){const r=e.length;let o=1;for(let s=0;s<r;s++){const i=e.charCodeAt(s);if(i<33||i>126)throw new Error(`Invalid prefix (${e})`);o=Ye(o)^i>>5}o=Ye(o);for(let s=0;s<r;s++)o=Ye(o)^e.charCodeAt(s)&31;for(let s of t)o=Ye(o)^s;for(let s=0;s<6;s++)o=Ye(o);return o^=n,Ft.encode(Gt([o%2**30],30,5,!1))}function Tr(e){const t=e==="bech32"?1:734539939,n=Re(5),r=n.decode,o=n.encode,s=Dn(r);function i(d,f,v=90){if(typeof d!="string")throw new Error(`bech32.encode prefix should be string, not ${typeof d}`);if(!Array.isArray(f)||f.length&&typeof f[0]!="number")throw new Error(`bech32.encode words should be array of numbers, not ${typeof f}`);const b=d.length+7+f.length;if(v!==!1&&b>v)throw new TypeError(`Length ${b} exceeds limit ${v}`);return d=d.toLowerCase(),`${d}1${Ft.encode(f)}${Zn(d,f,t)}`}function c(d,f=90){if(typeof d!="string")throw new Error(`bech32.decode input should be string, not ${typeof d}`);if(d.length<8||f!==!1&&d.length>f)throw new TypeError(`Wrong string length: ${d.length} (${d}). Expected (8..${f})`);const v=d.toLowerCase();if(d!==v&&d!==d.toUpperCase())throw new Error("String must be lowercase or uppercase");d=v;const b=d.lastIndexOf("1");if(b===0||b===-1)throw new Error('Letter "1" must be present between prefix and data only');const p=d.slice(0,b),u=d.slice(b+1);if(u.length<6)throw new Error("Data must be at least 6 characters long");const h=Ft.decode(u).slice(0,-6),g=Zn(p,h,t);if(!u.endsWith(g))throw new Error(`Invalid checksum in ${d}: expected "${g}"`);return{prefix:p,words:h}}const a=Dn(c);function l(d){const{prefix:f,words:v}=c(d,!1);return{prefix:f,words:v,bytes:r(v)}}return{encode:i,decode:c,decodeToBytes:l,decodeUnsafe:a,fromWords:r,fromWordsUnsafe:s,toWords:o}}const Ve=Tr("bech32");
1Tr("bech32m");const oi={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)},si=me(Re(4),be("0123456789abcdef"),xe(""),Cr(e=>{if(typeof e!="string"||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})),ii={utf8:oi,hex:si,base16:ei,base32:ti,base64:we,base64url:ni,base58:Dt,base58xmr:ri};`${Object.keys(ii).join(", ")}`;function $t(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Jn(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function ai(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function ge(e,...t){if(!ai(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */const Q=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ci=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ci)throw new Error("Non little-endian hardware is not supported");function li(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function fi(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const di=(e,t)=>(Object.assign(t,e),t),_e=16,ui=283;function ln(e){return e<<1^ui&-(e>>7)}function qe(e,t){let n=0;for(;t>0;t>>=1)n^=e&-(t&1),e=ln(e);return n}const Kt=(()=>{let e=new Uint8Array(256);for(let n=0,r=1;n<256;n++,r^=ln(r))e[n]=r;const t=new Uint8Array(256);t[0]=99;for(let n=0;n<255;n++){let r=e[255-n];r|=r<<8,t[e[n]]=(r^r>>4^r>>5^r>>6^r>>7^99)&255}return t})(),hi=Kt.map((e,t)=>Kt.indexOf(t)),pi=e=>e<<24|e>>>8,Tt=e=>e<<8|e>>>24;function Ur(e,t){if(e.length!==256)throw new Error("Wrong sbox length");const n=new Uint32Array(256).map((l,d)=>t(e[d])),r=n.map(Tt),o=r.map(Tt),s=o.map(Tt),i=new Uint32Array(256*256),c=new Uint32Array(256*256),a=new Uint16Array(256*256);for(let l=0;l<256;l++)for(let d=0;d<256;d++){const f=l*256+d;i[f]=n[l]^r[d],c[f]=o[l]^s[d],a[f]=e[l]<<8|e[d]}return{sbox:e,sbox2:a,T0:n,T1:r,T2:o,T3:s,T01:i,T23:c}}const fn=Ur(Kt,e=>qe(e,3)<<24|e<<16|e<<8|qe(e,2)),Nr=Ur(hi,e=>qe(e,11)<<24|qe(e,13)<<16|qe(e,9)<<8|qe(e,14)),gi=(()=>{const e=new Uint8Array(16);for(let t=0,n=1;t<16;t++,n=ln(n))e[t]=n;return e})();function Or(e){ge(e);const t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);const{sbox2:n}=fn,r=Q(e),o=r.length,s=c=>de(n,c,c,c,c),i=new Uint32Array(t+28);i.set(r);for(let c=o;c<i.length;c++){let a=i[c-1];c%o===0?a=s(pi(a))^gi[c/o-1]:o>6&&c%o===4&&(a=s(a)),i[c]=i[c-o]^a}return i}function yi(e){const t=Or(e),n=t.slice(),r=t.length,{sbox2:o}=fn,{T0:s,T1:i,T2:c,T3:a}=Nr;for(let l=0;l<r;l+=4)for(let d=0;d<4;d++)n[l+d]=t[r-l-4+d];t.fill(0);for(let l=4;l<r-4;l++){const d=n[l],f=de(o,d,d,d,d);n[l]=s[f&255]^i[f>>>8&255]^c[f>>>16&255]^a[f>>>24]}return n}function Ie(e,t,n,r,o,s){return e[n<<8&65280|r>>>8&255]^t[o>>>8&65280|s>>>24&255]}function de(e,t,n,r,o){return e[t&255|n&65280]|e[r>>>16&255|o>>>16&65280]<<16}function Yn(e,t,n,r,o){const{sbox2:s,T01:i,T23:c}=fn;let a=0;t^=e[a++],n^=e[a++],r^=e[a++],o^=e[a++];const l=e.length/4-2;for(let p=0;p<l;p++){const u=e[a++]^Ie(i,c,t,n,r,o),h=e[a++]^Ie(i,c,n,r,o,t),g=e[a++]^Ie(i,c,r,o,t,n),k=e[a++]^Ie(i,c,o,t,n,r);t=u,n=h,r=g,o=k}const d=e[a++]^de(s,t,n,r,o),f=e[a++]^de(s,n,r,o,t),v=e[a++]^de(s,r,o,t,n),b=e[a++]^de(s,o,t,n,r);return{s0:d,s1:f,s2:v,s3:b}}function wi(e,t,n,r,o){const{sbox2:s,T01:i,T23:c}=Nr;let a=0;t^=e[a++],n^=e[a++],r^=e[a++],o^=e[a++];const l=e.length/4-2;for(let p=0;p<l;p++){const u=e[a++]^Ie(i,c,t,o,r,n),h=e[a++]^Ie(i,c,n,t,o,r),g=e[a++]^Ie(i,c,r,n,t,o),k=e[a++]^Ie(i,c,o,r,n,t);t=u,n=h,r=g,o=k}const d=e[a++]^de(s,t,o,r,n),f=e[a++]^de(s,n,t,o,r),v=e[a++]^de(s,r,n,t,o),b=e[a++]^de(s,o,r,n,t);return{s0:d,s1:f,s2:v,s3:b}}function Mr(e,t){if(!t)return new Uint8Array(e);if(ge(t),t.length<e)throw new Error(`aes: wrong destination length, expected at least ${e}, got: ${t.length}`);return t}function mi(e){if(ge(e),e.length%_e!==0)throw new Error(`aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size ${_e}`)}function bi(e,t,n){let r=e.length;const o=r%_e;if(!t&&o!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const s=Q(e);if(t){let a=_e-o;a||(a=_e),r=r+a}const i=Mr(r,n),c=Q(i);return{b:s,o:c,out:i}}function xi(e,t){if(!t)return e;const n=e.length;if(!n)throw new Error("aes/pcks5: empty ciphertext not allowed");const r=e[n-1];if(r<=0||r>16)throw new Error(`aes/pcks5: wrong padding byte: ${r}`);const o=e.subarray(0,-r);for(let s=0;s<r;s++)if(e[n-s-1]!==r)throw new Error("aes/pcks5: wrong padding");return o}function vi(e){const t=new Uint8Array(16),n=Q(t);t.set(e);const r=_e-e.length;for(let o=_e-r;o<_e;o++)t[o]=r;return n}const Pr=di({blockSize:16,nonceLength:16},function(t,n,r={}){ge(t),ge(n,16);const o=!r.disablePadding;return{encrypt:(s,i)=>{const c=Or(t),{b:a,o:l,out:d}=bi(s,o,i),f=Q(n);let v=f[0],b=f[1],p=f[2],u=f[3],h=0;for(;h+4<=a.length;)v^=a[h+0],b^=a[h+1],p^=a[h+2],u^=a[h+3],{s0:v,s1:b,s2:p,s3:u}=Yn(c,v,b,p,u),l[h++]=v,l[h++]=b,l[h++]=p,l[h++]=u;if(o){const g=vi(s.subarray(h*4));v^=g[0],b^=g[1],p^=g[2],u^=g[3],{s0:v,s1:b,s2:p,s3:u}=Yn(c,v,b,p,u),l[h++]=v,l[h++]=b,l[h++]=p,l[h++]=u}return c.fill(0),d},decrypt:(s,i)=>{mi(s);const c=yi(t),a=Q(n),l=Mr(s.length,i),d=Q(s),f=Q(l);let v=a[0],b=a[1],p=a[2],u=a[3];for(let h=0;h+4<=d.length;){const g=v,k=b,_=p,C=u;v=d[h+0],b=d[h+1],p=d[h+2],u=d[h+3];const{s0:L,s1:E,s2:B,s3:y}=wi(c,v,b,p,u);f[h++]=L^g,f[h++]=E^k,f[h++]=B^_,f[h++]=y^C}return c.fill(0),xi(l,o)}}}),Hr=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Ei=Hr("expand 16-byte k"),ki=Hr("expand 32-byte k"),Ai=Q(Ei),zr=Q(ki);zr.slice();function H(e,t){return e<<t|e>>>32-t}function Zt(e){return e.byteOffset%4===0}const rt=64,Si=16,qr=2**32-1,Xn=new Uint32Array;function Bi(e,t,n,r,o,s,i,c){const a=o.length,l=new Uint8Array(rt),d=Q(l),f=Zt(o)&&Zt(s),v=f?Q(o):Xn,b=f?Q(s):Xn;for(let p=0;p<a;
1i++){if(e(t,n,r,d,i,c),i>=qr)throw new Error("arx: counter overflow");const u=Math.min(rt,a-p);if(f&&u===rt){const h=p/4;if(p%4!==0)throw new Error("arx: invalid block position");for(let g=0,k;g<Si;g++)k=h+g,b[k]=v[k]^d[g];p+=rt;continue}for(let h=0,g;h<u;h++)g=p+h,s[g]=o[g]^l[h];p+=u}}function Ii(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=li({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return $t(o),$t(i),Jn(s),Jn(n),(c,a,l,d,f=0)=>{ge(c),ge(a),ge(l);const v=l.length;if(d||(d=new Uint8Array(v)),ge(d),$t(f),f<0||f>=qr)throw new Error("arx: counter overflow");if(d.length<v)throw new Error(`arx: output (${d.length}) is shorter than data (${v})`);const b=[];let p=c.length,u,h;if(p===32)u=c.slice(),b.push(u),h=zr;else if(p===16&&n)u=new Uint8Array(32),u.set(c),u.set(c,16),h=Ai,b.push(u);else throw new Error(`arx: invalid 32-byte key, got length=${p}`);Zt(a)||(a=a.slice(),b.push(a));const g=Q(u);if(r){if(a.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(h,g,Q(a.subarray(0,16)),g),a=a.subarray(16)}const k=16-o;if(k!==a.length)throw new Error(`arx: nonce must be ${k} or 16 bytes`);if(k!==12){const C=new Uint8Array(12);C.set(a,s?0:12-a.length),a=C,b.push(a)}const _=Q(a);for(Bi(e,h,g,_,l,d,f,i);b.length>0;)b.pop().fill(0);return d}}function _i(e,t,n,r,o,s=20){let i=e[0],c=e[1],a=e[2],l=e[3],d=t[0],f=t[1],v=t[2],b=t[3],p=t[4],u=t[5],h=t[6],g=t[7],k=o,_=n[0],C=n[1],L=n[2],E=i,B=c,y=a,N=l,T=d,R=f,P=v,z=b,V=p,w=u,x=h,I=g,m=k,$=_,O=C,q=L;for(let j=0;j<s;j+=2)E=E+T|0,m=H(m^E,16),V=V+m|0,T=H(T^V,12),E=E+T|0,m=H(m^E,8),V=V+m|0,T=H(T^V,7),B=B+R|0,$=H($^B,16),w=w+$|0,R=H(R^w,12),B=B+R|0,$=H($^B,8),w=w+$|0,R=H(R^w,7),y=y+P|0,O=H(O^y,16),x=x+O|0,P=H(P^x,12),y=y+P|0,O=H(O^y,8),x=x+O|0,P=H(P^x,7),N=N+z|0,q=H(q^N,16),I=I+q|0,z=H(z^I,12),N=N+z|0,q=H(q^N,8),I=I+q|0,z=H(z^I,7),E=E+R|0,q=H(q^E,16),x=x+q|0,R=H(R^x,12),E=E+R|0,q=H(q^E,8),x=x+q|0,R=H(R^x,7),B=B+P|0,m=H(m^B,16),I=I+m|0,P=H(P^I,12),B=B+P|0,m=H(m^B,8),I=I+m|0,P=H(P^I,7),y=y+z|0,$=H($^y,16),V=V+$|0,z=H(z^V,12),y=y+z|0,$=H($^y,8),V=V+$|0,z=H(z^V,7),N=N+T|0,O=H(O^N,16),w=w+O|0,T=H(T^w,12),N=N+T|0,O=H(O^N,8),w=w+O|0,T=H(T^w,7);let M=0;r[M++]=i+E|0,r[M++]=c+B|0,r[M++]=a+y|0,r[M++]=l+N|0,r[M++]=d+T|0,r[M++]=f+R|0,r[M++]=v+P|0,r[M++]=b+z|0,r[M++]=p+V|0,r[M++]=u+w|0,r[M++]=h+x|0,r[M++]=g+I|0,r[M++]=k+m|0,r[M++]=_+$|0,r[M++]=C+O|0,r[M++]=L+q|0}const jr=Ii(_i,{counterRight:!1,counterLength:4,allowShortKeys:!1});class Wr extends Br{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,fe.hash(t);const r=et(n);if(this.iHash=t.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 o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),s.fill(0)}update(t){return fe.exists(this),this.iHash.update(t),this}digestInto(t){fe.exists(this),fe.bytes(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const bt=(e,t,n)=>new Wr(e,t).update(n).digest();bt.create=(e,t)=>new Wr(e,t);function Li(e,t,n){return fe.hash(e),bt(e,et(n),et(t))}const Ut=new Uint8Array([0]),Qn=new Uint8Array;function Ri(e,t,n,r=32){if(fe.hash(e),fe.number(r),r>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/e.outputLen);n===void 0&&(n=Qn);const s=new Uint8Array(o*e.outputLen),i=bt.create(e,t),c=i._cloneInto(),a=new Uint8Array(i.outputLen);for(let l=0;l<o;l++)Ut[0]=l+1,c.update(l===0?Qn:a).update(n).update(Ut).digestInto(a),s.set(a,e.outputLen*l),i._cloneInto(c);return i.destroy(),c.destroy(),a.fill(0),Ut.fill(0),s.slice(0,r)}var Ci=Object.defineProperty,G=(e,t)=>{for(var n in t)Ci(e,n,{get:t[n],enumerable:!0})},He=Symbol("verified"),$i=e=>e instanceof Object;function dn(e){if(!$i(e)||typeof e.kind!="number"||typeof e.content!="string"||typeof e.created_at!="number"||typeof e.pubkey!="string"||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;t<e.tags.length;t++){let n=e.tags[t];if(!Array.isArray(n))return!1;for(let r=0;r<n.length;r++)if(typeof n[r]!="string")return!1}return!0}var Ti={};G(Ti,{Queue:()=>Mi,QueueNode:()=>Vr,binarySearch:()=>un,bytesToHex:()=>X,hexToBytes:()=>Ne,insertEventIntoAscendingList:()=>Oi,insertEventIntoDescendingList:()=>Ni,normalizeURL:()=>Ui,utf8Decoder:()=>ye,utf8Encoder:()=>ae});var ye=new TextDecoder("utf-8"),ae=new TextEncoder;function Ui(e){try{e.indexOf("://")===-1&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),(t.port==="80"&&t.protocol==="ws:"||t.port==="443"&&t.protocol==="wss:")&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}catch{throw new Error(`Invalid URL: ${e}`)}}function Ni(e,t){const[n,r]=un(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:o.created_at-t.created_at);return r||e.splice(n,0,t),e}function Oi(e,t){const[n,r]=un(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:t.created_at-o.created_at);return r||e.splice(n,0,t),e}function un(e,t){let n=0,r=e.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),s=t(e[o]);if(s===0)return[o,!0];s<0?r=o-1:n=o+1}return[n,!1]}var Vr=class{value;next=null;prev=null;constructor(e){this.value=e}},Mi=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){const t=new Vr(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const t=this.first;return this.first=null,this.last=null,t.value}const e=this.first;return this.first=e.next,this.first&&(this.first.prev=null),e.value}},Pi=class{generateSecretKey(){return Je.utils.randomPrivateKey()}getPublicKey(e){return X(Je.getPublicKey(e))}finalizeEvent(e,t){const n=e;return n.pubkey=X(Je.getPublicKey(t)),n.id=it(n),n.sig=X(Je.sign(it(n),t)),n[He]=!0,n}verifyEvent(e){if(typeof e[He]=="boolean")return e[He];const t=it(e);if(t!==e.id)return e[He]=!1,!1;try{const n=Je.verify(e.sig,t,e.pubkey);return e[He]=n,n}catch{return e[He]=!1,!1}}};function Hi(e){if(!dn(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function it(e){let t=De(ae.encode(Hi(e)));return X(t)}var xt=new Pi,zi=xt.generateSecretKey,hn=xt.getPublicKey,ue=xt.finalizeEvent,pn=xt.verifyEvent,qi={};G(qi,{Application:()=>za,BadgeAward:()=>Zi,BadgeDefinition:()=>Ta,BlockedRelaysList:()=>wa,BookmarkList:()=>pa,Bookmarksets:()=>Ra,Calendar:()=>Fa,CalendarEventRSVP:()=>Ka,ChannelCreation:()=>Jr,ChannelHideMessage:()=>Qr,ChannelMessage:()=>Xr,ChannelMetadata:()=>Yr,ChannelMuteUser:()=>eo,ClassifiedListing:()=>Wa,ClientAuth:()=>no,CommunitiesList:()=>ga,CommunityDefinition:()=>Ya,CommunityPostApproval:()=>ra,Contacts:()=>Di,CreateOrUpdateProduct:()=>Oa,CreateOrUpdateStall:()=>Na,Curationsets:()=>Ca,Date:()=>Ga,DirectMessageRelaysList:()=>va,DraftClassifiedListing:()=>Va,DraftLong:()=>Pa,Emojisets:()=>Ha,EncryptedDirectMessage:()=>
1Fi,EventDeletion:()=>Ki,FileMetadata:()=>Yi,FileServerPreference:()=>Ea,Followsets:()=>Ia,GenericRepost:()=>bn,Genericlists:()=>_a,GiftWrap:()=>to,HTTPAuth:()=>xn,Handlerinformation:()=>Ja,Handlerrecommendation:()=>Za,Highlights:()=>fa,InterestsList:()=>ba,Interestsets:()=>Ua,JobFeedback:()=>ia,JobRequest:()=>oa,JobResult:()=>sa,Label:()=>na,LightningPubRPC:()=>Aa,LiveChatMessage:()=>Xi,LiveEvent:()=>qa,LongFormArticle:()=>Ma,Metadata:()=>Vi,Mutelist:()=>da,NWCWalletInfo:()=>ka,NWCWalletRequest:()=>ro,NWCWalletResponse:()=>Sa,NostrConnect:()=>Ba,OpenTimestamps:()=>Ji,Pinlist:()=>ua,PrivateDirectMessage:()=>Zr,ProblemTracker:()=>Qi,ProfileBadges:()=>$a,PublicChatsList:()=>ya,Reaction:()=>mn,RecommendRelay:()=>Gi,RelayList:()=>ha,Relaysets:()=>La,Report:()=>ea,Reporting:()=>ta,Repost:()=>wn,Seal:()=>Kr,SearchRelaysList:()=>ma,ShortTextNote:()=>Fr,Time:()=>Da,UserEmojiList:()=>xa,UserStatuses:()=>ja,Zap:()=>la,ZapGoal:()=>aa,ZapRequest:()=>ca,classifyKind:()=>ji,isAddressableKind:()=>yn,isEphemeralKind:()=>Dr,isKind:()=>Wi,isRegularKind:()=>Gr,isReplaceableKind:()=>gn});function Gr(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function gn(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function Dr(e){return 2e4<=e&&e<3e4}function yn(e){return 3e4<=e&&e<4e4}function ji(e){return Gr(e)?"regular":gn(e)?"replaceable":Dr(e)?"ephemeral":yn(e)?"parameterized":"unknown"}function Wi(e,t){const n=t instanceof Array?t:[t];return dn(e)&&n.includes(e.kind)||!1}var Vi=0,Fr=1,Gi=2,Di=3,Fi=4,Ki=5,wn=6,mn=7,Zi=8,Kr=13,Zr=14,bn=16,Jr=40,Yr=41,Xr=42,Qr=43,eo=44,Ji=1040,to=1059,Yi=1063,Xi=1311,Qi=1971,ea=1984,ta=1984,na=1985,ra=4550,oa=5999,sa=6999,ia=7e3,aa=9041,ca=9734,la=9735,fa=9802,da=1e4,ua=10001,ha=10002,pa=10003,ga=10004,ya=10005,wa=10006,ma=10007,ba=10015,xa=10030,va=10050,Ea=10096,ka=13194,Aa=21e3,no=22242,ro=23194,Sa=23195,Ba=24133,xn=27235,Ia=3e4,_a=30001,La=30002,Ra=30003,Ca=30004,$a=30008,Ta=30009,Ua=30015,Na=30017,Oa=30018,Ma=30023,Pa=30024,Ha=30030,za=30078,qa=30311,ja=30315,Wa=30402,Va=30403,Ga=31922,Da=31923,Fa=31924,Ka=31925,Za=31989,Ja=31990,Ya=34550,Xa={};G(Xa,{getHex64:()=>vn,getInt:()=>oo,getSubscriptionId:()=>Qa,matchEventId:()=>ec,matchEventKind:()=>nc,matchEventPubkey:()=>tc});function vn(e,t){let n=t.length+3,r=e.indexOf(`"${t}":`)+n,o=e.slice(r).indexOf('"')+r+1;return e.slice(o,o+64)}function oo(e,t){let n=t.length,r=e.indexOf(`"${t}":`)+n+3,o=e.slice(r),s=Math.min(o.indexOf(","),o.indexOf("}"));return parseInt(o.slice(0,s),10)}function Qa(e){let t=e.slice(0,22).indexOf('"EVENT"');if(t===-1)return null;let n=e.slice(t+7+1).indexOf('"');if(n===-1)return null;let r=t+7+1+n,o=e.slice(r+1,80).indexOf('"');if(o===-1)return null;let s=r+1+o;return e.slice(r+1,s)}function ec(e,t){return t===vn(e,"id")}function tc(e,t){return t===vn(e,"pubkey")}function nc(e,t){return t===oo(e,"kind")}var rc={};G(rc,{makeAuthEvent:()=>oc});function oc(e,t){return{kind:no,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}var sc;try{sc=WebSocket}catch{}var ic;try{ic=WebSocket}catch{}var so={};G(so,{BECH32_REGEX:()=>io,Bech32MaxSize:()=>En,NostrTypeGuard:()=>ac,decode:()=>vt,decodeNostrURI:()=>lc,encodeBytes:()=>kt,naddrEncode:()=>gc,neventEncode:()=>pc,noteEncode:()=>uc,nprofileEncode:()=>hc,npubEncode:()=>dc,nsecEncode:()=>fc});var ac={isNProfile:e=>/^nprofile1[a-z\d]+$/.test(e||""),isNEvent:e=>/^nevent1[a-z\d]+$/.test(e||""),isNAddr:e=>/^naddr1[a-z\d]+$/.test(e||""),isNSec:e=>/^nsec1[a-z\d]{58}$/.test(e||""),isNPub:e=>/^npub1[a-z\d]{58}$/.test(e||""),isNote:e=>/^note1[a-z\d]+$/.test(e||""),isNcryptsec:e=>/^ncryptsec1[a-z\d]+$/.test(e||"")},En=5e3,io=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function cc(e){const t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t}function lc(e){try{return e.startsWith("nostr:")&&(e=e.substring(6)),vt(e)}catch{return{type:"invalid",data:null}}}function vt(e){let{prefix:t,words:n}=Ve.decode(e,En),r=new Uint8Array(Ve.fromWords(n));switch(t){case"nprofile":{let o=Nt(r);if(!o[0]?.[0])throw new Error("missing TLV 0 for nprofile");
1if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:X(o[0][0]),relays:o[1]?o[1].map(s=>ye.decode(s)):[]}}}case"nevent":{let o=Nt(r);if(!o[0]?.[0])throw new Error("missing TLV 0 for nevent");if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(o[2]&&o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(o[3]&&o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:X(o[0][0]),relays:o[1]?o[1].map(s=>ye.decode(s)):[],author:o[2]?.[0]?X(o[2][0]):void 0,kind:o[3]?.[0]?parseInt(X(o[3][0]),16):void 0}}}case"naddr":{let o=Nt(r);if(!o[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!o[2]?.[0])throw new Error("missing TLV 2 for naddr");if(o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!o[3]?.[0])throw new Error("missing TLV 3 for naddr");if(o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:ye.decode(o[0][0]),pubkey:X(o[2][0]),kind:parseInt(X(o[3][0]),16),relays:o[1]?o[1].map(s=>ye.decode(s)):[]}}}case"nsec":return{type:t,data:r};case"npub":case"note":return{type:t,data:X(r)};default:throw new Error(`unknown prefix ${t}`)}}function Nt(e){let t={},n=e;for(;n.length>0;){let r=n[0],o=n[1],s=n.slice(2,2+o);if(n=n.slice(2+o),s.length<o)throw new Error(`not enough data to read on TLV ${r}`);t[r]=t[r]||[],t[r].push(s)}return t}function fc(e){return kt("nsec",e)}function dc(e){return kt("npub",Ne(e))}function uc(e){return kt("note",Ne(e))}function Et(e,t){let n=Ve.toWords(t);return Ve.encode(e,n,En)}function kt(e,t){return Et(e,t)}function hc(e){let t=kn({0:[Ne(e.pubkey)],1:(e.relays||[]).map(n=>ae.encode(n))});return Et("nprofile",t)}function pc(e){let t;e.kind!==void 0&&(t=cc(e.kind));let n=kn({0:[Ne(e.id)],1:(e.relays||[]).map(r=>ae.encode(r)),2:e.author?[Ne(e.author)]:[],3:t?[new Uint8Array(t)]:[]});return Et("nevent",n)}function gc(e){let t=new ArrayBuffer(4);new DataView(t).setUint32(0,e.kind,!1);let n=kn({0:[ae.encode(e.identifier)],1:(e.relays||[]).map(r=>ae.encode(r)),2:[Ne(e.pubkey)],3:[new Uint8Array(t)]});return Et("naddr",n)}function kn(e){let t=[];return Object.entries(e).reverse().forEach(([n,r])=>{r.forEach(o=>{let s=new Uint8Array(o.length+2);s.set([parseInt(n)],0),s.set([o.length],1),s.set(o,2),t.push(s)})}),wt(...t)}var yc={};G(yc,{decrypt:()=>wc,encrypt:()=>ao});function ao(e,t,n){const r=e instanceof Uint8Array?X(e):e,o=Ge.getSharedSecret(r,"02"+t),s=co(o);let i=Uint8Array.from(_r(16)),c=ae.encode(n),a=Pr(s,i).encrypt(c),l=we.encode(new Uint8Array(a)),d=we.encode(new Uint8Array(i.buffer));return`${l}?iv=${d}`}function wc(e,t,n){const r=e instanceof Uint8Array?X(e):e;let[o,s]=n.split("?iv="),i=Ge.getSharedSecret(r,"02"+t),c=co(i),a=we.decode(s),l=we.decode(o),d=Pr(c,a).decrypt(l);return ye.decode(d)}function co(e){return e.slice(1,33)}var mc={};G(mc,{NIP05_REGEX:()=>An,isNip05:()=>bc,isValid:()=>Ec,queryProfile:()=>lo,searchDomain:()=>vc,useFetchImplementation:()=>xc});var An=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,bc=e=>An.test(e||""),At;try{At=fetch}catch{}function xc(e){At=e}async function vc(e,t=""){try{const n=`https://${e}/.well-known/nostr.json?name=${t}`,r=await At(n,{redirect:"manual"});if(r.status!==200)throw Error("Wrong response code");return(await r.json()).names}catch{return{}}}async function lo(e){const t=e.match(An);if(!t)return null;const[,n="_",r]=t;try{const o=`https://${r}/.well-known/nostr.json?name=${n}`,s=await At(o,{redirect:"manual"});if(s.status!==200)throw Error("Wrong response code");const i=await s.json(),c=i.names[n];return c?{pubkey:c,relays:i.relays?.[c]}:null}catch{return null}}async function Ec(e,t){const n=await lo(t);return n?n.pubkey===e:!1}var kc={};G(kc,{parse:()=>Ac});function Ac(e){const t={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]};let n,r;for(let o=e.tags.length-1;o>=0;o--){const s=e.tags[o];if(s[0]==="e"&&s[1]){const[i,c,a,l,d]=s,f={id:c,relays:a?[a]:[],author:d};if(l==="root"){t.root=f;continue}if(l==="reply"){t.reply=f;continue}if(l==="mention"){t.mentions.push(f);continue}n?r=f:n=f,t.mentions.push(f);continue}if(s[0]==="q"&&s[1]){const[i,c,a]=s;t.quotes.push({id:c,relays:a?[a]:[]})}if(s[0]==="p"&&s[1]){t.profiles.push({pubkey:s[1],relays:s[2]?[s[2]]:[]});continue}}return t.root||(t.root=r||n||t.reply),t.reply||(t.reply=n||t.root),[t.reply,t.root].forEach(o=>{if(!o)return;let s=t.mentions.indexOf(o);if(s!==-1&&t.mentions.splice(s,1),o.author){let i=t.profiles.find(c=>c.pubkey===o.author);i&&i.relays&&(o.relays||(o.relays=[]),i.relays.forEach(c=>{o.relays?.indexOf(c)===-1&&o.relays.push(c)}),i.relays=o.relays)}}),t.mentions.forEach(o=>{if(o.author){let s=t.profiles.find(i=>i.pubkey===o.author);s&&s.relays&&(o.relays||(o.relays=[]),s.relays.forEach(i=>
1{o.relays.indexOf(i)===-1&&o.relays.push(i)}),s.relays=o.relays)}}),t}var Sc={};G(Sc,{fetchRelayInformation:()=>Ic,useFetchImplementation:()=>Bc});var fo;try{fo=fetch}catch{}function Bc(e){fo=e}async function Ic(e){return await(await fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var _c={};G(_c,{fastEventHash:()=>ho,getPow:()=>uo,minePow:()=>Lc});function uo(e){let t=0;for(let n=0;n<64;n+=8){const r=parseInt(e.substring(n,n+8),16);if(r===0)t+=32;else{t+=Math.clz32(r);break}}return t}function Lc(e,t){let n=0;const r=e,o=["nonce",n.toString(),t.toString()];for(r.tags.push(o);;){const s=Math.floor(new Date().getTime()/1e3);if(s!==r.created_at&&(n=0,r.created_at=s),o[1]=(++n).toString(),r.id=ho(r),uo(r.id)>=t)break}return r}function ho(e){return X(De(ae.encode(JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content]))))}var Rc={};G(Rc,{unwrapEvent:()=>jc,unwrapManyEvents:()=>Wc,wrapEvent:()=>Bo,wrapManyEvents:()=>qc});var Cc={};G(Cc,{createRumor:()=>Eo,createSeal:()=>ko,createWrap:()=>Ao,unwrapEvent:()=>Ln,unwrapManyEvents:()=>So,wrapEvent:()=>ut,wrapManyEvents:()=>Hc});var $c={};G($c,{decrypt:()=>_n,encrypt:()=>In,getConversationKey:()=>Sn,v2:()=>Mc});var po=1,go=65535;function Sn(e,t){const n=Ge.getSharedSecret(e,"02"+t).subarray(1,33);return Li(De,n,"nip44-v2")}function yo(e,t){const n=Ri(De,e,t,76);return{chacha_key:n.subarray(0,32),chacha_nonce:n.subarray(32,44),hmac_key:n.subarray(44,76)}}function Bn(e){if(!Number.isSafeInteger(e)||e<1)throw new Error("expected positive integer");if(e<=32)return 32;const t=1<<Math.floor(Math.log2(e-1))+1,n=t<=256?32:t/8;return n*(Math.floor((e-1)/n)+1)}function Tc(e){if(!Number.isSafeInteger(e)||e<po||e>go)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}function Uc(e){const t=ae.encode(e),n=t.length,r=Tc(n),o=new Uint8Array(Bn(n)-n);return wt(r,t,o)}function Nc(e){const t=new DataView(e.buffer).getUint16(0),n=e.subarray(2,2+t);if(t<po||t>go||n.length!==t||e.length!==2+Bn(t))throw new Error("invalid padding");return ye.decode(n)}function wo(e,t,n){if(n.length!==32)throw new Error("AAD associated data must be 32 bytes");const r=wt(n,t);return bt(De,e,r)}function Oc(e){if(typeof e!="string")throw new Error("payload must be a valid string");const t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if(e[0]==="#")throw new Error("unknown encryption version");let n;try{n=we.decode(e)}catch(s){throw new Error("invalid base64: "+s.message)}const r=n.length;if(r<99||r>65603)throw new Error("invalid data length: "+r);const o=n[0];if(o!==2)throw new Error("unknown encryption version "+o);return{nonce:n.subarray(1,33),ciphertext:n.subarray(33,-32),mac:n.subarray(-32)}}function In(e,t,n=_r(32)){const{chacha_key:r,chacha_nonce:o,hmac_key:s}=yo(t,n),i=Uc(e),c=jr(r,o,i),a=wo(s,c,n);return we.encode(wt(new Uint8Array([2]),n,c,a))}function _n(e,t){const{nonce:n,ciphertext:r,mac:o}=Oc(e),{chacha_key:s,chacha_nonce:i,hmac_key:c}=yo(t,n),a=wo(c,r,n);if(!fi(a,o))throw new Error("invalid MAC");const l=jr(s,i,r);return Nc(l)}var Mc={utils:{getConversationKey:Sn,calcPaddedLen:Bn},encrypt:In,decrypt:_n},Pc=2*24*60*60,mo=()=>Math.round(Date.now()/1e3),bo=()=>Math.round(mo()-Math.random()*Pc),xo=(e,t)=>Sn(e,t),vo=(e,t,n)=>In(JSON.stringify(e),xo(t,n)),er=(e,t)=>JSON.parse(_n(e.content,xo(t,e.pubkey)));function Eo(e,t){const n={created_at:mo(),content:"",tags:[],...e,pubkey:hn(t)};return n.id=it(n),n}function ko(e,t,n){return ue({kind:Kr,content:vo(e,t,n),created_at:bo(),tags:[]},t)}function Ao(e,t){const n=zi();return ue({kind:to,content:vo(e,n,t),created_at:bo(),tags:[["p",t]]},n)}function ut(e,t,n){const r=Eo(e,t),o=ko(r,t,n);return Ao(o,n)}function Hc(e,t,n){if(!n||n.length===0)throw new Error("At least one recipient is required.");const r=hn(t),o=[ut(e,t,r)];return n.forEach(s=>{o.push(ut(e,t,s))}),o}function Ln(e,t){const n=er(e,t);return er(n,t)}function So(e,t){let n=[];return e.forEach(r=>{n.push(Ln(r,t))}),n.sort((r,o)=>r.created_at-o.created_at),n}function zc(e,t,n,r){const o={created_at:Math.ceil(Date.now()/1e3),kind:Zr,tags:[],content:t};
1return(Array.isArray(e)?e:[e]).forEach(({publicKey:i,relayUrl:c})=>{o.tags.push(c?["p",i,c]:["p",i])}),r&&o.tags.push(["e",r.eventId,r.relayUrl||"","reply"]),n&&o.tags.push(["subject",n]),o}function Bo(e,t,n,r,o){const s=zc(t,n,r,o);return ut(s,e,t.publicKey)}function qc(e,t,n,r,o){if(!t||t.length===0)throw new Error("At least one recipient is required.");return[{publicKey:hn(e)},...t].map(i=>Bo(e,i,n,r,o))}var jc=Ln,Wc=So,Vc={};G(Vc,{finishRepostEvent:()=>Gc,getRepostedEvent:()=>Dc,getRepostedEventPointer:()=>Io});function Gc(e,t,n,r){let o;const s=[...e.tags??[],["e",t.id,n],["p",t.pubkey]];return t.kind===Fr?o=wn:(o=bn,s.push(["k",String(t.kind)])),ue({kind:o,tags:s,content:e.content===""||t.tags?.find(i=>i[0]==="-")?"":JSON.stringify(t),created_at:e.created_at},r)}function Io(e){if(![wn,bn].includes(e.kind))return;let t,n;for(let r=e.tags.length-1;r>=0&&(t===void 0||n===void 0);r--){const o=e.tags[r];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&n===void 0&&(n=o))}if(t!==void 0)return{id:t[1],relays:[t[2],n?.[2]].filter(r=>typeof r=="string"),author:n?.[1]}}function Dc(e,{skipVerification:t}={}){const n=Io(e);if(n===void 0||e.content==="")return;let r;try{r=JSON.parse(e.content)}catch{return}if(r.id===n.id&&!(!t&&!pn(r)))return r}var Fc={};G(Fc,{NOSTR_URI_REGEX:()=>Rn,parse:()=>Zc,test:()=>Kc});var Rn=new RegExp(`nostr:(${io.source})`);function Kc(e){return typeof e=="string"&&new RegExp(`^${Rn.source}$`).test(e)}function Zc(e){const t=e.match(new RegExp(`^${Rn.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:vt(t[1])}}var Jc={};G(Jc,{finishReactionEvent:()=>Yc,getReactedEventPointer:()=>Xc});function Yc(e,t,n){const r=t.tags.filter(o=>o.length>=2&&(o[0]==="e"||o[0]==="p"));return ue({...e,kind:mn,tags:[...e.tags??[],...r,["e",t.id],["p",t.pubkey]],content:e.content??"+"},n)}function Xc(e){if(e.kind!==mn)return;let t,n;for(let r=e.tags.length-1;r>=0&&(t===void 0||n===void 0);r--){const o=e.tags[r];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&n===void 0&&(n=o))}if(!(t===void 0||n===void 0))return{id:t[1],relays:[t[2],n[2]].filter(r=>r!==void 0),author:n[1]}}var Qc={};G(Qc,{parse:()=>tl});var el=/\W/m,tr=/\W |\W$|$|,| /m;function*tl(e){const t=e.length;let n=0,r=0;for(;r<t;){let o=e.indexOf(":",r);
1if(o===-1)break;if(e.substring(o-5,o)==="nostr"){const s=e.substring(o+60).match(el),i=s?o+60+s.index:t;try{let c,{data:a,type:l}=vt(e.substring(o+1,i));switch(l){case"npub":c={pubkey:a};break;case"nsec":case"note":r=i+1;continue;default:c=a}n!==o-5&&(yield{type:"text",text:e.substring(n,o-5)}),yield{type:"reference",pointer:c},r=i,n=r;continue}catch{r=o+1;continue}}else if(e.substring(o-5,o)==="https"||e.substring(o-4,o)==="http"){const s=e.substring(o+4).match(tr),i=s?o+4+s.index:t,c=e[o-1]==="s"?5:4;try{let a=new URL(e.substring(o-c,i));if(a.hostname.indexOf(".")===-1)throw new Error("invalid url");if(n!==o-c&&(yield{type:"text",text:e.substring(n,o-c)}),a.pathname.endsWith(".png")||a.pathname.endsWith(".jpg")||a.pathname.endsWith(".jpeg")||a.pathname.endsWith(".gif")||a.pathname.endsWith(".webp")){yield{type:"image",url:a.toString()},r=i,n=r;continue}if(a.pathname.endsWith(".mp4")||a.pathname.endsWith(".avi")||a.pathname.endsWith(".webm")||a.pathname.endsWith(".mkv")){yield{type:"video",url:a.toString()},r=i,n=r;continue}if(a.pathname.endsWith(".mp3")||a.pathname.endsWith(".aac")||a.pathname.endsWith(".ogg")||a.pathname.endsWith(".opus")){yield{type:"audio",url:a.toString()},r=i,n=r;continue}yield{type:"url",url:a.toString()},r=i,n=r;continue}catch{r=i+1;continue}}else if(e.substring(o-3,o)==="wss"||e.substring(o-2,o)==="ws"){const s=e.substring(o+4).match(tr),i=s?o+4+s.index:t,c=e[o-1]==="s"?3:2;try{let a=new URL(e.substring(o-c,i));if(a.hostname.indexOf(".")===-1)throw new Error("invalid ws url");n!==o-c&&(yield{type:"text",text:e.substring(n,o-c)}),yield{type:"relay",url:a.toString()},r=i,n=r;continue}catch{r=i+1;continue}}else{r=o+1;continue}}n!==t&&(yield{type:"text",text:e.substring(n)})}var nl={};G(nl,{channelCreateEvent:()=>rl,channelHideMessageEvent:()=>il,channelMessageEvent:()=>sl,channelMetadataEvent:()=>ol,channelMuteUserEvent:()=>al});var rl=(e,t)=>{let n;if(typeof e.content=="object")n=JSON.stringify(e.content);else if(typeof e.content=="string")n=e.content;else return;return ue({kind:Jr,tags:[...e.tags??[]],content:n,created_at:e.created_at},t)},ol=(e,t)=>{let n;if(typeof e.content=="object")n=JSON.stringify(e.content);else if(typeof e.content=="string")n=e.content;else return;return ue({kind:Yr,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:n,created_at:e.created_at},t)},sl=(e,t)=>{const n=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&n.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),ue({kind:Xr,tags:[...n,...e.tags??[]],content:e.content,created_at:e.created_at},t)},il=(e,t)=>{let n;if(typeof e.content=="object")n=JSON.stringify(e.content);else if(typeof e.content=="string")n=e.content;else return;return ue({kind:Qr,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:n,created_at:e.created_at},t)},al=(e,t)=>{let n;if(typeof e.content=="object")n=JSON.stringify(e.content);else if(typeof e.content=="string")n=e.content;else return;return ue({kind:eo,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:n,created_at:e.created_at},t)},cl={};G(cl,{EMOJI_SHORTCODE_REGEX:()=>_o,matchAll:()=>ll,regex:()=>Cn,replaceAll:()=>fl});var _o=/:(\w+):/,Cn=()=>new RegExp(`\\B${_o.source}\\B`,"g");function*ll(e){const t=e.matchAll(Cn());for(const n of t)try{const[r,o]=n;yield{shortcode:r,name:o,start:n.index,end:n.index+r.length}}catch{}}function fl(e,t){return e.replaceAll(Cn(),(n,r)=>t({shortcode:n,name:r}))}var dl={};G(dl,{useFetchImplementation:()=>ul,validateGithub:()=>hl});var $n;try{$n=fetch}catch{}function ul(e){$n=e}async function hl(e,t,n){try{return await(await $n(`https://gist.github.com/${t}/${n}/raw`)).text()===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}}var pl={};G(pl,{makeNwcRequestEvent:()=>yl,parseConnectionString:()=>gl});function gl(e){const{pathname:t,searchParams:n}=new URL(e),r=t,o=n.get("relay"),s=n.get("secret");if(!r||!o||!s)throw new Error("invalid connection string");return{pubkey:r,relay:o,secret:s}}async function yl(e,t,n){const o=ao(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:n}})),s={kind:ro,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e]]};return ue(s,t)}var wl={};G(wl,{normalizeIdentifier:()=>ml});function ml(e){return e=e.trim().toLowerCase(),e=e.normalize("NFKC"),Array.from(e).map(t=>/\p{Letter}/u.test(t)||/\p{Number}/u.test(t)?t:"-").join("")}var bl={};G(bl,{getSatoshisAmountFromBolt11:()=>Sl,getZapEndpoint:()=>vl,makeZapReceipt:()=>Al,makeZapRequest:()=>El,useFetchImplementation:()=>xl,validateZapRequest:()=>kl});var Tn;try{Tn=fetch}catch{}function xl(e){Tn=e}async function vl(e){try{let t="",{lud06:n,lud16:r}=JSON.parse(e.content);if(n){let{words:i}=Ve.decode(n,1e3),c=Ve.fromWords(i);t=ye.decode(c)}else if(r){let[i,c]=r.split("@");t=new URL(`/.well-known/lnurlp/${i}`,`https://${c}`).toString()}else return null;let s=await(await Tn(t)).json();if(s.allowsNostr&&s.nostrPubkey)return s.callback}catch{}return null}function El({profile:e,event:t,amount:n,relays:r,comment:o=""}){if(!n)throw new Error("amount not given");if(!e)throw new Error("profile not given");let s={kind:9734,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e],["amount",n.toString()],["relays",...r]]};if(t&&typeof t=="string"&&s.tags.push(["e",t]),t&&typeof t=="object"){if(gn(t.kind)){const i=["a",`${t.kind}:${t.pubkey}:`];s.tags.push(i)}else if(yn(t.kind)){let i=t.tags.find(([a,l])=>a==="d"&&l);
1if(!i)throw new Error("d tag not found or is empty");const c=["a",`${t.kind}:${t.pubkey}:${i[1]}`];s.tags.push(c)}}return s}function kl(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!dn(t))return"Zap request is not a valid Nostr event.";if(!pn(t))return"Invalid signature on zap request.";let n=t.tags.find(([s,i])=>s==="p"&&i);if(!n)return"Zap request doesn't have a 'p' tag.";if(!n[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let r=t.tags.find(([s,i])=>s==="e"&&i);return r&&!r[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([s,i])=>s==="relays"&&i)?null:"Zap request doesn't have a 'relays' tag."}function Al({zapRequest:e,preimage:t,bolt11:n,paidAt:r}){let o=JSON.parse(e),s=o.tags.filter(([c])=>c==="e"||c==="p"||c==="a"),i={kind:9735,created_at:Math.round(r.getTime()/1e3),content:"",tags:[...s,["P",o.pubkey],["bolt11",n],["description",e]]};return t&&i.tags.push(["preimage",t]),i}function Sl(e){if(e.length<50)return 0;e=e.substring(0,50);const t=e.lastIndexOf("1");if(t===-1)return 0;const n=e.substring(0,t);if(!n.startsWith("lnbc"))return 0;const r=n.substring(4);if(r.length<1)return 0;const o=r[r.length-1],s=o.charCodeAt(0)-48,i=s>=0&&s<=9;let c=r.length-1;if(i&&c++,c<1)return 0;const a=parseInt(r.substring(0,c));switch(o){case"m":return a*1e5;case"u":return a*100;case"n":return a/10;case"p":return a/1e4;default:return a*1e8}}var Bl={};G(Bl,{getToken:()=>Il,hashPayload:()=>Un,unpackEventFromToken:()=>Ro,validateEvent:()=>Oo,validateEventKind:()=>$o,validateEventMethodTag:()=>Uo,validateEventPayloadTag:()=>No,validateEventTimestamp:()=>Co,validateEventUrlTag:()=>To,validateToken:()=>_l});var Lo="Nostr ";async function Il(e,t,n,r=!1,o){const s={kind:xn,tags:[["u",e],["method",t]],created_at:Math.round(new Date().getTime()/1e3),content:""};o&&s.tags.push(["payload",Un(o)]);const i=await n(s);return(r?Lo:"")+we.encode(ae.encode(JSON.stringify(i)))}async function _l(e,t,n){const r=await Ro(e).catch(s=>{throw s});return await Oo(r,t,n).catch(s=>{throw s})}async function Ro(e){if(!e)throw new Error("Missing token");e=e.replace(Lo,"");const t=ye.decode(we.decode(e));if(!t||t.length===0||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)}function Co(e){return e.created_at?Math.round(new Date().getTime()/1e3)-e.created_at<60:!1}function $o(e){return e.kind===xn}function To(e,t){const n=e.tags.find(r=>r[0]==="u");return n?n.length>0&&n[1]===t:!1}function Uo(e,t){const n=e.tags.find(r=>r[0]==="method");return n?n.length>0&&n[1].toLowerCase()===t.toLowerCase():!1}function Un(e){const t=De(ae.encode(JSON.stringify(e)));return X(t)}function No(e,t){const n=e.tags.find(o=>o[0]==="payload");if(!n)return!1;const r=Un(t);return n.length>0&&n[1]===r}async function Oo(e,t,n,r){if(!pn(e))throw new Error("Invalid nostr event, signature invalid");if(!$o(e))throw new Error("Invalid nostr event, kind invalid");if(!Co(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!To(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!Uo(e,n))throw new Error("Invalid nostr event, method tag invalid");if(r&&typeof r=="object"&&Object.keys(r).length>0&&!No(e,r))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0}const Nn="-",Ll=e=>{const t=Cl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(Nn);return c[0]===""&&c.length!==1&&c.shift(),Mo(c,t)||Rl(i)},getConflictingClassGroupIds:(i,c)=>{const a=n[i]||[];return c&&r[i]?[...a,...r[i]]:a}}},Mo=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Mo(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Nn);return t.validators.find(({validator:i})=>i(s))?.classGroupId},nr=/^\[(.+)\]$/,Rl=e=>{if(nr.test(e)){const t=nr.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Cl=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jt(n[o],r,o,t);return r},Jt=(e,t,n,r)=>{e.forEach(o=>
vendor: 4,273 bytes, line 1
1{if(typeof o=="string"){const s=o===""?t:rr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if($l(o)){Jt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Jt(i,rr(t,s),n,r)})})},rr=(e,t)=>{let n=e;return t.split(Nn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$l=e=>e.isThemeGetter,Tl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Yt="!",Xt=":",Ul=Xt.length,Nl=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,a=0,l;for(let p=0;p<o.length;p++){let u=o[p];if(i===0&&c===0){if(u===Xt){s.push(o.slice(a,p)),a=p+Ul;continue}if(u==="/"){l=p;continue}}u==="["?i++:u==="]"?i--:u==="("?c++:u===")"&&c--}const d=s.length===0?o:o.substring(a),f=Ol(d),v=f!==d,b=l&&l>a?l-a:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:f,maybePostfixModifierPosition:b}};if(t){const o=t+Xt,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Ol=e=>e.endsWith(Yt)?e.substring(0,e.length-1):e.startsWith(Yt)?e.substring(1):e,Ml=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Pl=e=>({cache:Tl(e.cacheSize),parseClassName:Nl(e),sortModifiers:Ml(e),...Ll(e)}),Hl=/\s+/,zl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(Hl);let a="";for(let l=c.length-1;l>=0;l-=1){const d=c[l],{isExternal:f,modifiers:v,hasImportantModifier:b,baseClassName:p,maybePostfixModifierPosition:u}=n(d);if(f){a=d+(a.length>0?" "+a:a);continue}let h=!!u,g=r(h?p.substring(0,u):p);if(!g){if(!h){a=d+(a.length>0?" "+a:a);continue}if(g=r(p),!g){a=d+(a.length>0?" "+a:a);continue}h=!1}const k=s(v).join(":"),_=b?k+Yt:k,C=_+g;if(i.includes(C))continue;i.push(C);const L=o(g,h);for(let E=0;E<L.length;++E){const B=L[E];i.push(_+B)}a=d+(a.length>0?" "+a:a)}return a};function ql(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Po(t))&&(r&&(r+=" "),r+=n);return r}const Po=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Po(e[r]))&&(n&&(n+=" "),n+=t);return n};function jl(e,...t){let n,r,o,s=i;function i(a){const l=t.reduce((d,f)=>f(d),e());return n=Pl(l),r=n.cache.get,o=n.cache.set,s=c,c(a)}function c(a){const l=r(a);if(l)return l;const d=zl(a,n);return o(a,d),d}return function(){return s(ql.apply(null,arguments))}}const K=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ho=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wl=/^\d+\/\d+$/,Vl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gl=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ze=e=>Wl.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Ot=e=>e.endsWith("%")&&U(e.slice(0,-1)),he=e=>Vl.test(e),Zl=()=>!0,Jl=e=>Gl.test(e)&&!Dl.test(e),qo=()=>!1,Yl=e=>Fl.test(e),Xl=e=>Kl.test(e),Ql=e=>!A(e)&&!S(e),ef=e=>Ke(e,Vo,qo),A=e=>Ho.test(e),Ce=e=>Ke(e,Go,Jl),Mt=e=>Ke(e,sf,U),or=e=>Ke(e,jo,qo),tf=e=>Ke(e,Wo,Xl),ot=e=>Ke(e,Do,Yl),S=e=>zo.test(e),Xe=e=>Ze(e,Go),nf=e=>Ze(e,af),sr=e=>Ze(e,jo),rf=e=>Ze(e,Vo),of=e=>Ze(e,Wo),st=e=>Ze(e,Do,!0),Ke=(e,t,n)=>{const r=Ho.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ze=(e,t,n=!1)=>{const r=zo.exec(e);return r?r[1]?t(r[1]):n:!1},jo=e=>e==="position"||e==="percentage",Wo=e=>e==="image"||e==="url",Vo=e=>e==="length"||e==="size"||e==="bg-size",Go=e=>e==="length",sf=e=>e==="number",af=e=>e==="family-name",Do=e=>e==="shadow",cf=()=>
vendor: 4,099 bytes, line 1
1{const e=K("color"),t=K("font"),n=K("text"),r=K("font-weight"),o=K("tracking"),s=K("leading"),i=K("breakpoint"),c=K("container"),a=K("spacing"),l=K("radius"),d=K("shadow"),f=K("inset-shadow"),v=K("text-shadow"),b=K("drop-shadow"),p=K("blur"),u=K("perspective"),h=K("aspect"),g=K("ease"),k=K("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...C(),S,A],E=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],y=()=>[S,A,a],N=()=>[ze,"full","auto",...y()],T=()=>[Be,"none","subgrid",S,A],R=()=>["auto",{span:["full",Be,S,A]},Be,S,A],P=()=>[Be,"auto",S,A],z=()=>["auto","min","max","fr",S,A],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],w=()=>["start","end","center","stretch","center-safe","end-safe"],x=()=>["auto",...y()],I=()=>[ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],m=()=>[e,S,A],$=()=>[...C(),sr,or,{position:[S,A]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",rf,ef,{size:[S,A]}],M=()=>[Ot,Xe,Ce],j=()=>["","none","full",l,S,A],D=()=>["",U,Xe,Ce],se=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[U,Ot,sr,or],Oe=()=>["","none",p,S,A],ne=()=>["none",U,S,A],ie=()=>["none",U,S,A],Me=()=>[U,S,A],ee=()=>[ze,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[he],breakpoint:[he],color:[Zl],container:[he],"drop-shadow":[he],ease:["in","out","in-out"],font:[Ql],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[he],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[he],shadow:[he],spacing:["px",U],text:[he],"text-shadow":[he],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ze,A,S,h]}],container:["container"],columns:[{columns:[U,A,S,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",S,A]}],basis:[{basis:[ze,"full","auto",c,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,ze,"auto","initial","none",A]}],grow:[{grow:["",U,S,A]}],shrink:[{shrink:["",U,S,A]}],order:[{order:[Be,"first","last","none",S,A]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":P()}
vendor: 10,912 bytes, line 1
1],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...w(),"normal"]}],"justify-self":[{"justify-self":["auto",...w()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...w(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...w(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...w(),"baseline"]}],"place-self":[{"place-self":["auto",...w()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:x()}],mx:[{mx:x()}],my:[{my:x()}],ms:[{ms:x()}],me:[{me:x()}],mt:[{mt:x()}],mr:[{mr:x()}],mb:[{mb:x()}],ml:[{ml:x()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[c,"screen",...I()]}],"min-w":[{"min-w":[c,"screen","none",...I()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,Xe,Ce]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,S,Mt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ot,A]}],"font-family":[{font:[nf,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,S,A]}],"line-clamp":[{"line-clamp":[U,"none",S,Mt]}],leading:[{leading:[s,...y()]}],"list-image":[{"list-image":["none",S,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",S,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:m()}],"text-color":[{text:m()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[U,"from-font","auto",S,Ce]}],"text-decoration-color":[{decoration:m()}],"underline-offset":[{"underline-offset":[U,"auto",S,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",S,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",S,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,S,A],radial:["",S,A],conic:[Be,S,A]},of,tf]}],"bg-color":[{bg:m()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:m()}],"gradient-via":[{via:m()}],"gradient-to":[{to:m()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:m()}],"border-color-x":[{"border-x":m()}],"border-color-y":[{"border-y":m()}],"border-color-s":[{"border-s":m()}],"border-color-e":[{"border-e":m()}],"border-color-t":[{"border-t":m()}],"border-color-r":[{"border-r":m()}],"border-color-b":[{"border-b":m()}],"border-color-l":[{"border-l":m()}],"divide-color":[{divide:m()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[U,S,A]}],"outline-w":[{outline:["",U,Xe,Ce]}],"outline-color":[{outline:m()}],shadow:[{shadow:["","none",d,st,ot]}],"shadow-color":[{shadow:m()}],"inset-shadow":[{"inset-shadow":["none",f,st,ot]}],"inset-shadow-color":[{"inset-shadow":m()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:m()}],"ring-offset-w":[{"ring-offset":[U,Ce]}],"ring-offset-color":[{"ring-offset":m()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":m()}],"text-shadow":[{"text-shadow":["none",v,st,ot]}],"text-shadow-color":[{"text-shadow":m()}],opacity:[{opacity:[U,S,A]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":m()}],"mask-image-linear-to-color":[{"mask-linear-to":m()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":m()}],"mask-image-t-to-color":[{"mask-t-to":m()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":m()}],"mask-image-r-to-color":[{"mask-r-to":m()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":m()}],"mask-image-b-to-color":[{"mask-b-to":m()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":m()}],"mask-image-l-to-color":[{"mask-l-to":m()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":m()}],"mask-image-x-to-color":[{"mask-x-to":m()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":m()}],"mask-image-y-to-color":[{"mask-y-to":m()}],"mask-image-radial":[{"mask-radial":[S,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":m()}],"mask-image-radial-to-color":[{"mask-radial-to":m()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":m()}],"mask-image-conic-to-color":[{"mask-conic-to":m()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",S,A]}],filter:[{filter:["","none",S,A]}],blur:[{blur:Oe()}],brightness:[{brightness:[U,S,A]}],contrast:[{contrast:[U,S,A]}],"drop-shadow":[{"drop-shadow":["","none",b,st,ot]}],"drop-shadow-color":[{"drop-shadow":m()}],grayscale:[{grayscale:["",U,S,A]}],"hue-rotate":[{"hue-rotate":[U,S,A]}],invert:[{invert:["",U,S,A]}],saturate:[{saturate:[U,S,A]}],sepia:[{sepia:["",U,S,A]}],"backdrop-filter":[{"backdrop-filter":["","none",S,A]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[U,S,A]}],"backdrop-contrast":[{"backdrop-contrast":[U,S,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,S,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,S,A]}],"backdrop-invert":[{"backdrop-invert":["",U,S,A]}],"backdrop-opacity":[{"backdrop-opacity":[U,S,A]}],"backdrop-saturate":[{"backdrop-saturate":[U,S,A]}],"backdrop-sepia":[{"backdrop-sepia":["",U,S,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",S,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[U,"initial",S,A]}],ease:[{ease:["linear","initial",g,S,A]}],delay:[{delay:[U,S,A]}],animate:[{animate:["none",k,S,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[u,S,A]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[S,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:m()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:m()}
1],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",S,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",S,A]}],fill:[{fill:["none",...m()]}],"stroke-w":[{stroke:[U,Xe,Ce,Mt]}],stroke:[{stroke:["none",...m()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},lf=jl(cf);function wf(...e){return lf(Fo(e))}function mf(e){return new Date(e*1e3).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric"})}function ff(e,t=15){return e.length<=t?e:e.slice(0,t-5)+"..."+e.slice(-5)}function df(e){const t=e.startsWith("npub1")?e:so.npubEncode(e);return ff(t)}function bf(e){const t=JSON.parse(e.content);return t?.display_name||t.name||df(e.pubkey)}export{hn as a,rc as b,wf as c,mf as f,it as g,qi as k,so as n,bf as p,pn as v};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.