@prosopo/account 2.8.92 → 2.8.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +3 -3
- package/.turbo/turbo-build$colon$tsc.log +6 -6
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +16 -0
- package/dist/cjs/workers/cryptoWorker.cjs +1 -1
- package/dist/workers/cryptoWorker.js +1 -1
- package/package.json +9 -9
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.93 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -43,6 +43,6 @@ dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
|
43
43
|
dist/cjs/extension/ExtensionWeb3.cjs 1.27 kB │ gzip: 0.56 kB
|
|
44
44
|
dist/cjs/extension/ExtensionWeb2.cjs 2.73 kB │ gzip: 0.93 kB
|
|
45
45
|
dist/cjs/workers/CryptoWorkerManager.cjs 4.01 kB │ gzip: 1.53 kB
|
|
46
|
-
dist/cjs/workers/cryptoWorker.cjs 63.
|
|
46
|
+
dist/cjs/workers/cryptoWorker.cjs 63.27 kB │ gzip: 26.72 kB
|
|
47
47
|
|
|
48
|
-
[32m✓ built in
|
|
48
|
+
[32m✓ built in 162ms[39m
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.93 build:tsc
|
|
3
3
|
> npm run typecheck && npm run build
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/account@2.8.
|
|
6
|
+
> @prosopo/account@2.8.93 typecheck
|
|
7
7
|
> tsc --project tsconfig.types.json
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @prosopo/account@2.8.
|
|
10
|
+
> @prosopo/account@2.8.93 build
|
|
11
11
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
> @prosopo/account@2.8.
|
|
14
|
+
> @prosopo/account@2.8.93 build:cross-env
|
|
15
15
|
> vite build --config vite.esm.config.ts --mode production
|
|
16
16
|
|
|
17
17
|
ViteEsmConfig: .
|
|
@@ -54,6 +54,6 @@ dist/index.js 0.27 kB │ gzip: 0.12 kB
|
|
|
54
54
|
dist/extension/ExtensionWeb3.js 1.10 kB │ gzip: 0.53 kB
|
|
55
55
|
dist/extension/ExtensionWeb2.js 2.12 kB │ gzip: 0.81 kB
|
|
56
56
|
dist/workers/CryptoWorkerManager.js 3.93 kB │ gzip: 1.52 kB
|
|
57
|
-
dist/workers/cryptoWorker.js 63.
|
|
57
|
+
dist/workers/cryptoWorker.js 63.45 kB │ gzip: 26.76 kB
|
|
58
58
|
|
|
59
|
-
[32m✓ built in
|
|
59
|
+
[32m✓ built in 160ms[39m
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.93 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/account@2.8.
|
|
6
|
+
> @prosopo/account@2.8.93 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -47,6 +47,6 @@ dist/index.js 0.27 kB │ gzip: 0.12 kB
|
|
|
47
47
|
dist/extension/ExtensionWeb3.js 1.10 kB │ gzip: 0.53 kB
|
|
48
48
|
dist/extension/ExtensionWeb2.js 2.12 kB │ gzip: 0.81 kB
|
|
49
49
|
dist/workers/CryptoWorkerManager.js 3.93 kB │ gzip: 1.52 kB
|
|
50
|
-
dist/workers/cryptoWorker.js 63.
|
|
50
|
+
dist/workers/cryptoWorker.js 63.28 kB │ gzip: 26.73 kB
|
|
51
51
|
|
|
52
|
-
[32m✓ built in
|
|
52
|
+
[32m✓ built in 450ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @prosopo/account
|
|
2
2
|
|
|
3
|
+
## 2.8.93
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- f4e4a83: chore(deps): roll up the open dependabot bumps (react 19.3, mongoose 9.10, @polkadot/util 14, redis 6, cron-parser 5, react-i18next 17 with i18next 26, @scure/base 2, cypress 16, rollup/babel plugin majors, vitest 4.1.11, angular 20.3.28, js-yaml)
|
|
7
|
+
- Updated dependencies [f4e4a83]
|
|
8
|
+
- Updated dependencies [c386199]
|
|
9
|
+
- Updated dependencies [d4e9425]
|
|
10
|
+
- Updated dependencies [ae121df]
|
|
11
|
+
- Updated dependencies [0be8838]
|
|
12
|
+
- @prosopo/common@3.1.56
|
|
13
|
+
- @prosopo/keyring@2.9.90
|
|
14
|
+
- @prosopo/types@5.8.4
|
|
15
|
+
- @prosopo/util-crypto@13.5.32
|
|
16
|
+
- @prosopo/util@3.3.10
|
|
17
|
+
- @prosopo/fingerprint@2.7.47
|
|
18
|
+
|
|
3
19
|
## 2.8.92
|
|
4
20
|
### Patch Changes
|
|
5
21
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/workers/cryptoWorker.ts?worker&inline
|
|
2
|
-
var jsContent = "(function(){function e(e){return e(`return this`)}let t=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:e(Function);function n(e,n){return t[e]===void 0?n:t[e]}let r=n(`TextEncoder`,class{encode(e){let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}});function i(e){return e(`return this`)}let a=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:i(Function);function o(e,t){return a[e]===void 0?t:a[e]}function s(e){return typeof e==`function`}function c(){return NaN}let l=o(`BigInt`,c),u=`0123456789abcdef`,d=new Uint8Array(256),f=new Uint8Array(256*256);for(let e=0;e<16;e++)d[u[e].charCodeAt(0)|0]=e|0,e>9&&(d[u[e].toUpperCase().charCodeAt(0)|0]=e|0);for(let e=0;e<256;e++){let t=e<<8;for(let n=0;n<256;n++)f[t|n]=d[e]<<4|d[n]}function p(e,t=-1){if(!e)return new Uint8Array;let n=e.startsWith(`0x`)?2:0,r=Math.ceil((e.length-n)/2),i=Math.ceil(t===-1?r:t/8),a=new Uint8Array(i),o=i>r?i-r:0;for(let t=o;t<i;t++,n+=2)a[t]=f[e.charCodeAt(n)<<8|e.charCodeAt(n+1)];return a}let m=/^0x[\\da-fA-F]+$/;function h(e,t=-1,n){return typeof e==`string`&&(e===`0x`||m.test(e))&&(t===-1?n||e.length%2==0:e.length===2+Math.ceil(t/4))}typeof l==`function`&&l.asIntN;let g=typeof a.Buffer==`function`&&typeof a.Buffer.isBuffer==`function`;a.process;function _(e){return g&&!!e&&s(e.readDoubleLE)&&a.Buffer.isBuffer(e)}function v(e){return(e&&e.constructor)===Uint8Array||e instanceof Uint8Array}let y=new r;function b(e){return e?y.encode(e.toString()):new Uint8Array}function x(e,t=!1){if(t&&e==null)throw Error(`u8aToU8a: Expected non-null, non-undefined value`);return v(e)?_(e)?new Uint8Array(e):e:h(e)?p(e):Array.isArray(e)?new Uint8Array(e):b(e)}\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nfunction S(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function C(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function w(e,...t){if(!S(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function T(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.createHasher`);C(e.outputLen),C(e.blockLen)}function E(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function ee(e,t){w(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function D(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function te(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function O(e,t){return e<<32-t|e>>>t}function ne(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function re(e){return typeof e==`string`&&(e=ne(e)),w(e),e}function ie(e){return typeof e==`string`&&(e=ne(e)),w(e),e}function ae(e,t){if(t!==void 0&&{}.toString.call(t)!==`[object Object]`)throw Error(`options should be object or undefined`);return Object.assign(e,t)}var oe=class{};function se(e){let t=t=>e().update(re(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ce(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function le(e,t,n){return e&t^~e&n}function ue(e,t,n){return e&t^e&n^t&n}var de=class extends oe{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=te(this.buffer)}update(e){E(this),e=re(e),w(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=te(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){E(this),ee(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,D(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;ce(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=te(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}};let k=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),A=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),fe=BigInt(2**32-1),pe=BigInt(32);function me(e,t=!1){return t?{h:Number(e&fe),l:Number(e>>pe&fe)}:{h:Number(e>>pe&fe)|0,l:Number(e&fe)|0}}function he(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=me(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let ge=(e,t,n)=>e>>>n,_e=(e,t,n)=>e<<32-n|t>>>n,j=(e,t,n)=>e>>>n|t<<32-n,M=(e,t,n)=>e<<32-n|t>>>n,ve=(e,t,n)=>e<<64-n|t>>>n-32,ye=(e,t,n)=>e>>>n-32|t<<64-n;function N(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let be=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),xe=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Se=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Ce=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,we=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Te=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0;function Ee(e){return e(`return this`)}let De=(typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:Ee(Function)).crypto;function Oe(e){return De.getRandomValues(e)}function ke(e=32){return Oe(new Uint8Array(e))}var Ae=class extends oe{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,T(e);let n=re(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),D(i)}update(e){return E(this),this.iHash.update(e),this}digestInto(e){E(this),w(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let je=(e,t,n)=>new Ae(e,t).update(n).digest();je.create=(e,t)=>new Ae(e,t);function Me(e,t,n,r){T(e);let{c:i,dkLen:a,asyncTick:o}=ae({dkLen:32,asyncTick:10},r);if(C(i),C(a),C(o),i<1)throw Error(`iterations (c) should be >= 1`);let s=ie(t),c=ie(n),l=new Uint8Array(a),u=je.create(e,s);return{c:i,dkLen:a,asyncTick:o,DK:l,PRF:u,PRFSalt:u._cloneInto().update(c)}}function Ne(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),D(i),n}function Pe(e,t,n,r){let{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=Me(e,t,n,r),l,u=new Uint8Array(4),d=te(u),f=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){let n=o.subarray(t,t+s.outputLen);d.setInt32(0,e,!1),(l=c._cloneInto(l)).update(u).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<i;e++){s._cloneInto(l).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return Ne(s,c,o,l,f)}let Fe=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),P=new Uint32Array(64);var Ie=class extends de{constructor(e=32){super(64,e,8,!1),this.A=k[0]|0,this.B=k[1]|0,this.C=k[2]|0,this.D=k[3]|0,this.E=k[4]|0,this.F=k[5]|0,this.G=k[6]|0,this.H=k[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)P[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=P[e-15],n=P[e-2],r=O(t,7)^O(t,18)^t>>>3,i=O(n,17)^O(n,19)^n>>>10;P[e]=i+P[e-7]+r+P[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=O(o,6)^O(o,11)^O(o,25),u=l+t+le(o,s,c)+Fe[e]+P[e]|0,d=(O(n,2)^O(n,13)^O(n,22))+ue(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){D(P)}destroy(){this.set(0,0,0,0,0,0,0,0),D(this.buffer)}};let Le=he(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),Re=Le[0],ze=Le[1],F=new Uint32Array(80),I=new Uint32Array(80);var Be=class extends de{constructor(e=64){super(128,e,16,!1),this.Ah=A[0]|0,this.Al=A[1]|0,this.Bh=A[2]|0,this.Bl=A[3]|0,this.Ch=A[4]|0,this.Cl=A[5]|0,this.Dh=A[6]|0,this.Dl=A[7]|0,this.Eh=A[8]|0,this.El=A[9]|0,this.Fh=A[10]|0,this.Fl=A[11]|0,this.Gh=A[12]|0,this.Gl=A[13]|0,this.Hh=A[14]|0,this.Hl=A[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)F[n]=e.getUint32(t),I[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=F[e-15]|0,n=I[e-15]|0,r=j(t,n,1)^j(t,n,8)^ge(t,n,7),i=M(t,n,1)^M(t,n,8)^_e(t,n,7),a=F[e-2]|0,o=I[e-2]|0,s=j(a,o,19)^ve(a,o,61)^ge(a,o,6),c=M(a,o,19)^ye(a,o,61)^_e(a,o,6),l=Se(i,c,I[e-7],I[e-16]),u=Ce(l,r,s,F[e-7],F[e-16]);F[e]=u|0,I[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=j(u,d,14)^j(u,d,18)^ve(u,d,41),v=M(u,d,14)^M(u,d,18)^ye(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=we(_,v,b,ze[e],I[e]),S=Te(x,g,t,y,Re[e],F[e]),C=x|0,w=j(n,r,28)^ve(n,r,34)^ve(n,r,39),T=M(n,r,28)^ye(n,r,34)^ye(n,r,39),E=n&i^n&o^i&o,ee=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=N(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let D=be(C,T,ee);n=xe(D,S,w,E),r=D|0}({h:n,l:r}=N(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=N(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=N(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=N(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=N(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=N(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=N(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=N(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){D(F,I)}destroy(){D(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};let Ve=se(()=>new Ie),He=se(()=>new Be);function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}let We=e=>e?`\"${e}\" `:``;function Ge(e,t=``){if(typeof e!=`number`)throw TypeError(We(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(We(t)+`expected integer >= 0, got `+e);return e}function Ke(e,t,n=``){if(Ue(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Ge(t,`length`);let r=Ue(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=We(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}let qe=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,Je=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Ye(e){if(Ke(e),qe)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=Je[e[n]];return t}function Xe(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Ze(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);if(qe)try{return Uint8Array.fromHex(e)}catch(e){throw e instanceof SyntaxError?RangeError(e.message):e}let t=e.length,n=t/2;if(t%2)throw RangeError(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=Xe(e.charCodeAt(i)),a=Xe(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw RangeError(`hex string expected, got non-hex character \"`+t+`\" at index `+i)}r[t]=n*16+a}return r}function Qe(e=32){Ge(e,`bytesLength`);let t=typeof globalThis==`object`?globalThis.crypto:null;if(typeof t?.getRandomValues!=`function`)throw Error(`crypto.getRandomValues must be defined`);if(e>65536)throw RangeError(`\"bytesLength\" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nfunction $e(e,t,n=()=>{}){if(!Array.isArray(e))throw TypeError(`\"${t}\" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}let L=(e,t,n)=>Ke(e,t,n),et=Ge;function R(e,t=`object`){if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(t===`object`?`expected valid options object`:`\"${t}\" expected object, got type=${typeof e}`);return e}function z(e,t){if(typeof e!=`function`)throw TypeError(`\"${t}\" is invalid: expected function, got ${typeof e}`);return e}let tt=Ye,nt=e=>Ze(e),rt=Ue,it=e=>Qe(e),at=BigInt(0),ot=BigInt(1),st=e=>e?`\"${e}\" `:``;function ct(e,t=``){if(typeof e!=`boolean`)throw TypeError(st(t)+`expected boolean, got type=`+typeof e);return e}function lt(e){if(typeof e==`bigint`){if(!V(e))throw RangeError(`positive bigint expected, got `+e)}else et(e);return e}function ut(e,t=``){if(typeof e!=`number`){let n=t&&`\"${t}\" `;throw TypeError(n+`expected number, got type=`+typeof e)}if(!Number.isSafeInteger(e)){let n=t&&`\"${t}\" `;throw RangeError(n+`expected safe integer, got `+e)}}function dt(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);return e===``?at:BigInt(`0x`+e)}function ft(e){return dt(Ye(e))}function B(e){return dt(Ye(gt(Ke(e)).reverse()))}function pt(e,t){if(Ge(t),t===0)throw Error(`zero output length is invalid`);e=lt(e);let n=t*2,r=e.toString(16);if(r.length>n)throw RangeError(`number is too large`);return Ze(r.padStart(n,`0`))}function mt(e,t){return pt(e,t).reverse()}function ht(e,t){if(e=L(e),t=L(t),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}function gt(e){return Uint8Array.from(L(e))}function V(e){return typeof e==`bigint`&&at<=e}function _t(e,t,n){return V(e)&&V(t)&&V(n)&&t<=e&&e<n}function vt(e,t,n,r){if(!_t(t,n,r))throw RangeError(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function yt(e){if(e<at)throw Error(`expected non-negative bigint, got `+e);return e===at?0:e.toString(2).length}let bt=e=>(ut(e,`n`),(ot<<BigInt(e))-ot);function xt(e,t={},n={},r=`object`){R(e,r),R(t,`fields`),R(n,`optFields`);function i(t,n,i){let a=r===`object`?`param \"${String(t)}\"`:`\"${r}.${String(t)}\"`,o=e[t];if(!Object.hasOwn(e,t)&&(i?o!==void 0:n!==`function`))throw TypeError(`${a} is invalid: expected own property`);if(i&&o===void 0)return;let s=typeof o;if(s!==n||o===null)throw TypeError(`${a} is invalid: expected ${n}, got ${s}`)}let a=(e,t)=>Object.entries(e).forEach(([e,n])=>i(e,n,t));a(t,!1),a(n,!0)}let St=()=>{throw Error(`not implemented`)},H=BigInt(0),U=BigInt(1),W=BigInt(2),Ct=BigInt(3),wt=BigInt(4),Tt=BigInt(5),Et=BigInt(7),Dt=BigInt(8),Ot=BigInt(9),kt=BigInt(15),At=BigInt(16),jt=BigInt(`0x10000000000000000`)\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n;function G(e,t){if(t<=H)throw Error(`mod: expected positive modulus, got `+t);let n=e%t;return n>=H?n:t+n}function Mt(e,t,n){if(n<=U)throw Error(`pow: expected modulus > 1, got `+n);if(typeof t!=`bigint`)throw TypeError(`invalid exponent: expected bigint, got `+typeof t);if(t<H)throw Error(`invalid exponent, negatives unsupported`);if(t===H)return U;if(t===U)return e;let r=e%n;if(r<H&&(r+=n),t<jt){let e=U;for(;t>H;)t&U&&(e=e*r%n),r=r*r%n,t>>=U;return e}let i=[];for(;t>H;)i.push(Number(t&kt)),t>>=wt;let a=Array(16);a[0]=U,a[1]=r;for(let e=2;e<16;e++)a[e]=a[e-1]*r%n;let o=a[i[i.length-1]];for(let e=i.length-2;e>=0;e--){o=o*o%n,o=o*o%n,o=o*o%n,o=o*o%n;let t=i[e];t!==0&&(o=o*a[t]%n)}return o}function K(e,t,n){if(n<=U)throw Error(`pow2: expected modulus > 1, got `+n);if(t<H)throw Error(`pow2: expected non-negative exponent, got `+t);let r=e;for(;t-->H;)r*=r,r%=n;return r}function Nt(e,t){if(e===H)throw Error(`invert: expected non-zero number`);if(t<=U)throw Error(`invert: expected modulus > 1, got `+t);let n=G(e,t),r=t,i=H,a=U;for(;n!==H;){let e=r/n,t=r-n*e,o=i-a*e;r=n,n=t,i=a,a=o}if(r!==U)throw Error(`invert: does not exist`);return G(i,t)}function Pt(e,t,n){let r=e;if(!r.eql(r.sqr(t),n))throw Error(`Cannot find square root`)}function Ft(e,t){if((e&U)===H)throw Error(t+`: expected odd modulus, got `+e)}function It(e,t){let n=e,r=(n.ORDER+U)/wt,i=n.pow(t,r);return Pt(n,i,t),i}function Lt(e,t){let n=e,r=(n.ORDER-Tt)/Dt,i=n.mul(t,W),a=n.pow(i,r),o=n.mul(t,a),s=n.mul(n.mul(o,W),a),c=n.mul(o,n.sub(s,n.ONE));return Pt(n,c,t),c}function Rt(e){let t=Yt(e),n=zt(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+Et)/At;return((e,t)=>{let n=e,s=n.pow(t,o),c=n.mul(s,r),l=n.mul(s,i),u=n.mul(s,a),d=n.eql(n.sqr(c),t),f=n.eql(n.sqr(l),t);s=n.cmov(s,c,d),c=n.cmov(u,l,f);let p=n.eql(n.sqr(c),t),m=n.cmov(s,c,p);return Pt(n,m,t),m})}function zt(e){if(e<Ct)throw Error(`sqrt is not defined for small field`);Ft(e,`tonelliShanks`);let t=e-U,n=0;for(;t%W===H;)t/=W,n++;let r=W,i=Yt(e);for(;Gt(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return It;let a=i.pow(r,t),o=(t+U)/W;return function(e,r){let i=e;if(i.is0(r))return r;if(Gt(i,r)!==1)throw Error(`Cannot find square root`);let s=n,c=i.mul(i.ONE,a),l=i.pow(r,t),u=i.pow(r,o);for(;!i.eql(l,i.ONE);){if(i.is0(l))throw Error(`Cannot find square root: probably non-prime P`);let e=1,t=i.sqr(l);for(;!i.eql(t,i.ONE);)if(e++,t=i.sqr(t),e===s)throw Error(`Cannot find square root`);let n=U<<BigInt(s-e-1),r=i.pow(c,n);s=e,c=i.sqr(r),l=i.mul(l,c),u=i.mul(u,r)}return u}}function Bt(e){return Ft(e,`Fp.sqrt`),e%wt===Ct?It:e%Dt===Tt?Lt:e%At===Ot?Rt(e):zt(e)}let Vt=(e,t)=>(G(e,t)&U)===U,Ht=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function Ut(e){if(R(e,`field`),typeof e.ORDER!=`bigint`)throw TypeError(`param \"ORDER\" is invalid: expected bigint, got `+typeof e.ORDER);ut(e.BYTES,`BYTES`),ut(e.BITS,`BITS`);for(let t of Ht)z(e[t],`field.`+t);if(e.BYTES<1||e.BITS<1)throw Error(`invalid field: expected BYTES/BITS > 0`);if(e.ORDER<=U)throw Error(`invalid field: expected ORDER > 1, got `+e.ORDER);return e}function Wt(e,t,n=!1){Ut(e),$e(t,`nums`),ct(n,`passZero`);let r=e,i=Array(t.length).fill(n?r.ZERO:void 0),a=t.reduce((e,t,n)=>r.is0(t)?e:(i[n]=e,r.mul(e,t)),r.ONE),o=r.inv(a);return t.reduceRight((e,t,n)=>r.is0(t)?e:(i[n]=r.mul(e,i[n]),r.mul(e,t)),o),i}function Gt(e,t){Ut(e);let n=e;Ft(n.ORDER,`FpLegendre`);let r=(n.ORDER-U)/W,i=n.pow(t,r),a=n.eql(i,n.ONE),o=n.eql(i,n.ZERO),s=n.eql(i,n.neg(n.ONE));if(!a&&!o&&!s)throw Error(`invalid Legendre symbol result`);return a?1:o?0:-1}function Kt(e,t){if(t!==void 0&&et(t),e<=H)throw Error(`invalid n length: expected positive n, got `+e);if(t!==void 0&&t<1)throw Error(`invalid n length: expected positive bit length, got `+t);let n=yt(e);if(t!==void 0&&t<n)throw Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);let r=t===void 0?n:t;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}let qt=new WeakMap;var Jt=class{ORDER;BITS;BYTES;isLE;ZERO=H;ONE=U;_lengths;_mod;constructor(e,t={}){if(e<=U)throw Error(`invalid field: expected ORDER > 1, got `+e);let n;this.isLE=!1,typeof t==`object`&&t&&(typeof t.BITS==`number`&&(n=t.BITS),typeof t.sqrt==`function`&&Object.defineProperty(this,\"sqrt\",{value:t.sqrt,enumerable:!0}),typeof t.isLE==`boolean`&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),typeof t.modFromBytes==`boolean`&&(this._mod=t.modFromBytes));let{nBitLength:r,nByteLength:i}=Kt(e,n);if(i>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);this.ORDER=e,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(e){return G(e,this.ORDER)}isValid(e){if(typeof e!=`bigint`)throw TypeError(`invalid field element: expected bigint, got `+typeof e);return H<=e&&e<this.ORDER}is0(e){return e===H}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&U)===U}neg(e){return G(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return G(e*e,this.ORDER)}add(e,t){return G(e+t,this.ORDER)}sub(e,t){return G(e-t,this.ORDER)}mul(e,t){return G(e*t,this.ORDER)}pow(e,t){return Mt(e,t,this.ORDER)}div(e,t){return G(e*Nt(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return Nt(e,this.ORDER)}sqrt(e){let t=qt.get(this);return t||qt.set(this,t=Bt(this.ORDER)),t(this,e)}toBytes(e){return this.isLE?mt(e,this.BYTES):pt(e,this.BYTES)}fromBytes(e,t=!1){L(e);let{_lengths:n,BYTES:r,isLE:i,ORDER:a,_mod:o}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>r)throw Error(`Field.fromBytes: expected `+n+` bytes, got `+e.length);let t=new Uint8Array(r);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==r)throw Error(`Field.fromBytes: expected `+r+` bytes, got `+e.length);let s=i?B(e):ft(e);if(o&&(s=G(s,a)),!t&&!this.isValid(s))throw Error(`invalid field element: outside of range 0..ORDER`);return s}invertBatch(e){return Wt(this,e,!0)}cmov(e,t,n){return ct(n,`condition`),n?t:e}};function Yt(e,t={}){return Object.freeze(Jt.prototype),new Jt(e,t)}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nlet Xt=BigInt(0),Zt=BigInt(1),Qt=BigInt(4),$t=2**31;function en(e){let t=e;if(typeof t!=`function`)throw TypeError(`\"Point\" expected constructor, got type=`+typeof e);z(t.fromAffine,`Point.fromAffine`),z(t.fromBytes,`Point.fromBytes`),z(t.fromHex,`Point.fromHex`),R(t.BASE,`Point.BASE`),R(t.ZERO,`Point.ZERO`),Ut(t.Fp),Ut(t.Fn)}function tn(e,t){en(e),on(t,e);let n=Wt(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function nn(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw Error(`invalid window size, expected [`+n+`..`+t+`], got W=`+e)}function rn(e,t){let n=e*(4*t+128);if(n>$t)throw Error(`invalid window size: table would need ~`+Math.ceil(n/2**20)+` MiB, max `+$t/2**20+` MiB`)}function an(e,t){if(e!==void 0){z(e,`randomBytes`);try{let n=e(t);if(!rt(n)||n.length!==t)return}catch{return}return e}}function on(e,t){$e(e,`points`),e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function sn(e,t,n){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,r)=>{if(!(n===void 0?t.isValid(e):V(e)&&e<n))throw Error(`invalid scalar at index `+r)})}let cn=new WeakMap;function ln(e){return cn.get(e)||1}function un(e,t){let n=e.double(),r=[e];for(let e=1;e<t;e++)r.push(r[e-1].add(n));return r}function dn(e,t){let n=2**t,r=n/2,i=BigInt(n-1),a=[];for(;e>Xt;){let t=0;e&Zt&&(t=Number(e&i),t>=r&&(t-=n),e-=BigInt(t)),a.push(t),e>>=Zt}return a}function fn(e,t,n){let r=2**t,i=r/2,a=BigInt(r-1),o=BigInt(t),s=[];for(let t=0;t<n;t++){let t=Number(e&a);e>>=o,t>i&&(t-=r,e+=Zt),s.push(t)}if(e!==Xt)throw Error(`invalid wnaf`);return s}function pn(e,t,n){let r=0;for(let e of n)r=Math.max(r,e.length);let i=e;for(let e=r-1;e>=0;e--){e!==r-1&&(i=i.double());for(let r=0;r<n.length;r++){let a=n[r][e];if(a){let e=t[r][Math.abs(a)-1>>1];i=i.add(a<0?e.negate():e)}}}return i}var mn=class{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(e,t){en(e),this.randomBytes=an(t,16),this.Point=e,this.BASE=e.BASE,this.ZERO=e.ZERO,this.bits=e.Fn.BITS}buildWnafTable(e,t,n){let r=Math.ceil(n/t)+1,i=2**(t-1),a=[],o=e;for(let e=0;e<r;e++){let e=o;for(let t=0;t<i;t++)a.push(e),e=e.add(o);o=a[a.length-1].double()}return{W:t,bits:n,windows:r,comp:a}}wnafCachedCT(e,t){let{W:n,windows:r,comp:i}=e,a=2**(n-1),o=fn(t,n,r),s=this.ZERO,c=this.BASE;for(let e=0;e<r;e++){let t=o[e],n=e*a,r=Math.abs(t)-1,l=i[n];for(let e=1;e<a;e++)l=e===r?i[n+e]:l;let u=l.negate();t===0?c=c.add(i[n]):s=s.add(t<0?u:l)}return{p:s,f:c}}getWnafPrecomputes(e,t,n,r){let i=this.wnafPrecomputes.get(t),a=i?.find(t=>t.W===e&&t.bits===n);return a||(a=this.buildWnafTable(t,e,n),typeof r==`function`&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(t,i)),i.push(a)),a}assertPoint(e){if(!(e instanceof this.Point))throw TypeError(`\"point\" expected Point instance, got type=`+typeof e)}validateMulInput(e,t){if(this.assertPoint(e),!_t(t,Zt,this.Point.Fn.ORDER))throw Error(`invalid scalar`)}runCT(e,t,n,r){let i=ln(e);return i===1?this.fixedWindowCT(e,t,n):this.wnafCachedCT(this.getWnafPrecomputes(i,e,n,r),t)}mulCT(e,t,n){return this.validateMulInput(e,t),this.runCT(e,t,this.bits,n)}mulCTBlinded(e,t,n){if(this.validateMulInput(e,t),this.randomBytes===void 0)throw Error(`randomBytes is required for scalar blinding`);let r=this.Point.Fn.BITS+128,i=this.randomBytes(16);if(!rt(i)||i.length!==16)throw Error(`randomBytes returned invalid byte array`);i[0]=i[0]&63|128;let a=t+ft(i)*this.Point.Fn.ORDER;return this.runCT(e,a,r,n)}fixedWindowCT(e,t,n){let r=bt(5),i=Array(32);i[0]=this.ZERO;for(let t=1;t<32;t++)i[t]=i[t-1].add(e);let a=Math.ceil(n/5),o=this.ZERO;for(let e=a-1;e>=0;e--){if(e!==a-1)for(let e=0;e<5;e++)o=o.double();let n=Number(t>>BigInt(e*5)&r),s=i[0];for(let e=1;e<32;e++)s=e===n?i[e]:s;o=o.add(s)}return{p:o,f:o}}shouldBlind(e,t){return this.randomBytes===void 0?!1:t===Zt?!0:e===this.BASE?(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded):!1}mulSecret(e,t,n,r){return this.shouldBlind(e,n)?this.mulCTBlinded(e,t,r):this.mulCT(e,t,r)}mulUnsafe(e,t,n){if(this.assertPoint(e),!V(t))throw Error(`invalid scalar`);let r=ln(e);if(r===1||t>=this.Point.Fn.ORDER)return hn(this.Point,[e],[t],!0);let i=this.getWnafPrecomputes(r,e,this.bits,n);return this.wnafCachedCT(i,t).p}setWindowSize(e,t){this.assertPoint(e),nn(t,this.bits),rn((Math.ceil((this.bits+128)/t)+1)*2**(t-1),this.Point.Fp.BYTES),cn.set(e,t),this.wnafPrecomputes.delete(e)}hasWindowSize(e){return ln(e)!==1}};function hn(e,t,n,r=!1){if(en(e),on(t,e),ct(r,`allowOversized`),sn(n,e.Fn,r?e.Fn.ORDER**Qt:void 0),t.length!==n.length)throw Error(`arrays of points and scalars must have equal length`);let i=t.map(e=>un(e,4)),a=n.map(e=>dn(e,4));return pn(e.ZERO,i,a)}function gn(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return Ut(t),t}else return Yt(e,{isLE:n})}function _n(e,t,n={},r){if(e!==`weierstrass`&&e!==`edwards`)throw Error(`expected curve type \"weierstrass\" or \"edwards\"`);if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);xt(n);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(V(n)&&n!==Xt))throw Error(`CURVE.${e} must be positive bigint`)}let i=gn(t.p,n.Fp,r),a=gn(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nlet vn=BigInt(0),yn=BigInt(1),bn=BigInt(2),xn=BigInt(4),Sn=BigInt(8);function Cn(e,t,n,r){let i=e.sqr(n),a=e.sqr(r),o=e.add(e.mul(t.a,i),a),s=e.add(e.ONE,e.mul(t.d,e.mul(i,a)));return e.eql(o,s)}function wn(e,t={}){xt(t,{},{},`extraOpts`);let n=t,r=_n(`edwards`,e,n,n.FpFnLE),{Fp:i,Fn:a}=r,o=r.CURVE,{h:s}=o;if(Gt(i,o.a)!==1)throw Error(`edwards: CURVE.a must be a square in Fp for complete addition formulas`);if(Gt(i,o.d)!==-1)throw Error(`edwards: CURVE.d must be a non-square in Fp for complete addition formulas`);xt(n,{},{uvRatio:`function`,randomBytes:`function`});let c=n.randomBytes===void 0?it:n.randomBytes,l=bn<<BigInt(i.BYTES*8)-yn;function u(e){if(!i.isOdd)throw Error(`Field does not have .isOdd()`);return i.isOdd(e)}let d=n.uvRatio===void 0?(e,t)=>{try{return{isValid:!0,value:i.sqrt(i.div(e,t))}}catch{return{isValid:!1,value:vn}}}:n.uvRatio;if(!Cn(i,o,o.Gx,o.Gy))throw Error(`bad curve params: generator point`);let f=i.eql(o.a,i.neg(i.ONE))?e=>i.neg(e):i.eql(o.a,i.ONE)?e=>e:e=>i.mul(o.a,e);function p(e,t,n=!1){let r=n?yn:vn;return vt(`coordinate `+e,t,r,l),t}function m(e){if(!(e instanceof h))throw Error(`EdwardsPoint expected`)}class h{static BASE=new h(o.Gx,o.Gy,i.ONE,i.mul(o.Gx,o.Gy));static ZERO=new h(i.ZERO,i.ONE,i.ONE,i.ZERO);static Fp=i;static Fn=a;X;Y;Z;T;constructor(e,t,n,r){this.X=p(`x`,e),this.Y=p(`y`,t),this.Z=p(`z`,n,!0),this.T=p(`t`,r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){if(e instanceof h)throw Error(`extended point not allowed`);let{x:t,y:n}=e||{};return p(`x`,t),p(`y`,n),new h(t,n,i.ONE,i.mul(t,n))}static fromBytes(e,t=!1){let n=i.BYTES,{a:r,d:a}=o;e=gt(L(e,n,`point`)),ct(t,`zip215`);let s=gt(e),c=e[n-1];s[n-1]=c&-129;let f=B(s),p=t?l:i.ORDER;vt(`point.y`,f,vn,p);let m=i.sqr(f),g=i.sub(m,i.ONE),_=i.sub(i.mulN(a,m),r),{isValid:v,value:y}=d(g,_);if(!v)throw Error(`bad point: invalid y coordinate`);let b=u(y),x=(c&128)!=0;if(!t&&i.is0(y)&&x)throw Error(`bad point: x=0 and x_0=1`);return x!==b&&(y=i.neg(y)),h.fromAffine({x:y,y:f})}static fromHex(e,t=!1){return h.fromBytes(nt(e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=6,t=!0){return _.setWindowSize(this,e),t||this.multiply(bn),this}assertValidity(){let e=this,{a:t,d:n}=o;if(e.is0())throw Error(`bad point: ZERO`);let{X:r,Y:a,Z:s,T:c}=e,l=i.sqr(r),u=i.sqr(a),d=i.sqr(s),f=i.sqr(d),p=i.mul(l,t),m=i.mul(i.add(p,u),d),h=i.add(f,i.mul(n,i.mul(l,u)));if(!i.eql(m,h))throw Error(`bad point: equation left != right (1)`);let g=i.mul(r,a),_=i.mul(s,c);if(!i.eql(g,_))throw Error(`bad point: equation left != right (2)`)}equals(e){m(e);let{X:t,Y:n,Z:r}=this,{X:a,Y:o,Z:s}=e,c=i.mul(t,s),l=i.mul(a,r),u=i.mul(n,s),d=i.mul(o,r);return i.eql(c,l)&&i.eql(u,d)}is0(){return this.equals(h.ZERO)}negate(){return new h(i.neg(this.X),this.Y,this.Z,i.neg(this.T))}double(){let{X:e,Y:t,Z:n}=this,r=i.sqr(e),a=i.sqr(t),o=i.mul(i.sqr(n),bn),s=f(r),c=i.addN(e,t),l=i.sub(i.subN(i.sqr(c),r),a),u=i.addN(s,a),d=i.subN(u,o),p=i.subN(s,a),m=i.mul(l,d),g=i.mul(u,p),_=i.mul(l,p),v=i.mul(d,u);return new h(m,g,v,_)}add(e){m(e);let{d:t}=o,{X:n,Y:r,Z:a,T:s}=this,{X:c,Y:l,Z:u,T:d}=e,p=i.mul(n,c),g=i.mul(r,l),_=i.mul(i.mulN(s,t),d),v=i.mul(a,u),y=i.sub(i.subN(i.mulN(i.addN(n,r),i.addN(c,l)),p),g),b=i.subN(v,_),x=i.addN(v,_),S=i.sub(g,f(p)),C=i.mul(y,b),w=i.mul(x,S),T=i.mul(y,S),E=i.mul(b,x);return new h(C,w,E,T)}subtract(e){return m(e),this.add(e.negate())}multiply(e){if(!a.isValidNot0(e))throw RangeError(`invalid scalar: expected 1 <= sc < curve.n`);let{p:t,f:n}=_.mulSecret(this,e,s,g);return g([t,n])[0]}multiplyUnsafe(e){if(!a.isValid(e))throw RangeError(`invalid scalar: expected 0 <= sc < curve.n`);return e===vn?h.ZERO:this.is0()||e===yn?this:_.mulUnsafe(this,e,g)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return _.mulUnsafe(this,o.n).is0()}toAffine(e){let t=this,n=e;if(n!=null&&typeof n!=`bigint`)throw TypeError(`\"invertedZ\" expected bigint, got type=`+typeof n);let{X:r,Y:a,Z:o}=t,s=t.is0();n??=s?i.create(Sn):i.inv(o);let c=i.mul(r,n),l=i.mul(a,n),u=i.mul(o,n);if(s)return{x:i.ZERO,y:i.ONE};if(!i.eql(u,i.ONE))throw Error(`invZ was invalid`);return{x:c,y:l}}clearCofactor(){return s===yn?this:s===bn?this.double():s===xn?this.double().double():s===Sn?this.double().double().double():this.multiplyUnsafe(s)}toBytes(){let{x:e,y:t}=this.toAffine(),n=i.toBytes(t);return n[n.length-1]|=u(e)?128:0,n}toHex(){return tt(this.toBytes())}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}}let g=e=>tn(h,e),_=new mn(h,c);return _.bits>=6&&h.BASE.precompute(6),Object.freeze(h.prototype),Object.freeze(h),h}var Tn=class{static BASE;static ZERO;static Fp;static Fn;ep;constructor(e){this.ep=e}static fromBytes(e){St()}static fromHex(e){St()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return tt(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.ep.precompute(e,t),this}};let En=BigInt(1),Dn=BigInt(2),On=BigInt(5),kn=BigInt(8),An=BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed`),jn={p:An,n:BigInt(`0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed`),h:kn,a:BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec`),d:BigInt(`0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3`),Gx:BigInt(`0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a`),Gy:BigInt(`0x6666666666666666666666666666666666666666666666666666666666666658`)}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n;function Mn(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),a=An,o=e*e%a*e%a,s=K(K(o,Dn,a)*o%a,En,a)*e%a,c=K(s,On,a)*s%a,l=K(c,t,a)*c%a,u=K(l,n,a)*l%a,d=K(u,r,a)*u%a;return{pow_p_5_8:K(K(K(K(d,i,a)*d%a,i,a)*d%a,t,a)*c%a,Dn,a)*e%a,b2:o}}let Nn=BigInt(`19681161376707505956807079304988542015446066515923890162744021073123829784752`);function Pn(e,t){let n=An,r=G(t*t*t,n),i=Mn(e*G(r*r*t,n)).pow_p_5_8,a=G(e*r*i,n),o=G(t*a*a,n),s=a,c=G(a*Nn,n),l=o===e,u=o===G(-e,n),d=o===G(-e*Nn,n);return l&&(a=s),(u||d)&&(a=c),Vt(a,n)&&(a=G(-a,n)),{isValid:l||u,value:a}}let q=wn(jn,{uvRatio:Pn}),J=q.Fp,Fn=q.Fn,In=Nn,Ln=BigInt(`54469307008909316920995813868745141605393597292927456921205312896311721017578`),Rn=e=>Pn(En,e),zn=BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`),Bn=e=>J.create(B(e)&zn);var Vn=class e extends Tn{static BASE=new e(q.BASE);static ZERO=new e(q.ZERO);static Fp=J;static Fn=Fn;constructor(e){super(e)}static fromAffine(t){return new e(q.fromAffine(t))}assertSame(t){if(!(t instanceof e))throw Error(`RistrettoPoint expected`)}init(t){return new e(t)}static fromBytes(t){Ke(t,32);let{a:n,d:r}=jn,i=Bn(t);if(!ht(J.toBytes(i),t)||J.isOdd(i))throw Error(`invalid ristretto255 encoding 1`);let a=J.sqr(i),o=J.add(En,J.mulN(n,a)),s=J.sub(En,J.mulN(n,a)),c=J.sqr(o),l=J.sqr(s),u=J.sub(J.mulN(J.mulN(n,r),c),l),{isValid:d,value:f}=Rn(J.mul(u,l)),p=J.mul(f,s),m=J.mul(J.mulN(f,p),u),h=J.mul(J.addN(i,i),p);J.isOdd(h)&&(h=J.neg(h));let g=J.mul(o,m),_=J.mul(h,g);if(!d||J.isOdd(_)||J.is0(g))throw Error(`invalid ristretto255 encoding 2`);return new e(new q(h,g,J.ONE,_))}static fromHex(t){return e.fromBytes(Ze(t))}toBytes(){let{X:e,Y:t,Z:n,T:r}=this.ep,i=J.mul(J.add(n,t),J.sub(n,t)),a=J.mul(e,t),o=J.sqr(a),{value:s}=Rn(J.mul(i,o)),c=J.mul(s,i),l=J.mul(s,a),u=J.mul(J.mulN(c,l),r),d;if(J.isOdd(J.mul(r,u))){let n=J.mul(t,In),r=J.mul(e,In);e=n,t=r,d=J.mul(c,Ln)}else d=l;J.isOdd(J.mul(e,u))&&(t=J.neg(t));let f=J.mul(J.subN(n,t),d);return J.isOdd(f)&&(f=J.neg(f)),J.toBytes(f)}equals(e){this.assertSame(e);let{X:t,Y:n}=this.ep,{X:r,Y:i}=e.ep,a=J.eql(J.mul(t,i),J.mul(n,r)),o=J.eql(J.mul(n,i),J.mul(t,r));return a||o}is0(){return this.equals(e.ZERO)}};let Hn=(Object.freeze(Vn.BASE),Object.freeze(Vn.ZERO),Object.freeze(Vn.prototype),Object.freeze(Vn),Object.freeze({Point:Vn})),Un=BigInt(2**32-1),Wn=BigInt(32);function Gn(e,t=!1){return t?{h:Number(e&Un),l:Number(e>>Wn&Un)}:{h:Number(e>>Wn&Un)|0,l:Number(e&Un)|0}}function Kn(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=Gn(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let qn=e=>e/2**32|0,Jn=e=>e>>>0;function Yn(e,t,n,r){let i=qn(n),a=Jn(n);e.setUint32(t,r?a:i,r),e.setUint32(t+4,r?i:a,r)}let Xn=(e,t,n)=>e>>>n,Zn=(e,t,n)=>e<<32-n|t>>>n,Y=(e,t,n)=>e>>>n|t<<32-n,X=(e,t,n)=>e<<32-n|t>>>n,Qn=(e,t,n)=>e<<64-n|t>>>n-32,$n=(e,t,n)=>e>>>n-32|t<<64-n;function Z(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let er=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),tr=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,nr=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),rr=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,ir=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),ar=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0;function or(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}let sr=e=>e?`\"${e}\" `:``;function cr(e,t=``){if(typeof e!=`number`)throw TypeError(sr(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(sr(t)+`expected integer >= 0, got `+e);return e}function lr(e,t,n=``){if(or(e)&&(t===void 0||e.length===t))return e;t!==void 0&&cr(t,`length`);let r=or(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=sr(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}let ur=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError((t===`object`?``:`\"${t}\" `)+`expected object, got type=`+typeof e)},dr=(e,t)=>{ur(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw TypeError(`\"${t}\" expected plain object`);if(Object.hasOwn(e,`__proto__`))throw TypeError(`\"${t}.__proto__\" is not allowed`)};function fr(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function pr(e,t){lr(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`\"output\" expected length >= `+n)}function mr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function hr(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function gr(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];lr(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function _r(e,t,n=`opts`){return dr(e,`defaults`),t!==void 0&&dr(t,n),Object.assign(Object.create(null),e,t)}function vr(e,t={}){if(typeof e!=`function`)throw TypeError(`\"hashCons\" expected function, got type=`+typeof e);t=_r({},t,`info`);let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}let yr=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var br=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=hr(this.buffer)}update(e){fr(this),lr(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length,a=!1;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);if(s===r){let t=hr(e);for(;r<=i-o;o+=r)this.process(t,o);a=!0;continue}n.set(o===0&&s===i?e:e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){fr(this),pr(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t.fill(0,a),this.padOffset>r-a&&(this.process(n,0),t.fill(0)),Yn(n,r-8,this.length*8,i),this.process(n,0),this.roundClean();let o=e===t?n:hr(e),s=this.outputLen,c=s/4,l=this.get();if(s%4||c>l.length)throw Error(`invalid outputLen`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:t,length:n,finished:r,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=r,e.length=n,e.pos=a,a&&e.buffer.set(t),e}clone(){return this._cloneInto()}};let xr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Sr=Kn(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),Cr=Sr[0],wr=Sr[1],Q=new Uint32Array(80),$=new Uint32Array(80);var Tr=class extends br{Ah=0;Al=0;Bh=0;Bl=0;Ch=0;Cl=0;Dh=0;Dl=0;Eh=0;El=0;Fh=0;Fl=0;Gh=0;Gl=0;Hh=0;Hl=0;constructor(e,t){super(128,e,16,!1),this.Ah=t[0]|0,this.Al=t[1]|0,this.Bh=t[2]|0,this.Bl=t[3]|0,this.Ch=t[4]|0,this.Cl=t[5]|0,this.Dh=t[6]|0,this.Dl=t[7]|0,this.Eh=t[8]|0,this.El=t[9]|0,this.Fh=t[10]|0,this.Fl=t[11]|0,this.Gh=t[12]|0,this.Gl=t[13]|0,this.Hh=t[14]|0,this.Hl=t[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)Q[n]=e.getUint32(t),$[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=Q[e-15]|0,n=$[e-15]|0,r=Y(t,n,1)^Y(t,n,8)^Xn(t,n,7),i=X(t,n,1)^X(t,n,8)^Zn(t,n,7),a=Q[e-2]|0,o=$[e-2]|0,s=Y(a,o,19)^Qn(a,o,61)^Xn(a,o,6),c=X(a,o,19)^$n(a,o,61)^Zn(a,o,6),l=nr(i,c,$[e-7],$[e-16]),u=rr(l,r,s,Q[e-7],Q[e-16]);Q[e]=u|0,$[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Y(u,d,14)^Y(u,d,18)^Qn(u,d,41),v=X(u,d,14)^X(u,d,18)^$n(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=ir(_,v,b,wr[e],$[e]),S=ar(x,g,t,y,Cr[e],Q[e]),C=x|0,w=Y(n,r,28)^Qn(n,r,34)^Qn(n,r,39),T=X(n,r,28)^$n(n,r,34)^$n(n,r,39),E=n&i^n&o^i&o,ee=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=Z(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let D=er(C,T,ee);n=tr(D,S,w,E),r=D|0}({h:n,l:r}=Z(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=Z(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=Z(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=Z(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=Z(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=Z(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=Z(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=Z(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){mr(Q,$)}destroy(){this.destroyed=!0,mr(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Er=class extends Tr{constructor(){super(64,xr)}};let Dr=vr(()=>new Er,yr(3)),Or=BigInt(3);function kr(e,t,...n){if(!rt(t))throw TypeError(`${e}: Uint8Array expected`);if(n.length&&!n.includes(t.length))throw RangeError(`${e}: Uint8Array expected of length ${n}, not of length=${t.length}`)}function Ar(...e){for(let t of e)t.fill(0)}let jr=bt(256),Mr=e=>mt(e<<Or&jr,32),Nr=e=>B(e)>>Or;function Pr(e){kr(`seed`,e,32);let t=Dr(e);t[0]&=248,t[31]&=63,t[31]|=64;let n=Mr(Nr(t.subarray(0,32))),r=t.subarray(32,64),i=gr(n,r);return Ar(n,r,t),i}let Fr=He;function Ir(e,t=ke(),n=2048,r){return{password:Pe(Fr,x(e),x(t),{c:n,dkLen:64}),rounds:n,salt:t}}var Lr={256:Ve,512:Fr},Rr=Lr[256];Lr[512];var zr=`abandon|ability|able|about|above|absent|absorb|abstract|absurd|abuse|access|accident|account|accuse|achieve|acid|acoustic|acquire|across|act|action|actor|actress|actual|adapt|add|addict|address|adjust|admit|adult|advance|advice|aerobic|affair|afford|afraid|again|age|agent|agree|ahead|aim|air|airport|aisle|alarm|album|alcohol|alert|alien|all|alley|allow|almost|alone|alpha|already|also|alter|always|amateur|amazing|among|amount|amused|analyst|anchor|ancient|anger|angle|angry|animal|ankle|announce|annual|another|answer|antenna|antique|anxiety|any|apart|apology|appear|apple|approve|april|arch|arctic|area|arena|argue|arm|armed|armor|army|around|arrange|arrest|arrive|arrow|art|artefact|artist|artwork|ask|aspect|assault|asset|assist|assume|asthma|athlete|atom|attack|attend|attitude|attract|auction|audit|august|aunt|author|auto|autumn|average|avocado|avoid|awake|aware|away|awesome|awful|awkward|axis|baby|bachelor|bacon|badge|bag|balance|balcony|ball|bamboo|banana|banner|bar|barely|bargain|barrel|base|basic|basket|battle|beach|bean|beauty|because|become|beef|before|begin|behave|behind|believe|below|belt|bench|benefit|best|betray|better|between|beyond|bicycle|bid|bike|bind|biology|bird|birth|bitter|black|blade|blame|blanket|blast|bleak|bless|blind|blood|blossom|blouse|blue|blur|blush|board|boat|body|boil|bomb|bone|bonus|book|boost|border|boring|borrow|boss|bottom|bounce|box|boy|bracket|brain|brand|brass|brave|bread|breeze|brick|bridge|brief|bright|bring|brisk|broccoli|broken|bronze|broom|brother|brown|brush|bubble|buddy|budget|buffalo|build|bulb|bulk|bullet|bundle|bunker|burden|burger|burst|bus|business|busy|butter|buyer|buzz|cabbage|cabin|cable|cactus|cage|cake|call|calm|camera|camp|can|canal|cancel|candy|cannon|canoe|canvas|canyon|capable|capital|captain|car|carbon|card|cargo|carpet|carry|cart|case|cash|casino|castle|casual|cat|catalog|catch|category|cattle|caught|cause|caution|cave|ceiling|celery|cement|census|century|cereal|certain|chair|chalk|champion|change|chaos|chapter|charge|chase|chat|cheap|check|cheese|chef|cherry|chest|chicken|chief|child|chimney|choice|choose|chronic|chuckle|chunk|churn|cigar|cinnamon|circle|citizen|city|civil|claim|clap|clarify|claw|clay|clean|clerk|clever|click|client|cliff|climb|clinic|clip|clock|clog|close|cloth|cloud|clown|club|clump|cluster|clutch|coach|coast|coconut|code|coffee|coil|coin|collect|color|column|combine|come|comfort|comic|common|company|concert|conduct|confirm|congress|connect|consider|control|convince|cook|cool|copper|copy|coral|core|corn|correct|cost|cotton|couch|country|couple|course|cousin|cover|coyote|crack|cradle|craft|cram|crane|crash|crater|crawl|crazy|cream|credit|creek|crew|cricket|crime|crisp|critic|crop|cross|crouch|crowd|crucial|cruel|cruise|crumble|crunch|crush|cry|crystal|cube|culture|cup|cupboard|curious|current|curtain|curve|cushion|custom|cute|cycle|dad|damage|damp|dance|danger|daring|dash|daughter|dawn|day|deal|debate|debris|decade|december|decide|decline|decorate|decrease|deer|defense|define|defy|degree|delay|deliver|demand|demise|denial|dentist|deny|depart|depend|deposit|depth|deputy|derive|describe|desert|design|desk|despair|destroy|detail|detect|develop|device|devote|diagram|dial|diamond|diary|dice|diesel|diet|differ|digital|dignity|dilemma|dinner|dinosaur|direct|dirt|disagree|discover|disease|dish|dismiss|disorder|display|distance|divert|divide|divorce|dizzy|doctor|document|dog|doll|dolphin|domain|donate|donkey|donor|door|dose|double|dove|draft|dragon|drama|drastic|draw|dream|dress|drift|drill|drink|drip|drive|drop|drum|dry|duck|dumb|dune|during|dust|dutch|duty|dwarf|dynamic|eager|eagle|early|earn|earth|easily|east|easy|echo|ecology|economy|edge|edit|educate|effort|egg|eight|either|elbow|elder|electric|elegant|element|elephant|elevator|elite|else|embark|embody|embrace|emerge|emotion|employ|empower|empty|enable|enact|end|endless|endorse|enemy|energy|enforce|engage|engine|enhance|enjoy|enlist|enough|enrich|enroll|ensure|enter|entire|entry|envelope|episode|equal|equip|era|erase|erode|erosion|error|erupt|escape|essay|essence|estate|eternal|ethics|evidence|evil|evoke|evolve|exact|example|excess|exchange|excite|exclude|excuse|execute|exercise|exhaust|exhibit|exile|exist|exit|exotic|expand|expect|expire|explain|expose|express|extend|extra|eye|eyebrow|fabric|face|faculty|fade|faint|faith|fall|false|fame|family|famous|fan|fancy|fantasy|farm|fashion|fat|fatal|father|fatigue|fault|favorite|feature|february|federal|fee|feed|feel|female|fence|festival|fetch|fever|few|fiber|fiction|field|figure|file|film|filter|final|find|fine|finger|finish|fire|firm|first|fiscal|fish|fit|fitness|fix|flag|flame|flash|flat|flavor|flee|flight|flip|float|flock|floor|flower|fluid|flush|fly|foam|focus|fog|foil|fold|follow|food|foot|force|forest|forget|fork|fortune|forum|forward|fossil|foster|found|fox|fragile|frame|frequent|fresh|friend|fringe|frog|front|frost|frown|frozen|fruit|fuel|fun|funny|furnace|fury|future|gadget|gain|galaxy|gallery|game|gap|garage|garbage|garden|garlic|garment|gas|gasp|gate|gather|gauge|gaze|general|genius|genre|gentle|genuine|gesture|ghost|giant|gift|giggle|ginger|giraffe|girl|give|glad|glance|glare|glass|glide|glimpse|globe|gloom|glory|glove|glow|glue|goat|goddess|gold|good|goose|gorilla|gospel|gossip|govern|gown|grab|grace|grain|grant|grape|grass|gravity|great|green|grid|grief|grit|grocery|group|grow|grunt|guard|guess|guide|guilt|guitar|gun|gym|habit|hair|half|hammer|hamster|hand|happy|harbor|hard|harsh|harvest|hat|have|hawk|hazard|head|health|heart|heavy|hedgehog|height|hello|helmet|help|hen|hero|hidden|high|hill|hint|hip|hire|history|hobby|hockey|hold|hole|holiday|hollow|home|honey|hood|hope|horn|horror|horse|hospital|host|hotel|hour|hover|hub|huge|human|humble|humor|hundred|hungry|hunt|hurdle|hurry|hurt|husband|hybrid|ice|icon|idea|identify|idle|ignore|ill|illegal|illness|image|imitate|immense|immune|impact|impose|improve|impulse|inch|include|income|increase|index|indicate|indoor|industry|infant|inflict|inform|inhale|inherit|initial|inject|injury|inmate|inner|innocent|input|inquiry|insane|insect|inside|inspire|install|intact|interest|into|invest|invite|involve|iron|island|isolate|issue|item|ivory|jacket|jaguar|jar|jazz|jealous|jeans|jelly|jewel|job|join|joke|journey|joy|judge|juice|jump|jungle|junior|junk|just|kangaroo|keen|keep|ketchup|key|kick|kid|kidney|kind|kingdom|kiss|kit|kitchen|kite|kitten|kiwi|knee|knife|knock|know|lab|label|labor|ladder|lady|lake|lamp|language|laptop|large|later|latin|laugh|laundry|lava|law|lawn|lawsuit|layer|lazy|leader|leaf|learn|leave|lecture|left|leg|legal|legend|leisure|lemon|lend|length|lens|leopard|lesson|letter|level|liar|liberty|library|license|life|lift|light|like|limb|limit|link|lion|liquid|list|little|live|lizard|load|loan|lobster|local|lock|logic|lonely|long|loop|lottery|loud|lounge|love|loyal|lucky|luggage|lumber|lunar|lunch|luxury|lyrics|machine|mad|magic|magnet|maid|mail|main|major|make|mammal|man|manage|mandate|mango|mansion|manual|maple|marble|march|margin|marine|market|marriage|mask|mass|master|match|material|math|matrix|matter|maximum|maze|meadow|mean|measure|meat|mechanic|medal|media|melody|melt|member|memory|mention|menu|mercy|merge|merit|merry|mesh|message|metal|method|middle|midnight|milk|million|mimic|mind|minimum|minor|minute|miracle|mirror|misery|miss|mistake|mix|mixed|mixture|mobile|model|modify|mom|moment|monitor|monkey|monster|month|moon|moral|more|morning|mosquito|mother|motion|motor|mountain|mouse|move|movie|much|muffin|mule|multiply|muscle|museum|mushroom|music|must|mutual|myself|mystery|myth|naive|name|napkin|narrow|nasty|nation|nature|near|neck|need|negative|neglect|neither|nephew|nerve|nest|net|network|neutral|never|news|next|nice|night|noble|noise|nominee|noodle|normal|north|nose|notable|note|nothing|notice|novel|now|nuclear|number|nurse|nut|oak|obey|object|oblige|obscure|observe|obtain|obvious|occur|ocean|october|odor|off|offer|office|often|oil|okay|old|olive|olympic|omit|once|one|onion|online|only|open|opera|opinion|oppose|option|orange|orbit|orchard|order|ordinary|organ|orient|original|orphan|ostrich|other|outdoor|outer|output|outside|oval|oven|over|own|owner|oxygen|oyster|ozone|pact|paddle|page|pair|palace|palm|panda|panel|panic|panther|paper|parade|parent|park|parrot|party|pass|patch|path|patient|patrol|pattern|pause|pave|payment|peace|peanut|pear|peasant|pelican|pen|penalty|pencil|people|pepper|perfect|permit|person|pet|phone|photo|phrase|physical|piano|picnic|picture|piece|pig|pigeon|pill|pilot|pink|pioneer|pipe|pistol|pitch|pizza|place|planet|plastic|plate|play|please|pledge|pluck|plug|plunge|poem|poet|point|polar|pole|police|pond|pony|pool|popular|portion|position|possible|post|potato|pottery|poverty|powder|power|practice|praise|predict|prefer|prepare|present|pretty|prevent|price|pride|primary|print|priority|prison|private|prize|problem|process|produce|profit|program|project|promote|proof|property|prosper|protect|proud|provide|public|pudding|pull|pulp|pulse|pumpkin|punch|pupil|puppy|purchase|purity|purpose|purse|push|put|puzzle|pyramid|quality|quantum|quarter|question|quick|quit|quiz|quote|rabbit|raccoon|race|rack|radar|radio|rail|rain|raise|rally|ramp|ranch|random|range|rapid|rare|rate|rather|raven|raw|razor|ready|real|reason|rebel|rebuild|recall|receive|recipe|record|recycle|reduce|reflect|reform|refuse|region|regret|regular|reject|relax|release|relief|rely|remain|remember|remind|remove|render|renew|rent|reopen|repair|repeat|replace|report|require|rescue|resemble|resist|resource|response|result|retire|retreat|return|reunion|reveal|review|reward|rhythm|rib|ribbon|rice|rich|ride|ridge|rifle|right|rigid|ring|riot|ripple|risk|ritual|rival|river|road|roast|robot|robust|rocket|romance|roof|rookie|room|rose|rotate|rough|round|route|royal|rubber|rude|rug|rule|run|runway|rural|sad|saddle|sadness|safe|sail|salad|salmon|salon|salt|salute|same|sample|sand|satisfy|satoshi|sauce|sausage|save|say|scale|scan|scare|scatter|scene|scheme|school|science|scissors|scorpion|scout|scrap|screen|script|scrub|sea|search|season|seat|second|secret|section|security|seed|seek|segment|select|sell|seminar|senior|sense|sentence|series|service|session|settle|setup|seven|shadow|shaft|shallow|share|shed|shell|sheriff|shield|shift|shine|ship|shiver|shock|shoe|shoot|shop|short|shoulder|shove|shrimp|shrug|shuffle|shy|sibling|sick|side|siege|sight|sign|silent|silk|silly|silver|similar|simple|since|sing|siren|sister|situate|six|size|skate|sketch|ski|skill|skin|skirt|skull|slab|slam|sleep|slender|slice|slide|slight|slim|slogan|slot|slow|slush|small|smart|smile|smoke|smooth|snack|snake|snap|sniff|snow|soap|soccer|social|sock|soda|soft|solar|soldier|solid|solution|solve|someone|song|soon|sorry|sort|soul|sound|soup|source|south|space|spare|spatial|spawn|speak|special|speed|spell|spend|sphere|spice|spider|spike|spin|spirit|split|spoil|sponsor|spoon|sport|spot|spray|spread|spring|spy|square|squeeze|squirrel|stable|stadium|staff|stage|stairs|stamp|stand|start|state|stay|steak|steel|stem|step|stereo|stick|still|sting|stock|stomach|stone|stool|story|stove|strategy|street|strike|strong|struggle|student|stuff|stumble|style|subject|submit|subway|success|such|sudden|suffer|sugar|suggest|suit|summer|sun|sunny|sunset|super|supply|supreme|sure|surface|surge|surprise|surround|survey|suspect|sustain|swallow|swamp|swap|swarm|swear|sweet|swift|swim|swing|switch|sword|symbol|symptom|syrup|system|table|tackle|tag|tail|talent|talk|tank|tape|target|task|taste|tattoo|taxi|teach|team|tell|ten|tenant|tennis|tent|term|test|text|thank|that|theme|then|theory|there|they|thing|this|thought|three|thrive|throw|thumb|thunder|ticket|tide|tiger|tilt|timber|time|tiny|tip|tired|tissue|title|toast|tobacco|today|toddler|toe|together|toilet|token|tomato|tomorrow|tone|tongue|tonight|tool|tooth|top|topic|topple|torch|tornado|tortoise|toss|total|tourist|toward|tower|town|toy|track|trade|traffic|tragic|train|transfer|trap|trash|travel|tray|treat|tree|trend|trial|tribe|trick|trigger|trim|trip|trophy|trouble|truck|true|truly|trumpet|trust|truth|try|tube|tuition|tumble|tuna|tunnel|turkey|turn|turtle|twelve|twenty|twice|twin|twist|two|type|typical|ugly|umbrella|unable|unaware|uncle|uncover|under|undo|unfair|unfold|unhappy|uniform|unique|unit|universe|unknown|unlock|until|unusual|unveil|update|upgrade|uphold|upon|upper|upset|urban|urge|usage|use|used|useful|useless|usual|utility|vacant|vacuum|vague|valid|valley|valve|van|vanish|vapor|various|vast|vault|vehicle|velvet|vendor|venture|venue|verb|verify|version|very|vessel|veteran|viable|vibrant|vicious|victory|video|view|village|vintage|violin|virtual|virus|visa|visit|visual|vital|vivid|vocal|voice|void|volcano|volume|vote|voyage|wage|wagon|wait|walk|wall|walnut|want|warfare|warm|warrior|wash|wasp|waste|water|wave|way|wealth|weapon|wear|weasel|weather|web|wedding|weekend|weird|welcome|west|wet|whale|what|wheat|wheel|when|where|whip|whisper|wide|width|wife|wild|will|win|window|wine|wing|wink|winner|winter|wire|wisdom|wise|wish|witness|wolf|woman|wonder|wood|wool|word|work|world|worry|worth|wrap|wreck|wrestle|wrist|write|wrong|yard|year|yellow|you|young|youth|zebra|zero|zone|zoo`.split(`|`),Br=`Invalid mnemonic`,Vr=`Invalid entropy`,Hr=`Invalid mnemonic checksum`;function Ur(e){return(e||``).normalize(`NFKD`)}function Wr(e){return Number.parseInt(e,2)}function Gr(e){return e.map(e=>e.toString(2).padStart(8,`0`)).join(``)}function Kr(e){return Gr(Array.from(Rr(e))).slice(0,e.length*8/32)}function qr(e,t=zr){let n=Ur(e).split(` `);if(n.length%3!=0)throw Error(Br);let r=n.map(e=>{let n=t.indexOf(e);if(n===-1)throw Error(Br);return n.toString(2).padStart(11,`0`)}).join(``),i=Math.floor(r.length/33)*32,a=r.slice(0,i),o=r.slice(i),s=a.match(/(.{1,8})/g)?.map(Wr);if(!s||s.length%4!=0||s.length<16||s.length>32)throw Error(Vr);let c=x(s);if(Kr(c)!==o)throw Error(Hr);return c}function Jr(e,t=zr){if(e.length%4!=0||e.length<16||e.length>32)throw Error(Vr);let n=`${Gr(Array.from(e))}${Kr(e)}`.match(/(.{1,11})/g)?.map(e=>t[Wr(e)]);if(!n||n.length<12)throw Error(`Unable to map entropy to mnemonic`);return n.join(` `)}function Yr(e,t){try{qr(e,t)}catch{return!1}return!0}function Xr(e,t,n){return qr(e,t)}function Zr(e,t){return Yr(e,t)}function Qr(e,t=``,n,r){if(!Zr(e,n))throw Error(`Invalid bip39 mnemonic specified`);return Ir(Xr(e,n),b(`mnemonic${t}`)).password.slice(0,32)}function $r(e){let t=x(e);if(t.length!==32)throw Error(`Expected a seed of 32 bytes, found ${t.length}`);let n=Pr(t),r=B(n.subarray(0,32))>>3n,i=Hn.Point.BASE.multiply(r).toBytes();return{publicKey:new Uint8Array(i),secretKey:new Uint8Array(n)}}self.addEventListener(`message`,async e=>{let{taskId:t,task:n,data:r}=e.data;try{let e;switch(n){case`test`:e=`ready`;break;case`entropyToMnemonic`:if(!r.entropy)throw Error(`Entropy data is required`);e=Jr(r.entropy);break;case`entropyToKeypair`:if(!r.entropy)throw Error(`Entropy data is required`);e=ei(r.entropy);break;default:throw Error(`Unknown task: ${n}`)}let i={taskId:t,result:e};self.postMessage(i)}catch(e){let n={taskId:t,error:e instanceof Error?e.message:`Unknown error`};self.postMessage(n)}});function ei(e){let t=Jr(e),{publicKey:n,secretKey:r}=$r(Qr(t));return{mnemonic:t,publicKey:n,secretKey:r}}})();";
|
|
2
|
+
var jsContent = "(function(){function e(e){return e(`return this`)}let t=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:e(Function);function n(e,n){return t[e]===void 0?n:t[e]}let r=n(`TextEncoder`,class{encode(e){let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}});function i(e){return typeof e==`function`}function a(){return NaN}let o=n(`BigInt`,a),s=`0123456789abcdef`,c=new Uint8Array(256),l=new Uint8Array(256*256);for(let e=0;e<16;e++)c[s[e].charCodeAt(0)|0]=e|0,e>9&&(c[s[e].toUpperCase().charCodeAt(0)|0]=e|0);for(let e=0;e<256;e++){let t=e<<8;for(let n=0;n<256;n++)l[t|n]=c[e]<<4|c[n]}function u(e,t=-1){if(!e)return new Uint8Array;let n=e.startsWith(`0x`)?2:0,r=Math.ceil((e.length-n)/2),i=Math.ceil(t===-1?r:t/8),a=new Uint8Array(i),o=i>r?i-r:0;for(let t=o;t<i;t++,n+=2)a[t]=l[e.charCodeAt(n)<<8|e.charCodeAt(n+1)];return a}let d=/^0x[\\da-fA-F]+$/;function f(e,t=-1,n){return typeof e==`string`&&(e===`0x`||d.test(e))&&(t===-1?n||e.length%2==0:e.length===2+Math.ceil(t/4))}typeof o==`function`&&o.asIntN;let p=typeof t.Buffer==`function`&&typeof t.Buffer.isBuffer==`function`;t.process;function m(e){return p&&!!e&&i(e.readDoubleLE)&&t.Buffer.isBuffer(e)}function h(e){return(e&&e.constructor)===Uint8Array||e instanceof Uint8Array}let g=new r;function _(e){return e?g.encode(e.toString()):new Uint8Array}function v(e,t=!1){if(t&&e==null)throw Error(`u8aToU8a: Expected non-null, non-undefined value`);return h(e)?m(e)?new Uint8Array(e):e:f(e)?u(e):Array.isArray(e)?new Uint8Array(e):_(e)}\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nfunction y(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function b(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function x(e,...t){if(!y(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function S(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.createHasher`);b(e.outputLen),b(e.blockLen)}function C(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function ee(e,t){x(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function w(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function T(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function E(e,t){return e<<32-t|e>>>t}function D(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function te(e){return typeof e==`string`&&(e=D(e)),x(e),e}function ne(e){return typeof e==`string`&&(e=D(e)),x(e),e}function re(e,t){if(t!==void 0&&{}.toString.call(t)!==`[object Object]`)throw Error(`options should be object or undefined`);return Object.assign(e,t)}var ie=class{};function ae(e){let t=t=>e().update(te(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function oe(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function se(e,t,n){return e&t^~e&n}function ce(e,t,n){return e&t^e&n^t&n}var le=class extends ie{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=T(this.buffer)}update(e){C(this),e=te(e),x(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=T(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){C(this),ee(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,w(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;oe(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=T(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}};let O=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),k=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ue=BigInt(2**32-1),de=BigInt(32);function fe(e,t=!1){return t?{h:Number(e&ue),l:Number(e>>de&ue)}:{h:Number(e>>de&ue)|0,l:Number(e&ue)|0}}function pe(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=fe(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let me=(e,t,n)=>e>>>n,he=(e,t,n)=>e<<32-n|t>>>n,A=(e,t,n)=>e>>>n|t<<32-n,j=(e,t,n)=>e<<32-n|t>>>n,ge=(e,t,n)=>e<<64-n|t>>>n-32,_e=(e,t,n)=>e>>>n-32|t<<64-n;function M(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let ve=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),ye=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,be=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),xe=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Se=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Ce=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0;function we(e){return e(`return this`)}let Te=(typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:we(Function)).crypto;function Ee(e){return Te.getRandomValues(e)}function De(e=32){return Ee(new Uint8Array(e))}var Oe=class extends ie{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,S(e);let n=te(t);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),w(i)}update(e){return C(this),this.iHash.update(e),this}digestInto(e){C(this),x(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let ke=(e,t,n)=>new Oe(e,t).update(n).digest();ke.create=(e,t)=>new Oe(e,t);function Ae(e,t,n,r){S(e);let{c:i,dkLen:a,asyncTick:o}=re({dkLen:32,asyncTick:10},r);if(b(i),b(a),b(o),i<1)throw Error(`iterations (c) should be >= 1`);let s=ne(t),c=ne(n),l=new Uint8Array(a),u=ke.create(e,s);return{c:i,dkLen:a,asyncTick:o,DK:l,PRF:u,PRFSalt:u._cloneInto().update(c)}}function je(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),w(i),n}function Me(e,t,n,r){let{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=Ae(e,t,n,r),l,u=new Uint8Array(4),d=T(u),f=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){let n=o.subarray(t,t+s.outputLen);d.setInt32(0,e,!1),(l=c._cloneInto(l)).update(u).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<i;e++){s._cloneInto(l).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return je(s,c,o,l,f)}let Ne=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),N=new Uint32Array(64);var Pe=class extends le{constructor(e=32){super(64,e,8,!1),this.A=O[0]|0,this.B=O[1]|0,this.C=O[2]|0,this.D=O[3]|0,this.E=O[4]|0,this.F=O[5]|0,this.G=O[6]|0,this.H=O[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)N[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=N[e-15],n=N[e-2],r=E(t,7)^E(t,18)^t>>>3,i=E(n,17)^E(n,19)^n>>>10;N[e]=i+N[e-7]+r+N[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=E(o,6)^E(o,11)^E(o,25),u=l+t+se(o,s,c)+Ne[e]+N[e]|0,d=(E(n,2)^E(n,13)^E(n,22))+ce(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){w(N)}destroy(){this.set(0,0,0,0,0,0,0,0),w(this.buffer)}};let Fe=pe(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),Ie=Fe[0],Le=Fe[1],P=new Uint32Array(80),F=new Uint32Array(80);var Re=class extends le{constructor(e=64){super(128,e,16,!1),this.Ah=k[0]|0,this.Al=k[1]|0,this.Bh=k[2]|0,this.Bl=k[3]|0,this.Ch=k[4]|0,this.Cl=k[5]|0,this.Dh=k[6]|0,this.Dl=k[7]|0,this.Eh=k[8]|0,this.El=k[9]|0,this.Fh=k[10]|0,this.Fl=k[11]|0,this.Gh=k[12]|0,this.Gl=k[13]|0,this.Hh=k[14]|0,this.Hl=k[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)P[n]=e.getUint32(t),F[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=P[e-15]|0,n=F[e-15]|0,r=A(t,n,1)^A(t,n,8)^me(t,n,7),i=j(t,n,1)^j(t,n,8)^he(t,n,7),a=P[e-2]|0,o=F[e-2]|0,s=A(a,o,19)^ge(a,o,61)^me(a,o,6),c=j(a,o,19)^_e(a,o,61)^he(a,o,6),l=be(i,c,F[e-7],F[e-16]),u=xe(l,r,s,P[e-7],P[e-16]);P[e]=u|0,F[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=A(u,d,14)^A(u,d,18)^ge(u,d,41),v=j(u,d,14)^j(u,d,18)^_e(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=Se(_,v,b,Le[e],F[e]),S=Ce(x,g,t,y,Ie[e],P[e]),C=x|0,ee=A(n,r,28)^ge(n,r,34)^ge(n,r,39),w=j(n,r,28)^_e(n,r,34)^_e(n,r,39),T=n&i^n&o^i&o,E=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=M(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let D=ve(C,w,E);n=ye(D,S,ee,T),r=D|0}({h:n,l:r}=M(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=M(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=M(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=M(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=M(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=M(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=M(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=M(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){w(P,F)}destroy(){w(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};let ze=ae(()=>new Pe),Be=ae(()=>new Re);function Ve(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}let He=e=>e?`\"${e}\" `:``;function Ue(e,t=``){if(typeof e!=`number`)throw TypeError(He(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(He(t)+`expected integer >= 0, got `+e);return e}function We(e,t,n=``){if(Ve(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Ue(t,`length`);let r=Ve(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=He(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}let Ge=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,Ke=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function qe(e){if(We(e),Ge)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=Ke[e[n]];return t}function Je(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Ye(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);if(Ge)try{return Uint8Array.fromHex(e)}catch(e){throw e instanceof SyntaxError?RangeError(e.message):e}let t=e.length,n=t/2;if(t%2)throw RangeError(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=Je(e.charCodeAt(i)),a=Je(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw RangeError(`hex string expected, got non-hex character \"`+t+`\" at index `+i)}r[t]=n*16+a}return r}function Xe(e=32){Ue(e,`bytesLength`);let t=typeof globalThis==`object`?globalThis.crypto:null;if(typeof t?.getRandomValues!=`function`)throw Error(`crypto.getRandomValues must be defined`);if(e>65536)throw RangeError(`\"bytesLength\" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nfunction Ze(e,t,n=()=>{}){if(!Array.isArray(e))throw TypeError(`\"${t}\" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}let I=(e,t,n)=>We(e,t,n),Qe=Ue;function L(e,t=`object`){if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(t===`object`?`expected valid options object`:`\"${t}\" expected object, got type=${typeof e}`);return e}function $e(e,t){if(typeof e!=`function`)throw TypeError(`\"${t}\" is invalid: expected function, got ${typeof e}`);return e}let et=qe,tt=e=>Ye(e),nt=Ve,rt=e=>Xe(e),it=BigInt(0),at=BigInt(1),ot=e=>e?`\"${e}\" `:``;function st(e,t=``){if(typeof e!=`boolean`)throw TypeError(ot(t)+`expected boolean, got type=`+typeof e);return e}function ct(e){if(typeof e==`bigint`){if(!R(e))throw RangeError(`positive bigint expected, got `+e)}else Qe(e);return e}function lt(e,t=``){if(typeof e!=`number`){let n=t&&`\"${t}\" `;throw TypeError(n+`expected number, got type=`+typeof e)}if(!Number.isSafeInteger(e)){let n=t&&`\"${t}\" `;throw RangeError(n+`expected safe integer, got `+e)}}function ut(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);return e===``?it:BigInt(`0x`+e)}function dt(e){return ut(qe(e))}function ft(e){return ut(qe(gt(We(e)).reverse()))}function pt(e,t){if(Ue(t),t===0)throw Error(`zero output length is invalid`);e=ct(e);let n=t*2,r=e.toString(16);if(r.length>n)throw RangeError(`number is too large`);return Ye(r.padStart(n,`0`))}function mt(e,t){return pt(e,t).reverse()}function ht(e,t){if(e=I(e),t=I(t),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}function gt(e){return Uint8Array.from(I(e))}function R(e){return typeof e==`bigint`&&it<=e}function _t(e,t,n){return R(e)&&R(t)&&R(n)&&t<=e&&e<n}function vt(e,t,n,r){if(!_t(t,n,r))throw RangeError(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function yt(e){if(e<it)throw Error(`expected non-negative bigint, got `+e);return e===it?0:e.toString(2).length}let bt=e=>(lt(e,`n`),(at<<BigInt(e))-at);function xt(e,t={},n={},r=`object`){L(e,r),L(t,`fields`),L(n,`optFields`);function i(t,n,i){let a=r===`object`?`param \"${String(t)}\"`:`\"${r}.${String(t)}\"`,o=e[t];if(!Object.hasOwn(e,t)&&(i?o!==void 0:n!==`function`))throw TypeError(`${a} is invalid: expected own property`);if(i&&o===void 0)return;let s=typeof o;if(s!==n||o===null)throw TypeError(`${a} is invalid: expected ${n}, got ${s}`)}let a=(e,t)=>Object.entries(e).forEach(([e,n])=>i(e,n,t));a(t,!1),a(n,!0)}let St=()=>{throw Error(`not implemented`)},z=BigInt(0),B=BigInt(1),V=BigInt(2),Ct=BigInt(3),wt=BigInt(4),Tt=BigInt(5),Et=BigInt(7),Dt=BigInt(8),Ot=BigInt(9),kt=BigInt(15),At=BigInt(16),jt=BigInt(`0x10000000000000000`)\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n;function H(e,t){if(t<=z)throw Error(`mod: expected positive modulus, got `+t);let n=e%t;return n>=z?n:t+n}function Mt(e,t,n){if(n<=B)throw Error(`pow: expected modulus > 1, got `+n);if(typeof t!=`bigint`)throw TypeError(`invalid exponent: expected bigint, got `+typeof t);if(t<z)throw Error(`invalid exponent, negatives unsupported`);if(t===z)return B;if(t===B)return e;let r=e%n;if(r<z&&(r+=n),t<jt){let e=B;for(;t>z;)t&B&&(e=e*r%n),r=r*r%n,t>>=B;return e}let i=[];for(;t>z;)i.push(Number(t&kt)),t>>=wt;let a=Array(16);a[0]=B,a[1]=r;for(let e=2;e<16;e++)a[e]=a[e-1]*r%n;let o=a[i[i.length-1]];for(let e=i.length-2;e>=0;e--){o=o*o%n,o=o*o%n,o=o*o%n,o=o*o%n;let t=i[e];t!==0&&(o=o*a[t]%n)}return o}function U(e,t,n){if(n<=B)throw Error(`pow2: expected modulus > 1, got `+n);if(t<z)throw Error(`pow2: expected non-negative exponent, got `+t);let r=e;for(;t-->z;)r*=r,r%=n;return r}function Nt(e,t){if(e===z)throw Error(`invert: expected non-zero number`);if(t<=B)throw Error(`invert: expected modulus > 1, got `+t);let n=H(e,t),r=t,i=z,a=B;for(;n!==z;){let e=r/n,t=r-n*e,o=i-a*e;r=n,n=t,i=a,a=o}if(r!==B)throw Error(`invert: does not exist`);return H(i,t)}function Pt(e,t,n){let r=e;if(!r.eql(r.sqr(t),n))throw Error(`Cannot find square root`)}function Ft(e,t){if((e&B)===z)throw Error(t+`: expected odd modulus, got `+e)}function It(e,t){let n=e,r=(n.ORDER+B)/wt,i=n.pow(t,r);return Pt(n,i,t),i}function Lt(e,t){let n=e,r=(n.ORDER-Tt)/Dt,i=n.mul(t,V),a=n.pow(i,r),o=n.mul(t,a),s=n.mul(n.mul(o,V),a),c=n.mul(o,n.sub(s,n.ONE));return Pt(n,c,t),c}function Rt(e){let t=Jt(e),n=zt(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+Et)/At;return((e,t)=>{let n=e,s=n.pow(t,o),c=n.mul(s,r),l=n.mul(s,i),u=n.mul(s,a),d=n.eql(n.sqr(c),t),f=n.eql(n.sqr(l),t);s=n.cmov(s,c,d),c=n.cmov(u,l,f);let p=n.eql(n.sqr(c),t),m=n.cmov(s,c,p);return Pt(n,m,t),m})}function zt(e){if(e<Ct)throw Error(`sqrt is not defined for small field`);Ft(e,`tonelliShanks`);let t=e-B,n=0;for(;t%V===z;)t/=V,n++;let r=V,i=Jt(e);for(;Wt(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return It;let a=i.pow(r,t),o=(t+B)/V;return function(e,r){let i=e;if(i.is0(r))return r;if(Wt(i,r)!==1)throw Error(`Cannot find square root`);let s=n,c=i.mul(i.ONE,a),l=i.pow(r,t),u=i.pow(r,o);for(;!i.eql(l,i.ONE);){if(i.is0(l))throw Error(`Cannot find square root: probably non-prime P`);let e=1,t=i.sqr(l);for(;!i.eql(t,i.ONE);)if(e++,t=i.sqr(t),e===s)throw Error(`Cannot find square root`);let n=B<<BigInt(s-e-1),r=i.pow(c,n);s=e,c=i.sqr(r),l=i.mul(l,c),u=i.mul(u,r)}return u}}function Bt(e){return Ft(e,`Fp.sqrt`),e%wt===Ct?It:e%Dt===Tt?Lt:e%At===Ot?Rt(e):zt(e)}let Vt=(e,t)=>(H(e,t)&B)===B,Ht=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function W(e){if(L(e,`field`),typeof e.ORDER!=`bigint`)throw TypeError(`param \"ORDER\" is invalid: expected bigint, got `+typeof e.ORDER);lt(e.BYTES,`BYTES`),lt(e.BITS,`BITS`);for(let t of Ht)$e(e[t],`field.`+t);if(e.BYTES<1||e.BITS<1)throw Error(`invalid field: expected BYTES/BITS > 0`);if(e.ORDER<=B)throw Error(`invalid field: expected ORDER > 1, got `+e.ORDER);return e}function Ut(e,t,n=!1){W(e),Ze(t,`nums`),st(n,`passZero`);let r=e,i=Array(t.length).fill(n?r.ZERO:void 0),a=t.reduce((e,t,n)=>r.is0(t)?e:(i[n]=e,r.mul(e,t)),r.ONE),o=r.inv(a);return t.reduceRight((e,t,n)=>r.is0(t)?e:(i[n]=r.mul(e,i[n]),r.mul(e,t)),o),i}function Wt(e,t){W(e);let n=e;Ft(n.ORDER,`FpLegendre`);let r=(n.ORDER-B)/V,i=n.pow(t,r),a=n.eql(i,n.ONE),o=n.eql(i,n.ZERO),s=n.eql(i,n.neg(n.ONE));if(!a&&!o&&!s)throw Error(`invalid Legendre symbol result`);return a?1:o?0:-1}function Gt(e,t){if(t!==void 0&&Qe(t),e<=z)throw Error(`invalid n length: expected positive n, got `+e);if(t!==void 0&&t<1)throw Error(`invalid n length: expected positive bit length, got `+t);let n=yt(e);if(t!==void 0&&t<n)throw Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);let r=t===void 0?n:t;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}let Kt=new WeakMap;var qt=class{ORDER;BITS;BYTES;isLE;ZERO=z;ONE=B;_lengths;_mod;constructor(e,t={}){if(e<=B)throw Error(`invalid field: expected ORDER > 1, got `+e);let n;this.isLE=!1,typeof t==`object`&&t&&(typeof t.BITS==`number`&&(n=t.BITS),typeof t.sqrt==`function`&&Object.defineProperty(this,\"sqrt\",{value:t.sqrt,enumerable:!0}),typeof t.isLE==`boolean`&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),typeof t.modFromBytes==`boolean`&&(this._mod=t.modFromBytes));let{nBitLength:r,nByteLength:i}=Gt(e,n);if(i>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);this.ORDER=e,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(e){return H(e,this.ORDER)}isValid(e){if(typeof e!=`bigint`)throw TypeError(`invalid field element: expected bigint, got `+typeof e);return z<=e&&e<this.ORDER}is0(e){return e===z}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&B)===B}neg(e){return H(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return H(e*e,this.ORDER)}add(e,t){return H(e+t,this.ORDER)}sub(e,t){return H(e-t,this.ORDER)}mul(e,t){return H(e*t,this.ORDER)}pow(e,t){return Mt(e,t,this.ORDER)}div(e,t){return H(e*Nt(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return Nt(e,this.ORDER)}sqrt(e){let t=Kt.get(this);return t||Kt.set(this,t=Bt(this.ORDER)),t(this,e)}toBytes(e){return this.isLE?mt(e,this.BYTES):pt(e,this.BYTES)}fromBytes(e,t=!1){I(e);let{_lengths:n,BYTES:r,isLE:i,ORDER:a,_mod:o}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>r)throw Error(`Field.fromBytes: expected `+n+` bytes, got `+e.length);let t=new Uint8Array(r);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==r)throw Error(`Field.fromBytes: expected `+r+` bytes, got `+e.length);let s=i?ft(e):dt(e);if(o&&(s=H(s,a)),!t&&!this.isValid(s))throw Error(`invalid field element: outside of range 0..ORDER`);return s}invertBatch(e){return Ut(this,e,!0)}cmov(e,t,n){return st(n,`condition`),n?t:e}};function Jt(e,t={}){return Object.freeze(qt.prototype),new qt(e,t)}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nlet Yt=BigInt(0),G=BigInt(1),Xt=BigInt(4),Zt=2**31;function Qt(e){let t=e;if(typeof t!=`function`)throw TypeError(`\"Point\" expected constructor, got type=`+typeof e);$e(t.fromAffine,`Point.fromAffine`),$e(t.fromBytes,`Point.fromBytes`),$e(t.fromHex,`Point.fromHex`),L(t.BASE,`Point.BASE`),L(t.ZERO,`Point.ZERO`),W(t.Fp),W(t.Fn)}function $t(e,t){Qt(e),rn(t,e);let n=Ut(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function en(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw Error(`invalid window size, expected [`+n+`..`+t+`], got W=`+e)}function tn(e,t){let n=e*(4*t+128);if(n>Zt)throw Error(`invalid window size: table would need ~`+Math.ceil(n/2**20)+` MiB, max `+Zt/2**20+` MiB`)}function nn(e,t){if(e!==void 0){$e(e,`randomBytes`);try{let n=e(t);if(!nt(n)||n.length!==t)return}catch{return}return e}}function rn(e,t){Ze(e,`points`),e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function an(e,t,n){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,r)=>{if(!(n===void 0?t.isValid(e):R(e)&&e<n))throw Error(`invalid scalar at index `+r)})}let on=new WeakMap;function sn(e){return on.get(e)||1}function cn(e,t){let n=e.double(),r=[e];for(let e=1;e<t;e++)r.push(r[e-1].add(n));return r}function ln(e,t){let n=2**t,r=n/2,i=BigInt(n-1),a=[];for(;e>Yt;){let t=0;e&G&&(t=Number(e&i),t>=r&&(t-=n),e-=BigInt(t)),a.push(t),e>>=G}return a}function un(e,t,n){let r=2**t,i=r/2,a=BigInt(r-1),o=BigInt(t),s=[];for(let t=0;t<n;t++){let t=Number(e&a);e>>=o,t>i&&(t-=r,e+=G),s.push(t)}if(e!==Yt)throw Error(`invalid wnaf`);return s}function dn(e,t,n){let r=0;for(let e of n)r=Math.max(r,e.length);let i=e;for(let e=r-1;e>=0;e--){e!==r-1&&(i=i.double());for(let r=0;r<n.length;r++){let a=n[r][e];if(a){let e=t[r][Math.abs(a)-1>>1];i=i.add(a<0?e.negate():e)}}}return i}var fn=class{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(e,t){Qt(e),this.randomBytes=nn(t,16),this.Point=e,this.BASE=e.BASE,this.ZERO=e.ZERO,this.bits=e.Fn.BITS}buildWnafTable(e,t,n){let r=Math.ceil(n/t)+1,i=2**(t-1),a=[],o=e;for(let e=0;e<r;e++){let e=o;for(let t=0;t<i;t++)a.push(e),e=e.add(o);o=a[a.length-1].double()}return{W:t,bits:n,windows:r,comp:a}}wnafCachedCT(e,t){let{W:n,windows:r,comp:i}=e,a=2**(n-1),o=un(t,n,r),s=this.ZERO,c=this.BASE;for(let e=0;e<r;e++){let t=o[e],n=e*a,r=Math.abs(t)-1,l=i[n];for(let e=1;e<a;e++)l=e===r?i[n+e]:l;let u=l.negate();t===0?c=c.add(i[n]):s=s.add(t<0?u:l)}return{p:s,f:c}}getWnafPrecomputes(e,t,n,r){let i=this.wnafPrecomputes.get(t),a=i?.find(t=>t.W===e&&t.bits===n);return a||(a=this.buildWnafTable(t,e,n),typeof r==`function`&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(t,i)),i.push(a)),a}assertPoint(e){if(!(e instanceof this.Point))throw TypeError(`\"point\" expected Point instance, got type=`+typeof e)}validateMulInput(e,t){if(this.assertPoint(e),!_t(t,G,this.Point.Fn.ORDER))throw Error(`invalid scalar`)}runCT(e,t,n,r){let i=sn(e);return i===1?this.fixedWindowCT(e,t,n):this.wnafCachedCT(this.getWnafPrecomputes(i,e,n,r),t)}mulCT(e,t,n){return this.validateMulInput(e,t),this.runCT(e,t,this.bits,n)}mulCTBlinded(e,t,n){if(this.validateMulInput(e,t),this.randomBytes===void 0)throw Error(`randomBytes is required for scalar blinding`);let r=this.Point.Fn.BITS+128,i=this.randomBytes(16);if(!nt(i)||i.length!==16)throw Error(`randomBytes returned invalid byte array`);i[0]=i[0]&63|128;let a=t+dt(i)*this.Point.Fn.ORDER;return this.runCT(e,a,r,n)}fixedWindowCT(e,t,n){let r=bt(5),i=Array(32);i[0]=this.ZERO;for(let t=1;t<32;t++)i[t]=i[t-1].add(e);let a=Math.ceil(n/5),o=this.ZERO;for(let e=a-1;e>=0;e--){if(e!==a-1)for(let e=0;e<5;e++)o=o.double();let n=Number(t>>BigInt(e*5)&r),s=i[0];for(let e=1;e<32;e++)s=e===n?i[e]:s;o=o.add(s)}return{p:o,f:o}}shouldBlind(e,t){return this.randomBytes===void 0?!1:t===G?!0:e===this.BASE?(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded):!1}mulSecret(e,t,n,r){return this.shouldBlind(e,n)?this.mulCTBlinded(e,t,r):this.mulCT(e,t,r)}mulUnsafe(e,t,n){if(this.assertPoint(e),!R(t))throw Error(`invalid scalar`);let r=sn(e);if(r===1||t>=this.Point.Fn.ORDER)return pn(this.Point,[e],[t],!0);let i=this.getWnafPrecomputes(r,e,this.bits,n);return this.wnafCachedCT(i,t).p}setWindowSize(e,t){this.assertPoint(e),en(t,this.bits),tn((Math.ceil((this.bits+128)/t)+1)*2**(t-1),this.Point.Fp.BYTES),on.set(e,t),this.wnafPrecomputes.delete(e)}hasWindowSize(e){return sn(e)!==1}};function pn(e,t,n,r=!1){if(Qt(e),rn(t,e),st(r,`allowOversized`),an(n,e.Fn,r?e.Fn.ORDER**Xt:void 0),t.length!==n.length)throw Error(`arrays of points and scalars must have equal length`);let i=t.map(e=>cn(e,4)),a=n.map(e=>ln(e,4));return dn(e.ZERO,i,a)}function mn(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return W(t),t}else return Jt(e,{isLE:n})}function hn(e,t,n={},r){if(e!==`weierstrass`&&e!==`edwards`)throw Error(`expected curve type \"weierstrass\" or \"edwards\"`);if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);xt(n);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(R(n)&&n!==Yt))throw Error(`CURVE.${e} must be positive bigint`)}let i=mn(t.p,n.Fp,r),a=mn(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nlet gn=BigInt(0),_n=BigInt(1),vn=BigInt(2),yn=BigInt(4),bn=BigInt(8);function xn(e,t,n,r){let i=e.sqr(n),a=e.sqr(r),o=e.add(e.mul(t.a,i),a),s=e.add(e.ONE,e.mul(t.d,e.mul(i,a)));return e.eql(o,s)}function Sn(e,t={}){xt(t,{},{},`extraOpts`);let n=t,r=hn(`edwards`,e,n,n.FpFnLE),{Fp:i,Fn:a}=r,o=r.CURVE,{h:s}=o;if(Wt(i,o.a)!==1)throw Error(`edwards: CURVE.a must be a square in Fp for complete addition formulas`);if(Wt(i,o.d)!==-1)throw Error(`edwards: CURVE.d must be a non-square in Fp for complete addition formulas`);xt(n,{},{uvRatio:`function`,randomBytes:`function`});let c=n.randomBytes===void 0?rt:n.randomBytes,l=vn<<BigInt(i.BYTES*8)-_n;function u(e){if(!i.isOdd)throw Error(`Field does not have .isOdd()`);return i.isOdd(e)}let d=n.uvRatio===void 0?(e,t)=>{try{return{isValid:!0,value:i.sqrt(i.div(e,t))}}catch{return{isValid:!1,value:gn}}}:n.uvRatio;if(!xn(i,o,o.Gx,o.Gy))throw Error(`bad curve params: generator point`);let f=i.eql(o.a,i.neg(i.ONE))?e=>i.neg(e):i.eql(o.a,i.ONE)?e=>e:e=>i.mul(o.a,e);function p(e,t,n=!1){let r=n?_n:gn;return vt(`coordinate `+e,t,r,l),t}function m(e){if(!(e instanceof h))throw Error(`EdwardsPoint expected`)}class h{static BASE=new h(o.Gx,o.Gy,i.ONE,i.mul(o.Gx,o.Gy));static ZERO=new h(i.ZERO,i.ONE,i.ONE,i.ZERO);static Fp=i;static Fn=a;X;Y;Z;T;constructor(e,t,n,r){this.X=p(`x`,e),this.Y=p(`y`,t),this.Z=p(`z`,n,!0),this.T=p(`t`,r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){if(e instanceof h)throw Error(`extended point not allowed`);let{x:t,y:n}=e||{};return p(`x`,t),p(`y`,n),new h(t,n,i.ONE,i.mul(t,n))}static fromBytes(e,t=!1){let n=i.BYTES,{a:r,d:a}=o;e=gt(I(e,n,`point`)),st(t,`zip215`);let s=gt(e),c=e[n-1];s[n-1]=c&-129;let f=ft(s),p=t?l:i.ORDER;vt(`point.y`,f,gn,p);let m=i.sqr(f),g=i.sub(m,i.ONE),_=i.sub(i.mulN(a,m),r),{isValid:v,value:y}=d(g,_);if(!v)throw Error(`bad point: invalid y coordinate`);let b=u(y),x=(c&128)!=0;if(!t&&i.is0(y)&&x)throw Error(`bad point: x=0 and x_0=1`);return x!==b&&(y=i.neg(y)),h.fromAffine({x:y,y:f})}static fromHex(e,t=!1){return h.fromBytes(tt(e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=6,t=!0){return _.setWindowSize(this,e),t||this.multiply(vn),this}assertValidity(){let e=this,{a:t,d:n}=o;if(e.is0())throw Error(`bad point: ZERO`);let{X:r,Y:a,Z:s,T:c}=e,l=i.sqr(r),u=i.sqr(a),d=i.sqr(s),f=i.sqr(d),p=i.mul(l,t),m=i.mul(i.add(p,u),d),h=i.add(f,i.mul(n,i.mul(l,u)));if(!i.eql(m,h))throw Error(`bad point: equation left != right (1)`);let g=i.mul(r,a),_=i.mul(s,c);if(!i.eql(g,_))throw Error(`bad point: equation left != right (2)`)}equals(e){m(e);let{X:t,Y:n,Z:r}=this,{X:a,Y:o,Z:s}=e,c=i.mul(t,s),l=i.mul(a,r),u=i.mul(n,s),d=i.mul(o,r);return i.eql(c,l)&&i.eql(u,d)}is0(){return this.equals(h.ZERO)}negate(){return new h(i.neg(this.X),this.Y,this.Z,i.neg(this.T))}double(){let{X:e,Y:t,Z:n}=this,r=i.sqr(e),a=i.sqr(t),o=i.mul(i.sqr(n),vn),s=f(r),c=i.addN(e,t),l=i.sub(i.subN(i.sqr(c),r),a),u=i.addN(s,a),d=i.subN(u,o),p=i.subN(s,a),m=i.mul(l,d),g=i.mul(u,p),_=i.mul(l,p),v=i.mul(d,u);return new h(m,g,v,_)}add(e){m(e);let{d:t}=o,{X:n,Y:r,Z:a,T:s}=this,{X:c,Y:l,Z:u,T:d}=e,p=i.mul(n,c),g=i.mul(r,l),_=i.mul(i.mulN(s,t),d),v=i.mul(a,u),y=i.sub(i.subN(i.mulN(i.addN(n,r),i.addN(c,l)),p),g),b=i.subN(v,_),x=i.addN(v,_),S=i.sub(g,f(p)),C=i.mul(y,b),ee=i.mul(x,S),w=i.mul(y,S),T=i.mul(b,x);return new h(C,ee,T,w)}subtract(e){return m(e),this.add(e.negate())}multiply(e){if(!a.isValidNot0(e))throw RangeError(`invalid scalar: expected 1 <= sc < curve.n`);let{p:t,f:n}=_.mulSecret(this,e,s,g);return g([t,n])[0]}multiplyUnsafe(e){if(!a.isValid(e))throw RangeError(`invalid scalar: expected 0 <= sc < curve.n`);return e===gn?h.ZERO:this.is0()||e===_n?this:_.mulUnsafe(this,e,g)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return _.mulUnsafe(this,o.n).is0()}toAffine(e){let t=this,n=e;if(n!=null&&typeof n!=`bigint`)throw TypeError(`\"invertedZ\" expected bigint, got type=`+typeof n);let{X:r,Y:a,Z:o}=t,s=t.is0();n??=s?i.create(bn):i.inv(o);let c=i.mul(r,n),l=i.mul(a,n),u=i.mul(o,n);if(s)return{x:i.ZERO,y:i.ONE};if(!i.eql(u,i.ONE))throw Error(`invZ was invalid`);return{x:c,y:l}}clearCofactor(){return s===_n?this:s===vn?this.double():s===yn?this.double().double():s===bn?this.double().double().double():this.multiplyUnsafe(s)}toBytes(){let{x:e,y:t}=this.toAffine(),n=i.toBytes(t);return n[n.length-1]|=u(e)?128:0,n}toHex(){return et(this.toBytes())}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}}let g=e=>$t(h,e),_=new fn(h,c);return _.bits>=6&&h.BASE.precompute(6),Object.freeze(h.prototype),Object.freeze(h),h}var Cn=class{static BASE;static ZERO;static Fp;static Fn;ep;constructor(e){this.ep=e}static fromBytes(e){St()}static fromHex(e){St()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return et(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.ep.precompute(e,t),this}};let wn=BigInt(1),Tn=BigInt(2),En=BigInt(5),Dn=BigInt(8),On=BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed`),kn={p:On,n:BigInt(`0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed`),h:Dn,a:BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec`),d:BigInt(`0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3`),Gx:BigInt(`0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a`),Gy:BigInt(`0x6666666666666666666666666666666666666666666666666666666666666658`)}\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n;function An(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),a=On,o=e*e%a*e%a,s=U(U(o,Tn,a)*o%a,wn,a)*e%a,c=U(s,En,a)*s%a,l=U(c,t,a)*c%a,u=U(l,n,a)*l%a,d=U(u,r,a)*u%a;return{pow_p_5_8:U(U(U(U(d,i,a)*d%a,i,a)*d%a,t,a)*c%a,Tn,a)*e%a,b2:o}}let jn=BigInt(`19681161376707505956807079304988542015446066515923890162744021073123829784752`);function Mn(e,t){let n=On,r=H(t*t*t,n),i=An(e*H(r*r*t,n)).pow_p_5_8,a=H(e*r*i,n),o=H(t*a*a,n),s=a,c=H(a*jn,n),l=o===e,u=o===H(-e,n),d=o===H(-e*jn,n);return l&&(a=s),(u||d)&&(a=c),Vt(a,n)&&(a=H(-a,n)),{isValid:l||u,value:a}}let K=Sn(kn,{uvRatio:Mn}),q=K.Fp,Nn=K.Fn,Pn=jn,Fn=BigInt(`54469307008909316920995813868745141605393597292927456921205312896311721017578`),In=e=>Mn(wn,e),Ln=BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`),Rn=e=>q.create(ft(e)&Ln);var J=class e extends Cn{static BASE=new e(K.BASE);static ZERO=new e(K.ZERO);static Fp=q;static Fn=Nn;constructor(e){super(e)}static fromAffine(t){return new e(K.fromAffine(t))}assertSame(t){if(!(t instanceof e))throw Error(`RistrettoPoint expected`)}init(t){return new e(t)}static fromBytes(t){We(t,32);let{a:n,d:r}=kn,i=Rn(t);if(!ht(q.toBytes(i),t)||q.isOdd(i))throw Error(`invalid ristretto255 encoding 1`);let a=q.sqr(i),o=q.add(wn,q.mulN(n,a)),s=q.sub(wn,q.mulN(n,a)),c=q.sqr(o),l=q.sqr(s),u=q.sub(q.mulN(q.mulN(n,r),c),l),{isValid:d,value:f}=In(q.mul(u,l)),p=q.mul(f,s),m=q.mul(q.mulN(f,p),u),h=q.mul(q.addN(i,i),p);q.isOdd(h)&&(h=q.neg(h));let g=q.mul(o,m),_=q.mul(h,g);if(!d||q.isOdd(_)||q.is0(g))throw Error(`invalid ristretto255 encoding 2`);return new e(new K(h,g,q.ONE,_))}static fromHex(t){return e.fromBytes(Ye(t))}toBytes(){let{X:e,Y:t,Z:n,T:r}=this.ep,i=q.mul(q.add(n,t),q.sub(n,t)),a=q.mul(e,t),o=q.sqr(a),{value:s}=In(q.mul(i,o)),c=q.mul(s,i),l=q.mul(s,a),u=q.mul(q.mulN(c,l),r),d;if(q.isOdd(q.mul(r,u))){let n=q.mul(t,Pn),r=q.mul(e,Pn);e=n,t=r,d=q.mul(c,Fn)}else d=l;q.isOdd(q.mul(e,u))&&(t=q.neg(t));let f=q.mul(q.subN(n,t),d);return q.isOdd(f)&&(f=q.neg(f)),q.toBytes(f)}equals(e){this.assertSame(e);let{X:t,Y:n}=this.ep,{X:r,Y:i}=e.ep,a=q.eql(q.mul(t,i),q.mul(n,r)),o=q.eql(q.mul(n,i),q.mul(t,r));return a||o}is0(){return this.equals(e.ZERO)}};let zn=(Object.freeze(J.BASE),Object.freeze(J.ZERO),Object.freeze(J.prototype),Object.freeze(J),Object.freeze({Point:J})),Bn=BigInt(2**32-1),Vn=BigInt(32);function Hn(e,t=!1){return t?{h:Number(e&Bn),l:Number(e>>Vn&Bn)}:{h:Number(e>>Vn&Bn)|0,l:Number(e&Bn)|0}}function Un(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=Hn(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let Wn=e=>e/2**32|0,Gn=e=>e>>>0;function Kn(e,t,n,r){let i=Wn(n),a=Gn(n);e.setUint32(t,r?a:i,r),e.setUint32(t+4,r?i:a,r)}let qn=(e,t,n)=>e>>>n,Jn=(e,t,n)=>e<<32-n|t>>>n,Y=(e,t,n)=>e>>>n|t<<32-n,X=(e,t,n)=>e<<32-n|t>>>n,Yn=(e,t,n)=>e<<64-n|t>>>n-32,Xn=(e,t,n)=>e>>>n-32|t<<64-n;function Z(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let Zn=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Qn=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,$n=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),er=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,tr=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),nr=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0;function rr(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}let ir=e=>e?`\"${e}\" `:``;function ar(e,t=``){if(typeof e!=`number`)throw TypeError(ir(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(ir(t)+`expected integer >= 0, got `+e);return e}function or(e,t,n=``){if(rr(e)&&(t===void 0||e.length===t))return e;t!==void 0&&ar(t,`length`);let r=rr(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=ir(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}let sr=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError((t===`object`?``:`\"${t}\" `)+`expected object, got type=`+typeof e)},cr=(e,t)=>{sr(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw TypeError(`\"${t}\" expected plain object`);if(Object.hasOwn(e,`__proto__`))throw TypeError(`\"${t}.__proto__\" is not allowed`)};function lr(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function ur(e,t){or(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`\"output\" expected length >= `+n)}function dr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function fr(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function pr(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];or(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function mr(e,t,n=`opts`){return cr(e,`defaults`),t!==void 0&&cr(t,n),Object.assign(Object.create(null),e,t)}function hr(e,t={}){if(typeof e!=`function`)throw TypeError(`\"hashCons\" expected function, got type=`+typeof e);t=mr({},t,`info`);let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}let gr=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var _r=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=fr(this.buffer)}update(e){lr(this),or(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length,a=!1;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);if(s===r){let t=fr(e);for(;r<=i-o;o+=r)this.process(t,o);a=!0;continue}n.set(o===0&&s===i?e:e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){lr(this),ur(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t.fill(0,a),this.padOffset>r-a&&(this.process(n,0),t.fill(0)),Kn(n,r-8,this.length*8,i),this.process(n,0),this.roundClean();let o=e===t?n:fr(e),s=this.outputLen,c=s/4,l=this.get();if(s%4||c>l.length)throw Error(`invalid outputLen`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:t,length:n,finished:r,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=r,e.length=n,e.pos=a,a&&e.buffer.set(t),e}clone(){return this._cloneInto()}};let vr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),yr=Un(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),br=yr[0],xr=yr[1],Q=new Uint32Array(80),$=new Uint32Array(80);var Sr=class extends _r{Ah=0;Al=0;Bh=0;Bl=0;Ch=0;Cl=0;Dh=0;Dl=0;Eh=0;El=0;Fh=0;Fl=0;Gh=0;Gl=0;Hh=0;Hl=0;constructor(e,t){super(128,e,16,!1),this.Ah=t[0]|0,this.Al=t[1]|0,this.Bh=t[2]|0,this.Bl=t[3]|0,this.Ch=t[4]|0,this.Cl=t[5]|0,this.Dh=t[6]|0,this.Dl=t[7]|0,this.Eh=t[8]|0,this.El=t[9]|0,this.Fh=t[10]|0,this.Fl=t[11]|0,this.Gh=t[12]|0,this.Gl=t[13]|0,this.Hh=t[14]|0,this.Hl=t[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)Q[n]=e.getUint32(t),$[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=Q[e-15]|0,n=$[e-15]|0,r=Y(t,n,1)^Y(t,n,8)^qn(t,n,7),i=X(t,n,1)^X(t,n,8)^Jn(t,n,7),a=Q[e-2]|0,o=$[e-2]|0,s=Y(a,o,19)^Yn(a,o,61)^qn(a,o,6),c=X(a,o,19)^Xn(a,o,61)^Jn(a,o,6),l=$n(i,c,$[e-7],$[e-16]),u=er(l,r,s,Q[e-7],Q[e-16]);Q[e]=u|0,$[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Y(u,d,14)^Y(u,d,18)^Yn(u,d,41),v=X(u,d,14)^X(u,d,18)^Xn(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=tr(_,v,b,xr[e],$[e]),S=nr(x,g,t,y,br[e],Q[e]),C=x|0,ee=Y(n,r,28)^Yn(n,r,34)^Yn(n,r,39),w=X(n,r,28)^Xn(n,r,34)^Xn(n,r,39),T=n&i^n&o^i&o,E=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=Z(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let D=Zn(C,w,E);n=Qn(D,S,ee,T),r=D|0}({h:n,l:r}=Z(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=Z(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=Z(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=Z(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=Z(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=Z(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=Z(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=Z(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){dr(Q,$)}destroy(){this.destroyed=!0,dr(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Cr=class extends Sr{constructor(){super(64,vr)}};let wr=hr(()=>new Cr,gr(3)),Tr=BigInt(3);function Er(e,t,...n){if(!nt(t))throw TypeError(`${e}: Uint8Array expected`);if(n.length&&!n.includes(t.length))throw RangeError(`${e}: Uint8Array expected of length ${n}, not of length=${t.length}`)}function Dr(...e){for(let t of e)t.fill(0)}let Or=bt(256),kr=e=>mt(e<<Tr&Or,32),Ar=e=>ft(e)>>Tr;function jr(e){Er(`seed`,e,32);let t=wr(e);t[0]&=248,t[31]&=63,t[31]|=64;let n=kr(Ar(t.subarray(0,32))),r=t.subarray(32,64),i=pr(n,r);return Dr(n,r,t),i}let Mr=Be;function Nr(e,t=De(),n=2048,r){return{password:Me(Mr,v(e),v(t),{c:n,dkLen:64}),rounds:n,salt:t}}var Pr={256:ze,512:Mr},Fr=Pr[256];Pr[512];var Ir=`abandon|ability|able|about|above|absent|absorb|abstract|absurd|abuse|access|accident|account|accuse|achieve|acid|acoustic|acquire|across|act|action|actor|actress|actual|adapt|add|addict|address|adjust|admit|adult|advance|advice|aerobic|affair|afford|afraid|again|age|agent|agree|ahead|aim|air|airport|aisle|alarm|album|alcohol|alert|alien|all|alley|allow|almost|alone|alpha|already|also|alter|always|amateur|amazing|among|amount|amused|analyst|anchor|ancient|anger|angle|angry|animal|ankle|announce|annual|another|answer|antenna|antique|anxiety|any|apart|apology|appear|apple|approve|april|arch|arctic|area|arena|argue|arm|armed|armor|army|around|arrange|arrest|arrive|arrow|art|artefact|artist|artwork|ask|aspect|assault|asset|assist|assume|asthma|athlete|atom|attack|attend|attitude|attract|auction|audit|august|aunt|author|auto|autumn|average|avocado|avoid|awake|aware|away|awesome|awful|awkward|axis|baby|bachelor|bacon|badge|bag|balance|balcony|ball|bamboo|banana|banner|bar|barely|bargain|barrel|base|basic|basket|battle|beach|bean|beauty|because|become|beef|before|begin|behave|behind|believe|below|belt|bench|benefit|best|betray|better|between|beyond|bicycle|bid|bike|bind|biology|bird|birth|bitter|black|blade|blame|blanket|blast|bleak|bless|blind|blood|blossom|blouse|blue|blur|blush|board|boat|body|boil|bomb|bone|bonus|book|boost|border|boring|borrow|boss|bottom|bounce|box|boy|bracket|brain|brand|brass|brave|bread|breeze|brick|bridge|brief|bright|bring|brisk|broccoli|broken|bronze|broom|brother|brown|brush|bubble|buddy|budget|buffalo|build|bulb|bulk|bullet|bundle|bunker|burden|burger|burst|bus|business|busy|butter|buyer|buzz|cabbage|cabin|cable|cactus|cage|cake|call|calm|camera|camp|can|canal|cancel|candy|cannon|canoe|canvas|canyon|capable|capital|captain|car|carbon|card|cargo|carpet|carry|cart|case|cash|casino|castle|casual|cat|catalog|catch|category|cattle|caught|cause|caution|cave|ceiling|celery|cement|census|century|cereal|certain|chair|chalk|champion|change|chaos|chapter|charge|chase|chat|cheap|check|cheese|chef|cherry|chest|chicken|chief|child|chimney|choice|choose|chronic|chuckle|chunk|churn|cigar|cinnamon|circle|citizen|city|civil|claim|clap|clarify|claw|clay|clean|clerk|clever|click|client|cliff|climb|clinic|clip|clock|clog|close|cloth|cloud|clown|club|clump|cluster|clutch|coach|coast|coconut|code|coffee|coil|coin|collect|color|column|combine|come|comfort|comic|common|company|concert|conduct|confirm|congress|connect|consider|control|convince|cook|cool|copper|copy|coral|core|corn|correct|cost|cotton|couch|country|couple|course|cousin|cover|coyote|crack|cradle|craft|cram|crane|crash|crater|crawl|crazy|cream|credit|creek|crew|cricket|crime|crisp|critic|crop|cross|crouch|crowd|crucial|cruel|cruise|crumble|crunch|crush|cry|crystal|cube|culture|cup|cupboard|curious|current|curtain|curve|cushion|custom|cute|cycle|dad|damage|damp|dance|danger|daring|dash|daughter|dawn|day|deal|debate|debris|decade|december|decide|decline|decorate|decrease|deer|defense|define|defy|degree|delay|deliver|demand|demise|denial|dentist|deny|depart|depend|deposit|depth|deputy|derive|describe|desert|design|desk|despair|destroy|detail|detect|develop|device|devote|diagram|dial|diamond|diary|dice|diesel|diet|differ|digital|dignity|dilemma|dinner|dinosaur|direct|dirt|disagree|discover|disease|dish|dismiss|disorder|display|distance|divert|divide|divorce|dizzy|doctor|document|dog|doll|dolphin|domain|donate|donkey|donor|door|dose|double|dove|draft|dragon|drama|drastic|draw|dream|dress|drift|drill|drink|drip|drive|drop|drum|dry|duck|dumb|dune|during|dust|dutch|duty|dwarf|dynamic|eager|eagle|early|earn|earth|easily|east|easy|echo|ecology|economy|edge|edit|educate|effort|egg|eight|either|elbow|elder|electric|elegant|element|elephant|elevator|elite|else|embark|embody|embrace|emerge|emotion|employ|empower|empty|enable|enact|end|endless|endorse|enemy|energy|enforce|engage|engine|enhance|enjoy|enlist|enough|enrich|enroll|ensure|enter|entire|entry|envelope|episode|equal|equip|era|erase|erode|erosion|error|erupt|escape|essay|essence|estate|eternal|ethics|evidence|evil|evoke|evolve|exact|example|excess|exchange|excite|exclude|excuse|execute|exercise|exhaust|exhibit|exile|exist|exit|exotic|expand|expect|expire|explain|expose|express|extend|extra|eye|eyebrow|fabric|face|faculty|fade|faint|faith|fall|false|fame|family|famous|fan|fancy|fantasy|farm|fashion|fat|fatal|father|fatigue|fault|favorite|feature|february|federal|fee|feed|feel|female|fence|festival|fetch|fever|few|fiber|fiction|field|figure|file|film|filter|final|find|fine|finger|finish|fire|firm|first|fiscal|fish|fit|fitness|fix|flag|flame|flash|flat|flavor|flee|flight|flip|float|flock|floor|flower|fluid|flush|fly|foam|focus|fog|foil|fold|follow|food|foot|force|forest|forget|fork|fortune|forum|forward|fossil|foster|found|fox|fragile|frame|frequent|fresh|friend|fringe|frog|front|frost|frown|frozen|fruit|fuel|fun|funny|furnace|fury|future|gadget|gain|galaxy|gallery|game|gap|garage|garbage|garden|garlic|garment|gas|gasp|gate|gather|gauge|gaze|general|genius|genre|gentle|genuine|gesture|ghost|giant|gift|giggle|ginger|giraffe|girl|give|glad|glance|glare|glass|glide|glimpse|globe|gloom|glory|glove|glow|glue|goat|goddess|gold|good|goose|gorilla|gospel|gossip|govern|gown|grab|grace|grain|grant|grape|grass|gravity|great|green|grid|grief|grit|grocery|group|grow|grunt|guard|guess|guide|guilt|guitar|gun|gym|habit|hair|half|hammer|hamster|hand|happy|harbor|hard|harsh|harvest|hat|have|hawk|hazard|head|health|heart|heavy|hedgehog|height|hello|helmet|help|hen|hero|hidden|high|hill|hint|hip|hire|history|hobby|hockey|hold|hole|holiday|hollow|home|honey|hood|hope|horn|horror|horse|hospital|host|hotel|hour|hover|hub|huge|human|humble|humor|hundred|hungry|hunt|hurdle|hurry|hurt|husband|hybrid|ice|icon|idea|identify|idle|ignore|ill|illegal|illness|image|imitate|immense|immune|impact|impose|improve|impulse|inch|include|income|increase|index|indicate|indoor|industry|infant|inflict|inform|inhale|inherit|initial|inject|injury|inmate|inner|innocent|input|inquiry|insane|insect|inside|inspire|install|intact|interest|into|invest|invite|involve|iron|island|isolate|issue|item|ivory|jacket|jaguar|jar|jazz|jealous|jeans|jelly|jewel|job|join|joke|journey|joy|judge|juice|jump|jungle|junior|junk|just|kangaroo|keen|keep|ketchup|key|kick|kid|kidney|kind|kingdom|kiss|kit|kitchen|kite|kitten|kiwi|knee|knife|knock|know|lab|label|labor|ladder|lady|lake|lamp|language|laptop|large|later|latin|laugh|laundry|lava|law|lawn|lawsuit|layer|lazy|leader|leaf|learn|leave|lecture|left|leg|legal|legend|leisure|lemon|lend|length|lens|leopard|lesson|letter|level|liar|liberty|library|license|life|lift|light|like|limb|limit|link|lion|liquid|list|little|live|lizard|load|loan|lobster|local|lock|logic|lonely|long|loop|lottery|loud|lounge|love|loyal|lucky|luggage|lumber|lunar|lunch|luxury|lyrics|machine|mad|magic|magnet|maid|mail|main|major|make|mammal|man|manage|mandate|mango|mansion|manual|maple|marble|march|margin|marine|market|marriage|mask|mass|master|match|material|math|matrix|matter|maximum|maze|meadow|mean|measure|meat|mechanic|medal|media|melody|melt|member|memory|mention|menu|mercy|merge|merit|merry|mesh|message|metal|method|middle|midnight|milk|million|mimic|mind|minimum|minor|minute|miracle|mirror|misery|miss|mistake|mix|mixed|mixture|mobile|model|modify|mom|moment|monitor|monkey|monster|month|moon|moral|more|morning|mosquito|mother|motion|motor|mountain|mouse|move|movie|much|muffin|mule|multiply|muscle|museum|mushroom|music|must|mutual|myself|mystery|myth|naive|name|napkin|narrow|nasty|nation|nature|near|neck|need|negative|neglect|neither|nephew|nerve|nest|net|network|neutral|never|news|next|nice|night|noble|noise|nominee|noodle|normal|north|nose|notable|note|nothing|notice|novel|now|nuclear|number|nurse|nut|oak|obey|object|oblige|obscure|observe|obtain|obvious|occur|ocean|october|odor|off|offer|office|often|oil|okay|old|olive|olympic|omit|once|one|onion|online|only|open|opera|opinion|oppose|option|orange|orbit|orchard|order|ordinary|organ|orient|original|orphan|ostrich|other|outdoor|outer|output|outside|oval|oven|over|own|owner|oxygen|oyster|ozone|pact|paddle|page|pair|palace|palm|panda|panel|panic|panther|paper|parade|parent|park|parrot|party|pass|patch|path|patient|patrol|pattern|pause|pave|payment|peace|peanut|pear|peasant|pelican|pen|penalty|pencil|people|pepper|perfect|permit|person|pet|phone|photo|phrase|physical|piano|picnic|picture|piece|pig|pigeon|pill|pilot|pink|pioneer|pipe|pistol|pitch|pizza|place|planet|plastic|plate|play|please|pledge|pluck|plug|plunge|poem|poet|point|polar|pole|police|pond|pony|pool|popular|portion|position|possible|post|potato|pottery|poverty|powder|power|practice|praise|predict|prefer|prepare|present|pretty|prevent|price|pride|primary|print|priority|prison|private|prize|problem|process|produce|profit|program|project|promote|proof|property|prosper|protect|proud|provide|public|pudding|pull|pulp|pulse|pumpkin|punch|pupil|puppy|purchase|purity|purpose|purse|push|put|puzzle|pyramid|quality|quantum|quarter|question|quick|quit|quiz|quote|rabbit|raccoon|race|rack|radar|radio|rail|rain|raise|rally|ramp|ranch|random|range|rapid|rare|rate|rather|raven|raw|razor|ready|real|reason|rebel|rebuild|recall|receive|recipe|record|recycle|reduce|reflect|reform|refuse|region|regret|regular|reject|relax|release|relief|rely|remain|remember|remind|remove|render|renew|rent|reopen|repair|repeat|replace|report|require|rescue|resemble|resist|resource|response|result|retire|retreat|return|reunion|reveal|review|reward|rhythm|rib|ribbon|rice|rich|ride|ridge|rifle|right|rigid|ring|riot|ripple|risk|ritual|rival|river|road|roast|robot|robust|rocket|romance|roof|rookie|room|rose|rotate|rough|round|route|royal|rubber|rude|rug|rule|run|runway|rural|sad|saddle|sadness|safe|sail|salad|salmon|salon|salt|salute|same|sample|sand|satisfy|satoshi|sauce|sausage|save|say|scale|scan|scare|scatter|scene|scheme|school|science|scissors|scorpion|scout|scrap|screen|script|scrub|sea|search|season|seat|second|secret|section|security|seed|seek|segment|select|sell|seminar|senior|sense|sentence|series|service|session|settle|setup|seven|shadow|shaft|shallow|share|shed|shell|sheriff|shield|shift|shine|ship|shiver|shock|shoe|shoot|shop|short|shoulder|shove|shrimp|shrug|shuffle|shy|sibling|sick|side|siege|sight|sign|silent|silk|silly|silver|similar|simple|since|sing|siren|sister|situate|six|size|skate|sketch|ski|skill|skin|skirt|skull|slab|slam|sleep|slender|slice|slide|slight|slim|slogan|slot|slow|slush|small|smart|smile|smoke|smooth|snack|snake|snap|sniff|snow|soap|soccer|social|sock|soda|soft|solar|soldier|solid|solution|solve|someone|song|soon|sorry|sort|soul|sound|soup|source|south|space|spare|spatial|spawn|speak|special|speed|spell|spend|sphere|spice|spider|spike|spin|spirit|split|spoil|sponsor|spoon|sport|spot|spray|spread|spring|spy|square|squeeze|squirrel|stable|stadium|staff|stage|stairs|stamp|stand|start|state|stay|steak|steel|stem|step|stereo|stick|still|sting|stock|stomach|stone|stool|story|stove|strategy|street|strike|strong|struggle|student|stuff|stumble|style|subject|submit|subway|success|such|sudden|suffer|sugar|suggest|suit|summer|sun|sunny|sunset|super|supply|supreme|sure|surface|surge|surprise|surround|survey|suspect|sustain|swallow|swamp|swap|swarm|swear|sweet|swift|swim|swing|switch|sword|symbol|symptom|syrup|system|table|tackle|tag|tail|talent|talk|tank|tape|target|task|taste|tattoo|taxi|teach|team|tell|ten|tenant|tennis|tent|term|test|text|thank|that|theme|then|theory|there|they|thing|this|thought|three|thrive|throw|thumb|thunder|ticket|tide|tiger|tilt|timber|time|tiny|tip|tired|tissue|title|toast|tobacco|today|toddler|toe|together|toilet|token|tomato|tomorrow|tone|tongue|tonight|tool|tooth|top|topic|topple|torch|tornado|tortoise|toss|total|tourist|toward|tower|town|toy|track|trade|traffic|tragic|train|transfer|trap|trash|travel|tray|treat|tree|trend|trial|tribe|trick|trigger|trim|trip|trophy|trouble|truck|true|truly|trumpet|trust|truth|try|tube|tuition|tumble|tuna|tunnel|turkey|turn|turtle|twelve|twenty|twice|twin|twist|two|type|typical|ugly|umbrella|unable|unaware|uncle|uncover|under|undo|unfair|unfold|unhappy|uniform|unique|unit|universe|unknown|unlock|until|unusual|unveil|update|upgrade|uphold|upon|upper|upset|urban|urge|usage|use|used|useful|useless|usual|utility|vacant|vacuum|vague|valid|valley|valve|van|vanish|vapor|various|vast|vault|vehicle|velvet|vendor|venture|venue|verb|verify|version|very|vessel|veteran|viable|vibrant|vicious|victory|video|view|village|vintage|violin|virtual|virus|visa|visit|visual|vital|vivid|vocal|voice|void|volcano|volume|vote|voyage|wage|wagon|wait|walk|wall|walnut|want|warfare|warm|warrior|wash|wasp|waste|water|wave|way|wealth|weapon|wear|weasel|weather|web|wedding|weekend|weird|welcome|west|wet|whale|what|wheat|wheel|when|where|whip|whisper|wide|width|wife|wild|will|win|window|wine|wing|wink|winner|winter|wire|wisdom|wise|wish|witness|wolf|woman|wonder|wood|wool|word|work|world|worry|worth|wrap|wreck|wrestle|wrist|write|wrong|yard|year|yellow|you|young|youth|zebra|zero|zone|zoo`.split(`|`),Lr=`Invalid mnemonic`,Rr=`Invalid entropy`,zr=`Invalid mnemonic checksum`;function Br(e){return(e||``).normalize(`NFKD`)}function Vr(e){return Number.parseInt(e,2)}function Hr(e){return e.map(e=>e.toString(2).padStart(8,`0`)).join(``)}function Ur(e){return Hr(Array.from(Fr(e))).slice(0,e.length*8/32)}function Wr(e,t=Ir){let n=Br(e).split(` `);if(n.length%3!=0)throw Error(Lr);let r=n.map(e=>{let n=t.indexOf(e);if(n===-1)throw Error(Lr);return n.toString(2).padStart(11,`0`)}).join(``),i=Math.floor(r.length/33)*32,a=r.slice(0,i),o=r.slice(i),s=a.match(/(.{1,8})/g)?.map(Vr);if(!s||s.length%4!=0||s.length<16||s.length>32)throw Error(Rr);let c=v(s);if(Ur(c)!==o)throw Error(zr);return c}function Gr(e,t=Ir){if(e.length%4!=0||e.length<16||e.length>32)throw Error(Rr);let n=`${Hr(Array.from(e))}${Ur(e)}`.match(/(.{1,11})/g)?.map(e=>t[Vr(e)]);if(!n||n.length<12)throw Error(`Unable to map entropy to mnemonic`);return n.join(` `)}function Kr(e,t){try{Wr(e,t)}catch{return!1}return!0}function qr(e,t,n){return Wr(e,t)}function Jr(e,t){return Kr(e,t)}function Yr(e,t=``,n,r){if(!Jr(e,n))throw Error(`Invalid bip39 mnemonic specified`);return Nr(qr(e,n),_(`mnemonic${t}`)).password.slice(0,32)}function Xr(e){let t=v(e);if(t.length!==32)throw Error(`Expected a seed of 32 bytes, found ${t.length}`);let n=jr(t),r=ft(n.subarray(0,32))>>3n,i=zn.Point.BASE.multiply(r).toBytes();return{publicKey:new Uint8Array(i),secretKey:new Uint8Array(n)}}self.addEventListener(`message`,async e=>{let{taskId:t,task:n,data:r}=e.data;try{let e;switch(n){case`test`:e=`ready`;break;case`entropyToMnemonic`:if(!r.entropy)throw Error(`Entropy data is required`);e=Gr(r.entropy);break;case`entropyToKeypair`:if(!r.entropy)throw Error(`Entropy data is required`);e=Zr(r.entropy);break;default:throw Error(`Unknown task: ${n}`)}let i={taskId:t,result:e};self.postMessage(i)}catch(e){let n={taskId:t,error:e instanceof Error?e.message:`Unknown error`};self.postMessage(n)}});function Zr(e){let t=Gr(e),{publicKey:n,secretKey:r}=Xr(Yr(t));return{mnemonic:t,publicKey:n,secretKey:r}}})();";
|
|
3
3
|
var blob = typeof self !== "undefined" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", jsContent], { type: "text/javascript;charset=utf-8" });
|
|
4
4
|
function WorkerWrapper(options) {
|
|
5
5
|
let objURL;
|