PageSourceSearch

https://www.croatianclub.org/bundles/zbar

js croatianclub.org collected 2026-10-02 21:55:57 UTC 79,426 bytes, 1 lines download raw bytes

1const ApiModule=n=>{function vi(n){c(!gi);var t=p;return p=p+n+15&-16,t}function br(n,t){t||(t=wr);return n=Math.ceil(n/t)*t}function c(n,t){n||y("Assertion failed: "+t)}function dr(t){var i=n["_"+t];return c(i,"Cannot call unknown function "+t+", make sure it is exported"),i}function du(n,t,i,r){var h=dr(n),o=[],e=0,u,s,f;if(r)for(u=0;u<r.length;u++)s=gr[i[u]],s?(e===0&&(e=wu()),o[u]=s(r[u])):o[u]=r[u];return f=h.apply(null,o),t==="string"?f=rt(f):t==="boolean"&&(f=Boolean(f)),e!==0&&pu(e),f}function gu(n,t,i){i=i||[];var r=dr(n),u=i.every(function(n){return n==="number"}),f=t!=="string";return f&&u?r:function(){return du(n,t,i,arguments)}}function rt(n,t){var f,e,i,r,u,o;if(t===0||!n)return"";for(f=0,i=0;;){if(e=g[n+i>>0],f|=e,e==0&&!t)break;if(i++,t&&i==t)break}if(t||(t=i),r="",f<128){for(u=1024;t>0;)o=String.fromCharCode.apply(String,g.subarray(n,n+Math.min(t,u))),r=r?r+o:o,n+=u,t-=u;return r}return nf(n)}function ot(n,t){for(var e=t,i,r,f,o,s,c,u,h;n[e];)++e;if(e-t>16&&n.subarray&&wi)return wi.decode(n.subarray(t,e));for(u="";;){if(i=n[t++],!i)return u;if(!(i&128)){u+=String.fromCharCode(i);continue}if(r=n[t++]&63,(i&224)==192){u+=String.fromCharCode((i&31)<<6|r);continue}f=n[t++]&63;(i&240)==224?i=(i&15)<<12|r<<6|f:(o=n[t++]&63,(i&248)==240?i=(i&7)<<18|r<<12|f<<6|o:(s=n[t++]&63,(i&252)==248?i=(i&3)<<24|r<<18|f<<12|o<<6|s:(c=n[t++]&63,i=(i&1)<<30|r<<24|f<<18|o<<12|s<<6|c)));i<65536?u+=String.fromCharCode(i):(h=i-65536,u+=String.fromCharCode(55296|h>>10,56320|h&1023))}}function nf(n){return ot(g,n)}function lt(n,t,i,r){var o,f,e,u;if(!(r>0))return 0;for(o=i,f=i+r-1,e=0;e<n.length;++e)if(u=n.charCodeAt(e),u>=55296&&u<=57343&&(u=65536+((u&1023)<<10)|n.charCodeAt(++e)&1023),u<=127){
1if(i>=f)break;t[i++]=u}else if(u<=2047){if(i+1>=f)break;t[i++]=192|u>>6;t[i++]=128|u&63}else if(u<=65535){if(i+2>=f)break;t[i++]=224|u>>12;t[i++]=128|u>>6&63;t[i++]=128|u&63}else if(u<=2097151){if(i+3>=f)break;t[i++]=240|u>>18;t[i++]=128|u>>12&63;t[i++]=128|u>>6&63;t[i++]=128|u&63}else if(u<=67108863){if(i+4>=f)break;t[i++]=248|u>>24;t[i++]=128|u>>18&63;t[i++]=128|u>>12&63;t[i++]=128|u>>6&63;t[i++]=128|u&63}else{if(i+5>=f)break;t[i++]=252|u>>30;t[i++]=128|u>>24&63;t[i++]=128|u>>18&63;t[i++]=128|u>>12&63;t[i++]=128|u>>6&63;t[i++]=128|u&63}return t[i]=0,i-o}function nu(n,t,i){return lt(n,g,t,i)}function at(n){for(var t,r=0,i=0;i<n.length;++i)t=n.charCodeAt(i),t>=55296&&t<=57343&&(t=65536+((t&1023)<<10)|n.charCodeAt(++i)&1023),t<=127?++r:r+=t<=2047?2:t<=65535?3:t<=2097151?4:t<=67108863?5:6;return r}function rf(n){var i=at(n)+1,t=vr(i);return t&&lt(n,b,t,i),t}function tu(n){var t=at(n)+1,i=hi(t);return lt(n,b,i,t),i}function uf(n){return n}function ff(n){return n.replace(/__Z[\w\d_]+/g,function(n){var t=uf(n);return n===t?n:n+" ["+t+"]"})}function ef(){var n=new Error;if(!n.stack){try{throw new Error(0);}catch(t){n=t}if(!n.stack)return"(no stack trace available)"}return n.stack.toString()}function of(){var t=ef();return n.extraStackTrace&&(t+="\n"+n.extraStackTrace()),ff(t)}function ki(n,t){return n%t>0&&(n+=t-n%t),n}function uu(t){n.buffer=v=t}function di(){n.HEAP8=b=new Int8Array(v);n.HEAP16=ru=new Int16Array(v);n.HEAP32=r=new Int32Array(v);n.HEAPU8=g=new Uint8Array(v);n.HEAPU16=hf=new Uint16Array(v);n.HEAPU32=cf=new Uint32Array(v);n.HEAPF32=lf=new Float32Array(v);n.HEAPF64=af=new Float64Array(v)}function vf(){y("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value "+l+", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ")}function yf(){var i=n.usingWasm?bi:iu,u=2147483648-i,f,t;if(r[st>>2]>u)return!1;for(f=l,l=Math.max(l,sf);l<r[st>>2];)l=l<=536870912?ki(2*l,i):Math.min(ki((3*l+2147483648)/4,i),u);return(t=n.reallocBuffer(l),!t||t.byteLength!=l)?(l=f,!1):(uu(t),di(),!0)}function pf(){return l}function vt(t){for(var i,r;t.length>0;){if(i=t.shift(),typeof i=="function"){i();continue}r=i.func;typeof r=="number"?i.arg===undefined?n.dynCall_v(r):n.dynCall_vi(r,i.arg):r(i.arg===undefined?null:i.arg)}}function bf(){if(n.preRun)for(typeof n.preRun=="function"&&(n.preRun=[n.preRun]);n.preRun.length;)ne(n.preRun.shift());vt(fu)}function hu(){su||(su=!0,vt(ri))}function kf(){vt(eu)}function df(){vt(ur);wf=!0}function gf(){if(n.postRun)for(typeof n.postRun=="function"&&(n.postRun=[n.postRun]);n.postRun.length;)te(n.postRun.shift());vt(ou)}function ne(n){fu.unshift(n)}function te(n){ou.unshift(n)}function cu(n,t){b.set(n,t)}function ie(n,t,i){for(var r=0;r<n.length;++r)b[t++>>0]=n.charCodeAt(r);i||(b[t>>0]=0)}function re(n){return n}function lu(){ft++;n.monitorRunDependencies&&n.monitorRunDependencies(ft)}function er(){if(ft--,n.monitorRunDependencies&&n.monitorRunDependencies(ft),ft==0&&(fr!==null&&(clearInterval(fr),fr=null),yt)){var t=yt;yt=null;t()}}function ui(n){return String.prototype.startsWith?n.startsWith(or):n.indexOf(or)===0}function ue(){function a(t){var i=n.buffer,r,u;t.byteLength<i.byteLength&&n.printErr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here");r=new Int8Array(i);u=new Int8Array(t);u.set(r);uu(t);di()}function v(n){return n}function e(){try{if(n.wasmBinary)return new Uint8Array(n.wasmBinary);if(n.readBinary)return n.readBinary(t);throw"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";}catch(i){y(i)}}function p(){return!n.wasmBinary&&(ut||d)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(function(n){if(!n.ok)throw"failed to load wasm binary file at '"+t+"'";return n.arrayBuffer()}).catch(function(){return e()}):new Promise(function(n){n(e())})}function w(u,f){function o(t){r=t.exports;r.memory&&a(r.memory);n.asm=r;n.usingWasm=!0;er("wasm-instantiate")}function e(n){o(n.instance,n.module)}function s(t){p().then(function(n){return WebAssembly.instantiate(n,i)}
1).then(t).catch(function(t){n.printErr("failed to asynchronously prepare wasm: "+t);y(t)})}if(typeof WebAssembly!="object")return n.printErr("no native wasm support detected"),!1;if(!(n.wasmMemory instanceof WebAssembly.Memory))return n.printErr("no native wasm Memory in use"),!1;if(f.memory=n.wasmMemory,i.global={NaN:NaN,Infinity:Infinity},i["global.Math"]=Math,i.env=f,lu("wasm-instantiate"),n.instantiateWasm)try{return n.instantiateWasm(i,o)}catch(h){return n.printErr("Module.instantiateWasm callback failed with error: "+h),!1}return n.wasmBinary||typeof WebAssembly.instantiateStreaming!="function"||ui(t)||typeof fetch!="function"?s(e):WebAssembly.instantiateStreaming(fetch(t,{credentials:"same-origin"}),i).then(e).catch(function(t){n.printErr("wasm streaming compile failed: "+t);n.printErr("falling back to ArrayBuffer instantiation");s(e)}),{}}var u="zbar.wast",t="zbar.wasm",f="zbar.temp.asm.js",o,s,h;typeof n.locateFile=="function"&&(ui(u)||(u=n.locateFile(u)),ui(t)||(t=n.locateFile(t)),ui(f)||(f=n.locateFile(f)));var l=65536,i={global:null,env:null,asm2wasm:{"f64-rem":function(n,t){return n%t},"debugger":function(){}},parent:n},r=null;n.asmPreload=n.asm;o=n.reallocBuffer;s=function(t){var f=n.usingWasm?bi:iu,i,r,u;if(t=ki(t,f),i=n.buffer,r=i.byteLength,n.usingWasm)try{return u=n.wasmMemory.grow((t-r)/l),u!==-1?n.buffer=n.wasmMemory.buffer:null}catch(e){return null}};n.reallocBuffer=function(n){return h==="asmjs"?o(n):s(n)};h="";n.asm=function(t,i,r){var u,f,e;return i=v(i),i.table||(u=n.wasmTableSize,u===undefined&&(u=1024),f=n.wasmMaxTableSize,i.table=typeof WebAssembly=="object"&&typeof WebAssembly.Table=="function"?f!==undefined?new WebAssembly.Table({initial:u,maximum:f,element:"anyfunc"}):new WebAssembly.Table({initial:u,element:"anyfunc"}):new Array(u),n.wasmTable=i.table),i.memoryBase||(i.memoryBase=n.STATIC_BASE),i.tableBase||(i.tableBase=0),e=w(t,i,r),c(e,"no binaryen method succeeded."),e}}function pt(){return!!pt.uncaught_exception}function fe(n,t,i,r){y("Assertion failed: "+rt(n)+", at: "+[t?rt(t):"unknown filename",i,r?rt(r):"unknown function"])}function ee(n){return vr(n)}function oe(n,t,i){nt.infos[n]={ptr:n,adjusted:n,type:t,destructor:i,refcount:0,caught:!1,rethrown:!1};nt.last=n;"uncaught_exception"in pt?pt.uncaught_exception++:pt.uncaught_exception=1;throw n+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";}function se(){}function ht(t){return n.___errno_location&&(r[n.___errno_location()>>2]=t),t}function he(){return ht(i.EPERM),-1}function le(n,i){e.varargs=i;try{var u=e.getStreamFromFD(),l=e.get(),h=e.get(),c=e.get(),o=e.get(),s=h;return t.llseek(u,s,o),r[c>>2]=u.position,u.getdents&&s===0&&o===0&&(u.getdents=null),0}catch(f){return typeof t!="undefined"&&f instanceof t.ErrnoError||y(f),-f.errno}}function ae(n,i){e.varargs=i;try{var u=e.getStreamFromFD(),f=e.get(),o=e.get();return e.doReadv(u,f,o)}catch(r){return typeof t!="undefined"&&r instanceof t.ErrnoError||y(r),-r.errno}}function ve(n,i){e.varargs=i;try{var u=e.getStreamFromFD(),f=e.get(),o=e.get();return e.doWritev(u,f,o)}catch(r){return typeof t!="undefined"&&r instanceof t.ErrnoError||y(r),-r.errno}}function ye(n,u){var f,o,s;e.varargs=u;try{f=e.getStreamFromFD();o=e.get();switch(o){case 21509:case 21505:return f.tty?0:-i.ENOTTY;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return f.tty?0:-i.ENOTTY;case 21519:return f.tty?(s=e.get(),r[s>>2]=0,0):-i.ENOTTY;case 21520:return f.tty?-i.EINVAL:-i.ENOTTY;case 21531:return s=e.get(),t.ioctl(f,o,s);case 21523:return f.tty?0:-i.ENOTTY;case 21524:return f.tty?0:-i.ENOTTY;default:y("bad ioctl syscall "+o)}}catch(h){return typeof t!="undefined"&&h instanceof t.ErrnoError||y(h),-h.errno}}function pe(n,i){e.varargs=i;try{var u=e.getStreamFromFD();return t.close(u),0}catch(r){return typeof t!="undefined"&&r instanceof t.ErrnoError||y(r),-r.errno}}function we(n,i){var f;e.varargs=i;try{var u=e.get(),s=e.get(),r=e.mappings[u];return r?(s===r.len&&(f=t.getStream(r.fd),e.doMsync(u,f,s,r.flags),t.munmap(f),e.mappings[u]=null,r.allocated&&yu(r.malloc)),0):0}catch(o){return typeof t!="undefined"&&o instanceof t.ErrnoError||y(o),-o.errno}}function be(){}function ke(){n.abort()}function vu(){y()}function de(){return w||typeof dateNow!="undefined"||(ut||d)&&self.performance&&self.performance.now}function ge(n,t){var u;if(n===0)u=Date.now();else if(n===1&&de())u=vu();else return ht(i.EINVAL),-1;return r[t>>2]=u/1e3|0,r[t+4>>2]=u%1e3*1e6|0,0}function hr(t){var l=1024,u,i,e,h,s,c,o,f;hr.called?(i=r[sr>>2],u=r[i>>2]):(hr.called=!0,k.USER=k.LOGNAME="web_user",k.PATH="/",k.PWD="/",k.HOME="/home/web_user",k.LANG="C.UTF-8",k._=n.thisProgram,u=vi(l),i=vi(256),r[i>>2]=u,r[sr>>2]=i);e=[];h=0;for(s in t)typeof t[s]=="string"&&(f=s+"="+t[s],e.push(f),h+=f.length);if(h>l)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(c=4,o=0;o<e.length;o++)f=e[o],ie(f,u),r[i+o*c>>2]=u,u+=f.length+1;r[i+e.length*c>>2]=0}function wt(n){return n===0?0:(n=rt(n),!k.hasOwnProperty(n))?0:(wt.ret&&yu(wt.ret),wt.ret=rf(k[n]),wt.ret)}function no(n,t,i){return g.set(g.subarray(t,t+i),n),n}function to(){return 0}function io(n){return bt[n]||0}function ro(n){return n==0?i.EINVAL:(r[n>>
12]=fi,bt[fi]=0,fi++,0)}function kt(t,i){(kt.seen||(kt.seen={}),t in kt.seen)||(n.dynCall_v(i),kt.seen[t]=1)}function uo(n,t){return(n in bt)?(bt[n]=t,0):i.EINVAL}function ei(n){return n%4==0&&(n%100!=0||n%400==0)}function cr(n,t){for(var i=0,r=0;r<=t;i+=n[r++]);return i}function oi(n,t){for(var i=new Date(n.getTime());t>0;){var f=ei(i.getFullYear()),r=i.getMonth(),u=(f?dt:gt)[r];if(t>u-i.getDate())t-=u-i.getDate()+1,i.setDate(1),r<11?i.setMonth(r+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1));else return i.setDate(i.getDate()+t),i}return i}function fo(n,t,i,u){function w(n,t,i){for(var r=typeof n=="number"?n.toString():n||"";r.length<t;)r=i[0]+r;return r}function f(n,t){return w(n,t,"0")}function e(n,t){function r(n){return n<0?-1:n>0?1:0}var i;return(i=r(n.getFullYear()-t.getFullYear()))===0&&(i=r(n.getMonth()-t.getMonth()))===0&&(i=r(n.getDate()-t.getDate())),i}function h(n){switch(n.getDay()){case 0:return new Date(n.getFullYear()-1,11,29);case 1:return n;case 2:return new Date(n.getFullYear(),0,3);case 3:return new Date(n.getFullYear(),0,2);case 4:return new Date(n.getFullYear(),0,1);case 5:return new Date(n.getFullYear()-1,11,31);case 6:return new Date(n.getFullYear()-1,11,30)}}function b(n){var t=oi(new Date(n.tm_year+1900,0,1),n.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),u=h(i),f=h(r);return e(u,t)<=0?e(f,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y=r[u+40>>2],k={tm_sec:r[u>>2],tm_min:r[u+4>>2],tm_hour:r[u+8>>2],tm_mday:r[u+12>>2],tm_mon:r[u+16>>2],tm_year:r[u+20>>2],tm_wday:r[u+24>>2],tm_yday:r[u+28>>2],tm_isdst:r[u+32>>2],tm_gmtoff:r[u+36>>2],tm_zone:y?rt(y):""},s=rt(i),p={"%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"},l,a,v,o,c;for(o in p)s=s.replace(new RegExp(o,"g"),p[o]);l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];a=["January","February","March","April","May","June","July","August","September","October","November","December"];v={"%a":function(n){return l[n.tm_wday].substring(0,3)},"%A":function(n){return l[n.tm_wday]},"%b":function(n){return a[n.tm_mon].substring(0,3)},"%B":function(n){return a[n.tm_mon]},"%C":function(n){var t=n.tm_year+1900;return f(t/100|0,2)},"%d":function(n){return f(n.tm_mday,2)},"%e":function(n){return w(n.tm_mday,2," ")},"%g":function(n){return b(n).toString().substring(2)},"%G":function(n){return b(n)},"%H":function(n){return f(n.tm_hour,2)},"%I":function(n){var t=n.tm_hour;return t==0?t=12:t>12&&(t-=12),f(t,2)},"%j":function(n){return f(n.tm_mday+cr(ei(n.tm_year+1900)?dt:gt,n.tm_mon-1),3)},"%m":function(n){return f(n.tm_mon+1,2)},"%M":function(n){return f(n.tm_min,2)},"%n":function(){return"\n"},"%p":function(n){return n.tm_hour>=0&&n.tm_hour<12?"AM":"PM"},"%S":function(n){return f(n.tm_sec,2)},"%t":function(){return"\t"},"%u":function(n){var t=new Date(n.tm_year+1900,n.tm_mon+1,n.tm_mday,0,0,0,0);return t.getDay()||7},"%U":function(n){var t=new Date(n.tm_year+1900,0,1),r=t.getDay()===0?t:oi(t,7-t.getDay()),i=new Date(n.tm_year+1900,n.tm_mon,n.tm_mday);if(e(r,i)<0){var u=cr(ei(i.getFullYear())?dt:gt,i.getMonth()-1)-31,o=31-r.getDate(),s=o+u+i.getDate();return f(Math.ceil(s/7),2)}return e(r,t)===0?"01":"00"},"%V":function(n){var u=new Date(n.tm_year+1900,0,4),o=new Date(n.tm_year+1901,0,4),t=h(u),s=h(o),i=oi(new Date(n.tm_year+1900,0,1),n.tm_yday),r;return e(i,t)<0?"53":e(s,i)<=0?"01":(r=t.getFullYear()<n.tm_year+1900?n.tm_yday+32-t.getDate():n.tm_yday+1-t.getDate(),f(Math.ceil(r/7),2))},"%w":function(n){var t=new Date(n.tm_year+1900,n.tm_mon+1,n.tm_mday,0,0,0,0);return t.getDay()},"%W":function(n){var t=new Date(n.tm_year,0,1),r=t.getDay()===1?t:oi(t,t.getDay()===0?1:8-t.getDay()),i=new Date(n.tm_year+1900,n.tm_mon,n.tm_mday);if(e(r,i)<0){var u=cr(ei(i.getFullYear())?dt:gt,i.getMonth()-1)-31,o=31-r.getDate(),s=o+u+i.getDate();return f(Math.ceil(s/7),2)}return e(r,t)===0?"01":"00"},"%y":function(n){return(n.tm_year+1900).toString().substring(2)},"%Y":function(n){return n.tm_year+1900},"%z":function(n){var t=n.tm_gmtoff,i=t>=0;return t=Math.abs(t)/60,t=t/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(n){return n.tm_zone},"%%":function(){return"%"}};for(o in v)s.indexOf(o)>=0&&(s=s.replace(new RegExp(o,"g"),v[o](k)));return(c=si(s,!1),c.length>t)?0:(cu(c,n),c.length-1)}function eo(n,t,i,r){return fo(n,t,i,r)}function si(n,t,i){var u=i>0?i:at(n)+1,r=new Array(u),f=lt(n,r,0,r.length);return t&&(r.length=f),r}function ct(n){this.name="ExitStatus";this.message="Program terminated with exit("+n+")";this.status=n}function yr(t){function i(){n.calledRun||(n.calledRun=!0,yi)||(hu(),kf(),n.onRuntimeInitialized&&n.onRuntimeInitialized(),n._main&&pr&&n.callMain(t),gf())}(t=t||n.arguments,ft>0)||(bf(),ft>0)||n.calledRun||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1);i()},1)):i())}function ku(t,i){if(!i||!n.noExitRuntime||t!==0){if(!n.noExitRuntime&&(yi=!0,kr=t,ti=lo,df(),n.onExit))n.onExit(t);w&&process.exit(t);n.quit(t,new ct(t))}}function y(t){if(n.onAbort)n.onAbort(t);t!==undefined?(n.print(t),n.printErr(t),t=JSON.stringify(t)):t="";yi=!0;kr=1;throw"abort("+t+"). Build with -s ASSERTIONS=1 for more info.";}var n,et,it,li,ai,wr,pi,gr,wi,tf,v,b,g,ru,hf,r,cf,lf,af,ni,p,gi,nr,ti,tr,ir,st,rr,ii,l,or,au,nt,i,t,e,sr,k,bt,fi,dt,gt,h,lr,ar,lo,bu,pr;n=n||{};
1n=typeof n!="undefined"?n:{};et={};for(it in n)n.hasOwnProperty(it)&&(et[it]=n[it]);n.arguments=[];n.thisProgram="./this.program";n.quit=function(n,t){throw t;};n.preRun=[];n.postRun=[];var ut=!1,d=!1,w=!1,ci=!1;if(n.ENVIRONMENT)if(n.ENVIRONMENT==="WEB")ut=!0;else if(n.ENVIRONMENT==="WORKER")d=!0;else if(n.ENVIRONMENT==="NODE")w=!0;else if(n.ENVIRONMENT==="SHELL")ci=!0;else throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.");else ut=typeof window=="object",d=typeof importScripts=="function",w=typeof process=="object"&&typeof require=="function"&&!ut&&!d,ci=!ut&&!w&&!d;if(w){n.read=function(n,t){var i;return li||(li=require("fs")),ai||(ai=require("path")),n=ai.normalize(n),i=li.readFileSync(n),t?i:i.toString()};n.readBinary=function(t){var i=n.read(t,!0);return i.buffer||(i=new Uint8Array(i)),c(i.buffer),i};process.argv.length>1&&(n.thisProgram=process.argv[1].replace(/\\/g,"/"));n.arguments=process.argv.slice(2);process.on("uncaughtException",function(n){if(!(n instanceof ct))throw n;});process.on("unhandledRejection",function(){process.exit(1)});n.inspect=function(){return"[Emscripten Module object]"}}else if(ci)typeof read!="undefined"&&(n.read=function(n){return read(n)}),n.readBinary=function(n){var t;return typeof readbuffer=="function"?new Uint8Array(readbuffer(n)):(t=read(n,"binary"),c(typeof t=="object"),t)},typeof scriptArgs!="undefined"?n.arguments=scriptArgs:typeof arguments!="undefined"&&(n.arguments=arguments),typeof quit=="function"&&(n.quit=function(n){quit(n)});else if(ut||d)n.read=function(n){var t=new XMLHttpRequest;return t.open("GET",n,!1),t.send(null),t.responseText},d&&(n.readBinary=function(n){var t=new XMLHttpRequest;return t.open("GET",n,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n.readAsync=function(n,t,i){var r=new XMLHttpRequest;r.open("GET",n,!0);r.responseType="arraybuffer";r.onload=function(){if(r.status==200||r.status==0&&r.response){t(r.response);return}i()};r.onerror=i;r.send(null)},n.setWindowTitle=function(n){document.title=n};else throw new Error("not compiled for this environment");n.print=typeof console!="undefined"?console.log.bind(console):typeof print!="undefined"?print:null;n.printErr=typeof printErr!="undefined"?printErr:typeof console!="undefined"&&console.warn.bind(console)||n.print;n.print=n.print;n.printErr=n.printErr;for(it in et)et.hasOwnProperty(it)&&(n[it]=et[it]);et=undefined;wr=16;var wo=new Array(0),yi=0,kr=0;pi={stackSave:function(){wu()},stackRestore:function(){pu()},arrayToC:function(n){var t=hi(n.length);return cu(n,t),t},stringToC:function(n){var t=0,i;return n!==null&&n!==undefined&&n!==0&&(i=(n.length<<2)+1,t=hi(i),nu(n,t,i)),t}};gr={string:pi.stringToC,array:pi.arrayToC};wi=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;tf=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):undefined;var bi=65536,iu=16777216,sf=16777216;ni=p=nr=ti=tr=ir=st=0;gi=!1;n.reallocBuffer||(n.reallocBuffer=function(n){var t,i,r,u;try{ArrayBuffer.transfer?t=ArrayBuffer.transfer(v,n):(i=b,t=new ArrayBuffer(n),r=new Int8Array(t),r.set(i))}catch(f){return!1}return(u=co(t),!u)?!1:t});try{rr=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);rr(new ArrayBuffer(4))}catch(bo){rr=function(n){return n.byteLength}}if(ii=n.TOTAL_STACK||5242880,l=n.TOTAL_MEMORY||16777216,l<ii&&n.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+l+"! (TOTAL_STACK="+ii+")"),n.buffer?v=n.buffer:(typeof WebAssembly=="object"&&typeof WebAssembly.Memory=="function"?(n.wasmMemory=new WebAssembly.Memory({initial:l/bi}),v=n.wasmMemory.buffer):v=new ArrayBuffer(l),n.buffer=v),di(),r[0]=1668509029,ru[1]=25459,g[2]!==115||g[3]!==99)throw"Runtime error: expected the system to be little-endian!";var fu=[],ri=[],eu=[],ur=[],ou=[],su=!1,wf=!1;var ko=Math.abs,go=Math.cos,ns=Math.sin,ts=Math.tan,is=Math.acos,rs=Math.asin,us=Math.atan,fs=Math.atan2,es=Math.exp,os=Math.log,ss=Math.sqrt,hs=Math.ceil,cs=Math.floor,ls=Math.pow,as=Math.imul,vs=Math.fround,ys=Math.round,ps=Math.min,ws=Math.max,bs=Math.clz32,ks=Math.trunc,ft=0,fr=null,yt=null;n.preloadedImages={};n.preloadedAudios={};or="data:application/octet-stream;base64,";ue();ni=1024;p=ni+153216;ri.push({func:function(){oo()}},{func:function(){so()}},{func:function(){ho()}});au=153216;n.STATIC_BASE=ni;n.STATIC_BUMP=au;p+=16;nt={last:0,caught:[],infos:{},deAdjust:function(n){var i,t,r;if(!n||nt.infos[n])return n;for(i in nt.infos)if(t=+i,r=nt.infos[t],r.adjusted===n)return t;return n},addRef:function(n){if(n){var t=nt.infos[n];t.refcount++}},decRef:function(t){if(t){var i=nt.infos[t];c(i.refcount>0);i.refcount--;i.refcount!==0||i.rethrown||(i.destructor&&n.dynCall_vi(i.destructor,t),delete nt.infos[t],___cxa_free_exception(t))}},clearRef:function(n){if(n){var t=nt.infos[n];t.refcount=0}}};i={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,
1ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var ce={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},u={splitPath:function(n){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(n).slice(1)},normalizeArray:function(n,t){for(var u,r=0,i=n.length-1;i>=0;i--)u=n[i],u==="."?n.splice(i,1):u===".."?(n.splice(i,1),r++):r&&(n.splice(i,1),r--);if(t)for(;r;r--)n.unshift("..");return n},normalize:function(n){var t=n.charAt(0)==="/",i=n.substr(-1)==="/";return n=u.normalizeArray(n.split("/").filter(function(n){return!!n}),!t).join("/"),n||t||(n="."),n&&i&&(n+="/"),(t?"/":"")+n},dirname:function(n){var i=u.splitPath(n),r=i[0],t=i[1];return!r&&!t?".":(t&&(t=t.substr(0,t.length-1)),r+t)},basename:function(n){if(n==="/")return"/";var t=n.lastIndexOf("/");return t===-1?n:n.substr(t+1)},extname:function(n){return u.splitPath(n)[3]},join:function(){var n=Array.prototype.slice.call(arguments,0);return u.normalize(n.join("/"))},join2:function(n,t){return u.normalize(n+"/"+t)},resolve:function(){for(var i,n="",r=!1,f=arguments.length-1;f>=-1&&!r;f--){if(i=f>
1=0?arguments[f]:t.cwd(),typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");else if(!i)return"";n=i+"/"+n;r=i.charAt(0)==="/"}return n=u.normalizeArray(n.split("/").filter(function(n){return!!n}),!r).join("/"),(r?"/":"")+n||"."},relative:function(n,t){function s(n){for(var t=0,i;t<n.length;t++)if(n[t]!=="")break;for(i=n.length-1;i>=0;i--)if(n[i]!=="")break;return t>i?[]:n.slice(t,i-t+1)}var r,i;n=u.resolve(n).substr(1);t=u.resolve(t).substr(1);var f=s(n.split("/")),e=s(t.split("/")),h=Math.min(f.length,e.length),o=h;for(i=0;i<h;i++)if(f[i]!==e[i]){o=i;break}for(r=[],i=o;i<f.length;i++)r.push("..");return r=r.concat(e.slice(o)),r.join("/")}},tt={ttys:[],init:function(){},shutdown:function(){},register:function(n,i){tt.ttys[n]={input:[],output:[],ops:i};t.registerDevice(n,tt.stream_ops)},stream_ops:{open:function(n){var r=tt.ttys[n.node.rdev];if(!r)throw new t.ErrnoError(i.ENODEV);n.tty=r;n.seekable=!1},close:function(n){n.tty.ops.flush(n.tty)},flush:function(n){n.tty.ops.flush(n.tty)},read:function(n,r,u,f){var e,s,o;if(!n.tty||!n.tty.ops.get_char)throw new t.ErrnoError(i.ENXIO);for(e=0,s=0;s<f;s++){try{o=n.tty.ops.get_char(n.tty)}catch(h){throw new t.ErrnoError(i.EIO);}if(o===undefined&&e===0)throw new t.ErrnoError(i.EAGAIN);if(o===null||o===undefined)break;e++;r[u+s]=o}return e&&(n.node.timestamp=Date.now()),e},write:function(n,r,u,f){if(!n.tty||!n.tty.ops.put_char)throw new t.ErrnoError(i.ENXIO);for(var e=0;e<f;e++)try{n.tty.ops.put_char(n.tty,r[u+e])}catch(o){throw new t.ErrnoError(i.EIO);}return f&&(n.node.timestamp=Date.now()),e}},default_tty_ops:{get_char:function(n){var t,u;if(!n.input.length){if(t=null,w){var f=256,e=new Buffer(f),i=0,s=process.platform!="win32",r=process.stdin.fd;if(s){u=!1;try{r=h.openSync("/dev/stdin","r");u=!0}catch(o){}}try{i=h.readSync(r,e,0,f,null)}catch(o){if(o.toString().indexOf("EOF")!=-1)i=0;else throw o;}u&&h.closeSync(r);t=i>0?e.slice(0,i).toString("utf-8"):null}else typeof window!="undefined"&&typeof prompt=="function"?(t=window.prompt("Input: "),t!==null&&(t+="\n")):typeof readline=="function"&&(t=readline(),t!==null&&(t+="\n"));if(!t)return null;n.input=si(t,!0)}return n.input.shift()},put_char:function(t,i){i===null||i===10?(n.print(ot(t.output,0)),t.output=[]):i!=0&&t.output.push(i)},flush:function(t){t.output&&t.output.length>0&&(n.print(ot(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,i){i===null||i===10?(n.printErr(ot(t.output,0)),t.output=[]):i!=0&&t.output.push(i)},flush:function(t){t.output&&t.output.length>0&&(n.printErr(ot(t.output,0)),t.output=[])}}},f={ops_table:null,mount:function(){return f.createNode(null,"/",16895,0)},createNode:function(n,r,u,e){if(t.isBlkdev(u)||t.isFIFO(u))throw new t.ErrnoError(i.EPERM);f.ops_table||(f.ops_table={dir:{node:{getattr:f.node_ops.getattr,setattr:f.node_ops.setattr,lookup:f.node_ops.lookup,mknod:f.node_ops.mknod,rename:f.node_ops.rename,unlink:f.node_ops.unlink,rmdir:f.node_ops.rmdir,readdir:f.node_ops.readdir,symlink:f.node_ops.symlink},stream:{llseek:f.stream_ops.llseek}},file:{node:{getattr:f.node_ops.getattr,setattr:f.node_ops.setattr},stream:{llseek:f.stream_ops.llseek,read:f.stream_ops.read,write:f.stream_ops.write,allocate:f.stream_ops.allocate,mmap:f.stream_ops.mmap,msync:f.stream_ops.msync}},link:{node:{getattr:f.node_ops.getattr,setattr:f.node_ops.setattr,readlink:f.node_ops.readlink},stream:{}},chrdev:{node:{getattr:f.node_ops.getattr,setattr:f.node_ops.setattr},stream:t.chrdev_stream_ops}});var o=t.createNode(n,r,u,e);return t.isDir(o.mode)?(o.node_ops=f.ops_table.dir.node,o.stream_ops=f.ops_table.dir.stream,o.contents={}):t.isFile(o.mode)?(o.node_ops=f.ops_table.file.node,o.stream_ops=f.ops_table.file.stream,o.usedBytes=0,o.contents=null):t.isLink(o.mode)?(o.node_ops=f.ops_table.link.node,o.stream_ops=f.ops_table.link.stream):t.isChrdev(o.mode)&&(o.node_ops=f.ops_table.chrdev.node,o.stream_ops=f.ops_table.chrdev.stream),o.timestamp=Date.now(),n&&(n.contents[r]=o),o},getFileDataAsRegularArray:function(n){var i,t;if(n.contents&&n.contents.subarray){for(i=[],t=0;t<n.usedBytes;++t)i.push(n.contents[t]);return i}return n.contents},getFileDataAsTypedArray:function(n){return n.contents?n.contents.subarray?n.contents.subarray(0,n.usedBytes):new Uint8Array(n.contents):new Uint8Array},expandFileStorage:function(n,t){var i,r,u;if(n.contents&&n.contents.subarray&&t>n.contents.length&&(n.contents=f.getFileDataAsRegularArray(n),n.usedBytes=n.contents.length),!n.contents||n.contents.subarray){if(i=n.contents?n.contents.length:0,i>=t)return;r=1048576;t=Math.max(t,i*(i<r?2:1.125)|0);i!=0&&(t=Math.max(t,256));u=n.contents;n.contents=new Uint8Array(t);n.usedBytes>0&&n.contents.set(u.subarray(0,n.usedBytes),0);return}for(!n.contents&&t>0&&(n.contents=[]);n.contents.length<t;)n.contents.push(0)},resizeFileStorage:function(n,t){if(n.usedBytes!=t){if(t==0){n.contents=null;n.usedBytes=0;return}if(!n.contents||n.contents.subarray){var i=n.contents;n.contents=new Uint8Array(new ArrayBuffer(t));i&&n.contents.set(i.subarray(0,Math.min(t,n.usedBytes)));n.usedBytes=t;return}if(n.contents||(n.contents=[]),n.contents.length>t)n.contents.length=t;else while(n.contents.length<t)n.contents.push(0);n.usedBytes=t}},node_ops:{getattr:function(n){var i={};return i.dev=t.isChrdev(n.mode)?n.id:1,i.ino=n.id,i.mode=n.mode,i.nlink=1,i.uid=0,i.gid=0,i.rdev=n.rdev,i.size=t.isDir(n.mode)?4096:t.isFile(n.mode)?n.usedBytes:t.isLink(n.mode)?n.link.length:0,i.atime=new Date(n.timestamp),i.mtime=new Date(n.timestamp),i.ctime=new Date(n.timestamp),i.blksize=4096,i.blocks=Math.ceil(i.size/i.blksize),i},setattr:function(n,t){t.mode!==undefined&&(n.mode=t.mode);
1t.timestamp!==undefined&&(n.timestamp=t.timestamp);t.size!==undefined&&f.resizeFileStorage(n,t.size)},lookup:function(){throw t.genericErrors[i.ENOENT];},mknod:function(n,t,i,r){return f.createNode(n,t,i,r)},rename:function(n,r,u){var f,e;if(t.isDir(n.mode)){try{f=t.lookupNode(r,u)}catch(o){}if(f)for(e in f.contents)throw new t.ErrnoError(i.ENOTEMPTY);}delete n.parent.contents[n.name];n.name=u;r.contents[u]=n;n.parent=r},unlink:function(n,t){delete n.contents[t]},rmdir:function(n,r){var u=t.lookupNode(n,r);for(var f in u.contents)throw new t.ErrnoError(i.ENOTEMPTY);delete n.contents[r]},readdir:function(n){var t=[".",".."];for(var i in n.contents)n.contents.hasOwnProperty(i)&&t.push(i);return t},symlink:function(n,t,i){var r=f.createNode(n,t,41471,0);return r.link=i,r},readlink:function(n){if(!t.isLink(n.mode))throw new t.ErrnoError(i.EINVAL);return n.link}},stream_ops:{read:function(n,t,i,r,u){var o=n.node.contents,f,e;if(u>=n.node.usedBytes)return 0;if(f=Math.min(n.node.usedBytes-u,r),c(f>=0),f>8&&o.subarray)t.set(o.subarray(u,u+f),i);else for(e=0;e<f;e++)t[i+e]=o[u+e];return f},write:function(n,t,i,r,u,e){var o,s;if(!r)return 0;if(o=n.node,o.timestamp=Date.now(),t.subarray&&(!o.contents||o.contents.subarray)){if(e)return o.contents=t.subarray(i,i+r),o.usedBytes=r,r;if(o.usedBytes===0&&u===0)return o.contents=new Uint8Array(t.subarray(i,i+r)),o.usedBytes=r,r;if(u+r<=o.usedBytes)return o.contents.set(t.subarray(i,i+r),u),r}if(f.expandFileStorage(o,u+r),o.contents.subarray&&t.subarray)o.contents.set(t.subarray(i,i+r),u);else for(s=0;s<r;s++)o.contents[u+s]=t[i+s];return o.usedBytes=Math.max(o.usedBytes,u+r),r},llseek:function(n,r,u){var f=r;if(u===1?f+=n.position:u===2&&t.isFile(n.node.mode)&&(f+=n.node.usedBytes),f<0)throw new t.ErrnoError(i.EINVAL);return f},allocate:function(n,t,i){f.expandFileStorage(n.node,t+i);n.node.usedBytes=Math.max(n.node.usedBytes,t+i)},mmap:function(n,r,u,f,e,o,s){if(!t.isFile(n.node.mode))throw new t.ErrnoError(i.ENODEV);var c,l,h=n.node.contents;if(s&2||h.buffer!==r&&h.buffer!==r.buffer){if((e>0||e+f<n.node.usedBytes)&&(h=h.subarray?h.subarray(e,e+f):Array.prototype.slice.call(h,e,e+f)),l=!0,c=vr(f),!c)throw new t.ErrnoError(i.ENOMEM);r.set(h,c)}else l=!1,c=h.byteOffset;return{ptr:c,allocated:l}},msync:function(n,r,u,e,o){if(!t.isFile(n.node.mode))throw new t.ErrnoError(i.ENODEV);if(o&2)return 0;var s=f.stream_ops.write(n,r,0,e,u,!1);return 0}}},s={dbs:{},indexedDB:function(){if(typeof indexedDB!="undefined")return indexedDB;var n=null;return typeof window=="object"&&(n=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),c(n,"IDBFS used, but indexedDB not supported"),n},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(){return f.mount.apply(null,arguments)},syncfs:function(n,t,i){s.getLocalSet(n,function(r,u){if(r)return i(r);s.getRemoteSet(n,function(n,r){if(n)return i(n);var f=t?r:u,e=t?u:r;s.reconcile(f,e,i)})})},getDB:function(n,t){var r=s.dbs[n],i;if(r)return t(null,r);try{i=s.indexedDB().open(n,s.DB_VERSION)}catch(u){return t(u)}if(!i)return t("Unable to connect to IndexedDB");i.onupgradeneeded=function(n){var i=n.target.result,r=n.target.transaction,t;t=i.objectStoreNames.contains(s.DB_STORE_NAME)?r.objectStore(s.DB_STORE_NAME):i.createObjectStore(s.DB_STORE_NAME);t.indexNames.contains("timestamp")||t.createIndex("timestamp","timestamp",{unique:!1})};i.onsuccess=function(){r=i.result;s.dbs[n]=r;t(null,r)};i.onerror=function(n){t(this.error);n.preventDefault()}},getLocalSet:function(n,i){function s(n){return n!=="."&&n!==".."}function h(n){return function(t){return u.join2(n,t)}}for(var o={},f=t.readdir(n.mountpoint).filter(s).map(h(n.mountpoint)),r,e;f.length;){r=f.pop();try{e=t.stat(r)}catch(c){return i(c)}t.isDir(e.mode)&&f.push.apply(f,t.readdir(r).filter(s).map(h(r)));o[r]={timestamp:e.mtime}}return i(null,{type:"local",entries:o})},getRemoteSet:function(n,t){var i={};s.getDB(n.mountpoint,function(n,r){var u,f,e;if(n)return t(n);try{u=r.transaction([s.DB_STORE_NAME],"readonly");u.onerror=function(n){t(this.error);n.preventDefault()};f=u.objectStore(s.DB_STORE_NAME);e=f.index("timestamp");e.openKeyCursor().onsuccess=function(n){var u=n.target.result;if(!u)return t(null,{type:"remote",db:r,entries:i});i[u.primaryKey]={timestamp:u.key};u.continue()}}catch(o){return t(o)}})},loadLocalEntry:function(n,i){var r,u,e;try{e=t.lookupPath(n);u=e.node;r=t.stat(n)}catch(o){return i(o)}return t.isDir(r.mode)?i(null,{timestamp:r.mtime,mode:r.mode}):t.isFile(r.mode)?(u.contents=f.getFileDataAsTypedArray(u),i(null,{timestamp:r.mtime,mode:r.mode,contents:u.contents})):i(new Error("node type not supported"))},storeLocalEntry:function(n,i,r){try{if(t.isDir(i.mode))t.mkdir(n,i.mode);else if(t.isFile(i.mode))t.writeFile(n,i.contents,{canOwn:!0});else return r(new Error("node type not supported"));t.chmod(n,i.mode);t.utime(n,i.timestamp,i.timestamp)}catch(u){return r(u)}r(null)},removeLocalEntry:function(n,i){try{var f=t.lookupPath(n),r=t.stat(n);t.isDir(r.mode)?t.rmdir(n):t.isFile(r.mode)&&t.unlink(n)}catch(u){return i(u)}i(null)},loadRemoteEntry:function(n,t,i){var r=n.get(t);r.onsuccess=function(n){i(null,n.target.result)};r.onerror=function(n){i(this.error);n.preventDefault()}},storeRemoteEntry:function(n,t,i,r){var u=n.put(i,t);u.onsuccess=function(){r(null)};u.onerror=function(n){r(this.error);n.preventDefault()}},removeRemoteEntry:function(n,t,i){var r=n.delete(t);r.onsuccess=function(){i(null)};r.onerror=function(n){i(this.error);n.preventDefault()}},reconcile:function(n,t,i){function r(n){return n?r.errored?void 0:(r.errored=!0,i(n)):++c>=u?i(null):void 0}var u=0,o=[],f;
1if(Object.keys(n.entries).forEach(function(i){var f=n.entries[i],r=t.entries[i];(!r||f.timestamp>r.timestamp)&&(o.push(i),u++)}),f=[],Object.keys(t.entries).forEach(function(i){var e=t.entries[i],r=n.entries[i];r||(f.push(i),u++)}),!u)return i(null);var c=0,l=n.type==="remote"?n.db:t.db,h=l.transaction([s.DB_STORE_NAME],"readwrite"),e=h.objectStore(s.DB_STORE_NAME);h.onerror=function(n){r(this.error);n.preventDefault()};o.sort().forEach(function(n){t.type==="local"?s.loadRemoteEntry(e,n,function(t,i){if(t)return r(t);s.storeLocalEntry(n,i,r)}):s.loadLocalEntry(n,function(t,i){if(t)return r(t);s.storeRemoteEntry(e,n,i,r)})});f.sort().reverse().forEach(function(n){t.type==="local"?s.removeLocalEntry(n,r):s.removeRemoteEntry(e,n,r)})}},o={isWindows:!1,staticInit:function(){o.isWindows=!!process.platform.match(/^win/);var n=process.binding("constants");n.fs&&(n=n.fs);o.flagsForNodeMap={"1024":n.O_APPEND,"64":n.O_CREAT,"128":n.O_EXCL,"0":n.O_RDONLY,"2":n.O_RDWR,"4096":n.O_SYNC,"512":n.O_TRUNC,"1":n.O_WRONLY}},bufferFrom:function(n){return Buffer.alloc?Buffer.from(n):new Buffer(n)},mount:function(n){return c(w),o.createNode(null,"/",o.getMode(n.opts.root),0)},createNode:function(n,r,u){if(!t.isDir(u)&&!t.isFile(u)&&!t.isLink(u))throw new t.ErrnoError(i.EINVAL);var f=t.createNode(n,r,u);return f.node_ops=o.node_ops,f.stream_ops=o.stream_ops,f},getMode:function(n){var r;try{r=h.lstatSync(n);o.isWindows&&(r.mode=r.mode|(r.mode&292)>>2)}catch(u){if(!u.code)throw u;throw new t.ErrnoError(i[u.code]);}return r.mode},realPath:function(n){for(var t=[];n.parent!==n;)t.push(n.name),n=n.parent;return t.push(n.mount.opts.root),t.reverse(),u.join.apply(null,t)},flagsForNode:function(n){var u,r;n&=-2097153;n&=-2049;n&=-32769;n&=-524289;u=0;for(r in o.flagsForNodeMap)n&r&&(u|=o.flagsForNodeMap[r],n^=r);if(n)throw new t.ErrnoError(i.EINVAL);else return u},node_ops:{getattr:function(n){var f=o.realPath(n),r;try{r=h.lstatSync(f)}catch(u){if(!u.code)throw u;throw new t.ErrnoError(i[u.code]);}return o.isWindows&&!r.blksize&&(r.blksize=4096),o.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:function(n,r){var u=o.realPath(n),f;try{r.mode!==undefined&&(h.chmodSync(u,r.mode),n.mode=r.mode);r.timestamp!==undefined&&(f=new Date(r.timestamp),h.utimesSync(u,f,f));r.size!==undefined&&h.truncateSync(u,r.size)}catch(e){if(!e.code)throw e;throw new t.ErrnoError(i[e.code]);}},lookup:function(n,t){var i=u.join2(o.realPath(n),t),r=o.getMode(i);return o.createNode(n,t,r)},mknod:function(n,r,u,f){var e=o.createNode(n,r,u,f),c=o.realPath(e);try{t.isDir(e.mode)?h.mkdirSync(c,e.mode):h.writeFileSync(c,"",{mode:e.mode})}catch(s){if(!s.code)throw s;throw new t.ErrnoError(i[s.code]);}return e},rename:function(n,r,f){var s=o.realPath(n),c=u.join2(o.realPath(r),f);try{h.renameSync(s,c)}catch(e){if(!e.code)throw e;throw new t.ErrnoError(i[e.code]);}},unlink:function(n,r){var e=u.join2(o.realPath(n),r);try{h.unlinkSync(e)}catch(f){if(!f.code)throw f;throw new t.ErrnoError(i[f.code]);}},rmdir:function(n,r){var e=u.join2(o.realPath(n),r);try{h.rmdirSync(e)}catch(f){if(!f.code)throw f;throw new t.ErrnoError(i[f.code]);}},readdir:function(n){var u=o.realPath(n);try{return h.readdirSync(u)}catch(r){if(!r.code)throw r;throw new t.ErrnoError(i[r.code]);}},symlink:function(n,r,f){var s=u.join2(o.realPath(n),r);try{h.symlinkSync(f,s)}catch(e){if(!e.code)throw e;throw new t.ErrnoError(i[e.code]);}},readlink:function(n){var r=o.realPath(n);try{return r=h.readlinkSync(r),lr.relative(lr.resolve(n.mount.opts.root),r)}catch(u){if(!u.code)throw u;throw new t.ErrnoError(i[u.code]);}}},stream_ops:{open:function(n){var u=o.realPath(n.node);try{t.isFile(n.node.mode)&&(n.nfd=h.openSync(u,o.flagsForNode(n.flags)))}catch(r){if(!r.code)throw r;throw new t.ErrnoError(i[r.code]);}},close:function(n){try{t.isFile(n.node.mode)&&n.nfd&&h.closeSync(n.nfd)}catch(r){if(!r.code)throw r;throw new t.ErrnoError(i[r.code]);}},read:function(n,r,u,f,e){if(f===0)return 0;try{return h.readSync(n.nfd,o.bufferFrom(r.buffer),u,f,e)}catch(s){throw new t.ErrnoError(i[s.code]);}},write:function(n,r,u,f,e){try{return h.writeSync(n.nfd,o.bufferFrom(r.buffer),u,f,e)}catch(s){throw new t.ErrnoError(i[s.code]);}},llseek:function(n,r,u){var f=r,e;if(u===1)f+=n.position;else if(u===2&&t.isFile(n.node.mode))try{e=h.fstatSync(n.nfd);f+=e.size}catch(o){throw new t.ErrnoError(i[o.code]);}if(f<0)throw new t.ErrnoError(i.EINVAL);return f}}},a={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(n){function i(n){for(var r,f=n.split("/"),e=u,i=0;i<f.length-1;i++)r=f.slice(0,i+1).join("/"),t[r]||(t[r]=a.createNode(e,f[i],a.DIR_MODE,0)),e=t[r];return e}function r(n){var t=n.split("/");return t[t.length-1]}c(d);a.reader||(a.reader=new FileReaderSync);var u=a.createNode(null,"/",a.DIR_MODE,0),t={};return Array.prototype.forEach.call(n.opts.files||[],function(n){a.createNode(i(n.name),r(n.name),a.FILE_MODE,0,n,n.lastModifiedDate)}
1),(n.opts.blobs||[]).forEach(function(n){a.createNode(i(n.name),r(n.name),a.FILE_MODE,0,n.data)}),(n.opts.packages||[]).forEach(function(n){n.metadata.files.forEach(function(t){var u=t.filename.substr(1);a.createNode(i(u),r(u),a.FILE_MODE,0,n.blob.slice(t.start,t.end))})}),u},createNode:function(n,i,r,u,f,e){var o=t.createNode(n,i,r);return o.mode=r,o.node_ops=a.node_ops,o.stream_ops=a.stream_ops,o.timestamp=(e||new Date).getTime(),c(a.FILE_MODE!==a.DIR_MODE),r===a.FILE_MODE?(o.size=f.size,o.contents=f):(o.size=4096,o.contents={}),n&&(n.contents[i]=o),o},node_ops:{getattr:function(n){return{dev:1,ino:undefined,mode:n.mode,nlink:1,uid:0,gid:0,rdev:undefined,size:n.size,atime:new Date(n.timestamp),mtime:new Date(n.timestamp),ctime:new Date(n.timestamp),blksize:4096,blocks:Math.ceil(n.size/4096)}},setattr:function(n,t){t.mode!==undefined&&(n.mode=t.mode);t.timestamp!==undefined&&(n.timestamp=t.timestamp)},lookup:function(){throw new t.ErrnoError(i.ENOENT);},mknod:function(){throw new t.ErrnoError(i.EPERM);},rename:function(){throw new t.ErrnoError(i.EPERM);},unlink:function(){throw new t.ErrnoError(i.EPERM);},rmdir:function(){throw new t.ErrnoError(i.EPERM);},readdir:function(n){var t=[".",".."];for(var i in n.contents)n.contents.hasOwnProperty(i)&&t.push(i);return t},symlink:function(){throw new t.ErrnoError(i.EPERM);},readlink:function(){throw new t.ErrnoError(i.EPERM);}},stream_ops:{read:function(n,t,i,r,u){if(u>=n.node.size)return 0;var f=n.node.contents.slice(u,u+r),e=a.reader.readAsArrayBuffer(f);return t.set(new Uint8Array(e),i),f.size},write:function(){throw new t.ErrnoError(i.EIO);},llseek:function(n,r,u){var f=r;if(u===1?f+=n.position:u===2&&t.isFile(n.node.mode)&&(f+=n.node.size),f<0)throw new t.ErrnoError(i.EINVAL);return f}}};p+=16;p+=16;p+=16;t={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(n){if(!(n instanceof t.ErrnoError))throw n+" : "+of();return ht(n.errno)},lookupPath:function(n,r){var l,h,o,s,a,v,y;if(n=u.resolve(t.cwd(),n),r=r||{},!n)return{path:"",node:null};l={follow_mount:!0,recurse_count:0};for(h in l)r[h]===undefined&&(r[h]=l[h]);if(r.recurse_count>8)throw new t.ErrnoError(i.ELOOP);var c=u.normalizeArray(n.split("/").filter(function(n){return!!n}),!1),f=t.root,e="/";for(o=0;o<c.length;o++){if(s=o===c.length-1,s&&r.parent)break;if(f=t.lookupNode(f,c[o]),e=u.join2(e,c[o]),t.isMountpoint(f)&&(!s||s&&r.follow_mount)&&(f=f.mounted.root),!s||r.follow)for(a=0;t.isLink(f.mode);)if(v=t.readlink(e),e=u.resolve(u.dirname(e),v),y=t.lookupPath(e,{recurse_count:r.recurse_count}),f=y.node,a++>40)throw new t.ErrnoError(i.ELOOP);}return{path:e,node:f}},getPath:function(n){for(var i,r;;){if(t.isRoot(n))return(r=n.mount.mountpoint,!i)?r:r[r.length-1]!=="/"?r+"/"+i:r+i;i=i?n.name+"/"+i:n.name;n=n.parent}},hashName:function(n,i){for(var r=0,u=0;u<i.length;u++)r=(r<<5)-r+i.charCodeAt(u)|0;return(n+r>>>0)%t.nameTable.length},hashAddNode:function(n){var i=t.hashName(n.parent.id,n.name);n.name_next=t.nameTable[i];t.nameTable[i]=n},hashRemoveNode:function(n){var r=t.hashName(n.parent.id,n.name),i;if(t.nameTable[r]===n)t.nameTable[r]=n.name_next;else for(i=t.nameTable[r];i;){if(i.name_next===n){i.name_next=n.name_next;break}i=i.name_next}},lookupNode:function(n,i){var u=t.mayLookup(n),f,r,e;if(u)throw new t.ErrnoError(u,n);for(f=t.hashName(n.id,i),r=t.nameTable[f];r;r=r.name_next)if(e=r.name,r.parent.id===n.id&&e===i)return r;return t.lookup(n,i)},createNode:function(n,i,r,u){var f,e,o;return t.FSNode||(t.FSNode=function(n,i,r,u){n||(n=this);this.parent=n;this.mount=n.mount;this.mounted=null;this.id=t.nextInode++;this.name=i;this.mode=r;this.node_ops={};this.stream_ops={};this.rdev=u},t.FSNode.prototype={},f=365,e=146,Object.defineProperties(t.FSNode.prototype,{read:{get:function(){return(this.mode&f)===f},set:function(n){n?this.mode|=f:this.mode&=~f}},write:{get:function(){return(this.mode&e)===e},set:function(n){n?this.mode|=e:this.mode&=~e}},isFolder:{get:function(){return t.isDir(this.mode)}},isDevice:{get:function(){return t.isChrdev(this.mode)}}})),o=new t.FSNode(n,i,r,u),t.hashAddNode(o),o},destroyNode:function(n){t.hashRemoveNode(n)},isRoot:function(n){return n===n.parent},isMountpoint:function(n){return!!n.mounted},isFile:function(n){return(n&61440)==32768},isDir:function(n){return(n&61440)==16384},isLink:function(n){return(n&61440)==40960},isChrdev:function(n){return(n&61440)==8192},isBlkdev:function(n){return(n&61440)==24576},isFIFO:function(n){return(n&61440)==4096},isSocket:function(n){return(n&49152)==49152},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(n){var i=t.flagModes[n];if(typeof i=="undefined")throw new Error("Unknown file open mode: "+n);return i},flagsToPermissionString:function(n){var t=["r","w","rw"][n&3];return n&512&&(t+="w"),t},nodePermissions:function(n,r){if(t.ignorePermissions)return 0;if(r.indexOf("r")===-1||n.mode&292)if(r.indexOf("w")===-1||n.mode&146){if(r.indexOf("x")!==-1&&!(n.mode&73))return i.EACCES}else return i.EACCES;else return i.EACCES;return 0}
1,mayLookup:function(n){var r=t.nodePermissions(n,"x");return r?r:n.node_ops.lookup?0:i.EACCES},mayCreate:function(n,r){try{var u=t.lookupNode(n,r);return i.EEXIST}catch(f){}return t.nodePermissions(n,"wx")},mayDelete:function(n,r,u){var f,e;try{f=t.lookupNode(n,r)}catch(o){return o.errno}if(e=t.nodePermissions(n,"wx"),e)return e;if(u){if(!t.isDir(f.mode))return i.ENOTDIR;if(t.isRoot(f)||t.getPath(f)===t.cwd())return i.EBUSY}else if(t.isDir(f.mode))return i.EISDIR;return 0},mayOpen:function(n,r){return n?t.isLink(n.mode)?i.ELOOP:t.isDir(n.mode)&&(t.flagsToPermissionString(r)!=="r"||r&512)?i.EISDIR:t.nodePermissions(n,t.flagsToPermissionString(r)):i.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(n,r){n=n||0;r=r||t.MAX_OPEN_FDS;for(var u=n;u<=r;u++)if(!t.streams[u])return u;throw new t.ErrnoError(i.EMFILE);},getStream:function(n){return t.streams[n]},createStream:function(n,i,r){var u,f,e;t.FSStream||(t.FSStream=function(){},t.FSStream.prototype={},Object.defineProperties(t.FSStream.prototype,{object:{get:function(){return this.node},set:function(n){this.node=n}},isRead:{get:function(){return(this.flags&2097155)!=1}},isWrite:{get:function(){return(this.flags&2097155)!=0}},isAppend:{get:function(){return this.flags&1024}}}));u=new t.FSStream;for(f in n)u[f]=n[f];return n=u,e=t.nextfd(i,r),n.fd=e,t.streams[e]=n,n},closeStream:function(n){t.streams[n]=null},chrdev_stream_ops:{open:function(n){var i=t.getDevice(n.node.rdev);n.stream_ops=i.stream_ops;n.stream_ops.open&&n.stream_ops.open(n)},llseek:function(){throw new t.ErrnoError(i.ESPIPE);}},major:function(n){return n>>8},minor:function(n){return n&255},makedev:function(n,t){return n<<8|t},registerDevice:function(n,i){t.devices[n]={stream_ops:i}},getDevice:function(n){return t.devices[n]},getMounts:function(n){for(var r=[],t=[n],i;t.length;)i=t.pop(),r.push(i),t.push.apply(t,i.mounts);return r},syncfs:function(n,i){function f(n){return c(t.syncFSRequests>0),t.syncFSRequests--,i(n)}function r(n){if(n)return r.errored?void 0:(r.errored=!0,f(n));++e>=u.length&&f(null)}typeof n=="function"&&(i=n,n=!1);t.syncFSRequests++;t.syncFSRequests>1&&console.log("warning: "+t.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var u=t.getMounts(t.root.mount),e=0;u.forEach(function(t){if(!t.type.syncfs)return r(null);t.type.syncfs(t,n,r)})},mount:function(n,r,u){var s=u==="/",c=!u,f,h,e,o;if(s&&t.root)throw new t.ErrnoError(i.EBUSY);else if(!s&&!c){if(h=t.lookupPath(u,{follow_mount:!1}),u=h.path,f=h.node,t.isMountpoint(f))throw new t.ErrnoError(i.EBUSY);if(!t.isDir(f.mode))throw new t.ErrnoError(i.ENOTDIR);}return e={type:n,opts:r,mountpoint:u,mounts:[]},o=n.mount(e),o.mount=e,e.root=o,s?t.root=o:f&&(f.mounted=e,f.mount&&f.mount.mounts.push(e)),o},unmount:function(n){var f=t.lookupPath(n,{follow_mount:!1}),u;if(!t.isMountpoint(f.node))throw new t.ErrnoError(i.EINVAL);var r=f.node,e=r.mounted,o=t.getMounts(e);Object.keys(t.nameTable).forEach(function(n){for(var i=t.nameTable[n],r;i;)r=i.name_next,o.indexOf(i.mount)!==-1&&t.destroyNode(i),i=r});r.mounted=null;u=r.mount.mounts.indexOf(e);c(u!==-1);r.mount.mounts.splice(u,1)},lookup:function(n,t){return n.node_ops.lookup(n,t)},mknod:function(n,r,f){var h=t.lookupPath(n,{parent:!0}),o=h.node,e=u.basename(n),s;if(!e||e==="."||e==="..")throw new t.ErrnoError(i.EINVAL);if(s=t.mayCreate(o,e),s)throw new t.ErrnoError(s);if(!o.node_ops.mknod)throw new t.ErrnoError(i.EPERM);return o.node_ops.mknod(o,e,r,f)},create:function(n,i){return i=i!==undefined?i:438,i&=4095,i|=32768,t.mknod(n,i,0)},mkdir:function(n,i){return i=i!==undefined?i:511,i&=1023,i|=16384,t.mknod(n,i,0)},mkdirTree:function(n,r){for(var f=n.split("/"),e="",u=0;u<f.length;++u)if(f[u]){e+="/"+f[u];try{t.mkdir(e,r)}catch(o){if(o.errno!=i.EEXIST)throw o;}}},mkdev:function(n,i,r){return typeof r=="undefined"&&(r=i,i=438),i|=8192,t.mknod(n,i,r)},symlink:function(n,r){var s,f,e,o;if(!u.resolve(n))throw new t.ErrnoError(i.ENOENT);if(s=t.lookupPath(r,{parent:!0}),f=s.node,!f)throw new t.ErrnoError(i.ENOENT);if(e=u.basename(r),o=t.mayCreate(f,e),o)throw new t.ErrnoError(o);if(!f.node_ops.symlink)throw new t.ErrnoError(i.EPERM);return f.node_ops.symlink(f,e,n)},rename:function(n,r){var w=u.dirname(n),b=u.dirname(r),p=u.basename(n),c=u.basename(r),l,f,o,s,a,h,y,e;try{l=t.lookupPath(n,{parent:!0});f=l.node;l=t.lookupPath(r,{parent:!0});o=l.node}catch(v){throw new t.ErrnoError(i.EBUSY);}if(!f||!o)throw new t.ErrnoError(i.ENOENT);if(f.mount!==o.mount)throw new t.ErrnoError(i.EXDEV);if(s=t.lookupNode(f,p),a=u.relative(n,b),a.charAt(0)!==".")throw new t.ErrnoError(i.EINVAL);if(a=u.relative(r,w),a.charAt(0)!==".")throw new t.ErrnoError(i.ENOTEMPTY);try{h=t.lookupNode(o,c)}catch(v){}if(s!==h){if(y=t.isDir(s.mode),e=t.mayDelete(f,p,y),e)throw new t.ErrnoError(e);
1if(e=h?t.mayDelete(o,c,y):t.mayCreate(o,c),e)throw new t.ErrnoError(e);if(!f.node_ops.rename)throw new t.ErrnoError(i.EPERM);if(t.isMountpoint(s)||h&&t.isMountpoint(h))throw new t.ErrnoError(i.EBUSY);if(o!==f&&(e=t.nodePermissions(f,"w"),e))throw new t.ErrnoError(e);try{t.trackingDelegate.willMovePath&&t.trackingDelegate.willMovePath(n,r)}catch(v){console.log("FS.trackingDelegate['willMovePath']('"+n+"', '"+r+"') threw an exception: "+v.message)}t.hashRemoveNode(s);try{f.node_ops.rename(s,o,c)}catch(v){throw v;}finally{t.hashAddNode(s)}try{if(t.trackingDelegate.onMovePath)t.trackingDelegate.onMovePath(n,r)}catch(v){console.log("FS.trackingDelegate['onMovePath']('"+n+"', '"+r+"') threw an exception: "+v.message)}}},rmdir:function(n){var h=t.lookupPath(n,{parent:!0}),r=h.node,f=u.basename(n),e=t.lookupNode(r,f),o=t.mayDelete(r,f,!0);if(o)throw new t.ErrnoError(o);if(!r.node_ops.rmdir)throw new t.ErrnoError(i.EPERM);if(t.isMountpoint(e))throw new t.ErrnoError(i.EBUSY);try{t.trackingDelegate.willDeletePath&&t.trackingDelegate.willDeletePath(n)}catch(s){console.log("FS.trackingDelegate['willDeletePath']('"+n+"') threw an exception: "+s.message)}r.node_ops.rmdir(r,f);t.destroyNode(e);try{if(t.trackingDelegate.onDeletePath)t.trackingDelegate.onDeletePath(n)}catch(s){console.log("FS.trackingDelegate['onDeletePath']('"+n+"') threw an exception: "+s.message)}},readdir:function(n){var u=t.lookupPath(n,{follow:!0}),r=u.node;if(!r.node_ops.readdir)throw new t.ErrnoError(i.ENOTDIR);return r.node_ops.readdir(r)},unlink:function(n){var h=t.lookupPath(n,{parent:!0}),r=h.node,f=u.basename(n),e=t.lookupNode(r,f),o=t.mayDelete(r,f,!1);if(o)throw new t.ErrnoError(o);if(!r.node_ops.unlink)throw new t.ErrnoError(i.EPERM);if(t.isMountpoint(e))throw new t.ErrnoError(i.EBUSY);try{t.trackingDelegate.willDeletePath&&t.trackingDelegate.willDeletePath(n)}catch(s){console.log("FS.trackingDelegate['willDeletePath']('"+n+"') threw an exception: "+s.message)}r.node_ops.unlink(r,f);t.destroyNode(e);try{if(t.trackingDelegate.onDeletePath)t.trackingDelegate.onDeletePath(n)}catch(s){console.log("FS.trackingDelegate['onDeletePath']('"+n+"') threw an exception: "+s.message)}},readlink:function(n){var f=t.lookupPath(n),r=f.node;if(!r)throw new t.ErrnoError(i.ENOENT);if(!r.node_ops.readlink)throw new t.ErrnoError(i.EINVAL);return u.resolve(t.getPath(r.parent),r.node_ops.readlink(r))},stat:function(n,r){var f=t.lookupPath(n,{follow:!r}),u=f.node;if(!u)throw new t.ErrnoError(i.ENOENT);if(!u.node_ops.getattr)throw new t.ErrnoError(i.EPERM);return u.node_ops.getattr(u)},lstat:function(n){return t.stat(n,!0)},chmod:function(n,r,u){var f,e;if(typeof n=="string"?(e=t.lookupPath(n,{follow:!u}),f=e.node):f=n,!f.node_ops.setattr)throw new t.ErrnoError(i.EPERM);f.node_ops.setattr(f,{mode:r&4095|f.mode&-4096,timestamp:Date.now()})},lchmod:function(n,i){t.chmod(n,i,!0)},fchmod:function(n,r){var u=t.getStream(n);if(!u)throw new t.ErrnoError(i.EBADF);t.chmod(u.node,r)},chown:function(n,r,u,f){var e,o;if(typeof n=="string"?(o=t.lookupPath(n,{follow:!f}),e=o.node):e=n,!e.node_ops.setattr)throw new t.ErrnoError(i.EPERM);e.node_ops.setattr(e,{timestamp:Date.now()})},lchown:function(n,i,r){t.chown(n,i,r,!0)},fchown:function(n,r,u){var f=t.getStream(n);if(!f)throw new t.ErrnoError(i.EBADF);t.chown(f.node,r,u)},truncate:function(n,r){var u,e,f;if(r<0)throw new t.ErrnoError(i.EINVAL);if(typeof n=="string"?(e=t.lookupPath(n,{follow:!0}),u=e.node):u=n,!u.node_ops.setattr)throw new t.ErrnoError(i.EPERM);if(t.isDir(u.mode))throw new t.ErrnoError(i.EISDIR);if(!t.isFile(u.mode))throw new t.ErrnoError(i.EINVAL);if(f=t.nodePermissions(u,"w"),f)throw new t.ErrnoError(f);u.node_ops.setattr(u,{size:r,timestamp:Date.now()})},ftruncate:function(n,r){var u=t.getStream(n);if(!u)throw new t.ErrnoError(i.EBADF);if((u.flags&2097155)==0)throw new t.ErrnoError(i.EINVAL);t.truncate(u.node,r)},utime:function(n,i,r){var f=t.lookupPath(n,{follow:!0}),u=f.node;u.node_ops.setattr(u,{timestamp:Math.max(i,r)})},open:function(r,f,e,o,s){var h,y,a,v,c,l;if(r==="")throw new t.ErrnoError(i.ENOENT);if(f=typeof f=="string"?t.modeStringToFlags(f):f,e=typeof e=="undefined"?438:e,e=f&64?e&4095|32768:0,typeof r=="object")h=r;else{r=u.normalize(r);try{y=t.lookupPath(r,{follow:!(f&131072)});h=y.node}catch(p){}}
1if(a=!1,f&64)if(h){if(f&128)throw new t.ErrnoError(i.EEXIST);}else h=t.mknod(r,e,0),a=!0;if(!h)throw new t.ErrnoError(i.ENOENT);if(t.isChrdev(h.mode)&&(f&=-513),f&65536&&!t.isDir(h.mode))throw new t.ErrnoError(i.ENOTDIR);if(!a&&(v=t.mayOpen(h,f),v))throw new t.ErrnoError(v);f&512&&t.truncate(h,0);f&=-641;c=t.createStream({node:h,path:t.getPath(h),flags:f,seekable:!0,position:0,stream_ops:h.stream_ops,ungotten:[],error:!1},o,s);c.stream_ops.open&&c.stream_ops.open(c);!n.logReadFiles||f&1||(t.readFiles||(t.readFiles={}),r in t.readFiles||(t.readFiles[r]=1,n.printErr("read file: "+r)));try{if(t.trackingDelegate.onOpenFile){l=0;(f&2097155)!=1&&(l|=t.tracking.openFlags.READ);(f&2097155)!=0&&(l|=t.tracking.openFlags.WRITE);t.trackingDelegate.onOpenFile(r,l)}}catch(p){console.log("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+p.message)}return c},close:function(n){if(t.isClosed(n))throw new t.ErrnoError(i.EBADF);n.getdents&&(n.getdents=null);try{n.stream_ops.close&&n.stream_ops.close(n)}catch(r){throw r;}finally{t.closeStream(n.fd)}n.fd=null},isClosed:function(n){return n.fd===null},llseek:function(n,r,u){if(t.isClosed(n))throw new t.ErrnoError(i.EBADF);if(!n.seekable||!n.stream_ops.llseek)throw new t.ErrnoError(i.ESPIPE);return n.position=n.stream_ops.llseek(n,r,u),n.ungotten=[],n.position},read:function(n,r,u,f,e){var o,s;if(f<0||e<0)throw new t.ErrnoError(i.EINVAL);if(t.isClosed(n))throw new t.ErrnoError(i.EBADF);if((n.flags&2097155)==1)throw new t.ErrnoError(i.EBADF);if(t.isDir(n.node.mode))throw new t.ErrnoError(i.EISDIR);if(!n.stream_ops.read)throw new t.ErrnoError(i.EINVAL);if(o=typeof e!="undefined",o){if(!n.seekable)throw new t.ErrnoError(i.ESPIPE);}else e=n.position;return s=n.stream_ops.read(n,r,u,f,e),o||(n.position+=s),s},write:function(n,r,u,f,e,o){var s,h;if(f<0||e<0)throw new t.ErrnoError(i.EINVAL);if(t.isClosed(n))throw new t.ErrnoError(i.EBADF);if((n.flags&2097155)==0)throw new t.ErrnoError(i.EBADF);if(t.isDir(n.node.mode))throw new t.ErrnoError(i.EISDIR);if(!n.stream_ops.write)throw new t.ErrnoError(i.EINVAL);if(n.flags&1024&&t.llseek(n,0,2),s=typeof e!="undefined",s){if(!n.seekable)throw new t.ErrnoError(i.ESPIPE);}else e=n.position;h=n.stream_ops.write(n,r,u,f,e,o);s||(n.position+=h);try{if(n.path&&t.trackingDelegate.onWriteToFile)t.trackingDelegate.onWriteToFile(n.path)}catch(c){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+c.message)}return h},allocate:function(n,r,u){if(t.isClosed(n))throw new t.ErrnoError(i.EBADF);if(r<0||u<=0)throw new t.ErrnoError(i.EINVAL);if((n.flags&2097155)==0)throw new t.ErrnoError(i.EBADF);if(!t.isFile(n.node.mode)&&!t.isDir(n.node.mode))throw new t.ErrnoError(i.ENODEV);if(!n.stream_ops.allocate)throw new t.ErrnoError(i.EOPNOTSUPP);n.stream_ops.allocate(n,r,u)},mmap:function(n,r,u,f,e,o,s){if((n.flags&2097155)==1)throw new t.ErrnoError(i.EACCES);if(!n.stream_ops.mmap)throw new t.ErrnoError(i.ENODEV);return n.stream_ops.mmap(n,r,u,f,e,o,s)},msync:function(n,t,i,r,u){return!n||!n.stream_ops.msync?0:n.stream_ops.msync(n,t,i,r,u)},munmap:function(){return 0},ioctl:function(n,r,u){if(!n.stream_ops.ioctl)throw new t.ErrnoError(i.ENOTTY);return n.stream_ops.ioctl(n,r,u)},readFile:function(n,i){if(i=i||{},i.flags=i.flags||"r",i.encoding=i.encoding||"binary",i.encoding!=="utf8"&&i.encoding!=="binary")throw new Error('Invalid encoding type "'+i.encoding+'"');var r,f=t.open(n,i.flags),o=t.stat(n),e=o.size,u=new Uint8Array(e);return t.read(f,u,0,e,0),i.encoding==="utf8"?r=ot(u,0):i.encoding==="binary"&&(r=u),t.close(f),r},writeFile:function(n,i,r){var u,f,e;if(r=r||{},r.flags=r.flags||"w",u=t.open(n,r.flags,r.mode),typeof i=="string")f=new Uint8Array(at(i)+1),e=lt(i,f,0,f.length),t.write(u,f,0,e,undefined,r.canOwn);else if(ArrayBuffer.isView(i))t.write(u,i,0,i.byteLength,undefined,r.canOwn);else throw new Error("Unsupported data type");t.close(u)},cwd:function(){return t.currentPath},chdir:function(n){var r=t.lookupPath(n,{follow:!0}),u;if(r.node===null)throw new t.ErrnoError(i.ENOENT);if(!t.isDir(r.node.mode))throw new t.ErrnoError(i.ENOTDIR);
1if(u=t.nodePermissions(r.node,"x"),u)throw new t.ErrnoError(u);t.currentPath=r.path},createDefaultDirectories:function(){t.mkdir("/tmp");t.mkdir("/home");t.mkdir("/home/web_user")},createDefaultDevices:function(){var n,i;t.mkdir("/dev");t.registerDevice(t.makedev(1,3),{read:function(){return 0},write:function(n,t,i,r){return r}});t.mkdev("/dev/null",t.makedev(1,3));tt.register(t.makedev(5,0),tt.default_tty_ops);tt.register(t.makedev(6,0),tt.default_tty1_ops);t.mkdev("/dev/tty",t.makedev(5,0));t.mkdev("/dev/tty1",t.makedev(6,0));typeof crypto!="undefined"?(i=new Uint8Array(1),n=function(){return crypto.getRandomValues(i),i[0]}):n=w?function(){return require("crypto").randomBytes(1)[0]}:function(){return Math.random()*256|0};t.createDevice("/dev","random",n);t.createDevice("/dev","urandom",n);t.mkdir("/dev/shm");t.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){t.mkdir("/proc");t.mkdir("/proc/self");t.mkdir("/proc/self/fd");t.mount({mount:function(){var n=t.createNode("/proc/self","fd",16895,73);return n.node_ops={lookup:function(n,r){var e=+r,f=t.getStream(e),u;if(!f)throw new t.ErrnoError(i.EBADF);return u={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return f.path}}},u.parent=u,u}},n}},{},"/proc/self/fd")},createStandardStreams:function(){var i,r,u;n.stdin?t.createDevice("/dev","stdin",n.stdin):t.symlink("/dev/tty","/dev/stdin");n.stdout?t.createDevice("/dev","stdout",null,n.stdout):t.symlink("/dev/tty","/dev/stdout");n.stderr?t.createDevice("/dev","stderr",null,n.stderr):t.symlink("/dev/tty1","/dev/stderr");i=t.open("/dev/stdin","r");c(i.fd===0,"invalid handle for stdin ("+i.fd+")");r=t.open("/dev/stdout","w");c(r.fd===1,"invalid handle for stdout ("+r.fd+")");u=t.open("/dev/stderr","w");c(u.fd===2,"invalid handle for stderr ("+u.fd+")")},ensureErrnoError:function(){t.ErrnoError||(t.ErrnoError=function(n,t){this.node=t;this.setErrno=function(n){this.errno=n;for(var t in i)if(i[t]===n){this.code=t;break}};this.setErrno(n);this.message=ce[n];this.stack&&Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0})},t.ErrnoError.prototype=new Error,t.ErrnoError.prototype.constructor=t.ErrnoError,[i.ENOENT].forEach(function(n){t.genericErrors[n]=new t.ErrnoError(n);t.genericErrors[n].stack="<generic error, no stack>"}))},staticInit:function(){t.ensureErrnoError();t.nameTable=new Array(4096);t.mount(f,{},"/");t.createDefaultDirectories();t.createDefaultDevices();t.createSpecialDirectories();t.filesystems={MEMFS:f,IDBFS:s,NODEFS:o,WORKERFS:a}},init:function(i,r,u){c(!t.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");t.init.initialized=!0;t.ensureErrnoError();n.stdin=i||n.stdin;n.stdout=r||n.stdout;n.stderr=u||n.stderr;t.createStandardStreams()},quit:function(){var r,i,u;for(t.init.initialized=!1,r=n._fflush,r&&r(0),i=0;i<t.streams.length;i++)(u=t.streams[i],u)&&t.close(u)},getMode:function(n,t){var i=0;return n&&(i|=365),t&&(i|=146),i},joinPath:function(n,t){var i=u.join.apply(null,n);return t&&i[0]=="/"&&(i=i.substr(1)),i},absolutePath:function(n,t){return u.resolve(t,n)},standardizePath:function(n){return u.normalize(n)},findObject:function(n,i){var r=t.analyzePath(n,i);return r.exists?r.object:(ht(r.error),null)},analyzePath:function(n,i){var r,f;try{f=t.lookupPath(n,{follow:!i});n=f.path}catch(e){}r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{f=t.lookupPath(n,{parent:!0});r.parentExists=!0;r.parentPath=f.path;r.parentObject=f.node;r.name=u.basename(n);f=t.lookupPath(n,{follow:!i});r.exists=!0;r.path=f.path;r.object=f.node;r.name=f.node.name;r.isRoot=f.path==="/"}catch(e){r.error=e.errno}return r},createFolder:function(n,i,r,f){var e=u.join2(typeof n=="string"?n:t.getPath(n),i),o=t.getMode(r,f);return t.mkdir(e,o)},createPath:function(n,i){var f,e,r;for(n=typeof n=="string"?n:t.getPath(n),f=i.split("/").reverse();f.length;)if(e=f.pop(),e){r=u.join2(n,e);try{t.mkdir(r)}catch(o){}n=r}return r},createFile:function(n,i,r,f,e){var o=u.join2(typeof n=="string"?n:t.getPath(n),i),s=t.getMode(f,e);return t.create(o,s)},createDataFile:function(n,i,r,f,e,o){var y=i?u.join2(typeof n=="string"?n:t.getPath(n),i):n,c=t.getMode(f,e),h=t.create(y,c),l,s,v,a;if(r){if(typeof r=="string"){for(l=new Array(r.length),s=0,v=r.length;s<v;++s)l[s]=r.charCodeAt(s);r=l}t.chmod(h,c|146);a=t.open(h,"w");t.write(a,r,0,r.length,0,o);t.close(a);t.chmod(h,c)}return h},createDevice:function(n,r,f,e){var s=u.join2(typeof n=="string"?n:t.getPath(n),r),h=t.getMode(!!f,!!e),o;return t.createDevice.major||(t.createDevice.major=64),o=t.makedev(t.createDevice.major++,0),t.registerDevice(o,{open:function(n){n.seekable=!1},close:function(){e&&e.buffer&&e.buffer.length&&e(10)},read:function(n,r,u,e){for(var o,s=0,h=0;h<e;h++){try{o=f()}catch(c){throw new t.ErrnoError(i.EIO);}
1if(o===undefined&&s===0)throw new t.ErrnoError(i.EAGAIN);if(o===null||o===undefined)break;s++;r[u+h]=o}return s&&(n.node.timestamp=Date.now()),s},write:function(n,r,u,f){for(var o=0;o<f;o++)try{e(r[u+o])}catch(s){throw new t.ErrnoError(i.EIO);}return f&&(n.node.timestamp=Date.now()),o}}),t.mkdev(s,h,o)},createLink:function(n,i,r){var f=u.join2(typeof n=="string"?n:t.getPath(n),i);return t.symlink(r,f)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;var r=!0;if(typeof XMLHttpRequest!="undefined")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else if(n.read)try{t.contents=si(n.read(t.url),!0);t.usedBytes=t.contents.length}catch(u){r=!1}else throw new Error("Cannot load without read() or XMLHttpRequest.");return r||ht(i.EIO),r},createLazyFile:function(n,r,u,f,e){function h(){this.lengthKnown=!1;this.chunks=[]}var a,s,o,l,v;if(h.prototype.get=function(n){if(n>this.length-1||n<0)return undefined;var t=n%this.chunkSize,i=n/this.chunkSize|0;return this.getter(i)[t]},h.prototype.setDataGetter=function(n){this.getter=n},h.prototype.cacheLength=function(){var t=new XMLHttpRequest,e,r;if(t.open("HEAD",u,!1),t.send(null),!(t.status>=200&&t.status<300||t.status===304))throw new Error("Couldn't load "+u+". Status: "+t.status);var n=Number(t.getResponseHeader("Content-length")),f,o=(f=t.getResponseHeader("Accept-Ranges"))&&f==="bytes",s=(f=t.getResponseHeader("Content-Encoding"))&&f==="gzip",i=1048576;o||(i=n);e=function(t,r){if(t>r)throw new Error("invalid range ("+t+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var f=new XMLHttpRequest;if(f.open("GET",u,!1),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+r),typeof Uint8Array!="undefined"&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(null),!(f.status>=200&&f.status<300||f.status===304))throw new Error("Couldn't load "+u+". Status: "+f.status);return f.response!==undefined?new Uint8Array(f.response||[]):si(f.responseText||"",!0)};r=this;r.setDataGetter(function(t){var f=t*i,u=(t+1)*i-1;if(u=Math.min(u,n-1),typeof r.chunks[t]=="undefined"&&(r.chunks[t]=e(f,u)),typeof r.chunks[t]=="undefined")throw new Error("doXHR failed!");return r.chunks[t]});(s||!n)&&(i=n=1,n=this.getter(0).length,i=n,console.log("LazyFiles on gzip forces download of the whole file when length is accessed"));this._length=n;this._chunkSize=i;this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";a=new h;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});s={isDevice:!1,contents:a}}else s={isDevice:!1,url:u};return o=t.createFile(n,r,s,f,e),s.contents?o.contents=s.contents:s.url&&(o.contents=null,o.url=s.url),Object.defineProperties(o,{usedBytes:{get:function(){return this.contents.length}}}),l={},v=Object.keys(o.stream_ops),v.forEach(function(n){var r=o.stream_ops[n];l[n]=function(){if(!t.forceLoadFile(o))throw new t.ErrnoError(i.EIO);return r.apply(null,arguments)}}),l.read=function(n,r,u,f,e){var h,l,s;if(!t.forceLoadFile(o))throw new t.ErrnoError(i.EIO);if(h=n.node.contents,e>=h.length)return 0;if(l=Math.min(h.length-e,f),c(l>=0),h.slice)for(s=0;s<l;s++)r[u+s]=h[e+s];else for(s=0;s<l;s++)r[u+s]=h.get(e+s);return l},o.stream_ops=l,o},createPreloadedFile:function(i,r,f,e,o,s,h,c,l,a){function p(u){function p(n){a&&a();c||t.createDataFile(i,r,n,e,o,l);s&&s();er(y)}var f=!1;n.preloadPlugins.forEach(function(n){f||n.canHandle(v)&&(n.handle(u,v,p,function(){h&&h();er(y)}),f=!0)});f||p(u)}Browser.init();var v=r?u.resolve(u.join2(i,r)):i,y=re("cp "+v);lu(y);typeof f=="string"?Browser.asyncLoad(f,function(n){p(n)},h):p(f)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(n,i,r){var f,u;i=i||function(){};r=r||function(){};f=t.indexedDB();try{u=f.open(t.DB_NAME(),t.DB_VERSION)}catch(e){return r(e)}u.onupgradeneeded=function(){console.log("creating db");var n=u.result;n.createObjectStore(t.DB_STORE_NAME)};u.onsuccess=function(){function h(){f==0?i():r()}var c=u.result,o=c.transaction([t.DB_STORE_NAME],"readwrite"),l=o.objectStore(t.DB_STORE_NAME),e=0,f=0,s=n.length;
1n.forEach(function(n){var i=l.put(t.analyzePath(n).object.contents,n);i.onsuccess=function(){e++;e+f==s&&h()};i.onerror=function(){f++;e+f==s&&h()}});o.onerror=r};u.onerror=r},loadFilesFromDB:function(n,i,r){var e,f;i=i||function(){};r=r||function(){};e=t.indexedDB();try{f=e.open(t.DB_NAME(),t.DB_VERSION)}catch(o){return r(o)}f.onupgradeneeded=r;f.onsuccess=function(){function c(){e==0?i():r()}var l=f.result,o;try{o=l.transaction([t.DB_STORE_NAME],"readonly")}catch(a){r(a);return}var v=o.objectStore(t.DB_STORE_NAME),s=0,e=0,h=n.length;n.forEach(function(n){var i=v.get(n);i.onsuccess=function(){t.analyzePath(n).exists&&t.unlink(n);t.createDataFile(u.dirname(n),u.basename(n),i.result,!0,!0,!0);s++;s+e==h&&c()};i.onerror=function(){e++;s+e==h&&c()}});o.onerror=r};f.onerror=r}};e={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(n,r){var f,e;if(r[0]!=="/"){if(n===-100)f=t.cwd();else{if(e=t.getStream(n),!e)throw new t.ErrnoError(i.EBADF);f=e.path}r=u.join2(f,r)}return r},doStat:function(n,f,e){try{var o=n(f)}catch(s){if(s&&s.node&&u.normalize(f)!==u.normalize(t.getPath(s.node)))return-i.ENOTDIR;throw s;}return r[e>>2]=o.dev,r[e+4>>2]=0,r[e+8>>2]=o.ino,r[e+12>>2]=o.mode,r[e+16>>2]=o.nlink,r[e+20>>2]=o.uid,r[e+24>>2]=o.gid,r[e+28>>2]=o.rdev,r[e+32>>2]=0,r[e+36>>2]=o.size,r[e+40>>2]=4096,r[e+44>>2]=o.blocks,r[e+48>>2]=o.atime.getTime()/1e3|0,r[e+52>>2]=0,r[e+56>>2]=o.mtime.getTime()/1e3|0,r[e+60>>2]=0,r[e+64>>2]=o.ctime.getTime()/1e3|0,r[e+68>>2]=0,r[e+72>>2]=o.ino,0},doMsync:function(n,i,r,u){var f=new Uint8Array(g.subarray(n,n+r));t.msync(i,f,0,r,u)},doMkdir:function(n,i){return n=u.normalize(n),n[n.length-1]==="/"&&(n=n.substr(0,n.length-1)),t.mkdir(n,i,0),0},doMknod:function(n,r,u){switch(r&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-i.EINVAL}return t.mknod(n,r,u),0},doReadlink:function(n,r,u){if(u<=0)return-i.EINVAL;var e=t.readlink(n),f=Math.min(u,at(e)),o=b[r+f];return nu(e,r,u+1),b[r+f]=o,f},doAccess:function(n,r){var f,e,u;return r&-8?-i.EINVAL:(e=t.lookupPath(n,{follow:!0}),f=e.node,u="",r&4&&(u+="r"),r&2&&(u+="w"),r&1&&(u+="x"),u&&t.nodePermissions(f,u))?-i.EACCES:0},doDup:function(n,i,r){var u=t.getStream(r);return u&&t.close(u),t.open(n,i,0,r,r).fd},doReadv:function(n,i,u,f){for(var s=0,e=0;e<u;e++){var c=r[i+e*8>>2],h=r[i+(e*8+4)>>2],o=t.read(n,b,c,h,f);if(o<0)return-1;if(s+=o,o<h)break}return s},doWritev:function(n,i,u,f){for(var o=0,e=0;e<u;e++){var h=r[i+e*8>>2],c=r[i+(e*8+4)>>2],s=t.write(n,b,h,c,f);if(s<0)return-1;o+=s}return o},varargs:0,get:function(){e.varargs+=4;return r[e.varargs-4>>2]},getStr:function(){return rt(e.get())},getStreamFromFD:function(){var n=t.getStream(e.get());if(!n)throw new t.ErrnoError(i.EBADF);return n},getSocketFromFD:function(){var n=SOCKFS.getSocket(e.get());if(!n)throw new t.ErrnoError(i.EBADF);return n},getSocketAddress:function(n){var r=e.get(),u=e.get(),i;if(n&&r===0)return null;if(i=__read_sockaddr(r,u),i.errno)throw new t.ErrnoError(i.errno);return i.addr=DNS.lookup_addr(i.addr)||i.addr,i},get64:function(){var n=e.get(),t=e.get();return n>=0?c(t===0):c(t===-1),n},getZero:function(){c(e.get()===0)}};sr=p;p+=16;k={};bt={};fi=1;dt=[31,29,31,30,31,30,31,31,30,31,30,31];gt=[31,28,31,30,31,30,31,31,30,31,30,31];t.staticInit();ri.unshift(function(){n.noFSInit||t.init.initialized||t.init()});eu.push(function(){t.ignorePermissions=!1});ur.push(function(){t.quit()});ri.unshift(function(){tt.init()});ur.push(function(){tt.shutdown()});w&&(h=require("fs"),lr=require("path"),o.staticInit());vu=w?function(){var n=process.hrtime();return n[0]*1e3+n[1]/1e6}:typeof dateNow!="undefined"?dateNow:typeof self=="object"&&self.performance&&typeof self.performance.now=="function"?function(){return self.performance.now()}:typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:Date.now;hr(k);st=vi(4);nr=ti=br(p);tr=nr+ii;ir=br(tr);r[st>>2]=ir;gi=!0;n.wasmTableSize=497;n.wasmMaxTableSize=497;n.asmGlobalArg={};n.asmLibraryArg={abort:y,enlargeMemory:yf,getTotalMemory:pf,abortOnCannotGrowMemory:vf,__ZSt18uncaught_exceptionv:pt,___assert_fail:fe,___cxa_allocate_exception:ee,___cxa_throw:oe,___lock:se,___map_file:he,___setErrNo:ht,___syscall140:le,___syscall145:ae,___syscall146:ve,___syscall54:ye,___syscall6:pe,___syscall91:we,___unlock:be,_abort:ke,_clock_gettime:ge,_emscripten_memcpy_big:no,_getenv:wt,_pthread_cond_wait:to,_pthread_getspecific:io,_pthread_key_create:ro,_pthread_once:kt,_pthread_setspecific:uo,_strftime_l:eo,DYNAMICTOP_PTR:st,STACKTOP:ti};ar=n.asm(n.asmGlobalArg,n.asmLibraryArg,v);n.asm=ar;var oo=n.__GLOBAL__I_000101=function(){return n.asm.__GLOBAL__I_000101.apply(null,arguments)},so=n.__GLOBAL__sub_I_api_cpp=function(){return n.asm.__GLOBAL__sub_I_api_cpp.apply(null,arguments)},ho=n.__GLOBAL__sub_I_iostream_cpp=function(){return n.asm.__GLOBAL__sub_I_iostream_cpp.apply(null,arguments)},gs=n.___errno_location=function(){return n.asm.___errno_location.apply(null,arguments)},nh=n._createBuffer=function(){return n.asm._createBuffer.apply(null,arguments)},th=n._deleteBuffer=function(){return n.asm._deleteBuffer.apply(null,arguments)},co=n._emscripten_replace_memory=function(){return n.asm._emscripten_replace_memory.apply(null,arguments)}
1,yu=n._free=function(){return n.asm._free.apply(null,arguments)},ih=n._getScanResults=function(){return n.asm._getScanResults.apply(null,arguments)},rh=n._main=function(){return n.asm._main.apply(null,arguments)},vr=n._malloc=function(){return n.asm._malloc.apply(null,arguments)},uh=n._scanQrcode=function(){return n.asm._scanQrcode.apply(null,arguments)},hi=n.stackAlloc=function(){return n.asm.stackAlloc.apply(null,arguments)},pu=n.stackRestore=function(){return n.asm.stackRestore.apply(null,arguments)},wu=n.stackSave=function(){return n.asm.stackSave.apply(null,arguments)},fh=n.dynCall_v=function(){return n.asm.dynCall_v.apply(null,arguments)},eh=n.dynCall_vi=function(){return n.asm.dynCall_vi.apply(null,arguments)};if(n.asm=ar,n.cwrap=gu,n.then=function(t){if(n.calledRun)t(n);else{var i=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){i&&i();t(n)}}return n},ct.prototype=new Error,ct.prototype.constructor=ct,bu=!1,yt=function ao(){n.calledRun||yr();n.calledRun||(yt=ao)},n.callMain=function(t){var u,f,e,s,o;for(t=t||[],hu(),u=t.length+1,f=hi((u+1)*4),r[f>>2]=tu(n.thisProgram),e=1;e<u;e++)r[(f>>2)+e]=tu(t[e-1]);r[(f>>2)+u]=0;try{s=n._main(u,f,0);ku(s,!0)}catch(i){if(i instanceof ct)return;if(i=="SimulateInfiniteLoop"){n.noExitRuntime=!0;return}o=i;i&&typeof i=="object"&&i.stack&&(o=[i,i.stack]);n.printErr("exception thrown: "+o);n.quit(1,i)}finally{bu=!0}},n.run=yr,n.exit=ku,n.abort=y,n.preInit)for(typeof n.preInit=="function"&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return pr=!0,n.noInitialRun&&(pr=!1),n.noExitRuntime=!0,yr(),n},utf8BufferToString=(n,t)=>{let i=t;while(n[i])++i;const r=new Uint8Array(n.slice(t,i)),u=String.fromCharCode.apply(null,r);return decodeURIComponent(escape(u))},Scanner=n=>{const t=ApiModule(n),i={createBuffer:t.cwrap("createBuffer","number",["number"]),deleteBuffer:t.cwrap("deleteBuffer","",["number"]),scanQrcode:t.cwrap("scanQrcode","number",["number","number","number"]),getScanResults:t.cwrap("getScanResults","number",[])},r={scanQrcode:(n,r,u)=>{const f=i.createBuffer(r*u*4);t.HEAP8.set(n,f);const e=[];if(i.scanQrcode(f,r,u)){const n=i.getScanResults();e.push(utf8BufferToString(t.HEAP8,n));i.deleteBuffer(n)}return e}};return new Promise(n=>{t.then(()=>{n(r)})})}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.