@shhhum/xftp-web 0.15.0 → 0.17.0
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.
|
@@ -1410,4 +1410,4 @@ jvæ®íG.ÉÂ;5
,rdñL¡è¿¢0B¼Kf¨øÐpKÂ0¾T£QlÇRï
|
|
|
1410
1410
|
·'8!\x1B.üm,M\r8STs
|
|
1411
1411
|
e»
|
|
1412
1412
|
jv.ÉÂ
,r¡è¿¢Kf¨pK£QlÇèÑ$Ö
5ôp jÁ¤\bl7LwH'µ¼°4³\f9JªØNOÊ[óo.hîtoc¥xxÈ\bÇúÿ¾ëlP¤÷£ù¾òxqÆ\0A¶\v!SigEd25519 no Ed25519 collisions\0Að¶\vE¡\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x07\0\0\0\b\0\0\0 \0\0\0
|
|
1413
|
-
\0\0\0\v\0\0\0\f\0\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0`)}function uA(I){return I}async function D6(I){return I}async function M6(I,e2){try{var H=await D6(I),L2=await WebAssembly.instantiate(H,e2);return L2}catch(F2){V(`failed to asynchronously prepare wasm: ${F2}`),R1(F2)}}async function S6(I,e2,H){return M6(e2,H)}function z1(){var I={a:ut};return I}async function $1(){function I(r1,R2){return jA=r1.exports,ht(jA),o2(),J1(),jA}E1();function e2(r1){return I(r1.instance)}var H=z1();if(k.instantiateWasm)return new Promise((r1,R2)=>{k.instantiateWasm(H,(ur,qr)=>{r1(I(ur))})});n6??=m6();var L2=await S6(E,n6,H),F2=e2(L2);return F2}var F1=I=>{for(;I.length>0;)I.shift()(k)},K1=[],Z1=I=>K1.push(I),N1=[],W1=I=>N1.push(I),u1=0,f1=null,J1=I=>{if(u1--,k.monitorRunDependencies?.(u1),u1==0&&f1){var e2=f1;f1=null,e2()}},E1=I=>{u1++,k.monitorRunDependencies?.(u1)};function b1(I,e2="i8"){switch(e2.endsWith("*")&&(e2="*"),e2){case"i1":return u0[I];case"i8":return u0[I];case"i16":return I0[I>>1];case"i32":return Q0[I>>2];case"i64":R1("to do getValue(i64) use WASM_BIGINT");case"float":return N0[I>>2];case"double":return E0[I>>3];case"*":return R0[I>>2];default:R1(`invalid type for getValue: ${e2}`)}}function rr(I,e2,H="i8"){switch(H.endsWith("*")&&(H="*"),H){case"i1":u0[I]=e2;break;case"i8":u0[I]=e2;break;case"i16":I0[I>>1]=e2;break;case"i32":Q0[I>>2]=e2;break;case"i64":R1("to do setValue(i64) use WASM_BIGINT");case"float":N0[I>>2]=e2;break;case"double":E0[I>>3]=e2;break;case"*":R0[I>>2]=e2;break;default:R1(`invalid type for setValue: ${H}`)}}for(var O1=globalThis.TextDecoder&&new TextDecoder,Ar=(I,e2,H,L2)=>{var F2=e2+H;if(L2)return F2;for(;I[e2]&&!(e2>=F2);)++e2;return e2},nr=(I,e2=0,H,L2)=>{var F2=Ar(I,e2,H,L2);if(F2-e2>16&&I.buffer&&O1)return O1.decode(I.subarray(e2,F2));for(var r1="";e2<F2;){var R2=I[e2++];if(!(R2&128)){r1+=String.fromCharCode(R2);continue}var ur=I[e2++]&63;if((R2&224)==192){r1+=String.fromCharCode((R2&31)<<6|ur);continue}var qr=I[e2++]&63;if((R2&240)==224?R2=(R2&15)<<12|ur<<6|qr:R2=(R2&7)<<18|ur<<12|qr<<6|I[e2++]&63,R2<65536)r1+=String.fromCharCode(R2);else{var Rr=R2-65536;r1+=String.fromCharCode(55296|Rr>>10,56320|Rr&1023)}}return r1},z2=(I,e2,H)=>I?nr(c0,I,e2,H):"",I6=(I,e2,H,L2)=>R1(`Assertion failed: ${z2(I)}, at: `+[e2?z2(e2):"unknown filename",H,L2?z2(L2):"unknown function"]),nt=()=>R1(""),lA=[],et=(I,e2)=>{lA.length=0;for(var H;H=c0[I++];){var L2=H!=105;L2&=H!=112,e2+=L2&&e2%8?4:0,lA.push(H==112?R0[e2>>2]:H==105?Q0[e2>>2]:E0[e2>>3]),e2+=L2?8:4}return lA},tt=(I,e2,H)=>{var L2=et(e2,H);return Bt[I](...L2)},_t=(I,e2,H)=>tt(I,e2,H),it=()=>2147483648,st=(I,e2)=>Math.ceil(I/e2)*e2,ot=I=>{var e2=C6.buffer.byteLength,H=(I-e2+65535)/65536|0;try{return C6.grow(H),o2(),1}catch{}},yt=I=>{var e2=c0.length;I>>>=0;var H=it();if(I>H)return!1;for(var L2=1;L2<=4;L2*=2){var F2=e2*(1+.2/L2);F2=Math.min(F2,I+100663296);var r1=Math.min(H,st(Math.max(I,F2),65536)),R2=ot(r1);if(R2)return!0}return!1},e6=new Uint8Array(123),hr=25;hr>=0;--hr)e6[48+hr]=52+hr,e6[65+hr]=hr,e6[97+hr]=26+hr;if(e6[43]=62,e6[47]=63,k.noExitRuntime&&k.noExitRuntime,k.print&&k.print,k.printErr&&(V=k.printErr),k.wasmBinary&&(E=k.wasmBinary),k.arguments&&k.arguments,k.thisProgram&&k.thisProgram,k.preInit)for(typeof k.preInit=="function"&&(k.preInit=[k.preInit]);k.preInit.length>0;)k.preInit.shift()();k.setValue=rr,k.getValue=b1,k.UTF8ToString=z2;var Bt={39864:()=>k.getRandomValue(),39900:()=>{if(k.getRandomValue===void 0)try{var I=typeof window=="object"?window:self,e2=typeof I.crypto<"u"?I.crypto:I.msCrypto;e2=e2===void 0?L2:e2;var H=function(){var r1=new Uint32Array(1);return e2.getRandomValues(r1),r1[0]>>>0};H(),k.getRandomValue=H}catch{try{var L2=null,F2=function(){var R2=L2.randomBytes(4);return(R2[0]<<24|R2[1]<<16|R2[2]<<8|R2[3])>>>0};F2(),k.getRandomValue=F2}catch{throw"No secure random number generator found"}}}},C6;function ht(I){k._crypto_aead_aegis128l_keybytes=I.f,k._crypto_aead_aegis128l_nsecbytes=I.g,k._crypto_aead_aegis128l_npubbytes=I.h,k._crypto_aead_aegis128l_abytes=I.i,k._crypto_aead_aegis128l_messagebytes_max=I.j,k._crypto_aead_aegis128l_keygen=I.k,k._crypto_aead_aegis128l_encrypt=I.l,k._crypto_aead_aegis128l_encrypt_detached=I.m,k._crypto_aead_aegis128l_decrypt=I.n,k._crypto_aead_aegis128l_decrypt_detached=I.o,k._crypto_aead_aegis256_keybytes=I.p,k._crypto_aead_aegis256_nsecbytes=I.q,k._crypto_aead_aegis256_npubbytes=I.r,k._crypto_aead_aegis256_abytes=I.s,k._crypto_aead_aegis256_messagebytes_max=I.t,k._crypto_aead_aegis256_keygen=I.u,k._crypto_aead_aegis256_encrypt=I.v,k._crypto_aead_aegis256_encrypt_detached=I.w,k._crypto_aead_aegis256_decrypt=I.x,k._crypto_aead_aegis256_decrypt_detached=I.y,k._crypto_aead_aes256gcm_is_available=I.z,k._crypto_aead_chacha20poly1305_encrypt_detached=I.A,k._crypto_aead_chacha20poly1305_encrypt=I.B,k._crypto_aead_chacha20poly1305_ietf_encrypt_detached=I.C,k._crypto_aead_chacha20poly1305_ietf_encrypt=I.D,k._crypto_aead_chacha20poly1305_decrypt_detached=I.E,k._crypto_aead_chacha20poly1305_decrypt=I.F,k._crypto_aead_chacha20poly1305_ietf_decrypt_detached=I.G,k._crypto_aead_chacha20poly1305_ietf_decrypt=I.H,k._crypto_aead_chacha20poly1305_ietf_keybytes=I.I,k._crypto_aead_chacha20poly1305_ietf_npubbytes=I.J,k._crypto_aead_chacha20poly1305_ietf_nsecbytes=I.K,k._crypto_aead_chacha20poly1305_ietf_abytes=I.L,k._crypto_aead_chacha20poly1305_ietf_messagebytes_max=I.M,k._crypto_aead_chacha20poly1305_ietf_keygen=I.N,k._crypto_aead_chacha20poly1305_keybytes=I.O,k._crypto_aead_chacha20poly1305_npubbytes=I.P,k._crypto_aead_chacha20poly1305_nsecbytes=I.Q,k._crypto_aead_chacha20poly1305_abytes=I.R,k._crypto_aead_chacha20poly1305_messagebytes_max=I.S,k._crypto_aead_chacha20poly1305_keygen=I.T,k._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=I.U,k._crypto_aead_xchacha20poly1305_ietf_encrypt=I.V,k._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=I.W,k._crypto_aead_xchacha20poly1305_ietf_decrypt=I.X,k._crypto_aead_xchacha20poly1305_ietf_keybytes=I.Y,k._crypto_aead_xchacha20poly1305_ietf_npubbytes=I.Z,k._crypto_aead_xchacha20poly1305_ietf_nsecbytes=I._,k._crypto_aead_xchacha20poly1305_ietf_abytes=I.$,k._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=I.aa,k._crypto_aead_xchacha20poly1305_ietf_keygen=I.ba,k._crypto_auth_bytes=I.ca,k._crypto_auth_keybytes=I.da,k._crypto_auth_primitive=I.ea,k._crypto_auth=I.fa,k._crypto_auth_verify=I.ga,k._crypto_auth_keygen=I.ha,k._crypto_auth_hmacsha256_bytes=I.ia,k._crypto_auth_hmacsha256_keybytes=I.ja,k._crypto_auth_hmacsha256_statebytes=I.ka,k._crypto_auth_hmacsha256_keygen=I.la,k._crypto_auth_hmacsha256_init=I.ma,k._crypto_auth_hmacsha256_update=I.na,k._crypto_auth_hmacsha256_final=I.oa,k._crypto_auth_hmacsha256=I.pa,k._crypto_auth_hmacsha256_verify=I.qa,k._crypto_auth_hmacsha512_bytes=I.ra,k._crypto_auth_hmacsha512_keybytes=I.sa,k._crypto_auth_hmacsha512_statebytes=I.ta,k._crypto_auth_hmacsha512_keygen=I.ua,k._crypto_auth_hmacsha512_init=I.va,k._crypto_auth_hmacsha512_update=I.wa,k._crypto_auth_hmacsha512_final=I.xa,k._crypto_auth_hmacsha512=I.ya,k._crypto_auth_hmacsha512_verify=I.za,k._crypto_auth_hmacsha512256_bytes=I.Aa,k._crypto_auth_hmacsha512256_keybytes=I.Ba,k._crypto_auth_hmacsha512256_statebytes=I.Ca,k._crypto_auth_hmacsha512256_keygen=I.Da,k._crypto_auth_hmacsha512256_init=I.Ea,k._crypto_auth_hmacsha512256_update=I.Fa,k._crypto_auth_hmacsha512256_final=I.Ga,k._crypto_auth_hmacsha512256=I.Ha,k._crypto_auth_hmacsha512256_verify=I.Ia,k._crypto_box_seedbytes=I.Ja,k._crypto_box_publickeybytes=I.Ka,k._crypto_box_secretkeybytes=I.La,k._crypto_box_beforenmbytes=I.Ma,k._crypto_box_noncebytes=I.Na,k._crypto_box_zerobytes=I.Oa,k._crypto_box_boxzerobytes=I.Pa,k._crypto_box_macbytes=I.Qa,k._crypto_box_messagebytes_max=I.Ra,k._crypto_box_primitive=I.Sa,k._crypto_box_seed_keypair=I.Ta,k._crypto_box_keypair=I.Ua,k._crypto_box_beforenm=I.Va,k._crypto_box_afternm=I.Wa,k._crypto_box_open_afternm=I.Xa,k._crypto_box=I.Ya,k._crypto_box_open=I.Za,k._crypto_box_detached_afternm=I._a,k._crypto_box_detached=I.$a,k._crypto_box_easy_afternm=I.ab,k._crypto_box_easy=I.bb,k._crypto_box_open_detached_afternm=I.cb,k._crypto_box_open_detached=I.db,k._crypto_box_open_easy_afternm=I.eb,k._crypto_box_open_easy=I.fb,k._crypto_box_seal=I.gb,k._crypto_box_seal_open=I.hb,k._crypto_box_sealbytes=I.ib,k._crypto_box_curve25519xsalsa20poly1305_seed_keypair=I.jb,k._crypto_box_curve25519xsalsa20poly1305_keypair=I.kb,k._crypto_box_curve25519xsalsa20poly1305_beforenm=I.lb,k._crypto_box_curve25519xsalsa20poly1305_afternm=I.mb,k._crypto_box_curve25519xsalsa20poly1305_open_afternm=I.nb,k._crypto_box_curve25519xsalsa20poly1305=I.ob,k._crypto_box_curve25519xsalsa20poly1305_open=I.pb,k._crypto_box_curve25519xsalsa20poly1305_seedbytes=I.qb,k._crypto_box_curve25519xsalsa20poly1305_publickeybytes=I.rb,k._crypto_box_curve25519xsalsa20poly1305_secretkeybytes=I.sb,k._crypto_box_curve25519xsalsa20poly1305_beforenmbytes=I.tb,k._crypto_box_curve25519xsalsa20poly1305_noncebytes=I.ub,k._crypto_box_curve25519xsalsa20poly1305_zerobytes=I.vb,k._crypto_box_curve25519xsalsa20poly1305_boxzerobytes=I.wb,k._crypto_box_curve25519xsalsa20poly1305_macbytes=I.xb,k._crypto_box_curve25519xsalsa20poly1305_messagebytes_max=I.yb,k._crypto_core_hchacha20=I.zb,k._crypto_core_hchacha20_outputbytes=I.Ab,k._crypto_core_hchacha20_inputbytes=I.Bb,k._crypto_core_hchacha20_keybytes=I.Cb,k._crypto_core_hchacha20_constbytes=I.Db,k._crypto_core_hsalsa20=I.Eb,k._crypto_core_hsalsa20_outputbytes=I.Fb,k._crypto_core_hsalsa20_inputbytes=I.Gb,k._crypto_core_hsalsa20_keybytes=I.Hb,k._crypto_core_hsalsa20_constbytes=I.Ib,k._crypto_core_salsa20=I.Jb,k._crypto_core_salsa20_outputbytes=I.Kb,k._crypto_core_salsa20_inputbytes=I.Lb,k._crypto_core_salsa20_keybytes=I.Mb,k._crypto_core_salsa20_constbytes=I.Nb,k._crypto_core_salsa2012=I.Ob,k._crypto_core_salsa2012_outputbytes=I.Pb,k._crypto_core_salsa2012_inputbytes=I.Qb,k._crypto_core_salsa2012_keybytes=I.Rb,k._crypto_core_salsa2012_constbytes=I.Sb,k._crypto_core_salsa208=I.Tb,k._crypto_core_salsa208_outputbytes=I.Ub,k._crypto_core_salsa208_inputbytes=I.Vb,k._crypto_core_salsa208_keybytes=I.Wb,k._crypto_core_salsa208_constbytes=I.Xb,k._crypto_generichash_bytes_min=I.Yb,k._crypto_generichash_bytes_max=I.Zb,k._crypto_generichash_bytes=I._b,k._crypto_generichash_keybytes_min=I.$b,k._crypto_generichash_keybytes_max=I.ac,k._crypto_generichash_keybytes=I.bc,k._crypto_generichash_primitive=I.cc,k._crypto_generichash_statebytes=I.dc,k._crypto_generichash=I.ec,k._crypto_generichash_init=I.fc,k._crypto_generichash_update=I.gc,k._crypto_generichash_final=I.hc,k._crypto_generichash_keygen=I.ic,k._crypto_generichash_blake2b_bytes_min=I.jc,k._crypto_generichash_blake2b_bytes_max=I.kc,k._crypto_generichash_blake2b_bytes=I.lc,k._crypto_generichash_blake2b_keybytes_min=I.mc,k._crypto_generichash_blake2b_keybytes_max=I.nc,k._crypto_generichash_blake2b_keybytes=I.oc,k._crypto_generichash_blake2b_saltbytes=I.pc,k._crypto_generichash_blake2b_personalbytes=I.qc,k._crypto_generichash_blake2b_statebytes=I.rc,k._crypto_generichash_blake2b_keygen=I.sc,k._crypto_generichash_blake2b=I.tc,k._crypto_generichash_blake2b_salt_personal=I.uc,k._crypto_generichash_blake2b_init=I.vc,k._crypto_generichash_blake2b_init_salt_personal=I.wc,k._crypto_generichash_blake2b_update=I.xc,k._crypto_generichash_blake2b_final=I.yc,k._crypto_hash_bytes=I.zc,k._crypto_hash=I.Ac,k._crypto_hash_primitive=I.Bc,k._crypto_hash_sha256_bytes=I.Cc,k._crypto_hash_sha256_statebytes=I.Dc,k._crypto_hash_sha256_init=I.Ec,k._crypto_hash_sha256_update=I.Fc,k._crypto_hash_sha256_final=I.Gc,k._crypto_hash_sha256=I.Hc,k._crypto_hash_sha512_bytes=I.Ic,k._crypto_hash_sha512_statebytes=I.Jc,k._crypto_hash_sha512_init=I.Kc,k._crypto_hash_sha512_update=I.Lc,k._crypto_hash_sha512_final=I.Mc,k._crypto_hash_sha512=I.Nc,k._crypto_kdf_blake2b_bytes_min=I.Oc,k._crypto_kdf_blake2b_bytes_max=I.Pc,k._crypto_kdf_blake2b_contextbytes=I.Qc,k._crypto_kdf_blake2b_keybytes=I.Rc,k._crypto_kdf_blake2b_derive_from_key=I.Sc,k._crypto_kdf_primitive=I.Tc,k._crypto_kdf_bytes_min=I.Uc,k._crypto_kdf_bytes_max=I.Vc,k._crypto_kdf_contextbytes=I.Wc,k._crypto_kdf_keybytes=I.Xc,k._crypto_kdf_derive_from_key=I.Yc,k._crypto_kdf_keygen=I.Zc,k._crypto_kdf_hkdf_sha256_extract_init=I._c,k._crypto_kdf_hkdf_sha256_extract_update=I.$c,k._crypto_kdf_hkdf_sha256_extract_final=I.ad,k._crypto_kdf_hkdf_sha256_extract=I.bd,k._crypto_kdf_hkdf_sha256_keygen=I.cd,k._crypto_kdf_hkdf_sha256_expand=I.dd,k._crypto_kdf_hkdf_sha256_keybytes=I.ed,k._crypto_kdf_hkdf_sha256_bytes_min=I.fd,k._crypto_kdf_hkdf_sha256_bytes_max=I.gd,k._crypto_kdf_hkdf_sha256_statebytes=I.hd,k._crypto_kdf_hkdf_sha512_extract_init=I.id,k._crypto_kdf_hkdf_sha512_extract_update=I.jd,k._crypto_kdf_hkdf_sha512_extract_final=I.kd,k._crypto_kdf_hkdf_sha512_extract=I.ld,k._crypto_kdf_hkdf_sha512_keygen=I.md,k._crypto_kdf_hkdf_sha512_expand=I.nd,k._crypto_kdf_hkdf_sha512_keybytes=I.od,k._crypto_kdf_hkdf_sha512_bytes_min=I.pd,k._crypto_kdf_hkdf_sha512_bytes_max=I.qd,k._crypto_kdf_hkdf_sha512_statebytes=I.rd,k._crypto_kx_seed_keypair=I.sd,k._crypto_kx_keypair=I.td,k._crypto_kx_client_session_keys=I.ud,k._crypto_kx_server_session_keys=I.vd,k._crypto_kx_publickeybytes=I.wd,k._crypto_kx_secretkeybytes=I.xd,k._crypto_kx_seedbytes=I.yd,k._crypto_kx_sessionkeybytes=I.zd,k._crypto_kx_primitive=I.Ad,k._crypto_onetimeauth_statebytes=I.Bd,k._crypto_onetimeauth_bytes=I.Cd,k._crypto_onetimeauth_keybytes=I.Dd,k._crypto_onetimeauth=I.Ed,k._crypto_onetimeauth_verify=I.Fd,k._crypto_onetimeauth_init=I.Gd,k._crypto_onetimeauth_update=I.Hd,k._crypto_onetimeauth_final=I.Id,k._crypto_onetimeauth_primitive=I.Jd,k._crypto_onetimeauth_keygen=I.Kd,k._crypto_onetimeauth_poly1305=I.Ld,k._crypto_onetimeauth_poly1305_verify=I.Md,k._crypto_onetimeauth_poly1305_init=I.Nd,k._crypto_onetimeauth_poly1305_update=I.Od,k._crypto_onetimeauth_poly1305_final=I.Pd,k._crypto_onetimeauth_poly1305_bytes=I.Qd,k._crypto_onetimeauth_poly1305_keybytes=I.Rd,k._crypto_onetimeauth_poly1305_statebytes=I.Sd,k._crypto_onetimeauth_poly1305_keygen=I.Td,k._crypto_pwhash_argon2i_alg_argon2i13=I.Ud,k._crypto_pwhash_argon2i_bytes_min=I.Vd,k._crypto_pwhash_argon2i_bytes_max=I.Wd,k._crypto_pwhash_argon2i_passwd_min=I.Xd,k._crypto_pwhash_argon2i_passwd_max=I.Yd,k._crypto_pwhash_argon2i_saltbytes=I.Zd,k._crypto_pwhash_argon2i_strbytes=I._d,k._crypto_pwhash_argon2i_strprefix=I.$d,k._crypto_pwhash_argon2i_opslimit_min=I.ae,k._crypto_pwhash_argon2i_opslimit_max=I.be,k._crypto_pwhash_argon2i_memlimit_min=I.ce,k._crypto_pwhash_argon2i_memlimit_max=I.de,k._crypto_pwhash_argon2i_opslimit_interactive=I.ee,k._crypto_pwhash_argon2i_memlimit_interactive=I.fe,k._crypto_pwhash_argon2i_opslimit_moderate=I.ge,k._crypto_pwhash_argon2i_memlimit_moderate=I.he,k._crypto_pwhash_argon2i_opslimit_sensitive=I.ie,k._crypto_pwhash_argon2i_memlimit_sensitive=I.je,k._crypto_pwhash_argon2i=I.ke,k._crypto_pwhash_argon2i_str=I.le,k._crypto_pwhash_argon2i_str_verify=I.me,k._crypto_pwhash_argon2i_str_needs_rehash=I.ne,k._crypto_pwhash_argon2id_str_needs_rehash=I.oe,k._crypto_pwhash_argon2id_alg_argon2id13=I.pe,k._crypto_pwhash_argon2id_bytes_min=I.qe,k._crypto_pwhash_argon2id_bytes_max=I.re,k._crypto_pwhash_argon2id_passwd_min=I.se,k._crypto_pwhash_argon2id_passwd_max=I.te,k._crypto_pwhash_argon2id_saltbytes=I.ue,k._crypto_pwhash_argon2id_strbytes=I.ve,k._crypto_pwhash_argon2id_strprefix=I.we,k._crypto_pwhash_argon2id_opslimit_min=I.xe,k._crypto_pwhash_argon2id_opslimit_max=I.ye,k._crypto_pwhash_argon2id_memlimit_min=I.ze,k._crypto_pwhash_argon2id_memlimit_max=I.Ae,k._crypto_pwhash_argon2id_opslimit_interactive=I.Be,k._crypto_pwhash_argon2id_memlimit_interactive=I.Ce,k._crypto_pwhash_argon2id_opslimit_moderate=I.De,k._crypto_pwhash_argon2id_memlimit_moderate=I.Ee,k._crypto_pwhash_argon2id_opslimit_sensitive=I.Fe,k._crypto_pwhash_argon2id_memlimit_sensitive=I.Ge,k._crypto_pwhash_argon2id=I.He,k._crypto_pwhash_argon2id_str=I.Ie,k._crypto_pwhash_argon2id_str_verify=I.Je,k._crypto_pwhash_alg_argon2i13=I.Ke,k._crypto_pwhash_alg_argon2id13=I.Le,k._crypto_pwhash_alg_default=I.Me,k._crypto_pwhash_bytes_min=I.Ne,k._crypto_pwhash_bytes_max=I.Oe,k._crypto_pwhash_passwd_min=I.Pe,k._crypto_pwhash_passwd_max=I.Qe,k._crypto_pwhash_saltbytes=I.Re,k._crypto_pwhash_strbytes=I.Se,k._crypto_pwhash_strprefix=I.Te,k._crypto_pwhash_opslimit_min=I.Ue,k._crypto_pwhash_opslimit_max=I.Ve,k._crypto_pwhash_memlimit_min=I.We,k._crypto_pwhash_memlimit_max=I.Xe,k._crypto_pwhash_opslimit_interactive=I.Ye,k._crypto_pwhash_memlimit_interactive=I.Ze,k._crypto_pwhash_opslimit_moderate=I._e,k._crypto_pwhash_memlimit_moderate=I.$e,k._crypto_pwhash_opslimit_sensitive=I.af,k._crypto_pwhash_memlimit_sensitive=I.bf,k._crypto_pwhash=I.cf,k._crypto_pwhash_str=I.df,k._crypto_pwhash_str_alg=I.ef,k._crypto_pwhash_str_verify=I.ff,k._crypto_pwhash_str_needs_rehash=I.gf,k._crypto_pwhash_primitive=I.hf,k._crypto_scalarmult_primitive=I.jf,k._crypto_scalarmult_base=I.kf,k._crypto_scalarmult=I.lf,k._crypto_scalarmult_bytes=I.mf,k._crypto_scalarmult_scalarbytes=I.nf,k._crypto_scalarmult_curve25519=I.of,k._crypto_scalarmult_curve25519_base=I.pf,k._crypto_scalarmult_curve25519_bytes=I.qf,k._crypto_scalarmult_curve25519_scalarbytes=I.rf,k._crypto_secretbox_keybytes=I.sf,k._crypto_secretbox_noncebytes=I.tf,k._crypto_secretbox_zerobytes=I.uf,k._crypto_secretbox_boxzerobytes=I.vf,k._crypto_secretbox_macbytes=I.wf,k._crypto_secretbox_messagebytes_max=I.xf,k._crypto_secretbox_primitive=I.yf,k._crypto_secretbox=I.zf,k._crypto_secretbox_open=I.Af,k._crypto_secretbox_keygen=I.Bf,k._crypto_secretbox_detached=I.Cf,k._crypto_secretbox_easy=I.Df,k._crypto_secretbox_open_detached=I.Ef,k._crypto_secretbox_open_easy=I.Ff,k._crypto_secretbox_xsalsa20poly1305=I.Gf,k._crypto_secretbox_xsalsa20poly1305_open=I.Hf,k._crypto_secretbox_xsalsa20poly1305_keybytes=I.If,k._crypto_secretbox_xsalsa20poly1305_noncebytes=I.Jf,k._crypto_secretbox_xsalsa20poly1305_zerobytes=I.Kf,k._crypto_secretbox_xsalsa20poly1305_boxzerobytes=I.Lf,k._crypto_secretbox_xsalsa20poly1305_macbytes=I.Mf,k._crypto_secretbox_xsalsa20poly1305_messagebytes_max=I.Nf,k._crypto_secretbox_xsalsa20poly1305_keygen=I.Of,k._crypto_secretstream_xchacha20poly1305_keygen=I.Pf,k._crypto_secretstream_xchacha20poly1305_init_push=I.Qf,k._crypto_secretstream_xchacha20poly1305_init_pull=I.Rf,k._crypto_secretstream_xchacha20poly1305_rekey=I.Sf,k._crypto_secretstream_xchacha20poly1305_push=I.Tf,k._crypto_secretstream_xchacha20poly1305_pull=I.Uf,k._crypto_secretstream_xchacha20poly1305_statebytes=I.Vf,k._crypto_secretstream_xchacha20poly1305_abytes=I.Wf,k._crypto_secretstream_xchacha20poly1305_headerbytes=I.Xf,k._crypto_secretstream_xchacha20poly1305_keybytes=I.Yf,k._crypto_secretstream_xchacha20poly1305_messagebytes_max=I.Zf,k._crypto_secretstream_xchacha20poly1305_tag_message=I._f,k._crypto_secretstream_xchacha20poly1305_tag_push=I.$f,k._crypto_secretstream_xchacha20poly1305_tag_rekey=I.ag,k._crypto_secretstream_xchacha20poly1305_tag_final=I.bg,k._crypto_shorthash_bytes=I.cg,k._crypto_shorthash_keybytes=I.dg,k._crypto_shorthash_primitive=I.eg,k._crypto_shorthash=I.fg,k._crypto_shorthash_keygen=I.gg,k._crypto_shorthash_siphash24_bytes=I.hg,k._crypto_shorthash_siphash24_keybytes=I.ig,k._crypto_shorthash_siphash24=I.jg,k._crypto_sign_statebytes=I.kg,k._crypto_sign_bytes=I.lg,k._crypto_sign_seedbytes=I.mg,k._crypto_sign_publickeybytes=I.ng,k._crypto_sign_secretkeybytes=I.og,k._crypto_sign_messagebytes_max=I.pg,k._crypto_sign_primitive=I.qg,k._crypto_sign_seed_keypair=I.rg,k._crypto_sign_keypair=I.sg,k._crypto_sign=I.tg,k._crypto_sign_open=I.ug,k._crypto_sign_detached=I.vg,k._crypto_sign_verify_detached=I.wg,k._crypto_sign_init=I.xg,k._crypto_sign_update=I.yg,k._crypto_sign_final_create=I.zg,k._crypto_sign_final_verify=I.Ag,k._crypto_sign_ed25519ph_statebytes=I.Bg,k._crypto_sign_ed25519_bytes=I.Cg,k._crypto_sign_ed25519_seedbytes=I.Dg,k._crypto_sign_ed25519_publickeybytes=I.Eg,k._crypto_sign_ed25519_secretkeybytes=I.Fg,k._crypto_sign_ed25519_messagebytes_max=I.Gg,k._crypto_sign_ed25519_sk_to_seed=I.Hg,k._crypto_sign_ed25519_sk_to_pk=I.Ig,k._crypto_sign_ed25519ph_init=I.Jg,k._crypto_sign_ed25519ph_update=I.Kg,k._crypto_sign_ed25519ph_final_create=I.Lg,k._crypto_sign_ed25519ph_final_verify=I.Mg,k._crypto_sign_ed25519_seed_keypair=I.Ng,k._crypto_sign_ed25519_keypair=I.Og,k._crypto_sign_ed25519_pk_to_curve25519=I.Pg,k._crypto_sign_ed25519_sk_to_curve25519=I.Qg,k._crypto_sign_ed25519_verify_detached=I.Rg,k._crypto_sign_ed25519_open=I.Sg,k._crypto_sign_ed25519_detached=I.Tg,k._crypto_sign_ed25519=I.Ug,k._crypto_stream_chacha20_keybytes=I.Vg,k._crypto_stream_chacha20_noncebytes=I.Wg,k._crypto_stream_chacha20_messagebytes_max=I.Xg,k._crypto_stream_chacha20_ietf_keybytes=I.Yg,k._crypto_stream_chacha20_ietf_noncebytes=I.Zg,k._crypto_stream_chacha20_ietf_messagebytes_max=I._g,k._crypto_stream_chacha20=I.$g,k._crypto_stream_chacha20_xor_ic=I.ah,k._crypto_stream_chacha20_xor=I.bh,k._crypto_stream_chacha20_ietf=I.ch,k._crypto_stream_chacha20_ietf_xor_ic=I.dh,k._crypto_stream_chacha20_ietf_xor=I.eh,k._crypto_stream_chacha20_ietf_keygen=I.fh,k._crypto_stream_chacha20_keygen=I.gh,k._crypto_stream_keybytes=I.hh,k._crypto_stream_noncebytes=I.ih,k._crypto_stream_messagebytes_max=I.jh,k._crypto_stream_primitive=I.kh,k._crypto_stream=I.lh,k._crypto_stream_xor=I.mh,k._crypto_stream_keygen=I.nh,k._crypto_stream_salsa20_keybytes=I.oh,k._crypto_stream_salsa20_noncebytes=I.ph,k._crypto_stream_salsa20_messagebytes_max=I.qh,k._crypto_stream_salsa20=I.rh,k._crypto_stream_salsa20_xor_ic=I.sh,k._crypto_stream_salsa20_xor=I.th,k._crypto_stream_salsa20_keygen=I.uh,k._crypto_stream_xsalsa20=I.vh,k._crypto_stream_xsalsa20_xor_ic=I.wh,k._crypto_stream_xsalsa20_xor=I.xh,k._crypto_stream_xsalsa20_keybytes=I.yh,k._crypto_stream_xsalsa20_noncebytes=I.zh,k._crypto_stream_xsalsa20_messagebytes_max=I.Ah,k._crypto_stream_xsalsa20_keygen=I.Bh,k._crypto_verify_16_bytes=I.Ch,k._crypto_verify_32_bytes=I.Dh,k._crypto_verify_64_bytes=I.Eh,k._crypto_verify_16=I.Fh,k._crypto_verify_32=I.Gh,k._crypto_verify_64=I.Hh,k._randombytes_implementation_name=I.Ih,k._randombytes_random=I.Jh,k._randombytes_stir=I.Kh,k._randombytes_uniform=I.Lh,k._randombytes_buf=I.Mh,k._randombytes_buf_deterministic=I.Nh,k._randombytes_seedbytes=I.Oh,k._randombytes_close=I.Ph,k._randombytes=I.Qh,k._sodium_bin2hex=I.Rh,k._sodium_hex2bin=I.Sh,k._sodium_base64_encoded_len=I.Th,k._sodium_bin2base64=I.Uh,k._sodium_base642bin=I.Vh,k._sodium_init=I.Wh,k._sodium_pad=I.Xh,k._sodium_unpad=I.Yh,k._sodium_version_string=I.Zh,k._sodium_library_version_major=I._h,k._sodium_library_version_minor=I.$h,k._sodium_library_minimal=I.ai,k._crypto_box_curve25519xchacha20poly1305_seed_keypair=I.bi,k._crypto_box_curve25519xchacha20poly1305_keypair=I.ci,k._crypto_box_curve25519xchacha20poly1305_beforenm=I.di,k._crypto_box_curve25519xchacha20poly1305_detached_afternm=I.ei,k._crypto_box_curve25519xchacha20poly1305_detached=I.fi,k._crypto_box_curve25519xchacha20poly1305_easy_afternm=I.gi,k._crypto_box_curve25519xchacha20poly1305_easy=I.hi,k._crypto_box_curve25519xchacha20poly1305_open_detached_afternm=I.ii,k._crypto_box_curve25519xchacha20poly1305_open_detached=I.ji,k._crypto_box_curve25519xchacha20poly1305_open_easy_afternm=I.ki,k._crypto_box_curve25519xchacha20poly1305_open_easy=I.li,k._crypto_box_curve25519xchacha20poly1305_seedbytes=I.mi,k._crypto_box_curve25519xchacha20poly1305_publickeybytes=I.ni,k._crypto_box_curve25519xchacha20poly1305_secretkeybytes=I.oi,k._crypto_box_curve25519xchacha20poly1305_beforenmbytes=I.pi,k._crypto_box_curve25519xchacha20poly1305_noncebytes=I.qi,k._crypto_box_curve25519xchacha20poly1305_macbytes=I.ri,k._crypto_box_curve25519xchacha20poly1305_messagebytes_max=I.si,k._crypto_box_curve25519xchacha20poly1305_seal=I.ti,k._crypto_box_curve25519xchacha20poly1305_seal_open=I.ui,k._crypto_box_curve25519xchacha20poly1305_sealbytes=I.vi,k._crypto_core_ed25519_is_valid_point=I.wi,k._crypto_core_ed25519_add=I.xi,k._crypto_core_ed25519_sub=I.yi,k._crypto_core_ed25519_from_uniform=I.zi,k._crypto_core_ed25519_random=I.Ai,k._crypto_core_ed25519_scalar_random=I.Bi,k._crypto_core_ed25519_scalar_invert=I.Ci,k._crypto_core_ed25519_scalar_negate=I.Di,k._crypto_core_ed25519_scalar_complement=I.Ei,k._crypto_core_ed25519_scalar_add=I.Fi,k._crypto_core_ed25519_scalar_reduce=I.Gi,k._crypto_core_ed25519_scalar_sub=I.Hi,k._crypto_core_ed25519_scalar_mul=I.Ii,k._crypto_core_ed25519_bytes=I.Ji,k._crypto_core_ed25519_nonreducedscalarbytes=I.Ki,k._crypto_core_ed25519_uniformbytes=I.Li,k._crypto_core_ed25519_hashbytes=I.Mi,k._crypto_core_ed25519_scalarbytes=I.Ni,k._crypto_core_ristretto255_is_valid_point=I.Oi,k._crypto_core_ristretto255_add=I.Pi,k._crypto_core_ristretto255_sub=I.Qi,k._crypto_core_ristretto255_from_hash=I.Ri,k._crypto_core_ristretto255_random=I.Si,k._crypto_core_ristretto255_scalar_random=I.Ti,k._crypto_core_ristretto255_scalar_invert=I.Ui,k._crypto_core_ristretto255_scalar_negate=I.Vi,k._crypto_core_ristretto255_scalar_complement=I.Wi,k._crypto_core_ristretto255_scalar_add=I.Xi,k._crypto_core_ristretto255_scalar_sub=I.Yi,k._crypto_core_ristretto255_scalar_mul=I.Zi,k._crypto_core_ristretto255_scalar_reduce=I._i,k._crypto_core_ristretto255_bytes=I.$i,k._crypto_core_ristretto255_nonreducedscalarbytes=I.aj,k._crypto_core_ristretto255_hashbytes=I.bj,k._crypto_core_ristretto255_scalarbytes=I.cj,k._crypto_pwhash_scryptsalsa208sha256_ll=I.dj,k._crypto_pwhash_scryptsalsa208sha256_bytes_min=I.ej,k._crypto_pwhash_scryptsalsa208sha256_bytes_max=I.fj,k._crypto_pwhash_scryptsalsa208sha256_passwd_min=I.gj,k._crypto_pwhash_scryptsalsa208sha256_passwd_max=I.hj,k._crypto_pwhash_scryptsalsa208sha256_saltbytes=I.ij,k._crypto_pwhash_scryptsalsa208sha256_strbytes=I.jj,k._crypto_pwhash_scryptsalsa208sha256_strprefix=I.kj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_min=I.lj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_max=I.mj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_min=I.nj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_max=I.oj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_interactive=I.pj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_interactive=I.qj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive=I.rj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive=I.sj,k._crypto_pwhash_scryptsalsa208sha256=I.tj,k._crypto_pwhash_scryptsalsa208sha256_str=I.uj,k._crypto_pwhash_scryptsalsa208sha256_str_verify=I.vj,k._crypto_pwhash_scryptsalsa208sha256_str_needs_rehash=I.wj,k._crypto_scalarmult_ed25519=I.xj,k._crypto_scalarmult_ed25519_noclamp=I.yj,k._crypto_scalarmult_ed25519_base=I.zj,k._crypto_scalarmult_ed25519_base_noclamp=I.Aj,k._crypto_scalarmult_ed25519_bytes=I.Bj,k._crypto_scalarmult_ed25519_scalarbytes=I.Cj,k._crypto_scalarmult_ristretto255=I.Dj,k._crypto_scalarmult_ristretto255_base=I.Ej,k._crypto_scalarmult_ristretto255_bytes=I.Fj,k._crypto_scalarmult_ristretto255_scalarbytes=I.Gj,k._crypto_secretbox_xchacha20poly1305_detached=I.Hj,k._crypto_secretbox_xchacha20poly1305_easy=I.Ij,k._crypto_secretbox_xchacha20poly1305_open_detached=I.Jj,k._crypto_secretbox_xchacha20poly1305_open_easy=I.Kj,k._crypto_secretbox_xchacha20poly1305_keybytes=I.Lj,k._crypto_secretbox_xchacha20poly1305_noncebytes=I.Mj,k._crypto_secretbox_xchacha20poly1305_macbytes=I.Nj,k._crypto_secretbox_xchacha20poly1305_messagebytes_max=I.Oj,k._crypto_shorthash_siphashx24_bytes=I.Pj,k._crypto_shorthash_siphashx24_keybytes=I.Qj,k._crypto_shorthash_siphashx24=I.Rj,k._crypto_stream_salsa2012=I.Sj,k._crypto_stream_salsa2012_xor=I.Tj,k._crypto_stream_salsa2012_keybytes=I.Uj,k._crypto_stream_salsa2012_noncebytes=I.Vj,k._crypto_stream_salsa2012_messagebytes_max=I.Wj,k._crypto_stream_salsa2012_keygen=I.Xj,k._crypto_stream_salsa208=I.Yj,k._crypto_stream_salsa208_xor=I.Zj,k._crypto_stream_salsa208_keybytes=I._j,k._crypto_stream_salsa208_noncebytes=I.$j,k._crypto_stream_salsa208_messagebytes_max=I.ak,k._crypto_stream_salsa208_keygen=I.bk,k._crypto_stream_xchacha20_keybytes=I.ck,k._crypto_stream_xchacha20_noncebytes=I.dk,k._crypto_stream_xchacha20_messagebytes_max=I.ek,k._crypto_stream_xchacha20=I.fk,k._crypto_stream_xchacha20_xor_ic=I.gk,k._crypto_stream_xchacha20_xor=I.hk,k._crypto_stream_xchacha20_keygen=I.ik,k._malloc=I.jk,k._free=I.kk,I.dynCall_iiiji,I.dynCall_iiij,I.dynCall_iijii,I.dynCall_iiijiji,I.dynCall_iiijiii,C6=I.e,I.__indirect_function_table}var ut={b:I6,c:nt,a:_t,d:yt};function pA(){if(u1>0){f1=pA;return}if(S2(),u1>0){f1=pA;return}function I(){k.calledRun=!0,!e0&&(k.onRuntimeInitialized?.(),s1())}k.setStatus?(k.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>k.setStatus(""),1),I()},1)):I()}var jA;$1(),pA()}).catch(function(){return Er.useBackupModule()});var e4=D1;let X;const f2={},S3=e4.ready.then(function(){function a(){if(X._sodium_init()<0)throw new Error("libsodium was not correctly initialized.");for(var S=["crypto_aead_aegis128l_decrypt","crypto_aead_aegis128l_decrypt_detached","crypto_aead_aegis128l_encrypt","crypto_aead_aegis128l_encrypt_detached","crypto_aead_aegis128l_keygen","crypto_aead_aegis256_decrypt","crypto_aead_aegis256_decrypt_detached","crypto_aead_aegis256_encrypt","crypto_aead_aegis256_encrypt_detached","crypto_aead_aegis256_keygen","crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_final","crypto_auth_hmacsha256_init","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_update","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512256","crypto_auth_hmacsha512256_final","crypto_auth_hmacsha512256_init","crypto_auth_hmacsha512256_keygen","crypto_auth_hmacsha512256_update","crypto_auth_hmacsha512256_verify","crypto_auth_hmacsha512_final","crypto_auth_hmacsha512_init","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_update","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_beforenm","crypto_box_curve25519xchacha20poly1305_detached","crypto_box_curve25519xchacha20poly1305_detached_afternm","crypto_box_curve25519xchacha20poly1305_easy","crypto_box_curve25519xchacha20poly1305_easy_afternm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_open_detached","crypto_box_curve25519xchacha20poly1305_open_detached_afternm","crypto_box_curve25519xchacha20poly1305_open_easy","crypto_box_curve25519xchacha20poly1305_open_easy_afternm","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_curve25519xchacha20poly1305_seed_keypair","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_hchacha20","crypto_core_hsalsa20","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],F=[C3,H3,Y3,Q3,G3,L3,X3,d3,R3,F3,K3,N3,O3,U3,x3,V3,z3,$3,Z3,W3,J3,E3,b3,ri,Ai,ni,ei,ti,_i,ii,si,oi,yi,Bi,hi,ui,li,pi,ji,ki,vi,fi,ai,gi,ci,qi,Pi,Ti,wi,mi,Di,Mi,Si,Ii,Ci,Hi,Yi,Qi,Gi,Li,Xi,di,Ri,Fi,Ki,Ni,Oi,Ui,xi,Vi,zi,$i,Zi,Wi,Ji,Ei,bi,r7,A7,n7,e7,t7,_7,i7,s7,o7,y7,B7,h7,u7,l7,p7,j7,k7,v7,f7,a7,g7,c7,q7,P7,T7,w7,m7,D7,M7,S7,I7,C7,H7,Y7,Q7,G7,L7,X7,d7,R7,F7,K7,N7,O7,U7,x7,V7,z7,$7,Z7,W7,J7,E7,b7,rs,As,ns,es,ts,_s,is,ss,os,ys,Bs,hs,us,ls,ps,js,ks,vs,fs,as,gs,cs,qs,Ps,Ts,ws,ms,Ds,Ms,Ss,Is,Cs,Hs,Ys,Qs,Gs,Ls,Xs,ds,Rs,Fs,Ks,Ns,Os,Us,xs,Vs,zs,$s,Zs,Ws,Js,Es,bs,ro,Ao,no],V=0;V<F.length;V++)typeof X["_"+S[V]]=="function"&&(f2[S[V]]=F[V]);var E=["SODIUM_LIBRARY_VERSION_MAJOR","SODIUM_LIBRARY_VERSION_MINOR","crypto_aead_aegis128l_ABYTES","crypto_aead_aegis128l_KEYBYTES","crypto_aead_aegis128l_MESSAGEBYTES_MAX","crypto_aead_aegis128l_NPUBBYTES","crypto_aead_aegis128l_NSECBYTES","crypto_aead_aegis256_ABYTES","crypto_aead_aegis256_KEYBYTES","crypto_aead_aegis256_MESSAGEBYTES_MAX","crypto_aead_aegis256_NPUBBYTES","crypto_aead_aegis256_NSECBYTES","crypto_aead_aes256gcm_ABYTES","crypto_aead_aes256gcm_KEYBYTES","crypto_aead_aes256gcm_MESSAGEBYTES_MAX","crypto_aead_aes256gcm_NPUBBYTES","crypto_aead_aes256gcm_NSECBYTES","crypto_aead_chacha20poly1305_ABYTES","crypto_aead_chacha20poly1305_IETF_ABYTES","crypto_aead_chacha20poly1305_IETF_KEYBYTES","crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_IETF_NPUBBYTES","crypto_aead_chacha20poly1305_IETF_NSECBYTES","crypto_aead_chacha20poly1305_KEYBYTES","crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_NPUBBYTES","crypto_aead_chacha20poly1305_NSECBYTES","crypto_aead_chacha20poly1305_ietf_ABYTES","crypto_aead_chacha20poly1305_ietf_KEYBYTES","crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_ietf_NPUBBYTES","crypto_aead_chacha20poly1305_ietf_NSECBYTES","crypto_aead_xchacha20poly1305_IETF_ABYTES","crypto_aead_xchacha20poly1305_IETF_KEYBYTES","crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_IETF_NPUBBYTES","crypto_aead_xchacha20poly1305_IETF_NSECBYTES","crypto_aead_xchacha20poly1305_ietf_ABYTES","crypto_aead_xchacha20poly1305_ietf_KEYBYTES","crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_ietf_NPUBBYTES","crypto_aead_xchacha20poly1305_ietf_NSECBYTES","crypto_auth_BYTES","crypto_auth_KEYBYTES","crypto_auth_hmacsha256_BYTES","crypto_auth_hmacsha256_KEYBYTES","crypto_auth_hmacsha512256_BYTES","crypto_auth_hmacsha512256_KEYBYTES","crypto_auth_hmacsha512_BYTES","crypto_auth_hmacsha512_KEYBYTES","crypto_box_BEFORENMBYTES","crypto_box_MACBYTES","crypto_box_MESSAGEBYTES_MAX","crypto_box_NONCEBYTES","crypto_box_PUBLICKEYBYTES","crypto_box_SEALBYTES","crypto_box_SECRETKEYBYTES","crypto_box_SEEDBYTES","crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES","crypto_box_curve25519xchacha20poly1305_MACBYTES","crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xchacha20poly1305_NONCEBYTES","crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEALBYTES","crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEEDBYTES","crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES","crypto_box_curve25519xsalsa20poly1305_MACBYTES","crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xsalsa20poly1305_NONCEBYTES","crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SEEDBYTES","crypto_core_ed25519_BYTES","crypto_core_ed25519_HASHBYTES","crypto_core_ed25519_NONREDUCEDSCALARBYTES","crypto_core_ed25519_SCALARBYTES","crypto_core_ed25519_UNIFORMBYTES","crypto_core_hchacha20_CONSTBYTES","crypto_core_hchacha20_INPUTBYTES","crypto_core_hchacha20_KEYBYTES","crypto_core_hchacha20_OUTPUTBYTES","crypto_core_hsalsa20_CONSTBYTES","crypto_core_hsalsa20_INPUTBYTES","crypto_core_hsalsa20_KEYBYTES","crypto_core_hsalsa20_OUTPUTBYTES","crypto_core_ristretto255_BYTES","crypto_core_ristretto255_HASHBYTES","crypto_core_ristretto255_NONREDUCEDSCALARBYTES","crypto_core_ristretto255_SCALARBYTES","crypto_core_salsa2012_CONSTBYTES","crypto_core_salsa2012_INPUTBYTES","crypto_core_salsa2012_KEYBYTES","crypto_core_salsa2012_OUTPUTBYTES","crypto_core_salsa208_CONSTBYTES","crypto_core_salsa208_INPUTBYTES","crypto_core_salsa208_KEYBYTES","crypto_core_salsa208_OUTPUTBYTES","crypto_core_salsa20_CONSTBYTES","crypto_core_salsa20_INPUTBYTES","crypto_core_salsa20_KEYBYTES","crypto_core_salsa20_OUTPUTBYTES","crypto_generichash_BYTES","crypto_generichash_BYTES_MAX","crypto_generichash_BYTES_MIN","crypto_generichash_KEYBYTES","crypto_generichash_KEYBYTES_MAX","crypto_generichash_KEYBYTES_MIN","crypto_generichash_blake2b_BYTES","crypto_generichash_blake2b_BYTES_MAX","crypto_generichash_blake2b_BYTES_MIN","crypto_generichash_blake2b_KEYBYTES","crypto_generichash_blake2b_KEYBYTES_MAX","crypto_generichash_blake2b_KEYBYTES_MIN","crypto_generichash_blake2b_PERSONALBYTES","crypto_generichash_blake2b_SALTBYTES","crypto_hash_BYTES","crypto_hash_sha256_BYTES","crypto_hash_sha512_BYTES","crypto_kdf_BYTES_MAX","crypto_kdf_BYTES_MIN","crypto_kdf_CONTEXTBYTES","crypto_kdf_KEYBYTES","crypto_kdf_blake2b_BYTES_MAX","crypto_kdf_blake2b_BYTES_MIN","crypto_kdf_blake2b_CONTEXTBYTES","crypto_kdf_blake2b_KEYBYTES","crypto_kdf_hkdf_sha256_BYTES_MAX","crypto_kdf_hkdf_sha256_BYTES_MIN","crypto_kdf_hkdf_sha256_KEYBYTES","crypto_kdf_hkdf_sha512_BYTES_MAX","crypto_kdf_hkdf_sha512_BYTES_MIN","crypto_kdf_hkdf_sha512_KEYBYTES","crypto_kx_PUBLICKEYBYTES","crypto_kx_SECRETKEYBYTES","crypto_kx_SEEDBYTES","crypto_kx_SESSIONKEYBYTES","crypto_onetimeauth_BYTES","crypto_onetimeauth_KEYBYTES","crypto_onetimeauth_poly1305_BYTES","crypto_onetimeauth_poly1305_KEYBYTES","crypto_pwhash_ALG_ARGON2I13","crypto_pwhash_ALG_ARGON2ID13","crypto_pwhash_ALG_DEFAULT","crypto_pwhash_BYTES_MAX","crypto_pwhash_BYTES_MIN","crypto_pwhash_MEMLIMIT_INTERACTIVE","crypto_pwhash_MEMLIMIT_MAX","crypto_pwhash_MEMLIMIT_MIN","crypto_pwhash_MEMLIMIT_MODERATE","crypto_pwhash_MEMLIMIT_SENSITIVE","crypto_pwhash_OPSLIMIT_INTERACTIVE","crypto_pwhash_OPSLIMIT_MAX","crypto_pwhash_OPSLIMIT_MIN","crypto_pwhash_OPSLIMIT_MODERATE","crypto_pwhash_OPSLIMIT_SENSITIVE","crypto_pwhash_PASSWD_MAX","crypto_pwhash_PASSWD_MIN","crypto_pwhash_SALTBYTES","crypto_pwhash_STRBYTES","crypto_pwhash_argon2i_BYTES_MAX","crypto_pwhash_argon2i_BYTES_MIN","crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2i_MEMLIMIT_MAX","crypto_pwhash_argon2i_MEMLIMIT_MIN","crypto_pwhash_argon2i_MEMLIMIT_MODERATE","crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2i_OPSLIMIT_MAX","crypto_pwhash_argon2i_OPSLIMIT_MIN","crypto_pwhash_argon2i_OPSLIMIT_MODERATE","crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2i_PASSWD_MAX","crypto_pwhash_argon2i_PASSWD_MIN","crypto_pwhash_argon2i_SALTBYTES","crypto_pwhash_argon2i_STRBYTES","crypto_pwhash_argon2id_BYTES_MAX","crypto_pwhash_argon2id_BYTES_MIN","crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2id_MEMLIMIT_MAX","crypto_pwhash_argon2id_MEMLIMIT_MIN","crypto_pwhash_argon2id_MEMLIMIT_MODERATE","crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2id_OPSLIMIT_MAX","crypto_pwhash_argon2id_OPSLIMIT_MIN","crypto_pwhash_argon2id_OPSLIMIT_MODERATE","crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2id_PASSWD_MAX","crypto_pwhash_argon2id_PASSWD_MIN","crypto_pwhash_argon2id_SALTBYTES","crypto_pwhash_argon2id_STRBYTES","crypto_pwhash_scryptsalsa208sha256_BYTES_MAX","crypto_pwhash_scryptsalsa208sha256_BYTES_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX","crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN","crypto_pwhash_scryptsalsa208sha256_SALTBYTES","crypto_pwhash_scryptsalsa208sha256_STRBYTES","crypto_scalarmult_BYTES","crypto_scalarmult_SCALARBYTES","crypto_scalarmult_curve25519_BYTES","crypto_scalarmult_curve25519_SCALARBYTES","crypto_scalarmult_ed25519_BYTES","crypto_scalarmult_ed25519_SCALARBYTES","crypto_scalarmult_ristretto255_BYTES","crypto_scalarmult_ristretto255_SCALARBYTES","crypto_secretbox_KEYBYTES","crypto_secretbox_MACBYTES","crypto_secretbox_MESSAGEBYTES_MAX","crypto_secretbox_NONCEBYTES","crypto_secretbox_xchacha20poly1305_KEYBYTES","crypto_secretbox_xchacha20poly1305_MACBYTES","crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xchacha20poly1305_NONCEBYTES","crypto_secretbox_xsalsa20poly1305_KEYBYTES","crypto_secretbox_xsalsa20poly1305_MACBYTES","crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xsalsa20poly1305_NONCEBYTES","crypto_secretstream_xchacha20poly1305_ABYTES","crypto_secretstream_xchacha20poly1305_HEADERBYTES","crypto_secretstream_xchacha20poly1305_KEYBYTES","crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretstream_xchacha20poly1305_TAG_FINAL","crypto_secretstream_xchacha20poly1305_TAG_MESSAGE","crypto_secretstream_xchacha20poly1305_TAG_PUSH","crypto_secretstream_xchacha20poly1305_TAG_REKEY","crypto_shorthash_BYTES","crypto_shorthash_KEYBYTES","crypto_shorthash_siphash24_BYTES","crypto_shorthash_siphash24_KEYBYTES","crypto_shorthash_siphashx24_BYTES","crypto_shorthash_siphashx24_KEYBYTES","crypto_sign_BYTES","crypto_sign_MESSAGEBYTES_MAX","crypto_sign_PUBLICKEYBYTES","crypto_sign_SECRETKEYBYTES","crypto_sign_SEEDBYTES","crypto_sign_ed25519_BYTES","crypto_sign_ed25519_MESSAGEBYTES_MAX","crypto_sign_ed25519_PUBLICKEYBYTES","crypto_sign_ed25519_SECRETKEYBYTES","crypto_sign_ed25519_SEEDBYTES","crypto_stream_KEYBYTES","crypto_stream_MESSAGEBYTES_MAX","crypto_stream_NONCEBYTES","crypto_stream_chacha20_IETF_KEYBYTES","crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX","crypto_stream_chacha20_IETF_NONCEBYTES","crypto_stream_chacha20_KEYBYTES","crypto_stream_chacha20_MESSAGEBYTES_MAX","crypto_stream_chacha20_NONCEBYTES","crypto_stream_chacha20_ietf_KEYBYTES","crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX","crypto_stream_chacha20_ietf_NONCEBYTES","crypto_stream_salsa2012_KEYBYTES","crypto_stream_salsa2012_MESSAGEBYTES_MAX","crypto_stream_salsa2012_NONCEBYTES","crypto_stream_salsa208_KEYBYTES","crypto_stream_salsa208_MESSAGEBYTES_MAX","crypto_stream_salsa208_NONCEBYTES","crypto_stream_salsa20_KEYBYTES","crypto_stream_salsa20_MESSAGEBYTES_MAX","crypto_stream_salsa20_NONCEBYTES","crypto_stream_xchacha20_KEYBYTES","crypto_stream_xchacha20_MESSAGEBYTES_MAX","crypto_stream_xchacha20_NONCEBYTES","crypto_stream_xsalsa20_KEYBYTES","crypto_stream_xsalsa20_MESSAGEBYTES_MAX","crypto_stream_xsalsa20_NONCEBYTES","crypto_verify_16_BYTES","crypto_verify_32_BYTES","crypto_verify_64_BYTES"];for(V=0;V<E.length;V++)typeof(y0=X["_"+E[V].toLowerCase()])=="function"&&(f2[E[V]]=y0());var e0=["SODIUM_VERSION_STRING","crypto_pwhash_STRPREFIX","crypto_pwhash_argon2i_STRPREFIX","crypto_pwhash_argon2id_STRPREFIX","crypto_pwhash_scryptsalsa208sha256_STRPREFIX"];for(V=0;V<e0.length;V++){var y0;typeof(y0=X["_"+e0[V].toLowerCase()])=="function"&&(f2[e0[V]]=X.UTF8ToString(y0()))}}X=e4;try{a();var P=new Uint8Array([98,97,108,108,115]),k=f2.randombytes_buf(f2.crypto_secretbox_NONCEBYTES),c=f2.randombytes_buf(f2.crypto_secretbox_KEYBYTES),w=f2.crypto_secretbox_easy(P,k,c),Q=f2.crypto_secretbox_open_easy(w,k,c);if(f2.memcmp(P,Q))return}catch(S){if(X.useBackupModule==null)throw new Error("Both wasm and asm failed to load"+S)}X.useBackupModule(),a()});function A6(a){if(typeof TextEncoder=="function")return new TextEncoder().encode(a);a=unescape(encodeURIComponent(a));for(var P=new Uint8Array(a.length),k=0,c=a.length;k<c;k++)P[k]=a.charCodeAt(k);return P}function hA(a){if(typeof TextDecoder=="function")return new TextDecoder("utf-8",{fatal:!0}).decode(a);var P=8192,k=Math.ceil(a.length/P);if(k<=1)try{return decodeURIComponent(escape(String.fromCharCode.apply(null,a)))}catch{throw new TypeError("The encoded data was not valid.")}for(var c="",w=0,Q=0;Q<k;Q++){var S=Array.prototype.slice.call(a,Q*P+w,(Q+1)*P+w);if(S.length!==0){var F,V=S.length,E=0;do{var e0=S[--V];e0>=240?(E=4,F=!0):e0>=224?(E=3,F=!0):e0>=192?(E=2,F=!0):e0<128&&(E=1,F=!0)}while(!F);for(var y0=E-(S.length-V),u0=0;u0<y0;u0++)w--,S.pop();c+=hA(S)}}return c}function Fe(a){a=W(null,a,"input");for(var P,k,c,w="",Q=0;Q<a.length;Q++)c=87+(k=15&a[Q])+(k-10>>8&-39)<<8|87+(P=a[Q]>>>4)+(P-10>>8&-39),w+=String.fromCharCode(255&c)+String.fromCharCode(c>>>8);return w}var dr={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function Ke(a){if(a===void 0)return dr.URLSAFE_NO_PADDING;if(a!==dr.ORIGINAL&&a!==dr.ORIGINAL_NO_PADDING&&a!==dr.URLSAFE&&a!==dr.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return a}function Ne(a,P){P=Ke(P);var k=[];a=W(k,a,"input");var c,w=0|Math.floor(a.length/3),Q=a.length-3*w,S=4*w+(Q!==0?2&P?2+(Q>>>1):4:0),F=new k0(S+1),V=Z(a);return k.push(V),k.push(F.address),X._sodium_bin2base64(F.address,F.length,V,a.length,P)===0&&H0(k,"conversion failed"),F.length=S,c=hA(F.to_Uint8Array()),p0(k),c}function w0(a,P){var k=P||"uint8array";if(!Oe(k))throw new Error(k+" output format is not available");if(a instanceof k0){if(k==="uint8array")return a.to_Uint8Array();if(k==="text")return hA(a.to_Uint8Array());if(k==="hex")return Fe(a.to_Uint8Array());if(k==="base64")return Ne(a.to_Uint8Array(),dr.URLSAFE_NO_PADDING);throw new Error('What is output format "'+k+'"?')}if(typeof a=="object"){for(var c=Object.keys(a),w={},Q=0;Q<c.length;Q++)w[c[Q]]=w0(a[c[Q]],k);return w}if(typeof a=="string")return a;throw new TypeError("Cannot format output")}function Oe(a){for(var P=["uint8array","text","hex","base64"],k=0;k<P.length;k++)if(P[k]===a)return!0;return!1}function a0(a){if(a){if(typeof a!="string")throw new TypeError("When defined, the output format must be a string");if(!Oe(a))throw new Error(a+" is not a supported output format")}}function k0(a){this.length=a,this.address=fr(a)}function Z(a){var P=fr(a.length);return X.HEAPU8.set(a,P),P}function fr(a){var P=X._malloc(a);if(P===0)throw{message:"_malloc() failed",length:a};return P}function I3(a){X._free(a)}function p0(a){if(a)for(var P=0;P<a.length;P++)I3(a[P])}function H0(a,P){throw p0(a),new Error(P)}function i0(a,P){throw p0(a),new TypeError(P)}function l2(a,P,k){P==null&&i0(a,k+" cannot be null or undefined")}function W(a,P,k){return l2(a,P,k),P instanceof Uint8Array?P:typeof P=="string"?A6(P):void i0(a,"unsupported input type for "+k)}function C3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_aegis128l_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_aegis128l_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_aegis128l_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_aegis128l_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function H3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_aegis128l_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_aegis128l_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_aegis128l_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function Y3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis128l_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_aegis128l_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_aegis128l_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function Q3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis128l_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_aegis128l_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_aegis128l_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function G3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_aegis128l_keybytes()),c=k.address;P.push(c),X._crypto_aead_aegis128l_keygen(c);var w=w0(k,a);return p0(P),w}function L3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_aegis256_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_aegis256_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_aegis256_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_aegis256_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_aegis256_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function X3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_aegis256_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_aegis256_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_aegis256_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function d3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis256_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis256_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_aegis256_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_aegis256_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function R3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis256_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis256_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_aegis256_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_aegis256_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function F3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_aegis256_keybytes()),c=k.address;P.push(c),X._crypto_aead_aegis256_keygen(c);var w=w0(k,a);return p0(P),w}function K3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_chacha20poly1305_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_chacha20poly1305_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_chacha20poly1305_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function N3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_chacha20poly1305_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_chacha20poly1305_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_chacha20poly1305_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function O3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_chacha20poly1305_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_chacha20poly1305_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function U3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_chacha20poly1305_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_chacha20poly1305_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function x3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_chacha20poly1305_ietf_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_chacha20poly1305_ietf_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_chacha20poly1305_ietf_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function V3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_chacha20poly1305_ietf_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function z3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_chacha20poly1305_ietf_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_chacha20poly1305_ietf_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function $3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_chacha20poly1305_ietf_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_chacha20poly1305_ietf_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function Z3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_chacha20poly1305_ietf_keybytes()),c=k.address;P.push(c),X._crypto_aead_chacha20poly1305_ietf_keygen(c);var w=w0(k,a);return p0(P),w}function W3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_chacha20poly1305_keybytes()),c=k.address;P.push(c),X._crypto_aead_chacha20poly1305_keygen(c);var w=w0(k,a);return p0(P),w}function J3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_xchacha20poly1305_ietf_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_xchacha20poly1305_ietf_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_xchacha20poly1305_ietf_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function E3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_xchacha20poly1305_ietf_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function b3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_xchacha20poly1305_ietf_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_xchacha20poly1305_ietf_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function ri(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_xchacha20poly1305_ietf_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_xchacha20poly1305_ietf_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function Ai(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_xchacha20poly1305_ietf_keybytes()),c=k.address;P.push(c),X._crypto_aead_xchacha20poly1305_ietf_keygen(c);var w=w0(k,a);return p0(P),w}function ni(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ei(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha256_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha256_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha256(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ti(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function _i(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(208).address;if(!(0|X._crypto_auth_hmacsha256_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function ii(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha256_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha256_keygen(c);var w=w0(k,a);return p0(P),w}function si(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function oi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha256_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha256_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha256_verify(w,S,F,0,V));return p0(c),e0}function yi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha512_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha512_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha512(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Bi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha512256_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha512256_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha512256(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function hi(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha512256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha512256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function ui(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(416).address;if(!(0|X._crypto_auth_hmacsha512256_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function li(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha512256_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha512256_keygen(c);var w=w0(k,a);return p0(P),w}function pi(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha512256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function ji(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha512256_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha512256_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha512256_verify(w,S,F,0,V));return p0(c),e0}function ki(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha512_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha512_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function vi(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(416).address;if(!(0|X._crypto_auth_hmacsha512_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function fi(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha512_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha512_keygen(c);var w=w0(k,a);return p0(P),w}function ai(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha512_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function gi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha512_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha512_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha512_verify(w,S,F,0,V));return p0(c),e0}function ci(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_keybytes()),c=k.address;P.push(c),X._crypto_auth_keygen(c);var w=w0(k,a);return p0(P),w}function qi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_verify(w,S,F,0,V));return p0(c),e0}function Pi(a,P,k){var c=[];a0(k),a=W(c,a,"publicKey");var w,Q=0|X._crypto_box_publickeybytes();a.length!==Q&&i0(c,"invalid publicKey length"),w=Z(a),c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_box_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_box_beforenmbytes()),E=V.address;if(c.push(E),!(0|X._crypto_box_beforenm(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ti(a,P,k){var c=[];a0(k),a=W(c,a,"publicKey");var w,Q=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==Q&&i0(c,"invalid publicKey length"),w=Z(a),c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes()),E=V.address;if(c.push(E),!(0|X._crypto_box_curve25519xchacha20poly1305_beforenm(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function wi(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;Q.push(Q0);var R0=new k0(0|X._crypto_box_curve25519xchacha20poly1305_macbytes()),N0=R0.address;if(Q.push(N0),!(0|X._crypto_box_curve25519xchacha20poly1305_detached(Q0,N0,S,F,0,V,e0,u0))){var E0=w0({ciphertext:I0,mac:R0},w);return p0(Q),E0}H0(Q,"invalid usage")}function mi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_box_curve25519xchacha20poly1305_macbytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_box_curve25519xchacha20poly1305_detached_afternm(u0,I0,Q,S,0,F,E))){var Q0=w0({ciphertext:y0,mac:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function Di(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(F+X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_curve25519xchacha20poly1305_easy(Q0,S,F,0,V,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"invalid usage")}function Mi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_curve25519xchacha20poly1305_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Si(a){var P=[];a0(a);var k=new k0(0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),Q=w.address;P.push(Q),X._crypto_box_curve25519xchacha20poly1305_keypair(c,Q);var S=w0({publicKey:k,privateKey:w,keyType:"curve25519"},a);return p0(P),S}function Ii(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"ciphertext")),V=a.length;S.push(F),P=W(S,P,"mac");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_macbytes();P.length!==e0&&i0(S,"invalid mac length"),E=Z(P),S.push(E),k=W(S,k,"nonce");var y0,u0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();k.length!==u0&&i0(S,"invalid nonce length"),y0=Z(k),S.push(y0),c=W(S,c,"publicKey");var c0,I0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();c.length!==I0&&i0(S,"invalid publicKey length"),c0=Z(c),S.push(c0),w=W(S,w,"privateKey");var Q0,R0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();w.length!==R0&&i0(S,"invalid privateKey length"),Q0=Z(w),S.push(Q0);var N0=new k0(0|V),E0=N0.address;if(S.push(E0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_detached(E0,F,E,V,0,y0,c0,Q0))){var o2=w0(N0,Q);return p0(S),o2}H0(S,"incorrect key pair for the given ciphertext")}function Ci(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"ciphertext")),F=a.length;Q.push(S),P=W(Q,P,"mac");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_macbytes();P.length!==E&&i0(Q,"invalid mac length"),V=Z(P),Q.push(V),k=W(Q,k,"nonce");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();k.length!==y0&&i0(Q,"invalid nonce length"),e0=Z(k),Q.push(e0),c=W(Q,c,"sharedKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();c.length!==c0&&i0(Q,"invalid sharedKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_detached_afternm(Q0,S,V,F,0,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"incorrect secret key for the given ciphertext")}function Hi(a,P,k,c,w){var Q=[];a0(w),a=W(Q,a,"ciphertext");var S,F=X._crypto_box_curve25519xchacha20poly1305_macbytes(),V=a.length;V<F&&i0(Q,"ciphertext is too short"),S=Z(a),Q.push(S),P=W(Q,P,"nonce");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==e0&&i0(Q,"invalid nonce length"),E=Z(P),Q.push(E),k=W(Q,k,"publicKey");var y0,u0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==u0&&i0(Q,"invalid publicKey length"),y0=Z(k),Q.push(y0),c=W(Q,c,"privateKey");var c0,I0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==I0&&i0(Q,"invalid privateKey length"),c0=Z(c),Q.push(c0);var Q0=new k0(V-X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),R0=Q0.address;if(Q.push(R0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_easy(R0,S,V,0,E,y0,c0))){var N0=w0(Q0,w);return p0(Q),N0}H0(Q,"incorrect key pair for the given ciphertext")}function Yi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"ciphertext")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S-X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"incorrect secret key for the given ciphertext")}function Qi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(Q+X._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),E=V.address;c.push(E),X._crypto_box_curve25519xchacha20poly1305_seal(E,w,Q,0,S);var e0=w0(V,k);return p0(c),e0}function Gi(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_box_curve25519xchacha20poly1305_sealbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"publicKey");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();P.length!==E&&i0(w,"invalid publicKey length"),V=Z(P),w.push(V),k=W(w,k,"secretKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();k.length!==y0&&i0(w,"invalid secretKey length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),c0=u0.address;w.push(c0),X._crypto_box_curve25519xchacha20poly1305_seal_open(c0,Q,F,0,V,e0);var I0=w0(u0,c);return p0(w),I0}function Li(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_box_curve25519xchacha20poly1305_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_box_curve25519xchacha20poly1305_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"invalid usage")}function Xi(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;Q.push(Q0);var R0=new k0(0|X._crypto_box_macbytes()),N0=R0.address;if(Q.push(N0),!(0|X._crypto_box_detached(Q0,N0,S,F,0,V,e0,u0))){var E0=w0({ciphertext:I0,mac:R0},w);return p0(Q),E0}H0(Q,"invalid usage")}function di(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(F+X._crypto_box_macbytes()|0),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_easy(Q0,S,F,0,V,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"invalid usage")}function Ri(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_box_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Fi(a){var P=[];a0(a);var k=new k0(0|X._crypto_box_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_box_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_box_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"x25519"};return p0(P),S}H0(P,"internal error")}function Ki(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"ciphertext")),V=a.length;S.push(F),P=W(S,P,"mac");var E,e0=0|X._crypto_box_macbytes();P.length!==e0&&i0(S,"invalid mac length"),E=Z(P),S.push(E),k=W(S,k,"nonce");var y0,u0=0|X._crypto_box_noncebytes();k.length!==u0&&i0(S,"invalid nonce length"),y0=Z(k),S.push(y0),c=W(S,c,"publicKey");var c0,I0=0|X._crypto_box_publickeybytes();c.length!==I0&&i0(S,"invalid publicKey length"),c0=Z(c),S.push(c0),w=W(S,w,"privateKey");var Q0,R0=0|X._crypto_box_secretkeybytes();w.length!==R0&&i0(S,"invalid privateKey length"),Q0=Z(w),S.push(Q0);var N0=new k0(0|V),E0=N0.address;if(S.push(E0),!(0|X._crypto_box_open_detached(E0,F,E,V,0,y0,c0,Q0))){var o2=w0(N0,Q);return p0(S),o2}H0(S,"incorrect key pair for the given ciphertext")}function Ni(a,P,k,c,w){var Q=[];a0(w),a=W(Q,a,"ciphertext");var S,F=X._crypto_box_macbytes(),V=a.length;V<F&&i0(Q,"ciphertext is too short"),S=Z(a),Q.push(S),P=W(Q,P,"nonce");var E,e0=0|X._crypto_box_noncebytes();P.length!==e0&&i0(Q,"invalid nonce length"),E=Z(P),Q.push(E),k=W(Q,k,"publicKey");var y0,u0=0|X._crypto_box_publickeybytes();k.length!==u0&&i0(Q,"invalid publicKey length"),y0=Z(k),Q.push(y0),c=W(Q,c,"privateKey");var c0,I0=0|X._crypto_box_secretkeybytes();c.length!==I0&&i0(Q,"invalid privateKey length"),c0=Z(c),Q.push(c0);var Q0=new k0(V-X._crypto_box_macbytes()|0),R0=Q0.address;if(Q.push(R0),!(0|X._crypto_box_open_easy(R0,S,V,0,E,y0,c0))){var N0=w0(Q0,w);return p0(Q),N0}H0(Q,"incorrect key pair for the given ciphertext")}function Oi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"ciphertext")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S-X._crypto_box_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_open_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"incorrect secret key for the given ciphertext")}function Ui(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_box_publickeybytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(Q+X._crypto_box_sealbytes()|0),E=V.address;if(c.push(E),!(0|X._crypto_box_seal(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function xi(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_box_sealbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"publicKey");var V,E=0|X._crypto_box_publickeybytes();P.length!==E&&i0(w,"invalid publicKey length"),V=Z(P),w.push(V),k=W(w,k,"privateKey");var e0,y0=0|X._crypto_box_secretkeybytes();k.length!==y0&&i0(w,"invalid privateKey length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_box_sealbytes()|0),c0=u0.address;if(w.push(c0),!(0|X._crypto_box_seal_open(c0,Q,F,0,V,e0))){var I0=w0(u0,c);return p0(w),I0}H0(w,"incorrect key pair for the given ciphertext")}function Vi(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_box_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_box_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_box_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_box_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"invalid usage")}function zi(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ed25519_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ed25519_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ed25519_add(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function $i(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ed25519_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ed25519_from_hash(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function Zi(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ed25519_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ed25519_from_uniform(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function Wi(a,P){var k=[];a0(P),a=W(k,a,"repr");var c,w=0|X._crypto_core_ed25519_bytes();a.length!==w&&i0(k,"invalid repr length"),c=Z(a),k.push(c);var Q=(0|X._crypto_core_ed25519_is_valid_point(c))==1;return p0(k),Q}function Ji(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ed25519_bytes()),c=k.address;P.push(c),X._crypto_core_ed25519_random(c);var w=w0(k,a);return p0(P),w}function Ei(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_add(E,w,S);var e0=w0(V,k);return p0(c),e0}function bi(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_complement(S,c);var F=w0(Q,P);return p0(k),F}function r7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_core_ed25519_scalar_invert(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid reciprocate")}function A7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_mul(E,w,S);var e0=w0(V,k);return p0(c),e0}function n7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_negate(S,c);var F=w0(Q,P);return p0(k),F}function e7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ed25519_scalarbytes()),c=k.address;P.push(c),X._crypto_core_ed25519_scalar_random(c);var w=w0(k,a);return p0(P),w}function t7(a,P){var k=[];a0(P),a=W(k,a,"sample");var c,w=0|X._crypto_core_ed25519_nonreducedscalarbytes();a.length!==w&&i0(k,"invalid sample length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_reduce(S,c);var F=w0(Q,P);return p0(k),F}function _7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_sub(E,w,S);var e0=w0(V,k);return p0(c),e0}function i7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ed25519_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ed25519_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ed25519_sub(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function s7(a,P,k,c){var w=[];a0(c),a=W(w,a,"input");var Q,S=0|X._crypto_core_hchacha20_inputbytes();a.length!==S&&i0(w,"invalid input length"),Q=Z(a),w.push(Q),P=W(w,P,"privateKey");var F,V=0|X._crypto_core_hchacha20_keybytes();P.length!==V&&i0(w,"invalid privateKey length"),F=Z(P),w.push(F);var E=null;k!=null&&(E=Z(k=W(w,k,"constant")),k.length,w.push(E));var e0=new k0(0|X._crypto_core_hchacha20_outputbytes()),y0=e0.address;if(w.push(y0),!(0|X._crypto_core_hchacha20(y0,Q,F,E))){var u0=w0(e0,c);return p0(w),u0}H0(w,"invalid usage")}function o7(a,P,k,c){var w=[];a0(c),a=W(w,a,"input");var Q,S=0|X._crypto_core_hsalsa20_inputbytes();a.length!==S&&i0(w,"invalid input length"),Q=Z(a),w.push(Q),P=W(w,P,"privateKey");var F,V=0|X._crypto_core_hsalsa20_keybytes();P.length!==V&&i0(w,"invalid privateKey length"),F=Z(P),w.push(F);var E=null;k!=null&&(E=Z(k=W(w,k,"constant")),k.length,w.push(E));var e0=new k0(0|X._crypto_core_hsalsa20_outputbytes()),y0=e0.address;if(w.push(y0),!(0|X._crypto_core_hsalsa20(y0,Q,F,E))){var u0=w0(e0,c);return p0(w),u0}H0(w,"invalid usage")}function y7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ristretto255_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ristretto255_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ristretto255_add(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function B7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ristretto255_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ristretto255_from_hash(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function h7(a,P){var k=[];a0(P),a=W(k,a,"repr");var c,w=0|X._crypto_core_ristretto255_bytes();a.length!==w&&i0(k,"invalid repr length"),c=Z(a),k.push(c);var Q=(0|X._crypto_core_ristretto255_is_valid_point(c))==1;return p0(k),Q}function u7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ristretto255_bytes()),c=k.address;P.push(c),X._crypto_core_ristretto255_random(c);var w=w0(k,a);return p0(P),w}function l7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_add(E,w,S);var e0=w0(V,k);return p0(c),e0}function p7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_complement(S,c);var F=w0(Q,P);return p0(k),F}function j7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_core_ristretto255_scalar_invert(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid reciprocate")}function k7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_mul(E,w,S);var e0=w0(V,k);return p0(c),e0}function v7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_negate(S,c);var F=w0(Q,P);return p0(k),F}function f7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ristretto255_scalarbytes()),c=k.address;P.push(c),X._crypto_core_ristretto255_scalar_random(c);var w=w0(k,a);return p0(P),w}function a7(a,P){var k=[];a0(P),a=W(k,a,"sample");var c,w=0|X._crypto_core_ristretto255_nonreducedscalarbytes();a.length!==w&&i0(k,"invalid sample length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_reduce(S,c);var F=w0(Q,P);return p0(k),F}function g7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_sub(E,w,S);var e0=w0(V,k);return p0(c),e0}function c7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ristretto255_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ristretto255_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ristretto255_sub(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function q7(a,P,k,c){var w=[];a0(c),l2(w,a,"hash_length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(w,"hash_length must be an unsigned integer");var Q=Z(P=W(w,P,"message")),S=P.length;w.push(Q);var F=null,V=0;k!=null&&(F=Z(k=W(w,k,"key")),V=k.length,w.push(F));var E=new k0(a|=0),e0=E.address;if(w.push(e0),!(0|X._crypto_generichash(e0,a,Q,S,0,F,V))){var y0=w0(E,c);return p0(w),y0}H0(w,"invalid usage")}function P7(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"subkey_len"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(Q,"subkey_len must be an unsigned integer");var S=null,F=0;P!=null&&(S=Z(P=W(Q,P,"key")),F=P.length,Q.push(S));var V=null,E=0;k!=null&&(k=W(Q,k,"id"),E=0|X._crypto_generichash_blake2b_saltbytes(),k.length!==E&&i0(Q,"invalid id length"),V=Z(k),Q.push(V));var e0=null,y0=0;c!=null&&(c=W(Q,c,"ctx"),y0=0|X._crypto_generichash_blake2b_personalbytes(),c.length!==y0&&i0(Q,"invalid ctx length"),e0=Z(c),Q.push(e0));var u0=new k0(0|a),c0=u0.address;if(Q.push(c0),!(0|X._crypto_generichash_blake2b_salt_personal(c0,a,null,0,0,S,F,V,e0))){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function T7(a,P,k){var c=[];a0(k),l2(c,a,"state_address"),l2(c,P,"hash_length"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(c,"hash_length must be an unsigned integer");var w=new k0(P|=0),Q=w.address;if(c.push(Q),!(0|X._crypto_generichash_final(a,Q,P))){var S=(X._free(a),w0(w,k));return p0(c),S}H0(c,"invalid usage")}function w7(a,P,k){var c=[];a0(k);var w=null,Q=0;a!=null&&(w=Z(a=W(c,a,"key")),Q=a.length,c.push(w)),l2(c,P,"hash_length"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(c,"hash_length must be an unsigned integer");var S=new k0(357).address;if(!(0|X._crypto_generichash_init(S,w,Q,P))){var F=S;return p0(c),F}H0(c,"invalid usage")}function m7(a){var P=[];a0(a);var k=new k0(0|X._crypto_generichash_keybytes()),c=k.address;P.push(c),X._crypto_generichash_keygen(c);var w=w0(k,a);return p0(P),w}function D7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_generichash_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function M7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function S7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_sha256_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash_sha256(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function I7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_hash_sha256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_hash_sha256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function C7(a){var P=[];a0(a);var k=new k0(104).address;if(!(0|X._crypto_hash_sha256_init(k))){var c=k;return p0(P),c}H0(P,"invalid usage")}function H7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_hash_sha256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function Y7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_sha512_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash_sha512(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function Q7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_hash_sha512_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_hash_sha512_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function G7(a){var P=[];a0(a);var k=new k0(208).address;if(!(0|X._crypto_hash_sha512_init(k))){var c=k;return p0(P),c}H0(P,"invalid usage")}function L7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_hash_sha512_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function X7(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"subkey_len"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(Q,"subkey_len must be an unsigned integer"),l2(Q,P,"subkey_id");var S,F=0;if(typeof P=="bigint"&&P>=BigInt(0)){const I0=P>>BigInt(32);I0>BigInt(4294967295)&&i0(Q,"subkey_id cannot be more than 64 bits"),F=Number(I0),S=Number(P&BigInt(4294967295))}else typeof P=="number"&&(0|P)===P&&P>=0?S=P:i0(Q,"subkey_id must be an unsigned integer or bigint");typeof k!="string"&&i0(Q,"ctx must be a string"),(k=A6(k+"\0")).length-1!==X._crypto_kdf_contextbytes()&&i0(Q,"invalid ctx length");var V=Z(k);k.length,Q.push(V),c=W(Q,c,"key");var E,e0=0|X._crypto_kdf_keybytes();c.length!==e0&&i0(Q,"invalid key length"),E=Z(c),Q.push(E);var y0=new k0(0|a),u0=y0.address;Q.push(u0),X._crypto_kdf_derive_from_key(u0,a,S,F,V,E);var c0=w0(y0,w);return p0(Q),c0}function d7(a){var P=[];a0(a);var k=new k0(0|X._crypto_kdf_keybytes()),c=k.address;P.push(c),X._crypto_kdf_keygen(c);var w=w0(k,a);return p0(P),w}function R7(a,P,k,c){var w=[];a0(c),a=W(w,a,"clientPublicKey");var Q,S=0|X._crypto_kx_publickeybytes();a.length!==S&&i0(w,"invalid clientPublicKey length"),Q=Z(a),w.push(Q),P=W(w,P,"clientSecretKey");var F,V=0|X._crypto_kx_secretkeybytes();P.length!==V&&i0(w,"invalid clientSecretKey length"),F=Z(P),w.push(F),k=W(w,k,"serverPublicKey");var E,e0=0|X._crypto_kx_publickeybytes();k.length!==e0&&i0(w,"invalid serverPublicKey length"),E=Z(k),w.push(E);var y0=new k0(0|X._crypto_kx_sessionkeybytes()),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_kx_sessionkeybytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_kx_client_session_keys(u0,I0,Q,F,E))){var Q0=w0({sharedRx:y0,sharedTx:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function F7(a){var P=[];a0(a);var k=new k0(0|X._crypto_kx_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_kx_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_kx_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"x25519"};return p0(P),S}H0(P,"internal error")}function K7(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_kx_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_kx_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_kx_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_kx_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"internal error")}function N7(a,P,k,c){var w=[];a0(c),a=W(w,a,"serverPublicKey");var Q,S=0|X._crypto_kx_publickeybytes();a.length!==S&&i0(w,"invalid serverPublicKey length"),Q=Z(a),w.push(Q),P=W(w,P,"serverSecretKey");var F,V=0|X._crypto_kx_secretkeybytes();P.length!==V&&i0(w,"invalid serverSecretKey length"),F=Z(P),w.push(F),k=W(w,k,"clientPublicKey");var E,e0=0|X._crypto_kx_publickeybytes();k.length!==e0&&i0(w,"invalid clientPublicKey length"),E=Z(k),w.push(E);var y0=new k0(0|X._crypto_kx_sessionkeybytes()),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_kx_sessionkeybytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_kx_server_session_keys(u0,I0,Q,F,E))){var Q0=w0({sharedRx:y0,sharedTx:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function O7(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_onetimeauth_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_onetimeauth_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_onetimeauth(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function U7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_onetimeauth_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_onetimeauth_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function x7(a,P){var k=[];a0(P);var c=null;a!=null&&(c=Z(a=W(k,a,"key")),a.length,k.push(c));var w=new k0(144).address;if(!(0|X._crypto_onetimeauth_init(w,c))){var Q=w;return p0(k),Q}H0(k,"invalid usage")}function V7(a){var P=[];a0(a);var k=new k0(0|X._crypto_onetimeauth_keybytes()),c=k.address;P.push(c),X._crypto_onetimeauth_keygen(c);var w=w0(k,a);return p0(P),w}function z7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_onetimeauth_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function $7(a,P,k){var c=[];a=W(c,a,"hash");var w,Q=0|X._crypto_onetimeauth_bytes();a.length!==Q&&i0(c,"invalid hash length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_onetimeauth_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_onetimeauth_verify(w,S,F,0,V));return p0(c),e0}function Z7(a,P,k,c,w,Q,S){var F=[];a0(S),l2(F,a,"keyLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(F,"keyLength must be an unsigned integer");var V=Z(P=W(F,P,"password")),E=P.length;F.push(V),k=W(F,k,"salt");var e0,y0=0|X._crypto_pwhash_saltbytes();k.length!==y0&&i0(F,"invalid salt length"),e0=Z(k),F.push(e0),l2(F,c,"opsLimit"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(F,"opsLimit must be an unsigned integer"),l2(F,w,"memLimit"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(F,"memLimit must be an unsigned integer"),l2(F,Q,"algorithm"),(typeof Q!="number"||(0|Q)!==Q||Q<0)&&i0(F,"algorithm must be an unsigned integer");var u0=new k0(0|a),c0=u0.address;if(F.push(c0),!(0|X._crypto_pwhash(c0,a,0,V,E,0,e0,c,0,w,Q))){var I0=w0(u0,S);return p0(F),I0}H0(F,"invalid usage")}function W7(a,P,k,c,w,Q){var S=[];a0(Q),l2(S,a,"keyLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(S,"keyLength must be an unsigned integer");var F=Z(P=W(S,P,"password")),V=P.length;S.push(F),k=W(S,k,"salt");var E,e0=0|X._crypto_pwhash_scryptsalsa208sha256_saltbytes();k.length!==e0&&i0(S,"invalid salt length"),E=Z(k),S.push(E),l2(S,c,"opsLimit"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(S,"opsLimit must be an unsigned integer"),l2(S,w,"memLimit"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(S,"memLimit must be an unsigned integer");var y0=new k0(0|a),u0=y0.address;if(S.push(u0),!(0|X._crypto_pwhash_scryptsalsa208sha256(u0,a,0,F,V,0,E,c,0,w))){var c0=w0(y0,Q);return p0(S),c0}H0(S,"invalid usage")}function J7(a,P,k,c,w,Q,S){var F=[];a0(S);var V=Z(a=W(F,a,"password")),E=a.length;F.push(V);var e0=Z(P=W(F,P,"salt")),y0=P.length;F.push(e0),l2(F,k,"opsLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(F,"opsLimit must be an unsigned integer"),l2(F,c,"r"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(F,"r must be an unsigned integer"),l2(F,w,"p"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(F,"p must be an unsigned integer"),l2(F,Q,"keyLength"),(typeof Q!="number"||(0|Q)!==Q||Q<0)&&i0(F,"keyLength must be an unsigned integer");var u0=new k0(0|Q),c0=u0.address;if(F.push(c0),!(0|X._crypto_pwhash_scryptsalsa208sha256_ll(V,E,e0,y0,k,0,c,w,c0,Q))){var I0=w0(u0,S);return p0(F),I0}H0(F,"invalid usage")}function E7(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"password")),S=a.length;w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var F=new k0(0|X._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(w.push(F),!(0|X._crypto_pwhash_scryptsalsa208sha256_str(F,Q,S,0,P,0,k))){var V=X.UTF8ToString(F);return p0(w),V}H0(w,"invalid usage")}function b7(a,P,k){var c=[];a0(k),typeof a!="string"&&i0(c,"hashed_password must be a string");var w=Z(a=A6(a+"\0"));a.length,c.push(w);var Q=Z(P=W(c,P,"password")),S=P.length;c.push(Q);var F=!(0|X._crypto_pwhash_scryptsalsa208sha256_str_verify(w,Q,S,0));return p0(c),F}function rs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"password")),S=a.length;w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var F=new k0(0|X._crypto_pwhash_strbytes()).address;if(w.push(F),!(0|X._crypto_pwhash_str(F,Q,S,0,P,0,k))){var V=X.UTF8ToString(F);return p0(w),V}H0(w,"invalid usage")}function As(a,P,k,c){var w=[];a0(c),typeof a!="string"&&i0(w,"hashed_password must be a string");var Q=Z(a=A6(a+"\0"));a.length,w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var S=!!(0|X._crypto_pwhash_str_needs_rehash(Q,P,0,k));return p0(w),S}function ns(a,P,k){var c=[];a0(k),typeof a!="string"&&i0(c,"hashed_password must be a string");var w=Z(a=A6(a+"\0"));a.length,c.push(w);var Q=Z(P=W(c,P,"password")),S=P.length;c.push(Q);var F=!(0|X._crypto_pwhash_str_verify(w,Q,S,0));return p0(c),F}function es(a,P,k){var c=[];a0(k),a=W(c,a,"privateKey");var w,Q=0|X._crypto_scalarmult_scalarbytes();a.length!==Q&&i0(c,"invalid privateKey length"),w=Z(a),c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_scalarmult_bytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"weak public key")}function ts(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_scalarmult_scalarbytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"unknown error")}function _s(a,P,k){var c=[];a0(k),a=W(c,a,"n");var w,Q=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid n length"),w=Z(a),c.push(w),P=W(c,P,"p");var S,F=0|X._crypto_scalarmult_ed25519_bytes();P.length!==F&&i0(c,"invalid p length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ed25519(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid point or scalar is 0")}function is(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_ed25519_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ed25519_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function ss(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_ed25519_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ed25519_base_noclamp(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function os(a,P,k){var c=[];a0(k),a=W(c,a,"n");var w,Q=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid n length"),w=Z(a),c.push(w),P=W(c,P,"p");var S,F=0|X._crypto_scalarmult_ed25519_bytes();P.length!==F&&i0(c,"invalid p length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ed25519_noclamp(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid point or scalar is 0")}function ys(a,P,k){var c=[];a0(k),a=W(c,a,"scalar");var w,Q=0|X._crypto_scalarmult_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid scalar length"),w=Z(a),c.push(w),P=W(c,P,"element");var S,F=0|X._crypto_scalarmult_ristretto255_bytes();P.length!==F&&i0(c,"invalid element length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ristretto255(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"result is identity element")}function Bs(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ristretto255_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function hs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_secretbox_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_secretbox_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_secretbox_macbytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_secretbox_detached(u0,I0,Q,S,0,F,E))){var Q0=w0({mac:c0,cipher:y0},c);return p0(w),Q0}H0(w,"invalid usage")}function us(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_secretbox_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_secretbox_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_secretbox_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_secretbox_easy(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function ls(a){var P=[];a0(a);var k=new k0(0|X._crypto_secretbox_keybytes()),c=k.address;P.push(c),X._crypto_secretbox_keygen(c);var w=w0(k,a);return p0(P),w}function ps(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"ciphertext")),F=a.length;Q.push(S),P=W(Q,P,"mac");var V,E=0|X._crypto_secretbox_macbytes();P.length!==E&&i0(Q,"invalid mac length"),V=Z(P),Q.push(V),k=W(Q,k,"nonce");var e0,y0=0|X._crypto_secretbox_noncebytes();k.length!==y0&&i0(Q,"invalid nonce length"),e0=Z(k),Q.push(e0),c=W(Q,c,"key");var u0,c0=0|X._crypto_secretbox_keybytes();c.length!==c0&&i0(Q,"invalid key length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_secretbox_open_detached(Q0,S,V,F,0,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"wrong secret key for the given ciphertext")}function js(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_secretbox_macbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"nonce");var V,E=0|X._crypto_secretbox_noncebytes();P.length!==E&&i0(w,"invalid nonce length"),V=Z(P),w.push(V),k=W(w,k,"key");var e0,y0=0|X._crypto_secretbox_keybytes();k.length!==y0&&i0(w,"invalid key length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_secretbox_macbytes()|0),c0=u0.address;if(w.push(c0),!(0|X._crypto_secretbox_open_easy(c0,Q,F,0,V,e0))){var I0=w0(u0,c);return p0(w),I0}H0(w,"wrong secret key for the given ciphertext")}function ks(a,P,k){var c=[];a0(k),a=W(c,a,"header");var w,Q=0|X._crypto_secretstream_xchacha20poly1305_headerbytes();a.length!==Q&&i0(c,"invalid header length"),w=Z(a),c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_secretstream_xchacha20poly1305_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(52).address;if(!(0|X._crypto_secretstream_xchacha20poly1305_init_pull(V,w,S))){var E=V;return p0(c),E}H0(c,"invalid usage")}function vs(a,P){var k=[];a0(P),a=W(k,a,"key");var c,w=0|X._crypto_secretstream_xchacha20poly1305_keybytes();a.length!==w&&i0(k,"invalid key length"),c=Z(a),k.push(c);var Q=new k0(52).address,S=new k0(0|X._crypto_secretstream_xchacha20poly1305_headerbytes()),F=S.address;if(k.push(F),!(0|X._crypto_secretstream_xchacha20poly1305_init_push(Q,F,c))){var V={state:Q,header:w0(S,P)};return p0(k),V}H0(k,"invalid usage")}function fs(a){var P=[];a0(a);var k=new k0(0|X._crypto_secretstream_xchacha20poly1305_keybytes()),c=k.address;P.push(c),X._crypto_secretstream_xchacha20poly1305_keygen(c);var w=w0(k,a);return p0(P),w}function as(a,P,k,c){var w=[];a0(c),l2(w,a,"state_address"),P=W(w,P,"cipher");var Q,S=X._crypto_secretstream_xchacha20poly1305_abytes(),F=P.length;F<S&&i0(w,"cipher is too short"),Q=Z(P),w.push(Q);var V=null,E=0;k!=null&&(V=Z(k=W(w,k,"ad")),E=k.length,w.push(V));var e0=new k0(F-X._crypto_secretstream_xchacha20poly1305_abytes()|0),y0=e0.address;w.push(y0);var u0,c0=(u0=fr(1),w.push(u0),(c0=X._crypto_secretstream_xchacha20poly1305_pull(a,y0,0,u0,Q,F,0,V,E)===0&&{tag:X.HEAPU8[u0],message:e0})&&{message:w0(c0.message,c),tag:c0.tag});return p0(w),c0}function gs(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"state_address");var S=Z(P=W(Q,P,"message_chunk")),F=P.length;Q.push(S);var V=null,E=0;k!=null&&(V=Z(k=W(Q,k,"ad")),E=k.length,Q.push(V)),l2(Q,c,"tag"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(Q,"tag must be an unsigned integer");var e0=new k0(F+X._crypto_secretstream_xchacha20poly1305_abytes()|0),y0=e0.address;if(Q.push(y0),!(0|X._crypto_secretstream_xchacha20poly1305_push(a,y0,0,S,F,0,V,E,0,c))){var u0=w0(e0,w);return p0(Q),u0}H0(Q,"invalid usage")}function cs(a,P){var k=[];return a0(P),l2(k,a,"state_address"),X._crypto_secretstream_xchacha20poly1305_rekey(a),p0(k),!0}function qs(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_shorthash_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_shorthash_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_shorthash(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ps(a){var P=[];a0(a);var k=new k0(0|X._crypto_shorthash_keybytes()),c=k.address;P.push(c),X._crypto_shorthash_keygen(c);var w=w0(k,a);return p0(P),w}function Ts(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_shorthash_siphashx24_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_shorthash_siphashx24_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_shorthash_siphashx24(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ws(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_sign_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(a.length+X._crypto_sign_bytes()|0),E=V.address;if(c.push(E),!(0|X._crypto_sign(E,null,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ms(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_sign_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_sign_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_sign_detached(E,null,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ds(a,P){var k=[];a0(P),a=W(k,a,"edPk");var c,w=0|X._crypto_sign_publickeybytes();a.length!==w&&i0(k,"invalid edPk length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_pk_to_curve25519(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Ms(a,P){var k=[];a0(P),a=W(k,a,"edSk");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid edSk length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_curve25519(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Ss(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_publickeybytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_pk(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Is(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_seedbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_seed(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Cs(a,P,k){var c=[];a0(k),l2(c,a,"state_address"),P=W(c,P,"privateKey");var w,Q=0|X._crypto_sign_secretkeybytes();P.length!==Q&&i0(c,"invalid privateKey length"),w=Z(P),c.push(w);var S=new k0(0|X._crypto_sign_bytes()),F=S.address;if(c.push(F),!(0|X._crypto_sign_final_create(a,F,null,w))){var V=(X._free(a),w0(S,k));return p0(c),V}H0(c,"invalid usage")}function Hs(a,P,k,c){var w=[];a0(c),l2(w,a,"state_address"),P=W(w,P,"signature");var Q,S=0|X._crypto_sign_bytes();P.length!==S&&i0(w,"invalid signature length"),Q=Z(P),w.push(Q),k=W(w,k,"publicKey");var F,V=0|X._crypto_sign_publickeybytes();k.length!==V&&i0(w,"invalid publicKey length"),F=Z(k),w.push(F);var E=!(0|X._crypto_sign_final_verify(a,Q,F));return p0(w),E}function Ys(a){var P=[];a0(a);var k=new k0(208).address;if(!(0|X._crypto_sign_init(k))){var c=k;return p0(P),c}H0(P,"internal error")}function Qs(a){var P=[];a0(a);var k=new k0(0|X._crypto_sign_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_sign_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_sign_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"ed25519"};return p0(P),S}H0(P,"internal error")}function Gs(a,P,k){var c=[];a0(k),a=W(c,a,"signedMessage");var w,Q=X._crypto_sign_bytes(),S=a.length;S<Q&&i0(c,"signedMessage is too short"),w=Z(a),c.push(w),P=W(c,P,"publicKey");var F,V=0|X._crypto_sign_publickeybytes();P.length!==V&&i0(c,"invalid publicKey length"),F=Z(P),c.push(F);var E=new k0(S-X._crypto_sign_bytes()|0),e0=E.address;if(c.push(e0),!(0|X._crypto_sign_open(e0,null,w,S,0,F))){var y0=w0(E,k);return p0(c),y0}H0(c,"incorrect signature for the given public key")}function Ls(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_sign_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_sign_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_sign_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"ed25519"};return p0(k),E}H0(k,"invalid usage")}function Xs(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_sign_update(a,w,Q,0)&&H0(c,"invalid usage"),p0(c)}function ds(a,P,k){var c=[];a=W(c,a,"signature");var w,Q=0|X._crypto_sign_bytes();a.length!==Q&&i0(c,"invalid signature length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"publicKey");var V,E=0|X._crypto_sign_publickeybytes();k.length!==E&&i0(c,"invalid publicKey length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_sign_verify_detached(w,S,F,0,V));return p0(c),e0}function Rs(a,P,k,c){var w=[];a0(c),l2(w,a,"outLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(w,"outLength must be an unsigned integer"),P=W(w,P,"key");var Q,S=0|X._crypto_stream_chacha20_keybytes();P.length!==S&&i0(w,"invalid key length"),Q=Z(P),w.push(Q),k=W(w,k,"nonce");var F,V=0|X._crypto_stream_chacha20_noncebytes();k.length!==V&&i0(w,"invalid nonce length"),F=Z(k),w.push(F);var E=new k0(0|a),e0=E.address;w.push(e0),X._crypto_stream_chacha20(e0,a,0,F,Q);var y0=w0(E,c);return p0(w),y0}function Fs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_chacha20_ietf_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_chacha20_ietf_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_chacha20_ietf_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Ks(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_chacha20_ietf_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_chacha20_ietf_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_chacha20_ietf_xor_ic(c0,S,F,0,V,k,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function Ns(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_chacha20_keybytes()),c=k.address;P.push(c),X._crypto_stream_chacha20_keygen(c);var w=w0(k,a);return p0(P),w}function Os(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_chacha20_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_chacha20_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_chacha20_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Us(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_chacha20_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_chacha20_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_chacha20_xor_ic(c0,S,F,0,V,k,0,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function xs(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_keybytes()),c=k.address;P.push(c),X._crypto_stream_keygen(c);var w=w0(k,a);return p0(P),w}function Vs(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_xchacha20_keybytes()),c=k.address;P.push(c),X._crypto_stream_xchacha20_keygen(c);var w=w0(k,a);return p0(P),w}function zs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_xchacha20_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_xchacha20_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_xchacha20_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function $s(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_xchacha20_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_xchacha20_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_xchacha20_xor_ic(c0,S,F,0,V,k,0,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function Zs(a,P){var k=[];a0(P),l2(k,a,"length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(k,"length must be an unsigned integer");var c=new k0(0|a),w=c.address;k.push(w),X._randombytes_buf(w,a);var Q=w0(c,P);return p0(k),Q}function Ws(a,P,k){var c=[];a0(k),l2(c,a,"length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(c,"length must be an unsigned integer"),P=W(c,P,"seed");var w,Q=0|X._randombytes_seedbytes();P.length!==Q&&i0(c,"invalid seed length"),w=Z(P),c.push(w);var S=new k0(0|a),F=S.address;c.push(F),X._randombytes_buf_deterministic(F,a,w);var V=w0(S,k);return p0(c),V}function Js(a){a0(a),X._randombytes_close()}function Es(a){a0(a);var P=X._randombytes_random()>>>0;return p0([]),P}function bs(a,P){var k=[];a0(P);for(var c=X._malloc(24),w=0;w<6;w++)X.setValue(c+4*w,X.Runtime.addFunction(a[["implementation_name","random","stir","uniform","buf","close"][w]]),"i32");0|X._randombytes_set_implementation(c)&&H0(k,"unsupported implementation"),p0(k)}function ro(a){a0(a),X._randombytes_stir()}function Ao(a,P){var k=[];a0(P),l2(k,a,"upper_bound"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(k,"upper_bound must be an unsigned integer");var c=X._randombytes_uniform(a)>>>0;return p0(k),c}function no(){var a=X._sodium_version_string(),P=X.UTF8ToString(a);return p0([]),P}k0.prototype.to_Uint8Array=function(){var a=new Uint8Array(this.length);return a.set(X.HEAPU8.subarray(this.address,this.address+this.length)),a},f2.add=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be added");var k=a.length,c=0,w=0;if(P.length!==a.length)throw new TypeError("Arguments must have the same length");for(w=0;w<k;w++)c>>=8,c+=a[w]+P[w],a[w]=255&c},f2.base64_variants=dr,f2.compare=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(a.length!==P.length)throw new TypeError("Only instances of identical length can be compared");for(var k=0,c=1,w=a.length;w-- >0;)k|=P[w]-a[w]>>8&c,c&=(P[w]^a[w])-1>>8;return k+k+c-1},f2.from_base64=function(a,P){P=Ke(P);var k,c=[],w=new k0(3*(a=W(c,a,"input")).length/4),Q=Z(a),S=fr(4),F=fr(4);return c.push(Q),c.push(w.address),c.push(S),c.push(F),X._sodium_base642bin(w.address,w.length,Q,a.length,0,S,F,P)!==0&&H0(c,"invalid input"),X.getValue(F,"i32")-Q!==a.length&&H0(c,"incomplete input"),w.length=X.getValue(S,"i32"),k=w.to_Uint8Array(),p0(c),k},f2.from_hex=function(a){var P,k=[],c=new k0((a=W(k,a,"input")).length/2),w=Z(a),Q=fr(4);return k.push(w),k.push(c.address),k.push(Q),X._sodium_hex2bin(c.address,c.length,w,a.length,0,0,Q)!==0&&H0(k,"invalid input"),X.getValue(Q,"i32")-w!==a.length&&H0(k,"incomplete input"),P=c.to_Uint8Array(),p0(k),P},f2.from_string=A6,f2.increment=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var P=256,k=0,c=a.length;k<c;k++)P>>=8,P+=a[k],a[k]=255&P},f2.is_zero=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var P=0,k=0,c=a.length;k<c;k++)P|=a[k];return P===0},f2.libsodium=e4,f2.memcmp=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(a.length!==P.length)throw new TypeError("Only instances of identical length can be compared");for(var k=0,c=0,w=a.length;c<w;c++)k|=a[c]^P[c];return k===0},f2.memzero=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be wiped");for(var P=0,k=a.length;P<k;P++)a[P]=0},f2.output_formats=function(){return["uint8array","text","hex","base64"]},f2.pad=function(a,P){if(!(a instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((P|=0)<=0)throw new Error("block size must be > 0");var k,c=[],w=fr(4),Q=1,S=0,F=0|a.length,V=new k0(F+P);c.push(w),c.push(V.address);for(var E=V.address,e0=V.address+F+P;E<e0;E++)X.HEAPU8[E]=a[S],S+=Q=1&~((65535&((F-=Q)>>>48|F>>>32|F>>>16|F))-1>>16);return X._sodium_pad(w,V.address,a.length,P,V.length)!==0&&H0(c,"internal error"),V.length=X.getValue(w,"i32"),k=V.to_Uint8Array(),p0(c),k},f2.unpad=function(a,P){if(!(a instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((P|=0)<=0)throw new Error("block size must be > 0");var k=[],c=Z(a),w=fr(4);return k.push(c),k.push(w),X._sodium_unpad(w,c,a.length,P)!==0&&H0(k,"unsupported/invalid padding"),a=(a=new Uint8Array(a)).subarray(0,X.getValue(w,"i32")),p0(k),a},f2.ready=S3,f2.symbols=function(){return Object.keys(f2).sort()},f2.to_base64=Ne,f2.to_hex=Fe,f2.to_string=hA;class Ue{buf;view;pos;constructor(P){this.buf=P,this.view=new DataView(P.buffer,P.byteOffset,P.byteLength),this.pos=0}take(P){if(this.pos+P>this.buf.length)throw new Error("Decoder: unexpected end of input");const k=this.buf.subarray(this.pos,this.pos+P);return this.pos+=P,k}takeAll(){const P=this.buf.subarray(this.pos);return this.pos=this.buf.length,P}anyByte(){if(this.pos>=this.buf.length)throw new Error("Decoder: unexpected end of input");return this.buf[this.pos++]}remaining(){return this.buf.length-this.pos}offset(){return this.pos}}function T6(...a){let P=0;for(const w of a)P+=w.length;const k=new Uint8Array(P);let c=0;for(const w of a)k.set(w,c),c+=w.length;return k}function Qe(a){const P=new Uint8Array(4);return new DataView(P.buffer).setUint32(0,a,!1),P}function Ge(a){const P=a.take(4);return new DataView(P.buffer,P.byteOffset,P.byteLength).getUint32(0,!1)}function eo(a){const P=Number(a>>32n&0xFFFFFFFFn),k=Number(a&0xFFFFFFFFn);return T6(Qe(P),Qe(k))}function to(a){const P=BigInt(Ge(a)),k=BigInt(Ge(a)),c=P<<32n|k;return c>=0x8000000000000000n?c-0x10000000000000000n:c}function _o(a){if(a.length>255)throw new Error("encodeBytes: length exceeds 255");const P=new Uint8Array(1+a.length);return P[0]=a.length,P.set(a,1),P}function io(a){const P=a.anyByte();return a.take(P)}const so=new TextEncoder,oo=new TextDecoder;function yo(a){return _o(so.encode(a))}function Le(a){return oo.decode(io(a))}const xe=48,Bo=49;function ho(a,P){return new Uint8Array([xe])}function uo(a,P){const k=P.anyByte();if(k===xe)return null;if(k===Bo)return a(P);throw new Error("decodeMaybe: invalid tag "+k)}function lo(a){return po(a).content}function po(a){if(a.length<8)throw new Error("splitLen: input too short");const P=new Ue(a),k=to(P);if(k<0n)throw new Error("splitLen: negative length");const c=Number(k),w=a.length-8,Q=Math.min(c,w);return{len:k,content:a.subarray(8,8+Q)}}const Xe=f2;function V1(a,P){return(a[P]|a[P+1]<<8|a[P+2]<<16|a[P+3]<<24)>>>0}function B1(a,P,k){a[P]=k&255,a[P+1]=k>>>8&255,a[P+2]=k>>>16&255,a[P+3]=k>>>24&255}function Y2(a,P){return(a<<P|a>>>32-P)>>>0}const jo=1634760805,ko=857760878,vo=2036477234,fo=1797285236;function Ve(a,P,k){const c=V1(a,0),w=V1(a,4),Q=V1(a,8),S=V1(a,12),F=V1(a,16),V=V1(a,20),E=V1(a,24),e0=V1(a,28),y0=V1(P,0),u0=V1(P,4),c0=jo,I0=c,Q0=w,R0=Q,N0=S,E0=ko,o2=y0,S2=u0,s1=k>>>0,R1=0,n6=vo,m6=F,uA=V,D6=E,M6=e0,S6=fo;let z1=c0,$1=I0,F1=Q0,K1=R0,Z1=N0,N1=E0,W1=o2,u1=S2,f1=s1,J1=R1,E1=n6,b1=m6,rr=uA,O1=D6,Ar=M6,nr=S6;for(let I6=0;I6<10;I6++)Z1^=Y2(z1+rr>>>0,7),f1^=Y2(Z1+z1>>>0,9),rr^=Y2(f1+Z1>>>0,13),z1^=Y2(rr+f1>>>0,18),J1^=Y2(N1+$1>>>0,7),O1^=Y2(J1+N1>>>0,9),$1^=Y2(O1+J1>>>0,13),N1^=Y2($1+O1>>>0,18),Ar^=Y2(E1+W1>>>0,7),F1^=Y2(Ar+E1>>>0,9),W1^=Y2(F1+Ar>>>0,13),E1^=Y2(W1+F1>>>0,18),K1^=Y2(nr+b1>>>0,7),u1^=Y2(K1+nr>>>0,9),b1^=Y2(u1+K1>>>0,13),nr^=Y2(b1+u1>>>0,18),$1^=Y2(z1+K1>>>0,7),F1^=Y2($1+z1>>>0,9),K1^=Y2(F1+$1>>>0,13),z1^=Y2(K1+F1>>>0,18),W1^=Y2(N1+Z1>>>0,7),u1^=Y2(W1+N1>>>0,9),Z1^=Y2(u1+W1>>>0,13),N1^=Y2(Z1+u1>>>0,18),b1^=Y2(E1+J1>>>0,7),f1^=Y2(b1+E1>>>0,9),J1^=Y2(f1+b1>>>0,13),E1^=Y2(J1+f1>>>0,18),rr^=Y2(nr+Ar>>>0,7),O1^=Y2(rr+nr>>>0,9),Ar^=Y2(O1+rr>>>0,13),nr^=Y2(Ar+O1>>>0,18);const z2=new Uint8Array(64);return B1(z2,0,z1+c0>>>0),B1(z2,4,$1+I0>>>0),B1(z2,8,F1+Q0>>>0),B1(z2,12,K1+R0>>>0),B1(z2,16,Z1+N0>>>0),B1(z2,20,N1+E0>>>0),B1(z2,24,W1+o2>>>0),B1(z2,28,u1+S2>>>0),B1(z2,32,f1+s1>>>0),B1(z2,36,J1+R1>>>0),B1(z2,40,E1+n6>>>0),B1(z2,44,b1+m6>>>0),B1(z2,48,rr+uA>>>0),B1(z2,52,O1+D6>>>0),B1(z2,56,Ar+M6>>>0),B1(z2,60,nr+S6>>>0),z2}function t4(a,P){const k=new Uint8Array(16),c=Xe.crypto_core_hsalsa20(k,a),w=Xe.crypto_core_hsalsa20(P.subarray(0,16),c),Q=new Uint8Array(P.subarray(16,24)),S=Ve(w,Q,0),F=S.subarray(0,32),V=new Uint8Array(S.subarray(32)),E=f2.crypto_onetimeauth_init(F);return{_subkey:w,_nonce8:Q,_counter:1,_ksBuf:V,_ksOff:0,_authState:E}}function ao(a,P){return t4(a,P)}function bA(a,P){const k=$e(a,P);return f2.crypto_onetimeauth_update(a._authState,k),k}function ze(a,P){return f2.crypto_onetimeauth_update(a._authState,P),$e(a,P)}function _4(a){return f2.crypto_onetimeauth_final(a._authState)}function go(a,P,k,c){const w=Number(k),Q=c.subarray(0,w),S=c.subarray(w),F=t4(a,P),V=ze(F,Q),E=_4(F),e0=S.length===16&&co(S,E),y0=lo(V);return{valid:e0,content:y0}}function $e(a,P){const k=new Uint8Array(P.length);let c=0;for(;c<P.length;){a._ksOff>=a._ksBuf.length&&(a._ksBuf=Ve(a._subkey,a._nonce8,a._counter++),a._ksOff=0);const w=a._ksBuf.length-a._ksOff,Q=P.length-c,S=Math.min(w,Q);for(let F=0;F<S;F++)k[c+F]=P[c+F]^a._ksBuf[a._ksOff+F];a._ksOff+=S,c+=S}return k}function co(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const Ze=16n;function qo(a){return T6(yo(a.fileName),ho())}function Po(a){const P=Math.min(1024,a.length),k=new Ue(a.subarray(0,P)),c=Le(k),w=uo(Le,k),Q=k.offset();return{header:{fileName:c,fileExtra:w},rest:a.subarray(Q)}}function To(a,P,k,c,w,Q){const S=t4(k,c),F=eo(w),V=Number(Q-Ze-w-8n);if(V<0)throw new Error("encryptFile: encSize too small");const E=bA(S,T6(F,P)),e0=bA(S,a),y0=new Uint8Array(V);y0.fill(35);const u0=bA(S,y0),c0=_4(S);return T6(E,e0,u0,c0)}function wo(a,P,k,c){if(P.length===0)throw new Error("decryptChunks: empty chunks");const w=a-Ze,Q=P.length===1?P[0]:T6(...P),{valid:S,content:F}=go(k,c,w,Q);if(!S)throw new Error("decryptChunks: invalid auth tag");const{header:V,rest:E}=Po(F);return{header:V,content:E}}function mo(a){return f2.crypto_hash_sha256(a)}function We(a){const k=f2.crypto_hash_sha512_init();for(const c of a)for(let w=0;w<c.length;w+=4194304)f2.crypto_hash_sha512_update(k,c.subarray(w,Math.min(w+4194304,c.length)));return f2.crypto_hash_sha512_final(k)}const Do="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Je=new Uint8Array(128);Je.fill(255);for(let a=0;a<64;a++)Je[Do.charCodeAt(a)]=a;const Ee=a=>a*1024,be=a=>a*1048576,Mo=Ee(64),de=Ee(256),r4=be(1),Re=be(4),So=8,Io=16;function A4(a){return Math.floor(a*3/4)}function Co(a){let P,k;a>A4(Re)?(P=r4,k=Re):a>A4(r4)?(P=de,k=r4):(P=Mo,k=de);function c(w){if(w===0)return[];if(w>=k){const F=Math.floor(w/k),V=w%k;return new Array(F).fill(k).concat(c(V))}if(w>A4(k))return[k];const Q=Math.floor(w/P),S=w%P;return new Array(S===0?Q:Q+1).fill(P)}return c(a)}await f2.ready;function Ho(a,P,k){if(k.length<16)return{valid:!1,content:new Uint8Array(0),computedTag:new Uint8Array(0)};const c=k.subarray(0,k.length-16),w=k.subarray(k.length-16),Q=ao(a,P),S=ze(Q,c),F=_4(Q);return{valid:Yo(w,F),content:S,computedTag:F}}function Yo(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}function Qo(a,P,k,c){k.slice(k.length-16);const{valid:w,content:Q}=Ho(a,P,k);if(!w)throw new Error("transport auth tag verification failed");if(c!==null){const S=mo(Q);if(!Go(S,c))throw new Error("chunk digest mismatch")}return Q}function Go(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const rt=`session-${Date.now()}-${crypto.randomUUID()}`;let r6=null,h1=null;const gr=new Map;let P6=0,BA=null,ar=!1;const cr=new Map;async function w6(){return BA||(BA=await(await navigator.storage.getDirectory()).getDirectoryHandle(rt,{create:!0})),BA}async function Lo(){const a=await navigator.storage.getDirectory(),P=Date.now()-36e5;for await(const[k]of a.entries()){if(!k.startsWith("session-"))continue;const c=k.split("-"),w=parseInt(c[1],10);if(!isNaN(w)&&w<P)try{await a.removeEntry(k,{recursive:!0})}catch{}}}async function Xo(a,P,k){const c=new Uint8Array(P),w=new Uint8Array(32),Q=new Uint8Array(24);crypto.getRandomValues(w),crypto.getRandomValues(Q);const S=qo({fileName:k}),F=BigInt(S.length+c.length),V=Number(F)+So+Io,E=Co(V),e0=BigInt(E.reduce((N0,E0)=>N0+E0,0)),y0=To(c,S,w,Q,F,e0);self.postMessage({id:a,type:"progress",done:50,total:100});const u0=We([y0]);console.log(`[WORKER-DBG] encrypt: encData.len=${y0.length} digest=${b2(u0,64)} chunkSizes=[${E.join(",")}]`),self.postMessage({id:a,type:"progress",done:80,total:100});const I0=await(await w6()).getFileHandle("upload.bin",{create:!0}),Q0=await I0.createSyncAccessHandle(),R0=Q0.write(y0);if(R0!==y0.length)throw new Error(`OPFS upload write: ${R0}/${y0.length}`);Q0.flush(),Q0.close(),r6=await I0.createSyncAccessHandle(),self.postMessage({id:a,type:"progress",done:100,total:100}),self.postMessage({id:a,type:"encrypted",digest:u0,key:w,nonce:Q,chunkSizes:E})}function Ro(a,P,k){if(!r6){self.postMessage({id:a,type:"error",message:"No upload file open"});return}const c=new Uint8Array(k);r6.read(c,{at:P});const w=c.buffer;self.postMessage({id:a,type:"chunk",data:w},[w])}async function Fo(a,P,k,c,w,Q){const S=new Uint8Array(c);console.log(`[WORKER-DBG] store chunk=${Q} body.len=${S.length} nonce=${b2(k,24)} dhSecret=${b2(P)} digest=${b2(w,32)} body[0..8]=${b2(S)} body[-8..]=${b2(S.slice(-8))}`);const F=Qo(P,k,S,w);if(console.log(`[WORKER-DBG] decrypted chunk=${Q} len=${F.length} [0..8]=${b2(F)} [-8..]=${b2(F.slice(-8))}`),ar){cr.set(Q,F),self.postMessage({id:a,type:"stored"});return}h1||(h1=await(await(await w6()).getFileHandle("download.bin",{create:!0})).createSyncAccessHandle());const V=P6;P6+=F.length,gr.set(Q,{offset:V,size:F.length});const E=h1.write(F,{at:V});if(console.log(`[WORKER-DBG] OPFS write chunk=${Q} offset=${V} size=${F.length} written=${E}`),E!==F.length){console.warn(`[WORKER] OPFS write failed chunk=${Q}: ${E}/${F.length}, falling back to in-memory storage`);for(const[u0,c0]of gr.entries()){if(u0===Q)continue;const I0=new Uint8Array(c0.size);h1.read(I0,{at:c0.offset}),cr.set(u0,I0)}h1.close(),h1=null;try{await(await w6()).removeEntry("download.bin")}catch{}gr.clear(),P6=0,cr.set(Q,F),ar=!0,self.postMessage({id:a,type:"stored"});return}h1.flush();const e0=new Uint8Array(Math.min(8,F.length));h1.read(e0,{at:V});const y0=new Uint8Array(Math.min(8,F.length));h1.read(y0,{at:V+F.length-y0.length}),console.log(`[WORKER-DBG] OPFS verify chunk=${Q} readBack[0..8]=${b2(e0)} readBack[-8..]=${b2(y0)} expected[0..8]=${b2(F)} expected[-8..]=${b2(F.slice(-8))}`),self.postMessage({id:a,type:"stored"})}async function Ko(a,P,k,c,w){console.log(`[WORKER-DBG] verify: expectedSize=${P} expectedDigest=${b2(k,64)} useMemory=${ar} chunkMeta.size=${gr.size} memoryChunks.size=${cr.size}`);const Q=[];let S=0;const V=(ar?cr.size:gr.size)*2;let E=0;if(ar){const I0=[...cr.entries()].sort((Q0,R0)=>Q0[0]-R0[0]);for(const[Q0,R0]of I0)console.log(`[WORKER-DBG] verify memory chunk=${Q0} size=${R0.length}`),Q.push(R0),S+=R0.length,self.postMessage({id:a,type:"progress",done:++E,total:V})}else{h1&&(h1.flush(),h1.close(),h1=null);const R0=await(await(await w6()).getFileHandle("download.bin")).createSyncAccessHandle();console.log(`[WORKER-DBG] verify: OPFS file size=${R0.getSize()}`);const N0=[...gr.entries()].sort((E0,o2)=>E0[0]-o2[0]);for(const[E0,o2]of N0){const S2=new Uint8Array(o2.size),s1=R0.read(S2,{at:o2.offset});console.log(`[WORKER-DBG] verify read chunk=${E0} offset=${o2.offset} size=${o2.size} bytesRead=${s1} [0..8]=${b2(S2)} [-8..]=${b2(S2.slice(-8))}`),Q.push(S2),S+=o2.size,self.postMessage({id:a,type:"progress",done:++E,total:V})}R0.close()}if(S!==P){self.postMessage({id:a,type:"error",message:`File size mismatch: ${S} !== ${P}`});return}const e0=f2.crypto_hash_sha512_init();for(let I0=0;I0<Q.length;I0++){const Q0=Q[I0],R0=4*1024*1024;for(let N0=0;N0<Q0.length;N0+=R0)f2.crypto_hash_sha512_update(e0,Q0.subarray(N0,Math.min(N0+R0,Q0.length)));self.postMessage({id:a,type:"progress",done:++E,total:V})}const y0=f2.crypto_hash_sha512_final(e0);if(!Oo(y0,k)){console.error(`[WORKER-DBG] DIGEST MISMATCH: expected=${b2(k,64)} actual=${b2(y0,64)} chunks=${Q.length} totalSize=${S}`);const I0=f2.crypto_hash_sha512_init();for(let Q0=0;Q0<Q.length;Q0++){const R0=Q[Q0],N0=4*1024*1024;for(let o2=0;o2<R0.length;o2+=N0)f2.crypto_hash_sha512_update(I0,R0.subarray(o2,Math.min(o2+N0,R0.length)));const E0=We([R0]);console.error(`[WORKER-DBG] chunk[${Q0}] size=${R0.length} sha512=${b2(E0,32)}… [0..8]=${b2(R0)} [-8..]=${b2(R0.slice(-8))}`)}self.postMessage({id:a,type:"error",message:"File digest mismatch"});return}console.log("[WORKER-DBG] verify: digest OK");const u0=wo(BigInt(P),Q,c,w);if(!ar){const I0=await w6();try{await I0.removeEntry("download.bin")}catch{}}gr.clear(),cr.clear(),P6=0,ar=!1;const c0=u0.content.buffer.slice(u0.content.byteOffset,u0.content.byteOffset+u0.content.byteLength);self.postMessage({id:a,type:"decrypted",header:u0.header,content:c0},[c0])}async function No(a){r6&&(r6.close(),r6=null),h1&&(h1.close(),h1=null),gr.clear(),cr.clear(),P6=0,ar=!1;try{await(await navigator.storage.getDirectory()).removeEntry(rt,{recursive:!0})}catch{}BA=null,self.postMessage({id:a,type:"cleaned"})}self.onmessage=async a=>{const P=a.data;try{switch(await At,P.type){case"encrypt":await Xo(P.id,P.data,P.fileName);break;case"readChunk":Ro(P.id,P.offset,P.size);break;case"decryptAndStoreChunk":await Fo(P.id,P.dhSecret,P.nonce,P.body,P.chunkDigest,P.chunkNo);break;case"verifyAndDecrypt":await Ko(P.id,P.size,P.digest,P.key,P.nonce);break;case"cleanup":await No(P.id);break;default:self.postMessage({id:P.id,type:"error",message:`Unknown message type: ${P.type}`})}}catch(k){self.postMessage({id:P.id,type:"error",message:k?.message??String(k)})}};function b2(a,P=8){return Array.from(a.slice(0,P)).map(k=>k.toString(16).padStart(2,"0")).join("")}function Oo(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const At=(async()=>{await f2.ready,await Lo()})();At.then(()=>self.postMessage({type:"ready"}),()=>{});
|
|
1413
|
+
\0\0\0\v\0\0\0\f\0\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0`)}function uA(I){return I}async function D6(I){return I}async function M6(I,e2){try{var H=await D6(I),L2=await WebAssembly.instantiate(H,e2);return L2}catch(F2){V(`failed to asynchronously prepare wasm: ${F2}`),R1(F2)}}async function S6(I,e2,H){return M6(e2,H)}function z1(){var I={a:ut};return I}async function $1(){function I(r1,R2){return jA=r1.exports,ht(jA),o2(),J1(),jA}E1();function e2(r1){return I(r1.instance)}var H=z1();if(k.instantiateWasm)return new Promise((r1,R2)=>{k.instantiateWasm(H,(ur,qr)=>{r1(I(ur))})});n6??=m6();var L2=await S6(E,n6,H),F2=e2(L2);return F2}var F1=I=>{for(;I.length>0;)I.shift()(k)},K1=[],Z1=I=>K1.push(I),N1=[],W1=I=>N1.push(I),u1=0,f1=null,J1=I=>{if(u1--,k.monitorRunDependencies?.(u1),u1==0&&f1){var e2=f1;f1=null,e2()}},E1=I=>{u1++,k.monitorRunDependencies?.(u1)};function b1(I,e2="i8"){switch(e2.endsWith("*")&&(e2="*"),e2){case"i1":return u0[I];case"i8":return u0[I];case"i16":return I0[I>>1];case"i32":return Q0[I>>2];case"i64":R1("to do getValue(i64) use WASM_BIGINT");case"float":return N0[I>>2];case"double":return E0[I>>3];case"*":return R0[I>>2];default:R1(`invalid type for getValue: ${e2}`)}}function rr(I,e2,H="i8"){switch(H.endsWith("*")&&(H="*"),H){case"i1":u0[I]=e2;break;case"i8":u0[I]=e2;break;case"i16":I0[I>>1]=e2;break;case"i32":Q0[I>>2]=e2;break;case"i64":R1("to do setValue(i64) use WASM_BIGINT");case"float":N0[I>>2]=e2;break;case"double":E0[I>>3]=e2;break;case"*":R0[I>>2]=e2;break;default:R1(`invalid type for setValue: ${H}`)}}for(var O1=globalThis.TextDecoder&&new TextDecoder,Ar=(I,e2,H,L2)=>{var F2=e2+H;if(L2)return F2;for(;I[e2]&&!(e2>=F2);)++e2;return e2},nr=(I,e2=0,H,L2)=>{var F2=Ar(I,e2,H,L2);if(F2-e2>16&&I.buffer&&O1)return O1.decode(I.subarray(e2,F2));for(var r1="";e2<F2;){var R2=I[e2++];if(!(R2&128)){r1+=String.fromCharCode(R2);continue}var ur=I[e2++]&63;if((R2&224)==192){r1+=String.fromCharCode((R2&31)<<6|ur);continue}var qr=I[e2++]&63;if((R2&240)==224?R2=(R2&15)<<12|ur<<6|qr:R2=(R2&7)<<18|ur<<12|qr<<6|I[e2++]&63,R2<65536)r1+=String.fromCharCode(R2);else{var Rr=R2-65536;r1+=String.fromCharCode(55296|Rr>>10,56320|Rr&1023)}}return r1},z2=(I,e2,H)=>I?nr(c0,I,e2,H):"",I6=(I,e2,H,L2)=>R1(`Assertion failed: ${z2(I)}, at: `+[e2?z2(e2):"unknown filename",H,L2?z2(L2):"unknown function"]),nt=()=>R1(""),lA=[],et=(I,e2)=>{lA.length=0;for(var H;H=c0[I++];){var L2=H!=105;L2&=H!=112,e2+=L2&&e2%8?4:0,lA.push(H==112?R0[e2>>2]:H==105?Q0[e2>>2]:E0[e2>>3]),e2+=L2?8:4}return lA},tt=(I,e2,H)=>{var L2=et(e2,H);return Bt[I](...L2)},_t=(I,e2,H)=>tt(I,e2,H),it=()=>2147483648,st=(I,e2)=>Math.ceil(I/e2)*e2,ot=I=>{var e2=C6.buffer.byteLength,H=(I-e2+65535)/65536|0;try{return C6.grow(H),o2(),1}catch{}},yt=I=>{var e2=c0.length;I>>>=0;var H=it();if(I>H)return!1;for(var L2=1;L2<=4;L2*=2){var F2=e2*(1+.2/L2);F2=Math.min(F2,I+100663296);var r1=Math.min(H,st(Math.max(I,F2),65536)),R2=ot(r1);if(R2)return!0}return!1},e6=new Uint8Array(123),hr=25;hr>=0;--hr)e6[48+hr]=52+hr,e6[65+hr]=hr,e6[97+hr]=26+hr;if(e6[43]=62,e6[47]=63,k.noExitRuntime&&k.noExitRuntime,k.print&&k.print,k.printErr&&(V=k.printErr),k.wasmBinary&&(E=k.wasmBinary),k.arguments&&k.arguments,k.thisProgram&&k.thisProgram,k.preInit)for(typeof k.preInit=="function"&&(k.preInit=[k.preInit]);k.preInit.length>0;)k.preInit.shift()();k.setValue=rr,k.getValue=b1,k.UTF8ToString=z2;var Bt={39864:()=>k.getRandomValue(),39900:()=>{if(k.getRandomValue===void 0)try{var I=typeof window=="object"?window:self,e2=typeof I.crypto<"u"?I.crypto:I.msCrypto;e2=e2===void 0?L2:e2;var H=function(){var r1=new Uint32Array(1);return e2.getRandomValues(r1),r1[0]>>>0};H(),k.getRandomValue=H}catch{try{var L2=null,F2=function(){var R2=L2.randomBytes(4);return(R2[0]<<24|R2[1]<<16|R2[2]<<8|R2[3])>>>0};F2(),k.getRandomValue=F2}catch{throw"No secure random number generator found"}}}},C6;function ht(I){k._crypto_aead_aegis128l_keybytes=I.f,k._crypto_aead_aegis128l_nsecbytes=I.g,k._crypto_aead_aegis128l_npubbytes=I.h,k._crypto_aead_aegis128l_abytes=I.i,k._crypto_aead_aegis128l_messagebytes_max=I.j,k._crypto_aead_aegis128l_keygen=I.k,k._crypto_aead_aegis128l_encrypt=I.l,k._crypto_aead_aegis128l_encrypt_detached=I.m,k._crypto_aead_aegis128l_decrypt=I.n,k._crypto_aead_aegis128l_decrypt_detached=I.o,k._crypto_aead_aegis256_keybytes=I.p,k._crypto_aead_aegis256_nsecbytes=I.q,k._crypto_aead_aegis256_npubbytes=I.r,k._crypto_aead_aegis256_abytes=I.s,k._crypto_aead_aegis256_messagebytes_max=I.t,k._crypto_aead_aegis256_keygen=I.u,k._crypto_aead_aegis256_encrypt=I.v,k._crypto_aead_aegis256_encrypt_detached=I.w,k._crypto_aead_aegis256_decrypt=I.x,k._crypto_aead_aegis256_decrypt_detached=I.y,k._crypto_aead_aes256gcm_is_available=I.z,k._crypto_aead_chacha20poly1305_encrypt_detached=I.A,k._crypto_aead_chacha20poly1305_encrypt=I.B,k._crypto_aead_chacha20poly1305_ietf_encrypt_detached=I.C,k._crypto_aead_chacha20poly1305_ietf_encrypt=I.D,k._crypto_aead_chacha20poly1305_decrypt_detached=I.E,k._crypto_aead_chacha20poly1305_decrypt=I.F,k._crypto_aead_chacha20poly1305_ietf_decrypt_detached=I.G,k._crypto_aead_chacha20poly1305_ietf_decrypt=I.H,k._crypto_aead_chacha20poly1305_ietf_keybytes=I.I,k._crypto_aead_chacha20poly1305_ietf_npubbytes=I.J,k._crypto_aead_chacha20poly1305_ietf_nsecbytes=I.K,k._crypto_aead_chacha20poly1305_ietf_abytes=I.L,k._crypto_aead_chacha20poly1305_ietf_messagebytes_max=I.M,k._crypto_aead_chacha20poly1305_ietf_keygen=I.N,k._crypto_aead_chacha20poly1305_keybytes=I.O,k._crypto_aead_chacha20poly1305_npubbytes=I.P,k._crypto_aead_chacha20poly1305_nsecbytes=I.Q,k._crypto_aead_chacha20poly1305_abytes=I.R,k._crypto_aead_chacha20poly1305_messagebytes_max=I.S,k._crypto_aead_chacha20poly1305_keygen=I.T,k._crypto_aead_xchacha20poly1305_ietf_encrypt_detached=I.U,k._crypto_aead_xchacha20poly1305_ietf_encrypt=I.V,k._crypto_aead_xchacha20poly1305_ietf_decrypt_detached=I.W,k._crypto_aead_xchacha20poly1305_ietf_decrypt=I.X,k._crypto_aead_xchacha20poly1305_ietf_keybytes=I.Y,k._crypto_aead_xchacha20poly1305_ietf_npubbytes=I.Z,k._crypto_aead_xchacha20poly1305_ietf_nsecbytes=I._,k._crypto_aead_xchacha20poly1305_ietf_abytes=I.$,k._crypto_aead_xchacha20poly1305_ietf_messagebytes_max=I.aa,k._crypto_aead_xchacha20poly1305_ietf_keygen=I.ba,k._crypto_auth_bytes=I.ca,k._crypto_auth_keybytes=I.da,k._crypto_auth_primitive=I.ea,k._crypto_auth=I.fa,k._crypto_auth_verify=I.ga,k._crypto_auth_keygen=I.ha,k._crypto_auth_hmacsha256_bytes=I.ia,k._crypto_auth_hmacsha256_keybytes=I.ja,k._crypto_auth_hmacsha256_statebytes=I.ka,k._crypto_auth_hmacsha256_keygen=I.la,k._crypto_auth_hmacsha256_init=I.ma,k._crypto_auth_hmacsha256_update=I.na,k._crypto_auth_hmacsha256_final=I.oa,k._crypto_auth_hmacsha256=I.pa,k._crypto_auth_hmacsha256_verify=I.qa,k._crypto_auth_hmacsha512_bytes=I.ra,k._crypto_auth_hmacsha512_keybytes=I.sa,k._crypto_auth_hmacsha512_statebytes=I.ta,k._crypto_auth_hmacsha512_keygen=I.ua,k._crypto_auth_hmacsha512_init=I.va,k._crypto_auth_hmacsha512_update=I.wa,k._crypto_auth_hmacsha512_final=I.xa,k._crypto_auth_hmacsha512=I.ya,k._crypto_auth_hmacsha512_verify=I.za,k._crypto_auth_hmacsha512256_bytes=I.Aa,k._crypto_auth_hmacsha512256_keybytes=I.Ba,k._crypto_auth_hmacsha512256_statebytes=I.Ca,k._crypto_auth_hmacsha512256_keygen=I.Da,k._crypto_auth_hmacsha512256_init=I.Ea,k._crypto_auth_hmacsha512256_update=I.Fa,k._crypto_auth_hmacsha512256_final=I.Ga,k._crypto_auth_hmacsha512256=I.Ha,k._crypto_auth_hmacsha512256_verify=I.Ia,k._crypto_box_seedbytes=I.Ja,k._crypto_box_publickeybytes=I.Ka,k._crypto_box_secretkeybytes=I.La,k._crypto_box_beforenmbytes=I.Ma,k._crypto_box_noncebytes=I.Na,k._crypto_box_zerobytes=I.Oa,k._crypto_box_boxzerobytes=I.Pa,k._crypto_box_macbytes=I.Qa,k._crypto_box_messagebytes_max=I.Ra,k._crypto_box_primitive=I.Sa,k._crypto_box_seed_keypair=I.Ta,k._crypto_box_keypair=I.Ua,k._crypto_box_beforenm=I.Va,k._crypto_box_afternm=I.Wa,k._crypto_box_open_afternm=I.Xa,k._crypto_box=I.Ya,k._crypto_box_open=I.Za,k._crypto_box_detached_afternm=I._a,k._crypto_box_detached=I.$a,k._crypto_box_easy_afternm=I.ab,k._crypto_box_easy=I.bb,k._crypto_box_open_detached_afternm=I.cb,k._crypto_box_open_detached=I.db,k._crypto_box_open_easy_afternm=I.eb,k._crypto_box_open_easy=I.fb,k._crypto_box_seal=I.gb,k._crypto_box_seal_open=I.hb,k._crypto_box_sealbytes=I.ib,k._crypto_box_curve25519xsalsa20poly1305_seed_keypair=I.jb,k._crypto_box_curve25519xsalsa20poly1305_keypair=I.kb,k._crypto_box_curve25519xsalsa20poly1305_beforenm=I.lb,k._crypto_box_curve25519xsalsa20poly1305_afternm=I.mb,k._crypto_box_curve25519xsalsa20poly1305_open_afternm=I.nb,k._crypto_box_curve25519xsalsa20poly1305=I.ob,k._crypto_box_curve25519xsalsa20poly1305_open=I.pb,k._crypto_box_curve25519xsalsa20poly1305_seedbytes=I.qb,k._crypto_box_curve25519xsalsa20poly1305_publickeybytes=I.rb,k._crypto_box_curve25519xsalsa20poly1305_secretkeybytes=I.sb,k._crypto_box_curve25519xsalsa20poly1305_beforenmbytes=I.tb,k._crypto_box_curve25519xsalsa20poly1305_noncebytes=I.ub,k._crypto_box_curve25519xsalsa20poly1305_zerobytes=I.vb,k._crypto_box_curve25519xsalsa20poly1305_boxzerobytes=I.wb,k._crypto_box_curve25519xsalsa20poly1305_macbytes=I.xb,k._crypto_box_curve25519xsalsa20poly1305_messagebytes_max=I.yb,k._crypto_core_hchacha20=I.zb,k._crypto_core_hchacha20_outputbytes=I.Ab,k._crypto_core_hchacha20_inputbytes=I.Bb,k._crypto_core_hchacha20_keybytes=I.Cb,k._crypto_core_hchacha20_constbytes=I.Db,k._crypto_core_hsalsa20=I.Eb,k._crypto_core_hsalsa20_outputbytes=I.Fb,k._crypto_core_hsalsa20_inputbytes=I.Gb,k._crypto_core_hsalsa20_keybytes=I.Hb,k._crypto_core_hsalsa20_constbytes=I.Ib,k._crypto_core_salsa20=I.Jb,k._crypto_core_salsa20_outputbytes=I.Kb,k._crypto_core_salsa20_inputbytes=I.Lb,k._crypto_core_salsa20_keybytes=I.Mb,k._crypto_core_salsa20_constbytes=I.Nb,k._crypto_core_salsa2012=I.Ob,k._crypto_core_salsa2012_outputbytes=I.Pb,k._crypto_core_salsa2012_inputbytes=I.Qb,k._crypto_core_salsa2012_keybytes=I.Rb,k._crypto_core_salsa2012_constbytes=I.Sb,k._crypto_core_salsa208=I.Tb,k._crypto_core_salsa208_outputbytes=I.Ub,k._crypto_core_salsa208_inputbytes=I.Vb,k._crypto_core_salsa208_keybytes=I.Wb,k._crypto_core_salsa208_constbytes=I.Xb,k._crypto_generichash_bytes_min=I.Yb,k._crypto_generichash_bytes_max=I.Zb,k._crypto_generichash_bytes=I._b,k._crypto_generichash_keybytes_min=I.$b,k._crypto_generichash_keybytes_max=I.ac,k._crypto_generichash_keybytes=I.bc,k._crypto_generichash_primitive=I.cc,k._crypto_generichash_statebytes=I.dc,k._crypto_generichash=I.ec,k._crypto_generichash_init=I.fc,k._crypto_generichash_update=I.gc,k._crypto_generichash_final=I.hc,k._crypto_generichash_keygen=I.ic,k._crypto_generichash_blake2b_bytes_min=I.jc,k._crypto_generichash_blake2b_bytes_max=I.kc,k._crypto_generichash_blake2b_bytes=I.lc,k._crypto_generichash_blake2b_keybytes_min=I.mc,k._crypto_generichash_blake2b_keybytes_max=I.nc,k._crypto_generichash_blake2b_keybytes=I.oc,k._crypto_generichash_blake2b_saltbytes=I.pc,k._crypto_generichash_blake2b_personalbytes=I.qc,k._crypto_generichash_blake2b_statebytes=I.rc,k._crypto_generichash_blake2b_keygen=I.sc,k._crypto_generichash_blake2b=I.tc,k._crypto_generichash_blake2b_salt_personal=I.uc,k._crypto_generichash_blake2b_init=I.vc,k._crypto_generichash_blake2b_init_salt_personal=I.wc,k._crypto_generichash_blake2b_update=I.xc,k._crypto_generichash_blake2b_final=I.yc,k._crypto_hash_bytes=I.zc,k._crypto_hash=I.Ac,k._crypto_hash_primitive=I.Bc,k._crypto_hash_sha256_bytes=I.Cc,k._crypto_hash_sha256_statebytes=I.Dc,k._crypto_hash_sha256_init=I.Ec,k._crypto_hash_sha256_update=I.Fc,k._crypto_hash_sha256_final=I.Gc,k._crypto_hash_sha256=I.Hc,k._crypto_hash_sha512_bytes=I.Ic,k._crypto_hash_sha512_statebytes=I.Jc,k._crypto_hash_sha512_init=I.Kc,k._crypto_hash_sha512_update=I.Lc,k._crypto_hash_sha512_final=I.Mc,k._crypto_hash_sha512=I.Nc,k._crypto_kdf_blake2b_bytes_min=I.Oc,k._crypto_kdf_blake2b_bytes_max=I.Pc,k._crypto_kdf_blake2b_contextbytes=I.Qc,k._crypto_kdf_blake2b_keybytes=I.Rc,k._crypto_kdf_blake2b_derive_from_key=I.Sc,k._crypto_kdf_primitive=I.Tc,k._crypto_kdf_bytes_min=I.Uc,k._crypto_kdf_bytes_max=I.Vc,k._crypto_kdf_contextbytes=I.Wc,k._crypto_kdf_keybytes=I.Xc,k._crypto_kdf_derive_from_key=I.Yc,k._crypto_kdf_keygen=I.Zc,k._crypto_kdf_hkdf_sha256_extract_init=I._c,k._crypto_kdf_hkdf_sha256_extract_update=I.$c,k._crypto_kdf_hkdf_sha256_extract_final=I.ad,k._crypto_kdf_hkdf_sha256_extract=I.bd,k._crypto_kdf_hkdf_sha256_keygen=I.cd,k._crypto_kdf_hkdf_sha256_expand=I.dd,k._crypto_kdf_hkdf_sha256_keybytes=I.ed,k._crypto_kdf_hkdf_sha256_bytes_min=I.fd,k._crypto_kdf_hkdf_sha256_bytes_max=I.gd,k._crypto_kdf_hkdf_sha256_statebytes=I.hd,k._crypto_kdf_hkdf_sha512_extract_init=I.id,k._crypto_kdf_hkdf_sha512_extract_update=I.jd,k._crypto_kdf_hkdf_sha512_extract_final=I.kd,k._crypto_kdf_hkdf_sha512_extract=I.ld,k._crypto_kdf_hkdf_sha512_keygen=I.md,k._crypto_kdf_hkdf_sha512_expand=I.nd,k._crypto_kdf_hkdf_sha512_keybytes=I.od,k._crypto_kdf_hkdf_sha512_bytes_min=I.pd,k._crypto_kdf_hkdf_sha512_bytes_max=I.qd,k._crypto_kdf_hkdf_sha512_statebytes=I.rd,k._crypto_kx_seed_keypair=I.sd,k._crypto_kx_keypair=I.td,k._crypto_kx_client_session_keys=I.ud,k._crypto_kx_server_session_keys=I.vd,k._crypto_kx_publickeybytes=I.wd,k._crypto_kx_secretkeybytes=I.xd,k._crypto_kx_seedbytes=I.yd,k._crypto_kx_sessionkeybytes=I.zd,k._crypto_kx_primitive=I.Ad,k._crypto_onetimeauth_statebytes=I.Bd,k._crypto_onetimeauth_bytes=I.Cd,k._crypto_onetimeauth_keybytes=I.Dd,k._crypto_onetimeauth=I.Ed,k._crypto_onetimeauth_verify=I.Fd,k._crypto_onetimeauth_init=I.Gd,k._crypto_onetimeauth_update=I.Hd,k._crypto_onetimeauth_final=I.Id,k._crypto_onetimeauth_primitive=I.Jd,k._crypto_onetimeauth_keygen=I.Kd,k._crypto_onetimeauth_poly1305=I.Ld,k._crypto_onetimeauth_poly1305_verify=I.Md,k._crypto_onetimeauth_poly1305_init=I.Nd,k._crypto_onetimeauth_poly1305_update=I.Od,k._crypto_onetimeauth_poly1305_final=I.Pd,k._crypto_onetimeauth_poly1305_bytes=I.Qd,k._crypto_onetimeauth_poly1305_keybytes=I.Rd,k._crypto_onetimeauth_poly1305_statebytes=I.Sd,k._crypto_onetimeauth_poly1305_keygen=I.Td,k._crypto_pwhash_argon2i_alg_argon2i13=I.Ud,k._crypto_pwhash_argon2i_bytes_min=I.Vd,k._crypto_pwhash_argon2i_bytes_max=I.Wd,k._crypto_pwhash_argon2i_passwd_min=I.Xd,k._crypto_pwhash_argon2i_passwd_max=I.Yd,k._crypto_pwhash_argon2i_saltbytes=I.Zd,k._crypto_pwhash_argon2i_strbytes=I._d,k._crypto_pwhash_argon2i_strprefix=I.$d,k._crypto_pwhash_argon2i_opslimit_min=I.ae,k._crypto_pwhash_argon2i_opslimit_max=I.be,k._crypto_pwhash_argon2i_memlimit_min=I.ce,k._crypto_pwhash_argon2i_memlimit_max=I.de,k._crypto_pwhash_argon2i_opslimit_interactive=I.ee,k._crypto_pwhash_argon2i_memlimit_interactive=I.fe,k._crypto_pwhash_argon2i_opslimit_moderate=I.ge,k._crypto_pwhash_argon2i_memlimit_moderate=I.he,k._crypto_pwhash_argon2i_opslimit_sensitive=I.ie,k._crypto_pwhash_argon2i_memlimit_sensitive=I.je,k._crypto_pwhash_argon2i=I.ke,k._crypto_pwhash_argon2i_str=I.le,k._crypto_pwhash_argon2i_str_verify=I.me,k._crypto_pwhash_argon2i_str_needs_rehash=I.ne,k._crypto_pwhash_argon2id_str_needs_rehash=I.oe,k._crypto_pwhash_argon2id_alg_argon2id13=I.pe,k._crypto_pwhash_argon2id_bytes_min=I.qe,k._crypto_pwhash_argon2id_bytes_max=I.re,k._crypto_pwhash_argon2id_passwd_min=I.se,k._crypto_pwhash_argon2id_passwd_max=I.te,k._crypto_pwhash_argon2id_saltbytes=I.ue,k._crypto_pwhash_argon2id_strbytes=I.ve,k._crypto_pwhash_argon2id_strprefix=I.we,k._crypto_pwhash_argon2id_opslimit_min=I.xe,k._crypto_pwhash_argon2id_opslimit_max=I.ye,k._crypto_pwhash_argon2id_memlimit_min=I.ze,k._crypto_pwhash_argon2id_memlimit_max=I.Ae,k._crypto_pwhash_argon2id_opslimit_interactive=I.Be,k._crypto_pwhash_argon2id_memlimit_interactive=I.Ce,k._crypto_pwhash_argon2id_opslimit_moderate=I.De,k._crypto_pwhash_argon2id_memlimit_moderate=I.Ee,k._crypto_pwhash_argon2id_opslimit_sensitive=I.Fe,k._crypto_pwhash_argon2id_memlimit_sensitive=I.Ge,k._crypto_pwhash_argon2id=I.He,k._crypto_pwhash_argon2id_str=I.Ie,k._crypto_pwhash_argon2id_str_verify=I.Je,k._crypto_pwhash_alg_argon2i13=I.Ke,k._crypto_pwhash_alg_argon2id13=I.Le,k._crypto_pwhash_alg_default=I.Me,k._crypto_pwhash_bytes_min=I.Ne,k._crypto_pwhash_bytes_max=I.Oe,k._crypto_pwhash_passwd_min=I.Pe,k._crypto_pwhash_passwd_max=I.Qe,k._crypto_pwhash_saltbytes=I.Re,k._crypto_pwhash_strbytes=I.Se,k._crypto_pwhash_strprefix=I.Te,k._crypto_pwhash_opslimit_min=I.Ue,k._crypto_pwhash_opslimit_max=I.Ve,k._crypto_pwhash_memlimit_min=I.We,k._crypto_pwhash_memlimit_max=I.Xe,k._crypto_pwhash_opslimit_interactive=I.Ye,k._crypto_pwhash_memlimit_interactive=I.Ze,k._crypto_pwhash_opslimit_moderate=I._e,k._crypto_pwhash_memlimit_moderate=I.$e,k._crypto_pwhash_opslimit_sensitive=I.af,k._crypto_pwhash_memlimit_sensitive=I.bf,k._crypto_pwhash=I.cf,k._crypto_pwhash_str=I.df,k._crypto_pwhash_str_alg=I.ef,k._crypto_pwhash_str_verify=I.ff,k._crypto_pwhash_str_needs_rehash=I.gf,k._crypto_pwhash_primitive=I.hf,k._crypto_scalarmult_primitive=I.jf,k._crypto_scalarmult_base=I.kf,k._crypto_scalarmult=I.lf,k._crypto_scalarmult_bytes=I.mf,k._crypto_scalarmult_scalarbytes=I.nf,k._crypto_scalarmult_curve25519=I.of,k._crypto_scalarmult_curve25519_base=I.pf,k._crypto_scalarmult_curve25519_bytes=I.qf,k._crypto_scalarmult_curve25519_scalarbytes=I.rf,k._crypto_secretbox_keybytes=I.sf,k._crypto_secretbox_noncebytes=I.tf,k._crypto_secretbox_zerobytes=I.uf,k._crypto_secretbox_boxzerobytes=I.vf,k._crypto_secretbox_macbytes=I.wf,k._crypto_secretbox_messagebytes_max=I.xf,k._crypto_secretbox_primitive=I.yf,k._crypto_secretbox=I.zf,k._crypto_secretbox_open=I.Af,k._crypto_secretbox_keygen=I.Bf,k._crypto_secretbox_detached=I.Cf,k._crypto_secretbox_easy=I.Df,k._crypto_secretbox_open_detached=I.Ef,k._crypto_secretbox_open_easy=I.Ff,k._crypto_secretbox_xsalsa20poly1305=I.Gf,k._crypto_secretbox_xsalsa20poly1305_open=I.Hf,k._crypto_secretbox_xsalsa20poly1305_keybytes=I.If,k._crypto_secretbox_xsalsa20poly1305_noncebytes=I.Jf,k._crypto_secretbox_xsalsa20poly1305_zerobytes=I.Kf,k._crypto_secretbox_xsalsa20poly1305_boxzerobytes=I.Lf,k._crypto_secretbox_xsalsa20poly1305_macbytes=I.Mf,k._crypto_secretbox_xsalsa20poly1305_messagebytes_max=I.Nf,k._crypto_secretbox_xsalsa20poly1305_keygen=I.Of,k._crypto_secretstream_xchacha20poly1305_keygen=I.Pf,k._crypto_secretstream_xchacha20poly1305_init_push=I.Qf,k._crypto_secretstream_xchacha20poly1305_init_pull=I.Rf,k._crypto_secretstream_xchacha20poly1305_rekey=I.Sf,k._crypto_secretstream_xchacha20poly1305_push=I.Tf,k._crypto_secretstream_xchacha20poly1305_pull=I.Uf,k._crypto_secretstream_xchacha20poly1305_statebytes=I.Vf,k._crypto_secretstream_xchacha20poly1305_abytes=I.Wf,k._crypto_secretstream_xchacha20poly1305_headerbytes=I.Xf,k._crypto_secretstream_xchacha20poly1305_keybytes=I.Yf,k._crypto_secretstream_xchacha20poly1305_messagebytes_max=I.Zf,k._crypto_secretstream_xchacha20poly1305_tag_message=I._f,k._crypto_secretstream_xchacha20poly1305_tag_push=I.$f,k._crypto_secretstream_xchacha20poly1305_tag_rekey=I.ag,k._crypto_secretstream_xchacha20poly1305_tag_final=I.bg,k._crypto_shorthash_bytes=I.cg,k._crypto_shorthash_keybytes=I.dg,k._crypto_shorthash_primitive=I.eg,k._crypto_shorthash=I.fg,k._crypto_shorthash_keygen=I.gg,k._crypto_shorthash_siphash24_bytes=I.hg,k._crypto_shorthash_siphash24_keybytes=I.ig,k._crypto_shorthash_siphash24=I.jg,k._crypto_sign_statebytes=I.kg,k._crypto_sign_bytes=I.lg,k._crypto_sign_seedbytes=I.mg,k._crypto_sign_publickeybytes=I.ng,k._crypto_sign_secretkeybytes=I.og,k._crypto_sign_messagebytes_max=I.pg,k._crypto_sign_primitive=I.qg,k._crypto_sign_seed_keypair=I.rg,k._crypto_sign_keypair=I.sg,k._crypto_sign=I.tg,k._crypto_sign_open=I.ug,k._crypto_sign_detached=I.vg,k._crypto_sign_verify_detached=I.wg,k._crypto_sign_init=I.xg,k._crypto_sign_update=I.yg,k._crypto_sign_final_create=I.zg,k._crypto_sign_final_verify=I.Ag,k._crypto_sign_ed25519ph_statebytes=I.Bg,k._crypto_sign_ed25519_bytes=I.Cg,k._crypto_sign_ed25519_seedbytes=I.Dg,k._crypto_sign_ed25519_publickeybytes=I.Eg,k._crypto_sign_ed25519_secretkeybytes=I.Fg,k._crypto_sign_ed25519_messagebytes_max=I.Gg,k._crypto_sign_ed25519_sk_to_seed=I.Hg,k._crypto_sign_ed25519_sk_to_pk=I.Ig,k._crypto_sign_ed25519ph_init=I.Jg,k._crypto_sign_ed25519ph_update=I.Kg,k._crypto_sign_ed25519ph_final_create=I.Lg,k._crypto_sign_ed25519ph_final_verify=I.Mg,k._crypto_sign_ed25519_seed_keypair=I.Ng,k._crypto_sign_ed25519_keypair=I.Og,k._crypto_sign_ed25519_pk_to_curve25519=I.Pg,k._crypto_sign_ed25519_sk_to_curve25519=I.Qg,k._crypto_sign_ed25519_verify_detached=I.Rg,k._crypto_sign_ed25519_open=I.Sg,k._crypto_sign_ed25519_detached=I.Tg,k._crypto_sign_ed25519=I.Ug,k._crypto_stream_chacha20_keybytes=I.Vg,k._crypto_stream_chacha20_noncebytes=I.Wg,k._crypto_stream_chacha20_messagebytes_max=I.Xg,k._crypto_stream_chacha20_ietf_keybytes=I.Yg,k._crypto_stream_chacha20_ietf_noncebytes=I.Zg,k._crypto_stream_chacha20_ietf_messagebytes_max=I._g,k._crypto_stream_chacha20=I.$g,k._crypto_stream_chacha20_xor_ic=I.ah,k._crypto_stream_chacha20_xor=I.bh,k._crypto_stream_chacha20_ietf=I.ch,k._crypto_stream_chacha20_ietf_xor_ic=I.dh,k._crypto_stream_chacha20_ietf_xor=I.eh,k._crypto_stream_chacha20_ietf_keygen=I.fh,k._crypto_stream_chacha20_keygen=I.gh,k._crypto_stream_keybytes=I.hh,k._crypto_stream_noncebytes=I.ih,k._crypto_stream_messagebytes_max=I.jh,k._crypto_stream_primitive=I.kh,k._crypto_stream=I.lh,k._crypto_stream_xor=I.mh,k._crypto_stream_keygen=I.nh,k._crypto_stream_salsa20_keybytes=I.oh,k._crypto_stream_salsa20_noncebytes=I.ph,k._crypto_stream_salsa20_messagebytes_max=I.qh,k._crypto_stream_salsa20=I.rh,k._crypto_stream_salsa20_xor_ic=I.sh,k._crypto_stream_salsa20_xor=I.th,k._crypto_stream_salsa20_keygen=I.uh,k._crypto_stream_xsalsa20=I.vh,k._crypto_stream_xsalsa20_xor_ic=I.wh,k._crypto_stream_xsalsa20_xor=I.xh,k._crypto_stream_xsalsa20_keybytes=I.yh,k._crypto_stream_xsalsa20_noncebytes=I.zh,k._crypto_stream_xsalsa20_messagebytes_max=I.Ah,k._crypto_stream_xsalsa20_keygen=I.Bh,k._crypto_verify_16_bytes=I.Ch,k._crypto_verify_32_bytes=I.Dh,k._crypto_verify_64_bytes=I.Eh,k._crypto_verify_16=I.Fh,k._crypto_verify_32=I.Gh,k._crypto_verify_64=I.Hh,k._randombytes_implementation_name=I.Ih,k._randombytes_random=I.Jh,k._randombytes_stir=I.Kh,k._randombytes_uniform=I.Lh,k._randombytes_buf=I.Mh,k._randombytes_buf_deterministic=I.Nh,k._randombytes_seedbytes=I.Oh,k._randombytes_close=I.Ph,k._randombytes=I.Qh,k._sodium_bin2hex=I.Rh,k._sodium_hex2bin=I.Sh,k._sodium_base64_encoded_len=I.Th,k._sodium_bin2base64=I.Uh,k._sodium_base642bin=I.Vh,k._sodium_init=I.Wh,k._sodium_pad=I.Xh,k._sodium_unpad=I.Yh,k._sodium_version_string=I.Zh,k._sodium_library_version_major=I._h,k._sodium_library_version_minor=I.$h,k._sodium_library_minimal=I.ai,k._crypto_box_curve25519xchacha20poly1305_seed_keypair=I.bi,k._crypto_box_curve25519xchacha20poly1305_keypair=I.ci,k._crypto_box_curve25519xchacha20poly1305_beforenm=I.di,k._crypto_box_curve25519xchacha20poly1305_detached_afternm=I.ei,k._crypto_box_curve25519xchacha20poly1305_detached=I.fi,k._crypto_box_curve25519xchacha20poly1305_easy_afternm=I.gi,k._crypto_box_curve25519xchacha20poly1305_easy=I.hi,k._crypto_box_curve25519xchacha20poly1305_open_detached_afternm=I.ii,k._crypto_box_curve25519xchacha20poly1305_open_detached=I.ji,k._crypto_box_curve25519xchacha20poly1305_open_easy_afternm=I.ki,k._crypto_box_curve25519xchacha20poly1305_open_easy=I.li,k._crypto_box_curve25519xchacha20poly1305_seedbytes=I.mi,k._crypto_box_curve25519xchacha20poly1305_publickeybytes=I.ni,k._crypto_box_curve25519xchacha20poly1305_secretkeybytes=I.oi,k._crypto_box_curve25519xchacha20poly1305_beforenmbytes=I.pi,k._crypto_box_curve25519xchacha20poly1305_noncebytes=I.qi,k._crypto_box_curve25519xchacha20poly1305_macbytes=I.ri,k._crypto_box_curve25519xchacha20poly1305_messagebytes_max=I.si,k._crypto_box_curve25519xchacha20poly1305_seal=I.ti,k._crypto_box_curve25519xchacha20poly1305_seal_open=I.ui,k._crypto_box_curve25519xchacha20poly1305_sealbytes=I.vi,k._crypto_core_ed25519_is_valid_point=I.wi,k._crypto_core_ed25519_add=I.xi,k._crypto_core_ed25519_sub=I.yi,k._crypto_core_ed25519_from_uniform=I.zi,k._crypto_core_ed25519_random=I.Ai,k._crypto_core_ed25519_scalar_random=I.Bi,k._crypto_core_ed25519_scalar_invert=I.Ci,k._crypto_core_ed25519_scalar_negate=I.Di,k._crypto_core_ed25519_scalar_complement=I.Ei,k._crypto_core_ed25519_scalar_add=I.Fi,k._crypto_core_ed25519_scalar_reduce=I.Gi,k._crypto_core_ed25519_scalar_sub=I.Hi,k._crypto_core_ed25519_scalar_mul=I.Ii,k._crypto_core_ed25519_bytes=I.Ji,k._crypto_core_ed25519_nonreducedscalarbytes=I.Ki,k._crypto_core_ed25519_uniformbytes=I.Li,k._crypto_core_ed25519_hashbytes=I.Mi,k._crypto_core_ed25519_scalarbytes=I.Ni,k._crypto_core_ristretto255_is_valid_point=I.Oi,k._crypto_core_ristretto255_add=I.Pi,k._crypto_core_ristretto255_sub=I.Qi,k._crypto_core_ristretto255_from_hash=I.Ri,k._crypto_core_ristretto255_random=I.Si,k._crypto_core_ristretto255_scalar_random=I.Ti,k._crypto_core_ristretto255_scalar_invert=I.Ui,k._crypto_core_ristretto255_scalar_negate=I.Vi,k._crypto_core_ristretto255_scalar_complement=I.Wi,k._crypto_core_ristretto255_scalar_add=I.Xi,k._crypto_core_ristretto255_scalar_sub=I.Yi,k._crypto_core_ristretto255_scalar_mul=I.Zi,k._crypto_core_ristretto255_scalar_reduce=I._i,k._crypto_core_ristretto255_bytes=I.$i,k._crypto_core_ristretto255_nonreducedscalarbytes=I.aj,k._crypto_core_ristretto255_hashbytes=I.bj,k._crypto_core_ristretto255_scalarbytes=I.cj,k._crypto_pwhash_scryptsalsa208sha256_ll=I.dj,k._crypto_pwhash_scryptsalsa208sha256_bytes_min=I.ej,k._crypto_pwhash_scryptsalsa208sha256_bytes_max=I.fj,k._crypto_pwhash_scryptsalsa208sha256_passwd_min=I.gj,k._crypto_pwhash_scryptsalsa208sha256_passwd_max=I.hj,k._crypto_pwhash_scryptsalsa208sha256_saltbytes=I.ij,k._crypto_pwhash_scryptsalsa208sha256_strbytes=I.jj,k._crypto_pwhash_scryptsalsa208sha256_strprefix=I.kj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_min=I.lj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_max=I.mj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_min=I.nj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_max=I.oj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_interactive=I.pj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_interactive=I.qj,k._crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive=I.rj,k._crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive=I.sj,k._crypto_pwhash_scryptsalsa208sha256=I.tj,k._crypto_pwhash_scryptsalsa208sha256_str=I.uj,k._crypto_pwhash_scryptsalsa208sha256_str_verify=I.vj,k._crypto_pwhash_scryptsalsa208sha256_str_needs_rehash=I.wj,k._crypto_scalarmult_ed25519=I.xj,k._crypto_scalarmult_ed25519_noclamp=I.yj,k._crypto_scalarmult_ed25519_base=I.zj,k._crypto_scalarmult_ed25519_base_noclamp=I.Aj,k._crypto_scalarmult_ed25519_bytes=I.Bj,k._crypto_scalarmult_ed25519_scalarbytes=I.Cj,k._crypto_scalarmult_ristretto255=I.Dj,k._crypto_scalarmult_ristretto255_base=I.Ej,k._crypto_scalarmult_ristretto255_bytes=I.Fj,k._crypto_scalarmult_ristretto255_scalarbytes=I.Gj,k._crypto_secretbox_xchacha20poly1305_detached=I.Hj,k._crypto_secretbox_xchacha20poly1305_easy=I.Ij,k._crypto_secretbox_xchacha20poly1305_open_detached=I.Jj,k._crypto_secretbox_xchacha20poly1305_open_easy=I.Kj,k._crypto_secretbox_xchacha20poly1305_keybytes=I.Lj,k._crypto_secretbox_xchacha20poly1305_noncebytes=I.Mj,k._crypto_secretbox_xchacha20poly1305_macbytes=I.Nj,k._crypto_secretbox_xchacha20poly1305_messagebytes_max=I.Oj,k._crypto_shorthash_siphashx24_bytes=I.Pj,k._crypto_shorthash_siphashx24_keybytes=I.Qj,k._crypto_shorthash_siphashx24=I.Rj,k._crypto_stream_salsa2012=I.Sj,k._crypto_stream_salsa2012_xor=I.Tj,k._crypto_stream_salsa2012_keybytes=I.Uj,k._crypto_stream_salsa2012_noncebytes=I.Vj,k._crypto_stream_salsa2012_messagebytes_max=I.Wj,k._crypto_stream_salsa2012_keygen=I.Xj,k._crypto_stream_salsa208=I.Yj,k._crypto_stream_salsa208_xor=I.Zj,k._crypto_stream_salsa208_keybytes=I._j,k._crypto_stream_salsa208_noncebytes=I.$j,k._crypto_stream_salsa208_messagebytes_max=I.ak,k._crypto_stream_salsa208_keygen=I.bk,k._crypto_stream_xchacha20_keybytes=I.ck,k._crypto_stream_xchacha20_noncebytes=I.dk,k._crypto_stream_xchacha20_messagebytes_max=I.ek,k._crypto_stream_xchacha20=I.fk,k._crypto_stream_xchacha20_xor_ic=I.gk,k._crypto_stream_xchacha20_xor=I.hk,k._crypto_stream_xchacha20_keygen=I.ik,k._malloc=I.jk,k._free=I.kk,I.dynCall_iiiji,I.dynCall_iiij,I.dynCall_iijii,I.dynCall_iiijiji,I.dynCall_iiijiii,C6=I.e,I.__indirect_function_table}var ut={b:I6,c:nt,a:_t,d:yt};function pA(){if(u1>0){f1=pA;return}if(S2(),u1>0){f1=pA;return}function I(){k.calledRun=!0,!e0&&(k.onRuntimeInitialized?.(),s1())}k.setStatus?(k.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>k.setStatus(""),1),I()},1)):I()}var jA;$1(),pA()}).catch(function(){return Er.useBackupModule()});var e4=D1;let X;const f2={},S3=e4.ready.then(function(){function a(){if(X._sodium_init()<0)throw new Error("libsodium was not correctly initialized.");for(var S=["crypto_aead_aegis128l_decrypt","crypto_aead_aegis128l_decrypt_detached","crypto_aead_aegis128l_encrypt","crypto_aead_aegis128l_encrypt_detached","crypto_aead_aegis128l_keygen","crypto_aead_aegis256_decrypt","crypto_aead_aegis256_decrypt_detached","crypto_aead_aegis256_encrypt","crypto_aead_aegis256_encrypt_detached","crypto_aead_aegis256_keygen","crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_final","crypto_auth_hmacsha256_init","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_update","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512256","crypto_auth_hmacsha512256_final","crypto_auth_hmacsha512256_init","crypto_auth_hmacsha512256_keygen","crypto_auth_hmacsha512256_update","crypto_auth_hmacsha512256_verify","crypto_auth_hmacsha512_final","crypto_auth_hmacsha512_init","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_update","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_beforenm","crypto_box_curve25519xchacha20poly1305_detached","crypto_box_curve25519xchacha20poly1305_detached_afternm","crypto_box_curve25519xchacha20poly1305_easy","crypto_box_curve25519xchacha20poly1305_easy_afternm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_open_detached","crypto_box_curve25519xchacha20poly1305_open_detached_afternm","crypto_box_curve25519xchacha20poly1305_open_easy","crypto_box_curve25519xchacha20poly1305_open_easy_afternm","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_curve25519xchacha20poly1305_seed_keypair","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_hchacha20","crypto_core_hsalsa20","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_version_string"],F=[C3,H3,Y3,Q3,G3,L3,X3,d3,R3,F3,K3,N3,O3,U3,x3,V3,z3,$3,Z3,W3,J3,E3,b3,ri,Ai,ni,ei,ti,_i,ii,si,oi,yi,Bi,hi,ui,li,pi,ji,ki,vi,fi,ai,gi,ci,qi,Pi,Ti,wi,mi,Di,Mi,Si,Ii,Ci,Hi,Yi,Qi,Gi,Li,Xi,di,Ri,Fi,Ki,Ni,Oi,Ui,xi,Vi,zi,$i,Zi,Wi,Ji,Ei,bi,r7,A7,n7,e7,t7,_7,i7,s7,o7,y7,B7,h7,u7,l7,p7,j7,k7,v7,f7,a7,g7,c7,q7,P7,T7,w7,m7,D7,M7,S7,I7,C7,H7,Y7,Q7,G7,L7,X7,d7,R7,F7,K7,N7,O7,U7,x7,V7,z7,$7,Z7,W7,J7,E7,b7,rs,As,ns,es,ts,_s,is,ss,os,ys,Bs,hs,us,ls,ps,js,ks,vs,fs,as,gs,cs,qs,Ps,Ts,ws,ms,Ds,Ms,Ss,Is,Cs,Hs,Ys,Qs,Gs,Ls,Xs,ds,Rs,Fs,Ks,Ns,Os,Us,xs,Vs,zs,$s,Zs,Ws,Js,Es,bs,ro,Ao,no],V=0;V<F.length;V++)typeof X["_"+S[V]]=="function"&&(f2[S[V]]=F[V]);var E=["SODIUM_LIBRARY_VERSION_MAJOR","SODIUM_LIBRARY_VERSION_MINOR","crypto_aead_aegis128l_ABYTES","crypto_aead_aegis128l_KEYBYTES","crypto_aead_aegis128l_MESSAGEBYTES_MAX","crypto_aead_aegis128l_NPUBBYTES","crypto_aead_aegis128l_NSECBYTES","crypto_aead_aegis256_ABYTES","crypto_aead_aegis256_KEYBYTES","crypto_aead_aegis256_MESSAGEBYTES_MAX","crypto_aead_aegis256_NPUBBYTES","crypto_aead_aegis256_NSECBYTES","crypto_aead_aes256gcm_ABYTES","crypto_aead_aes256gcm_KEYBYTES","crypto_aead_aes256gcm_MESSAGEBYTES_MAX","crypto_aead_aes256gcm_NPUBBYTES","crypto_aead_aes256gcm_NSECBYTES","crypto_aead_chacha20poly1305_ABYTES","crypto_aead_chacha20poly1305_IETF_ABYTES","crypto_aead_chacha20poly1305_IETF_KEYBYTES","crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_IETF_NPUBBYTES","crypto_aead_chacha20poly1305_IETF_NSECBYTES","crypto_aead_chacha20poly1305_KEYBYTES","crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_NPUBBYTES","crypto_aead_chacha20poly1305_NSECBYTES","crypto_aead_chacha20poly1305_ietf_ABYTES","crypto_aead_chacha20poly1305_ietf_KEYBYTES","crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_ietf_NPUBBYTES","crypto_aead_chacha20poly1305_ietf_NSECBYTES","crypto_aead_xchacha20poly1305_IETF_ABYTES","crypto_aead_xchacha20poly1305_IETF_KEYBYTES","crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_IETF_NPUBBYTES","crypto_aead_xchacha20poly1305_IETF_NSECBYTES","crypto_aead_xchacha20poly1305_ietf_ABYTES","crypto_aead_xchacha20poly1305_ietf_KEYBYTES","crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_ietf_NPUBBYTES","crypto_aead_xchacha20poly1305_ietf_NSECBYTES","crypto_auth_BYTES","crypto_auth_KEYBYTES","crypto_auth_hmacsha256_BYTES","crypto_auth_hmacsha256_KEYBYTES","crypto_auth_hmacsha512256_BYTES","crypto_auth_hmacsha512256_KEYBYTES","crypto_auth_hmacsha512_BYTES","crypto_auth_hmacsha512_KEYBYTES","crypto_box_BEFORENMBYTES","crypto_box_MACBYTES","crypto_box_MESSAGEBYTES_MAX","crypto_box_NONCEBYTES","crypto_box_PUBLICKEYBYTES","crypto_box_SEALBYTES","crypto_box_SECRETKEYBYTES","crypto_box_SEEDBYTES","crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES","crypto_box_curve25519xchacha20poly1305_MACBYTES","crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xchacha20poly1305_NONCEBYTES","crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEALBYTES","crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEEDBYTES","crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES","crypto_box_curve25519xsalsa20poly1305_MACBYTES","crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xsalsa20poly1305_NONCEBYTES","crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SEEDBYTES","crypto_core_ed25519_BYTES","crypto_core_ed25519_HASHBYTES","crypto_core_ed25519_NONREDUCEDSCALARBYTES","crypto_core_ed25519_SCALARBYTES","crypto_core_ed25519_UNIFORMBYTES","crypto_core_hchacha20_CONSTBYTES","crypto_core_hchacha20_INPUTBYTES","crypto_core_hchacha20_KEYBYTES","crypto_core_hchacha20_OUTPUTBYTES","crypto_core_hsalsa20_CONSTBYTES","crypto_core_hsalsa20_INPUTBYTES","crypto_core_hsalsa20_KEYBYTES","crypto_core_hsalsa20_OUTPUTBYTES","crypto_core_ristretto255_BYTES","crypto_core_ristretto255_HASHBYTES","crypto_core_ristretto255_NONREDUCEDSCALARBYTES","crypto_core_ristretto255_SCALARBYTES","crypto_core_salsa2012_CONSTBYTES","crypto_core_salsa2012_INPUTBYTES","crypto_core_salsa2012_KEYBYTES","crypto_core_salsa2012_OUTPUTBYTES","crypto_core_salsa208_CONSTBYTES","crypto_core_salsa208_INPUTBYTES","crypto_core_salsa208_KEYBYTES","crypto_core_salsa208_OUTPUTBYTES","crypto_core_salsa20_CONSTBYTES","crypto_core_salsa20_INPUTBYTES","crypto_core_salsa20_KEYBYTES","crypto_core_salsa20_OUTPUTBYTES","crypto_generichash_BYTES","crypto_generichash_BYTES_MAX","crypto_generichash_BYTES_MIN","crypto_generichash_KEYBYTES","crypto_generichash_KEYBYTES_MAX","crypto_generichash_KEYBYTES_MIN","crypto_generichash_blake2b_BYTES","crypto_generichash_blake2b_BYTES_MAX","crypto_generichash_blake2b_BYTES_MIN","crypto_generichash_blake2b_KEYBYTES","crypto_generichash_blake2b_KEYBYTES_MAX","crypto_generichash_blake2b_KEYBYTES_MIN","crypto_generichash_blake2b_PERSONALBYTES","crypto_generichash_blake2b_SALTBYTES","crypto_hash_BYTES","crypto_hash_sha256_BYTES","crypto_hash_sha512_BYTES","crypto_kdf_BYTES_MAX","crypto_kdf_BYTES_MIN","crypto_kdf_CONTEXTBYTES","crypto_kdf_KEYBYTES","crypto_kdf_blake2b_BYTES_MAX","crypto_kdf_blake2b_BYTES_MIN","crypto_kdf_blake2b_CONTEXTBYTES","crypto_kdf_blake2b_KEYBYTES","crypto_kdf_hkdf_sha256_BYTES_MAX","crypto_kdf_hkdf_sha256_BYTES_MIN","crypto_kdf_hkdf_sha256_KEYBYTES","crypto_kdf_hkdf_sha512_BYTES_MAX","crypto_kdf_hkdf_sha512_BYTES_MIN","crypto_kdf_hkdf_sha512_KEYBYTES","crypto_kx_PUBLICKEYBYTES","crypto_kx_SECRETKEYBYTES","crypto_kx_SEEDBYTES","crypto_kx_SESSIONKEYBYTES","crypto_onetimeauth_BYTES","crypto_onetimeauth_KEYBYTES","crypto_onetimeauth_poly1305_BYTES","crypto_onetimeauth_poly1305_KEYBYTES","crypto_pwhash_ALG_ARGON2I13","crypto_pwhash_ALG_ARGON2ID13","crypto_pwhash_ALG_DEFAULT","crypto_pwhash_BYTES_MAX","crypto_pwhash_BYTES_MIN","crypto_pwhash_MEMLIMIT_INTERACTIVE","crypto_pwhash_MEMLIMIT_MAX","crypto_pwhash_MEMLIMIT_MIN","crypto_pwhash_MEMLIMIT_MODERATE","crypto_pwhash_MEMLIMIT_SENSITIVE","crypto_pwhash_OPSLIMIT_INTERACTIVE","crypto_pwhash_OPSLIMIT_MAX","crypto_pwhash_OPSLIMIT_MIN","crypto_pwhash_OPSLIMIT_MODERATE","crypto_pwhash_OPSLIMIT_SENSITIVE","crypto_pwhash_PASSWD_MAX","crypto_pwhash_PASSWD_MIN","crypto_pwhash_SALTBYTES","crypto_pwhash_STRBYTES","crypto_pwhash_argon2i_BYTES_MAX","crypto_pwhash_argon2i_BYTES_MIN","crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2i_MEMLIMIT_MAX","crypto_pwhash_argon2i_MEMLIMIT_MIN","crypto_pwhash_argon2i_MEMLIMIT_MODERATE","crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2i_OPSLIMIT_MAX","crypto_pwhash_argon2i_OPSLIMIT_MIN","crypto_pwhash_argon2i_OPSLIMIT_MODERATE","crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2i_PASSWD_MAX","crypto_pwhash_argon2i_PASSWD_MIN","crypto_pwhash_argon2i_SALTBYTES","crypto_pwhash_argon2i_STRBYTES","crypto_pwhash_argon2id_BYTES_MAX","crypto_pwhash_argon2id_BYTES_MIN","crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2id_MEMLIMIT_MAX","crypto_pwhash_argon2id_MEMLIMIT_MIN","crypto_pwhash_argon2id_MEMLIMIT_MODERATE","crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2id_OPSLIMIT_MAX","crypto_pwhash_argon2id_OPSLIMIT_MIN","crypto_pwhash_argon2id_OPSLIMIT_MODERATE","crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2id_PASSWD_MAX","crypto_pwhash_argon2id_PASSWD_MIN","crypto_pwhash_argon2id_SALTBYTES","crypto_pwhash_argon2id_STRBYTES","crypto_pwhash_scryptsalsa208sha256_BYTES_MAX","crypto_pwhash_scryptsalsa208sha256_BYTES_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX","crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN","crypto_pwhash_scryptsalsa208sha256_SALTBYTES","crypto_pwhash_scryptsalsa208sha256_STRBYTES","crypto_scalarmult_BYTES","crypto_scalarmult_SCALARBYTES","crypto_scalarmult_curve25519_BYTES","crypto_scalarmult_curve25519_SCALARBYTES","crypto_scalarmult_ed25519_BYTES","crypto_scalarmult_ed25519_SCALARBYTES","crypto_scalarmult_ristretto255_BYTES","crypto_scalarmult_ristretto255_SCALARBYTES","crypto_secretbox_KEYBYTES","crypto_secretbox_MACBYTES","crypto_secretbox_MESSAGEBYTES_MAX","crypto_secretbox_NONCEBYTES","crypto_secretbox_xchacha20poly1305_KEYBYTES","crypto_secretbox_xchacha20poly1305_MACBYTES","crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xchacha20poly1305_NONCEBYTES","crypto_secretbox_xsalsa20poly1305_KEYBYTES","crypto_secretbox_xsalsa20poly1305_MACBYTES","crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xsalsa20poly1305_NONCEBYTES","crypto_secretstream_xchacha20poly1305_ABYTES","crypto_secretstream_xchacha20poly1305_HEADERBYTES","crypto_secretstream_xchacha20poly1305_KEYBYTES","crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretstream_xchacha20poly1305_TAG_FINAL","crypto_secretstream_xchacha20poly1305_TAG_MESSAGE","crypto_secretstream_xchacha20poly1305_TAG_PUSH","crypto_secretstream_xchacha20poly1305_TAG_REKEY","crypto_shorthash_BYTES","crypto_shorthash_KEYBYTES","crypto_shorthash_siphash24_BYTES","crypto_shorthash_siphash24_KEYBYTES","crypto_shorthash_siphashx24_BYTES","crypto_shorthash_siphashx24_KEYBYTES","crypto_sign_BYTES","crypto_sign_MESSAGEBYTES_MAX","crypto_sign_PUBLICKEYBYTES","crypto_sign_SECRETKEYBYTES","crypto_sign_SEEDBYTES","crypto_sign_ed25519_BYTES","crypto_sign_ed25519_MESSAGEBYTES_MAX","crypto_sign_ed25519_PUBLICKEYBYTES","crypto_sign_ed25519_SECRETKEYBYTES","crypto_sign_ed25519_SEEDBYTES","crypto_stream_KEYBYTES","crypto_stream_MESSAGEBYTES_MAX","crypto_stream_NONCEBYTES","crypto_stream_chacha20_IETF_KEYBYTES","crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX","crypto_stream_chacha20_IETF_NONCEBYTES","crypto_stream_chacha20_KEYBYTES","crypto_stream_chacha20_MESSAGEBYTES_MAX","crypto_stream_chacha20_NONCEBYTES","crypto_stream_chacha20_ietf_KEYBYTES","crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX","crypto_stream_chacha20_ietf_NONCEBYTES","crypto_stream_salsa2012_KEYBYTES","crypto_stream_salsa2012_MESSAGEBYTES_MAX","crypto_stream_salsa2012_NONCEBYTES","crypto_stream_salsa208_KEYBYTES","crypto_stream_salsa208_MESSAGEBYTES_MAX","crypto_stream_salsa208_NONCEBYTES","crypto_stream_salsa20_KEYBYTES","crypto_stream_salsa20_MESSAGEBYTES_MAX","crypto_stream_salsa20_NONCEBYTES","crypto_stream_xchacha20_KEYBYTES","crypto_stream_xchacha20_MESSAGEBYTES_MAX","crypto_stream_xchacha20_NONCEBYTES","crypto_stream_xsalsa20_KEYBYTES","crypto_stream_xsalsa20_MESSAGEBYTES_MAX","crypto_stream_xsalsa20_NONCEBYTES","crypto_verify_16_BYTES","crypto_verify_32_BYTES","crypto_verify_64_BYTES"];for(V=0;V<E.length;V++)typeof(y0=X["_"+E[V].toLowerCase()])=="function"&&(f2[E[V]]=y0());var e0=["SODIUM_VERSION_STRING","crypto_pwhash_STRPREFIX","crypto_pwhash_argon2i_STRPREFIX","crypto_pwhash_argon2id_STRPREFIX","crypto_pwhash_scryptsalsa208sha256_STRPREFIX"];for(V=0;V<e0.length;V++){var y0;typeof(y0=X["_"+e0[V].toLowerCase()])=="function"&&(f2[e0[V]]=X.UTF8ToString(y0()))}}X=e4;try{a();var P=new Uint8Array([98,97,108,108,115]),k=f2.randombytes_buf(f2.crypto_secretbox_NONCEBYTES),c=f2.randombytes_buf(f2.crypto_secretbox_KEYBYTES),w=f2.crypto_secretbox_easy(P,k,c),Q=f2.crypto_secretbox_open_easy(w,k,c);if(f2.memcmp(P,Q))return}catch(S){if(X.useBackupModule==null)throw new Error("Both wasm and asm failed to load"+S)}X.useBackupModule(),a()});function A6(a){if(typeof TextEncoder=="function")return new TextEncoder().encode(a);a=unescape(encodeURIComponent(a));for(var P=new Uint8Array(a.length),k=0,c=a.length;k<c;k++)P[k]=a.charCodeAt(k);return P}function hA(a){if(typeof TextDecoder=="function")return new TextDecoder("utf-8",{fatal:!0}).decode(a);var P=8192,k=Math.ceil(a.length/P);if(k<=1)try{return decodeURIComponent(escape(String.fromCharCode.apply(null,a)))}catch{throw new TypeError("The encoded data was not valid.")}for(var c="",w=0,Q=0;Q<k;Q++){var S=Array.prototype.slice.call(a,Q*P+w,(Q+1)*P+w);if(S.length!==0){var F,V=S.length,E=0;do{var e0=S[--V];e0>=240?(E=4,F=!0):e0>=224?(E=3,F=!0):e0>=192?(E=2,F=!0):e0<128&&(E=1,F=!0)}while(!F);for(var y0=E-(S.length-V),u0=0;u0<y0;u0++)w--,S.pop();c+=hA(S)}}return c}function Fe(a){a=W(null,a,"input");for(var P,k,c,w="",Q=0;Q<a.length;Q++)c=87+(k=15&a[Q])+(k-10>>8&-39)<<8|87+(P=a[Q]>>>4)+(P-10>>8&-39),w+=String.fromCharCode(255&c)+String.fromCharCode(c>>>8);return w}var dr={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function Ke(a){if(a===void 0)return dr.URLSAFE_NO_PADDING;if(a!==dr.ORIGINAL&&a!==dr.ORIGINAL_NO_PADDING&&a!==dr.URLSAFE&&a!==dr.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return a}function Ne(a,P){P=Ke(P);var k=[];a=W(k,a,"input");var c,w=0|Math.floor(a.length/3),Q=a.length-3*w,S=4*w+(Q!==0?2&P?2+(Q>>>1):4:0),F=new k0(S+1),V=Z(a);return k.push(V),k.push(F.address),X._sodium_bin2base64(F.address,F.length,V,a.length,P)===0&&H0(k,"conversion failed"),F.length=S,c=hA(F.to_Uint8Array()),p0(k),c}function w0(a,P){var k=P||"uint8array";if(!Oe(k))throw new Error(k+" output format is not available");if(a instanceof k0){if(k==="uint8array")return a.to_Uint8Array();if(k==="text")return hA(a.to_Uint8Array());if(k==="hex")return Fe(a.to_Uint8Array());if(k==="base64")return Ne(a.to_Uint8Array(),dr.URLSAFE_NO_PADDING);throw new Error('What is output format "'+k+'"?')}if(typeof a=="object"){for(var c=Object.keys(a),w={},Q=0;Q<c.length;Q++)w[c[Q]]=w0(a[c[Q]],k);return w}if(typeof a=="string")return a;throw new TypeError("Cannot format output")}function Oe(a){for(var P=["uint8array","text","hex","base64"],k=0;k<P.length;k++)if(P[k]===a)return!0;return!1}function a0(a){if(a){if(typeof a!="string")throw new TypeError("When defined, the output format must be a string");if(!Oe(a))throw new Error(a+" is not a supported output format")}}function k0(a){this.length=a,this.address=fr(a)}function Z(a){var P=fr(a.length);return X.HEAPU8.set(a,P),P}function fr(a){var P=X._malloc(a);if(P===0)throw{message:"_malloc() failed",length:a};return P}function I3(a){X._free(a)}function p0(a){if(a)for(var P=0;P<a.length;P++)I3(a[P])}function H0(a,P){throw p0(a),new Error(P)}function i0(a,P){throw p0(a),new TypeError(P)}function l2(a,P,k){P==null&&i0(a,k+" cannot be null or undefined")}function W(a,P,k){return l2(a,P,k),P instanceof Uint8Array?P:typeof P=="string"?A6(P):void i0(a,"unsupported input type for "+k)}function C3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_aegis128l_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_aegis128l_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_aegis128l_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_aegis128l_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function H3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_aegis128l_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_aegis128l_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_aegis128l_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function Y3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis128l_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_aegis128l_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_aegis128l_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function Q3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis128l_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis128l_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_aegis128l_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_aegis128l_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function G3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_aegis128l_keybytes()),c=k.address;P.push(c),X._crypto_aead_aegis128l_keygen(c);var w=w0(k,a);return p0(P),w}function L3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_aegis256_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_aegis256_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_aegis256_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_aegis256_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_aegis256_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function X3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_aegis256_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_aegis256_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_aegis256_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function d3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis256_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis256_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_aegis256_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_aegis256_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function R3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_aegis256_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_aegis256_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_aegis256_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_aegis256_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function F3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_aegis256_keybytes()),c=k.address;P.push(c),X._crypto_aead_aegis256_keygen(c);var w=w0(k,a);return p0(P),w}function K3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_chacha20poly1305_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_chacha20poly1305_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_chacha20poly1305_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function N3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_chacha20poly1305_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_chacha20poly1305_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_chacha20poly1305_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function O3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_chacha20poly1305_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_chacha20poly1305_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function U3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_chacha20poly1305_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_chacha20poly1305_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function x3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_chacha20poly1305_ietf_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_chacha20poly1305_ietf_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_chacha20poly1305_ietf_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function V3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_chacha20poly1305_ietf_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function z3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_chacha20poly1305_ietf_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_chacha20poly1305_ietf_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function $3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_chacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_chacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_chacha20poly1305_ietf_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_chacha20poly1305_ietf_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function Z3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_chacha20poly1305_ietf_keybytes()),c=k.address;P.push(c),X._crypto_aead_chacha20poly1305_ietf_keygen(c);var w=w0(k,a);return p0(P),w}function W3(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_chacha20poly1305_keybytes()),c=k.address;P.push(c),X._crypto_aead_chacha20poly1305_keygen(c);var w=w0(k,a);return p0(P),w}function J3(a,P,k,c,w,Q){var S=[];a0(Q);var F=null;a!=null&&(F=Z(a=W(S,a,"secret_nonce")),a.length,S.push(F)),P=W(S,P,"ciphertext");var V,E=X._crypto_aead_xchacha20poly1305_ietf_abytes(),e0=P.length;e0<E&&i0(S,"ciphertext is too short"),V=Z(P),S.push(V);var y0=null,u0=0;k!=null&&(y0=Z(k=W(S,k,"additional_data")),u0=k.length,S.push(y0)),c=W(S,c,"public_nonce");var c0,I0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==I0&&i0(S,"invalid public_nonce length"),c0=Z(c),S.push(c0),w=W(S,w,"key");var Q0,R0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==R0&&i0(S,"invalid key length"),Q0=Z(w),S.push(Q0);var N0=new k0(e0-X._crypto_aead_xchacha20poly1305_ietf_abytes()|0),E0=N0.address;if(S.push(E0),X._crypto_aead_xchacha20poly1305_ietf_decrypt(E0,null,F,V,e0,0,y0,u0,0,c0,Q0)===0){var o2=w0(N0,Q);return p0(S),o2}H0(S,"ciphertext cannot be decrypted using that key")}function E3(a,P,k,c,w,Q,S){var F=[];a0(S);var V=null;a!=null&&(V=Z(a=W(F,a,"secret_nonce")),a.length,F.push(V));var E=Z(P=W(F,P,"ciphertext")),e0=P.length;F.push(E),k=W(F,k,"mac");var y0,u0=0|X._crypto_box_macbytes();k.length!==u0&&i0(F,"invalid mac length"),y0=Z(k),F.push(y0);var c0=null,I0=0;c!=null&&(c0=Z(c=W(F,c,"additional_data")),I0=c.length,F.push(c0)),w=W(F,w,"public_nonce");var Q0,R0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();w.length!==R0&&i0(F,"invalid public_nonce length"),Q0=Z(w),F.push(Q0),Q=W(F,Q,"key");var N0,E0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();Q.length!==E0&&i0(F,"invalid key length"),N0=Z(Q),F.push(N0);var o2=new k0(0|e0),S2=o2.address;if(F.push(S2),X._crypto_aead_xchacha20poly1305_ietf_decrypt_detached(S2,V,E,e0,0,y0,c0,I0,0,Q0,N0)===0){var s1=w0(o2,S);return p0(F),s1}H0(F,"ciphertext cannot be decrypted using that key")}function b3(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(V+X._crypto_aead_xchacha20poly1305_ietf_abytes()|0),N0=R0.address;if(S.push(N0),X._crypto_aead_xchacha20poly1305_ietf_encrypt(N0,null,F,V,0,E,e0,0,y0,u0,I0)===0){var E0=w0(R0,Q);return p0(S),E0}H0(S,"invalid usage")}function ri(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"message")),V=a.length;S.push(F);var E=null,e0=0;P!=null&&(E=Z(P=W(S,P,"additional_data")),e0=P.length,S.push(E));var y0=null;k!=null&&(y0=Z(k=W(S,k,"secret_nonce")),k.length,S.push(y0)),c=W(S,c,"public_nonce");var u0,c0=0|X._crypto_aead_xchacha20poly1305_ietf_npubbytes();c.length!==c0&&i0(S,"invalid public_nonce length"),u0=Z(c),S.push(u0),w=W(S,w,"key");var I0,Q0=0|X._crypto_aead_xchacha20poly1305_ietf_keybytes();w.length!==Q0&&i0(S,"invalid key length"),I0=Z(w),S.push(I0);var R0=new k0(0|V),N0=R0.address;S.push(N0);var E0=new k0(0|X._crypto_aead_xchacha20poly1305_ietf_abytes()),o2=E0.address;if(S.push(o2),X._crypto_aead_xchacha20poly1305_ietf_encrypt_detached(N0,o2,null,F,V,0,E,e0,0,y0,u0,I0)===0){var S2=w0({ciphertext:R0,mac:E0},Q);return p0(S),S2}H0(S,"invalid usage")}function Ai(a){var P=[];a0(a);var k=new k0(0|X._crypto_aead_xchacha20poly1305_ietf_keybytes()),c=k.address;P.push(c),X._crypto_aead_xchacha20poly1305_ietf_keygen(c);var w=w0(k,a);return p0(P),w}function ni(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ei(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha256_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha256_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha256(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ti(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function _i(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(208).address;if(!(0|X._crypto_auth_hmacsha256_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function ii(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha256_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha256_keygen(c);var w=w0(k,a);return p0(P),w}function si(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function oi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha256_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha256_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha256_verify(w,S,F,0,V));return p0(c),e0}function yi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha512_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha512_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha512(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Bi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_auth_hmacsha512256_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_auth_hmacsha512256_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_auth_hmacsha512256(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function hi(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha512256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha512256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function ui(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(416).address;if(!(0|X._crypto_auth_hmacsha512256_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function li(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha512256_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha512256_keygen(c);var w=w0(k,a);return p0(P),w}function pi(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha512256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function ji(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha512256_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha512256_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha512256_verify(w,S,F,0,V));return p0(c),e0}function ki(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_auth_hmacsha512_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_auth_hmacsha512_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function vi(a,P){var k=[];a0(P);var c=null,w=0;a!=null&&(c=Z(a=W(k,a,"key")),w=a.length,k.push(c));var Q=new k0(416).address;if(!(0|X._crypto_auth_hmacsha512_init(Q,c,w))){var S=Q;return p0(k),S}H0(k,"invalid usage")}function fi(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_hmacsha512_keybytes()),c=k.address;P.push(c),X._crypto_auth_hmacsha512_keygen(c);var w=w0(k,a);return p0(P),w}function ai(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_auth_hmacsha512_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function gi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_hmacsha512_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_hmacsha512_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_hmacsha512_verify(w,S,F,0,V));return p0(c),e0}function ci(a){var P=[];a0(a);var k=new k0(0|X._crypto_auth_keybytes()),c=k.address;P.push(c),X._crypto_auth_keygen(c);var w=w0(k,a);return p0(P),w}function qi(a,P,k){var c=[];a=W(c,a,"tag");var w,Q=0|X._crypto_auth_bytes();a.length!==Q&&i0(c,"invalid tag length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_auth_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_auth_verify(w,S,F,0,V));return p0(c),e0}function Pi(a,P,k){var c=[];a0(k),a=W(c,a,"publicKey");var w,Q=0|X._crypto_box_publickeybytes();a.length!==Q&&i0(c,"invalid publicKey length"),w=Z(a),c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_box_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_box_beforenmbytes()),E=V.address;if(c.push(E),!(0|X._crypto_box_beforenm(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ti(a,P,k){var c=[];a0(k),a=W(c,a,"publicKey");var w,Q=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==Q&&i0(c,"invalid publicKey length"),w=Z(a),c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes()),E=V.address;if(c.push(E),!(0|X._crypto_box_curve25519xchacha20poly1305_beforenm(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function wi(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;Q.push(Q0);var R0=new k0(0|X._crypto_box_curve25519xchacha20poly1305_macbytes()),N0=R0.address;if(Q.push(N0),!(0|X._crypto_box_curve25519xchacha20poly1305_detached(Q0,N0,S,F,0,V,e0,u0))){var E0=w0({ciphertext:I0,mac:R0},w);return p0(Q),E0}H0(Q,"invalid usage")}function mi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_box_curve25519xchacha20poly1305_macbytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_box_curve25519xchacha20poly1305_detached_afternm(u0,I0,Q,S,0,F,E))){var Q0=w0({ciphertext:y0,mac:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function Di(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(F+X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_curve25519xchacha20poly1305_easy(Q0,S,F,0,V,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"invalid usage")}function Mi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_curve25519xchacha20poly1305_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Si(a){var P=[];a0(a);var k=new k0(0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),Q=w.address;P.push(Q),X._crypto_box_curve25519xchacha20poly1305_keypair(c,Q);var S=w0({publicKey:k,privateKey:w,keyType:"curve25519"},a);return p0(P),S}function Ii(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"ciphertext")),V=a.length;S.push(F),P=W(S,P,"mac");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_macbytes();P.length!==e0&&i0(S,"invalid mac length"),E=Z(P),S.push(E),k=W(S,k,"nonce");var y0,u0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();k.length!==u0&&i0(S,"invalid nonce length"),y0=Z(k),S.push(y0),c=W(S,c,"publicKey");var c0,I0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();c.length!==I0&&i0(S,"invalid publicKey length"),c0=Z(c),S.push(c0),w=W(S,w,"privateKey");var Q0,R0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();w.length!==R0&&i0(S,"invalid privateKey length"),Q0=Z(w),S.push(Q0);var N0=new k0(0|V),E0=N0.address;if(S.push(E0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_detached(E0,F,E,V,0,y0,c0,Q0))){var o2=w0(N0,Q);return p0(S),o2}H0(S,"incorrect key pair for the given ciphertext")}function Ci(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"ciphertext")),F=a.length;Q.push(S),P=W(Q,P,"mac");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_macbytes();P.length!==E&&i0(Q,"invalid mac length"),V=Z(P),Q.push(V),k=W(Q,k,"nonce");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();k.length!==y0&&i0(Q,"invalid nonce length"),e0=Z(k),Q.push(e0),c=W(Q,c,"sharedKey");var u0,c0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();c.length!==c0&&i0(Q,"invalid sharedKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_detached_afternm(Q0,S,V,F,0,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"incorrect secret key for the given ciphertext")}function Hi(a,P,k,c,w){var Q=[];a0(w),a=W(Q,a,"ciphertext");var S,F=X._crypto_box_curve25519xchacha20poly1305_macbytes(),V=a.length;V<F&&i0(Q,"ciphertext is too short"),S=Z(a),Q.push(S),P=W(Q,P,"nonce");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==e0&&i0(Q,"invalid nonce length"),E=Z(P),Q.push(E),k=W(Q,k,"publicKey");var y0,u0=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();k.length!==u0&&i0(Q,"invalid publicKey length"),y0=Z(k),Q.push(y0),c=W(Q,c,"privateKey");var c0,I0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();c.length!==I0&&i0(Q,"invalid privateKey length"),c0=Z(c),Q.push(c0);var Q0=new k0(V-X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),R0=Q0.address;if(Q.push(R0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_easy(R0,S,V,0,E,y0,c0))){var N0=w0(Q0,w);return p0(Q),N0}H0(Q,"incorrect key pair for the given ciphertext")}function Yi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"ciphertext")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_curve25519xchacha20poly1305_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_curve25519xchacha20poly1305_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S-X._crypto_box_curve25519xchacha20poly1305_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_curve25519xchacha20poly1305_open_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"incorrect secret key for the given ciphertext")}function Qi(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(Q+X._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),E=V.address;c.push(E),X._crypto_box_curve25519xchacha20poly1305_seal(E,w,Q,0,S);var e0=w0(V,k);return p0(c),e0}function Gi(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_box_curve25519xchacha20poly1305_sealbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"publicKey");var V,E=0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes();P.length!==E&&i0(w,"invalid publicKey length"),V=Z(P),w.push(V),k=W(w,k,"secretKey");var e0,y0=0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes();k.length!==y0&&i0(w,"invalid secretKey length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_box_curve25519xchacha20poly1305_sealbytes()|0),c0=u0.address;w.push(c0),X._crypto_box_curve25519xchacha20poly1305_seal_open(c0,Q,F,0,V,e0);var I0=w0(u0,c);return p0(w),I0}function Li(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_box_curve25519xchacha20poly1305_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_box_curve25519xchacha20poly1305_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_box_curve25519xchacha20poly1305_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"invalid usage")}function Xi(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;Q.push(Q0);var R0=new k0(0|X._crypto_box_macbytes()),N0=R0.address;if(Q.push(N0),!(0|X._crypto_box_detached(Q0,N0,S,F,0,V,e0,u0))){var E0=w0({ciphertext:I0,mac:R0},w);return p0(Q),E0}H0(Q,"invalid usage")}function di(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_box_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),k=W(Q,k,"publicKey");var e0,y0=0|X._crypto_box_publickeybytes();k.length!==y0&&i0(Q,"invalid publicKey length"),e0=Z(k),Q.push(e0),c=W(Q,c,"privateKey");var u0,c0=0|X._crypto_box_secretkeybytes();c.length!==c0&&i0(Q,"invalid privateKey length"),u0=Z(c),Q.push(u0);var I0=new k0(F+X._crypto_box_macbytes()|0),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_box_easy(Q0,S,F,0,V,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"invalid usage")}function Ri(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_box_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Fi(a){var P=[];a0(a);var k=new k0(0|X._crypto_box_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_box_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_box_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"x25519"};return p0(P),S}H0(P,"internal error")}function Ki(a,P,k,c,w,Q){var S=[];a0(Q);var F=Z(a=W(S,a,"ciphertext")),V=a.length;S.push(F),P=W(S,P,"mac");var E,e0=0|X._crypto_box_macbytes();P.length!==e0&&i0(S,"invalid mac length"),E=Z(P),S.push(E),k=W(S,k,"nonce");var y0,u0=0|X._crypto_box_noncebytes();k.length!==u0&&i0(S,"invalid nonce length"),y0=Z(k),S.push(y0),c=W(S,c,"publicKey");var c0,I0=0|X._crypto_box_publickeybytes();c.length!==I0&&i0(S,"invalid publicKey length"),c0=Z(c),S.push(c0),w=W(S,w,"privateKey");var Q0,R0=0|X._crypto_box_secretkeybytes();w.length!==R0&&i0(S,"invalid privateKey length"),Q0=Z(w),S.push(Q0);var N0=new k0(0|V),E0=N0.address;if(S.push(E0),!(0|X._crypto_box_open_detached(E0,F,E,V,0,y0,c0,Q0))){var o2=w0(N0,Q);return p0(S),o2}H0(S,"incorrect key pair for the given ciphertext")}function Ni(a,P,k,c,w){var Q=[];a0(w),a=W(Q,a,"ciphertext");var S,F=X._crypto_box_macbytes(),V=a.length;V<F&&i0(Q,"ciphertext is too short"),S=Z(a),Q.push(S),P=W(Q,P,"nonce");var E,e0=0|X._crypto_box_noncebytes();P.length!==e0&&i0(Q,"invalid nonce length"),E=Z(P),Q.push(E),k=W(Q,k,"publicKey");var y0,u0=0|X._crypto_box_publickeybytes();k.length!==u0&&i0(Q,"invalid publicKey length"),y0=Z(k),Q.push(y0),c=W(Q,c,"privateKey");var c0,I0=0|X._crypto_box_secretkeybytes();c.length!==I0&&i0(Q,"invalid privateKey length"),c0=Z(c),Q.push(c0);var Q0=new k0(V-X._crypto_box_macbytes()|0),R0=Q0.address;if(Q.push(R0),!(0|X._crypto_box_open_easy(R0,S,V,0,E,y0,c0))){var N0=w0(Q0,w);return p0(Q),N0}H0(Q,"incorrect key pair for the given ciphertext")}function Oi(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"ciphertext")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_box_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"sharedKey");var E,e0=0|X._crypto_box_beforenmbytes();k.length!==e0&&i0(w,"invalid sharedKey length"),E=Z(k),w.push(E);var y0=new k0(S-X._crypto_box_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_box_open_easy_afternm(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"incorrect secret key for the given ciphertext")}function Ui(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_box_publickeybytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(Q+X._crypto_box_sealbytes()|0),E=V.address;if(c.push(E),!(0|X._crypto_box_seal(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function xi(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_box_sealbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"publicKey");var V,E=0|X._crypto_box_publickeybytes();P.length!==E&&i0(w,"invalid publicKey length"),V=Z(P),w.push(V),k=W(w,k,"privateKey");var e0,y0=0|X._crypto_box_secretkeybytes();k.length!==y0&&i0(w,"invalid privateKey length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_box_sealbytes()|0),c0=u0.address;if(w.push(c0),!(0|X._crypto_box_seal_open(c0,Q,F,0,V,e0))){var I0=w0(u0,c);return p0(w),I0}H0(w,"incorrect key pair for the given ciphertext")}function Vi(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_box_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_box_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_box_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_box_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"invalid usage")}function zi(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ed25519_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ed25519_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ed25519_add(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function $i(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ed25519_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ed25519_from_hash(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function Zi(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ed25519_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ed25519_from_uniform(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function Wi(a,P){var k=[];a0(P),a=W(k,a,"repr");var c,w=0|X._crypto_core_ed25519_bytes();a.length!==w&&i0(k,"invalid repr length"),c=Z(a),k.push(c);var Q=(0|X._crypto_core_ed25519_is_valid_point(c))==1;return p0(k),Q}function Ji(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ed25519_bytes()),c=k.address;P.push(c),X._crypto_core_ed25519_random(c);var w=w0(k,a);return p0(P),w}function Ei(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_add(E,w,S);var e0=w0(V,k);return p0(c),e0}function bi(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_complement(S,c);var F=w0(Q,P);return p0(k),F}function r7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_core_ed25519_scalar_invert(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid reciprocate")}function A7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_mul(E,w,S);var e0=w0(V,k);return p0(c),e0}function n7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_negate(S,c);var F=w0(Q,P);return p0(k),F}function e7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ed25519_scalarbytes()),c=k.address;P.push(c),X._crypto_core_ed25519_scalar_random(c);var w=w0(k,a);return p0(P),w}function t7(a,P){var k=[];a0(P),a=W(k,a,"sample");var c,w=0|X._crypto_core_ed25519_nonreducedscalarbytes();a.length!==w&&i0(k,"invalid sample length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ed25519_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ed25519_scalar_reduce(S,c);var F=w0(Q,P);return p0(k),F}function _7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ed25519_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ed25519_scalar_sub(E,w,S);var e0=w0(V,k);return p0(c),e0}function i7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ed25519_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ed25519_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ed25519_sub(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function s7(a,P,k,c){var w=[];a0(c),a=W(w,a,"input");var Q,S=0|X._crypto_core_hchacha20_inputbytes();a.length!==S&&i0(w,"invalid input length"),Q=Z(a),w.push(Q),P=W(w,P,"privateKey");var F,V=0|X._crypto_core_hchacha20_keybytes();P.length!==V&&i0(w,"invalid privateKey length"),F=Z(P),w.push(F);var E=null;k!=null&&(E=Z(k=W(w,k,"constant")),k.length,w.push(E));var e0=new k0(0|X._crypto_core_hchacha20_outputbytes()),y0=e0.address;if(w.push(y0),!(0|X._crypto_core_hchacha20(y0,Q,F,E))){var u0=w0(e0,c);return p0(w),u0}H0(w,"invalid usage")}function o7(a,P,k,c){var w=[];a0(c),a=W(w,a,"input");var Q,S=0|X._crypto_core_hsalsa20_inputbytes();a.length!==S&&i0(w,"invalid input length"),Q=Z(a),w.push(Q),P=W(w,P,"privateKey");var F,V=0|X._crypto_core_hsalsa20_keybytes();P.length!==V&&i0(w,"invalid privateKey length"),F=Z(P),w.push(F);var E=null;k!=null&&(E=Z(k=W(w,k,"constant")),k.length,w.push(E));var e0=new k0(0|X._crypto_core_hsalsa20_outputbytes()),y0=e0.address;if(w.push(y0),!(0|X._crypto_core_hsalsa20(y0,Q,F,E))){var u0=w0(e0,c);return p0(w),u0}H0(w,"invalid usage")}function y7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ristretto255_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ristretto255_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ristretto255_add(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function B7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"r"));a.length,k.push(c);var w=new k0(0|X._crypto_core_ristretto255_bytes()),Q=w.address;if(k.push(Q),!(0|X._crypto_core_ristretto255_from_hash(Q,c))){var S=w0(w,P);return p0(k),S}H0(k,"invalid usage")}function h7(a,P){var k=[];a0(P),a=W(k,a,"repr");var c,w=0|X._crypto_core_ristretto255_bytes();a.length!==w&&i0(k,"invalid repr length"),c=Z(a),k.push(c);var Q=(0|X._crypto_core_ristretto255_is_valid_point(c))==1;return p0(k),Q}function u7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ristretto255_bytes()),c=k.address;P.push(c),X._crypto_core_ristretto255_random(c);var w=w0(k,a);return p0(P),w}function l7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_add(E,w,S);var e0=w0(V,k);return p0(c),e0}function p7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_complement(S,c);var F=w0(Q,P);return p0(k),F}function j7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_core_ristretto255_scalar_invert(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid reciprocate")}function k7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_mul(E,w,S);var e0=w0(V,k);return p0(c),e0}function v7(a,P){var k=[];a0(P),a=W(k,a,"s");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid s length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_negate(S,c);var F=w0(Q,P);return p0(k),F}function f7(a){var P=[];a0(a);var k=new k0(0|X._crypto_core_ristretto255_scalarbytes()),c=k.address;P.push(c),X._crypto_core_ristretto255_scalar_random(c);var w=w0(k,a);return p0(P),w}function a7(a,P){var k=[];a0(P),a=W(k,a,"sample");var c,w=0|X._crypto_core_ristretto255_nonreducedscalarbytes();a.length!==w&&i0(k,"invalid sample length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_scalarbytes()),S=Q.address;k.push(S),X._crypto_core_ristretto255_scalar_reduce(S,c);var F=w0(Q,P);return p0(k),F}function g7(a,P,k){var c=[];a0(k),a=W(c,a,"x");var w,Q=0|X._crypto_core_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid x length"),w=Z(a),c.push(w),P=W(c,P,"y");var S,F=0|X._crypto_core_ristretto255_scalarbytes();P.length!==F&&i0(c,"invalid y length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_scalarbytes()),E=V.address;c.push(E),X._crypto_core_ristretto255_scalar_sub(E,w,S);var e0=w0(V,k);return p0(c),e0}function c7(a,P,k){var c=[];a0(k),a=W(c,a,"p");var w,Q=0|X._crypto_core_ristretto255_bytes();a.length!==Q&&i0(c,"invalid p length"),w=Z(a),c.push(w),P=W(c,P,"q");var S,F=0|X._crypto_core_ristretto255_bytes();P.length!==F&&i0(c,"invalid q length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_core_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_core_ristretto255_sub(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"input is an invalid element")}function q7(a,P,k,c){var w=[];a0(c),l2(w,a,"hash_length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(w,"hash_length must be an unsigned integer");var Q=Z(P=W(w,P,"message")),S=P.length;w.push(Q);var F=null,V=0;k!=null&&(F=Z(k=W(w,k,"key")),V=k.length,w.push(F));var E=new k0(a|=0),e0=E.address;if(w.push(e0),!(0|X._crypto_generichash(e0,a,Q,S,0,F,V))){var y0=w0(E,c);return p0(w),y0}H0(w,"invalid usage")}function P7(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"subkey_len"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(Q,"subkey_len must be an unsigned integer");var S=null,F=0;P!=null&&(S=Z(P=W(Q,P,"key")),F=P.length,Q.push(S));var V=null,E=0;k!=null&&(k=W(Q,k,"id"),E=0|X._crypto_generichash_blake2b_saltbytes(),k.length!==E&&i0(Q,"invalid id length"),V=Z(k),Q.push(V));var e0=null,y0=0;c!=null&&(c=W(Q,c,"ctx"),y0=0|X._crypto_generichash_blake2b_personalbytes(),c.length!==y0&&i0(Q,"invalid ctx length"),e0=Z(c),Q.push(e0));var u0=new k0(0|a),c0=u0.address;if(Q.push(c0),!(0|X._crypto_generichash_blake2b_salt_personal(c0,a,null,0,0,S,F,V,e0))){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function T7(a,P,k){var c=[];a0(k),l2(c,a,"state_address"),l2(c,P,"hash_length"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(c,"hash_length must be an unsigned integer");var w=new k0(P|=0),Q=w.address;if(c.push(Q),!(0|X._crypto_generichash_final(a,Q,P))){var S=(X._free(a),w0(w,k));return p0(c),S}H0(c,"invalid usage")}function w7(a,P,k){var c=[];a0(k);var w=null,Q=0;a!=null&&(w=Z(a=W(c,a,"key")),Q=a.length,c.push(w)),l2(c,P,"hash_length"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(c,"hash_length must be an unsigned integer");var S=new k0(357).address;if(!(0|X._crypto_generichash_init(S,w,Q,P))){var F=S;return p0(c),F}H0(c,"invalid usage")}function m7(a){var P=[];a0(a);var k=new k0(0|X._crypto_generichash_keybytes()),c=k.address;P.push(c),X._crypto_generichash_keygen(c);var w=w0(k,a);return p0(P),w}function D7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_generichash_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function M7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function S7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_sha256_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash_sha256(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function I7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_hash_sha256_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_hash_sha256_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function C7(a){var P=[];a0(a);var k=new k0(104).address;if(!(0|X._crypto_hash_sha256_init(k))){var c=k;return p0(P),c}H0(P,"invalid usage")}function H7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_hash_sha256_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function Y7(a,P){var k=[];a0(P);var c=Z(a=W(k,a,"message")),w=a.length;k.push(c);var Q=new k0(0|X._crypto_hash_sha512_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_hash_sha512(S,c,w,0))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid usage")}function Q7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_hash_sha512_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_hash_sha512_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function G7(a){var P=[];a0(a);var k=new k0(208).address;if(!(0|X._crypto_hash_sha512_init(k))){var c=k;return p0(P),c}H0(P,"invalid usage")}function L7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_hash_sha512_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function X7(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"subkey_len"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(Q,"subkey_len must be an unsigned integer"),l2(Q,P,"subkey_id");var S,F=0;if(typeof P=="bigint"&&P>=BigInt(0)){const I0=P>>BigInt(32);I0>BigInt(4294967295)&&i0(Q,"subkey_id cannot be more than 64 bits"),F=Number(I0),S=Number(P&BigInt(4294967295))}else typeof P=="number"&&(0|P)===P&&P>=0?S=P:i0(Q,"subkey_id must be an unsigned integer or bigint");typeof k!="string"&&i0(Q,"ctx must be a string"),(k=A6(k+"\0")).length-1!==X._crypto_kdf_contextbytes()&&i0(Q,"invalid ctx length");var V=Z(k);k.length,Q.push(V),c=W(Q,c,"key");var E,e0=0|X._crypto_kdf_keybytes();c.length!==e0&&i0(Q,"invalid key length"),E=Z(c),Q.push(E);var y0=new k0(0|a),u0=y0.address;Q.push(u0),X._crypto_kdf_derive_from_key(u0,a,S,F,V,E);var c0=w0(y0,w);return p0(Q),c0}function d7(a){var P=[];a0(a);var k=new k0(0|X._crypto_kdf_keybytes()),c=k.address;P.push(c),X._crypto_kdf_keygen(c);var w=w0(k,a);return p0(P),w}function R7(a,P,k,c){var w=[];a0(c),a=W(w,a,"clientPublicKey");var Q,S=0|X._crypto_kx_publickeybytes();a.length!==S&&i0(w,"invalid clientPublicKey length"),Q=Z(a),w.push(Q),P=W(w,P,"clientSecretKey");var F,V=0|X._crypto_kx_secretkeybytes();P.length!==V&&i0(w,"invalid clientSecretKey length"),F=Z(P),w.push(F),k=W(w,k,"serverPublicKey");var E,e0=0|X._crypto_kx_publickeybytes();k.length!==e0&&i0(w,"invalid serverPublicKey length"),E=Z(k),w.push(E);var y0=new k0(0|X._crypto_kx_sessionkeybytes()),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_kx_sessionkeybytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_kx_client_session_keys(u0,I0,Q,F,E))){var Q0=w0({sharedRx:y0,sharedTx:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function F7(a){var P=[];a0(a);var k=new k0(0|X._crypto_kx_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_kx_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_kx_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"x25519"};return p0(P),S}H0(P,"internal error")}function K7(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_kx_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_kx_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_kx_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_kx_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"x25519"};return p0(k),E}H0(k,"internal error")}function N7(a,P,k,c){var w=[];a0(c),a=W(w,a,"serverPublicKey");var Q,S=0|X._crypto_kx_publickeybytes();a.length!==S&&i0(w,"invalid serverPublicKey length"),Q=Z(a),w.push(Q),P=W(w,P,"serverSecretKey");var F,V=0|X._crypto_kx_secretkeybytes();P.length!==V&&i0(w,"invalid serverSecretKey length"),F=Z(P),w.push(F),k=W(w,k,"clientPublicKey");var E,e0=0|X._crypto_kx_publickeybytes();k.length!==e0&&i0(w,"invalid clientPublicKey length"),E=Z(k),w.push(E);var y0=new k0(0|X._crypto_kx_sessionkeybytes()),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_kx_sessionkeybytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_kx_server_session_keys(u0,I0,Q,F,E))){var Q0=w0({sharedRx:y0,sharedTx:c0},c);return p0(w),Q0}H0(w,"invalid usage")}function O7(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_onetimeauth_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_onetimeauth_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_onetimeauth(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function U7(a,P){var k=[];a0(P),l2(k,a,"state_address");var c=new k0(0|X._crypto_onetimeauth_bytes()),w=c.address;if(k.push(w),!(0|X._crypto_onetimeauth_final(a,w))){var Q=(X._free(a),w0(c,P));return p0(k),Q}H0(k,"invalid usage")}function x7(a,P){var k=[];a0(P);var c=null;a!=null&&(c=Z(a=W(k,a,"key")),a.length,k.push(c));var w=new k0(144).address;if(!(0|X._crypto_onetimeauth_init(w,c))){var Q=w;return p0(k),Q}H0(k,"invalid usage")}function V7(a){var P=[];a0(a);var k=new k0(0|X._crypto_onetimeauth_keybytes()),c=k.address;P.push(c),X._crypto_onetimeauth_keygen(c);var w=w0(k,a);return p0(P),w}function z7(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_onetimeauth_update(a,w,Q)&&H0(c,"invalid usage"),p0(c)}function $7(a,P,k){var c=[];a=W(c,a,"hash");var w,Q=0|X._crypto_onetimeauth_bytes();a.length!==Q&&i0(c,"invalid hash length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"key");var V,E=0|X._crypto_onetimeauth_keybytes();k.length!==E&&i0(c,"invalid key length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_onetimeauth_verify(w,S,F,0,V));return p0(c),e0}function Z7(a,P,k,c,w,Q,S){var F=[];a0(S),l2(F,a,"keyLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(F,"keyLength must be an unsigned integer");var V=Z(P=W(F,P,"password")),E=P.length;F.push(V),k=W(F,k,"salt");var e0,y0=0|X._crypto_pwhash_saltbytes();k.length!==y0&&i0(F,"invalid salt length"),e0=Z(k),F.push(e0),l2(F,c,"opsLimit"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(F,"opsLimit must be an unsigned integer"),l2(F,w,"memLimit"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(F,"memLimit must be an unsigned integer"),l2(F,Q,"algorithm"),(typeof Q!="number"||(0|Q)!==Q||Q<0)&&i0(F,"algorithm must be an unsigned integer");var u0=new k0(0|a),c0=u0.address;if(F.push(c0),!(0|X._crypto_pwhash(c0,a,0,V,E,0,e0,c,0,w,Q))){var I0=w0(u0,S);return p0(F),I0}H0(F,"invalid usage")}function W7(a,P,k,c,w,Q){var S=[];a0(Q),l2(S,a,"keyLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(S,"keyLength must be an unsigned integer");var F=Z(P=W(S,P,"password")),V=P.length;S.push(F),k=W(S,k,"salt");var E,e0=0|X._crypto_pwhash_scryptsalsa208sha256_saltbytes();k.length!==e0&&i0(S,"invalid salt length"),E=Z(k),S.push(E),l2(S,c,"opsLimit"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(S,"opsLimit must be an unsigned integer"),l2(S,w,"memLimit"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(S,"memLimit must be an unsigned integer");var y0=new k0(0|a),u0=y0.address;if(S.push(u0),!(0|X._crypto_pwhash_scryptsalsa208sha256(u0,a,0,F,V,0,E,c,0,w))){var c0=w0(y0,Q);return p0(S),c0}H0(S,"invalid usage")}function J7(a,P,k,c,w,Q,S){var F=[];a0(S);var V=Z(a=W(F,a,"password")),E=a.length;F.push(V);var e0=Z(P=W(F,P,"salt")),y0=P.length;F.push(e0),l2(F,k,"opsLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(F,"opsLimit must be an unsigned integer"),l2(F,c,"r"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(F,"r must be an unsigned integer"),l2(F,w,"p"),(typeof w!="number"||(0|w)!==w||w<0)&&i0(F,"p must be an unsigned integer"),l2(F,Q,"keyLength"),(typeof Q!="number"||(0|Q)!==Q||Q<0)&&i0(F,"keyLength must be an unsigned integer");var u0=new k0(0|Q),c0=u0.address;if(F.push(c0),!(0|X._crypto_pwhash_scryptsalsa208sha256_ll(V,E,e0,y0,k,0,c,w,c0,Q))){var I0=w0(u0,S);return p0(F),I0}H0(F,"invalid usage")}function E7(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"password")),S=a.length;w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var F=new k0(0|X._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(w.push(F),!(0|X._crypto_pwhash_scryptsalsa208sha256_str(F,Q,S,0,P,0,k))){var V=X.UTF8ToString(F);return p0(w),V}H0(w,"invalid usage")}function b7(a,P,k){var c=[];a0(k),typeof a!="string"&&i0(c,"hashed_password must be a string");var w=Z(a=A6(a+"\0"));a.length,c.push(w);var Q=Z(P=W(c,P,"password")),S=P.length;c.push(Q);var F=!(0|X._crypto_pwhash_scryptsalsa208sha256_str_verify(w,Q,S,0));return p0(c),F}function rs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"password")),S=a.length;w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var F=new k0(0|X._crypto_pwhash_strbytes()).address;if(w.push(F),!(0|X._crypto_pwhash_str(F,Q,S,0,P,0,k))){var V=X.UTF8ToString(F);return p0(w),V}H0(w,"invalid usage")}function As(a,P,k,c){var w=[];a0(c),typeof a!="string"&&i0(w,"hashed_password must be a string");var Q=Z(a=A6(a+"\0"));a.length,w.push(Q),l2(w,P,"opsLimit"),(typeof P!="number"||(0|P)!==P||P<0)&&i0(w,"opsLimit must be an unsigned integer"),l2(w,k,"memLimit"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(w,"memLimit must be an unsigned integer");var S=!!(0|X._crypto_pwhash_str_needs_rehash(Q,P,0,k));return p0(w),S}function ns(a,P,k){var c=[];a0(k),typeof a!="string"&&i0(c,"hashed_password must be a string");var w=Z(a=A6(a+"\0"));a.length,c.push(w);var Q=Z(P=W(c,P,"password")),S=P.length;c.push(Q);var F=!(0|X._crypto_pwhash_str_verify(w,Q,S,0));return p0(c),F}function es(a,P,k){var c=[];a0(k),a=W(c,a,"privateKey");var w,Q=0|X._crypto_scalarmult_scalarbytes();a.length!==Q&&i0(c,"invalid privateKey length"),w=Z(a),c.push(w),P=W(c,P,"publicKey");var S,F=0|X._crypto_scalarmult_bytes();P.length!==F&&i0(c,"invalid publicKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"weak public key")}function ts(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_scalarmult_scalarbytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"unknown error")}function _s(a,P,k){var c=[];a0(k),a=W(c,a,"n");var w,Q=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid n length"),w=Z(a),c.push(w),P=W(c,P,"p");var S,F=0|X._crypto_scalarmult_ed25519_bytes();P.length!==F&&i0(c,"invalid p length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ed25519(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid point or scalar is 0")}function is(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_ed25519_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ed25519_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function ss(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_ed25519_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ed25519_base_noclamp(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function os(a,P,k){var c=[];a0(k),a=W(c,a,"n");var w,Q=0|X._crypto_scalarmult_ed25519_scalarbytes();a.length!==Q&&i0(c,"invalid n length"),w=Z(a),c.push(w),P=W(c,P,"p");var S,F=0|X._crypto_scalarmult_ed25519_bytes();P.length!==F&&i0(c,"invalid p length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ed25519_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ed25519_noclamp(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid point or scalar is 0")}function ys(a,P,k){var c=[];a0(k),a=W(c,a,"scalar");var w,Q=0|X._crypto_scalarmult_ristretto255_scalarbytes();a.length!==Q&&i0(c,"invalid scalar length"),w=Z(a),c.push(w),P=W(c,P,"element");var S,F=0|X._crypto_scalarmult_ristretto255_bytes();P.length!==F&&i0(c,"invalid element length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_scalarmult_ristretto255_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_scalarmult_ristretto255(E,w,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"result is identity element")}function Bs(a,P){var k=[];a0(P),a=W(k,a,"scalar");var c,w=0|X._crypto_core_ristretto255_scalarbytes();a.length!==w&&i0(k,"invalid scalar length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_core_ristretto255_bytes()),S=Q.address;if(k.push(S),!(0|X._crypto_scalarmult_ristretto255_base(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"scalar is 0")}function hs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_secretbox_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_secretbox_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;w.push(u0);var c0=new k0(0|X._crypto_secretbox_macbytes()),I0=c0.address;if(w.push(I0),!(0|X._crypto_secretbox_detached(u0,I0,Q,S,0,F,E))){var Q0=w0({mac:c0,cipher:y0},c);return p0(w),Q0}H0(w,"invalid usage")}function us(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_secretbox_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_secretbox_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(S+X._crypto_secretbox_macbytes()|0),u0=y0.address;if(w.push(u0),!(0|X._crypto_secretbox_easy(u0,Q,S,0,F,E))){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function ls(a){var P=[];a0(a);var k=new k0(0|X._crypto_secretbox_keybytes()),c=k.address;P.push(c),X._crypto_secretbox_keygen(c);var w=w0(k,a);return p0(P),w}function ps(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"ciphertext")),F=a.length;Q.push(S),P=W(Q,P,"mac");var V,E=0|X._crypto_secretbox_macbytes();P.length!==E&&i0(Q,"invalid mac length"),V=Z(P),Q.push(V),k=W(Q,k,"nonce");var e0,y0=0|X._crypto_secretbox_noncebytes();k.length!==y0&&i0(Q,"invalid nonce length"),e0=Z(k),Q.push(e0),c=W(Q,c,"key");var u0,c0=0|X._crypto_secretbox_keybytes();c.length!==c0&&i0(Q,"invalid key length"),u0=Z(c),Q.push(u0);var I0=new k0(0|F),Q0=I0.address;if(Q.push(Q0),!(0|X._crypto_secretbox_open_detached(Q0,S,V,F,0,e0,u0))){var R0=w0(I0,w);return p0(Q),R0}H0(Q,"wrong secret key for the given ciphertext")}function js(a,P,k,c){var w=[];a0(c),a=W(w,a,"ciphertext");var Q,S=X._crypto_secretbox_macbytes(),F=a.length;F<S&&i0(w,"ciphertext is too short"),Q=Z(a),w.push(Q),P=W(w,P,"nonce");var V,E=0|X._crypto_secretbox_noncebytes();P.length!==E&&i0(w,"invalid nonce length"),V=Z(P),w.push(V),k=W(w,k,"key");var e0,y0=0|X._crypto_secretbox_keybytes();k.length!==y0&&i0(w,"invalid key length"),e0=Z(k),w.push(e0);var u0=new k0(F-X._crypto_secretbox_macbytes()|0),c0=u0.address;if(w.push(c0),!(0|X._crypto_secretbox_open_easy(c0,Q,F,0,V,e0))){var I0=w0(u0,c);return p0(w),I0}H0(w,"wrong secret key for the given ciphertext")}function ks(a,P,k){var c=[];a0(k),a=W(c,a,"header");var w,Q=0|X._crypto_secretstream_xchacha20poly1305_headerbytes();a.length!==Q&&i0(c,"invalid header length"),w=Z(a),c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_secretstream_xchacha20poly1305_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(52).address;if(!(0|X._crypto_secretstream_xchacha20poly1305_init_pull(V,w,S))){var E=V;return p0(c),E}H0(c,"invalid usage")}function vs(a,P){var k=[];a0(P),a=W(k,a,"key");var c,w=0|X._crypto_secretstream_xchacha20poly1305_keybytes();a.length!==w&&i0(k,"invalid key length"),c=Z(a),k.push(c);var Q=new k0(52).address,S=new k0(0|X._crypto_secretstream_xchacha20poly1305_headerbytes()),F=S.address;if(k.push(F),!(0|X._crypto_secretstream_xchacha20poly1305_init_push(Q,F,c))){var V={state:Q,header:w0(S,P)};return p0(k),V}H0(k,"invalid usage")}function fs(a){var P=[];a0(a);var k=new k0(0|X._crypto_secretstream_xchacha20poly1305_keybytes()),c=k.address;P.push(c),X._crypto_secretstream_xchacha20poly1305_keygen(c);var w=w0(k,a);return p0(P),w}function as(a,P,k,c){var w=[];a0(c),l2(w,a,"state_address"),P=W(w,P,"cipher");var Q,S=X._crypto_secretstream_xchacha20poly1305_abytes(),F=P.length;F<S&&i0(w,"cipher is too short"),Q=Z(P),w.push(Q);var V=null,E=0;k!=null&&(V=Z(k=W(w,k,"ad")),E=k.length,w.push(V));var e0=new k0(F-X._crypto_secretstream_xchacha20poly1305_abytes()|0),y0=e0.address;w.push(y0);var u0,c0=(u0=fr(1),w.push(u0),(c0=X._crypto_secretstream_xchacha20poly1305_pull(a,y0,0,u0,Q,F,0,V,E)===0&&{tag:X.HEAPU8[u0],message:e0})&&{message:w0(c0.message,c),tag:c0.tag});return p0(w),c0}function gs(a,P,k,c,w){var Q=[];a0(w),l2(Q,a,"state_address");var S=Z(P=W(Q,P,"message_chunk")),F=P.length;Q.push(S);var V=null,E=0;k!=null&&(V=Z(k=W(Q,k,"ad")),E=k.length,Q.push(V)),l2(Q,c,"tag"),(typeof c!="number"||(0|c)!==c||c<0)&&i0(Q,"tag must be an unsigned integer");var e0=new k0(F+X._crypto_secretstream_xchacha20poly1305_abytes()|0),y0=e0.address;if(Q.push(y0),!(0|X._crypto_secretstream_xchacha20poly1305_push(a,y0,0,S,F,0,V,E,0,c))){var u0=w0(e0,w);return p0(Q),u0}H0(Q,"invalid usage")}function cs(a,P){var k=[];return a0(P),l2(k,a,"state_address"),X._crypto_secretstream_xchacha20poly1305_rekey(a),p0(k),!0}function qs(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_shorthash_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_shorthash_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_shorthash(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ps(a){var P=[];a0(a);var k=new k0(0|X._crypto_shorthash_keybytes()),c=k.address;P.push(c),X._crypto_shorthash_keygen(c);var w=w0(k,a);return p0(P),w}function Ts(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"key");var S,F=0|X._crypto_shorthash_siphashx24_keybytes();P.length!==F&&i0(c,"invalid key length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_shorthash_siphashx24_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_shorthash_siphashx24(E,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ws(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_sign_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(a.length+X._crypto_sign_bytes()|0),E=V.address;if(c.push(E),!(0|X._crypto_sign(E,null,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function ms(a,P,k){var c=[];a0(k);var w=Z(a=W(c,a,"message")),Q=a.length;c.push(w),P=W(c,P,"privateKey");var S,F=0|X._crypto_sign_secretkeybytes();P.length!==F&&i0(c,"invalid privateKey length"),S=Z(P),c.push(S);var V=new k0(0|X._crypto_sign_bytes()),E=V.address;if(c.push(E),!(0|X._crypto_sign_detached(E,null,w,Q,0,S))){var e0=w0(V,k);return p0(c),e0}H0(c,"invalid usage")}function Ds(a,P){var k=[];a0(P),a=W(k,a,"edPk");var c,w=0|X._crypto_sign_publickeybytes();a.length!==w&&i0(k,"invalid edPk length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_pk_to_curve25519(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Ms(a,P){var k=[];a0(P),a=W(k,a,"edSk");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid edSk length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_scalarmult_scalarbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_curve25519(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Ss(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_publickeybytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_pk(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Is(a,P){var k=[];a0(P),a=W(k,a,"privateKey");var c,w=0|X._crypto_sign_secretkeybytes();a.length!==w&&i0(k,"invalid privateKey length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_seedbytes()),S=Q.address;if(k.push(S),!(0|X._crypto_sign_ed25519_sk_to_seed(S,c))){var F=w0(Q,P);return p0(k),F}H0(k,"invalid key")}function Cs(a,P,k){var c=[];a0(k),l2(c,a,"state_address"),P=W(c,P,"privateKey");var w,Q=0|X._crypto_sign_secretkeybytes();P.length!==Q&&i0(c,"invalid privateKey length"),w=Z(P),c.push(w);var S=new k0(0|X._crypto_sign_bytes()),F=S.address;if(c.push(F),!(0|X._crypto_sign_final_create(a,F,null,w))){var V=(X._free(a),w0(S,k));return p0(c),V}H0(c,"invalid usage")}function Hs(a,P,k,c){var w=[];a0(c),l2(w,a,"state_address"),P=W(w,P,"signature");var Q,S=0|X._crypto_sign_bytes();P.length!==S&&i0(w,"invalid signature length"),Q=Z(P),w.push(Q),k=W(w,k,"publicKey");var F,V=0|X._crypto_sign_publickeybytes();k.length!==V&&i0(w,"invalid publicKey length"),F=Z(k),w.push(F);var E=!(0|X._crypto_sign_final_verify(a,Q,F));return p0(w),E}function Ys(a){var P=[];a0(a);var k=new k0(208).address;if(!(0|X._crypto_sign_init(k))){var c=k;return p0(P),c}H0(P,"internal error")}function Qs(a){var P=[];a0(a);var k=new k0(0|X._crypto_sign_publickeybytes()),c=k.address;P.push(c);var w=new k0(0|X._crypto_sign_secretkeybytes()),Q=w.address;if(P.push(Q),!(0|X._crypto_sign_keypair(c,Q))){var S={publicKey:w0(k,a),privateKey:w0(w,a),keyType:"ed25519"};return p0(P),S}H0(P,"internal error")}function Gs(a,P,k){var c=[];a0(k),a=W(c,a,"signedMessage");var w,Q=X._crypto_sign_bytes(),S=a.length;S<Q&&i0(c,"signedMessage is too short"),w=Z(a),c.push(w),P=W(c,P,"publicKey");var F,V=0|X._crypto_sign_publickeybytes();P.length!==V&&i0(c,"invalid publicKey length"),F=Z(P),c.push(F);var E=new k0(S-X._crypto_sign_bytes()|0),e0=E.address;if(c.push(e0),!(0|X._crypto_sign_open(e0,null,w,S,0,F))){var y0=w0(E,k);return p0(c),y0}H0(c,"incorrect signature for the given public key")}function Ls(a,P){var k=[];a0(P),a=W(k,a,"seed");var c,w=0|X._crypto_sign_seedbytes();a.length!==w&&i0(k,"invalid seed length"),c=Z(a),k.push(c);var Q=new k0(0|X._crypto_sign_publickeybytes()),S=Q.address;k.push(S);var F=new k0(0|X._crypto_sign_secretkeybytes()),V=F.address;if(k.push(V),!(0|X._crypto_sign_seed_keypair(S,V,c))){var E={publicKey:w0(Q,P),privateKey:w0(F,P),keyType:"ed25519"};return p0(k),E}H0(k,"invalid usage")}function Xs(a,P,k){var c=[];a0(k),l2(c,a,"state_address");var w=Z(P=W(c,P,"message_chunk")),Q=P.length;c.push(w),0|X._crypto_sign_update(a,w,Q,0)&&H0(c,"invalid usage"),p0(c)}function ds(a,P,k){var c=[];a=W(c,a,"signature");var w,Q=0|X._crypto_sign_bytes();a.length!==Q&&i0(c,"invalid signature length"),w=Z(a),c.push(w);var S=Z(P=W(c,P,"message")),F=P.length;c.push(S),k=W(c,k,"publicKey");var V,E=0|X._crypto_sign_publickeybytes();k.length!==E&&i0(c,"invalid publicKey length"),V=Z(k),c.push(V);var e0=!(0|X._crypto_sign_verify_detached(w,S,F,0,V));return p0(c),e0}function Rs(a,P,k,c){var w=[];a0(c),l2(w,a,"outLength"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(w,"outLength must be an unsigned integer"),P=W(w,P,"key");var Q,S=0|X._crypto_stream_chacha20_keybytes();P.length!==S&&i0(w,"invalid key length"),Q=Z(P),w.push(Q),k=W(w,k,"nonce");var F,V=0|X._crypto_stream_chacha20_noncebytes();k.length!==V&&i0(w,"invalid nonce length"),F=Z(k),w.push(F);var E=new k0(0|a),e0=E.address;w.push(e0),X._crypto_stream_chacha20(e0,a,0,F,Q);var y0=w0(E,c);return p0(w),y0}function Fs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_chacha20_ietf_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_chacha20_ietf_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_chacha20_ietf_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Ks(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_chacha20_ietf_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_chacha20_ietf_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_chacha20_ietf_xor_ic(c0,S,F,0,V,k,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function Ns(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_chacha20_keybytes()),c=k.address;P.push(c),X._crypto_stream_chacha20_keygen(c);var w=w0(k,a);return p0(P),w}function Os(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_chacha20_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_chacha20_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_chacha20_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function Us(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_chacha20_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_chacha20_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_chacha20_xor_ic(c0,S,F,0,V,k,0,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function xs(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_keybytes()),c=k.address;P.push(c),X._crypto_stream_keygen(c);var w=w0(k,a);return p0(P),w}function Vs(a){var P=[];a0(a);var k=new k0(0|X._crypto_stream_xchacha20_keybytes()),c=k.address;P.push(c),X._crypto_stream_xchacha20_keygen(c);var w=w0(k,a);return p0(P),w}function zs(a,P,k,c){var w=[];a0(c);var Q=Z(a=W(w,a,"input_message")),S=a.length;w.push(Q),P=W(w,P,"nonce");var F,V=0|X._crypto_stream_xchacha20_noncebytes();P.length!==V&&i0(w,"invalid nonce length"),F=Z(P),w.push(F),k=W(w,k,"key");var E,e0=0|X._crypto_stream_xchacha20_keybytes();k.length!==e0&&i0(w,"invalid key length"),E=Z(k),w.push(E);var y0=new k0(0|S),u0=y0.address;if(w.push(u0),X._crypto_stream_xchacha20_xor(u0,Q,S,0,F,E)===0){var c0=w0(y0,c);return p0(w),c0}H0(w,"invalid usage")}function $s(a,P,k,c,w){var Q=[];a0(w);var S=Z(a=W(Q,a,"input_message")),F=a.length;Q.push(S),P=W(Q,P,"nonce");var V,E=0|X._crypto_stream_xchacha20_noncebytes();P.length!==E&&i0(Q,"invalid nonce length"),V=Z(P),Q.push(V),l2(Q,k,"nonce_increment"),(typeof k!="number"||(0|k)!==k||k<0)&&i0(Q,"nonce_increment must be an unsigned integer"),c=W(Q,c,"key");var e0,y0=0|X._crypto_stream_xchacha20_keybytes();c.length!==y0&&i0(Q,"invalid key length"),e0=Z(c),Q.push(e0);var u0=new k0(0|F),c0=u0.address;if(Q.push(c0),X._crypto_stream_xchacha20_xor_ic(c0,S,F,0,V,k,0,e0)===0){var I0=w0(u0,w);return p0(Q),I0}H0(Q,"invalid usage")}function Zs(a,P){var k=[];a0(P),l2(k,a,"length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(k,"length must be an unsigned integer");var c=new k0(0|a),w=c.address;k.push(w),X._randombytes_buf(w,a);var Q=w0(c,P);return p0(k),Q}function Ws(a,P,k){var c=[];a0(k),l2(c,a,"length"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(c,"length must be an unsigned integer"),P=W(c,P,"seed");var w,Q=0|X._randombytes_seedbytes();P.length!==Q&&i0(c,"invalid seed length"),w=Z(P),c.push(w);var S=new k0(0|a),F=S.address;c.push(F),X._randombytes_buf_deterministic(F,a,w);var V=w0(S,k);return p0(c),V}function Js(a){a0(a),X._randombytes_close()}function Es(a){a0(a);var P=X._randombytes_random()>>>0;return p0([]),P}function bs(a,P){var k=[];a0(P);for(var c=X._malloc(24),w=0;w<6;w++)X.setValue(c+4*w,X.Runtime.addFunction(a[["implementation_name","random","stir","uniform","buf","close"][w]]),"i32");0|X._randombytes_set_implementation(c)&&H0(k,"unsupported implementation"),p0(k)}function ro(a){a0(a),X._randombytes_stir()}function Ao(a,P){var k=[];a0(P),l2(k,a,"upper_bound"),(typeof a!="number"||(0|a)!==a||a<0)&&i0(k,"upper_bound must be an unsigned integer");var c=X._randombytes_uniform(a)>>>0;return p0(k),c}function no(){var a=X._sodium_version_string(),P=X.UTF8ToString(a);return p0([]),P}k0.prototype.to_Uint8Array=function(){var a=new Uint8Array(this.length);return a.set(X.HEAPU8.subarray(this.address,this.address+this.length)),a},f2.add=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be added");var k=a.length,c=0,w=0;if(P.length!==a.length)throw new TypeError("Arguments must have the same length");for(w=0;w<k;w++)c>>=8,c+=a[w]+P[w],a[w]=255&c},f2.base64_variants=dr,f2.compare=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(a.length!==P.length)throw new TypeError("Only instances of identical length can be compared");for(var k=0,c=1,w=a.length;w-- >0;)k|=P[w]-a[w]>>8&c,c&=(P[w]^a[w])-1>>8;return k+k+c-1},f2.from_base64=function(a,P){P=Ke(P);var k,c=[],w=new k0(3*(a=W(c,a,"input")).length/4),Q=Z(a),S=fr(4),F=fr(4);return c.push(Q),c.push(w.address),c.push(S),c.push(F),X._sodium_base642bin(w.address,w.length,Q,a.length,0,S,F,P)!==0&&H0(c,"invalid input"),X.getValue(F,"i32")-Q!==a.length&&H0(c,"incomplete input"),w.length=X.getValue(S,"i32"),k=w.to_Uint8Array(),p0(c),k},f2.from_hex=function(a){var P,k=[],c=new k0((a=W(k,a,"input")).length/2),w=Z(a),Q=fr(4);return k.push(w),k.push(c.address),k.push(Q),X._sodium_hex2bin(c.address,c.length,w,a.length,0,0,Q)!==0&&H0(k,"invalid input"),X.getValue(Q,"i32")-w!==a.length&&H0(k,"incomplete input"),P=c.to_Uint8Array(),p0(k),P},f2.from_string=A6,f2.increment=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be incremented");for(var P=256,k=0,c=a.length;k<c;k++)P>>=8,P+=a[k],a[k]=255&P},f2.is_zero=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be checked");for(var P=0,k=0,c=a.length;k<c;k++)P|=a[k];return P===0},f2.libsodium=e4,f2.memcmp=function(a,P){if(!(a instanceof Uint8Array&&P instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be compared");if(a.length!==P.length)throw new TypeError("Only instances of identical length can be compared");for(var k=0,c=0,w=a.length;c<w;c++)k|=a[c]^P[c];return k===0},f2.memzero=function(a){if(!(a instanceof Uint8Array))throw new TypeError("Only Uint8Array instances can be wiped");for(var P=0,k=a.length;P<k;P++)a[P]=0},f2.output_formats=function(){return["uint8array","text","hex","base64"]},f2.pad=function(a,P){if(!(a instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((P|=0)<=0)throw new Error("block size must be > 0");var k,c=[],w=fr(4),Q=1,S=0,F=0|a.length,V=new k0(F+P);c.push(w),c.push(V.address);for(var E=V.address,e0=V.address+F+P;E<e0;E++)X.HEAPU8[E]=a[S],S+=Q=1&~((65535&((F-=Q)>>>48|F>>>32|F>>>16|F))-1>>16);return X._sodium_pad(w,V.address,a.length,P,V.length)!==0&&H0(c,"internal error"),V.length=X.getValue(w,"i32"),k=V.to_Uint8Array(),p0(c),k},f2.unpad=function(a,P){if(!(a instanceof Uint8Array))throw new TypeError("buffer must be a Uint8Array");if((P|=0)<=0)throw new Error("block size must be > 0");var k=[],c=Z(a),w=fr(4);return k.push(c),k.push(w),X._sodium_unpad(w,c,a.length,P)!==0&&H0(k,"unsupported/invalid padding"),a=(a=new Uint8Array(a)).subarray(0,X.getValue(w,"i32")),p0(k),a},f2.ready=S3,f2.symbols=function(){return Object.keys(f2).sort()},f2.to_base64=Ne,f2.to_hex=Fe,f2.to_string=hA;class Ue{buf;view;pos;constructor(P){this.buf=P,this.view=new DataView(P.buffer,P.byteOffset,P.byteLength),this.pos=0}take(P){if(this.pos+P>this.buf.length)throw new Error("Decoder: unexpected end of input");const k=this.buf.subarray(this.pos,this.pos+P);return this.pos+=P,k}takeAll(){const P=this.buf.subarray(this.pos);return this.pos=this.buf.length,P}anyByte(){if(this.pos>=this.buf.length)throw new Error("Decoder: unexpected end of input");return this.buf[this.pos++]}remaining(){return this.buf.length-this.pos}offset(){return this.pos}}function T6(...a){let P=0;for(const w of a)P+=w.length;const k=new Uint8Array(P);let c=0;for(const w of a)k.set(w,c),c+=w.length;return k}function Qe(a){const P=new Uint8Array(4);return new DataView(P.buffer).setUint32(0,a,!1),P}function Ge(a){const P=a.take(4);return new DataView(P.buffer,P.byteOffset,P.byteLength).getUint32(0,!1)}function eo(a){const P=Number(a>>32n&0xFFFFFFFFn),k=Number(a&0xFFFFFFFFn);return T6(Qe(P),Qe(k))}function to(a){const P=BigInt(Ge(a)),k=BigInt(Ge(a)),c=P<<32n|k;return c>=0x8000000000000000n?c-0x10000000000000000n:c}function _o(a){if(a.length>255)throw new Error("encodeBytes: length exceeds 255");const P=new Uint8Array(1+a.length);return P[0]=a.length,P.set(a,1),P}function io(a){const P=a.anyByte();return a.take(P)}const so=new TextEncoder,oo=new TextDecoder;function yo(a){return _o(so.encode(a))}function Le(a){return oo.decode(io(a))}const xe=48,Bo=49;function ho(a,P){return new Uint8Array([xe])}function uo(a,P){const k=P.anyByte();if(k===xe)return null;if(k===Bo)return a(P);throw new Error("decodeMaybe: invalid tag "+k)}function lo(a){return po(a).content}function po(a){if(a.length<8)throw new Error("splitLen: input too short");const P=new Ue(a),k=to(P);if(k<0n)throw new Error("splitLen: negative length");const c=Number(k),w=a.length-8,Q=Math.min(c,w);return{len:k,content:a.subarray(8,8+Q)}}const Xe=f2;function V1(a,P){return(a[P]|a[P+1]<<8|a[P+2]<<16|a[P+3]<<24)>>>0}function B1(a,P,k){a[P]=k&255,a[P+1]=k>>>8&255,a[P+2]=k>>>16&255,a[P+3]=k>>>24&255}function Y2(a,P){return(a<<P|a>>>32-P)>>>0}const jo=1634760805,ko=857760878,vo=2036477234,fo=1797285236;function Ve(a,P,k){const c=V1(a,0),w=V1(a,4),Q=V1(a,8),S=V1(a,12),F=V1(a,16),V=V1(a,20),E=V1(a,24),e0=V1(a,28),y0=V1(P,0),u0=V1(P,4),c0=jo,I0=c,Q0=w,R0=Q,N0=S,E0=ko,o2=y0,S2=u0,s1=k>>>0,R1=0,n6=vo,m6=F,uA=V,D6=E,M6=e0,S6=fo;let z1=c0,$1=I0,F1=Q0,K1=R0,Z1=N0,N1=E0,W1=o2,u1=S2,f1=s1,J1=R1,E1=n6,b1=m6,rr=uA,O1=D6,Ar=M6,nr=S6;for(let I6=0;I6<10;I6++)Z1^=Y2(z1+rr>>>0,7),f1^=Y2(Z1+z1>>>0,9),rr^=Y2(f1+Z1>>>0,13),z1^=Y2(rr+f1>>>0,18),J1^=Y2(N1+$1>>>0,7),O1^=Y2(J1+N1>>>0,9),$1^=Y2(O1+J1>>>0,13),N1^=Y2($1+O1>>>0,18),Ar^=Y2(E1+W1>>>0,7),F1^=Y2(Ar+E1>>>0,9),W1^=Y2(F1+Ar>>>0,13),E1^=Y2(W1+F1>>>0,18),K1^=Y2(nr+b1>>>0,7),u1^=Y2(K1+nr>>>0,9),b1^=Y2(u1+K1>>>0,13),nr^=Y2(b1+u1>>>0,18),$1^=Y2(z1+K1>>>0,7),F1^=Y2($1+z1>>>0,9),K1^=Y2(F1+$1>>>0,13),z1^=Y2(K1+F1>>>0,18),W1^=Y2(N1+Z1>>>0,7),u1^=Y2(W1+N1>>>0,9),Z1^=Y2(u1+W1>>>0,13),N1^=Y2(Z1+u1>>>0,18),b1^=Y2(E1+J1>>>0,7),f1^=Y2(b1+E1>>>0,9),J1^=Y2(f1+b1>>>0,13),E1^=Y2(J1+f1>>>0,18),rr^=Y2(nr+Ar>>>0,7),O1^=Y2(rr+nr>>>0,9),Ar^=Y2(O1+rr>>>0,13),nr^=Y2(Ar+O1>>>0,18);const z2=new Uint8Array(64);return B1(z2,0,z1+c0>>>0),B1(z2,4,$1+I0>>>0),B1(z2,8,F1+Q0>>>0),B1(z2,12,K1+R0>>>0),B1(z2,16,Z1+N0>>>0),B1(z2,20,N1+E0>>>0),B1(z2,24,W1+o2>>>0),B1(z2,28,u1+S2>>>0),B1(z2,32,f1+s1>>>0),B1(z2,36,J1+R1>>>0),B1(z2,40,E1+n6>>>0),B1(z2,44,b1+m6>>>0),B1(z2,48,rr+uA>>>0),B1(z2,52,O1+D6>>>0),B1(z2,56,Ar+M6>>>0),B1(z2,60,nr+S6>>>0),z2}function t4(a,P){const k=new Uint8Array(16),c=Xe.crypto_core_hsalsa20(k,a),w=Xe.crypto_core_hsalsa20(P.subarray(0,16),c),Q=new Uint8Array(P.subarray(16,24)),S=Ve(w,Q,0),F=S.subarray(0,32),V=new Uint8Array(S.subarray(32)),E=f2.crypto_onetimeauth_init(F);return{_subkey:w,_nonce8:Q,_counter:1,_ksBuf:V,_ksOff:0,_authState:E}}function ao(a,P){return t4(a,P)}function bA(a,P){const k=$e(a,P);return f2.crypto_onetimeauth_update(a._authState,k),k}function ze(a,P){return f2.crypto_onetimeauth_update(a._authState,P),$e(a,P)}function _4(a){return f2.crypto_onetimeauth_final(a._authState)}function go(a,P,k,c){const w=Number(k),Q=c.subarray(0,w),S=c.subarray(w),F=t4(a,P),V=ze(F,Q),E=_4(F),e0=S.length===16&&co(S,E),y0=lo(V);return{valid:e0,content:y0}}function $e(a,P){const k=new Uint8Array(P.length);let c=0;for(;c<P.length;){a._ksOff>=a._ksBuf.length&&(a._ksBuf=Ve(a._subkey,a._nonce8,a._counter++),a._ksOff=0);const w=a._ksBuf.length-a._ksOff,Q=P.length-c,S=Math.min(w,Q);for(let F=0;F<S;F++)k[c+F]=P[c+F]^a._ksBuf[a._ksOff+F];a._ksOff+=S,c+=S}return k}function co(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const Ze=16n;function qo(a){return T6(yo(a.fileName),ho())}function Po(a){const P=Math.min(1024,a.length),k=new Ue(a.subarray(0,P)),c=Le(k),w=uo(Le,k),Q=k.offset();return{header:{fileName:c,fileExtra:w},rest:a.subarray(Q)}}function To(a,P,k,c,w,Q){const S=t4(k,c),F=eo(w),V=Number(Q-Ze-w-8n);if(V<0)throw new Error("encryptFile: encSize too small");const E=bA(S,T6(F,P)),e0=bA(S,a),y0=new Uint8Array(V);y0.fill(35);const u0=bA(S,y0),c0=_4(S);return T6(E,e0,u0,c0)}function wo(a,P,k,c){if(P.length===0)throw new Error("decryptChunks: empty chunks");const w=a-Ze,Q=P.length===1?P[0]:T6(...P),{valid:S,content:F}=go(k,c,w,Q);if(!S)throw new Error("decryptChunks: invalid auth tag");const{header:V,rest:E}=Po(F);return{header:V,content:E}}function mo(a){return f2.crypto_hash_sha256(a)}function We(a){const k=f2.crypto_hash_sha512_init();for(const c of a)for(let w=0;w<c.length;w+=4194304)f2.crypto_hash_sha512_update(k,c.subarray(w,Math.min(w+4194304,c.length)));return f2.crypto_hash_sha512_final(k)}const Do="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Je=new Uint8Array(128);Je.fill(255);for(let a=0;a<64;a++)Je[Do.charCodeAt(a)]=a;const Ee=a=>a*1024,be=a=>a*1048576,Mo=Ee(64),de=Ee(256),r4=be(1),Re=be(4),So=8,Io=16;function A4(a){return Math.floor(a*3/4)}function Co(a){let P,k;a>A4(Re)?(P=r4,k=Re):a>A4(r4)?(P=de,k=r4):(P=Mo,k=de);function c(w){if(w===0)return[];if(w>=k){const F=Math.floor(w/k),V=w%k;return new Array(F).fill(k).concat(c(V))}if(w>A4(k))return[k];const Q=Math.floor(w/P),S=w%P;return new Array(S===0?Q:Q+1).fill(P)}return c(a)}await f2.ready;function Ho(a,P,k){if(k.length<16)return{valid:!1,content:new Uint8Array(0),computedTag:new Uint8Array(0)};const c=k.subarray(0,k.length-16),w=k.subarray(k.length-16),Q=ao(a,P),S=ze(Q,c),F=_4(Q);return{valid:Yo(w,F),content:S,computedTag:F}}function Yo(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}function Qo(a,P,k,c){k.slice(k.length-16);const{valid:w,content:Q}=Ho(a,P,k);if(!w)throw new Error("transport auth tag verification failed");if(c!==null){const S=mo(Q);if(!Go(S,c))throw new Error("chunk digest mismatch")}return Q}function Go(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const rt=`session-${Date.now()}-${crypto.randomUUID()}`;let r6=null,h1=null;const gr=new Map;let P6=0,BA=null,ar=!1;const cr=new Map;async function w6(){return BA||(BA=await(await navigator.storage.getDirectory()).getDirectoryHandle(rt,{create:!0})),BA}async function Lo(){const a=await navigator.storage.getDirectory(),P=Date.now()-36e5;for await(const[k]of a.entries()){if(!k.startsWith("session-"))continue;const c=k.split("-"),w=parseInt(c[1],10);if(!isNaN(w)&&w<P)try{await a.removeEntry(k,{recursive:!0})}catch{}}}async function Xo(a,P,k){const c=new Uint8Array(P),w=new Uint8Array(32),Q=new Uint8Array(24);crypto.getRandomValues(w),crypto.getRandomValues(Q);const S=qo({fileName:k}),F=BigInt(S.length+c.length),V=Number(F)+So+Io,E=Co(V),e0=BigInt(E.reduce((N0,E0)=>N0+E0,0)),y0=To(c,S,w,Q,F,e0);self.postMessage({id:a,type:"progress",done:50,total:100});const u0=We([y0]);console.log(`[WORKER-DBG] encrypt: encData.len=${y0.length} digest=${b2(u0,64)} chunkSizes=[${E.join(",")}]`),self.postMessage({id:a,type:"progress",done:80,total:100});const I0=await(await w6()).getFileHandle("upload.bin",{create:!0}),Q0=await I0.createSyncAccessHandle(),R0=Q0.write(y0);if(R0!==y0.length)throw new Error(`OPFS upload write: ${R0}/${y0.length}`);Q0.flush(),Q0.close(),r6=await I0.createSyncAccessHandle(),self.postMessage({id:a,type:"progress",done:100,total:100}),self.postMessage({id:a,type:"encrypted",digest:u0,key:w,nonce:Q,chunkSizes:E})}function Ro(a,P,k){if(!r6){self.postMessage({id:a,type:"error",message:"No upload file open"});return}const c=new Uint8Array(k);r6.read(c,{at:P});const w=c.buffer;self.postMessage({id:a,type:"chunk",data:w},[w])}async function Fo(a,P,k,c,w,Q){const S=new Uint8Array(c);console.log(`[WORKER-DBG] store chunk=${Q} body.len=${S.length} nonce=${b2(k,24)} dhSecret=${b2(P)} digest=${b2(w,32)} body[0..8]=${b2(S)} body[-8..]=${b2(S.slice(-8))}`);const F=Qo(P,k,S,w);if(console.log(`[WORKER-DBG] decrypted chunk=${Q} len=${F.length} [0..8]=${b2(F)} [-8..]=${b2(F.slice(-8))}`),ar){cr.set(Q,F),self.postMessage({id:a,type:"stored"});return}h1||(h1=await(await(await w6()).getFileHandle("download.bin",{create:!0})).createSyncAccessHandle());const V=P6;P6+=F.length,gr.set(Q,{offset:V,size:F.length});const E=h1.write(F,{at:V});if(console.log(`[WORKER-DBG] OPFS write chunk=${Q} offset=${V} size=${F.length} written=${E}`),E!==F.length){console.warn(`[WORKER] OPFS write failed chunk=${Q}: ${E}/${F.length}, falling back to in-memory storage`);for(const[u0,c0]of gr.entries()){if(u0===Q)continue;const I0=new Uint8Array(c0.size);h1.read(I0,{at:c0.offset}),cr.set(u0,I0)}h1.close(),h1=null;try{await(await w6()).removeEntry("download.bin")}catch{}gr.clear(),P6=0,cr.set(Q,F),ar=!0,self.postMessage({id:a,type:"stored"});return}h1.flush();const e0=new Uint8Array(Math.min(8,F.length));h1.read(e0,{at:V});const y0=new Uint8Array(Math.min(8,F.length));h1.read(y0,{at:V+F.length-y0.length}),console.log(`[WORKER-DBG] OPFS verify chunk=${Q} readBack[0..8]=${b2(e0)} readBack[-8..]=${b2(y0)} expected[0..8]=${b2(F)} expected[-8..]=${b2(F.slice(-8))}`),self.postMessage({id:a,type:"stored"})}async function Ko(a,P,k,c,w){console.log(`[WORKER-DBG] verify: expectedSize=${P} expectedDigest=${b2(k,64)} useMemory=${ar} chunkMeta.size=${gr.size} memoryChunks.size=${cr.size}`);const Q=[];let S=0;const V=(ar?cr.size:gr.size)*2+1;let E=0;if(ar){const I0=[...cr.entries()].sort((Q0,R0)=>Q0[0]-R0[0]);for(const[Q0,R0]of I0)console.log(`[WORKER-DBG] verify memory chunk=${Q0} size=${R0.length}`),Q.push(R0),S+=R0.length,self.postMessage({id:a,type:"progress",done:++E,total:V})}else{h1&&(h1.flush(),h1.close(),h1=null);const R0=await(await(await w6()).getFileHandle("download.bin")).createSyncAccessHandle();console.log(`[WORKER-DBG] verify: OPFS file size=${R0.getSize()}`);const N0=[...gr.entries()].sort((E0,o2)=>E0[0]-o2[0]);for(const[E0,o2]of N0){const S2=new Uint8Array(o2.size),s1=R0.read(S2,{at:o2.offset});console.log(`[WORKER-DBG] verify read chunk=${E0} offset=${o2.offset} size=${o2.size} bytesRead=${s1} [0..8]=${b2(S2)} [-8..]=${b2(S2.slice(-8))}`),Q.push(S2),S+=o2.size,self.postMessage({id:a,type:"progress",done:++E,total:V})}R0.close()}if(S!==P){self.postMessage({id:a,type:"error",message:`File size mismatch: ${S} !== ${P}`});return}const e0=f2.crypto_hash_sha512_init();for(let I0=0;I0<Q.length;I0++){const Q0=Q[I0],R0=4*1024*1024;for(let N0=0;N0<Q0.length;N0+=R0)f2.crypto_hash_sha512_update(e0,Q0.subarray(N0,Math.min(N0+R0,Q0.length)));self.postMessage({id:a,type:"progress",done:++E,total:V})}const y0=f2.crypto_hash_sha512_final(e0);if(!Oo(y0,k)){console.error(`[WORKER-DBG] DIGEST MISMATCH: expected=${b2(k,64)} actual=${b2(y0,64)} chunks=${Q.length} totalSize=${S}`);const I0=f2.crypto_hash_sha512_init();for(let Q0=0;Q0<Q.length;Q0++){const R0=Q[Q0],N0=4*1024*1024;for(let o2=0;o2<R0.length;o2+=N0)f2.crypto_hash_sha512_update(I0,R0.subarray(o2,Math.min(o2+N0,R0.length)));const E0=We([R0]);console.error(`[WORKER-DBG] chunk[${Q0}] size=${R0.length} sha512=${b2(E0,32)}… [0..8]=${b2(R0)} [-8..]=${b2(R0.slice(-8))}`)}self.postMessage({id:a,type:"error",message:"File digest mismatch"});return}console.log("[WORKER-DBG] verify: digest OK");const u0=wo(BigInt(P),Q,c,w);if(!ar){const I0=await w6();try{await I0.removeEntry("download.bin")}catch{}}gr.clear(),cr.clear(),P6=0,ar=!1;const c0=u0.content.buffer.slice(u0.content.byteOffset,u0.content.byteOffset+u0.content.byteLength);self.postMessage({id:a,type:"decrypted",header:u0.header,content:c0},[c0])}async function No(a){r6&&(r6.close(),r6=null),h1&&(h1.close(),h1=null),gr.clear(),cr.clear(),P6=0,ar=!1;try{await(await navigator.storage.getDirectory()).removeEntry(rt,{recursive:!0})}catch{}BA=null,self.postMessage({id:a,type:"cleaned"})}self.onmessage=async a=>{const P=a.data;try{switch(await At,P.type){case"encrypt":await Xo(P.id,P.data,P.fileName);break;case"readChunk":Ro(P.id,P.offset,P.size);break;case"decryptAndStoreChunk":await Fo(P.id,P.dhSecret,P.nonce,P.body,P.chunkDigest,P.chunkNo);break;case"verifyAndDecrypt":await Ko(P.id,P.size,P.digest,P.key,P.nonce);break;case"cleanup":await No(P.id);break;default:self.postMessage({id:P.id,type:"error",message:`Unknown message type: ${P.type}`})}}catch(k){self.postMessage({id:P.id,type:"error",message:k?.message??String(k)})}};function b2(a,P=8){return Array.from(a.slice(0,P)).map(k=>k.toString(16).padStart(2,"0")).join("")}function Oo(a,P){if(a.length!==P.length)return!1;let k=0;for(let c=0;c<a.length;c++)k|=a[c]^P[c];return k===0}const At=(async()=>{await f2.ready,await Lo()})();At.then(()=>self.postMessage({type:"ready"}),()=>{});
|