lakutata 0.0.3-alpha.3 → 0.0.3-alpha.4
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/build/Components.cjs +1 -1
- package/build/Components.js +1 -1
- package/build/Core.cjs +1 -1
- package/build/Core.js +1 -1
- package/build/Crypto.cjs +1 -1
- package/build/Crypto.js +1 -1
- package/build/Decorators.cjs +1 -1
- package/build/Decorators.js +1 -1
- package/build/Exceptions.cjs +1 -1
- package/build/Exceptions.js +1 -1
- package/build/{chunk-N7CD22D5.js → chunk-3LHWB673.js} +1 -1
- package/build/{chunk-XNELYLCA.cjs → chunk-3P5OR4TW.cjs} +1 -1
- package/build/{chunk-PEI66RDZ.js → chunk-4J4WY53D.js} +1 -1
- package/build/{chunk-5W5UXU3S.js → chunk-5U4Z2UCG.js} +1 -1
- package/build/{chunk-ITWXZKCV.js → chunk-6BZLZSNN.js} +1 -1
- package/build/{chunk-AZGD4HBQ.js → chunk-6KWUICPB.js} +1 -1
- package/build/{chunk-SOKFKVZB.cjs → chunk-6LOYDMGW.cjs} +1 -1
- package/build/{chunk-EIAHDEQ5.js → chunk-77CUWCNG.js} +1 -1
- package/build/{chunk-POQNNBAL.cjs → chunk-AQ3WYOB3.cjs} +1 -1
- package/build/{chunk-6LD76WT4.cjs → chunk-BJVJQVSR.cjs} +1 -1
- package/build/{chunk-64ABOKJB.js → chunk-CDFQ6KBS.js} +1 -1
- package/build/{chunk-JC6E7ABF.cjs → chunk-FFKJBPSX.cjs} +1 -1
- package/build/{chunk-MHD2XOSL.cjs → chunk-FNTAIZKQ.cjs} +1 -1
- package/build/{chunk-MKCDNGXU.cjs → chunk-GJJDMJC6.cjs} +1 -1
- package/build/{chunk-IV4O5INQ.cjs → chunk-JHE6H77J.cjs} +1 -1
- package/build/{chunk-DOD635FV.cjs → chunk-KAUQDOIE.cjs} +1 -1
- package/build/{chunk-4GATIYHI.cjs → chunk-KPVZ36FS.cjs} +1 -1
- package/build/{chunk-SYLUCKJI.cjs → chunk-L4CJJANR.cjs} +1 -1
- package/build/{chunk-DKI6CTAB.cjs → chunk-LTYQTBWI.cjs} +1 -1
- package/build/{chunk-FDST452Z.js → chunk-M3PKOSRO.js} +1 -1
- package/build/{chunk-4IEQUHJX.cjs → chunk-MGUDOG42.cjs} +1 -1
- package/build/{chunk-KXLH5UR3.js → chunk-N3ZCB5SH.js} +1 -1
- package/build/{chunk-AVZRYLG2.cjs → chunk-QTITFIZP.cjs} +1 -1
- package/build/{chunk-2DNU37D4.cjs → chunk-RTLGWIRF.cjs} +1 -1
- package/build/{chunk-MGHXVVHX.js → chunk-TDHPACZH.js} +1 -1
- package/build/{chunk-ILQKDWJ2.js → chunk-W2GITDZA.js} +1 -1
- package/build/{chunk-VNQEZMIU.js → chunk-X4VRHG3U.js} +1 -1
- package/build/{chunk-JMPRCWIZ.js → chunk-XSYGZTQV.js} +1 -1
- package/build/{chunk-3RSCN4SX.js → chunk-YHNNEH2B.js} +1 -1
- package/build/{chunk-IPLYCNRI.js → chunk-YQFTSNSQ.js} +1 -1
- package/build/decorators/DependencyInjectionDecorators.cjs +1 -1
- package/build/decorators/DependencyInjectionDecorators.js +1 -1
- package/build/lib/Application.cjs +1 -1
- package/build/lib/Application.js +1 -1
- package/build/lib/base/BaseObject.cjs +1 -1
- package/build/lib/base/BaseObject.js +1 -1
- package/build/lib/base/Component.cjs +1 -1
- package/build/lib/base/Component.js +1 -1
- package/build/lib/base/Container.cjs +1 -1
- package/build/lib/base/Container.js +1 -1
- package/build/lib/base/Controller.cjs +1 -1
- package/build/lib/base/Controller.js +1 -1
- package/build/lib/base/Model.cjs +1 -1
- package/build/lib/base/Model.js +1 -1
- package/build/lib/base/Module.cjs +1 -1
- package/build/lib/base/Module.js +1 -1
- package/build/lib/base/abstracts/AsymmetricEncryption.cjs +1 -1
- package/build/lib/base/abstracts/AsymmetricEncryption.js +1 -1
- package/build/lib/base/abstracts/Interval.cjs +1 -1
- package/build/lib/base/abstracts/Interval.js +1 -1
- package/build/lib/base/abstracts/SymmetricEncryption.cjs +1 -1
- package/build/lib/base/abstracts/SymmetricEncryption.js +1 -1
- package/build/lib/components/Formatter.cjs +1 -1
- package/build/lib/components/Formatter.js +1 -1
- package/build/lib/components/Logger.cjs +1 -1
- package/build/lib/components/Logger.js +1 -1
- package/build/lib/crypto/RSA.cjs +1 -1
- package/build/lib/crypto/RSA.js +1 -1
- package/build/lib/crypto/SM2.cjs +1 -1
- package/build/lib/crypto/SM2.js +1 -1
- package/build/lib/crypto/aes/AES128.cjs +1 -1
- package/build/lib/crypto/aes/AES128.js +1 -1
- package/build/lib/crypto/aes/AES192.cjs +1 -1
- package/build/lib/crypto/aes/AES192.js +1 -1
- package/build/lib/crypto/aes/AES256.cjs +1 -1
- package/build/lib/crypto/aes/AES256.js +1 -1
- package/build/lib/crypto/aria/ARIA128.cjs +1 -1
- package/build/lib/crypto/aria/ARIA128.js +1 -1
- package/build/lib/crypto/aria/ARIA192.cjs +1 -1
- package/build/lib/crypto/aria/ARIA192.js +1 -1
- package/build/lib/crypto/aria/ARIA256.cjs +1 -1
- package/build/lib/crypto/aria/ARIA256.js +1 -1
- package/build/lib/crypto/camellia/CAMELLIA128.cjs +1 -1
- package/build/lib/crypto/camellia/CAMELLIA128.js +1 -1
- package/build/lib/crypto/camellia/CAMELLIA192.cjs +1 -1
- package/build/lib/crypto/camellia/CAMELLIA192.js +1 -1
- package/build/lib/crypto/camellia/CAMELLIA256.cjs +1 -1
- package/build/lib/crypto/camellia/CAMELLIA256.js +1 -1
- package/build/lib/crypto/des/DES.cjs +1 -1
- package/build/lib/crypto/des/DES.js +1 -1
- package/build/lib/crypto/des/TripleDES.cjs +1 -1
- package/build/lib/crypto/des/TripleDES.js +1 -1
- package/build/options/ApplicationOptions.cjs +1 -1
- package/build/options/ApplicationOptions.js +1 -1
- package/build/options/LoadComponentOptions.cjs +1 -1
- package/build/options/LoadComponentOptions.js +1 -1
- package/build/options/LoadEntryClassOptions.cjs +1 -1
- package/build/options/LoadEntryClassOptions.js +1 -1
- package/build/options/LoadModuleOptions.cjs +1 -1
- package/build/options/LoadModuleOptions.js +1 -1
- package/build/options/ModuleOptions.cjs +1 -1
- package/build/options/ModuleOptions.js +1 -1
- package/package.json +11 -11
package/build/Components.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLZHDDMR6cjs = require('./chunk-LZHDDMR6.cjs');require('./chunk-7EJPSBOW.cjs');require('./chunk-DBS4BLZW.cjs');require('./chunk-GUGQ2RAK.cjs');require('./chunk-6H3CPJD6.cjs');require('./chunk-J6URDFNZ.cjs');require('./chunk-6AUONCBP.cjs');require('./chunk-JPGPLKCQ.cjs');require('./chunk-KPDYKNEG.cjs');require('./chunk-K6MUN23J.cjs');require('./chunk-WPMWWK75.cjs');require('./chunk-B5IK3JG4.cjs');require('./chunk-EW6B2QXX.cjs');require('./chunk-ETJ7AGZH.cjs');require('./chunk-WUAKJB2K.cjs');require('./chunk-H3USAUPE.cjs');require('./chunk-K3XAVNT5.cjs');require('./chunk-5REFHBPZ.cjs');require('./chunk-IV2S67WA.cjs');require('./chunk-244ZITBT.cjs');require('./chunk-TI2E6XPG.cjs');require('./chunk-WRAKGFUM.cjs');require('./chunk-ZCA7EMFN.cjs');require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLZHDDMR6cjs = require('./chunk-LZHDDMR6.cjs');require('./chunk-7EJPSBOW.cjs');require('./chunk-DBS4BLZW.cjs');require('./chunk-GUGQ2RAK.cjs');require('./chunk-6H3CPJD6.cjs');require('./chunk-J6URDFNZ.cjs');require('./chunk-6AUONCBP.cjs');require('./chunk-JPGPLKCQ.cjs');require('./chunk-KPDYKNEG.cjs');require('./chunk-K6MUN23J.cjs');require('./chunk-WPMWWK75.cjs');require('./chunk-B5IK3JG4.cjs');require('./chunk-EW6B2QXX.cjs');require('./chunk-ETJ7AGZH.cjs');require('./chunk-WUAKJB2K.cjs');require('./chunk-H3USAUPE.cjs');require('./chunk-K3XAVNT5.cjs');require('./chunk-5REFHBPZ.cjs');require('./chunk-IV2S67WA.cjs');require('./chunk-244ZITBT.cjs');require('./chunk-TI2E6XPG.cjs');require('./chunk-WRAKGFUM.cjs');require('./chunk-ZCA7EMFN.cjs');require('./chunk-7FH77OZF.cjs');require('./chunk-MG6V4HH2.cjs');require('./chunk-RFSMAPCT.cjs');require('./chunk-S7RZJ2LX.cjs');require('./chunk-KNH47BUR.cjs');require('./chunk-B7ZSW5K5.cjs');require('./chunk-LUIWHT3N.cjs');require('./chunk-CPKNGXOK.cjs');require('./chunk-HZP2F3OO.cjs');require('./chunk-JJ6SSAAV.cjs');require('./chunk-3XNBIZ46.cjs');require('./chunk-24ACYUZA.cjs');require('./chunk-6SRXCN6O.cjs');require('./chunk-KYO25P7V.cjs');require('./chunk-PRMJDJ7Q.cjs');require('./chunk-GCH3XFDE.cjs');exports.Formatter = _chunkLZHDDMR6cjs.u; exports.Logger = _chunkLZHDDMR6cjs.h;
|
package/build/Components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o,u as r}from"./chunk-GGDS5TFH.js";import"./chunk-OOGHCPHA.js";import"./chunk-OML3VYM2.js";import"./chunk-JERUUEO4.js";import"./chunk-F7B3XZ2S.js";import"./chunk-6JVI4DXG.js";import"./chunk-AXUCFZ5E.js";import"./chunk-TJMFJEJZ.js";import"./chunk-KLL7MGC5.js";import"./chunk-EODGFUAT.js";import"./chunk-QLUWQDZN.js";import"./chunk-UZBAACBY.js";import"./chunk-2J4S3J5R.js";import"./chunk-CVJG3TRI.js";import"./chunk-OWYRAKXY.js";import"./chunk-RYS6BDE7.js";import"./chunk-2SHFIEYW.js";import"./chunk-2UZ55VFZ.js";import"./chunk-HYIINVCC.js";import"./chunk-2EHQIHDA.js";import"./chunk-BF3WMT5I.js";import"./chunk-6MWNAXDP.js";import"./chunk-ZEHIQL6P.js";import"./chunk-
|
|
1
|
+
import{h as o,u as r}from"./chunk-GGDS5TFH.js";import"./chunk-OOGHCPHA.js";import"./chunk-OML3VYM2.js";import"./chunk-JERUUEO4.js";import"./chunk-F7B3XZ2S.js";import"./chunk-6JVI4DXG.js";import"./chunk-AXUCFZ5E.js";import"./chunk-TJMFJEJZ.js";import"./chunk-KLL7MGC5.js";import"./chunk-EODGFUAT.js";import"./chunk-QLUWQDZN.js";import"./chunk-UZBAACBY.js";import"./chunk-2J4S3J5R.js";import"./chunk-CVJG3TRI.js";import"./chunk-OWYRAKXY.js";import"./chunk-RYS6BDE7.js";import"./chunk-2SHFIEYW.js";import"./chunk-2UZ55VFZ.js";import"./chunk-HYIINVCC.js";import"./chunk-2EHQIHDA.js";import"./chunk-BF3WMT5I.js";import"./chunk-6MWNAXDP.js";import"./chunk-ZEHIQL6P.js";import"./chunk-PNZOQ2CJ.js";import"./chunk-QUXMTYYJ.js";import"./chunk-DZHTVOAK.js";import"./chunk-YJBIHI6W.js";import"./chunk-KBD4VCFC.js";import"./chunk-CE7BFYIH.js";import"./chunk-U4WBONZT.js";import"./chunk-PJYBHOLE.js";import"./chunk-6V6T3ZWD.js";import"./chunk-BJ7J3UXP.js";import"./chunk-SVRNNZT5.js";import"./chunk-4QG3ZGNN.js";import"./chunk-NYC5Y4CJ.js";import"./chunk-M4WZIY34.js";import"./chunk-MNRWHBPD.js";import"./chunk-IJBWUUYT.js";export{r as Formatter,o as Logger};
|
package/build/Core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-ASG3FPBM.cjs');var _chunkVS7J43YAcjs = require('./chunk-VS7J43YA.cjs');var _chunk6E25234Kcjs = require('./chunk-6E25234K.cjs');require('./chunk-P3YZG5RK.cjs');require('./chunk-HHSQQQJX.cjs');require('./chunk-OZMR5HOX.cjs');require('./chunk-7SKEBRGK.cjs');require('./chunk-N5YY6475.cjs');require('./chunk-66KL65C6.cjs');require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-ASG3FPBM.cjs');var _chunkVS7J43YAcjs = require('./chunk-VS7J43YA.cjs');var _chunk6E25234Kcjs = require('./chunk-6E25234K.cjs');require('./chunk-P3YZG5RK.cjs');require('./chunk-HHSQQQJX.cjs');require('./chunk-OZMR5HOX.cjs');require('./chunk-7SKEBRGK.cjs');require('./chunk-N5YY6475.cjs');require('./chunk-66KL65C6.cjs');require('./chunk-NSJXR5E6.cjs');require('./chunk-KGX73DJM.cjs');require('./chunk-E4BVDTKN.cjs');require('./chunk-PC5J272D.cjs');require('./chunk-JT4CGUDT.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkJHE6H77Jcjs = require('./chunk-JHE6H77J.cjs');var _chunkLZHDDMR6cjs = require('./chunk-LZHDDMR6.cjs');require('./chunk-7EJPSBOW.cjs');require('./chunk-DBS4BLZW.cjs');require('./chunk-GUGQ2RAK.cjs');require('./chunk-6H3CPJD6.cjs');require('./chunk-J6URDFNZ.cjs');require('./chunk-6AUONCBP.cjs');require('./chunk-JPGPLKCQ.cjs');require('./chunk-KPDYKNEG.cjs');require('./chunk-K6MUN23J.cjs');require('./chunk-WPMWWK75.cjs');require('./chunk-B5IK3JG4.cjs');require('./chunk-EW6B2QXX.cjs');var _chunkETJ7AGZHcjs = require('./chunk-ETJ7AGZH.cjs');var _chunkWUAKJB2Kcjs = require('./chunk-WUAKJB2K.cjs');require('./chunk-H3USAUPE.cjs');require('./chunk-K3XAVNT5.cjs');require('./chunk-5REFHBPZ.cjs');require('./chunk-IV2S67WA.cjs');require('./chunk-244ZITBT.cjs');require('./chunk-WPKWNLBX.cjs');require('./chunk-KJJ2YAON.cjs');require('./chunk-KAI4ELOZ.cjs');require('./chunk-PJZV7GB7.cjs');require('./chunk-44MUEPQV.cjs');require('./chunk-Y7UZF5WX.cjs');require('./chunk-KAJSHTKY.cjs');require('./chunk-GLLJSEW2.cjs');require('./chunk-HBVN2AE5.cjs');require('./chunk-QR75NC42.cjs');require('./chunk-UHLLUT46.cjs');require('./chunk-HJTGBEZH.cjs');require('./chunk-5HZKVHTE.cjs');require('./chunk-23QFRECR.cjs');require('./chunk-TI2E6XPG.cjs');require('./chunk-WRAKGFUM.cjs');require('./chunk-ZCA7EMFN.cjs');require('./chunk-7FH77OZF.cjs');require('./chunk-MG6V4HH2.cjs');require('./chunk-RFSMAPCT.cjs');require('./chunk-S7RZJ2LX.cjs');require('./chunk-KNH47BUR.cjs');require('./chunk-B7ZSW5K5.cjs');require('./chunk-LUIWHT3N.cjs');require('./chunk-CPKNGXOK.cjs');require('./chunk-HZP2F3OO.cjs');require('./chunk-JJ6SSAAV.cjs');var _chunk3XNBIZ46cjs = require('./chunk-3XNBIZ46.cjs');require('./chunk-24ACYUZA.cjs');require('./chunk-6SRXCN6O.cjs');require('./chunk-KYO25P7V.cjs');require('./chunk-PRMJDJ7Q.cjs');require('./chunk-GCH3XFDE.cjs');exports.Application = _chunkLZHDDMR6cjs.i; exports.ApplicationOptions = _chunkLZHDDMR6cjs.g; exports.AsymmetricEncryption = _chunkJHE6H77Jcjs.a; exports.BaseObject = _chunkLZHDDMR6cjs.s; exports.Component = _chunkLZHDDMR6cjs.t; exports.Container = _chunkLZHDDMR6cjs.j; exports.Controller = _chunkLZHDDMR6cjs.d; exports.DTO = _chunkWUAKJB2Kcjs.a; exports.Exception = _chunk3XNBIZ46cjs.b; exports.Interval = _chunkVS7J43YAcjs.a; exports.LoadComponentOptions = _chunkLZHDDMR6cjs.c; exports.LoadEntryClassOptions = _chunkLZHDDMR6cjs.a; exports.LoadEntryCommonOptions = _chunkETJ7AGZHcjs.a; exports.LoadModuleOptions = _chunkLZHDDMR6cjs.b; exports.Model = _chunk6E25234Kcjs.a; exports.Module = _chunkLZHDDMR6cjs.e; exports.ModuleOptions = _chunkLZHDDMR6cjs.f; exports.SymmetricEncryption = _chunkMGUDOG42cjs.a;
|
package/build/Core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-TXOLRW7N.js";import{a as p}from"./chunk-AIC4HPTL.js";import{a as o}from"./chunk-XAZSVM5K.js";import"./chunk-A5A6OCZL.js";import"./chunk-MFIYGVH4.js";import"./chunk-ZZD7PI3G.js";import"./chunk-SNUKTS2N.js";import"./chunk-LQ6A7IUP.js";import"./chunk-ZA3NYPRR.js";import"./chunk-
|
|
1
|
+
import"./chunk-TXOLRW7N.js";import{a as p}from"./chunk-AIC4HPTL.js";import{a as o}from"./chunk-XAZSVM5K.js";import"./chunk-A5A6OCZL.js";import"./chunk-MFIYGVH4.js";import"./chunk-ZZD7PI3G.js";import"./chunk-SNUKTS2N.js";import"./chunk-LQ6A7IUP.js";import"./chunk-ZA3NYPRR.js";import"./chunk-NOQHPDVL.js";import"./chunk-2CX5ULFM.js";import"./chunk-QCMIPUUD.js";import"./chunk-TX3GVMK7.js";import"./chunk-LNWV44VR.js";import{a as q}from"./chunk-XSYGZTQV.js";import{a as r}from"./chunk-X4VRHG3U.js";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,i as k,j as l,s as m,t as n}from"./chunk-GGDS5TFH.js";import"./chunk-OOGHCPHA.js";import"./chunk-OML3VYM2.js";import"./chunk-JERUUEO4.js";import"./chunk-F7B3XZ2S.js";import"./chunk-6JVI4DXG.js";import"./chunk-AXUCFZ5E.js";import"./chunk-TJMFJEJZ.js";import"./chunk-KLL7MGC5.js";import"./chunk-EODGFUAT.js";import"./chunk-QLUWQDZN.js";import"./chunk-UZBAACBY.js";import"./chunk-2J4S3J5R.js";import{a as c}from"./chunk-CVJG3TRI.js";import{a as b}from"./chunk-OWYRAKXY.js";import"./chunk-RYS6BDE7.js";import"./chunk-2SHFIEYW.js";import"./chunk-2UZ55VFZ.js";import"./chunk-HYIINVCC.js";import"./chunk-2EHQIHDA.js";import"./chunk-PEYW36KJ.js";import"./chunk-M5KDIJUZ.js";import"./chunk-TRVM73BU.js";import"./chunk-Q63TNNON.js";import"./chunk-3I5WIQY7.js";import"./chunk-JS52IVWY.js";import"./chunk-4674CUKO.js";import"./chunk-6OM624AZ.js";import"./chunk-ENEO5C54.js";import"./chunk-NXURLHF6.js";import"./chunk-EEX7HBT4.js";import"./chunk-KQJ77FRL.js";import"./chunk-2EZ3NOTX.js";import"./chunk-AE32LEOP.js";import"./chunk-BF3WMT5I.js";import"./chunk-6MWNAXDP.js";import"./chunk-ZEHIQL6P.js";import"./chunk-PNZOQ2CJ.js";import"./chunk-QUXMTYYJ.js";import"./chunk-DZHTVOAK.js";import"./chunk-YJBIHI6W.js";import"./chunk-KBD4VCFC.js";import"./chunk-CE7BFYIH.js";import"./chunk-U4WBONZT.js";import"./chunk-PJYBHOLE.js";import"./chunk-6V6T3ZWD.js";import"./chunk-BJ7J3UXP.js";import{b as a}from"./chunk-SVRNNZT5.js";import"./chunk-4QG3ZGNN.js";import"./chunk-NYC5Y4CJ.js";import"./chunk-M4WZIY34.js";import"./chunk-MNRWHBPD.js";import"./chunk-IJBWUUYT.js";export{k as Application,j as ApplicationOptions,r as AsymmetricEncryption,m as BaseObject,n as Component,l as Container,g as Controller,b as DTO,a as Exception,p as Interval,f as LoadComponentOptions,d as LoadEntryClassOptions,c as LoadEntryCommonOptions,e as LoadModuleOptions,o as Model,h as Module,i as ModuleOptions,q as SymmetricEncryption};
|
package/build/Crypto.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAQ3WYOB3cjs = require('./chunk-AQ3WYOB3.cjs');var _chunkRTLGWIRFcjs = require('./chunk-RTLGWIRF.cjs');var _chunkBJVJQVSRcjs = require('./chunk-BJVJQVSR.cjs');var _chunkL4CJJANRcjs = require('./chunk-L4CJJANR.cjs');var _chunkKAUQDOIEcjs = require('./chunk-KAUQDOIE.cjs');var _chunkFNTAIZKQcjs = require('./chunk-FNTAIZKQ.cjs');var _chunkGJJDMJC6cjs = require('./chunk-GJJDMJC6.cjs');var _chunkKPVZ36FScjs = require('./chunk-KPVZ36FS.cjs');var _chunk6LOYDMGWcjs = require('./chunk-6LOYDMGW.cjs');require('./chunk-JXEPU67W.cjs');var _chunkQTITFIZPcjs = require('./chunk-QTITFIZP.cjs');var _chunk3P5OR4TWcjs = require('./chunk-3P5OR4TW.cjs');var _chunkFFKJBPSXcjs = require('./chunk-FFKJBPSX.cjs');var _chunkLTYQTBWIcjs = require('./chunk-LTYQTBWI.cjs');require('./chunk-MGUDOG42.cjs');require('./chunk-JHE6H77J.cjs');require('./chunk-WPKWNLBX.cjs');require('./chunk-KJJ2YAON.cjs');require('./chunk-KAI4ELOZ.cjs');require('./chunk-PJZV7GB7.cjs');require('./chunk-44MUEPQV.cjs');require('./chunk-Y7UZF5WX.cjs');require('./chunk-KAJSHTKY.cjs');require('./chunk-GLLJSEW2.cjs');require('./chunk-HBVN2AE5.cjs');require('./chunk-QR75NC42.cjs');require('./chunk-UHLLUT46.cjs');require('./chunk-HJTGBEZH.cjs');require('./chunk-5HZKVHTE.cjs');require('./chunk-23QFRECR.cjs');require('./chunk-3XNBIZ46.cjs');require('./chunk-24ACYUZA.cjs');require('./chunk-6SRXCN6O.cjs');require('./chunk-KYO25P7V.cjs');require('./chunk-PRMJDJ7Q.cjs');require('./chunk-GCH3XFDE.cjs');exports.AES128 = _chunkGJJDMJC6cjs.a; exports.AES192 = _chunkKPVZ36FScjs.a; exports.AES256 = _chunk6LOYDMGWcjs.a; exports.ARIA128 = _chunkQTITFIZPcjs.a; exports.ARIA192 = _chunk3P5OR4TWcjs.a; exports.ARIA256 = _chunkAQ3WYOB3cjs.a; exports.CAMELLIA128 = _chunkRTLGWIRFcjs.a; exports.CAMELLIA192 = _chunkBJVJQVSRcjs.a; exports.CAMELLIA256 = _chunkL4CJJANRcjs.a; exports.DES = _chunkKAUQDOIEcjs.a; exports.RSA = _chunkFFKJBPSXcjs.a; exports.SM2 = _chunkLTYQTBWIcjs.a; exports.TripleDES = _chunkFNTAIZKQcjs.a;
|
package/build/Crypto.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as f}from"./chunk-W2GITDZA.js";import{a as x}from"./chunk-YHNNEH2B.js";import{a as E}from"./chunk-4J4WY53D.js";import{a as I}from"./chunk-YQFTSNSQ.js";import{a as A}from"./chunk-3LHWB673.js";import{a as e}from"./chunk-77CUWCNG.js";import{a as r}from"./chunk-TDHPACZH.js";import{a as o}from"./chunk-N3ZCB5SH.js";import{a as p}from"./chunk-CDFQ6KBS.js";import"./chunk-NII7JZ5T.js";import{a as m}from"./chunk-6KWUICPB.js";import{a as t}from"./chunk-5U4Z2UCG.js";import{a as L}from"./chunk-M3PKOSRO.js";import{a as S}from"./chunk-6BZLZSNN.js";import"./chunk-XSYGZTQV.js";import"./chunk-X4VRHG3U.js";import"./chunk-PEYW36KJ.js";import"./chunk-M5KDIJUZ.js";import"./chunk-TRVM73BU.js";import"./chunk-Q63TNNON.js";import"./chunk-3I5WIQY7.js";import"./chunk-JS52IVWY.js";import"./chunk-4674CUKO.js";import"./chunk-6OM624AZ.js";import"./chunk-ENEO5C54.js";import"./chunk-NXURLHF6.js";import"./chunk-EEX7HBT4.js";import"./chunk-KQJ77FRL.js";import"./chunk-2EZ3NOTX.js";import"./chunk-AE32LEOP.js";import"./chunk-SVRNNZT5.js";import"./chunk-4QG3ZGNN.js";import"./chunk-NYC5Y4CJ.js";import"./chunk-M4WZIY34.js";import"./chunk-MNRWHBPD.js";import"./chunk-IJBWUUYT.js";export{r as AES128,o as AES192,p as AES256,m as ARIA128,t as ARIA192,f as ARIA256,x as CAMELLIA128,E as CAMELLIA192,I as CAMELLIA256,A as DES,L as RSA,S as SM2,e as TripleDES};
|
package/build/Decorators.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIIKH7XXRcjs = require('./chunk-IIKH7XXR.cjs');var _chunkLZHDDMR6cjs = require('./chunk-LZHDDMR6.cjs');require('./chunk-7EJPSBOW.cjs');require('./chunk-DBS4BLZW.cjs');require('./chunk-GUGQ2RAK.cjs');require('./chunk-6H3CPJD6.cjs');require('./chunk-J6URDFNZ.cjs');require('./chunk-6AUONCBP.cjs');require('./chunk-JPGPLKCQ.cjs');require('./chunk-KPDYKNEG.cjs');require('./chunk-K6MUN23J.cjs');require('./chunk-WPMWWK75.cjs');require('./chunk-B5IK3JG4.cjs');require('./chunk-EW6B2QXX.cjs');require('./chunk-ETJ7AGZH.cjs');require('./chunk-WUAKJB2K.cjs');require('./chunk-H3USAUPE.cjs');require('./chunk-K3XAVNT5.cjs');var _chunk5REFHBPZcjs = require('./chunk-5REFHBPZ.cjs');require('./chunk-IV2S67WA.cjs');require('./chunk-244ZITBT.cjs');require('./chunk-TI2E6XPG.cjs');require('./chunk-WRAKGFUM.cjs');require('./chunk-ZCA7EMFN.cjs');require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIIKH7XXRcjs = require('./chunk-IIKH7XXR.cjs');var _chunkLZHDDMR6cjs = require('./chunk-LZHDDMR6.cjs');require('./chunk-7EJPSBOW.cjs');require('./chunk-DBS4BLZW.cjs');require('./chunk-GUGQ2RAK.cjs');require('./chunk-6H3CPJD6.cjs');require('./chunk-J6URDFNZ.cjs');require('./chunk-6AUONCBP.cjs');require('./chunk-JPGPLKCQ.cjs');require('./chunk-KPDYKNEG.cjs');require('./chunk-K6MUN23J.cjs');require('./chunk-WPMWWK75.cjs');require('./chunk-B5IK3JG4.cjs');require('./chunk-EW6B2QXX.cjs');require('./chunk-ETJ7AGZH.cjs');require('./chunk-WUAKJB2K.cjs');require('./chunk-H3USAUPE.cjs');require('./chunk-K3XAVNT5.cjs');var _chunk5REFHBPZcjs = require('./chunk-5REFHBPZ.cjs');require('./chunk-IV2S67WA.cjs');require('./chunk-244ZITBT.cjs');require('./chunk-TI2E6XPG.cjs');require('./chunk-WRAKGFUM.cjs');require('./chunk-ZCA7EMFN.cjs');require('./chunk-7FH77OZF.cjs');require('./chunk-MG6V4HH2.cjs');require('./chunk-RFSMAPCT.cjs');require('./chunk-S7RZJ2LX.cjs');require('./chunk-KNH47BUR.cjs');require('./chunk-B7ZSW5K5.cjs');require('./chunk-LUIWHT3N.cjs');require('./chunk-CPKNGXOK.cjs');require('./chunk-HZP2F3OO.cjs');require('./chunk-JJ6SSAAV.cjs');require('./chunk-3XNBIZ46.cjs');require('./chunk-24ACYUZA.cjs');require('./chunk-6SRXCN6O.cjs');require('./chunk-KYO25P7V.cjs');require('./chunk-PRMJDJ7Q.cjs');require('./chunk-GCH3XFDE.cjs');exports.Accept = _chunk5REFHBPZcjs.c; exports.Action = _chunkIIKH7XXRcjs.a; exports.Configurable = _chunkLZHDDMR6cjs.r; exports.Expect = _chunk5REFHBPZcjs.b; exports.IndexSignature = _chunk5REFHBPZcjs.a; exports.Inject = _chunkLZHDDMR6cjs.o; exports.InjectApp = _chunkLZHDDMR6cjs.p; exports.InjectModule = _chunkLZHDDMR6cjs.q; exports.Lifetime = _chunkLZHDDMR6cjs.k; exports.Return = _chunk5REFHBPZcjs.d; exports.Scoped = _chunkLZHDDMR6cjs.n; exports.Singleton = _chunkLZHDDMR6cjs.l; exports.Transient = _chunkLZHDDMR6cjs.m;
|
package/build/Decorators.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./chunk-SX2MWRIL.js";import{k as t,l as e,m as f,n as x,o as i,p as a,q as b,r as c}from"./chunk-GGDS5TFH.js";import"./chunk-OOGHCPHA.js";import"./chunk-OML3VYM2.js";import"./chunk-JERUUEO4.js";import"./chunk-F7B3XZ2S.js";import"./chunk-6JVI4DXG.js";import"./chunk-AXUCFZ5E.js";import"./chunk-TJMFJEJZ.js";import"./chunk-KLL7MGC5.js";import"./chunk-EODGFUAT.js";import"./chunk-QLUWQDZN.js";import"./chunk-UZBAACBY.js";import"./chunk-2J4S3J5R.js";import"./chunk-CVJG3TRI.js";import"./chunk-OWYRAKXY.js";import"./chunk-RYS6BDE7.js";import"./chunk-2SHFIEYW.js";import{a as o,b as r,c as m,d as p}from"./chunk-2UZ55VFZ.js";import"./chunk-HYIINVCC.js";import"./chunk-2EHQIHDA.js";import"./chunk-BF3WMT5I.js";import"./chunk-6MWNAXDP.js";import"./chunk-ZEHIQL6P.js";import"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-SX2MWRIL.js";import{k as t,l as e,m as f,n as x,o as i,p as a,q as b,r as c}from"./chunk-GGDS5TFH.js";import"./chunk-OOGHCPHA.js";import"./chunk-OML3VYM2.js";import"./chunk-JERUUEO4.js";import"./chunk-F7B3XZ2S.js";import"./chunk-6JVI4DXG.js";import"./chunk-AXUCFZ5E.js";import"./chunk-TJMFJEJZ.js";import"./chunk-KLL7MGC5.js";import"./chunk-EODGFUAT.js";import"./chunk-QLUWQDZN.js";import"./chunk-UZBAACBY.js";import"./chunk-2J4S3J5R.js";import"./chunk-CVJG3TRI.js";import"./chunk-OWYRAKXY.js";import"./chunk-RYS6BDE7.js";import"./chunk-2SHFIEYW.js";import{a as o,b as r,c as m,d as p}from"./chunk-2UZ55VFZ.js";import"./chunk-HYIINVCC.js";import"./chunk-2EHQIHDA.js";import"./chunk-BF3WMT5I.js";import"./chunk-6MWNAXDP.js";import"./chunk-ZEHIQL6P.js";import"./chunk-PNZOQ2CJ.js";import"./chunk-QUXMTYYJ.js";import"./chunk-DZHTVOAK.js";import"./chunk-YJBIHI6W.js";import"./chunk-KBD4VCFC.js";import"./chunk-CE7BFYIH.js";import"./chunk-U4WBONZT.js";import"./chunk-PJYBHOLE.js";import"./chunk-6V6T3ZWD.js";import"./chunk-BJ7J3UXP.js";import"./chunk-SVRNNZT5.js";import"./chunk-4QG3ZGNN.js";import"./chunk-NYC5Y4CJ.js";import"./chunk-M4WZIY34.js";import"./chunk-MNRWHBPD.js";import"./chunk-IJBWUUYT.js";export{m as Accept,d as Action,c as Configurable,r as Expect,o as IndexSignature,i as Inject,a as InjectApp,b as InjectModule,t as Lifetime,p as Return,x as Scoped,e as Singleton,f as Transient};
|
package/build/Exceptions.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWPKWNLBXcjs = require('./chunk-WPKWNLBX.cjs');var _chunkKJJ2YAONcjs = require('./chunk-KJJ2YAON.cjs');var _chunkKAI4ELOZcjs = require('./chunk-KAI4ELOZ.cjs');var _chunkPJZV7GB7cjs = require('./chunk-PJZV7GB7.cjs');var _chunk44MUEPQVcjs = require('./chunk-44MUEPQV.cjs');var _chunkY7UZF5WXcjs = require('./chunk-Y7UZF5WX.cjs');var _chunkKAJSHTKYcjs = require('./chunk-KAJSHTKY.cjs');var _chunkGLLJSEW2cjs = require('./chunk-GLLJSEW2.cjs');var _chunkHBVN2AE5cjs = require('./chunk-HBVN2AE5.cjs');var _chunkQR75NC42cjs = require('./chunk-QR75NC42.cjs');var _chunkUHLLUT46cjs = require('./chunk-UHLLUT46.cjs');var _chunkHJTGBEZHcjs = require('./chunk-HJTGBEZH.cjs');var _chunk5HZKVHTEcjs = require('./chunk-5HZKVHTE.cjs');var _chunk23QFRECRcjs = require('./chunk-23QFRECR.cjs');var _chunkTI2E6XPGcjs = require('./chunk-TI2E6XPG.cjs');var _chunkWRAKGFUMcjs = require('./chunk-WRAKGFUM.cjs');var _chunkZCA7EMFNcjs = require('./chunk-ZCA7EMFN.cjs');var _chunk7FH77OZFcjs = require('./chunk-7FH77OZF.cjs');var _chunkMG6V4HH2cjs = require('./chunk-MG6V4HH2.cjs');var _chunkRFSMAPCTcjs = require('./chunk-RFSMAPCT.cjs');var _chunkS7RZJ2LXcjs = require('./chunk-S7RZJ2LX.cjs');var _chunkKNH47BURcjs = require('./chunk-KNH47BUR.cjs');var _chunkB7ZSW5K5cjs = require('./chunk-B7ZSW5K5.cjs');var _chunkLUIWHT3Ncjs = require('./chunk-LUIWHT3N.cjs');var _chunkCPKNGXOKcjs = require('./chunk-CPKNGXOK.cjs');var _chunkJJ6SSAAVcjs = require('./chunk-JJ6SSAAV.cjs');require('./chunk-3XNBIZ46.cjs');require('./chunk-24ACYUZA.cjs');require('./chunk-6SRXCN6O.cjs');require('./chunk-KYO25P7V.cjs');require('./chunk-PRMJDJ7Q.cjs');require('./chunk-GCH3XFDE.cjs');exports.AsymmetricDecryptException = _chunk23QFRECRcjs.a; exports.AsymmetricEncryptException = _chunkY7UZF5WXcjs.a; exports.AsymmetricSignException = _chunkKAJSHTKYcjs.a; exports.AsymmetricVerifyException = _chunkGLLJSEW2cjs.a; exports.DependencyInjectionException = _chunkLUIWHT3Ncjs.a; exports.DuplicateControllerActionPatternException = _chunkZCA7EMFNcjs.a; exports.DynamicRegisterControllerNotAllowException = _chunkTI2E6XPGcjs.a; exports.InvalidAsymmetricEncryptKeyPairException = _chunkHBVN2AE5cjs.a; exports.InvalidAsymmetricEncryptPrivateKeyException = _chunkQR75NC42cjs.a; exports.InvalidAsymmetricEncryptPublicKeyException = _chunkUHLLUT46cjs.a; exports.InvalidConfigurableValueException = _chunkCPKNGXOKcjs.a; exports.InvalidDTOValueException = _chunk7FH77OZFcjs.a; exports.InvalidGlobStringException = _chunkMG6V4HH2cjs.a; exports.InvalidMethodAcceptException = _chunkS7RZJ2LXcjs.a; exports.InvalidMethodReturnException = _chunkKNH47BURcjs.a; exports.InvalidSymmetricCipherIVLengthException = _chunkWPKWNLBXcjs.a; exports.InvalidSymmetricCipherKeyLengthException = _chunkKJJ2YAONcjs.a; exports.InvalidValueException = _chunkB7ZSW5K5cjs.a; exports.MethodNotFoundException = _chunkRFSMAPCTcjs.a; exports.NoAsymmetricEncryptPrivateKeyException = _chunkHJTGBEZHcjs.a; exports.NoAsymmetricEncryptPublicKeyException = _chunk5HZKVHTEcjs.a; exports.NoMatchedControllerActionPatternException = _chunkWRAKGFUMcjs.a; exports.NotSupportCipherException = _chunkKAI4ELOZcjs.a; exports.NotSupportHashException = _chunkJJ6SSAAVcjs.a; exports.SymmetricDecryptException = _chunkPJZV7GB7cjs.a; exports.SymmetricEncryptException = _chunk44MUEPQVcjs.a;
|
package/build/Exceptions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as l}from"./chunk-PEYW36KJ.js";import{a as f}from"./chunk-M5KDIJUZ.js";import{a}from"./chunk-TRVM73BU.js";import{a as d}from"./chunk-Q63TNNON.js";import{a as v}from"./chunk-3I5WIQY7.js";import{a as S}from"./chunk-JS52IVWY.js";import{a as N}from"./chunk-4674CUKO.js";import{a as P}from"./chunk-6OM624AZ.js";import{a as h}from"./chunk-ENEO5C54.js";import{a as s}from"./chunk-NXURLHF6.js";import{a as u}from"./chunk-EEX7HBT4.js";import{a as I}from"./chunk-KQJ77FRL.js";import{a as A}from"./chunk-2EZ3NOTX.js";import{a as C}from"./chunk-AE32LEOP.js";import{a as m}from"./chunk-BF3WMT5I.js";import{a as c}from"./chunk-6MWNAXDP.js";import{a as x}from"./chunk-ZEHIQL6P.js";import{a as r}from"./chunk-PNZOQ2CJ.js";import{a as n}from"./chunk-QUXMTYYJ.js";import{a as o}from"./chunk-DZHTVOAK.js";import{a as p}from"./chunk-YJBIHI6W.js";import{a as i}from"./chunk-KBD4VCFC.js";import{a as e}from"./chunk-CE7BFYIH.js";import{a as t}from"./chunk-U4WBONZT.js";import{a as E}from"./chunk-PJYBHOLE.js";import{a as y}from"./chunk-BJ7J3UXP.js";import"./chunk-SVRNNZT5.js";import"./chunk-4QG3ZGNN.js";import"./chunk-NYC5Y4CJ.js";import"./chunk-M4WZIY34.js";import"./chunk-MNRWHBPD.js";import"./chunk-IJBWUUYT.js";export{C as AsymmetricDecryptException,S as AsymmetricEncryptException,N as AsymmetricSignException,P as AsymmetricVerifyException,t as DependencyInjectionException,x as DuplicateControllerActionPatternException,m as DynamicRegisterControllerNotAllowException,h as InvalidAsymmetricEncryptKeyPairException,s as InvalidAsymmetricEncryptPrivateKeyException,u as InvalidAsymmetricEncryptPublicKeyException,E as InvalidConfigurableValueException,r as InvalidDTOValueException,n as InvalidGlobStringException,p as InvalidMethodAcceptException,i as InvalidMethodReturnException,l as InvalidSymmetricCipherIVLengthException,f as InvalidSymmetricCipherKeyLengthException,e as InvalidValueException,o as MethodNotFoundException,I as NoAsymmetricEncryptPrivateKeyException,A as NoAsymmetricEncryptPublicKeyException,c as NoMatchedControllerActionPatternException,a as NotSupportCipherException,y as NotSupportHashException,d as SymmetricDecryptException,v as SymmetricEncryptException};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-XSYGZTQV.js";import{a as o,e as h}from"./chunk-IJBWUUYT.js";var r=h(u(),1);var t=class t extends n{ivLength=8;keyLength=16;constructor(s,e){if(super(),!arguments.length)return;let i=e===void 0,c=`des-ede-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}};o(t,"DES");var l=t;export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r= (_class =class r extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=24}constructor(c,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let t=e===void 0,s=`aria-192-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, r,"ARIA192");var i=r;exports.a = i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-XSYGZTQV.js";import{a as n}from"./chunk-IJBWUUYT.js";var r=class r extends o{ivLength=16;keyLength=24;constructor(c,e){if(super(),!arguments.length)return;let t=e===void 0,s=`camellia-192-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}};n(r,"CAMELLIA192");var i=r;export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-XSYGZTQV.js";import{a as n}from"./chunk-IJBWUUYT.js";var r=class r extends o{ivLength=16;keyLength=24;constructor(c,e){if(super(),!arguments.length)return;let t=e===void 0,s=`aria-192-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}};n(r,"ARIA192");var i=r;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-VNQEZMIU.js";import{a as l,d as Ge}from"./chunk-IJBWUUYT.js";var pt={};Ge(pt,{bitGet:()=>en,bitLen:()=>tn,bitMask:()=>It,bitSet:()=>nn,bytesToHex:()=>Q,bytesToNumberBE:()=>ot,bytesToNumberLE:()=>_t,concatBytes:()=>_,createHmacDrbg:()=>ee,ensureBytes:()=>M,equalBytes:()=>Je,hexToBytes:()=>yt,hexToNumber:()=>R,numberToBytesBE:()=>rt,numberToBytesLE:()=>te,numberToHexUnpadded:()=>j,numberToVarBytesBE:()=>Xe,utf8ToBytes:()=>Fe,validateObject:()=>at});var Be=BigInt(0),jt=BigInt(1),We=BigInt(2),Zt=l(t=>t instanceof Uint8Array,"u8a"),Qe=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Q(t){if(!Zt(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=Qe[t[e]];return n}l(Q,"bytesToHex");function j(t){let n=t.toString(16);return n.length&1?`0${n}`:n}l(j,"numberToHexUnpadded");function R(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}l(R,"hexToNumber");function yt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let n=t.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);let e=new Uint8Array(n/2);for(let r=0;r<e.length;r++){let o=r*2,c=t.slice(o,o+2),u=Number.parseInt(c,16);if(Number.isNaN(u)||u<0)throw new Error("Invalid byte sequence");e[r]=u}return e}l(yt,"hexToBytes");function ot(t){return R(Q(t))}l(ot,"bytesToNumberBE");function _t(t){if(!Zt(t))throw new Error("Uint8Array expected");return R(Q(Uint8Array.from(t).reverse()))}l(_t,"bytesToNumberLE");function rt(t,n){return yt(t.toString(16).padStart(n*2,"0"))}l(rt,"numberToBytesBE");function te(t,n){return rt(t,n).reverse()}l(te,"numberToBytesLE");function Xe(t){return yt(j(t))}l(Xe,"numberToVarBytesBE");function M(t,n,e){let r;if(typeof n=="string")try{r=yt(n)}catch(c){throw new Error(`${t} must be valid hex string, got "${n}". Cause: ${c}`)}else if(Zt(n))r=Uint8Array.from(n);else throw new Error(`${t} must be hex string or Uint8Array`);let o=r.length;if(typeof e=="number"&&o!==e)throw new Error(`${t} expected ${e} bytes, got ${o}`);return r}l(M,"ensureBytes");function _(...t){let n=new Uint8Array(t.reduce((r,o)=>r+o.length,0)),e=0;return t.forEach(r=>{if(!Zt(r))throw new Error("Uint8Array expected");n.set(r,e),e+=r.length}),n}l(_,"concatBytes");function Je(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}l(Je,"equalBytes");function Fe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}l(Fe,"utf8ToBytes");function tn(t){let n;for(n=0;t>Be;t>>=jt,n+=1);return n}l(tn,"bitLen");function en(t,n){return t>>BigInt(n)&jt}l(en,"bitGet");var nn=l((t,n,e)=>t|(e?jt:Be)<<BigInt(n),"bitSet"),It=l(t=>(We<<BigInt(t-1))-jt,"bitMask"),Ft=l(t=>new Uint8Array(t),"u8n"),Ee=l(t=>Uint8Array.from(t),"u8fr");function ee(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Ft(t),o=Ft(t),c=0,u=l(()=>{r.fill(1),o.fill(0),c=0},"reset"),i=l((...f)=>e(o,r,...f),"h"),s=l((f=Ft())=>{o=i(Ee([0]),f),r=i(),f.length!==0&&(o=i(Ee([1]),f),r=i())},"reseed"),a=l(()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let f=0,b=[];for(;f<n;){r=i();let E=r.slice();b.push(E),f+=r.length}return _(...b)},"gen");return l((f,b)=>{u(),s(f);let E;for(;!(E=b(a()));)s();return u(),E},"genUntil")}l(ee,"createHmacDrbg");var rn={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function at(t,n,e={}){let r=l((o,c,u)=>{let i=rn[c];if(typeof i!="function")throw new Error(`Invalid validator "${c}", expected function`);let s=t[o];if(!(u&&s===void 0)&&!i(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${c}`)},"checkField");for(let[o,c]of Object.entries(n))r(o,c,!1);for(let[o,c]of Object.entries(e))r(o,c,!0);return t}l(at,"validateObject");var Z=BigInt(0),K=BigInt(1),wt=BigInt(2),on=BigInt(3),ne=BigInt(4),Se=BigInt(5),Pe=BigInt(8),sn=BigInt(9),cn=BigInt(16);function k(t,n){let e=t%n;return e>=Z?e:n+e}l(k,"mod");function un(t,n,e){if(e<=Z||n<Z)throw new Error("Expected power/modulo > 0");if(e===K)return Z;let r=K;for(;n>Z;)n&K&&(r=r*t%e),t=t*t%e,n>>=K;return r}l(un,"pow");function kt(t,n){if(t===Z||n<=Z)throw new Error(`invert: expected positive integers, got n=${t} mod=${n}`);let e=k(t,n),r=n,o=Z,c=K,u=K,i=Z;for(;e!==Z;){let a=r/e,d=r%e,f=o-u*a,b=c-i*a;r=e,e=d,o=u,c=i,u=f,i=b}if(r!==K)throw new Error("invert: does not exist");return k(o,n)}l(kt,"invert");function ln(t){let n=(t-K)/wt,e,r,o;for(e=t-K,r=0;e%wt===Z;e/=wt,r++);for(o=wt;o<t&&un(o,n,t)!==t-K;o++);if(r===1){let u=(t+K)/ne;return l(function(s,a){let d=s.pow(a,u);if(!s.eql(s.sqr(d),a))throw new Error("Cannot find square root");return d},"tonelliFast")}let c=(e+K)/wt;return l(function(i,s){if(i.pow(s,n)===i.neg(i.ONE))throw new Error("Cannot find square root");let a=r,d=i.pow(i.mul(i.ONE,o),e),f=i.pow(s,c),b=i.pow(s,e);for(;!i.eql(b,i.ONE);){if(i.eql(b,i.ZERO))return i.ZERO;let E=1;for(let x=i.sqr(b);E<a&&!i.eql(x,i.ONE);E++)x=i.sqr(x);let m=i.pow(d,K<<BigInt(a-E-1));d=i.sqr(m),f=i.mul(f,m),b=i.mul(b,d),a=E}return f},"tonelliSlow")}l(ln,"tonelliShanks");function an(t){if(t%ne===on){let n=(t+K)/ne;return l(function(r,o){let c=r.pow(o,n);if(!r.eql(r.sqr(c),o))throw new Error("Cannot find square root");return c},"sqrt3mod4")}if(t%Pe===Se){let n=(t-Se)/Pe;return l(function(r,o){let c=r.mul(o,wt),u=r.pow(c,n),i=r.mul(o,u),s=r.mul(r.mul(i,wt),u),a=r.mul(i,r.sub(s,r.ONE));if(!r.eql(r.sqr(a),o))throw new Error("Cannot find square root");return a},"sqrt5mod8")}return t%cn,ln(t)}l(an,"FpSqrt");var fn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function re(t){let n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=fn.reduce((r,o)=>(r[o]="function",r),n);return at(t,e)}l(re,"validateField");function dn(t,n,e){if(e<Z)throw new Error("Expected power > 0");if(e===Z)return t.ONE;if(e===K)return n;let r=t.ONE,o=n;for(;e>Z;)e&K&&(r=t.mul(r,o)),o=t.sqr(o),e>>=K;return r}l(dn,"FpPow");function hn(t,n){let e=new Array(n.length),r=n.reduce((c,u,i)=>t.is0(u)?c:(e[i]=c,t.mul(c,u)),t.ONE),o=t.inv(r);return n.reduceRight((c,u,i)=>t.is0(u)?c:(e[i]=t.mul(c,e[i]),t.mul(c,u)),o),e}l(hn,"FpInvertBatch");function $t(t,n){let e=n!==void 0?n:t.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}l($t,"nLength");function oe(t,n,e=!1,r={}){if(t<=Z)throw new Error(`Expected Fp ORDER > 0, got ${t}`);let{nBitLength:o,nByteLength:c}=$t(t,n);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");let u=an(t),i=Object.freeze({ORDER:t,BITS:o,BYTES:c,MASK:It(o),ZERO:Z,ONE:K,create:s=>k(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return Z<=s&&s<t},is0:s=>s===Z,isOdd:s=>(s&K)===K,neg:s=>k(-s,t),eql:(s,a)=>s===a,sqr:s=>k(s*s,t),add:(s,a)=>k(s+a,t),sub:(s,a)=>k(s-a,t),mul:(s,a)=>k(s*a,t),pow:(s,a)=>dn(i,s,a),div:(s,a)=>k(s*kt(a,t),t),sqrN:s=>s*s,addN:(s,a)=>s+a,subN:(s,a)=>s-a,mulN:(s,a)=>s*a,inv:s=>kt(s,t),sqrt:r.sqrt||(s=>u(i,s)),invertBatch:s=>hn(i,s),cmov:(s,a,d)=>d?a:s,toBytes:s=>e?te(s,c):rt(s,c),fromBytes:s=>{if(s.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${s.length}`);return e?_t(s):ot(s)}});return Object.freeze(i)}l(oe,"Field");function Ae(t,n,e=!1){t=M("privateHash",t);let r=t.length,o=$t(n).nByteLength+8;if(o<24||r<o||r>1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${r}`);let c=e?_t(t):ot(t);return k(c,n-K)+K}l(Ae,"hashToPrivateScalar");var mn=BigInt(0),ie=BigInt(1);function Te(t,n){let e=l((o,c)=>{let u=c.negate();return o?u:c},"constTimeNegate"),r=l(o=>{let c=Math.ceil(n/o)+1,u=2**(o-1);return{windows:c,windowSize:u}},"opts");return{constTimeNegate:e,unsafeLadder(o,c){let u=t.ZERO,i=o;for(;c>mn;)c&ie&&(u=u.add(i)),i=i.double(),c>>=ie;return u},precomputeWindow(o,c){let{windows:u,windowSize:i}=r(c),s=[],a=o,d=a;for(let f=0;f<u;f++){d=a,s.push(d);for(let b=1;b<i;b++)d=d.add(a),s.push(d);a=d.double()}return s},wNAF(o,c,u){let{windows:i,windowSize:s}=r(o),a=t.ZERO,d=t.BASE,f=BigInt(2**o-1),b=2**o,E=BigInt(o);for(let m=0;m<i;m++){let x=m*s,h=Number(u&f);u>>=E,h>s&&(h-=b,u+=ie);let y=x,w=x+Math.abs(h)-1,B=m%2!==0,S=h<0;h===0?d=d.add(e(B,c[y])):a=a.add(e(S,c[w]))}return{p:a,f:d}},wNAFCached(o,c,u,i){let s=o._WINDOW_SIZE||1,a=c.get(o);return a||(a=this.precomputeWindow(o,s),s!==1&&c.set(o,i(a))),this.wNAF(s,a,u)}}}l(Te,"wNAF");function se(t){return re(t.Fp),at(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$t(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}l(se,"validateBasic");function yn(t){let n=se(t);at(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:e,Fp:r,a:o}=n;if(e){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}l(yn,"validatePointOpts");var{bytesToNumberBE:pn,hexToBytes:wn}=pt,Ht,bt={Err:(Ht=class extends Error{constructor(n=""){super(n)}},l(Ht,"DERErr"),Ht),_parseInt(t){let{Err:n}=bt;if(t.length<2||t[0]!==2)throw new n("Invalid signature integer tag");let e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw new n("Invalid signature integer: wrong length");if(r[0]&128)throw new n("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:pn(r),l:t.subarray(e+2)}},toSig(t){let{Err:n}=bt,e=typeof t=="string"?wn(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new n("Invalid signature tag");if(e[1]!==r-2)throw new n("Invalid signature: incorrect length");let{d:o,l:c}=bt._parseInt(e.subarray(2)),{d:u,l:i}=bt._parseInt(c);if(i.length)throw new n("Invalid signature: left bytes after parsing");return{r:o,s:u}},hexFromSig(t){let n=l(a=>Number.parseInt(a[0],16)&8?"00"+a:a,"slice"),e=l(a=>{let d=a.toString(16);return d.length&1?`0${d}`:d},"h"),r=n(e(t.s)),o=n(e(t.r)),c=r.length/2,u=o.length/2,i=e(c),s=e(u);return`30${e(u+c+4)}02${s}${o}02${i}${r}`}},it=BigInt(0),X=BigInt(1),mr=BigInt(2),Ue=BigInt(3),yr=BigInt(4);function bn(t){let n=yn(t),{Fp:e}=n,r=n.toBytes||((x,h,y)=>{let w=h.toAffine();return _(Uint8Array.from([4]),e.toBytes(w.x),e.toBytes(w.y))}),o=n.fromBytes||(x=>{let h=x.subarray(1),y=e.fromBytes(h.subarray(0,e.BYTES)),w=e.fromBytes(h.subarray(e.BYTES,2*e.BYTES));return{x:y,y:w}});function c(x){let{a:h,b:y}=n,w=e.sqr(x),B=e.mul(w,x);return e.add(e.add(B,e.mul(x,h)),y)}if(l(c,"weierstrassEquation"),!e.eql(e.sqr(n.Gy),c(n.Gx)))throw new Error("bad generator point: equation left != right");function u(x){return typeof x=="bigint"&&it<x&&x<n.n}l(u,"isWithinCurveOrder");function i(x){if(!u(x))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}l(i,"assertGE");function s(x){let{allowedPrivateKeyLengths:h,nByteLength:y,wrapPrivateKey:w,n:B}=n;if(h&&typeof x!="bigint"){if(x instanceof Uint8Array&&(x=Q(x)),typeof x!="string"||!h.includes(x.length))throw new Error("Invalid key");x=x.padStart(y*2,"0")}let S;try{S=typeof x=="bigint"?x:ot(M("private key",x,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof x}`)}return w&&(S=k(S,B)),i(S),S}l(s,"normPrivateKeyToScalar");let a=new Map;function d(x){if(!(x instanceof f))throw new Error("ProjectivePoint expected")}l(d,"assertPrjPoint");let m=class m{constructor(h,y,w){if(this.px=h,this.py=y,this.pz=w,h==null||!e.isValid(h))throw new Error("x required");if(y==null||!e.isValid(y))throw new Error("y required");if(w==null||!e.isValid(w))throw new Error("z required")}static fromAffine(h){let{x:y,y:w}=h||{};if(!h||!e.isValid(y)||!e.isValid(w))throw new Error("invalid affine point");if(h instanceof m)throw new Error("projective point not allowed");let B=l(S=>e.eql(S,e.ZERO),"is0");return B(y)&&B(w)?m.ZERO:new m(y,w,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let y=e.invertBatch(h.map(w=>w.pz));return h.map((w,B)=>w.toAffine(y[B])).map(m.fromAffine)}static fromHex(h){let y=m.fromAffine(o(M("pointHex",h)));return y.assertValidity(),y}static fromPrivateKey(h){return m.BASE.multiply(s(h))}_setWindowSize(h){this._WINDOW_SIZE=h,a.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}let{x:h,y}=this.toAffine();if(!e.isValid(h)||!e.isValid(y))throw new Error("bad point: x or y not FE");let w=e.sqr(y),B=c(h);if(!e.eql(w,B))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(e.isOdd)return!e.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){d(h);let{px:y,py:w,pz:B}=this,{px:S,py:N,pz:U}=h,v=e.eql(e.mul(y,U),e.mul(S,B)),P=e.eql(e.mul(w,U),e.mul(N,B));return v&&P}negate(){return new m(this.px,e.neg(this.py),this.pz)}double(){let{a:h,b:y}=n,w=e.mul(y,Ue),{px:B,py:S,pz:N}=this,U=e.ZERO,v=e.ZERO,P=e.ZERO,A=e.mul(B,B),F=e.mul(S,S),O=e.mul(N,N),I=e.mul(B,S);return I=e.add(I,I),P=e.mul(B,N),P=e.add(P,P),U=e.mul(h,P),v=e.mul(w,O),v=e.add(U,v),U=e.sub(F,v),v=e.add(F,v),v=e.mul(U,v),U=e.mul(I,U),P=e.mul(w,P),O=e.mul(h,O),I=e.sub(A,O),I=e.mul(h,I),I=e.add(I,P),P=e.add(A,A),A=e.add(P,A),A=e.add(A,O),A=e.mul(A,I),v=e.add(v,A),O=e.mul(S,N),O=e.add(O,O),A=e.mul(O,I),U=e.sub(U,A),P=e.mul(O,F),P=e.add(P,P),P=e.add(P,P),new m(U,v,P)}add(h){d(h);let{px:y,py:w,pz:B}=this,{px:S,py:N,pz:U}=h,v=e.ZERO,P=e.ZERO,A=e.ZERO,F=n.a,O=e.mul(n.b,Ue),I=e.mul(y,S),Y=e.mul(w,N),D=e.mul(B,U),$=e.add(y,w),g=e.add(S,N);$=e.mul($,g),g=e.add(I,Y),$=e.sub($,g),g=e.add(y,B);let p=e.add(S,U);return g=e.mul(g,p),p=e.add(I,D),g=e.sub(g,p),p=e.add(w,B),v=e.add(N,U),p=e.mul(p,v),v=e.add(Y,D),p=e.sub(p,v),A=e.mul(F,g),v=e.mul(O,D),A=e.add(v,A),v=e.sub(Y,A),A=e.add(Y,A),P=e.mul(v,A),Y=e.add(I,I),Y=e.add(Y,I),D=e.mul(F,D),g=e.mul(O,g),Y=e.add(Y,D),D=e.sub(I,D),D=e.mul(F,D),g=e.add(g,D),I=e.mul(Y,g),P=e.add(P,I),I=e.mul(p,g),v=e.mul($,v),v=e.sub(v,I),I=e.mul($,Y),A=e.mul(p,A),A=e.add(A,I),new m(v,P,A)}subtract(h){return this.add(h.negate())}is0(){return this.equals(m.ZERO)}wNAF(h){return E.wNAFCached(this,a,h,y=>{let w=e.invertBatch(y.map(B=>B.pz));return y.map((B,S)=>B.toAffine(w[S])).map(m.fromAffine)})}multiplyUnsafe(h){let y=m.ZERO;if(h===it)return y;if(i(h),h===X)return this;let{endo:w}=n;if(!w)return E.unsafeLadder(this,h);let{k1neg:B,k1:S,k2neg:N,k2:U}=w.splitScalar(h),v=y,P=y,A=this;for(;S>it||U>it;)S&X&&(v=v.add(A)),U&X&&(P=P.add(A)),A=A.double(),S>>=X,U>>=X;return B&&(v=v.negate()),N&&(P=P.negate()),P=new m(e.mul(P.px,w.beta),P.py,P.pz),v.add(P)}multiply(h){i(h);let y=h,w,B,{endo:S}=n;if(S){let{k1neg:N,k1:U,k2neg:v,k2:P}=S.splitScalar(y),{p:A,f:F}=this.wNAF(U),{p:O,f:I}=this.wNAF(P);A=E.constTimeNegate(N,A),O=E.constTimeNegate(v,O),O=new m(e.mul(O.px,S.beta),O.py,O.pz),w=A.add(O),B=F.add(I)}else{let{p:N,f:U}=this.wNAF(y);w=N,B=U}return m.normalizeZ([w,B])[0]}multiplyAndAddUnsafe(h,y,w){let B=m.BASE,S=l((U,v)=>v===it||v===X||!U.equals(B)?U.multiplyUnsafe(v):U.multiply(v),"mul"),N=S(this,y).add(S(h,w));return N.is0()?void 0:N}toAffine(h){let{px:y,py:w,pz:B}=this,S=this.is0();h==null&&(h=S?e.ONE:e.inv(B));let N=e.mul(y,h),U=e.mul(w,h),v=e.mul(B,h);if(S)return{x:e.ZERO,y:e.ZERO};if(!e.eql(v,e.ONE))throw new Error("invZ was invalid");return{x:N,y:U}}isTorsionFree(){let{h,isTorsionFree:y}=n;if(h===X)return!0;if(y)return y(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:y}=n;return h===X?this:y?y(m,this):this.multiplyUnsafe(n.h)}toRawBytes(h=!0){return this.assertValidity(),r(m,this,h)}toHex(h=!0){return Q(this.toRawBytes(h))}};l(m,"Point");let f=m;f.BASE=new f(n.Gx,n.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);let b=n.nBitLength,E=Te(f,n.endo?Math.ceil(b/2):b);return{CURVE:n,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:c,isWithinCurveOrder:u}}l(bn,"weierstrassPoints");function xn(t){let n=se(t);return at(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}l(xn,"validateOpts");function Ie(t){let n=xn(t),{Fp:e,n:r}=n,o=e.BYTES+1,c=2*e.BYTES+1;function u(g){return it<g&&g<e.ORDER}l(u,"isValidFieldElement");function i(g){return k(g,r)}l(i,"modN");function s(g){return kt(g,r)}l(s,"invN");let{ProjectivePoint:a,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:b}=bn({...n,toBytes(g,p,T){let q=p.toAffine(),H=e.toBytes(q.x),V=_;return T?V(Uint8Array.from([p.hasEvenY()?2:3]),H):V(Uint8Array.from([4]),H,e.toBytes(q.y))},fromBytes(g){let p=g.length,T=g[0],q=g.subarray(1);if(p===o&&(T===2||T===3)){let H=ot(q);if(!u(H))throw new Error("Point is not on curve");let V=f(H),G=e.sqrt(V),W=(G&X)===X;return(T&1)===1!==W&&(G=e.neg(G)),{x:H,y:G}}else if(p===c&&T===4){let H=e.fromBytes(q.subarray(0,e.BYTES)),V=e.fromBytes(q.subarray(e.BYTES,2*e.BYTES));return{x:H,y:V}}else throw new Error(`Point of length ${p} was invalid. Expected ${o} compressed bytes or ${c} uncompressed bytes`)}}),E=l(g=>Q(rt(g,n.nByteLength)),"numToNByteStr");function m(g){let p=r>>X;return g>p}l(m,"isBiggerThanHalfOrder");function x(g){return m(g)?i(-g):g}l(x,"normalizeS");let h=l((g,p,T)=>ot(g.slice(p,T)),"slcNum"),$=class ${constructor(p,T,q){this.r=p,this.s=T,this.recovery=q,this.assertValidity()}static fromCompact(p){let T=n.nByteLength;return p=M("compactSignature",p,T*2),new $(h(p,0,T),h(p,T,2*T))}static fromDER(p){let{r:T,s:q}=bt.toSig(M("DER",p));return new $(T,q)}assertValidity(){if(!b(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!b(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(p){return new $(this.r,this.s,p)}recoverPublicKey(p){let{r:T,s:q,recovery:H}=this,V=v(M("msgHash",p));if(H==null||![0,1,2,3].includes(H))throw new Error("recovery id invalid");let G=H===2||H===3?T+n.n:T;if(G>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");let W=H&1?"03":"02",ct=a.fromHex(W+E(G)),ut=s(G),Et=i(-V*ut),Ut=i(q*ut),lt=a.BASE.multiplyAndAddUnsafe(ct,Et,Ut);if(!lt)throw new Error("point at infinify");return lt.assertValidity(),lt}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return yt(this.toDERHex())}toDERHex(){return bt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return yt(this.toCompactHex())}toCompactHex(){return E(this.r)+E(this.s)}};l($,"Signature");let y=$,w={isValidPrivateKey(g){try{return d(g),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let g=n.randomBytes(e.BYTES+8),p=Ae(g,r);return rt(p,n.nByteLength)},precompute(g=8,p=a.BASE){return p._setWindowSize(g),p.multiply(BigInt(3)),p}};function B(g,p=!0){return a.fromPrivateKey(g).toRawBytes(p)}l(B,"getPublicKey");function S(g){let p=g instanceof Uint8Array,T=typeof g=="string",q=(p||T)&&g.length;return p?q===o||q===c:T?q===2*o||q===2*c:g instanceof a}l(S,"isProbPub");function N(g,p,T=!0){if(S(g))throw new Error("first arg must be private key");if(!S(p))throw new Error("second arg must be public key");return a.fromHex(p).multiply(d(g)).toRawBytes(T)}l(N,"getSharedSecret");let U=n.bits2int||function(g){let p=ot(g),T=g.length*8-n.nBitLength;return T>0?p>>BigInt(T):p},v=n.bits2int_modN||function(g){return i(U(g))},P=It(n.nBitLength);function A(g){if(typeof g!="bigint")throw new Error("bigint expected");if(!(it<=g&&g<P))throw new Error(`bigint expected < 2^${n.nBitLength}`);return rt(g,n.nByteLength)}l(A,"int2octets");function F(g,p,T=O){if(["recovered","canonical"].some(mt=>mt in T))throw new Error("sign() legacy options not supported");let{hash:q,randomBytes:H}=n,{lowS:V,prehash:G,extraEntropy:W}=T;V==null&&(V=!0),g=M("msgHash",g),G&&(g=M("prehashed msgHash",q(g)));let ct=v(g),ut=d(p),Et=[A(ut),A(ct)];if(W!=null){let mt=W===!0?H(e.BYTES):W;Et.push(M("extraEntropy",mt,e.BYTES))}let Ut=_(...Et),lt=ct;function Jt(mt){let Bt=U(mt);if(!b(Bt))return;let we=s(Bt),St=a.BASE.multiply(Bt).toAffine(),tt=i(St.x);if(tt===it)return;let Pt=i(we*i(lt+tt*ut));if(Pt===it)return;let be=(St.x===tt?0:2)|Number(St.y&X),xe=Pt;return V&&m(Pt)&&(xe=x(Pt),be^=1),new y(tt,xe,be)}return l(Jt,"k2sig"),{seed:Ut,k2sig:Jt}}l(F,"prepSig");let O={lowS:n.lowS,prehash:!1},I={lowS:n.lowS,prehash:!1};function Y(g,p,T=O){let{seed:q,k2sig:H}=F(g,p,T),V=n;return ee(V.hash.outputLen,V.nByteLength,V.hmac)(q,H)}l(Y,"sign"),a.BASE._setWindowSize(8);function D(g,p,T,q=I){var St;let H=g;if(p=M("msgHash",p),T=M("publicKey",T),"strict"in q)throw new Error("options.strict was renamed to lowS");let{lowS:V,prehash:G}=q,W,ct;try{if(typeof H=="string"||H instanceof Uint8Array)try{W=y.fromDER(H)}catch(tt){if(!(tt instanceof bt.Err))throw tt;W=y.fromCompact(H)}else if(typeof H=="object"&&typeof H.r=="bigint"&&typeof H.s=="bigint"){let{r:tt,s:Pt}=H;W=new y(tt,Pt)}else throw new Error("PARSE");ct=a.fromHex(T)}catch(tt){if(tt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(V&&W.hasHighS())return!1;G&&(p=n.hash(p));let{r:ut,s:Et}=W,Ut=v(p),lt=s(Et),Jt=i(Ut*lt),mt=i(ut*lt),Bt=(St=a.BASE.multiplyAndAddUnsafe(ct,Jt,mt))==null?void 0:St.toAffine();return Bt?i(Bt.x)===ut:!1}return l(D,"verify"),{CURVE:n,getPublicKey:B,getSharedSecret:N,sign:Y,verify:D,ProjectivePoint:a,Signature:y,utils:w}}l(Ie,"weierstrass");var vn=Object.defineProperty,Ke=l((t,n)=>{for(var e in n)vn(t,e,{get:n[e],enumerable:!0})},"__export"),st={};Ke(st,{EmptyArray:()=>ge,arrayToHex:()=>Qt,arrayToUtf8:()=>he,calculateSharedKey:()=>Dn,comparePublicKeyHex:()=>zn,compressPublicKeyHex:()=>$n,doDecrypt:()=>Wn,doEncrypt:()=>Gn,doSignature:()=>Qn,doVerifySignature:()=>Xn,generateKeyPairHex:()=>de,getHash:()=>me,getPoint:()=>Ye,getPublicKeyFromPrivateKey:()=>ze,getZ:()=>Wt,hexToArray:()=>z,initRNGPool:()=>ae,leftPad:()=>C,precomputePublicKey:()=>Jn,utf8ToHex:()=>Tt,verifyPublicKey:()=>Mn});var Dt=BigInt(0),Nt=BigInt(1),En=BigInt(2),br=BigInt(3);function Bn(t){let n=t.toString(16);if(n[0]!=="-")n.length%2===1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{n=n.substring(1);let e=n.length;e%2===1?e+=1:n.match(/^[0-7]/)||(e+=2);let r="";for(let u=0;u<e;u++)r+="f";n=((R(r)^t)+Nt).toString(16).replace(/^-/,"")}return n}l(Bn,"bigintToValue");var Ot,Ce=(Ot=class{constructor(n=null,e="00",r="00",o=""){this.tlv=n,this.t=e,this.l=r,this.v=o}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){let n=this.v.length/2,e=n.toString(16);return e.length%2===1&&(e="0"+e),n<128?e:(128+e.length/2).toString(16)+e}getValue(){return""}},l(Ot,"ASN1Object"),Ot),qt,He=(qt=class extends Ce{constructor(n){super(),this.t="02",n&&(this.v=Bn(n))}getValue(){return this.v}},l(qt,"DERInteger"),qt),Rt,Sn=(Rt=class extends Ce{constructor(n){super(),this.asn1Array=n}t="30";getValue(){return this.v=this.asn1Array.map(n=>n.getEncodedHex()).join(""),this.v}},l(Rt,"DERSequence"),Rt);function Ve(t,n){return+t[n+2]<8?1:+t.substring(n+2,n+4)&127+1}l(Ve,"getLenOfL");function Ne(t,n){let e=Ve(t,n),r=t.substring(n+2,n+2+e*2);return r?+(+r[0]<8?R(r):R(r.substring(2))).toString():-1}l(Ne,"getL");function ce(t,n){let e=Ve(t,n);return n+(e+1)*2}l(ce,"getStartOfV");function Pn(t,n){let e=new He(t),r=new He(n);return new Sn([e,r]).getEncodedHex()}l(Pn,"encodeDer");function An(t){let n=ce(t,0),e=ce(t,n),r=Ne(t,n),o=t.substr(e,r*2),c=e+o.length,u=ce(t,c),i=Ne(t,c),s=t.substring(u,u+i*2),a=R(o),d=R(s);return{r:a,s:d}}l(An,"decodeDer");var ue=16384,vt=new Uint8Array(0),At;async function ae(){if("crypto"in globalThis){At=globalThis.crypto;return}if(!(vt.length>ue/2))if("wx"in globalThis&&"getRandomValues"in globalThis.wx)vt=await new Promise(t=>{wx.getRandomValues({length:ue,success(n){t(new Uint8Array(n.randomValues))}})});else try{globalThis.crypto?At=globalThis.crypto:At=(await import("crypto")).webcrypto;let t=new Uint8Array(ue);At.getRandomValues(t),vt=t}catch{throw new Error("no available csprng, abort.")}}l(ae,"initRNGPool");ae();function Tn(t){if(vt.length>t){let n=vt.slice(0,t);return vt=vt.slice(t),ae(),n}else throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.")}l(Tn,"consumePool");function Un(t=0){let n=new Uint8Array(t);return At?At.getRandomValues(n):Tn(t)}l(Un,"randomBytes");var je=l(t=>t instanceof Uint8Array,"u8a"),le=l(t=>new DataView(t.buffer,t.byteOffset,t.byteLength),"createView"),In=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!In)throw new Error("Non little-endian hardware is not supported");var Hn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Gt(t){if(!je(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=Hn[t[e]];return n}l(Gt,"bytesToHex");function Nn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}l(Nn,"utf8ToBytes");function fe(t){if(typeof t=="string"&&(t=Nn(t)),!je(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}l(fe,"toBytes");var Lt,Ze=(Lt=class{clone(){return this._cloneInto()}},l(Lt,"Hash"),Lt);function On(t){let n=l(r=>t().update(fe(r)).digest(),"hashC"),e=t();return n.outputLen=e.outputLen,n.blockLen=e.blockLen,n.create=()=>t(),n}l(On,"wrapConstructor");var qn=l((t,n,e)=>t&n|t&e|n&e,"BoolA"),Oe=l((t,n,e)=>t^n^e,"BoolB"),Rn=l((t,n,e)=>t&n|~t&e,"BoolC");function Ln(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);let o=BigInt(32),c=BigInt(4294967295),u=Number(e>>o&c),i=Number(e&c),s=r?4:0,a=r?0:4;t.setUint32(n+s,u,r),t.setUint32(n+a,i,r)}l(Ln,"setBigUint64");function J(t,n){let e=n&31;return t<<e|t>>>32-e}l(J,"rotl");function Kn(t){return t^J(t,9)^J(t,17)}l(Kn,"P0");function Cn(t){return t^J(t,15)^J(t,23)}l(Cn,"P1");var Kt,Vn=(Kt=class extends Ze{constructor(n,e,r,o){super(),this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(n),this.view=le(this.buffer)}buffer;view;finished=!1;length=0;pos=0;destroyed=!1;update(n){let{view:e,buffer:r,blockLen:o}=this;n=fe(n);let c=n.length;for(let u=0;u<c;){let i=Math.min(o-this.pos,c-u);if(i===o){let s=le(n);for(;o<=c-u;u+=o)this.process(s,u);continue}r.set(n.subarray(u,u+i),this.pos),this.pos+=i,u+=i,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:c}=this,{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>o-u&&(this.process(r,0),u=0);for(let f=u;f<o;f++)e[f]=0;Ln(r,o-8,BigInt(this.length*8),c),this.process(r,0);let i=le(n),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let a=s/4,d=this.get();if(a>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<a;f++)i.setUint32(4*f,d[f],c)}digest(){let{buffer:n,outputLen:e}=this;this.digestInto(n);let r=n.slice(0,e);return this.destroy(),r}_cloneInto(n){n||=new this.constructor,n.set(...this.get());let{blockLen:e,buffer:r,length:o,finished:c,destroyed:u,pos:i}=this;return n.length=o,n.pos=i,n.finished=c,n.destroyed=u,o%e&&n.buffer.set(r),n}},l(Kt,"SHA2"),Kt),ft=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),et=new Uint32Array(68),qe=new Uint32Array(64),jn=2043430169,Zn=2055708042,Ct,_n=(Ct=class extends Vn{A=ft[0]|0;B=ft[1]|0;C=ft[2]|0;D=ft[3]|0;E=ft[4]|0;F=ft[5]|0;G=ft[6]|0;H=ft[7]|0;constructor(){super(64,32,8,!1)}get(){let{A:n,B:e,C:r,D:o,E:c,F:u,G:i,H:s}=this;return[n,e,r,o,c,u,i,s]}set(n,e,r,o,c,u,i,s){this.A=n|0,this.B=e|0,this.C=r|0,this.D=o|0,this.E=c|0,this.F=u|0,this.G=i|0,this.H=s|0}process(n,e){for(let f=0;f<16;f++,e+=4)et[f]=n.getUint32(e,!1);for(let f=16;f<68;f++)et[f]=Cn(et[f-16]^et[f-9]^J(et[f-3],15))^J(et[f-13],7)^et[f-6];for(let f=0;f<64;f++)qe[f]=et[f]^et[f+4];let{A:r,B:o,C:c,D:u,E:i,F:s,G:a,H:d}=this;for(let f=0;f<64;f++){let b=f>=0&&f<=15,E=b?jn:Zn,m=J(J(r,12)+i+J(E,f),7),x=m^J(r,12),h=(b?Oe(r,o,c):qn(r,o,c))+u+x+qe[f]|0,y=(b?Oe(i,s,a):Rn(i,s,a))+d+m+et[f]|0;u=c,c=J(o,9),o=r,r=h,d=a,a=J(s,19),s=i,i=Kn(y)}r=r^this.A|0,o=o^this.B|0,c=c^this.C|0,u=u^this.D|0,i=i^this.E|0,s=s^this.F|0,a=a^this.G|0,d=d^this.H|0,this.set(r,o,c,u,i,s,a,d)}roundClean(){et.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},l(Ct,"SM3"),Ct),gt=On(()=>new _n),Vt,_e=(Vt=class extends Ze{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(n,e){super();let r=fe(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,c=new Uint8Array(o);c.set(r.length>o?n.create().update(r).digest():r);for(let u=0;u<c.length;u++)c[u]^=54;this.iHash.update(c),this.oHash=n.create();for(let u=0;u<c.length;u++)c[u]^=106;this.oHash.update(c),c.fill(0)}update(n){return this.iHash.update(n),this}digestInto(n){this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){let n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||=Object.create(Object.getPrototypeOf(this),{});let{oHash:e,iHash:r,finished:o,destroyed:c,blockLen:u,outputLen:i}=this;return n=n,n.finished=o,n.destroyed=c,n.blockLen=u,n.outputLen=i,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},l(Vt,"HMAC"),Vt),ke=l((t,n,e)=>new _e(t,n).update(e).digest(),"hmac");ke.create=(t,n)=>new _e(t,n);var kn=oe(BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991999")),L=Ie({a:BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991996"),b:BigInt("18505919022281880113072981827955639221458448578012075254857346196103069175443"),Fp:kn,h:Nt,n:BigInt("115792089210356248756420345214020892766061623724957744567843809356293439045923"),Gx:BigInt("22963146547237050559479531362550074578802567295341616970375194840604139615431"),Gy:BigInt("85132369209828568825618990617112496413088388631904505083283536607588877201568"),hash:gt,hmac:(t,...n)=>ke(gt,t,_(...n)),randomBytes:Un}),nt=oe(BigInt(L.CURVE.n));function de(t){let n=t?rt(k(BigInt(t),Nt)+Nt,32):L.utils.randomPrivateKey(),e=L.getPublicKey(n,!1),r=C(Q(n),64),o=C(Q(e),64);return{privateKey:r,publicKey:o}}l(de,"generateKeyPairHex");function $n(t){if(t.length!==130)throw new Error("Invalid public key to compress");let n=(t.length-2)/2,e=t.substring(2,2+n),r=R(t.substring(n+2,n+n+2)),o="03";return k(r,En)===Dt&&(o="02"),o+e}l($n,"compressPublicKeyHex");function Tt(t){t=decodeURIComponent(encodeURIComponent(t));let n=t.length,e=new Uint32Array((n>>>2)+1);for(let o=0;o<n;o++)e[o>>>2]|=(t.charCodeAt(o)&255)<<24-o%4*8;let r=[];for(let o=0;o<n;o++){let c=e[o>>>2]>>>24-o%4*8&255;r.push((c>>>4).toString(16)),r.push((c&15).toString(16))}return r.join("")}l(Tt,"utf8ToHex");function C(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t}l(C,"leftPad");function Qt(t){return t.map(n=>{let e=n.toString(16);return e.length===1?"0"+e:e}).join("")}l(Qt,"arrayToHex");function he(t){let n=[];for(let e=0,r=t.length;e<r;e++)t[e]>=240&&t[e]<=247?(n.push(String.fromCodePoint(((t[e]&7)<<18)+((t[e+1]&63)<<12)+((t[e+2]&63)<<6)+(t[e+3]&63))),e+=3):t[e]>=224&&t[e]<=239?(n.push(String.fromCodePoint(((t[e]&15)<<12)+((t[e+1]&63)<<6)+(t[e+2]&63))),e+=2):t[e]>=192&&t[e]<=223?(n.push(String.fromCodePoint(((t[e]&31)<<6)+(t[e+1]&63))),e++):n.push(String.fromCodePoint(t[e]));return n.join("")}l(he,"arrayToUtf8");function z(t){let n=t.length;n%2!==0&&(t=C(t,n+1)),n=t.length;let e=n/2,r=new Uint8Array(e);for(let o=0;o<e;o++)r[o]=parseInt(t.substring(o*2,o*2+2),16);return r}l(z,"hexToArray");function Mn(t){let n=L.ProjectivePoint.fromHex(t);if(!n)return!1;try{return n.assertValidity(),!0}catch{return!1}}l(Mn,"verifyPublicKey");function zn(t,n){let e=L.ProjectivePoint.fromHex(t);if(!e)return!1;let r=L.ProjectivePoint.fromHex(n);return r?e.equals(r):!1}l(zn,"comparePublicKeyHex");var Re=R("80000000000000000000000000000000"),Le=R("7fffffffffffffffffffffffffffffff");function Yn(t,n){let e=new Uint8Array(n),r=1,o=0,c=ge,u=new Uint8Array(4),i=l(()=>{u[0]=r>>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,c=gt(_(t,u)),r++,o=0},"nextT");i();for(let s=0,a=e.length;s<a;s++)o===c.length&&i(),e[s]=c[o++]&255;return e}l(Yn,"hkdf");function Dn(t,n,e,r,o,c=!1,u="1234567812345678",i="1234567812345678"){let s=L.ProjectivePoint.fromHex(n.publicKey),a=L.ProjectivePoint.fromHex(r),d=L.ProjectivePoint.fromHex(e),f=Wt(t.publicKey,u),b=Wt(e,i);c&&([f,b]=[b,f]);let E=R(n.privateKey),m=R(t.privateKey),x=s.x,h=Re+(x&Le),y=nt.add(m,nt.mulN(h,E)),w=a.x,B=nt.add(Re,w&Le),S=a.multiply(B).add(d).multiply(y),N=z(C(j(S.x),64)),U=z(C(j(S.y),64));return Yn(_(N,U,f,b),o)}l(Dn,"calculateSharedKey");var $e=0,ge=new Uint8Array;function Gn(t,n,e=1){let r=typeof t=="string"?z(Tt(t)):Uint8Array.from(t),o=typeof n=="string"?L.ProjectivePoint.fromHex(n):n,c=de(),u=R(c.privateKey),i=c.publicKey;i.length>128&&(i=i.substring(i.length-128));let s=o.multiply(u),a=z(C(j(s.x),64)),d=z(C(j(s.y),64)),f=Gt(gt(_(a,r,d)));Me(a,d,r);let b=Gt(r);return e===$e?i+b+f:i+f+b}l(Gn,"doEncrypt");function Me(t,n,e){let r=1,o=0,c=ge,u=new Uint8Array(4),i=l(()=>{u[0]=r>>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,c=gt(_(t,n,u)),r++,o=0},"nextT");i();for(let s=0,a=e.length;s<a;s++)o===c.length&&i(),e[s]^=c[o++]&255}l(Me,"xorCipherStream");function Wn(t,n,e=1,{output:r="string"}={}){let o=R(n),c=t.substring(128,128+64),u=t.substring(128+64);e===$e&&(c=t.substring(t.length-64),u=t.substring(128,t.length-64));let i=z(u),a=L.ProjectivePoint.fromHex("04"+t.substring(0,128)).multiply(o),d=z(C(j(a.x),64)),f=z(C(j(a.y),64));return Me(d,f,i),Qt(Array.from(gt(_(d,i,f))))===c.toLowerCase()?r==="array"?i:he(i):r==="array"?[]:""}l(Wn,"doDecrypt");function Qn(t,n,e={}){let{pointPool:r,der:o,hash:c,publicKey:u,userId:i}=e,s=typeof t=="string"?Tt(t):Qt(Array.from(t));c&&(u=u||ze(n),s=me(s,u,i));let a=R(n),d=R(s),f=null,b=null,E=null;do{do{let m;r&&r.length?m=r.pop():m=Ye(),f=m.k,b=nt.add(d,m.x1)}while(b===Dt||b+f===L.CURVE.n);E=nt.mul(nt.inv(nt.addN(a,Nt)),nt.subN(f,nt.mulN(b,a)))}while(E===Dt);return o?Pn(b,E):C(j(b),64)+C(j(E),64)}l(Qn,"doSignature");function Xn(t,n,e,r={}){let o,{hash:c,der:u,userId:i}=r,s=typeof e=="string"?e:e.toHex(!1);c?o=me(typeof t=="string"?Tt(t):t,s,i):o=typeof t=="string"?Tt(t):Qt(Array.from(t));let a,d;if(u){let h=An(n);a=h.r,d=h.s}else a=R(n.substring(0,64)),d=R(n.substring(64));let f=typeof e=="string"?L.ProjectivePoint.fromHex(e):e,b=R(o),E=nt.add(a,d);if(E===Dt)return!1;let m=L.ProjectivePoint.BASE.multiply(d).add(f.multiply(E)),x=nt.add(b,m.x);return a===x}l(Xn,"doVerifySignature");function Wt(t,n="1234567812345678"){n=Tt(n);let e=C(j(L.CURVE.a),64),r=C(j(L.CURVE.b),64),o=C(j(L.ProjectivePoint.BASE.x),64),c=C(j(L.ProjectivePoint.BASE.y),64),u,i;if(t.length===128)u=t.substring(0,64),i=t.substring(64,128);else{let f=L.ProjectivePoint.fromHex(t);u=C(j(f.x),64),i=C(j(f.y),64)}let s=z(n+e+r+o+c+u+i),a=n.length*4;return gt(_(new Uint8Array([a>>8&255,a&255]),s))}l(Wt,"getZ");function me(t,n,e="1234567812345678"){let r=Wt(n,e);return Gt(gt(_(r,typeof t=="string"?z(t):t)))}l(me,"getHash");function Jn(t,n){let e=L.ProjectivePoint.fromHex(t);return L.utils.precompute(n,e)}l(Jn,"precomputePublicKey");function ze(t){let n=L.getPublicKey(t,!1);return C(Q(n),64)}l(ze,"getPublicKeyFromPrivateKey");function Ye(){let t=de(),n=L.ProjectivePoint.fromHex(t.publicKey),e=R(t.privateKey);return{...t,k:e,x1:n.x}}l(Ye,"getPoint");function Fn(t){let n=[];for(let e=0,r=t.length;e<r;e++){let o=t.codePointAt(e);if(o<=127)n.push(o);else if(o<=2047)n.push(192|o>>>6),n.push(128|o&63);else if(o<=55295||o>=57344&&o<=65535)n.push(224|o>>>12),n.push(128|o>>>6&63),n.push(128|o&63);else if(o>=65536&&o<=1114111)e++,n.push(240|o>>>18&28),n.push(128|o>>>12&63),n.push(128|o>>>6&63),n.push(128|o&63);else throw n.push(o),new Error("input is not supported")}return new Uint8Array(n)}l(Fn,"utf8ToArray");var tr={};Ke(tr,{decrypt:()=>ir,encrypt:()=>or,sm4:()=>ye});var dt=0,er=32,xt=16,Mt=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),zt=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function ht(t){return(Mt[t>>>24&255]&255)<<24|(Mt[t>>>16&255]&255)<<16|(Mt[t>>>8&255]&255)<<8|Mt[t&255]&255}l(ht,"byteSub");var Sr=new Uint32Array(4),Pr=new Uint32Array(4);function nr(t,n,e){let r=0,o=0,c=0,u=0,i=0,s=0,a=0,d=0;i=t[0]&255,s=t[1]&255,a=t[2]&255,d=t[3]&255,r=i<<24|s<<16|a<<8|d,i=t[4]&255,s=t[5]&255,a=t[6]&255,d=t[7]&255,o=i<<24|s<<16|a<<8|d,i=t[8]&255,s=t[9]&255,a=t[10]&255,d=t[11]&255,c=i<<24|s<<16|a<<8|d,i=t[12]&255,s=t[13]&255,a=t[14]&255,d=t[15]&255,u=i<<24|s<<16|a<<8|d;for(let f=0;f<32;f+=4)i=o^c^u^e[f],i=ht(i),r^=i^(i<<2|i>>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8),s=c^u^r^e[f+1],s=ht(s),o^=s^(s<<2|s>>>30)^(s<<10|s>>>22)^(s<<18|s>>>14)^(s<<24|s>>>8),a=u^r^o^e[f+2],a=ht(a),c^=a^(a<<2|a>>>30)^(a<<10|a>>>22)^(a<<18|a>>>14)^(a<<24|a>>>8),d=r^o^c^e[f+3],d=ht(d),u^=d^(d<<2|d>>>30)^(d<<10|d>>>22)^(d<<18|d>>>14)^(d<<24|d>>>8);n[0]=u>>>24&255,n[1]=u>>>16&255,n[2]=u>>>8&255,n[3]=u&255,n[4]=c>>>24&255,n[5]=c>>>16&255,n[6]=c>>>8&255,n[7]=c&255,n[8]=o>>>24&255,n[9]=o>>>16&255,n[10]=o>>>8&255,n[11]=o&255,n[12]=r>>>24&255,n[13]=r>>>16&255,n[14]=r>>>8&255,n[15]=r&255}l(nr,"sms4Crypt");function rr(t,n,e){let r=0,o=0,c=0,u=0,i=0;r=(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255,o=(t[4]&255)<<24|(t[5]&255)<<16|(t[6]&255)<<8|t[7]&255,c=(t[8]&255)<<24|(t[9]&255)<<16|(t[10]&255)<<8|t[11]&255,u=(t[12]&255)<<24|(t[13]&255)<<16|(t[14]&255)<<8|t[15]&255,r^=2746333894,o^=1453994832,c^=1736282519,u^=2993693404;for(let s=0;s<32;s+=4)i=o^c^u^zt[s+0],i=ht(i),r^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+0]=r,i=c^u^r^zt[s+1],i=ht(i),o^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+1]=o,i=u^r^o^zt[s+2],i=ht(i),c^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+2]=c,i=r^o^c^zt[s+3],i=ht(i),u^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+3]=u;if(e===dt)for(let s=0;s<16;s++)[n[s],n[31-s]]=[n[31-s],n[s]]}l(rr,"sms4KeyExt");var Yt=new Uint8Array(16);function ye(t,n,e,r={}){let{padding:o="pkcs#7",mode:c,iv:u=new Uint8Array(16),output:i}=r;if(c==="cbc"&&(typeof u=="string"&&(u=z(u)),u.length!==128/8))throw new Error("iv is invalid");if(typeof n=="string"&&(n=z(n)),n.length!==128/8)throw new Error("key is invalid");if(typeof t=="string"?e!==dt?t=Fn(t):t=z(t):t=Uint8Array.from(t),(o==="pkcs#5"||o==="pkcs#7")&&e!==dt){let E=xt-t.length%xt,m=new Uint8Array(t.length+E);m.set(t,0);for(let x=0;x<E;x++)m[t.length+x]=E;t=m}let s=new Uint32Array(er);rr(n,s,e);let a=new Uint8Array(t.length),d=u,f=t.length,b=0;for(;f>=xt;){let E=t.subarray(b,b+16);if(c==="cbc")for(let m=0;m<xt;m++)e!==dt&&(E[m]^=d[m]);nr(E,Yt,s);for(let m=0;m<xt;m++)c==="cbc"&&e===dt&&(Yt[m]^=d[m]),a[b+m]=Yt[m];c==="cbc"&&(e!==dt?d=Yt:d=E),f-=xt,b+=xt}if((o==="pkcs#5"||o==="pkcs#7")&&e===dt){let E=a.length,m=a[E-1];for(let x=1;x<=m;x++)if(a[E-x]!==m)throw new Error("padding is invalid");a=a.slice(0,E-m)}return i!=="array"?e!==dt?Gt(a):he(a):a}l(ye,"sm4");function or(t,n,e={}){return ye(t,n,1,e)}l(or,"encrypt");function ir(t,n,e={}){return ye(t,n,0,e)}l(ir,"decrypt");async function Xt(t){let n="__$$RNGPoolInitialized";Reflect.getOwnMetadata(n,t)||(await st.initRNGPool(),Reflect.defineMetadata(n,!0,t))}l(Xt,"initRNGPool");var pe=class pe extends ve{options={cipherMode:1,signatureSM3Hash:!0,signatureUserId:void 0};createPrivateKey(n){return n}createPublicKey(n){return n}decrypt(n){return st.doDecrypt(Buffer.from(n,"base64").toString("hex"),this.privateKey,this.options.cipherMode,{output:"string"})}encrypt(n){return Buffer.from(st.doEncrypt(n,this.publicKey,this.options.cipherMode),"hex").toString("base64")}async generateKeyPair(n){let{publicKey:e,privateKey:r}=st.generateKeyPairHex();return n!=null&&n.compressPublicKey&&(e=st.compressPublicKeyHex(e)),{publicKey:e,privateKey:r}}sign(n){return Buffer.from(st.doSignature(n,this.privateKey,{hash:this.options.signatureSM3Hash,publicKey:this.publicKey?this.publicKey:void 0,userId:this.options.signatureUserId}),"hex").toString("base64")}verify(n,e){return st.doVerifySignature(n,Buffer.from(e,"base64").toString("hex"),this.publicKey,{hash:this.options.signatureSM3Hash,userId:this.options.signatureUserId})}static async generateKeyPair(n){return await Xt(this),super.generateKeyPair(n)}static async loadKeyPair(n,e){return await Xt(this),super.loadKeyPair(n,e)}static async loadPublicKey(n,e){return await Xt(this),super.loadPublicKey(n,e)}static async loadPrivateKey(n,e){return await Xt(this),super.loadPrivateKey(n,e)}};l(pe,"SM2");var De=pe;export{De as a};
|
|
1
|
+
import{a as ve}from"./chunk-X4VRHG3U.js";import{a as l,d as Ge}from"./chunk-IJBWUUYT.js";var pt={};Ge(pt,{bitGet:()=>en,bitLen:()=>tn,bitMask:()=>It,bitSet:()=>nn,bytesToHex:()=>Q,bytesToNumberBE:()=>ot,bytesToNumberLE:()=>_t,concatBytes:()=>_,createHmacDrbg:()=>ee,ensureBytes:()=>M,equalBytes:()=>Je,hexToBytes:()=>yt,hexToNumber:()=>R,numberToBytesBE:()=>rt,numberToBytesLE:()=>te,numberToHexUnpadded:()=>j,numberToVarBytesBE:()=>Xe,utf8ToBytes:()=>Fe,validateObject:()=>at});var Be=BigInt(0),jt=BigInt(1),We=BigInt(2),Zt=l(t=>t instanceof Uint8Array,"u8a"),Qe=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Q(t){if(!Zt(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=Qe[t[e]];return n}l(Q,"bytesToHex");function j(t){let n=t.toString(16);return n.length&1?`0${n}`:n}l(j,"numberToHexUnpadded");function R(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}l(R,"hexToNumber");function yt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let n=t.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);let e=new Uint8Array(n/2);for(let r=0;r<e.length;r++){let o=r*2,c=t.slice(o,o+2),u=Number.parseInt(c,16);if(Number.isNaN(u)||u<0)throw new Error("Invalid byte sequence");e[r]=u}return e}l(yt,"hexToBytes");function ot(t){return R(Q(t))}l(ot,"bytesToNumberBE");function _t(t){if(!Zt(t))throw new Error("Uint8Array expected");return R(Q(Uint8Array.from(t).reverse()))}l(_t,"bytesToNumberLE");function rt(t,n){return yt(t.toString(16).padStart(n*2,"0"))}l(rt,"numberToBytesBE");function te(t,n){return rt(t,n).reverse()}l(te,"numberToBytesLE");function Xe(t){return yt(j(t))}l(Xe,"numberToVarBytesBE");function M(t,n,e){let r;if(typeof n=="string")try{r=yt(n)}catch(c){throw new Error(`${t} must be valid hex string, got "${n}". Cause: ${c}`)}else if(Zt(n))r=Uint8Array.from(n);else throw new Error(`${t} must be hex string or Uint8Array`);let o=r.length;if(typeof e=="number"&&o!==e)throw new Error(`${t} expected ${e} bytes, got ${o}`);return r}l(M,"ensureBytes");function _(...t){let n=new Uint8Array(t.reduce((r,o)=>r+o.length,0)),e=0;return t.forEach(r=>{if(!Zt(r))throw new Error("Uint8Array expected");n.set(r,e),e+=r.length}),n}l(_,"concatBytes");function Je(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}l(Je,"equalBytes");function Fe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}l(Fe,"utf8ToBytes");function tn(t){let n;for(n=0;t>Be;t>>=jt,n+=1);return n}l(tn,"bitLen");function en(t,n){return t>>BigInt(n)&jt}l(en,"bitGet");var nn=l((t,n,e)=>t|(e?jt:Be)<<BigInt(n),"bitSet"),It=l(t=>(We<<BigInt(t-1))-jt,"bitMask"),Ft=l(t=>new Uint8Array(t),"u8n"),Ee=l(t=>Uint8Array.from(t),"u8fr");function ee(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Ft(t),o=Ft(t),c=0,u=l(()=>{r.fill(1),o.fill(0),c=0},"reset"),i=l((...f)=>e(o,r,...f),"h"),s=l((f=Ft())=>{o=i(Ee([0]),f),r=i(),f.length!==0&&(o=i(Ee([1]),f),r=i())},"reseed"),a=l(()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let f=0,b=[];for(;f<n;){r=i();let E=r.slice();b.push(E),f+=r.length}return _(...b)},"gen");return l((f,b)=>{u(),s(f);let E;for(;!(E=b(a()));)s();return u(),E},"genUntil")}l(ee,"createHmacDrbg");var rn={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function at(t,n,e={}){let r=l((o,c,u)=>{let i=rn[c];if(typeof i!="function")throw new Error(`Invalid validator "${c}", expected function`);let s=t[o];if(!(u&&s===void 0)&&!i(s,t))throw new Error(`Invalid param ${String(o)}=${s} (${typeof s}), expected ${c}`)},"checkField");for(let[o,c]of Object.entries(n))r(o,c,!1);for(let[o,c]of Object.entries(e))r(o,c,!0);return t}l(at,"validateObject");var Z=BigInt(0),K=BigInt(1),wt=BigInt(2),on=BigInt(3),ne=BigInt(4),Se=BigInt(5),Pe=BigInt(8),sn=BigInt(9),cn=BigInt(16);function k(t,n){let e=t%n;return e>=Z?e:n+e}l(k,"mod");function un(t,n,e){if(e<=Z||n<Z)throw new Error("Expected power/modulo > 0");if(e===K)return Z;let r=K;for(;n>Z;)n&K&&(r=r*t%e),t=t*t%e,n>>=K;return r}l(un,"pow");function kt(t,n){if(t===Z||n<=Z)throw new Error(`invert: expected positive integers, got n=${t} mod=${n}`);let e=k(t,n),r=n,o=Z,c=K,u=K,i=Z;for(;e!==Z;){let a=r/e,d=r%e,f=o-u*a,b=c-i*a;r=e,e=d,o=u,c=i,u=f,i=b}if(r!==K)throw new Error("invert: does not exist");return k(o,n)}l(kt,"invert");function ln(t){let n=(t-K)/wt,e,r,o;for(e=t-K,r=0;e%wt===Z;e/=wt,r++);for(o=wt;o<t&&un(o,n,t)!==t-K;o++);if(r===1){let u=(t+K)/ne;return l(function(s,a){let d=s.pow(a,u);if(!s.eql(s.sqr(d),a))throw new Error("Cannot find square root");return d},"tonelliFast")}let c=(e+K)/wt;return l(function(i,s){if(i.pow(s,n)===i.neg(i.ONE))throw new Error("Cannot find square root");let a=r,d=i.pow(i.mul(i.ONE,o),e),f=i.pow(s,c),b=i.pow(s,e);for(;!i.eql(b,i.ONE);){if(i.eql(b,i.ZERO))return i.ZERO;let E=1;for(let x=i.sqr(b);E<a&&!i.eql(x,i.ONE);E++)x=i.sqr(x);let m=i.pow(d,K<<BigInt(a-E-1));d=i.sqr(m),f=i.mul(f,m),b=i.mul(b,d),a=E}return f},"tonelliSlow")}l(ln,"tonelliShanks");function an(t){if(t%ne===on){let n=(t+K)/ne;return l(function(r,o){let c=r.pow(o,n);if(!r.eql(r.sqr(c),o))throw new Error("Cannot find square root");return c},"sqrt3mod4")}if(t%Pe===Se){let n=(t-Se)/Pe;return l(function(r,o){let c=r.mul(o,wt),u=r.pow(c,n),i=r.mul(o,u),s=r.mul(r.mul(i,wt),u),a=r.mul(i,r.sub(s,r.ONE));if(!r.eql(r.sqr(a),o))throw new Error("Cannot find square root");return a},"sqrt5mod8")}return t%cn,ln(t)}l(an,"FpSqrt");var fn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function re(t){let n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=fn.reduce((r,o)=>(r[o]="function",r),n);return at(t,e)}l(re,"validateField");function dn(t,n,e){if(e<Z)throw new Error("Expected power > 0");if(e===Z)return t.ONE;if(e===K)return n;let r=t.ONE,o=n;for(;e>Z;)e&K&&(r=t.mul(r,o)),o=t.sqr(o),e>>=K;return r}l(dn,"FpPow");function hn(t,n){let e=new Array(n.length),r=n.reduce((c,u,i)=>t.is0(u)?c:(e[i]=c,t.mul(c,u)),t.ONE),o=t.inv(r);return n.reduceRight((c,u,i)=>t.is0(u)?c:(e[i]=t.mul(c,e[i]),t.mul(c,u)),o),e}l(hn,"FpInvertBatch");function $t(t,n){let e=n!==void 0?n:t.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}l($t,"nLength");function oe(t,n,e=!1,r={}){if(t<=Z)throw new Error(`Expected Fp ORDER > 0, got ${t}`);let{nBitLength:o,nByteLength:c}=$t(t,n);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");let u=an(t),i=Object.freeze({ORDER:t,BITS:o,BYTES:c,MASK:It(o),ZERO:Z,ONE:K,create:s=>k(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof s}`);return Z<=s&&s<t},is0:s=>s===Z,isOdd:s=>(s&K)===K,neg:s=>k(-s,t),eql:(s,a)=>s===a,sqr:s=>k(s*s,t),add:(s,a)=>k(s+a,t),sub:(s,a)=>k(s-a,t),mul:(s,a)=>k(s*a,t),pow:(s,a)=>dn(i,s,a),div:(s,a)=>k(s*kt(a,t),t),sqrN:s=>s*s,addN:(s,a)=>s+a,subN:(s,a)=>s-a,mulN:(s,a)=>s*a,inv:s=>kt(s,t),sqrt:r.sqrt||(s=>u(i,s)),invertBatch:s=>hn(i,s),cmov:(s,a,d)=>d?a:s,toBytes:s=>e?te(s,c):rt(s,c),fromBytes:s=>{if(s.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${s.length}`);return e?_t(s):ot(s)}});return Object.freeze(i)}l(oe,"Field");function Ae(t,n,e=!1){t=M("privateHash",t);let r=t.length,o=$t(n).nByteLength+8;if(o<24||r<o||r>1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${r}`);let c=e?_t(t):ot(t);return k(c,n-K)+K}l(Ae,"hashToPrivateScalar");var mn=BigInt(0),ie=BigInt(1);function Te(t,n){let e=l((o,c)=>{let u=c.negate();return o?u:c},"constTimeNegate"),r=l(o=>{let c=Math.ceil(n/o)+1,u=2**(o-1);return{windows:c,windowSize:u}},"opts");return{constTimeNegate:e,unsafeLadder(o,c){let u=t.ZERO,i=o;for(;c>mn;)c&ie&&(u=u.add(i)),i=i.double(),c>>=ie;return u},precomputeWindow(o,c){let{windows:u,windowSize:i}=r(c),s=[],a=o,d=a;for(let f=0;f<u;f++){d=a,s.push(d);for(let b=1;b<i;b++)d=d.add(a),s.push(d);a=d.double()}return s},wNAF(o,c,u){let{windows:i,windowSize:s}=r(o),a=t.ZERO,d=t.BASE,f=BigInt(2**o-1),b=2**o,E=BigInt(o);for(let m=0;m<i;m++){let x=m*s,h=Number(u&f);u>>=E,h>s&&(h-=b,u+=ie);let y=x,w=x+Math.abs(h)-1,B=m%2!==0,S=h<0;h===0?d=d.add(e(B,c[y])):a=a.add(e(S,c[w]))}return{p:a,f:d}},wNAFCached(o,c,u,i){let s=o._WINDOW_SIZE||1,a=c.get(o);return a||(a=this.precomputeWindow(o,s),s!==1&&c.set(o,i(a))),this.wNAF(s,a,u)}}}l(Te,"wNAF");function se(t){return re(t.Fp),at(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$t(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}l(se,"validateBasic");function yn(t){let n=se(t);at(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:e,Fp:r,a:o}=n;if(e){if(!r.eql(o,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}l(yn,"validatePointOpts");var{bytesToNumberBE:pn,hexToBytes:wn}=pt,Ht,bt={Err:(Ht=class extends Error{constructor(n=""){super(n)}},l(Ht,"DERErr"),Ht),_parseInt(t){let{Err:n}=bt;if(t.length<2||t[0]!==2)throw new n("Invalid signature integer tag");let e=t[1],r=t.subarray(2,e+2);if(!e||r.length!==e)throw new n("Invalid signature integer: wrong length");if(r[0]&128)throw new n("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:pn(r),l:t.subarray(e+2)}},toSig(t){let{Err:n}=bt,e=typeof t=="string"?wn(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new n("Invalid signature tag");if(e[1]!==r-2)throw new n("Invalid signature: incorrect length");let{d:o,l:c}=bt._parseInt(e.subarray(2)),{d:u,l:i}=bt._parseInt(c);if(i.length)throw new n("Invalid signature: left bytes after parsing");return{r:o,s:u}},hexFromSig(t){let n=l(a=>Number.parseInt(a[0],16)&8?"00"+a:a,"slice"),e=l(a=>{let d=a.toString(16);return d.length&1?`0${d}`:d},"h"),r=n(e(t.s)),o=n(e(t.r)),c=r.length/2,u=o.length/2,i=e(c),s=e(u);return`30${e(u+c+4)}02${s}${o}02${i}${r}`}},it=BigInt(0),X=BigInt(1),mr=BigInt(2),Ue=BigInt(3),yr=BigInt(4);function bn(t){let n=yn(t),{Fp:e}=n,r=n.toBytes||((x,h,y)=>{let w=h.toAffine();return _(Uint8Array.from([4]),e.toBytes(w.x),e.toBytes(w.y))}),o=n.fromBytes||(x=>{let h=x.subarray(1),y=e.fromBytes(h.subarray(0,e.BYTES)),w=e.fromBytes(h.subarray(e.BYTES,2*e.BYTES));return{x:y,y:w}});function c(x){let{a:h,b:y}=n,w=e.sqr(x),B=e.mul(w,x);return e.add(e.add(B,e.mul(x,h)),y)}if(l(c,"weierstrassEquation"),!e.eql(e.sqr(n.Gy),c(n.Gx)))throw new Error("bad generator point: equation left != right");function u(x){return typeof x=="bigint"&&it<x&&x<n.n}l(u,"isWithinCurveOrder");function i(x){if(!u(x))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}l(i,"assertGE");function s(x){let{allowedPrivateKeyLengths:h,nByteLength:y,wrapPrivateKey:w,n:B}=n;if(h&&typeof x!="bigint"){if(x instanceof Uint8Array&&(x=Q(x)),typeof x!="string"||!h.includes(x.length))throw new Error("Invalid key");x=x.padStart(y*2,"0")}let S;try{S=typeof x=="bigint"?x:ot(M("private key",x,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof x}`)}return w&&(S=k(S,B)),i(S),S}l(s,"normPrivateKeyToScalar");let a=new Map;function d(x){if(!(x instanceof f))throw new Error("ProjectivePoint expected")}l(d,"assertPrjPoint");let m=class m{constructor(h,y,w){if(this.px=h,this.py=y,this.pz=w,h==null||!e.isValid(h))throw new Error("x required");if(y==null||!e.isValid(y))throw new Error("y required");if(w==null||!e.isValid(w))throw new Error("z required")}static fromAffine(h){let{x:y,y:w}=h||{};if(!h||!e.isValid(y)||!e.isValid(w))throw new Error("invalid affine point");if(h instanceof m)throw new Error("projective point not allowed");let B=l(S=>e.eql(S,e.ZERO),"is0");return B(y)&&B(w)?m.ZERO:new m(y,w,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let y=e.invertBatch(h.map(w=>w.pz));return h.map((w,B)=>w.toAffine(y[B])).map(m.fromAffine)}static fromHex(h){let y=m.fromAffine(o(M("pointHex",h)));return y.assertValidity(),y}static fromPrivateKey(h){return m.BASE.multiply(s(h))}_setWindowSize(h){this._WINDOW_SIZE=h,a.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}let{x:h,y}=this.toAffine();if(!e.isValid(h)||!e.isValid(y))throw new Error("bad point: x or y not FE");let w=e.sqr(y),B=c(h);if(!e.eql(w,B))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(e.isOdd)return!e.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){d(h);let{px:y,py:w,pz:B}=this,{px:S,py:N,pz:U}=h,v=e.eql(e.mul(y,U),e.mul(S,B)),P=e.eql(e.mul(w,U),e.mul(N,B));return v&&P}negate(){return new m(this.px,e.neg(this.py),this.pz)}double(){let{a:h,b:y}=n,w=e.mul(y,Ue),{px:B,py:S,pz:N}=this,U=e.ZERO,v=e.ZERO,P=e.ZERO,A=e.mul(B,B),F=e.mul(S,S),O=e.mul(N,N),I=e.mul(B,S);return I=e.add(I,I),P=e.mul(B,N),P=e.add(P,P),U=e.mul(h,P),v=e.mul(w,O),v=e.add(U,v),U=e.sub(F,v),v=e.add(F,v),v=e.mul(U,v),U=e.mul(I,U),P=e.mul(w,P),O=e.mul(h,O),I=e.sub(A,O),I=e.mul(h,I),I=e.add(I,P),P=e.add(A,A),A=e.add(P,A),A=e.add(A,O),A=e.mul(A,I),v=e.add(v,A),O=e.mul(S,N),O=e.add(O,O),A=e.mul(O,I),U=e.sub(U,A),P=e.mul(O,F),P=e.add(P,P),P=e.add(P,P),new m(U,v,P)}add(h){d(h);let{px:y,py:w,pz:B}=this,{px:S,py:N,pz:U}=h,v=e.ZERO,P=e.ZERO,A=e.ZERO,F=n.a,O=e.mul(n.b,Ue),I=e.mul(y,S),Y=e.mul(w,N),D=e.mul(B,U),$=e.add(y,w),g=e.add(S,N);$=e.mul($,g),g=e.add(I,Y),$=e.sub($,g),g=e.add(y,B);let p=e.add(S,U);return g=e.mul(g,p),p=e.add(I,D),g=e.sub(g,p),p=e.add(w,B),v=e.add(N,U),p=e.mul(p,v),v=e.add(Y,D),p=e.sub(p,v),A=e.mul(F,g),v=e.mul(O,D),A=e.add(v,A),v=e.sub(Y,A),A=e.add(Y,A),P=e.mul(v,A),Y=e.add(I,I),Y=e.add(Y,I),D=e.mul(F,D),g=e.mul(O,g),Y=e.add(Y,D),D=e.sub(I,D),D=e.mul(F,D),g=e.add(g,D),I=e.mul(Y,g),P=e.add(P,I),I=e.mul(p,g),v=e.mul($,v),v=e.sub(v,I),I=e.mul($,Y),A=e.mul(p,A),A=e.add(A,I),new m(v,P,A)}subtract(h){return this.add(h.negate())}is0(){return this.equals(m.ZERO)}wNAF(h){return E.wNAFCached(this,a,h,y=>{let w=e.invertBatch(y.map(B=>B.pz));return y.map((B,S)=>B.toAffine(w[S])).map(m.fromAffine)})}multiplyUnsafe(h){let y=m.ZERO;if(h===it)return y;if(i(h),h===X)return this;let{endo:w}=n;if(!w)return E.unsafeLadder(this,h);let{k1neg:B,k1:S,k2neg:N,k2:U}=w.splitScalar(h),v=y,P=y,A=this;for(;S>it||U>it;)S&X&&(v=v.add(A)),U&X&&(P=P.add(A)),A=A.double(),S>>=X,U>>=X;return B&&(v=v.negate()),N&&(P=P.negate()),P=new m(e.mul(P.px,w.beta),P.py,P.pz),v.add(P)}multiply(h){i(h);let y=h,w,B,{endo:S}=n;if(S){let{k1neg:N,k1:U,k2neg:v,k2:P}=S.splitScalar(y),{p:A,f:F}=this.wNAF(U),{p:O,f:I}=this.wNAF(P);A=E.constTimeNegate(N,A),O=E.constTimeNegate(v,O),O=new m(e.mul(O.px,S.beta),O.py,O.pz),w=A.add(O),B=F.add(I)}else{let{p:N,f:U}=this.wNAF(y);w=N,B=U}return m.normalizeZ([w,B])[0]}multiplyAndAddUnsafe(h,y,w){let B=m.BASE,S=l((U,v)=>v===it||v===X||!U.equals(B)?U.multiplyUnsafe(v):U.multiply(v),"mul"),N=S(this,y).add(S(h,w));return N.is0()?void 0:N}toAffine(h){let{px:y,py:w,pz:B}=this,S=this.is0();h==null&&(h=S?e.ONE:e.inv(B));let N=e.mul(y,h),U=e.mul(w,h),v=e.mul(B,h);if(S)return{x:e.ZERO,y:e.ZERO};if(!e.eql(v,e.ONE))throw new Error("invZ was invalid");return{x:N,y:U}}isTorsionFree(){let{h,isTorsionFree:y}=n;if(h===X)return!0;if(y)return y(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:y}=n;return h===X?this:y?y(m,this):this.multiplyUnsafe(n.h)}toRawBytes(h=!0){return this.assertValidity(),r(m,this,h)}toHex(h=!0){return Q(this.toRawBytes(h))}};l(m,"Point");let f=m;f.BASE=new f(n.Gx,n.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);let b=n.nBitLength,E=Te(f,n.endo?Math.ceil(b/2):b);return{CURVE:n,ProjectivePoint:f,normPrivateKeyToScalar:s,weierstrassEquation:c,isWithinCurveOrder:u}}l(bn,"weierstrassPoints");function xn(t){let n=se(t);return at(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}l(xn,"validateOpts");function Ie(t){let n=xn(t),{Fp:e,n:r}=n,o=e.BYTES+1,c=2*e.BYTES+1;function u(g){return it<g&&g<e.ORDER}l(u,"isValidFieldElement");function i(g){return k(g,r)}l(i,"modN");function s(g){return kt(g,r)}l(s,"invN");let{ProjectivePoint:a,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:b}=bn({...n,toBytes(g,p,T){let q=p.toAffine(),H=e.toBytes(q.x),V=_;return T?V(Uint8Array.from([p.hasEvenY()?2:3]),H):V(Uint8Array.from([4]),H,e.toBytes(q.y))},fromBytes(g){let p=g.length,T=g[0],q=g.subarray(1);if(p===o&&(T===2||T===3)){let H=ot(q);if(!u(H))throw new Error("Point is not on curve");let V=f(H),G=e.sqrt(V),W=(G&X)===X;return(T&1)===1!==W&&(G=e.neg(G)),{x:H,y:G}}else if(p===c&&T===4){let H=e.fromBytes(q.subarray(0,e.BYTES)),V=e.fromBytes(q.subarray(e.BYTES,2*e.BYTES));return{x:H,y:V}}else throw new Error(`Point of length ${p} was invalid. Expected ${o} compressed bytes or ${c} uncompressed bytes`)}}),E=l(g=>Q(rt(g,n.nByteLength)),"numToNByteStr");function m(g){let p=r>>X;return g>p}l(m,"isBiggerThanHalfOrder");function x(g){return m(g)?i(-g):g}l(x,"normalizeS");let h=l((g,p,T)=>ot(g.slice(p,T)),"slcNum"),$=class ${constructor(p,T,q){this.r=p,this.s=T,this.recovery=q,this.assertValidity()}static fromCompact(p){let T=n.nByteLength;return p=M("compactSignature",p,T*2),new $(h(p,0,T),h(p,T,2*T))}static fromDER(p){let{r:T,s:q}=bt.toSig(M("DER",p));return new $(T,q)}assertValidity(){if(!b(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!b(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(p){return new $(this.r,this.s,p)}recoverPublicKey(p){let{r:T,s:q,recovery:H}=this,V=v(M("msgHash",p));if(H==null||![0,1,2,3].includes(H))throw new Error("recovery id invalid");let G=H===2||H===3?T+n.n:T;if(G>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");let W=H&1?"03":"02",ct=a.fromHex(W+E(G)),ut=s(G),Et=i(-V*ut),Ut=i(q*ut),lt=a.BASE.multiplyAndAddUnsafe(ct,Et,Ut);if(!lt)throw new Error("point at infinify");return lt.assertValidity(),lt}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return yt(this.toDERHex())}toDERHex(){return bt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return yt(this.toCompactHex())}toCompactHex(){return E(this.r)+E(this.s)}};l($,"Signature");let y=$,w={isValidPrivateKey(g){try{return d(g),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let g=n.randomBytes(e.BYTES+8),p=Ae(g,r);return rt(p,n.nByteLength)},precompute(g=8,p=a.BASE){return p._setWindowSize(g),p.multiply(BigInt(3)),p}};function B(g,p=!0){return a.fromPrivateKey(g).toRawBytes(p)}l(B,"getPublicKey");function S(g){let p=g instanceof Uint8Array,T=typeof g=="string",q=(p||T)&&g.length;return p?q===o||q===c:T?q===2*o||q===2*c:g instanceof a}l(S,"isProbPub");function N(g,p,T=!0){if(S(g))throw new Error("first arg must be private key");if(!S(p))throw new Error("second arg must be public key");return a.fromHex(p).multiply(d(g)).toRawBytes(T)}l(N,"getSharedSecret");let U=n.bits2int||function(g){let p=ot(g),T=g.length*8-n.nBitLength;return T>0?p>>BigInt(T):p},v=n.bits2int_modN||function(g){return i(U(g))},P=It(n.nBitLength);function A(g){if(typeof g!="bigint")throw new Error("bigint expected");if(!(it<=g&&g<P))throw new Error(`bigint expected < 2^${n.nBitLength}`);return rt(g,n.nByteLength)}l(A,"int2octets");function F(g,p,T=O){if(["recovered","canonical"].some(mt=>mt in T))throw new Error("sign() legacy options not supported");let{hash:q,randomBytes:H}=n,{lowS:V,prehash:G,extraEntropy:W}=T;V==null&&(V=!0),g=M("msgHash",g),G&&(g=M("prehashed msgHash",q(g)));let ct=v(g),ut=d(p),Et=[A(ut),A(ct)];if(W!=null){let mt=W===!0?H(e.BYTES):W;Et.push(M("extraEntropy",mt,e.BYTES))}let Ut=_(...Et),lt=ct;function Jt(mt){let Bt=U(mt);if(!b(Bt))return;let we=s(Bt),St=a.BASE.multiply(Bt).toAffine(),tt=i(St.x);if(tt===it)return;let Pt=i(we*i(lt+tt*ut));if(Pt===it)return;let be=(St.x===tt?0:2)|Number(St.y&X),xe=Pt;return V&&m(Pt)&&(xe=x(Pt),be^=1),new y(tt,xe,be)}return l(Jt,"k2sig"),{seed:Ut,k2sig:Jt}}l(F,"prepSig");let O={lowS:n.lowS,prehash:!1},I={lowS:n.lowS,prehash:!1};function Y(g,p,T=O){let{seed:q,k2sig:H}=F(g,p,T),V=n;return ee(V.hash.outputLen,V.nByteLength,V.hmac)(q,H)}l(Y,"sign"),a.BASE._setWindowSize(8);function D(g,p,T,q=I){var St;let H=g;if(p=M("msgHash",p),T=M("publicKey",T),"strict"in q)throw new Error("options.strict was renamed to lowS");let{lowS:V,prehash:G}=q,W,ct;try{if(typeof H=="string"||H instanceof Uint8Array)try{W=y.fromDER(H)}catch(tt){if(!(tt instanceof bt.Err))throw tt;W=y.fromCompact(H)}else if(typeof H=="object"&&typeof H.r=="bigint"&&typeof H.s=="bigint"){let{r:tt,s:Pt}=H;W=new y(tt,Pt)}else throw new Error("PARSE");ct=a.fromHex(T)}catch(tt){if(tt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(V&&W.hasHighS())return!1;G&&(p=n.hash(p));let{r:ut,s:Et}=W,Ut=v(p),lt=s(Et),Jt=i(Ut*lt),mt=i(ut*lt),Bt=(St=a.BASE.multiplyAndAddUnsafe(ct,Jt,mt))==null?void 0:St.toAffine();return Bt?i(Bt.x)===ut:!1}return l(D,"verify"),{CURVE:n,getPublicKey:B,getSharedSecret:N,sign:Y,verify:D,ProjectivePoint:a,Signature:y,utils:w}}l(Ie,"weierstrass");var vn=Object.defineProperty,Ke=l((t,n)=>{for(var e in n)vn(t,e,{get:n[e],enumerable:!0})},"__export"),st={};Ke(st,{EmptyArray:()=>ge,arrayToHex:()=>Qt,arrayToUtf8:()=>he,calculateSharedKey:()=>Dn,comparePublicKeyHex:()=>zn,compressPublicKeyHex:()=>$n,doDecrypt:()=>Wn,doEncrypt:()=>Gn,doSignature:()=>Qn,doVerifySignature:()=>Xn,generateKeyPairHex:()=>de,getHash:()=>me,getPoint:()=>Ye,getPublicKeyFromPrivateKey:()=>ze,getZ:()=>Wt,hexToArray:()=>z,initRNGPool:()=>ae,leftPad:()=>C,precomputePublicKey:()=>Jn,utf8ToHex:()=>Tt,verifyPublicKey:()=>Mn});var Dt=BigInt(0),Nt=BigInt(1),En=BigInt(2),br=BigInt(3);function Bn(t){let n=t.toString(16);if(n[0]!=="-")n.length%2===1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{n=n.substring(1);let e=n.length;e%2===1?e+=1:n.match(/^[0-7]/)||(e+=2);let r="";for(let u=0;u<e;u++)r+="f";n=((R(r)^t)+Nt).toString(16).replace(/^-/,"")}return n}l(Bn,"bigintToValue");var Ot,Ce=(Ot=class{constructor(n=null,e="00",r="00",o=""){this.tlv=n,this.t=e,this.l=r,this.v=o}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){let n=this.v.length/2,e=n.toString(16);return e.length%2===1&&(e="0"+e),n<128?e:(128+e.length/2).toString(16)+e}getValue(){return""}},l(Ot,"ASN1Object"),Ot),qt,He=(qt=class extends Ce{constructor(n){super(),this.t="02",n&&(this.v=Bn(n))}getValue(){return this.v}},l(qt,"DERInteger"),qt),Rt,Sn=(Rt=class extends Ce{constructor(n){super(),this.asn1Array=n}t="30";getValue(){return this.v=this.asn1Array.map(n=>n.getEncodedHex()).join(""),this.v}},l(Rt,"DERSequence"),Rt);function Ve(t,n){return+t[n+2]<8?1:+t.substring(n+2,n+4)&127+1}l(Ve,"getLenOfL");function Ne(t,n){let e=Ve(t,n),r=t.substring(n+2,n+2+e*2);return r?+(+r[0]<8?R(r):R(r.substring(2))).toString():-1}l(Ne,"getL");function ce(t,n){let e=Ve(t,n);return n+(e+1)*2}l(ce,"getStartOfV");function Pn(t,n){let e=new He(t),r=new He(n);return new Sn([e,r]).getEncodedHex()}l(Pn,"encodeDer");function An(t){let n=ce(t,0),e=ce(t,n),r=Ne(t,n),o=t.substr(e,r*2),c=e+o.length,u=ce(t,c),i=Ne(t,c),s=t.substring(u,u+i*2),a=R(o),d=R(s);return{r:a,s:d}}l(An,"decodeDer");var ue=16384,vt=new Uint8Array(0),At;async function ae(){if("crypto"in globalThis){At=globalThis.crypto;return}if(!(vt.length>ue/2))if("wx"in globalThis&&"getRandomValues"in globalThis.wx)vt=await new Promise(t=>{wx.getRandomValues({length:ue,success(n){t(new Uint8Array(n.randomValues))}})});else try{globalThis.crypto?At=globalThis.crypto:At=(await import("crypto")).webcrypto;let t=new Uint8Array(ue);At.getRandomValues(t),vt=t}catch{throw new Error("no available csprng, abort.")}}l(ae,"initRNGPool");ae();function Tn(t){if(vt.length>t){let n=vt.slice(0,t);return vt=vt.slice(t),ae(),n}else throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.")}l(Tn,"consumePool");function Un(t=0){let n=new Uint8Array(t);return At?At.getRandomValues(n):Tn(t)}l(Un,"randomBytes");var je=l(t=>t instanceof Uint8Array,"u8a"),le=l(t=>new DataView(t.buffer,t.byteOffset,t.byteLength),"createView"),In=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!In)throw new Error("Non little-endian hardware is not supported");var Hn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Gt(t){if(!je(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=Hn[t[e]];return n}l(Gt,"bytesToHex");function Nn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}l(Nn,"utf8ToBytes");function fe(t){if(typeof t=="string"&&(t=Nn(t)),!je(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}l(fe,"toBytes");var Lt,Ze=(Lt=class{clone(){return this._cloneInto()}},l(Lt,"Hash"),Lt);function On(t){let n=l(r=>t().update(fe(r)).digest(),"hashC"),e=t();return n.outputLen=e.outputLen,n.blockLen=e.blockLen,n.create=()=>t(),n}l(On,"wrapConstructor");var qn=l((t,n,e)=>t&n|t&e|n&e,"BoolA"),Oe=l((t,n,e)=>t^n^e,"BoolB"),Rn=l((t,n,e)=>t&n|~t&e,"BoolC");function Ln(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);let o=BigInt(32),c=BigInt(4294967295),u=Number(e>>o&c),i=Number(e&c),s=r?4:0,a=r?0:4;t.setUint32(n+s,u,r),t.setUint32(n+a,i,r)}l(Ln,"setBigUint64");function J(t,n){let e=n&31;return t<<e|t>>>32-e}l(J,"rotl");function Kn(t){return t^J(t,9)^J(t,17)}l(Kn,"P0");function Cn(t){return t^J(t,15)^J(t,23)}l(Cn,"P1");var Kt,Vn=(Kt=class extends Ze{constructor(n,e,r,o){super(),this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(n),this.view=le(this.buffer)}buffer;view;finished=!1;length=0;pos=0;destroyed=!1;update(n){let{view:e,buffer:r,blockLen:o}=this;n=fe(n);let c=n.length;for(let u=0;u<c;){let i=Math.min(o-this.pos,c-u);if(i===o){let s=le(n);for(;o<=c-u;u+=o)this.process(s,u);continue}r.set(n.subarray(u,u+i),this.pos),this.pos+=i,u+=i,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:c}=this,{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>o-u&&(this.process(r,0),u=0);for(let f=u;f<o;f++)e[f]=0;Ln(r,o-8,BigInt(this.length*8),c),this.process(r,0);let i=le(n),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let a=s/4,d=this.get();if(a>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<a;f++)i.setUint32(4*f,d[f],c)}digest(){let{buffer:n,outputLen:e}=this;this.digestInto(n);let r=n.slice(0,e);return this.destroy(),r}_cloneInto(n){n||=new this.constructor,n.set(...this.get());let{blockLen:e,buffer:r,length:o,finished:c,destroyed:u,pos:i}=this;return n.length=o,n.pos=i,n.finished=c,n.destroyed=u,o%e&&n.buffer.set(r),n}},l(Kt,"SHA2"),Kt),ft=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),et=new Uint32Array(68),qe=new Uint32Array(64),jn=2043430169,Zn=2055708042,Ct,_n=(Ct=class extends Vn{A=ft[0]|0;B=ft[1]|0;C=ft[2]|0;D=ft[3]|0;E=ft[4]|0;F=ft[5]|0;G=ft[6]|0;H=ft[7]|0;constructor(){super(64,32,8,!1)}get(){let{A:n,B:e,C:r,D:o,E:c,F:u,G:i,H:s}=this;return[n,e,r,o,c,u,i,s]}set(n,e,r,o,c,u,i,s){this.A=n|0,this.B=e|0,this.C=r|0,this.D=o|0,this.E=c|0,this.F=u|0,this.G=i|0,this.H=s|0}process(n,e){for(let f=0;f<16;f++,e+=4)et[f]=n.getUint32(e,!1);for(let f=16;f<68;f++)et[f]=Cn(et[f-16]^et[f-9]^J(et[f-3],15))^J(et[f-13],7)^et[f-6];for(let f=0;f<64;f++)qe[f]=et[f]^et[f+4];let{A:r,B:o,C:c,D:u,E:i,F:s,G:a,H:d}=this;for(let f=0;f<64;f++){let b=f>=0&&f<=15,E=b?jn:Zn,m=J(J(r,12)+i+J(E,f),7),x=m^J(r,12),h=(b?Oe(r,o,c):qn(r,o,c))+u+x+qe[f]|0,y=(b?Oe(i,s,a):Rn(i,s,a))+d+m+et[f]|0;u=c,c=J(o,9),o=r,r=h,d=a,a=J(s,19),s=i,i=Kn(y)}r=r^this.A|0,o=o^this.B|0,c=c^this.C|0,u=u^this.D|0,i=i^this.E|0,s=s^this.F|0,a=a^this.G|0,d=d^this.H|0,this.set(r,o,c,u,i,s,a,d)}roundClean(){et.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},l(Ct,"SM3"),Ct),gt=On(()=>new _n),Vt,_e=(Vt=class extends Ze{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(n,e){super();let r=fe(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,c=new Uint8Array(o);c.set(r.length>o?n.create().update(r).digest():r);for(let u=0;u<c.length;u++)c[u]^=54;this.iHash.update(c),this.oHash=n.create();for(let u=0;u<c.length;u++)c[u]^=106;this.oHash.update(c),c.fill(0)}update(n){return this.iHash.update(n),this}digestInto(n){this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){let n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||=Object.create(Object.getPrototypeOf(this),{});let{oHash:e,iHash:r,finished:o,destroyed:c,blockLen:u,outputLen:i}=this;return n=n,n.finished=o,n.destroyed=c,n.blockLen=u,n.outputLen=i,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},l(Vt,"HMAC"),Vt),ke=l((t,n,e)=>new _e(t,n).update(e).digest(),"hmac");ke.create=(t,n)=>new _e(t,n);var kn=oe(BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991999")),L=Ie({a:BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991996"),b:BigInt("18505919022281880113072981827955639221458448578012075254857346196103069175443"),Fp:kn,h:Nt,n:BigInt("115792089210356248756420345214020892766061623724957744567843809356293439045923"),Gx:BigInt("22963146547237050559479531362550074578802567295341616970375194840604139615431"),Gy:BigInt("85132369209828568825618990617112496413088388631904505083283536607588877201568"),hash:gt,hmac:(t,...n)=>ke(gt,t,_(...n)),randomBytes:Un}),nt=oe(BigInt(L.CURVE.n));function de(t){let n=t?rt(k(BigInt(t),Nt)+Nt,32):L.utils.randomPrivateKey(),e=L.getPublicKey(n,!1),r=C(Q(n),64),o=C(Q(e),64);return{privateKey:r,publicKey:o}}l(de,"generateKeyPairHex");function $n(t){if(t.length!==130)throw new Error("Invalid public key to compress");let n=(t.length-2)/2,e=t.substring(2,2+n),r=R(t.substring(n+2,n+n+2)),o="03";return k(r,En)===Dt&&(o="02"),o+e}l($n,"compressPublicKeyHex");function Tt(t){t=decodeURIComponent(encodeURIComponent(t));let n=t.length,e=new Uint32Array((n>>>2)+1);for(let o=0;o<n;o++)e[o>>>2]|=(t.charCodeAt(o)&255)<<24-o%4*8;let r=[];for(let o=0;o<n;o++){let c=e[o>>>2]>>>24-o%4*8&255;r.push((c>>>4).toString(16)),r.push((c&15).toString(16))}return r.join("")}l(Tt,"utf8ToHex");function C(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t}l(C,"leftPad");function Qt(t){return t.map(n=>{let e=n.toString(16);return e.length===1?"0"+e:e}).join("")}l(Qt,"arrayToHex");function he(t){let n=[];for(let e=0,r=t.length;e<r;e++)t[e]>=240&&t[e]<=247?(n.push(String.fromCodePoint(((t[e]&7)<<18)+((t[e+1]&63)<<12)+((t[e+2]&63)<<6)+(t[e+3]&63))),e+=3):t[e]>=224&&t[e]<=239?(n.push(String.fromCodePoint(((t[e]&15)<<12)+((t[e+1]&63)<<6)+(t[e+2]&63))),e+=2):t[e]>=192&&t[e]<=223?(n.push(String.fromCodePoint(((t[e]&31)<<6)+(t[e+1]&63))),e++):n.push(String.fromCodePoint(t[e]));return n.join("")}l(he,"arrayToUtf8");function z(t){let n=t.length;n%2!==0&&(t=C(t,n+1)),n=t.length;let e=n/2,r=new Uint8Array(e);for(let o=0;o<e;o++)r[o]=parseInt(t.substring(o*2,o*2+2),16);return r}l(z,"hexToArray");function Mn(t){let n=L.ProjectivePoint.fromHex(t);if(!n)return!1;try{return n.assertValidity(),!0}catch{return!1}}l(Mn,"verifyPublicKey");function zn(t,n){let e=L.ProjectivePoint.fromHex(t);if(!e)return!1;let r=L.ProjectivePoint.fromHex(n);return r?e.equals(r):!1}l(zn,"comparePublicKeyHex");var Re=R("80000000000000000000000000000000"),Le=R("7fffffffffffffffffffffffffffffff");function Yn(t,n){let e=new Uint8Array(n),r=1,o=0,c=ge,u=new Uint8Array(4),i=l(()=>{u[0]=r>>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,c=gt(_(t,u)),r++,o=0},"nextT");i();for(let s=0,a=e.length;s<a;s++)o===c.length&&i(),e[s]=c[o++]&255;return e}l(Yn,"hkdf");function Dn(t,n,e,r,o,c=!1,u="1234567812345678",i="1234567812345678"){let s=L.ProjectivePoint.fromHex(n.publicKey),a=L.ProjectivePoint.fromHex(r),d=L.ProjectivePoint.fromHex(e),f=Wt(t.publicKey,u),b=Wt(e,i);c&&([f,b]=[b,f]);let E=R(n.privateKey),m=R(t.privateKey),x=s.x,h=Re+(x&Le),y=nt.add(m,nt.mulN(h,E)),w=a.x,B=nt.add(Re,w&Le),S=a.multiply(B).add(d).multiply(y),N=z(C(j(S.x),64)),U=z(C(j(S.y),64));return Yn(_(N,U,f,b),o)}l(Dn,"calculateSharedKey");var $e=0,ge=new Uint8Array;function Gn(t,n,e=1){let r=typeof t=="string"?z(Tt(t)):Uint8Array.from(t),o=typeof n=="string"?L.ProjectivePoint.fromHex(n):n,c=de(),u=R(c.privateKey),i=c.publicKey;i.length>128&&(i=i.substring(i.length-128));let s=o.multiply(u),a=z(C(j(s.x),64)),d=z(C(j(s.y),64)),f=Gt(gt(_(a,r,d)));Me(a,d,r);let b=Gt(r);return e===$e?i+b+f:i+f+b}l(Gn,"doEncrypt");function Me(t,n,e){let r=1,o=0,c=ge,u=new Uint8Array(4),i=l(()=>{u[0]=r>>24&255,u[1]=r>>16&255,u[2]=r>>8&255,u[3]=r&255,c=gt(_(t,n,u)),r++,o=0},"nextT");i();for(let s=0,a=e.length;s<a;s++)o===c.length&&i(),e[s]^=c[o++]&255}l(Me,"xorCipherStream");function Wn(t,n,e=1,{output:r="string"}={}){let o=R(n),c=t.substring(128,128+64),u=t.substring(128+64);e===$e&&(c=t.substring(t.length-64),u=t.substring(128,t.length-64));let i=z(u),a=L.ProjectivePoint.fromHex("04"+t.substring(0,128)).multiply(o),d=z(C(j(a.x),64)),f=z(C(j(a.y),64));return Me(d,f,i),Qt(Array.from(gt(_(d,i,f))))===c.toLowerCase()?r==="array"?i:he(i):r==="array"?[]:""}l(Wn,"doDecrypt");function Qn(t,n,e={}){let{pointPool:r,der:o,hash:c,publicKey:u,userId:i}=e,s=typeof t=="string"?Tt(t):Qt(Array.from(t));c&&(u=u||ze(n),s=me(s,u,i));let a=R(n),d=R(s),f=null,b=null,E=null;do{do{let m;r&&r.length?m=r.pop():m=Ye(),f=m.k,b=nt.add(d,m.x1)}while(b===Dt||b+f===L.CURVE.n);E=nt.mul(nt.inv(nt.addN(a,Nt)),nt.subN(f,nt.mulN(b,a)))}while(E===Dt);return o?Pn(b,E):C(j(b),64)+C(j(E),64)}l(Qn,"doSignature");function Xn(t,n,e,r={}){let o,{hash:c,der:u,userId:i}=r,s=typeof e=="string"?e:e.toHex(!1);c?o=me(typeof t=="string"?Tt(t):t,s,i):o=typeof t=="string"?Tt(t):Qt(Array.from(t));let a,d;if(u){let h=An(n);a=h.r,d=h.s}else a=R(n.substring(0,64)),d=R(n.substring(64));let f=typeof e=="string"?L.ProjectivePoint.fromHex(e):e,b=R(o),E=nt.add(a,d);if(E===Dt)return!1;let m=L.ProjectivePoint.BASE.multiply(d).add(f.multiply(E)),x=nt.add(b,m.x);return a===x}l(Xn,"doVerifySignature");function Wt(t,n="1234567812345678"){n=Tt(n);let e=C(j(L.CURVE.a),64),r=C(j(L.CURVE.b),64),o=C(j(L.ProjectivePoint.BASE.x),64),c=C(j(L.ProjectivePoint.BASE.y),64),u,i;if(t.length===128)u=t.substring(0,64),i=t.substring(64,128);else{let f=L.ProjectivePoint.fromHex(t);u=C(j(f.x),64),i=C(j(f.y),64)}let s=z(n+e+r+o+c+u+i),a=n.length*4;return gt(_(new Uint8Array([a>>8&255,a&255]),s))}l(Wt,"getZ");function me(t,n,e="1234567812345678"){let r=Wt(n,e);return Gt(gt(_(r,typeof t=="string"?z(t):t)))}l(me,"getHash");function Jn(t,n){let e=L.ProjectivePoint.fromHex(t);return L.utils.precompute(n,e)}l(Jn,"precomputePublicKey");function ze(t){let n=L.getPublicKey(t,!1);return C(Q(n),64)}l(ze,"getPublicKeyFromPrivateKey");function Ye(){let t=de(),n=L.ProjectivePoint.fromHex(t.publicKey),e=R(t.privateKey);return{...t,k:e,x1:n.x}}l(Ye,"getPoint");function Fn(t){let n=[];for(let e=0,r=t.length;e<r;e++){let o=t.codePointAt(e);if(o<=127)n.push(o);else if(o<=2047)n.push(192|o>>>6),n.push(128|o&63);else if(o<=55295||o>=57344&&o<=65535)n.push(224|o>>>12),n.push(128|o>>>6&63),n.push(128|o&63);else if(o>=65536&&o<=1114111)e++,n.push(240|o>>>18&28),n.push(128|o>>>12&63),n.push(128|o>>>6&63),n.push(128|o&63);else throw n.push(o),new Error("input is not supported")}return new Uint8Array(n)}l(Fn,"utf8ToArray");var tr={};Ke(tr,{decrypt:()=>ir,encrypt:()=>or,sm4:()=>ye});var dt=0,er=32,xt=16,Mt=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),zt=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function ht(t){return(Mt[t>>>24&255]&255)<<24|(Mt[t>>>16&255]&255)<<16|(Mt[t>>>8&255]&255)<<8|Mt[t&255]&255}l(ht,"byteSub");var Sr=new Uint32Array(4),Pr=new Uint32Array(4);function nr(t,n,e){let r=0,o=0,c=0,u=0,i=0,s=0,a=0,d=0;i=t[0]&255,s=t[1]&255,a=t[2]&255,d=t[3]&255,r=i<<24|s<<16|a<<8|d,i=t[4]&255,s=t[5]&255,a=t[6]&255,d=t[7]&255,o=i<<24|s<<16|a<<8|d,i=t[8]&255,s=t[9]&255,a=t[10]&255,d=t[11]&255,c=i<<24|s<<16|a<<8|d,i=t[12]&255,s=t[13]&255,a=t[14]&255,d=t[15]&255,u=i<<24|s<<16|a<<8|d;for(let f=0;f<32;f+=4)i=o^c^u^e[f],i=ht(i),r^=i^(i<<2|i>>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8),s=c^u^r^e[f+1],s=ht(s),o^=s^(s<<2|s>>>30)^(s<<10|s>>>22)^(s<<18|s>>>14)^(s<<24|s>>>8),a=u^r^o^e[f+2],a=ht(a),c^=a^(a<<2|a>>>30)^(a<<10|a>>>22)^(a<<18|a>>>14)^(a<<24|a>>>8),d=r^o^c^e[f+3],d=ht(d),u^=d^(d<<2|d>>>30)^(d<<10|d>>>22)^(d<<18|d>>>14)^(d<<24|d>>>8);n[0]=u>>>24&255,n[1]=u>>>16&255,n[2]=u>>>8&255,n[3]=u&255,n[4]=c>>>24&255,n[5]=c>>>16&255,n[6]=c>>>8&255,n[7]=c&255,n[8]=o>>>24&255,n[9]=o>>>16&255,n[10]=o>>>8&255,n[11]=o&255,n[12]=r>>>24&255,n[13]=r>>>16&255,n[14]=r>>>8&255,n[15]=r&255}l(nr,"sms4Crypt");function rr(t,n,e){let r=0,o=0,c=0,u=0,i=0;r=(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255,o=(t[4]&255)<<24|(t[5]&255)<<16|(t[6]&255)<<8|t[7]&255,c=(t[8]&255)<<24|(t[9]&255)<<16|(t[10]&255)<<8|t[11]&255,u=(t[12]&255)<<24|(t[13]&255)<<16|(t[14]&255)<<8|t[15]&255,r^=2746333894,o^=1453994832,c^=1736282519,u^=2993693404;for(let s=0;s<32;s+=4)i=o^c^u^zt[s+0],i=ht(i),r^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+0]=r,i=c^u^r^zt[s+1],i=ht(i),o^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+1]=o,i=u^r^o^zt[s+2],i=ht(i),c^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+2]=c,i=r^o^c^zt[s+3],i=ht(i),u^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[s+3]=u;if(e===dt)for(let s=0;s<16;s++)[n[s],n[31-s]]=[n[31-s],n[s]]}l(rr,"sms4KeyExt");var Yt=new Uint8Array(16);function ye(t,n,e,r={}){let{padding:o="pkcs#7",mode:c,iv:u=new Uint8Array(16),output:i}=r;if(c==="cbc"&&(typeof u=="string"&&(u=z(u)),u.length!==128/8))throw new Error("iv is invalid");if(typeof n=="string"&&(n=z(n)),n.length!==128/8)throw new Error("key is invalid");if(typeof t=="string"?e!==dt?t=Fn(t):t=z(t):t=Uint8Array.from(t),(o==="pkcs#5"||o==="pkcs#7")&&e!==dt){let E=xt-t.length%xt,m=new Uint8Array(t.length+E);m.set(t,0);for(let x=0;x<E;x++)m[t.length+x]=E;t=m}let s=new Uint32Array(er);rr(n,s,e);let a=new Uint8Array(t.length),d=u,f=t.length,b=0;for(;f>=xt;){let E=t.subarray(b,b+16);if(c==="cbc")for(let m=0;m<xt;m++)e!==dt&&(E[m]^=d[m]);nr(E,Yt,s);for(let m=0;m<xt;m++)c==="cbc"&&e===dt&&(Yt[m]^=d[m]),a[b+m]=Yt[m];c==="cbc"&&(e!==dt?d=Yt:d=E),f-=xt,b+=xt}if((o==="pkcs#5"||o==="pkcs#7")&&e===dt){let E=a.length,m=a[E-1];for(let x=1;x<=m;x++)if(a[E-x]!==m)throw new Error("padding is invalid");a=a.slice(0,E-m)}return i!=="array"?e!==dt?Gt(a):he(a):a}l(ye,"sm4");function or(t,n,e={}){return ye(t,n,1,e)}l(or,"encrypt");function ir(t,n,e={}){return ye(t,n,0,e)}l(ir,"decrypt");async function Xt(t){let n="__$$RNGPoolInitialized";Reflect.getOwnMetadata(n,t)||(await st.initRNGPool(),Reflect.defineMetadata(n,!0,t))}l(Xt,"initRNGPool");var pe=class pe extends ve{options={cipherMode:1,signatureSM3Hash:!0,signatureUserId:void 0};createPrivateKey(n){return n}createPublicKey(n){return n}decrypt(n){return st.doDecrypt(Buffer.from(n,"base64").toString("hex"),this.privateKey,this.options.cipherMode,{output:"string"})}encrypt(n){return Buffer.from(st.doEncrypt(n,this.publicKey,this.options.cipherMode),"hex").toString("base64")}async generateKeyPair(n){let{publicKey:e,privateKey:r}=st.generateKeyPairHex();return n!=null&&n.compressPublicKey&&(e=st.compressPublicKeyHex(e)),{publicKey:e,privateKey:r}}sign(n){return Buffer.from(st.doSignature(n,this.privateKey,{hash:this.options.signatureSM3Hash,publicKey:this.publicKey?this.publicKey:void 0,userId:this.options.signatureUserId}),"hex").toString("base64")}verify(n,e){return st.doVerifySignature(n,Buffer.from(e,"base64").toString("hex"),this.publicKey,{hash:this.options.signatureSM3Hash,userId:this.options.signatureUserId})}static async generateKeyPair(n){return await Xt(this),super.generateKeyPair(n)}static async loadKeyPair(n,e){return await Xt(this),super.loadKeyPair(n,e)}static async loadPublicKey(n,e){return await Xt(this),super.loadPublicKey(n,e)}static async loadPrivateKey(n,e){return await Xt(this),super.loadPrivateKey(n,e)}};l(pe,"SM2");var De=pe;export{De as a};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@noble/curves/esm/abstract/utils.js:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-XSYGZTQV.js";import{a as n}from"./chunk-IJBWUUYT.js";var r=class r extends o{ivLength=16;keyLength=16;constructor(c,e){if(super(),!arguments.length)return;let t=e===void 0,s=`aria-128-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}};n(r,"ARIA128");var i=r;export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r=_chunkGCH3XFDEcjs.e.call(void 0, _chunkJXEPU67Wcjs.a.call(void 0, ),1);var t= (_class =class t extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=32}constructor(s,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let i=e===void 0,c=`aes-256-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, t,"AES256");var l=t;exports.a = l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-XSYGZTQV.js";import{a as o,e as h}from"./chunk-IJBWUUYT.js";var t=h(u(),1);var r=class r extends n{ivLength=8;keyLength=24;constructor(s,e){if(super(),!arguments.length)return;let i=e===void 0,c=`des-ede3-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,t.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,t.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}};o(r,"TripleDES");var l=r;export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r= (_class =class r extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=32}constructor(c,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let t=e===void 0,s=`aria-256-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, r,"ARIA256");var i=r;exports.a = i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r= (_class =class r extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=24}constructor(c,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let t=e===void 0,s=`camellia-192-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, r,"CAMELLIA192");var i=r;exports.a = i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-NII7JZ5T.js";import{a as n}from"./chunk-XSYGZTQV.js";import{a as o,e as h}from"./chunk-IJBWUUYT.js";var r=h(a(),1);var t=class t extends n{ivLength=16;keyLength=32;constructor(s,e){if(super(),!arguments.length)return;let i=e===void 0,c=`aes-256-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}};o(t,"AES256");var l=t;export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJHE6H77Jcjs = require('./chunk-JHE6H77J.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var _crypto = require('crypto');var n= (_class =class n extends _chunkJHE6H77Jcjs.a{constructor(...args) { super(...args); _class.prototype.__init.call(this); }__init() {this.options={signatureAlgorithm:"sha256"}}createPrivateKey(e){return _crypto.createPrivateKey.call(void 0, e)}createPublicKey(e){return _crypto.createPublicKey.call(void 0, e)}decrypt(e){return _crypto.privateDecrypt.call(void 0, this.privateKey,Buffer.from(e,"base64")).toString()}encrypt(e){return _crypto.publicEncrypt.call(void 0, this.publicKey,Buffer.from(e)).toString("base64")}async generateKeyPair(e){return new Promise((r,u)=>(e=e||{},e.modulusLength=e.modulusLength?e.modulusLength:1024,e.publicExponent=e.publicExponent?e.publicExponent:65537,e.publicKeyEncoding=e.publicKeyEncoding?e.publicKeyEncoding:{},e.publicKeyEncoding.type=e.publicKeyEncoding.type?e.publicKeyEncoding.type:"pkcs1",e.publicKeyEncoding.format=e.publicKeyEncoding.format?e.publicKeyEncoding.format:"pem",e.privateKeyEncoding=e.privateKeyEncoding?e.privateKeyEncoding:{},e.privateKeyEncoding.format=e.privateKeyEncoding.format?e.privateKeyEncoding.format:"pem",e.privateKeyEncoding.type=e.privateKeyEncoding.type?e.privateKeyEncoding.type:"pkcs1",_crypto.generateKeyPair.call(void 0, "rsa",e,(c,t,i)=>c?u(c):r({publicKey:typeof t=="string"?t:t.toString("base64"),privateKey:typeof i=="string"?i:i.toString("base64")}))))}sign(e){return _crypto.sign.call(void 0, this.options.signatureAlgorithm,Buffer.from(e),this.privateKey).toString("base64")}verify(e,r){return _crypto.verify.call(void 0, this.options.signatureAlgorithm,Buffer.from(e),this.publicKey,Buffer.from(r,"base64"))}static async generateKeyPair(e){return super.generateKeyPair(e)}static async loadKeyPair(e,r){return super.loadKeyPair(e,r)}static async loadPublicKey(e,r){return super.loadPublicKey(e,r)}static async loadPrivateKey(e,r){return super.loadPrivateKey(e,r)}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, n,"RSA");var p=n;exports.a = p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var t=_chunkGCH3XFDEcjs.e.call(void 0, _chunkJXEPU67Wcjs.a.call(void 0, ),1);var r= (_class =class r extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=8}__init2() {this.keyLength=24}constructor(s,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let i=e===void 0,c=`des-ede3-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,t.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,t.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, r,"TripleDES");var l=r;exports.a = l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r=_chunkGCH3XFDEcjs.e.call(void 0, _chunkJXEPU67Wcjs.a.call(void 0, ),1);var t= (_class =class t extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=16}constructor(s,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let i=e===void 0,c=`aes-128-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, t,"AES128");var l=t;exports.a = l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkY7UZF5WXcjs = require('./chunk-Y7UZF5WX.cjs');var _chunkKAJSHTKYcjs = require('./chunk-KAJSHTKY.cjs');var _chunkGLLJSEW2cjs = require('./chunk-GLLJSEW2.cjs');var _chunkHBVN2AE5cjs = require('./chunk-HBVN2AE5.cjs');var _chunkQR75NC42cjs = require('./chunk-QR75NC42.cjs');var _chunkUHLLUT46cjs = require('./chunk-UHLLUT46.cjs');var _chunkHJTGBEZHcjs = require('./chunk-HJTGBEZH.cjs');var _chunk5HZKVHTEcjs = require('./chunk-5HZKVHTE.cjs');var _chunk23QFRECRcjs = require('./chunk-23QFRECR.cjs');var _chunk24ACYUZAcjs = require('./chunk-24ACYUZA.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var _promises = require('fs/promises');async function d(i){let t=i;if(_chunk24ACYUZAcjs.b.call(void 0, i))try{(await _promises.stat.call(void 0, i)).isFile()&&(t=await _promises.readFile.call(void 0, i,{encoding:"utf-8"}))}catch (e2){t=i}return t}_chunkGCH3XFDEcjs.a.call(void 0, d,"getKeyContent");var s= (_class =class s{__init() {this.options={}}constructor(t){;_class.prototype.__init.call(this);if(t){if(t.privateKey)try{this.privateKey=this.createPrivateKey(t.privateKey),this.privateKeyString=t.privateKey}catch(r){throw new (0, _chunkQR75NC42cjs.a)(r)}if(t.publicKey)try{this.publicKey=this.createPublicKey(t.publicKey),this.publicKeyString=t.publicKey}catch(r){throw new (0, _chunkUHLLUT46cjs.a)(r)}}}_encrypt(t){try{return this.encrypt(t)}catch(r){throw new (0, _chunkY7UZF5WXcjs.a)(r)}}_decrypt(t){try{return this.decrypt(t)}catch(r){throw new (0, _chunk23QFRECRcjs.a)(r)}}_sign(t){try{return this.sign(t)}catch(r){throw new (0, _chunkKAJSHTKYcjs.a)(r)}}_verify(t,r){try{return this.verify(t,r)}catch(e){throw new (0, _chunkGLLJSEW2cjs.a)(e)}}getPublicKey(){return this.publicKeyString}getPrivateKey(){return this.privateKeyString}get public(){if(!this.publicKey)throw new (0, _chunk5HZKVHTEcjs.a)("Public key not found");return{encrypt:t=>this._encrypt(t),verify:(t,r)=>this._verify(t,r),getPublicKey:()=>this.getPublicKey()}}get private(){if(!this.privateKey)throw new (0, _chunkHJTGBEZHcjs.a)("Private key not found");return{decrypt:t=>this._decrypt(t),sign:t=>this._sign(t),getPrivateKey:()=>this.getPrivateKey()}}static async generateKeyPair(t){return await new this().generateKeyPair(t)}static async loadKeyPair(t,r){let e=new this(t);e.options=Object.assign(e.options,r||{});let c=_chunk24ACYUZAcjs.u.call(void 0, ),v=e.sign(c);if(!e.verify(c,v))throw new (0, _chunkHBVN2AE5cjs.a)("Invalid key pair");return e}static async loadPublicKey(t,r){let e=new this({publicKey:await d(t)});return e.options=Object.assign(e.options,r||{}),e.public}static async loadPrivateKey(t,r){let e=new this({privateKey:await d(t)});return e.options=Object.assign(e.options,r||{}),e.private}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, s,"AsymmetricEncryption");var h=s;exports.a = h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r=_chunkGCH3XFDEcjs.e.call(void 0, _chunkJXEPU67Wcjs.a.call(void 0, ),1);var t= (_class =class t extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=8}__init2() {this.keyLength=16}constructor(s,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let i=e===void 0,c=`des-ede-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, t,"DES");var l=t;exports.a = l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkJXEPU67Wcjs = require('./chunk-JXEPU67W.cjs');var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r=_chunkGCH3XFDEcjs.e.call(void 0, _chunkJXEPU67Wcjs.a.call(void 0, ),1);var t= (_class =class t extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=24}constructor(s,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let i=e===void 0,c=`aes-192-${i?"ecb":"cbc"}`;this.initCipher(c,i,s,e)}algorithmNotFoundInitializer(){return{blockSize:16,cipherCreator:()=>(0,r.createCipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv),decipherCreator:()=>(0,r.createDecipheriv)(this.algorithm,this.key,this.allowNullIV?null:this.iv)}}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, t,"AES192");var l=t;exports.a = l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkMGUDOG42cjs = require('./chunk-MGUDOG42.cjs');var _chunkGCH3XFDEcjs = require('./chunk-GCH3XFDE.cjs');var r= (_class =class r extends _chunkMGUDOG42cjs.a{__init() {this.ivLength=16}__init2() {this.keyLength=32}constructor(c,e){if(super();_class.prototype.__init.call(this);_class.prototype.__init2.call(this);,!arguments.length)return;let t=e===void 0,s=`camellia-256-${t?"ecb":"cbc"}`;this.initCipher(s,t,c,e)}}, _class);_chunkGCH3XFDEcjs.a.call(void 0, r,"CAMELLIA256");var i=r;exports.a = i;
|