UNPKG

cloudpilot-emu-embedded

Version:

Embedded version of the CloudpilotEmu PalmOS emulator

1 lines 133 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cloudpilot=t():e.cloudpilot=t()}(self,(()=>(()=>{var e={492:e=>{var t,i=(t="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var i,r,n,o,s=e,a=new Promise(((e,t)=>{i=e,r=t})),p="object"==typeof window,c="undefined"!=typeof WorkerGlobalScope,u=("object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type,Object.assign({},s)),l="./this.program",d=(e,t)=>{throw t},h="";(p||c)&&(c?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),t&&(h=t),h=h.startsWith("blob:")?"":h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1),c&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),n=e=>fetch(e,{credentials:"same-origin"}).then((e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))));var _=s.print||console.log.bind(console),m=s.printErr||console.error.bind(console);Object.assign(s,u),u=null,s.arguments&&s.arguments,s.thisProgram&&(l=s.thisProgram);var y,f,v,g,b,S,C,w=s.wasmBinary,I=!1;function G(e,t){e||B(t)}function E(){var e=y.buffer;s.HEAP8=v=new Int8Array(e),s.HEAP16=new Int16Array(e),s.HEAPU8=g=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAP32=b=new Int32Array(e),s.HEAPU32=S=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=C=new Float64Array(e)}function D(){if(!I){var e=$r();0==e&&(e+=4);var t=S[e>>2],i=S[e+4>>2];34821223==t&&2310721022==i||B(`Stack overflow! Stack cookie has been overwritten at ${Q(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${Q(i)} ${Q(t)}`),1668509029!=S[0]&&B("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var x=[],P=[],k=[],M=[],R=0,z=null,T=null;function B(e){s.onAbort?.(e),m(e="Aborted("+e+")"),I=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}var H,A,N=e=>e.startsWith("data:application/octet-stream;base64,");function L(e){if(e==H&&w)return new Uint8Array(w);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function F(e,t,i){return function(e){return w?Promise.resolve().then((()=>L(e))):n(e).then((e=>new Uint8Array(e)),(()=>L(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then(i,(e=>{m(`failed to asynchronously prepare wasm: ${e}`),B(e)}))}var U={428816:e=>{O.grow(65536);for(let t=0;t<=65535;t++)O.set(O.length-65535-1+t,O.get(S[(e>>>2)+t]));return O.length-65535-1}};class j{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var O,W,V,q=e=>{for(;e.length>0;)e.shift()(s)},K=s.noExitRuntime||!0,Q=e=>"0x"+(e>>>=0).toString(16).padStart(8,"0"),Z="undefined"!=typeof TextDecoder?new TextDecoder:void 0,$=(e,t=0,i=NaN)=>{for(var r=t+i,n=t;e[n]&&!(n>=r);)++n;if(n-t>16&&e.buffer&&Z)return Z.decode(e.subarray(t,n));for(var o="";t<n;){var s=e[t++];if(128&s){var a=63&e[t++];if(192!=(224&s)){var p=63&e[t++];if((s=224==(240&s)?(15&s)<<12|a<<6|p:(7&s)<<18|a<<12|p<<6|63&e[t++])<65536)o+=String.fromCharCode(s);else{var c=s-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o},Y=(e,t)=>e?$(g,e,t):"",X=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,J=0,ee=[0,31,60,91,121,152,182,213,244,274,305,335],te=[0,31,59,90,120,151,181,212,243,273,304,334],ie=e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?te:ee)[e.getMonth()]+e.getDate()-1},re={},ne=e=>{if(e instanceof j||"unwind"==e)return f;D(),e instanceof WebAssembly.RuntimeError&&Yr()<=0&&m("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),d(0,e)},oe=()=>K||J>0,se=e=>{f=e,oe()||(s.onExit?.(e),I=!0),d(0,new j(e))},ae=(e,t)=>{f=e,se(e)},pe=ae,ce=(e,t,i,r)=>{if(!(r>0))return 0;for(var n=i,o=i+r-1,s=0;s<e.length;++s){var a=e.charCodeAt(s);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(i>=o)break;t[i++]=a}else if(a<=2047){if(i+1>=o)break;t[i++]=192|a>>6,t[i++]=128|63&a}else if(a<=65535){if(i+2>=o)break;t[i++]=224|a>>12,t[i++]=128|a>>6&63,t[i++]=128|63&a}else{if(i+3>=o)break;t[i++]=240|a>>18,t[i++]=128|a>>12&63,t[i++]=128|a>>6&63,t[i++]=128|63&a}}return t[i]=0,i-n},ue=(e,t,i)=>ce(e,g,t,i),le=[],de=(e,t)=>Math.ceil(e/t)*t,he=e=>{var t=(e-y.buffer.byteLength+65535)/65536|0;try{return y.grow(t),E(),1}catch(e){}},_e={},me=()=>{if(!me.strings){var e={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",_:l||"./this.program"};for(var t in _e)void 0===_e[t]?delete e[t]:e[t]=_e[t];var i=[];for(var t in e)i.push(`${t}=${e[t]}`);me.strings=i}return me.strings},ye=[null,[],[]],fe=e=>{for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++i):t+=3}return t},ve=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},ge=[],be=[],Se=(e,t)=>{O.set(e,t),ge[e]=O.get(e)},Ce={a:(e,t,i,r)=>{B(`Assertion failed: ${Y(e)}, at: `+[t?Y(t):"unknown filename",i,r?Y(r):"unknown function"])},t:function(e){const t=new Error(Y(e));throw t.isAssert=!0,t},l:function(e,t,i){X(t,i)},h:()=>{B("")},g:()=>1,c:(e,t,i)=>g.copyWithin(e,t,t+i),n:()=>{K=!1,J=0},i:function(e,t,i){var r=X(e,t),n=new Date(1e3*r);b[i>>2]=n.getSeconds(),b[i+4>>2]=n.getMinutes(),b[i+8>>2]=n.getHours(),b[i+12>>2]=n.getDate(),b[i+16>>2]=n.getMonth(),b[i+20>>2]=n.getFullYear()-1900,b[i+24>>2]=n.getDay();var o=0|ie(n);b[i+28>>2]=o,b[i+36>>2]=-60*n.getTimezoneOffset();var s=new Date(n.getFullYear(),0,1),a=new Date(n.getFullYear(),6,1).getTimezoneOffset(),p=s.getTimezoneOffset(),c=0|(a!=p&&n.getTimezoneOffset()==Math.min(p,a));b[i+32>>2]=c},j:function(e){var t,i=(()=>{var t=new Date(b[e+20>>2]+1900,b[e+16>>2],b[e+12>>2],b[e+8>>2],b[e+4>>2],b[e>>2],0),i=b[e+32>>2],r=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),s=n.getTimezoneOffset(),a=Math.min(s,o);if(i<0)b[e+32>>2]=Number(o!=s&&a==r);else if(i>0!=(a==r)){var p=Math.max(s,o),c=i>0?a:p;t.setTime(t.getTime()+6e4*(c-r))}b[e+24>>2]=t.getDay();var u=0|ie(t);b[e+28>>2]=u,b[e>>2]=t.getSeconds(),b[e+4>>2]=t.getMinutes(),b[e+8>>2]=t.getHours(),b[e+12>>2]=t.getDate(),b[e+16>>2]=t.getMonth(),b[e+20>>2]=t.getYear();var l=t.getTime();return isNaN(l)?-1:l/1e3})();return A=i,t=+Math.abs(A)>=1?A>0?+Math.floor(A/4294967296)>>>0:~~+Math.ceil((A-+(~~A>>>0))/4294967296)>>>0:0,Qr(t),i>>>0},o:(e,t)=>{if(re[e]&&(clearTimeout(re[e].id),delete re[e]),!t)return 0;var i=setTimeout((()=>{delete re[e],(e=>{if(!I)try{e(),(()=>{if(!oe())try{pe(f)}catch(e){ne(e)}})()}catch(e){ne(e)}})((()=>Kr(e,performance.now())))}),t);return re[e]={id:i,timeout_ms:t},0},s:(e,t,i,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),s=new Date(n,6,1),a=o.getTimezoneOffset(),p=s.getTimezoneOffset(),c=Math.max(a,p);S[e>>2]=60*c,b[t>>2]=Number(a!=p);var u=e=>{var t=e>=0?"-":"+",i=Math.abs(e);return`UTC${t}${String(Math.floor(i/60)).padStart(2,"0")}${String(i%60).padStart(2,"0")}`},l=u(a),d=u(p);p<a?(ue(l,i,17),ue(d,r,17)):(ue(l,r,17),ue(d,i,17))},u:(e,t,i)=>((e,t,i)=>{var r=((e,t)=>{var i;for(le.length=0;i=g[e++];){var r=105!=i;t+=(r&=112!=i)&&t%8?4:0,le.push(112==i?S[t>>2]:105==i?b[t>>2]:C[t>>3]),t+=r?8:4}return le})(t,i);return U[e](...r)})(e,t,i),b:()=>Date.now(),r:e=>{var t=g.length,i=2147483648;if((e>>>=0)>i)return!1;for(var r=1;r<=4;r*=2){var n=t*(1+.2/r);n=Math.min(n,e+100663296);var o=Math.min(i,de(Math.max(e,n),65536));if(he(o))return!0}return!1},p:(e,t)=>{var i=0;return me().forEach(((r,n)=>{var o=t+i;S[e+4*n>>2]=o,((e,t)=>{for(var i=0;i<e.length;++i)v[t++]=e.charCodeAt(i);v[t]=0})(r,o),i+=r.length+1})),0},q:(e,t)=>{var i=me();S[e>>2]=i.length;var r=0;return i.forEach((e=>r+=e.length+1)),S[t>>2]=r,0},d:e=>52,f:(e,t,i,r)=>52,k:function(e,t,i,r,n){return X(t,i),70},e:(e,t,i,r)=>{for(var n,o,s,a=0,p=0;p<i;p++){var c=S[t>>2],u=S[t+4>>2];t+=8;for(var l=0;l<u;l++)n=e,o=g[c+l],s=void 0,s=ye[n],0===o||10===o?((1===n?_:m)($(s)),s.length=0):s.push(o);a+=u}return S[r>>2]=a,0},m:se},we=function(){var e,t,i,n,o,a,p={a:Ce};function c(e,t){var i;return we=e.exports,y=we.v,E(),O=we.Yc,i=we.w,P.unshift(i),function(e){if(R--,s.monitorRunDependencies?.(R),0==R&&(null!==z&&(clearInterval(z),z=null),T)){var t=T;T=null,t()}}(),we}if(R++,s.monitorRunDependencies?.(R),s.instantiateWasm)try{return s.instantiateWasm(p,c)}catch(e){m(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return H??=N(a="cloudpilot_web.wasm")?a:(o=a,s.locateFile?s.locateFile(o,h):h+o),(e=w,t=H,i=p,n=function(e){c(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||N(t)||"function"!=typeof fetch?F(t,i,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,i).then(n,(function(e){return m(`wasm streaming compile failed: ${e}`),m("falling back to ArrayBuffer instantiation"),F(t,i,n)}))))).catch(r),{}}(),Ie=(s._malloc=e=>(s._malloc=we.x)(e),s._free=e=>(s._free=we.y)(e),s._main=(e,t)=>(Ie=s._main=we.z)(e,t)),Ge=(s._webidl_free=e=>(s._webidl_free=we.A)(e),s._webidl_malloc=e=>(s._webidl_malloc=we.B)(e),s._emscripten_bind_VoidPtr___destroy___0=e=>(Ge=s._emscripten_bind_VoidPtr___destroy___0=we.C)(e)),Ee=s._emscripten_bind_Cloudpilot_Cloudpilot_0=()=>(Ee=s._emscripten_bind_Cloudpilot_Cloudpilot_0=we.D)(),De=s._emscripten_bind_Cloudpilot_Malloc_1=(e,t)=>(De=s._emscripten_bind_Cloudpilot_Malloc_1=we.E)(e,t),xe=s._emscripten_bind_Cloudpilot_Free_1=(e,t)=>(xe=s._emscripten_bind_Cloudpilot_Free_1=we.F)(e,t),Pe=s._emscripten_bind_Cloudpilot_Nullptr_0=e=>(Pe=s._emscripten_bind_Cloudpilot_Nullptr_0=we.G)(e),ke=s._emscripten_bind_Cloudpilot_EnableLogging_1=(e,t)=>(ke=s._emscripten_bind_Cloudpilot_EnableLogging_1=we.H)(e,t),Me=s._emscripten_bind_Cloudpilot_InitializeSession_3=(e,t,i,r)=>(Me=s._emscripten_bind_Cloudpilot_InitializeSession_3=we.I)(e,t,i,r),Re=s._emscripten_bind_Cloudpilot_GetCyclesPerSecond_0=e=>(Re=s._emscripten_bind_Cloudpilot_GetCyclesPerSecond_0=we.J)(e),ze=s._emscripten_bind_Cloudpilot_RunEmulation_1=(e,t)=>(ze=s._emscripten_bind_Cloudpilot_RunEmulation_1=we.K)(e,t),Te=s._emscripten_bind_Cloudpilot_SetClockFactor_1=(e,t)=>(Te=s._emscripten_bind_Cloudpilot_SetClockFactor_1=we.L)(e,t),Be=s._emscripten_bind_Cloudpilot_CopyFrame_0=e=>(Be=s._emscripten_bind_Cloudpilot_CopyFrame_0=we.M)(e),He=s._emscripten_bind_Cloudpilot_IsScreenDirty_0=e=>(He=s._emscripten_bind_Cloudpilot_IsScreenDirty_0=we.N)(e),Ae=s._emscripten_bind_Cloudpilot_MarkScreenClean_0=e=>(Ae=s._emscripten_bind_Cloudpilot_MarkScreenClean_0=we.O)(e),Ne=s._emscripten_bind_Cloudpilot_MinMemoryForDevice_1=(e,t)=>(Ne=s._emscripten_bind_Cloudpilot_MinMemoryForDevice_1=we.P)(e,t),Le=s._emscripten_bind_Cloudpilot_FramebufferSizeForDevice_1=(e,t)=>(Le=s._emscripten_bind_Cloudpilot_FramebufferSizeForDevice_1=we.Q)(e,t),Fe=s._emscripten_bind_Cloudpilot_TotalMemoryForDevice_1=(e,t)=>(Fe=s._emscripten_bind_Cloudpilot_TotalMemoryForDevice_1=we.R)(e,t),Ue=s._emscripten_bind_Cloudpilot_QueuePenMove_2=(e,t,i)=>(Ue=s._emscripten_bind_Cloudpilot_QueuePenMove_2=we.S)(e,t,i),je=s._emscripten_bind_Cloudpilot_QueuePenUp_0=e=>(je=s._emscripten_bind_Cloudpilot_QueuePenUp_0=we.T)(e),Oe=s._emscripten_bind_Cloudpilot_QueueButtonDown_1=(e,t)=>(Oe=s._emscripten_bind_Cloudpilot_QueueButtonDown_1=we.U)(e,t),We=s._emscripten_bind_Cloudpilot_QueueButtonUp_1=(e,t)=>(We=s._emscripten_bind_Cloudpilot_QueueButtonUp_1=we.V)(e,t),Ve=s._emscripten_bind_Cloudpilot_QueueKeyboardEvent_2=(e,t,i)=>(Ve=s._emscripten_bind_Cloudpilot_QueueKeyboardEvent_2=we.W)(e,t,i),qe=s._emscripten_bind_Cloudpilot_IsPowerOff_0=e=>(qe=s._emscripten_bind_Cloudpilot_IsPowerOff_0=we.X)(e),Ke=s._emscripten_bind_Cloudpilot_IsUIInitialized_0=e=>(Ke=s._emscripten_bind_Cloudpilot_IsUIInitialized_0=we.Y)(e),Qe=s._emscripten_bind_Cloudpilot_GetOSVersion_0=e=>(Qe=s._emscripten_bind_Cloudpilot_GetOSVersion_0=we.Z)(e),Ze=s._emscripten_bind_Cloudpilot_IsSetupComplete_0=e=>(Ze=s._emscripten_bind_Cloudpilot_IsSetupComplete_0=we._)(e),$e=s._emscripten_bind_Cloudpilot_Reset_0=e=>($e=s._emscripten_bind_Cloudpilot_Reset_0=we.$)(e),Ye=s._emscripten_bind_Cloudpilot_ResetNoExtensions_0=e=>(Ye=s._emscripten_bind_Cloudpilot_ResetNoExtensions_0=we.aa)(e),Xe=s._emscripten_bind_Cloudpilot_ResetHard_0=e=>(Xe=s._emscripten_bind_Cloudpilot_ResetHard_0=we.ba)(e),Je=s._emscripten_bind_Cloudpilot_InstallDb_2=(e,t,i)=>(Je=s._emscripten_bind_Cloudpilot_InstallDb_2=we.ca)(e,t,i),et=s._emscripten_bind_Cloudpilot_GetPalette2bitMapping_0=e=>(et=s._emscripten_bind_Cloudpilot_GetPalette2bitMapping_0=we.da)(e),tt=s._emscripten_bind_Cloudpilot_GetMemoryPtr_0=e=>(tt=s._emscripten_bind_Cloudpilot_GetMemoryPtr_0=we.ea)(e),it=s._emscripten_bind_Cloudpilot_GetDirtyPagesPtr_0=e=>(it=s._emscripten_bind_Cloudpilot_GetDirtyPagesPtr_0=we.fa)(e),rt=s._emscripten_bind_Cloudpilot_GetMemorySize_0=e=>(rt=s._emscripten_bind_Cloudpilot_GetMemorySize_0=we.ga)(e),nt=s._emscripten_bind_Cloudpilot_ImportMemoryImage_2=(e,t,i)=>(nt=s._emscripten_bind_Cloudpilot_ImportMemoryImage_2=we.ha)(e,t,i),ot=s._emscripten_bind_Cloudpilot_GetRomPtr_0=e=>(ot=s._emscripten_bind_Cloudpilot_GetRomPtr_0=we.ia)(e),st=s._emscripten_bind_Cloudpilot_GetRomSize_0=e=>(st=s._emscripten_bind_Cloudpilot_GetRomSize_0=we.ja)(e),at=s._emscripten_bind_Cloudpilot_GetSavestatePtr_0=e=>(at=s._emscripten_bind_Cloudpilot_GetSavestatePtr_0=we.ka)(e),pt=s._emscripten_bind_Cloudpilot_GetSavestateSize_0=e=>(pt=s._emscripten_bind_Cloudpilot_GetSavestateSize_0=we.la)(e),ct=s._emscripten_bind_Cloudpilot_SaveState_0=e=>(ct=s._emscripten_bind_Cloudpilot_SaveState_0=we.ma)(e),ut=s._emscripten_bind_Cloudpilot_LoadState_2=(e,t,i)=>(ut=s._emscripten_bind_Cloudpilot_LoadState_2=we.na)(e,t,i),lt=s._emscripten_bind_Cloudpilot_GetHotsyncName_0=e=>(lt=s._emscripten_bind_Cloudpilot_GetHotsyncName_0=we.oa)(e),dt=s._emscripten_bind_Cloudpilot_SetHotsyncName_1=(e,t)=>(dt=s._emscripten_bind_Cloudpilot_SetHotsyncName_1=we.pa)(e,t),ht=s._emscripten_bind_Cloudpilot_RegisterPwmHandler_1=(e,t)=>(ht=s._emscripten_bind_Cloudpilot_RegisterPwmHandler_1=we.qa)(e,t),_t=s._emscripten_bind_Cloudpilot_StartBackup_0=e=>(_t=s._emscripten_bind_Cloudpilot_StartBackup_0=we.ra)(e),mt=s._emscripten_bind_Cloudpilot_SetClipboardIntegration_1=(e,t)=>(mt=s._emscripten_bind_Cloudpilot_SetClipboardIntegration_1=we.sa)(e,t),yt=s._emscripten_bind_Cloudpilot_GetClipboardIntegration_0=e=>(yt=s._emscripten_bind_Cloudpilot_GetClipboardIntegration_0=we.ta)(e),ft=s._emscripten_bind_Cloudpilot_IsSuspended_0=e=>(ft=s._emscripten_bind_Cloudpilot_IsSuspended_0=we.ua)(e),vt=s._emscripten_bind_Cloudpilot_GetSuspendContext_0=e=>(vt=s._emscripten_bind_Cloudpilot_GetSuspendContext_0=we.va)(e),gt=s._emscripten_bind_Cloudpilot_SetNetworkRedirection_1=(e,t)=>(gt=s._emscripten_bind_Cloudpilot_SetNetworkRedirection_1=we.wa)(e,t),bt=s._emscripten_bind_Cloudpilot_GetNetworkRedirection_0=e=>(bt=s._emscripten_bind_Cloudpilot_GetNetworkRedirection_0=we.xa)(e),St=s._emscripten_bind_Cloudpilot_RegisterProxyDisconnectHandler_1=(e,t)=>(St=s._emscripten_bind_Cloudpilot_RegisterProxyDisconnectHandler_1=we.ya)(e,t),Ct=s._emscripten_bind_Cloudpilot_SetHotsyncNameManagement_1=(e,t)=>(Ct=s._emscripten_bind_Cloudpilot_SetHotsyncNameManagement_1=we.za)(e,t),wt=s._emscripten_bind_Cloudpilot_LaunchAppByName_1=(e,t)=>(wt=s._emscripten_bind_Cloudpilot_LaunchAppByName_1=we.Aa)(e,t),It=s._emscripten_bind_Cloudpilot_LaunchAppByDbHeader_2=(e,t,i)=>(It=s._emscripten_bind_Cloudpilot_LaunchAppByDbHeader_2=we.Ba)(e,t,i),Gt=s._emscripten_bind_Cloudpilot_DeviceSupportsCardSize_1=(e,t)=>(Gt=s._emscripten_bind_Cloudpilot_DeviceSupportsCardSize_1=we.Ca)(e,t),Et=s._emscripten_bind_Cloudpilot_ClearExternalStorage_0=e=>(Et=s._emscripten_bind_Cloudpilot_ClearExternalStorage_0=we.Da)(e),Dt=s._emscripten_bind_Cloudpilot_AllocateCard_2=(e,t,i)=>(Dt=s._emscripten_bind_Cloudpilot_AllocateCard_2=we.Ea)(e,t,i),xt=s._emscripten_bind_Cloudpilot_AdoptCard_3=(e,t,i,r)=>(xt=s._emscripten_bind_Cloudpilot_AdoptCard_3=we.Fa)(e,t,i,r),Pt=s._emscripten_bind_Cloudpilot_MountCard_1=(e,t)=>(Pt=s._emscripten_bind_Cloudpilot_MountCard_1=we.Ga)(e,t),kt=s._emscripten_bind_Cloudpilot_RemoveCard_1=(e,t)=>(kt=s._emscripten_bind_Cloudpilot_RemoveCard_1=we.Ha)(e,t),Mt=s._emscripten_bind_Cloudpilot_GetCardData_1=(e,t)=>(Mt=s._emscripten_bind_Cloudpilot_GetCardData_1=we.Ia)(e,t),Rt=s._emscripten_bind_Cloudpilot_GetCardDirtyPages_1=(e,t)=>(Rt=s._emscripten_bind_Cloudpilot_GetCardDirtyPages_1=we.Ja)(e,t),zt=s._emscripten_bind_Cloudpilot_GetCardSize_1=(e,t)=>(zt=s._emscripten_bind_Cloudpilot_GetCardSize_1=we.Ka)(e,t),Tt=s._emscripten_bind_Cloudpilot_RemountCards_0=e=>(Tt=s._emscripten_bind_Cloudpilot_RemountCards_0=we.La)(e),Bt=s._emscripten_bind_Cloudpilot_GetSupportLevel_1=(e,t)=>(Bt=s._emscripten_bind_Cloudpilot_GetSupportLevel_1=we.Ma)(e,t),Ht=s._emscripten_bind_Cloudpilot_GetMountedKey_0=e=>(Ht=s._emscripten_bind_Cloudpilot_GetMountedKey_0=we.Na)(e),At=s._emscripten_bind_Cloudpilot_GetTransportIR_0=e=>(At=s._emscripten_bind_Cloudpilot_GetTransportIR_0=we.Oa)(e),Nt=s._emscripten_bind_Cloudpilot_GetTransportSerial_0=e=>(Nt=s._emscripten_bind_Cloudpilot_GetTransportSerial_0=we.Pa)(e),Lt=s._emscripten_bind_Cloudpilot___destroy___0=e=>(Lt=s._emscripten_bind_Cloudpilot___destroy___0=we.Qa)(e),Ft=s._emscripten_bind_RomInfo_RomInfo_2=(e,t)=>(Ft=s._emscripten_bind_RomInfo_RomInfo_2=we.Ra)(e,t),Ut=s._emscripten_bind_RomInfo_IsValid_0=e=>(Ut=s._emscripten_bind_RomInfo_IsValid_0=we.Sa)(e),jt=s._emscripten_bind_RomInfo_CardVersion_0=e=>(jt=s._emscripten_bind_RomInfo_CardVersion_0=we.Ta)(e),Ot=s._emscripten_bind_RomInfo_CardName_0=e=>(Ot=s._emscripten_bind_RomInfo_CardName_0=we.Ua)(e),Wt=s._emscripten_bind_RomInfo_RomVersion_0=e=>(Wt=s._emscripten_bind_RomInfo_RomVersion_0=we.Va)(e),Vt=s._emscripten_bind_RomInfo_RomVersionString_0=e=>(Vt=s._emscripten_bind_RomInfo_RomVersionString_0=we.Wa)(e),qt=s._emscripten_bind_RomInfo_Supports_1=(e,t)=>(qt=s._emscripten_bind_RomInfo_Supports_1=we.Xa)(e,t),Kt=s._emscripten_bind_RomInfo___destroy___0=e=>(Kt=s._emscripten_bind_RomInfo___destroy___0=we.Ya)(e),Qt=s._emscripten_bind_Frame_GetLineWidth_0=e=>(Qt=s._emscripten_bind_Frame_GetLineWidth_0=we.Za)(e),Zt=s._emscripten_bind_Frame_GetBpp_0=e=>(Zt=s._emscripten_bind_Frame_GetBpp_0=we._a)(e),$t=s._emscripten_bind_Frame_GetLines_0=e=>($t=s._emscripten_bind_Frame_GetLines_0=we.$a)(e),Yt=s._emscripten_bind_Frame_GetMargin_0=e=>(Yt=s._emscripten_bind_Frame_GetMargin_0=we.ab)(e),Xt=s._emscripten_bind_Frame_GetBytesPerLine_0=e=>(Xt=s._emscripten_bind_Frame_GetBytesPerLine_0=we.bb)(e),Jt=s._emscripten_bind_Frame_GetFirstDirtyLine_0=e=>(Jt=s._emscripten_bind_Frame_GetFirstDirtyLine_0=we.cb)(e),ei=s._emscripten_bind_Frame_GetLastDirtyLine_0=e=>(ei=s._emscripten_bind_Frame_GetLastDirtyLine_0=we.db)(e),ti=s._emscripten_bind_Frame_GetHasChanges_0=e=>(ti=s._emscripten_bind_Frame_GetHasChanges_0=we.eb)(e),ii=s._emscripten_bind_Frame_GetBuffer_0=e=>(ii=s._emscripten_bind_Frame_GetBuffer_0=we.fb)(e),ri=s._emscripten_bind_Frame_GetBufferSize_0=e=>(ri=s._emscripten_bind_Frame_GetBufferSize_0=we.gb)(e),ni=s._emscripten_bind_Frame_GetScaleX_0=e=>(ni=s._emscripten_bind_Frame_GetScaleX_0=we.hb)(e),oi=s._emscripten_bind_Frame_GetScaleY_0=e=>(oi=s._emscripten_bind_Frame_GetScaleY_0=we.ib)(e),si=s._emscripten_bind_Frame___destroy___0=e=>(si=s._emscripten_bind_Frame___destroy___0=we.jb)(e),ai=s._emscripten_bind_DbBackup_Init_1=(e,t)=>(ai=s._emscripten_bind_DbBackup_Init_1=we.kb)(e,t),pi=s._emscripten_bind_DbBackup_IsInProgress_0=e=>(pi=s._emscripten_bind_DbBackup_IsInProgress_0=we.lb)(e),ci=s._emscripten_bind_DbBackup_IsDone_0=e=>(ci=s._emscripten_bind_DbBackup_IsDone_0=we.mb)(e),ui=s._emscripten_bind_DbBackup_GetCurrentDatabase_0=e=>(ui=s._emscripten_bind_DbBackup_GetCurrentDatabase_0=we.nb)(e),li=s._emscripten_bind_DbBackup_Save_0=e=>(li=s._emscripten_bind_DbBackup_Save_0=we.ob)(e),di=s._emscripten_bind_DbBackup_Skip_0=e=>(di=s._emscripten_bind_DbBackup_Skip_0=we.pb)(e),hi=s._emscripten_bind_DbBackup_GetArchivePtr_0=e=>(hi=s._emscripten_bind_DbBackup_GetArchivePtr_0=we.qb)(e),_i=s._emscripten_bind_DbBackup_GetArchiveSize_0=e=>(_i=s._emscripten_bind_DbBackup_GetArchiveSize_0=we.rb)(e),mi=s._emscripten_bind_DbBackup___destroy___0=e=>(mi=s._emscripten_bind_DbBackup___destroy___0=we.sb)(e),yi=s._emscripten_bind_SuspendContextClipboardCopy_Cancel_0=e=>(yi=s._emscripten_bind_SuspendContextClipboardCopy_Cancel_0=we.tb)(e),fi=s._emscripten_bind_SuspendContextClipboardCopy_Resume_0=e=>(fi=s._emscripten_bind_SuspendContextClipboardCopy_Resume_0=we.ub)(e),vi=s._emscripten_bind_SuspendContextClipboardCopy_GetClipboardContent_0=e=>(vi=s._emscripten_bind_SuspendContextClipboardCopy_GetClipboardContent_0=we.vb)(e),gi=s._emscripten_bind_SuspendContextClipboardCopy___destroy___0=e=>(gi=s._emscripten_bind_SuspendContextClipboardCopy___destroy___0=we.wb)(e),bi=s._emscripten_bind_SuspendContextClipboardPaste_Cancel_0=e=>(bi=s._emscripten_bind_SuspendContextClipboardPaste_Cancel_0=we.xb)(e),Si=s._emscripten_bind_SuspendContextClipboardPaste_Resume_1=(e,t)=>(Si=s._emscripten_bind_SuspendContextClipboardPaste_Resume_1=we.yb)(e,t),Ci=s._emscripten_bind_SuspendContextClipboardPaste___destroy___0=e=>(Ci=s._emscripten_bind_SuspendContextClipboardPaste___destroy___0=we.zb)(e),wi=s._emscripten_bind_SuspendContextNetworkConnect_Cancel_0=e=>(wi=s._emscripten_bind_SuspendContextNetworkConnect_Cancel_0=we.Ab)(e),Ii=s._emscripten_bind_SuspendContextNetworkConnect_Resume_0=e=>(Ii=s._emscripten_bind_SuspendContextNetworkConnect_Resume_0=we.Bb)(e),Gi=s._emscripten_bind_SuspendContextNetworkConnect___destroy___0=e=>(Gi=s._emscripten_bind_SuspendContextNetworkConnect___destroy___0=we.Cb)(e),Ei=s._emscripten_bind_SuspendContextNetworkRpc_Cancel_0=e=>(Ei=s._emscripten_bind_SuspendContextNetworkRpc_Cancel_0=we.Db)(e),Di=s._emscripten_bind_SuspendContextNetworkRpc_GetRequestSize_0=e=>(Di=s._emscripten_bind_SuspendContextNetworkRpc_GetRequestSize_0=we.Eb)(e),xi=s._emscripten_bind_SuspendContextNetworkRpc_GetRequestData_0=e=>(xi=s._emscripten_bind_SuspendContextNetworkRpc_GetRequestData_0=we.Fb)(e),Pi=s._emscripten_bind_SuspendContextNetworkRpc_ReceiveResponse_2=(e,t,i)=>(Pi=s._emscripten_bind_SuspendContextNetworkRpc_ReceiveResponse_2=we.Gb)(e,t,i),ki=s._emscripten_bind_SuspendContextNetworkRpc___destroy___0=e=>(ki=s._emscripten_bind_SuspendContextNetworkRpc___destroy___0=we.Hb)(e),Mi=s._emscripten_bind_SuspendContextSerialSync_Cancel_0=e=>(Mi=s._emscripten_bind_SuspendContextSerialSync_Cancel_0=we.Ib)(e),Ri=s._emscripten_bind_SuspendContextSerialSync_Resume_0=e=>(Ri=s._emscripten_bind_SuspendContextSerialSync_Resume_0=we.Jb)(e),zi=s._emscripten_bind_SuspendContextSerialSync___destroy___0=e=>(zi=s._emscripten_bind_SuspendContextSerialSync___destroy___0=we.Kb)(e),Ti=s._emscripten_bind_SuspendContext_GetKind_0=e=>(Ti=s._emscripten_bind_SuspendContext_GetKind_0=we.Lb)(e),Bi=s._emscripten_bind_SuspendContext_Cancel_0=e=>(Bi=s._emscripten_bind_SuspendContext_Cancel_0=we.Mb)(e),Hi=s._emscripten_bind_SuspendContext_AsContextClipboardCopy_0=e=>(Hi=s._emscripten_bind_SuspendContext_AsContextClipboardCopy_0=we.Nb)(e),Ai=s._emscripten_bind_SuspendContext_AsContextClipboardPaste_0=e=>(Ai=s._emscripten_bind_SuspendContext_AsContextClipboardPaste_0=we.Ob)(e),Ni=s._emscripten_bind_SuspendContext_AsContextNetworkConnect_0=e=>(Ni=s._emscripten_bind_SuspendContext_AsContextNetworkConnect_0=we.Pb)(e),Li=s._emscripten_bind_SuspendContext_AsContextNetworkRpc_0=e=>(Li=s._emscripten_bind_SuspendContext_AsContextNetworkRpc_0=we.Qb)(e),Fi=s._emscripten_bind_SuspendContext_AsContextSerialSync_0=e=>(Fi=s._emscripten_bind_SuspendContext_AsContextSerialSync_0=we.Rb)(e),Ui=s._emscripten_bind_SuspendContext___destroy___0=e=>(Ui=s._emscripten_bind_SuspendContext___destroy___0=we.Sb)(e),ji=s._emscripten_bind_SessionImage_SessionImage_0=()=>(ji=s._emscripten_bind_SessionImage_SessionImage_0=we.Tb)(),Oi=s._emscripten_bind_SessionImage_GetDeviceId_0=e=>(Oi=s._emscripten_bind_SessionImage_GetDeviceId_0=we.Ub)(e),Wi=s._emscripten_bind_SessionImage_SetDeviceId_1=(e,t)=>(Wi=s._emscripten_bind_SessionImage_SetDeviceId_1=we.Vb)(e,t),Vi=s._emscripten_bind_SessionImage_GetRomImage_0=e=>(Vi=s._emscripten_bind_SessionImage_GetRomImage_0=we.Wb)(e),qi=s._emscripten_bind_SessionImage_GetRomImageSize_0=e=>(qi=s._emscripten_bind_SessionImage_GetRomImageSize_0=we.Xb)(e),Ki=s._emscripten_bind_SessionImage_SetRomImage_2=(e,t,i)=>(Ki=s._emscripten_bind_SessionImage_SetRomImage_2=we.Yb)(e,t,i),Qi=s._emscripten_bind_SessionImage_GetMemoryImage_0=e=>(Qi=s._emscripten_bind_SessionImage_GetMemoryImage_0=we.Zb)(e),Zi=s._emscripten_bind_SessionImage_GetMemoryImageSize_0=e=>(Zi=s._emscripten_bind_SessionImage_GetMemoryImageSize_0=we._b)(e),$i=s._emscripten_bind_SessionImage_SetMemoryImage_2=(e,t,i)=>($i=s._emscripten_bind_SessionImage_SetMemoryImage_2=we.$b)(e,t,i),Yi=s._emscripten_bind_SessionImage_GetMetadata_0=e=>(Yi=s._emscripten_bind_SessionImage_GetMetadata_0=we.ac)(e),Xi=s._emscripten_bind_SessionImage_GetMetadataSize_0=e=>(Xi=s._emscripten_bind_SessionImage_GetMetadataSize_0=we.bc)(e),Ji=s._emscripten_bind_SessionImage_SetMetadata_2=(e,t,i)=>(Ji=s._emscripten_bind_SessionImage_SetMetadata_2=we.cc)(e,t,i),er=s._emscripten_bind_SessionImage_GetSavestate_0=e=>(er=s._emscripten_bind_SessionImage_GetSavestate_0=we.dc)(e),tr=s._emscripten_bind_SessionImage_GetSavestateSize_0=e=>(tr=s._emscripten_bind_SessionImage_GetSavestateSize_0=we.ec)(e),ir=s._emscripten_bind_SessionImage_SetSavestate_2=(e,t,i)=>(ir=s._emscripten_bind_SessionImage_SetSavestate_2=we.fc)(e,t,i),rr=s._emscripten_bind_SessionImage_GetVersion_0=e=>(rr=s._emscripten_bind_SessionImage_GetVersion_0=we.gc)(e),nr=s._emscripten_bind_SessionImage_Serialize_0=e=>(nr=s._emscripten_bind_SessionImage_Serialize_0=we.hc)(e),or=s._emscripten_bind_SessionImage_GetSerializedImage_0=e=>(or=s._emscripten_bind_SessionImage_GetSerializedImage_0=we.ic)(e),sr=s._emscripten_bind_SessionImage_GetSerializedImageSize_0=e=>(sr=s._emscripten_bind_SessionImage_GetSerializedImageSize_0=we.jc)(e),ar=s._emscripten_bind_SessionImage_Deserialize_2=(e,t,i)=>(ar=s._emscripten_bind_SessionImage_Deserialize_2=we.kc)(e,t,i),pr=s._emscripten_bind_SessionImage___destroy___0=e=>(pr=s._emscripten_bind_SessionImage___destroy___0=we.lc)(e),cr=s._emscripten_bind_SkinLoader_SkinLoader_1=e=>(cr=s._emscripten_bind_SkinLoader_SkinLoader_1=we.mc)(e),ur=s._emscripten_bind_SkinLoader_GetData_0=e=>(ur=s._emscripten_bind_SkinLoader_GetData_0=we.nc)(e),lr=s._emscripten_bind_SkinLoader_GetSize_0=e=>(lr=s._emscripten_bind_SkinLoader_GetSize_0=we.oc)(e),dr=s._emscripten_bind_SkinLoader___destroy___0=e=>(dr=s._emscripten_bind_SkinLoader___destroy___0=we.pc)(e),hr=s._emscripten_bind_EmTransportSerialBuffer_RxBytesPending_0=e=>(hr=s._emscripten_bind_EmTransportSerialBuffer_RxBytesPending_0=we.qc)(e),_r=s._emscripten_bind_EmTransportSerialBuffer_Receive_0=e=>(_r=s._emscripten_bind_EmTransportSerialBuffer_Receive_0=we.rc)(e),mr=s._emscripten_bind_EmTransportSerialBuffer_Send_3=(e,t,i,r)=>(mr=s._emscripten_bind_EmTransportSerialBuffer_Send_3=we.sc)(e,t,i,r),yr=s._emscripten_bind_EmTransportSerialBuffer_IsOpen_0=e=>(yr=s._emscripten_bind_EmTransportSerialBuffer_IsOpen_0=we.tc)(e),fr=s._emscripten_bind_EmTransportSerialBuffer_Rts_0=e=>(fr=s._emscripten_bind_EmTransportSerialBuffer_Rts_0=we.uc)(e),vr=s._emscripten_bind_EmTransportSerialBuffer_Dtr_0=e=>(vr=s._emscripten_bind_EmTransportSerialBuffer_Dtr_0=we.vc)(e),gr=s._emscripten_bind_EmTransportSerialBuffer_IsBreak_0=e=>(gr=s._emscripten_bind_EmTransportSerialBuffer_IsBreak_0=we.wc)(e),br=s._emscripten_bind_EmTransportSerialBuffer_BufferSize_0=e=>(br=s._emscripten_bind_EmTransportSerialBuffer_BufferSize_0=we.xc)(e),Sr=s._emscripten_bind_EmTransportSerialBuffer_GetBaud_0=e=>(Sr=s._emscripten_bind_EmTransportSerialBuffer_GetBaud_0=we.yc)(e),Cr=s._emscripten_bind_EmTransportSerialBuffer_GetParity_0=e=>(Cr=s._emscripten_bind_EmTransportSerialBuffer_GetParity_0=we.zc)(e),wr=s._emscripten_bind_EmTransportSerialBuffer_GetStopBits_0=e=>(wr=s._emscripten_bind_EmTransportSerialBuffer_GetStopBits_0=we.Ac)(e),Ir=s._emscripten_bind_EmTransportSerialBuffer_GetDataBits_0=e=>(Ir=s._emscripten_bind_EmTransportSerialBuffer_GetDataBits_0=we.Bc)(e),Gr=s._emscripten_bind_EmTransportSerialBuffer_GetHwrHandshake_0=e=>(Gr=s._emscripten_bind_EmTransportSerialBuffer_GetHwrHandshake_0=we.Cc)(e),Er=s._emscripten_bind_EmTransportSerialBuffer_GetModeSync_0=e=>(Er=s._emscripten_bind_EmTransportSerialBuffer_GetModeSync_0=we.Dc)(e),Dr=s._emscripten_bind_EmTransportSerialBuffer_SetModeSync_1=(e,t)=>(Dr=s._emscripten_bind_EmTransportSerialBuffer_SetModeSync_1=we.Ec)(e,t),xr=s._emscripten_bind_EmTransportSerialBuffer_IsFrameComplete_0=e=>(xr=s._emscripten_bind_EmTransportSerialBuffer_IsFrameComplete_0=we.Fc)(e),Pr=s._emscripten_bind_EmTransportSerialBuffer_SetRequestTransferCallback_1=(e,t)=>(Pr=s._emscripten_bind_EmTransportSerialBuffer_SetRequestTransferCallback_1=we.Gc)(e,t),kr=s._emscripten_bind_EmTransportSerialBuffer___destroy___0=e=>(kr=s._emscripten_bind_EmTransportSerialBuffer___destroy___0=we.Hc)(e),Mr=s._emscripten_bind_GunzipContext_GunzipContext_3=(e,t,i)=>(Mr=s._emscripten_bind_GunzipContext_GunzipContext_3=we.Ic)(e,t,i),Rr=s._emscripten_bind_GunzipContext_GetState_0=e=>(Rr=s._emscripten_bind_GunzipContext_GetState_0=we.Jc)(e),zr=s._emscripten_bind_GunzipContext_Continue_0=e=>(zr=s._emscripten_bind_GunzipContext_Continue_0=we.Kc)(e),Tr=s._emscripten_bind_GunzipContext_GetUncompressedData_0=e=>(Tr=s._emscripten_bind_GunzipContext_GetUncompressedData_0=we.Lc)(e),Br=s._emscripten_bind_GunzipContext_ReleaseUncompressedData_0=e=>(Br=s._emscripten_bind_GunzipContext_ReleaseUncompressedData_0=we.Mc)(e),Hr=s._emscripten_bind_GunzipContext_GetUncompressedSize_0=e=>(Hr=s._emscripten_bind_GunzipContext_GetUncompressedSize_0=we.Nc)(e),Ar=s._emscripten_bind_GunzipContext_GetError_0=e=>(Ar=s._emscripten_bind_GunzipContext_GetError_0=we.Oc)(e),Nr=s._emscripten_bind_GunzipContext___destroy___0=e=>(Nr=s._emscripten_bind_GunzipContext___destroy___0=we.Pc)(e),Lr=s._emscripten_bind_ZipfileWalker_ZipfileWalker_2=(e,t)=>(Lr=s._emscripten_bind_ZipfileWalker_ZipfileWalker_2=we.Qc)(e,t),Fr=s._emscripten_bind_ZipfileWalker_GetState_0=e=>(Fr=s._emscripten_bind_ZipfileWalker_GetState_0=we.Rc)(e),Ur=s._emscripten_bind_ZipfileWalker_Next_0=e=>(Ur=s._emscripten_bind_ZipfileWalker_Next_0=we.Sc)(e),jr=s._emscripten_bind_ZipfileWalker_GetTotalEntries_0=e=>(jr=s._emscripten_bind_ZipfileWalker_GetTotalEntries_0=we.Tc)(e),Or=s._emscripten_bind_ZipfileWalker_GetCurrentEntrySize_0=e=>(Or=s._emscripten_bind_ZipfileWalker_GetCurrentEntrySize_0=we.Uc)(e),Wr=s._emscripten_bind_ZipfileWalker_GetCurrentEntryName_0=e=>(Wr=s._emscripten_bind_ZipfileWalker_GetCurrentEntryName_0=we.Vc)(e),Vr=s._emscripten_bind_ZipfileWalker_GetCurrentEntryContent_0=e=>(Vr=s._emscripten_bind_ZipfileWalker_GetCurrentEntryContent_0=we.Wc)(e),qr=s._emscripten_bind_ZipfileWalker___destroy___0=e=>(qr=s._emscripten_bind_ZipfileWalker___destroy___0=we.Xc)(e),Kr=(e,t)=>(Kr=we.Zc)(e,t),Qr=e=>(Qr=we._c)(e),Zr=()=>(Zr=we.$c)(),$r=()=>($r=we.ad)(),Yr=()=>(Yr=we.bd)();function Xr(){function e(){V||(V=!0,s.calledRun=!0,I||(D(),q(P),D(),q(k),i(s),s.onRuntimeInitialized?.(),Jr&&function(){var e=Ie;try{var t=e(0,0);return ae(t),t}catch(e){return ne(e)}}(),function(){if(D(),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)e=s.postRun.shift(),M.unshift(e);var e;q(M)}()))}var t;R>0||(Zr(),0==(t=$r())&&(t+=4),S[t>>2]=34821223,S[t+4>>2]=2310721022,S[0]=1668509029,function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)e=s.preRun.shift(),x.unshift(e);var e;q(x)}(),R>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>s.setStatus("")),1),e()}),1)):e(),D()))}if(s.___original_main=()=>(s.___original_main=we.cd)(),s.addFunction=(e,t)=>{var i=(e=>(W||(W=new WeakMap,((e,t)=>{if(W)for(var i=0;i<0+t;i++){var r=(o=void 0,(o=ge[n=i])||(n>=ge.length&&(ge.length=n+1),ge[n]=o=O.get(n)),o);r&&W.set(r,i)}var n,o})(0,O.length)),W.get(e)||0))(e);if(i)return i;var r=(()=>{if(be.length)return be.pop();try{O.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return O.length-1})();try{Se(r,e)}catch(i){if(!(i instanceof TypeError))throw i;var n=((e,t)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},i={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},r=1;r<e.length;++r)i.parameters.push(t[e[r]]);return i})(t),e);var i=[1];((e,t)=>{var i=e.slice(0,1),r=e.slice(1),n={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),ve(r.length,t);for(var o=0;o<r.length;++o)t.push(n[r[o]]);"v"==i?t.push(0):t.push(1,n[i])})(t,i);var r=[0,97,115,109,1,0,0,0,1];ve(i.length,r),r.push(...i),r.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var n=new WebAssembly.Module(new Uint8Array(r));return new WebAssembly.Instance(n,{e:{f:e}}).exports.f})(e,t);Se(r,n)}return W.set(e,r),r},s.UTF8ToString=Y,T=function e(){V||Xr(),V||(T=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var Jr=!0;function en(){}function tn(e){return(e||en).__cache__}function rn(e,t){var i=tn(t),r=i[e];return r||((r=Object.create((t||en).prototype)).ptr=e,i[e]=r)}s.noInitialRun&&(Jr=!1),Xr(),en.prototype=Object.create(en.prototype),en.prototype.constructor=en,en.prototype.__class__=en,en.__cache__={},s.WrapperObject=en,s.getCache=tn,s.wrapPointer=rn,s.castObject=function(e,t){return rn(e.ptr,t)},s.NULL=rn(0),s.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete tn(e.__class__)[e.ptr]},s.compare=function(e,t){return e.ptr===t.ptr},s.getPointer=function(e){return e.ptr},s.getClass=function(e){return e.__class__};var nn={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(nn.needed){for(var e=0;e<nn.temps.length;e++)s._webidl_free(nn.temps[e]);nn.temps.length=0,s._webidl_free(nn.buffer),nn.buffer=0,nn.size+=nn.needed,nn.needed=0}nn.buffer||(nn.size+=128,nn.buffer=s._webidl_malloc(nn.size),G(nn.buffer)),nn.pos=0},alloc(e,t){G(nn.buffer);var i,r=t.BYTES_PER_ELEMENT,n=e.length*r;return n=de(n,8),nn.pos+n>=nn.size?(G(n>0),nn.needed+=n,i=s._webidl_malloc(n),nn.temps.push(i)):(i=nn.buffer+nn.pos,nn.pos+=n),i},copy(e,t,i){i/=t.BYTES_PER_ELEMENT;for(var r=0;r<e.length;r++)t[i+r]=e[r]}};function on(e){if("string"==typeof e){var t=(n=fe(r=e)+1,o=new Array(n),ce(r,o,0,o.length),o),i=nn.alloc(t,v);return nn.copy(t,v,i),i}var r,n,o;return e}function sn(){throw"cannot construct a VoidPtr, no constructor in IDL"}function an(){this.ptr=Ee(),tn(an)[this.ptr]=this}function pn(e,t){e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),this.ptr=Ft(e,t),tn(pn)[this.ptr]=this}function cn(){throw"cannot construct a Frame, no constructor in IDL"}function un(){throw"cannot construct a DbBackup, no constructor in IDL"}function ln(){throw"cannot construct a SuspendContextClipboardCopy, no constructor in IDL"}function dn(){throw"cannot construct a SuspendContextClipboardPaste, no constructor in IDL"}function hn(){throw"cannot construct a SuspendContextNetworkConnect, no constructor in IDL"}function _n(){throw"cannot construct a SuspendContextNetworkRpc, no constructor in IDL"}function mn(){throw"cannot construct a SuspendContextSerialSync, no constructor in IDL"}function yn(){throw"cannot construct a SuspendContext, no constructor in IDL"}function fn(){this.ptr=ji(),tn(fn)[this.ptr]=this}function vn(e){nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),this.ptr=cr(e),tn(vn)[this.ptr]=this}function gn(){throw"cannot construct a EmTransportSerialBuffer, no constructor in IDL"}function bn(e,t,i){e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),i&&"object"==typeof i&&(i=i.ptr),this.ptr=Mr(e,t,i),tn(bn)[this.ptr]=this}function Sn(e,t){e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),this.ptr=Lr(e,t),tn(Sn)[this.ptr]=this}return sn.prototype=Object.create(en.prototype),sn.prototype.constructor=sn,sn.prototype.__class__=sn,sn.__cache__={},s.VoidPtr=sn,sn.prototype.__destroy__=sn.prototype.__destroy__=function(){var e=this.ptr;Ge(e)},an.prototype=Object.create(en.prototype),an.prototype.constructor=an,an.prototype.__class__=an,an.__cache__={},s.Cloudpilot=an,an.prototype.Malloc=an.prototype.Malloc=function(e){var t=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),rn(De(t,e),sn)},an.prototype.Free=an.prototype.Free=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),xe(t,e)},an.prototype.Nullptr=an.prototype.Nullptr=function(){var e=this.ptr;return rn(Pe(e),sn)},an.prototype.EnableLogging=an.prototype.EnableLogging=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),ke(t,e)},an.prototype.InitializeSession=an.prototype.InitializeSession=function(e,t,i){var r=this.ptr;return nn.prepare(),e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),i=i&&"object"==typeof i?i.ptr:on(i),!!Me(r,e,t,i)},an.prototype.GetCyclesPerSecond=an.prototype.GetCyclesPerSecond=function(){var e=this.ptr;return Re(e)},an.prototype.RunEmulation=an.prototype.RunEmulation=function(e){var t=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),ze(t,e)},an.prototype.SetClockFactor=an.prototype.SetClockFactor=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),Te(t,e)},an.prototype.CopyFrame=an.prototype.CopyFrame=function(){var e=this.ptr;return rn(Be(e),cn)},an.prototype.IsScreenDirty=an.prototype.IsScreenDirty=function(){var e=this.ptr;return!!He(e)},an.prototype.MarkScreenClean=an.prototype.MarkScreenClean=function(){var e=this.ptr;Ae(e)},an.prototype.MinMemoryForDevice=an.prototype.MinMemoryForDevice=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),Ne(t,e)},an.prototype.FramebufferSizeForDevice=an.prototype.FramebufferSizeForDevice=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),Le(t,e)},an.prototype.TotalMemoryForDevice=an.prototype.TotalMemoryForDevice=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),Fe(t,e)},an.prototype.QueuePenMove=an.prototype.QueuePenMove=function(e,t){var i=this.ptr;e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),Ue(i,e,t)},an.prototype.QueuePenUp=an.prototype.QueuePenUp=function(){var e=this.ptr;je(e)},an.prototype.QueueButtonDown=an.prototype.QueueButtonDown=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),Oe(t,e)},an.prototype.QueueButtonUp=an.prototype.QueueButtonUp=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),We(t,e)},an.prototype.QueueKeyboardEvent=an.prototype.QueueKeyboardEvent=function(e,t){var i=this.ptr;e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),Ve(i,e,t)},an.prototype.IsPowerOff=an.prototype.IsPowerOff=function(){var e=this.ptr;return!!qe(e)},an.prototype.IsUIInitialized=an.prototype.IsUIInitialized=function(){var e=this.ptr;return!!Ke(e)},an.prototype.GetOSVersion=an.prototype.GetOSVersion=function(){var e=this.ptr;return Qe(e)},an.prototype.IsSetupComplete=an.prototype.IsSetupComplete=function(){var e=this.ptr;return!!Ze(e)},an.prototype.Reset=an.prototype.Reset=function(){var e=this.ptr;$e(e)},an.prototype.ResetNoExtensions=an.prototype.ResetNoExtensions=function(){var e=this.ptr;Ye(e)},an.prototype.ResetHard=an.prototype.ResetHard=function(){var e=this.ptr;Xe(e)},an.prototype.InstallDb=an.prototype.InstallDb=function(e,t){var i=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),Je(i,e,t)},an.prototype.GetPalette2bitMapping=an.prototype.GetPalette2bitMapping=function(){var e=this.ptr;return et(e)},an.prototype.GetMemoryPtr=an.prototype.GetMemoryPtr=function(){var e=this.ptr;return rn(tt(e),sn)},an.prototype.GetDirtyPagesPtr=an.prototype.GetDirtyPagesPtr=function(){var e=this.ptr;return rn(it(e),sn)},an.prototype.GetMemorySize=an.prototype.GetMemorySize=function(){var e=this.ptr;return rt(e)},an.prototype.ImportMemoryImage=an.prototype.ImportMemoryImage=function(e,t){var i=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),!!nt(i,e,t)},an.prototype.GetRomPtr=an.prototype.GetRomPtr=function(){var e=this.ptr;return rn(ot(e),sn)},an.prototype.GetRomSize=an.prototype.GetRomSize=function(){var e=this.ptr;return st(e)},an.prototype.GetSavestatePtr=an.prototype.GetSavestatePtr=function(){var e=this.ptr;return rn(at(e),sn)},an.prototype.GetSavestateSize=an.prototype.GetSavestateSize=function(){var e=this.ptr;return pt(e)},an.prototype.SaveState=an.prototype.SaveState=function(){var e=this.ptr;return!!ct(e)},an.prototype.LoadState=an.prototype.LoadState=function(e,t){var i=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),!!ut(i,e,t)},an.prototype.GetHotsyncName=an.prototype.GetHotsyncName=function(){var e=this.ptr;return Y(lt(e))},an.prototype.SetHotsyncName=an.prototype.SetHotsyncName=function(e){var t=this.ptr;nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),dt(t,e)},an.prototype.RegisterPwmHandler=an.prototype.RegisterPwmHandler=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),ht(t,e)},an.prototype.StartBackup=an.prototype.StartBackup=function(){var e=this.ptr;return rn(_t(e),un)},an.prototype.SetClipboardIntegration=an.prototype.SetClipboardIntegration=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),mt(t,e)},an.prototype.GetClipboardIntegration=an.prototype.GetClipboardIntegration=function(){var e=this.ptr;return!!yt(e)},an.prototype.IsSuspended=an.prototype.IsSuspended=function(){var e=this.ptr;return!!ft(e)},an.prototype.GetSuspendContext=an.prototype.GetSuspendContext=function(){var e=this.ptr;return rn(vt(e),yn)},an.prototype.SetNetworkRedirection=an.prototype.SetNetworkRedirection=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),gt(t,e)},an.prototype.GetNetworkRedirection=an.prototype.GetNetworkRedirection=function(){var e=this.ptr;return!!bt(e)},an.prototype.RegisterProxyDisconnectHandler=an.prototype.RegisterProxyDisconnectHandler=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),St(t,e)},an.prototype.SetHotsyncNameManagement=an.prototype.SetHotsyncNameManagement=function(e){var t=this.ptr;e&&"object"==typeof e&&(e=e.ptr),Ct(t,e)},an.prototype.LaunchAppByName=an.prototype.LaunchAppByName=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),!!wt(t,e)},an.prototype.LaunchAppByDbHeader=an.prototype.LaunchAppByDbHeader=function(e,t){var i=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),!!It(i,e,t)},an.prototype.DeviceSupportsCardSize=an.prototype.DeviceSupportsCardSize=function(e){var t=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),!!Gt(t,e)},an.prototype.ClearExternalStorage=an.prototype.ClearExternalStorage=function(){var e=this.ptr;Et(e)},an.prototype.AllocateCard=an.prototype.AllocateCard=function(e,t){var i=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),t&&"object"==typeof t&&(t=t.ptr),!!Dt(i,e,t)},an.prototype.AdoptCard=an.prototype.AdoptCard=function(e,t,i){var r=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),t&&"object"==typeof t&&(t=t.ptr),i&&"object"==typeof i&&(i=i.ptr),!!xt(r,e,t,i)},an.prototype.MountCard=an.prototype.MountCard=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),!!Pt(t,e)},an.prototype.RemoveCard=an.prototype.RemoveCard=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),!!kt(t,e)},an.prototype.GetCardData=an.prototype.GetCardData=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),rn(Mt(t,e),sn)},an.prototype.GetCardDirtyPages=an.prototype.GetCardDirtyPages=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),rn(Rt(t,e),sn)},an.prototype.GetCardSize=an.prototype.GetCardSize=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),zt(t,e)},an.prototype.RemountCards=an.prototype.RemountCards=function(){var e=this.ptr;Tt(e)},an.prototype.GetSupportLevel=an.prototype.GetSupportLevel=function(e){var t=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),Bt(t,e)},an.prototype.GetMountedKey=an.prototype.GetMountedKey=function(){var e=this.ptr;return Y(Ht(e))},an.prototype.GetTransportIR=an.prototype.GetTransportIR=function(){var e=this.ptr;return rn(At(e),gn)},an.prototype.GetTransportSerial=an.prototype.GetTransportSerial=function(){var e=this.ptr;return rn(Nt(e),gn)},an.prototype.__destroy__=an.prototype.__destroy__=function(){var e=this.ptr;Lt(e)},pn.prototype=Object.create(en.prototype),pn.prototype.constructor=pn,pn.prototype.__class__=pn,pn.__cache__={},s.RomInfo=pn,pn.prototype.IsValid=pn.prototype.IsValid=function(){var e=this.ptr;return!!Ut(e)},pn.prototype.CardVersion=pn.prototype.CardVersion=function(){var e=this.ptr;return jt(e)},pn.prototype.CardName=pn.prototype.CardName=function(){var e=this.ptr;return Y(Ot(e))},pn.prototype.RomVersion=pn.prototype.RomVersion=function(){var e=this.ptr;return Wt(e)},pn.prototype.RomVersionString=pn.prototype.RomVersionString=function(){var e=this.ptr;return Y(Vt(e))},pn.prototype.Supports=pn.prototype.Supports=function(e){var t=this.ptr;return nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),!!qt(t,e)},pn.prototype.__destroy__=pn.prototype.__destroy__=function(){var e=this.ptr;Kt(e)},cn.prototype=Object.create(en.prototype),cn.prototype.constructor=cn,cn.prototype.__class__=cn,cn.__cache__={},s.Frame=cn,cn.prototype.GetLineWidth=cn.prototype.GetLineWidth=function(){var e=this.ptr;return Qt(e)},cn.prototype.GetBpp=cn.prototype.GetBpp=function(){var e=this.ptr;return Zt(e)},cn.prototype.GetLines=cn.prototype.GetLines=function(){var e=this.ptr;return $t(e)},cn.prototype.GetMargin=cn.prototype.GetMargin=function(){var e=this.ptr;return Yt(e)},cn.prototype.GetBytesPerLine=cn.prototype.GetBytesPerLine=function(){var e=this.ptr;return Xt(e)},cn.prototype.GetFirstDirtyLine=cn.prototype.GetFirstDirtyLine=function(){var e=this.ptr;return Jt(e)},cn.prototype.GetLastDirtyLine=cn.prototype.GetLastDirtyLine=function(){var e=this.ptr;return ei(e)},cn.prototype.GetHasChanges=cn.prototype.GetHasChanges=function(){var e=this.ptr;return!!ti(e)},cn.prototype.GetBuffer=cn.prototype.GetBuffer=function(){var e=this.ptr;return rn(ii(e),sn)},cn.prototype.GetBufferSize=cn.prototype.GetBufferSize=function(){var e=this.ptr;return ri(e)},cn.prototype.GetScaleX=cn.prototype.GetScaleX=function(){var e=this.ptr;return ni(e)},cn.prototype.GetScaleY=cn.prototype.GetScaleY=function(){var e=this.ptr;return oi(e)},cn.prototype.__destroy__=cn.prototype.__destroy__=function(){var e=this.ptr;si(e)},un.prototype=Object.create(en.prototype),un.prototype.constructor=un,un.prototype.__class__=un,un.__cache__={},s.DbBackup=un,un.prototype.Init=un.prototype.Init=function(e){var t=this.ptr;return e&&"object"==typeof e&&(e=e.ptr),!!ai(t,e)},un.prototype.IsInProgress=un.prototype.IsInProgress=function(){var e=this.ptr;return!!pi(e)},un.prototype.IsDone=un.prototype.IsDone=function(){var e=this.ptr;return!!ci(e)},un.prototype.GetCurrentDatabase=un.prototype.GetCurrentDatabase=function(){var e=this.ptr;return Y(ui(e))},un.prototype.Save=un.prototype.Save=function(){var e=this.ptr;return!!li(e)},un.prototype.Skip=un.prototype.Skip=function(){var e=this.ptr;di(e)},un.prototype.GetArchivePtr=un.prototype.GetArchivePtr=function(){var e=this.ptr;return rn(hi(e),sn)},un.prototype.GetArchiveSize=un.prototype.GetArchiveSize=function(){var e=this.ptr;return _i(e)},un.prototype.__destroy__=un.prototype.__destroy__=function(){var e=this.ptr;mi(e)},ln.prototype=Object.create(en.prototype),ln.prototype.constructor=ln,ln.prototype.__class__=ln,ln.__cache__={},s.SuspendContextClipboardCopy=ln,ln.prototype.Cancel=ln.prototype.Cancel=function(){var e=this.ptr;yi(e)},ln.prototype.Resume=ln.prototype.Resume=function(){var e=this.ptr;fi(e)},ln.prototype.GetClipboardContent=ln.prototype.GetClipboardContent=function(){var e=this.ptr;return Y(vi(e))},ln.prototype.__destroy__=ln.prototype.__destroy__=function(){var e=this.ptr;gi(e)},dn.prototype=Object.create(en.prototype),dn.prototype.constructor=dn,dn.prototype.__class__=dn,dn.__cache__={},s.SuspendContextClipboardPaste=dn,dn.prototype.Cancel=dn.prototype.Cancel=function(){var e=this.ptr;bi(e)},dn.prototype.Resume=dn.prototype.Resume=function(e){var t=this.ptr;nn.prepare(),e=e&&"object"==typeof e?e.ptr:on(e),Si(t,e)},dn.prototype.__destroy__=dn.prototype.__destroy__=function(){var e=this.ptr;Ci(e)},hn.prototype=Object.create(en.prototype),hn.prototype.constructor=hn,hn.prototype.__class__=hn,hn.__cache__={},s.SuspendContextNetworkConnect=hn,hn.prototype.Cancel=hn.prototype.Cancel=function(){var e=this.ptr;wi(e)},hn.prototype.Resume=hn.prototype.Resume=function(){var e=this.ptr;Ii(e)},hn.prototype.__destroy__=hn.prototype.__destroy__=function(){var e=this.ptr;Gi(e)},_n.prototype=Object.create(en.prototype),_n.prototype.constructor=_n,_n.prototype.__class__=_n,_n.__cache__={},s.SuspendContextNetworkRpc=_n,_n.prototype.Cancel=_n.prototype.Cancel=function(){var e=this.ptr;Ei(e)},_n.prototype.GetRequestSize=_n.prototype.GetRequestSize=function(){var e=this.ptr;return Di(e)},_n.prototype.GetRequestData=_n.prototype.GetRequestData=function(){var e=this.ptr;return rn(xi(e),sn)},_n.prototype.ReceiveResponse=_n.prototype.ReceiveResponse=function(e,t){var i=this.ptr;e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),Pi(i,e,t)},_n.prototype.__destroy__=_n.prototype.__destroy__=function(){var e=this.ptr;ki(e)},mn.prototype=Object.create(en.prototype),mn.prototype.constructor=mn,mn.prototype.__class__=mn,mn.__cache__={},s.SuspendContextSerialSync=mn,mn.prototype.