PageSourceSearch

https://www.ergoblockchain.org/_next/static/chunks/npm.sigmajs-crypto-facade.789c2e9b50b7d8be.js

js ergoblockchain.org collected 2026-10-07 00:17:45 UTC 19,394 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65697],{9040:(t,e,r)=>{let n,i;r.r(e),r.d(e,{CURVE:()=>l,CryptoContext:()=>th,CryptoFacade:()=>tm,Point:()=>m,Signature:()=>E,getPublicKey:()=>W,getSharedSecret:()=>G,recoverPublicKey:()=>F,schnorr:()=>ts,sign:()=>j,signSync:()=>J,utils:()=>tl,verify:()=>Q});var a=r(34015);let o=BigInt(0),s=BigInt(1),f=BigInt(2),c=BigInt(3),u=BigInt(8),l=Object.freeze({a:o,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:s,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});function h(t){let{a:e,b:r}=l,n=C(t*t),i=C(n*t);return C(i+e*t+r)}class y extends Error{constructor(t){super(t)}}class d{x;y;z;constructor(t,e,r){this.x=t,this.y=e,this.z=r}static BASE=new d(l.Gx,l.Gy,s);static ZERO=new d(o,s,o);static fromAffine(t){if(!(t instanceof m))throw TypeError("JacobianPoint#fromAffine: expected Point");return new d(t.x,t.y,s)}static toAffineBatch(t){let e=function(t,e=l.P){let r=Array(t.length),n=N(t.reduce((t,n,i)=>n===o?t:(r[i]=t,C(t*n,e)),s),e);return t.reduceRight((t,n,i)=>n===o?t:(r[i]=C(t*r[i],e),C(t*n,e)),n),r}(t.map(t=>t.z));return t.map((t,r)=>t.toAffine(e[r]))}static normalizeZ(t){return d.toAffineBatch(t).map(d.fromAffine)}equals(t){if(!(t instanceof d))throw TypeError("JacobianPoint expected");let{x:e,y:r,z:n}=this,{x:i,y:a,z:o}=t,s=C(n*n),f=C(o*o),c=C(e*f),u=C(i*s),l=C(C(r*o)*f),h=C(C(a*n)*s);return c===u&&l===h}negate(){return new d(this.x,C(-this.y),this.z)}double(){let{x:t,y:e,z:r}=this,n=C(t*t),i=C(e*e),a=C(i*i),o=t+i,s=C(f*(C(o*o)-n-a)),l=C(c*n),h=C(l*l),y=C(h-f*s),g=C(l*(s-y)-u*a);return new d(y,g,C(f*e*r))}add(t){if(!(t instanceof d))throw TypeError("JacobianPoint expected");let{x:e,y:r,z:n}=this,{x:i,y:a,z:s}=t;if(i===o||a===o)return this;if(e===o||r===o)return t;let c=C(n*n),u=C(s*s),l=C(e*u),h=C(i*c),y=C(C(r*s)*u),g=C(C(a*n)*c),m=C(h-l),w=C(g-y);if(m===o)if(w===o)return this.double();else return d.ZERO;let p=C(m*m),E=C(m*p),x=C(l*p),b=C(w*w-E-f*x),S=C(w*(x-b)-y*E);return new d(b,S,C(n*s*m))}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){let e=d.ZERO;if("bigint"==typeof t&&t===o)return e;let r=z(t);if(r===s)return this;{let t=e,n=this;for(;r>o;)r&s&&(t=t.add(n)),n=n.double(),r>>=s;return t}}precomputeWindow(t){let e=256/t+1,r=[],n=this,i=n;for(let a=0;a<e;a++){i=n,r.push(i);for(let e=1;e<2**(t-1);e++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(t,e){!e&&this.equals(d.BASE)&&(e=m.BASE);let r=e&&e._WINDOW_SIZE||1;if(256%r)throw Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=e&&g.get(e);!n&&(n=this.precomputeWindow(r),e&&1!==r&&(n=d.normalizeZ(n),g.set(e,n)));let i=d.ZERO,a=d.ZERO,o=1+256/r,f=2**(r-1),c=BigInt(2**r-1),u=2**r,l=BigInt(r);for(let e=0;e<o;e++){let r=e*f,o=Number(t&c);if(t>>=l,o>f&&(o-=u,t+=s),0===o){let t=n[r];e%2&&(t=t.negate()),a=a.add(t)}else{let t=n[r+Math.abs(o)-1];o<0&&(t=t.negate()),i=i.add(t)}}return{p:i,f:a}}multiply(t,e){let r,n,i=z(t);{let{p:t,f:a}=this.wNAF(i,e);r=t,n=a}return d.normalizeZ([r,n])[0]}toAffine(t=N(this.z)){let{x:e,y:r,z:n}=this,i=C(t*t),a=C(i*t),o=C(e*i),f=C(r*a);return C(n*t)!==s?m.ZERO:new m(o,f)}}let g=new WeakMap;class m{x;y;static BASE=new m(l.Gx,l.Gy);static ZERO=new m(o,o);_WINDOW_SIZE;constructor(t,e){this.x=t,this.y=e}_setWindowSize(t){this._WINDOW_SIZE=t,g.delete(this)}hasEvenY(){return this.y%f===o}static fromCompressedHex(t){let e=32===t.length,r=R(e?t:t.subarray(1));if(!Z(r))throw Error("Point is not on curve");let n=function(t){let{P:e}=l,r=BigInt(6),n=BigInt(11),i=BigInt(22),a=BigInt(23),o=BigInt(44),s=BigInt(88),u=t*t*t%e,h=u*u*t%e,y=k(h,c)*h%e,d=k(y,c)*h%e,g=k(d,f)*u%e,m=k(g,n)*g%e,w=k(m,i)*m%e,p=k(w,o)*w%e,E=k(p,s)*p%e,x=k(E,o)*w%e,b=k(x,c)*h%e,S=k(b,a)*m%e,v=k(S,r)*u%e;return k(v,f)}(h(r)),i=(n&s)===s;e?i&&(n=C(-n)):(1&t[0])==1!==i&&(n=C(-n));let a=new m(r,n);return a.assertValidity(),a}static fromUncompressedHex(t){let e=new m(R(t.subarray(1,33)),R(t.subarray(33,65)));return e.assertValidity(),e}static fromHex(t){let e=U(t),r=e.length,n=e[0];if(32===r||33===r&&(2===n||3===n))return this.fromCompressedHex(e);if(65===r&&4===n)return this.fromUncompressedHex(e);
1throw Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return m.BASE.multiply(V(t))}static fromSignature(t,e,r){let n=T(t=U(t)),{r:i,s:a}=D(e);if(0!==r&&1!==r)throw Error("Cannot recover signature: invalid recovery bit");let o=m.fromHex((1&r?"03":"02")+A(i)),{n:s}=l,f=N(i,s),c=C(-n*f,s),u=C(a*f,s),h=m.BASE.multiplyAndAddUnsafe(o,c,u);if(!h)throw Error("Cannot recover signature: point at infinify");return h.assertValidity(),h}toRawBytes(t=!1){return P(this.toHex(t))}toHex(t=!1){let e=A(this.x);if(!t)return`04${e}${A(this.y)}`;{let t=this.hasEvenY()?"02":"03";return`${t}${e}`}}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){let t="Point is not on elliptic curve",{x:e,y:r}=this;if(!Z(e)||!Z(r))throw Error(t);let n=C(r*r);if(C(n-h(e))!==o)throw Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new m(this.x,C(-this.y))}double(){return d.fromAffine(this).double().toAffine()}add(t){return d.fromAffine(this).add(d.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return d.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,e,r){let n=d.fromAffine(this),i=e===o||e===s||this!==m.BASE?n.multiplyUnsafe(e):n.multiply(e),a=d.fromAffine(t).multiplyUnsafe(r),f=i.add(a);return f.equals(d.ZERO)?void 0:f.toAffine()}}function w(t){return Number.parseInt(t[0],16)>=8?"00"+t:t}function p(t){if(t.length<2||2!==t[0])throw Error(`Invalid signature integer tag: ${S(t)}`);let e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw Error("Invalid signature integer: trailing length");return{data:R(r),left:t.subarray(e+2)}}class E{r;s;constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromCompact(t){let e=t instanceof Uint8Array,r="Signature.fromCompact";if("string"!=typeof t&&!e)throw TypeError(`${r}: Expected string or Uint8Array`);let n=e?S(t):t;if(128!==n.length)throw Error(`${r}: Expected 64-byte hex`);return new E(H(n.slice(0,64)),H(n.slice(64,128)))}static fromDER(t){let e=t instanceof Uint8Array;
1if("string"!=typeof t&&!e)throw TypeError("Signature.fromDER: Expected string or Uint8Array");let{r,s:n}=function(t){if(t.length<2||48!=t[0])throw Error(`Invalid signature tag: ${S(t)}`);if(t[1]!==t.length-2)throw Error("Invalid signature: incorrect length");let{data:e,left:r}=p(t.subarray(2)),{data:n,left:i}=p(r);if(i.length)throw Error(`Invalid signature: left bytes after parsing: ${S(i)}`);return{r:e,s:n}}(e?t:P(t));return new E(r,n)}static fromHex(t){return this.fromDER(t)}assertValidity(){let{r:t,s:e}=this;if(!O(t))throw Error("Invalid Signature: r must be 0 < r < n");if(!O(e))throw Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){let t=l.n>>s;return this.s>t}normalizeS(){return this.hasHighS()?new E(this.r,l.n-this.s):this}toDERRawBytes(t=!1){return P(this.toDERHex(t))}toDERHex(t=!1){let e=w(I(this.s));if(t)return e;let r=w(I(this.r)),n=I(r.length/2),i=I(e.length/2),a=I(r.length/2+e.length/2+4);return`30${a}02${n}${r}02${i}${e}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return P(this.toCompactHex())}toCompactHex(){return A(this.r)+A(this.s)}}function x(...t){if(!t.every(t=>t instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===t.length)return t[0];let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0));for(let r=0,n=0;r<t.length;r++){let i=t[r];e.set(i,n),n+=i.length}return e}let b=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function S(t){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");let e="";for(let r=0;r<t.length;r++)e+=b[t[r]];return e}let v=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function A(t){if("bigint"!=typeof t)throw Error("Expected bigint");if(!(o<=t&&t<v))throw Error("Expected number < 2^256");return t.toString(16).padStart(64,"0")}function B(t){let e=P(A(t));if(32!==e.length)throw Error("Error: expected 32 bytes");return e}function I(t){let e=t.toString(16);return 1&e.length?`0${e}`:e}function H(t){if("string"!=typeof t)throw TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}function P(t){if("string"!=typeof t)throw TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw Error("hexToBytes: received invalid unpadded hex"+t.length);let e=new Uint8Array(t.length/2);for(let r=0;r<e.length;r++){let n=2*r,i=Number.parseInt(t.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");e[r]=i}return e}function R(t){return H(S(t))}function U(t){return t instanceof Uint8Array?Uint8Array.from(t):P(t)}function z(t){if("number"==typeof t&&Number.isSafeInteger(t)&&t>0)return BigInt(t);if("bigint"==typeof t)return t;throw TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function C(t,e=l.P){let r=t%e;return r>=o?r:e+r}function k(t,e){let{P:r}=l,n=t;for(;e-- >o;)n*=n,n%=r;return n}function N(t,e=l.P){if(t===o||e<=o)return o;let r=C(t,e),n=e,i=o,a=s,f=s,c=o;for(;r!==o;){let t=n/r,e=n%r,o=i-f*t,s=a-c*t;n=r,r=e,i=f,a=c,f=o,c=s}if(n!==s)throw Error("invert: does not exist");return C(i,e)}BigInt("0x3086d221a7d46bcde86c90e49284eb15"),BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15"),BigInt("0x100000000000000000000000000000000");function T(t){let{n:e}=l,r=8*t.length-256,n=R(t);return r>0&&(n>>=BigInt(r)),n>=e&&(n-=e),n}class ${k;v;counter;constructor(){this.v=new Uint8Array(32).fill(1),this.k=new Uint8Array(32).fill(0),this.counter=0}hmac(...t){return tl.hmacSha256(this.k,...t)}hmacSync(...t){return i(this.k,...t)}checkSync(){if("function"!=typeof i)throw new y("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),0!==t.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),0!==t.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){return this.incr(),this.v=await this.hmac(this.v),this.v}generateSync(){return this.checkSync(),this.incr(),this.v=this.hmacSync(this.v),this.v}}function O(t){return o<t&&t<l.n}function Z(t){return o<t&&t<l.P}function _(t,e,r){let n=R(t);if(!O(n))return;let{n:i}=l,a=m.BASE.multiply(n),f=C(a.x,i);if(f===o)return;let c=C(N(n,i)*C(e+r*f,i),i);if(c===o)return;
1let u=new E(f,c),h=2*(a.x!==u.r)|Number(a.y&s);return{sig:u,recovery:h}}function V(t){let e;if("bigint"==typeof t)e=t;else if("number"==typeof t&&Number.isSafeInteger(t)&&t>0)e=BigInt(t);else if("string"==typeof t){if(64!==t.length)throw Error("Expected 32 bytes of private key");e=H(t)}else if(t instanceof Uint8Array){if(32!==t.length)throw Error("Expected 32 bytes of private key");e=R(t)}else throw TypeError("Expected valid private key");if(!O(e))throw Error("Expected private key: 0 < key < n");return e}function K(t){return t instanceof m?(t.assertValidity(),t):m.fromHex(t)}function D(t){if(t instanceof E)return t.assertValidity(),t;try{return E.fromDER(t)}catch(e){return E.fromCompact(t)}}function W(t,e=!1){return m.fromPrivateKey(t).toRawBytes(e)}function F(t,e,r,n=!1){return m.fromSignature(t,e,r).toRawBytes(n)}function X(t){let e=t instanceof Uint8Array,r="string"==typeof t,n=(e||r)&&t.length;return e?33===n||65===n:r?66===n||130===n:t instanceof m}function G(t,e,r=!1){if(X(t))throw TypeError("getSharedSecret: first arg must be private key");if(!X(e))throw TypeError("getSharedSecret: second arg must be public key");let n=K(e);return n.assertValidity(),n.multiply(V(t)).toRawBytes(r)}function q(t){return R(t.length>32?t.slice(0,32):t)}function Y(t,e,r){let n,i;if(null==t)throw Error(`sign: expected valid message hash, not "${t}"`);let a=U(t),s=V(e),f=[B(s),B((i=C(n=q(a),l.n))<o?n:i)];if(null!=r){!0===r&&(r=tl.randomBytes(32));let t=U(r);if(32!==t.length)throw Error("sign: Expected 32 bytes of extra data");f.push(t)}return{seed:x(...f),m:q(a),d:s}}function M(t,e){let{sig:r,recovery:n}=t,{canonical:i,der:a,recovered:o}=Object.assign({canonical:!0,der:!0},e);i&&r.hasHighS()&&(r=r.normalizeS(),n^=1);let s=a?r.toDERRawBytes():r.toCompactRawBytes();return o?[s,n]:s}async function j(t,e,r={}){let n,{seed:i,m:a,d:o}=Y(t,e,r.extraEntropy),s=new $;for(await s.reseed(i);!(n=_(await s.generate(),a,o));)await s.reseed();return M(n,r)}function J(t,e,r={}){let n,{seed:i,m:a,d:o}=Y(t,e,r.extraEntropy),s=new $;for(s.reseedSync(i);!(n=_(s.generateSync(),a,o));)s.reseedSync();return M(n,r)}let L={strict:!0};function Q(t,e,r,n=L){let i,a;try{i=D(t),e=U(e)}catch(t){return!1}let{r:o,s}=i;if(n.strict&&i.hasHighS())return!1;let f=T(e);try{a=K(r)}catch(t){return!1}let{n:c}=l,u=N(s,c),h=C(f*u,c),y=C(o*u,c),d=m.BASE.multiplyAndAddUnsafe(a,h,y);return!!d&&C(d.x,c)===o}function tt(t){return C(R(t),l.n)}class te{r;s;constructor(t,e){this.r=t,this.s=e,this.assertValidity()}static fromHex(t){let e=U(t);if(64!==e.length)throw TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${e.length}`);return new te(R(e.subarray(0,32)),R(e.subarray(32,64)))}assertValidity(){let{r:t,s:e}=this;if(!Z(t)||!O(e))throw Error("Invalid signature")}toHex(){return A(this.r)+A(this.s)}toRawBytes(){return P(this.toHex())}}class tr{m;px;d;rand;constructor(t,e,r=tl.randomBytes()){if(null==t)throw TypeError(`sign: Expected valid message, not "${t}"`);this.m=U(t);const{x:n,scalar:i}=this.getScalar(V(e));if(this.px=n,this.d=i,this.rand=U(r),32!==this.rand.length)throw TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(t){let e=m.fromPrivateKey(t),r=e.hasEvenY()?t:l.n-t;return{point:e,scalar:r,x:e.toRawX()}}initNonce(t,e){return B(t^R(e))}finalizeNonce(t){let e=C(R(t),l.n);if(e===o)throw Error("sign: Creation of signature failed. k is zero");let{point:r,x:n,scalar:i}=this.getScalar(e);return{R:r,rx:n,k:i}}finalizeSig(t,e,r,n){return new te(t.x,C(e+r*n,l.n)).toRawBytes()}error(){throw Error("sign: Invalid signature produced")}async calc(){let{m:t,d:e,px:r,rand:n}=this,i=tl.taggedHash,a=this.initNonce(e,await i(tc.aux,n)),{R:o,rx:s,k:f}=this.finalizeNonce(await i(tc.nonce,a,r,t)),c=tt(await i(tc.challenge,s,r,t)),u=this.finalizeSig(o,f,c,e);return await ta(u,t,r)||this.error(),u}calcSync(){let{m:t,d:e,px:r,rand:n}=this,i=tl.taggedHashSync,a=this.initNonce(e,i(tc.aux,n)),{R:o,rx:s,k:f}=this.finalizeNonce(i(tc.nonce,a,r,t)),c=tt(i(tc.challenge,s,r,t)),u=this.finalizeSig(o,f,c,e);return to(u,t,r)||this.error(),u}}function tn(t,e,r){let n=t instanceof te,i=n?t:te.fromHex(t);return n&&i.assertValidity(),{...i,m:U(e),P:K(r)}}function ti(t,e,r,n){let i=m.BASE.multiplyAndAddUnsafe(e,V(r),C(-n,l.n));return!!i&&!!i.hasEvenY()&&i.x===t}async function ta(t,e,r){try{let{r:n,s:i,m:a,P:o}=tn(t,e,r),s=tt(await tl.taggedHash(tc.challenge,B(n),o.toRawX(),a));return ti(n,o,i,s)}catch(t){return!1}}function to(t,e,r){try{let{r:n,s:i,m:a,P:o}=tn(t,e,r),s=tt(tl.taggedHashSync(tc.challenge,B(n),o.toRawX(),a));return ti(n,o,i,s)}catch(t){if(t instanceof y)throw t;return!1}}let ts={Signature:te,getPublicKey:function(t){return m.fromPrivateKey(t).toRawX()},sign:async function t(t,e,r){return new tr(t,e,r).calc()},verify:ta,signSync:function(t,e,r){return new tr(t,e,r).calcSync()},verifySync:to};m.BASE._setWindowSize(8);let tf={node:a,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0},tc={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},tu={},tl={bytesToHex:S,hexToBytes:P,concatBytes:x,mod:C,invert:N,isValidPrivateKey(t){try{return V(t),!0}catch(t){return!1}},_bigintTo32Bytes:B,_normalizePrivateKey:V,hashToPrivateKey:t=>{if((t=U(t)).length<40||t.length>1024)throw Error("Expected 40-1024 bytes of private key as per FIPS 186");return B(C(R(t),l.n-s)+s)},randomBytes:(t=32)=>{if(tf.web)return tf.web.getRandomValues(new Uint8Array(t));if(tf.node){let{randomBytes:e}=tf.node;return Uint8Array.from(e(t))}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>tl.hashToPrivateKey(tl.randomBytes(40)),sha256:async(...t)=>{if(tf.web)return new Uint8Array(await tf.web.subtle.digest("SHA-256",x(...t)));if(tf.node){let{createHash:e}=tf.node,r=e("sha256");return t.forEach(t=>r.update(t)),Uint8Array.from(r.digest())}throw Error("The environment doesn't have sha256 function")},hmacSha256:async(t,...e)=>{if(tf.web){let r=await tf.web.subtle.importKey("raw",t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=x(...e);return new Uint8Array(await tf.web.subtle.sign("HMAC",r,n))}if(tf.node){let{createHmac:r}=tf.node,n=r("sha256",t);return e.forEach(t=>n.update(t)),Uint8Array.from(n.digest())}throw Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(t,...e)=>{let r=tu[t];if(void 0===r){let e=await tl.sha256(Uint8Array.from(t,t=>t.charCodeAt(0)));r=x(e,e),tu[t]=r}return tl.sha256(r,...e)},taggedHashSync:(t,...e)=>{if("function"!=typeof n)throw new y("sha256Sync is undefined, you need to set it");let r=tu[t];if(void 0===r){let e=n(Uint8Array.from(t,t=>t.charCodeAt(0)));r=x(e,e),tu[t]=r}return n(r,...e)},precompute(t=8,e=m.BASE){let r=e===m.BASE?e:new m(e.x,e.y);return r._setWindowSize(t),r.multiply(c),r}};Object.defineProperties(tl,{sha256Sync:{configurable:!1,get:()=>n,set(t){n||(n=t)}},hmacSha256Sync:{configurable:!1,get:()=>
1i,set(t){i||(i=t)}}});class th{getModulus(){return l.P}getOrder(){return l.n}validatePoint(t,e){try{let r=new m(t,e);return r.assertValidity(),r}catch{return null}}getInfinity(){return m.ZERO}decodePoint(t){return m.fromHex(t)}getGenerator(){return m.BASE}}var ty=r(20510),td=r(14884),tg=r(18983);class tm{static normalizePoint(t){return m.fromHex(t.toHex())}static createCryptoContext(){return new th}static negatePoint(t){return t.negate()}static isInfinityPoint(t){return t.equals(m.ZERO)}static multiplyPoint(t,e){return t.multiply(e)}static addPoint(t,e){return t.add(e)}static showPoint(t){let e=t.x.toString(16).substring(0,6),r=t.y.toString(16).substring(0,6);return`ECPoint(${e},${r},...)`}static testBitZeroOfFieldElem(t){return this._testBitOfFieldElem(t,0)}static _testBitOfFieldElem(t,e){return(t&BigInt(1<<e))!==0n}static getEncodedOfFieldElem(t){return tl._bigintTo32Bytes(t)}static getXCoord(t){return t.x}static getYCoord(t){return t.y}static getAffineXCoord(t){return t.x}static getAffineYCoord(t){return t.y}static hashHmacSHA512(t,e){return(0,ty.w)(tg.Zf,t,e)}static generatePbkdf2Key(t,e){return(0,td.A)(tg.Zf,t,e,{c:2048,dkLen:64})}static normalizeChars(t){return t.normalize("NFKD")}static getRandomBytes(t=32){return tl.randomBytes(t)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.