
var jxl_enc_mt_simd = (function() {
  var _scriptDir = import.meta.url;
  
  return (
function(jxl_enc_mt_simd) {
  jxl_enc_mt_simd = jxl_enc_mt_simd || {};


function e(){m.buffer!=n&&u(m.buffer);return aa}function v(){m.buffer!=n&&u(m.buffer);return ba}function x(){m.buffer!=n&&u(m.buffer);return ca}function ea(){m.buffer!=n&&u(m.buffer);return fa}function A(){m.buffer!=n&&u(m.buffer);return ha}function C(){m.buffer!=n&&u(m.buffer);return ia}function ja(){m.buffer!=n&&u(m.buffer);return ka}function la(){m.buffer!=n&&u(m.buffer);return ma}var D;D||(D=typeof jxl_enc_mt_simd !== 'undefined' ? jxl_enc_mt_simd : {});var na,oa;
D.ready=new Promise(function(a,b){na=a;oa=b});var E={},F;for(F in D)D.hasOwnProperty(F)&&(E[F]=D[F]);var pa="./this.program",G=D.ENVIRONMENT_IS_PTHREAD||!1;G&&(n=D.buffer);var H="";function qa(a){return D.locateFile?D.locateFile(a,H):H+a}var ra;H=self.location.href;_scriptDir&&(H=_scriptDir);0!==H.indexOf("blob:")?H=H.substr(0,H.lastIndexOf("/")+1):H="";ra=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)};
var sa=D.print||console.log.bind(console),J=D.printErr||console.warn.bind(console);for(F in E)E.hasOwnProperty(F)&&(D[F]=E[F]);E=null;D.thisProgram&&(pa=D.thisProgram);var ta;D.wasmBinary&&(ta=D.wasmBinary);var noExitRuntime;D.noExitRuntime&&(noExitRuntime=D.noExitRuntime);"object"!==typeof WebAssembly&&K("no native wasm support detected");var m,ua,threadInfoStruct=0,selfThreadId=0,va=!1;function wa(a,b){a||K("Assertion failed: "+b)}
function xa(a,b,c){c=b+c;for(var d="";!(b>=c);){var f=a[b++];if(!f)break;if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var l=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|l:(f&7)<<18|g<<12|l<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function L(a,b){return a?xa(v(),a,b):""}
function ya(a,b,c,d){if(0<d){d=c+d-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}if(127>=g){if(c>=d)break;b[c++]=g}else{if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6}else{if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63}b[c++]=128|g>>6&63}b[c++]=128|g&63}}b[c]=0}}function za(a,b,c){ya(a,v(),b,c)}
function Aa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}function Ba(a,b){for(var c=0,d="";;){var f=x()[a+2*c>>1];if(0==f||c==b/2)return d;++c;d+=String.fromCharCode(f)}}function Ca(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f){var g=a.charCodeAt(f);x()[b>>1]=g;b+=2}x()[b>>1]=0;return b-d}
function Da(a){return 2*a.length}function Ea(a,b){for(var c=0,d="";!(c>=b/4);){var f=A()[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function Fa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}A()[b>>2]=g;b+=4;if(b+4>c)break}A()[b>>2]=0;return b-d}
function Ga(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}function Ha(a,b){e().set(a,b)}var n,aa,ba,ca,fa,ha,ia,ka,ma;function u(a){n=a;D.HEAP8=aa=new Int8Array(a);D.HEAP16=ca=new Int16Array(a);D.HEAP32=ha=new Int32Array(a);D.HEAPU8=ba=new Uint8Array(a);D.HEAPU16=fa=new Uint16Array(a);D.HEAPU32=ia=new Uint32Array(a);D.HEAPF32=ka=new Float32Array(a);D.HEAPF64=ma=new Float64Array(a)}var Ia=D.INITIAL_MEMORY||16777216;
if(G)m=D.wasmMemory,n=D.buffer;else if(D.wasmMemory)m=D.wasmMemory;else if(m=new WebAssembly.Memory({initial:Ia/65536,maximum:32768,shared:!0}),!(m.buffer instanceof SharedArrayBuffer))throw J("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),Error("bad memory");m&&(n=m.buffer);Ia=n.byteLength;u(n);var M,Ja=[],Ka=[],La=[],Ma=[];
function Na(){var a=D.preRun.shift();Ja.unshift(a)}var N=0,Oa=null,Pa=null;D.preloadedImages={};D.preloadedAudios={};function K(a){if(D.onAbort)D.onAbort(a);G&&console.error("Pthread aborting at "+Error().stack);J(a);va=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");oa(a);throw a;}function Qa(){var a=O;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var O="jxl_enc_mt_simd.wasm";
Qa()||(O=qa(O));function Ra(){try{if(ta)return new Uint8Array(ta);if(ra)return ra(O);throw"both async and sync fetching of the wasm failed";}catch(a){K(a)}}function Sa(){return ta||"function"!==typeof fetch?Promise.resolve().then(Ra):fetch(O,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+O+"'";return a.arrayBuffer()}).catch(function(){return Ra()})}var Ua={60053:function(a,b){setTimeout(function(){Ta(a,b)},0)},60131:function(){throw"Canceled!";}};
function Va(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(D);else{var c=b.Bb;"number"===typeof c?void 0===b.Va?M.get(c)():M.get(c)(b.Va):c(void 0===b.Va?null:b.Va)}}}function Wa(a,b,c){var d;-1!=a.indexOf("j")?d=c&&c.length?D["dynCall_"+a].apply(null,[b].concat(c)):D["dynCall_"+a].call(null,b):d=M.get(b).apply(null,c);return d}D.dynCall=Wa;var P=0,Xa=0,Ya=0;function Za(a,b,c){P=a|0;Ya=b|0;Xa=c|0}D.registerPthreadPtr=Za;
function $a(a,b){if(0>=a||a>e().length||a&1||0>b)return-28;if(0==b)return 0;2147483647<=b&&(b=Infinity);var c=Atomics.load(A(),Q.rb>>2),d=0;if(c==a&&Atomics.compareExchange(A(),Q.rb>>2,c,0)==c&&(--b,d=1,0>=b))return 1;a=Atomics.notify(A(),a>>2,b);if(0<=a)return a+d;throw"Atomics.notify returned an unexpected value "+a;}D._emscripten_futex_wake=$a;
function ab(a){if(G)throw"Internal Error! cleanupThread() can only ever be called from main application thread!";if(!a)throw"Internal Error! Null pthread_ptr in cleanupThread!";A()[a+12>>2]=0;(a=Q.Oa[a])&&Q.bb(a.worker)}
var Q={ic:1,pc:{ub:0,vb:0},Ma:[],Qa:[],Jb:function(){for(var a=navigator.hardwareConcurrency,b=0;b<a;++b)Q.lb()},Kb:function(){Q.Ka=R(232);for(var a=0;58>a;++a)C()[Q.Ka/4+a]=0;A()[Q.Ka+12>>2]=Q.Ka;a=Q.Ka+156;A()[a>>2]=a;var b=R(512);for(a=0;128>a;++a)C()[b/4+a]=0;Atomics.store(C(),Q.Ka+104>>2,b);Atomics.store(C(),Q.Ka+40>>2,Q.Ka);Atomics.store(C(),Q.Ka+44>>2,42);Q.pb();Za(Q.Ka,!1,1);bb(Q.Ka)},Lb:function(){Q.pb();na(D);Q.receiveObjectTransfer=Q.Qb;Q.setThreadStatus=Q.Rb;Q.threadCancel=Q.ac;Q.threadExit=
Q.bc},pb:function(){Q.rb=cb},Oa:{},kb:[],Rb:function(){},tb:function(){for(;0<Q.kb.length;)Q.kb.pop()();G&&threadInfoStruct&&db()},bc:function(a){var b=P|0;b&&(Atomics.store(C(),b+4>>2,a),Atomics.store(C(),b+0>>2,1),Atomics.store(C(),b+60>>2,1),Atomics.store(C(),b+64>>2,0),Q.tb(),$a(b+0,2147483647),Za(0,0,0),threadInfoStruct=0,G&&postMessage({cmd:"exit"}))},ac:function(){Q.tb();Atomics.store(C(),threadInfoStruct+4>>2,-1);Atomics.store(C(),threadInfoStruct+0>>2,1);$a(threadInfoStruct+0,2147483647);
threadInfoStruct=selfThreadId=0;Za(0,0,0);postMessage({cmd:"cancelDone"})},wc:function(){for(var a in Q.Oa){var b=Q.Oa[a];b&&b.worker&&Q.bb(b.worker)}Q.Oa={};for(a=0;a<Q.Ma.length;++a){var c=Q.Ma[a];c.terminate()}Q.Ma=[];for(a=0;a<Q.Qa.length;++a)c=Q.Qa[a],b=c.La,Q.ib(b),c.terminate();Q.Qa=[]},ib:function(a){if(a){if(a.threadInfoStruct){var b=A()[a.threadInfoStruct+104>>2];A()[a.threadInfoStruct+104>>2]=0;S(b);S(a.threadInfoStruct)}a.threadInfoStruct=0;a.gb&&a.Ra&&S(a.Ra);a.Ra=0;a.worker&&(a.worker.La=
null)}},bb:function(a){delete Q.Oa[a.La.wb];Q.Ma.push(a);Q.Qa.splice(Q.Qa.indexOf(a),1);Q.ib(a.La);a.La=void 0},Qb:function(){},qb:function(a,b){a.onmessage=function(c){var d=c.data,f=d.cmd;a.La&&(Q.hb=a.La.threadInfoStruct);if(d.targetThread&&d.targetThread!=(P|0)){var g=Q.Oa[d.vc];g?g.worker.postMessage(c.data,d.transferList):console.error('Internal error! Worker sent a message "'+f+'" to target pthread '+d.targetThread+", but that thread no longer exists!")}else if("processQueuedMainThreadWork"===
f)eb();else if("spawnThread"===f)fb(c.data);else if("cleanupThread"===f)ab(d.thread);else if("killThread"===f){c=d.thread;if(G)throw"Internal Error! killThread() can only ever be called from main application thread!";if(!c)throw"Internal Error! Null pthread_ptr in killThread!";A()[c+12>>2]=0;c=Q.Oa[c];c.worker.terminate();Q.ib(c);Q.Qa.splice(Q.Qa.indexOf(c.worker),1);c.worker.La=void 0}else if("cancelThread"===f){c=d.thread;if(G)throw"Internal Error! cancelThread() can only ever be called from main application thread!";
if(!c)throw"Internal Error! Null pthread_ptr in cancelThread!";Q.Oa[c].worker.postMessage({cmd:"cancel"})}else"loaded"===f?(a.loaded=!0,b&&b(a),a.Xa&&(a.Xa(),delete a.Xa)):"print"===f?sa("Thread "+d.threadId+": "+d.text):"printErr"===f?J("Thread "+d.threadId+": "+d.text):"alert"===f?alert("Thread "+d.threadId+": "+d.text):"exit"===f?a.La&&Atomics.load(C(),a.La.wb+68>>2)&&Q.bb(a):"cancelDone"===f?Q.bb(a):"objectTransfer"!==f&&("setimmediate"===c.data.target?a.postMessage(c.data):J("worker sent an unknown command "+
f));Q.hb=void 0};a.onerror=function(c){J("pthread sent an error! "+c.filename+":"+c.lineno+": "+c.message)};a.postMessage({cmd:"load",urlOrBlob:D.mainScriptUrlOrBlob||_scriptDir,wasmMemory:m,wasmModule:ua})},lb:function(){var a=qa("jxl_enc_mt_simd.worker.js");Q.Ma.push(new Worker(a))},Cb:function(){0==Q.Ma.length&&(Q.lb(),Q.qb(Q.Ma[0]));return 0<Q.Ma.length?Q.Ma.pop():null},jc:function(a){for(a=performance.now()+a;performance.now()<a;);}};D.establishStackSpace=function(a){gb(a)};
D.getNoExitRuntime=function(){return noExitRuntime};var hb;hb=G?function(){return performance.now()-D.__performance_now_clock_drift}:function(){return performance.now()};function ib(a,b){Q.kb.push(function(){M.get(a)(b)})}
function jb(a){this.Wa=a-16;this.Wb=function(b){A()[this.Wa+8>>2]=b};this.Tb=function(b){A()[this.Wa+0>>2]=b};this.Ub=function(){A()[this.Wa+4>>2]=0};this.Sb=function(){var b=0;e()[this.Wa+12>>0]=b};this.Vb=function(){var b=0;e()[this.Wa+13>>0]=b};this.Hb=function(b,c){this.Wb(b);this.Tb(c);this.Ub();this.Sb();this.Vb()}}function kb(){return 0<kb.xb}var lb={};function mb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function nb(a){return this.fromWireType(C()[a>>2])}var T={},U={},ob={};
function pb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function qb(a,b){a=pb(a);return(new Function("body","return function "+a+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n'))(b)}
function rb(a){var b=Error,c=qb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var sb=void 0;
function tb(a,b,c){function d(k){k=c(k);if(k.length!==a.length)throw new sb("Mismatched type converter count");for(var q=0;q<a.length;++q)V(a[q],k[q])}a.forEach(function(k){ob[k]=b});var f=Array(b.length),g=[],l=0;b.forEach(function(k,q){U.hasOwnProperty(k)?f[q]=U[k]:(g.push(k),T.hasOwnProperty(k)||(T[k]=[]),T[k].push(function(){f[q]=U[k];++l;l===g.length&&d(f)}))});0===g.length&&d(f)}
function ub(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var vb=void 0;function W(a){for(var b="";v()[a];)b+=vb[v()[a++]];return b}var wb=void 0;function X(a){throw new wb(a);}
function V(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||X('type "'+d+'" must have a positive integer typeid pointer');if(U.hasOwnProperty(a)){if(c.Gb)return;X("Cannot register type '"+d+"' twice")}U[a]=b;delete ob[a];T.hasOwnProperty(a)&&(b=T[a],delete T[a],b.forEach(function(f){f()}))}var xb=[],Y=[{},{value:void 0},{value:null},{value:!0},{value:!1}];
function yb(a){4<a&&0===--Y[a].jb&&(Y[a]=void 0,xb.push(a))}function zb(a){switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=xb.length?xb.pop():Y.length;Y[b]={jb:1,value:a};return b}}function Ab(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}
function Bb(a,b){switch(b){case 2:return function(c){return this.fromWireType(ja()[c>>2])};case 3:return function(c){return this.fromWireType(la()[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function Cb(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=qb(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
function Db(a,b){var c=D;if(void 0===c[a].Na){var d=c[a];c[a]=function(){c[a].Na.hasOwnProperty(arguments.length)||X("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].Na+")!");return c[a].Na[arguments.length].apply(this,arguments)};c[a].Na=[];c[a].Na[d.yb]=d}}
function Eb(a,b,c){D.hasOwnProperty(a)?((void 0===c||void 0!==D[a].Na&&void 0!==D[a].Na[c])&&X("Cannot register public name '"+a+"' twice"),Db(a,a),D.hasOwnProperty(c)&&X("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),D[a].Na[c]=b):(D[a]=b,void 0!==c&&(D[a].sc=c))}function Fb(a,b){for(var c=[],d=0;d<a;d++)c.push(A()[(b>>2)+d]);return c}
function Gb(a,b){wa(0<=a.indexOf("j"),"getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];return Wa(a,b,c)}}function Hb(a,b){a=W(a);var c=-1!=a.indexOf("j")?Gb(a,b):M.get(b);"function"!==typeof c&&X("unknown function pointer with signature "+a+": "+b);return c}var Ib=void 0;function Jb(a){a=Kb(a);var b=W(a);S(a);return b}
function Lb(a,b){function c(g){f[g]||U[g]||(ob[g]?ob[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new Ib(a+": "+d.map(Jb).join([", "]));}function Mb(a,b,c){switch(b){case 0:return c?function(d){return e()[d]}:function(d){return v()[d]};case 1:return c?function(d){return x()[d>>1]}:function(d){return ea()[d>>1]};case 2:return c?function(d){return A()[d>>2]}:function(d){return C()[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var Nb={};
function Ob(){return"object"===typeof globalThis?globalThis:Function("return this")()}function Pb(a,b){var c=U[a];void 0===c&&X(b+" has unknown type "+Jb(a));return c}var Qb={};function Rb(a,b,c){if(0>=a||a>e().length||a&1)return-28;a=Atomics.wait(A(),a>>2,b,c);if("timed-out"===a)return-73;if("not-equal"===a)return-6;if("ok"===a)return 0;throw"Atomics.wait returned an unexpected value "+a;}
function Z(a,b){for(var c=arguments.length-2,d=Sb(),f=Tb(8*c),g=f>>3,l=0;l<c;l++)la()[g+l]=arguments[2+l];c=Ub(a,c,f,b);gb(d);return c}var Vb=[],Wb=[],Xb=[0,"undefined"!==typeof document?document:0,"undefined"!==typeof window?window:0];function Yb(a){a=2<a?L(a):a;return Xb[a]||("undefined"!==typeof document?document.querySelector(a):void 0)}
function Zb(a,b,c){var d=Yb(a);if(!d)return-4;d.ab&&(A()[d.ab>>2]=b,A()[d.ab+4>>2]=c);if(d.sb||!d.lc)d.sb&&(d=d.sb),a=!1,d.$a&&d.$a.Za&&(a=d.$a.Za.getParameter(2978),a=0===a[0]&&0===a[1]&&a[2]===d.width&&a[3]===d.height),d.width=b,d.height=c,a&&d.$a.Za.viewport(0,0,b,c);else{if(d.ab){d=A()[d.ab+8>>2];a=a?L(a):"";var f=Sb(),g=Tb(12),l=0;if(a){l=Aa(a)+1;var k=R(l);za(a,k,l);l=k}A()[g>>2]=l;A()[g+4>>2]=b;A()[g+8>>2]=c;$b(0,d,657457152,0,l,g);gb(f);return 1}return-4}return 0}
function ac(a,b,c){return G?Z(2,1,a,b,c):Zb(a,b,c)}function bc(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(c,d){b.vertexAttribDivisorANGLE(c,d)},a.drawArraysInstanced=function(c,d,f,g){b.drawArraysInstancedANGLE(c,d,f,g)},a.drawElementsInstanced=function(c,d,f,g,l){b.drawElementsInstancedANGLE(c,d,f,g,l)})}
function cc(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(c){b.deleteVertexArrayOES(c)},a.bindVertexArray=function(c){b.bindVertexArrayOES(c)},a.isVertexArray=function(c){return b.isVertexArrayOES(c)})}function dc(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(c,d){b.drawBuffersWEBGL(c,d)})}
function ec(a){a||(a=fc);if(!a.Ib){a.Ib=!0;var b=a.Za;bc(b);cc(b);dc(b);b.mc=b.getExtension("EXT_disjoint_timer_query");b.rc=b.getExtension("WEBGL_multi_draw");var c="OES_texture_float OES_texture_half_float OES_standard_derivatives OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture OES_element_index_uint EXT_texture_filter_anisotropic EXT_frag_depth WEBGL_draw_buffers ANGLE_instanced_arrays OES_texture_float_linear OES_texture_half_float_linear EXT_blend_minmax EXT_shader_texture_lod EXT_texture_norm16 WEBGL_compressed_texture_pvrtc EXT_color_buffer_half_float WEBGL_color_buffer_float EXT_sRGB WEBGL_compressed_texture_etc1 EXT_disjoint_timer_query WEBGL_compressed_texture_etc WEBGL_compressed_texture_astc EXT_color_buffer_float WEBGL_compressed_texture_s3tc_srgb EXT_disjoint_timer_query_webgl2 WEBKIT_WEBGL_compressed_texture_pvrtc".split(" ");
(b.getSupportedExtensions()||[]).forEach(function(d){-1!=c.indexOf(d)&&b.getExtension(d)})}}var fc,gc=["default","low-power","high-performance"],hc={};function ic(){if(!jc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:pa||"./this.program"},b;for(b in hc)a[b]=hc[b];var c=[];for(b in a)c.push(b+"="+a[b]);jc=c}return jc}var jc,kc=[null,[],[]];
function lc(a){return G?Z(3,1,a):0}function mc(a,b,c,d,f){if(G)return Z(4,1,a,b,c,d,f)}function nc(a,b,c,d){if(G)return Z(5,1,a,b,c,d);for(var f=0,g=0;g<c;g++){for(var l=A()[b+8*g>>2],k=A()[b+(8*g+4)>>2],q=0;q<k;q++){var t=v()[l+q],r=kc[a];0===t||10===t?((1===a?sa:J)(xa(r,0)),r.length=0):r.push(t)}f+=k}A()[d>>2]=f;return 0}
function fb(a){if(G)throw"Internal Error! spawnThread() can only ever be called from main application thread!";var b=Q.Cb();if(void 0!==b.La)throw"Internal error!";if(!a.Sa)throw"Internal error, no pthread ptr!";Q.Qa.push(b);for(var c=R(512),d=0;128>d;++d)A()[c+4*d>>2]=0;var f=a.Ra+a.Ta;d=Q.Oa[a.Sa]={worker:b,Ra:a.Ra,Ta:a.Ta,gb:a.gb,wb:a.Sa,threadInfoStruct:a.Sa};var g=d.threadInfoStruct>>2;Atomics.store(C(),g,0);Atomics.store(C(),g+1,0);Atomics.store(C(),g+2,0);Atomics.store(C(),g+17,a.mb);Atomics.store(C(),
g+26,c);Atomics.store(C(),g+12,0);Atomics.store(C(),g+10,d.threadInfoStruct);Atomics.store(C(),g+11,42);Atomics.store(C(),g+27,a.Ta);Atomics.store(C(),g+21,a.Ta);Atomics.store(C(),g+20,f);Atomics.store(C(),g+29,f);Atomics.store(C(),g+30,a.mb);Atomics.store(C(),g+32,a.ub);Atomics.store(C(),g+33,a.vb);c=oc()+40;Atomics.store(C(),g+44,c);b.La=d;var l={cmd:"run",start_routine:a.$b,arg:a.Va,threadInfoStruct:a.Sa,selfThreadId:a.Sa,parentThreadId:a.Nb,stackBase:a.Ra,stackSize:a.Ta};b.Xa=function(){l.time=
performance.now();b.postMessage(l,a.hc)};b.loaded&&(b.Xa(),delete b.Xa)}function pc(){return P|0}D._pthread_self=pc;
function qc(a,b){if(!a)return J("pthread_join attempted on a null thread pointer!"),71;if(G&&selfThreadId==a)return J("PThread "+a+" is attempting to join to itself!"),16;if(!G&&Q.Ka==a)return J("Main thread "+a+" is attempting to join to itself!"),16;if(A()[a+12>>2]!==a)return J("pthread_join attempted on thread "+a+", which does not point to a valid thread, or does not exist anymore!"),71;if(Atomics.load(C(),a+68>>2))return J("Attempted to join thread "+a+", which was already detached!"),28;for(;;){var c=
Atomics.load(C(),a+0>>2);if(1==c)return c=Atomics.load(C(),a+4>>2),b&&(A()[b>>2]=c),Atomics.store(C(),a+68>>2,1),G?postMessage({cmd:"cleanupThread",thread:a}):ab(a),0;if(G&&threadInfoStruct&&!Atomics.load(C(),threadInfoStruct+60>>2)&&2==Atomics.load(C(),threadInfoStruct+0>>2))throw"Canceled!";G||eb();Rb(a+0,c,G?100:1)}}function rc(a){return 0===a%4&&(0!==a%100||0===a%400)}function sc(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}
var tc=[31,29,31,30,31,30,31,31,30,31,30,31],uc=[31,28,31,30,31,30,31,31,30,31,30,31];function vc(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(rc(a.getFullYear())?tc:uc)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
function wc(a,b,c,d){function f(h,p,y){for(h="number"===typeof h?h.toString():h||"";h.length<p;)h=y[0]+h;return h}function g(h,p){return f(h,p,"0")}function l(h,p){function y(I){return 0>I?-1:0<I?1:0}var B;0===(B=y(h.getFullYear()-p.getFullYear()))&&0===(B=y(h.getMonth()-p.getMonth()))&&(B=y(h.getDate()-p.getDate()));return B}function k(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function q(h){h=vc(new Date(h.Ja+1900,0,1),h.fb);var p=new Date(h.getFullYear()+1,0,4),y=k(new Date(h.getFullYear(),0,4));p=k(p);return 0>=l(y,h)?0>=l(p,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var t=A()[d+40>>2];d={ec:A()[d>>2],dc:A()[d+4>>2],cb:A()[d+8>>2],Ya:A()[d+12>>2],Ua:A()[d+16>>2],Ja:A()[d+20>>2],eb:A()[d+24>>2],fb:A()[d+28>>2],xc:A()[d+
32>>2],cc:A()[d+36>>2],fc:t?L(t):""};c=L(c);t={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var r in t)c=c.replace(new RegExp(r,"g"),t[r]);var w="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
z="January February March April May June July August September October November December".split(" ");t={"%a":function(h){return w[h.eb].substring(0,3)},"%A":function(h){return w[h.eb]},"%b":function(h){return z[h.Ua].substring(0,3)},"%B":function(h){return z[h.Ua]},"%C":function(h){return g((h.Ja+1900)/100|0,2)},"%d":function(h){return g(h.Ya,2)},"%e":function(h){return f(h.Ya,2," ")},"%g":function(h){return q(h).toString().substring(2)},"%G":function(h){return q(h)},"%H":function(h){return g(h.cb,
2)},"%I":function(h){h=h.cb;0==h?h=12:12<h&&(h-=12);return g(h,2)},"%j":function(h){return g(h.Ya+sc(rc(h.Ja+1900)?tc:uc,h.Ua-1),3)},"%m":function(h){return g(h.Ua+1,2)},"%M":function(h){return g(h.dc,2)},"%n":function(){return"\n"},"%p":function(h){return 0<=h.cb&&12>h.cb?"AM":"PM"},"%S":function(h){return g(h.ec,2)},"%t":function(){return"\t"},"%u":function(h){return h.eb||7},"%U":function(h){var p=new Date(h.Ja+1900,0,1),y=0===p.getDay()?p:vc(p,7-p.getDay());h=new Date(h.Ja+1900,h.Ua,h.Ya);return 0>
l(y,h)?g(Math.ceil((31-y.getDate()+(sc(rc(h.getFullYear())?tc:uc,h.getMonth()-1)-31)+h.getDate())/7),2):0===l(y,p)?"01":"00"},"%V":function(h){var p=new Date(h.Ja+1901,0,4),y=k(new Date(h.Ja+1900,0,4));p=k(p);var B=vc(new Date(h.Ja+1900,0,1),h.fb);return 0>l(B,y)?"53":0>=l(p,B)?"01":g(Math.ceil((y.getFullYear()<h.Ja+1900?h.fb+32-y.getDate():h.fb+1-y.getDate())/7),2)},"%w":function(h){return h.eb},"%W":function(h){var p=new Date(h.Ja,0,1),y=1===p.getDay()?p:vc(p,0===p.getDay()?1:7-p.getDay()+1);h=
new Date(h.Ja+1900,h.Ua,h.Ya);return 0>l(y,h)?g(Math.ceil((31-y.getDate()+(sc(rc(h.getFullYear())?tc:uc,h.getMonth()-1)-31)+h.getDate())/7),2):0===l(y,p)?"01":"00"},"%y":function(h){return(h.Ja+1900).toString().substring(2)},"%Y":function(h){return h.Ja+1900},"%z":function(h){h=h.cc;var p=0<=h;h=Math.abs(h)/60;return(p?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":function(h){return h.fc},"%%":function(){return"%"}};for(r in t)0<=c.indexOf(r)&&(c=c.replace(new RegExp(r,"g"),t[r](d)));r=
xc(c);if(r.length>b)return 0;Ha(r,a);return r.length-1}
function yc(a){if(G)return Z(6,1,a);switch(a){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;
case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===
typeof navigator?navigator.hardwareConcurrency||1:1}A()[zc()>>2]=28;return-1}G||Q.Jb();sb=D.InternalError=rb("InternalError");for(var Ac=Array(256),Bc=0;256>Bc;++Bc)Ac[Bc]=String.fromCharCode(Bc);vb=Ac;wb=D.BindingError=rb("BindingError");D.count_emval_handles=function(){for(var a=0,b=5;b<Y.length;++b)void 0!==Y[b]&&++a;return a};D.get_first_emval=function(){for(var a=5;a<Y.length;++a)if(void 0!==Y[a])return Y[a];return null};Ib=D.UnboundTypeError=rb("UnboundTypeError");
var Cc=[null,function(a,b){if(G)return Z(1,1,a,b)},ac,lc,mc,nc,yc];function xc(a){var b=Array(Aa(a)+1);ya(a,b,0,b.length);return b}G||Ka.push({Bb:function(){Dc()}});
var Gc={i:function(a,b,c,d){K("Assertion failed: "+L(a)+", at: "+[b?L(b):"unknown filename",c,d?L(d):"unknown function"])},K:function(a){return R(a+16)+16},X:function(a,b){return ib(a,b)},I:function(a,b,c){(new jb(a)).Hb(b,c);"uncaught_exception"in kb?kb.xb++:kb.xb=1;throw a;},w:function(a){var b=lb[a];delete lb[a];var c=b.Ob,d=b.Pb,f=b.ob,g=f.map(function(l){return l.Fb}).concat(f.map(function(l){return l.Yb}));tb([a],g,function(l){var k={};f.forEach(function(q,t){var r=l[t],w=q.Db,z=q.Eb,h=l[t+
f.length],p=q.Xb,y=q.Zb;k[q.Ab]={read:function(B){return r.fromWireType(w(z,B))},write:function(B,I){var da=[];p(y,B,h.toWireType(da,I));mb(da)}}});return[{name:b.name,fromWireType:function(q){var t={},r;for(r in k)t[r]=k[r].read(q);d(q);return t},toWireType:function(q,t){for(var r in k)if(!(r in t))throw new TypeError('Missing field:  "'+r+'"');var w=c();for(r in k)k[r].write(w,t[r]);null!==q&&q.push(d,w);return w},argPackAdvance:8,readValueFromPointer:nb,Pa:d}]})},S:function(a,b,c,d,f){var g=ub(c);
b=W(b);V(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,k){return k?d:f},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var k=e();else if(2===c)k=x();else if(4===c)k=A();else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(k[l>>g])},Pa:null})},R:function(a,b){b=W(b);V(a,{name:b,fromWireType:function(c){var d=Y[c].value;yb(c);return d},toWireType:function(c,d){return zb(d)},argPackAdvance:8,readValueFromPointer:nb,Pa:null})},t:function(a,
b,c){c=ub(c);b=W(b);V(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError('Cannot convert "'+Ab(f)+'" to '+this.name);return f},argPackAdvance:8,readValueFromPointer:Bb(b,c),Pa:null})},v:function(a,b,c,d,f,g){var l=Fb(b,c);a=W(a);f=Hb(d,f);Eb(a,function(){Lb("Cannot call "+a+" due to unbound types",l)},b-1);tb([],l,function(k){var q=a,t=a;k=[k[0],null].concat(k.slice(1));var r=f,w=k.length;2>w&&X("argTypes array size mismatch! Must at least get return value and 'this' types!");
for(var z=null!==k[1]&&!1,h=!1,p=1;p<k.length;++p)if(null!==k[p]&&void 0===k[p].Pa){h=!0;break}var y="void"!==k[0].name,B="",I="";for(p=0;p<w-2;++p)B+=(0!==p?", ":"")+"arg"+p,I+=(0!==p?", ":"")+"arg"+p+"Wired";t="return function "+pb(t)+"("+B+") {\nif (arguments.length !== "+(w-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(w-2)+" args!');\n}\n";h&&(t+="var destructors = [];\n");var da=h?"destructors":"null";B="throwBindingError invoker fn runDestructors retType classParam".split(" ");
r=[X,r,g,mb,k[0],k[1]];z&&(t+="var thisWired = classParam.toWireType("+da+", this);\n");for(p=0;p<w-2;++p)t+="var arg"+p+"Wired = argType"+p+".toWireType("+da+", arg"+p+"); // "+k[p+2].name+"\n",B.push("argType"+p),r.push(k[p+2]);z&&(I="thisWired"+(0<I.length?", ":"")+I);t+=(y?"var rv = ":"")+"invoker(fn"+(0<I.length?", ":"")+I+");\n";if(h)t+="runDestructors(destructors);\n";else for(p=z?1:2;p<k.length;++p)w=1===p?"thisWired":"arg"+(p-2)+"Wired",null!==k[p].Pa&&(t+=w+"_dtor("+w+"); // "+k[p].name+
"\n",B.push(w+"_dtor"),r.push(k[p].Pa));y&&(t+="var ret = retType.fromWireType(rv);\nreturn ret;\n");B.push(t+"}\n");k=Cb(B).apply(null,r);p=b-1;if(!D.hasOwnProperty(q))throw new sb("Replacing nonexistant public symbol");void 0!==D[q].Na&&void 0!==p?D[q].Na[p]=k:(D[q]=k,D[q].yb=p);return[]})},j:function(a,b,c,d,f){function g(t){return t}b=W(b);-1===f&&(f=4294967295);var l=ub(c);if(0===d){var k=32-8*c;g=function(t){return t<<k>>>k}}var q=-1!=b.indexOf("unsigned");V(a,{name:b,fromWireType:g,toWireType:function(t,
r){if("number"!==typeof r&&"boolean"!==typeof r)throw new TypeError('Cannot convert "'+Ab(r)+'" to '+this.name);if(r<d||r>f)throw new TypeError('Passing a number "'+Ab(r)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+f+"]!");return q?r>>>0:r|0},argPackAdvance:8,readValueFromPointer:Mb(b,l,0!==d),Pa:null})},h:function(a,b,c){function d(g){g>>=2;var l=C();return new f(n,l[g+1],l[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,
Uint32Array,Float32Array,Float64Array][b];c=W(c);V(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Gb:!0})},u:function(a,b){b=W(b);var c="std::string"===b;V(a,{name:b,fromWireType:function(d){var f=C()[d>>2];if(c)for(var g=d+4,l=0;l<=f;++l){var k=d+4+l;if(l==f||0==v()[k]){g=L(g,k-g);if(void 0===q)var q=g;else q+=String.fromCharCode(0),q+=g;g=k+1}}else{q=Array(f);for(l=0;l<f;++l)q[l]=String.fromCharCode(v()[d+4+l]);q=q.join("")}S(d);return q},toWireType:function(d,f){f instanceof
ArrayBuffer&&(f=new Uint8Array(f));var g="string"===typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||X("Cannot pass non-string to std::string");var l=(c&&g?function(){return Aa(f)}:function(){return f.length})(),k=R(4+l+1);C()[k>>2]=l;if(c&&g)za(f,k+4,l+1);else if(g)for(g=0;g<l;++g){var q=f.charCodeAt(g);255<q&&(S(k),X("String has UTF-16 code units that do not fit in 8 bits"));v()[k+4+g]=q}else for(g=0;g<l;++g)v()[k+4+g]=f[g];null!==d&&d.push(S,k);return k},
argPackAdvance:8,readValueFromPointer:nb,Pa:function(d){S(d)}})},q:function(a,b,c){c=W(c);if(2===b){var d=Ba;var f=Ca;var g=Da;var l=function(){return ea()};var k=1}else 4===b&&(d=Ea,f=Fa,g=Ga,l=function(){return C()},k=2);V(a,{name:c,fromWireType:function(q){for(var t=C()[q>>2],r=l(),w,z=q+4,h=0;h<=t;++h){var p=q+4+h*b;if(h==t||0==r[p>>k])z=d(z,p-z),void 0===w?w=z:(w+=String.fromCharCode(0),w+=z),z=p+b}S(q);return w},toWireType:function(q,t){"string"!==typeof t&&X("Cannot pass non-string to C++ string type "+
c);var r=g(t),w=R(4+r+b);C()[w>>2]=r>>k;f(t,w+4,r+b);null!==q&&q.push(S,w);return w},argPackAdvance:8,readValueFromPointer:nb,Pa:function(q){S(q)}})},x:function(a,b,c,d,f,g){lb[a]={name:W(b),Ob:Hb(c,d),Pb:Hb(f,g),ob:[]}},l:function(a,b,c,d,f,g,l,k,q,t){lb[a].ob.push({Ab:W(b),Fb:c,Db:Hb(d,f),Eb:g,Yb:l,Xb:Hb(k,q),Zb:t})},T:function(a,b){b=W(b);V(a,{oc:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},H:function(a,b){if(a==b)postMessage({cmd:"processQueuedMainThreadWork"});
else if(G)postMessage({targetThread:a,cmd:"processThreadQueue"});else{a=(a=Q.Oa[a])&&a.worker;if(!a)return;a.postMessage({cmd:"processThreadQueue"})}return 1},m:yb,W:function(a){if(0===a)return zb(Ob());var b=Nb[a];a=void 0===b?W(a):b;return zb(Ob()[a])},V:function(a){4<a&&(Y[a].jb+=1)},y:function(a,b,c,d){a||X("Cannot use deleted val. handle = "+a);a=Y[a].value;var f=Qb[b];if(!f){f="";for(var g=0;g<b;++g)f+=(0!==g?", ":"")+"arg"+g;var l="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";
for(g=0;g<b;++g)l+="var argType"+g+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+g+'], "parameter '+g+'");\nvar arg'+g+" = argType"+g+".readValueFromPointer(args);\nargs += argType"+g+"['argPackAdvance'];\n";f=(new Function("requireRegisteredType","Module","__emval_register",l+("var obj = new constructor("+f+");\nreturn __emval_register(obj);\n}\n")))(Pb,D,zb);Qb[b]=f}return f(a,c,d)},b:function(){K()},n:function(a,b,c){Wb.length=0;var d;for(c>>=2;d=v()[b++];)(d=105>d)&&c&1&&c++,
Wb.push(d?la()[c++>>1]:A()[c]),++c;return Ua[a].apply(null,Wb)},J:function(){},r:function(){},f:Rb,g:$a,d:hb,p:function(){return Ya|0},o:function(){return Xa|0},C:function(a,b,c){v().copyWithin(a,b,b+c)},E:function(a,b,c){Vb.length=b;c>>=3;for(var d=0;d<b;d++)Vb[d]=la()[c+d];return(0>a?Ua[-a-1]:Cc[a]).apply(null,Vb)},k:function(a){a>>>=0;var b=v().length;if(a<=b||2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%
65536);a:{try{m.grow(Math.min(2147483648,d)-n.byteLength+65535>>>16);u(m.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},F:function(a,b,c){return Yb(a)?Zb(a,b,c):ac(a,b,c)},e:function(){},G:function(a,b){var c={};b>>=2;c.alpha=!!A()[b];c.depth=!!A()[b+1];c.stencil=!!A()[b+2];c.antialias=!!A()[b+3];c.premultipliedAlpha=!!A()[b+4];c.preserveDrawingBuffer=!!A()[b+5];var d=A()[b+6];c.powerPreference=gc[d];c.failIfMajorPerformanceCaveat=!!A()[b+7];c.Mb=A()[b+8];c.qc=A()[b+9];c.nb=A()[b+
10];c.zb=A()[b+11];c.tc=A()[b+12];c.uc=A()[b+13];a=Yb(a);!a||c.zb?c=0:(a=a.getContext("webgl",c))?(b=R(8),A()[b+4>>2]=P|0,d={nc:b,attributes:c,version:c.Mb,Za:a},a.canvas&&(a.canvas.$a=d),("undefined"===typeof c.nb||c.nb)&&ec(d),c=b):c=0;return c},O:function(a,b){var c=0;ic().forEach(function(d,f){var g=b+c;f=A()[a+4*f>>2]=g;for(g=0;g<d.length;++g)e()[f++>>0]=d.charCodeAt(g);e()[f>>0]=0;c+=d.length+1});return 0},P:function(a,b){var c=ic();A()[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+
1});A()[b>>2]=d;return 0},Q:lc,z:mc,s:nc,B:function(){Q.Kb()},a:m||D.wasmMemory,D:ib,U:function(a,b,c,d){if("undefined"===typeof SharedArrayBuffer)return J("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;if(!a)return J("pthread_create called with a null thread pointer!"),28;var f=[];if(G&&0===f.length)return Ec(687865856,a,b,c,d);var g=0,l=0,k=0,q=0;if(b){var t=A()[b>>2];t+=81920;g=A()[b+8>>2];l=0!==A()[b+12>>2];if(0===A()[b+16>>2]){var r=A()[b+20>>2],w=A()[b+
24>>2];k=b+20;q=b+24;var z=Q.hb?Q.hb:P|0;if(k||q)if(z)if(A()[z+12>>2]!==z)J("pthread_getschedparam attempted on thread "+z+", which does not point to a valid thread, or does not exist anymore!");else{var h=Atomics.load(C(),z+108+20>>2);z=Atomics.load(C(),z+108+24>>2);k&&(A()[k>>2]=h);q&&(A()[q>>2]=z)}else J("pthread_getschedparam called with a null thread pointer!");k=A()[b+20>>2];q=A()[b+24>>2];A()[b+20>>2]=r;A()[b+24>>2]=w}else k=A()[b+20>>2],q=A()[b+24>>2]}else t=2097152;(b=0==g)?g=Fc(16,t):(g-=
t,wa(0<g));r=R(232);for(w=0;58>w;++w)C()[(r>>2)+w]=0;A()[a>>2]=r;A()[r+12>>2]=r;a=r+156;A()[a>>2]=a;c={Ra:g,Ta:t,gb:b,ub:k,vb:q,mb:l,$b:c,Sa:r,Nb:P|0,Va:d,hc:f};G?(c.kc="spawnThread",postMessage(c,f)):fb(c);return 0},L:function(a,b){return qc(a,b)},c:pc,A:function(){},N:function(a,b,c,d){return wc(a,b,c,d)},M:yc};
(function(){function a(f,g){D.asm=f.exports;M=D.asm.Y;ua=g;if(!G){var l=Q.Ma.length;Q.Ma.forEach(function(k){Q.qb(k,function(){if(!--l&&(N--,D.monitorRunDependencies&&D.monitorRunDependencies(N),0==N&&(null!==Oa&&(clearInterval(Oa),Oa=null),Pa))){var q=Pa;Pa=null;q()}})})}}function b(f){a(f.instance,f.module)}function c(f){return Sa().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){J("failed to asynchronously prepare wasm: "+g);K(g)})}var d={a:Gc};G||(wa(!G,"addRunDependency cannot be used in a pthread worker"),
N++,D.monitorRunDependencies&&D.monitorRunDependencies(N));if(D.instantiateWasm)try{return D.instantiateWasm(d,a)}catch(f){return J("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return ta||"function"!==typeof WebAssembly.instantiateStreaming||Qa()||"function"!==typeof fetch?c(b):fetch(O,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){J("wasm streaming compile failed: "+g);J("falling back to ArrayBuffer instantiation");
return c(b)})})})().catch(oa);return{}})();var Dc=D.___wasm_call_ctors=function(){return(Dc=D.___wasm_call_ctors=D.asm.Z).apply(null,arguments)},R=D._malloc=function(){return(R=D._malloc=D.asm._).apply(null,arguments)},S=D._free=function(){return(S=D._free=D.asm.$).apply(null,arguments)},zc=D.___errno_location=function(){return(zc=D.___errno_location=D.asm.aa).apply(null,arguments)},Kb=D.___getTypeName=function(){return(Kb=D.___getTypeName=D.asm.ba).apply(null,arguments)};
D.___embind_register_native_and_builtin_types=function(){return(D.___embind_register_native_and_builtin_types=D.asm.ca).apply(null,arguments)};D.___em_js__initPthreadsJS=function(){return(D.___em_js__initPthreadsJS=D.asm.da).apply(null,arguments)};
var oc=D._emscripten_get_global_libc=function(){return(oc=D._emscripten_get_global_libc=D.asm.ea).apply(null,arguments)},Sb=D.stackSave=function(){return(Sb=D.stackSave=D.asm.fa).apply(null,arguments)},gb=D.stackRestore=function(){return(gb=D.stackRestore=D.asm.ga).apply(null,arguments)},Tb=D.stackAlloc=function(){return(Tb=D.stackAlloc=D.asm.ha).apply(null,arguments)},Fc=D._memalign=function(){return(Fc=D._memalign=D.asm.ia).apply(null,arguments)};
D._emscripten_main_browser_thread_id=function(){return(D._emscripten_main_browser_thread_id=D.asm.ja).apply(null,arguments)};var db=D.___pthread_tsd_run_dtors=function(){return(db=D.___pthread_tsd_run_dtors=D.asm.ka).apply(null,arguments)},eb=D._emscripten_main_thread_process_queued_calls=function(){return(eb=D._emscripten_main_thread_process_queued_calls=D.asm.la).apply(null,arguments)};
D._emscripten_current_thread_process_queued_calls=function(){return(D._emscripten_current_thread_process_queued_calls=D.asm.ma).apply(null,arguments)};var bb=D._emscripten_register_main_browser_thread_id=function(){return(bb=D._emscripten_register_main_browser_thread_id=D.asm.na).apply(null,arguments)},Ta=D._do_emscripten_dispatch_to_thread=function(){return(Ta=D._do_emscripten_dispatch_to_thread=D.asm.oa).apply(null,arguments)};
D._emscripten_async_run_in_main_thread=function(){return(D._emscripten_async_run_in_main_thread=D.asm.pa).apply(null,arguments)};D._emscripten_sync_run_in_main_thread=function(){return(D._emscripten_sync_run_in_main_thread=D.asm.qa).apply(null,arguments)};D._emscripten_sync_run_in_main_thread_0=function(){return(D._emscripten_sync_run_in_main_thread_0=D.asm.ra).apply(null,arguments)};
D._emscripten_sync_run_in_main_thread_1=function(){return(D._emscripten_sync_run_in_main_thread_1=D.asm.sa).apply(null,arguments)};D._emscripten_sync_run_in_main_thread_2=function(){return(D._emscripten_sync_run_in_main_thread_2=D.asm.ta).apply(null,arguments)};D._emscripten_sync_run_in_main_thread_xprintf_varargs=function(){return(D._emscripten_sync_run_in_main_thread_xprintf_varargs=D.asm.ua).apply(null,arguments)};
D._emscripten_sync_run_in_main_thread_3=function(){return(D._emscripten_sync_run_in_main_thread_3=D.asm.va).apply(null,arguments)};var Ec=D._emscripten_sync_run_in_main_thread_4=function(){return(Ec=D._emscripten_sync_run_in_main_thread_4=D.asm.wa).apply(null,arguments)};D._emscripten_sync_run_in_main_thread_5=function(){return(D._emscripten_sync_run_in_main_thread_5=D.asm.xa).apply(null,arguments)};
D._emscripten_sync_run_in_main_thread_6=function(){return(D._emscripten_sync_run_in_main_thread_6=D.asm.ya).apply(null,arguments)};D._emscripten_sync_run_in_main_thread_7=function(){return(D._emscripten_sync_run_in_main_thread_7=D.asm.za).apply(null,arguments)};
var Ub=D._emscripten_run_in_main_runtime_thread_js=function(){return(Ub=D._emscripten_run_in_main_runtime_thread_js=D.asm.Aa).apply(null,arguments)},$b=D.__emscripten_call_on_thread=function(){return($b=D.__emscripten_call_on_thread=D.asm.Ba).apply(null,arguments)};D._emscripten_tls_init=function(){return(D._emscripten_tls_init=D.asm.Ca).apply(null,arguments)};D.dynCall_viijii=function(){return(D.dynCall_viijii=D.asm.Da).apply(null,arguments)};
D.dynCall_iiji=function(){return(D.dynCall_iiji=D.asm.Ea).apply(null,arguments)};D.dynCall_jiji=function(){return(D.dynCall_jiji=D.asm.Fa).apply(null,arguments)};D.dynCall_iiiiiijj=function(){return(D.dynCall_iiiiiijj=D.asm.Ga).apply(null,arguments)};D.dynCall_iiiiij=function(){return(D.dynCall_iiiiij=D.asm.Ha).apply(null,arguments)};D.dynCall_iiiiijj=function(){return(D.dynCall_iiiiijj=D.asm.Ia).apply(null,arguments)};var cb=D._main_thread_futex=3067960;D.PThread=Q;D.PThread=Q;D._pthread_self=pc;
D.wasmMemory=m;D.ExitStatus=Hc;var Ic;function Hc(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Pa=function Jc(){Ic||Kc();Ic||(Pa=Jc)};
function Kc(){function a(){if(!Ic&&(Ic=!0,D.calledRun=!0,!va)){Va(Ka);G||Va(La);na(D);if(D.onRuntimeInitialized)D.onRuntimeInitialized();if(!G){if(D.postRun)for("function"==typeof D.postRun&&(D.postRun=[D.postRun]);D.postRun.length;){var b=D.postRun.shift();Ma.unshift(b)}Va(Ma)}}}if(!(0<N)){if(!G){if(D.preRun)for("function"==typeof D.preRun&&(D.preRun=[D.preRun]);D.preRun.length;)Na();Va(Ja)}0<N||(D.setStatus?(D.setStatus("Running..."),setTimeout(function(){setTimeout(function(){D.setStatus("")},
1);a()},1)):a())}}D.run=Kc;if(D.preInit)for("function"==typeof D.preInit&&(D.preInit=[D.preInit]);0<D.preInit.length;)D.preInit.pop()();G||(noExitRuntime=!0);G?Q.Lb():Kc();


  return jxl_enc_mt_simd.ready
}
);
})();
export default jxl_enc_mt_simd;