UNPKG

matrix-js-sdk

Version:
1 lines 5.94 MB
!function A(g,I,Q){function C(E,i){if(!I[E]){if(!g[E]){var o="function"==typeof require&&require;if(!i&&o)return o(E,!0);if(B)return B(E,!0);var n=new Error("Cannot find module '"+E+"'");throw n.code="MODULE_NOT_FOUND",n}var D=I[E]={exports:{}};g[E][0].call(D.exports,(function(A){return C(g[E][1][A]||A)}),D,D.exports,A,g,I,Q)}return I[E].exports}for(var B="function"==typeof require&&require,E=0;E<Q.length;E++)C(Q[E]);return C}({1:[function(A,g,I){(function(I){(function(){let Q,C={};C.__wbindgen_placeholder__=g.exports;let B=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});B.decode();let E=new Uint8Array;function i(){return 0===E.byteLength&&(E=new Uint8Array(Q.memory.buffer)),E}function o(A,g){return B.decode(i().subarray(A,A+g))}const n=new Array(32).fill(void 0);n.push(void 0,null,!0,!1);let D=n.length;function e(A){D===n.length&&n.push(n.length+1);const g=D;return D=n[g],n[g]=A,g}function t(A){return n[A]}function a(A){const g=t(A);return function(A){A<36||(n[A]=D,D=A)}(A),g}let s=0,w=new TextEncoder("utf-8");const h="function"==typeof w.encodeInto?function(A,g){return w.encodeInto(A,g)}:function(A,g){const I=w.encode(A);return g.set(I),{read:A.length,written:I.length}};function c(A,g,I){if(void 0===I){const I=w.encode(A),Q=g(I.length);return i().subarray(Q,Q+I.length).set(I),s=I.length,Q}let Q=A.length,C=g(Q);const B=i();let E=0;for(;E<Q;E++){const g=A.charCodeAt(E);if(g>127)break;B[C+E]=g}if(E!==Q){0!==E&&(A=A.slice(E)),C=I(C,Q,Q=E+3*A.length);const g=i().subarray(C+E,C+Q);E+=h(A,g).written}return s=E,C}function k(A){return null==A}let r=new Int32Array;function y(){return 0===r.byteLength&&(r=new Int32Array(Q.memory.buffer)),r}let G=new Float64Array;function N(A){const g=typeof A;if("number"==g||"boolean"==g||null==A)return`${A}`;if("string"==g)return`"${A}"`;if("symbol"==g){const g=A.description;return null==g?"Symbol":`Symbol(${g})`}if("function"==g){const g=A.name;return"string"==typeof g&&g.length>0?`Function(${g})`:"Function"}if(Array.isArray(A)){const g=A.length;let I="[";g>0&&(I+=N(A[0]));for(let Q=1;Q<g;Q++)I+=", "+N(A[Q]);return I+="]",I}const I=/\[object ([^\]]+)\]/.exec(toString.call(A));let Q;if(!(I.length>1))return toString.call(A);if(Q=I[1],"Object"==Q)try{return"Object("+JSON.stringify(A)+")"}catch(A){return"Object"}return A instanceof Error?`${A.name}: ${A.message}\n${A.stack}`:Q}const M=new FinalizationRegistry((A=>{Q.__wbindgen_export_2.get(A.dtor)(A.a,A.b)}));function J(A,g,I,C){const B={a:A,b:g,cnt:1,dtor:I},E=(...A)=>{B.cnt++;const g=B.a;B.a=0;try{return C(g,B.b,...A)}finally{0==--B.cnt?(Q.__wbindgen_export_2.get(B.dtor)(g,B.b),M.unregister(B)):B.a=g}};return E.original=B,M.register(E,B,B),E}function F(A,g,I){try{const B=Q.__wbindgen_add_to_stack_pointer(-16);Q._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h24315f10dc29b428(B,A,g,e(I));var C=y()[B/4+0];if(y()[B/4+1])throw a(C)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}function R(A,g,I,C){const B={a:A,b:g,cnt:1,dtor:I},E=(...A)=>{B.cnt++;try{return C(B.a,B.b,...A)}finally{0==--B.cnt&&(Q.__wbindgen_export_2.get(B.dtor)(B.a,B.b),B.a=0,M.unregister(B))}};return E.original=B,M.register(E,B,B),E}function Y(A,g){Q._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h547570a0e740e1a5(A,g)}function K(A,g,I){Q._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9f8c3b455b95c8c5(A,g,e(I))}function q(A,g,I){Q._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h036a3dade9d25772(A,g,e(I))}function L(A,g){Q._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hac2e89ce4055d537(A,g)}function d(A,g){try{return A.apply(this,g)}catch(A){Q.__wbindgen_exn_store(e(A))}}function S(A,g){return i().subarray(A/1,A/1+g)}function U(A,g){if(!(A instanceof g))throw new Error(`expected instance of ${g.name}`);return A.ptr}g.exports.start=function(){Q.start()};let l=32;function p(A){if(1==l)throw new Error("out of js stack");return n[--l]=A,l}function u(A,g){const I=g(1*A.length);return i().set(A,I/1),s=A.length,I}g.exports.HistoryVisibility=Object.freeze({Invited:0,0:"Invited",Joined:1,1:"Joined",Shared:2,2:"Shared",WorldReadable:3,3:"WorldReadable"}),g.exports.LocalTrust=Object.freeze({Verified:0,0:"Verified",BlackListed:1,1:"BlackListed",Ignored:2,2:"Ignored",Unset:3,3:"Unset"}),g.exports.RequestType=Object.freeze({KeysUpload:0,0:"KeysUpload",KeysQuery:1,1:"KeysQuery",KeysClaim:2,2:"KeysClaim",ToDevice:3,3:"ToDevice",SignatureUpload:4,4:"SignatureUpload",RoomMessage:5,5:"RoomMessage",KeysBackup:6,6:"KeysBackup"}),g.exports.LoggerLevel=Object.freeze({Trace:0,0:"Trace",Debug:1,1:"Debug",Info:2,2:"Info",Warn:3,3:"Warn",Error:4,4:"Error"}),g.exports.VerificationMethod=Object.freeze({SasV1:0,0:"SasV1",QrCodeScanV1:1,1:"QrCodeScanV1",QrCodeShowV1:2,2:"QrCodeShowV1",ReciprocateV1:3,3:"ReciprocateV1"}),g.exports.CancelCode=Object.freeze({Other:0,0:"Other",User:1,1:"User",Timeout:2,2:"Timeout",UnknownTransaction:3,3:"UnknownTransaction",UnknownMethod:4,4:"UnknownMethod",UnexpectedMessage:5,5:"UnexpectedMessage",KeyMismatch:6,6:"KeyMismatch",UserMismatch:7,7:"UserMismatch",InvalidMessage:8,8:"InvalidMessage",Accepted:9,9:"Accepted",MismatchedCommitment:10,10:"MismatchedCommitment",MismatchedSas:11,11:"MismatchedSas"}),g.exports.DeviceKeyName=Object.freeze({Curve25519:0,0:"Curve25519",Ed25519:1,1:"Ed25519",Unknown:2,2:"Unknown"}),g.exports.EncryptionAlgorithm=Object.freeze({OlmV1Curve25519AesSha2:0,0:"OlmV1Curve25519AesSha2",MegolmV1AesSha2:1,1:"MegolmV1AesSha2"}),g.exports.VerificationState=Object.freeze({Trusted:0,0:"Trusted",Untrusted:1,1:"Untrusted",UnknownDevice:2,2:"UnknownDevice"}),g.exports.DeviceKeyAlgorithmName=Object.freeze({Ed25519:0,0:"Ed25519",Curve25519:1,1:"Curve25519",SignedCurve25519:2,2:"SignedCurve25519",Unknown:3,3:"Unknown"});const H=new FinalizationRegistry((A=>Q.__wbg_attachment_free(A)));g.exports.Attachment=class{__destroy_into_raw(){const A=this.ptr;return this.ptr=0,H.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_attachment_free(A)}static encrypt(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=u(A,Q.__wbindgen_malloc),E=s;Q.attachment_encrypt(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return aA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}static decrypt(A){try{const E=Q.__wbindgen_add_to_stack_pointer(-16);U(A,aA),Q.attachment_decrypt(E,A.ptr);var g=y()[E/4+0],I=y()[E/4+1],C=y()[E/4+2];if(y()[E/4+3])throw a(C);var B=S(g,I).slice();return Q.__wbindgen_free(g,1*I),B}finally{Q.__wbindgen_add_to_stack_pointer(16)}}};const f=new FinalizationRegistry((A=>Q.__wbg_cancelinfo_free(A)));class m{static __wrap(A){const g=Object.create(m.prototype);return g.ptr=A,f.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,f.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_cancelinfo_free(A)}reason(){return a(Q.cancelinfo_reason(this.ptr))}cancelCode(){return Q.cancelinfo_cancelCode(this.ptr)>>>0}cancelledbyUs(){return 0!==Q.cancelinfo_cancelledbyUs(this.ptr)}}g.exports.CancelInfo=m;const b=new FinalizationRegistry((A=>Q.__wbg_crosssigningkeyexport_free(A)));class v{static __wrap(A){const g=Object.create(v.prototype);return g.ptr=A,b.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,b.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_crosssigningkeyexport_free(A)}get masterKey(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.crosssigningkeyexport_masterKey(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get self_signing_key(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.crosssigningkeyexport_self_signing_key(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get userSigningKey(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.crosssigningkeyexport_userSigningKey(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}}g.exports.CrossSigningKeyExport=v;const O=new FinalizationRegistry((A=>Q.__wbg_crosssigningstatus_free(A)));class x{static __wrap(A){const g=Object.create(x.prototype);return g.ptr=A,O.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,O.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_crosssigningstatus_free(A)}get hasMaster(){return 0!==Q.crosssigningstatus_hasMaster(this.ptr)}get hasSelfSigning(){return 0!==Q.crosssigningstatus_hasSelfSigning(this.ptr)}get hasUserSigning(){return 0!==Q.crosssigningstatus_hasUserSigning(this.ptr)}}g.exports.CrossSigningStatus=x;const j=new FinalizationRegistry((A=>Q.__wbg_curve25519publickey_free(A)));class T{static __wrap(A){const g=Object.create(T.prototype);return g.ptr=A,j.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,j.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_curve25519publickey_free(A)}get length(){return Q.curve25519publickey_length(this.ptr)>>>0}toBase64(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.curve25519publickey_toBase64(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.Curve25519PublicKey=T;const W=new FinalizationRegistry((A=>Q.__wbg_decryptedroomevent_free(A)));class Z{static __wrap(A){const g=Object.create(Z.prototype);return g.ptr=A,W.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,W.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_decryptedroomevent_free(A)}get event(){return a(Q.__wbg_get_decryptedroomevent_event(this.ptr))}get sender(){const A=Q.decryptedroomevent_sender(this.ptr);return 0===A?void 0:eg.__wrap(A)}get senderDevice(){const A=Q.decryptedroomevent_senderDevice(this.ptr);return 0===A?void 0:X.__wrap(A)}get senderCurve25519Key(){return a(Q.decryptedroomevent_senderCurve25519Key(this.ptr))}get senderClaimedEd25519Key(){return a(Q.decryptedroomevent_senderClaimedEd25519Key(this.ptr))}get forwardingCurve25519KeyChain(){return a(Q.decryptedroomevent_forwardingCurve25519KeyChain(this.ptr))}get verificationState(){const A=Q.decryptedroomevent_verificationState(this.ptr);return 3===A?void 0:A}}g.exports.DecryptedRoomEvent=Z;const z=new FinalizationRegistry((A=>Q.__wbg_device_free(A)));class P{static __wrap(A){const g=Object.create(P.prototype);return g.ptr=A,z.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,z.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_device_free(A)}requestVerification(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.device_requestVerification(C,this.ptr,k(A)?0:e(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}isVerified(){return 0!==Q.device_isVerified(this.ptr)}isCrossSigningTrusted(){return 0!==Q.device_isCrossSigningTrusted(this.ptr)}setLocalTrust(A){return a(Q.device_setLocalTrust(this.ptr,A))}get userId(){const A=Q.device_userId(this.ptr);return eg.__wrap(A)}get deviceId(){const A=Q.device_deviceId(this.ptr);return X.__wrap(A)}get displayName(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.device_displayName(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}getKey(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.device_getKey(C,this.ptr,A);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return 0===g?void 0:$.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get curve25519Key(){const A=Q.device_curve25519Key(this.ptr);return 0===A?void 0:T.__wrap(A)}get ed25519Key(){const A=Q.device_ed25519Key(this.ptr);return 0===A?void 0:iA.__wrap(A)}get keys(){return a(Q.device_keys(this.ptr))}get signatures(){const A=Q.device_signatures(this.ptr);return gg.__wrap(A)}get localTrustState(){return Q.device_localTrustState(this.ptr)>>>0}isLocallyTrusted(){return 0!==Q.device_isLocallyTrusted(this.ptr)}isBlacklisted(){return 0!==Q.device_isBlacklisted(this.ptr)}isDeleted(){return 0!==Q.device_isDeleted(this.ptr)}}g.exports.Device=P;const V=new FinalizationRegistry((A=>Q.__wbg_deviceid_free(A)));class X{static __wrap(A){const g=Object.create(X.prototype);return g.ptr=A,V.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,V.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_deviceid_free(A)}constructor(A){const g=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),I=s,C=Q.deviceid_new(g,I);return X.__wrap(C)}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.deviceid_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.DeviceId=X;const _=new FinalizationRegistry((A=>Q.__wbg_devicekey_free(A)));class ${static __wrap(A){const g=Object.create($.prototype);return g.ptr=A,_.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,_.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_devicekey_free(A)}get name(){return Q.devicekey_name(this.ptr)>>>0}get curve25519(){const A=Q.devicekey_curve25519(this.ptr);return 0===A?void 0:T.__wrap(A)}get ed25519(){const A=Q.devicekey_ed25519(this.ptr);return 0===A?void 0:iA.__wrap(A)}get unknown(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.devicekey_unknown(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}toBase64(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.devicekey_toBase64(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.DeviceKey=$;const AA=new FinalizationRegistry((A=>Q.__wbg_devicekeyalgorithm_free(A)));class gA{static __wrap(A){const g=Object.create(gA.prototype);return g.ptr=A,AA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,AA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_devicekeyalgorithm_free(A)}get name(){return Q.devicekeyalgorithm_name(this.ptr)>>>0}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.devicekeyalgorithm_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.DeviceKeyAlgorithm=gA;const IA=new FinalizationRegistry((A=>Q.__wbg_devicekeyid_free(A)));class QA{static __wrap(A){const g=Object.create(QA.prototype);return g.ptr=A,IA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,IA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_devicekeyid_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.devicekeyid_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return QA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get algorithm(){const A=Q.devicekeyid_algorithm(this.ptr);return gA.__wrap(A)}get deviceId(){const A=Q.devicekeyid_deviceId(this.ptr);return X.__wrap(A)}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.devicekeyid_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.DeviceKeyId=QA;const CA=new FinalizationRegistry((A=>Q.__wbg_devicelists_free(A)));class BA{static __wrap(A){const g=Object.create(BA.prototype);return g.ptr=A,CA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,CA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_devicelists_free(A)}constructor(A,g){try{const B=Q.__wbindgen_add_to_stack_pointer(-16);Q.devicelists_new(B,k(A)?0:e(A),k(g)?0:e(g));var I=y()[B/4+0],C=y()[B/4+1];if(y()[B/4+2])throw a(C);return BA.__wrap(I)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}isEmpty(){return 0!==Q.devicelists_isEmpty(this.ptr)}get changed(){return a(Q.devicelists_changed(this.ptr))}get left(){return a(Q.devicelists_left(this.ptr))}}g.exports.DeviceLists=BA;const EA=new FinalizationRegistry((A=>Q.__wbg_ed25519publickey_free(A)));class iA{static __wrap(A){const g=Object.create(iA.prototype);return g.ptr=A,EA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,EA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_ed25519publickey_free(A)}get length(){return Q.ed25519publickey_length(this.ptr)>>>0}toBase64(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.ed25519publickey_toBase64(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.Ed25519PublicKey=iA;const oA=new FinalizationRegistry((A=>Q.__wbg_ed25519signature_free(A)));class nA{static __wrap(A){const g=Object.create(nA.prototype);return g.ptr=A,oA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,oA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_ed25519signature_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.ed25519signature_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return nA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}toBase64(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.ed25519signature_toBase64(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.Ed25519Signature=nA;const DA=new FinalizationRegistry((A=>Q.__wbg_emoji_free(A)));class eA{static __wrap(A){const g=Object.create(eA.prototype);return g.ptr=A,DA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,DA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_emoji_free(A)}get symbol(){return a(Q.emoji_symbol(this.ptr))}get description(){return a(Q.emoji_description(this.ptr))}}g.exports.Emoji=eA;const tA=new FinalizationRegistry((A=>Q.__wbg_encryptedattachment_free(A)));class aA{static __wrap(A){const g=Object.create(aA.prototype);return g.ptr=A,tA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,tA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_encryptedattachment_free(A)}constructor(A,g){try{const B=Q.__wbindgen_add_to_stack_pointer(-16),E=u(A,Q.__wbindgen_malloc),i=s,o=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),n=s;Q.encryptedattachment_new(B,E,i,o,n);var I=y()[B/4+0],C=y()[B/4+1];if(y()[B/4+2])throw a(C);return aA.__wrap(I)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get encryptedData(){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.encryptedattachment_encryptedData(C,this.ptr);var A=y()[C/4+0],g=y()[C/4+1],I=S(A,g).slice();return Q.__wbindgen_free(A,1*g),I}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get mediaEncryptionInfo(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.encryptedattachment_mediaEncryptionInfo(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get hasMediaEncryptionInfoBeenConsumed(){return 0!==Q.encryptedattachment_hasMediaEncryptionInfoBeenConsumed(this.ptr)}}g.exports.EncryptedAttachment=aA;const sA=new FinalizationRegistry((A=>Q.__wbg_encryptionsettings_free(A)));class wA{static __wrap(A){const g=Object.create(wA.prototype);return g.ptr=A,sA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,sA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_encryptionsettings_free(A)}get algorithm(){return Q.__wbg_get_encryptionsettings_algorithm(this.ptr)>>>0}set algorithm(A){Q.__wbg_set_encryptionsettings_algorithm(this.ptr,A)}get rotationPeriod(){const A=Q.__wbg_get_encryptionsettings_rotationPeriod(this.ptr);return BigInt.asUintN(64,A)}set rotationPeriod(A){Q.__wbg_set_encryptionsettings_rotationPeriod(this.ptr,A)}get rotationPeriodMessages(){const A=Q.__wbg_get_encryptionsettings_rotationPeriodMessages(this.ptr);return BigInt.asUintN(64,A)}set rotationPeriodMessages(A){Q.__wbg_set_encryptionsettings_rotationPeriodMessages(this.ptr,A)}get historyVisibility(){return Q.__wbg_get_encryptionsettings_historyVisibility(this.ptr)>>>0}set historyVisibility(A){Q.__wbg_set_encryptionsettings_historyVisibility(this.ptr,A)}get onlyAllowTrustedDevices(){return 0!==Q.__wbg_get_encryptionsettings_onlyAllowTrustedDevices(this.ptr)}set onlyAllowTrustedDevices(A){Q.__wbg_set_encryptionsettings_onlyAllowTrustedDevices(this.ptr,A)}constructor(){const A=Q.encryptionsettings_new();return wA.__wrap(A)}}g.exports.EncryptionSettings=wA;const hA=new FinalizationRegistry((A=>Q.__wbg_eventid_free(A)));class cA{static __wrap(A){const g=Object.create(cA.prototype);return g.ptr=A,hA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,hA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_eventid_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.eventid_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return cA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get localpart(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.eventid_localpart(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get serverName(){const A=Q.eventid_serverName(this.ptr);return 0===A?void 0:PA.__wrap(A)}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.deviceid_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.EventId=cA;const kA=new FinalizationRegistry((A=>Q.__wbg_identitykeys_free(A)));class rA{static __wrap(A){const g=Object.create(rA.prototype);return g.ptr=A,kA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,kA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_identitykeys_free(A)}get ed25519(){const A=Q.__wbg_get_identitykeys_ed25519(this.ptr);return iA.__wrap(A)}set ed25519(A){U(A,iA);var g=A.ptr;A.ptr=0,Q.__wbg_set_identitykeys_ed25519(this.ptr,g)}get curve25519(){const A=Q.__wbg_get_identitykeys_curve25519(this.ptr);return T.__wrap(A)}set curve25519(A){U(A,T);var g=A.ptr;A.ptr=0,Q.__wbg_set_identitykeys_curve25519(this.ptr,g)}}g.exports.IdentityKeys=rA;const yA=new FinalizationRegistry((A=>Q.__wbg_inboundgroupsession_free(A)));class GA{static __wrap(A){const g=Object.create(GA.prototype);return g.ptr=A,yA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,yA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_inboundgroupsession_free(A)}get roomId(){const A=Q.inboundgroupsession_roomId(this.ptr);return xA.__wrap(A)}get sessionId(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.inboundgroupsession_sessionId(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}hasBeenImported(){return 0!==Q.inboundgroupsession_hasBeenImported(this.ptr)}}g.exports.InboundGroupSession=GA;const NA=new FinalizationRegistry((A=>Q.__wbg_keysbackuprequest_free(A)));class MA{static __wrap(A){const g=Object.create(MA.prototype);return g.ptr=A,NA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,NA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_keysbackuprequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return MA.__wrap(I)}get type(){return Q.keysbackuprequest_type(this.ptr)>>>0}}g.exports.KeysBackupRequest=MA;const JA=new FinalizationRegistry((A=>Q.__wbg_keysclaimrequest_free(A)));class FA{static __wrap(A){const g=Object.create(FA.prototype);return g.ptr=A,JA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,JA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_keysclaimrequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return FA.__wrap(I)}get type(){return Q.keysclaimrequest_type(this.ptr)>>>0}}g.exports.KeysClaimRequest=FA;const RA=new FinalizationRegistry((A=>Q.__wbg_keysqueryrequest_free(A)));class YA{static __wrap(A){const g=Object.create(YA.prototype);return g.ptr=A,RA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,RA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_keysqueryrequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return YA.__wrap(I)}get type(){return Q.keysqueryrequest_type(this.ptr)>>>0}}g.exports.KeysQueryRequest=YA;const KA=new FinalizationRegistry((A=>Q.__wbg_keysuploadrequest_free(A)));class qA{static __wrap(A){const g=Object.create(qA.prototype);return g.ptr=A,KA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,KA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_keysuploadrequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return qA.__wrap(I)}get type(){return Q.keysuploadrequest_type(this.ptr)>>>0}}g.exports.KeysUploadRequest=qA;const LA=new FinalizationRegistry((A=>Q.__wbg_maybesignature_free(A)));class dA{static __wrap(A){const g=Object.create(dA.prototype);return g.ptr=A,LA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,LA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_maybesignature_free(A)}isValid(){return 0!==Q.maybesignature_isValid(this.ptr)}isInvalid(){return 0!==Q.maybesignature_isInvalid(this.ptr)}get signature(){const A=Q.maybesignature_signature(this.ptr);return 0===A?void 0:XA.__wrap(A)}get invalidSignatureSource(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.maybesignature_invalidSignatureSource(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];let C;return 0!==A&&(C=o(A,g).slice(),Q.__wbindgen_free(A,1*g)),C}finally{Q.__wbindgen_add_to_stack_pointer(16)}}}g.exports.MaybeSignature=dA;const SA=new FinalizationRegistry((A=>Q.__wbg_olmmachine_free(A)));class UA{static __wrap(A){const g=Object.create(UA.prototype);return g.ptr=A,SA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,SA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_olmmachine_free(A)}constructor(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.olmmachine_new(I);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return UA.__wrap(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}static initialize(A,g,I,C){U(A,eg),U(g,X);var B=k(I)?0:c(I,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s,i=k(C)?0:c(C,Q.__wbindgen_malloc,Q.__wbindgen_realloc),o=s;return a(Q.olmmachine_initialize(A.ptr,g.ptr,B,E,i,o))}get userId(){const A=Q.olmmachine_userId(this.ptr);return eg.__wrap(A)}get deviceId(){const A=Q.olmmachine_deviceId(this.ptr);return X.__wrap(A)}get identityKeys(){const A=Q.olmmachine_identityKeys(this.ptr);return rA.__wrap(A)}get displayName(){return a(Q.olmmachine_displayName(this.ptr))}trackedUsers(){return a(Q.olmmachine_trackedUsers(this.ptr))}updateTrackedUsers(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.olmmachine_updateTrackedUsers(C,this.ptr,p(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16),n[l++]=void 0}}receiveSyncChanges(A,g,I,C){try{const i=Q.__wbindgen_add_to_stack_pointer(-16),o=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),D=s;U(g,BA),Q.olmmachine_receiveSyncChanges(i,this.ptr,o,D,g.ptr,p(I),p(C));var B=y()[i/4+0],E=y()[i/4+1];if(y()[i/4+2])throw a(E);return a(B)}finally{Q.__wbindgen_add_to_stack_pointer(16),n[l++]=void 0,n[l++]=void 0}}outgoingRequests(){return a(Q.olmmachine_outgoingRequests(this.ptr))}markRequestAsSent(A,g,I){try{const E=Q.__wbindgen_add_to_stack_pointer(-16),i=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),o=s,n=c(I,Q.__wbindgen_malloc,Q.__wbindgen_realloc),D=s;Q.olmmachine_markRequestAsSent(E,this.ptr,i,o,g,n,D);var C=y()[E/4+0],B=y()[E/4+1];if(y()[E/4+2])throw a(B);return a(C)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}encryptRoomEvent(A,g,I){try{const E=Q.__wbindgen_add_to_stack_pointer(-16);U(A,xA);const i=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),o=s,n=c(I,Q.__wbindgen_malloc,Q.__wbindgen_realloc),D=s;Q.olmmachine_encryptRoomEvent(E,this.ptr,A.ptr,i,o,n,D);var C=y()[E/4+0],B=y()[E/4+1];if(y()[E/4+2])throw a(B);return a(C)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}decryptRoomEvent(A,g){try{const B=Q.__wbindgen_add_to_stack_pointer(-16),E=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),i=s;U(g,xA),Q.olmmachine_decryptRoomEvent(B,this.ptr,E,i,g.ptr);var I=y()[B/4+0],C=y()[B/4+1];if(y()[B/4+2])throw a(C);return a(I)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}crossSigningStatus(){return a(Q.olmmachine_crossSigningStatus(this.ptr))}exportCrossSigningKeys(){return a(Q.olmmachine_exportCrossSigningKeys(this.ptr))}importCrossSigningKeys(A){U(A,v);var g=A.ptr;A.ptr=0;return a(Q.olmmachine_importCrossSigningKeys(this.ptr,g))}bootstrapCrossSigning(A){return a(Q.olmmachine_bootstrapCrossSigning(this.ptr,A))}getIdentity(A){U(A,eg);return a(Q.olmmachine_getIdentity(this.ptr,A.ptr))}sign(A){const g=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),I=s;return a(Q.olmmachine_sign(this.ptr,g,I))}invalidateGroupSession(A){U(A,xA);return a(Q.olmmachine_invalidateGroupSession(this.ptr,A.ptr))}shareRoomKey(A,g,I){try{const E=Q.__wbindgen_add_to_stack_pointer(-16);U(A,xA),U(I,wA),Q.olmmachine_shareRoomKey(E,this.ptr,A.ptr,p(g),I.ptr);var C=y()[E/4+0],B=y()[E/4+1];if(y()[E/4+2])throw a(B);return a(C)}finally{Q.__wbindgen_add_to_stack_pointer(16),n[l++]=void 0}}getMissingSessions(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.olmmachine_getMissingSessions(C,this.ptr,p(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16),n[l++]=void 0}}getUserDevices(A){U(A,eg);return a(Q.olmmachine_getUserDevices(this.ptr,A.ptr))}getDevice(A,g){U(A,eg),U(g,X);return a(Q.olmmachine_getDevice(this.ptr,A.ptr,g.ptr))}getVerification(A,g){try{const B=Q.__wbindgen_add_to_stack_pointer(-16);U(A,eg);const E=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),i=s;Q.olmmachine_getVerification(B,this.ptr,A.ptr,E,i);var I=y()[B/4+0],C=y()[B/4+1];if(y()[B/4+2])throw a(C);return a(I)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}getVerificationRequest(A,g){U(A,eg);const I=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),C=s,B=Q.olmmachine_getVerificationRequest(this.ptr,A.ptr,I,C);return 0===B?void 0:wg.__wrap(B)}getVerificationRequests(A){U(A,eg);return a(Q.olmmachine_getVerificationRequests(this.ptr,A.ptr))}receiveUnencryptedVerificationEvent(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.olmmachine_receiveUnencryptedVerificationEvent(C,this.ptr,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}exportRoomKeys(A){return a(Q.olmmachine_exportRoomKeys(this.ptr,e(A)))}importRoomKeys(A,g){try{const B=Q.__wbindgen_add_to_stack_pointer(-16),E=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),i=s;Q.olmmachine_importRoomKeys(B,this.ptr,E,i,e(g));var I=y()[B/4+0],C=y()[B/4+1];if(y()[B/4+2])throw a(C);return a(I)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}static encryptExportedRoomKeys(A,g,I){try{const e=Q.__wbindgen_add_to_stack_pointer(-16),t=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),w=s,h=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),k=s;Q.olmmachine_encryptExportedRoomKeys(e,t,w,h,k,I);var C=y()[e/4+0],B=y()[e/4+1],E=y()[e/4+2],i=y()[e/4+3],n=C,D=B;if(i)throw n=0,D=0,a(E);return o(n,D)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(n,D)}}static decryptExportedRoomKeys(A,g){try{const D=Q.__wbindgen_add_to_stack_pointer(-16),e=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),t=s,w=c(g,Q.__wbindgen_malloc,Q.__wbindgen_realloc),h=s;Q.olmmachine_decryptExportedRoomKeys(D,e,t,w,h);var I=y()[D/4+0],C=y()[D/4+1],B=y()[D/4+2],E=y()[D/4+3],i=I,n=C;if(E)throw i=0,n=0,a(B);return o(i,n)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(i,n)}}close(){const A=this.__destroy_into_raw();Q.olmmachine_close(A)}}g.exports.OlmMachine=UA;const lA=new FinalizationRegistry((A=>Q.__wbg_ownuseridentity_free(A)));class pA{static __wrap(A){const g=Object.create(pA.prototype);return g.ptr=A,lA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,lA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_ownuseridentity_free(A)}verify(){return a(Q.ownuseridentity_verify(this.ptr))}requestVerification(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.ownuseridentity_requestVerification(C,this.ptr,k(A)?0:e(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}trustsOurOwnDevice(){return a(Q.ownuseridentity_trustsOurOwnDevice(this.ptr))}}g.exports.OwnUserIdentity=pA;const uA=new FinalizationRegistry((A=>Q.__wbg_qr_free(A)));class HA{static __wrap(A){const g=Object.create(HA.prototype);return g.ptr=A,uA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,uA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_qr_free(A)}hasBeenScanned(){return 0!==Q.qr_hasBeenScanned(this.ptr)}hasBeenConfirmed(){return 0!==Q.qr_hasBeenConfirmed(this.ptr)}get userId(){const A=Q.inboundgroupsession_roomId(this.ptr);return eg.__wrap(A)}get otherUserId(){const A=Q.qr_otherUserId(this.ptr);return eg.__wrap(A)}get otherDeviceId(){const A=Q.qr_otherDeviceId(this.ptr);return X.__wrap(A)}weStarted(){return 0!==Q.qr_weStarted(this.ptr)}cancelInfo(){const A=Q.qr_cancelInfo(this.ptr);return 0===A?void 0:m.__wrap(A)}isDone(){return 0!==Q.qr_isDone(this.ptr)}isCancelled(){return 0!==Q.qr_isCancelled(this.ptr)}isSelfVerification(){return 0!==Q.qr_isSelfVerification(this.ptr)}reciprocated(){return 0!==Q.qr_reciprocated(this.ptr)}get flowId(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_flowId(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get roomId(){const A=Q.qr_roomId(this.ptr);return 0===A?void 0:xA.__wrap(A)}toQrCode(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_toQrCode(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return mA.__wrap(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}toBytes(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_toBytes(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}reciprocate(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_reciprocate(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}confirmScanning(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_confirmScanning(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}cancel(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_cancel(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}cancelWithCode(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.qr_cancelWithCode(C,this.ptr,A);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}}g.exports.Qr=HA;const fA=new FinalizationRegistry((A=>Q.__wbg_qrcode_free(A)));class mA{static __wrap(A){const g=Object.create(mA.prototype);return g.ptr=A,fA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,fA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_qrcode_free(A)}renderIntoBuffer(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.qrcode_renderIntoBuffer(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}}g.exports.QrCode=mA;const bA=new FinalizationRegistry((A=>Q.__wbg_qrcodescan_free(A)));class vA{static __wrap(A){const g=Object.create(vA.prototype);return g.ptr=A,bA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,bA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_qrcodescan_free(A)}static fromBytes(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.qrcodescan_fromBytes(C,p(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return vA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16),n[l++]=void 0}}}g.exports.QrCodeScan=vA;const OA=new FinalizationRegistry((A=>Q.__wbg_roomid_free(A)));class xA{static __wrap(A){const g=Object.create(xA.prototype);return g.ptr=A,OA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,OA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_roomid_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.roomid_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return xA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get localpart(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.roomid_localpart(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get serverName(){const A=Q.roomid_serverName(this.ptr);return PA.__wrap(A)}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.deviceid_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.RoomId=xA;const jA=new FinalizationRegistry((A=>Q.__wbg_roommessagerequest_free(A)));class TA{static __wrap(A){const g=Object.create(TA.prototype);return g.ptr=A,jA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,jA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_roommessagerequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return TA.__wrap(I)}get type(){return Q.roommessagerequest_type(this.ptr)>>>0}}g.exports.RoomMessageRequest=TA;const WA=new FinalizationRegistry((A=>Q.__wbg_sas_free(A)));class ZA{static __wrap(A){const g=Object.create(ZA.prototype);return g.ptr=A,WA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,WA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_sas_free(A)}get userId(){const A=Q.sas_userId(this.ptr);return eg.__wrap(A)}get deviceId(){const A=Q.sas_deviceId(this.ptr);return X.__wrap(A)}get otherUserId(){const A=Q.sas_otherUserId(this.ptr);return eg.__wrap(A)}get otherDeviceId(){const A=Q.sas_otherDeviceId(this.ptr);return X.__wrap(A)}get flowId(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.sas_flowId(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get roomId(){const A=Q.sas_roomId(this.ptr);return 0===A?void 0:xA.__wrap(A)}supportsEmoji(){return 0!==Q.sas_supportsEmoji(this.ptr)}startedFromRequest(){return 0!==Q.sas_startedFromRequest(this.ptr)}isSelfVerification(){return 0!==Q.sas_isSelfVerification(this.ptr)}haveWeConfirmed(){return 0!==Q.sas_haveWeConfirmed(this.ptr)}hasBeenAccepted(){return 0!==Q.sas_hasBeenAccepted(this.ptr)}cancelInfo(){const A=Q.sas_cancelInfo(this.ptr);return 0===A?void 0:m.__wrap(A)}weStarted(){return 0!==Q.sas_weStarted(this.ptr)}accept(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.sas_accept(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}confirm(){return a(Q.sas_confirm(this.ptr))}cancel(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.sas_cancel(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];if(y()[I/4+2])throw a(g);return a(A)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}cancelWithCode(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.sas_cancelWithCode(C,this.ptr,A);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}timedOut(){return 0!==Q.sas_timedOut(this.ptr)}canBePresented(){return 0!==Q.sas_canBePresented(this.ptr)}isDone(){return 0!==Q.sas_isDone(this.ptr)}isCancelled(){return 0!==Q.sas_isCancelled(this.ptr)}emoji(){return a(Q.sas_emoji(this.ptr))}emojiIndex(){return a(Q.sas_emojiIndex(this.ptr))}decimals(){return a(Q.sas_decimals(this.ptr))}}g.exports.Sas=ZA;const zA=new FinalizationRegistry((A=>Q.__wbg_servername_free(A)));class PA{static __wrap(A){const g=Object.create(PA.prototype);return g.ptr=A,zA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,zA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_servername_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.servername_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return PA.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get host(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.servername_host(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get port(){const A=Q.servername_port(this.ptr);return 16777215===A?void 0:A}isIpLiteral(){return 0!==Q.servername_isIpLiteral(this.ptr)}}g.exports.ServerName=PA;const VA=new FinalizationRegistry((A=>Q.__wbg_signature_free(A)));class XA{static __wrap(A){const g=Object.create(XA.prototype);return g.ptr=A,VA.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,VA.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_signature_free(A)}get ed25519(){const A=Q.signature_ed25519(this.ptr);return 0===A?void 0:nA.__wrap(A)}toBase64(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.signature_toBase64(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.Signature=XA;const _A=new FinalizationRegistry((A=>Q.__wbg_signatureuploadrequest_free(A)));class $A{static __wrap(A){const g=Object.create($A.prototype);return g.ptr=A,_A.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,_A.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_signatureuploadrequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return $A.__wrap(I)}get type(){return Q.signatureuploadrequest_type(this.ptr)>>>0}}g.exports.SignatureUploadRequest=$A;const Ag=new FinalizationRegistry((A=>Q.__wbg_signatures_free(A)));class gg{static __wrap(A){const g=Object.create(gg.prototype);return g.ptr=A,Ag.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,Ag.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_signatures_free(A)}constructor(){const A=Q.signatures_new();return gg.__wrap(A)}addSignature(A,g,I){U(A,eg),U(g,QA),U(I,nA);const C=Q.signatures_addSignature(this.ptr,A.ptr,g.ptr,I.ptr);return 0===C?void 0:dA.__wrap(C)}getSignature(A,g){U(A,eg),U(g,QA);const I=Q.signatures_getSignature(this.ptr,A.ptr,g.ptr);return 0===I?void 0:nA.__wrap(I)}get(A){U(A,eg);return a(Q.signatures_get(this.ptr,A.ptr))}clear(){Q.signatures_clear(this.ptr)}isEmpty(){return 0!==Q.signatures_isEmpty(this.ptr)}get count(){return Q.signatures_count(this.ptr)>>>0}}g.exports.Signatures=gg;const Ig=new FinalizationRegistry((A=>Q.__wbg_signingkeysuploadrequest_free(A)));class Qg{static __wrap(A){const g=Object.create(Qg.prototype);return g.ptr=A,Ig.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,Ig.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_signingkeysuploadrequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}}g.exports.SigningKeysUploadRequest=Qg;const Cg=new FinalizationRegistry((A=>Q.__wbg_todevicerequest_free(A)));class Bg{static __wrap(A){const g=Object.create(Bg.prototype);return g.ptr=A,Cg.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,Cg.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_todevicerequest_free(A)}get id(){return a(Q.__wbg_get_keysbackuprequest_id(this.ptr))}get body(){return a(Q.__wbg_get_keysbackuprequest_body(this.ptr))}constructor(A,g){const I=Q.keysbackuprequest_new(e(A),e(g));return Bg.__wrap(I)}get type(){return Q.todevicerequest_type(this.ptr)>>>0}}g.exports.ToDeviceRequest=Bg;const Eg=new FinalizationRegistry((A=>Q.__wbg_tracing_free(A)));class ig{static __wrap(A){const g=Object.create(ig.prototype);return g.ptr=A,Eg.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,Eg.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_tracing_free(A)}static isAvailable(){return 0!==Q.tracing_isAvailable()}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.tracing_new(C,A);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return ig.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}set minLevel(A){Q.tracing_set_minLevel(this.ptr,A)}turnOn(){Q.tracing_turnOn(this.ptr)}turnOff(){Q.tracing_turnOff(this.ptr)}}g.exports.Tracing=ig;const og=new FinalizationRegistry((A=>Q.__wbg_userdevices_free(A)));class ng{static __wrap(A){const g=Object.create(ng.prototype);return g.ptr=A,og.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,og.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_userdevices_free(A)}get(A){U(A,X);const g=Q.userdevices_get(this.ptr,A.ptr);return 0===g?void 0:P.__wrap(g)}isAnyVerified(){return 0!==Q.userdevices_isAnyVerified(this.ptr)}keys(){return a(Q.userdevices_keys(this.ptr))}devices(){return a(Q.userdevices_devices(this.ptr))}}g.exports.UserDevices=ng;const Dg=new FinalizationRegistry((A=>Q.__wbg_userid_free(A)));class eg{static __wrap(A){const g=Object.create(eg.prototype);return g.ptr=A,Dg.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,Dg.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_userid_free(A)}constructor(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16),B=c(A,Q.__wbindgen_malloc,Q.__wbindgen_realloc),E=s;Q.userid_new(C,B,E);var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return eg.__wrap(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}get localpart(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.userid_localpart(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}get serverName(){const A=Q.userid_serverName(this.ptr);return PA.__wrap(A)}isHistorical(){return 0!==Q.userid_isHistorical(this.ptr)}toString(){try{const I=Q.__wbindgen_add_to_stack_pointer(-16);Q.deviceid_toString(I,this.ptr);var A=y()[I/4+0],g=y()[I/4+1];return o(A,g)}finally{Q.__wbindgen_add_to_stack_pointer(16),Q.__wbindgen_free(A,g)}}}g.exports.UserId=eg;const tg=new FinalizationRegistry((A=>Q.__wbg_useridentity_free(A)));class ag{static __wrap(A){const g=Object.create(ag.prototype);return g.ptr=A,tg.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,tg.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_useridentity_free(A)}isVerified(){return 0!==Q.useridentity_isVerified(this.ptr)}verify(){return a(Q.useridentity_verify(this.ptr))}requestVerification(A,g,I){try{const E=Q.__wbindgen_add_to_stack_pointer(-16);U(A,xA),U(g,cA),Q.useridentity_requestVerification(E,this.ptr,A.ptr,g.ptr,k(I)?0:e(I));var C=y()[E/4+0],B=y()[E/4+1];if(y()[E/4+2])throw a(B);return a(C)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}verificationRequestContent(A){try{const C=Q.__wbindgen_add_to_stack_pointer(-16);Q.useridentity_verificationRequestContent(C,this.ptr,k(A)?0:e(A));var g=y()[C/4+0],I=y()[C/4+1];if(y()[C/4+2])throw a(I);return a(g)}finally{Q.__wbindgen_add_to_stack_pointer(16)}}}g.exports.UserIdentity=ag;const sg=new FinalizationRegistry((A=>Q.__wbg_verificationrequest_free(A)));class wg{static __wrap(A){const g=Object.create(wg.prototype);return g.ptr=A,sg.register(g,g.ptr,g),g}__destroy_into_raw(){const A=this.ptr;return this.ptr=0,sg.unregister(this),A}free(){const A=this.__destroy_into_raw();Q.__wbg_verificationrequest_free(A)}static request(A,g,I,C){try{const s=Q.__wbindgen_add_to_stack_pointer(-16);U(A,eg),U(g,X),U(I,eg),Q.verificationrequest_request(s,A.ptr,g.ptr,I.ptr,k(C)?0:e(C));var B=y()[s/4+0],E=y()[s/4+1],i=y()[s/4+2],n=y()[s/4+3],D=B,t=E;if(n)throw D=0,t=0,a(i);return o(D,t)}finally{Q.