You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
144 lines
397 KiB
144 lines
397 KiB
6 years ago
|
var olm_exports = {};
|
||
|
var onInitSuccess;
|
||
|
var onInitFail;
|
||
|
|
||
|
var Module = (function() {
|
||
|
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||
|
return (
|
||
|
function(Module) {
|
||
|
Module = Module || {};
|
||
|
|
||
|
var c;c||(c=typeof Module !== 'undefined' ? Module : {});var ba;if("undefined"!==typeof window)ba=function(a){window.crypto.getRandomValues(a)};else if(module.exports){var ca=require("crypto");ba=function(a){var b=ca.randomBytes(a.length);a.set(b)};process=global.process}else throw Error("Cannot find global to attach library to");if("undefined"!==typeof OLM_OPTIONS)for(var da in OLM_OPTIONS)OLM_OPTIONS.hasOwnProperty(da)&&(c[da]=OLM_OPTIONS[da]);
|
||
|
c.onRuntimeInitialized=function(){f=c._olm_error();olm_exports.PRIVATE_KEY_LENGTH=c._olm_pk_private_key_length();onInitSuccess&&onInitSuccess()};c.onAbort=function(a){onInitFail&&onInitFail(a)};var ea={},h;for(h in c)c.hasOwnProperty(h)&&(ea[h]=c[h]);c.arguments=[];c.thisProgram="./this.program";c.quit=function(a,b){throw b;};c.preRun=[];c.postRun=[];var fa=!1,ha=!1,m=!1,ia=!1;fa="object"===typeof window;ha="function"===typeof importScripts;
|
||
|
m="object"===typeof process&&"function"===typeof require&&!fa&&!ha;ia=!fa&&!m&&!ha;var n="";
|
||
|
if(m){n=__dirname+"/";var ja,ka;c.read=function(a,b){var d=p(a);d||(ja||(ja=require("fs")),ka||(ka=require("path")),a=ka.normalize(a),d=ja.readFileSync(a));return b?d:d.toString()};c.readBinary=function(a){a=c.read(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1<process.argv.length&&(c.thisProgram=process.argv[1].replace(/\\/g,"/"));c.arguments=process.argv.slice(2);process.on("uncaughtException",function(a){throw a;});process.on("unhandledRejection",function(){process.exit(1)});
|
||
|
c.quit=function(a){process.exit(a)};c.inspect=function(){return"[Emscripten Module object]"}}else if(ia)"undefined"!=typeof read&&(c.read=function(a){var b=p(a);return b?la(b):read(a)}),c.readBinary=function(a){var b;if(b=p(a))return b;if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));b=read(a,"binary");assert("object"===typeof b);return b},"undefined"!=typeof scriptArgs?c.arguments=scriptArgs:"undefined"!=typeof arguments&&(c.arguments=arguments),"function"===typeof quit&&(c.quit=
|
||
|
function(a){quit(a)});else if(fa||ha)fa?document.currentScript&&(n=document.currentScript.src):n=self.location.href,_scriptDir&&(n=_scriptDir),0!==n.indexOf("blob:")?n=n.substr(0,n.lastIndexOf("/")+1):n="",c.read=function(a){try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText}catch(d){if(a=p(a))return la(a);throw d;}},ha&&(c.readBinary=function(a){try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}catch(d){if(a=
|
||
|
p(a))return a;throw d;}}),c.readAsync=function(a,b,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){if(200==e.status||0==e.status&&e.response)b(e.response);else{var g=p(a);g?b(g.buffer):d()}};e.onerror=d;e.send(null)},c.setWindowTitle=function(a){document.title=a};
|
||
|
var ma=c.print||("undefined"!==typeof console?console.log.bind(console):"undefined"!==typeof print?print:null),na=c.printErr||("undefined"!==typeof printErr?printErr:"undefined"!==typeof console&&console.warn.bind(console)||ma);for(h in ea)ea.hasOwnProperty(h)&&(c[h]=ea[h]);ea=void 0;function oa(a){var b=q;q=q+a+15&-16;return b}function pa(a){var b=t[u>>2];a=b+a+15&-16;t[u>>2]=a;if(a=a>=v)qa(),a=!0;return a?(t[u>>2]=b,0):b}function ra(a){var b;b||(b=16);return Math.ceil(a/b)*b}var sa=!1;
|
||
|
function assert(a,b){a||w("Assertion failed: "+b)}
|
||
|
function x(a){var b="i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":y[a>>0]=0;break;case "i8":y[a>>0]=0;break;case "i16":ta[a>>1]=0;break;case "i32":t[a>>2]=0;break;case "i64":tempI64=[0,(tempDouble=0,1<=+ua(tempDouble)?0<tempDouble?(va(+wa(tempDouble/4294967296),4294967295)|0)>>>0:~~+xa((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];t[a>>2]=tempI64[0];t[a+4>>2]=tempI64[1];break;case "float":ya[a>>2]=0;break;case "double":za[a>>3]=0;break;default:w("invalid type for setValue: "+
|
||
|
b)}}function Aa(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return y[a>>0];case "i8":return y[a>>0];case "i16":return ta[a>>1];case "i32":return t[a>>2];case "i64":return t[a>>2];case "float":return ya[a>>2];case "double":return za[a>>3];default:w("invalid type for getValue: "+b)}return null}
|
||
|
function z(a){var b=c.ALLOC_STACK;if("number"===typeof a){var d=!0;var e=a}else d=!1,e=a.length;var g;4==b?g=k:g=["function"===typeof Ba?Ba:oa,Ca,oa,pa][void 0===b?2:b](Math.max(e,1));if(d){var k=g;assert(0==(g&3));for(a=g+(e&-4);k<a;k+=4)t[k>>2]=0;for(a=g+e;k<a;)y[k++>>0]=0;return g}a.subarray||a.slice?A.set(a,g):A.set(new Uint8Array(a),g);return g}
|
||
|
function C(a){var b;if(0===b||!a)return"";for(var d=0,e,g=0;;){e=A[a+g>>0];d|=e;if(0==e&&!b)break;g++;if(b&&g==b)break}b||(b=g);e="";if(128>d){for(;0<b;)d=String.fromCharCode.apply(String,A.subarray(a,a+Math.min(b,1024))),e=e?e+d:d,a+=1024,b-=1024;return e}return D(a)}var Da="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||
|
function D(a){for(var b=A,d=a;b[d];)++d;if(16<d-a&&b.subarray&&Da)return Da.decode(b.subarray(a,d));for(d="";;){var e=b[a++];if(!e)return d;if(e&128){var g=b[a++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var k=b[a++]&63;if(224==(e&240))e=(e&15)<<12|g<<6|k;else{var l=b[a++]&63;if(240==(e&248))e=(e&7)<<18|g<<12|k<<6|l;else{var r=b[a++]&63;if(248==(e&252))e=(e&3)<<24|g<<18|k<<12|l<<6|r;else{var I=b[a++]&63;e=(e&1)<<30|g<<24|k<<18|l<<12|r<<6|I}}}65536>e?d+=String.fromCharCode(e):(e-=
|
||
|
65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}}
|
||
|
function Ea(a,b,d,e){if(!(0<e))return 0;var g=d;e=d+e-1;for(var k=0;k<a.length;++k){var l=a.charCodeAt(k);if(55296<=l&&57343>=l){var r=a.charCodeAt(++k);l=65536+((l&1023)<<10)|r&1023}if(127>=l){if(d>=e)break;b[d++]=l}else{if(2047>=l){if(d+1>=e)break;b[d++]=192|l>>6}else{if(65535>=l){if(d+2>=e)break;b[d++]=224|l>>12}else{if(2097151>=l){if(d+3>=e)break;b[d++]=240|l>>18}else{if(67108863>=l){if(d+4>=e)break;b[d++]=248|l>>24}else{if(d+5>=e)break;b[d++]=252|l>>30;b[d++]=128|l>>24&63}b[d++]=128|l>>18&63}b[d++]=
|
||
|
128|l>>12&63}b[d++]=128|l>>6&63}b[d++]=128|l&63}}b[d]=0;return d-g}function Fa(a){for(var b=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:2097151>=e?b+4:67108863>=e?b+5:b+6}return b}"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var buffer,y,A,ta,t,ya,za,Ga,q,Ha,Ia,Ja,Ka,u;Ga=q=Ha=Ia=Ja=Ka=u=0;
|
||
|
function qa(){w("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+v+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}var La=c.TOTAL_STACK||5242880,v=c.TOTAL_MEMORY||16777216;
|
||
|
v<La&&na("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+v+"! (TOTAL_STACK="+La+")");c.buffer?buffer=c.buffer:(buffer=new ArrayBuffer(v),c.buffer=buffer);c.HEAP8=y=new Int8Array(buffer);c.HEAP16=ta=new Int16Array(buffer);c.HEAP32=t=new Int32Array(buffer);c.HEAPU8=A=new Uint8Array(buffer);c.HEAPU16=new Uint16Array(buffer);c.HEAPU32=new Uint32Array(buffer);c.HEAPF32=ya=new Float32Array(buffer);c.HEAPF64=za=new Float64Array(buffer);
|
||
|
function Ma(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var d=b.h;"number"===typeof d?void 0===b.c?c.dynCall_v(d):c.dynCall_vi(d,b.c):d(void 0===b.c?null:b.c)}}}var Na=[],Oa=[],Pa=[],Qa=[],Ra=!1;function Sa(){var a=c.preRun.shift();Na.unshift(a)}function Ta(a,b){for(var d=0;d<a.length;++d)y[b++>>0]=a.charCodeAt(d)}var ua=Math.abs,xa=Math.ceil,wa=Math.floor,va=Math.min,E=0,Ua=null,Va=null;c.preloadedImages={};c.preloadedAudios={};var F=null,Wa="data:application/octet-stream;base64,";
|
||
|
Ga=8;q=Ga+36160;Oa.push();F="data:application/octet-stream;base64,AAAAAAAAAABBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsv/////////////////////////////////////////////////////////z7///8/NDU2Nzg5Ojs8Pf////////8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGf///////xobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIz//////8JAAAAAAAAAAAAAAAAAAAAAAAAAA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4A1PeFAZqF0f+b5woAQE4mAHr5ZAEeE2H/Plv5AfiFTQDFP6j+dApSALjscf7Uy8L/PWT8/iQFyv93W5n/gU8dAGdnq/7t12//2DVFAO/wFwDCld3/JuHeAOj/tP52UoX/OdGxAYvohQCesC7+wnMuAFj35QEcZ78A3d6v/pXrLACX5Bn+2mlnAI5V0gCVgb7/1UFe/nWG4P9SxnUAnd3cAKNlJADFciUAaKym/gu2AABRSLz/YbwQ/0UGCgDHk5H/CAlzAUHWr//ZrdEAUH+mAPflBP6nt3z/WhzM/q878P8LKfgBbCgz/5Cxw/6W+n4AiltBAXg83v/1we8AHda9/4ACGQBQmqIATdxrAerNSv82pmf/dEgJAOReL/8eyBn/I9ZZ/z2wjP9T4qP/S4KsAIAmEQBfiZj/13yfAU9dAACUUp3+w4L7/yjKTP/7fuAAnWM+/s8H4f9gRMMAjLqd/4MT5/8qgP4ANNs9/mbLSACNBwv/uqTVAB96dwCF8pEA0Pzo/1vVtv+PBPr++ddKAKUebwGrC
|
||
|
var Xa=q;q+=16;u=oa(4);Ha=Ia=ra(q);Ja=Ha+La;Ka=ra(Ja);t[u>>2]=Ka;var Ya=!1;function G(a){var b=Array(Fa(a)+1);a=Ea(a,b,0,b.length);b.length=a;return b}function la(a){for(var b=[],d=0;d<a.length;d++){var e=a[d];255<e&&(Ya&&assert(!1,"Character code "+e+" ("+String.fromCharCode(e)+") at offset "+d+" not in 0x00-0xFF."),e&=255);b.push(String.fromCharCode(e))}return b.join("")}
|
||
|
var Za="function"===typeof atob?atob:function(a){var b="",d=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));e=e<<2|g>>4;
|
||
|
g=(g&15)<<4|k>>2;var r=(k&3)<<6|l;b+=String.fromCharCode(e);64!==k&&(b+=String.fromCharCode(g));64!==l&&(b+=String.fromCharCode(r))}while(d<a.length);return b};
|
||
|
function p(a){if(String.prototype.startsWith?a.startsWith(Wa):0===a.indexOf(Wa)){a=a.slice(Wa.length);if("boolean"===typeof m&&m){try{var b=Buffer.from(a,"base64")}catch(k){b=new Buffer(a,"base64")}var d=new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}else try{var e=Za(a),g=new Uint8Array(e.length);for(b=0;b<e.length;++b)g[b]=e.charCodeAt(b);d=g}catch(k){throw Error("Converting base64 string to bytes failed.");}return d}}
|
||
|
c.f={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:Infinity};
|
||
|
c.g={abort:w,assert:assert,enlargeMemory:function(){qa()},getTotalMemory:function(){return v},abortOnCannotGrowMemory:qa,invoke_ii:function(a,b){var d=$a();try{return c.dynCall_ii(a,b)}catch(e){ab(d);if("number"!==typeof e&&"longjmp"!==e)throw e;c.setThrew(1,0)}},invoke_iii:function(a,b,d){var e=$a();try{return c.dynCall_iii(a,b,d)}catch(g){ab(e);if("number"!==typeof g&&"longjmp"!==g)throw g;c.setThrew(1,0)}},invoke_iiiiiiiiii:function(a,b,d,e,g,k,l,r,I,P){var B=$a();try{return c.dynCall_iiiiiiiiii(a,
|
||
|
b,d,e,g,k,l,r,I,P)}catch(aa){ab(B);if("number"!==typeof aa&&"longjmp"!==aa)throw aa;c.setThrew(1,0)}},___setErrNo:function(a){c.___errno_location&&(t[c.___errno_location()>>2]=a);return a},_emscripten_memcpy_big:function(a,b,d){A.set(A.subarray(b,b+d),a);return a},DYNAMICTOP_PTR:u,tempDoublePtr:Xa,STACKTOP:Ia,STACK_MAX:Ja};// EMSCRIPTEN_START_ASM
|
||
|
var H=(/** @suppress {uselessCode} */ function(global,env,buffer) {
|
||
|
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.STACKTOP|0;var l=env.STACK_MAX|0;var m=0;var n=0;var o=0;var p=0;var q=global.NaN,r=global.Infinity;var s=0,t=0,u=0,v=0,w=0.0;var x=0;var y=global.Math.floor;var z=global.Math.abs;var A=global.Math.sqrt;var B=global.Math.pow;var C=global.Math.cos;var D=global.Math.sin;var E=global.Math.tan;var F=global.Math.acos;var G=global.Math.asin;var H=global.Math.atan;var I=global.Math.atan2;var J=global.Math.exp;var K=global.Math.log;var L=global.Math.ceil;var M=global.Math.imul;var N=global.Math.min;var O=global.Math.max;var P=global.Math.clz32;var Q=env.abort;var R=env.assert;var S=env.enlargeMemory;var T=env.getTotalMemory;var U=env.abortOnCannotGrowMemory;var V=env.invoke_ii;var W=env.invoke_iii;var X=env.invoke_iiiiiiiiii;var Y=env.___setErrNo;var Z=env._emscripten_memcpy_big;var _=0.0;
|
||
|
// EMSCRIPTEN_START_FUNCS
|
||
|
function ca(a){a=a|0;var b=0;b=k;k=k+a|0;k=k+15&-16;return b|0}function da(){return k|0}function ea(a){a=a|0;k=a}function fa(a,b){a=a|0;b=b|0;k=a;l=b}function ga(a,b){a=a|0;b=b|0;if(!m){m=a;n=b}}function ha(a){a=a|0;x=a}function ia(){return x|0}function ja(a){a=a|0;var b=0;b=a+2|0;a=(b>>>0)/3|0;return (a<<2|b-(a*3|0))+-2|0}function ka(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=c-((c>>>0)%3|0)|0;g=b+h|0;if(!h){h=e;g=b}else{f=b;do{h=d[f>>0]|0;i=h<<8|(d[f+1>>0]|0);j=d[f+2>>0]|0;f=f+3|0;a[e+3>>0]=a[16+(j&63)>>0]|0;a[e+2>>0]=a[16+((i<<8|j)>>>6&63)>>0]|0;a[e+1>>0]=a[16+(i>>>4&63)>>0]|0;a[e>>0]=a[16+(h>>>2)>>0]|0;e=e+4|0}while((f|0)!=(g|0));h=e}e=b+c-g|0;if(!e){j=h;return j|0}f=d[g>>0]|0;if((e|0)==2){e=d[g+1>>0]|0;a[h+2>>0]=a[16+(e<<2&60)>>0]|0;e=(f<<8|e)>>>4;f=3}else{e=f<<4;f=2}a[h+1>>0]=a[16+(e&63)>>0]|0;a[h>>0]=a[16+(e>>>6)>>0]|0;j=h+f|0;return j|0}function la(a){a=a|0;var b=0;b=a+2|0;return ((a&3|0)==1?-1:(b&3)+-2+((b>>>2)*3|0)|0)|0}function ma(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;j=c&-4;h=b+j|0;if(!j)i=b;else{i=(((j+-4|0)>>>2)*3|0)+3|0;f=e;g=b;while(1){k=(d[80+(a[g>>0]&127)>>0]|0)<<6|(d[80+(a[g+1>>0]&127)>>0]|0);l=k<<6|(d[80+(a[g+2>>0]&127)>>0]|0);a[f+2>>0]=l<<6|(d[80+(a[g+3>>0]&127)>>0]|0);g=g+4|0;a[f+1>>0]=l>>>2;a[f>>0]=k>>>4;if((g|0)==(h|0))break;else f=f+3|0}e=e+i|0;i=b+j|0}f=b+c|0;g=f-i|0;if(!g)return f|0;h=(d[80+(a[i>>0]&127)>>0]|0)<<6|(d[80+(a[i+1>>0]&127)>>0]|0);if((g|0)==3)a[e+1>>0]=(h<<6|(d[80+(a[i+2>>0]&127)>>0]|0))>>>2;a[e>>0]=h>>>4;return f|0}function na(a){a=a|0;var b=0;b=a+2|0;a=(b>>>0)/3|0;return (a<<2|b-(a*3|0))+-2|0}function oa(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;i=c-((c>>>0)%3|0)|0;h=b+i|0;if(!i){i=e;h=b}else{f=e;g=b;do{i=d[g>>0]|0;j=i<<8|(d[g+1>>0]|0);k=d[g+2>>0]|0;g=g+3|0;a[f+3>>0]=a[16+(k&63)>>0]|0;a[f+2>>0]=a[16+((j<<8|k)>>>6&63)>>0]|0;a[f+1>>0]=a[16+(j>>>4&63)>>0]|0;a[f>>0]=a[16+(i>>>2)>>0]|0;f=f+4|0}while((g|0)!=(h|0));i=f}f=b+c-h|0;if(!f){j=i;k=e;k=j-k|0;return k|0}g=d[h>>0]|0;if((f|0)==2){f=d[h+1>>0]|0;a[i+2>>0]=a[16+(f<<2&60)>>0]|0;f=(g<<8|f)>>>4;g=3}else{f=g<<4;g=2}a[i+1>>0]=a[16+(f&63)>>0]|0;a[i>>0]=a[16+(f>>>6)>>0]|0;j=i+g|0;k=e;k=j-k|0;return k|0}function pa(a){a=a|0;var b=0;b=a+2|0;return ((a&3|0)==1?-1:(b&3)+-2+((b>>>2)*3|0)|0)|0}function qa(a,b,c){a=a|0;b=b|0;c=c|0;ma(a,b,c)|0;c=b+2|0;return ((b&3|0)==1?-1:(c&3)+-2+((c>>>2)*3|0)|0)|0}function ra(b,c){b=b|0;c=c|0;a[b+3>>0]=c;a[b+2>>0]=c>>>8;a[b+1>>0]=c>>>16;a[b>>0]=c>>>24;return b+4|0}function sa(a,b,e){a=a|0;b=b|0;e=e|0;var f=0;c[e>>2]=0;f=a+4|0;if(f>>>0>b>>>0){f=b;return f|0}c[e>>2]=0;b=(d[a>>0]|0)<<8;c[e>>2]=b;b=(b|(d[a+1>>0]|0))<<8;c[e>>2]=b;b=(b|(d[a+2>>0]|0))<<8;c[e>>2]=b;c[e>>2]=b|(d[a+3>>0]|0);return f|0}function ta(b,c){b=b|0;c=c|0;a[b>>0]=c&1;return b+1|0}function ua(b,c,d){b=b|0;c=c|0;d=d|0;if((b|0)==(c|0)){d=b;return d|0}a[d>>0]=(a[b>>0]|0)!=0&1;d=b+1|0;return d|0}function va(a,b,c){a=a|0;b=b|0;c=c|0;xf(a|0,b|0,c|0)|0;return a+c|0}function wa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+d|0;if(e>>>0>b>>>0){e=b;return e|0}xf(c|0,a|0,d|0)|0;return e|0}function xa(a){a=a|0;return 32}function ya(b,c){b=b|0;c=c|0;var d=0,e=0;e=b;d=e+32|0;do{a[e>>0]=a[c>>0]|0;e=e+1|0;c=c+1|0}while((e|0)<(d|0));return b+32|0}function za(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;e=b+32|0;if(e>>>0>c>>>0){e=c;return e|0}c=b;b=d+32|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(b|0));return e|0}function Aa(a){a=a|0;return 64}function Ba(b,c){b=b|0;c=c|0;var d=0,e=0,f=0;d=b;e=c;f=d+32|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));d=b+32|0;e=c+32|0;f=d+32|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));return b+64|0}function Ca(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=b+32|0;if(e>>>0>c>>>0)e=c;else{h=d;g=h+32|0;do{a[h>>0]=a[b>>0]|0;h=h+1|0;b=b+1|0}while((h|0)<(g|0))}f=e+32|0;if(f>>>0>c>>>0){h=c;return h|0}h=d+32|0;b=e;g=h+32|0;do{a[h>>0]=a[b>>0]|0;h=h+1|0;b=b+1|0}while((h|0)<(g|0));h=f;return h|0}function Da(a){a=a|0;return 32}function Ea(b,c){b=b|0;c=c|0;var d=0,e=0;e=b;d=e+32|0;do{a[e>>0]=a[c>>0]|0;e=e+1|0;c=c+1|0}while((e|0)<(d|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0;qa=Eb+24|0;ra=Eb+96|0;sa=Eb+16|0;ta=Eb+88|0;ua=Eb+8|0;va=Eb+80|0;wa=ub+144|0;xa=ub+64|0;ya=ub+136|0;za=ub+56|0;Aa=ub+128|0;Ba=ub+48|0;Ca=ub+120|0;Da=ub+40|0;Ea=ub+112|0;Fa=ub+32|0;Ga=ub+104|0;Ha=ub+24|0;Ia=ub+96|0;Ja=ub+16|0;Ka=ub+88|0;La=ub+8|0;Ma=ub+80|0;ea=Eb+72|0;Na=ub+72|0;Oa=sb+8|0;Pa=tb+8|0;Qa=sb+16|0;Ra=tb+16|0;Sa=sb+24|0;Ta=tb+24|0;Ua=sb+32|0;Va=tb+32|0;Wa=sb+40|0;Xa=tb+40|0;Ya=sb+48|0;Za=tb+48|0;_a=sb+56|0;$a=tb+56|0;ab=sb+64|0;bb=tb+64|0;cb=sb+72|0;db=tb+72|0;jb=Ab+80|0;kb=Ab+8|0;lb=Ab+16|0;mb=Ab+24|0;nb=Ab+32|0;ob=Ab+40|0;pb=Ab+48|0;qb=Ab+56|0;rb=Ab+64|0;eb=Ab+72|0;n=Fb;da=0;e=j;f=xb;j=zb;l=yb;while(1){m=a[ib+(31-da)>>0]|0;$=0;aa=g;ba=h;ca=i;Z=e;i=f;g=j;h=l;_=n;while(1){X=m&255;Y=X>>>7;gf(h,_,
|
||
|
|
||
|
// EMSCRIPTEN_END_FUNCS
|
||
|
var $=[Df,wc];var aa=[Ef,xc,zc,Ef];var ba=[Ff,yc,Ac,Ff];return{___muldi3:rf,_bitshift64Ashr:sf,_bitshift64Lshr:tf,_bitshift64Shl:uf,_free:mf,_i64Add:vf,_i64Subtract:wf,_malloc:lf,_memcpy:xf,_memset:yf,_olm_account:Hb,_olm_account_generate_one_time_keys:cc,_olm_account_generate_one_time_keys_random_length:bc,_olm_account_identity_keys:Wb,_olm_account_identity_keys_length:Vb,_olm_account_last_error:Bb,_olm_account_mark_keys_as_published:$b,_olm_account_max_number_of_one_time_keys:ac,_olm_account_one_time_keys:_b,_olm_account_one_time_keys_length:Zb,_olm_account_sign:Yb,_olm_account_signature_length:Xb,_olm_account_size:Eb,_olm_clear_account:Kb,_olm_clear_inbound_group_session:te,_olm_clear_outbound_group_session:Ke,_olm_clear_pk_decryption:Oc,_olm_clear_pk_encryption:Ec,_olm_clear_session:Lb,_olm_clear_utility:Mb,_olm_create_account:Ub,_olm_create_account_random_length:Tb,_olm_create_inbound_session:fc,_olm_create_inbound_session_from:gc,_olm_create_outbound_session:ec,_olm_create_outbound_session_random_length:dc,_olm_decrypt:sc,_olm_decrypt_max_plaintext_length:rc,_olm_ed25519_verify:vc,_olm_encrypt:qc,_olm_encrypt_message_length:pc,_olm_encrypt_message_type:nc,_olm_encrypt_random_length:oc,_olm_error:Ab,_olm_export_inbound_group_session:He,_olm_export_inbound_group_session_length:Ge,_olm_get_library_version:zb,_olm_group_decrypt:Be,_olm_group_decrypt_max_plaintext_length:Ae,_olm_group_encrypt:Se,_olm_group_encrypt_message_length:Re,_olm_import_inbound_group_session:we,_olm_inbound_group_session:se,_olm_inbound_group_session_first_known_index:Ee,_olm_inbound_group_session_id:De,_olm_inbound_group_session_id_length:Ce,_olm_inbound_group_session_is_verified:Fe,_olm_inbound_group_session_last_error:ue,_olm_inbound_group_session_size:re,_olm_init_inbound_group_session:ve,_olm_init_outbound_group_session:Qe,_olm_init_outbound_group_session_random_length:Pe,_olm_matches_inbound_session:kc,_olm_matches_inbound_session_from:lc,_olm_outbound_group_session:Je,_olm_outbound_group_session_id:Ue,_olm_outbound_group_session_id_length:Te,_olm_outbound_group_session_key:Xe,_olm_outbound_group_session_key_length:We,_olm_outbound_group_session_last_error:Le,_olm_outbound_group_session_message_index:Ve,_olm_outbound_group_session_size:Ie,_olm_pickle_account:Pb,_olm_pickle_account_length:Nb,_olm_pickle_inbound_group_session:ye,_olm_pickle_inbound_group_session_length:xe,_olm_pickle_outbound_group_session:Ne,_olm_pickle_outbound_group_session_length:Me,_olm_pickle_pk_decryption:Uc,_olm_pickle_pk_decryption_length:Tc,_olm_pickle_session:Qb,_olm_pickle_session_length:Ob,_olm_pk_ciphertext_length:Hc,_olm_pk_decrypt:Xc,_olm_pk_decryption:Nc,_olm_pk_decryption_last_error:Lc,_olm_pk_decryption_size:Mc,_olm_pk_encrypt:Kc,_olm_pk_encrypt_random_length:Jc,_olm_pk_encryption:Dc,_olm_pk_encryption_last_error:Bc,_olm_pk_encryption_set_recipient_key:Fc,_olm_pk_encryption_size:Cc,_olm_pk_generate_key:Sc,_olm_pk_generate_key_random_length:Qc,_olm_pk_get_private_key:Yc,_olm_pk_key_from_private:Rc,_olm_pk_key_length:Gc,_olm_pk_mac_length:Ic,_olm_pk_max_plaintext_length:Wc,_olm_pk_private_key_length:Pc,_olm_remove_one_time_keys:mc,_olm_session:Ib,_olm_session_has_received_message:jc,_olm_session_id:ic,_olm_session_id_length:hc,_olm_session_last_error:Cb,_olm_session_size:Fb,_olm_sha256:uc,_olm_sha256_length:tc,_olm_unpickle_account:Rb,_olm_unpickle_inbound_group_session:ze,_olm_unpickle_outbound_group_session:Oe,_olm_unpickle_pk_decryption:Vc,_olm_unpickle_session:Sb,_olm_utility:Jb,_olm_utility_last_error:Db,_olm_utility_size:Gb,_sbrk:zf,dynCall_ii:Af,dynCall_iii:Bf,dynCall_iiiiiiiiii:Cf,establishStackSpace:fa,getTempRet0:ia,runPostSets:pf,setTempRet0:ha,setThrew:ga,stackAlloc:ca,stackRestore:ea,stackSave:da}})
|
||
|
|
||
|
|
||
|
// EMSCRIPTEN_END_ASM
|
||
|
(c.f,c.g,buffer);c.___muldi3=H.___muldi3;c._bitshift64Ashr=H._bitshift64Ashr;c._bitshift64Lshr=H._bitshift64Lshr;
|
||
|
c._bitshift64Shl=H._bitshift64Shl;c._free=H._free;c._i64Add=H._i64Add;c._i64Subtract=H._i64Subtract;var Ba=c._malloc=H._malloc;c._memcpy=H._memcpy;c._memset=H._memset;c._olm_account=H._olm_account;c._olm_account_generate_one_time_keys=H._olm_account_generate_one_time_keys;c._olm_account_generate_one_time_keys_random_length=H._olm_account_generate_one_time_keys_random_length;c._olm_account_identity_keys=H._olm_account_identity_keys;c._olm_account_identity_keys_length=H._olm_account_identity_keys_length;
|
||
|
c._olm_account_last_error=H._olm_account_last_error;c._olm_account_mark_keys_as_published=H._olm_account_mark_keys_as_published;c._olm_account_max_number_of_one_time_keys=H._olm_account_max_number_of_one_time_keys;c._olm_account_one_time_keys=H._olm_account_one_time_keys;c._olm_account_one_time_keys_length=H._olm_account_one_time_keys_length;c._olm_account_sign=H._olm_account_sign;c._olm_account_signature_length=H._olm_account_signature_length;c._olm_account_size=H._olm_account_size;
|
||
|
c._olm_clear_account=H._olm_clear_account;c._olm_clear_inbound_group_session=H._olm_clear_inbound_group_session;c._olm_clear_outbound_group_session=H._olm_clear_outbound_group_session;c._olm_clear_pk_decryption=H._olm_clear_pk_decryption;c._olm_clear_pk_encryption=H._olm_clear_pk_encryption;c._olm_clear_session=H._olm_clear_session;c._olm_clear_utility=H._olm_clear_utility;c._olm_create_account=H._olm_create_account;c._olm_create_account_random_length=H._olm_create_account_random_length;
|
||
|
c._olm_create_inbound_session=H._olm_create_inbound_session;c._olm_create_inbound_session_from=H._olm_create_inbound_session_from;c._olm_create_outbound_session=H._olm_create_outbound_session;c._olm_create_outbound_session_random_length=H._olm_create_outbound_session_random_length;c._olm_decrypt=H._olm_decrypt;c._olm_decrypt_max_plaintext_length=H._olm_decrypt_max_plaintext_length;c._olm_ed25519_verify=H._olm_ed25519_verify;c._olm_encrypt=H._olm_encrypt;c._olm_encrypt_message_length=H._olm_encrypt_message_length;
|
||
|
c._olm_encrypt_message_type=H._olm_encrypt_message_type;c._olm_encrypt_random_length=H._olm_encrypt_random_length;c._olm_error=H._olm_error;c._olm_export_inbound_group_session=H._olm_export_inbound_group_session;c._olm_export_inbound_group_session_length=H._olm_export_inbound_group_session_length;c._olm_get_library_version=H._olm_get_library_version;c._olm_group_decrypt=H._olm_group_decrypt;c._olm_group_decrypt_max_plaintext_length=H._olm_group_decrypt_max_plaintext_length;c._olm_group_encrypt=H._olm_group_encrypt;
|
||
|
c._olm_group_encrypt_message_length=H._olm_group_encrypt_message_length;c._olm_import_inbound_group_session=H._olm_import_inbound_group_session;c._olm_inbound_group_session=H._olm_inbound_group_session;c._olm_inbound_group_session_first_known_index=H._olm_inbound_group_session_first_known_index;c._olm_inbound_group_session_id=H._olm_inbound_group_session_id;c._olm_inbound_group_session_id_length=H._olm_inbound_group_session_id_length;c._olm_inbound_group_session_is_verified=H._olm_inbound_group_session_is_verified;
|
||
|
c._olm_inbound_group_session_last_error=H._olm_inbound_group_session_last_error;c._olm_inbound_group_session_size=H._olm_inbound_group_session_size;c._olm_init_inbound_group_session=H._olm_init_inbound_group_session;c._olm_init_outbound_group_session=H._olm_init_outbound_group_session;c._olm_init_outbound_group_session_random_length=H._olm_init_outbound_group_session_random_length;c._olm_matches_inbound_session=H._olm_matches_inbound_session;c._olm_matches_inbound_session_from=H._olm_matches_inbound_session_from;
|
||
|
c._olm_outbound_group_session=H._olm_outbound_group_session;c._olm_outbound_group_session_id=H._olm_outbound_group_session_id;c._olm_outbound_group_session_id_length=H._olm_outbound_group_session_id_length;c._olm_outbound_group_session_key=H._olm_outbound_group_session_key;c._olm_outbound_group_session_key_length=H._olm_outbound_group_session_key_length;c._olm_outbound_group_session_last_error=H._olm_outbound_group_session_last_error;c._olm_outbound_group_session_message_index=H._olm_outbound_group_session_message_index;
|
||
|
c._olm_outbound_group_session_size=H._olm_outbound_group_session_size;c._olm_pickle_account=H._olm_pickle_account;c._olm_pickle_account_length=H._olm_pickle_account_length;c._olm_pickle_inbound_group_session=H._olm_pickle_inbound_group_session;c._olm_pickle_inbound_group_session_length=H._olm_pickle_inbound_group_session_length;c._olm_pickle_outbound_group_session=H._olm_pickle_outbound_group_session;c._olm_pickle_outbound_group_session_length=H._olm_pickle_outbound_group_session_length;
|
||
|
c._olm_pickle_pk_decryption=H._olm_pickle_pk_decryption;c._olm_pickle_pk_decryption_length=H._olm_pickle_pk_decryption_length;c._olm_pickle_session=H._olm_pickle_session;c._olm_pickle_session_length=H._olm_pickle_session_length;c._olm_pk_ciphertext_length=H._olm_pk_ciphertext_length;c._olm_pk_decrypt=H._olm_pk_decrypt;c._olm_pk_decryption=H._olm_pk_decryption;c._olm_pk_decryption_last_error=H._olm_pk_decryption_last_error;c._olm_pk_decryption_size=H._olm_pk_decryption_size;c._olm_pk_encrypt=H._olm_pk_encrypt;
|
||
|
c._olm_pk_encrypt_random_length=H._olm_pk_encrypt_random_length;c._olm_pk_encryption=H._olm_pk_encryption;c._olm_pk_encryption_last_error=H._olm_pk_encryption_last_error;c._olm_pk_encryption_set_recipient_key=H._olm_pk_encryption_set_recipient_key;c._olm_pk_encryption_size=H._olm_pk_encryption_size;c._olm_pk_generate_key=H._olm_pk_generate_key;c._olm_pk_generate_key_random_length=H._olm_pk_generate_key_random_length;c._olm_pk_get_private_key=H._olm_pk_get_private_key;c._olm_pk_key_from_private=H._olm_pk_key_from_private;
|
||
|
c._olm_pk_key_length=H._olm_pk_key_length;c._olm_pk_mac_length=H._olm_pk_mac_length;c._olm_pk_max_plaintext_length=H._olm_pk_max_plaintext_length;c._olm_pk_private_key_length=H._olm_pk_private_key_length;c._olm_remove_one_time_keys=H._olm_remove_one_time_keys;c._olm_session=H._olm_session;c._olm_session_has_received_message=H._olm_session_has_received_message;c._olm_session_id=H._olm_session_id;c._olm_session_id_length=H._olm_session_id_length;c._olm_session_last_error=H._olm_session_last_error;
|
||
|
c._olm_session_size=H._olm_session_size;c._olm_sha256=H._olm_sha256;c._olm_sha256_length=H._olm_sha256_length;c._olm_unpickle_account=H._olm_unpickle_account;c._olm_unpickle_inbound_group_session=H._olm_unpickle_inbound_group_session;c._olm_unpickle_outbound_group_session=H._olm_unpickle_outbound_group_session;c._olm_unpickle_pk_decryption=H._olm_unpickle_pk_decryption;c._olm_unpickle_session=H._olm_unpickle_session;c._olm_utility=H._olm_utility;c._olm_utility_last_error=H._olm_utility_last_error;
|
||
|
c._olm_utility_size=H._olm_utility_size;c._sbrk=H._sbrk;c.establishStackSpace=H.establishStackSpace;c.getTempRet0=H.getTempRet0;c.runPostSets=H.runPostSets;c.setTempRet0=H.setTempRet0;c.setThrew=H.setThrew;var Ca=c.stackAlloc=H.stackAlloc,ab=c.stackRestore=H.stackRestore,$a=c.stackSave=H.stackSave;c.dynCall_ii=H.dynCall_ii;c.dynCall_iii=H.dynCall_iii;c.dynCall_iiiiiiiiii=H.dynCall_iiiiiiiiii;c.asm=H;c.ALLOC_STACK=1;
|
||
|
if(F){if(String.prototype.startsWith?!F.startsWith(Wa):0!==F.indexOf(Wa)){var bb=F;F=c.locateFile?c.locateFile(bb,n):n+bb}if(m||ia){var cb=c.readBinary(F);A.set(cb,8)}else{var eb=function(){c.readAsync(F,db,function(){throw"could not load memory initializer "+F;})};E++;c.monitorRunDependencies&&c.monitorRunDependencies(E);var db=function(a){a.byteLength&&(a=new Uint8Array(a));A.set(a,8);c.memoryInitializerRequest&&delete c.memoryInitializerRequest.response;E--;c.monitorRunDependencies&&c.monitorRunDependencies(E);
|
||
|
0==E&&(null!==Ua&&(clearInterval(Ua),Ua=null),Va&&(a=Va,Va=null,a()))},fb=p(F);if(fb)db(fb.buffer);else if(c.memoryInitializerRequest){var gb=function(){var a=c.memoryInitializerRequest,b=a.response;if(200!==a.status&&0!==a.status)if(b=p(c.memoryInitializerRequestURL))b=b.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+a.status+", retrying "+F);eb();return}db(b)};c.memoryInitializerRequest.response?setTimeout(gb,0):c.memoryInitializerRequest.addEventListener("load",
|
||
|
gb)}else eb()}}c.then=function(a){if(c.calledRun)a(c);else{var b=c.onRuntimeInitialized;c.onRuntimeInitialized=function(){b&&b();a(c)}}return c};Va=function hb(){c.calledRun||ib();c.calledRun||(Va=hb)};
|
||
|
function ib(){function a(){if(!c.calledRun&&(c.calledRun=!0,!sa)){Ra||(Ra=!0,Ma(Oa));Ma(Pa);if(c.onRuntimeInitialized)c.onRuntimeInitialized();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var a=c.postRun.shift();Qa.unshift(a)}Ma(Qa)}}if(!(0<E)){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)Sa();Ma(Na);0<E||c.calledRun||(c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},
|
||
|
1);a()},1)):a())}}c.run=ib;function w(a){if(c.onAbort)c.onAbort(a);void 0!==a?(ma(a),na(a),a=JSON.stringify(a)):a="";sa=!0;throw"abort("+a+"). Build with -s ASSERTIONS=1 for more info.";}c.abort=w;if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();c.noExitRuntime=!0;ib();function J(){var a=c._olm_outbound_group_session_size();this.b=K(a);this.a=c._olm_outbound_group_session(this.b)}
|
||
|
function L(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_outbound_group_session_last_error(arguments[0])),Error("OLM."+b);return b}}J.prototype.free=function(){c._olm_clear_outbound_group_session(this.a);M(this.a)};J.prototype.pickle=N(function(a){a=G(a);var b=L(c._olm_pickle_outbound_group_session_length)(this.a),d=z(a),e=z(b+1);try{L(c._olm_pickle_outbound_group_session)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
J.prototype.unpickle=N(function(a,b){a=G(a);var d=z(a);b=G(b);var e=z(b);try{L(c._olm_unpickle_outbound_group_session)(this.a,d,a.length,e,b.length)}finally{for(O(d,a.length),d=0;d<a.length;d++)a[d]=0}});J.prototype.create=N(function(){var a=L(c._olm_init_outbound_group_session_random_length)(this.a),b=Q(a);L(c._olm_init_outbound_group_session)(this.a,b,a)});
|
||
|
J.prototype.encrypt=function(a){try{var b=Fa(a);var d=L(c._olm_group_encrypt_message_length)(this.a,b);var e=K(b+1);Ea(a,A,e,b+1);var g=K(d+1);L(c._olm_group_encrypt)(this.a,e,b,g,d);x(g+d);return D(g)}finally{void 0!==e&&(O(e,b+1),M(e)),void 0!==g&&M(g)}};J.prototype.session_id=N(function(){var a=L(c._olm_outbound_group_session_id_length)(this.a),b=z(a+1);L(c._olm_outbound_group_session_id)(this.a,b,a);return C(b)});
|
||
|
J.prototype.session_key=N(function(){var a=L(c._olm_outbound_group_session_key_length)(this.a),b=z(a+1);L(c._olm_outbound_group_session_key)(this.a,b,a);var d=C(b);O(b,a);return d});J.prototype.message_index=function(){return L(c._olm_outbound_group_session_message_index)(this.a)};olm_exports.OutboundGroupSession=J;function R(){var a=c._olm_inbound_group_session_size();this.b=K(a);this.a=c._olm_inbound_group_session(this.b)}
|
||
|
function S(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_inbound_group_session_last_error(arguments[0])),Error("OLM."+b);return b}}R.prototype.free=function(){c._olm_clear_inbound_group_session(this.a);M(this.a)};R.prototype.pickle=N(function(a){a=G(a);var b=S(c._olm_pickle_inbound_group_session_length)(this.a),d=z(a),e=z(b+1);try{S(c._olm_pickle_inbound_group_session)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
R.prototype.unpickle=N(function(a,b){a=G(a);var d=z(a);b=G(b);var e=z(b);try{S(c._olm_unpickle_inbound_group_session)(this.a,d,a.length,e,b.length)}finally{for(O(d,a.length),d=0;d<a.length;d++)a[d]=0}});R.prototype.create=N(function(a){a=G(a);var b=z(a);try{S(c._olm_init_inbound_group_session)(this.a,b,a.length)}finally{for(O(b,a.length),b=0;b<a.length;b++)a[b]=0}});
|
||
|
R.prototype.import_session=N(function(a){a=G(a);var b=z(a);try{S(c._olm_import_inbound_group_session)(this.a,b,a.length)}finally{for(O(b,a.length),b=0;b<a.length;b++)a[b]=0}});R.prototype.decrypt=N(function(a){try{var b=K(a.length);Ta(a,b);var d=S(c._olm_group_decrypt_max_plaintext_length)(this.a,b,a.length);Ta(a,b);var e=K(d+1);var g=z(4);var k=S(c._olm_group_decrypt)(this.a,b,a.length,e,d,g);x(e+k);return{plaintext:D(e),message_index:Aa(g,"i32")}}finally{void 0!==b&&M(b),void 0!==e&&(O(e,k+1),M(e))}});
|
||
|
R.prototype.session_id=N(function(){var a=S(c._olm_inbound_group_session_id_length)(this.a),b=z(a+1);S(c._olm_inbound_group_session_id)(this.a,b,a);return C(b)});R.prototype.first_known_index=N(function(){return S(c._olm_inbound_group_session_first_known_index)(this.a)});R.prototype.export_session=N(function(a){var b=S(c._olm_export_inbound_group_session_length)(this.a),d=z(b+1);L(c._olm_export_inbound_group_session)(this.a,d,b,a);a=C(d);O(d,b);return a});olm_exports.InboundGroupSession=R;
|
||
|
function jb(){var a=c._olm_pk_encryption_size();this.b=K(a);this.a=c._olm_pk_encryption(this.b)}function T(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_pk_encryption_last_error(arguments[0])),Error("OLM."+b);return b}}jb.prototype.free=function(){c._olm_clear_pk_encryption(this.a);M(this.a)};jb.prototype.set_recipient_key=N(function(a){a=G(a);var b=z(a);T(c._olm_pk_encryption_set_recipient_key)(this.a,b,a.length)});
|
||
|
jb.prototype.encrypt=N(function(a){try{var b=Fa(a);var d=K(b+1);Ea(a,A,d,b+1);var e=T(c._olm_pk_encrypt_random_length)();var g=Q(e);var k=T(c._olm_pk_ciphertext_length)(this.a,b);var l=K(k+1);var r=T(c._olm_pk_mac_length)(this.a),I=z(r+1);x(I+r);var P=T(c._olm_pk_key_length)(),B=z(P+1);x(B+P);T(c._olm_pk_encrypt)(this.a,d,b,l,k,I,r,B,P,g,e);x(l+k);return{ciphertext:D(l),mac:C(I),ephemeral:C(B)}}finally{void 0!==g&&O(g,e),void 0!==d&&(O(d,b+1),M(d)),void 0!==l&&M(l)}});
|
||
|
function U(){var a=c._olm_pk_decryption_size();this.b=K(a);this.a=c._olm_pk_decryption(this.b)}function V(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_pk_decryption_last_error(arguments[0])),Error("OLM."+b);return b}}U.prototype.free=function(){c._olm_clear_pk_decryption(this.a);M(this.a)};
|
||
|
U.prototype.init_with_private_key=N(function(a){var b=z(a.length);c.HEAPU8.set(a,b);var d=V(c._olm_pk_key_length)(),e=z(d+1);try{V(c._olm_pk_key_from_private)(this.a,e,d,b,a.length)}finally{O(b,a.length)}return C(e)});U.prototype.generate_key=N(function(){var a=V(c._olm_pk_private_key_length)(),b=Q(a),d=V(c._olm_pk_key_length)(),e=z(d+1);try{V(c._olm_pk_key_from_private)(this.a,e,d,b,a)}finally{O(b,a)}return C(e)});
|
||
|
U.prototype.get_private_key=N(function(){var a=T(c._olm_pk_private_key_length)(),b=z(a);V(c._olm_pk_get_private_key)(this.a,b,a);var d=new Uint8Array(new Uint8Array(c.HEAPU8.buffer,b,a));O(b,a);return d});U.prototype.pickle=N(function(a){a=G(a);var b=V(c._olm_pickle_pk_decryption_length)(this.a),d=z(a),e=z(b+1);try{V(c._olm_pickle_pk_decryption)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
U.prototype.unpickle=N(function(a,b){a=G(a);var d=z(a),e=G(b),g=z(e),k=V(c._olm_pk_key_length)();b=z(k+1);try{V(c._olm_unpickle_pk_decryption)(this.a,d,a.length,g,e.length,b,k)}finally{for(O(d,a.length),d=0;d<a.length;d++)a[d]=0}return C(b)});
|
||
|
U.prototype.decrypt=N(function(a,b,d){try{var e=Fa(d);var g=K(e+1);Ea(d,A,g,e+1);var k=G(a),l=z(k),r=G(b),I=z(r);var P=V(c._olm_pk_max_plaintext_length)(this.a,e);var B=K(P+1);var aa=V(c._olm_pk_decrypt)(this.a,l,k.length,I,r.length,g,e,B,P);x(B+aa);return D(B)}finally{void 0!==B&&(O(B,aa+1),M(B)),void 0!==g&&M(g)}});var K=c._malloc,M=c._free,f;function Q(a){var b=z(a);a=new Uint8Array(c.HEAPU8.buffer,b,a);ba(a);return b}
|
||
|
function N(a){return function(){var b=$a();try{return a.apply(this,arguments)}finally{ab(b)}}}function O(a,b){for(;0<b--;)c.HEAP8[a++]=0}function W(){var a=c._olm_account_size();this.b=K(a);this.a=c._olm_account(this.b)}function X(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_account_last_error(arguments[0])),Error("OLM."+b);return b}}W.prototype.free=function(){c._olm_clear_account(this.a);M(this.a)};
|
||
|
W.prototype.create=N(function(){var a=X(c._olm_create_account_random_length)(this.a),b=Q(a);X(c._olm_create_account)(this.a,b,a)});W.prototype.identity_keys=N(function(){var a=X(c._olm_account_identity_keys_length)(this.a),b=z(a+1);X(c._olm_account_identity_keys)(this.a,b,a);return C(b)});W.prototype.sign=N(function(a){var b=X(c._olm_account_signature_length)(this.a);a=G(a);var d=z(a),e=z(b+1);try{X(c._olm_account_sign)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
W.prototype.one_time_keys=N(function(){var a=X(c._olm_account_one_time_keys_length)(this.a),b=z(a+1);X(c._olm_account_one_time_keys)(this.a,b,a);return C(b)});W.prototype.mark_keys_as_published=N(function(){X(c._olm_account_mark_keys_as_published)(this.a)});W.prototype.max_number_of_one_time_keys=N(function(){return X(c._olm_account_max_number_of_one_time_keys)(this.a)});
|
||
|
W.prototype.generate_one_time_keys=N(function(a){var b=X(c._olm_account_generate_one_time_keys_random_length)(this.a,a),d=Q(b);X(c._olm_account_generate_one_time_keys)(this.a,a,d,b)});W.prototype.remove_one_time_keys=N(function(a){X(c._olm_remove_one_time_keys)(this.a,a.a)});W.prototype.pickle=N(function(a){a=G(a);var b=X(c._olm_pickle_account_length)(this.a),d=z(a),e=z(b+1);try{X(c._olm_pickle_account)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
W.prototype.unpickle=N(function(a,b){a=G(a);var d=z(a);b=G(b);var e=z(b);try{X(c._olm_unpickle_account)(this.a,d,a.length,e,b.length)}finally{for(O(d,a.length),d=0;d<a.length;d++)a[d]=0}});function Y(){var a=c._olm_session_size();this.b=K(a);this.a=c._olm_session(this.b)}function Z(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_session_last_error(arguments[0])),Error("OLM."+b);return b}}Y.prototype.free=function(){c._olm_clear_session(this.a);M(this.a)};
|
||
|
Y.prototype.pickle=N(function(a){a=G(a);var b=Z(c._olm_pickle_session_length)(this.a),d=z(a),e=z(b+1);try{Z(c._olm_pickle_session)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});Y.prototype.unpickle=N(function(a,b){a=G(a);var d=z(a);b=G(b);var e=z(b);try{Z(c._olm_unpickle_session)(this.a,d,a.length,e,b.length)}finally{for(O(d,a.length),d=0;d<a.length;d++)a[d]=0}});
|
||
|
Y.prototype.create_outbound=N(function(a,b,d){var e=Z(c._olm_create_outbound_session_random_length)(this.a),g=Q(e);b=G(b);d=G(d);var k=z(b),l=z(d);try{Z(c._olm_create_outbound_session)(this.a,a.a,k,b.length,l,d.length,g,e)}finally{O(g,e)}});Y.prototype.create_inbound=N(function(a,b){b=G(b);var d=z(b);try{Z(c._olm_create_inbound_session)(this.a,a.a,d,b.length)}finally{for(O(d,b.length),a=0;a<b.length;a++)b[a]=0}});
|
||
|
Y.prototype.create_inbound_from=N(function(a,b,d){b=G(b);var e=z(b);d=G(d);var g=z(d);try{Z(c._olm_create_inbound_session_from)(this.a,a.a,e,b.length,g,d.length)}finally{for(O(g,d.length),a=0;a<d.length;a++)d[a]=0}});Y.prototype.session_id=N(function(){var a=Z(c._olm_session_id_length)(this.a),b=z(a+1);Z(c._olm_session_id)(this.a,b,a);return C(b)});Y.prototype.has_received_message=function(){return Z(c._olm_session_has_received_message)(this.a)?!0:!1};
|
||
|
Y.prototype.matches_inbound=N(function(a){a=G(a);var b=z(a);return Z(c._olm_matches_inbound_session)(this.a,b,a.length)?!0:!1});Y.prototype.matches_inbound_from=N(function(a,b){a=G(a);var d=z(a);b=G(b);var e=z(b);return Z(c._olm_matches_inbound_session_from)(this.a,d,a.length,e,b.length)?!0:!1});
|
||
|
Y.prototype.encrypt=N(function(a){try{var b=Z(c._olm_encrypt_random_length)(this.a);var d=Z(c._olm_encrypt_message_type)(this.a);var e=Fa(a);var g=Z(c._olm_encrypt_message_length)(this.a,e);var k=Q(b);var l=K(e+1);Ea(a,A,l,e+1);var r=K(g+1);Z(c._olm_encrypt)(this.a,l,e,k,b,r,g);x(r+g);return{type:d,body:D(r)}}finally{void 0!==k&&O(k,b),void 0!==l&&(O(l,e+1),M(l)),void 0!==r&&M(r)}});
|
||
|
Y.prototype.decrypt=N(function(a,b){try{var d=K(b.length);Ta(b,d);var e=Z(c._olm_decrypt_max_plaintext_length)(this.a,a,d,b.length);Ta(b,d);var g=K(e+1);var k=Z(c._olm_decrypt)(this.a,a,d,b.length,g,e);x(g+k);return D(g)}finally{void 0!==d&&M(d),void 0!==g&&(O(g,e+1),M(g))}});function kb(){var a=c._olm_utility_size();this.b=K(a);this.a=c._olm_utility(this.b)}
|
||
|
function lb(a){return function(){var b=a.apply(this,arguments);if(b===f)throw b=C(c._olm_utility_last_error(arguments[0])),Error("OLM."+b);return b}}kb.prototype.free=function(){c._olm_clear_utility(this.a);M(this.a)};kb.prototype.sha256=N(function(a){var b=lb(c._olm_sha256_length)(this.a);a=G(a);var d=z(a),e=z(b+1);try{lb(c._olm_sha256)(this.a,d,a.length,e,b)}finally{for(O(d,a.length),b=0;b<a.length;b++)a[b]=0}return C(e)});
|
||
|
kb.prototype.ed25519_verify=N(function(a,b,d){a=G(a);var e=z(a);b=G(b);var g=z(b);d=G(d);var k=z(d);try{lb(c._olm_ed25519_verify)(this.a,e,a.length,g,b.length,k,d.length)}finally{for(O(g,b.length),a=0;a<b.length;a++)b[a]=0}});olm_exports.Account=W;olm_exports.Session=Y;olm_exports.Utility=kb;olm_exports.PkEncryption=jb;olm_exports.PkDecryption=U;olm_exports.get_library_version=N(function(){var a=z(3);c._olm_get_library_version(a,a+1,a+2);return[Aa(a,"i8"),Aa(a+1,"i8"),Aa(a+2,"i8")]});
|
||
|
|
||
|
|
||
|
|
||
|
return Module;
|
||
|
}
|
||
|
);
|
||
|
})();
|
||
|
if (typeof exports === 'object' && typeof module === 'object')
|
||
|
module.exports = Module;
|
||
|
else if (typeof define === 'function' && define['amd'])
|
||
|
define([], function() { return Module; });
|
||
|
else if (typeof exports === 'object')
|
||
|
exports["Module"] = Module;
|
||
|
var olmInitPromise;
|
||
|
|
||
|
olm_exports['init'] = function(opts) {
|
||
|
if (olmInitPromise) return olmInitPromise;
|
||
|
|
||
|
if (opts) OLM_OPTIONS = opts;
|
||
|
|
||
|
olmInitPromise = new Promise(function(resolve, reject) {
|
||
|
onInitSuccess = function() {
|
||
|
resolve();
|
||
|
};
|
||
|
onInitFail = function(err) {
|
||
|
reject(err);
|
||
|
};
|
||
|
Module();
|
||
|
});
|
||
|
return olmInitPromise;
|
||
|
};
|
||
|
|
||
|
if (typeof(window) !== 'undefined') {
|
||
|
// We've been imported directly into a browser. Define the global 'Olm' object.
|
||
|
// (we do this even if module.exports was defined, because it's useful to have
|
||
|
// Olm in the global scope for browserified and webpacked apps.)
|
||
|
window["Olm"] = olm_exports;
|
||
|
}
|
||
|
|
||
|
if (typeof module === 'object') {
|
||
|
// Emscripten sets the module exports to be its module
|
||
|
// with wrapped c functions. Clobber it with our higher
|
||
|
// level wrapper class.
|
||
|
module.exports = olm_exports;
|
||
|
}
|