PageSourceSearch

https://app.mahojin.ai/_next/static/chunks/9347-c52eb36806fe6e3a.js

js mahojin.ai collected 2026-10-05 12:14:17 UTC 27,610 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9347],{77715:function(t,e,r){r.d(e,{_:function(){return S}});var n=r(8244),i=r(27762),o=r(25052),f=r(23455);let l=BigInt(0),u=BigInt(1);function s(t,e){let r=e.negate();return t?r:e}function a(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function d(t,e){a(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t;return{windows:r,windowSize:n,mask:(0,f.dQ)(t),maxNumber:i,shiftBy:BigInt(t)}}function c(t,e,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:f}=r,l=Number(t&i),s=t>>f;l>n&&(l-=o,s+=u);let a=e*n,d=a+Math.abs(l)-1;return{nextN:s,offset:d,isZero:0===l,isNeg:l<0,isNegF:e%2!=0,offsetF:a}}let h=new WeakMap,g=new WeakMap;function p(t){return g.get(t)||1}function y(t){return(0,o.OP)(t.Fp),(0,f.FF)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,o.kK)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function w(t){void 0!==t.lowS&&(0,f.uw)("lowS",t.lowS),void 0!==t.prehash&&(0,f.uw)("prehash",t.prehash)}class m extends Error{constructor(t=""){super(t)}}let E={Err:m,_tlv:{encode:(t,e)=>{let{Err:r}=E;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=(0,f.uz)(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?(0,f.uz)(i.length/2|128):"";return(0,f.uz)(t)+o+i+e},decode(t,e){let{Err:r}=E,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let f=e.subarray(n,n+t);if(f.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===f[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of f)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let f=e.subarray(n,n+o);if(f.length!==o)throw new r("tlv.decode: wrong value length");return{v:f,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=E;if(t<v)throw new e("integer: negative integers are not allowed");let r=(0,f.uz)(t);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=E;if(128&t[0])throw new e("invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new e("invalid signature integer: unnecessary leading zero");return(0,f.Hv)(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=E,i=(0,f.ql)("signature",t),{v:o,l:l}=n.decode(48,i);if(l.length)throw new e("invalid signature: left bytes after parsing");let{v:u,l:s}=n.decode(2,o),{v:a,l:d}=n.decode(2,s);if(d.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(a)}},hexFromSig(t){let{_tlv:e,_int:r}=E,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s));return e.encode(48,n+i)}};function b(t,e){return(0,f.ci)((0,f.tL)(t,e))}let v=BigInt(0),B=BigInt(1),x=(BigInt(2),BigInt(3)),A=BigInt(4);function S(t,e){let r=e=>(function(t){let e=function(t){let e=y(t);return(0,f.FF)(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n,nByteLength:i,nBitLength:m}=e,S=r.BYTES+1,O=2*r.BYTES+1;function I(t){return(0,o.wQ)(t,n)}function q(t){return(0,o.U_)(t,n)}let{ProjectivePoint:R,normPrivateKeyToScalar:N,weierstrassEquation:H,isWithinCurveOrder:F}=function(t){var e;let r=function(t){let e=y(t);(0,f.FF)(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}(t),{Fp:n}=r,i=(0,o.gN)(r.n,r.nBitLength),w=r.toBytes||((t,e,r)=>{let i=e.toAffine();return(0,f.eV)(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),m=r.fromBytes||(t=>{let e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.BYTES,2*n.BYTES))}});function E(t){let{a:e,b:i}=r,o=n.sqr(t),f=n.mul(o,t);return n.add(n.add(f,n.mul(t,e)),i)}function b(t,e){let r=n.sqr(e),i=E(t);return n.eql(r,i)}if(!b(r.Gx,r.Gy))throw Error("bad curve params: generator point");let S=n.mul(n.pow(r.a,x),A),O=n.mul(n.sqr(r.b),BigInt(27));if(n.is0(n.add(S,O)))throw Error("bad curve params: a or b");function I(t){let e;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:l,n:u}=r;if(n&&"bigint"!=typeof t){if((0,f._t)(t)&&(t=(0,f.ci)(t)),"string"!=typeof t||!n.includes(t.length))throw Error("invalid private key");t=t.padStart(2*i,"0")}try{e="bigint"==typeof t?t:(0,f.Hv)((0,f.ql)("private key",t,i))}catch(e){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof t)}return l&&(e=(0,o.wQ)(e,u)),(0,f.Fy)("private key",e,B,u),e}function q(t){if(!(t instanceof H))throw Error("ProjectivePoint expected")}let R=(0,f.H9)((t,e)=>{let{px:r,py:i,pz:o}=t;if(n.eql(o,n.ONE))return{x:r,y:i};let f=t.is0();null==e&&(e=f?n.ONE:n.inv(o));let l=n.mul(r,e),u=n.mul(i,e),s=n.mul(o,e);if(f)return{x:n.ZERO,y:n.ZERO};
1if(!n.eql(s,n.ONE))throw Error("invZ was invalid");return{x:l,y:u}}),N=(0,f.H9)(t=>{if(t.is0()){if(r.allowInfinityPoint&&!n.is0(t.py))return;throw Error("bad point: ZERO")}let{x:e,y:i}=t.toAffine();if(!n.isValid(e)||!n.isValid(i))throw Error("bad point: x or y not FE");if(!b(e,i))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class H{constructor(t,e,r){if(null==t||!n.isValid(t))throw Error("x required");if(null==e||!n.isValid(e)||n.is0(e))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");this.px=t,this.py=e,this.pz=r,Object.freeze(this)}static fromAffine(t){let{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw Error("invalid affine point");if(t instanceof H)throw Error("projective point not allowed");let i=t=>n.eql(t,n.ZERO);return i(e)&&i(r)?H.ZERO:new H(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=(0,o.Eg)(n,t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(H.fromAffine)}static fromHex(t){let e=H.fromAffine(m((0,f.ql)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return H.BASE.multiply(I(t))}static msm(t,e){return function(t,e,r,n){!function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})}(r,t),function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(n,e);let i=r.length,o=n.length;if(i!==o)throw Error("arrays of points and scalars must have equal length");let l=t.ZERO,u=(0,f.Dd)(BigInt(i)),s=1;u>12?s=u-3:u>4?s=u-2:u>0&&(s=2);let a=(0,f.dQ)(s),d=Array(Number(a)+1).fill(l),c=Math.floor((e.BITS-1)/s)*s,h=l;for(let t=c;t>=0;t-=s){d.fill(l);for(let e=0;e<o;e++){let i=Number(n[e]>>BigInt(t)&a);d[i]=d[i].add(r[e])}let e=l;for(let t=d.length-1,r=l;t>0;t--)r=r.add(d[t]),e=e.add(r);if(h=h.add(e),0!==t)for(let t=0;t<s;t++)h=h.double()}return h}(H,i,t,e)}_setWindowSize(t){U.setWindowSize(this,t)}assertValidity(){N(this)}hasEvenY(){let{y:t}=this.toAffine();if(n.isOdd)return!n.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){q(t);let{px:e,py:r,pz:i}=this,{px:o,py:f,pz:l}=t,u=n.eql(n.mul(e,l),n.mul(o,i)),s=n.eql(n.mul(r,l),n.mul(f,i));return u&&s}negate(){return new H(this.px,n.neg(this.py),this.pz)}double(){let{a:t,b:e}=r,i=n.mul(e,x),{px:o,py:f,pz:l}=this,u=n.ZERO,s=n.ZERO,a=n.ZERO,d=n.mul(o,o),c=n.mul(f,f),h=n.mul(l,l),g=n.mul(o,f);return g=n.add(g,g),a=n.mul(o,l),a=n.add(a,a),u=n.mul(t,a),s=n.mul(i,h),s=n.add(u,s),u=n.sub(c,s),s=n.add(c,s),s=n.mul(u,s),u=n.mul(g,u),a=n.mul(i,a),h=n.mul(t,h),g=n.sub(d,h),g=n.mul(t,g),g=n.add(g,a),a=n.add(d,d),d=n.add(a,d),d=n.add(d,h),d=n.mul(d,g),s=n.add(s,d),h=n.mul(f,l),h=n.add(h,h),d=n.mul(h,g),u=n.sub(u,d),a=n.mul(h,c),a=n.add(a,a),new H(u,s,a=n.add(a,a))}add(t){q(t);let{px:e,py:i,pz:o}=this,{px:f,py:l,pz:u}=t,s=n.ZERO,a=n.ZERO,d=n.ZERO,c=r.a,h=n.mul(r.b,x),g=n.mul(e,f),p=n.mul(i,l),y=n.mul(o,u),w=n.add(e,i),m=n.add(f,l);w=n.mul(w,m),m=n.add(g,p),w=n.sub(w,m),m=n.add(e,o);let E=n.add(f,u);return m=n.mul(m,E),E=n.add(g,y),m=n.sub(m,E),E=n.add(i,o),s=n.add(l,u),E=n.mul(E,s),s=n.add(p,y),E=n.sub(E,s),d=n.mul(c,m),s=n.mul(h,y),d=n.add(s,d),s=n.sub(p,d),d=n.add(p,d),a=n.mul(s,d),p=n.add(g,g),p=n.add(p,g),y=n.mul(c,y),m=n.mul(h,m),p=n.add(p,y),y=n.sub(g,y),y=n.mul(c,y),m=n.add(m,y),g=n.mul(p,m),a=n.add(a,g),g=n.mul(E,m),s=n.mul(w,s),s=n.sub(s,g),g=n.mul(w,p),d=n.mul(E,d),new H(s,a,d=n.add(d,g))}subtract(t){return this.add(t.negate())}is0(){return this.equals(H.ZERO)}wNAF(t){return U.wNAFCached(this,t,H.normalizeZ)}multiplyUnsafe(t){let{endo:e,n:i}=r;(0,f.Fy)("scalar",t,v,i);let o=H.ZERO;if(t===v)return o;if(this.is0()||t===B)return this;if(!e||U.hasPrecomputes(this))return U.wNAFCachedUnsafe(this,t,H.normalizeZ);let{k1neg:l,k1:u,k2neg:s,k2:a}=e.splitScalar(t),d=o,c=o,h=this;for(;u>v||a>v;)u&B&&(d=d.add(h)),a&B&&(c=c.add(h)),h=h.double(),u>>=B,a>>=B;return l&&(d=d.negate()),s&&(c=c.negate()),c=new H(n.mul(c.px,e.beta),c.py,c.pz),d.add(c)}multiply(t){let e,i;let{endo:o,n:l}=r;
1if((0,f.Fy)("scalar",t,B,l),o){let{k1neg:r,k1:f,k2neg:l,k2:u}=o.splitScalar(t),{p:s,f:a}=this.wNAF(f),{p:d,f:c}=this.wNAF(u);s=U.constTimeNegate(r,s),d=U.constTimeNegate(l,d),d=new H(n.mul(d.px,o.beta),d.py,d.pz),e=s.add(d),i=a.add(c)}else{let{p:r,f:n}=this.wNAF(t);e=r,i=n}return H.normalizeZ([e,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=H.BASE,i=(t,e)=>e!==v&&e!==B&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return R(this,t)}isTorsionFree(){let{h:t,isTorsionFree:e}=r;if(t===B)return!0;if(e)return e(H,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:e}=r;return t===B?this:e?e(H,this):this.multiplyUnsafe(r.h)}toRawBytes(t=!0){return(0,f.uw)("isCompressed",t),this.assertValidity(),w(H,this,t)}toHex(t=!0){return(0,f.uw)("isCompressed",t),(0,f.ci)(this.toRawBytes(t))}}H.BASE=new H(r.Gx,r.Gy,n.ONE),H.ZERO=new H(n.ZERO,n.ONE,n.ZERO);let{endo:F,nBitLength:z}=r,U=(e=F?Math.ceil(z/2):z,{constTimeNegate:s,hasPrecomputes:t=>1!==p(t),unsafeLadder(t,e,r=H.ZERO){let n=t;for(;e>l;)e&u&&(r=r.add(n)),n=n.double(),e>>=u;return r},precomputeWindow(t,r){let{windows:n,windowSize:i}=d(r,e),o=[],f=t,l=f;for(let t=0;t<n;t++){l=f,o.push(l);for(let t=1;t<i;t++)l=l.add(f),o.push(l);f=l.double()}return o},wNAF(t,r,n){let i=H.ZERO,o=H.BASE,f=d(t,e);for(let t=0;t<f.windows;t++){let{nextN:e,offset:l,isZero:u,isNeg:a,isNegF:d,offsetF:h}=c(n,t,f);n=e,u?o=o.add(s(d,r[h])):i=i.add(s(a,r[l]))}return{p:i,f:o}},wNAFUnsafe(t,r,n,i=H.ZERO){let o=d(t,e);for(let t=0;t<o.windows&&n!==l;t++){let{nextN:e,offset:f,isZero:l,isNeg:u}=c(n,t,o);if(n=e,!l){let t=r[f];i=i.add(u?t.negate():t)}}return i},getPrecomputes(t,e,r){let n=h.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&h.set(e,r(n))),n},wNAFCached(t,e,r){let n=p(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)},wNAFCachedUnsafe(t,e,r,n){let i=p(t);return 1===i?this.unsafeLadder(t,e,n):this.wNAFUnsafe(i,this.getPrecomputes(i,t,r),e,n)},setWindowSize(t,r){a(r,e),g.set(t,r),h.delete(t)}});return{CURVE:r,ProjectivePoint:H,normPrivateKeyToScalar:I,weierstrassEquation:E,isWithinCurveOrder:function(t){return(0,f.Z2)(t,B,r.n)}}}({...e,toBytes(t,e,n){let i=e.toAffine(),o=r.toBytes(i.x),l=f.eV;return((0,f.uw)("isCompressed",n),n)?l(Uint8Array.from([e.hasEvenY()?2:3]),o):l(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],i=t.subarray(1);if(e===S&&(2===n||3===n)){let t;let e=(0,f.Hv)(i);if(!(0,f.Z2)(e,B,r.ORDER))throw Error("Point is not on curve");let o=H(e);try{t=r.sqrt(o)}catch(t){throw Error("Point is not on curve"+(t instanceof Error?": "+t.message:""))}return(1&n)==1!=((t&B)===B)&&(t=r.neg(t)),{x:e,y:t}}if(e===O&&4===n)return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))};throw Error("invalid Point, expected length of "+S+", or uncompressed "+O+", got "+e)}}),z=(t,e,r)=>(0,f.Hv)(t.slice(e,r));class U{constructor(t,e,r){(0,f.Fy)("r",t,B,n),(0,f.Fy)("s",e,B,n),this.r=t,this.s=e,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(t){return new U(z(t=(0,f.ql)("compactSignature",t,2*i),0,i),z(t,i,2*i))}static fromDER(t){let{r:e,s:r}=E.toSig((0,f.ql)("DER",t));return new U(e,r)}assertValidity(){}addRecoveryBit(t){return new U(this.r,this.s,t)}recoverPublicKey(t){let{r:n,s:i,recovery:o}=this,l=L((0,f.ql)("msgHash",t));if(null==o||![0,1,2,3].includes(o))throw Error("recovery id invalid");let u=2===o||3===o?n+e.n:n;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let s=(1&o)==0?"02":"03",a=R.fromHex(s+b(u,r.BYTES)),d=q(u),c=I(-l*d),h=I(i*d),g=R.BASE.multiplyAndAddUnsafe(a,c,h);if(!g)throw Error("point at infinify");return g.assertValidity(),g}hasHighS(){return this.s>n>>B}normalizeS(){return this.hasHighS()?new U(this.r,I(-this.s),this.recovery):this}toDERRawBytes(){return(0,f.nr)(this.toDERHex())}toDERHex(){return E.hexFromSig(this)}toCompactRawBytes(){return(0,f.nr)(this.toCompactHex())}toCompactHex(){return b(this.r,i)+b(this.s,i)}}function P(t){if("bigint"==typeof t)return!1;if(t instanceof R)return!0;let n=(0,f.ql)("key",t).length,o=r.BYTES,l=o+1;if(!e.allowedPrivateKeyLengths&&i!==l)return n===l||n===2*o+1}let Z=e.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let e=(0,f.Hv)(t),r=8*t.length-m;return r>0?e>>BigInt(r):e},L=e.bits2int_modN||function(t){return I(Z(t))},_=(0,f.dQ)(m);function k(t){return(0,f.Fy)("num < 2^"+m,t,v,_),(0,f.tL)(t,i)}let C={lowS:e.lowS,prehash:!1},V={lowS:e.lowS,prehash:!1};return R.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return R.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(!0===P(t))throw Error("first arg must be private key");if(!1===P(e))throw Error("second arg must be public key");return R.fromHex(e).multiply(N(t)).toRawBytes(r)},sign:function(t,i,o=C){let{seed:l,k2sig:u}=function(t,i,o=C){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:u}=e,{lowS:s,prehash:a,extraEntropy:d}=o;null==s&&(s=!0),t=(0,f.ql)("msgHash",t),w(o),a&&(t=(0,f.ql)("prehashed msgHash",l(t)));let c=L(t),h=N(i),g=[k(h),k(c)];if(null!=d&&!1!==d){let t=!0===d?u(r.BYTES):d;g.push((0,f.ql)("extraEntropy",t))}return{seed:(0,f.eV)(...g),k2sig:function(t){let e=Z(t);if(!F(e))return;let r=q(e),i=R.BASE.multiply(e).toAffine(),o=I(i.x);if(o===v)return;let f=I(r*I(c+o*h));if(f===v)return;let l=(i.x===o?0:2)|Number(i.y&B),u=f;if(s&&f>n>>B)u=f>n>>B?I(-f):f,l^=1;return new U(o,u,l)}}}(t,i,o);return(0,f.n$)(e.hash.outputLen,e.nByteLength,e.hmac)(l,u)},verify:function(t,r,n,i=V){let o,l;r=(0,f.ql)("msgHash",r),n=(0,f.ql)("publicKey",n);let{lowS:u,prehash:s,format:a}=i;if(w(i),"strict"in i)throw Error("options.strict was renamed to lowS");if(void 0!==a&&"compact"!==a&&"der"!==a)throw Error("format must be compact or der");let d="string"==typeof t||(0,f._t)(t),c=!d&&!a&&"object"==typeof t&&null!==t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!d&&!c)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(c&&(l=new U(t.r,t.s)),d){try{"compact"!==a&&(l=U.fromDER(t))}catch(t){if(!(t instanceof E.Err))throw t}l||"der"===a||(l=U.fromCompact(t))}o=R.fromHex(n)}catch(t){return!1}if(!l||u&&l.hasHighS())return!1;s&&(r=e.hash(r));let{r:h,s:g}=l,p=L(r),y=q(g),m=I(p*y),b=I(h*y),v=R.BASE.multiplyAndAddUnsafe(o,m,b)?.toAffine();return!!v&&I(v.x)===h},ProjectivePoint:R,Signature:U,utils:{isValidPrivateKey(t){try{return N(t),!0}catch(t){return!1}},normPrivateKeyToScalar:N,randomPrivateKey:()=>{let t=(0,o.PS)(e.n);return(0,o.Us)(e.randomBytes(t),e.n)},precompute:(t=8,e=R.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>(0,n.b)(e,t,(0,i.eV)(...r)),randomBytes:i.O6});return{...r(e),create:r}}},25052:function(t,e,r){r.d(e,{Eg:function(){return E},OP:function(){return m},PS:function(){return x},U_:function(){return g},Us:function(){return A},gN:function(){return function t(e,r,n=!1,h={}){let w;if(e<=o)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:m,nByteLength:B}=v(e,r);if(B>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let x=Object.freeze({ORDER:e,isLE:n,BITS:m,BYTES:B,MASK:(0,i.dQ)(m),ZERO:o,ONE:f,create:t=>c(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return o<=t&&t<e},is0:t=>t===o,isOdd:t=>(t&f)===f,neg:t=>c(-t,e),eql:(t,e)=>t===e,sqr:t=>c(t*t,e),add:(t,r)=>c(t+r,e),sub:(t,r)=>c(t-r,e),mul:(t,r)=>c(t*r,e),pow:(t,e)=>(function(t,e,r){if(r<o)throw Error("invalid exponent, negatives unsupported");if(r===o)return t.ONE;if(r===f)return e;let n=t.ONE,i=e;for(;r>o;)r&f&&(n=t.mul(n,i)),i=t.sqr(i),r>>=f;return n})(x,t,e),div:(t,r)=>c(t*g(r,e),e),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:t=>g(t,e),sqrt:h.sqrt||(r=>(!w&&(w=e%s===u?p:e%d===a?y:function(e){if(e<BigInt(3))throw Error("sqrt is not defined for small field");let r=e-f,n=0;for(;r%l===o;)r/=l,n++;let i=l,u=t(e);for(;
vendor: 1,587 bytes, line 1
11===b(u,i);)if(i++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return p;let s=u.pow(i,r),a=(r+f)/l;return function(t,e){if(t.is0(e))return e;if(1!==b(t,e))throw Error("Cannot find square root");let i=n,o=t.mul(t.ONE,s),l=t.pow(e,r),u=t.pow(e,a);for(;!t.eql(l,t.ONE);){if(t.is0(l))return t.ZERO;let e=1,r=t.sqr(l);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw Error("Cannot find square root");let n=f<<BigInt(i-e-1),s=t.pow(o,n);i=e,o=t.sqr(s),l=t.mul(l,o),u=t.mul(u,s)}return u}}(e)),w(x,r))),toBytes:t=>n?(0,i.S5)(t,B):(0,i.tL)(t,B),fromBytes:t=>{if(t.length!==B)throw Error("Field.fromBytes: expected "+B+" bytes, got "+t.length);return n?(0,i.ty)(t):(0,i.Hv)(t)},invertBatch:t=>E(x,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(x)}},kK:function(){return v},oA:function(){return h},wQ:function(){return c}});var n=r(27762),i=r(23455);let o=BigInt(0),f=BigInt(1),l=BigInt(2),u=BigInt(3),s=BigInt(4),a=BigInt(5),d=BigInt(8);function c(t,e){let r=t%e;return r>=o?r:e+r}function h(t,e,r){let n=t;for(;e-- >o;)n*=n,n%=r;return n}function g(t,e){if(t===o)throw Error("invert: expected non-zero number");if(e<=o)throw Error("invert: expected positive modulus, got "+e);let r=c(t,e),n=e,i=o,l=f,u=f,s=o;for(;r!==o;){let t=n/r,e=n%r,o=i-u*t,f=l-s*t;n=r,r=e,i=u,l=s,u=o,s=f}if(n!==f)throw Error("invert: does not exist");return c(i,e)}function p(t,e){let r=(t.ORDER+f)/s,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw Error("Cannot find square root");return n}function y(t,e){let r=(t.ORDER-a)/d,n=t.mul(e,l),i=t.pow(n,r),o=t.mul(e,i),f=t.mul(t.mul(o,l),i),u=t.mul(
1o,t.sub(f,t.ONE));if(!t.eql(t.sqr(u),e))throw Error("Cannot find square root");return u}let w=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(t){let e=w.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,i.FF)(t,e)}function E(t,e,r=!1){let n=Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function b(t,e){let r=(t.ORDER-f)/l,n=t.pow(e,r),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),u=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!u)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function v(t,e){void 0!==e&&(0,n.k8)(e);let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function B(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function x(t){let e=B(t);return e+Math.ceil(e/2)}function A(t,e,r=!1){let n=t.length,o=B(e),l=x(e);if(n<16||n<l||n>1024)throw Error("expected "+l+"-1024 bytes of input, got "+n);let u=c(r?(0,i.ty)(t):(0,i.Hv)(t),e-f)+f;return r?(0,i.S5)(u,o):(0,i.tL)(u,o)}},23455:function(t,e,r){r.d(e,{Dd:function(){return S},FF:function(){return H},Fy:function(){return A},H9:function(){return F},Hv:function(){return y},S5:function(){return E},Z2:function(){return x},_t:function(){return o},ci:function(){return c},dQ:function(){return O},eV:function(){return v},n$:function(){return R},nr:function(){return p},ql:function(){return b},tL:function(){return m},ty:function(){return w},uw:function(){return l},uz:function(){return u}});let n=BigInt(0),i=BigInt(1);function o(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function f(t){if(!o(t))throw Error("Uint8Array expected")}function l(t,e){if("boolean"!=typeof e)throw Error(t+" boolean expected, got "+e)}function u(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function s(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?n:BigInt("0x"+t)}let a="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,d=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function c(t){if(f(t),a)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=d[t[r]];return e}let h={_0:48,_9:57,A:65,F:70,a:97,f:102};function g(t){return t>=h._0&&t<=h._9?t-h._0:t>=h.A&&t<=h.F?t-(h.A-10):t>=h.a&&t<=h.f?t-(h.a-10):void 0}function p(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);if(a)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=g(t.charCodeAt(i)),o=g(t.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(t[i]+t[i+1])+'" at index '+i);n[e]=16*r+o}return n}function y(t){return s(c(t))}function w(t){return f(t),s(c(Uint8Array.from(t).reverse()))}function m(t,e){return p(t.toString(16).padStart(2*e,"0"))}function E(t,e){return m(t,e).reverse()}function b(t,e,r){let n;if("string"==typeof e)try{n=p(e)}catch(e){throw Error(t+" must be hex string or Uint8Array, cause: "+e)}else if(o(e))n=Uint8Array.from(e);else throw Error(t+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(t+" of length "+r+" expected, got "+i);return n}function v(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];f(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}let B=t=>"bigint"==typeof t&&n<=t;function x(t,e,r){return B(t)&&B(e)&&B(r)&&e<=t&&t<r}function A(t,e,r,n){if(!x(e,r,n))throw Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function S(t){let e;for(e=0;t>n;t>>=i,e+=1);return e}let O=t=>(i<<BigInt(t))-i,I=t=>new Uint8Array(t),q=t=>Uint8Array.from(t);function R(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=I(t),i=I(t),o=0,f=()=>{n.fill(1),i.fill(0),o=0},l=(...t)=>
1r(i,n,...t),u=(t=I(0))=>{i=l(q([0]),t),n=l(),0!==t.length&&(i=l(q([1]),t),n=l())},s=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){let e=(n=l()).slice();r.push(e),t+=n.length}return v(...r)};return(t,e)=>{let r;for(f(),u(t);!(r=e(s()));)u();return f(),r}}let N={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||o(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function H(t,e,r={}){let n=(e,r,n)=>{let i=N[r];if("function"!=typeof i)throw Error("invalid validator function");let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error("param "+String(e)+" is invalid. Expected "+r+", got "+o)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}function F(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}},39347:function(t,e,r){r.d(e,{secp256k1:function(){return h}});var n=r(56098),i=r(77715),o=r(25052);let f=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),u=BigInt(0),s=BigInt(1),a=BigInt(2),d=(t,e)=>(t+e/a)/e,c=(0,o.gN)(f,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),l=BigInt(23),u=BigInt(44),s=BigInt(88),d=t*t*t%f,h=d*d*t%f,g=(0,o.oA)(h,e,f)*h%f,p=(0,o.oA)(g,e,f)*h%f,y=(0,o.oA)(p,a,f)*d%f,w=(0,o.oA)(y,n,f)*y%f,m=(0,o.oA)(w,i,f)*w%f,E=(0,o.oA)(m,u,f)*m%f,b=(0,o.oA)(E,s,f)*E%f,v=(0,o.oA)(b,u,f)*m%f,B=(0,o.oA)(v,e,f)*h%f,x=(0,o.oA)(B,l,f)*w%f,A=(0,o.oA)(x,r,f)*d%f,S=(0,o.oA)(A,a,f);if(!c.eql(c.sqr(S),t))throw Error("Cannot find square root");return S}}),h=(0,i._)({a:u,b:BigInt(7),Fp:c,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-s*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),f=d(e*t,l),u=d(-r*t,l),a=(0,o.wQ)(t-f*e-u*n,l),c=(0,o.wQ)(-f*r-u*e,l),h=a>i,g=c>i;if(h&&(a=l-a),g&&(c=l-c),a>i||c>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:a,k2neg:g,k2:c}}}},n.JQ)},8244:function(t,e,r){r.d(e,{b:function(){return o}});var n=r(27762);class i extends n.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.z3)(t);let r=(0,n.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=t.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),(0,n.ru)(o)}update(t){return(0,n.$h)(this),this.iHash.update(t),this}digestInto(t){(0,n.$h)(this),(0,n.gk)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:f}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=f,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let o=(t,e,r)=>new i(t,e).update(r).digest();o.create=(t,e)=>new i(t,e)}}]);

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.