diff --git a/2048.html b/2048.html new file mode 100644 index 0000000..bda03cc --- /dev/null +++ b/2048.html @@ -0,0 +1,27 @@ + + + + + + 2048 + + + +
+

2048

+ +
+ +
+
+ +
+
+ + + + \ No newline at end of file diff --git a/CNAME b/CNAME index 94baae8..6fa7d87 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -tuff.speedslicer.dev \ No newline at end of file +wowinator.cloud \ No newline at end of file diff --git a/EscapeRoad.html b/EscapeRoad.html new file mode 100644 index 0000000..afc966a --- /dev/null +++ b/EscapeRoad.html @@ -0,0 +1,65 @@ + + + + + + Escape Road + + + +
+

Escape Road

+ +
+ +
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/Iframes/BalatroIframe.html b/Iframes/BalatroIframe.html new file mode 100644 index 0000000..5224ab7 --- /dev/null +++ b/Iframes/BalatroIframe.html @@ -0,0 +1,137 @@ + + + + + Balatro + + + + + + + + + + + +
+
+ + + +
+
+ + + + + + + + \ No newline at end of file diff --git a/Iframes/EscapeRoadIframe.html b/Iframes/EscapeRoadIframe.html new file mode 100644 index 0000000..b11efb9 --- /dev/null +++ b/Iframes/EscapeRoadIframe.html @@ -0,0 +1,687 @@ + + + + + + + + + + + + + + + + + + + + + + + Escape-Road + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

_

+ + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KourIO/.vscode/settings.json b/KourIO/.vscode/settings.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/KourIO/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/KourIO/Build/2d9db7026726a733131f8f6d9ac1616a.loader-edit.js b/KourIO/Build/2d9db7026726a733131f8f6d9ac1616a.loader-edit.js new file mode 100644 index 0000000..60aebb8 --- /dev/null +++ b/KourIO/Build/2d9db7026726a733131f8f6d9ac1616a.loader-edit.js @@ -0,0 +1 @@ +function createUnityInstance(r,t,l){function d(e,r){if(!d.aborted&&t.showBanner)return"error"==r&&(d.aborted=!0),t.showBanner(e,r);switch(r){case"error":console.error(e);break;case"warning":console.warn(e);break;default:console.log(e)}}function n(e){var r=e.reason||e.error,t=r?r.toString():e.message||e.reason||"",n=r&&r.stack?r.stack.toString():"";(t+="\n"+(n=n.startsWith(t)?n.substring(t.length):n).trim())&&g.stackTraceRegExp&&g.stackTraceRegExp.test(t)&&f(t,e.filename||r&&(r.fileName||r.sourceURL)||"",e.lineno||r&&(r.lineNumber||r.line)||0)}function e(e,r,t){var n=e[r];void 0!==n&&n||(console.warn('Config option "'+r+'" is missing or empty. Falling back to default value: "'+t+'". Consider updating your WebGL template to include the missing config option.'),e[r]=t)}l=l||function(){};var o,g={canvas:r,webglContextAttributes:{preserveDrawingBuffer:!1,powerPreference:2},wasmFileSize:55300843,streamingAssetsUrl:"StreamingAssets",downloadProgress:{},deinitializers:[],intervals:{},setInterval:function(e,r){e=window.setInterval(e,r);return this.intervals[e]=!0,e},clearInterval:function(e){delete this.intervals[e],window.clearInterval(e)},preRun:[],postRun:[],print:function(e){console.log(e)},printErr:function(e){console.error(e),"string"==typeof e&&-1!=e.indexOf("wasm streaming compile failed")&&(-1!=e.toLowerCase().indexOf("mime")?d('HTTP Response Header "Content-Type" configured incorrectly on the server for file '+g.codeUrl+' , should be "application/wasm". Startup time performance will suffer.',"warning"):d('WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file '+g.codeUrl+", but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration.","warning"))},locateFile:function(e){return"build.wasm"==e?this.codeUrl:e},disabledCanvasEvents:["contextmenu","dragstart"]};for(o in e(t,"companyName","Unity"),e(t,"productName","WebGL Player"),e(t,"productVersion","1.0"),t)g[o]=t[o];g.streamingAssetsUrl=new URL(g.streamingAssetsUrl,window.location.href).href;var i=g.disabledCanvasEvents.slice();function a(e){e.preventDefault()}i.forEach(function(e){r.addEventListener(e,a)}),window.addEventListener("error",n),window.addEventListener("unhandledrejection",n);var s="",u="";function c(e){document.webkitCurrentFullScreenElement===r?r.style.width&&(s=r.style.width,u=r.style.height,r.style.width="100%",r.style.height="100%"):s&&(r.style.width=s,r.style.height=u,u=s="")}document.addEventListener("webkitfullscreenchange",c),g.deinitializers.push(function(){for(var e in g.disableAccessToMediaDevices(),i.forEach(function(e){r.removeEventListener(e,a)}),window.removeEventListener("error",n),window.removeEventListener("unhandledrejection",n),document.removeEventListener("webkitfullscreenchange",c),g.intervals)window.clearInterval(e);g.intervals={}}),g.QuitCleanup=function(){for(var e=0;e>>0,r=4+e,t=4+r,n=8+t,o=8+n,i=4+o,a=4+i,s=8+a,l=8+s,d=4+l,u=4+d,c=4+u;return{totalWASMHeapSize:g.HEAPU32[e>>2],usedWASMHeapSize:g.HEAPU32[r>>2],totalJSHeapSize:g.HEAPF64[t>>3],usedJSHeapSize:g.HEAPF64[n>>3],pageLoadTime:g.HEAPU32[o>>2],pageLoadTimeToFrame1:g.HEAPU32[i>>2],fps:g.HEAPF64[a>>3],movingAverageFps:g.HEAPF64[s>>3],assetLoadTime:g.HEAPU32[l>>2],webAssemblyStartupTime:g.HEAPU32[d>>2]-(g.webAssemblyTimeStart||0),codeDownloadTime:g.HEAPU32[u>>2],gameStartupTime:g.HEAPU32[c>>2],numJankedFrames:g.HEAPU32[4+c>>2]}}};function f(e,r,t){-1==e.indexOf("fullscreen error")&&(g.startupErrorHandler?g.startupErrorHandler(e,r,t):g.errorHandler&&g.errorHandler(e,r,t)||(console.log("Invoking error handler due to\n"+e),"function"==typeof dump&&dump("Invoking error handler due to\n"+e),f.didShowErrorMessage||(-1!=(e="An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:\n"+e).indexOf("DISABLE_EXCEPTION_CATCHING")?e="An exception has occurred, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project WebGL player settings to be able to catch the exception or see the stack trace.":-1!=e.indexOf("Cannot enlarge memory arrays")?e="Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings.":-1==e.indexOf("Invalid array buffer length")&&-1==e.indexOf("Invalid typed array length")&&-1==e.indexOf("out of memory")&&-1==e.indexOf("could not allocate memory")||(e="The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."),alert(e),f.didShowErrorMessage=!0)))}function m(e,r){if("symbolsUrl"!=e){var t=g.downloadProgress[e],n=(t=t||(g.downloadProgress[e]={started:!1,finished:!1,lengthComputable:!1,total:0,loaded:0}),"object"!=typeof r||"progress"!=r.type&&"load"!=r.type||(t.started||(t.started=!0,t.lengthComputable=r.lengthComputable),t.total=r.total,t.loaded=r.loaded,"load"==r.type&&(t.finished=!0)),0),o=0,i=0,a=0,s=0;for(e in g.downloadProgress){if(!(t=g.downloadProgress[e]).started)return;i++,t.lengthComputable?(n+=t.loaded,o+=t.total,a++):t.finished||s++}l(.9*(i?(i-s-(o?a*(o-n)/o:0))/i:0))}}g.SystemInfo=function(){var e,r,t,n,o,i=navigator.userAgent+" ",a=[["Firefox","Firefox"],["OPR","Opera"],["Edg","Edge"],["SamsungBrowser","Samsung Browser"],["Trident","Internet Explorer"],["MSIE","Internet Explorer"],["Chrome","Chrome"],["CriOS","Chrome on iOS Safari"],["FxiOS","Firefox on iOS Safari"],["Safari","Safari"]];function s(e,r,t){return(e=RegExp(e,"i").exec(r))&&e[t]}for(var l=0;le.length||31!=e[0]||139!=e[1])return!1;var n=e[3];if(4&n){if(r+2>e.length)return!1;if((r+=2+e[r]+(e[r+1]<<8))>e.length)return!1}if(8&n){for(;re.length)return!1;r++}return 16&n&&String.fromCharCode.apply(null,e.subarray(r,r+t.length+1))==t+"\0"}},br:{hasUnityMarker:function(e){var r="UnityWeb Compressed Content (brotli)";if(!e.length)return!1;var t=1&e[0]?14&e[0]?4:7:1,n=e[0]&(1<>3);if(commentOffset=1+t+2+1+2+(o<<3)+7>>3,17==n||commentOffset>e.length)return!1;for(var i=n+(6+(o<<4)+(r.length-1<<6)<>>=8)if(e[a]!=(255&i))return!1;return String.fromCharCode.apply(null,e.subarray(commentOffset,commentOffset+r.length))==r}}};function p(){var r,e,s,t,n=performance.now(),p=(new Promise(function(i,e){var a=document.createElement("script");a.src="blob.js",a.onload=function(){if("undefined"==typeof unityFramework||!unityFramework){var e,r=[["br","br"],["gz","gzip"]];for(e in r){var t,n=r[e];if(g.frameworkUrl.endsWith("."+n[0]))return t="Unable to parse "+g.frameworkUrl+"!","file:"==location.protocol?void d(t+" Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option.","error"):(t+=' This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: '+n[1]+'" present. Check browser Console and Devtools Network tab to debug.',"br"==n[0]&&"http:"==location.protocol&&(n=-1!=["localhost","127.0.0.1"].indexOf(location.hostname)?"":"Migrate your server to use HTTPS.",t=/Firefox/.test(navigator.userAgent)?"Unable to parse "+g.frameworkUrl+'!
If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported in Firefox over HTTP connections. '+n+' See https://bugzilla.mozilla.org/show_bug.cgi?id=1670675 for more information.':"Unable to parse "+g.frameworkUrl+'!
If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported over HTTP connections. Migrate your server to use HTTPS.'),void d(t,"error"))}d("Unable to parse "+g.frameworkUrl+"! The file is corrupt, or compression was misconfigured? (check Content-Encoding HTTP Response Header on web server)","error")}var o=unityFramework;unityFramework=null,a.onload=null,i(o)},a.onerror=function(e){d("Unable to load file "+g.frameworkUrl+"! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug)","error")},document.body.appendChild(a),g.deinitializers.push(function(){document.body.removeChild(a)})}).then(function(e){g.webAssemblyTimeStart=performance.now(),e(g),g.codeDownloadTimeEnd=performance.now()-n}),performance.now()),o=(m(r="dataUrl"),e=g.fetchWithProgress,s=g[r],t=/file:\/\//.exec(s)?"same-origin":void 0,e(g[r],{method:"GET",companyName:g.companyName,productName:g.productName,productVersion:g.productVersion,control:"no-store",mode:t,onProgress:function(e){m(r,e)}}).then(function(e){var r,t,n,o,i,a;return b.gzip.hasUnityMarker(e.parsedBody)&&(r=["gzip","gzip"]),(r=b.br.hasUnityMarker(e.parsedBody)?["brotli","br"]:r)&&(t=e.headers.get("Content-Type"),n=e.headers.get("Content-Encoding"),i=0<(o=e.headers.get("Content-Length"))&&e.parsedBody.length!=o,a=0>>0;return t+=4,e}function o(e){if(b.gzip.hasUnityMarker(r))throw e+'. Failed to parse binary data file, because it is still gzip-compressed and should have been uncompressed by the browser. Web server has likely provided gzip-compressed data without specifying the HTTP Response Header "Content-Encoding: gzip" with it to instruct the browser to decompress it. Please verify your web server hosting configuration.';if(b.br.hasUnityMarker(r))throw e+'. Failed to parse binary data file, because it is still brotli-compressed and should have been uncompressed by the browser. Web server has likely provided brotli-compressed data without specifying the HTTP Response Header "Content-Encoding: br" with it to instruct the browser to decompress it. Please verify your web server hosting configuration.';throw e}var i="UnityWebData1.0\0",a=e.decode(r.subarray(0,i.length)),s=(a!=i&&o('Unknown data format (id="'+a+'")'),t+=i.length,n());for(t+s>r.length&&o("Invalid binary data file header! (pos="+t+", headerSize="+s+", file length="+r.length+")");tr.length&&o("Invalid binary data file size! (offset="+l+", size="+d+", file length="+r.length+")"),n()),c=(t+u>r.length&&o("Invalid binary data file path name! (pos="+t+", length="+u+", file length="+r.length+")"),e.decode(r.subarray(t,t+u)));t+=u;for(var h=0,f=c.indexOf("/",h)+1;0 { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + + return (function(unityFramework={}) { + + var Module = typeof unityFramework != "undefined" ? unityFramework : {}; + var readyPromiseResolve, readyPromiseReject; + Module["ready"] = new Promise( (resolve, reject) => { + readyPromiseResolve = resolve; + readyPromiseReject = reject + } + ); + var stackTraceReference = "(^|\\n)(\\s+at\\s+|)jsStackTrace(\\s+\\(|@)([^\\n]+):\\d+:\\d+(\\)|)(\\n|$)"; + var stackTraceReferenceMatch = jsStackTrace().match(new RegExp(stackTraceReference)); + if (stackTraceReferenceMatch) + Module.stackTraceRegExp = new RegExp(stackTraceReference.replace("([^\\n]+)", stackTraceReferenceMatch[4].replace(/[\\^${}[\]().*+?|]/g, "\\$&")).replace("jsStackTrace", "[^\\n]+")); + var abort = function(what) { + if (ABORT) + return; + ABORT = true; + EXITSTATUS = 1; + if (typeof ENVIRONMENT_IS_PTHREAD !== "undefined" && ENVIRONMENT_IS_PTHREAD) + console.error("Pthread aborting at " + (new Error).stack); + if (what !== undefined) { + out(what); + err(what); + what = what instanceof Error ? what.toString() : JSON.stringify(what) + } else { + what = "" + } + var message = "abort(" + what + ") at " + stackTrace(); + if (Module.abortHandler && Module.abortHandler(message)) + return; + throw message + }; + Module["SetFullscreen"] = function(fullscreen) { + if (typeof runtimeInitialized === "undefined" || !runtimeInitialized) { + console.log("Runtime not initialized yet.") + } else if (typeof JSEvents === "undefined") { + console.log("Player not loaded yet.") + } else { + var tmp = JSEvents.canPerformEventHandlerRequests; + JSEvents.canPerformEventHandlerRequests = function() { + return 1 + } + ; + Module.ccall("SetFullscreen", null, ["number"], [fullscreen]); + JSEvents.canPerformEventHandlerRequests = tmp + } + } + ; + if (!Module["ENVIRONMENT_IS_PTHREAD"]) { + Module["preRun"].push(function() { + function injectIndexedDBToAutomaticallyPersist() { + IDBFS.queuePersist = function(mount) { + function onPersistComplete() { + if (mount.idbPersistState === "again") + startPersist(); + else + mount.idbPersistState = 0 + } + function startPersist() { + mount.idbPersistState = "idb"; + IDBFS.syncfs(mount, false, onPersistComplete) + } + if (!mount.idbPersistState) { + mount.idbPersistState = setTimeout(startPersist, 0) + } else if (mount.idbPersistState === "idb") { + mount.idbPersistState = "again" + } + } + ; + IDBFS.mount = function(mount) { + var mnt = MEMFS.mount(mount); + if (typeof mount !== "undefined" && mount.opts && mount.opts.autoPersist) { + mnt.idbPersistState = 0; + var memfs_node_ops = mnt.node_ops; + mnt.node_ops = Object.assign({}, mnt.node_ops); + mnt.node_ops.mknod = function(parent, name, mode, dev) { + var node = memfs_node_ops.mknod(parent, name, mode, dev); + node.node_ops = mnt.node_ops; + node.idbfs_mount = mnt.mount; + node.memfs_stream_ops = node.stream_ops; + node.stream_ops = Object.assign({}, node.stream_ops); + node.stream_ops.write = function(stream, buffer, offset, length, position, canOwn) { + stream.node.isModified = true; + return node.memfs_stream_ops.write(stream, buffer, offset, length, position, canOwn) + } + ; + node.stream_ops.close = function(stream) { + var n = stream.node; + if (n.isModified) { + IDBFS.queuePersist(n.idbfs_mount); + n.isModified = false + } + if (n.memfs_stream_ops.close) + return n.memfs_stream_ops.close(stream) + } + ; + return node + } + ; + mnt.node_ops.rmdir = function(path) { + IDBFS.queuePersist(mnt.mount); + return memfs_node_ops.rmdir(path) + } + ; + mnt.node_ops.unlink = function(path) { + IDBFS.queuePersist(mnt.mount); + return memfs_node_ops.unlink(path) + } + ; + mnt.node_ops.mkdir = function(path, mode) { + IDBFS.queuePersist(mnt.mount); + return memfs_node_ops.mkdir(path, mode) + } + ; + mnt.node_ops.symlink = function(parent, newname, oldpath) { + IDBFS.queuePersist(mnt.mount); + return memfs_node_ops.symlink(parent, newname, oldpath) + } + ; + mnt.node_ops.rename = function(old_node, new_dir, new_name) { + IDBFS.queuePersist(mnt.mount); + return memfs_node_ops.rename(old_node, new_dir, new_name) + } + } + return mnt + } + } + injectIndexedDBToAutomaticallyPersist(); + var unityFileSystemInit = Module["unityFileSystemInit"] || function() { + FS.mkdir("/idbfs"); + Module.__unityIdbfsMount = FS.mount(IDBFS, { + autoPersist: !!Module["autoSyncPersistentDataPath"] + }, "/idbfs"); + Module.addRunDependency("JS_FileSystem_Mount"); + FS.syncfs(true, function(err) { + if (err) + console.log("IndexedDB is not available. Data will not persist in cache and PlayerPrefs will not be saved."); + Module.removeRunDependency("JS_FileSystem_Mount") + }) + } + ; + unityFileSystemInit() + }) + } + var videoInputDevices = []; + var videoInputDevicesSuccessfullyEnumerated = false; + function matchToOldDevice(newDevice) { + var oldDevices = Object.keys(videoInputDevices); + for (var i = 0; i < oldDevices.length; ++i) { + var old = videoInputDevices[oldDevices[i]]; + if (old.deviceId && old.deviceId == newDevice.deviceId) + return old + } + for (var i = 0; i < oldDevices.length; ++i) { + var old = videoInputDevices[oldDevices[i]]; + if (old == newDevice) + return old + } + for (var i = 0; i < oldDevices.length; ++i) { + var old = videoInputDevices[oldDevices[i]]; + if (old.label && old.label == newDevice.label) + return old + } + for (var i = 0; i < oldDevices.length; ++i) { + var old = videoInputDevices[oldDevices[i]]; + if (old.groupId && old.kind && old.groupId == newDevice.groupId && old.kind == newDevice.kind) + return old + } + } + function assignNewVideoInputId() { + for (var i = 0; ; ++i) { + if (!videoInputDevices[i]) + return i + } + } + function updateVideoInputDevices(devices) { + videoInputDevicesSuccessfullyEnumerated = true; + videoInputDevices = []; + var retainedDevices = {}; + var newDevices = []; + devices.forEach(function(device) { + if (device.kind === "videoinput") { + var oldDevice = matchToOldDevice(device); + if (oldDevice) { + retainedDevices[oldDevice.id] = oldDevice + } else { + newDevices.push(device) + } + } + }); + videoInputDevices = retainedDevices; + newDevices.forEach(function(device) { + if (!device.id) { + device.id = assignNewVideoInputId(); + device.name = device.label || "Video input #" + (device.id + 1); + device.isFrontFacing = device.name.toLowerCase().includes("front") || !device.name.toLowerCase().includes("front") && !device.name.toLowerCase().includes("back"); + videoInputDevices[device.id] = device + } + }) + } + var mediaDevicesRunDependencyPending = true; + function removeEnumerateMediaDevicesRunDependency() { + if (!mediaDevicesRunDependencyPending) + return; + mediaDevicesRunDependencyPending = false; + try { + removeRunDependency("enumerateMediaDevices") + } catch (e) { + Module.startupErrorHandler(e) + } + } + function enumerateMediaDeviceList() { + if (!videoInputDevices) + return; + navigator.mediaDevices.enumerateDevices().then(function(devices) { + updateVideoInputDevices(devices); + removeEnumerateMediaDevicesRunDependency() + }).catch(function(e) { + console.warn("Unable to enumerate media devices: " + e + "\nWebcams will not be available."); + disableAccessToMediaDevices() + }); + if (/Firefox/.test(navigator.userAgent)) { + setTimeout(enumerateMediaDeviceList, 6e4); + warnOnce("Applying workaround to Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1397977") + } + } + function disableAccessToMediaDevices() { + if (navigator.mediaDevices && navigator.mediaDevices.removeEventListener) { + navigator.mediaDevices.removeEventListener("devicechange", enumerateMediaDeviceList) + } + videoInputDevices = null + } + Module["disableAccessToMediaDevices"] = disableAccessToMediaDevices; + if (!Module["ENVIRONMENT_IS_PTHREAD"]) { + if (!navigator.mediaDevices) { + console.warn("navigator.mediaDevices not supported by this browser. Webcam access will not be available." + (location.protocol == "https:" ? "" : " Try hosting the page over HTTPS, because some browsers disable webcam access when insecure HTTP is being used.")); + disableAccessToMediaDevices() + } else + setTimeout(function() { + try { + addRunDependency("enumerateMediaDevices"); + enumerateMediaDeviceList(); + navigator.mediaDevices.addEventListener("devicechange", enumerateMediaDeviceList); + setTimeout(removeEnumerateMediaDevicesRunDependency, 1e3) + } catch (e) { + console.warn("Unable to enumerate media devices: " + e); + disableAccessToMediaDevices() + } + }, 0) + } + function SendMessage(gameObject, func, param) { + var func_cstr = stringToNewUTF8(func); + var gameObject_cstr = stringToNewUTF8(gameObject); + var param_cstr = 0; + try { + if (param === undefined) + _SendMessage(gameObject_cstr, func_cstr); + else if (typeof param === "string") { + param_cstr = stringToNewUTF8(param); + _SendMessageString(gameObject_cstr, func_cstr, param_cstr) + } else if (typeof param === "number") + _SendMessageFloat(gameObject_cstr, func_cstr, param); + else + throw "" + param + " is does not have a type which is supported by SendMessage." + } finally { + _free(param_cstr); + _free(gameObject_cstr); + _free(func_cstr) + } + } + Module["SendMessage"] = SendMessage; + var _resolvePlayerIsInitialized; + var _playerIsInitializedPromise = new Promise(function(resolve) { + _resolvePlayerIsInitialized = resolve + } + ); + function _WaitForInitialization() { + return _playerIsInitializedPromise + } + Module["WebPlayer"] = { + PlayerIsInitialized: _resolvePlayerIsInitialized, + WaitForInitialization: _WaitForInitialization + }; + var moduleOverrides = Object.assign({}, Module); + var arguments_ = []; + var thisProgram = "./this.program"; + var quit_ = (status, toThrow) => { + throw toThrow + } + ; + var ENVIRONMENT_IS_WEB = true; + var ENVIRONMENT_IS_WORKER = false; + var ENVIRONMENT_IS_NODE = false; + var scriptDirectory = ""; + function locateFile(path) { + if (Module["locateFile"]) { + return Module["locateFile"](path, scriptDirectory) + } + return scriptDirectory + path + } + var read_, readAsync, readBinary, setWindowTitle; + if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = self.location.href + } else if (typeof document != "undefined" && document.currentScript) { + scriptDirectory = document.currentScript.src + } + if (_scriptDir) { + scriptDirectory = _scriptDir + } + if (scriptDirectory.indexOf("blob:") !== 0) { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1) + } else { + scriptDirectory = "" + } + { + read_ = url => { + var xhr = new XMLHttpRequest; + xhr.open("GET", url, false); + xhr.send(null); + return xhr.responseText + } + ; + if (ENVIRONMENT_IS_WORKER) { + readBinary = url => { + var xhr = new XMLHttpRequest; + xhr.open("GET", url, false); + xhr.responseType = "arraybuffer"; + xhr.send(null); + return new Uint8Array(xhr.response) + } + } + readAsync = (url, onload, onerror) => { + var xhr = new XMLHttpRequest; + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; + xhr.onload = () => { + if (xhr.status == 200 || xhr.status == 0 && xhr.response) { + onload(xhr.response); + return + } + onerror() + } + ; + xhr.onerror = onerror; + xhr.send(null) + } + } + setWindowTitle = title => document.title = title + } else {} + var out = Module["print"] || console.log.bind(console); + var err = Module["printErr"] || console.error.bind(console); + Object.assign(Module, moduleOverrides); + moduleOverrides = null; + if (Module["arguments"]) + arguments_ = Module["arguments"]; + if (Module["thisProgram"]) + thisProgram = Module["thisProgram"]; + if (Module["quit"]) + quit_ = Module["quit"]; + var wasmBinary; + if (Module["wasmBinary"]) + wasmBinary = Module["wasmBinary"]; + var noExitRuntime = Module["noExitRuntime"] || true; + if (typeof WebAssembly != "object") { + abort("no native wasm support detected") + } + var wasmMemory; + var ABORT = false; + var EXITSTATUS; + function assert(condition, text) { + if (!condition) { + abort(text) + } + } + var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; + function updateMemoryViews() { + var b = wasmMemory.buffer; + Module["HEAP8"] = HEAP8 = new Int8Array(b); + Module["HEAP16"] = HEAP16 = new Int16Array(b); + Module["HEAP32"] = HEAP32 = new Int32Array(b); + Module["HEAPU8"] = HEAPU8 = new Uint8Array(b); + Module["HEAPU16"] = HEAPU16 = new Uint16Array(b); + Module["HEAPU32"] = HEAPU32 = new Uint32Array(b); + Module["HEAPF32"] = HEAPF32 = new Float32Array(b); + Module["HEAPF64"] = HEAPF64 = new Float64Array(b) + } + var wasmTable; + var __ATPRERUN__ = []; + var __ATINIT__ = []; + var __ATMAIN__ = []; + var __ATEXIT__ = []; + var __ATPOSTRUN__ = []; + var runtimeInitialized = false; + var runtimeKeepaliveCounter = 0; + function keepRuntimeAlive() { + return noExitRuntime || runtimeKeepaliveCounter > 0 + } + function preRun() { + if (Module["preRun"]) { + if (typeof Module["preRun"] == "function") + Module["preRun"] = [Module["preRun"]]; + while (Module["preRun"].length) { + addOnPreRun(Module["preRun"].shift()) + } + } + callRuntimeCallbacks(__ATPRERUN__) + } + function initRuntime() { + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) + FS.init(); + FS.ignorePermissions = false; + TTY.init(); + SOCKFS.root = FS.mount(SOCKFS, {}, null); + PIPEFS.root = FS.mount(PIPEFS, {}, null); + callRuntimeCallbacks(__ATINIT__) + } + function preMain() { + callRuntimeCallbacks(__ATMAIN__) + } + function postRun() { + if (Module["postRun"]) { + if (typeof Module["postRun"] == "function") + Module["postRun"] = [Module["postRun"]]; + while (Module["postRun"].length) { + addOnPostRun(Module["postRun"].shift()) + } + } + callRuntimeCallbacks(__ATPOSTRUN__) + } + function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb) + } + function addOnInit(cb) { + __ATINIT__.unshift(cb) + } + function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb) + } + var runDependencies = 0; + var runDependencyWatcher = null; + var dependenciesFulfilled = null; + function getUniqueRunDependency(id) { + return id + } + function addRunDependency(id) { + runDependencies++; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies) + } + } + function removeRunDependency(id) { + runDependencies--; + if (Module["monitorRunDependencies"]) { + Module["monitorRunDependencies"](runDependencies) + } + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback() + } + } + } + function abort(what) { + if (Module["onAbort"]) { + Module["onAbort"](what) + } + what = "Aborted(" + what + ")"; + err(what); + ABORT = true; + EXITSTATUS = 1; + what += ". Build with -sASSERTIONS for more info."; + var e = new WebAssembly.RuntimeError(what); + readyPromiseReject(e); + throw e + } + var dataURIPrefix = "data:application/octet-stream;base64,"; + function isDataURI(filename) { + return filename.startsWith(dataURIPrefix) + } + var wasmBinaryFile; + wasmBinaryFile = "build.wasm"; + if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile) + } + function getBinary(file) { + try { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary) + } + if (readBinary) { + return readBinary(file) + } + throw "both async and sync fetching of the wasm failed" + } catch (err) { + abort(err) + } + } + function getBinaryPromise(binaryFile) { + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch == "function") { + return fetch(binaryFile, { + credentials: "same-origin" + }).then(response => { + if (!response["ok"]) { + throw "failed to load wasm binary file at '" + binaryFile + "'" + } + return response["arrayBuffer"]() + } + ).catch( () => getBinary(binaryFile)) + } + } + return Promise.resolve().then( () => getBinary(binaryFile)) + } + function instantiateArrayBuffer(binaryFile, imports, receiver) { + return getBinaryPromise(binaryFile).then(binary => { + return WebAssembly.instantiate(binary, imports) + } + ).then(instance => { + return instance + } + ).then(receiver, reason => { + err("failed to asynchronously prepare wasm: " + reason); + abort(reason) + } + ) + } + function instantiateAsync(binary, binaryFile, imports, callback) { + if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) && typeof fetch == "function") { + return fetch(binaryFile, { + credentials: "same-origin" + }).then(response => { + var result = WebAssembly.instantiateStreaming(response, imports); + return result.then(callback, function(reason) { + err("wasm streaming compile failed: " + reason); + err("falling back to ArrayBuffer instantiation"); + return instantiateArrayBuffer(binaryFile, imports, callback) + }) + } + ) + } else { + return instantiateArrayBuffer(binaryFile, imports, callback) + } + } + function createWasm() { + var info = { + "env": wasmImports, + "wasi_snapshot_preview1": wasmImports + }; + function receiveInstance(instance, module) { + var exports = instance.exports; + Module["asm"] = exports; + wasmMemory = Module["asm"]["memory"]; + updateMemoryViews(); + wasmTable = Module["asm"]["__indirect_function_table"]; + addOnInit(Module["asm"]["__wasm_call_ctors"]); + removeRunDependency("wasm-instantiate"); + return exports + } + addRunDependency("wasm-instantiate"); + function receiveInstantiationResult(result) { + receiveInstance(result["instance"]) + } + if (Module["instantiateWasm"]) { + try { + return Module["instantiateWasm"](info, receiveInstance) + } catch (e) { + err("Module.instantiateWasm callback failed with error: " + e); + readyPromiseReject(e) + } + } + instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult).catch(readyPromiseReject); + return {} + } + var tempDouble; + var tempI64; + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status + } + function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + callbacks.shift()(Module) + } + } + function dynCallLegacy(sig, ptr, args) { + var f = Module["dynCall_" + sig]; + return args && args.length ? f.apply(null, [ptr].concat(args)) : f.call(null, ptr) + } + var wasmTableMirror = []; + function _GetJSLoadTimeInfo(loadTimePtr) { + loadTimePtr = loadTimePtr >> 2; + HEAPU32[loadTimePtr] = Module.pageStartupTime || 0; + HEAPU32[loadTimePtr + 1] = Module.dataUrlLoadEndTime || 0; + HEAPU32[loadTimePtr + 2] = Module.codeDownloadTimeEnd || 0 + } + function _GetJSMemoryInfo(totalJSptr, usedJSptr) { + totalJSptr = totalJSptr >> 3; + usedJSptr = usedJSptr >> 3; + if (performance.memory) { + HEAPF64[totalJSptr] = performance.memory.totalJSHeapSize; + HEAPF64[usedJSptr] = performance.memory.usedJSHeapSize + } else { + HEAPF64[totalJSptr] = NaN; + HEAPF64[usedJSptr] = NaN + } + } + var JS_Accelerometer = null; + var JS_Accelerometer_callback = 0; + function _JS_Accelerometer_IsRunning() { + return JS_Accelerometer && JS_Accelerometer.activated || JS_Accelerometer_callback != 0 + } + var JS_Accelerometer_multiplier = 1; + var JS_Accelerometer_lastValue = { + x: 0, + y: 0, + z: 0 + }; + function JS_Accelerometer_eventHandler() { + JS_Accelerometer_lastValue = { + x: JS_Accelerometer.x * JS_Accelerometer_multiplier, + y: JS_Accelerometer.y * JS_Accelerometer_multiplier, + z: JS_Accelerometer.z * JS_Accelerometer_multiplier + }; + if (JS_Accelerometer_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_Accelerometer_callback, a1, a2, a3]))(JS_Accelerometer_lastValue.x, JS_Accelerometer_lastValue.y, JS_Accelerometer_lastValue.z) + } + var JS_Accelerometer_frequencyRequest = 0; + var JS_Accelerometer_frequency = 0; + var JS_LinearAccelerationSensor_callback = 0; + var JS_GravitySensor_callback = 0; + var JS_Gyroscope_callback = 0; + function JS_ComputeGravity(accelerometerValue, linearAccelerationValue) { + var difference = { + x: accelerometerValue.x - linearAccelerationValue.x, + y: accelerometerValue.y - linearAccelerationValue.y, + z: accelerometerValue.z - linearAccelerationValue.z + }; + var differenceMagnitudeSq = difference.x * difference.x + difference.y * difference.y + difference.z * difference.z; + var sum = { + x: accelerometerValue.x + linearAccelerationValue.x, + y: accelerometerValue.y + linearAccelerationValue.y, + z: accelerometerValue.z + linearAccelerationValue.z + }; + var sumMagnitudeSq = sum.x * sum.x + sum.y * sum.y + sum.z * sum.z; + return differenceMagnitudeSq <= sumMagnitudeSq ? difference : sum + } + function JS_DeviceMotion_eventHandler(event) { + var accelerometerValue = { + x: event.accelerationIncludingGravity.x * JS_Accelerometer_multiplier, + y: event.accelerationIncludingGravity.y * JS_Accelerometer_multiplier, + z: event.accelerationIncludingGravity.z * JS_Accelerometer_multiplier + }; + if (JS_Accelerometer_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_Accelerometer_callback, a1, a2, a3]))(accelerometerValue.x, accelerometerValue.y, accelerometerValue.z); + var linearAccelerationValue = { + x: event.acceleration.x * JS_Accelerometer_multiplier, + y: event.acceleration.y * JS_Accelerometer_multiplier, + z: event.acceleration.z * JS_Accelerometer_multiplier + }; + if (JS_LinearAccelerationSensor_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_LinearAccelerationSensor_callback, a1, a2, a3]))(linearAccelerationValue.x, linearAccelerationValue.y, linearAccelerationValue.z); + if (JS_GravitySensor_callback != 0) { + var gravityValue = JS_ComputeGravity(accelerometerValue, linearAccelerationValue); + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_GravitySensor_callback, a1, a2, a3]))(gravityValue.x, gravityValue.y, gravityValue.z) + } + if (JS_Gyroscope_callback != 0) { + var degToRad = Math.PI / 180; + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_Gyroscope_callback, a1, a2, a3]))(event.rotationRate.alpha * degToRad, event.rotationRate.beta * degToRad, event.rotationRate.gamma * degToRad) + } + } + var JS_DeviceSensorPermissions = 0; + function JS_RequestDeviceSensorPermissions(permissions) { + if (permissions & 1) { + if (typeof DeviceOrientationEvent.requestPermission === "function") { + DeviceOrientationEvent.requestPermission().then(function(permissionState) { + if (permissionState === "granted") { + JS_DeviceSensorPermissions &= ~1 + } else { + warnOnce("DeviceOrientationEvent permission not granted") + } + }).catch(function(err) { + warnOnce(err); + JS_DeviceSensorPermissions |= 1 + }) + } + } + if (permissions & 2) { + if (typeof DeviceMotionEvent.requestPermission === "function") { + DeviceMotionEvent.requestPermission().then(function(permissionState) { + if (permissionState === "granted") { + JS_DeviceSensorPermissions &= ~2 + } else { + warnOnce("DeviceMotionEvent permission not granted") + } + }).catch(function(err) { + warnOnce(err); + JS_DeviceSensorPermissions |= 2 + }) + } + } + } + function JS_DeviceMotion_add() { + if (JS_Accelerometer_callback == 0 && JS_LinearAccelerationSensor_callback == 0 && JS_GravitySensor_callback == 0 && JS_Gyroscope_callback == 0) { + JS_RequestDeviceSensorPermissions(2); + window.addEventListener("devicemotion", JS_DeviceMotion_eventHandler) + } + } + function JS_DefineAccelerometerMultiplier() { + var g = 9.80665; + JS_Accelerometer_multiplier = /(iPhone|iPad|Macintosh)/i.test(navigator.userAgent) ? 1 / g : -1 / g + } + function _JS_Accelerometer_Start(callback, frequency) { + JS_DefineAccelerometerMultiplier(); + if (typeof Accelerometer === "undefined") { + JS_DeviceMotion_add(); + if (callback != 0) + JS_Accelerometer_callback = callback; + return + } + if (callback != 0) + JS_Accelerometer_callback = callback; + function InitializeAccelerometer(frequency) { + JS_Accelerometer = new Accelerometer({ + frequency: frequency, + referenceFrame: "device" + }); + JS_Accelerometer.addEventListener("reading", JS_Accelerometer_eventHandler); + JS_Accelerometer.addEventListener("error", function(e) { + warnOnce(e.error ? e.error : e) + }); + JS_Accelerometer.start(); + JS_Accelerometer_frequency = frequency + } + if (JS_Accelerometer) { + if (JS_Accelerometer_frequency != frequency) { + JS_Accelerometer.stop(); + JS_Accelerometer.removeEventListener("reading", JS_Accelerometer_eventHandler); + InitializeAccelerometer(frequency) + } + } else if (JS_Accelerometer_frequencyRequest != 0) { + JS_Accelerometer_frequencyRequest = frequency + } else { + JS_Accelerometer_frequencyRequest = frequency; + navigator.permissions.query({ + name: "accelerometer" + }).then(function(result) { + if (result.state === "granted") { + InitializeAccelerometer(JS_Accelerometer_frequencyRequest) + } else { + warnOnce("No permission to use Accelerometer.") + } + JS_Accelerometer_frequencyRequest = 0 + }) + } + } + function JS_DeviceMotion_remove() { + if (JS_Accelerometer_callback == 0 && JS_LinearAccelerationSensor_callback == 0 && JS_GravitySensor_callback == 0 && JS_Gyroscope_callback == 0) { + window.removeEventListener("devicemotion", JS_DeviceOrientation_eventHandler) + } + } + function _JS_Accelerometer_Stop() { + if (JS_Accelerometer) { + if (typeof GravitySensor !== "undefined" || JS_GravitySensor_callback == 0) { + JS_Accelerometer.stop(); + JS_Accelerometer.removeEventListener("reading", JS_Accelerometer_eventHandler); + JS_Accelerometer = null + } + JS_Accelerometer_callback = 0; + JS_Accelerometer_frequency = 0 + } else if (JS_Accelerometer_callback != 0) { + JS_Accelerometer_callback = 0; + JS_DeviceMotion_remove() + } + } + var ExceptionsSeen = 0; + function LogErrorWithAdditionalInformation(error) { + if ((error instanceof ReferenceError || error instanceof TypeError) && error.message.indexOf("dynCall_") != -1) { + error.message = 'Detected use of deprecated "Module.dynCall_*" API. Use "makeDynCall" API instead. Refer to https://docs.unity3d.com/6000.0/Documentation/Manual/web-interacting-browser-deprecated.html#dyncall for more information.\n' + error.message + } + console.error(error) + } + function _JS_CallAsLongAsNoExceptionsSeen(cb) { + if (!ExceptionsSeen) { + try { + ( () => dynCall_v.call(null, cb))() + } catch (e) { + ExceptionsSeen = 1; + console.error("Uncaught exception from main loop:"); + LogErrorWithAdditionalInformation(e); + console.error("Halting program."); + if (Module.errorHandler) + Module.errorHandler(e); + throw e + } + } + } + function _JS_Cursor_SetImage(ptr, length) { + ptr = ptr; + var binary = ""; + for (var i = 0; i < length; i++) + binary += String.fromCharCode(HEAPU8[ptr + i]); + Module.canvas.style.cursor = "url(data:image/cur;base64," + btoa(binary) + "),default" + } + function _JS_Cursor_SetShow(show) { + Module.canvas.style.cursor = show ? "default" : "none" + } + function jsDomCssEscapeId(id) { + if (typeof window.CSS !== "undefined" && typeof window.CSS.escape !== "undefined") { + return window.CSS.escape(id) + } + return id.replace(/(#|\.|\+|\[|\]|\(|\)|\{|\})/g, "\\$1") + } + function jsCanvasSelector() { + var canvasId = Module["canvas"] ? Module["canvas"].id : "unity-canvas"; + return "#" + jsDomCssEscapeId(canvasId) + } + function _JS_DOM_MapViewportCoordinateToElementLocalCoordinate(viewportX, viewportY, targetX, targetY) { + targetX = targetX >> 2; + targetY = targetY >> 2; + var canvas = document.querySelector(jsCanvasSelector()); + var rect = canvas && canvas.getBoundingClientRect(); + HEAPU32[targetX] = viewportX - (rect ? rect.left : 0); + HEAPU32[targetY] = viewportY - (rect ? rect.top : 0) + } + function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + var c = str.charCodeAt(i); + if (c <= 127) { + len++ + } else if (c <= 2047) { + len += 2 + } else if (c >= 55296 && c <= 57343) { + len += 4; + ++i + } else { + len += 3 + } + } + return len + } + function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) + return 0; + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; + for (var i = 0; i < str.length; ++i) { + var u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) { + var u1 = str.charCodeAt(++i); + u = 65536 + ((u & 1023) << 10) | u1 & 1023 + } + if (u <= 127) { + if (outIdx >= endIdx) + break; + heap[outIdx++] = u + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) + break; + heap[outIdx++] = 192 | u >> 6; + heap[outIdx++] = 128 | u & 63 + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) + break; + heap[outIdx++] = 224 | u >> 12; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63 + } else { + if (outIdx + 3 >= endIdx) + break; + heap[outIdx++] = 240 | u >> 18; + heap[outIdx++] = 128 | u >> 12 & 63; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63 + } + } + heap[outIdx] = 0; + return outIdx - startIdx + } + function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite) + } + function stringToNewUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) + stringToUTF8(str, ret, size); + return ret + } + function _JS_DOM_UnityCanvasSelector() { + var canvasSelector = jsCanvasSelector(); + if (_JS_DOM_UnityCanvasSelector.selector != canvasSelector) { + _free(_JS_DOM_UnityCanvasSelector.ptr); + _JS_DOM_UnityCanvasSelector.ptr = stringToNewUTF8(canvasSelector); + _JS_DOM_UnityCanvasSelector.selector = canvasSelector + } + return _JS_DOM_UnityCanvasSelector.ptr + } + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) + ++endPtr; + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)) + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2 + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63 + } + if (u0 < 65536) { + str += String.fromCharCode(u0) + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023) + } + } + return str + } + function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "" + } + function _JS_Eval_EvalJS(ptr) { + var str = UTF8ToString(ptr); + try { + eval(str) + } catch (exception) { + console.error(exception) + } + } + function _JS_Eval_OpenURL(ptr) { + var str = UTF8ToString(ptr); + window.open(str, "_blank", "") + } + function _JS_FileSystem_Initialize() {} + function _JS_FileSystem_Sync() { + IDBFS.queuePersist(Module.__unityIdbfsMount.mount); + if (!window.warnedAboutManualFilesystemSyncGettingDeprecated) { + window.warnedAboutManualFilesystemSyncGettingDeprecated = true; + if (!Module.autoSyncPersistentDataPath) { + console.warn("Manual synchronization of Unity Application.persistentDataPath via JS_FileSystem_Sync() is deprecated and will be later removed in a future Unity version. The persistent data directory will be automatically synchronized instead on file modification. Pass config.autoSyncPersistentDataPath = true; to configuration in createUnityInstance() to opt in to the new behavior.") + } + } + } + function _JS_GetRandomBytes(destBuffer, numBytes) { + if (typeof crypto === "undefined" || numBytes > 65535) + return 0; + crypto.getRandomValues(new Uint8Array(HEAPU8.buffer,destBuffer,numBytes)); + return 1 + } + function _JS_Get_WASM_Size() { + return Module.wasmFileSize + } + var JS_GravitySensor = null; + function _JS_GravitySensor_IsRunning() { + return typeof GravitySensor !== "undefined" ? JS_GravitySensor && JS_GravitySensor.activated : JS_GravitySensor_callback != 0 + } + function JS_GravitySensor_eventHandler() { + if (JS_GravitySensor_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_GravitySensor_callback, a1, a2, a3]))(JS_GravitySensor.x * JS_Accelerometer_multiplier, JS_GravitySensor.y * JS_Accelerometer_multiplier, JS_GravitySensor.z * JS_Accelerometer_multiplier) + } + var JS_GravitySensor_frequencyRequest = 0; + var JS_LinearAccelerationSensor = null; + function JS_LinearAccelerationSensor_eventHandler() { + var linearAccelerationValue = { + x: JS_LinearAccelerationSensor.x * JS_Accelerometer_multiplier, + y: JS_LinearAccelerationSensor.y * JS_Accelerometer_multiplier, + z: JS_LinearAccelerationSensor.z * JS_Accelerometer_multiplier + }; + if (JS_LinearAccelerationSensor_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_LinearAccelerationSensor_callback, a1, a2, a3]))(linearAccelerationValue.x, linearAccelerationValue.y, linearAccelerationValue.z); + if (JS_GravitySensor_callback != 0 && typeof GravitySensor === "undefined") { + var gravityValue = JS_ComputeGravity(JS_Accelerometer_lastValue, linearAccelerationValue); + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_GravitySensor_callback, a1, a2, a3]))(gravityValue.x, gravityValue.y, gravityValue.z) + } + } + var JS_LinearAccelerationSensor_frequencyRequest = 0; + var JS_LinearAccelerationSensor_frequency = 0; + function _JS_LinearAccelerationSensor_Start(callback, frequency) { + JS_DefineAccelerometerMultiplier(); + if (typeof LinearAccelerationSensor === "undefined") { + JS_DeviceMotion_add(); + if (callback != 0) + JS_LinearAccelerationSensor_callback = callback; + return + } + if (callback != 0) + JS_LinearAccelerationSensor_callback = callback; + function InitializeLinearAccelerationSensor(frequency) { + JS_LinearAccelerationSensor = new LinearAccelerationSensor({ + frequency: frequency, + referenceFrame: "device" + }); + JS_LinearAccelerationSensor.addEventListener("reading", JS_LinearAccelerationSensor_eventHandler); + JS_LinearAccelerationSensor.addEventListener("error", function(e) { + warnOnce(e.error ? e.error : e) + }); + JS_LinearAccelerationSensor.start(); + JS_LinearAccelerationSensor_frequency = frequency + } + if (JS_LinearAccelerationSensor) { + if (JS_LinearAccelerationSensor_frequency != frequency) { + JS_LinearAccelerationSensor.stop(); + JS_LinearAccelerationSensor.removeEventListener("reading", JS_LinearAccelerationSensor_eventHandler); + InitializeLinearAccelerationSensor(frequency) + } + } else if (JS_LinearAccelerationSensor_frequencyRequest != 0) { + JS_LinearAccelerationSensor_frequencyRequest = frequency + } else { + JS_LinearAccelerationSensor_frequencyRequest = frequency; + navigator.permissions.query({ + name: "accelerometer" + }).then(function(result) { + if (result.state === "granted") { + InitializeLinearAccelerationSensor(JS_LinearAccelerationSensor_frequencyRequest) + } else { + warnOnce("No permission to use LinearAccelerationSensor.") + } + JS_LinearAccelerationSensor_frequencyRequest = 0 + }) + } + } + function _JS_GravitySensor_Start(callback, frequency) { + if (typeof GravitySensor === "undefined") { + _JS_Accelerometer_Start(0, Math.max(frequency, JS_Accelerometer_frequency)); + _JS_LinearAccelerationSensor_Start(0, Math.max(frequency, JS_LinearAccelerationSensor_frequency)); + JS_GravitySensor_callback = callback; + return + } + JS_DefineAccelerometerMultiplier(); + JS_GravitySensor_callback = callback; + function InitializeGravitySensor(frequency) { + JS_GravitySensor = new GravitySensor({ + frequency: frequency, + referenceFrame: "device" + }); + JS_GravitySensor.addEventListener("reading", JS_GravitySensor_eventHandler); + JS_GravitySensor.addEventListener("error", function(e) { + warnOnce(e.error ? e.error : e) + }); + JS_GravitySensor.start() + } + if (JS_GravitySensor) { + JS_GravitySensor.stop(); + JS_GravitySensor.removeEventListener("reading", JS_GravitySensor_eventHandler); + InitializeGravitySensor(frequency) + } else if (JS_GravitySensor_frequencyRequest != 0) { + JS_GravitySensor_frequencyRequest = frequency + } else { + JS_GravitySensor_frequencyRequest = frequency; + navigator.permissions.query({ + name: "accelerometer" + }).then(function(result) { + if (result.state === "granted") { + InitializeGravitySensor(JS_GravitySensor_frequencyRequest) + } else { + warnOnce("No permission to use GravitySensor.") + } + JS_GravitySensor_frequencyRequest = 0 + }) + } + } + function _JS_LinearAccelerationSensor_Stop() { + if (JS_LinearAccelerationSensor) { + if (typeof GravitySensor !== "undefined" || JS_GravitySensor_callback == 0) { + JS_LinearAccelerationSensor.stop(); + JS_LinearAccelerationSensor.removeEventListener("reading", JS_LinearAccelerationSensor_eventHandler); + JS_LinearAccelerationSensor = null + } + JS_LinearAccelerationSensor_callback = 0; + JS_LinearAccelerationSensor_frequency = 0 + } else if (JS_LinearAccelerationSensor_callback != 0) { + JS_LinearAccelerationSensor_callback = 0; + JS_DeviceMotion_remove() + } + } + function _JS_GravitySensor_Stop() { + JS_GravitySensor_callback = 0; + if (typeof GravitySensor === "undefined") { + if (JS_Accelerometer_callback == 0) + _JS_Accelerometer_Stop(); + if (JS_LinearAccelerationSensor_callback == 0) + _JS_LinearAccelerationSensor_Stop(); + return + } + if (JS_GravitySensor) { + JS_GravitySensor.stop(); + JS_GravitySensor.removeEventListener("reading", JS_GravitySensor_eventHandler); + JS_GravitySensor = null + } + } + var JS_Gyroscope = null; + function _JS_Gyroscope_IsRunning() { + return JS_Gyroscope && JS_Gyroscope.activated || JS_Gyroscope_callback != 0 + } + function JS_Gyroscope_eventHandler() { + if (JS_Gyroscope_callback != 0) + ( (a1, a2, a3) => dynCall_vfff.apply(null, [JS_Gyroscope_callback, a1, a2, a3]))(JS_Gyroscope.x, JS_Gyroscope.y, JS_Gyroscope.z) + } + var JS_Gyroscope_frequencyRequest = 0; + function _JS_Gyroscope_Start(callback, frequency) { + if (typeof Gyroscope === "undefined") { + JS_DeviceMotion_add(); + JS_Gyroscope_callback = callback; + return + } + JS_Gyroscope_callback = callback; + function InitializeGyroscope(frequency) { + JS_Gyroscope = new Gyroscope({ + frequency: frequency, + referenceFrame: "device" + }); + JS_Gyroscope.addEventListener("reading", JS_Gyroscope_eventHandler); + JS_Gyroscope.addEventListener("error", function(e) { + warnOnce(e.error ? e.error : e) + }); + JS_Gyroscope.start() + } + if (JS_Gyroscope) { + JS_Gyroscope.stop(); + JS_Gyroscope.removeEventListener("reading", JS_Gyroscope_eventHandler); + InitializeGyroscope(frequency) + } else if (JS_Gyroscope_frequencyRequest != 0) { + JS_Gyroscope_frequencyRequest = frequency + } else { + JS_Gyroscope_frequencyRequest = frequency; + navigator.permissions.query({ + name: "gyroscope" + }).then(function(result) { + if (result.state === "granted") { + InitializeGyroscope(JS_Gyroscope_frequencyRequest) + } else { + warnOnce("No permission to use Gyroscope.") + } + JS_Gyroscope_frequencyRequest = 0 + }) + } + } + function _JS_Gyroscope_Stop() { + if (JS_Gyroscope) { + JS_Gyroscope.stop(); + JS_Gyroscope.removeEventListener("reading", JS_Gyroscope_eventHandler); + JS_Gyroscope = null; + JS_Gyroscope_callback = 0 + } else if (JS_Gyroscope_callback != 0) { + JS_Gyroscope_callback = 0; + JS_DeviceMotion_remove() + } + } + function _JS_Init_ContextMenuHandler() { + const _handleContextMenu = function(event) { + if (event.target.localName !== "canvas") + _ReleaseKeys() + }; + document.addEventListener("contextmenu", _handleContextMenu); + Module.deinitializers.push(function() { + document.removeEventListener("contextmenu", _handleContextMenu) + }) + } + var mobile_input_hide_delay = null; + var mobile_input_text = null; + var mobile_input = null; + function _JS_Init_CopyPaste() { + var canvas = document.querySelector(jsCanvasSelector()); + const _handlePaste = function(event) { + if (document.activeElement == canvas || !!mobile_input) + event.preventDefault(); + const data = event.clipboardData.getData("text"); + if (!!mobile_input) { + mobile_input.input.value += data + } else { + var str_wasm = stringToNewUTF8(data); + _SendPasteEvent(str_wasm); + _free(str_wasm) + } + }; + const _handleCopy = function(event) { + if (document.activeElement == canvas) + event.preventDefault(); + const data = !!mobile_input ? mobile_input.input.value.slice(mobile_input.input.selectionStart, mobile_input.input.selectionEnd) : UTF8ToString(_GetCopyBufferAsCStr()); + event.clipboardData.setData("text/plain", data) + }; + window.addEventListener("paste", _handlePaste); + window.addEventListener("copy", _handleCopy); + window.addEventListener("cut", _handleCopy); + Module.deinitializers.push(function() { + window.removeEventListener("paste", _handlePaste); + window.removeEventListener("copy", _handleCopy); + window.removeEventListener("cut", _handleCopy) + }) + } + function _JS_LinearAccelerationSensor_IsRunning() { + return JS_LinearAccelerationSensor && JS_LinearAccelerationSensor.activated || JS_LinearAccelerationSensor_callback != 0 + } + function _JS_Log_Dump(ptr, type) { + var str = UTF8ToString(ptr); + if (typeof dump == "function") + dump(str); + switch (type) { + case 0: + case 1: + case 4: + console.error(str); + return; + case 2: + console.warn(str); + return; + case 3: + case 5: + console.log(str); + return; + default: + console.error("Unknown console message type!"); + console.error(str) + } + } + function _JS_Log_StackTrace(buffer, bufferSize) { + var trace = stackTrace(); + if (buffer) + stringToUTF8(trace, buffer, bufferSize); + return lengthBytesUTF8(trace) + } + var mobile_input_ignore_blur_event = false; + function _JS_MobileKeybard_GetIgnoreBlurEvent() { + return mobile_input_ignore_blur_event + } + function _JS_MobileKeyboard_GetKeyboardStatus() { + var kKeyboardStatusVisible = 0; + var kKeyboardStatusDone = 1; + if (!mobile_input) + return kKeyboardStatusDone; + return kKeyboardStatusVisible + } + function _JS_MobileKeyboard_GetText(buffer, bufferSize) { + var text = mobile_input && mobile_input.input ? mobile_input.input.value : mobile_input_text ? mobile_input_text : ""; + if (buffer) + stringToUTF8(text, buffer, bufferSize); + return lengthBytesUTF8(text) + } + function _JS_MobileKeyboard_GetTextSelection(outStart, outLength) { + outStart = outStart >> 2; + outLength = outLength >> 2; + if (!mobile_input) { + HEAP32[outStart] = 0; + HEAP32[outLength] = 0; + return + } + HEAP32[outStart] = mobile_input.input.selectionStart; + HEAP32[outLength] = mobile_input.input.selectionEnd - mobile_input.input.selectionStart + } + function _JS_MobileKeyboard_Hide(delay) { + if (mobile_input_hide_delay) + return; + mobile_input_ignore_blur_event = true; + function hideMobileKeyboard() { + if (mobile_input && mobile_input.input) { + mobile_input_text = mobile_input.input.value; + mobile_input.input = null; + if (mobile_input.parentNode && mobile_input.parentNode) { + mobile_input.parentNode.removeChild(mobile_input) + } + } + mobile_input = null; + mobile_input_hide_delay = null; + setTimeout(function() { + mobile_input_ignore_blur_event = false + }, 100) + } + if (delay) { + var hideDelay = 200; + mobile_input_hide_delay = setTimeout(hideMobileKeyboard, hideDelay) + } else { + hideMobileKeyboard() + } + } + function _JS_MobileKeyboard_SetCharacterLimit(limit) { + if (!mobile_input) + return; + mobile_input.input.maxLength = limit + } + function _JS_MobileKeyboard_SetText(text) { + if (!mobile_input) + return; + text = UTF8ToString(text); + mobile_input.input.value = text + } + function _JS_MobileKeyboard_SetTextSelection(start, length) { + if (!mobile_input) + return; + if (mobile_input.input.type === "number") { + mobile_input.input.type = "text"; + mobile_input.input.setSelectionRange(start, start + length); + mobile_input.input.type = "number" + } else { + mobile_input.input.setSelectionRange(start, start + length) + } + } + function _JS_MobileKeyboard_Show(text, keyboardType, autocorrection, multiline, secure, alert, placeholder, characterLimit) { + if (mobile_input_hide_delay) { + clearTimeout(mobile_input_hide_delay); + mobile_input_hide_delay = null + } + text = UTF8ToString(text); + mobile_input_text = text; + placeholder = UTF8ToString(placeholder); + var container = document.body; + var hasExistingMobileInput = !!mobile_input; + var input_type; + var KEYBOARD_TYPE_NUMBERS_AND_PUNCTUATION = 2; + var KEYBOARD_TYPE_URL = 3; + var KEYBOARD_TYPE_NUMBER_PAD = 4; + var KEYBOARD_TYPE_PHONE_PAD = 5; + var KEYBOARD_TYPE_EMAIL_ADDRESS = 7; + if (!secure) { + switch (keyboardType) { + case KEYBOARD_TYPE_EMAIL_ADDRESS: + input_type = "email"; + break; + case KEYBOARD_TYPE_URL: + input_type = "url"; + break; + case KEYBOARD_TYPE_NUMBERS_AND_PUNCTUATION: + case KEYBOARD_TYPE_NUMBER_PAD: + case KEYBOARD_TYPE_PHONE_PAD: + input_type = "number"; + break; + default: + input_type = "text"; + break + } + } else { + input_type = "password" + } + if (hasExistingMobileInput) { + if (mobile_input.multiline != multiline) { + _JS_MobileKeyboard_Hide(false); + return + } + } + var inputContainer = mobile_input || document.createElement("div"); + if (!hasExistingMobileInput) { + inputContainer.style = "width:100%; position:fixed; bottom:0px; margin:0px; padding:0px; left:0px; border: 1px solid #000; border-radius: 5px; background-color:#fff; font-size:14pt;"; + container.appendChild(inputContainer); + mobile_input = inputContainer + } + var input = hasExistingMobileInput ? mobile_input.input : document.createElement(multiline ? "textarea" : "input"); + mobile_input.multiline = multiline; + mobile_input.secure = secure; + mobile_input.keyboardType = keyboardType; + mobile_input.inputType = input_type; + input.type = input_type; + input.style = "width:calc(100% - 85px); " + (multiline ? "height:100px;" : "") + "vertical-align:top; border-radius: 5px; outline:none; cursor:default; resize:none; border:0px; padding:10px 0px 10px 10px;"; + input.spellcheck = autocorrection ? true : false; + input.maxLength = characterLimit > 0 ? characterLimit : 524288; + input.value = text; + input.placeholder = placeholder; + if (!hasExistingMobileInput) { + inputContainer.appendChild(input); + inputContainer.input = input + } + if (!hasExistingMobileInput) { + var okButton = document.createElement("button"); + okButton.innerText = "OK"; + okButton.style = "border:0; position:absolute; left:calc(100% - 75px); top:0px; width:75px; height:100%; margin:0; padding:0; border-radius: 5px; background-color:#fff"; + okButton.addEventListener("touchend", function() { + _JS_MobileKeyboard_Hide(true) + }); + inputContainer.appendChild(okButton); + inputContainer.okButton = okButton; + input.addEventListener("keyup", function(e) { + if (input.parentNode.multiline) + return; + if (e.code == "Enter" || e.which == 13 || e.keyCode == 13) { + _JS_MobileKeyboard_Hide(true) + } + }); + input.addEventListener("blur", function(e) { + _JS_MobileKeyboard_Hide(true); + e.stopPropagation(); + e.preventDefault() + }); + input.select(); + input.focus() + } else { + input.select() + } + } + function _JS_Module_WebGLContextAttributes_PowerPreference() { + return Module.webglContextAttributes.powerPreference + } + function _JS_Module_WebGLContextAttributes_PremultipliedAlpha() { + return Module.webglContextAttributes.premultipliedAlpha + } + function _JS_Module_WebGLContextAttributes_PreserveDrawingBuffer() { + return Module.webglContextAttributes.preserveDrawingBuffer + } + var JS_OrientationSensor = null; + var JS_OrientationSensor_callback = 0; + function _JS_OrientationSensor_IsRunning() { + return JS_OrientationSensor && JS_OrientationSensor.activated || JS_OrientationSensor_callback != 0 + } + function JS_OrientationSensor_eventHandler() { + if (JS_OrientationSensor_callback != 0) + ( (a1, a2, a3, a4) => dynCall_vffff.apply(null, [JS_OrientationSensor_callback, a1, a2, a3, a4]))(JS_OrientationSensor.quaternion[0], JS_OrientationSensor.quaternion[1], JS_OrientationSensor.quaternion[2], JS_OrientationSensor.quaternion[3]) + } + var JS_OrientationSensor_frequencyRequest = 0; + function JS_DeviceOrientation_eventHandler(event) { + if (JS_OrientationSensor_callback) { + var degToRad = Math.PI / 180; + var x = event.beta * degToRad; + var y = event.gamma * degToRad; + var z = event.alpha * degToRad; + var cx = Math.cos(x / 2); + var sx = Math.sin(x / 2); + var cy = Math.cos(y / 2); + var sy = Math.sin(y / 2); + var cz = Math.cos(z / 2); + var sz = Math.sin(z / 2); + var qx = sx * cy * cz - cx * sy * sz; + var qy = cx * sy * cz + sx * cy * sz; + var qz = cx * cy * sz + sx * sy * cz; + var qw = cx * cy * cz - sx * sy * sz; + ( (a1, a2, a3, a4) => dynCall_vffff.apply(null, [JS_OrientationSensor_callback, a1, a2, a3, a4]))(qx, qy, qz, qw) + } + } + function _JS_OrientationSensor_Start(callback, frequency) { + if (typeof RelativeOrientationSensor === "undefined") { + if (JS_OrientationSensor_callback == 0) { + JS_OrientationSensor_callback = callback; + JS_RequestDeviceSensorPermissions(1); + window.addEventListener("deviceorientation", JS_DeviceOrientation_eventHandler) + } + return + } + JS_OrientationSensor_callback = callback; + function InitializeOrientationSensor(frequency) { + JS_OrientationSensor = new RelativeOrientationSensor({ + frequency: frequency, + referenceFrame: "device" + }); + JS_OrientationSensor.addEventListener("reading", JS_OrientationSensor_eventHandler); + JS_OrientationSensor.addEventListener("error", function(e) { + warnOnce(e.error ? e.error : e) + }); + JS_OrientationSensor.start() + } + if (JS_OrientationSensor) { + JS_OrientationSensor.stop(); + JS_OrientationSensor.removeEventListener("reading", JS_OrientationSensor_eventHandler); + InitializeOrientationSensor(frequency) + } else if (JS_OrientationSensor_frequencyRequest != 0) { + JS_OrientationSensor_frequencyRequest = frequency + } else { + JS_OrientationSensor_frequencyRequest = frequency; + Promise.all([navigator.permissions.query({ + name: "accelerometer" + }), navigator.permissions.query({ + name: "gyroscope" + })]).then(function(results) { + if (results.every(function(result) { + return result.state === "granted" + })) { + InitializeOrientationSensor(JS_OrientationSensor_frequencyRequest) + } else { + warnOnce("No permissions to use RelativeOrientationSensor.") + } + JS_OrientationSensor_frequencyRequest = 0 + }) + } + } + function _JS_OrientationSensor_Stop() { + if (JS_OrientationSensor) { + JS_OrientationSensor.stop(); + JS_OrientationSensor.removeEventListener("reading", JS_OrientationSensor_eventHandler); + JS_OrientationSensor = null + } else if (JS_OrientationSensor_callback != 0) { + window.removeEventListener("deviceorientation", JS_DeviceOrientation_eventHandler) + } + JS_OrientationSensor_callback = 0 + } + function _JS_RequestDeviceSensorPermissionsOnTouch() { + if (JS_DeviceSensorPermissions == 0) + return; + JS_RequestDeviceSensorPermissions(JS_DeviceSensorPermissions) + } + function _JS_RunQuitCallbacks() { + Module.QuitCleanup() + } + var JS_ScreenOrientation_callback = 0; + function JS_ScreenOrientation_eventHandler() { + if (JS_ScreenOrientation_callback) + ( (a1, a2, a3) => dynCall_viii.apply(null, [JS_ScreenOrientation_callback, a1, a2, a3]))(window.innerWidth, window.innerHeight, screen.orientation ? screen.orientation.angle : window.orientation) + } + function _JS_ScreenOrientation_DeInit() { + JS_ScreenOrientation_callback = 0; + window.removeEventListener("resize", JS_ScreenOrientation_eventHandler); + if (screen.orientation) { + screen.orientation.removeEventListener("change", JS_ScreenOrientation_eventHandler) + } + } + function _JS_ScreenOrientation_Init(callback) { + if (!JS_ScreenOrientation_callback) { + if (screen.orientation) { + screen.orientation.addEventListener("change", JS_ScreenOrientation_eventHandler) + } + window.addEventListener("resize", JS_ScreenOrientation_eventHandler); + JS_ScreenOrientation_callback = callback; + setTimeout(JS_ScreenOrientation_eventHandler, 0) + } + } + var JS_ScreenOrientation_requestedLockType = -1; + var JS_ScreenOrientation_appliedLockType = -1; + var JS_ScreenOrientation_timeoutID = -1; + function _JS_ScreenOrientation_Lock(orientationLockType) { + if (!screen.orientation || !screen.orientation.lock) { + return + } + function applyLock() { + JS_ScreenOrientation_appliedLockType = JS_ScreenOrientation_requestedLockType; + var screenOrientations = ["any", 0, "landscape", "portrait", "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary"]; + var type = screenOrientations[JS_ScreenOrientation_appliedLockType]; + screen.orientation.lock(type).then(function() { + if (JS_ScreenOrientation_requestedLockType != JS_ScreenOrientation_appliedLockType) { + JS_ScreenOrientation_timeoutID = setTimeout(applyLock, 0) + } else { + JS_ScreenOrientation_timeoutID = -1 + } + }).catch(function(err) { + warnOnce(err); + JS_ScreenOrientation_timeoutID = -1 + }) + } + JS_ScreenOrientation_requestedLockType = orientationLockType; + if (JS_ScreenOrientation_timeoutID == -1 && orientationLockType != JS_ScreenOrientation_appliedLockType) { + JS_ScreenOrientation_timeoutID = setTimeout(applyLock, 0) + } + } + function handleException(e) { + if (e instanceof ExitStatus || e == "unwind") { + return EXITSTATUS + } + quit_(1, e) + } + var PATH = { + isAbs: path => path.charAt(0) === "/", + splitPath: filename => { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1) + } + , + normalizeArray: (parts, allowAboveRoot) => { + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === ".") { + parts.splice(i, 1) + } else if (last === "..") { + parts.splice(i, 1); + up++ + } else if (up) { + parts.splice(i, 1); + up-- + } + } + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift("..") + } + } + return parts + } + , + normalize: path => { + var isAbsolute = PATH.isAbs(path) + , trailingSlash = path.substr(-1) === "/"; + path = PATH.normalizeArray(path.split("/").filter(p => !!p), !isAbsolute).join("/"); + if (!path && !isAbsolute) { + path = "." + } + if (path && trailingSlash) { + path += "/" + } + return (isAbsolute ? "/" : "") + path + } + , + dirname: path => { + var result = PATH.splitPath(path) + , root = result[0] + , dir = result[1]; + if (!root && !dir) { + return "." + } + if (dir) { + dir = dir.substr(0, dir.length - 1) + } + return root + dir + } + , + basename: path => { + if (path === "/") + return "/"; + path = PATH.normalize(path); + path = path.replace(/\/$/, ""); + var lastSlash = path.lastIndexOf("/"); + if (lastSlash === -1) + return path; + return path.substr(lastSlash + 1) + } + , + join: function() { + var paths = Array.prototype.slice.call(arguments); + return PATH.normalize(paths.join("/")) + }, + join2: (l, r) => { + return PATH.normalize(l + "/" + r) + } + }; + function initRandomFill() { + if (typeof crypto == "object" && typeof crypto["getRandomValues"] == "function") { + return view => crypto.getRandomValues(view) + } else + abort("initRandomDevice") + } + function randomFill(view) { + return (randomFill = initRandomFill())(view) + } + var PATH_FS = { + resolve: function() { + var resolvedPath = "" + , resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? arguments[i] : FS.cwd(); + if (typeof path != "string") { + throw new TypeError("Arguments to path.resolve must be strings") + } else if (!path) { + return "" + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = PATH.isAbs(path) + } + resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(p => !!p), !resolvedAbsolute).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "." + }, + relative: (from, to) => { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") + break + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== "") + break + } + if (start > end) + return []; + return arr.slice(start, end - start + 1) + } + var fromParts = trim(from.split("/")); + var toParts = trim(to.split("/")); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push("..") + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/") + } + }; + function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) + u8array.length = numBytesWritten; + return u8array + } + var TTY = { + ttys: [], + init: function() {}, + shutdown: function() {}, + register: function(dev, ops) { + TTY.ttys[dev] = { + input: [], + output: [], + ops: ops + }; + FS.registerDevice(dev, TTY.stream_ops) + }, + stream_ops: { + open: function(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43) + } + stream.tty = tty; + stream.seekable = false + }, + close: function(stream) { + stream.tty.ops.fsync(stream.tty) + }, + fsync: function(stream) { + stream.tty.ops.fsync(stream.tty) + }, + read: function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60) + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty) + } catch (e) { + throw new FS.ErrnoError(29) + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6) + } + if (result === null || result === undefined) + break; + bytesRead++; + buffer[offset + i] = result + } + if (bytesRead) { + stream.node.timestamp = Date.now() + } + return bytesRead + }, + write: function(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60) + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset + i]) + } + } catch (e) { + throw new FS.ErrnoError(29) + } + if (length) { + stream.node.timestamp = Date.now() + } + return i + } + }, + default_tty_ops: { + get_char: function(tty) { + if (!tty.input.length) { + var result = null; + if (typeof window != "undefined" && typeof window.prompt == "function") { + result = window.prompt("Input: "); + if (result !== null) { + result += "\n" + } + } else if (typeof readline == "function") { + result = readline(); + if (result !== null) { + result += "\n" + } + } + if (!result) { + return null + } + tty.input = intArrayFromString(result, true) + } + return tty.input.shift() + }, + put_char: function(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = [] + } else { + if (val != 0) + tty.output.push(val) + } + }, + fsync: function(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = [] + } + } + }, + default_tty1_ops: { + put_char: function(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = [] + } else { + if (val != 0) + tty.output.push(val) + } + }, + fsync: function(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = [] + } + } + } + }; + function zeroMemory(address, size) { + HEAPU8.fill(0, address, address + size); + return address + } + function alignMemory(size, alignment) { + return Math.ceil(size / alignment) * alignment + } + function mmapAlloc(size) { + size = alignMemory(size, 65536); + var ptr = _emscripten_builtin_memalign(65536, size); + if (!ptr) + return 0; + return zeroMemory(ptr, size) + } + var MEMFS = { + ops_table: null, + mount: function(mount) { + return MEMFS.createNode(null, "/", 16384 | 511, 0) + }, + createNode: function(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + throw new FS.ErrnoError(63) + } + if (!MEMFS.ops_table) { + MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + } + } + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {} + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; + node.contents = null + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream + } + node.timestamp = Date.now(); + if (parent) { + parent.contents[name] = node; + parent.timestamp = node.timestamp + } + return node + }, + getFileDataAsTypedArray: function(node) { + if (!node.contents) + return new Uint8Array(0); + if (node.contents.subarray) + return node.contents.subarray(0, node.usedBytes); + return new Uint8Array(node.contents) + }, + expandFileStorage: function(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) + return; + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0); + if (prevCapacity != 0) + newCapacity = Math.max(newCapacity, 256); + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); + if (node.usedBytes > 0) + node.contents.set(oldContents.subarray(0, node.usedBytes), 0) + }, + resizeFileStorage: function(node, newSize) { + if (node.usedBytes == newSize) + return; + if (newSize == 0) { + node.contents = null; + node.usedBytes = 0 + } else { + var oldContents = node.contents; + node.contents = new Uint8Array(newSize); + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))) + } + node.usedBytes = newSize + } + }, + node_ops: { + getattr: function(node) { + var attr = {}; + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096 + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length + } else { + attr.size = 0 + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr + }, + setattr: function(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size) + } + }, + lookup: function(parent, name) { + throw FS.genericErrors[44] + }, + mknod: function(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev) + }, + rename: function(old_node, new_dir, new_name) { + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name) + } catch (e) {} + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(55) + } + } + } + delete old_node.parent.contents[old_node.name]; + old_node.parent.timestamp = Date.now(); + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + new_dir.timestamp = old_node.parent.timestamp; + old_node.parent = new_dir + }, + unlink: function(parent, name) { + delete parent.contents[name]; + parent.timestamp = Date.now() + }, + rmdir: function(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(55) + } + delete parent.contents[name]; + parent.timestamp = Date.now() + }, + readdir: function(node) { + var entries = [".", ".."]; + for (var key in node.contents) { + if (!node.contents.hasOwnProperty(key)) { + continue + } + entries.push(key) + } + return entries + }, + symlink: function(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 | 40960, 0); + node.link = oldpath; + return node + }, + readlink: function(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28) + } + return node.link + } + }, + stream_ops: { + read: function(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) + return 0; + var size = Math.min(stream.node.usedBytes - position, length); + if (size > 8 && contents.subarray) { + buffer.set(contents.subarray(position, position + size), offset) + } else { + for (var i = 0; i < size; i++) + buffer[offset + i] = contents[position + i] + } + return size + }, + write: function(stream, buffer, offset, length, position, canOwn) { + if (buffer.buffer === HEAP8.buffer) { + canOwn = false + } + if (!length) + return 0; + var node = stream.node; + node.timestamp = Date.now(); + if (buffer.subarray && (!node.contents || node.contents.subarray)) { + if (canOwn) { + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length + } else if (node.usedBytes === 0 && position === 0) { + node.contents = buffer.slice(offset, offset + length); + node.usedBytes = length; + return length + } else if (position + length <= node.usedBytes) { + node.contents.set(buffer.subarray(offset, offset + length), position); + return length + } + } + MEMFS.expandFileStorage(node, position + length); + if (node.contents.subarray && buffer.subarray) { + node.contents.set(buffer.subarray(offset, offset + length), position) + } else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i] + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length + }, + llseek: function(stream, offset, whence) { + var position = offset; + if (whence === 1) { + position += stream.position + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes + } + } + if (position < 0) { + throw new FS.ErrnoError(28) + } + return position + }, + allocate: function(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length) + }, + mmap: function(stream, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43) + } + var ptr; + var allocated; + var contents = stream.node.contents; + if (!(flags & 2) && contents.buffer === HEAP8.buffer) { + allocated = false; + ptr = contents.byteOffset + } else { + if (position > 0 || position + length < contents.length) { + if (contents.subarray) { + contents = contents.subarray(position, position + length) + } else { + contents = Array.prototype.slice.call(contents, position, position + length) + } + } + allocated = true; + ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48) + } + HEAP8.set(contents, ptr) + } + return { + ptr: ptr, + allocated: allocated + } + }, + msync: function(stream, buffer, offset, length, mmapFlags) { + MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + return 0 + } + } + }; + function asyncLoad(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency("al " + url) : ""; + readAsync(url, arrayBuffer => { + assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`); + onload(new Uint8Array(arrayBuffer)); + if (dep) + removeRunDependency(dep) + } + , event => { + if (onerror) { + onerror() + } else { + throw `Loading data file "${url}" failed.` + } + } + ); + if (dep) + addRunDependency(dep) + } + var preloadPlugins = Module["preloadPlugins"] || []; + function FS_handledByPreloadPlugin(byteArray, fullname, finish, onerror) { + if (typeof Browser != "undefined") + Browser.init(); + var handled = false; + preloadPlugins.forEach(function(plugin) { + if (handled) + return; + if (plugin["canHandle"](fullname)) { + plugin["handle"](byteArray, fullname, finish, onerror); + handled = true + } + }); + return handled + } + function FS_createPreloadedFile(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency("cp " + fullname); + function processData(byteArray) { + function finish(byteArray) { + if (preFinish) + preFinish(); + if (!dontCreateFile) { + FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn) + } + if (onload) + onload(); + removeRunDependency(dep) + } + if (FS_handledByPreloadPlugin(byteArray, fullname, finish, () => { + if (onerror) + onerror(); + removeRunDependency(dep) + } + )) { + return + } + finish(byteArray) + } + addRunDependency(dep); + if (typeof url == "string") { + asyncLoad(url, byteArray => processData(byteArray), onerror) + } else { + processData(url) + } + } + function FS_modeStringToFlags(str) { + var flagModes = { + "r": 0, + "r+": 2, + "w": 512 | 64 | 1, + "w+": 512 | 64 | 2, + "a": 1024 | 64 | 1, + "a+": 1024 | 64 | 2 + }; + var flags = flagModes[str]; + if (typeof flags == "undefined") { + throw new Error("Unknown file open mode: " + str) + } + return flags + } + function FS_getMode(canRead, canWrite) { + var mode = 0; + if (canRead) + mode |= 292 | 73; + if (canWrite) + mode |= 146; + return mode + } + var IDBFS = { + dbs: {}, + indexedDB: () => { + if (typeof indexedDB != "undefined") + return indexedDB; + var ret = null; + if (typeof window == "object") + ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + assert(ret, "IDBFS used, but indexedDB not supported"); + return ret + } + , + DB_VERSION: 21, + DB_STORE_NAME: "FILE_DATA", + mount: function(mount) { + return MEMFS.mount.apply(null, arguments) + }, + syncfs: (mount, populate, callback) => { + IDBFS.getLocalSet(mount, (err, local) => { + if (err) + return callback(err); + IDBFS.getRemoteSet(mount, (err, remote) => { + if (err) + return callback(err); + var src = populate ? remote : local; + var dst = populate ? local : remote; + IDBFS.reconcile(src, dst, callback) + } + ) + } + ) + } + , + quit: () => { + Object.values(IDBFS.dbs).forEach(value => value.close()); + IDBFS.dbs = {} + } + , + getDB: (name, callback) => { + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db) + } + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION) + } catch (e) { + return callback(e) + } + if (!req) { + return callback("Unable to connect to IndexedDB") + } + req.onupgradeneeded = e => { + var db = e.target.result; + var transaction = e.target.transaction; + var fileStore; + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME) + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME) + } + if (!fileStore.indexNames.contains("timestamp")) { + fileStore.createIndex("timestamp", "timestamp", { + unique: false + }) + } + } + ; + req.onsuccess = () => { + db = req.result; + IDBFS.dbs[name] = db; + callback(null, db) + } + ; + req.onerror = e => { + callback(this.error); + e.preventDefault() + } + } + , + getLocalSet: (mount, callback) => { + var entries = {}; + function isRealDir(p) { + return p !== "." && p !== ".." + } + function toAbsolute(root) { + return p => { + return PATH.join2(root, p) + } + } + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + while (check.length) { + var path = check.pop(); + var stat; + try { + stat = FS.stat(path) + } catch (e) { + return callback(e) + } + if (FS.isDir(stat.mode)) { + check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))) + } + entries[path] = { + "timestamp": stat.mtime + } + } + return callback(null, { + type: "local", + entries: entries + }) + } + , + getRemoteSet: (mount, callback) => { + var entries = {}; + IDBFS.getDB(mount.mountpoint, (err, db) => { + if (err) + return callback(err); + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readonly"); + transaction.onerror = e => { + callback(this.error); + e.preventDefault() + } + ; + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index("timestamp"); + index.openKeyCursor().onsuccess = event => { + var cursor = event.target.result; + if (!cursor) { + return callback(null, { + type: "remote", + db: db, + entries: entries + }) + } + entries[cursor.primaryKey] = { + "timestamp": cursor.key + }; + cursor.continue() + } + } catch (e) { + return callback(e) + } + } + ) + } + , + loadLocalEntry: (path, callback) => { + var stat, node; + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path) + } catch (e) { + return callback(e) + } + if (FS.isDir(stat.mode)) { + return callback(null, { + "timestamp": stat.mtime, + "mode": stat.mode + }) + } else if (FS.isFile(stat.mode)) { + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { + "timestamp": stat.mtime, + "mode": stat.mode, + "contents": node.contents + }) + } else { + return callback(new Error("node type not supported")) + } + } + , + storeLocalEntry: (path, entry, callback) => { + try { + if (FS.isDir(entry["mode"])) { + FS.mkdirTree(path, entry["mode"]) + } else if (FS.isFile(entry["mode"])) { + FS.writeFile(path, entry["contents"], { + canOwn: true + }) + } else { + return callback(new Error("node type not supported")) + } + FS.chmod(path, entry["mode"]); + FS.utime(path, entry["timestamp"], entry["timestamp"]) + } catch (e) { + return callback(e) + } + callback(null) + } + , + removeLocalEntry: (path, callback) => { + try { + var stat = FS.stat(path); + if (FS.isDir(stat.mode)) { + FS.rmdir(path) + } else if (FS.isFile(stat.mode)) { + FS.unlink(path) + } + } catch (e) { + return callback(e) + } + callback(null) + } + , + loadRemoteEntry: (store, path, callback) => { + var req = store.get(path); + req.onsuccess = event => { + callback(null, event.target.result) + } + ; + req.onerror = e => { + callback(this.error); + e.preventDefault() + } + } + , + storeRemoteEntry: (store, path, entry, callback) => { + try { + var req = store.put(entry, path) + } catch (e) { + callback(e); + return + } + req.onsuccess = () => { + callback(null) + } + ; + req.onerror = e => { + callback(this.error); + e.preventDefault() + } + } + , + removeRemoteEntry: (store, path, callback) => { + var req = store.delete(path); + req.onsuccess = () => { + callback(null) + } + ; + req.onerror = e => { + callback(this.error); + e.preventDefault() + } + } + , + reconcile: (src, dst, callback) => { + var total = 0; + var create = []; + Object.keys(src.entries).forEach(function(key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e["timestamp"].getTime() != e2["timestamp"].getTime()) { + create.push(key); + total++ + } + }); + var remove = []; + Object.keys(dst.entries).forEach(function(key) { + if (!src.entries[key]) { + remove.push(key); + total++ + } + }); + if (!total) { + return callback(null) + } + var errored = false; + var db = src.type === "remote" ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readwrite"); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + function done(err) { + if (err && !errored) { + errored = true; + return callback(err) + } + } + transaction.onerror = e => { + done(this.error); + e.preventDefault() + } + ; + transaction.oncomplete = e => { + if (!errored) { + callback(null) + } + } + ; + create.sort().forEach(path => { + if (dst.type === "local") { + IDBFS.loadRemoteEntry(store, path, (err, entry) => { + if (err) + return done(err); + IDBFS.storeLocalEntry(path, entry, done) + } + ) + } else { + IDBFS.loadLocalEntry(path, (err, entry) => { + if (err) + return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done) + } + ) + } + } + ); + remove.sort().reverse().forEach(path => { + if (dst.type === "local") { + IDBFS.removeLocalEntry(path, done) + } else { + IDBFS.removeRemoteEntry(store, path, done) + } + } + ) + } + }; + var FS = { + root: null, + mounts: [], + devices: {}, + streams: [], + nextInode: 1, + nameTable: null, + currentPath: "/", + initialized: false, + ignorePermissions: true, + ErrnoError: null, + genericErrors: {}, + filesystems: null, + syncFSRequests: 0, + lookupPath: (path, opts={}) => { + path = PATH_FS.resolve(path); + if (!path) + return { + path: "", + node: null + }; + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + opts = Object.assign(defaults, opts); + if (opts.recurse_count > 8) { + throw new FS.ErrnoError(32) + } + var parts = path.split("/").filter(p => !!p); + var current = FS.root; + var current_path = "/"; + for (var i = 0; i < parts.length; i++) { + var islast = i === parts.length - 1; + if (islast && opts.parent) { + break + } + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + if (FS.isMountpoint(current)) { + if (!islast || islast && opts.follow_mount) { + current = current.mounted.root + } + } + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + var lookup = FS.lookupPath(current_path, { + recurse_count: opts.recurse_count + 1 + }); + current = lookup.node; + if (count++ > 40) { + throw new FS.ErrnoError(32) + } + } + } + } + return { + path: current_path, + node: current + } + } + , + getPath: node => { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) + return mount; + return mount[mount.length - 1] !== "/" ? mount + "/" + path : mount + path + } + path = path ? node.name + "/" + path : node.name; + node = node.parent + } + } + , + hashName: (parentid, name) => { + var hash = 0; + for (var i = 0; i < name.length; i++) { + hash = (hash << 5) - hash + name.charCodeAt(i) | 0 + } + return (parentid + hash >>> 0) % FS.nameTable.length + } + , + hashAddNode: node => { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node + } + , + hashRemoveNode: node => { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break + } + current = current.name_next + } + } + } + , + lookupNode: (parent, name) => { + var errCode = FS.mayLookup(parent); + if (errCode) { + throw new FS.ErrnoError(errCode,parent) + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node + } + } + return FS.lookup(parent, name) + } + , + createNode: (parent, name, mode, rdev) => { + var node = new FS.FSNode(parent,name,mode,rdev); + FS.hashAddNode(node); + return node + } + , + destroyNode: node => { + FS.hashRemoveNode(node) + } + , + isRoot: node => { + return node === node.parent + } + , + isMountpoint: node => { + return !!node.mounted + } + , + isFile: mode => { + return (mode & 61440) === 32768 + } + , + isDir: mode => { + return (mode & 61440) === 16384 + } + , + isLink: mode => { + return (mode & 61440) === 40960 + } + , + isChrdev: mode => { + return (mode & 61440) === 8192 + } + , + isBlkdev: mode => { + return (mode & 61440) === 24576 + } + , + isFIFO: mode => { + return (mode & 61440) === 4096 + } + , + isSocket: mode => { + return (mode & 49152) === 49152 + } + , + flagsToPermissionString: flag => { + var perms = ["r", "w", "rw"][flag & 3]; + if (flag & 512) { + perms += "w" + } + return perms + } + , + nodePermissions: (node, perms) => { + if (FS.ignorePermissions) { + return 0 + } + if (perms.includes("r") && !(node.mode & 292)) { + return 2 + } else if (perms.includes("w") && !(node.mode & 146)) { + return 2 + } else if (perms.includes("x") && !(node.mode & 73)) { + return 2 + } + return 0 + } + , + mayLookup: dir => { + var errCode = FS.nodePermissions(dir, "x"); + if (errCode) + return errCode; + if (!dir.node_ops.lookup) + return 2; + return 0 + } + , + mayCreate: (dir, name) => { + try { + var node = FS.lookupNode(dir, name); + return 20 + } catch (e) {} + return FS.nodePermissions(dir, "wx") + } + , + mayDelete: (dir, name, isdir) => { + var node; + try { + node = FS.lookupNode(dir, name) + } catch (e) { + return e.errno + } + var errCode = FS.nodePermissions(dir, "wx"); + if (errCode) { + return errCode + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54 + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10 + } + } else { + if (FS.isDir(node.mode)) { + return 31 + } + } + return 0 + } + , + mayOpen: (node, flags) => { + if (!node) { + return 44 + } + if (FS.isLink(node.mode)) { + return 32 + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) { + return 31 + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)) + } + , + MAX_OPEN_FDS: 4096, + nextfd: (fd_start=0, fd_end=FS.MAX_OPEN_FDS) => { + for (var fd = fd_start; fd <= fd_end; fd++) { + if (!FS.streams[fd]) { + return fd + } + } + throw new FS.ErrnoError(33) + } + , + getStream: fd => FS.streams[fd], + createStream: (stream, fd_start, fd_end) => { + if (!FS.FSStream) { + FS.FSStream = function() { + this.shared = {} + } + ; + FS.FSStream.prototype = {}; + Object.defineProperties(FS.FSStream.prototype, { + object: { + get: function() { + return this.node + }, + set: function(val) { + this.node = val + } + }, + isRead: { + get: function() { + return (this.flags & 2097155) !== 1 + } + }, + isWrite: { + get: function() { + return (this.flags & 2097155) !== 0 + } + }, + isAppend: { + get: function() { + return this.flags & 1024 + } + }, + flags: { + get: function() { + return this.shared.flags + }, + set: function(val) { + this.shared.flags = val + } + }, + position: { + get: function() { + return this.shared.position + }, + set: function(val) { + this.shared.position = val + } + } + }) + } + stream = Object.assign(new FS.FSStream, stream); + var fd = FS.nextfd(fd_start, fd_end); + stream.fd = fd; + FS.streams[fd] = stream; + return stream + } + , + closeStream: fd => { + FS.streams[fd] = null + } + , + chrdev_stream_ops: { + open: stream => { + var device = FS.getDevice(stream.node.rdev); + stream.stream_ops = device.stream_ops; + if (stream.stream_ops.open) { + stream.stream_ops.open(stream) + } + } + , + llseek: () => { + throw new FS.ErrnoError(70) + } + }, + major: dev => dev >> 8, + minor: dev => dev & 255, + makedev: (ma, mi) => ma << 8 | mi, + registerDevice: (dev, ops) => { + FS.devices[dev] = { + stream_ops: ops + } + } + , + getDevice: dev => FS.devices[dev], + getMounts: mount => { + var mounts = []; + var check = [mount]; + while (check.length) { + var m = check.pop(); + mounts.push(m); + check.push.apply(check, m.mounts) + } + return mounts + } + , + syncfs: (populate, callback) => { + if (typeof populate == "function") { + callback = populate; + populate = false + } + FS.syncFSRequests++; + if (FS.syncFSRequests > 1) { + err("warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work") + } + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + function doCallback(errCode) { + FS.syncFSRequests--; + return callback(errCode) + } + function done(errCode) { + if (errCode) { + if (!done.errored) { + done.errored = true; + return doCallback(errCode) + } + return + } + if (++completed >= mounts.length) { + doCallback(null) + } + } + mounts.forEach(mount => { + if (!mount.type.syncfs) { + return done(null) + } + mount.type.syncfs(mount, populate, done) + } + ) + } + , + mount: (type, opts, mountpoint) => { + var root = mountpoint === "/"; + var pseudo = !mountpoint; + var node; + if (root && FS.root) { + throw new FS.ErrnoError(10) + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + mountpoint = lookup.path; + node = lookup.node; + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10) + } + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54) + } + } + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + if (root) { + FS.root = mountRoot + } else if (node) { + node.mounted = mount; + if (node.mount) { + node.mount.mounts.push(mount) + } + } + return mountRoot + } + , + unmount: mountpoint => { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28) + } + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + Object.keys(FS.nameTable).forEach(hash => { + var current = FS.nameTable[hash]; + while (current) { + var next = current.name_next; + if (mounts.includes(current.mount)) { + FS.destroyNode(current) + } + current = next + } + } + ); + node.mounted = null; + var idx = node.mount.mounts.indexOf(mount); + node.mount.mounts.splice(idx, 1) + } + , + lookup: (parent, name) => { + return parent.node_ops.lookup(parent, name) + } + , + mknod: (path, mode, dev) => { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === "." || name === "..") { + throw new FS.ErrnoError(28) + } + var errCode = FS.mayCreate(parent, name); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63) + } + return parent.node_ops.mknod(parent, name, mode, dev) + } + , + create: (path, mode) => { + mode = mode !== undefined ? mode : 438; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0) + } + , + mkdir: (path, mode) => { + mode = mode !== undefined ? mode : 511; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0) + } + , + mkdirTree: (path, mode) => { + var dirs = path.split("/"); + var d = ""; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) + continue; + d += "/" + dirs[i]; + try { + FS.mkdir(d, mode) + } catch (e) { + if (e.errno != 20) + throw e + } + } + } + , + mkdev: (path, mode, dev) => { + if (typeof dev == "undefined") { + dev = mode; + mode = 438 + } + mode |= 8192; + return FS.mknod(path, mode, dev) + } + , + symlink: (oldpath, newpath) => { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44) + } + var lookup = FS.lookupPath(newpath, { + parent: true + }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44) + } + var newname = PATH.basename(newpath); + var errCode = FS.mayCreate(parent, newname); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63) + } + return parent.node_ops.symlink(parent, newname, oldpath) + } + , + rename: (old_path, new_path) => { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + var lookup, old_dir, new_dir; + lookup = FS.lookupPath(old_path, { + parent: true + }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { + parent: true + }); + new_dir = lookup.node; + if (!old_dir || !new_dir) + throw new FS.ErrnoError(44); + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75) + } + var old_node = FS.lookupNode(old_dir, old_name); + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(28) + } + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(55) + } + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name) + } catch (e) {} + if (old_node === new_node) { + return + } + var isdir = FS.isDir(old_node.mode); + var errCode = FS.mayDelete(old_dir, old_name, isdir); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63) + } + if (FS.isMountpoint(old_node) || new_node && FS.isMountpoint(new_node)) { + throw new FS.ErrnoError(10) + } + if (new_dir !== old_dir) { + errCode = FS.nodePermissions(old_dir, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + } + FS.hashRemoveNode(old_node); + try { + old_dir.node_ops.rename(old_node, new_dir, new_name) + } catch (e) { + throw e + } finally { + FS.hashAddNode(old_node) + } + } + , + rmdir: path => { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, true); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63) + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10) + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node) + } + , + readdir: path => { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54) + } + return node.node_ops.readdir(node) + } + , + unlink: path => { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44) + } + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, false); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63) + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10) + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node) + } + , + readlink: path => { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44) + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28) + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)) + } + , + stat: (path, dontFollow) => { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44) + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63) + } + return node.node_ops.getattr(node) + } + , + lstat: path => { + return FS.stat(path, true) + } + , + chmod: (path, mode, dontFollow) => { + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node + } else { + node = path + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63) + } + node.node_ops.setattr(node, { + mode: mode & 4095 | node.mode & ~4095, + timestamp: Date.now() + }) + } + , + lchmod: (path, mode) => { + FS.chmod(path, mode, true) + } + , + fchmod: (fd, mode) => { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8) + } + FS.chmod(stream.node, mode) + } + , + chown: (path, uid, gid, dontFollow) => { + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node + } else { + node = path + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63) + } + node.node_ops.setattr(node, { + timestamp: Date.now() + }) + } + , + lchown: (path, uid, gid) => { + FS.chown(path, uid, gid, true) + } + , + fchown: (fd, uid, gid) => { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8) + } + FS.chown(stream.node, uid, gid) + } + , + truncate: (path, len) => { + if (len < 0) { + throw new FS.ErrnoError(28) + } + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: true + }); + node = lookup.node + } else { + node = path + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63) + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31) + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28) + } + var errCode = FS.nodePermissions(node, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }) + } + , + ftruncate: (fd, len) => { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8) + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28) + } + FS.truncate(stream.node, len) + } + , + utime: (path, atime, mtime) => { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }) + } + , + open: (path, flags, mode) => { + if (path === "") { + throw new FS.ErrnoError(44) + } + flags = typeof flags == "string" ? FS_modeStringToFlags(flags) : flags; + mode = typeof mode == "undefined" ? 438 : mode; + if (flags & 64) { + mode = mode & 4095 | 32768 + } else { + mode = 0 + } + var node; + if (typeof path == "object") { + node = path + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node + } catch (e) {} + } + var created = false; + if (flags & 64) { + if (node) { + if (flags & 128) { + throw new FS.ErrnoError(20) + } + } else { + node = FS.mknod(path, mode, 0); + created = true + } + } + if (!node) { + throw new FS.ErrnoError(44) + } + if (FS.isChrdev(node.mode)) { + flags &= ~512 + } + if (flags & 65536 && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54) + } + if (!created) { + var errCode = FS.mayOpen(node, flags); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + } + if (flags & 512 && !created) { + FS.truncate(node, 0) + } + flags &= ~(128 | 512 | 131072); + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + ungotten: [], + error: false + }); + if (stream.stream_ops.open) { + stream.stream_ops.open(stream) + } + if (Module["logReadFiles"] && !(flags & 1)) { + if (!FS.readFiles) + FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1 + } + } + return stream + } + , + close: stream => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8) + } + if (stream.getdents) + stream.getdents = null; + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream) + } + } catch (e) { + throw e + } finally { + FS.closeStream(stream.fd) + } + stream.fd = null + } + , + isClosed: stream => { + return stream.fd === null + } + , + llseek: (stream, offset, whence) => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8) + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70) + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28) + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position + } + , + read: (stream, buffer, offset, length, position) => { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28) + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8) + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8) + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31) + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28) + } + var seeking = typeof position != "undefined"; + if (!seeking) { + position = stream.position + } else if (!stream.seekable) { + throw new FS.ErrnoError(70) + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) + stream.position += bytesRead; + return bytesRead + } + , + write: (stream, buffer, offset, length, position, canOwn) => { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28) + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8) + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8) + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31) + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28) + } + if (stream.seekable && stream.flags & 1024) { + FS.llseek(stream, 0, 2) + } + var seeking = typeof position != "undefined"; + if (!seeking) { + position = stream.position + } else if (!stream.seekable) { + throw new FS.ErrnoError(70) + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) + stream.position += bytesWritten; + return bytesWritten + } + , + allocate: (stream, offset, length) => { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8) + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28) + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8) + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43) + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138) + } + stream.stream_ops.allocate(stream, offset, length) + } + , + mmap: (stream, length, position, prot, flags) => { + if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2) + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2) + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43) + } + return stream.stream_ops.mmap(stream, length, position, prot, flags) + } + , + msync: (stream, buffer, offset, length, mmapFlags) => { + if (!stream.stream_ops.msync) { + return 0 + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags) + } + , + munmap: stream => 0, + ioctl: (stream, cmd, arg) => { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59) + } + return stream.stream_ops.ioctl(stream, cmd, arg) + } + , + readFile: (path, opts={}) => { + opts.flags = opts.flags || 0; + opts.encoding = opts.encoding || "binary"; + if (opts.encoding !== "utf8" && opts.encoding !== "binary") { + throw new Error('Invalid encoding type "' + opts.encoding + '"') + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === "utf8") { + ret = UTF8ArrayToString(buf, 0) + } else if (opts.encoding === "binary") { + ret = buf + } + FS.close(stream); + return ret + } + , + writeFile: (path, data, opts={}) => { + opts.flags = opts.flags || 577; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data == "string") { + var buf = new Uint8Array(lengthBytesUTF8(data) + 1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn) + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn) + } else { + throw new Error("Unsupported data type") + } + FS.close(stream) + } + , + cwd: () => FS.currentPath, + chdir: path => { + var lookup = FS.lookupPath(path, { + follow: true + }); + if (lookup.node === null) { + throw new FS.ErrnoError(44) + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54) + } + var errCode = FS.nodePermissions(lookup.node, "x"); + if (errCode) { + throw new FS.ErrnoError(errCode) + } + FS.currentPath = lookup.path + } + , + createDefaultDirectories: () => { + FS.mkdir("/tmp"); + FS.mkdir("/home"); + FS.mkdir("/home/web_user") + } + , + createDefaultDevices: () => { + FS.mkdir("/dev"); + FS.registerDevice(FS.makedev(1, 3), { + read: () => 0, + write: (stream, buffer, offset, length, pos) => length + }); + FS.mkdev("/dev/null", FS.makedev(1, 3)); + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev("/dev/tty", FS.makedev(5, 0)); + FS.mkdev("/dev/tty1", FS.makedev(6, 0)); + var randomBuffer = new Uint8Array(1024) + , randomLeft = 0; + var randomByte = () => { + if (randomLeft === 0) { + randomLeft = randomFill(randomBuffer).byteLength + } + return randomBuffer[--randomLeft] + } + ; + FS.createDevice("/dev", "random", randomByte); + FS.createDevice("/dev", "urandom", randomByte); + FS.mkdir("/dev/shm"); + FS.mkdir("/dev/shm/tmp") + } + , + createSpecialDirectories: () => { + FS.mkdir("/proc"); + var proc_self = FS.mkdir("/proc/self"); + FS.mkdir("/proc/self/fd"); + FS.mount({ + mount: () => { + var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: (parent, name) => { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) + throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: { + mountpoint: "fake" + }, + node_ops: { + readlink: () => stream.path + } + }; + ret.parent = ret; + return ret + } + }; + return node + } + }, {}, "/proc/self/fd") + } + , + createStandardStreams: () => { + if (Module["stdin"]) { + FS.createDevice("/dev", "stdin", Module["stdin"]) + } else { + FS.symlink("/dev/tty", "/dev/stdin") + } + if (Module["stdout"]) { + FS.createDevice("/dev", "stdout", null, Module["stdout"]) + } else { + FS.symlink("/dev/tty", "/dev/stdout") + } + if (Module["stderr"]) { + FS.createDevice("/dev", "stderr", null, Module["stderr"]) + } else { + FS.symlink("/dev/tty1", "/dev/stderr") + } + var stdin = FS.open("/dev/stdin", 0); + var stdout = FS.open("/dev/stdout", 1); + var stderr = FS.open("/dev/stderr", 1) + } + , + ensureErrnoError: () => { + if (FS.ErrnoError) + return; + FS.ErrnoError = function ErrnoError(errno, node) { + this.name = "ErrnoError"; + this.node = node; + this.setErrno = function(errno) { + this.errno = errno + } + ; + this.setErrno(errno); + this.message = "FS error" + } + ; + FS.ErrnoError.prototype = new Error; + FS.ErrnoError.prototype.constructor = FS.ErrnoError; + [44].forEach(code => { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = "" + } + ) + } + , + staticInit: () => { + FS.ensureErrnoError(); + FS.nameTable = new Array(4096); + FS.mount(MEMFS, {}, "/"); + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + FS.filesystems = { + "MEMFS": MEMFS, + "IDBFS": IDBFS + } + } + , + init: (input, output, error) => { + FS.init.initialized = true; + FS.ensureErrnoError(); + Module["stdin"] = input || Module["stdin"]; + Module["stdout"] = output || Module["stdout"]; + Module["stderr"] = error || Module["stderr"]; + FS.createStandardStreams() + } + , + quit: () => { + FS.init.initialized = false; + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue + } + FS.close(stream) + } + } + , + findObject: (path, dontResolveLastLink) => { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (!ret.exists) { + return null + } + return ret.object + } + , + analyzePath: (path, dontResolveLastLink) => { + try { + var lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + path = lookup.path + } catch (e) {} + var ret = { + isRoot: false, + exists: false, + error: 0, + name: null, + path: null, + object: null, + parentExists: false, + parentPath: null, + parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { + parent: true + }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === "/" + } catch (e) { + ret.error = e.errno + } + return ret + } + , + createPath: (parent, path, canRead, canWrite) => { + parent = typeof parent == "string" ? parent : FS.getPath(parent); + var parts = path.split("/").reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) + continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current) + } catch (e) {} + parent = current + } + return current + } + , + createFile: (parent, name, properties, canRead, canWrite) => { + var path = PATH.join2(typeof parent == "string" ? parent : FS.getPath(parent), name); + var mode = FS_getMode(canRead, canWrite); + return FS.create(path, mode) + } + , + createDataFile: (parent, name, data, canRead, canWrite, canOwn) => { + var path = name; + if (parent) { + parent = typeof parent == "string" ? parent : FS.getPath(parent); + path = name ? PATH.join2(parent, name) : parent + } + var mode = FS_getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data == "string") { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) + arr[i] = data.charCodeAt(i); + data = arr + } + FS.chmod(node, mode | 146); + var stream = FS.open(node, 577); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode) + } + return node + } + , + createDevice: (parent, name, input, output) => { + var path = PATH.join2(typeof parent == "string" ? parent : FS.getPath(parent), name); + var mode = FS_getMode(!!input, !!output); + if (!FS.createDevice.major) + FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + FS.registerDevice(dev, { + open: stream => { + stream.seekable = false + } + , + close: stream => { + if (output && output.buffer && output.buffer.length) { + output(10) + } + } + , + read: (stream, buffer, offset, length, pos) => { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input() + } catch (e) { + throw new FS.ErrnoError(29) + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6) + } + if (result === null || result === undefined) + break; + bytesRead++; + buffer[offset + i] = result + } + if (bytesRead) { + stream.node.timestamp = Date.now() + } + return bytesRead + } + , + write: (stream, buffer, offset, length, pos) => { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset + i]) + } catch (e) { + throw new FS.ErrnoError(29) + } + } + if (length) { + stream.node.timestamp = Date.now() + } + return i + } + }); + return FS.mkdev(path, mode, dev) + } + , + forceLoadFile: obj => { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) + return true; + 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 (read_) { + try { + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length + } catch (e) { + throw new FS.ErrnoError(29) + } + } else { + throw new Error("Cannot load without read() or XMLHttpRequest.") + } + } + , + createLazyFile: (parent, name, url, canRead, canWrite) => { + function LazyUint8Array() { + this.lengthKnown = false; + this.chunks = [] + } + LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { + if (idx > this.length - 1 || idx < 0) { + return undefined + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = idx / this.chunkSize | 0; + return this.getter(chunkNum)[chunkOffset] + } + ; + LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { + this.getter = getter + } + ; + LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { + var xhr = new XMLHttpRequest; + xhr.open("HEAD", url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) + throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + var chunkSize = 1024 * 1024; + if (!hasByteServing) + chunkSize = datalength; + var doXHR = (from, to) => { + if (from > to) + throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength - 1) + throw new Error("only " + datalength + " bytes available! programmer error!"); + var xhr = new XMLHttpRequest; + xhr.open("GET", url, false); + if (datalength !== chunkSize) + xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + xhr.responseType = "arraybuffer"; + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain; charset=x-user-defined") + } + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) + throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []) + } + return intArrayFromString(xhr.responseText || "", true) + } + ; + var lazyArray = this; + lazyArray.setDataGetter(chunkNum => { + var start = chunkNum * chunkSize; + var end = (chunkNum + 1) * chunkSize - 1; + end = Math.min(end, datalength - 1); + if (typeof lazyArray.chunks[chunkNum] == "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end) + } + if (typeof lazyArray.chunks[chunkNum] == "undefined") + throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum] + } + ); + if (usesGzip || !datalength) { + chunkSize = datalength = 1; + datalength = this.getter(0).length; + chunkSize = datalength; + out("LazyFiles on gzip forces download of the whole file when length is accessed") + } + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true + } + ; + if (typeof XMLHttpRequest != "undefined") { + if (!ENVIRONMENT_IS_WORKER) + throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"; + var lazyArray = new LazyUint8Array; + Object.defineProperties(lazyArray, { + length: { + get: function() { + if (!this.lengthKnown) { + this.cacheLength() + } + return this._length + } + }, + chunkSize: { + get: function() { + if (!this.lengthKnown) { + this.cacheLength() + } + return this._chunkSize + } + } + }); + var properties = { + isDevice: false, + contents: lazyArray + } + } else { + var properties = { + isDevice: false, + url: url + } + } + var node = FS.createFile(parent, name, properties, canRead, canWrite); + if (properties.contents) { + node.contents = properties.contents + } else if (properties.url) { + node.contents = null; + node.url = properties.url + } + Object.defineProperties(node, { + usedBytes: { + get: function() { + return this.contents.length + } + } + }); + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(key => { + var fn = node.stream_ops[key]; + stream_ops[key] = function forceLoadLazyFile() { + FS.forceLoadFile(node); + return fn.apply(null, arguments) + } + } + ); + function writeChunks(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= contents.length) + return 0; + var size = Math.min(contents.length - position, length); + if (contents.slice) { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i] + } + } else { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents.get(position + i) + } + } + return size + } + stream_ops.read = (stream, buffer, offset, length, position) => { + FS.forceLoadFile(node); + return writeChunks(stream, buffer, offset, length, position) + } + ; + stream_ops.mmap = (stream, length, position, prot, flags) => { + FS.forceLoadFile(node); + var ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48) + } + writeChunks(stream, HEAP8, ptr, length, position); + return { + ptr: ptr, + allocated: true + } + } + ; + node.stream_ops = stream_ops; + return node + } + }; + var SYSCALLS = { + DEFAULT_POLLMASK: 5, + calculateAt: function(dirfd, path, allowEmpty) { + if (PATH.isAbs(path)) { + return path + } + var dir; + if (dirfd === -100) { + dir = FS.cwd() + } else { + var dirstream = SYSCALLS.getStreamFromFD(dirfd); + dir = dirstream.path + } + if (path.length == 0) { + if (!allowEmpty) { + throw new FS.ErrnoError(44) + } + return dir + } + return PATH.join2(dir, path) + }, + doStat: function(func, path, buf) { + try { + var stat = func(path) + } catch (e) { + if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) { + return -54 + } + throw e + } + HEAP32[buf >> 2] = stat.dev; + HEAP32[buf + 8 >> 2] = stat.ino; + HEAP32[buf + 12 >> 2] = stat.mode; + HEAPU32[buf + 16 >> 2] = stat.nlink; + HEAP32[buf + 20 >> 2] = stat.uid; + HEAP32[buf + 24 >> 2] = stat.gid; + HEAP32[buf + 28 >> 2] = stat.rdev; + tempI64 = [stat.size >>> 0, (tempDouble = stat.size, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[buf + 40 >> 2] = tempI64[0], + HEAP32[buf + 44 >> 2] = tempI64[1]; + HEAP32[buf + 48 >> 2] = 4096; + HEAP32[buf + 52 >> 2] = stat.blocks; + var atime = stat.atime.getTime(); + var mtime = stat.mtime.getTime(); + var ctime = stat.ctime.getTime(); + tempI64 = [Math.floor(atime / 1e3) >>> 0, (tempDouble = Math.floor(atime / 1e3), + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[buf + 56 >> 2] = tempI64[0], + HEAP32[buf + 60 >> 2] = tempI64[1]; + HEAPU32[buf + 64 >> 2] = atime % 1e3 * 1e3; + tempI64 = [Math.floor(mtime / 1e3) >>> 0, (tempDouble = Math.floor(mtime / 1e3), + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[buf + 72 >> 2] = tempI64[0], + HEAP32[buf + 76 >> 2] = tempI64[1]; + HEAPU32[buf + 80 >> 2] = mtime % 1e3 * 1e3; + tempI64 = [Math.floor(ctime / 1e3) >>> 0, (tempDouble = Math.floor(ctime / 1e3), + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[buf + 88 >> 2] = tempI64[0], + HEAP32[buf + 92 >> 2] = tempI64[1]; + HEAPU32[buf + 96 >> 2] = ctime % 1e3 * 1e3; + tempI64 = [stat.ino >>> 0, (tempDouble = stat.ino, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[buf + 104 >> 2] = tempI64[0], + HEAP32[buf + 108 >> 2] = tempI64[1]; + return 0 + }, + doMsync: function(addr, stream, len, flags, offset) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43) + } + if (flags & 2) { + return 0 + } + var buffer = HEAPU8.slice(addr, addr + len); + FS.msync(stream, buffer, offset, len, flags) + }, + varargs: undefined, + get: function() { + SYSCALLS.varargs += 4; + var ret = HEAP32[SYSCALLS.varargs - 4 >> 2]; + return ret + }, + getStr: function(ptr) { + var ret = UTF8ToString(ptr); + return ret + }, + getStreamFromFD: function(fd) { + var stream = FS.getStream(fd); + if (!stream) + throw new FS.ErrnoError(8); + return stream + } + }; + function _proc_exit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + if (Module["onExit"]) + Module["onExit"](code); + ABORT = true + } + quit_(code, new ExitStatus(code)) + } + function exitJS(status, implicit) { + EXITSTATUS = status; + _proc_exit(status) + } + var _exit = exitJS; + function maybeExit() { + if (!keepRuntimeAlive()) { + try { + _exit(EXITSTATUS) + } catch (e) { + handleException(e) + } + } + } + function callUserCallback(func) { + if (ABORT) { + return + } + try { + func(); + maybeExit() + } catch (e) { + handleException(e) + } + } + function safeSetTimeout(func, timeout) { + return setTimeout( () => { + callUserCallback(func) + } + , timeout) + } + function warnOnce(text) { + if (!warnOnce.shown) + warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + err(text) + } + } + var Browser = { + mainLoop: { + running: false, + scheduler: null, + method: "", + currentlyRunningMainloop: 0, + func: null, + arg: 0, + timingMode: 0, + timingValue: 0, + currentFrameNumber: 0, + queue: [], + pause: function() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++ + }, + resume: function() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + setMainLoop(func, 0, false, Browser.mainLoop.arg, true); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler() + }, + updateStatus: function() { + if (Module["setStatus"]) { + var message = Module["statusMessage"] || "Please wait..."; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module["setStatus"](message + " (" + (expected - remaining) + "/" + expected + ")") + } else { + Module["setStatus"](message) + } + } else { + Module["setStatus"]("") + } + } + }, + runIter: function(func) { + if (ABORT) + return; + if (Module["preMainLoop"]) { + var preRet = Module["preMainLoop"](); + if (preRet === false) { + return + } + } + callUserCallback(func); + if (Module["postMainLoop"]) + Module["postMainLoop"]() + } + }, + isFullscreen: false, + pointerLock: false, + moduleContextCreatedCallbacks: [], + workers: [], + init: function() { + if (Browser.initted) + return; + Browser.initted = true; + var imagePlugin = {}; + imagePlugin["canHandle"] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name) + } + ; + imagePlugin["handle"] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = new Blob([byteArray],{ + type: Browser.getMimetype(name) + }); + if (b.size !== byteArray.length) { + b = new Blob([new Uint8Array(byteArray).buffer],{ + type: Browser.getMimetype(name) + }) + } + var url = URL.createObjectURL(b); + var img = new Image; + img.onload = () => { + assert(img.complete, "Image " + name + " could not be decoded"); + var canvas = document.createElement("canvas"); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + preloadedImages[name] = canvas; + URL.revokeObjectURL(url); + if (onload) + onload(byteArray) + } + ; + img.onerror = event => { + out("Image " + url + " could not be decoded"); + if (onerror) + onerror() + } + ; + img.src = url + } + ; + preloadPlugins.push(imagePlugin); + var audioPlugin = {}; + audioPlugin["canHandle"] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4)in { + ".ogg": 1, + ".wav": 1, + ".mp3": 1 + } + } + ; + audioPlugin["handle"] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) + return; + done = true; + preloadedAudios[name] = audio; + if (onload) + onload(byteArray) + } + var b = new Blob([byteArray],{ + type: Browser.getMimetype(name) + }); + var url = URL.createObjectURL(b); + var audio = new Audio; + audio.addEventListener("canplaythrough", () => finish(audio), false); + audio.onerror = function audio_onerror(event) { + if (done) + return; + err("warning: browser could not fully decode audio " + name + ", trying slower base64 approach"); + function encode64(data) { + var BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var PAD = "="; + var ret = ""; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = leftchar << 8 | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = leftchar >> leftbits - 6 & 63; + leftbits -= 6; + ret += BASE[curr] + } + } + if (leftbits == 2) { + ret += BASE[(leftchar & 3) << 4]; + ret += PAD + PAD + } else if (leftbits == 4) { + ret += BASE[(leftchar & 15) << 2]; + ret += PAD + } + return ret + } + audio.src = "data:audio/x-" + name.substr(-3) + ";base64," + encode64(byteArray); + finish(audio) + } + ; + audio.src = url; + safeSetTimeout( () => { + finish(audio) + } + , 1e4) + } + ; + preloadPlugins.push(audioPlugin); + function pointerLockChange() { + Browser.pointerLock = document["pointerLockElement"] === Module["canvas"] || document["mozPointerLockElement"] === Module["canvas"] || document["webkitPointerLockElement"] === Module["canvas"] || document["msPointerLockElement"] === Module["canvas"] + } + var canvas = Module["canvas"]; + if (canvas) { + canvas.requestPointerLock = canvas["requestPointerLock"] || canvas["mozRequestPointerLock"] || canvas["webkitRequestPointerLock"] || canvas["msRequestPointerLock"] || ( () => {} + ); + canvas.exitPointerLock = document["exitPointerLock"] || document["mozExitPointerLock"] || document["webkitExitPointerLock"] || document["msExitPointerLock"] || ( () => {} + ); + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + document.addEventListener("pointerlockchange", pointerLockChange, false); + document.addEventListener("mozpointerlockchange", pointerLockChange, false); + document.addEventListener("webkitpointerlockchange", pointerLockChange, false); + document.addEventListener("mspointerlockchange", pointerLockChange, false); + if (Module["elementPointerLock"]) { + canvas.addEventListener("click", ev => { + if (!Browser.pointerLock && Module["canvas"].requestPointerLock) { + Module["canvas"].requestPointerLock(); + ev.preventDefault() + } + } + , false) + } + } + }, + createContext: function(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) + return Module.ctx; + var ctx; + var contextHandle; + if (useWebGL) { + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: typeof WebGL2RenderingContext != "undefined" ? 2 : 1 + }; + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute] + } + } + if (typeof GL != "undefined") { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx + } + } + } else { + ctx = canvas.getContext("2d") + } + if (!ctx) + return null; + if (setInModule) { + if (!useWebGL) + assert(typeof GLctx == "undefined", "cannot set in module if GLctx is used, but we are a non-GL context that would replace it"); + Module.ctx = ctx; + if (useWebGL) + GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(callback => callback()); + Browser.init() + } + return ctx + }, + destroyContext: function(canvas, useWebGL, setInModule) {}, + fullscreenHandlersInstalled: false, + lockPointer: undefined, + resizeCanvas: undefined, + requestFullscreen: function(lockPointer, resizeCanvas) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + if (typeof Browser.lockPointer == "undefined") + Browser.lockPointer = true; + if (typeof Browser.resizeCanvas == "undefined") + Browser.resizeCanvas = false; + var canvas = Module["canvas"]; + function fullscreenChange() { + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) + canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize() + } else { + Browser.updateCanvasDimensions(canvas) + } + } else { + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize() + } else { + Browser.updateCanvasDimensions(canvas) + } + } + if (Module["onFullScreen"]) + Module["onFullScreen"](Browser.isFullscreen); + if (Module["onFullscreen"]) + Module["onFullscreen"](Browser.isFullscreen) + } + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener("fullscreenchange", fullscreenChange, false); + document.addEventListener("mozfullscreenchange", fullscreenChange, false); + document.addEventListener("webkitfullscreenchange", fullscreenChange, false); + document.addEventListener("MSFullscreenChange", fullscreenChange, false) + } + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + canvasContainer.requestFullscreen = canvasContainer["requestFullscreen"] || canvasContainer["mozRequestFullScreen"] || canvasContainer["msRequestFullscreen"] || (canvasContainer["webkitRequestFullscreen"] ? () => canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]) : null) || (canvasContainer["webkitRequestFullScreen"] ? () => canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]) : null); + canvasContainer.requestFullscreen() + }, + exitFullscreen: function() { + if (!Browser.isFullscreen) { + return false + } + var CFS = document["exitFullscreen"] || document["cancelFullScreen"] || document["mozCancelFullScreen"] || document["msExitFullscreen"] || document["webkitCancelFullScreen"] || ( () => {} + ); + CFS.apply(document, []); + return true + }, + nextRAF: 0, + fakeRequestAnimationFrame: function(func) { + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1e3 / 60 + } else { + while (now + 2 >= Browser.nextRAF) { + Browser.nextRAF += 1e3 / 60 + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay) + }, + requestAnimationFrame: function(func) { + if (typeof requestAnimationFrame == "function") { + requestAnimationFrame(func); + return + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func) + }, + safeSetTimeout: function(func, timeout) { + return safeSetTimeout(func, timeout) + }, + safeRequestAnimationFrame: function(func) { + return Browser.requestAnimationFrame( () => { + callUserCallback(func) + } + ) + }, + getMimetype: function(name) { + return { + "jpg": "image/jpeg", + "jpeg": "image/jpeg", + "png": "image/png", + "bmp": "image/bmp", + "ogg": "audio/ogg", + "wav": "audio/wav", + "mp3": "audio/mpeg" + }[name.substr(name.lastIndexOf(".") + 1)] + }, + getUserMedia: function(func) { + if (!window.getUserMedia) { + window.getUserMedia = navigator["getUserMedia"] || navigator["mozGetUserMedia"] + } + window.getUserMedia(func) + }, + getMovementX: function(event) { + return event["movementX"] || event["mozMovementX"] || event["webkitMovementX"] || 0 + }, + getMovementY: function(event) { + return event["movementY"] || event["mozMovementY"] || event["webkitMovementY"] || 0 + }, + getMouseWheelDelta: function(event) { + var delta = 0; + switch (event.type) { + case "DOMMouseScroll": + delta = event.detail / 3; + break; + case "mousewheel": + delta = event.wheelDelta / 120; + break; + case "wheel": + delta = event.deltaY; + switch (event.deltaMode) { + case 0: + delta /= 100; + break; + case 1: + delta /= 3; + break; + case 2: + delta *= 80; + break; + default: + throw "unrecognized mouse wheel delta mode: " + event.deltaMode + } + break; + default: + throw "unrecognized mouse wheel event: " + event.type + } + return delta + }, + mouseX: 0, + mouseY: 0, + mouseMovementX: 0, + mouseMovementY: 0, + touches: {}, + lastTouches: {}, + calculateMouseEvent: function(event) { + if (Browser.pointerLock) { + if (event.type != "mousemove" && "mozMovementX"in event) { + Browser.mouseMovementX = Browser.mouseMovementY = 0 + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event) + } + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY + } else { + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY + } + } else { + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + var scrollX = typeof window.scrollX != "undefined" ? window.scrollX : window.pageXOffset; + var scrollY = typeof window.scrollY != "undefined" ? window.scrollY : window.pageYOffset; + if (event.type === "touchstart" || event.type === "touchend" || event.type === "touchmove") { + var touch = event.touch; + if (touch === undefined) { + return + } + var adjustedX = touch.pageX - (scrollX + rect.left); + var adjustedY = touch.pageY - (scrollY + rect.top); + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + var coords = { + x: adjustedX, + y: adjustedY + }; + if (event.type === "touchstart") { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords + } else if (event.type === "touchend" || event.type === "touchmove") { + var last = Browser.touches[touch.identifier]; + if (!last) + last = coords; + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords + } + return + } + var x = event.pageX - (scrollX + rect.left); + var y = event.pageY - (scrollY + rect.top); + x = x * (cw / rect.width); + y = y * (ch / rect.height); + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y + } + }, + resizeListeners: [], + updateResizeListeners: function() { + var canvas = Module["canvas"]; + Browser.resizeListeners.forEach(listener => listener(canvas.width, canvas.height)) + }, + setCanvasSize: function(width, height, noUpdates) { + var canvas = Module["canvas"]; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) + Browser.updateResizeListeners() + }, + windowedWidth: 0, + windowedHeight: 0, + setFullscreenCanvasSize: function() { + if (typeof SDL != "undefined") { + var flags = HEAPU32[SDL.screen >> 2]; + flags = flags | 8388608; + HEAP32[SDL.screen >> 2] = flags + } + Browser.updateCanvasDimensions(Module["canvas"]); + Browser.updateResizeListeners() + }, + setWindowedCanvasSize: function() { + if (typeof SDL != "undefined") { + var flags = HEAPU32[SDL.screen >> 2]; + flags = flags & ~8388608; + HEAP32[SDL.screen >> 2] = flags + } + Browser.updateCanvasDimensions(Module["canvas"]); + Browser.updateResizeListeners() + }, + updateCanvasDimensions: function(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative + } + var w = wNative; + var h = hNative; + if (Module["forcedAspectRatio"] && Module["forcedAspectRatio"] > 0) { + if (w / h < Module["forcedAspectRatio"]) { + w = Math.round(h * Module["forcedAspectRatio"]) + } else { + h = Math.round(w / Module["forcedAspectRatio"]) + } + } + if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvas.parentNode && typeof screen != "undefined") { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor) + } + if (Browser.resizeCanvas) { + if (canvas.width != w) + canvas.width = w; + if (canvas.height != h) + canvas.height = h; + if (typeof canvas.style != "undefined") { + canvas.style.removeProperty("width"); + canvas.style.removeProperty("height") + } + } else { + if (canvas.width != wNative) + canvas.width = wNative; + if (canvas.height != hNative) + canvas.height = hNative; + if (typeof canvas.style != "undefined") { + if (w != wNative || h != hNative) { + canvas.style.setProperty("width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important") + } else { + canvas.style.removeProperty("width"); + canvas.style.removeProperty("height") + } + } + } + } + }; + function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + if (!Browser.mainLoop.func) { + return 1 + } + if (!Browser.mainLoop.running) { + Browser.mainLoop.running = true + } + if (mode == 0) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now()) | 0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick) + } + ; + Browser.mainLoop.method = "timeout" + } else if (mode == 1) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner) + } + ; + Browser.mainLoop.method = "rAF" + } else if (mode == 2) { + if (typeof setImmediate == "undefined") { + var setImmediates = []; + var emscriptenMainLoopMessageId = "setimmediate"; + var Browser_setImmediate_messageHandler = event => { + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()() + } + } + ; + addEventListener("message", Browser_setImmediate_messageHandler, true); + setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module["setImmediates"] === undefined) + Module["setImmediates"] = []; + Module["setImmediates"].push(func); + postMessage({ + target: emscriptenMainLoopMessageId + }) + } else + postMessage(emscriptenMainLoopMessageId, "*") + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + setImmediate(Browser.mainLoop.runner) + } + ; + Browser.mainLoop.method = "immediate" + } + return 0 + } + var _emscripten_get_now; + _emscripten_get_now = () => performance.now(); + function setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) { + assert(!Browser.mainLoop.func, "emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."); + Browser.mainLoop.func = browserIterationFunc; + Browser.mainLoop.arg = arg; + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + function checkIsRunning() { + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) { + return false + } + return true + } + Browser.mainLoop.running = false; + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + if (ABORT) + return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next + } else { + next = next + .5; + Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9 + } + } + out('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + " ms"); + Browser.mainLoop.updateStatus(); + if (!checkIsRunning()) + return; + setTimeout(Browser.mainLoop.runner, 0); + return + } + if (!checkIsRunning()) + return; + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1 && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + Browser.mainLoop.scheduler(); + return + } else if (Browser.mainLoop.timingMode == 0) { + Browser.mainLoop.tickStartTime = _emscripten_get_now() + } + GL.newRenderingFrameStarted(); + Browser.mainLoop.runIter(browserIterationFunc); + if (!checkIsRunning()) + return; + if (typeof SDL == "object" && SDL.audio && SDL.audio.queueNewAudioData) + SDL.audio.queueNewAudioData(); + Browser.mainLoop.scheduler() + } + ; + if (!noSetTiming) { + if (fps && fps > 0) + _emscripten_set_main_loop_timing(0, 1e3 / fps); + else + _emscripten_set_main_loop_timing(1, 1); + Browser.mainLoop.scheduler() + } + if (simulateInfiniteLoop) { + throw "unwind" + } + } + function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop) { + var browserIterationFunc = () => dynCall_v.call(null, func); + setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop) + } + function _JS_SetMainLoop(func, fps, simulateInfiniteLoop) { + try { + _emscripten_set_main_loop(func, fps, simulateInfiniteLoop) + } catch {} + } + var WEBAudio = { + audioInstanceIdCounter: 0, + audioInstances: {}, + audioContext: null, + audioWebEnabled: 0, + audioCache: [], + pendingAudioSources: {}, + FAKEMOD_SAMPLERATE: 44100 + }; + function jsAudioMixinSetPitch(source) { + source.estimatePlaybackPosition = function() { + var t = (WEBAudio.audioContext.currentTime - source.playbackStartTime) * source.playbackRate.value; + if (source.loop && t >= source.loopStart) { + t = (t - source.loopStart) % (source.loopEnd - source.loopStart) + source.loopStart + } + return t + } + ; + source.setPitch = function(newPitch) { + var curPosition = source.estimatePlaybackPosition(); + if (curPosition >= 0) { + source.playbackStartTime = WEBAudio.audioContext.currentTime - curPosition / newPitch + } + if (source.playbackRate.value !== newPitch) + source.playbackRate.value = newPitch + } + } + function jsAudioCreateUncompressedSoundClip(buffer, error) { + var soundClip = { + buffer: buffer, + error: error + }; + soundClip.release = function() {} + ; + soundClip.getLength = function() { + if (!this.buffer) { + console.log("Trying to get length of sound which is not loaded."); + return 0 + } + return this.buffer.length + } + ; + soundClip.getData = function(ptr, length) { + if (!this.buffer) { + console.log("Trying to get data of sound which is not loaded."); + return 0 + } + var startOutputBuffer = ptr >> 2; + var output = HEAPF32.subarray(startOutputBuffer, startOutputBuffer + (length >> 2)); + var numMaxSamples = Math.floor((length >> 2) / this.buffer.numberOfChannels); + var numReadSamples = Math.min(this.buffer.length, numMaxSamples); + for (var i = 0; i < this.buffer.numberOfChannels; i++) { + var channelData = this.buffer.getChannelData(i).subarray(0, numReadSamples); + output.set(channelData, i * numReadSamples) + } + return numReadSamples * this.buffer.numberOfChannels * 4 + } + ; + soundClip.getNumberOfChannels = function() { + if (!this.buffer) { + console.log("Trying to get metadata of sound which is not loaded."); + return 0 + } + return this.buffer.numberOfChannels + } + ; + soundClip.getFrequency = function() { + if (!this.buffer) { + console.log("Trying to get metadata of sound which is not loaded."); + return 0 + } + return this.buffer.sampleRate + } + ; + soundClip.createSourceNode = function() { + if (!this.buffer) { + console.log("Trying to play sound which is not loaded.") + } + var source = WEBAudio.audioContext.createBufferSource(); + source.buffer = this.buffer; + jsAudioMixinSetPitch(source); + return source + } + ; + return soundClip + } + function jsAudioCreateChannel(callback, userData) { + var channel = { + callback: callback, + userData: userData, + source: null, + gain: WEBAudio.audioContext.createGain(), + panner: WEBAudio.audioContext.createPanner(), + spatialBlendDryGain: WEBAudio.audioContext.createGain(), + spatialBlendWetGain: WEBAudio.audioContext.createGain(), + spatialBlendLevel: 0, + loop: false, + loopStart: 0, + loopEnd: 0, + pitch: 1 + }; + channel.panner.rolloffFactor = 0; + channel.release = function() { + this.disconnectSource(); + this.gain.disconnect(); + this.panner.disconnect() + } + ; + channel.playSoundClip = function(soundClip, startTime, startOffset) { + try { + var self = this; + this.source = soundClip.createSourceNode(); + this.configurePanningNodes(); + this.setSpatialBlendLevel(this.spatialBlendLevel); + this.source.onended = function() { + self.source.isStopped = true; + self.disconnectSource(); + if (self.callback) { + (a1 => dynCall_vi.apply(null, [self.callback, a1]))(self.userData) + } + } + ; + this.source.loop = this.loop; + this.source.loopStart = this.loopStart; + this.source.loopEnd = this.loopEnd; + this.source.start(startTime, startOffset); + this.source.playbackStartTime = startTime - startOffset / this.source.playbackRate.value; + this.source.setPitch(this.pitch) + } catch (e) { + console.error("Channel.playSoundClip error. Exception: " + e) + } + } + ; + channel.stop = function(delay) { + if (!this.source) { + return + } + try { + channel.source.stop(WEBAudio.audioContext.currentTime + delay) + } catch (e) {} + if (delay == 0) { + this.disconnectSource() + } + } + ; + channel.isPaused = function() { + if (!this.source) { + return true + } + if (this.source.isPausedMockNode) { + return true + } + if (this.source.mediaElement) { + return this.source.mediaElement.paused || this.source.pauseRequested + } + return false + } + ; + channel.pause = function() { + if (!this.source || this.source.isPausedMockNode) { + return + } + if (this.source.mediaElement) { + this.source._pauseMediaElement(); + return + } + var pausedSource = { + isPausedMockNode: true, + buffer: this.source.buffer, + loop: this.source.loop, + loopStart: this.source.loopStart, + loopEnd: this.source.loopEnd, + playbackRate: this.source.playbackRate.value, + scheduledStopTime: undefined, + playbackPausedAtPosition: this.source.estimatePlaybackPosition(), + setPitch: function(v) { + this.playbackRate = v + }, + stop: function(when) { + this.scheduledStopTime = when + } + }; + this.stop(0); + this.disconnectSource(); + this.source = pausedSource + } + ; + channel.resume = function() { + if (this.source && this.source.mediaElement) { + this.source.start(undefined, this.source.currentTime); + return + } + if (!this.source || !this.source.isPausedMockNode) { + return + } + var pausedSource = this.source; + var soundClip = jsAudioCreateUncompressedSoundClip(pausedSource.buffer, false); + this.playSoundClip(soundClip, WEBAudio.audioContext.currentTime, Math.max(0, pausedSource.playbackPausedAtPosition)); + this.source.loop = pausedSource.loop; + this.source.loopStart = pausedSource.loopStart; + this.source.loopEnd = pausedSource.loopEnd; + this.source.setPitch(pausedSource.playbackRate); + if (typeof pausedSource.scheduledStopTime !== "undefined") { + var delay = Math.max(pausedSource.scheduledStopTime - WEBAudio.audioContext.currentTime, 0); + this.stop(delay) + } + } + ; + channel.setLoop = function(loop) { + this.loop = loop; + if (!this.source || this.source.loop == loop) { + return + } + this.source.loop = loop + } + ; + channel.setLoopPoints = function(loopStart, loopEnd) { + this.loopStart = loopStart; + this.loopEnd = loopEnd; + if (!this.source) { + return + } + if (this.source.loopStart !== loopStart) { + this.source.loopStart = loopStart + } + if (this.source.loopEnd !== loopEnd) { + this.source.loopEnd = loopEnd + } + } + ; + channel.set3D = function(spatialBlendLevel) { + if (this.spatialBlendLevel != spatialBlendLevel) { + this.setSpatialBlendLevel(spatialBlendLevel) + } + } + ; + channel.setPitch = function(pitch) { + this.pitch = pitch; + if (!this.source) { + return + } + this.source.setPitch(pitch) + } + ; + channel.setVolume = function(volume) { + if (this.gain.gain.value == volume) { + return + } + this.gain.gain.value = volume + } + ; + channel.setPosition = function(x, y, z) { + var p = this.panner; + if (p.positionX) { + if (p.positionX.value !== x) + p.positionX.value = x; + if (p.positionY.value !== y) + p.positionY.value = y; + if (p.positionZ.value !== z) + p.positionZ.value = z + } else if (p._x !== x || p._y !== y || p._z !== z) { + p.setPosition(x, y, z); + p._x = x; + p._y = y; + p._z = z + } + } + ; + channel.disconnectSource = function() { + if (!this.source || this.source.isPausedMockNode) { + return + } + if (this.source.mediaElement) { + this.source._pauseMediaElement() + } + this.source.onended = null; + this.source.disconnect(); + delete this.source + } + ; + channel.setSpatialBlendLevel = function(spatialBlendLevel) { + var sourceCanBeConfigured = this.source && !this.source.isPausedMockNode; + var spatializationTypeChanged = this.spatialBlendLevel > 0 && spatialBlendLevel == 0 || this.spatialBlendLevel == 0 && spatialBlendLevel > 0; + var needToReconfigureNodes = sourceCanBeConfigured && spatializationTypeChanged; + this.spatialBlendWetGain.gain.value = spatialBlendLevel; + this.spatialBlendDryGain.gain.value = 1 - spatialBlendLevel; + this.spatialBlendLevel = spatialBlendLevel; + if (needToReconfigureNodes) + this.configurePanningNodes() + } + ; + channel.configurePanningNodes = function() { + if (!this.source) + return; + this.source.disconnect(); + this.spatialBlendDryGain.disconnect(); + this.spatialBlendWetGain.disconnect(); + this.panner.disconnect(); + this.gain.disconnect(); + if (this.spatialBlendLevel > 0) { + this.source.connect(this.spatialBlendDryGain); + this.spatialBlendDryGain.connect(this.gain); + this.source.connect(this.spatialBlendWetGain); + this.spatialBlendWetGain.connect(this.panner); + this.panner.connect(this.gain) + } else { + this.source.connect(this.gain) + } + this.gain.connect(WEBAudio.audioContext.destination) + } + ; + channel.isStopped = function() { + if (!this.source) { + return true + } + if (this.source.mediaElement) { + return this.source.isStopped + } + return false + } + ; + return channel + } + function _JS_Sound_Create_Channel(callback, userData) { + if (WEBAudio.audioWebEnabled == 0) + return; + WEBAudio.audioInstances[++WEBAudio.audioInstanceIdCounter] = jsAudioCreateChannel(callback, userData); + return WEBAudio.audioInstanceIdCounter + } + function _JS_Sound_GetAudioBufferSampleRate(soundInstance) { + if (WEBAudio.audioWebEnabled == 0) + return WEBAudio.FAKEMOD_SAMPLERATE; + var audioInstance = WEBAudio.audioInstances[soundInstance]; + if (!audioInstance) + return WEBAudio.FAKEMOD_SAMPLERATE; + var buffer = audioInstance.buffer ? audioInstance.buffer : audioInstance.source ? audioInstance.source.buffer : 0; + if (!buffer) + return WEBAudio.FAKEMOD_SAMPLERATE; + return buffer.sampleRate + } + function _JS_Sound_GetAudioContextSampleRate() { + if (WEBAudio.audioWebEnabled == 0) + return WEBAudio.FAKEMOD_SAMPLERATE; + return WEBAudio.audioContext.sampleRate + } + function _JS_Sound_GetLength(bufferInstance) { + if (WEBAudio.audioWebEnabled == 0) + return 0; + var soundClip = WEBAudio.audioInstances[bufferInstance]; + if (!soundClip) + return 0; + return soundClip.getLength() + } + function _JS_Sound_GetLoadState(bufferInstance) { + if (WEBAudio.audioWebEnabled == 0) + return 2; + var sound = WEBAudio.audioInstances[bufferInstance]; + if (sound.error) + return 2; + if (sound.buffer || sound.url) + return 0; + return 1 + } + function jsAudioPlayPendingBlockedAudio(soundId) { + var pendingAudio = WEBAudio.pendingAudioSources[soundId]; + pendingAudio.sourceNode._startPlayback(pendingAudio.offset); + delete WEBAudio.pendingAudioSources[soundId] + } + function jsAudioPlayBlockedAudios() { + Object.keys(WEBAudio.pendingAudioSources).forEach(function(audioId) { + jsAudioPlayPendingBlockedAudio(audioId) + }) + } + function _JS_Sound_Init() { + try { + window.AudioContext = window.AudioContext || window.webkitAudioContext; + WEBAudio.audioContext = new AudioContext; + var tryToResumeAudioContext = function() { + if (WEBAudio.audioContext.state === "suspended") + WEBAudio.audioContext.resume().catch(function(error) { + console.warn("Could not resume audio context. Exception: " + error) + }); + else + Module.clearInterval(resumeInterval) + }; + var resumeInterval = Module.setInterval(tryToResumeAudioContext, 400); + WEBAudio.audioWebEnabled = 1; + var _userEventCallback = function() { + try { + if (WEBAudio.audioContext.state !== "running" && WEBAudio.audioContext.state !== "closed") { + WEBAudio.audioContext.resume().catch(function(error) { + console.warn("Could not resume audio context. Exception: " + error) + }) + } + jsAudioPlayBlockedAudios(); + var audioCacheSize = 20; + while (WEBAudio.audioCache.length < audioCacheSize) { + var audio = new Audio; + audio.autoplay = false; + WEBAudio.audioCache.push(audio) + } + } catch (e) {} + }; + window.addEventListener("mousedown", _userEventCallback); + window.addEventListener("touchstart", _userEventCallback); + Module.deinitializers.push(function() { + window.removeEventListener("mousedown", _userEventCallback); + window.removeEventListener("touchstart", _userEventCallback) + }) + } catch (e) { + alert("Web Audio API is not supported in this browser") + } + } + function jsAudioCreateUncompressedSoundClipFromCompressedAudio(audioData) { + var soundClip = jsAudioCreateUncompressedSoundClip(null, false); + WEBAudio.audioContext.decodeAudioData(audioData, function(_buffer) { + soundClip.buffer = _buffer + }, function(_error) { + soundClip.error = true; + console.log("Decode error: " + _error) + }); + return soundClip + } + function jsAudioAddPendingBlockedAudio(sourceNode, offset) { + WEBAudio.pendingAudioSources[sourceNode.mediaElement.src] = { + sourceNode: sourceNode, + offset: offset + } + } + function jsAudioGetMimeTypeFromType(fmodSoundType) { + switch (fmodSoundType) { + case 13: + return "audio/mpeg"; + case 20: + return "audio/wav"; + default: + return "audio/mp4" + } + } + function jsAudioCreateCompressedSoundClip(audioData, fmodSoundType) { + var mimeType = jsAudioGetMimeTypeFromType(fmodSoundType); + var blob = new Blob([audioData],{ + type: mimeType + }); + var soundClip = { + url: URL.createObjectURL(blob), + error: false, + mediaElement: new Audio + }; + soundClip.mediaElement.preload = "metadata"; + soundClip.mediaElement.src = soundClip.url; + soundClip.release = function() { + if (!this.mediaElement) { + return + } + this.mediaElement.src = ""; + URL.revokeObjectURL(this.url); + delete this.mediaElement; + delete this.url + } + ; + soundClip.getLength = function() { + return this.mediaElement.duration * 44100 + } + ; + soundClip.getData = function(ptr, length) { + console.warn("getData() is not supported for compressed sound."); + return 0 + } + ; + soundClip.getNumberOfChannels = function() { + console.warn("getNumberOfChannels() is not supported for compressed sound."); + return 0 + } + ; + soundClip.getFrequency = function() { + console.warn("getFrequency() is not supported for compressed sound."); + return 0 + } + ; + soundClip.createSourceNode = function() { + var self = this; + var mediaElement = WEBAudio.audioCache.length ? WEBAudio.audioCache.pop() : new Audio; + mediaElement.preload = "metadata"; + mediaElement.src = this.url; + var source = WEBAudio.audioContext.createMediaElementSource(mediaElement); + Object.defineProperty(source, "loop", { + get: function() { + return source.mediaElement.loop + }, + set: function(v) { + if (source.mediaElement.loop !== v) + source.mediaElement.loop = v + } + }); + source.playbackRate = {}; + Object.defineProperty(source.playbackRate, "value", { + get: function() { + return source.mediaElement.playbackRate + }, + set: function(v) { + if (source.mediaElement.playbackRate !== v) + source.mediaElement.playbackRate = v + } + }); + Object.defineProperty(source, "currentTime", { + get: function() { + return source.mediaElement.currentTime + }, + set: function(v) { + if (source.mediaElement.currentTime !== v) + source.mediaElement.currentTime = v + } + }); + Object.defineProperty(source, "mute", { + get: function() { + return source.mediaElement.mute + }, + set: function(v) { + if (source.mediaElement.mute !== v) + source.mediaElement.mute = v + } + }); + Object.defineProperty(source, "onended", { + get: function() { + return source.mediaElement.onended + }, + set: function(onended) { + source.mediaElement.onended = onended + } + }); + source.playPromise = null; + source.playTimeout = null; + source.pauseRequested = false; + source.isStopped = false; + source._pauseMediaElement = function() { + if (source.playPromise || source.playTimeout) { + source.pauseRequested = true + } else { + source.mediaElement.pause() + } + } + ; + source._startPlayback = function(offset) { + if (source.playPromise || source.playTimeout) { + source.mediaElement.currentTime = offset; + source.pauseRequested = false; + return + } + source.mediaElement.currentTime = offset; + source.playPromise = source.mediaElement.play(); + if (source.playPromise) { + source.playPromise.then(function() { + if (source.pauseRequested) { + source.mediaElement.pause(); + source.pauseRequested = false + } + source.playPromise = null + }).catch(function(error) { + source.playPromise = null; + if (error.name !== "NotAllowedError") + throw error; + jsAudioAddPendingBlockedAudio(source, offset) + }) + } + } + ; + source.start = function(startTime, offset) { + if (typeof startTime === "undefined") { + startTime = WEBAudio.audioContext.currentTime + } + if (typeof offset === "undefined") { + offset = 0 + } + var startDelayThresholdMS = 4; + var startDelayMS = (startTime - WEBAudio.audioContext.currentTime) * 1e3; + if (startDelayMS > startDelayThresholdMS) { + source.playTimeout = setTimeout(function() { + source.playTimeout = null; + source._startPlayback(offset) + }, startDelayMS) + } else { + source._startPlayback(offset) + } + } + ; + source.stop = function(stopTime) { + if (typeof stopTime === "undefined") { + stopTime = WEBAudio.audioContext.currentTime + } + var stopDelayThresholdMS = 4; + var stopDelayMS = (stopTime - WEBAudio.audioContext.currentTime) * 1e3; + if (stopDelayMS > stopDelayThresholdMS) { + setTimeout(function() { + source._pauseMediaElement(); + source.isStopped = true + }, stopDelayMS) + } else { + source._pauseMediaElement(); + source.isStopped = true + } + } + ; + jsAudioMixinSetPitch(source); + return source + } + ; + return soundClip + } + function _JS_Sound_Load(ptr, length, decompress, fmodSoundType) { + if (WEBAudio.audioWebEnabled == 0) + return 0; + ptr = ptr; + var audioData = HEAPU8.buffer.slice(ptr, ptr + length); + if (length < 131072) + decompress = 1; + var sound; + if (decompress) { + sound = jsAudioCreateUncompressedSoundClipFromCompressedAudio(audioData) + } else { + sound = jsAudioCreateCompressedSoundClip(audioData, fmodSoundType) + } + WEBAudio.audioInstances[++WEBAudio.audioInstanceIdCounter] = sound; + return WEBAudio.audioInstanceIdCounter + } + function jsAudioCreateUncompressedSoundClipFromPCM(channels, length, sampleRate, ptr) { + var buffer = WEBAudio.audioContext.createBuffer(channels, length, sampleRate); + var idx = ptr >> 2; + for (var i = 0; i < channels; i++) { + var offs = idx + length * i; + var copyToChannel = buffer["copyToChannel"] || function(source, channelNumber, startInChannel) { + var clipped = source.subarray(0, Math.min(source.length, this.length - (startInChannel | 0))); + this.getChannelData(channelNumber | 0).set(clipped, startInChannel | 0) + } + ; + copyToChannel.apply(buffer, [HEAPF32.subarray(offs, offs + length), i, 0]) + } + return jsAudioCreateUncompressedSoundClip(buffer, false) + } + function _JS_Sound_Load_PCM(channels, length, sampleRate, ptr) { + if (WEBAudio.audioWebEnabled == 0) + return 0; + var sound = jsAudioCreateUncompressedSoundClipFromPCM(channels, length, sampleRate, ptr); + WEBAudio.audioInstances[++WEBAudio.audioInstanceIdCounter] = sound; + return WEBAudio.audioInstanceIdCounter + } + function _JS_Sound_Play(bufferInstance, channelInstance, offset, delay) { + if (WEBAudio.audioWebEnabled == 0) + return; + _JS_Sound_Stop(channelInstance, 0); + var soundClip = WEBAudio.audioInstances[bufferInstance]; + var channel = WEBAudio.audioInstances[channelInstance]; + if (!soundClip) { + console.log("Trying to play sound which is not loaded."); + return + } + try { + channel.playSoundClip(soundClip, WEBAudio.audioContext.currentTime + delay, offset) + } catch (error) { + console.error("playSoundClip error. Exception: " + e) + } + } + function _JS_Sound_ReleaseInstance(instance) { + var object = WEBAudio.audioInstances[instance]; + if (object) { + object.release() + } + delete WEBAudio.audioInstances[instance] + } + function _JS_Sound_ResumeIfNeeded() { + if (WEBAudio.audioWebEnabled == 0) + return; + if (WEBAudio.audioContext.state === "suspended") + WEBAudio.audioContext.resume().catch(function(error) { + console.warn("Could not resume audio context. Exception: " + error) + }) + } + function _JS_Sound_Set3D(channelInstance, spatialBlendLevel) { + var channel = WEBAudio.audioInstances[channelInstance]; + channel.set3D(spatialBlendLevel) + } + function _JS_Sound_SetListenerOrientation(x, y, z, xUp, yUp, zUp) { + if (WEBAudio.audioWebEnabled == 0) + return; + x = -x; + y = -y; + z = -z; + var l = WEBAudio.audioContext.listener; + if (l.forwardX) { + if (l.forwardX.value !== x) + l.forwardX.value = x; + if (l.forwardY.value !== y) + l.forwardY.value = y; + if (l.forwardZ.value !== z) + l.forwardZ.value = z; + if (l.upX.value !== xUp) + l.upX.value = xUp; + if (l.upY.value !== yUp) + l.upY.value = yUp; + if (l.upZ.value !== zUp) + l.upZ.value = zUp + } else if (l._forwardX !== x || l._forwardY !== y || l._forwardZ !== z || l._upX !== xUp || l._upY !== yUp || l._upZ !== zUp) { + l.setOrientation(x, y, z, xUp, yUp, zUp); + l._forwardX = x; + l._forwardY = y; + l._forwardZ = z; + l._upX = xUp; + l._upY = yUp; + l._upZ = zUp + } + } + function _JS_Sound_SetListenerPosition(x, y, z) { + if (WEBAudio.audioWebEnabled == 0) + return; + var l = WEBAudio.audioContext.listener; + if (l.positionX) { + if (l.positionX.value !== x) + l.positionX.value = x; + if (l.positionY.value !== y) + l.positionY.value = y; + if (l.positionZ.value !== z) + l.positionZ.value = z + } else if (l._positionX !== x || l._positionY !== y || l._positionZ !== z) { + l.setPosition(x, y, z); + l._positionX = x; + l._positionY = y; + l._positionZ = z + } + } + function _JS_Sound_SetLoop(channelInstance, loop) { + if (WEBAudio.audioWebEnabled == 0) + return; + var channel = WEBAudio.audioInstances[channelInstance]; + channel.setLoop(loop) + } + function _JS_Sound_SetLoopPoints(channelInstance, loopStart, loopEnd) { + if (WEBAudio.audioWebEnabled == 0) + return; + var channel = WEBAudio.audioInstances[channelInstance]; + channel.setLoopPoints(loopStart, loopEnd) + } + function _JS_Sound_SetPaused(channelInstance, paused) { + if (WEBAudio.audioWebEnabled == 0) + return; + var channel = WEBAudio.audioInstances[channelInstance]; + if (paused != channel.isPaused()) { + if (paused) + channel.pause(); + else + channel.resume() + } + } + function _JS_Sound_SetPitch(channelInstance, v) { + if (WEBAudio.audioWebEnabled == 0) + return; + try { + var channel = WEBAudio.audioInstances[channelInstance]; + channel.setPitch(v) + } catch (e) { + console.error("JS_Sound_SetPitch(channel=" + channelInstance + ", pitch=" + v + ") threw an exception: " + e) + } + } + function _JS_Sound_SetPosition(channelInstance, x, y, z) { + if (WEBAudio.audioWebEnabled == 0) + return; + var channel = WEBAudio.audioInstances[channelInstance]; + channel.setPosition(x, y, z) + } + function _JS_Sound_SetVolume(channelInstance, v) { + if (WEBAudio.audioWebEnabled == 0) + return; + try { + var channel = WEBAudio.audioInstances[channelInstance]; + channel.setVolume(v) + } catch (e) { + console.error("JS_Sound_SetVolume(channel=" + channelInstance + ", volume=" + v + ") threw an exception: " + e) + } + } + function _JS_Sound_Stop(channelInstance, delay) { + if (WEBAudio.audioWebEnabled == 0) + return; + var channel = WEBAudio.audioInstances[channelInstance]; + channel.stop(delay) + } + function _JS_SystemInfo_GetBrowserName(buffer, bufferSize) { + var browser = Module.SystemInfo.browser; + if (buffer) + stringToUTF8(browser, buffer, bufferSize); + return lengthBytesUTF8(browser) + } + function _JS_SystemInfo_GetBrowserVersionString(buffer, bufferSize) { + var browserVer = Module.SystemInfo.browserVersion; + if (buffer) + stringToUTF8(browserVer, buffer, bufferSize); + return lengthBytesUTF8(browserVer) + } + function _JS_SystemInfo_GetCanvasClientSize(domElementSelector, outWidth, outHeight) { + var selector = UTF8ToString(domElementSelector); + var canvas = selector == "#canvas" ? Module["canvas"] : document.querySelector(selector); + var w = 0 + , h = 0; + if (canvas) { + var size = canvas.getBoundingClientRect(); + w = size.width; + h = size.height + } + outWidth = outWidth >> 3; + outHeight = outHeight >> 3; + HEAPF64[outWidth] = w; + HEAPF64[outHeight] = h + } + function _JS_SystemInfo_GetDocumentURL(buffer, bufferSize) { + if (buffer) + stringToUTF8("https://kour.io/", buffer, bufferSize); + return lengthBytesUTF8("https://kour.io/") + } + function _JS_SystemInfo_GetGPUInfo(buffer, bufferSize) { + var gpuinfo = Module.SystemInfo.gpu; + if (buffer) + stringToUTF8(gpuinfo, buffer, bufferSize); + return lengthBytesUTF8(gpuinfo) + } + function _JS_SystemInfo_GetLanguage(buffer, bufferSize) { + var language = Module.SystemInfo.language; + if (buffer) + stringToUTF8(language, buffer, bufferSize); + return lengthBytesUTF8(language) + } + function _JS_SystemInfo_GetMatchWebGLToCanvasSize() { + return Module.matchWebGLToCanvasSize || Module.matchWebGLToCanvasSize === undefined + } + function _JS_SystemInfo_GetOS(buffer, bufferSize) { + var browser = Module.SystemInfo.os + " " + Module.SystemInfo.osVersion; + if (buffer) + stringToUTF8(browser, buffer, bufferSize); + return lengthBytesUTF8(browser) + } + function _JS_SystemInfo_GetPreferredDevicePixelRatio() { + return Module.matchWebGLToCanvasSize == false ? 1 : Module.devicePixelRatio || window.devicePixelRatio || 1 + } + function _JS_SystemInfo_GetScreenSize(outWidth, outHeight) { + outWidth = outWidth >> 3; + outHeight = outHeight >> 3; + HEAPF64[outWidth] = Module.SystemInfo.width; + HEAPF64[outHeight] = Module.SystemInfo.height + } + function _JS_SystemInfo_GetStreamingAssetsURL(buffer, bufferSize) { + if (buffer) + stringToUTF8(Module.streamingAssetsUrl, buffer, bufferSize); + return lengthBytesUTF8(Module.streamingAssetsUrl) + } + function _JS_SystemInfo_HasAstcHdr() { + var ext = GLctx.getExtension("WEBGL_compressed_texture_astc"); + if (ext && ext.getSupportedProfiles) { + return ext.getSupportedProfiles().includes("hdr") + } + return false + } + function _JS_SystemInfo_HasCursorLock() { + return Module.SystemInfo.hasCursorLock + } + function _JS_SystemInfo_HasFullscreen() { + return Module.SystemInfo.hasFullscreen + } + function _JS_SystemInfo_HasWebGL() { + return Module.SystemInfo.hasWebGL + } + function _JS_SystemInfo_HasWebGPU() { + return Module.SystemInfo.hasWebGPU + } + function _JS_UnityEngineShouldQuit() { + return !!Module.shouldQuit + } + var videoInstances = {}; + var jsSupportedVideoFormats = []; + var jsUnsupportedVideoFormats = []; + function _JS_Video_CanPlayFormat(format) { + format = UTF8ToString(format); + if (jsSupportedVideoFormats.indexOf(format) != -1) + return true; + if (jsUnsupportedVideoFormats.indexOf(format) != -1) + return false; + var video = document.createElement("video"); + var canPlay = video.canPlayType(format); + if (canPlay) + jsSupportedVideoFormats.push(format); + else + jsUnsupportedVideoFormats.push(format); + return !!canPlay + } + var videoInstanceIdCounter = 0; + function jsVideoEnded() { + var cb = this.onendedCallback; + if (cb) + (a1 => dynCall_vi.apply(null, [cb, a1]))(this.onendedRef) + } + var hasSRGBATextures = null; + function _JS_Video_Create(url) { + var str = UTF8ToString(url); + var video = document.createElement("video"); + video.style.display = "none"; + video.src = str; + video.muted = true; + video.setAttribute("muted", ""); + video.setAttribute("playsinline", ""); + video.crossOrigin = "anonymous"; + videoInstances[++videoInstanceIdCounter] = video; + if (hasSRGBATextures == null) + hasSRGBATextures = Module.SystemInfo.browser == "Chrome" || Module.SystemInfo.browser == "Edge"; + return videoInstanceIdCounter + } + var jsVideoPendingBlockedVideos = {}; + function jsVideoPlayPendingBlockedVideo(video) { + jsVideoPendingBlockedVideos[video].play().then(function() { + var v = jsVideoPendingBlockedVideos[video]; + jsVideoRemovePendingBlockedVideo(video); + if (v.requestVideoFrameCallback) + v.requestVideoFrameCallback(function() { + v.isLoaded = true + }) + }) + } + function jsVideoAttemptToPlayBlockedVideos() { + for (var i in jsVideoPendingBlockedVideos) { + if (jsVideoPendingBlockedVideos.hasOwnProperty(i)) + jsVideoPlayPendingBlockedVideo(i) + } + } + function jsVideoRemovePendingBlockedVideo(video) { + delete jsVideoPendingBlockedVideos[video]; + if (Object.keys(jsVideoPendingBlockedVideos).length == 0) { + window.removeEventListener("mousedown", jsVideoAttemptToPlayBlockedVideos); + window.removeEventListener("touchstart", jsVideoAttemptToPlayBlockedVideos) + } + } + function _JS_Video_Destroy(video) { + var v = videoInstances[video]; + if (v.loopEndPollInterval) { + clearInterval(v.loopEndPollInterval) + } + jsVideoRemovePendingBlockedVideo(video); + v.src = ""; + delete v.onendedCallback; + v.onended = v.onerror = v.oncanplay = v.onseeked = null; + delete videoInstances[video] + } + function _JS_Video_Duration(video) { + return videoInstances[video].duration + } + function _JS_Video_EnableAudioTrack(video, trackIndex, enabled) { + var v = videoInstances[video]; + if (!v.enabledTracks) + v.enabledTracks = []; + while (v.enabledTracks.length <= trackIndex) + v.enabledTracks.push(true); + v.enabledTracks[trackIndex] = enabled; + var tracks = v.audioTracks; + if (!tracks) + return; + var track = tracks[trackIndex]; + if (track) + track.enabled = enabled ? true : false + } + function _JS_Video_GetAudioLanguageCode(video, trackIndex, buffer, bufferSize) { + var tracks = videoInstances[video].audioTracks; + if (!tracks) + return 0; + var track = tracks[trackIndex]; + if (!track || !track.language) + return 0; + if (buffer) + stringToUTF8(track.language, buffer, bufferSize); + return lengthBytesUTF8(track.language) + } + function _JS_Video_GetNumAudioTracks(video) { + var tracks = videoInstances[video].audioTracks; + return tracks ? tracks.length : 1 + } + function _JS_Video_GetPlaybackRate(video) { + return videoInstances[video].playbackRate + } + function _JS_Video_Height(video) { + return videoInstances[video].videoHeight + } + function _JS_Video_IsPlaying(video) { + var v = videoInstances[video]; + return !v.paused && !v.ended + } + function _JS_Video_IsReady(video) { + var v = videoInstances[video]; + var targetReadyState = /(iPhone|iPad)/i.test(navigator.userAgent) ? v.HAVE_METADATA : /(Firefox)/i.test(navigator.userAgent) ? v.HAVE_FUTURE_DATA : v.HAVE_ENOUGH_DATA; + if (!v.isReady && v.readyState >= targetReadyState) + v.isReady = true; + return v.isReady + } + function _JS_Video_IsSeeking(video) { + var v = videoInstances[video]; + return v.seeking + } + function _JS_Video_Pause(video) { + var v = videoInstances[video]; + v.pause(); + jsVideoRemovePendingBlockedVideo(video); + if (v.loopEndPollInterval) { + clearInterval(v.loopEndPollInterval) + } + } + function _JS_Video_SetLoop(video, loop) { + var v = videoInstances[video]; + if (v.loopEndPollInterval) { + clearInterval(v.loopEndPollInterval) + } + v.loop = loop; + if (loop) { + v.loopEndPollInterval = setInterval(function() { + var cur = v.currentTime; + var last = v.lastSeenPlaybackTime; + if (cur < last) { + var dur = v.duration; + var margin = .2; + var closeToBegin = margin * dur; + var closeToEnd = dur - closeToBegin; + if (cur < closeToBegin && last > closeToEnd) + jsVideoEnded.apply(v) + } + v.lastSeenPlaybackTime = v.currentTime + }, 1e3 / 30); + v.lastSeenPlaybackTime = v.currentTime; + v.onended = null + } else { + v.onended = jsVideoEnded + } + } + function jsVideoAllAudioTracksAreDisabled(v) { + if (!v.enabledTracks) + return false; + for (var i = 0; i < v.enabledTracks.length; ++i) { + if (v.enabledTracks[i]) + return false + } + return true + } + function jsVideoAddPendingBlockedVideo(video, v) { + if (Object.keys(jsVideoPendingBlockedVideos).length == 0) { + window.addEventListener("mousedown", jsVideoAttemptToPlayBlockedVideos, true); + window.addEventListener("touchstart", jsVideoAttemptToPlayBlockedVideos, true) + } + jsVideoPendingBlockedVideos[video] = v + } + function _JS_Video_Play(video, muted) { + var v = videoInstances[video]; + v.muted = muted || jsVideoAllAudioTracksAreDisabled(v); + var promise = v.play(); + if (promise) + promise.catch(function(e) { + if (e.name == "NotAllowedError") + jsVideoAddPendingBlockedVideo(video, v) + }); + if (v.requestVideoFrameCallback) + v.requestVideoFrameCallback(function() { + v.isLoaded = true + }); + _JS_Video_SetLoop(video, v.loop) + } + function _JS_Video_Seek(video, time) { + var v = videoInstances[video]; + v.lastSeenPlaybackTime = v.currentTime = time + } + function _JS_Video_SetEndedHandler(video, ref, onended) { + var v = videoInstances[video]; + v.onendedCallback = onended; + v.onendedRef = ref + } + function _JS_Video_SetErrorHandler(video, ref, onerror) { + videoInstances[video].onerror = function(evt) { + ( (a1, a2) => dynCall_vii.apply(null, [onerror, a1, a2]))(ref, evt.target.error.code) + } + } + function _JS_Video_SetMute(video, muted) { + var v = videoInstances[video]; + v.muted = muted || jsVideoAllAudioTracksAreDisabled(v) + } + function _JS_Video_SetPlaybackRate(video, rate) { + videoInstances[video].playbackRate = rate + } + function _JS_Video_SetReadyHandler(video, ref, onready) { + videoInstances[video].oncanplay = function() { + (a1 => dynCall_vi.apply(null, [onready, a1]))(ref) + } + } + function _JS_Video_SetSeekedHandler(video, ref, onseeked) { + videoInstances[video].onseeked = function() { + var v = videoInstances[video]; + v.lastUpdateTextureTime = null; + (a1 => dynCall_vi.apply(null, [onseeked, a1]))(ref) + } + } + function _JS_Video_SetVolume(video, volume) { + videoInstances[video].volume = volume + } + function _JS_Video_Time(video) { + return videoInstances[video].currentTime + } + function jsVideoCreateTexture2D() { + var t = GLctx.createTexture(); + GLctx.bindTexture(GLctx.TEXTURE_2D, t); + GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_WRAP_S, GLctx.CLAMP_TO_EDGE); + GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_WRAP_T, GLctx.CLAMP_TO_EDGE); + GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_MIN_FILTER, GLctx.LINEAR); + return t + } + var s2lTexture = null; + var s2lFBO = null; + var s2lVBO = null; + var s2lProgram = null; + var s2lVertexPositionNDC = null; + function _JS_Video_UpdateToTexture(video, tex, adjustToLinearspace) { + var v = videoInstances[video]; + if (typeof v.requestVideoFrameCallback === "function") { + if (!v.isLoaded) + return false + } else { + if (!v.isReady) + return false + } + if (!(v.videoWidth > 0 && v.videoHeight > 0)) + return false; + if (v.lastUpdateTextureTime === v.currentTime) + return false; + if (v.seeking) + return false; + v.lastUpdateTextureTime = v.currentTime; + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true); + var internalFormat = adjustToLinearspace ? hasSRGBATextures ? GLctx.RGBA : GLctx.RGB : GLctx.RGBA; + var format = adjustToLinearspace ? hasSRGBATextures ? GLctx.RGBA : GLctx.RGB : GLctx.RGBA; + if (v.previousUploadedWidth != v.videoWidth || v.previousUploadedHeight != v.videoHeight) { + GLctx.deleteTexture(GL.textures[tex]); + var t = jsVideoCreateTexture2D(); + t.name = tex; + GL.textures[tex] = t; + v.previousUploadedWidth = v.videoWidth; + v.previousUploadedHeight = v.videoHeight; + if (adjustToLinearspace) { + GLctx.texImage2D(GLctx.TEXTURE_2D, 0, internalFormat, v.videoWidth, v.videoHeight, 0, format, GLctx.UNSIGNED_BYTE, null); + if (!s2lTexture) { + s2lTexture = jsVideoCreateTexture2D() + } else { + GLctx.bindTexture(GLctx.TEXTURE_2D, s2lTexture) + } + } + GLctx.texImage2D(GLctx.TEXTURE_2D, 0, internalFormat, format, GLctx.UNSIGNED_BYTE, v) + } else { + if (adjustToLinearspace) { + if (!s2lTexture) { + s2lTexture = jsVideoCreateTexture2D() + } else { + GLctx.bindTexture(GLctx.TEXTURE_2D, s2lTexture) + } + } else { + GLctx.bindTexture(GLctx.TEXTURE_2D, GL.textures[tex]) + } + GLctx.texImage2D(GLctx.TEXTURE_2D, 0, internalFormat, format, GLctx.UNSIGNED_BYTE, v) + } + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, false); + if (adjustToLinearspace) { + if (s2lProgram == null) { + var vertexShaderCode = `precision lowp float;\n \t\t\t\tattribute vec2 vertexPositionNDC;\n \t\t\t\tvarying vec2 vTexCoords;\n \t\t\t\tconst vec2 scale = vec2(0.5, 0.5);\n \t\t\t\tvoid main() {\n \t\t\t\t vTexCoords = vertexPositionNDC * scale + scale; // scale vertex attribute to [0,1] range\n \t\t\t\t gl_Position = vec4(vertexPositionNDC, 0.0, 1.0);\n \t\t\t\t}`; + var fragmentShaderCode = `precision mediump float;\n \t\t\t\tuniform sampler2D colorMap;\n \t\t\t\tvarying vec2 vTexCoords;\n \t\t\t\tvec4 toLinear(vec4 sRGB) {\n \t\t\t\t vec3 c = sRGB.rgb;\n \t\t\t\t return vec4(c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878), sRGB.a);\n \t\t\t\t}\n \t\t\t\tvoid main() {\n \t\t\t\t gl_FragColor = toLinear(texture2D(colorMap, vTexCoords));\n \t\t\t\t}`; + var vertexShader = GLctx.createShader(GLctx.VERTEX_SHADER); + GLctx.shaderSource(vertexShader, vertexShaderCode); + GLctx.compileShader(vertexShader); + var fragmentShader = GLctx.createShader(GLctx.FRAGMENT_SHADER); + GLctx.shaderSource(fragmentShader, fragmentShaderCode); + GLctx.compileShader(fragmentShader); + s2lProgram = GLctx.createProgram(); + GLctx.attachShader(s2lProgram, vertexShader); + GLctx.attachShader(s2lProgram, fragmentShader); + GLctx.linkProgram(s2lProgram); + s2lVertexPositionNDC = GLctx.getAttribLocation(s2lProgram, "vertexPositionNDC") + } + if (s2lVBO == null) { + s2lVBO = GLctx.createBuffer(); + GLctx.bindBuffer(GLctx.ARRAY_BUFFER, s2lVBO); + var verts = [1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1]; + GLctx.bufferData(GLctx.ARRAY_BUFFER, new Float32Array(verts), GLctx.STATIC_DRAW) + } + if (!s2lFBO) { + s2lFBO = GLctx.createFramebuffer() + } + GLctx.bindFramebuffer(GLctx.FRAMEBUFFER, s2lFBO); + GLctx.framebufferTexture2D(GLctx.FRAMEBUFFER, GLctx.COLOR_ATTACHMENT0, GLctx.TEXTURE_2D, GL.textures[tex], 0); + GLctx.bindTexture(GLctx.TEXTURE_2D, s2lTexture); + GLctx.viewport(0, 0, v.videoWidth, v.videoHeight); + GLctx.useProgram(s2lProgram); + GLctx.bindBuffer(GLctx.ARRAY_BUFFER, s2lVBO); + GLctx.enableVertexAttribArray(s2lVertexPositionNDC); + GLctx.vertexAttribPointer(s2lVertexPositionNDC, 2, GLctx.FLOAT, false, 0, 0); + GLctx.disable(GLctx.CULL_FACE); + GLctx.drawArrays(GLctx.TRIANGLES, 0, 6); + GLctx.viewport(0, 0, GLctx.canvas.width, GLctx.canvas.height); + GLctx.bindFramebuffer(GLctx.FRAMEBUFFER, null) + } + return true + } + function _JS_Video_Width(video) { + return videoInstances[video].videoWidth + } + var activeWebCams = {}; + function _JS_WebCamVideo_CanPlay(deviceId) { + var webcam = activeWebCams[deviceId]; + return webcam && webcam.video.videoWidth > 0 && webcam.video.videoHeight > 0 + } + function _JS_WebCamVideo_GetDeviceName(deviceId, buffer, bufferSize) { + var webcam = videoInputDevices[deviceId]; + var name = webcam ? webcam.name : "(disconnected input #" + (deviceId + 1) + ")"; + if (buffer) + stringToUTF8(name, buffer, bufferSize); + return lengthBytesUTF8(name) + } + function _JS_WebCamVideo_GetNativeHeight(deviceId) { + return activeWebCams[deviceId] && activeWebCams[deviceId].video.videoHeight + } + function _JS_WebCamVideo_GetNativeWidth(deviceId) { + return activeWebCams[deviceId] && activeWebCams[deviceId].video.videoWidth + } + function _JS_WebCamVideo_GetNumDevices() { + var numDevices = 0; + if (!videoInputDevicesSuccessfullyEnumerated) { + console.warn("WebCam devices were used before being enumerated by the browser. The browser is likely " + "pausing WebCam device enumeration due to the page being out of focus while the Unity " + "application is being loaded in the background.\n" + "If you are a developer, you can ensure WebCam devices are enumerated by first requiring " + "user interaction.\n" + "See https://github.com/w3c/mediacapture-main/issues/905 for details."); + return numDevices + } + Object.keys(videoInputDevices).forEach(function(i) { + numDevices = Math.max(numDevices, videoInputDevices[i].id + 1) + }); + return numDevices + } + function _JS_WebCamVideo_GrabFrame(deviceId, buffer, destWidth, destHeight) { + var webcam = activeWebCams[deviceId]; + if (!webcam) + return; + var timeNow = performance.now(); + if (timeNow < webcam.nextFrameAvailableTime) { + return + } + webcam.nextFrameAvailableTime += webcam.frameLengthInMsecs; + if (webcam.nextFrameAvailableTime < timeNow) { + webcam.nextFrameAvailableTime = timeNow + webcam.frameLengthInMsecs + } + var canvas = webcam.canvas; + if (canvas.width != destWidth || canvas.height != destHeight || !webcam.context2d) { + canvas.width = destWidth; + canvas.height = destHeight; + webcam.context2d = canvas.getContext("2d") + } + var context = webcam.context2d; + context.drawImage(webcam.video, 0, 0, webcam.video.videoWidth, webcam.video.videoHeight, 0, 0, destWidth, destHeight); + HEAPU8.set(context.getImageData(0, 0, destWidth, destHeight).data, buffer); + return 1 + } + function _JS_WebCamVideo_IsFrontFacing(deviceId) { + return videoInputDevices[deviceId].isFrontFacing + } + function _JS_WebCamVideo_Start(deviceId) { + if (activeWebCams[deviceId]) { + ++activeWebCams[deviceId].refCount; + return + } + if (!videoInputDevices[deviceId]) { + console.error("Cannot start video input with ID " + deviceId + ". No such ID exists! Existing video inputs are:"); + console.dir(videoInputDevices); + return + } + navigator.mediaDevices.getUserMedia({ + audio: false, + video: videoInputDevices[deviceId].deviceId ? { + deviceId: { + exact: videoInputDevices[deviceId].deviceId + } + } : true + }).then(function(stream) { + var video = document.createElement("video"); + video.srcObject = stream; + if (/(iPhone|iPad|iPod)/.test(navigator.userAgent)) { + warnOnce("Applying iOS Safari specific workaround to video playback: https://bugs.webkit.org/show_bug.cgi?id=217578"); + video.setAttribute("playsinline", "") + } + video.play(); + var canvas = document.createElement("canvas"); + activeWebCams[deviceId] = { + video: video, + canvas: document.createElement("canvas"), + stream: stream, + frameLengthInMsecs: 1e3 / stream.getVideoTracks()[0].getSettings().frameRate, + nextFrameAvailableTime: 0, + refCount: 1 + } + }).catch(function(e) { + console.error("Unable to start video input! " + e) + }) + } + function _JS_WebCamVideo_Stop(deviceId) { + var webcam = activeWebCams[deviceId]; + if (!webcam) + return; + if (--webcam.refCount <= 0) { + webcam.video.pause(); + webcam.video.srcObject = null; + webcam.stream.getVideoTracks().forEach(function(track) { + track.stop() + }); + delete activeWebCams[deviceId] + } + } + function _JS_WebCamVideo_Update(deviceId, textureId, destWidth, destHeight) { + var webcam = activeWebCams[deviceId]; + if (!webcam) + return; + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true); + var webCamTexture = webcam.video; + if (webcam.video.videoWidth != destWidth || webcam.video.videoHeight != destHeight) { + if (!webcam.canvas) { + webcam.canvas = document.createElement("canvas") + } + var canvas = webcam.canvas; + if (canvas.width != destWidth || canvas.height != destHeight || !webcam.context2d) { + canvas.width = destWidth; + canvas.height = destHeight; + webcam.context2d = canvas.getContext("2d") + } + var context = webcam.context2d; + context.drawImage(webcam.video, 0, 0, webcam.video.videoWidth, webcam.video.videoHeight, 0, 0, destWidth, destHeight); + webCamTexture = canvas + } + GLctx.bindTexture(GLctx.TEXTURE_2D, GL.textures[textureId]); + GLctx.texSubImage2D(GLctx.TEXTURE_2D, 0, 0, 0, GLctx.RGBA, GLctx.UNSIGNED_BYTE, webCamTexture); + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, false) + } + function _JS_WebCam_IsSupported() { + return !!navigator.mediaDevices + } + function utf8(ptr) { + return UTF8ToString(ptr) + } + var wgpu = {}; + var wgpuIdCounter = 2; + function wgpuStore(object) { + if (object) { + while (wgpu[wgpuIdCounter]) + wgpuIdCounter = wgpuIdCounter < 2147483647 ? wgpuIdCounter + 1 : 2; + wgpu[wgpuIdCounter] = object; + object.wid = wgpuIdCounter; + return wgpuIdCounter++ + } + } + function _JS_WebGPU_ImportVideoTexture(device, video, colorSpace) { + let videoSource = videoInstances[video]; + if (videoSource.readyState != 4 || !videoSource.isLoaded) + return 0; + device = wgpu[device]; + let externalTexture = device.importExternalTexture({ + source: videoSource + }); + return wgpuStore(externalTexture) + } + function _JS_WebGPU_ImportWebCamTexture(device, webcamId) { + let webcam = activeWebCams[webcamId]; + let videoSource = webcam ? webcam.video : null; + if (!videoSource || videoSource.readyState != 4) + return 0; + device = wgpu[device]; + let externalTexture = device.importExternalTexture({ + source: videoSource + }); + return wgpuStore(externalTexture) + } + function _JS_WebGPU_SetCommandEncoder(encoder) { + Module["WebGPU"].commandEncoder = encoder + } + function _JS_WebGPU_Setup(adapter, device) { + Module["WebGPU"] = {}; + Module["WebGPU"].adapter = wgpu[adapter]; + Module["WebGPU"].device = wgpu[device] + } + function _JS_WebPlayer_FinishInitialization() { + Module.WebPlayer.PlayerIsInitialized() + } + var wr = { + requests: {}, + responses: {}, + abortControllers: {}, + timer: {}, + nextRequestId: 1 + }; + function _JS_WebRequest_Abort(requestId) { + var abortController = wr.abortControllers[requestId]; + if (!abortController || abortController.signal.aborted) { + return + } + abortController.abort() + } + function _JS_WebRequest_Create(url, method) { + var _url = UTF8ToString(url); + var _method = UTF8ToString(method); + var abortController = new AbortController; + var requestOptions = { + url: _url, + init: { + method: _method, + signal: abortController.signal, + headers: {}, + enableStreamingDownload: true + }, + tempBuffer: null, + tempBufferSize: 0 + }; + wr.abortControllers[wr.nextRequestId] = abortController; + wr.requests[wr.nextRequestId] = requestOptions; + return wr.nextRequestId++ + } + function jsWebRequestGetResponseHeaderString(requestId) { + var response = wr.responses[requestId]; + if (!response) { + return "" + } + if (response.headerString) { + return response.headerString + } + var headers = ""; + var entries = response.headers.entries(); + for (var result = entries.next(); !result.done; result = entries.next()) { + headers += result.value[0] + ": " + result.value[1] + "\r\n" + } + response.headerString = headers; + return headers + } + function _JS_WebRequest_GetResponseMetaData(requestId, headerBuffer, headerSize, responseUrlBuffer, responseUrlSize) { + var response = wr.responses[requestId]; + if (!response) { + stringToUTF8("", headerBuffer, headerSize); + stringToUTF8("", responseUrlBuffer, responseUrlSize); + return + } + if (headerBuffer) { + var headers = jsWebRequestGetResponseHeaderString(requestId); + stringToUTF8(headers, headerBuffer, headerSize) + } + if (responseUrlBuffer) { + stringToUTF8(response.url, responseUrlBuffer, responseUrlSize) + } + } + function _JS_WebRequest_GetResponseMetaDataLengths(requestId, buffer) { + buffer = buffer >> 2; + var response = wr.responses[requestId]; + if (!response) { + HEAPU32[buffer] = 0; + HEAPU32[buffer + 1] = 0; + return + } + var headers = jsWebRequestGetResponseHeaderString(requestId); + HEAPU32[buffer] = lengthBytesUTF8(headers); + HEAPU32[buffer + 1] = lengthBytesUTF8(response.url) + } + function _JS_WebRequest_Release(requestId) { + if (wr.timer[requestId]) { + clearTimeout(wr.timer[requestId]) + } + delete wr.requests[requestId]; + delete wr.responses[requestId]; + delete wr.abortControllers[requestId]; + delete wr.timer[requestId] + } + function _JS_WebRequest_Send(requestId, ptr, length, arg, onresponse, onprogress) { + ptr = ptr; + var requestOptions = wr.requests[requestId]; + var abortController = wr.abortControllers[requestId]; + function getTempBuffer(size) { + if (!requestOptions.tempBuffer) { + const initialSize = Math.max(size, 1024); + requestOptions.tempBuffer = _malloc(initialSize); + requestOptions.tempBufferSize = initialSize + } + if (requestOptions.tempBufferSize < size) { + _free(requestOptions.tempBuffer); + requestOptions.tempBuffer = _malloc(size); + requestOptions.tempBufferSize = size + } + return requestOptions.tempBuffer + } + function ClearTimeout() { + if (wr.timer[requestId]) { + clearTimeout(wr.timer[requestId]); + delete wr.timer[requestId] + } + } + function HandleSuccess(response, body) { + ClearTimeout(); + if (!onresponse) { + return + } + var kWebRequestOK = 0; + if (requestOptions.init.enableStreamingDownload) { + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onresponse, a1, a2, a3, a4, a5, a6]))(arg, response.status, 0, body.length, 0, kWebRequestOK) + } else if (body.length != 0) { + var buffer = _malloc(body.length); + HEAPU8.set(body, buffer); + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onresponse, a1, a2, a3, a4, a5, a6]))(arg, response.status, buffer, body.length, 0, kWebRequestOK); + _free(buffer) + } else { + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onresponse, a1, a2, a3, a4, a5, a6]))(arg, response.status, 0, 0, 0, kWebRequestOK) + } + if (requestOptions.tempBuffer) { + _free(requestOptions.tempBuffer) + } + } + function HandleError(err, code) { + ClearTimeout(); + if (!onresponse) { + return + } + var len = lengthBytesUTF8(err) + 1; + var buffer = _malloc(len); + stringToUTF8(err, buffer, len); + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onresponse, a1, a2, a3, a4, a5, a6]))(arg, 500, 0, 0, buffer, code); + _free(buffer); + if (requestOptions.tempBuffer) { + _free(requestOptions.tempBuffer) + } + } + function HandleProgress(e) { + if (!onprogress || !e.lengthComputable) { + return + } + var response = e.response; + wr.responses[requestId] = response; + if (e.chunk) { + var buffer = getTempBuffer(e.chunk.length); + HEAPU8.set(e.chunk, buffer); + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onprogress, a1, a2, a3, a4, a5, a6]))(arg, response.status, e.loaded, e.total, buffer, e.chunk.length) + } else { + ( (a1, a2, a3, a4, a5, a6) => dynCall_viiiiii.apply(null, [onprogress, a1, a2, a3, a4, a5, a6]))(arg, response.status, e.loaded, e.total, 0, 0) + } + } + try { + if (length > 0) { + var postData = HEAPU8.subarray(ptr, ptr + length); + requestOptions.init.body = new Blob([postData]) + } + if (requestOptions.timeout) { + wr.timer[requestId] = setTimeout(function() { + requestOptions.isTimedOut = true; + abortController.abort() + }, requestOptions.timeout) + } + var fetchImpl = Module.fetchWithProgress; + requestOptions.init.onProgress = HandleProgress; + if (Module.companyName && Module.productName && Module.cachedFetch) { + fetchImpl = Module.cachedFetch; + requestOptions.init.companyName = Module.companyName; + requestOptions.init.productName = Module.productName; + requestOptions.init.productVersion = Module.productVersion; + requestOptions.init.control = Module.cacheControl(requestOptions.url) + } + fetchImpl(requestOptions.url, requestOptions.init).then(function(response) { + wr.responses[requestId] = response; + HandleSuccess(response, response.parsedBody) + }).catch(function(error) { + var kWebErrorUnknown = 2; + var kWebErrorAborted = 17; + var kWebErrorTimeout = 14; + if (requestOptions.isTimedOut) { + HandleError("Connection timed out.", kWebErrorTimeout) + } else if (abortController.signal.aborted) { + HandleError("Aborted.", kWebErrorAborted) + } else { + HandleError(error.message, kWebErrorUnknown) + } + }) + } catch (error) { + var kWebErrorUnknown = 2; + HandleError(error.message, kWebErrorUnknown) + } + } + function _JS_WebRequest_SetRedirectLimit(request, redirectLimit) { + var requestOptions = wr.requests[request]; + if (!requestOptions) { + return + } + requestOptions.init.redirect = redirectLimit === 0 ? "error" : "follow" + } + function _JS_WebRequest_SetRequestHeader(requestId, header, value) { + var requestOptions = wr.requests[requestId]; + if (!requestOptions) { + return + } + var _header = UTF8ToString(header); + var _value = UTF8ToString(value); + requestOptions.init.headers[_header] = _value + } + function _JS_WebRequest_SetTimeout(requestId, timeout) { + var requestOptions = wr.requests[requestId]; + if (!requestOptions) { + return + } + requestOptions.timeout = timeout + } + var webSocketInstances = []; + function _SocketClose(socketInstance) { + var socket = webSocketInstances[socketInstance]; + socket.socket.close() + } + function _SocketCreate(url, protocols) { + var str = UTF8ToString(url); + var prot = UTF8ToString(protocols); + var socket = { + socket: new WebSocket(str,[prot]), + buffer: new Uint8Array(0), + error: null, + messages: [] + }; + socket.socket.binaryType = "arraybuffer"; + socket.socket.onmessage = function(e) { + if (e.data instanceof ArrayBuffer) { + var array = new Uint8Array(e.data); + socket.messages.push(array) + } + } + ; + socket.socket.onclose = function(e) { + if (e.code != 1e3) { + if (e.reason != null && e.reason.length > 0) + socket.error = e.reason; + else { + switch (e.code) { + case 1001: + socket.error = "Endpoint going away."; + break; + case 1002: + socket.error = "Protocol error."; + break; + case 1003: + socket.error = "Unsupported message."; + break; + case 1005: + socket.error = "No status."; + break; + case 1006: + socket.error = "Abnormal disconnection."; + break; + case 1009: + socket.error = "Data frame too large."; + break; + default: + socket.error = "Error " + e.code + } + } + } + } + ; + var instance = webSocketInstances.push(socket) - 1; + return instance + } + function _SocketError(socketInstance, ptr, bufsize) { + var socket = webSocketInstances[socketInstance]; + if (socket.error == null) + return 0; + stringToUTF8(socket.error, ptr, bufsize); + return 1 + } + function _SocketRecv(socketInstance, ptr, length) { + var socket = webSocketInstances[socketInstance]; + if (socket.messages.length == 0) + return 0; + if (socket.messages[0].length > length) + return 0; + HEAPU8.set(socket.messages[0], ptr); + socket.messages = socket.messages.slice(1) + } + function _SocketRecvLength(socketInstance) { + var socket = webSocketInstances[socketInstance]; + if (socket.messages.length == 0) + return 0; + return socket.messages[0].length + } + function _SocketSend(socketInstance, ptr, length) { + var socket = webSocketInstances[socketInstance]; + socket.socket.send(HEAPU8.buffer.slice(ptr, ptr + length)) + } + function _SocketState(socketInstance) { + var socket = webSocketInstances[socketInstance]; + return socket.socket.readyState + } + var exceptionCaught = []; + var uncaughtExceptionCount = 0; + function ___cxa_begin_catch(ptr) { + var info = new ExceptionInfo(ptr); + if (!info.get_caught()) { + info.set_caught(true); + uncaughtExceptionCount-- + } + info.set_rethrown(false); + exceptionCaught.push(info); + ___cxa_increment_exception_refcount(info.excPtr); + return info.get_exception_ptr() + } + var exceptionLast = 0; + function ___cxa_end_catch() { + _setThrew(0); + var info = exceptionCaught.pop(); + ___cxa_decrement_exception_refcount(info.excPtr); + exceptionLast = 0 + } + function ExceptionInfo(excPtr) { + this.excPtr = excPtr; + this.ptr = excPtr - 24; + this.set_type = function(type) { + HEAPU32[this.ptr + 4 >> 2] = type + } + ; + this.get_type = function() { + return HEAPU32[this.ptr + 4 >> 2] + } + ; + this.set_destructor = function(destructor) { + HEAPU32[this.ptr + 8 >> 2] = destructor + } + ; + this.get_destructor = function() { + return HEAPU32[this.ptr + 8 >> 2] + } + ; + this.set_caught = function(caught) { + caught = caught ? 1 : 0; + HEAP8[this.ptr + 12 >> 0] = caught + } + ; + this.get_caught = function() { + return HEAP8[this.ptr + 12 >> 0] != 0 + } + ; + this.set_rethrown = function(rethrown) { + rethrown = rethrown ? 1 : 0; + HEAP8[this.ptr + 13 >> 0] = rethrown + } + ; + this.get_rethrown = function() { + return HEAP8[this.ptr + 13 >> 0] != 0 + } + ; + this.init = function(type, destructor) { + this.set_adjusted_ptr(0); + this.set_type(type); + this.set_destructor(destructor) + } + ; + this.set_adjusted_ptr = function(adjustedPtr) { + HEAPU32[this.ptr + 16 >> 2] = adjustedPtr + } + ; + this.get_adjusted_ptr = function() { + return HEAPU32[this.ptr + 16 >> 2] + } + ; + this.get_exception_ptr = function() { + var isPointer = ___cxa_is_pointer_type(this.get_type()); + if (isPointer) { + return HEAPU32[this.excPtr >> 2] + } + var adjusted = this.get_adjusted_ptr(); + if (adjusted !== 0) + return adjusted; + return this.excPtr + } + } + function ___resumeException(ptr) { + if (!exceptionLast) { + exceptionLast = ptr + } + throw exceptionLast + } + function ___cxa_find_matching_catch() { + var thrown = exceptionLast; + if (!thrown) { + setTempRet0(0); + return 0 + } + var info = new ExceptionInfo(thrown); + info.set_adjusted_ptr(thrown); + var thrownType = info.get_type(); + if (!thrownType) { + setTempRet0(0); + return thrown + } + for (var i = 0; i < arguments.length; i++) { + var caughtType = arguments[i]; + if (caughtType === 0 || caughtType === thrownType) { + break + } + var adjusted_ptr_addr = info.ptr + 16; + if (___cxa_can_catch(caughtType, thrownType, adjusted_ptr_addr)) { + setTempRet0(caughtType); + return thrown + } + } + setTempRet0(thrownType); + return thrown + } + var ___cxa_find_matching_catch_2 = ___cxa_find_matching_catch; + var ___cxa_find_matching_catch_3 = ___cxa_find_matching_catch; + var ___cxa_find_matching_catch_4 = ___cxa_find_matching_catch; + function ___cxa_rethrow() { + var info = exceptionCaught.pop(); + if (!info) { + abort("no exception to throw") + } + var ptr = info.excPtr; + if (!info.get_rethrown()) { + exceptionCaught.push(info); + info.set_rethrown(true); + info.set_caught(false); + uncaughtExceptionCount++ + } + exceptionLast = ptr; + throw exceptionLast + } + function ___cxa_throw(ptr, type, destructor) { + var info = new ExceptionInfo(ptr); + info.init(type, destructor); + exceptionLast = ptr; + uncaughtExceptionCount++; + throw exceptionLast + } + function ___cxa_uncaught_exceptions() { + return uncaughtExceptionCount + } + function ___dlsym(handle, symbol) {} + function ___syscall__newselect(nfds, readfds, writefds, exceptfds, timeout) { + try { + var total = 0; + var srcReadLow = readfds ? HEAP32[readfds >> 2] : 0 + , srcReadHigh = readfds ? HEAP32[readfds + 4 >> 2] : 0; + var srcWriteLow = writefds ? HEAP32[writefds >> 2] : 0 + , srcWriteHigh = writefds ? HEAP32[writefds + 4 >> 2] : 0; + var srcExceptLow = exceptfds ? HEAP32[exceptfds >> 2] : 0 + , srcExceptHigh = exceptfds ? HEAP32[exceptfds + 4 >> 2] : 0; + var dstReadLow = 0 + , dstReadHigh = 0; + var dstWriteLow = 0 + , dstWriteHigh = 0; + var dstExceptLow = 0 + , dstExceptHigh = 0; + var allLow = (readfds ? HEAP32[readfds >> 2] : 0) | (writefds ? HEAP32[writefds >> 2] : 0) | (exceptfds ? HEAP32[exceptfds >> 2] : 0); + var allHigh = (readfds ? HEAP32[readfds + 4 >> 2] : 0) | (writefds ? HEAP32[writefds + 4 >> 2] : 0) | (exceptfds ? HEAP32[exceptfds + 4 >> 2] : 0); + var check = function(fd, low, high, val) { + return fd < 32 ? low & val : high & val + }; + for (var fd = 0; fd < nfds; fd++) { + var mask = 1 << fd % 32; + if (!check(fd, allLow, allHigh, mask)) { + continue + } + var stream = SYSCALLS.getStreamFromFD(fd); + var flags = SYSCALLS.DEFAULT_POLLMASK; + if (stream.stream_ops.poll) { + flags = stream.stream_ops.poll(stream) + } + if (flags & 1 && check(fd, srcReadLow, srcReadHigh, mask)) { + fd < 32 ? dstReadLow = dstReadLow | mask : dstReadHigh = dstReadHigh | mask; + total++ + } + if (flags & 4 && check(fd, srcWriteLow, srcWriteHigh, mask)) { + fd < 32 ? dstWriteLow = dstWriteLow | mask : dstWriteHigh = dstWriteHigh | mask; + total++ + } + if (flags & 2 && check(fd, srcExceptLow, srcExceptHigh, mask)) { + fd < 32 ? dstExceptLow = dstExceptLow | mask : dstExceptHigh = dstExceptHigh | mask; + total++ + } + } + if (readfds) { + HEAP32[readfds >> 2] = dstReadLow; + HEAP32[readfds + 4 >> 2] = dstReadHigh + } + if (writefds) { + HEAP32[writefds >> 2] = dstWriteLow; + HEAP32[writefds + 4 >> 2] = dstWriteHigh + } + if (exceptfds) { + HEAP32[exceptfds >> 2] = dstExceptLow; + HEAP32[exceptfds + 4 >> 2] = dstExceptHigh + } + return total + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + var SOCKFS = { + mount: function(mount) { + Module["websocket"] = Module["websocket"] && "object" === typeof Module["websocket"] ? Module["websocket"] : {}; + Module["websocket"]._callbacks = {}; + Module["websocket"]["on"] = function(event, callback) { + if ("function" === typeof callback) { + this._callbacks[event] = callback + } + return this + } + ; + Module["websocket"].emit = function(event, param) { + if ("function" === typeof this._callbacks[event]) { + this._callbacks[event].call(this, param) + } + } + ; + return FS.createNode(null, "/", 16384 | 511, 0) + }, + createSocket: function(family, type, protocol) { + type &= ~526336; + var streaming = type == 1; + if (streaming && protocol && protocol != 6) { + throw new FS.ErrnoError(66) + } + var sock = { + family: family, + type: type, + protocol: protocol, + server: null, + error: null, + peers: {}, + pending: [], + recv_queue: [], + sock_ops: SOCKFS.websocket_sock_ops + }; + var name = SOCKFS.nextname(); + var node = FS.createNode(SOCKFS.root, name, 49152, 0); + node.sock = sock; + var stream = FS.createStream({ + path: name, + node: node, + flags: 2, + seekable: false, + stream_ops: SOCKFS.stream_ops + }); + sock.stream = stream; + return sock + }, + getSocket: function(fd) { + var stream = FS.getStream(fd); + if (!stream || !FS.isSocket(stream.node.mode)) { + return null + } + return stream.node.sock + }, + stream_ops: { + poll: function(stream) { + var sock = stream.node.sock; + return sock.sock_ops.poll(sock) + }, + ioctl: function(stream, request, varargs) { + var sock = stream.node.sock; + return sock.sock_ops.ioctl(sock, request, varargs) + }, + read: function(stream, buffer, offset, length, position) { + var sock = stream.node.sock; + var msg = sock.sock_ops.recvmsg(sock, length); + if (!msg) { + return 0 + } + buffer.set(msg.buffer, offset); + return msg.buffer.length + }, + write: function(stream, buffer, offset, length, position) { + var sock = stream.node.sock; + return sock.sock_ops.sendmsg(sock, buffer, offset, length) + }, + close: function(stream) { + var sock = stream.node.sock; + sock.sock_ops.close(sock) + } + }, + nextname: function() { + if (!SOCKFS.nextname.current) { + SOCKFS.nextname.current = 0 + } + return "socket[" + SOCKFS.nextname.current++ + "]" + }, + websocket_sock_ops: { + createPeer: function(sock, addr, port) { + var ws; + if (typeof addr == "object") { + ws = addr; + addr = null; + port = null + } + if (ws) { + if (ws._socket) { + addr = ws._socket.remoteAddress; + port = ws._socket.remotePort + } else { + var result = /ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url); + if (!result) { + throw new Error("WebSocket URL must be in the format ws(s)://address:port") + } + addr = result[1]; + port = parseInt(result[2], 10) + } + } else { + try { + var runtimeConfig = Module["websocket"] && "object" === typeof Module["websocket"]; + var url = "ws:#".replace("#", "//"); + if (runtimeConfig) { + if ("string" === typeof Module["websocket"]["url"]) { + url = Module["websocket"]["url"] + } + } + if (url === "ws://" || url === "wss://") { + var parts = addr.split("/"); + url = url + parts[0] + ":" + port + "/" + parts.slice(1).join("/") + } + var subProtocols = "binary"; + if (runtimeConfig) { + if ("string" === typeof Module["websocket"]["subprotocol"]) { + subProtocols = Module["websocket"]["subprotocol"] + } + } + var opts = undefined; + if (subProtocols !== "null") { + subProtocols = subProtocols.replace(/^ +| +$/g, "").split(/ *, */); + opts = subProtocols + } + if (runtimeConfig && null === Module["websocket"]["subprotocol"]) { + subProtocols = "null"; + opts = undefined + } + var WebSocketConstructor; + { + WebSocketConstructor = WebSocket + } + ws = new WebSocketConstructor(url,opts); + ws.binaryType = "arraybuffer" + } catch (e) { + throw new FS.ErrnoError(23) + } + } + var peer = { + addr: addr, + port: port, + socket: ws, + dgram_send_queue: [] + }; + SOCKFS.websocket_sock_ops.addPeer(sock, peer); + SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer); + if (sock.type === 2 && typeof sock.sport != "undefined") { + peer.dgram_send_queue.push(new Uint8Array([255, 255, 255, 255, "p".charCodeAt(0), "o".charCodeAt(0), "r".charCodeAt(0), "t".charCodeAt(0), (sock.sport & 65280) >> 8, sock.sport & 255])) + } + return peer + }, + getPeer: function(sock, addr, port) { + return sock.peers[addr + ":" + port] + }, + addPeer: function(sock, peer) { + sock.peers[peer.addr + ":" + peer.port] = peer + }, + removePeer: function(sock, peer) { + delete sock.peers[peer.addr + ":" + peer.port] + }, + handlePeerEvents: function(sock, peer) { + var first = true; + var handleOpen = function() { + Module["websocket"].emit("open", sock.stream.fd); + try { + var queued = peer.dgram_send_queue.shift(); + while (queued) { + peer.socket.send(queued); + queued = peer.dgram_send_queue.shift() + } + } catch (e) { + peer.socket.close() + } + }; + function handleMessage(data) { + if (typeof data == "string") { + var encoder = new TextEncoder; + data = encoder.encode(data) + } else { + assert(data.byteLength !== undefined); + if (data.byteLength == 0) { + return + } + data = new Uint8Array(data) + } + var wasfirst = first; + first = false; + if (wasfirst && data.length === 10 && data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 && data[4] === "p".charCodeAt(0) && data[5] === "o".charCodeAt(0) && data[6] === "r".charCodeAt(0) && data[7] === "t".charCodeAt(0)) { + var newport = data[8] << 8 | data[9]; + SOCKFS.websocket_sock_ops.removePeer(sock, peer); + peer.port = newport; + SOCKFS.websocket_sock_ops.addPeer(sock, peer); + return + } + sock.recv_queue.push({ + addr: peer.addr, + port: peer.port, + data: data + }); + Module["websocket"].emit("message", sock.stream.fd) + } + if (ENVIRONMENT_IS_NODE) { + peer.socket.on("open", handleOpen); + peer.socket.on("message", function(data, isBinary) { + if (!isBinary) { + return + } + handleMessage(new Uint8Array(data).buffer) + }); + peer.socket.on("close", function() { + Module["websocket"].emit("close", sock.stream.fd) + }); + peer.socket.on("error", function(error) { + sock.error = 14; + Module["websocket"].emit("error", [sock.stream.fd, sock.error, "ECONNREFUSED: Connection refused"]) + }) + } else { + peer.socket.onopen = handleOpen; + peer.socket.onclose = function() { + Module["websocket"].emit("close", sock.stream.fd) + } + ; + peer.socket.onmessage = function peer_socket_onmessage(event) { + handleMessage(event.data) + } + ; + peer.socket.onerror = function(error) { + sock.error = 14; + Module["websocket"].emit("error", [sock.stream.fd, sock.error, "ECONNREFUSED: Connection refused"]) + } + } + }, + poll: function(sock) { + if (sock.type === 1 && sock.server) { + return sock.pending.length ? 64 | 1 : 0 + } + var mask = 0; + var dest = sock.type === 1 ? SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) : null; + if (sock.recv_queue.length || !dest || dest && dest.socket.readyState === dest.socket.CLOSING || dest && dest.socket.readyState === dest.socket.CLOSED) { + mask |= 64 | 1 + } + if (!dest || dest && dest.socket.readyState === dest.socket.OPEN) { + mask |= 4 + } + if (dest && dest.socket.readyState === dest.socket.CLOSING || dest && dest.socket.readyState === dest.socket.CLOSED) { + mask |= 16 + } + return mask + }, + ioctl: function(sock, request, arg) { + switch (request) { + case 21531: + var bytes = 0; + if (sock.recv_queue.length) { + bytes = sock.recv_queue[0].data.length + } + HEAP32[arg >> 2] = bytes; + return 0; + default: + return 28 + } + }, + close: function(sock) { + if (sock.server) { + try { + sock.server.close() + } catch (e) {} + sock.server = null + } + var peers = Object.keys(sock.peers); + for (var i = 0; i < peers.length; i++) { + var peer = sock.peers[peers[i]]; + try { + peer.socket.close() + } catch (e) {} + SOCKFS.websocket_sock_ops.removePeer(sock, peer) + } + return 0 + }, + bind: function(sock, addr, port) { + if (typeof sock.saddr != "undefined" || typeof sock.sport != "undefined") { + throw new FS.ErrnoError(28) + } + sock.saddr = addr; + sock.sport = port; + if (sock.type === 2) { + if (sock.server) { + sock.server.close(); + sock.server = null + } + try { + sock.sock_ops.listen(sock, 0) + } catch (e) { + if (!(e.name === "ErrnoError")) + throw e; + if (e.errno !== 138) + throw e + } + } + }, + connect: function(sock, addr, port) { + if (sock.server) { + throw new FS.ErrnoError(138) + } + if (typeof sock.daddr != "undefined" && typeof sock.dport != "undefined") { + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); + if (dest) { + if (dest.socket.readyState === dest.socket.CONNECTING) { + throw new FS.ErrnoError(7) + } else { + throw new FS.ErrnoError(30) + } + } + } + var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); + sock.daddr = peer.addr; + sock.dport = peer.port; + throw new FS.ErrnoError(26) + }, + listen: function(sock, backlog) { + if (!ENVIRONMENT_IS_NODE) { + throw new FS.ErrnoError(138) + } + }, + accept: function(listensock) { + if (!listensock.server || !listensock.pending.length) { + throw new FS.ErrnoError(28) + } + var newsock = listensock.pending.shift(); + newsock.stream.flags = listensock.stream.flags; + return newsock + }, + getname: function(sock, peer) { + var addr, port; + if (peer) { + if (sock.daddr === undefined || sock.dport === undefined) { + throw new FS.ErrnoError(53) + } + addr = sock.daddr; + port = sock.dport + } else { + addr = sock.saddr || 0; + port = sock.sport || 0 + } + return { + addr: addr, + port: port + } + }, + sendmsg: function(sock, buffer, offset, length, addr, port) { + if (sock.type === 2) { + if (addr === undefined || port === undefined) { + addr = sock.daddr; + port = sock.dport + } + if (addr === undefined || port === undefined) { + throw new FS.ErrnoError(17) + } + } else { + addr = sock.daddr; + port = sock.dport + } + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port); + if (sock.type === 1) { + if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + throw new FS.ErrnoError(53) + } else if (dest.socket.readyState === dest.socket.CONNECTING) { + throw new FS.ErrnoError(6) + } + } + if (ArrayBuffer.isView(buffer)) { + offset += buffer.byteOffset; + buffer = buffer.buffer + } + var data; + data = buffer.slice(offset, offset + length); + if (sock.type === 2) { + if (!dest || dest.socket.readyState !== dest.socket.OPEN) { + if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port) + } + dest.dgram_send_queue.push(data); + return length + } + } + try { + dest.socket.send(data); + return length + } catch (e) { + throw new FS.ErrnoError(28) + } + }, + recvmsg: function(sock, length) { + if (sock.type === 1 && sock.server) { + throw new FS.ErrnoError(53) + } + var queued = sock.recv_queue.shift(); + if (!queued) { + if (sock.type === 1) { + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); + if (!dest) { + throw new FS.ErrnoError(53) + } + if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + return null + } + throw new FS.ErrnoError(6) + } + throw new FS.ErrnoError(6) + } + var queuedLength = queued.data.byteLength || queued.data.length; + var queuedOffset = queued.data.byteOffset || 0; + var queuedBuffer = queued.data.buffer || queued.data; + var bytesRead = Math.min(length, queuedLength); + var res = { + buffer: new Uint8Array(queuedBuffer,queuedOffset,bytesRead), + addr: queued.addr, + port: queued.port + }; + if (sock.type === 1 && bytesRead < queuedLength) { + var bytesRemaining = queuedLength - bytesRead; + queued.data = new Uint8Array(queuedBuffer,queuedOffset + bytesRead,bytesRemaining); + sock.recv_queue.unshift(queued) + } + return res + } + } + }; + function getSocketFromFD(fd) { + var socket = SOCKFS.getSocket(fd); + if (!socket) + throw new FS.ErrnoError(8); + return socket + } + function setErrNo(value) { + HEAP32[___errno_location() >> 2] = value; + return value + } + function inetPton4(str) { + var b = str.split("."); + for (var i = 0; i < 4; i++) { + var tmp = Number(b[i]); + if (isNaN(tmp)) + return null; + b[i] = tmp + } + return (b[0] | b[1] << 8 | b[2] << 16 | b[3] << 24) >>> 0 + } + function jstoi_q(str) { + return parseInt(str) + } + function inetPton6(str) { + var words; + var w, offset, z; + var valid6regx = /^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i; + var parts = []; + if (!valid6regx.test(str)) { + return null + } + if (str === "::") { + return [0, 0, 0, 0, 0, 0, 0, 0] + } + if (str.startsWith("::")) { + str = str.replace("::", "Z:") + } else { + str = str.replace("::", ":Z:") + } + if (str.indexOf(".") > 0) { + str = str.replace(new RegExp("[.]","g"), ":"); + words = str.split(":"); + words[words.length - 4] = jstoi_q(words[words.length - 4]) + jstoi_q(words[words.length - 3]) * 256; + words[words.length - 3] = jstoi_q(words[words.length - 2]) + jstoi_q(words[words.length - 1]) * 256; + words = words.slice(0, words.length - 2) + } else { + words = str.split(":") + } + offset = 0; + z = 0; + for (w = 0; w < words.length; w++) { + if (typeof words[w] == "string") { + if (words[w] === "Z") { + for (z = 0; z < 8 - words.length + 1; z++) { + parts[w + z] = 0 + } + offset = z - 1 + } else { + parts[w + offset] = _htons(parseInt(words[w], 16)) + } + } else { + parts[w + offset] = words[w] + } + } + return [parts[1] << 16 | parts[0], parts[3] << 16 | parts[2], parts[5] << 16 | parts[4], parts[7] << 16 | parts[6]] + } + function writeSockaddr(sa, family, addr, port, addrlen) { + switch (family) { + case 2: + addr = inetPton4(addr); + zeroMemory(sa, 16); + if (addrlen) { + HEAP32[addrlen >> 2] = 16 + } + HEAP16[sa >> 1] = family; + HEAP32[sa + 4 >> 2] = addr; + HEAP16[sa + 2 >> 1] = _htons(port); + break; + case 10: + addr = inetPton6(addr); + zeroMemory(sa, 28); + if (addrlen) { + HEAP32[addrlen >> 2] = 28 + } + HEAP32[sa >> 2] = family; + HEAP32[sa + 8 >> 2] = addr[0]; + HEAP32[sa + 12 >> 2] = addr[1]; + HEAP32[sa + 16 >> 2] = addr[2]; + HEAP32[sa + 20 >> 2] = addr[3]; + HEAP16[sa + 2 >> 1] = _htons(port); + break; + default: + return 5 + } + return 0 + } + var DNS = { + address_map: { + id: 1, + addrs: {}, + names: {} + }, + lookup_name: function(name) { + var res = inetPton4(name); + if (res !== null) { + return name + } + res = inetPton6(name); + if (res !== null) { + return name + } + var addr; + if (DNS.address_map.addrs[name]) { + addr = DNS.address_map.addrs[name] + } else { + var id = DNS.address_map.id++; + assert(id < 65535, "exceeded max address mappings of 65535"); + addr = "172.29." + (id & 255) + "." + (id & 65280); + DNS.address_map.names[addr] = name; + DNS.address_map.addrs[name] = addr + } + return addr + }, + lookup_addr: function(addr) { + if (DNS.address_map.names[addr]) { + return DNS.address_map.names[addr] + } + return null + } + }; + function ___syscall_accept4(fd, addr, addrlen, flags, d1, d2) { + try { + var sock = getSocketFromFD(fd); + var newsock = sock.sock_ops.accept(sock); + if (addr) { + var errno = writeSockaddr(addr, newsock.family, DNS.lookup_name(newsock.daddr), newsock.dport, addrlen) + } + return newsock.stream.fd + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function inetNtop4(addr) { + return (addr & 255) + "." + (addr >> 8 & 255) + "." + (addr >> 16 & 255) + "." + (addr >> 24 & 255) + } + function inetNtop6(ints) { + var str = ""; + var word = 0; + var longest = 0; + var lastzero = 0; + var zstart = 0; + var len = 0; + var i = 0; + var parts = [ints[0] & 65535, ints[0] >> 16, ints[1] & 65535, ints[1] >> 16, ints[2] & 65535, ints[2] >> 16, ints[3] & 65535, ints[3] >> 16]; + var hasipv4 = true; + var v4part = ""; + for (i = 0; i < 5; i++) { + if (parts[i] !== 0) { + hasipv4 = false; + break + } + } + if (hasipv4) { + v4part = inetNtop4(parts[6] | parts[7] << 16); + if (parts[5] === -1) { + str = "::ffff:"; + str += v4part; + return str + } + if (parts[5] === 0) { + str = "::"; + if (v4part === "0.0.0.0") + v4part = ""; + if (v4part === "0.0.0.1") + v4part = "1"; + str += v4part; + return str + } + } + for (word = 0; word < 8; word++) { + if (parts[word] === 0) { + if (word - lastzero > 1) { + len = 0 + } + lastzero = word; + len++ + } + if (len > longest) { + longest = len; + zstart = word - longest + 1 + } + } + for (word = 0; word < 8; word++) { + if (longest > 1) { + if (parts[word] === 0 && word >= zstart && word < zstart + longest) { + if (word === zstart) { + str += ":"; + if (zstart === 0) + str += ":" + } + continue + } + } + str += Number(_ntohs(parts[word] & 65535)).toString(16); + str += word < 7 ? ":" : "" + } + return str + } + function readSockaddr(sa, salen) { + var family = HEAP16[sa >> 1]; + var port = _ntohs(HEAPU16[sa + 2 >> 1]); + var addr; + switch (family) { + case 2: + if (salen !== 16) { + return { + errno: 28 + } + } + addr = HEAP32[sa + 4 >> 2]; + addr = inetNtop4(addr); + break; + case 10: + if (salen !== 28) { + return { + errno: 28 + } + } + addr = [HEAP32[sa + 8 >> 2], HEAP32[sa + 12 >> 2], HEAP32[sa + 16 >> 2], HEAP32[sa + 20 >> 2]]; + addr = inetNtop6(addr); + break; + default: + return { + errno: 5 + } + } + return { + family: family, + addr: addr, + port: port + } + } + function getSocketAddress(addrp, addrlen, allowNull) { + if (allowNull && addrp === 0) + return null; + var info = readSockaddr(addrp, addrlen); + if (info.errno) + throw new FS.ErrnoError(info.errno); + info.addr = DNS.lookup_addr(info.addr) || info.addr; + return info + } + function ___syscall_bind(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var info = getSocketAddress(addr, addrlen); + sock.sock_ops.bind(sock, info.addr, info.port); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_chmod(path, mode) { + try { + path = SYSCALLS.getStr(path); + FS.chmod(path, mode); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_connect(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var info = getSocketAddress(addr, addrlen); + sock.sock_ops.connect(sock, info.addr, info.port); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_dup3(fd, suggestFD, flags) { + try { + var old = SYSCALLS.getStreamFromFD(fd); + if (old.fd === suggestFD) + return -28; + var suggest = FS.getStream(suggestFD); + if (suggest) + FS.close(suggest); + return FS.createStream(old, suggestFD, suggestFD + 1).fd + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_faccessat(dirfd, path, amode, flags) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + if (amode & ~7) { + return -28 + } + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + if (!node) { + return -44 + } + var perms = ""; + if (amode & 4) + perms += "r"; + if (amode & 2) + perms += "w"; + if (amode & 1) + perms += "x"; + if (perms && FS.nodePermissions(node, perms)) { + return -2 + } + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_fcntl64(fd, cmd, varargs) { + SYSCALLS.varargs = varargs; + try { + var stream = SYSCALLS.getStreamFromFD(fd); + switch (cmd) { + case 0: + { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -28 + } + var newStream; + newStream = FS.createStream(stream, arg); + return newStream.fd + } + case 1: + case 2: + return 0; + case 3: + return stream.flags; + case 4: + { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0 + } + case 5: + { + var arg = SYSCALLS.get(); + var offset = 0; + HEAP16[arg + offset >> 1] = 2; + return 0 + } + case 6: + case 7: + return 0; + case 16: + case 8: + return -28; + case 9: + setErrNo(28); + return -1; + default: + { + return -28 + } + } + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_fstat64(fd, buf) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + return SYSCALLS.doStat(FS.stat, stream.path, buf) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function convertI32PairToI53Checked(lo, hi) { + return hi + 2097152 >>> 0 < 4194305 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN + } + function ___syscall_ftruncate64(fd, length_low, length_high) { + try { + var length = convertI32PairToI53Checked(length_low, length_high); + if (isNaN(length)) + return -61; + FS.ftruncate(fd, length); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_getcwd(buf, size) { + try { + if (size === 0) + return -28; + var cwd = FS.cwd(); + var cwdLengthInBytes = lengthBytesUTF8(cwd) + 1; + if (size < cwdLengthInBytes) + return -68; + stringToUTF8(cwd, buf, size); + return cwdLengthInBytes + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_getdents64(fd, dirp, count) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + if (!stream.getdents) { + stream.getdents = FS.readdir(stream.path) + } + var struct_size = 280; + var pos = 0; + var off = FS.llseek(stream, 0, 1); + var idx = Math.floor(off / struct_size); + while (idx < stream.getdents.length && pos + struct_size <= count) { + var id; + var type; + var name = stream.getdents[idx]; + if (name === ".") { + id = stream.node.id; + type = 4 + } else if (name === "..") { + var lookup = FS.lookupPath(stream.path, { + parent: true + }); + id = lookup.node.id; + type = 4 + } else { + var child = FS.lookupNode(stream.node, name); + id = child.id; + type = FS.isChrdev(child.mode) ? 2 : FS.isDir(child.mode) ? 4 : FS.isLink(child.mode) ? 10 : 8 + } + tempI64 = [id >>> 0, (tempDouble = id, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[dirp + pos >> 2] = tempI64[0], + HEAP32[dirp + pos + 4 >> 2] = tempI64[1]; + tempI64 = [(idx + 1) * struct_size >>> 0, (tempDouble = (idx + 1) * struct_size, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[dirp + pos + 8 >> 2] = tempI64[0], + HEAP32[dirp + pos + 12 >> 2] = tempI64[1]; + HEAP16[dirp + pos + 16 >> 1] = 280; + HEAP8[dirp + pos + 18 >> 0] = type; + stringToUTF8(name, dirp + pos + 19, 256); + pos += struct_size; + idx += 1 + } + FS.llseek(stream, idx * struct_size, 0); + return pos + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_getpeername(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + if (!sock.daddr) { + return -53 + } + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(sock.daddr), sock.dport, addrlen); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_getsockname(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(sock.saddr || "0.0.0.0"), sock.sport, addrlen); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_getsockopt(fd, level, optname, optval, optlen, d1) { + try { + var sock = getSocketFromFD(fd); + if (level === 1) { + if (optname === 4) { + HEAP32[optval >> 2] = sock.error; + HEAP32[optlen >> 2] = 4; + sock.error = null; + return 0 + } + } + return -50 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_ioctl(fd, op, varargs) { + SYSCALLS.varargs = varargs; + try { + var stream = SYSCALLS.getStreamFromFD(fd); + switch (op) { + case 21509: + case 21505: + { + if (!stream.tty) + return -59; + return 0 + } + case 21510: + case 21511: + case 21512: + case 21506: + case 21507: + case 21508: + { + if (!stream.tty) + return -59; + return 0 + } + case 21519: + { + if (!stream.tty) + return -59; + var argp = SYSCALLS.get(); + HEAP32[argp >> 2] = 0; + return 0 + } + case 21520: + { + if (!stream.tty) + return -59; + return -28 + } + case 21531: + { + var argp = SYSCALLS.get(); + return FS.ioctl(stream, op, argp) + } + case 21523: + { + if (!stream.tty) + return -59; + return 0 + } + case 21524: + { + if (!stream.tty) + return -59; + return 0 + } + default: + return -28 + } + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_listen(fd, backlog) { + try { + var sock = getSocketFromFD(fd); + sock.sock_ops.listen(sock, backlog); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_lstat64(path, buf) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doStat(FS.lstat, path, buf) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_mkdirat(dirfd, path, mode) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + path = PATH.normalize(path); + if (path[path.length - 1] === "/") + path = path.substr(0, path.length - 1); + FS.mkdir(path, mode, 0); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_newfstatat(dirfd, path, buf, flags) { + try { + path = SYSCALLS.getStr(path); + var nofollow = flags & 256; + var allowEmpty = flags & 4096; + flags = flags & ~6400; + path = SYSCALLS.calculateAt(dirfd, path, allowEmpty); + return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_openat(dirfd, path, flags, varargs) { + SYSCALLS.varargs = varargs; + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + var mode = varargs ? SYSCALLS.get() : 0; + return FS.open(path, flags, mode).fd + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + var PIPEFS = { + BUCKET_BUFFER_SIZE: 8192, + mount: function(mount) { + return FS.createNode(null, "/", 16384 | 511, 0) + }, + createPipe: function() { + var pipe = { + buckets: [], + refcnt: 2 + }; + pipe.buckets.push({ + buffer: new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE), + offset: 0, + roffset: 0 + }); + var rName = PIPEFS.nextname(); + var wName = PIPEFS.nextname(); + var rNode = FS.createNode(PIPEFS.root, rName, 4096, 0); + var wNode = FS.createNode(PIPEFS.root, wName, 4096, 0); + rNode.pipe = pipe; + wNode.pipe = pipe; + var readableStream = FS.createStream({ + path: rName, + node: rNode, + flags: 0, + seekable: false, + stream_ops: PIPEFS.stream_ops + }); + rNode.stream = readableStream; + var writableStream = FS.createStream({ + path: wName, + node: wNode, + flags: 1, + seekable: false, + stream_ops: PIPEFS.stream_ops + }); + wNode.stream = writableStream; + return { + readable_fd: readableStream.fd, + writable_fd: writableStream.fd + } + }, + stream_ops: { + poll: function(stream) { + var pipe = stream.node.pipe; + if ((stream.flags & 2097155) === 1) { + return 256 | 4 + } + if (pipe.buckets.length > 0) { + for (var i = 0; i < pipe.buckets.length; i++) { + var bucket = pipe.buckets[i]; + if (bucket.offset - bucket.roffset > 0) { + return 64 | 1 + } + } + } + return 0 + }, + ioctl: function(stream, request, varargs) { + return 28 + }, + fsync: function(stream) { + return 28 + }, + read: function(stream, buffer, offset, length, position) { + var pipe = stream.node.pipe; + var currentLength = 0; + for (var i = 0; i < pipe.buckets.length; i++) { + var bucket = pipe.buckets[i]; + currentLength += bucket.offset - bucket.roffset + } + assert(buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer)); + var data = buffer.subarray(offset, offset + length); + if (length <= 0) { + return 0 + } + if (currentLength == 0) { + throw new FS.ErrnoError(6) + } + var toRead = Math.min(currentLength, length); + var totalRead = toRead; + var toRemove = 0; + for (var i = 0; i < pipe.buckets.length; i++) { + var currBucket = pipe.buckets[i]; + var bucketSize = currBucket.offset - currBucket.roffset; + if (toRead <= bucketSize) { + var tmpSlice = currBucket.buffer.subarray(currBucket.roffset, currBucket.offset); + if (toRead < bucketSize) { + tmpSlice = tmpSlice.subarray(0, toRead); + currBucket.roffset += toRead + } else { + toRemove++ + } + data.set(tmpSlice); + break + } else { + var tmpSlice = currBucket.buffer.subarray(currBucket.roffset, currBucket.offset); + data.set(tmpSlice); + data = data.subarray(tmpSlice.byteLength); + toRead -= tmpSlice.byteLength; + toRemove++ + } + } + if (toRemove && toRemove == pipe.buckets.length) { + toRemove--; + pipe.buckets[toRemove].offset = 0; + pipe.buckets[toRemove].roffset = 0 + } + pipe.buckets.splice(0, toRemove); + return totalRead + }, + write: function(stream, buffer, offset, length, position) { + var pipe = stream.node.pipe; + assert(buffer instanceof ArrayBuffer || ArrayBuffer.isView(buffer)); + var data = buffer.subarray(offset, offset + length); + var dataLen = data.byteLength; + if (dataLen <= 0) { + return 0 + } + var currBucket = null; + if (pipe.buckets.length == 0) { + currBucket = { + buffer: new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE), + offset: 0, + roffset: 0 + }; + pipe.buckets.push(currBucket) + } else { + currBucket = pipe.buckets[pipe.buckets.length - 1] + } + assert(currBucket.offset <= PIPEFS.BUCKET_BUFFER_SIZE); + var freeBytesInCurrBuffer = PIPEFS.BUCKET_BUFFER_SIZE - currBucket.offset; + if (freeBytesInCurrBuffer >= dataLen) { + currBucket.buffer.set(data, currBucket.offset); + currBucket.offset += dataLen; + return dataLen + } else if (freeBytesInCurrBuffer > 0) { + currBucket.buffer.set(data.subarray(0, freeBytesInCurrBuffer), currBucket.offset); + currBucket.offset += freeBytesInCurrBuffer; + data = data.subarray(freeBytesInCurrBuffer, data.byteLength) + } + var numBuckets = data.byteLength / PIPEFS.BUCKET_BUFFER_SIZE | 0; + var remElements = data.byteLength % PIPEFS.BUCKET_BUFFER_SIZE; + for (var i = 0; i < numBuckets; i++) { + var newBucket = { + buffer: new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE), + offset: PIPEFS.BUCKET_BUFFER_SIZE, + roffset: 0 + }; + pipe.buckets.push(newBucket); + newBucket.buffer.set(data.subarray(0, PIPEFS.BUCKET_BUFFER_SIZE)); + data = data.subarray(PIPEFS.BUCKET_BUFFER_SIZE, data.byteLength) + } + if (remElements > 0) { + var newBucket = { + buffer: new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE), + offset: data.byteLength, + roffset: 0 + }; + pipe.buckets.push(newBucket); + newBucket.buffer.set(data) + } + return dataLen + }, + close: function(stream) { + var pipe = stream.node.pipe; + pipe.refcnt--; + if (pipe.refcnt === 0) { + pipe.buckets = null + } + } + }, + nextname: function() { + if (!PIPEFS.nextname.current) { + PIPEFS.nextname.current = 0 + } + return "pipe[" + PIPEFS.nextname.current++ + "]" + } + }; + function ___syscall_pipe(fdPtr) { + try { + if (fdPtr == 0) { + throw new FS.ErrnoError(21) + } + var res = PIPEFS.createPipe(); + HEAP32[fdPtr >> 2] = res.readable_fd; + HEAP32[fdPtr + 4 >> 2] = res.writable_fd; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_poll(fds, nfds, timeout) { + try { + var nonzero = 0; + for (var i = 0; i < nfds; i++) { + var pollfd = fds + 8 * i; + var fd = HEAP32[pollfd >> 2]; + var events = HEAP16[pollfd + 4 >> 1]; + var mask = 32; + var stream = FS.getStream(fd); + if (stream) { + mask = SYSCALLS.DEFAULT_POLLMASK; + if (stream.stream_ops.poll) { + mask = stream.stream_ops.poll(stream) + } + } + mask &= events | 8 | 16; + if (mask) + nonzero++; + HEAP16[pollfd + 6 >> 1] = mask + } + return nonzero + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_readlinkat(dirfd, path, buf, bufsize) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + if (bufsize <= 0) + return -28; + var ret = FS.readlink(path); + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf + len]; + stringToUTF8(ret, buf, bufsize + 1); + HEAP8[buf + len] = endChar; + return len + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_recvfrom(fd, buf, len, flags, addr, addrlen) { + try { + var sock = getSocketFromFD(fd); + var msg = sock.sock_ops.recvmsg(sock, len); + if (!msg) + return 0; + if (addr) { + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(msg.addr), msg.port, addrlen) + } + HEAPU8.set(msg.buffer, buf); + return msg.buffer.byteLength + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_recvmsg(fd, message, flags, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var iov = HEAPU32[message + 8 >> 2]; + var num = HEAP32[message + 12 >> 2]; + var total = 0; + for (var i = 0; i < num; i++) { + total += HEAP32[iov + (8 * i + 4) >> 2] + } + var msg = sock.sock_ops.recvmsg(sock, total); + if (!msg) + return 0; + var name = HEAPU32[message >> 2]; + if (name) { + var errno = writeSockaddr(name, sock.family, DNS.lookup_name(msg.addr), msg.port) + } + var bytesRead = 0; + var bytesRemaining = msg.buffer.byteLength; + for (var i = 0; bytesRemaining > 0 && i < num; i++) { + var iovbase = HEAPU32[iov + (8 * i + 0) >> 2]; + var iovlen = HEAP32[iov + (8 * i + 4) >> 2]; + if (!iovlen) { + continue + } + var length = Math.min(iovlen, bytesRemaining); + var buf = msg.buffer.subarray(bytesRead, bytesRead + length); + HEAPU8.set(buf, iovbase + bytesRead); + bytesRead += length; + bytesRemaining -= length + } + return bytesRead + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_renameat(olddirfd, oldpath, newdirfd, newpath) { + try { + oldpath = SYSCALLS.getStr(oldpath); + newpath = SYSCALLS.getStr(newpath); + oldpath = SYSCALLS.calculateAt(olddirfd, oldpath); + newpath = SYSCALLS.calculateAt(newdirfd, newpath); + FS.rename(oldpath, newpath); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_rmdir(path) { + try { + path = SYSCALLS.getStr(path); + FS.rmdir(path); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_sendmsg(fd, message, flags, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var iov = HEAPU32[message + 8 >> 2]; + var num = HEAP32[message + 12 >> 2]; + var addr, port; + var name = HEAPU32[message >> 2]; + var namelen = HEAP32[message + 4 >> 2]; + if (name) { + var info = readSockaddr(name, namelen); + if (info.errno) + return -info.errno; + port = info.port; + addr = DNS.lookup_addr(info.addr) || info.addr + } + var total = 0; + for (var i = 0; i < num; i++) { + total += HEAP32[iov + (8 * i + 4) >> 2] + } + var view = new Uint8Array(total); + var offset = 0; + for (var i = 0; i < num; i++) { + var iovbase = HEAPU32[iov + (8 * i + 0) >> 2]; + var iovlen = HEAP32[iov + (8 * i + 4) >> 2]; + for (var j = 0; j < iovlen; j++) { + view[offset++] = HEAP8[iovbase + j >> 0] + } + } + return sock.sock_ops.sendmsg(sock, view, 0, total, addr, port) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_sendto(fd, message, length, flags, addr, addr_len) { + try { + var sock = getSocketFromFD(fd); + var dest = getSocketAddress(addr, addr_len, true); + if (!dest) { + return FS.write(sock.stream, HEAP8, message, length) + } + return sock.sock_ops.sendmsg(sock, HEAP8, message, length, dest.addr, dest.port) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_socket(domain, type, protocol) { + try { + var sock = SOCKFS.createSocket(domain, type, protocol); + return sock.stream.fd + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_stat64(path, buf) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doStat(FS.stat, path, buf) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_statfs64(path, size, buf) { + try { + path = SYSCALLS.getStr(path); + HEAP32[buf + 4 >> 2] = 4096; + HEAP32[buf + 40 >> 2] = 4096; + HEAP32[buf + 8 >> 2] = 1e6; + HEAP32[buf + 12 >> 2] = 5e5; + HEAP32[buf + 16 >> 2] = 5e5; + HEAP32[buf + 20 >> 2] = FS.nextInode; + HEAP32[buf + 24 >> 2] = 1e6; + HEAP32[buf + 28 >> 2] = 42; + HEAP32[buf + 44 >> 2] = 2; + HEAP32[buf + 36 >> 2] = 255; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_symlink(target, linkpath) { + try { + target = SYSCALLS.getStr(target); + linkpath = SYSCALLS.getStr(linkpath); + FS.symlink(target, linkpath); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_truncate64(path, length_low, length_high) { + try { + var length = convertI32PairToI53Checked(length_low, length_high); + if (isNaN(length)) + return -61; + path = SYSCALLS.getStr(path); + FS.truncate(path, length); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function ___syscall_unlinkat(dirfd, path, flags) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + if (flags === 0) { + FS.unlink(path) + } else if (flags === 512) { + FS.rmdir(path) + } else { + abort("Invalid flags passed to unlinkat") + } + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function readI53FromI64(ptr) { + return HEAPU32[ptr >> 2] + HEAP32[ptr + 4 >> 2] * 4294967296 + } + function ___syscall_utimensat(dirfd, path, times, flags) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path, true); + if (!times) { + var atime = Date.now(); + var mtime = atime + } else { + var seconds = readI53FromI64(times); + var nanoseconds = HEAP32[times + 8 >> 2]; + atime = seconds * 1e3 + nanoseconds / (1e3 * 1e3); + times += 16; + seconds = readI53FromI64(times); + nanoseconds = HEAP32[times + 8 >> 2]; + mtime = seconds * 1e3 + nanoseconds / (1e3 * 1e3) + } + FS.utime(path, atime, mtime); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + var nowIsMonotonic = true; + function __emscripten_get_now_is_monotonic() { + return nowIsMonotonic + } + function __emscripten_throw_longjmp() { + throw Infinity + } + function __gmtime_js(time, tmPtr) { + var date = new Date(readI53FromI64(time) * 1e3); + HEAP32[tmPtr >> 2] = date.getUTCSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getUTCHours(); + HEAP32[tmPtr + 12 >> 2] = date.getUTCDate(); + HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900; + HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); + var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); + var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; + HEAP32[tmPtr + 28 >> 2] = yday + } + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0) + } + var MONTH_DAYS_LEAP_CUMULATIVE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + var MONTH_DAYS_REGULAR_CUMULATIVE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + function ydayFromDate(date) { + var leap = isLeapYear(date.getFullYear()); + var monthDaysCumulative = leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE; + var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1; + return yday + } + function __localtime_js(time, tmPtr) { + var date = new Date(readI53FromI64(time) * 1e3); + HEAP32[tmPtr >> 2] = date.getSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getHours(); + HEAP32[tmPtr + 12 >> 2] = date.getDate(); + HEAP32[tmPtr + 16 >> 2] = date.getMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getFullYear() - 1900; + HEAP32[tmPtr + 24 >> 2] = date.getDay(); + var yday = ydayFromDate(date) | 0; + HEAP32[tmPtr + 28 >> 2] = yday; + HEAP32[tmPtr + 36 >> 2] = -(date.getTimezoneOffset() * 60); + var start = new Date(date.getFullYear(),0,1); + var summerOffset = new Date(date.getFullYear(),6,1).getTimezoneOffset(); + var winterOffset = start.getTimezoneOffset(); + var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset)) | 0; + HEAP32[tmPtr + 32 >> 2] = dst + } + function __mktime_js(tmPtr) { + var date = new Date(HEAP32[tmPtr + 20 >> 2] + 1900,HEAP32[tmPtr + 16 >> 2],HEAP32[tmPtr + 12 >> 2],HEAP32[tmPtr + 8 >> 2],HEAP32[tmPtr + 4 >> 2],HEAP32[tmPtr >> 2],0); + var dst = HEAP32[tmPtr + 32 >> 2]; + var guessedOffset = date.getTimezoneOffset(); + var start = new Date(date.getFullYear(),0,1); + var summerOffset = new Date(date.getFullYear(),6,1).getTimezoneOffset(); + var winterOffset = start.getTimezoneOffset(); + var dstOffset = Math.min(winterOffset, summerOffset); + if (dst < 0) { + HEAP32[tmPtr + 32 >> 2] = Number(summerOffset != winterOffset && dstOffset == guessedOffset) + } else if (dst > 0 != (dstOffset == guessedOffset)) { + var nonDstOffset = Math.max(winterOffset, summerOffset); + var trueOffset = dst > 0 ? dstOffset : nonDstOffset; + date.setTime(date.getTime() + (trueOffset - guessedOffset) * 6e4) + } + HEAP32[tmPtr + 24 >> 2] = date.getDay(); + var yday = ydayFromDate(date) | 0; + HEAP32[tmPtr + 28 >> 2] = yday; + HEAP32[tmPtr >> 2] = date.getSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getHours(); + HEAP32[tmPtr + 12 >> 2] = date.getDate(); + HEAP32[tmPtr + 16 >> 2] = date.getMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getYear(); + return date.getTime() / 1e3 | 0 + } + function __mmap_js(len, prot, flags, fd, off, allocated, addr) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var res = FS.mmap(stream, len, off, prot, flags); + var ptr = res.ptr; + HEAP32[allocated >> 2] = res.allocated; + HEAPU32[addr >> 2] = ptr; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function __munmap_js(addr, len, prot, flags, fd, offset) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + if (prot & 2) { + SYSCALLS.doMsync(addr, stream, len, flags, offset) + } + FS.munmap(stream) + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return -e.errno + } + } + function __tzset_js(timezone, daylight, tzname) { + var currentYear = (new Date).getFullYear(); + var winter = new Date(currentYear,0,1); + var summer = new Date(currentYear,6,1); + var winterOffset = winter.getTimezoneOffset(); + var summerOffset = summer.getTimezoneOffset(); + var stdTimezoneOffset = Math.max(winterOffset, summerOffset); + HEAPU32[timezone >> 2] = stdTimezoneOffset * 60; + HEAP32[daylight >> 2] = Number(winterOffset != summerOffset); + function extractZone(date) { + var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); + return match ? match[1] : "GMT" + } + var winterName = extractZone(winter); + var summerName = extractZone(summer); + var winterNamePtr = stringToNewUTF8(winterName); + var summerNamePtr = stringToNewUTF8(summerName); + if (summerOffset < winterOffset) { + HEAPU32[tzname >> 2] = winterNamePtr; + HEAPU32[tzname + 4 >> 2] = summerNamePtr + } else { + HEAPU32[tzname >> 2] = summerNamePtr; + HEAPU32[tzname + 4 >> 2] = winterNamePtr + } + } + function _abort() { + abort("") + } + function _dlopen(handle) {} + function _emscripten_cancel_main_loop() { + Browser.mainLoop.pause(); + Browser.mainLoop.func = null + } + function _emscripten_clear_interval(id) { + clearInterval(id) + } + function _emscripten_date_now() { + return Date.now() + } + function _emscripten_debugger() { + debugger + } + function withStackSave(f) { + var stack = stackSave(); + var ret = f(); + stackRestore(stack); + return ret + } + var JSEvents = { + inEventHandler: 0, + removeAllEventListeners: function() { + for (var i = JSEvents.eventHandlers.length - 1; i >= 0; --i) { + JSEvents._removeHandler(i) + } + JSEvents.eventHandlers = []; + JSEvents.deferredCalls = [] + }, + registerRemoveEventListeners: function() { + if (!JSEvents.removeEventListenersRegistered) { + __ATEXIT__.push(JSEvents.removeAllEventListeners); + JSEvents.removeEventListenersRegistered = true + } + }, + deferredCalls: [], + deferCall: function(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) + return false; + for (var i in arrA) { + if (arrA[i] != arrB[i]) + return false + } + return true + } + for (var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + JSEvents.deferredCalls.sort(function(x, y) { + return x.precedence < y.precedence + }) + }, + removeDeferredCalls: function(targetFunction) { + for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i + } + } + }, + canPerformEventHandlerRequests: function() { + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls + }, + runDeferredCalls: function() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return + } + for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + call.targetFunction.apply(null, call.argsList) + } + }, + eventHandlers: [], + removeAllHandlersOnTarget: function(target, eventTypeString) { + for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--) + } + } + }, + _removeHandler: function(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1) + }, + registerOrRemoveHandler: function(eventHandler) { + if (!eventHandler.target) { + return -4 + } + var jsEventHandler = function jsEventHandler(event) { + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + JSEvents.runDeferredCalls(); + eventHandler.handlerFunc(event); + JSEvents.runDeferredCalls(); + --JSEvents.inEventHandler + }; + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = jsEventHandler; + eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + JSEvents.registerRemoveEventListeners() + } else { + for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--) + } + } + } + return 0 + }, + getNodeNameForTarget: function(target) { + if (!target) + return ""; + if (target == window) + return "#window"; + if (target == screen) + return "#screen"; + return target && target.nodeName ? target.nodeName : "" + }, + fullscreenEnabled: function() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled + } + }; + var currentFullscreenStrategy = {}; + function maybeCStringToJsString(cString) { + return cString > 2 ? UTF8ToString(cString) : cString + } + var specialHTMLTargets = [0, document, window]; + function findEventTarget(target) { + target = maybeCStringToJsString(target); + var domElement = specialHTMLTargets[target] || document.querySelector(target); + return domElement + } + function findCanvasEventTarget(target) { + return findEventTarget(target) + } + function _emscripten_get_canvas_element_size(target, width, height) { + var canvas = findCanvasEventTarget(target); + if (!canvas) + return -4; + HEAP32[width >> 2] = canvas.width; + HEAP32[height >> 2] = canvas.height + } + function stringToUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = stackAlloc(size); + stringToUTF8(str, ret, size); + return ret + } + function getCanvasElementSize(target) { + return withStackSave(function() { + var w = stackAlloc(8); + var h = w + 4; + var targetInt = stringToUTF8OnStack(target.id); + var ret = _emscripten_get_canvas_element_size(targetInt, w, h); + var size = [HEAP32[w >> 2], HEAP32[h >> 2]]; + return size + }) + } + function _emscripten_set_canvas_element_size(target, width, height) { + var canvas = findCanvasEventTarget(target); + if (!canvas) + return -4; + canvas.width = width; + canvas.height = height; + return 0 + } + function setCanvasElementSize(target, width, height) { + if (!target.controlTransferredOffscreen) { + target.width = width; + target.height = height + } else { + withStackSave(function() { + var targetInt = stringToUTF8OnStack(target.id); + _emscripten_set_canvas_element_size(targetInt, width, height) + }) + } + } + function registerRestoreOldStyle(canvas) { + var canvasSize = getCanvasElementSize(canvas); + var oldWidth = canvasSize[0]; + var oldHeight = canvasSize[1]; + var oldCssWidth = canvas.style.width; + var oldCssHeight = canvas.style.height; + var oldBackgroundColor = canvas.style.backgroundColor; + var oldDocumentBackgroundColor = document.body.style.backgroundColor; + var oldPaddingLeft = canvas.style.paddingLeft; + var oldPaddingRight = canvas.style.paddingRight; + var oldPaddingTop = canvas.style.paddingTop; + var oldPaddingBottom = canvas.style.paddingBottom; + var oldMarginLeft = canvas.style.marginLeft; + var oldMarginRight = canvas.style.marginRight; + var oldMarginTop = canvas.style.marginTop; + var oldMarginBottom = canvas.style.marginBottom; + var oldDocumentBodyMargin = document.body.style.margin; + var oldDocumentOverflow = document.documentElement.style.overflow; + var oldDocumentScroll = document.body.scroll; + var oldImageRendering = canvas.style.imageRendering; + function restoreOldStyle() { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement; + if (!fullscreenElement) { + document.removeEventListener("fullscreenchange", restoreOldStyle); + document.removeEventListener("mozfullscreenchange", restoreOldStyle); + document.removeEventListener("webkitfullscreenchange", restoreOldStyle); + setCanvasElementSize(canvas, oldWidth, oldHeight); + canvas.style.width = oldCssWidth; + canvas.style.height = oldCssHeight; + canvas.style.backgroundColor = oldBackgroundColor; + if (!oldDocumentBackgroundColor) + document.body.style.backgroundColor = "white"; + document.body.style.backgroundColor = oldDocumentBackgroundColor; + canvas.style.paddingLeft = oldPaddingLeft; + canvas.style.paddingRight = oldPaddingRight; + canvas.style.paddingTop = oldPaddingTop; + canvas.style.paddingBottom = oldPaddingBottom; + canvas.style.marginLeft = oldMarginLeft; + canvas.style.marginRight = oldMarginRight; + canvas.style.marginTop = oldMarginTop; + canvas.style.marginBottom = oldMarginBottom; + document.body.style.margin = oldDocumentBodyMargin; + document.documentElement.style.overflow = oldDocumentOverflow; + document.body.scroll = oldDocumentScroll; + canvas.style.imageRendering = oldImageRendering; + if (canvas.GLctxObject) + canvas.GLctxObject.GLctx.viewport(0, 0, oldWidth, oldHeight); + if (currentFullscreenStrategy.canvasResizedCallback) { + ( (a1, a2, a3) => dynCall_iiii.apply(null, [currentFullscreenStrategy.canvasResizedCallback, a1, a2, a3]))(37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData) + } + } + } + document.addEventListener("fullscreenchange", restoreOldStyle); + document.addEventListener("mozfullscreenchange", restoreOldStyle); + document.addEventListener("webkitfullscreenchange", restoreOldStyle); + return restoreOldStyle + } + function setLetterbox(element, topBottom, leftRight) { + element.style.paddingLeft = element.style.paddingRight = leftRight + "px"; + element.style.paddingTop = element.style.paddingBottom = topBottom + "px" + } + function getBoundingClientRect(e) { + return specialHTMLTargets.indexOf(e) < 0 ? e.getBoundingClientRect() : { + "left": 0, + "top": 0 + } + } + function JSEvents_resizeCanvasForFullscreen(target, strategy) { + var restoreOldStyle = registerRestoreOldStyle(target); + var cssWidth = strategy.softFullscreen ? innerWidth : screen.width; + var cssHeight = strategy.softFullscreen ? innerHeight : screen.height; + var rect = getBoundingClientRect(target); + var windowedCssWidth = rect.width; + var windowedCssHeight = rect.height; + var canvasSize = getCanvasElementSize(target); + var windowedRttWidth = canvasSize[0]; + var windowedRttHeight = canvasSize[1]; + if (strategy.scaleMode == 3) { + setLetterbox(target, (cssHeight - windowedCssHeight) / 2, (cssWidth - windowedCssWidth) / 2); + cssWidth = windowedCssWidth; + cssHeight = windowedCssHeight + } else if (strategy.scaleMode == 2) { + if (cssWidth * windowedRttHeight < windowedRttWidth * cssHeight) { + var desiredCssHeight = windowedRttHeight * cssWidth / windowedRttWidth; + setLetterbox(target, (cssHeight - desiredCssHeight) / 2, 0); + cssHeight = desiredCssHeight + } else { + var desiredCssWidth = windowedRttWidth * cssHeight / windowedRttHeight; + setLetterbox(target, 0, (cssWidth - desiredCssWidth) / 2); + cssWidth = desiredCssWidth + } + } + if (!target.style.backgroundColor) + target.style.backgroundColor = "black"; + if (!document.body.style.backgroundColor) + document.body.style.backgroundColor = "black"; + target.style.width = cssWidth + "px"; + target.style.height = cssHeight + "px"; + if (strategy.filteringMode == 1) { + target.style.imageRendering = "optimizeSpeed"; + target.style.imageRendering = "-moz-crisp-edges"; + target.style.imageRendering = "-o-crisp-edges"; + target.style.imageRendering = "-webkit-optimize-contrast"; + target.style.imageRendering = "optimize-contrast"; + target.style.imageRendering = "crisp-edges"; + target.style.imageRendering = "pixelated" + } + var dpiScale = strategy.canvasResolutionScaleMode == 2 ? devicePixelRatio : 1; + if (strategy.canvasResolutionScaleMode != 0) { + var newWidth = cssWidth * dpiScale | 0; + var newHeight = cssHeight * dpiScale | 0; + setCanvasElementSize(target, newWidth, newHeight); + if (target.GLctxObject) + target.GLctxObject.GLctx.viewport(0, 0, newWidth, newHeight) + } + return restoreOldStyle + } + function JSEvents_requestFullscreen(target, strategy) { + if (strategy.scaleMode != 0 || strategy.canvasResolutionScaleMode != 0) { + JSEvents_resizeCanvasForFullscreen(target, strategy) + } + if (target.requestFullscreen) { + target.requestFullscreen() + } else if (target.mozRequestFullScreen) { + target.mozRequestFullScreen() + } else if (target.mozRequestFullscreen) { + target.mozRequestFullscreen() + } else if (target.webkitRequestFullscreen) { + target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) + } else { + return JSEvents.fullscreenEnabled() ? -3 : -1 + } + currentFullscreenStrategy = strategy; + if (strategy.canvasResizedCallback) { + ( (a1, a2, a3) => dynCall_iiii.apply(null, [strategy.canvasResizedCallback, a1, a2, a3]))(37, 0, strategy.canvasResizedCallbackUserData) + } + return 0 + } + function _emscripten_exit_fullscreen() { + if (!JSEvents.fullscreenEnabled()) + return -1; + JSEvents.removeDeferredCalls(JSEvents_requestFullscreen); + var d = specialHTMLTargets[1]; + if (d.exitFullscreen) { + d.fullscreenElement && d.exitFullscreen() + } else if (d.mozCancelFullScreen) { + d.mozFullScreenElement && d.mozCancelFullScreen() + } else if (d.webkitExitFullscreen) { + d.webkitFullscreenElement && d.webkitExitFullscreen() + } else { + return -1 + } + return 0 + } + function requestPointerLock(target) { + if (target.requestPointerLock) { + target.requestPointerLock() + } else { + if (document.body.requestPointerLock) { + return -3 + } + return -1 + } + return 0 + } + function _emscripten_exit_pointerlock() { + JSEvents.removeDeferredCalls(requestPointerLock); + if (document.exitPointerLock) { + document.exitPointerLock() + } else { + return -1 + } + return 0 + } + function fillFullscreenChangeEventData(eventStruct) { + var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + var isFullscreen = !!fullscreenElement; + HEAP32[eventStruct >> 2] = isFullscreen; + HEAP32[eventStruct + 4 >> 2] = JSEvents.fullscreenEnabled(); + var reportedElement = isFullscreen ? fullscreenElement : JSEvents.previousFullscreenElement; + var nodeName = JSEvents.getNodeNameForTarget(reportedElement); + var id = reportedElement && reportedElement.id ? reportedElement.id : ""; + stringToUTF8(nodeName, eventStruct + 8, 128); + stringToUTF8(id, eventStruct + 136, 128); + HEAP32[eventStruct + 264 >> 2] = reportedElement ? reportedElement.clientWidth : 0; + HEAP32[eventStruct + 268 >> 2] = reportedElement ? reportedElement.clientHeight : 0; + HEAP32[eventStruct + 272 >> 2] = screen.width; + HEAP32[eventStruct + 276 >> 2] = screen.height; + if (isFullscreen) { + JSEvents.previousFullscreenElement = fullscreenElement + } + } + function _emscripten_get_fullscreen_status(fullscreenStatus) { + if (!JSEvents.fullscreenEnabled()) + return -1; + fillFullscreenChangeEventData(fullscreenStatus); + return 0 + } + function fillGamepadEventData(eventStruct, e) { + HEAPF64[eventStruct >> 3] = e.timestamp; + for (var i = 0; i < e.axes.length; ++i) { + HEAPF64[eventStruct + i * 8 + 16 >> 3] = e.axes[i] + } + for (var i = 0; i < e.buttons.length; ++i) { + if (typeof e.buttons[i] == "object") { + HEAPF64[eventStruct + i * 8 + 528 >> 3] = e.buttons[i].value + } else { + HEAPF64[eventStruct + i * 8 + 528 >> 3] = e.buttons[i] + } + } + for (var i = 0; i < e.buttons.length; ++i) { + if (typeof e.buttons[i] == "object") { + HEAP32[eventStruct + i * 4 + 1040 >> 2] = e.buttons[i].pressed + } else { + HEAP32[eventStruct + i * 4 + 1040 >> 2] = e.buttons[i] == 1 + } + } + HEAP32[eventStruct + 1296 >> 2] = e.connected; + HEAP32[eventStruct + 1300 >> 2] = e.index; + HEAP32[eventStruct + 8 >> 2] = e.axes.length; + HEAP32[eventStruct + 12 >> 2] = e.buttons.length; + stringToUTF8(e.id, eventStruct + 1304, 64); + stringToUTF8(e.mapping, eventStruct + 1368, 64) + } + function _emscripten_get_gamepad_status(index, gamepadState) { + if (index < 0 || index >= JSEvents.lastGamepadState.length) + return -5; + if (!JSEvents.lastGamepadState[index]) + return -7; + fillGamepadEventData(gamepadState, JSEvents.lastGamepadState[index]); + return 0 + } + function getHeapMax() { + return 2147418112 + } + function _emscripten_get_heap_max() { + return getHeapMax() + } + function _emscripten_get_now_res() { + return 1e3 + } + function _emscripten_get_num_gamepads() { + return JSEvents.lastGamepadState.length + } + function _emscripten_html5_remove_all_event_listeners() { + JSEvents.removeAllEventListeners() + } + function webgl_enable_ANGLE_instanced_arrays(ctx) { + var ext = ctx.getExtension("ANGLE_instanced_arrays"); + if (ext) { + ctx["vertexAttribDivisor"] = function(index, divisor) { + ext["vertexAttribDivisorANGLE"](index, divisor) + } + ; + ctx["drawArraysInstanced"] = function(mode, first, count, primcount) { + ext["drawArraysInstancedANGLE"](mode, first, count, primcount) + } + ; + ctx["drawElementsInstanced"] = function(mode, count, type, indices, primcount) { + ext["drawElementsInstancedANGLE"](mode, count, type, indices, primcount) + } + ; + return 1 + } + } + function webgl_enable_OES_vertex_array_object(ctx) { + var ext = ctx.getExtension("OES_vertex_array_object"); + if (ext) { + ctx["createVertexArray"] = function() { + return ext["createVertexArrayOES"]() + } + ; + ctx["deleteVertexArray"] = function(vao) { + ext["deleteVertexArrayOES"](vao) + } + ; + ctx["bindVertexArray"] = function(vao) { + ext["bindVertexArrayOES"](vao) + } + ; + ctx["isVertexArray"] = function(vao) { + return ext["isVertexArrayOES"](vao) + } + ; + return 1 + } + } + function webgl_enable_WEBGL_draw_buffers(ctx) { + var ext = ctx.getExtension("WEBGL_draw_buffers"); + if (ext) { + ctx["drawBuffers"] = function(n, bufs) { + ext["drawBuffersWEBGL"](n, bufs) + } + ; + return 1 + } + } + function webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx) { + return !!(ctx.dibvbi = ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")) + } + function webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx) { + return !!(ctx.mdibvbi = ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")) + } + function webgl_enable_WEBGL_multi_draw(ctx) { + return !!(ctx.multiDrawWebgl = ctx.getExtension("WEBGL_multi_draw")) + } + var GL = { + counter: 1, + buffers: [], + mappedBuffers: {}, + programs: [], + framebuffers: [], + renderbuffers: [], + textures: [], + shaders: [], + vaos: [], + contexts: [], + offscreenCanvases: {}, + queries: [], + samplers: [], + transformFeedbacks: [], + syncs: [], + byteSizeByTypeRoot: 5120, + byteSizeByType: [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8], + stringCache: {}, + stringiCache: {}, + unpackAlignment: 4, + recordError: function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode + } + }, + getNewId: function(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null + } + return ret + }, + MAX_TEMP_BUFFER_SIZE: 2097152, + numTempVertexBuffersPerSize: 64, + log2ceilLookup: function(i) { + return 32 - Math.clz32(i === 0 ? 0 : i - 1) + }, + generateTempBuffers: function(quads, context) { + var largestIndex = GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE); + context.tempVertexBufferCounters1 = []; + context.tempVertexBufferCounters2 = []; + context.tempVertexBufferCounters1.length = context.tempVertexBufferCounters2.length = largestIndex + 1; + context.tempVertexBuffers1 = []; + context.tempVertexBuffers2 = []; + context.tempVertexBuffers1.length = context.tempVertexBuffers2.length = largestIndex + 1; + context.tempIndexBuffers = []; + context.tempIndexBuffers.length = largestIndex + 1; + for (var i = 0; i <= largestIndex; ++i) { + context.tempIndexBuffers[i] = null; + context.tempVertexBufferCounters1[i] = context.tempVertexBufferCounters2[i] = 0; + var ringbufferLength = GL.numTempVertexBuffersPerSize; + context.tempVertexBuffers1[i] = []; + context.tempVertexBuffers2[i] = []; + var ringbuffer1 = context.tempVertexBuffers1[i]; + var ringbuffer2 = context.tempVertexBuffers2[i]; + ringbuffer1.length = ringbuffer2.length = ringbufferLength; + for (var j = 0; j < ringbufferLength; ++j) { + ringbuffer1[j] = ringbuffer2[j] = null + } + } + if (quads) { + context.tempQuadIndexBuffer = GLctx.createBuffer(); + context.GLctx.bindBuffer(34963, context.tempQuadIndexBuffer); + var numIndexes = GL.MAX_TEMP_BUFFER_SIZE >> 1; + var quadIndexes = new Uint16Array(numIndexes); + var i = 0 + , v = 0; + while (1) { + quadIndexes[i++] = v; + if (i >= numIndexes) + break; + quadIndexes[i++] = v + 1; + if (i >= numIndexes) + break; + quadIndexes[i++] = v + 2; + if (i >= numIndexes) + break; + quadIndexes[i++] = v; + if (i >= numIndexes) + break; + quadIndexes[i++] = v + 2; + if (i >= numIndexes) + break; + quadIndexes[i++] = v + 3; + if (i >= numIndexes) + break; + v += 4 + } + context.GLctx.bufferData(34963, quadIndexes, 35044); + context.GLctx.bindBuffer(34963, null) + } + }, + getTempVertexBuffer: function getTempVertexBuffer(sizeBytes) { + var idx = GL.log2ceilLookup(sizeBytes); + var ringbuffer = GL.currentContext.tempVertexBuffers1[idx]; + var nextFreeBufferIndex = GL.currentContext.tempVertexBufferCounters1[idx]; + GL.currentContext.tempVertexBufferCounters1[idx] = GL.currentContext.tempVertexBufferCounters1[idx] + 1 & GL.numTempVertexBuffersPerSize - 1; + var vbo = ringbuffer[nextFreeBufferIndex]; + if (vbo) { + return vbo + } + var prevVBO = GLctx.getParameter(34964); + ringbuffer[nextFreeBufferIndex] = GLctx.createBuffer(); + GLctx.bindBuffer(34962, ringbuffer[nextFreeBufferIndex]); + GLctx.bufferData(34962, 1 << idx, 35048); + GLctx.bindBuffer(34962, prevVBO); + return ringbuffer[nextFreeBufferIndex] + }, + getTempIndexBuffer: function getTempIndexBuffer(sizeBytes) { + var idx = GL.log2ceilLookup(sizeBytes); + var ibo = GL.currentContext.tempIndexBuffers[idx]; + if (ibo) { + return ibo + } + var prevIBO = GLctx.getParameter(34965); + GL.currentContext.tempIndexBuffers[idx] = GLctx.createBuffer(); + GLctx.bindBuffer(34963, GL.currentContext.tempIndexBuffers[idx]); + GLctx.bufferData(34963, 1 << idx, 35048); + GLctx.bindBuffer(34963, prevIBO); + return GL.currentContext.tempIndexBuffers[idx] + }, + newRenderingFrameStarted: function newRenderingFrameStarted() { + if (!GL.currentContext) { + return + } + var vb = GL.currentContext.tempVertexBuffers1; + GL.currentContext.tempVertexBuffers1 = GL.currentContext.tempVertexBuffers2; + GL.currentContext.tempVertexBuffers2 = vb; + vb = GL.currentContext.tempVertexBufferCounters1; + GL.currentContext.tempVertexBufferCounters1 = GL.currentContext.tempVertexBufferCounters2; + GL.currentContext.tempVertexBufferCounters2 = vb; + var largestIndex = GL.log2ceilLookup(GL.MAX_TEMP_BUFFER_SIZE); + for (var i = 0; i <= largestIndex; ++i) { + GL.currentContext.tempVertexBufferCounters1[i] = 0 + } + }, + getSource: function(shader, count, string, length) { + var source = ""; + for (var i = 0; i < count; ++i) { + var len = length ? HEAP32[length + i * 4 >> 2] : -1; + source += UTF8ToString(HEAP32[string + i * 4 >> 2], len < 0 ? undefined : len) + } + return source + }, + calcBufLength: function calcBufLength(size, type, stride, count) { + if (stride > 0) { + return count * stride + } + var typeSize = GL.byteSizeByType[type - GL.byteSizeByTypeRoot]; + return size * typeSize * count + }, + usedTempBuffers: [], + preDrawHandleClientVertexAttribBindings: function preDrawHandleClientVertexAttribBindings(count) { + GL.resetBufferBinding = false; + for (var i = 0; i < GL.currentContext.maxVertexAttribs; ++i) { + var cb = GL.currentContext.clientBuffers[i]; + if (!cb.clientside || !cb.enabled) + continue; + GL.resetBufferBinding = true; + var size = GL.calcBufLength(cb.size, cb.type, cb.stride, count); + var buf = GL.getTempVertexBuffer(size); + GLctx.bindBuffer(34962, buf); + GLctx.bufferSubData(34962, 0, HEAPU8.subarray(cb.ptr, cb.ptr + size)); + cb.vertexAttribPointerAdaptor.call(GLctx, i, cb.size, cb.type, cb.normalized, cb.stride, 0) + } + }, + postDrawHandleClientVertexAttribBindings: function postDrawHandleClientVertexAttribBindings() { + if (GL.resetBufferBinding) { + GLctx.bindBuffer(34962, GL.buffers[GLctx.currentArrayBufferBinding]) + } + }, + createContext: function(canvas, webGLContextAttributes) { + function getChromeVersion() { + var chromeVersion = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); + if (chromeVersion) + return chromeVersion[2] | 0 + } + if (!canvas.getContextSafariWebGL2Fixed) { + canvas.getContextSafariWebGL2Fixed = canvas.getContext; + function fixedGetContext(ver, attrs) { + var gl = canvas.getContextSafariWebGL2Fixed(ver, attrs); + return ver == "webgl" == gl instanceof WebGLRenderingContext ? gl : null + } + canvas.getContext = fixedGetContext + } + var ctx = webGLContextAttributes.majorVersion > 1 ? !(getChromeVersion() <= 57) && canvas.getContext("webgl2", webGLContextAttributes) : canvas.getContext("webgl", webGLContextAttributes); + if (!ctx) + return 0; + var handle = GL.registerContext(ctx, webGLContextAttributes); + return handle + }, + registerContext: function(ctx, webGLContextAttributes) { + var handle = GL.getNewId(GL.contexts); + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + if (ctx.canvas) + ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + if (typeof webGLContextAttributes.enableExtensionsByDefault == "undefined" || webGLContextAttributes.enableExtensionsByDefault) { + GL.initExtensions(context) + } + context.maxVertexAttribs = context.GLctx.getParameter(34921); + context.clientBuffers = []; + for (var i = 0; i < context.maxVertexAttribs; i++) { + context.clientBuffers[i] = { + enabled: false, + clientside: false, + size: 0, + type: 0, + normalized: 0, + stride: 0, + ptr: 0, + vertexAttribPointerAdaptor: null + } + } + GL.generateTempBuffers(false, context); + return handle + }, + makeContextCurrent: function(contextHandle) { + GL.currentContext = GL.contexts[contextHandle]; + Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; + return !(contextHandle && !GLctx) + }, + getContext: function(contextHandle) { + return GL.contexts[contextHandle] + }, + deleteContext: function(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) + GL.currentContext = null; + if (typeof JSEvents == "object") + JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) + GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; + GL.contexts[contextHandle] = null + }, + initExtensions: function(context) { + if (!context) + context = GL.currentContext; + if (context.initExtensionsDone) + return; + context.initExtensionsDone = true; + var GLctx = context.GLctx; + webgl_enable_ANGLE_instanced_arrays(GLctx); + webgl_enable_OES_vertex_array_object(GLctx); + webgl_enable_WEBGL_draw_buffers(GLctx); + webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx); + webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx); + if (context.version >= 2) { + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query_webgl2") + } + if (context.version < 2 || !GLctx.disjointTimerQueryExt) { + GLctx.disjointTimerQueryExt = GLctx.getExtension("EXT_disjoint_timer_query") + } + webgl_enable_WEBGL_multi_draw(GLctx); + var exts = GLctx.getSupportedExtensions() || []; + exts.forEach(function(ext) { + if (!ext.includes("lose_context") && !ext.includes("debug")) { + GLctx.getExtension(ext) + } + }) + } + }; + function _emscripten_is_webgl_context_lost(contextHandle) { + return !GL.contexts[contextHandle] || GL.contexts[contextHandle].GLctx.isContextLost() + } + function reallyNegative(x) { + return x < 0 || x === 0 && 1 / x === -Infinity + } + function convertI32PairToI53(lo, hi) { + return (lo >>> 0) + hi * 4294967296 + } + function convertU32PairToI53(lo, hi) { + return (lo >>> 0) + (hi >>> 0) * 4294967296 + } + function reSign(value, bits) { + if (value <= 0) { + return value + } + var half = bits <= 32 ? Math.abs(1 << bits - 1) : Math.pow(2, bits - 1); + if (value >= half && (bits <= 32 || value > half)) { + value = -2 * half + value + } + return value + } + function unSign(value, bits) { + if (value >= 0) { + return value + } + return bits <= 32 ? 2 * Math.abs(1 << bits - 1) + value : Math.pow(2, bits) + value + } + function strLen(ptr) { + var end = ptr; + while (HEAPU8[end]) + ++end; + return end - ptr + } + function formatString(format, varargs) { + var textIndex = format; + var argIndex = varargs; + function prepVararg(ptr, type) { + if (type === "double" || type === "i64") { + if (ptr & 7) { + ptr += 4 + } + } else {} + return ptr + } + function getNextArg(type) { + var ret; + argIndex = prepVararg(argIndex, type); + if (type === "double") { + ret = HEAPF64[argIndex >> 3]; + argIndex += 8 + } else if (type == "i64") { + ret = [HEAP32[argIndex >> 2], HEAP32[argIndex + 4 >> 2]]; + argIndex += 8 + } else { + type = "i32"; + ret = HEAP32[argIndex >> 2]; + argIndex += 4 + } + return ret + } + var ret = []; + var curr, next, currArg; + while (1) { + var startTextIndex = textIndex; + curr = HEAP8[textIndex >> 0]; + if (curr === 0) + break; + next = HEAP8[textIndex + 1 >> 0]; + if (curr == 37) { + var flagAlwaysSigned = false; + var flagLeftAlign = false; + var flagAlternative = false; + var flagZeroPad = false; + var flagPadSign = false; + flagsLoop: while (1) { + switch (next) { + case 43: + flagAlwaysSigned = true; + break; + case 45: + flagLeftAlign = true; + break; + case 35: + flagAlternative = true; + break; + case 48: + if (flagZeroPad) { + break flagsLoop + } else { + flagZeroPad = true; + break + } + case 32: + flagPadSign = true; + break; + default: + break flagsLoop + } + textIndex++; + next = HEAP8[textIndex + 1 >> 0] + } + var width = 0; + if (next == 42) { + width = getNextArg("i32"); + textIndex++; + next = HEAP8[textIndex + 1 >> 0] + } else { + while (next >= 48 && next <= 57) { + width = width * 10 + (next - 48); + textIndex++; + next = HEAP8[textIndex + 1 >> 0] + } + } + var precisionSet = false + , precision = -1; + if (next == 46) { + precision = 0; + precisionSet = true; + textIndex++; + next = HEAP8[textIndex + 1 >> 0]; + if (next == 42) { + precision = getNextArg("i32"); + textIndex++ + } else { + while (1) { + var precisionChr = HEAP8[textIndex + 1 >> 0]; + if (precisionChr < 48 || precisionChr > 57) + break; + precision = precision * 10 + (precisionChr - 48); + textIndex++ + } + } + next = HEAP8[textIndex + 1 >> 0] + } + if (precision < 0) { + precision = 6; + precisionSet = false + } + var argSize; + switch (String.fromCharCode(next)) { + case "h": + var nextNext = HEAP8[textIndex + 2 >> 0]; + if (nextNext == 104) { + textIndex++; + argSize = 1 + } else { + argSize = 2 + } + break; + case "l": + var nextNext = HEAP8[textIndex + 2 >> 0]; + if (nextNext == 108) { + textIndex++; + argSize = 8 + } else { + argSize = 4 + } + break; + case "L": + case "q": + case "j": + argSize = 8; + break; + case "z": + case "t": + case "I": + argSize = 4; + break; + default: + argSize = null + } + if (argSize) + textIndex++; + next = HEAP8[textIndex + 1 >> 0]; + switch (String.fromCharCode(next)) { + case "d": + case "i": + case "u": + case "o": + case "x": + case "X": + case "p": + { + var signed = next == 100 || next == 105; + argSize = argSize || 4; + currArg = getNextArg("i" + argSize * 8); + var argText; + if (argSize == 8) { + currArg = next == 117 ? convertU32PairToI53(currArg[0], currArg[1]) : convertI32PairToI53(currArg[0], currArg[1]) + } + if (argSize <= 4) { + var limit = Math.pow(256, argSize) - 1; + currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8) + } + var currAbsArg = Math.abs(currArg); + var prefix = ""; + if (next == 100 || next == 105) { + argText = reSign(currArg, 8 * argSize).toString(10) + } else if (next == 117) { + argText = unSign(currArg, 8 * argSize).toString(10); + currArg = Math.abs(currArg) + } else if (next == 111) { + argText = (flagAlternative ? "0" : "") + currAbsArg.toString(8) + } else if (next == 120 || next == 88) { + prefix = flagAlternative && currArg != 0 ? "0x" : ""; + if (currArg < 0) { + currArg = -currArg; + argText = (currAbsArg - 1).toString(16); + var buffer = []; + for (var i = 0; i < argText.length; i++) { + buffer.push((15 - parseInt(argText[i], 16)).toString(16)) + } + argText = buffer.join(""); + while (argText.length < argSize * 2) + argText = "f" + argText + } else { + argText = currAbsArg.toString(16) + } + if (next == 88) { + prefix = prefix.toUpperCase(); + argText = argText.toUpperCase() + } + } else if (next == 112) { + if (currAbsArg === 0) { + argText = "(nil)" + } else { + prefix = "0x"; + argText = currAbsArg.toString(16) + } + } + if (precisionSet) { + while (argText.length < precision) { + argText = "0" + argText + } + } + if (currArg >= 0) { + if (flagAlwaysSigned) { + prefix = "+" + prefix + } else if (flagPadSign) { + prefix = " " + prefix + } + } + if (argText.charAt(0) == "-") { + prefix = "-" + prefix; + argText = argText.substr(1) + } + while (prefix.length + argText.length < width) { + if (flagLeftAlign) { + argText += " " + } else { + if (flagZeroPad) { + argText = "0" + argText + } else { + prefix = " " + prefix + } + } + } + argText = prefix + argText; + argText.split("").forEach(function(chr) { + ret.push(chr.charCodeAt(0)) + }); + break + } + case "f": + case "F": + case "e": + case "E": + case "g": + case "G": + { + currArg = getNextArg("double"); + var argText; + if (isNaN(currArg)) { + argText = "nan"; + flagZeroPad = false + } else if (!isFinite(currArg)) { + argText = (currArg < 0 ? "-" : "") + "inf"; + flagZeroPad = false + } else { + var isGeneral = false; + var effectivePrecision = Math.min(precision, 20); + if (next == 103 || next == 71) { + isGeneral = true; + precision = precision || 1; + var exponent = parseInt(currArg.toExponential(effectivePrecision).split("e")[1], 10); + if (precision > exponent && exponent >= -4) { + next = (next == 103 ? "f" : "F").charCodeAt(0); + precision -= exponent + 1 + } else { + next = (next == 103 ? "e" : "E").charCodeAt(0); + precision-- + } + effectivePrecision = Math.min(precision, 20) + } + if (next == 101 || next == 69) { + argText = currArg.toExponential(effectivePrecision); + if (/[eE][-+]\d$/.test(argText)) { + argText = argText.slice(0, -1) + "0" + argText.slice(-1) + } + } else if (next == 102 || next == 70) { + argText = currArg.toFixed(effectivePrecision); + if (currArg === 0 && reallyNegative(currArg)) { + argText = "-" + argText + } + } + var parts = argText.split("e"); + if (isGeneral && !flagAlternative) { + while (parts[0].length > 1 && parts[0].includes(".") && (parts[0].slice(-1) == "0" || parts[0].slice(-1) == ".")) { + parts[0] = parts[0].slice(0, -1) + } + } else { + if (flagAlternative && argText.indexOf(".") == -1) + parts[0] += "."; + while (precision > effectivePrecision++) + parts[0] += "0" + } + argText = parts[0] + (parts.length > 1 ? "e" + parts[1] : ""); + if (next == 69) + argText = argText.toUpperCase(); + if (currArg >= 0) { + if (flagAlwaysSigned) { + argText = "+" + argText + } else if (flagPadSign) { + argText = " " + argText + } + } + } + while (argText.length < width) { + if (flagLeftAlign) { + argText += " " + } else { + if (flagZeroPad && (argText[0] == "-" || argText[0] == "+")) { + argText = argText[0] + "0" + argText.slice(1) + } else { + argText = (flagZeroPad ? "0" : " ") + argText + } + } + } + if (next < 97) + argText = argText.toUpperCase(); + argText.split("").forEach(function(chr) { + ret.push(chr.charCodeAt(0)) + }); + break + } + case "s": + { + var arg = getNextArg("i8*"); + var argLength = arg ? strLen(arg) : "(null)".length; + if (precisionSet) + argLength = Math.min(argLength, precision); + if (!flagLeftAlign) { + while (argLength < width--) { + ret.push(32) + } + } + if (arg) { + for (var i = 0; i < argLength; i++) { + ret.push(HEAPU8[arg++ >> 0]) + } + } else { + ret = ret.concat(intArrayFromString("(null)".substr(0, argLength), true)) + } + if (flagLeftAlign) { + while (argLength < width--) { + ret.push(32) + } + } + break + } + case "c": + { + if (flagLeftAlign) + ret.push(getNextArg("i8")); + while (--width > 0) { + ret.push(32) + } + if (!flagLeftAlign) + ret.push(getNextArg("i8")); + break + } + case "n": + { + var ptr = getNextArg("i32*"); + HEAP32[ptr >> 2] = ret.length; + break + } + case "%": + { + ret.push(curr); + break + } + default: + { + for (var i = startTextIndex; i < textIndex + 2; i++) { + ret.push(HEAP8[i >> 0]) + } + } + } + textIndex += 2 + } else { + ret.push(curr); + textIndex += 1 + } + } + return ret + } + function traverseStack(args) { + if (!args || !args.callee || !args.callee.name) { + return [null, "", ""] + } + var funstr = args.callee.toString(); + var funcname = args.callee.name; + var str = "("; + var first = true; + for (var i in args) { + var a = args[i]; + if (!first) { + str += ", " + } + first = false; + if (typeof a == "number" || typeof a == "string") { + str += a + } else { + str += "(" + typeof a + ")" + } + } + str += ")"; + var caller = args.callee.caller; + args = caller ? caller.arguments : []; + if (first) + str = ""; + return [args, funcname, str] + } + function jsStackTrace() { + var error = new Error; + if (!error.stack) { + try { + throw new Error + } catch (e) { + error = e + } + if (!error.stack) { + return "(no stack trace available)" + } + } + return error.stack.toString() + } + function getCallstack(flags) { + var callstack = jsStackTrace(); + var iThisFunc = callstack.lastIndexOf("_emscripten_log"); + var iThisFunc2 = callstack.lastIndexOf("_emscripten_get_callstack"); + var iNextLine = callstack.indexOf("\n", Math.max(iThisFunc, iThisFunc2)) + 1; + callstack = callstack.slice(iNextLine); + if (flags & 32) { + warnOnce("EM_LOG_DEMANGLE is deprecated; ignoring") + } + if (flags & 8 && typeof emscripten_source_map == "undefined") { + warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'); + flags ^= 8; + flags |= 16 + } + var stack_args = null; + if (flags & 128) { + stack_args = traverseStack(arguments); + while (stack_args[1].includes("_emscripten_")) + stack_args = traverseStack(stack_args[0]) + } + var lines = callstack.split("\n"); + callstack = ""; + var newFirefoxRe = new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"); + var firefoxRe = new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"); + var chromeRe = new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"); + for (var l in lines) { + var line = lines[l]; + var symbolName = ""; + var file = ""; + var lineno = 0; + var column = 0; + var parts = chromeRe.exec(line); + if (parts && parts.length == 5) { + symbolName = parts[1]; + file = parts[2]; + lineno = parts[3]; + column = parts[4] + } else { + parts = newFirefoxRe.exec(line); + if (!parts) + parts = firefoxRe.exec(line); + if (parts && parts.length >= 4) { + symbolName = parts[1]; + file = parts[2]; + lineno = parts[3]; + column = parts[4] | 0 + } else { + callstack += line + "\n"; + continue + } + } + var haveSourceMap = false; + if (flags & 8) { + var orig = emscripten_source_map.originalPositionFor({ + line: lineno, + column: column + }); + haveSourceMap = orig && orig.source; + if (haveSourceMap) { + if (flags & 64) { + orig.source = orig.source.substring(orig.source.replace(/\\/g, "/").lastIndexOf("/") + 1) + } + callstack += ` at ${symbolName} (${orig.source}:${orig.line}:${orig.column})\n` + } + } + if (flags & 16 || !haveSourceMap) { + if (flags & 64) { + file = file.substring(file.replace(/\\/g, "/").lastIndexOf("/") + 1) + } + callstack += (haveSourceMap ? ` = ${symbolName}` : ` at ${symbolName}`) + ` (${file}:${lineno}:${column})\n` + } + if (flags & 128 && stack_args[0]) { + if (stack_args[1] == symbolName && stack_args[2].length > 0) { + callstack = callstack.replace(/\s+$/, ""); + callstack += " with values: " + stack_args[1] + stack_args[2] + "\n" + } + stack_args = traverseStack(stack_args[0]) + } + } + callstack = callstack.replace(/\s+$/, ""); + return callstack + } + function emscriptenLog(flags, str) { + if (flags & 24) { + str = str.replace(/\s+$/, ""); + str += (str.length > 0 ? "\n" : "") + getCallstack(flags) + } + if (flags & 1) { + if (flags & 4) { + console.error(str) + } else if (flags & 2) { + console.warn(str) + } else if (flags & 512) { + console.info(str) + } else if (flags & 256) { + console.debug(str) + } else { + console.log(str) + } + } else if (flags & 6) { + err(str) + } else { + out(str) + } + } + function _emscripten_log(flags, format, varargs) { + var result = formatString(format, varargs); + var str = UTF8ArrayToString(result, 0); + emscriptenLog(flags, str) + } + function _emscripten_memcpy_big(dest, src, num) { + HEAPU8.copyWithin(dest, src, src + num) + } + function doRequestFullscreen(target, strategy) { + if (!JSEvents.fullscreenEnabled()) + return -1; + target = findEventTarget(target); + if (!target) + return -4; + if (!target.requestFullscreen && !target.mozRequestFullScreen && !target.mozRequestFullscreen && !target.webkitRequestFullscreen) { + return -3 + } + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + if (!canPerformRequests) { + if (strategy.deferUntilInEventHandler) { + JSEvents.deferCall(JSEvents_requestFullscreen, 1, [target, strategy]); + return 1 + } + return -2 + } + return JSEvents_requestFullscreen(target, strategy) + } + function _emscripten_request_fullscreen(target, deferUntilInEventHandler) { + var strategy = { + scaleMode: 0, + canvasResolutionScaleMode: 0, + filteringMode: 0, + deferUntilInEventHandler: deferUntilInEventHandler, + canvasResizedCallbackTargetThread: 2 + }; + return doRequestFullscreen(target, strategy) + } + function _emscripten_request_pointerlock(target, deferUntilInEventHandler) { + target = findEventTarget(target); + if (!target) + return -4; + if (!target.requestPointerLock) { + return -1 + } + var canPerformRequests = JSEvents.canPerformEventHandlerRequests(); + if (!canPerformRequests) { + if (deferUntilInEventHandler) { + JSEvents.deferCall(requestPointerLock, 2, [target]); + return 1 + } + return -2 + } + return requestPointerLock(target) + } + function abortOnCannotGrowMemory(requestedSize) { + abort("OOM") + } + function emscripten_realloc_buffer(size) { + var b = wasmMemory.buffer; + try { + wasmMemory.grow(size - b.byteLength + 65535 >>> 16); + updateMemoryViews(); + return 1 + } catch (e) {} + } + function _emscripten_resize_heap(requestedSize) { + var oldSize = HEAPU8.length; + requestedSize = requestedSize >>> 0; + var maxHeapSize = getHeapMax(); + if (requestedSize > maxHeapSize) { + abortOnCannotGrowMemory(requestedSize) + } + var alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; + for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { + var overGrownHeapSize = oldSize * (1 + .2 / cutDown); + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 50331648); + var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); + var replacement = emscripten_realloc_buffer(newSize); + if (replacement) { + return true + } + } + abortOnCannotGrowMemory(requestedSize) + } + function _emscripten_sample_gamepad_data() { + try { + if (navigator.getGamepads) + return (JSEvents.lastGamepadState = navigator.getGamepads()) ? 0 : -1 + } catch (e) { + navigator.getGamepads = null + } + return -1 + } + function registerFocusEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.focusEvent) + JSEvents.focusEvent = _malloc(256); + var focusEventHandlerFunc = function(e=event) { + var nodeName = JSEvents.getNodeNameForTarget(e.target); + var id = e.target.id ? e.target.id : ""; + var focusEvent = JSEvents.focusEvent; + stringToUTF8(nodeName, focusEvent + 0, 128); + stringToUTF8(id, focusEvent + 128, 128); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, focusEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: findEventTarget(target), + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: focusEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_blur_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerFocusEventCallback(target, userData, useCapture, callbackfunc, 12, "blur", targetThread) + } + function _emscripten_set_focus_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerFocusEventCallback(target, userData, useCapture, callbackfunc, 13, "focus", targetThread) + } + function registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.fullscreenChangeEvent) + JSEvents.fullscreenChangeEvent = _malloc(280); + var fullscreenChangeEventhandlerFunc = function(e=event) { + var fullscreenChangeEvent = JSEvents.fullscreenChangeEvent; + fillFullscreenChangeEventData(fullscreenChangeEvent); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, fullscreenChangeEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: target, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: fullscreenChangeEventhandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_fullscreenchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (!JSEvents.fullscreenEnabled()) + return -1; + target = findEventTarget(target); + if (!target) + return -4; + registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "mozfullscreenchange", targetThread); + registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "webkitfullscreenchange", targetThread); + return registerFullscreenChangeEventCallback(target, userData, useCapture, callbackfunc, 19, "fullscreenchange", targetThread) + } + function registerGamepadEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.gamepadEvent) + JSEvents.gamepadEvent = _malloc(1432); + var gamepadEventHandlerFunc = function(e=event) { + var gamepadEvent = JSEvents.gamepadEvent; + fillGamepadEventData(gamepadEvent, e["gamepad"]); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, gamepadEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: gamepadEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_gamepadconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (_emscripten_sample_gamepad_data()) + return -1; + return registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 26, "gamepadconnected", targetThread) + } + function _emscripten_set_gamepaddisconnected_callback_on_thread(userData, useCapture, callbackfunc, targetThread) { + if (_emscripten_sample_gamepad_data()) + return -1; + return registerGamepadEventCallback(2, userData, useCapture, callbackfunc, 27, "gamepaddisconnected", targetThread) + } + function _emscripten_set_interval(cb, msecs, userData) { + return setInterval(function() { + callUserCallback(function() { + (a1 => dynCall_vi.apply(null, [cb, a1]))(userData) + }) + }, msecs) + } + function registerKeyEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.keyEvent) + JSEvents.keyEvent = _malloc(176); + var keyEventHandlerFunc = function(e) { + var keyEventData = JSEvents.keyEvent; + keyEventData = keyEventData; + HEAPF64[keyEventData >> 3] = e.timeStamp; + var idx = keyEventData >> 2; + HEAP32[idx + 2] = e.location; + HEAP32[idx + 3] = e.ctrlKey; + HEAP32[idx + 4] = e.shiftKey; + HEAP32[idx + 5] = e.altKey; + HEAP32[idx + 6] = e.metaKey; + HEAP32[idx + 7] = e.repeat; + HEAP32[idx + 8] = e.charCode; + HEAP32[idx + 9] = e.keyCode; + HEAP32[idx + 10] = e.which; + stringToUTF8(e.key || "", keyEventData + 44, 32); + stringToUTF8(e.code || "", keyEventData + 76, 32); + stringToUTF8(e.char || "", keyEventData + 108, 32); + stringToUTF8(e.locale || "", keyEventData + 140, 32); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, keyEventData, userData)) + e.preventDefault() + }; + var eventHandler = { + target: findEventTarget(target), + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: keyEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_keydown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerKeyEventCallback(target, userData, useCapture, callbackfunc, 2, "keydown", targetThread) + } + function _emscripten_set_keypress_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerKeyEventCallback(target, userData, useCapture, callbackfunc, 1, "keypress", targetThread) + } + function _emscripten_set_keyup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerKeyEventCallback(target, userData, useCapture, callbackfunc, 3, "keyup", targetThread) + } + function fillMouseEventData(eventStruct, e, target) { + HEAPF64[eventStruct >> 3] = e.timeStamp; + var idx = eventStruct >> 2; + HEAP32[idx + 2] = e.screenX; + HEAP32[idx + 3] = e.screenY; + HEAP32[idx + 4] = e.clientX; + HEAP32[idx + 5] = e.clientY; + HEAP32[idx + 6] = e.ctrlKey; + HEAP32[idx + 7] = e.shiftKey; + HEAP32[idx + 8] = e.altKey; + HEAP32[idx + 9] = e.metaKey; + HEAP16[idx * 2 + 20] = e.button; + HEAP16[idx * 2 + 21] = e.buttons; + HEAP32[idx + 11] = e["movementX"]; + HEAP32[idx + 12] = e["movementY"]; + var rect = getBoundingClientRect(target); + HEAP32[idx + 13] = e.clientX - rect.left; + HEAP32[idx + 14] = e.clientY - rect.top + } + function registerMouseEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.mouseEvent) + JSEvents.mouseEvent = _malloc(72); + target = findEventTarget(target); + var mouseEventHandlerFunc = function(e=event) { + fillMouseEventData(JSEvents.mouseEvent, e, target); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, JSEvents.mouseEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString != "mousemove" && eventTypeString != "mouseenter" && eventTypeString != "mouseleave", + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: mouseEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_mousedown_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerMouseEventCallback(target, userData, useCapture, callbackfunc, 5, "mousedown", targetThread) + } + function _emscripten_set_mousemove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerMouseEventCallback(target, userData, useCapture, callbackfunc, 8, "mousemove", targetThread) + } + function _emscripten_set_mouseup_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerMouseEventCallback(target, userData, useCapture, callbackfunc, 6, "mouseup", targetThread) + } + function fillPointerlockChangeEventData(eventStruct) { + var pointerLockElement = document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement || document.msPointerLockElement; + var isPointerlocked = !!pointerLockElement; + HEAP32[eventStruct >> 2] = isPointerlocked; + var nodeName = JSEvents.getNodeNameForTarget(pointerLockElement); + var id = pointerLockElement && pointerLockElement.id ? pointerLockElement.id : ""; + stringToUTF8(nodeName, eventStruct + 4, 128); + stringToUTF8(id, eventStruct + 132, 128) + } + function registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.pointerlockChangeEvent) + JSEvents.pointerlockChangeEvent = _malloc(260); + var pointerlockChangeEventHandlerFunc = function(e=event) { + var pointerlockChangeEvent = JSEvents.pointerlockChangeEvent; + fillPointerlockChangeEventData(pointerlockChangeEvent); + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, pointerlockChangeEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: target, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: pointerlockChangeEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_pointerlockchange_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + if (!document || !document.body || !document.body.requestPointerLock && !document.body.mozRequestPointerLock && !document.body.webkitRequestPointerLock && !document.body.msRequestPointerLock) { + return -1 + } + target = findEventTarget(target); + if (!target) + return -4; + registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "mozpointerlockchange", targetThread); + registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "webkitpointerlockchange", targetThread); + registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "mspointerlockchange", targetThread); + return registerPointerlockChangeEventCallback(target, userData, useCapture, callbackfunc, 20, "pointerlockchange", targetThread) + } + function registerTouchEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.touchEvent) + JSEvents.touchEvent = _malloc(1696); + target = findEventTarget(target); + var touchEventHandlerFunc = function(e) { + var t, touches = {}, et = e.touches; + for (var i = 0; i < et.length; ++i) { + t = et[i]; + t.isChanged = t.onTarget = 0; + touches[t.identifier] = t + } + for (var i = 0; i < e.changedTouches.length; ++i) { + t = e.changedTouches[i]; + t.isChanged = 1; + touches[t.identifier] = t + } + for (var i = 0; i < e.targetTouches.length; ++i) { + touches[e.targetTouches[i].identifier].onTarget = 1 + } + var touchEvent = JSEvents.touchEvent; + HEAPF64[touchEvent >> 3] = e.timeStamp; + var idx = touchEvent >> 2; + HEAP32[idx + 3] = e.ctrlKey; + HEAP32[idx + 4] = e.shiftKey; + HEAP32[idx + 5] = e.altKey; + HEAP32[idx + 6] = e.metaKey; + idx += 7; + var targetRect = getBoundingClientRect(target); + var numTouches = 0; + for (var i in touches) { + t = touches[i]; + HEAP32[idx + 0] = t.identifier; + HEAP32[idx + 1] = t.screenX; + HEAP32[idx + 2] = t.screenY; + HEAP32[idx + 3] = t.clientX; + HEAP32[idx + 4] = t.clientY; + HEAP32[idx + 5] = t.pageX; + HEAP32[idx + 6] = t.pageY; + HEAP32[idx + 7] = t.isChanged; + HEAP32[idx + 8] = t.onTarget; + HEAP32[idx + 9] = t.clientX - targetRect.left; + HEAP32[idx + 10] = t.clientY - targetRect.top; + idx += 13; + if (++numTouches > 31) { + break + } + } + HEAP32[touchEvent + 8 >> 2] = numTouches; + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, touchEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: target, + allowsDeferredCalls: eventTypeString == "touchstart" || eventTypeString == "touchend", + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: touchEventHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_touchcancel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerTouchEventCallback(target, userData, useCapture, callbackfunc, 25, "touchcancel", targetThread) + } + function _emscripten_set_touchend_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerTouchEventCallback(target, userData, useCapture, callbackfunc, 23, "touchend", targetThread) + } + function _emscripten_set_touchmove_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerTouchEventCallback(target, userData, useCapture, callbackfunc, 24, "touchmove", targetThread) + } + function _emscripten_set_touchstart_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + return registerTouchEventCallback(target, userData, useCapture, callbackfunc, 22, "touchstart", targetThread) + } + function registerWheelEventCallback(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) { + if (!JSEvents.wheelEvent) + JSEvents.wheelEvent = _malloc(104); + var wheelHandlerFunc = function(e=event) { + var wheelEvent = JSEvents.wheelEvent; + fillMouseEventData(wheelEvent, e, target); + HEAPF64[wheelEvent + 72 >> 3] = e["deltaX"]; + HEAPF64[wheelEvent + 80 >> 3] = e["deltaY"]; + HEAPF64[wheelEvent + 88 >> 3] = e["deltaZ"]; + HEAP32[wheelEvent + 96 >> 2] = e["deltaMode"]; + if (( (a1, a2, a3) => dynCall_iiii.apply(null, [callbackfunc, a1, a2, a3]))(eventTypeId, wheelEvent, userData)) + e.preventDefault() + }; + var eventHandler = { + target: target, + allowsDeferredCalls: true, + eventTypeString: eventTypeString, + callbackfunc: callbackfunc, + handlerFunc: wheelHandlerFunc, + useCapture: useCapture + }; + return JSEvents.registerOrRemoveHandler(eventHandler) + } + function _emscripten_set_wheel_callback_on_thread(target, userData, useCapture, callbackfunc, targetThread) { + target = findEventTarget(target); + if (!target) + return -4; + if (typeof target.onwheel != "undefined") { + return registerWheelEventCallback(target, userData, useCapture, callbackfunc, 9, "wheel", targetThread) + } else { + return -1 + } + } + var emscripten_webgl_power_preferences = ["default", "low-power", "high-performance"]; + function _emscripten_webgl_do_create_context(target, attributes) { + var a = attributes >> 2; + var powerPreference = HEAP32[a + (24 >> 2)]; + var contextAttributes = { + "alpha": !!HEAP32[a + (0 >> 2)], + "depth": !!HEAP32[a + (4 >> 2)], + "stencil": !!HEAP32[a + (8 >> 2)], + "antialias": !!HEAP32[a + (12 >> 2)], + "premultipliedAlpha": !!HEAP32[a + (16 >> 2)], + "preserveDrawingBuffer": !!HEAP32[a + (20 >> 2)], + "powerPreference": emscripten_webgl_power_preferences[powerPreference], + "failIfMajorPerformanceCaveat": !!HEAP32[a + (28 >> 2)], + majorVersion: HEAP32[a + (32 >> 2)], + minorVersion: HEAP32[a + (36 >> 2)], + enableExtensionsByDefault: HEAP32[a + (40 >> 2)], + explicitSwapControl: HEAP32[a + (44 >> 2)], + proxyContextToMainThread: HEAP32[a + (48 >> 2)], + renderViaOffscreenBackBuffer: HEAP32[a + (52 >> 2)] + }; + var canvas = findCanvasEventTarget(target); + if (!canvas) { + return 0 + } + if (contextAttributes.explicitSwapControl) { + return 0 + } + var contextHandle = GL.createContext(canvas, contextAttributes); + return contextHandle + } + var _emscripten_webgl_create_context = _emscripten_webgl_do_create_context; + function _emscripten_webgl_destroy_context(contextHandle) { + if (GL.currentContext == contextHandle) + GL.currentContext = 0; + GL.deleteContext(contextHandle) + } + function _emscripten_webgl_enable_extension(contextHandle, extension) { + var context = GL.getContext(contextHandle); + var extString = UTF8ToString(extension); + if (extString.startsWith("GL_")) + extString = extString.substr(3); + if (extString == "ANGLE_instanced_arrays") + webgl_enable_ANGLE_instanced_arrays(GLctx); + if (extString == "OES_vertex_array_object") + webgl_enable_OES_vertex_array_object(GLctx); + if (extString == "WEBGL_draw_buffers") + webgl_enable_WEBGL_draw_buffers(GLctx); + if (extString == "WEBGL_draw_instanced_base_vertex_base_instance") + webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx); + if (extString == "WEBGL_multi_draw_instanced_base_vertex_base_instance") + webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx); + if (extString == "WEBGL_multi_draw") + webgl_enable_WEBGL_multi_draw(GLctx); + var ext = context.GLctx.getExtension(extString); + return !!ext + } + function _emscripten_webgl_do_get_current_context() { + return GL.currentContext ? GL.currentContext.handle : 0 + } + var _emscripten_webgl_get_current_context = _emscripten_webgl_do_get_current_context; + function _emscripten_webgl_init_context_attributes(attributes) { + var a = attributes >> 2; + for (var i = 0; i < 56 >> 2; ++i) { + HEAP32[a + i] = 0 + } + HEAP32[a + (0 >> 2)] = HEAP32[a + (4 >> 2)] = HEAP32[a + (12 >> 2)] = HEAP32[a + (16 >> 2)] = HEAP32[a + (32 >> 2)] = HEAP32[a + (40 >> 2)] = 1 + } + function _emscripten_webgl_make_context_current(contextHandle) { + var success = GL.makeContextCurrent(contextHandle); + return success ? 0 : -5 + } + var ENV = {}; + function getExecutableName() { + return thisProgram || "./this.program" + } + function getEnvStrings() { + if (!getEnvStrings.strings) { + var lang = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8"; + var env = { + "USER": "web_user", + "LOGNAME": "web_user", + "PATH": "/", + "PWD": "/", + "HOME": "/home/web_user", + "LANG": lang, + "_": getExecutableName() + }; + for (var x in ENV) { + if (ENV[x] === undefined) + delete env[x]; + else + env[x] = ENV[x] + } + var strings = []; + for (var x in env) { + strings.push(x + "=" + env[x]) + } + getEnvStrings.strings = strings + } + return getEnvStrings.strings + } + function stringToAscii(str, buffer) { + for (var i = 0; i < str.length; ++i) { + HEAP8[buffer++ >> 0] = str.charCodeAt(i) + } + HEAP8[buffer >> 0] = 0 + } + function _environ_get(__environ, environ_buf) { + var bufSize = 0; + getEnvStrings().forEach(function(string, i) { + var ptr = environ_buf + bufSize; + HEAPU32[__environ + i * 4 >> 2] = ptr; + stringToAscii(string, ptr); + bufSize += string.length + 1 + }); + return 0 + } + function _environ_sizes_get(penviron_count, penviron_buf_size) { + var strings = getEnvStrings(); + HEAPU32[penviron_count >> 2] = strings.length; + var bufSize = 0; + strings.forEach(function(string) { + bufSize += string.length + 1 + }); + HEAPU32[penviron_buf_size >> 2] = bufSize; + return 0 + } + function _fd_close(fd) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return e.errno + } + } + function _fd_fdstat_get(fd, pbuf) { + try { + var rightsBase = 0; + var rightsInheriting = 0; + var flags = 0; + { + var stream = SYSCALLS.getStreamFromFD(fd); + var type = stream.tty ? 2 : FS.isDir(stream.mode) ? 3 : FS.isLink(stream.mode) ? 7 : 4 + } + HEAP8[pbuf >> 0] = type; + HEAP16[pbuf + 2 >> 1] = flags; + tempI64 = [rightsBase >>> 0, (tempDouble = rightsBase, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[pbuf + 8 >> 2] = tempI64[0], + HEAP32[pbuf + 12 >> 2] = tempI64[1]; + tempI64 = [rightsInheriting >>> 0, (tempDouble = rightsInheriting, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[pbuf + 16 >> 2] = tempI64[0], + HEAP32[pbuf + 20 >> 2] = tempI64[1]; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return e.errno + } + } + function doReadv(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; + iov += 8; + var curr = FS.read(stream, HEAP8, ptr, len, offset); + if (curr < 0) + return -1; + ret += curr; + if (curr < len) + break; + if (typeof offset !== "undefined") { + offset += curr + } + } + return ret + } + function _fd_read(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = doReadv(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return e.errno + } + } + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + try { + var offset = convertI32PairToI53Checked(offset_low, offset_high); + if (isNaN(offset)) + return 61; + var stream = SYSCALLS.getStreamFromFD(fd); + FS.llseek(stream, offset, whence); + tempI64 = [stream.position >>> 0, (tempDouble = stream.position, + +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], + HEAP32[newOffset >> 2] = tempI64[0], + HEAP32[newOffset + 4 >> 2] = tempI64[1]; + if (stream.getdents && offset === 0 && whence === 0) + stream.getdents = null; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return e.errno + } + } + function doWritev(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; + iov += 8; + var curr = FS.write(stream, HEAP8, ptr, len, offset); + if (curr < 0) + return -1; + ret += curr; + if (typeof offset !== "undefined") { + offset += curr + } + } + return ret + } + function _fd_write(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = doWritev(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0 + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) + throw e; + return e.errno + } + } + function _getaddrinfo(node, service, hint, out) { + var addr = 0; + var port = 0; + var flags = 0; + var family = 0; + var type = 0; + var proto = 0; + var ai; + function allocaddrinfo(family, type, proto, canon, addr, port) { + var sa, salen, ai; + var errno; + salen = family === 10 ? 28 : 16; + addr = family === 10 ? inetNtop6(addr) : inetNtop4(addr); + sa = _malloc(salen); + errno = writeSockaddr(sa, family, addr, port); + assert(!errno); + ai = _malloc(32); + HEAP32[ai + 4 >> 2] = family; + HEAP32[ai + 8 >> 2] = type; + HEAP32[ai + 12 >> 2] = proto; + HEAPU32[ai + 24 >> 2] = canon; + HEAPU32[ai + 20 >> 2] = sa; + if (family === 10) { + HEAP32[ai + 16 >> 2] = 28 + } else { + HEAP32[ai + 16 >> 2] = 16 + } + HEAP32[ai + 28 >> 2] = 0; + return ai + } + if (hint) { + flags = HEAP32[hint >> 2]; + family = HEAP32[hint + 4 >> 2]; + type = HEAP32[hint + 8 >> 2]; + proto = HEAP32[hint + 12 >> 2] + } + if (type && !proto) { + proto = type === 2 ? 17 : 6 + } + if (!type && proto) { + type = proto === 17 ? 2 : 1 + } + if (proto === 0) { + proto = 6 + } + if (type === 0) { + type = 1 + } + if (!node && !service) { + return -2 + } + if (flags & ~(1 | 2 | 4 | 1024 | 8 | 16 | 32)) { + return -1 + } + if (hint !== 0 && HEAP32[hint >> 2] & 2 && !node) { + return -1 + } + if (flags & 32) { + return -2 + } + if (type !== 0 && type !== 1 && type !== 2) { + return -7 + } + if (family !== 0 && family !== 2 && family !== 10) { + return -6 + } + if (service) { + service = UTF8ToString(service); + port = parseInt(service, 10); + if (isNaN(port)) { + if (flags & 1024) { + return -2 + } + return -8 + } + } + if (!node) { + if (family === 0) { + family = 2 + } + if ((flags & 1) === 0) { + if (family === 2) { + addr = _htonl(2130706433) + } else { + addr = [0, 0, 0, 1] + } + } + ai = allocaddrinfo(family, type, proto, null, addr, port); + HEAPU32[out >> 2] = ai; + return 0 + } + node = UTF8ToString(node); + addr = inetPton4(node); + if (addr !== null) { + if (family === 0 || family === 2) { + family = 2 + } else if (family === 10 && flags & 8) { + addr = [0, 0, _htonl(65535), addr]; + family = 10 + } else { + return -2 + } + } else { + addr = inetPton6(node); + if (addr !== null) { + if (family === 0 || family === 10) { + family = 10 + } else { + return -2 + } + } + } + if (addr != null) { + ai = allocaddrinfo(family, type, proto, node, addr, port); + HEAPU32[out >> 2] = ai; + return 0 + } + if (flags & 4) { + return -2 + } + node = DNS.lookup_name(node); + addr = inetPton4(node); + if (family === 0) { + family = 2 + } else if (family === 10) { + addr = [0, 0, _htonl(65535), addr] + } + ai = allocaddrinfo(family, type, proto, null, addr, port); + HEAPU32[out >> 2] = ai; + return 0 + } + function getHostByName(name) { + var ret = _malloc(20); + var nameBuf = stringToNewUTF8(name); + HEAPU32[ret >> 2] = nameBuf; + var aliasesBuf = _malloc(4); + HEAPU32[aliasesBuf >> 2] = 0; + HEAPU32[ret + 4 >> 2] = aliasesBuf; + var afinet = 2; + HEAP32[ret + 8 >> 2] = afinet; + HEAP32[ret + 12 >> 2] = 4; + var addrListBuf = _malloc(12); + HEAPU32[addrListBuf >> 2] = addrListBuf + 8; + HEAPU32[addrListBuf + 4 >> 2] = 0; + HEAP32[addrListBuf + 8 >> 2] = inetPton4(DNS.lookup_name(name)); + HEAPU32[ret + 16 >> 2] = addrListBuf; + return ret + } + function _gethostbyaddr(addr, addrlen, type) { + if (type !== 2) { + setErrNo(5); + return null + } + addr = HEAP32[addr >> 2]; + var host = inetNtop4(addr); + var lookup = DNS.lookup_addr(host); + if (lookup) { + host = lookup + } + return getHostByName(host) + } + function _gethostbyname(name) { + return getHostByName(UTF8ToString(name)) + } + function _getnameinfo(sa, salen, node, nodelen, serv, servlen, flags) { + var info = readSockaddr(sa, salen); + if (info.errno) { + return -6 + } + var port = info.port; + var addr = info.addr; + var overflowed = false; + if (node && nodelen) { + var lookup; + if (flags & 1 || !(lookup = DNS.lookup_addr(addr))) { + if (flags & 8) { + return -2 + } + } else { + addr = lookup + } + var numBytesWrittenExclNull = stringToUTF8(addr, node, nodelen); + if (numBytesWrittenExclNull + 1 >= nodelen) { + overflowed = true + } + } + if (serv && servlen) { + port = "" + port; + var numBytesWrittenExclNull = stringToUTF8(port, serv, servlen); + if (numBytesWrittenExclNull + 1 >= servlen) { + overflowed = true + } + } + if (overflowed) { + return -12 + } + return 0 + } + function _glActiveTexture(x0) { + GLctx.activeTexture(x0) + } + function _glAttachShader(program, shader) { + program = GL.programs[program]; + shader = GL.shaders[shader]; + program[shader.shaderType] = shader; + GLctx.attachShader(program, shader) + } + function _glBeginQuery(target, id) { + GLctx.beginQuery(target, GL.queries[id]) + } + function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)) + } + function _glBindBuffer(target, buffer) { + if (target == 34962) { + GLctx.currentArrayBufferBinding = buffer + } else if (target == 34963) { + GLctx.currentElementArrayBufferBinding = buffer + } + if (target == 35051) { + GLctx.currentPixelPackBufferBinding = buffer + } else if (target == 35052) { + GLctx.currentPixelUnpackBufferBinding = buffer + } + GLctx.bindBuffer(target, GL.buffers[buffer]) + } + function _glBindBufferBase(target, index, buffer) { + GLctx.bindBufferBase(target, index, GL.buffers[buffer]) + } + function _glBindBufferRange(target, index, buffer, offset, ptrsize) { + GLctx.bindBufferRange(target, index, GL.buffers[buffer], offset, ptrsize) + } + function _glBindFramebuffer(target, framebuffer) { + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]) + } + function _glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]) + } + function _glBindSampler(unit, sampler) { + GLctx.bindSampler(unit, GL.samplers[sampler]) + } + function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]) + } + function _glBindVertexArray(vao) { + GLctx.bindVertexArray(GL.vaos[vao]); + var ibo = GLctx.getParameter(34965); + GLctx.currentElementArrayBufferBinding = ibo ? ibo.name | 0 : 0 + } + function _glBlendEquation(x0) { + GLctx.blendEquation(x0) + } + function _glBlendEquationSeparate(x0, x1) { + GLctx.blendEquationSeparate(x0, x1) + } + function _glBlendFuncSeparate(x0, x1, x2, x3) { + GLctx.blendFuncSeparate(x0, x1, x2, x3) + } + function _glBlitFramebuffer(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) { + GLctx.blitFramebuffer(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) + } + function _glBufferData(target, size, data, usage) { + if (HEAPU8.length <= 2147483648) { + if (data && size) { + GLctx.bufferData(target, HEAPU8, usage, data, size) + } else { + GLctx.bufferData(target, size, usage) + } + } else { + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data + size) : size, usage) + } + } + function _glBufferSubData(target, offset, size, data) { + if (HEAPU8.length <= 2147483648) { + size && GLctx.bufferSubData(target, offset, HEAPU8, data, size); + return + } + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data + size)) + } + function _glCheckFramebufferStatus(x0) { + return GLctx.checkFramebufferStatus(x0) + } + function _glClear(x0) { + GLctx.clear(x0) + } + function _glClearBufferfi(x0, x1, x2, x3) { + GLctx.clearBufferfi(x0, x1, x2, x3) + } + function _glClearBufferfv(buffer, drawbuffer, value) { + if (HEAPU8.length <= 2147483648) { + GLctx.clearBufferfv(buffer, drawbuffer, HEAPF32, value >> 2) + } else { + var view = HEAPF32.subarray(value >> 2, value + 16 >> 2); + GLctx.clearBufferfv(buffer, drawbuffer, view, 0) + } + } + function _glClearBufferuiv(buffer, drawbuffer, value) { + if (HEAPU8.length <= 2147483648) { + GLctx.clearBufferuiv(buffer, drawbuffer, HEAPU32, value >> 2) + } else { + var view = HEAPU32.subarray(value >> 2, value + 16 >> 2); + GLctx.clearBufferuiv(buffer, drawbuffer, view, 0) + } + } + function _glClearColor(x0, x1, x2, x3) { + GLctx.clearColor(x0, x1, x2, x3) + } + function _glClearDepthf(x0) { + GLctx.clearDepth(x0) + } + function _glClearStencil(x0) { + GLctx.clearStencil(x0) + } + function _glClientWaitSync(sync, flags, timeout_low, timeout_high) { + var timeout = convertI32PairToI53(timeout_low, timeout_high); + return GLctx.clientWaitSync(GL.syncs[sync], flags, timeout) + } + function _glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha) + } + function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]) + } + function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding || !imageSize) { + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) + } else if (HEAPU8.length <= 2147483648) { + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, HEAPU8, data, imageSize) + } else { + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, data ? HEAPU8.subarray(data, data + imageSize) : null) + } + } + function _glCompressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.compressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, data) + } else if (HEAPU8.length <= 2147483648) { + GLctx.compressedTexImage3D(target, level, internalFormat, width, height, depth, border, HEAPU8, data, imageSize) + } else { + GLctx.compressedTexImage3D(target, level, internalFormat, width, height, depth, border, data ? HEAPU8.subarray(data, data + imageSize) : null) + } + } + function _glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding || !imageSize) { + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) + } else if (HEAPU8.length <= 2147483648) { + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, HEAPU8, data, imageSize) + } else { + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray(data, data + imageSize) : null) + } + } + function _glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) + } else if (HEAPU8.length <= 2147483648) { + GLctx.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, HEAPU8, data, imageSize) + } else { + GLctx.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data ? HEAPU8.subarray(data, data + imageSize) : null) + } + } + function _glCopyBufferSubData(x0, x1, x2, x3, x4) { + GLctx.copyBufferSubData(x0, x1, x2, x3, x4) + } + function _glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { + GLctx.copyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) + } + function _glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { + GLctx.copyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) + } + function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + program.maxUniformLength = program.maxAttributeLength = program.maxUniformBlockNameLength = 0; + program.uniformIdCounter = 1; + GL.programs[id] = program; + return id + } + function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + GL.shaders[id].shaderType = shaderType & 1 ? "vs" : "fs"; + return id + } + function _glCullFace(x0) { + GLctx.cullFace(x0) + } + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[buffers + i * 4 >> 2]; + var buffer = GL.buffers[id]; + if (!buffer) + continue; + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + if (id == GLctx.currentArrayBufferBinding) + GLctx.currentArrayBufferBinding = 0; + if (id == GLctx.currentElementArrayBufferBinding) + GLctx.currentElementArrayBufferBinding = 0; + if (id == GLctx.currentPixelPackBufferBinding) + GLctx.currentPixelPackBufferBinding = 0; + if (id == GLctx.currentPixelUnpackBufferBinding) + GLctx.currentPixelUnpackBufferBinding = 0 + } + } + function _glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[framebuffers + i * 4 >> 2]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) + continue; + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null + } + } + function _glDeleteProgram(id) { + if (!id) + return; + var program = GL.programs[id]; + if (!program) { + GL.recordError(1281); + return + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null + } + function _glDeleteQueries(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[ids + i * 4 >> 2]; + var query = GL.queries[id]; + if (!query) + continue; + GLctx.deleteQuery(query); + GL.queries[id] = null + } + } + function _glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[renderbuffers + i * 4 >> 2]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) + continue; + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null + } + } + function _glDeleteSamplers(n, samplers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[samplers + i * 4 >> 2]; + var sampler = GL.samplers[id]; + if (!sampler) + continue; + GLctx.deleteSampler(sampler); + sampler.name = 0; + GL.samplers[id] = null + } + } + function _glDeleteShader(id) { + if (!id) + return; + var shader = GL.shaders[id]; + if (!shader) { + GL.recordError(1281); + return + } + GLctx.deleteShader(shader); + GL.shaders[id] = null + } + function _glDeleteSync(id) { + if (!id) + return; + var sync = GL.syncs[id]; + if (!sync) { + GL.recordError(1281); + return + } + GLctx.deleteSync(sync); + sync.name = 0; + GL.syncs[id] = null + } + function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[textures + i * 4 >> 2]; + var texture = GL.textures[id]; + if (!texture) + continue; + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null + } + } + function _glDeleteVertexArrays(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[vaos + i * 4 >> 2]; + GLctx.deleteVertexArray(GL.vaos[id]); + GL.vaos[id] = null + } + } + function _glDepthFunc(x0) { + GLctx.depthFunc(x0) + } + function _glDepthMask(flag) { + GLctx.depthMask(!!flag) + } + function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], GL.shaders[shader]) + } + function _glDisable(x0) { + GLctx.disable(x0) + } + function _glDisableVertexAttribArray(index) { + var cb = GL.currentContext.clientBuffers[index]; + cb.enabled = false; + GLctx.disableVertexAttribArray(index) + } + function _glDrawArrays(mode, first, count) { + GL.preDrawHandleClientVertexAttribBindings(first + count); + GLctx.drawArrays(mode, first, count); + GL.postDrawHandleClientVertexAttribBindings() + } + function _glDrawArraysInstanced(mode, first, count, primcount) { + GLctx.drawArraysInstanced(mode, first, count, primcount) + } + var tempFixedLengthArray = []; + function _glDrawBuffers(n, bufs) { + var bufArray = tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[bufs + i * 4 >> 2] + } + GLctx.drawBuffers(bufArray) + } + function _glDrawElements(mode, count, type, indices) { + var buf; + if (!GLctx.currentElementArrayBufferBinding) { + var size = GL.calcBufLength(1, type, 0, count); + buf = GL.getTempIndexBuffer(size); + GLctx.bindBuffer(34963, buf); + GLctx.bufferSubData(34963, 0, HEAPU8.subarray(indices, indices + size)); + indices = 0 + } + GL.preDrawHandleClientVertexAttribBindings(count); + GLctx.drawElements(mode, count, type, indices); + GL.postDrawHandleClientVertexAttribBindings(count); + if (!GLctx.currentElementArrayBufferBinding) { + GLctx.bindBuffer(34963, null) + } + } + function _glDrawElementsInstanced(mode, count, type, indices, primcount) { + GLctx.drawElementsInstanced(mode, count, type, indices, primcount) + } + function _glEnable(x0) { + GLctx.enable(x0) + } + function _glEnableVertexAttribArray(index) { + var cb = GL.currentContext.clientBuffers[index]; + cb.enabled = true; + GLctx.enableVertexAttribArray(index) + } + function _glEndQuery(x0) { + GLctx.endQuery(x0) + } + function _glFenceSync(condition, flags) { + var sync = GLctx.fenceSync(condition, flags); + if (sync) { + var id = GL.getNewId(GL.syncs); + sync.name = id; + GL.syncs[id] = sync; + return id + } + return 0 + } + function _glFinish() { + GLctx.finish() + } + function _glFlush() { + GLctx.flush() + } + function emscriptenWebGLGetBufferBinding(target) { + switch (target) { + case 34962: + target = 34964; + break; + case 34963: + target = 34965; + break; + case 35051: + target = 35053; + break; + case 35052: + target = 35055; + break; + case 35982: + target = 35983; + break; + case 36662: + target = 36662; + break; + case 36663: + target = 36663; + break; + case 35345: + target = 35368; + break + } + var buffer = GLctx.getParameter(target); + if (buffer) + return buffer.name | 0; + else + return 0 + } + function emscriptenWebGLValidateMapBufferTarget(target) { + switch (target) { + case 34962: + case 34963: + case 36662: + case 36663: + case 35051: + case 35052: + case 35882: + case 35982: + case 35345: + return true; + default: + return false + } + } + function _glFlushMappedBufferRange(target, offset, length) { + offset >>>= 0; + length >>>= 0; + if (!emscriptenWebGLValidateMapBufferTarget(target)) { + GL.recordError(1280); + err("GL_INVALID_ENUM in glFlushMappedBufferRange"); + return + } + var mapping = GL.mappedBuffers[emscriptenWebGLGetBufferBinding(target)]; + if (!mapping) { + GL.recordError(1282); + err("buffer was never mapped in glFlushMappedBufferRange"); + return + } + if (!(mapping.access & 16)) { + GL.recordError(1282); + err("buffer was not mapped with GL_MAP_FLUSH_EXPLICIT_BIT in glFlushMappedBufferRange"); + return + } + if (offset < 0 || length < 0 || offset + length > mapping.length) { + GL.recordError(1281); + err("invalid range in glFlushMappedBufferRange"); + return + } + GLctx.bufferSubData(target, mapping.offset, HEAPU8.subarray(mapping.mem + offset, mapping.mem + offset + length)) + } + function _glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, GL.renderbuffers[renderbuffer]) + } + function _glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, GL.textures[texture], level) + } + function _glFramebufferTextureLayer(target, attachment, texture, level, layer) { + GLctx.framebufferTextureLayer(target, attachment, GL.textures[texture], level, layer) + } + function _glFrontFace(x0) { + GLctx.frontFace(x0) + } + function __glGenObject(n, buffers, createFunction, objectTable) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer + } else { + GL.recordError(1282) + } + HEAP32[buffers + i * 4 >> 2] = id + } + } + function _glGenBuffers(n, buffers) { + __glGenObject(n, buffers, "createBuffer", GL.buffers) + } + function _glGenFramebuffers(n, ids) { + __glGenObject(n, ids, "createFramebuffer", GL.framebuffers) + } + function _glGenQueries(n, ids) { + __glGenObject(n, ids, "createQuery", GL.queries) + } + function _glGenRenderbuffers(n, renderbuffers) { + __glGenObject(n, renderbuffers, "createRenderbuffer", GL.renderbuffers) + } + function _glGenSamplers(n, samplers) { + __glGenObject(n, samplers, "createSampler", GL.samplers) + } + function _glGenTextures(n, textures) { + __glGenObject(n, textures, "createTexture", GL.textures) + } + function _glGenVertexArrays(n, arrays) { + __glGenObject(n, arrays, "createVertexArray", GL.vaos) + } + function _glGenerateMipmap(x0) { + GLctx.generateMipmap(x0) + } + function __glGetActiveAttribOrUniform(funcName, program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx[funcName](program, index); + if (info) { + var numBytesWrittenExclNull = name && stringToUTF8(info.name, name, bufSize); + if (length) + HEAP32[length >> 2] = numBytesWrittenExclNull; + if (size) + HEAP32[size >> 2] = info.size; + if (type) + HEAP32[type >> 2] = info.type + } + } + function _glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + __glGetActiveAttribOrUniform("getActiveAttrib", program, index, bufSize, length, size, type, name) + } + function _glGetActiveUniform(program, index, bufSize, length, size, type, name) { + __glGetActiveAttribOrUniform("getActiveUniform", program, index, bufSize, length, size, type, name) + } + function _glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName) { + program = GL.programs[program]; + var result = GLctx.getActiveUniformBlockName(program, uniformBlockIndex); + if (!result) + return; + if (uniformBlockName && bufSize > 0) { + var numBytesWrittenExclNull = stringToUTF8(result, uniformBlockName, bufSize); + if (length) + HEAP32[length >> 2] = numBytesWrittenExclNull + } else { + if (length) + HEAP32[length >> 2] = 0 + } + } + function _glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + program = GL.programs[program]; + if (pname == 35393) { + var name = GLctx.getActiveUniformBlockName(program, uniformBlockIndex); + HEAP32[params >> 2] = name.length + 1; + return + } + var result = GLctx.getActiveUniformBlockParameter(program, uniformBlockIndex, pname); + if (result === null) + return; + if (pname == 35395) { + for (var i = 0; i < result.length; i++) { + HEAP32[params + i * 4 >> 2] = result[i] + } + } else { + HEAP32[params >> 2] = result + } + } + function _glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + if (uniformCount > 0 && uniformIndices == 0) { + GL.recordError(1281); + return + } + program = GL.programs[program]; + var ids = []; + for (var i = 0; i < uniformCount; i++) { + ids.push(HEAP32[uniformIndices + i * 4 >> 2]) + } + var result = GLctx.getActiveUniforms(program, ids, pname); + if (!result) + return; + var len = result.length; + for (var i = 0; i < len; i++) { + HEAP32[params + i * 4 >> 2] = result[i] + } + } + function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)) + } + function _glGetBufferSubData(target, offset, size, data) { + if (!data) { + GL.recordError(1281); + return + } + if (HEAPU8.length <= 2147483648) { + size && GLctx.getBufferSubData(target, offset, HEAPU8, data, size) + } else { + size && GLctx.getBufferSubData(target, offset, HEAPU8.subarray(data, data + size)) + } + } + function _glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0; + return error + } + function _glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || result instanceof WebGLTexture) { + result = result.name | 0 + } + HEAP32[params >> 2] = result + } + function writeI53ToI64(ptr, num) { + HEAPU32[ptr >> 2] = num; + HEAPU32[ptr + 4 >> 2] = (num - HEAPU32[ptr >> 2]) / 4294967296 + } + function emscriptenWebGLGetIndexed(target, index, data, type) { + if (!data) { + GL.recordError(1281); + return + } + var result = GLctx.getIndexedParameter(target, index); + var ret; + switch (typeof result) { + case "boolean": + ret = result ? 1 : 0; + break; + case "number": + ret = result; + break; + case "object": + if (result === null) { + switch (target) { + case 35983: + case 35368: + ret = 0; + break; + default: + { + GL.recordError(1280); + return + } + } + } else if (result instanceof WebGLBuffer) { + ret = result.name | 0 + } else { + GL.recordError(1280); + return + } + break; + default: + GL.recordError(1280); + return + } + switch (type) { + case 1: + writeI53ToI64(data, ret); + break; + case 0: + HEAP32[data >> 2] = ret; + break; + case 2: + HEAPF32[data >> 2] = ret; + break; + case 4: + HEAP8[data >> 0] = ret ? 1 : 0; + break; + default: + throw "internal emscriptenWebGLGetIndexed() error, bad type: " + type + } + } + function _glGetIntegeri_v(target, index, data) { + emscriptenWebGLGetIndexed(target, index, data, 0) + } + function emscriptenWebGLGet(name_, p, type) { + if (!p) { + GL.recordError(1281); + return + } + var ret = undefined; + switch (name_) { + case 36346: + ret = 1; + break; + case 36344: + if (type != 0 && type != 1) { + GL.recordError(1280) + } + return; + case 34814: + case 36345: + ret = 0; + break; + case 34466: + var formats = GLctx.getParameter(34467); + ret = formats ? formats.length : 0; + break; + case 33390: + ret = 1048576; + break; + case 33309: + if (GL.currentContext.version < 2) { + GL.recordError(1282); + return + } + var exts = GLctx.getSupportedExtensions() || []; + ret = 2 * exts.length; + break; + case 33307: + case 33308: + if (GL.currentContext.version < 2) { + GL.recordError(1280); + return + } + ret = name_ == 33307 ? 3 : 0; + break + } + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (typeof result) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(1280); + return; + case "object": + if (result === null) { + switch (name_) { + case 34964: + case 35725: + case 34965: + case 36006: + case 36007: + case 32873: + case 34229: + case 36662: + case 36663: + case 35053: + case 35055: + case 36010: + case 35097: + case 35869: + case 32874: + case 36389: + case 35983: + case 35368: + case 34068: + { + ret = 0; + break + } + default: + { + GL.recordError(1280); + return + } + } + } else if (result instanceof Float32Array || result instanceof Uint32Array || result instanceof Int32Array || result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: + HEAP32[p + i * 4 >> 2] = result[i]; + break; + case 2: + HEAPF32[p + i * 4 >> 2] = result[i]; + break; + case 4: + HEAP8[p + i >> 0] = result[i] ? 1 : 0; + break + } + } + return + } else { + try { + ret = result.name | 0 + } catch (e) { + GL.recordError(1280); + err("GL_INVALID_ENUM in glGet" + type + "v: Unknown object returned from WebGL getParameter(" + name_ + ")! (error: " + e + ")"); + return + } + } + break; + default: + GL.recordError(1280); + err("GL_INVALID_ENUM in glGet" + type + "v: Native code calling glGet" + type + "v(" + name_ + ") and it returns " + result + " of type " + typeof result + "!"); + return + } + } + switch (type) { + case 1: + writeI53ToI64(p, ret); + break; + case 0: + HEAP32[p >> 2] = ret; + break; + case 2: + HEAPF32[p >> 2] = ret; + break; + case 4: + HEAP8[p >> 0] = ret ? 1 : 0; + break + } + } + function _glGetIntegerv(name_, p) { + emscriptenWebGLGet(name_, p, 0) + } + function _glGetInternalformativ(target, internalformat, pname, bufSize, params) { + if (bufSize < 0) { + GL.recordError(1281); + return + } + if (!params) { + GL.recordError(1281); + return + } + var ret = GLctx.getInternalformatParameter(target, internalformat, pname); + if (ret === null) + return; + for (var i = 0; i < ret.length && i < bufSize; ++i) { + HEAP32[params + i * 4 >> 2] = ret[i] + } + } + function _glGetProgramBinary(program, bufSize, length, binaryFormat, binary) { + GL.recordError(1282) + } + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) + log = "(unknown error)"; + var numBytesWrittenExclNull = maxLength > 0 && infoLog ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) + HEAP32[length >> 2] = numBytesWrittenExclNull + } + function _glGetProgramiv(program, pname, p) { + if (!p) { + GL.recordError(1281); + return + } + if (program >= GL.counter) { + GL.recordError(1281); + return + } + program = GL.programs[program]; + if (pname == 35716) { + var log = GLctx.getProgramInfoLog(program); + if (log === null) + log = "(unknown error)"; + HEAP32[p >> 2] = log.length + 1 + } else if (pname == 35719) { + if (!program.maxUniformLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35718); ++i) { + program.maxUniformLength = Math.max(program.maxUniformLength, GLctx.getActiveUniform(program, i).name.length + 1) + } + } + HEAP32[p >> 2] = program.maxUniformLength + } else if (pname == 35722) { + if (!program.maxAttributeLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35721); ++i) { + program.maxAttributeLength = Math.max(program.maxAttributeLength, GLctx.getActiveAttrib(program, i).name.length + 1) + } + } + HEAP32[p >> 2] = program.maxAttributeLength + } else if (pname == 35381) { + if (!program.maxUniformBlockNameLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35382); ++i) { + program.maxUniformBlockNameLength = Math.max(program.maxUniformBlockNameLength, GLctx.getActiveUniformBlockName(program, i).length + 1) + } + } + HEAP32[p >> 2] = program.maxUniformBlockNameLength + } else { + HEAP32[p >> 2] = GLctx.getProgramParameter(program, pname) + } + } + function _glGetQueryObjectuiv(id, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + var query = GL.queries[id]; + var param = GLctx.getQueryParameter(query, pname); + var ret; + if (typeof param == "boolean") { + ret = param ? 1 : 0 + } else { + ret = param + } + HEAP32[params >> 2] = ret + } + function _glGetQueryiv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + HEAP32[params >> 2] = GLctx.getQuery(target, pname) + } + function _glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + HEAP32[params >> 2] = GLctx.getRenderbufferParameter(target, pname) + } + function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) + log = "(unknown error)"; + var numBytesWrittenExclNull = maxLength > 0 && infoLog ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) + HEAP32[length >> 2] = numBytesWrittenExclNull + } + function _glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[range >> 2] = result.rangeMin; + HEAP32[range + 4 >> 2] = result.rangeMax; + HEAP32[precision >> 2] = result.precision + } + function _glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) + return; + var numBytesWrittenExclNull = bufSize > 0 && source ? stringToUTF8(result, source, bufSize) : 0; + if (length) + HEAP32[length >> 2] = numBytesWrittenExclNull + } + function _glGetShaderiv(shader, pname, p) { + if (!p) { + GL.recordError(1281); + return + } + if (pname == 35716) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) + log = "(unknown error)"; + var logLength = log ? log.length + 1 : 0; + HEAP32[p >> 2] = logLength + } else if (pname == 35720) { + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = source ? source.length + 1 : 0; + HEAP32[p >> 2] = sourceLength + } else { + HEAP32[p >> 2] = GLctx.getShaderParameter(GL.shaders[shader], pname) + } + } + function _glGetString(name_) { + var ret = GL.stringCache[name_]; + if (!ret) { + switch (name_) { + case 7939: + var exts = GLctx.getSupportedExtensions() || []; + exts = exts.concat(exts.map(function(e) { + return "GL_" + e + })); + ret = stringToNewUTF8(exts.join(" ")); + break; + case 7936: + case 7937: + case 37445: + case 37446: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(1280) + } + ret = s && stringToNewUTF8(s); + break; + case 7938: + var glVersion = GLctx.getParameter(7938); + if (GL.currentContext.version >= 2) + glVersion = "OpenGL ES 3.0 (" + glVersion + ")"; + else { + glVersion = "OpenGL ES 2.0 (" + glVersion + ")" + } + ret = stringToNewUTF8(glVersion); + break; + case 35724: + var glslVersion = GLctx.getParameter(35724); + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) + ver_num[1] = ver_num[1] + "0"; + glslVersion = "OpenGL ES GLSL ES " + ver_num[1] + " (" + glslVersion + ")" + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(1280) + } + GL.stringCache[name_] = ret + } + return ret + } + function _glGetStringi(name, index) { + if (GL.currentContext.version < 2) { + GL.recordError(1282); + return 0 + } + var stringiCache = GL.stringiCache[name]; + if (stringiCache) { + if (index < 0 || index >= stringiCache.length) { + GL.recordError(1281); + return 0 + } + return stringiCache[index] + } + switch (name) { + case 7939: + var exts = GLctx.getSupportedExtensions() || []; + exts = exts.concat(exts.map(function(e) { + return "GL_" + e + })); + exts = exts.map(function(e) { + return stringToNewUTF8(e) + }); + stringiCache = GL.stringiCache[name] = exts; + if (index < 0 || index >= stringiCache.length) { + GL.recordError(1281); + return 0 + } + return stringiCache[index]; + default: + GL.recordError(1280); + return 0 + } + } + function _glGetTexParameteriv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return + } + HEAP32[params >> 2] = GLctx.getTexParameter(target, pname) + } + function _glGetUniformBlockIndex(program, uniformBlockName) { + return GLctx.getUniformBlockIndex(GL.programs[program], UTF8ToString(uniformBlockName)) + } + function _glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices) { + if (!uniformIndices) { + GL.recordError(1281); + return + } + if (uniformCount > 0 && (uniformNames == 0 || uniformIndices == 0)) { + GL.recordError(1281); + return + } + program = GL.programs[program]; + var names = []; + for (var i = 0; i < uniformCount; i++) + names.push(UTF8ToString(HEAP32[uniformNames + i * 4 >> 2])); + var result = GLctx.getUniformIndices(program, names); + if (!result) + return; + var len = result.length; + for (var i = 0; i < len; i++) { + HEAP32[uniformIndices + i * 4 >> 2] = result[i] + } + } + function webglGetLeftBracePos(name) { + return name.slice(-1) == "]" && name.lastIndexOf("[") + } + function webglPrepareUniformLocationsBeforeFirstUse(program) { + var uniformLocsById = program.uniformLocsById, uniformSizeAndIdsByName = program.uniformSizeAndIdsByName, i, j; + if (!uniformLocsById) { + program.uniformLocsById = uniformLocsById = {}; + program.uniformArrayNamesById = {}; + for (i = 0; i < GLctx.getProgramParameter(program, 35718); ++i) { + var u = GLctx.getActiveUniform(program, i); + var nm = u.name; + var sz = u.size; + var lb = webglGetLeftBracePos(nm); + var arrayName = lb > 0 ? nm.slice(0, lb) : nm; + var id = uniformSizeAndIdsByName[arrayName] ? uniformSizeAndIdsByName[arrayName][1] : program.uniformIdCounter; + program.uniformIdCounter = Math.max(id + sz, program.uniformIdCounter); + uniformSizeAndIdsByName[arrayName] = [sz, id]; + for (j = 0; j < sz; ++j) { + uniformLocsById[id] = j; + program.uniformArrayNamesById[id++] = arrayName + } + } + } + } + function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + if (program = GL.programs[program]) { + webglPrepareUniformLocationsBeforeFirstUse(program); + var uniformLocsById = program.uniformLocsById; + var arrayIndex = 0; + var uniformBaseName = name; + var leftBrace = webglGetLeftBracePos(name); + if (leftBrace > 0) { + arrayIndex = jstoi_q(name.slice(leftBrace + 1)) >>> 0; + uniformBaseName = name.slice(0, leftBrace) + } + var sizeAndId = program.uniformSizeAndIdsByName[uniformBaseName]; + if (sizeAndId && arrayIndex < sizeAndId[0]) { + arrayIndex += sizeAndId[1]; + if (uniformLocsById[arrayIndex] = uniformLocsById[arrayIndex] || GLctx.getUniformLocation(program, name)) { + return arrayIndex + } + } + } else { + GL.recordError(1281) + } + return -1 + } + function webglGetUniformLocation(location) { + var p = GLctx.currentProgram; + if (p) { + var webglLoc = p.uniformLocsById[location]; + if (typeof webglLoc == "number") { + p.uniformLocsById[location] = webglLoc = GLctx.getUniformLocation(p, p.uniformArrayNamesById[location] + (webglLoc > 0 ? "[" + webglLoc + "]" : "")) + } + return webglLoc + } else { + GL.recordError(1282) + } + } + function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + GL.recordError(1281); + return + } + program = GL.programs[program]; + webglPrepareUniformLocationsBeforeFirstUse(program); + var data = GLctx.getUniform(program, webglGetUniformLocation(location)); + if (typeof data == "number" || typeof data == "boolean") { + switch (type) { + case 0: + HEAP32[params >> 2] = data; + break; + case 2: + HEAPF32[params >> 2] = data; + break + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: + HEAP32[params + i * 4 >> 2] = data[i]; + break; + case 2: + HEAPF32[params + i * 4 >> 2] = data[i]; + break + } + } + } + } + function _glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0) + } + function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + GL.recordError(1281); + return + } + if (GL.currentContext.clientBuffers[index].enabled) { + err("glGetVertexAttrib*v on client-side array: not supported, bad data returned") + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 34975) { + HEAP32[params >> 2] = data && data["name"] + } else if (typeof data == "number" || typeof data == "boolean") { + switch (type) { + case 0: + HEAP32[params >> 2] = data; + break; + case 2: + HEAPF32[params >> 2] = data; + break; + case 5: + HEAP32[params >> 2] = Math.fround(data); + break + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: + HEAP32[params + i * 4 >> 2] = data[i]; + break; + case 2: + HEAPF32[params + i * 4 >> 2] = data[i]; + break; + case 5: + HEAP32[params + i * 4 >> 2] = Math.fround(data[i]); + break + } + } + } + } + function _glGetVertexAttribiv(index, pname, params) { + emscriptenWebGLGetVertexAttrib(index, pname, params, 5) + } + function _glInvalidateFramebuffer(target, numAttachments, attachments) { + var list = tempFixedLengthArray[numAttachments]; + for (var i = 0; i < numAttachments; i++) { + list[i] = HEAP32[attachments + i * 4 >> 2] + } + GLctx.invalidateFramebuffer(target, list) + } + function _glIsEnabled(x0) { + return GLctx.isEnabled(x0) + } + function _glIsVertexArray(array) { + var vao = GL.vaos[array]; + if (!vao) + return 0; + return GLctx.isVertexArray(vao) + } + function _glLinkProgram(program) { + program = GL.programs[program]; + GLctx.linkProgram(program); + program.uniformLocsById = 0; + program.uniformSizeAndIdsByName = {}; + [program["vs"], program["fs"]].forEach(function(s) { + Object.keys(s.explicitUniformLocations).forEach(function(shaderLocation) { + var loc = s.explicitUniformLocations[shaderLocation]; + program.uniformSizeAndIdsByName[shaderLocation] = [1, loc]; + program.uniformIdCounter = Math.max(program.uniformIdCounter, loc + 1) + }) + }); + function copyKeys(dst, src) { + Object.keys(src).forEach(function(key) { + dst[key] = src[key] + }) + } + program.explicitUniformBindings = {}; + program.explicitSamplerBindings = {}; + [program["vs"], program["fs"]].forEach(function(s) { + copyKeys(program.explicitUniformBindings, s.explicitUniformBindings); + copyKeys(program.explicitSamplerBindings, s.explicitSamplerBindings) + }); + program.explicitProgramBindingsApplied = 0 + } + function _glMapBufferRange(target, offset, length, access) { + if ((access & (1 | 32)) != 0) { + err("glMapBufferRange access does not support MAP_READ or MAP_UNSYNCHRONIZED"); + return 0 + } + if ((access & 2) == 0) { + err("glMapBufferRange access must include MAP_WRITE"); + return 0 + } + if ((access & (4 | 8)) == 0) { + err("glMapBufferRange access must include INVALIDATE_BUFFER or INVALIDATE_RANGE"); + return 0 + } + if (!emscriptenWebGLValidateMapBufferTarget(target)) { + GL.recordError(1280); + err("GL_INVALID_ENUM in glMapBufferRange"); + return 0 + } + var mem = _malloc(length); + if (!mem) + return 0; + GL.mappedBuffers[emscriptenWebGLGetBufferBinding(target)] = { + offset: offset, + length: length, + mem: mem, + access: access + }; + return mem + } + function _glPixelStorei(pname, param) { + if (pname == 3317) { + GL.unpackAlignment = param + } + GLctx.pixelStorei(pname, param) + } + function _glPolygonOffset(x0, x1) { + GLctx.polygonOffset(x0, x1) + } + function _glProgramBinary(program, binaryFormat, binary, length) { + GL.recordError(1280) + } + function _glProgramParameteri(program, pname, value) { + GL.recordError(1280) + } + function _glReadBuffer(x0) { + GLctx.readBuffer(x0) + } + function computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return x + y - 1 & -y + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize + } + function colorChannelsInGlTextureFormat(format) { + var colorChannels = { + 5: 3, + 6: 4, + 8: 2, + 29502: 3, + 29504: 4, + 26917: 2, + 26918: 2, + 29846: 3, + 29847: 4 + }; + return colorChannels[format - 6402] || 1 + } + function heapObjectForWebGLType(type) { + type -= 5120; + if (type == 0) + return HEAP8; + if (type == 1) + return HEAPU8; + if (type == 2) + return HEAP16; + if (type == 4) + return HEAP32; + if (type == 6) + return HEAPF32; + if (type == 5 || type == 28922 || type == 28520 || type == 30779 || type == 30782) + return HEAPU32; + return HEAPU16 + } + function heapAccessShiftForWebGLHeap(heap) { + return 31 - Math.clz32(heap.BYTES_PER_ELEMENT) + } + function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var heap = heapObjectForWebGLType(type); + var shift = heapAccessShiftForWebGLHeap(heap); + var sizePerPixel = colorChannelsInGlTextureFormat(format) << shift; + var bytes = computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + return heap.subarray(pixels >> shift, pixels + bytes >> shift) + } + function _glReadPixels(x, y, width, height, format, type, pixels) { + if (GLctx.currentPixelPackBufferBinding) { + GLctx.readPixels(x, y, width, height, format, type, pixels) + } else if (HEAPU8.length <= 2147483648) { + var heap = heapObjectForWebGLType(type); + GLctx.readPixels(x, y, width, height, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)) + } else { + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(1280); + return + } + GLctx.readPixels(x, y, width, height, format, type, pixelData) + } + } + function _glRenderbufferStorage(x0, x1, x2, x3) { + GLctx.renderbufferStorage(x0, x1, x2, x3) + } + function _glRenderbufferStorageMultisample(x0, x1, x2, x3, x4) { + GLctx.renderbufferStorageMultisample(x0, x1, x2, x3, x4) + } + function _glSamplerParameteri(sampler, pname, param) { + GLctx.samplerParameteri(GL.samplers[sampler], pname, param) + } + function _glScissor(x0, x1, x2, x3) { + GLctx.scissor(x0, x1, x2, x3) + } + function find_closing_parens_index(arr, i, opening="(", closing=")") { + for (var nesting = 0; i < arr.length; ++i) { + if (arr[i] == opening) + ++nesting; + if (arr[i] == closing && --nesting == 0) { + return i + } + } + } + function preprocess_c_code(code, defs={}) { + var i = 0 + , len = code.length + , out = "" + , stack = [1]; + defs["defined"] = args => { + return defs[args[0].trim()] ? 1 : 0 + } + ; + function isWhitespace(str, i) { + return !(str.charCodeAt(i) > 32) + } + function nextWhitespace(str, i) { + while (!isWhitespace(str, i)) + ++i; + return i + } + function classifyChar(str, idx) { + var cc = str.charCodeAt(idx); + if (cc > 32) { + if (cc < 48) + return 1; + if (cc < 58) + return 2; + if (cc < 65) + return 1; + if (cc < 91 || cc == 95) + return 3; + if (cc < 97) + return 1; + if (cc < 123) + return 3; + return 1 + } + return cc < 33 ? 0 : 4 + } + function tokenize(exprString, keepWhitespace) { + var out = [] + , len = exprString.length; + for (var i = 0; i <= len; ++i) { + var kind = classifyChar(exprString, i); + if (kind == 2 || kind == 3) { + for (var j = i + 1; j <= len; ++j) { + var kind2 = classifyChar(exprString, j); + if (kind2 != kind && (kind2 != 2 || kind != 3)) { + out.push(exprString.substring(i, j)); + i = j - 1; + break + } + } + } else if (kind == 1) { + var op2 = exprString.substr(i, 2); + if (["<=", ">=", "==", "!=", "&&", "||"].includes(op2)) { + out.push(op2); + ++i + } else { + out.push(exprString[i]) + } + } + } + return out + } + function expandMacros(str, lineStart, lineEnd) { + if (lineEnd === undefined) + lineEnd = str.length; + var len = str.length; + var out = ""; + for (var i = lineStart; i < lineEnd; ++i) { + var kind = classifyChar(str, i); + if (kind == 3) { + for (var j = i + 1; j <= lineEnd; ++j) { + var kind2 = classifyChar(str, j); + if (kind2 != 2 && kind2 != 3) { + var symbol = str.substring(i, j); + var pp = defs[symbol]; + if (pp) { + var expanded = str.substring(lineStart, i); + if (pp.length) { + while (isWhitespace(str, j)) + ++j; + if (str[j] == "(") { + var closeParens = find_closing_parens_index(str, j); + expanded += pp(str.substring(j + 1, closeParens).split(",")) + str.substring(closeParens + 1, lineEnd) + } else { + var j2 = nextWhitespace(str, j); + expanded += pp([str.substring(j, j2)]) + str.substring(j2, lineEnd) + } + } else { + expanded += pp() + str.substring(j, lineEnd) + } + return expandMacros(expanded, 0) + } + out += symbol; + i = j - 1; + break + } + } + } else { + out += str[i] + } + } + return out + } + function buildExprTree(tokens) { + while (tokens.length > 1 || typeof tokens[0] != "function") { + tokens = function(tokens) { + var i, j, p, operatorAndPriority = -2; + for (j = 0; j < tokens.length; ++j) { + if ((p = ["*", "/", "+", "-", "!", "<", "<=", ">", ">=", "==", "!=", "&&", "||", "("].indexOf(tokens[j])) > operatorAndPriority) { + i = j; + operatorAndPriority = p + } + } + if (operatorAndPriority == 13) { + var j = find_closing_parens_index(tokens, i); + if (j) { + tokens.splice(i, j + 1 - i, buildExprTree(tokens.slice(i + 1, j))); + return tokens + } + } + if (operatorAndPriority == 4) { + i = tokens.lastIndexOf("!"); + var innerExpr = buildExprTree(tokens.slice(i + 1, i + 2)); + tokens.splice(i, 2, function() { + return !innerExpr() + }); + return tokens + } + if (operatorAndPriority >= 0) { + var left = buildExprTree(tokens.slice(0, i)); + var right = buildExprTree(tokens.slice(i + 1)); + switch (tokens[i]) { + case "&&": + return [function() { + return left() && right() + } + ]; + case "||": + return [function() { + return left() || right() + } + ]; + case "==": + return [function() { + return left() == right() + } + ]; + case "!=": + return [function() { + return left() != right() + } + ]; + case "<": + return [function() { + return left() < right() + } + ]; + case "<=": + return [function() { + return left() <= right() + } + ]; + case ">": + return [function() { + return left() > right() + } + ]; + case ">=": + return [function() { + return left() >= right() + } + ]; + case "+": + return [function() { + return left() + right() + } + ]; + case "-": + return [function() { + return left() - right() + } + ]; + case "*": + return [function() { + return left() * right() + } + ]; + case "/": + return [function() { + return Math.floor(left() / right()) + } + ] + } + } + var num = jstoi_q(tokens[i]); + return [function() { + return num + } + ] + }(tokens) + } + return tokens[0] + } + for (; i < len; ++i) { + var lineStart = i; + i = code.indexOf("\n", i); + if (i < 0) + i = len; + for (var j = lineStart; j < i && isWhitespace(code, j); ++j) + ; + var thisLineIsInActivePreprocessingBlock = stack[stack.length - 1]; + if (code[j] != "#") { + if (thisLineIsInActivePreprocessingBlock) { + out += expandMacros(code, lineStart, i) + "\n" + } + continue + } + var space = nextWhitespace(code, j); + var directive = code.substring(j + 1, space); + var expression = code.substring(space, i).trim(); + switch (directive) { + case "if": + var tokens = tokenize(expandMacros(expression, 0)); + var exprTree = buildExprTree(tokens); + var evaluated = exprTree(); + stack.push(!!evaluated * stack[stack.length - 1]); + break; + case "ifdef": + stack.push(!!defs[expression] * stack[stack.length - 1]); + break; + case "ifndef": + stack.push(!defs[expression] * stack[stack.length - 1]); + break; + case "else": + stack[stack.length - 1] = (1 - stack[stack.length - 1]) * stack[stack.length - 2]; + break; + case "endif": + stack.pop(); + break; + case "define": + if (thisLineIsInActivePreprocessingBlock) { + var macroStart = expression.indexOf("("); + var firstWs = nextWhitespace(expression, 0); + if (firstWs < macroStart) + macroStart = 0; + if (macroStart > 0) { + var macroEnd = expression.indexOf(")", macroStart); + let params = expression.substring(macroStart + 1, macroEnd).split(",").map(x => x.trim()); + let value = tokenize(expression.substring(macroEnd + 1).trim()); + defs[expression.substring(0, macroStart)] = args => { + var ret = ""; + value.forEach(x => { + var argIndex = params.indexOf(x); + ret += argIndex >= 0 ? args[argIndex] : x + } + ); + return ret + } + } else { + let value = expandMacros(expression.substring(firstWs + 1).trim(), 0); + defs[expression.substring(0, firstWs)] = () => value + } + } + break; + case "undef": + if (thisLineIsInActivePreprocessingBlock) + delete defs[expression]; + break; + default: + if (directive != "version" && directive != "pragma" && directive != "extension" && directive != "line") {} + out += expandMacros(code, lineStart, i) + "\n" + } + } + return out + } + function remove_cpp_comments_in_shaders(code) { + var i = 0, out = "", ch, next, len = code.length; + for (; i < len; ++i) { + ch = code[i]; + if (ch == "/") { + next = code[i + 1]; + if (next == "/") { + while (i < len && code[i + 1] != "\n") + ++i + } else if (next == "*") { + while (i < len && (code[i - 1] != "*" || code[i] != "/")) + ++i + } else { + out += ch + } + } else { + out += ch + } + } + return out + } + function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + source = preprocess_c_code(remove_cpp_comments_in_shaders(source), { + "GL_FRAGMENT_PRECISION_HIGH": () => 1, + "GL_ES": () => 1, + "__VERSION__": () => source.includes("#version 300") ? 300 : 100 + }); + var regex = /layout\s*\(\s*location\s*=\s*(-?\d+)\s*\)\s*(uniform\s+((lowp|mediump|highp)\s+)?\w+\s+(\w+))/g, explicitUniformLocations = {}, match; + while (match = regex.exec(source)) { + explicitUniformLocations[match[5]] = jstoi_q(match[1]); + if (!(explicitUniformLocations[match[5]] >= 0 && explicitUniformLocations[match[5]] < 1048576)) { + err('Specified an out of range layout(location=x) directive "' + explicitUniformLocations[match[5]] + '"! (' + match[0] + ")"); + GL.recordError(1281); + return + } + } + source = source.replace(regex, "$2"); + GL.shaders[shader].explicitUniformLocations = explicitUniformLocations; + var bindingRegex = /layout\s*\(.*?binding\s*=\s*(-?\d+).*?\)\s*uniform\s+(\w+)\s+(\w+)?/g, samplerBindings = {}, uniformBindings = {}, bindingMatch; + while (bindingMatch = bindingRegex.exec(source)) { + var arrayLength = 1; + for (var i = bindingMatch.index; i < source.length && source[i] != ";"; ++i) { + if (source[i] == "[") { + arrayLength = jstoi_q(source.slice(i + 1)); + break + } + if (source[i] == "{") + i = find_closing_parens_index(source, i, "{", "}") - 1 + } + var binding = jstoi_q(bindingMatch[1]); + var bindingsType = 34930; + if (bindingMatch[3] && bindingMatch[2].indexOf("sampler") != -1) { + samplerBindings[bindingMatch[3]] = [binding, arrayLength] + } else { + bindingsType = 35374; + uniformBindings[bindingMatch[2]] = [binding, arrayLength] + } + var numBindingPoints = GLctx.getParameter(bindingsType); + if (!(binding >= 0 && binding + arrayLength <= numBindingPoints)) { + err('Specified an out of range layout(binding=x) directive "' + binding + '"! (' + bindingMatch[0] + "). Valid range is [0, " + numBindingPoints + "-1]"); + GL.recordError(1281); + return + } + } + source = source.replace(/layout\s*\(.*?binding\s*=\s*([-\d]+).*?\)/g, ""); + source = source.replace(/(layout\s*\((.*?)),\s*binding\s*=\s*([-\d]+)\)/g, "$1)"); + source = source.replace(/layout\s*\(\s*binding\s*=\s*([-\d]+)\s*,(.*?)\)/g, "layout($2)"); + GL.shaders[shader].explicitSamplerBindings = samplerBindings; + GL.shaders[shader].explicitUniformBindings = uniformBindings; + GLctx.shaderSource(GL.shaders[shader], source) + } + function _glStencilFuncSeparate(x0, x1, x2, x3) { + GLctx.stencilFuncSeparate(x0, x1, x2, x3) + } + function _glStencilMask(x0) { + GLctx.stencilMask(x0) + } + function _glStencilOpSeparate(x0, x1, x2, x3) { + GLctx.stencilOpSeparate(x0, x1, x2, x3) + } + function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels) + } else if (pixels) { + if (HEAPU8.length <= 2147483648) { + var heap = heapObjectForWebGLType(type); + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)) + } else { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat)) + } + } else { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, null) + } + } + function computeUnpackAlignedImageSize3D(width, height, depth, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return x + y - 1 & -y + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return depth * height * alignedRowSize + } + function emscriptenWebGLGetTexPixelData3D(type, format, width, height, depth, pixels, internalFormat) { + var heap = heapObjectForWebGLType(type); + var shift = heapAccessShiftForWebGLHeap(heap); + var sizePerPixel = colorChannelsInGlTextureFormat(format) << shift; + var bytes = computeUnpackAlignedImageSize3D(width, height, depth, sizePerPixel, GL.unpackAlignment); + return heap.subarray(pixels >> shift, pixels + bytes >> shift) + } + function _glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels) + } else if (pixels) { + if (HEAPU8.length <= 2147483648) { + var heap = heapObjectForWebGLType(type); + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)) + } else { + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, emscriptenWebGLGetTexPixelData3D(type, format, width, height, depth, pixels, internalFormat)) + } + } else { + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, null) + } + } + function _glTexParameterf(x0, x1, x2) { + GLctx.texParameterf(x0, x1, x2) + } + function _glTexParameteri(x0, x1, x2) { + GLctx.texParameteri(x0, x1, x2) + } + function _glTexParameteriv(target, pname, params) { + var param = HEAP32[params >> 2]; + GLctx.texParameteri(target, pname, param) + } + function _glTexStorage2D(x0, x1, x2, x3, x4) { + GLctx.texStorage2D(x0, x1, x2, x3, x4) + } + function _glTexStorage3D(x0, x1, x2, x3, x4, x5) { + GLctx.texStorage3D(x0, x1, x2, x3, x4, x5) + } + function _glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) + } else if (pixels) { + if (HEAPU8.length <= 2147483648) { + var heap = heapObjectForWebGLType(type); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)) + } else { + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0)) + } + } else { + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, null) + } + } + function _glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + } else if (pixels) { + if (HEAPU8.length <= 2147483648) { + var heap = heapObjectForWebGLType(type); + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, heap, pixels >> heapAccessShiftForWebGLHeap(heap)) + } else { + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, emscriptenWebGLGetTexPixelData3D(type, format, width, height, depth, pixels, 0)) + } + } else { + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, null) + } + } + var miniTempWebGLFloatBuffers = []; + function _glUniform1fv(location, count, value) { + if (count <= 288) { + var view = miniTempWebGLFloatBuffers[count - 1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[value + 4 * i >> 2] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 4 >> 2) + } + GLctx.uniform1fv(webglGetUniformLocation(location), view) + } + function _glUniform1i(location, v0) { + GLctx.uniform1i(webglGetUniformLocation(location), v0) + } + var miniTempWebGLIntBuffers = []; + function _glUniform1iv(location, count, value) { + if (count <= 288) { + var view = miniTempWebGLIntBuffers[count - 1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAP32[value + 4 * i >> 2] + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 4 >> 2) + } + GLctx.uniform1iv(webglGetUniformLocation(location), view) + } + var miniTempWebGLUIntBuffers = []; + function _glUniform1uiv(location, count, value) { + if (count <= 288) { + var view = miniTempWebGLUIntBuffers[count - 1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPU32[value + 4 * i >> 2] + } + } else { + var view = HEAPU32.subarray(value >> 2, value + count * 4 >> 2) + } + GLctx.uniform1uiv(webglGetUniformLocation(location), view) + } + function _glUniform2fv(location, count, value) { + if (count <= 144) { + var view = miniTempWebGLFloatBuffers[2 * count - 1]; + for (var i = 0; i < 2 * count; i += 2) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 8 >> 2) + } + GLctx.uniform2fv(webglGetUniformLocation(location), view) + } + function _glUniform2iv(location, count, value) { + if (count <= 144) { + var view = miniTempWebGLIntBuffers[2 * count - 1]; + for (var i = 0; i < 2 * count; i += 2) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2] + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 8 >> 2) + } + GLctx.uniform2iv(webglGetUniformLocation(location), view) + } + function _glUniform2uiv(location, count, value) { + if (count <= 144) { + var view = miniTempWebGLUIntBuffers[2 * count - 1]; + for (var i = 0; i < 2 * count; i += 2) { + view[i] = HEAPU32[value + 4 * i >> 2]; + view[i + 1] = HEAPU32[value + (4 * i + 4) >> 2] + } + } else { + var view = HEAPU32.subarray(value >> 2, value + count * 8 >> 2) + } + GLctx.uniform2uiv(webglGetUniformLocation(location), view) + } + function _glUniform3fv(location, count, value) { + if (count <= 96) { + var view = miniTempWebGLFloatBuffers[3 * count - 1]; + for (var i = 0; i < 3 * count; i += 3) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPF32[value + (4 * i + 8) >> 2] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 12 >> 2) + } + GLctx.uniform3fv(webglGetUniformLocation(location), view) + } + function _glUniform3iv(location, count, value) { + if (count <= 96) { + var view = miniTempWebGLIntBuffers[3 * count - 1]; + for (var i = 0; i < 3 * count; i += 3) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAP32[value + (4 * i + 8) >> 2] + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 12 >> 2) + } + GLctx.uniform3iv(webglGetUniformLocation(location), view) + } + function _glUniform3uiv(location, count, value) { + if (count <= 96) { + var view = miniTempWebGLUIntBuffers[3 * count - 1]; + for (var i = 0; i < 3 * count; i += 3) { + view[i] = HEAPU32[value + 4 * i >> 2]; + view[i + 1] = HEAPU32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPU32[value + (4 * i + 8) >> 2] + } + } else { + var view = HEAPU32.subarray(value >> 2, value + count * 12 >> 2) + } + GLctx.uniform3uiv(webglGetUniformLocation(location), view) + } + function _glUniform4fv(location, count, value) { + if (count <= 72) { + var view = miniTempWebGLFloatBuffers[4 * count - 1]; + var heap = HEAPF32; + value = value >> 2; + for (var i = 0; i < 4 * count; i += 4) { + view[i] = heap[value++]; + view[i + 1] = heap[value++]; + view[i + 2] = heap[value++]; + view[i + 3] = heap[value++] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 16 >> 2) + } + GLctx.uniform4fv(webglGetUniformLocation(location), view) + } + function _glUniform4iv(location, count, value) { + if (count <= 72) { + var view = miniTempWebGLIntBuffers[4 * count - 1]; + for (var i = 0; i < 4 * count; i += 4) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAP32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAP32[value + (4 * i + 12) >> 2] + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 16 >> 2) + } + GLctx.uniform4iv(webglGetUniformLocation(location), view) + } + function _glUniform4uiv(location, count, value) { + if (count <= 72) { + var view = miniTempWebGLUIntBuffers[4 * count - 1]; + for (var i = 0; i < 4 * count; i += 4) { + view[i] = HEAPU32[value + 4 * i >> 2]; + view[i + 1] = HEAPU32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPU32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAPU32[value + (4 * i + 12) >> 2] + } + } else { + var view = HEAPU32.subarray(value >> 2, value + count * 16 >> 2) + } + GLctx.uniform4uiv(webglGetUniformLocation(location), view) + } + function _glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) { + program = GL.programs[program]; + GLctx.uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) + } + function _glUniformMatrix3fv(location, count, transpose, value) { + if (count <= 32) { + var view = miniTempWebGLFloatBuffers[9 * count - 1]; + for (var i = 0; i < 9 * count; i += 9) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPF32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAPF32[value + (4 * i + 12) >> 2]; + view[i + 4] = HEAPF32[value + (4 * i + 16) >> 2]; + view[i + 5] = HEAPF32[value + (4 * i + 20) >> 2]; + view[i + 6] = HEAPF32[value + (4 * i + 24) >> 2]; + view[i + 7] = HEAPF32[value + (4 * i + 28) >> 2]; + view[i + 8] = HEAPF32[value + (4 * i + 32) >> 2] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 36 >> 2) + } + GLctx.uniformMatrix3fv(webglGetUniformLocation(location), !!transpose, view) + } + function _glUniformMatrix4fv(location, count, transpose, value) { + if (count <= 18) { + var view = miniTempWebGLFloatBuffers[16 * count - 1]; + var heap = HEAPF32; + value = value >> 2; + for (var i = 0; i < 16 * count; i += 16) { + view[i] = heap[value++]; + view[i + 1] = heap[value++]; + view[i + 2] = heap[value++]; + view[i + 3] = heap[value++]; + view[i + 4] = heap[value++]; + view[i + 5] = heap[value++]; + view[i + 6] = heap[value++]; + view[i + 7] = heap[value++]; + view[i + 8] = heap[value++]; + view[i + 9] = heap[value++]; + view[i + 10] = heap[value++]; + view[i + 11] = heap[value++]; + view[i + 12] = heap[value++]; + view[i + 13] = heap[value++]; + view[i + 14] = heap[value++]; + view[i + 15] = heap[value++] + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 64 >> 2) + } + GLctx.uniformMatrix4fv(webglGetUniformLocation(location), !!transpose, view) + } + function _glUnmapBuffer(target) { + if (!emscriptenWebGLValidateMapBufferTarget(target)) { + GL.recordError(1280); + err("GL_INVALID_ENUM in glUnmapBuffer"); + return 0 + } + var buffer = emscriptenWebGLGetBufferBinding(target); + var mapping = GL.mappedBuffers[buffer]; + if (!mapping) { + GL.recordError(1282); + err("buffer was never mapped in glUnmapBuffer"); + return 0 + } + GL.mappedBuffers[buffer] = null; + if (!(mapping.access & 16)) + if (GL.currentContext.version >= 2 && HEAPU8.length <= 2147483648) { + GLctx.bufferSubData(target, mapping.offset, HEAPU8, mapping.mem, mapping.length) + } else { + GLctx.bufferSubData(target, mapping.offset, HEAPU8.subarray(mapping.mem, mapping.mem + mapping.length)) + } + _free(mapping.mem); + return 1 + } + function webglApplyExplicitProgramBindings() { + var p = GLctx.currentProgram; + if (!p.explicitProgramBindingsApplied) { + if (GL.currentContext.version >= 2) { + Object.keys(p.explicitUniformBindings).forEach(function(ubo) { + var bindings = p.explicitUniformBindings[ubo]; + for (var i = 0; i < bindings[1]; ++i) { + var blockIndex = GLctx.getUniformBlockIndex(p, ubo + (bindings[1] > 1 ? "[" + i + "]" : "")); + GLctx.uniformBlockBinding(p, blockIndex, bindings[0] + i) + } + }) + } + Object.keys(p.explicitSamplerBindings).forEach(function(sampler) { + var bindings = p.explicitSamplerBindings[sampler]; + for (var i = 0; i < bindings[1]; ++i) { + GLctx.uniform1i(GLctx.getUniformLocation(p, sampler + (i ? "[" + i + "]" : "")), bindings[0] + i) + } + }); + p.explicitProgramBindingsApplied = 1 + } + } + function _glUseProgram(program) { + program = GL.programs[program]; + GLctx.useProgram(program); + if (GLctx.currentProgram = program) { + webglApplyExplicitProgramBindings() + } + } + function _glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]) + } + function _glVertexAttrib4f(x0, x1, x2, x3, x4) { + GLctx.vertexAttrib4f(x0, x1, x2, x3, x4) + } + function _glVertexAttrib4fv(index, v) { + v = v >> 2; + GLctx.vertexAttrib4f(index, HEAPF32[v], HEAPF32[v + 1], HEAPF32[v + 2], HEAPF32[v + 3]) + } + function _glVertexAttribIPointer(index, size, type, stride, ptr) { + var cb = GL.currentContext.clientBuffers[index]; + if (!GLctx.currentArrayBufferBinding) { + cb.size = size; + cb.type = type; + cb.normalized = false; + cb.stride = stride; + cb.ptr = ptr; + cb.clientside = true; + cb.vertexAttribPointerAdaptor = function(index, size, type, normalized, stride, ptr) { + this.vertexAttribIPointer(index, size, type, stride, ptr) + } + ; + return + } + cb.clientside = false; + GLctx.vertexAttribIPointer(index, size, type, stride, ptr) + } + function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + var cb = GL.currentContext.clientBuffers[index]; + if (!GLctx.currentArrayBufferBinding) { + cb.size = size; + cb.type = type; + cb.normalized = normalized; + cb.stride = stride; + cb.ptr = ptr; + cb.clientside = true; + cb.vertexAttribPointerAdaptor = function(index, size, type, normalized, stride, ptr) { + this.vertexAttribPointer(index, size, type, normalized, stride, ptr) + } + ; + return + } + cb.clientside = false; + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr) + } + function _glViewport(x0, x1, x2, x3) { + GLctx.viewport(x0, x1, x2, x3) + } + function _isCursorLocked() { + if (this.isMobileDevice()) { + return false + } + var locked = (document.pointerLockElement ? document.pointerLockElement !== null : false) || (document.mozPointerLockElement ? document.mozPointerLockElement !== null : false) || (document.webkitPointerLockElement ? document.webkitPointerLockElement !== null : false); + return locked || screen.height === window.innerHeight && screen.width === window.innerWidth + } + function _isMobileDevice() { + var userAgent = navigator.userAgent.toLowerCase(); + if (/windows nt/.test(userAgent) && !/windows phone/.test(userAgent)) { + return false + } + if (/CrOS/.test(userAgent)) { + return false + } + if (/mobile/.test(userAgent)) { + return true + } + var isIPad = /ipad|macintosh/.test(userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1; + var isAndroidTablet = /android/.test(userAgent) && !/mobile/.test(userAgent); + if (isIPad || isAndroidTablet) { + return true + } + return false + } + function _llvm_eh_typeid_for(type) { + return type + } + function wgpuDecodeStrings(s, c, ch) { + ch = ch || 65; + for (c = c.split("|"); c[0]; ) + s = s["replaceAll"](String.fromCharCode(ch++), c.pop()); + return [, ].concat(s.split(" ")) + } + var GPUTextureAndVertexFormats = wgpuDecodeStrings("r8YA8TA8SA8UALSALUALWR8YR8TR8SR8UANSANUANWRLSRLURLW V8Y V8Z V8T V8S V8U bgra8Y bgra8ZRb9e5uWRbJa2SRbJa2YR11bJuWRNSRNURNW VLS VLU VLW VNS VNU VNWB8ILYI24plusI24plus-E8INWINW-E8Q1-V-YQ1-V-ZQ2-V-YQ2-V-ZQ3-V-YQ3-V-ZQ4-r-YQ4-r-TQ5-rg-YQ5-rg-TQ6h-rgb-uWQ6h-rgb-WQ7-V-YQ7-V-ZPYPZPa1YPa1Z etc2-V8Y etc2-V8ZFr11YFr11TFrg11YFrg11TX4x4-YX4x4-ZX5x4-YX5x4-ZX5x5-YX5x5-ZX6x5-YX6x5-ZX6x6-YX6x6-ZX8x5-YX8x5-ZX8x6-YX8x6-ZX8x8-YX8x8-ZXJx5-YXJx5-ZXJx6-YXJx6-ZXJx8-YXJx8-ZXJxJ-YXJxJ-ZX12xJ-YX12xJ-ZX12x12-YX12x12-Z S8MS8KU8MU8KY8MY8KT8MT8KSLMSLKULMULKYLMYLKTLMTLKWLMWLKWN WNMWNx3 WNKSN SNMSNx3 SNKUN UNMUNx3 UNKYJ-J-J-2", "unorm-srgb|unorm| astc-|float|rgba|sint|snorm|uint| rg| bc| etc2-rgb8|-AC|32|x2 |16|x4 |10| depth|-B|SC| eac-|stencil|-ESJ|-E-A| E| r"); + function _navigator_gpu_get_preferred_canvas_format() { + return GPUTextureAndVertexFormats.indexOf(navigator["gpu"]["getPreferredCanvasFormat"]()) + } + function _wgpuMuteJsExceptions(fn) { + return p => { + try { + return fn(p) + } catch (e) {} + } + } + function _navigator_gpu_request_adapter_async(options, adapterCallback, userData) { + options >>= 2; + let gpu = navigator["gpu"] + , powerPreference = [, "low-power", "high-performance"][HEAPU32[options]] + , opts = {}; + if (gpu) { + if (options) { + opts["forceFallbackAdapter"] = !!HEAPU32[options + 1]; + if (powerPreference) + opts["powerPreference"] = powerPreference + } + function cb(adapter) { + ( (a1, a2) => dynCall_vii.apply(null, [adapterCallback, a1, a2]))(wgpuStore(adapter), userData) + } + gpu["requestAdapter"](opts).then(_wgpuMuteJsExceptions(cb)).catch( () => { + cb() + } + ); + return 1 + } + } + function arraySum(array, index) { + var sum = 0; + for (var i = 0; i <= index; sum += array[i++]) {} + return sum + } + var MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function addDays(date, days) { + var newDate = new Date(date.getTime()); + while (days > 0) { + var leap = isLeapYear(newDate.getFullYear()); + var currentMonth = newDate.getMonth(); + var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth]; + if (days > daysInCurrentMonth - newDate.getDate()) { + days -= daysInCurrentMonth - newDate.getDate() + 1; + newDate.setDate(1); + if (currentMonth < 11) { + newDate.setMonth(currentMonth + 1) + } else { + newDate.setMonth(0); + newDate.setFullYear(newDate.getFullYear() + 1) + } + } else { + newDate.setDate(newDate.getDate() + days); + return newDate + } + } + return newDate + } + function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer) + } + function _strftime(s, maxsize, format, tm) { + var tm_zone = HEAP32[tm + 40 >> 2]; + var date = { + tm_sec: HEAP32[tm >> 2], + tm_min: HEAP32[tm + 4 >> 2], + tm_hour: HEAP32[tm + 8 >> 2], + tm_mday: HEAP32[tm + 12 >> 2], + tm_mon: HEAP32[tm + 16 >> 2], + tm_year: HEAP32[tm + 20 >> 2], + tm_wday: HEAP32[tm + 24 >> 2], + tm_yday: HEAP32[tm + 28 >> 2], + tm_isdst: HEAP32[tm + 32 >> 2], + tm_gmtoff: HEAP32[tm + 36 >> 2], + tm_zone: tm_zone ? UTF8ToString(tm_zone) : "" + }; + var pattern = UTF8ToString(format); + var EXPANSION_RULES_1 = { + "%c": "%a %b %d %H:%M:%S %Y", + "%D": "%m/%d/%y", + "%F": "%Y-%m-%d", + "%h": "%b", + "%r": "%I:%M:%S %p", + "%R": "%H:%M", + "%T": "%H:%M:%S", + "%x": "%m/%d/%y", + "%X": "%H:%M:%S", + "%Ec": "%c", + "%EC": "%C", + "%Ex": "%m/%d/%y", + "%EX": "%H:%M:%S", + "%Ey": "%y", + "%EY": "%Y", + "%Od": "%d", + "%Oe": "%e", + "%OH": "%H", + "%OI": "%I", + "%Om": "%m", + "%OM": "%M", + "%OS": "%S", + "%Ou": "%u", + "%OU": "%U", + "%OV": "%V", + "%Ow": "%w", + "%OW": "%W", + "%Oy": "%y" + }; + for (var rule in EXPANSION_RULES_1) { + pattern = pattern.replace(new RegExp(rule,"g"), EXPANSION_RULES_1[rule]) + } + var WEEKDAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + function leadingSomething(value, digits, character) { + var str = typeof value == "number" ? value.toString() : value || ""; + while (str.length < digits) { + str = character[0] + str + } + return str + } + function leadingNulls(value, digits) { + return leadingSomething(value, digits, "0") + } + function compareByDay(date1, date2) { + function sgn(value) { + return value < 0 ? -1 : value > 0 ? 1 : 0 + } + var compare; + if ((compare = sgn(date1.getFullYear() - date2.getFullYear())) === 0) { + if ((compare = sgn(date1.getMonth() - date2.getMonth())) === 0) { + compare = sgn(date1.getDate() - date2.getDate()) + } + } + return compare + } + function getFirstWeekStartDate(janFourth) { + switch (janFourth.getDay()) { + case 0: + return new Date(janFourth.getFullYear() - 1,11,29); + case 1: + return janFourth; + case 2: + return new Date(janFourth.getFullYear(),0,3); + case 3: + return new Date(janFourth.getFullYear(),0,2); + case 4: + return new Date(janFourth.getFullYear(),0,1); + case 5: + return new Date(janFourth.getFullYear() - 1,11,31); + case 6: + return new Date(janFourth.getFullYear() - 1,11,30) + } + } + function getWeekBasedYear(date) { + var thisDate = addDays(new Date(date.tm_year + 1900,0,1), date.tm_yday); + var janFourthThisYear = new Date(thisDate.getFullYear(),0,4); + var janFourthNextYear = new Date(thisDate.getFullYear() + 1,0,4); + var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); + var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); + if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) { + if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) { + return thisDate.getFullYear() + 1 + } + return thisDate.getFullYear() + } + return thisDate.getFullYear() - 1 + } + var EXPANSION_RULES_2 = { + "%a": function(date) { + return WEEKDAYS[date.tm_wday].substring(0, 3) + }, + "%A": function(date) { + return WEEKDAYS[date.tm_wday] + }, + "%b": function(date) { + return MONTHS[date.tm_mon].substring(0, 3) + }, + "%B": function(date) { + return MONTHS[date.tm_mon] + }, + "%C": function(date) { + var year = date.tm_year + 1900; + return leadingNulls(year / 100 | 0, 2) + }, + "%d": function(date) { + return leadingNulls(date.tm_mday, 2) + }, + "%e": function(date) { + return leadingSomething(date.tm_mday, 2, " ") + }, + "%g": function(date) { + return getWeekBasedYear(date).toString().substring(2) + }, + "%G": function(date) { + return getWeekBasedYear(date) + }, + "%H": function(date) { + return leadingNulls(date.tm_hour, 2) + }, + "%I": function(date) { + var twelveHour = date.tm_hour; + if (twelveHour == 0) + twelveHour = 12; + else if (twelveHour > 12) + twelveHour -= 12; + return leadingNulls(twelveHour, 2) + }, + "%j": function(date) { + return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year + 1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon - 1), 3) + }, + "%m": function(date) { + return leadingNulls(date.tm_mon + 1, 2) + }, + "%M": function(date) { + return leadingNulls(date.tm_min, 2) + }, + "%n": function() { + return "\n" + }, + "%p": function(date) { + if (date.tm_hour >= 0 && date.tm_hour < 12) { + return "AM" + } + return "PM" + }, + "%S": function(date) { + return leadingNulls(date.tm_sec, 2) + }, + "%t": function() { + return "\t" + }, + "%u": function(date) { + return date.tm_wday || 7 + }, + "%U": function(date) { + var days = date.tm_yday + 7 - date.tm_wday; + return leadingNulls(Math.floor(days / 7), 2) + }, + "%V": function(date) { + var val = Math.floor((date.tm_yday + 7 - (date.tm_wday + 6) % 7) / 7); + if ((date.tm_wday + 371 - date.tm_yday - 2) % 7 <= 2) { + val++ + } + if (!val) { + val = 52; + var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7; + if (dec31 == 4 || dec31 == 5 && isLeapYear(date.tm_year % 400 - 1)) { + val++ + } + } else if (val == 53) { + var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7; + if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year))) + val = 1 + } + return leadingNulls(val, 2) + }, + "%w": function(date) { + return date.tm_wday + }, + "%W": function(date) { + var days = date.tm_yday + 7 - (date.tm_wday + 6) % 7; + return leadingNulls(Math.floor(days / 7), 2) + }, + "%y": function(date) { + return (date.tm_year + 1900).toString().substring(2) + }, + "%Y": function(date) { + return date.tm_year + 1900 + }, + "%z": function(date) { + var off = date.tm_gmtoff; + var ahead = off >= 0; + off = Math.abs(off) / 60; + off = off / 60 * 100 + off % 60; + return (ahead ? "+" : "-") + String("0000" + off).slice(-4) + }, + "%Z": function(date) { + return date.tm_zone + }, + "%%": function() { + return "%" + } + }; + pattern = pattern.replace(/%%/g, "\0\0"); + for (var rule in EXPANSION_RULES_2) { + if (pattern.includes(rule)) { + pattern = pattern.replace(new RegExp(rule,"g"), EXPANSION_RULES_2[rule](date)) + } + } + pattern = pattern.replace(/\0\0/g, "%"); + var bytes = intArrayFromString(pattern, false); + if (bytes.length > maxsize) { + return 0 + } + writeArrayToMemory(bytes, s); + return bytes.length - 1 + } + function _strftime_l(s, maxsize, format, tm, loc) { + return _strftime(s, maxsize, format, tm) + } + function _testFunctionggg() { + Object.freeze(WebGLRenderingContext); + Object.freeze(WebGL2RenderingContext); + Object.freeze(WebGLRenderingContext.prototype); + Object.freeze(WebGL2RenderingContext.prototype) + } + var _wgpuFeatures = wgpuDecodeStrings("A-Ccontrol A32F-Dencil8GbcGbc-sliced-3dGetc2GaDc timeDamp-query indirect-firD-inB shader-f16 rg11b10uF-rendEbgra8unorm-Dorage F32-filtECdiBs dual-source-blending", " texture-compression-|float|erable |st|clip-|Dance|depth").slice(1); + function _wgpu_adapter_or_device_get_features(adapterOrDevice) { + let id = 1 + , featuresBitMask = 0; + for (let feature of _wgpuFeatures) { + if (wgpu[adapterOrDevice]["features"].has(feature)) { + featuresBitMask |= id + } + id *= 2 + } + return featuresBitMask + } + var _wgpu32BitLimitNames = wgpuDecodeStrings("max<1D=<2D=<3D=T4ArrayLayers=9s=9sPlus5>s=BindingsPer9=DynamicUniform>:=Dynamic;e>:=SampledT4s@axSamplers@ax;e>s@ax;eT4s@axUniform>s@inUniform>6t min;e>6t=5>s=5Attributes=5>ArrayStride=InterStageShaderVariables=ColorAttachments=ColorAttachmentBytesPerSample?;eSize=ComputeInvocationsPerWorkgroup?SizeX?SizeY?SizeZ", "PerShaderStage m| maxComputeWorkgroup|Buffer| max|TextureDimension|Storag|sPerPipelineLayout|BindGroup|s7ColorAttachment|Uniform6|OffsetAlignmen|Vertex|exture", 52).slice(1); + var _wgpu64BitLimitNames = wgpuDecodeStrings("maxUniform4Storage4BufferSize", "BufferBindingSize max", 52).slice(1); + function wgpuWriteI53ToU64HeapIdx(heap32Idx, number) { + HEAPU32[heap32Idx] = number; + HEAPU32[heap32Idx + 1] = number / 4294967296 + } + function _wgpu_adapter_or_device_get_limits(adapterOrDevice, limits) { + let l = wgpu[adapterOrDevice]["limits"]; + limits >>= 2; + for (let limitName of _wgpu64BitLimitNames) { + wgpuWriteI53ToU64HeapIdx(limits, l[limitName]); + limits += 2 + } + for (let limitName of _wgpu32BitLimitNames) { + HEAPU32[limits++] = l[limitName] + } + } + function wgpuReadI53FromU64HeapIdx(heap32Idx) { + return HEAPU32[heap32Idx] + HEAPU32[heap32Idx + 1] * 4294967296 + } + function wgpuReadSupportedLimits(heap32Idx) { + let requiredLimits = {}, v; + for (let limitName of _wgpu64BitLimitNames) { + if (v = wgpuReadI53FromU64HeapIdx(heap32Idx)) + requiredLimits[limitName] = v; + heap32Idx += 2 + } + for (let limitName of _wgpu32BitLimitNames) { + if (v = HEAPU32[heap32Idx++]) + requiredLimits[limitName] = v + } + return requiredLimits + } + function wgpuReadQueueDescriptor(heap32Idx) { + return HEAPU32[heap32Idx] ? { + "label": utf8(HEAPU32[heap32Idx]) + } : void 0 + } + function wgpuReadFeaturesBitfield(heap32Idx) { + let requiredFeatures = [] + , v = HEAPU32[heap32Idx]; + for (let i = 0; i < 14; ++i) { + if (v & 1 << i) + requiredFeatures.push(_wgpuFeatures[i]) + } + return requiredFeatures + } + function wgpuReadDeviceDescriptor(descriptor) { + descriptor >>= 2; + return { + "requiredLimits": wgpuReadSupportedLimits(descriptor), + "defaultQueue": wgpuReadQueueDescriptor(descriptor + 34), + "requiredFeatures": wgpuReadFeaturesBitfield(descriptor + 36) + } + } + function _wgpu_adapter_request_device_async(adapter, descriptor, deviceCallback, userData) { + function cb(device) { + if (device) { + wgpuStore(device["queue"]) + } + ( (a1, a2) => dynCall_vii.apply(null, [deviceCallback, a1, a2]))(wgpuStore(device), userData) + } + let desc = wgpuReadDeviceDescriptor(descriptor); + wgpu[adapter]["requestDevice"](desc).then(_wgpuMuteJsExceptions(cb)).catch( () => { + cb() + } + ) + } + function _wgpu_buffer_get_mapped_range(gpuBuffer, offset, size) { + gpuBuffer = wgpu[gpuBuffer]; + try { + gpuBuffer.mappedRanges[offset] = gpuBuffer["getMappedRange"](offset, size < 0 ? void 0 : size) + } catch (e) { + return -1 + } + return offset + } + function _wgpu_buffer_map_async(buffer, callback, userData, mode, offset, size) { + wgpu[buffer]["mapAsync"](mode, offset, size < 0 ? void 0 : size).then( () => { + ( (a1, a2, a3, a4, a5) => dynCall_viiidd.apply(null, [callback, a1, a2, a3, a4, a5]))(buffer, userData, mode, offset, size) + } + ) + } + function _wgpu_buffer_read_mapped_range(gpuBuffer, startOffset, subOffset, dst, size) { + HEAPU8.set(new Uint8Array(wgpu[gpuBuffer].mappedRanges[startOffset],subOffset,size), dst) + } + function _wgpu_buffer_unmap(gpuBuffer) { + gpuBuffer = wgpu[gpuBuffer]; + gpuBuffer["unmap"](); + gpuBuffer.mappedRanges = {} + } + var HTMLPredefinedColorSpaces = [, "srgb", "display-p3"]; + function wgpuReadArrayOfWgpuObjects(ptr, numObjects) { + ptr >>= 2; + var arrayOfObjects = new Array(numObjects); + for (var i = 0; i < numObjects; ) { + arrayOfObjects[i++] = wgpu[HEAPU32[ptr++]] + } + return arrayOfObjects + } + function _wgpu_canvas_context_configure(canvasContext, config) { + config >>= 2; + let desc = { + "device": wgpu[HEAPU32[config]], + "format": GPUTextureAndVertexFormats[HEAPU32[config + 1]], + "usage": HEAPU32[config + 2], + "viewFormats": wgpuReadArrayOfWgpuObjects(HEAPU32[config + 4], HEAPU32[config + 3]), + "colorSpace": HTMLPredefinedColorSpaces[HEAPU32[config + 6]], + "toneMapping": { + "mode": [, "standard", "extended"][HEAPU32[config + 7]] + }, + "alphaMode": [, "opaque", "premultiplied"][HEAPU32[config + 8]] + }; + wgpu[canvasContext]["configure"](desc) + } + function _wgpu_object_destroy(object) { + let o = wgpu[object]; + if (o) { + o.wid = 0; + if (o["destroy"]) + o["destroy"](); + if (o.derivedObjects) + Object.keys(o.derivedObjects).forEach(_wgpu_object_destroy); + if (o.parentObject) + delete o.parentObject.derivedObjects[object]; + delete wgpu[object] + } + } + function wgpuLinkParentAndChild(parent, childId, child) { + child.parentObject = parent; + if (!parent.derivedObjects) + parent.derivedObjects = {}; + parent.derivedObjects[childId] = child + } + function _wgpu_canvas_context_get_current_texture(canvasContext) { + canvasContext = wgpu[canvasContext]; + var canvasTexture = canvasContext["getCurrentTexture"](); + if (canvasTexture != wgpu[1]) { + _wgpu_object_destroy(1); + wgpu[1] = canvasTexture; + canvasTexture.wid = 1; + wgpuLinkParentAndChild(canvasContext, 1, canvasTexture) + } + return 1 + } + function _wgpu_canvas_get_webgpu_context(canvasSelector) { + let canvas = document.querySelector(utf8(canvasSelector)); + let ctx = canvas.getContext("webgpu"); + if (ctx.wid) + return ctx.wid; + return wgpuStore(ctx) + } + function wgpuReadTimestampWrites(timestampWritesIndex) { + let querySet = HEAPU32[timestampWritesIndex]; + if (querySet) { + let timestampWrites = { + "querySet": wgpu[querySet] + }, i; + if ((i = HEAP32[timestampWritesIndex + 1]) >= 0) + timestampWrites["beginningOfPassWriteIndex"] = i; + if ((i = HEAP32[timestampWritesIndex + 2]) >= 0) + timestampWrites["endOfPassWriteIndex"] = i; + return timestampWrites + } + } + function _wgpu_command_encoder_begin_compute_pass(commandEncoder, descriptor) { + commandEncoder = wgpu[commandEncoder]; + descriptor >>= 2; + let desc = descriptor ? { + "timestampWrites": wgpuReadTimestampWrites(descriptor) + } : void 0; + return wgpuStore(commandEncoder["beginComputePass"](desc)) + } + var GPULoadOps = [, "load", "clear"]; + var GPUStoreOps = [, "store", "discard"]; + function wgpuReadRenderPassDepthStencilAttachment(heap32Idx) { + return HEAPU32[heap32Idx] ? { + "view": wgpu[HEAPU32[heap32Idx]], + "depthLoadOp": GPULoadOps[HEAPU32[heap32Idx + 1]], + "depthClearValue": HEAPF32[heap32Idx + 2], + "depthStoreOp": GPUStoreOps[HEAPU32[heap32Idx + 3]], + "depthReadOnly": !!HEAPU32[heap32Idx + 4], + "stencilLoadOp": GPULoadOps[HEAPU32[heap32Idx + 5]], + "stencilClearValue": HEAPU32[heap32Idx + 6], + "stencilStoreOp": GPUStoreOps[HEAPU32[heap32Idx + 7]], + "stencilReadOnly": !!HEAPU32[heap32Idx + 8] + } : void 0 + } + function _wgpu_command_encoder_begin_render_pass(commandEncoder, descriptor) { + descriptor >>= 2; + let colorAttachments = [] + , numColorAttachments = HEAP32[descriptor + 4] + , colorAttachmentsIdx = HEAPU32[descriptor + 2] >> 2 + , colorAttachmentsIdxDbl = colorAttachmentsIdx + 6 >> 1 + , maxDrawCount = HEAPF64[descriptor >> 1] + , depthStencilAttachment = HEAPU32[descriptor + 5]; + while (numColorAttachments--) { + colorAttachments.push(HEAPU32[colorAttachmentsIdx] ? { + "view": wgpu[HEAPU32[colorAttachmentsIdx]], + "depthSlice": HEAP32[colorAttachmentsIdx + 1] < 0 ? void 0 : HEAP32[colorAttachmentsIdx + 1], + "resolveTarget": wgpu[HEAPU32[colorAttachmentsIdx + 2]], + "storeOp": GPUStoreOps[HEAPU32[colorAttachmentsIdx + 3]], + "loadOp": GPULoadOps[HEAPU32[colorAttachmentsIdx + 4]], + "clearValue": [HEAPF64[colorAttachmentsIdxDbl], HEAPF64[colorAttachmentsIdxDbl + 1], HEAPF64[colorAttachmentsIdxDbl + 2], HEAPF64[colorAttachmentsIdxDbl + 3]] + } : null); + colorAttachmentsIdx += 14; + colorAttachmentsIdxDbl += 7 + } + let desc = { + "colorAttachments": colorAttachments, + "depthStencilAttachment": wgpuReadRenderPassDepthStencilAttachment(descriptor + 5), + "occlusionQuerySet": wgpu[HEAPU32[descriptor + 14]], + "maxDrawCount": maxDrawCount || void 0, + "timestampWrites": wgpuReadTimestampWrites(descriptor + 15) + }; + return wgpuStore(wgpu[commandEncoder]["beginRenderPass"](desc)) + } + function _wgpu_command_encoder_copy_buffer_to_buffer(commandEncoder, source, sourceOffset, destination, destinationOffset, size) { + wgpu[commandEncoder]["copyBufferToBuffer"](wgpu[source], sourceOffset, wgpu[destination], destinationOffset, size) + } + var GPUTextureAspects = wgpuDecodeStrings("all stencilA depthA", "-only"); + function wgpuReadGpuImageCopyTexture(ptr) { + ptr >>= 2; + return { + "texture": wgpu[HEAPU32[ptr]], + "mipLevel": HEAP32[ptr + 1], + "origin": [HEAP32[ptr + 2], HEAP32[ptr + 3], HEAP32[ptr + 4]], + "aspect": GPUTextureAspects[HEAPU32[ptr + 5]] + } + } + function wgpuReadGpuImageCopyBuffer(ptr) { + ptr >>= 2; + return { + "offset": wgpuReadI53FromU64HeapIdx(ptr), + "bytesPerRow": HEAP32[ptr + 2], + "rowsPerImage": HEAP32[ptr + 3], + "buffer": wgpu[HEAPU32[ptr + 4]] + } + } + function _wgpu_command_encoder_copy_texture_to_buffer(commandEncoder, source, destination, copyWidth, copyHeight, copyDepthOrArrayLayers) { + wgpu[commandEncoder]["copyTextureToBuffer"](wgpuReadGpuImageCopyTexture(source), wgpuReadGpuImageCopyBuffer(destination), [copyWidth, copyHeight, copyDepthOrArrayLayers]) + } + function _wgpu_command_encoder_copy_texture_to_texture(commandEncoder, source, destination, copyWidth, copyHeight, copyDepthOrArrayLayers) { + wgpu[commandEncoder]["copyTextureToTexture"](wgpuReadGpuImageCopyTexture(source), wgpuReadGpuImageCopyTexture(destination), [copyWidth, copyHeight, copyDepthOrArrayLayers]) + } + function _wgpu_compute_pass_encoder_dispatch_workgroups(encoder, workgroupCountX, workgroupCountY, workgroupCountZ) { + wgpu[encoder]["dispatchWorkgroups"](workgroupCountX, workgroupCountY, workgroupCountZ) + } + function _wgpu_compute_pass_encoder_dispatch_workgroups_indirect(encoder, indirectBuffer, indirectOffset) { + wgpu[encoder]["dispatchWorkgroupsIndirect"](wgpu[indirectBuffer], indirectOffset) + } + function wgpuStoreAndSetParent(object, parent) { + if (object) { + var objectId = wgpuStore(object); + wgpuLinkParentAndChild(parent, objectId, object); + return objectId + } + } + function _wgpu_device_create_bind_group(device, layout, entries, numEntries) { + device = wgpu[device]; + entries >>= 2; + let e = []; + while (numEntries--) { + let resource = wgpu[HEAPU32[entries + 1]]; + e.push({ + "binding": HEAPU32[entries], + "resource": resource.isBuffer ? { + "buffer": resource, + "offset": wgpuReadI53FromU64HeapIdx(entries + 2), + "size": wgpuReadI53FromU64HeapIdx(entries + 4) || void 0 + } : resource + }); + entries += 6 + } + let desc = { + "layout": wgpu[layout], + "entries": e + }; + return wgpuStoreAndSetParent(device["createBindGroup"](desc), device) + } + var GPUBufferBindingTypes = wgpuDecodeStrings("uniform A read-only-A", "storage"); + var GPUSamplerBindingTypes = wgpuDecodeStrings("Anon-Acomparison", "filtering "); + var GPUTextureSampleTypes = wgpuDecodeStrings("Aunfilterable-Adepth sint uint", "float "); + var GPUTextureViewDimensions = wgpuDecodeStrings("1B 2dCA AC3d", "-array |d 2d|cube"); + var GPUStorageTextureSampleTypes = wgpuDecodeStrings("A-BBA", "only read-|write"); + function wgpuReadBindGroupLayoutDescriptor(entries, numEntries) { + entries >>= 2; + let e = []; + while (numEntries--) { + let entry = { + "binding": HEAPU32[entries], + "visibility": HEAPU32[entries + 1] + } + , type = HEAPU32[entries + 2]; + entries += 4; + if (type == 1) { + entry["buffer"] = { + "type": GPUBufferBindingTypes[HEAPU32[entries]], + "hasDynamicOffset": !!HEAPU32[entries + 1], + "minBindingSize": wgpuReadI53FromU64HeapIdx(entries + 2) + } + } else if (type == 2) { + entry["sampler"] = { + "type": GPUSamplerBindingTypes[HEAPU32[entries]] + } + } else if (type == 3) { + entry["texture"] = { + "sampleType": GPUTextureSampleTypes[HEAPU32[entries]], + "viewDimension": GPUTextureViewDimensions[HEAPU32[entries + 1]], + "multisampled": !!HEAPU32[entries + 2] + } + } else if (type == 4) { + entry["storageTexture"] = { + "access": GPUStorageTextureSampleTypes[HEAPU32[entries]], + "format": GPUTextureAndVertexFormats[HEAPU32[entries + 1]], + "viewDimension": GPUTextureViewDimensions[HEAPU32[entries + 2]] + } + } else { + entry["externalTexture"] = {} + } + entries += 4; + e.push(entry) + } + return { + "entries": e + } + } + function _wgpu_device_create_bind_group_layout(device, entries, numEntries) { + device = wgpu[device]; + let desc = wgpuReadBindGroupLayoutDescriptor(entries, numEntries); + return wgpuStoreAndSetParent(device["createBindGroupLayout"](desc), device) + } + function _wgpu_device_create_buffer(device, descriptor) { + device = wgpu[device]; + descriptor >>= 2; + let desc = { + "size": wgpuReadI53FromU64HeapIdx(descriptor), + "usage": HEAPU32[descriptor + 2], + "mappedAtCreation": !!HEAPU32[descriptor + 3] + }; + let buffer = device["createBuffer"](desc); + buffer.mappedRanges = {}; + buffer.isBuffer = 1; + return wgpuStoreAndSetParent(buffer, device) + } + function _wgpu_device_create_command_encoder(device, descriptor) { + let desc = void 0; + return wgpuStoreAndSetParent(wgpu[device]["createCommandEncoder"](desc), wgpu[device]) + } + function _wgpu_device_create_command_encoder_simple(device) { + return wgpuStoreAndSetParent(wgpu[device]["createCommandEncoder"](), wgpu[device]) + } + function wgpuReadConstants(constants, numConstants) { + let c = {}; + while (numConstants--) { + c[utf8(HEAPU32[constants + 3 >> 2])] = HEAPF64[constants + 8 >> 3]; + constants += 16 + } + return c + } + var GPUAutoLayoutMode = "auto"; + function _wgpu_device_create_compute_pipeline(device, computeModule, entryPoint, layout, constants, numConstants) { + device = wgpu[device]; + let desc = { + "layout": layout > 1 ? wgpu[layout] : GPUAutoLayoutMode, + "compute": { + "module": wgpu[computeModule], + "entryPoint": utf8(entryPoint) || void 0, + "constants": wgpuReadConstants(constants, numConstants) + } + }; + return wgpuStoreAndSetParent(device["createComputePipeline"](desc), device) + } + function _wgpu_device_create_pipeline_layout(device, layouts, numLayouts) { + device = wgpu[device]; + let desc = { + "bindGroupLayouts": wgpuReadArrayOfWgpuObjects(layouts, numLayouts) + }; + return wgpuStoreAndSetParent(device["createPipelineLayout"](desc), device) + } + var GPUCompareFunctions = wgpuDecodeStrings("neverA equalACB notCBCalways", "-equal |greater| less"); + var GPUStencilOperations = wgpuDecodeStrings("keep zero replace invert inCBdeCBinCA deCA", "crement-|clamp |wrap"); + function wgpuReadGpuStencilFaceState(idx) { + return { + "compare": GPUCompareFunctions[HEAPU32[idx]], + "failOp": GPUStencilOperations[HEAPU32[idx + 1]], + "depthFailOp": GPUStencilOperations[HEAPU32[idx + 2]], + "passOp": GPUStencilOperations[HEAPU32[idx + 3]] + } + } + var GPUBlendOperations = wgpuDecodeStrings("add Areverse-Amin max", "subtract "); + var GPUBlendFactors = wgpuDecodeStrings("zero one CFC CEFCE AFA AEFAE CE-saturated BFB DFD DEFDE", " one-minus-|-alpha|src1|src|constant|dst"); + function wgpuReadGpuBlendComponent(idx) { + return { + "operation": GPUBlendOperations[HEAPU32[idx]], + "srcFactor": GPUBlendFactors[HEAPU32[idx + 1]], + "dstFactor": GPUBlendFactors[HEAPU32[idx + 2]] + } + } + var GPUIndexFormats = wgpuDecodeStrings("A16 A32", "uint"); + var GPUPrimitiveTopologys = wgpuDecodeStrings("pointDADAB CDCB", "-list |triangle|-strip|line"); + function wgpuReadRenderPipelineDescriptor(descriptor) { + descriptor >>= 2; + let vertexBuffers = [], targets = [], vertexIdx = descriptor, numVertexBuffers = HEAP32[vertexIdx + 7], vertexBuffersIdx = HEAPU32[vertexIdx + 2] >> 2, primitiveIdx = vertexIdx + 10, depthStencilIdx = primitiveIdx + 5, multisampleIdx = depthStencilIdx + 17, fragmentIdx = multisampleIdx + 4, numTargets = HEAP32[fragmentIdx + 7], targetsIdx = HEAPU32[fragmentIdx + 2] >> 2, depthStencilFormat = HEAPU32[depthStencilIdx], multisampleCount = HEAPU32[multisampleIdx], fragmentModule = HEAPU32[fragmentIdx + 6], pipelineLayoutId = HEAPU32[fragmentIdx + 10], desc; + while (numVertexBuffers--) { + let attributes = [] + , numAttributes = HEAP32[vertexBuffersIdx + 2] + , attributesIdx = HEAPU32[vertexBuffersIdx] >> 2; + while (numAttributes--) { + attributes.push({ + "offset": wgpuReadI53FromU64HeapIdx(attributesIdx), + "shaderLocation": HEAPU32[attributesIdx + 2], + "format": GPUTextureAndVertexFormats[HEAPU32[attributesIdx + 3]] + }); + attributesIdx += 4 + } + vertexBuffers.push({ + "arrayStride": wgpuReadI53FromU64HeapIdx(vertexBuffersIdx + 4), + "stepMode": [, "vertex", "instance"][HEAPU32[vertexBuffersIdx + 3]], + "attributes": attributes + }); + vertexBuffersIdx += 6 + } + while (numTargets--) { + targets.push(HEAPU32[targetsIdx] ? { + "format": GPUTextureAndVertexFormats[HEAPU32[targetsIdx]], + "blend": HEAPU32[targetsIdx + 1] ? { + "color": wgpuReadGpuBlendComponent(targetsIdx + 1), + "alpha": wgpuReadGpuBlendComponent(targetsIdx + 4) + } : void 0, + "writeMask": HEAPU32[targetsIdx + 7] + } : null); + targetsIdx += 8 + } + desc = { + "vertex": { + "module": wgpu[HEAPU32[vertexIdx + 6]], + "entryPoint": utf8(HEAPU32[vertexIdx]) || void 0, + "buffers": vertexBuffers, + "constants": wgpuReadConstants(HEAPU32[vertexIdx + 4], HEAP32[vertexIdx + 8]) + }, + "fragment": fragmentModule ? { + "module": wgpu[fragmentModule], + "entryPoint": utf8(HEAPU32[fragmentIdx]) || void 0, + "targets": targets, + "constants": wgpuReadConstants(HEAPU32[fragmentIdx + 4], HEAP32[fragmentIdx + 8]) + } : void 0, + "primitive": { + "topology": GPUPrimitiveTopologys[HEAPU32[primitiveIdx]], + "stripIndexFormat": GPUIndexFormats[HEAPU32[primitiveIdx + 1]], + "frontFace": [, "ccw", "cw"][HEAPU32[primitiveIdx + 2]], + "cullMode": [, "none", "front", "back"][HEAPU32[primitiveIdx + 3]], + "unclippedDepth": !!HEAPU32[primitiveIdx + 4] + }, + "depthStencil": depthStencilFormat ? { + "format": GPUTextureAndVertexFormats[depthStencilFormat], + "depthWriteEnabled": !!HEAPU32[depthStencilIdx + 1], + "depthCompare": GPUCompareFunctions[HEAPU32[depthStencilIdx + 2]], + "stencilReadMask": HEAPU32[depthStencilIdx + 3], + "stencilWriteMask": HEAPU32[depthStencilIdx + 4], + "depthBias": HEAP32[depthStencilIdx + 5], + "depthBiasSlopeScale": HEAPF32[depthStencilIdx + 6], + "depthBiasClamp": HEAPF32[depthStencilIdx + 7], + "stencilFront": wgpuReadGpuStencilFaceState(depthStencilIdx + 8), + "stencilBack": wgpuReadGpuStencilFaceState(depthStencilIdx + 12), + "clampDepth": !!HEAPU32[depthStencilIdx + 16] + } : void 0, + "multisample": multisampleCount ? { + "count": multisampleCount, + "mask": HEAPU32[multisampleIdx + 1], + "alphaToCoverageEnabled": !!HEAPU32[multisampleIdx + 2] + } : void 0, + "layout": pipelineLayoutId > 1 ? wgpu[pipelineLayoutId] : GPUAutoLayoutMode + }; + return desc + } + function _wgpu_device_create_render_pipeline(device, descriptor) { + let desc = wgpuReadRenderPipelineDescriptor(descriptor); + return wgpuStoreAndSetParent(wgpu[device]["createRenderPipeline"](desc), wgpu[device]) + } + var GPUAddressModes = wgpuDecodeStrings("clamp-to-edge A mirror-A", "repeat"); + var GPUFilterModes = wgpuDecodeStrings("Aest liA", "near"); + var GPUMipmapFilterModes = wgpuDecodeStrings("Aest liA", "near"); + function _wgpu_device_create_sampler(device, descriptor) { + device = wgpu[device]; + descriptor >>= 2; + let desc = descriptor ? { + "addressModeU": GPUAddressModes[HEAPU32[descriptor]], + "addressModeV": GPUAddressModes[HEAPU32[descriptor + 1]], + "addressModeW": GPUAddressModes[HEAPU32[descriptor + 2]], + "magFilter": GPUFilterModes[HEAPU32[descriptor + 3]], + "minFilter": GPUFilterModes[HEAPU32[descriptor + 4]], + "mipmapFilter": GPUMipmapFilterModes[HEAPU32[descriptor + 5]], + "lodMinClamp": HEAPF32[descriptor + 6], + "lodMaxClamp": HEAPF32[descriptor + 7], + "compare": GPUCompareFunctions[HEAPU32[descriptor + 8]], + "maxAnisotropy": HEAPU32[descriptor + 9] + } : void 0; + return wgpuStoreAndSetParent(device["createSampler"](desc), device) + } + function wgpuReadShaderModuleCompilationHints(index) { + let numHints = HEAP32[index + 2], hints = [], hintsIndex = HEAPU32[index] >> 2, layout; + while (numHints--) { + layout = HEAPU32[hintsIndex + 2]; + hints.push({ + "entryPoint": utf8(HEAPU32[hintsIndex]), + "layout": layout > 1 ? wgpu[layout] : layout ? GPUAutoLayoutMode : null + }); + hintsIndex += 4 + } + return hints + } + function wgpuReadShaderModuleDescriptor(descriptor) { + descriptor >>= 2; + return { + "code": utf8(HEAPU32[descriptor]), + "compilationHints": wgpuReadShaderModuleCompilationHints(descriptor + 2) + } + } + function _wgpu_device_create_shader_module(device, descriptor) { + let desc = wgpuReadShaderModuleDescriptor(descriptor); + return wgpuStoreAndSetParent(wgpu[device]["createShaderModule"](desc), wgpu[device]) + } + function _wgpu_device_create_texture(device, descriptor) { + device = wgpu[device]; + descriptor >>= 2; + let desc = { + "viewFormats": wgpuReadArrayOfWgpuObjects(HEAPU32[descriptor], HEAPU32[descriptor + 2]), + "size": [HEAP32[descriptor + 3], HEAP32[descriptor + 4], HEAP32[descriptor + 5]], + "mipLevelCount": HEAP32[descriptor + 6], + "sampleCount": HEAP32[descriptor + 7], + "dimension": HEAPU32[descriptor + 8] + "d", + "format": GPUTextureAndVertexFormats[HEAPU32[descriptor + 9]], + "usage": HEAPU32[descriptor + 10] + }; + let texture = device["createTexture"](desc); + return wgpuStoreAndSetParent(texture, device) + } + function _wgpu_device_get_queue(device) { + return wgpu[device]["queue"].wid + } + function _wgpuReportErrorCodeAndMessage(device, callback, errorCode, stringMessage, userData) { + if (stringMessage) { + var stackTop = stackSave() + , len = lengthBytesUTF8(stringMessage) + 1 + , errorMessage = stackAlloc(len); + stringToUTF8(stringMessage, errorMessage, len) + } + ( (a1, a2, a3, a4) => dynCall_viiii.apply(null, [callback, a1, a2, a3, a4]))(device, errorCode, errorMessage, userData); + if (stackTop) + stackRestore(stackTop) + } + function _wgpuErrorObjectToErrorType(error) { + return error ? error instanceof GPUInternalError ? 3 : error instanceof GPUValidationError ? 2 : error instanceof GPUOutOfMemoryError ? 1 : 3 : 0 + } + function _wgpuDispatchWebGpuErrorEvent(device, callback, error, userData) { + _wgpuReportErrorCodeAndMessage(device, callback, _wgpuErrorObjectToErrorType(error), error && error["message"], userData) + } + function _wgpu_device_pop_error_scope_async(device, callback, userData) { + function dispatchErrorCallback(error) { + _wgpuDispatchWebGpuErrorEvent(device, callback, error, userData) + } + wgpu[device]["popErrorScope"]().then(_wgpuMuteJsExceptions(dispatchErrorCallback)).catch(dispatchErrorCallback) + } + function _wgpu_device_push_error_scope(device, filter) { + wgpu[device]["pushErrorScope"]([, "out-of-memory", "validation", "internal"][filter]) + } + function _wgpu_device_set_uncapturederror_callback(device, callback, userData) { + wgpu[device]["onuncapturederror"] = callback ? function(uncapturedError) { + _wgpuDispatchWebGpuErrorEvent(device, callback, uncapturedError["error"], userData) + } + : null + } + function _wgpu_encoder_end(encoder) { + wgpu[encoder]["end"](); + _wgpu_object_destroy(encoder) + } + function _wgpu_encoder_finish(encoder) { + let cmdBuffer = wgpu[encoder]["finish"](); + _wgpu_object_destroy(encoder); + return wgpuStore(cmdBuffer) + } + function _wgpu_encoder_pop_debug_group(encoder) { + wgpu[encoder]["popDebugGroup"]() + } + function _wgpu_encoder_push_debug_group(encoder, groupLabel) { + wgpu[encoder]["pushDebugGroup"](utf8(groupLabel)) + } + function _wgpu_encoder_set_bind_group(encoder, index, bindGroup, dynamicOffsets, numDynamicOffsets) { + wgpu[encoder]["setBindGroup"](index, wgpu[bindGroup], HEAPU32, dynamicOffsets >> 2, numDynamicOffsets) + } + function _wgpu_encoder_set_pipeline(encoder, pipeline) { + wgpu[encoder]["setPipeline"](wgpu[pipeline]) + } + function _wgpu_is_valid_object(o) { + return !!wgpu[o] + } + function _wgpu_object_set_label(o, label) { + wgpu[o]["label"] = utf8(label) + } + function _wgpu_pipeline_get_bind_group_layout(pipelineBase, index) { + return wgpuStore(wgpu[pipelineBase]["getBindGroupLayout"](index)) + } + function _wgpu_queue_submit_multiple_and_destroy(queue, commandBuffers, numCommandBuffers) { + wgpu[queue]["submit"](wgpuReadArrayOfWgpuObjects(commandBuffers, numCommandBuffers)); + commandBuffers >>= 2; + while (numCommandBuffers--) + _wgpu_object_destroy(HEAPU32[commandBuffers++]) + } + function _wgpu_queue_submit_one_and_destroy(queue, commandBuffer) { + wgpu[queue]["submit"]([wgpu[commandBuffer]]); + _wgpu_object_destroy(commandBuffer) + } + function _wgpu_queue_write_buffer(queue, buffer, bufferOffset, data, size) { + wgpu[queue]["writeBuffer"](wgpu[buffer], bufferOffset, HEAPU8, data, size) + } + function _wgpu_queue_write_texture(queue, destination, data, bytesPerBlockRow, blockRowsPerImage, writeWidth, writeHeight, writeDepthOrArrayLayers) { + wgpu[queue]["writeTexture"](wgpuReadGpuImageCopyTexture(destination), HEAPU8, { + "offset": data, + "bytesPerRow": bytesPerBlockRow, + "rowsPerImage": blockRowsPerImage + }, [writeWidth, writeHeight, writeDepthOrArrayLayers]) + } + function _wgpu_render_commands_mixin_draw(passEncoder, vertexCount, instanceCount, firstVertex, firstInstance) { + wgpu[passEncoder]["draw"](vertexCount, instanceCount, firstVertex, firstInstance) + } + function _wgpu_render_commands_mixin_draw_indexed(passEncoder, indexCount, instanceCount, firstVertex, baseVertex, firstInstance) { + wgpu[passEncoder]["drawIndexed"](indexCount, instanceCount, firstVertex, baseVertex, firstInstance) + } + function _wgpu_render_commands_mixin_draw_indexed_indirect(passEncoder, indirectBuffer, indirectOffset) { + wgpu[passEncoder]["drawIndexedIndirect"](wgpu[indirectBuffer], indirectOffset) + } + function _wgpu_render_commands_mixin_draw_indirect(passEncoder, indirectBuffer, indirectOffset) { + wgpu[passEncoder]["drawIndirect"](wgpu[indirectBuffer], indirectOffset) + } + function _wgpu_render_commands_mixin_set_index_buffer(passEncoder, buffer, indexFormat, offset, size) { + wgpu[passEncoder]["setIndexBuffer"](wgpu[buffer], GPUIndexFormats[indexFormat], offset, size < 0 ? void 0 : size) + } + function _wgpu_render_commands_mixin_set_vertex_buffer(passEncoder, slot, buffer, offset, size) { + wgpu[passEncoder]["setVertexBuffer"](slot, wgpu[buffer], offset, size < 0 ? void 0 : size) + } + function _wgpu_render_pass_encoder_set_scissor_rect(encoder, x, y, width, height) { + wgpu[encoder]["setScissorRect"](x, y, width, height) + } + function _wgpu_render_pass_encoder_set_stencil_reference(encoder, stencilValue) { + wgpu[encoder]["setStencilReference"](stencilValue) + } + function _wgpu_render_pass_encoder_set_viewport(encoder, x, y, width, height, minDepth, maxDepth) { + wgpu[encoder]["setViewport"](x, y, width, height, minDepth, maxDepth) + } + function _wgpu_texture_create_view(texture, descriptor) { + descriptor >>= 2; + let desc = descriptor ? { + "format": GPUTextureAndVertexFormats[HEAPU32[descriptor]], + "dimension": GPUTextureViewDimensions[HEAPU32[descriptor + 1]], + "usage": HEAPU32[descriptor + 2], + "aspect": GPUTextureAspects[HEAPU32[descriptor + 3]], + "baseMipLevel": HEAP32[descriptor + 4], + "mipLevelCount": HEAP32[descriptor + 5], + "baseArrayLayer": HEAP32[descriptor + 6], + "arrayLayerCount": HEAP32[descriptor + 7] + } : void 0; + return wgpuStoreAndSetParent(wgpu[texture]["createView"](desc), wgpu[texture]) + } + function _wgpu_texture_create_view_simple(texture) { + return wgpuStoreAndSetParent(wgpu[texture]["createView"](), wgpu[texture]) + } + function getCFunc(ident) { + var func = Module["_" + ident]; + return func + } + function ccall(ident, returnType, argTypes, args, opts) { + var toC = { + "string": str => { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { + ret = stringToUTF8OnStack(str) + } + return ret + } + , + "array": arr => { + var ret = stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret + } + }; + function convertReturnValue(ret) { + if (returnType === "string") { + return UTF8ToString(ret) + } + if (returnType === "boolean") + return Boolean(ret); + return ret + } + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) + stack = stackSave(); + cArgs[i] = converter(args[i]) + } else { + cArgs[i] = args[i] + } + } + } + var ret = func.apply(null, cArgs); + function onDone(ret) { + if (stack !== 0) + stackRestore(stack); + return convertReturnValue(ret) + } + ret = onDone(ret); + return ret + } + function cwrap(ident, returnType, argTypes, opts) { + var numericArgs = !argTypes || argTypes.every(type => type === "number" || type === "boolean"); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident) + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts) + } + } + function demangle(func) { + return func + } + function demangleAll(text) { + var regex = /\b_Z[\w\d_]+/g; + return text.replace(regex, function(x) { + var y = demangle(x); + return x === y ? x : y + " [" + x + "]" + }) + } + function stackTrace() { + var js = jsStackTrace(); + if (Module["extraStackTrace"]) + js += "\n" + Module["extraStackTrace"](); + return demangleAll(js) + } + Module["requestFullscreen"] = function Module_requestFullscreen(lockPointer, resizeCanvas) { + Browser.requestFullscreen(lockPointer, resizeCanvas) + } + ; + Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { + Browser.requestAnimationFrame(func) + } + ; + Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { + Browser.setCanvasSize(width, height, noUpdates) + } + ; + Module["pauseMainLoop"] = function Module_pauseMainLoop() { + Browser.mainLoop.pause() + } + ; + Module["resumeMainLoop"] = function Module_resumeMainLoop() { + Browser.mainLoop.resume() + } + ; + Module["getUserMedia"] = function Module_getUserMedia() { + Browser.getUserMedia() + } + ; + Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { + return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) + } + ; + var preloadedImages = {}; + var preloadedAudios = {}; + var FSNode = function(parent, name, mode, rdev) { + if (!parent) { + parent = this + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev + }; + var readMode = 292 | 73; + var writeMode = 146; + Object.defineProperties(FSNode.prototype, { + read: { + get: function() { + return (this.mode & readMode) === readMode + }, + set: function(val) { + val ? this.mode |= readMode : this.mode &= ~readMode + } + }, + write: { + get: function() { + return (this.mode & writeMode) === writeMode + }, + set: function(val) { + val ? this.mode |= writeMode : this.mode &= ~writeMode + } + }, + isFolder: { + get: function() { + return FS.isDir(this.mode) + } + }, + isDevice: { + get: function() { + return FS.isChrdev(this.mode) + } + } + }); + FS.FSNode = FSNode; + FS.createPreloadedFile = FS_createPreloadedFile; + FS.staticInit(); + Module["FS_createPath"] = FS.createPath; + Module["FS_createDataFile"] = FS.createDataFile; + var GLctx; + for (var i = 0; i < 32; ++i) + tempFixedLengthArray.push(new Array(i)); + var miniTempWebGLFloatBuffersStorage = new Float32Array(288); + for (var i = 0; i < 288; ++i) { + miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i + 1) + } + var miniTempWebGLIntBuffersStorage = new Int32Array(288); + for (var i = 0; i < 288; ++i) { + miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i + 1) + } + var miniTempWebGLUIntBuffersStorage = new Uint32Array(288); + for (var i = 0; i < 288; ++i) { + miniTempWebGLUIntBuffers[i] = miniTempWebGLUIntBuffersStorage.subarray(0, i + 1) + } + var wasmImports = { + "GetJSLoadTimeInfo": _GetJSLoadTimeInfo, + "GetJSMemoryInfo": _GetJSMemoryInfo, + "JS_Accelerometer_IsRunning": _JS_Accelerometer_IsRunning, + "JS_Accelerometer_Start": _JS_Accelerometer_Start, + "JS_Accelerometer_Stop": _JS_Accelerometer_Stop, + "JS_CallAsLongAsNoExceptionsSeen": _JS_CallAsLongAsNoExceptionsSeen, + "JS_Cursor_SetImage": _JS_Cursor_SetImage, + "JS_Cursor_SetShow": _JS_Cursor_SetShow, + "JS_DOM_MapViewportCoordinateToElementLocalCoordinate": _JS_DOM_MapViewportCoordinateToElementLocalCoordinate, + "JS_DOM_UnityCanvasSelector": _JS_DOM_UnityCanvasSelector, + "JS_Eval_EvalJS": _JS_Eval_EvalJS, + "JS_Eval_OpenURL": _JS_Eval_OpenURL, + "JS_FileSystem_Initialize": _JS_FileSystem_Initialize, + "JS_FileSystem_Sync": _JS_FileSystem_Sync, + "JS_GetRandomBytes": _JS_GetRandomBytes, + "JS_Get_WASM_Size": _JS_Get_WASM_Size, + "JS_GravitySensor_IsRunning": _JS_GravitySensor_IsRunning, + "JS_GravitySensor_Start": _JS_GravitySensor_Start, + "JS_GravitySensor_Stop": _JS_GravitySensor_Stop, + "JS_Gyroscope_IsRunning": _JS_Gyroscope_IsRunning, + "JS_Gyroscope_Start": _JS_Gyroscope_Start, + "JS_Gyroscope_Stop": _JS_Gyroscope_Stop, + "JS_Init_ContextMenuHandler": _JS_Init_ContextMenuHandler, + "JS_Init_CopyPaste": _JS_Init_CopyPaste, + "JS_LinearAccelerationSensor_IsRunning": _JS_LinearAccelerationSensor_IsRunning, + "JS_LinearAccelerationSensor_Start": _JS_LinearAccelerationSensor_Start, + "JS_LinearAccelerationSensor_Stop": _JS_LinearAccelerationSensor_Stop, + "JS_Log_Dump": _JS_Log_Dump, + "JS_Log_StackTrace": _JS_Log_StackTrace, + "JS_MobileKeybard_GetIgnoreBlurEvent": _JS_MobileKeybard_GetIgnoreBlurEvent, + "JS_MobileKeyboard_GetKeyboardStatus": _JS_MobileKeyboard_GetKeyboardStatus, + "JS_MobileKeyboard_GetText": _JS_MobileKeyboard_GetText, + "JS_MobileKeyboard_GetTextSelection": _JS_MobileKeyboard_GetTextSelection, + "JS_MobileKeyboard_Hide": _JS_MobileKeyboard_Hide, + "JS_MobileKeyboard_SetCharacterLimit": _JS_MobileKeyboard_SetCharacterLimit, + "JS_MobileKeyboard_SetText": _JS_MobileKeyboard_SetText, + "JS_MobileKeyboard_SetTextSelection": _JS_MobileKeyboard_SetTextSelection, + "JS_MobileKeyboard_Show": _JS_MobileKeyboard_Show, + "JS_Module_WebGLContextAttributes_PowerPreference": _JS_Module_WebGLContextAttributes_PowerPreference, + "JS_Module_WebGLContextAttributes_PremultipliedAlpha": _JS_Module_WebGLContextAttributes_PremultipliedAlpha, + "JS_Module_WebGLContextAttributes_PreserveDrawingBuffer": _JS_Module_WebGLContextAttributes_PreserveDrawingBuffer, + "JS_OrientationSensor_IsRunning": _JS_OrientationSensor_IsRunning, + "JS_OrientationSensor_Start": _JS_OrientationSensor_Start, + "JS_OrientationSensor_Stop": _JS_OrientationSensor_Stop, + "JS_RequestDeviceSensorPermissionsOnTouch": _JS_RequestDeviceSensorPermissionsOnTouch, + "JS_RunQuitCallbacks": _JS_RunQuitCallbacks, + "JS_ScreenOrientation_DeInit": _JS_ScreenOrientation_DeInit, + "JS_ScreenOrientation_Init": _JS_ScreenOrientation_Init, + "JS_ScreenOrientation_Lock": _JS_ScreenOrientation_Lock, + "JS_SetMainLoop": _JS_SetMainLoop, + "JS_Sound_Create_Channel": _JS_Sound_Create_Channel, + "JS_Sound_GetAudioBufferSampleRate": _JS_Sound_GetAudioBufferSampleRate, + "JS_Sound_GetAudioContextSampleRate": _JS_Sound_GetAudioContextSampleRate, + "JS_Sound_GetLength": _JS_Sound_GetLength, + "JS_Sound_GetLoadState": _JS_Sound_GetLoadState, + "JS_Sound_Init": _JS_Sound_Init, + "JS_Sound_Load": _JS_Sound_Load, + "JS_Sound_Load_PCM": _JS_Sound_Load_PCM, + "JS_Sound_Play": _JS_Sound_Play, + "JS_Sound_ReleaseInstance": _JS_Sound_ReleaseInstance, + "JS_Sound_ResumeIfNeeded": _JS_Sound_ResumeIfNeeded, + "JS_Sound_Set3D": _JS_Sound_Set3D, + "JS_Sound_SetListenerOrientation": _JS_Sound_SetListenerOrientation, + "JS_Sound_SetListenerPosition": _JS_Sound_SetListenerPosition, + "JS_Sound_SetLoop": _JS_Sound_SetLoop, + "JS_Sound_SetLoopPoints": _JS_Sound_SetLoopPoints, + "JS_Sound_SetPaused": _JS_Sound_SetPaused, + "JS_Sound_SetPitch": _JS_Sound_SetPitch, + "JS_Sound_SetPosition": _JS_Sound_SetPosition, + "JS_Sound_SetVolume": _JS_Sound_SetVolume, + "JS_Sound_Stop": _JS_Sound_Stop, + "JS_SystemInfo_GetBrowserName": _JS_SystemInfo_GetBrowserName, + "JS_SystemInfo_GetBrowserVersionString": _JS_SystemInfo_GetBrowserVersionString, + "JS_SystemInfo_GetCanvasClientSize": _JS_SystemInfo_GetCanvasClientSize, + "JS_SystemInfo_GetDocumentURL": _JS_SystemInfo_GetDocumentURL, + "JS_SystemInfo_GetGPUInfo": _JS_SystemInfo_GetGPUInfo, + "JS_SystemInfo_GetLanguage": _JS_SystemInfo_GetLanguage, + "JS_SystemInfo_GetMatchWebGLToCanvasSize": _JS_SystemInfo_GetMatchWebGLToCanvasSize, + "JS_SystemInfo_GetOS": _JS_SystemInfo_GetOS, + "JS_SystemInfo_GetPreferredDevicePixelRatio": _JS_SystemInfo_GetPreferredDevicePixelRatio, + "JS_SystemInfo_GetScreenSize": _JS_SystemInfo_GetScreenSize, + "JS_SystemInfo_GetStreamingAssetsURL": _JS_SystemInfo_GetStreamingAssetsURL, + "JS_SystemInfo_HasAstcHdr": _JS_SystemInfo_HasAstcHdr, + "JS_SystemInfo_HasCursorLock": _JS_SystemInfo_HasCursorLock, + "JS_SystemInfo_HasFullscreen": _JS_SystemInfo_HasFullscreen, + "JS_SystemInfo_HasWebGL": _JS_SystemInfo_HasWebGL, + "JS_SystemInfo_HasWebGPU": _JS_SystemInfo_HasWebGPU, + "JS_UnityEngineShouldQuit": _JS_UnityEngineShouldQuit, + "JS_Video_CanPlayFormat": _JS_Video_CanPlayFormat, + "JS_Video_Create": _JS_Video_Create, + "JS_Video_Destroy": _JS_Video_Destroy, + "JS_Video_Duration": _JS_Video_Duration, + "JS_Video_EnableAudioTrack": _JS_Video_EnableAudioTrack, + "JS_Video_GetAudioLanguageCode": _JS_Video_GetAudioLanguageCode, + "JS_Video_GetNumAudioTracks": _JS_Video_GetNumAudioTracks, + "JS_Video_GetPlaybackRate": _JS_Video_GetPlaybackRate, + "JS_Video_Height": _JS_Video_Height, + "JS_Video_IsPlaying": _JS_Video_IsPlaying, + "JS_Video_IsReady": _JS_Video_IsReady, + "JS_Video_IsSeeking": _JS_Video_IsSeeking, + "JS_Video_Pause": _JS_Video_Pause, + "JS_Video_Play": _JS_Video_Play, + "JS_Video_Seek": _JS_Video_Seek, + "JS_Video_SetEndedHandler": _JS_Video_SetEndedHandler, + "JS_Video_SetErrorHandler": _JS_Video_SetErrorHandler, + "JS_Video_SetLoop": _JS_Video_SetLoop, + "JS_Video_SetMute": _JS_Video_SetMute, + "JS_Video_SetPlaybackRate": _JS_Video_SetPlaybackRate, + "JS_Video_SetReadyHandler": _JS_Video_SetReadyHandler, + "JS_Video_SetSeekedHandler": _JS_Video_SetSeekedHandler, + "JS_Video_SetVolume": _JS_Video_SetVolume, + "JS_Video_Time": _JS_Video_Time, + "JS_Video_UpdateToTexture": _JS_Video_UpdateToTexture, + "JS_Video_Width": _JS_Video_Width, + "JS_WebCamVideo_CanPlay": _JS_WebCamVideo_CanPlay, + "JS_WebCamVideo_GetDeviceName": _JS_WebCamVideo_GetDeviceName, + "JS_WebCamVideo_GetNativeHeight": _JS_WebCamVideo_GetNativeHeight, + "JS_WebCamVideo_GetNativeWidth": _JS_WebCamVideo_GetNativeWidth, + "JS_WebCamVideo_GetNumDevices": _JS_WebCamVideo_GetNumDevices, + "JS_WebCamVideo_GrabFrame": _JS_WebCamVideo_GrabFrame, + "JS_WebCamVideo_IsFrontFacing": _JS_WebCamVideo_IsFrontFacing, + "JS_WebCamVideo_Start": _JS_WebCamVideo_Start, + "JS_WebCamVideo_Stop": _JS_WebCamVideo_Stop, + "JS_WebCamVideo_Update": _JS_WebCamVideo_Update, + "JS_WebCam_IsSupported": _JS_WebCam_IsSupported, + "JS_WebGPU_ImportVideoTexture": _JS_WebGPU_ImportVideoTexture, + "JS_WebGPU_ImportWebCamTexture": _JS_WebGPU_ImportWebCamTexture, + "JS_WebGPU_SetCommandEncoder": _JS_WebGPU_SetCommandEncoder, + "JS_WebGPU_Setup": _JS_WebGPU_Setup, + "JS_WebPlayer_FinishInitialization": _JS_WebPlayer_FinishInitialization, + "JS_WebRequest_Abort": _JS_WebRequest_Abort, + "JS_WebRequest_Create": _JS_WebRequest_Create, + "JS_WebRequest_GetResponseMetaData": _JS_WebRequest_GetResponseMetaData, + "JS_WebRequest_GetResponseMetaDataLengths": _JS_WebRequest_GetResponseMetaDataLengths, + "JS_WebRequest_Release": _JS_WebRequest_Release, + "JS_WebRequest_Send": _JS_WebRequest_Send, + "JS_WebRequest_SetRedirectLimit": _JS_WebRequest_SetRedirectLimit, + "JS_WebRequest_SetRequestHeader": _JS_WebRequest_SetRequestHeader, + "JS_WebRequest_SetTimeout": _JS_WebRequest_SetTimeout, + "SocketClose": _SocketClose, + "SocketCreate": _SocketCreate, + "SocketError": _SocketError, + "SocketRecv": _SocketRecv, + "SocketRecvLength": _SocketRecvLength, + "SocketSend": _SocketSend, + "SocketState": _SocketState, + "__cxa_begin_catch": ___cxa_begin_catch, + "__cxa_end_catch": ___cxa_end_catch, + "__cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, + "__cxa_find_matching_catch_3": ___cxa_find_matching_catch_3, + "__cxa_find_matching_catch_4": ___cxa_find_matching_catch_4, + "__cxa_rethrow": ___cxa_rethrow, + "__cxa_throw": ___cxa_throw, + "__cxa_uncaught_exceptions": ___cxa_uncaught_exceptions, + "__dlsym": ___dlsym, + "__resumeException": ___resumeException, + "__syscall__newselect": ___syscall__newselect, + "__syscall_accept4": ___syscall_accept4, + "__syscall_bind": ___syscall_bind, + "__syscall_chmod": ___syscall_chmod, + "__syscall_connect": ___syscall_connect, + "__syscall_dup3": ___syscall_dup3, + "__syscall_faccessat": ___syscall_faccessat, + "__syscall_fcntl64": ___syscall_fcntl64, + "__syscall_fstat64": ___syscall_fstat64, + "__syscall_ftruncate64": ___syscall_ftruncate64, + "__syscall_getcwd": ___syscall_getcwd, + "__syscall_getdents64": ___syscall_getdents64, + "__syscall_getpeername": ___syscall_getpeername, + "__syscall_getsockname": ___syscall_getsockname, + "__syscall_getsockopt": ___syscall_getsockopt, + "__syscall_ioctl": ___syscall_ioctl, + "__syscall_listen": ___syscall_listen, + "__syscall_lstat64": ___syscall_lstat64, + "__syscall_mkdirat": ___syscall_mkdirat, + "__syscall_newfstatat": ___syscall_newfstatat, + "__syscall_openat": ___syscall_openat, + "__syscall_pipe": ___syscall_pipe, + "__syscall_poll": ___syscall_poll, + "__syscall_readlinkat": ___syscall_readlinkat, + "__syscall_recvfrom": ___syscall_recvfrom, + "__syscall_recvmsg": ___syscall_recvmsg, + "__syscall_renameat": ___syscall_renameat, + "__syscall_rmdir": ___syscall_rmdir, + "__syscall_sendmsg": ___syscall_sendmsg, + "__syscall_sendto": ___syscall_sendto, + "__syscall_socket": ___syscall_socket, + "__syscall_stat64": ___syscall_stat64, + "__syscall_statfs64": ___syscall_statfs64, + "__syscall_symlink": ___syscall_symlink, + "__syscall_truncate64": ___syscall_truncate64, + "__syscall_unlinkat": ___syscall_unlinkat, + "__syscall_utimensat": ___syscall_utimensat, + "_emscripten_get_now_is_monotonic": __emscripten_get_now_is_monotonic, + "_emscripten_throw_longjmp": __emscripten_throw_longjmp, + "_gmtime_js": __gmtime_js, + "_localtime_js": __localtime_js, + "_mktime_js": __mktime_js, + "_mmap_js": __mmap_js, + "_munmap_js": __munmap_js, + "_tzset_js": __tzset_js, + "abort": _abort, + "dlopen": _dlopen, + "emscripten_cancel_main_loop": _emscripten_cancel_main_loop, + "emscripten_clear_interval": _emscripten_clear_interval, + "emscripten_date_now": _emscripten_date_now, + "emscripten_debugger": _emscripten_debugger, + "emscripten_exit_fullscreen": _emscripten_exit_fullscreen, + "emscripten_exit_pointerlock": _emscripten_exit_pointerlock, + "emscripten_get_canvas_element_size": _emscripten_get_canvas_element_size, + "emscripten_get_fullscreen_status": _emscripten_get_fullscreen_status, + "emscripten_get_gamepad_status": _emscripten_get_gamepad_status, + "emscripten_get_heap_max": _emscripten_get_heap_max, + "emscripten_get_now": _emscripten_get_now, + "emscripten_get_now_res": _emscripten_get_now_res, + "emscripten_get_num_gamepads": _emscripten_get_num_gamepads, + "emscripten_html5_remove_all_event_listeners": _emscripten_html5_remove_all_event_listeners, + "emscripten_is_webgl_context_lost": _emscripten_is_webgl_context_lost, + "emscripten_log": _emscripten_log, + "emscripten_memcpy_big": _emscripten_memcpy_big, + "emscripten_request_fullscreen": _emscripten_request_fullscreen, + "emscripten_request_pointerlock": _emscripten_request_pointerlock, + "emscripten_resize_heap": _emscripten_resize_heap, + "emscripten_sample_gamepad_data": _emscripten_sample_gamepad_data, + "emscripten_set_blur_callback_on_thread": _emscripten_set_blur_callback_on_thread, + "emscripten_set_canvas_element_size": _emscripten_set_canvas_element_size, + "emscripten_set_focus_callback_on_thread": _emscripten_set_focus_callback_on_thread, + "emscripten_set_fullscreenchange_callback_on_thread": _emscripten_set_fullscreenchange_callback_on_thread, + "emscripten_set_gamepadconnected_callback_on_thread": _emscripten_set_gamepadconnected_callback_on_thread, + "emscripten_set_gamepaddisconnected_callback_on_thread": _emscripten_set_gamepaddisconnected_callback_on_thread, + "emscripten_set_interval": _emscripten_set_interval, + "emscripten_set_keydown_callback_on_thread": _emscripten_set_keydown_callback_on_thread, + "emscripten_set_keypress_callback_on_thread": _emscripten_set_keypress_callback_on_thread, + "emscripten_set_keyup_callback_on_thread": _emscripten_set_keyup_callback_on_thread, + "emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, + "emscripten_set_mousedown_callback_on_thread": _emscripten_set_mousedown_callback_on_thread, + "emscripten_set_mousemove_callback_on_thread": _emscripten_set_mousemove_callback_on_thread, + "emscripten_set_mouseup_callback_on_thread": _emscripten_set_mouseup_callback_on_thread, + "emscripten_set_pointerlockchange_callback_on_thread": _emscripten_set_pointerlockchange_callback_on_thread, + "emscripten_set_touchcancel_callback_on_thread": _emscripten_set_touchcancel_callback_on_thread, + "emscripten_set_touchend_callback_on_thread": _emscripten_set_touchend_callback_on_thread, + "emscripten_set_touchmove_callback_on_thread": _emscripten_set_touchmove_callback_on_thread, + "emscripten_set_touchstart_callback_on_thread": _emscripten_set_touchstart_callback_on_thread, + "emscripten_set_wheel_callback_on_thread": _emscripten_set_wheel_callback_on_thread, + "emscripten_webgl_create_context": _emscripten_webgl_create_context, + "emscripten_webgl_destroy_context": _emscripten_webgl_destroy_context, + "emscripten_webgl_enable_extension": _emscripten_webgl_enable_extension, + "emscripten_webgl_get_current_context": _emscripten_webgl_get_current_context, + "emscripten_webgl_init_context_attributes": _emscripten_webgl_init_context_attributes, + "emscripten_webgl_make_context_current": _emscripten_webgl_make_context_current, + "environ_get": _environ_get, + "environ_sizes_get": _environ_sizes_get, + "exit": _exit, + "fd_close": _fd_close, + "fd_fdstat_get": _fd_fdstat_get, + "fd_read": _fd_read, + "fd_seek": _fd_seek, + "fd_write": _fd_write, + "getaddrinfo": _getaddrinfo, + "gethostbyaddr": _gethostbyaddr, + "gethostbyname": _gethostbyname, + "getnameinfo": _getnameinfo, + "glActiveTexture": _glActiveTexture, + "glAttachShader": _glAttachShader, + "glBeginQuery": _glBeginQuery, + "glBindAttribLocation": _glBindAttribLocation, + "glBindBuffer": _glBindBuffer, + "glBindBufferBase": _glBindBufferBase, + "glBindBufferRange": _glBindBufferRange, + "glBindFramebuffer": _glBindFramebuffer, + "glBindRenderbuffer": _glBindRenderbuffer, + "glBindSampler": _glBindSampler, + "glBindTexture": _glBindTexture, + "glBindVertexArray": _glBindVertexArray, + "glBlendEquation": _glBlendEquation, + "glBlendEquationSeparate": _glBlendEquationSeparate, + "glBlendFuncSeparate": _glBlendFuncSeparate, + "glBlitFramebuffer": _glBlitFramebuffer, + "glBufferData": _glBufferData, + "glBufferSubData": _glBufferSubData, + "glCheckFramebufferStatus": _glCheckFramebufferStatus, + "glClear": _glClear, + "glClearBufferfi": _glClearBufferfi, + "glClearBufferfv": _glClearBufferfv, + "glClearBufferuiv": _glClearBufferuiv, + "glClearColor": _glClearColor, + "glClearDepthf": _glClearDepthf, + "glClearStencil": _glClearStencil, + "glClientWaitSync": _glClientWaitSync, + "glColorMask": _glColorMask, + "glCompileShader": _glCompileShader, + "glCompressedTexImage2D": _glCompressedTexImage2D, + "glCompressedTexImage3D": _glCompressedTexImage3D, + "glCompressedTexSubImage2D": _glCompressedTexSubImage2D, + "glCompressedTexSubImage3D": _glCompressedTexSubImage3D, + "glCopyBufferSubData": _glCopyBufferSubData, + "glCopyTexImage2D": _glCopyTexImage2D, + "glCopyTexSubImage2D": _glCopyTexSubImage2D, + "glCreateProgram": _glCreateProgram, + "glCreateShader": _glCreateShader, + "glCullFace": _glCullFace, + "glDeleteBuffers": _glDeleteBuffers, + "glDeleteFramebuffers": _glDeleteFramebuffers, + "glDeleteProgram": _glDeleteProgram, + "glDeleteQueries": _glDeleteQueries, + "glDeleteRenderbuffers": _glDeleteRenderbuffers, + "glDeleteSamplers": _glDeleteSamplers, + "glDeleteShader": _glDeleteShader, + "glDeleteSync": _glDeleteSync, + "glDeleteTextures": _glDeleteTextures, + "glDeleteVertexArrays": _glDeleteVertexArrays, + "glDepthFunc": _glDepthFunc, + "glDepthMask": _glDepthMask, + "glDetachShader": _glDetachShader, + "glDisable": _glDisable, + "glDisableVertexAttribArray": _glDisableVertexAttribArray, + "glDrawArrays": _glDrawArrays, + "glDrawArraysInstanced": _glDrawArraysInstanced, + "glDrawBuffers": _glDrawBuffers, + "glDrawElements": _glDrawElements, + "glDrawElementsInstanced": _glDrawElementsInstanced, + "glEnable": _glEnable, + "glEnableVertexAttribArray": _glEnableVertexAttribArray, + "glEndQuery": _glEndQuery, + "glFenceSync": _glFenceSync, + "glFinish": _glFinish, + "glFlush": _glFlush, + "glFlushMappedBufferRange": _glFlushMappedBufferRange, + "glFramebufferRenderbuffer": _glFramebufferRenderbuffer, + "glFramebufferTexture2D": _glFramebufferTexture2D, + "glFramebufferTextureLayer": _glFramebufferTextureLayer, + "glFrontFace": _glFrontFace, + "glGenBuffers": _glGenBuffers, + "glGenFramebuffers": _glGenFramebuffers, + "glGenQueries": _glGenQueries, + "glGenRenderbuffers": _glGenRenderbuffers, + "glGenSamplers": _glGenSamplers, + "glGenTextures": _glGenTextures, + "glGenVertexArrays": _glGenVertexArrays, + "glGenerateMipmap": _glGenerateMipmap, + "glGetActiveAttrib": _glGetActiveAttrib, + "glGetActiveUniform": _glGetActiveUniform, + "glGetActiveUniformBlockName": _glGetActiveUniformBlockName, + "glGetActiveUniformBlockiv": _glGetActiveUniformBlockiv, + "glGetActiveUniformsiv": _glGetActiveUniformsiv, + "glGetAttribLocation": _glGetAttribLocation, + "glGetBufferSubData": _glGetBufferSubData, + "glGetError": _glGetError, + "glGetFramebufferAttachmentParameteriv": _glGetFramebufferAttachmentParameteriv, + "glGetIntegeri_v": _glGetIntegeri_v, + "glGetIntegerv": _glGetIntegerv, + "glGetInternalformativ": _glGetInternalformativ, + "glGetProgramBinary": _glGetProgramBinary, + "glGetProgramInfoLog": _glGetProgramInfoLog, + "glGetProgramiv": _glGetProgramiv, + "glGetQueryObjectuiv": _glGetQueryObjectuiv, + "glGetQueryiv": _glGetQueryiv, + "glGetRenderbufferParameteriv": _glGetRenderbufferParameteriv, + "glGetShaderInfoLog": _glGetShaderInfoLog, + "glGetShaderPrecisionFormat": _glGetShaderPrecisionFormat, + "glGetShaderSource": _glGetShaderSource, + "glGetShaderiv": _glGetShaderiv, + "glGetString": _glGetString, + "glGetStringi": _glGetStringi, + "glGetTexParameteriv": _glGetTexParameteriv, + "glGetUniformBlockIndex": _glGetUniformBlockIndex, + "glGetUniformIndices": _glGetUniformIndices, + "glGetUniformLocation": _glGetUniformLocation, + "glGetUniformiv": _glGetUniformiv, + "glGetVertexAttribiv": _glGetVertexAttribiv, + "glInvalidateFramebuffer": _glInvalidateFramebuffer, + "glIsEnabled": _glIsEnabled, + "glIsVertexArray": _glIsVertexArray, + "glLinkProgram": _glLinkProgram, + "glMapBufferRange": _glMapBufferRange, + "glPixelStorei": _glPixelStorei, + "glPolygonOffset": _glPolygonOffset, + "glProgramBinary": _glProgramBinary, + "glProgramParameteri": _glProgramParameteri, + "glReadBuffer": _glReadBuffer, + "glReadPixels": _glReadPixels, + "glRenderbufferStorage": _glRenderbufferStorage, + "glRenderbufferStorageMultisample": _glRenderbufferStorageMultisample, + "glSamplerParameteri": _glSamplerParameteri, + "glScissor": _glScissor, + "glShaderSource": _glShaderSource, + "glStencilFuncSeparate": _glStencilFuncSeparate, + "glStencilMask": _glStencilMask, + "glStencilOpSeparate": _glStencilOpSeparate, + "glTexImage2D": _glTexImage2D, + "glTexImage3D": _glTexImage3D, + "glTexParameterf": _glTexParameterf, + "glTexParameteri": _glTexParameteri, + "glTexParameteriv": _glTexParameteriv, + "glTexStorage2D": _glTexStorage2D, + "glTexStorage3D": _glTexStorage3D, + "glTexSubImage2D": _glTexSubImage2D, + "glTexSubImage3D": _glTexSubImage3D, + "glUniform1fv": _glUniform1fv, + "glUniform1i": _glUniform1i, + "glUniform1iv": _glUniform1iv, + "glUniform1uiv": _glUniform1uiv, + "glUniform2fv": _glUniform2fv, + "glUniform2iv": _glUniform2iv, + "glUniform2uiv": _glUniform2uiv, + "glUniform3fv": _glUniform3fv, + "glUniform3iv": _glUniform3iv, + "glUniform3uiv": _glUniform3uiv, + "glUniform4fv": _glUniform4fv, + "glUniform4iv": _glUniform4iv, + "glUniform4uiv": _glUniform4uiv, + "glUniformBlockBinding": _glUniformBlockBinding, + "glUniformMatrix3fv": _glUniformMatrix3fv, + "glUniformMatrix4fv": _glUniformMatrix4fv, + "glUnmapBuffer": _glUnmapBuffer, + "glUseProgram": _glUseProgram, + "glValidateProgram": _glValidateProgram, + "glVertexAttrib4f": _glVertexAttrib4f, + "glVertexAttrib4fv": _glVertexAttrib4fv, + "glVertexAttribIPointer": _glVertexAttribIPointer, + "glVertexAttribPointer": _glVertexAttribPointer, + "glViewport": _glViewport, + "invoke_ddiii": invoke_ddiii, + "invoke_di": invoke_di, + "invoke_dii": invoke_dii, + "invoke_diidi": invoke_diidi, + "invoke_diii": invoke_diii, + "invoke_diiii": invoke_diiii, + "invoke_fffi": invoke_fffi, + "invoke_fi": invoke_fi, + "invoke_fif": invoke_fif, + "invoke_fiffi": invoke_fiffi, + "invoke_fifi": invoke_fifi, + "invoke_fii": invoke_fii, + "invoke_fiiffi": invoke_fiiffi, + "invoke_fiifi": invoke_fiifi, + "invoke_fiii": invoke_fiii, + "invoke_fiiii": invoke_fiiii, + "invoke_fiiiii": invoke_fiiiii, + "invoke_i": invoke_i, + "invoke_iffi": invoke_iffi, + "invoke_ifi": invoke_ifi, + "invoke_ii": invoke_ii, + "invoke_iif": invoke_iif, + "invoke_iifi": invoke_iifi, + "invoke_iii": invoke_iii, + "invoke_iiidii": invoke_iiidii, + "invoke_iiif": invoke_iiif, + "invoke_iiifi": invoke_iiifi, + "invoke_iiifii": invoke_iiifii, + "invoke_iiii": invoke_iiii, + "invoke_iiiidii": invoke_iiiidii, + "invoke_iiiifi": invoke_iiiifi, + "invoke_iiiifii": invoke_iiiifii, + "invoke_iiiii": invoke_iiiii, + "invoke_iiiiii": invoke_iiiiii, + "invoke_iiiiiiffiiiiiiiiiffffiii": invoke_iiiiiiffiiiiiiiiiffffiii, + "invoke_iiiiiii": invoke_iiiiiii, + "invoke_iiiiiiidii": invoke_iiiiiiidii, + "invoke_iiiiiiii": invoke_iiiiiiii, + "invoke_iiiiiiiii": invoke_iiiiiiiii, + "invoke_iiiiiiiiii": invoke_iiiiiiiiii, + "invoke_iiiiiiiiiii": invoke_iiiiiiiiiii, + "invoke_iiiiiiiiiiii": invoke_iiiiiiiiiiii, + "invoke_iiiiiiiiiiiii": invoke_iiiiiiiiiiiii, + "invoke_iiiiiiiiiji": invoke_iiiiiiiiiji, + "invoke_iiiiij": invoke_iiiiij, + "invoke_iiiiiji": invoke_iiiiiji, + "invoke_iiiiijiii": invoke_iiiiijiii, + "invoke_iiiiji": invoke_iiiiji, + "invoke_iiiijii": invoke_iiiijii, + "invoke_iiiijjii": invoke_iiiijjii, + "invoke_iiijii": invoke_iiijii, + "invoke_iiijiii": invoke_iiijiii, + "invoke_iij": invoke_iij, + "invoke_iiji": invoke_iiji, + "invoke_iijii": invoke_iijii, + "invoke_iijiii": invoke_iijiii, + "invoke_iijiiiiii": invoke_iijiiiiii, + "invoke_iijji": invoke_iijji, + "invoke_iijjiiiiii": invoke_iijjiiiiii, + "invoke_iji": invoke_iji, + "invoke_ijiii": invoke_ijiii, + "invoke_ijji": invoke_ijji, + "invoke_j": invoke_j, + "invoke_jdi": invoke_jdi, + "invoke_ji": invoke_ji, + "invoke_jii": invoke_jii, + "invoke_jiii": invoke_jiii, + "invoke_jiiii": invoke_jiiii, + "invoke_jiiiii": invoke_jiiiii, + "invoke_jiiiiiiiiii": invoke_jiiiiiiiiii, + "invoke_jiiji": invoke_jiiji, + "invoke_jiji": invoke_jiji, + "invoke_jijii": invoke_jijii, + "invoke_jijji": invoke_jijji, + "invoke_jjji": invoke_jjji, + "invoke_v": invoke_v, + "invoke_vfi": invoke_vfi, + "invoke_vfiii": invoke_vfiii, + "invoke_vi": invoke_vi, + "invoke_vidd": invoke_vidd, + "invoke_vidi": invoke_vidi, + "invoke_viffi": invoke_viffi, + "invoke_vifi": invoke_vifi, + "invoke_vififiiii": invoke_vififiiii, + "invoke_vifii": invoke_vifii, + "invoke_vifiii": invoke_vifiii, + "invoke_vii": invoke_vii, + "invoke_viidi": invoke_viidi, + "invoke_viidiji": invoke_viidiji, + "invoke_viif": invoke_viif, + "invoke_viiff": invoke_viiff, + "invoke_viifff": invoke_viifff, + "invoke_viifffffi": invoke_viifffffi, + "invoke_viiffi": invoke_viiffi, + "invoke_viifi": invoke_viifi, + "invoke_viifii": invoke_viifii, + "invoke_viifiii": invoke_viifiii, + "invoke_viii": invoke_viii, + "invoke_viiifi": invoke_viiifi, + "invoke_viiififiii": invoke_viiififiii, + "invoke_viiifii": invoke_viiifii, + "invoke_viiii": invoke_viiii, + "invoke_viiiidi": invoke_viiiidi, + "invoke_viiiiffiiiiiiii": invoke_viiiiffiiiiiiii, + "invoke_viiiifi": invoke_viiiifi, + "invoke_viiiii": invoke_viiiii, + "invoke_viiiiii": invoke_viiiiii, + "invoke_viiiiiifddfiiii": invoke_viiiiiifddfiiii, + "invoke_viiiiiiffffiiii": invoke_viiiiiiffffiiii, + "invoke_viiiiiifii": invoke_viiiiiifii, + "invoke_viiiiiifiifiiii": invoke_viiiiiifiifiiii, + "invoke_viiiiiifjjfiiii": invoke_viiiiiifjjfiiii, + "invoke_viiiiiii": invoke_viiiiiii, + "invoke_viiiiiiii": invoke_viiiiiiii, + "invoke_viiiiiiiii": invoke_viiiiiiiii, + "invoke_viiiiiiiiii": invoke_viiiiiiiiii, + "invoke_viiiiiiiiiiii": invoke_viiiiiiiiiiii, + "invoke_viiiiiiiiiiiii": invoke_viiiiiiiiiiiii, + "invoke_viiiiiiiiiiiiiii": invoke_viiiiiiiiiiiiiii, + "invoke_viiiji": invoke_viiiji, + "invoke_viiji": invoke_viiji, + "invoke_viijii": invoke_viijii, + "invoke_viijiiijiiii": invoke_viijiiijiiii, + "invoke_viji": invoke_viji, + "invoke_vijii": invoke_vijii, + "invoke_vijiii": invoke_vijiii, + "invoke_vijjji": invoke_vijjji, + "invoke_vji": invoke_vji, + "invoke_vjiiiii": invoke_vjiiiii, + "invoke_vjjjiiii": invoke_vjjjiiii, + "isCursorLocked": _isCursorLocked, + "isMobileDevice": _isMobileDevice, + "llvm_eh_typeid_for": _llvm_eh_typeid_for, + "navigator_gpu_get_preferred_canvas_format": _navigator_gpu_get_preferred_canvas_format, + "navigator_gpu_request_adapter_async": _navigator_gpu_request_adapter_async, + "strftime": _strftime, + "strftime_l": _strftime_l, + "testFunctionggg": _testFunctionggg, + "wgpu_adapter_or_device_get_features": _wgpu_adapter_or_device_get_features, + "wgpu_adapter_or_device_get_limits": _wgpu_adapter_or_device_get_limits, + "wgpu_adapter_request_device_async": _wgpu_adapter_request_device_async, + "wgpu_buffer_get_mapped_range": _wgpu_buffer_get_mapped_range, + "wgpu_buffer_map_async": _wgpu_buffer_map_async, + "wgpu_buffer_read_mapped_range": _wgpu_buffer_read_mapped_range, + "wgpu_buffer_unmap": _wgpu_buffer_unmap, + "wgpu_canvas_context_configure": _wgpu_canvas_context_configure, + "wgpu_canvas_context_get_current_texture": _wgpu_canvas_context_get_current_texture, + "wgpu_canvas_get_webgpu_context": _wgpu_canvas_get_webgpu_context, + "wgpu_command_encoder_begin_compute_pass": _wgpu_command_encoder_begin_compute_pass, + "wgpu_command_encoder_begin_render_pass": _wgpu_command_encoder_begin_render_pass, + "wgpu_command_encoder_copy_buffer_to_buffer": _wgpu_command_encoder_copy_buffer_to_buffer, + "wgpu_command_encoder_copy_texture_to_buffer": _wgpu_command_encoder_copy_texture_to_buffer, + "wgpu_command_encoder_copy_texture_to_texture": _wgpu_command_encoder_copy_texture_to_texture, + "wgpu_compute_pass_encoder_dispatch_workgroups": _wgpu_compute_pass_encoder_dispatch_workgroups, + "wgpu_compute_pass_encoder_dispatch_workgroups_indirect": _wgpu_compute_pass_encoder_dispatch_workgroups_indirect, + "wgpu_device_create_bind_group": _wgpu_device_create_bind_group, + "wgpu_device_create_bind_group_layout": _wgpu_device_create_bind_group_layout, + "wgpu_device_create_buffer": _wgpu_device_create_buffer, + "wgpu_device_create_command_encoder": _wgpu_device_create_command_encoder, + "wgpu_device_create_command_encoder_simple": _wgpu_device_create_command_encoder_simple, + "wgpu_device_create_compute_pipeline": _wgpu_device_create_compute_pipeline, + "wgpu_device_create_pipeline_layout": _wgpu_device_create_pipeline_layout, + "wgpu_device_create_render_pipeline": _wgpu_device_create_render_pipeline, + "wgpu_device_create_sampler": _wgpu_device_create_sampler, + "wgpu_device_create_shader_module": _wgpu_device_create_shader_module, + "wgpu_device_create_texture": _wgpu_device_create_texture, + "wgpu_device_get_queue": _wgpu_device_get_queue, + "wgpu_device_pop_error_scope_async": _wgpu_device_pop_error_scope_async, + "wgpu_device_push_error_scope": _wgpu_device_push_error_scope, + "wgpu_device_set_uncapturederror_callback": _wgpu_device_set_uncapturederror_callback, + "wgpu_encoder_end": _wgpu_encoder_end, + "wgpu_encoder_finish": _wgpu_encoder_finish, + "wgpu_encoder_pop_debug_group": _wgpu_encoder_pop_debug_group, + "wgpu_encoder_push_debug_group": _wgpu_encoder_push_debug_group, + "wgpu_encoder_set_bind_group": _wgpu_encoder_set_bind_group, + "wgpu_encoder_set_pipeline": _wgpu_encoder_set_pipeline, + "wgpu_is_valid_object": _wgpu_is_valid_object, + "wgpu_object_destroy": _wgpu_object_destroy, + "wgpu_object_set_label": _wgpu_object_set_label, + "wgpu_pipeline_get_bind_group_layout": _wgpu_pipeline_get_bind_group_layout, + "wgpu_queue_submit_multiple_and_destroy": _wgpu_queue_submit_multiple_and_destroy, + "wgpu_queue_submit_one_and_destroy": _wgpu_queue_submit_one_and_destroy, + "wgpu_queue_write_buffer": _wgpu_queue_write_buffer, + "wgpu_queue_write_texture": _wgpu_queue_write_texture, + "wgpu_render_commands_mixin_draw": _wgpu_render_commands_mixin_draw, + "wgpu_render_commands_mixin_draw_indexed": _wgpu_render_commands_mixin_draw_indexed, + "wgpu_render_commands_mixin_draw_indexed_indirect": _wgpu_render_commands_mixin_draw_indexed_indirect, + "wgpu_render_commands_mixin_draw_indirect": _wgpu_render_commands_mixin_draw_indirect, + "wgpu_render_commands_mixin_set_index_buffer": _wgpu_render_commands_mixin_set_index_buffer, + "wgpu_render_commands_mixin_set_vertex_buffer": _wgpu_render_commands_mixin_set_vertex_buffer, + "wgpu_render_pass_encoder_set_scissor_rect": _wgpu_render_pass_encoder_set_scissor_rect, + "wgpu_render_pass_encoder_set_stencil_reference": _wgpu_render_pass_encoder_set_stencil_reference, + "wgpu_render_pass_encoder_set_viewport": _wgpu_render_pass_encoder_set_viewport, + "wgpu_texture_create_view": _wgpu_texture_create_view, + "wgpu_texture_create_view_simple": _wgpu_texture_create_view_simple + }; + var asm = createWasm(); + var ___wasm_call_ctors = function() { + return (___wasm_call_ctors = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments) + }; + var _ReleaseKeys = Module["_ReleaseKeys"] = function() { + return (_ReleaseKeys = Module["_ReleaseKeys"] = Module["asm"]["ReleaseKeys"]).apply(null, arguments) + } + ; + var _GetCopyBufferAsCStr = Module["_GetCopyBufferAsCStr"] = function() { + return (_GetCopyBufferAsCStr = Module["_GetCopyBufferAsCStr"] = Module["asm"]["GetCopyBufferAsCStr"]).apply(null, arguments) + } + ; + var _getMetricsInfo = Module["_getMetricsInfo"] = function() { + return (_getMetricsInfo = Module["_getMetricsInfo"] = Module["asm"]["getMetricsInfo"]).apply(null, arguments) + } + ; + var _SendMessageFloat = Module["_SendMessageFloat"] = function() { + return (_SendMessageFloat = Module["_SendMessageFloat"] = Module["asm"]["SendMessageFloat"]).apply(null, arguments) + } + ; + var _SendMessageString = Module["_SendMessageString"] = function() { + return (_SendMessageString = Module["_SendMessageString"] = Module["asm"]["SendMessageString"]).apply(null, arguments) + } + ; + var _SendMessage = Module["_SendMessage"] = function() { + return (_SendMessage = Module["_SendMessage"] = Module["asm"]["SendMessage"]).apply(null, arguments) + } + ; + var _SetFullscreen = Module["_SetFullscreen"] = function() { + return (_SetFullscreen = Module["_SetFullscreen"] = Module["asm"]["SetFullscreen"]).apply(null, arguments) + } + ; + var _main = Module["_main"] = function() { + return (_main = Module["_main"] = Module["asm"]["__main_argc_argv"]).apply(null, arguments) + } + ; + var _SendPasteEvent = Module["_SendPasteEvent"] = function() { + return (_SendPasteEvent = Module["_SendPasteEvent"] = Module["asm"]["SendPasteEvent"]).apply(null, arguments) + } + ; + var ___errno_location = function() { + return (___errno_location = Module["asm"]["__errno_location"]).apply(null, arguments) + }; + var _htonl = function() { + return (_htonl = Module["asm"]["htonl"]).apply(null, arguments) + }; + var _htons = function() { + return (_htons = Module["asm"]["htons"]).apply(null, arguments) + }; + var _ntohs = function() { + return (_ntohs = Module["asm"]["ntohs"]).apply(null, arguments) + }; + var _malloc = function() { + return (_malloc = Module["asm"]["malloc"]).apply(null, arguments) + }; + var _free = function() { + return (_free = Module["asm"]["free"]).apply(null, arguments) + }; + var _emscripten_builtin_memalign = function() { + return (_emscripten_builtin_memalign = Module["asm"]["emscripten_builtin_memalign"]).apply(null, arguments) + }; + var _setThrew = function() { + return (_setThrew = Module["asm"]["setThrew"]).apply(null, arguments) + }; + var setTempRet0 = function() { + return (setTempRet0 = Module["asm"]["setTempRet0"]).apply(null, arguments) + }; + var getTempRet0 = function() { + return (getTempRet0 = Module["asm"]["getTempRet0"]).apply(null, arguments) + }; + var stackSave = function() { + return (stackSave = Module["asm"]["stackSave"]).apply(null, arguments) + }; + var stackRestore = function() { + return (stackRestore = Module["asm"]["stackRestore"]).apply(null, arguments) + }; + var stackAlloc = function() { + return (stackAlloc = Module["asm"]["stackAlloc"]).apply(null, arguments) + }; + var ___cxa_free_exception = function() { + return (___cxa_free_exception = Module["asm"]["__cxa_free_exception"]).apply(null, arguments) + }; + var ___cxa_increment_exception_refcount = function() { + return (___cxa_increment_exception_refcount = Module["asm"]["__cxa_increment_exception_refcount"]).apply(null, arguments) + }; + var ___cxa_decrement_exception_refcount = function() { + return (___cxa_decrement_exception_refcount = Module["asm"]["__cxa_decrement_exception_refcount"]).apply(null, arguments) + }; + var ___cxa_can_catch = function() { + return (___cxa_can_catch = Module["asm"]["__cxa_can_catch"]).apply(null, arguments) + }; + var ___cxa_is_pointer_type = function() { + return (___cxa_is_pointer_type = Module["asm"]["__cxa_is_pointer_type"]).apply(null, arguments) + }; + var dynCall_ii = Module["dynCall_ii"] = function() { + return (dynCall_ii = Module["dynCall_ii"] = Module["asm"]["dynCall_ii"]).apply(null, arguments) + } + ; + var dynCall_iiii = Module["dynCall_iiii"] = function() { + return (dynCall_iiii = Module["dynCall_iiii"] = Module["asm"]["dynCall_iiii"]).apply(null, arguments) + } + ; + var dynCall_jiji = Module["dynCall_jiji"] = function() { + return (dynCall_jiji = Module["dynCall_jiji"] = Module["asm"]["dynCall_jiji"]).apply(null, arguments) + } + ; + var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() { + return (dynCall_iidiiii = Module["dynCall_iidiiii"] = Module["asm"]["dynCall_iidiiii"]).apply(null, arguments) + } + ; + var dynCall_vii = Module["dynCall_vii"] = function() { + return (dynCall_vii = Module["dynCall_vii"] = Module["asm"]["dynCall_vii"]).apply(null, arguments) + } + ; + var dynCall_iii = Module["dynCall_iii"] = function() { + return (dynCall_iii = Module["dynCall_iii"] = Module["asm"]["dynCall_iii"]).apply(null, arguments) + } + ; + var dynCall_viii = Module["dynCall_viii"] = function() { + return (dynCall_viii = Module["dynCall_viii"] = Module["asm"]["dynCall_viii"]).apply(null, arguments) + } + ; + var dynCall_vi = Module["dynCall_vi"] = function() { + return (dynCall_vi = Module["dynCall_vi"] = Module["asm"]["dynCall_vi"]).apply(null, arguments) + } + ; + var dynCall_iiiii = Module["dynCall_iiiii"] = function() { + return (dynCall_iiiii = Module["dynCall_iiiii"] = Module["asm"]["dynCall_iiiii"]).apply(null, arguments) + } + ; + var dynCall_v = Module["dynCall_v"] = function() { + return (dynCall_v = Module["dynCall_v"] = Module["asm"]["dynCall_v"]).apply(null, arguments) + } + ; + var dynCall_i = Module["dynCall_i"] = function() { + return (dynCall_i = Module["dynCall_i"] = Module["asm"]["dynCall_i"]).apply(null, arguments) + } + ; + var dynCall_iiiiii = Module["dynCall_iiiiii"] = function() { + return (dynCall_iiiiii = Module["dynCall_iiiiii"] = Module["asm"]["dynCall_iiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = function() { + return (dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = Module["asm"]["dynCall_iiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiijiii = Module["dynCall_iiijiii"] = function() { + return (dynCall_iiijiii = Module["dynCall_iiijiii"] = Module["asm"]["dynCall_iiijiii"]).apply(null, arguments) + } + ; + var dynCall_iij = Module["dynCall_iij"] = function() { + return (dynCall_iij = Module["dynCall_iij"] = Module["asm"]["dynCall_iij"]).apply(null, arguments) + } + ; + var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = function() { + return (dynCall_iiiiiii = Module["dynCall_iiiiiii"] = Module["asm"]["dynCall_iiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jii = Module["dynCall_jii"] = function() { + return (dynCall_jii = Module["dynCall_jii"] = Module["asm"]["dynCall_jii"]).apply(null, arguments) + } + ; + var dynCall_viiii = Module["dynCall_viiii"] = function() { + return (dynCall_viiii = Module["dynCall_viiii"] = Module["asm"]["dynCall_viiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiii = Module["dynCall_iiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiii = Module["dynCall_iiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiii = Module["dynCall_jiiii"] = function() { + return (dynCall_jiiii = Module["dynCall_jiiii"] = Module["asm"]["dynCall_jiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_fiii = Module["dynCall_fiii"] = function() { + return (dynCall_fiii = Module["dynCall_fiii"] = Module["asm"]["dynCall_fiii"]).apply(null, arguments) + } + ; + var dynCall_diii = Module["dynCall_diii"] = function() { + return (dynCall_diii = Module["dynCall_diii"] = Module["asm"]["dynCall_diii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() { + return (dynCall_viiiiiii = Module["dynCall_viiiiiii"] = Module["asm"]["dynCall_viiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiii = Module["dynCall_iiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiii = Module["dynCall_iiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiii = Module["dynCall_viiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiii = Module["dynCall_viiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiii = Module["dynCall_iiiiiiiii"] = function() { + return (dynCall_iiiiiiiii = Module["dynCall_iiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiij = Module["dynCall_iiiiij"] = function() { + return (dynCall_iiiiij = Module["dynCall_iiiiij"] = Module["asm"]["dynCall_iiiiij"]).apply(null, arguments) + } + ; + var dynCall_iiiiid = Module["dynCall_iiiiid"] = function() { + return (dynCall_iiiiid = Module["dynCall_iiiiid"] = Module["asm"]["dynCall_iiiiid"]).apply(null, arguments) + } + ; + var dynCall_iiiiijj = Module["dynCall_iiiiijj"] = function() { + return (dynCall_iiiiijj = Module["dynCall_iiiiijj"] = Module["asm"]["dynCall_iiiiijj"]).apply(null, arguments) + } + ; + var dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = function() { + return (dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = Module["asm"]["dynCall_iiiiiijj"]).apply(null, arguments) + } + ; + var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() { + return (dynCall_viiiiii = Module["dynCall_viiiiii"] = Module["asm"]["dynCall_viiiiii"]).apply(null, arguments) + } + ; + var dynCall_viijii = Module["dynCall_viijii"] = function() { + return (dynCall_viijii = Module["dynCall_viijii"] = Module["asm"]["dynCall_viijii"]).apply(null, arguments) + } + ; + var dynCall_viiiii = Module["dynCall_viiiii"] = function() { + return (dynCall_viiiii = Module["dynCall_viiiii"] = Module["asm"]["dynCall_viiiii"]).apply(null, arguments) + } + ; + var dynCall_fii = Module["dynCall_fii"] = function() { + return (dynCall_fii = Module["dynCall_fii"] = Module["asm"]["dynCall_fii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiii = Module["dynCall_viiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiii = Module["dynCall_viiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_didi = Module["dynCall_didi"] = function() { + return (dynCall_didi = Module["dynCall_didi"] = Module["asm"]["dynCall_didi"]).apply(null, arguments) + } + ; + var dynCall_iifi = Module["dynCall_iifi"] = function() { + return (dynCall_iifi = Module["dynCall_iifi"] = Module["asm"]["dynCall_iifi"]).apply(null, arguments) + } + ; + var dynCall_fifi = Module["dynCall_fifi"] = function() { + return (dynCall_fifi = Module["dynCall_fifi"] = Module["asm"]["dynCall_fifi"]).apply(null, arguments) + } + ; + var dynCall_diidi = Module["dynCall_diidi"] = function() { + return (dynCall_diidi = Module["dynCall_diidi"] = Module["asm"]["dynCall_diidi"]).apply(null, arguments) + } + ; + var dynCall_fiiii = Module["dynCall_fiiii"] = function() { + return (dynCall_fiiii = Module["dynCall_fiiii"] = Module["asm"]["dynCall_fiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiji = Module["dynCall_jiiji"] = function() { + return (dynCall_jiiji = Module["dynCall_jiiji"] = Module["asm"]["dynCall_jiiji"]).apply(null, arguments) + } + ; + var dynCall_fiifi = Module["dynCall_fiifi"] = function() { + return (dynCall_fiifi = Module["dynCall_fiifi"] = Module["asm"]["dynCall_fiifi"]).apply(null, arguments) + } + ; + var dynCall_iiffi = Module["dynCall_iiffi"] = function() { + return (dynCall_iiffi = Module["dynCall_iiffi"] = Module["asm"]["dynCall_iiffi"]).apply(null, arguments) + } + ; + var dynCall_fiffi = Module["dynCall_fiffi"] = function() { + return (dynCall_fiffi = Module["dynCall_fiffi"] = Module["asm"]["dynCall_fiffi"]).apply(null, arguments) + } + ; + var dynCall_iiidii = Module["dynCall_iiidii"] = function() { + return (dynCall_iiidii = Module["dynCall_iiidii"] = Module["asm"]["dynCall_iiidii"]).apply(null, arguments) + } + ; + var dynCall_fiiiii = Module["dynCall_fiiiii"] = function() { + return (dynCall_fiiiii = Module["dynCall_fiiiii"] = Module["asm"]["dynCall_fiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifi = Module["dynCall_iiiifi"] = function() { + return (dynCall_iiiifi = Module["dynCall_iiiifi"] = Module["asm"]["dynCall_iiiifi"]).apply(null, arguments) + } + ; + var dynCall_iiiidii = Module["dynCall_iiiidii"] = function() { + return (dynCall_iiiidii = Module["dynCall_iiiidii"] = Module["asm"]["dynCall_iiiidii"]).apply(null, arguments) + } + ; + var dynCall_iiiijii = Module["dynCall_iiiijii"] = function() { + return (dynCall_iiiijii = Module["dynCall_iiiijii"] = Module["asm"]["dynCall_iiiijii"]).apply(null, arguments) + } + ; + var dynCall_iiiifii = Module["dynCall_iiiifii"] = function() { + return (dynCall_iiiifii = Module["dynCall_iiiifii"] = Module["asm"]["dynCall_iiiifii"]).apply(null, arguments) + } + ; + var dynCall_viji = Module["dynCall_viji"] = function() { + return (dynCall_viji = Module["dynCall_viji"] = Module["asm"]["dynCall_viji"]).apply(null, arguments) + } + ; + var dynCall_viiji = Module["dynCall_viiji"] = function() { + return (dynCall_viiji = Module["dynCall_viiji"] = Module["asm"]["dynCall_viiji"]).apply(null, arguments) + } + ; + var dynCall_vifi = Module["dynCall_vifi"] = function() { + return (dynCall_vifi = Module["dynCall_vifi"] = Module["asm"]["dynCall_vifi"]).apply(null, arguments) + } + ; + var dynCall_viifi = Module["dynCall_viifi"] = function() { + return (dynCall_viifi = Module["dynCall_viifi"] = Module["asm"]["dynCall_viifi"]).apply(null, arguments) + } + ; + var dynCall_vidi = Module["dynCall_vidi"] = function() { + return (dynCall_vidi = Module["dynCall_vidi"] = Module["asm"]["dynCall_vidi"]).apply(null, arguments) + } + ; + var dynCall_viidi = Module["dynCall_viidi"] = function() { + return (dynCall_viidi = Module["dynCall_viidi"] = Module["asm"]["dynCall_viidi"]).apply(null, arguments) + } + ; + var dynCall_iji = Module["dynCall_iji"] = function() { + return (dynCall_iji = Module["dynCall_iji"] = Module["asm"]["dynCall_iji"]).apply(null, arguments) + } + ; + var dynCall_jiii = Module["dynCall_jiii"] = function() { + return (dynCall_jiii = Module["dynCall_jiii"] = Module["asm"]["dynCall_jiii"]).apply(null, arguments) + } + ; + var dynCall_iiji = Module["dynCall_iiji"] = function() { + return (dynCall_iiji = Module["dynCall_iiji"] = Module["asm"]["dynCall_iiji"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = function() { + return (dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiijii = Module["dynCall_iiijii"] = function() { + return (dynCall_iiijii = Module["dynCall_iiijii"] = Module["asm"]["dynCall_iiijii"]).apply(null, arguments) + } + ; + var dynCall_iiifii = Module["dynCall_iiifii"] = function() { + return (dynCall_iiifii = Module["dynCall_iiifii"] = Module["asm"]["dynCall_iiifii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = function() { + return (dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = Module["asm"]["dynCall_viiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiji = Module["dynCall_iiiiji"] = function() { + return (dynCall_iiiiji = Module["dynCall_iiiiji"] = Module["asm"]["dynCall_iiiiji"]).apply(null, arguments) + } + ; + var dynCall_dii = Module["dynCall_dii"] = function() { + return (dynCall_dii = Module["dynCall_dii"] = Module["asm"]["dynCall_dii"]).apply(null, arguments) + } + ; + var dynCall_viiiidi = Module["dynCall_viiiidi"] = function() { + return (dynCall_viiiidi = Module["dynCall_viiiidi"] = Module["asm"]["dynCall_viiiidi"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiidii = Module["dynCall_iiiiiiidii"] = function() { + return (dynCall_iiiiiiidii = Module["dynCall_iiiiiiidii"] = Module["asm"]["dynCall_iiiiiiidii"]).apply(null, arguments) + } + ; + var dynCall_ji = Module["dynCall_ji"] = function() { + return (dynCall_ji = Module["dynCall_ji"] = Module["asm"]["dynCall_ji"]).apply(null, arguments) + } + ; + var dynCall_di = Module["dynCall_di"] = function() { + return (dynCall_di = Module["dynCall_di"] = Module["asm"]["dynCall_di"]).apply(null, arguments) + } + ; + var dynCall_iijiii = Module["dynCall_iijiii"] = function() { + return (dynCall_iijiii = Module["dynCall_iijiii"] = Module["asm"]["dynCall_iijiii"]).apply(null, arguments) + } + ; + var dynCall_vijii = Module["dynCall_vijii"] = function() { + return (dynCall_vijii = Module["dynCall_vijii"] = Module["asm"]["dynCall_vijii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_fiffffi = Module["dynCall_fiffffi"] = function() { + return (dynCall_fiffffi = Module["dynCall_fiffffi"] = Module["asm"]["dynCall_fiffffi"]).apply(null, arguments) + } + ; + var dynCall_viiffi = Module["dynCall_viiffi"] = function() { + return (dynCall_viiffi = Module["dynCall_viiffi"] = Module["asm"]["dynCall_viiffi"]).apply(null, arguments) + } + ; + var dynCall_iffi = Module["dynCall_iffi"] = function() { + return (dynCall_iffi = Module["dynCall_iffi"] = Module["asm"]["dynCall_iffi"]).apply(null, arguments) + } + ; + var dynCall_jijji = Module["dynCall_jijji"] = function() { + return (dynCall_jijji = Module["dynCall_jijji"] = Module["asm"]["dynCall_jijji"]).apply(null, arguments) + } + ; + var dynCall_viiiji = Module["dynCall_viiiji"] = function() { + return (dynCall_viiiji = Module["dynCall_viiiji"] = Module["asm"]["dynCall_viiiji"]).apply(null, arguments) + } + ; + var dynCall_jjji = Module["dynCall_jjji"] = function() { + return (dynCall_jjji = Module["dynCall_jjji"] = Module["asm"]["dynCall_jjji"]).apply(null, arguments) + } + ; + var dynCall_viijiiijiiii = Module["dynCall_viijiiijiiii"] = function() { + return (dynCall_viijiiijiiii = Module["dynCall_viijiiijiiii"] = Module["asm"]["dynCall_viijiiijiiii"]).apply(null, arguments) + } + ; + var dynCall_ijji = Module["dynCall_ijji"] = function() { + return (dynCall_ijji = Module["dynCall_ijji"] = Module["asm"]["dynCall_ijji"]).apply(null, arguments) + } + ; + var dynCall_jdi = Module["dynCall_jdi"] = function() { + return (dynCall_jdi = Module["dynCall_jdi"] = Module["asm"]["dynCall_jdi"]).apply(null, arguments) + } + ; + var dynCall_vijjji = Module["dynCall_vijjji"] = function() { + return (dynCall_vijjji = Module["dynCall_vijjji"] = Module["asm"]["dynCall_vijjji"]).apply(null, arguments) + } + ; + var dynCall_iiiiijiii = Module["dynCall_iiiiijiii"] = function() { + return (dynCall_iiiiijiii = Module["dynCall_iiiiijiii"] = Module["asm"]["dynCall_iiiiijiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiifii = Module["dynCall_viiiiiifii"] = function() { + return (dynCall_viiiiiifii = Module["dynCall_viiiiiifii"] = Module["asm"]["dynCall_viiiiiifii"]).apply(null, arguments) + } + ; + var dynCall_fffi = Module["dynCall_fffi"] = function() { + return (dynCall_fffi = Module["dynCall_fffi"] = Module["asm"]["dynCall_fffi"]).apply(null, arguments) + } + ; + var dynCall_viifii = Module["dynCall_viifii"] = function() { + return (dynCall_viifii = Module["dynCall_viifii"] = Module["asm"]["dynCall_viifii"]).apply(null, arguments) + } + ; + var dynCall_viifffffi = Module["dynCall_viifffffi"] = function() { + return (dynCall_viifffffi = Module["dynCall_viifffffi"] = Module["asm"]["dynCall_viifffffi"]).apply(null, arguments) + } + ; + var dynCall_viiiiffiiiiiiii = Module["dynCall_viiiiffiiiiiiii"] = function() { + return (dynCall_viiiiffiiiiiiii = Module["dynCall_viiiiffiiiiiiii"] = Module["asm"]["dynCall_viiiiffiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiii = Module["dynCall_viiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiii = Module["dynCall_viiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_diiii = Module["dynCall_diiii"] = function() { + return (dynCall_diiii = Module["dynCall_diiii"] = Module["asm"]["dynCall_diiii"]).apply(null, arguments) + } + ; + var dynCall_jijii = Module["dynCall_jijii"] = function() { + return (dynCall_jijii = Module["dynCall_jijii"] = Module["asm"]["dynCall_jijii"]).apply(null, arguments) + } + ; + var dynCall_iijiiii = Module["dynCall_iijiiii"] = function() { + return (dynCall_iijiiii = Module["dynCall_iijiiii"] = Module["asm"]["dynCall_iijiiii"]).apply(null, arguments) + } + ; + var dynCall_jijiii = Module["dynCall_jijiii"] = function() { + return (dynCall_jijiii = Module["dynCall_jijiii"] = Module["asm"]["dynCall_jijiii"]).apply(null, arguments) + } + ; + var dynCall_iijiiiiii = Module["dynCall_iijiiiiii"] = function() { + return (dynCall_iijiiiiii = Module["dynCall_iijiiiiii"] = Module["asm"]["dynCall_iijiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iijjiiiiii = Module["dynCall_iijjiiiiii"] = function() { + return (dynCall_iijjiiiiii = Module["dynCall_iijjiiiiii"] = Module["asm"]["dynCall_iijjiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiijjii = Module["dynCall_iiiijjii"] = function() { + return (dynCall_iiiijjii = Module["dynCall_iiiijjii"] = Module["asm"]["dynCall_iiiijjii"]).apply(null, arguments) + } + ; + var dynCall_iijii = Module["dynCall_iijii"] = function() { + return (dynCall_iijii = Module["dynCall_iijii"] = Module["asm"]["dynCall_iijii"]).apply(null, arguments) + } + ; + var dynCall_j = Module["dynCall_j"] = function() { + return (dynCall_j = Module["dynCall_j"] = Module["asm"]["dynCall_j"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiji = Module["dynCall_iiiiiiiiiji"] = function() { + return (dynCall_iiiiiiiiiji = Module["dynCall_iiiiiiiiiji"] = Module["asm"]["dynCall_iiiiiiiiiji"]).apply(null, arguments) + } + ; + var dynCall_vji = Module["dynCall_vji"] = function() { + return (dynCall_vji = Module["dynCall_vji"] = Module["asm"]["dynCall_vji"]).apply(null, arguments) + } + ; + var dynCall_vfiii = Module["dynCall_vfiii"] = function() { + return (dynCall_vfiii = Module["dynCall_vfiii"] = Module["asm"]["dynCall_vfiii"]).apply(null, arguments) + } + ; + var dynCall_iidi = Module["dynCall_iidi"] = function() { + return (dynCall_iidi = Module["dynCall_iidi"] = Module["asm"]["dynCall_iidi"]).apply(null, arguments) + } + ; + var dynCall_viiiifi = Module["dynCall_viiiifi"] = function() { + return (dynCall_viiiifi = Module["dynCall_viiiifi"] = Module["asm"]["dynCall_viiiifi"]).apply(null, arguments) + } + ; + var dynCall_viiififiii = Module["dynCall_viiififiii"] = function() { + return (dynCall_viiififiii = Module["dynCall_viiififiii"] = Module["asm"]["dynCall_viiififiii"]).apply(null, arguments) + } + ; + var dynCall_fiiffi = Module["dynCall_fiiffi"] = function() { + return (dynCall_fiiffi = Module["dynCall_fiiffi"] = Module["asm"]["dynCall_fiiffi"]).apply(null, arguments) + } + ; + var dynCall_viififiiii = Module["dynCall_viififiiii"] = function() { + return (dynCall_viififiiii = Module["dynCall_viififiiii"] = Module["asm"]["dynCall_viififiiii"]).apply(null, arguments) + } + ; + var dynCall_vififiiii = Module["dynCall_vififiiii"] = function() { + return (dynCall_vififiiii = Module["dynCall_vififiiii"] = Module["asm"]["dynCall_vififiiii"]).apply(null, arguments) + } + ; + var dynCall_vifii = Module["dynCall_vifii"] = function() { + return (dynCall_vifii = Module["dynCall_vifii"] = Module["asm"]["dynCall_vifii"]).apply(null, arguments) + } + ; + var dynCall_ijiii = Module["dynCall_ijiii"] = function() { + return (dynCall_ijiii = Module["dynCall_ijiii"] = Module["asm"]["dynCall_ijiii"]).apply(null, arguments) + } + ; + var dynCall_viiifi = Module["dynCall_viiifi"] = function() { + return (dynCall_viiifi = Module["dynCall_viiifi"] = Module["asm"]["dynCall_viiifi"]).apply(null, arguments) + } + ; + var dynCall_iiifi = Module["dynCall_iiifi"] = function() { + return (dynCall_iiifi = Module["dynCall_iiifi"] = Module["asm"]["dynCall_iiifi"]).apply(null, arguments) + } + ; + var dynCall_viidiji = Module["dynCall_viidiji"] = function() { + return (dynCall_viidiji = Module["dynCall_viidiji"] = Module["asm"]["dynCall_viidiji"]).apply(null, arguments) + } + ; + var dynCall_viidjii = Module["dynCall_viidjii"] = function() { + return (dynCall_viidjii = Module["dynCall_viidjii"] = Module["asm"]["dynCall_viidjii"]).apply(null, arguments) + } + ; + var dynCall_viiifii = Module["dynCall_viiifii"] = function() { + return (dynCall_viiifii = Module["dynCall_viiifii"] = Module["asm"]["dynCall_viiifii"]).apply(null, arguments) + } + ; + var dynCall_viiffii = Module["dynCall_viiffii"] = function() { + return (dynCall_viiffii = Module["dynCall_viiffii"] = Module["asm"]["dynCall_viiffii"]).apply(null, arguments) + } + ; + var dynCall_iijji = Module["dynCall_iijji"] = function() { + return (dynCall_iijji = Module["dynCall_iijji"] = Module["asm"]["dynCall_iijji"]).apply(null, arguments) + } + ; + var dynCall_fi = Module["dynCall_fi"] = function() { + return (dynCall_fi = Module["dynCall_fi"] = Module["asm"]["dynCall_fi"]).apply(null, arguments) + } + ; + var dynCall_vifiii = Module["dynCall_vifiii"] = function() { + return (dynCall_vifiii = Module["dynCall_vifiii"] = Module["asm"]["dynCall_vifiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiji = Module["dynCall_iiiiiji"] = function() { + return (dynCall_iiiiiji = Module["dynCall_iiiiiji"] = Module["asm"]["dynCall_iiiiiji"]).apply(null, arguments) + } + ; + var dynCall_iiddi = Module["dynCall_iiddi"] = function() { + return (dynCall_iiddi = Module["dynCall_iiddi"] = Module["asm"]["dynCall_iiddi"]).apply(null, arguments) + } + ; + var dynCall_ddiii = Module["dynCall_ddiii"] = function() { + return (dynCall_ddiii = Module["dynCall_ddiii"] = Module["asm"]["dynCall_ddiii"]).apply(null, arguments) + } + ; + var dynCall_vijiii = Module["dynCall_vijiii"] = function() { + return (dynCall_vijiii = Module["dynCall_vijiii"] = Module["asm"]["dynCall_vijiii"]).apply(null, arguments) + } + ; + var dynCall_vjjjiiii = Module["dynCall_vjjjiiii"] = function() { + return (dynCall_vjjjiiii = Module["dynCall_vjjjiiii"] = Module["asm"]["dynCall_vjjjiiii"]).apply(null, arguments) + } + ; + var dynCall_vjiiiii = Module["dynCall_vjiiiii"] = function() { + return (dynCall_vjiiiii = Module["dynCall_vjiiiii"] = Module["asm"]["dynCall_vjiiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiiii = Module["dynCall_jiiiii"] = function() { + return (dynCall_jiiiii = Module["dynCall_jiiiii"] = Module["asm"]["dynCall_jiiiii"]).apply(null, arguments) + } + ; + var dynCall_ifi = Module["dynCall_ifi"] = function() { + return (dynCall_ifi = Module["dynCall_ifi"] = Module["asm"]["dynCall_ifi"]).apply(null, arguments) + } + ; + var dynCall_vfi = Module["dynCall_vfi"] = function() { + return (dynCall_vfi = Module["dynCall_vfi"] = Module["asm"]["dynCall_vfi"]).apply(null, arguments) + } + ; + var dynCall_jdji = Module["dynCall_jdji"] = function() { + return (dynCall_jdji = Module["dynCall_jdji"] = Module["asm"]["dynCall_jdji"]).apply(null, arguments) + } + ; + var dynCall_djji = Module["dynCall_djji"] = function() { + return (dynCall_djji = Module["dynCall_djji"] = Module["asm"]["dynCall_djji"]).apply(null, arguments) + } + ; + var dynCall_jjiii = Module["dynCall_jjiii"] = function() { + return (dynCall_jjiii = Module["dynCall_jjiii"] = Module["asm"]["dynCall_jjiii"]).apply(null, arguments) + } + ; + var dynCall_vijji = Module["dynCall_vijji"] = function() { + return (dynCall_vijji = Module["dynCall_vijji"] = Module["asm"]["dynCall_vijji"]).apply(null, arguments) + } + ; + var dynCall_dji = Module["dynCall_dji"] = function() { + return (dynCall_dji = Module["dynCall_dji"] = Module["asm"]["dynCall_dji"]).apply(null, arguments) + } + ; + var dynCall_ifii = Module["dynCall_ifii"] = function() { + return (dynCall_ifii = Module["dynCall_ifii"] = Module["asm"]["dynCall_ifii"]).apply(null, arguments) + } + ; + var dynCall_jji = Module["dynCall_jji"] = function() { + return (dynCall_jji = Module["dynCall_jji"] = Module["asm"]["dynCall_jji"]).apply(null, arguments) + } + ; + var dynCall_viffffi = Module["dynCall_viffffi"] = function() { + return (dynCall_viffffi = Module["dynCall_viffffi"] = Module["asm"]["dynCall_viffffi"]).apply(null, arguments) + } + ; + var dynCall_viffffii = Module["dynCall_viffffii"] = function() { + return (dynCall_viffffii = Module["dynCall_viffffii"] = Module["asm"]["dynCall_viffffii"]).apply(null, arguments) + } + ; + var dynCall_viffi = Module["dynCall_viffi"] = function() { + return (dynCall_viffi = Module["dynCall_viffi"] = Module["asm"]["dynCall_viffi"]).apply(null, arguments) + } + ; + var dynCall_viffii = Module["dynCall_viffii"] = function() { + return (dynCall_viffii = Module["dynCall_viffii"] = Module["asm"]["dynCall_viffii"]).apply(null, arguments) + } + ; + var dynCall_vifffi = Module["dynCall_vifffi"] = function() { + return (dynCall_vifffi = Module["dynCall_vifffi"] = Module["asm"]["dynCall_vifffi"]).apply(null, arguments) + } + ; + var dynCall_vifffii = Module["dynCall_vifffii"] = function() { + return (dynCall_vifffii = Module["dynCall_vifffii"] = Module["asm"]["dynCall_vifffii"]).apply(null, arguments) + } + ; + var dynCall_iifii = Module["dynCall_iifii"] = function() { + return (dynCall_iifii = Module["dynCall_iifii"] = Module["asm"]["dynCall_iifii"]).apply(null, arguments) + } + ; + var dynCall_iifiii = Module["dynCall_iifiii"] = function() { + return (dynCall_iifiii = Module["dynCall_iifiii"] = Module["asm"]["dynCall_iifiii"]).apply(null, arguments) + } + ; + var dynCall_iiifiii = Module["dynCall_iiifiii"] = function() { + return (dynCall_iiifiii = Module["dynCall_iiifiii"] = Module["asm"]["dynCall_iiifiii"]).apply(null, arguments) + } + ; + var dynCall_vfiiii = Module["dynCall_vfiiii"] = function() { + return (dynCall_vfiiii = Module["dynCall_vfiiii"] = Module["asm"]["dynCall_vfiiii"]).apply(null, arguments) + } + ; + var dynCall_vidji = Module["dynCall_vidji"] = function() { + return (dynCall_vidji = Module["dynCall_vidji"] = Module["asm"]["dynCall_vidji"]).apply(null, arguments) + } + ; + var dynCall_iiffii = Module["dynCall_iiffii"] = function() { + return (dynCall_iiffii = Module["dynCall_iiffii"] = Module["asm"]["dynCall_iiffii"]).apply(null, arguments) + } + ; + var dynCall_iiififii = Module["dynCall_iiififii"] = function() { + return (dynCall_iiififii = Module["dynCall_iiififii"] = Module["asm"]["dynCall_iiififii"]).apply(null, arguments) + } + ; + var dynCall_iiffifiiii = Module["dynCall_iiffifiiii"] = function() { + return (dynCall_iiffifiiii = Module["dynCall_iiffifiiii"] = Module["asm"]["dynCall_iiffifiiii"]).apply(null, arguments) + } + ; + var dynCall_iifiifiiii = Module["dynCall_iifiifiiii"] = function() { + return (dynCall_iifiifiiii = Module["dynCall_iifiifiiii"] = Module["asm"]["dynCall_iifiifiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifiii = Module["dynCall_iiiifiii"] = function() { + return (dynCall_iiiifiii = Module["dynCall_iiiifiii"] = Module["asm"]["dynCall_iiiifiii"]).apply(null, arguments) + } + ; + var dynCall_iiifiiii = Module["dynCall_iiifiiii"] = function() { + return (dynCall_iiifiiii = Module["dynCall_iiifiiii"] = Module["asm"]["dynCall_iiifiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiffiii = Module["dynCall_iiiffiii"] = function() { + return (dynCall_iiiffiii = Module["dynCall_iiiffiii"] = Module["asm"]["dynCall_iiiffiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiifii = Module["dynCall_iiiiifii"] = function() { + return (dynCall_iiiiifii = Module["dynCall_iiiiifii"] = Module["asm"]["dynCall_iiiiifii"]).apply(null, arguments) + } + ; + var dynCall_vifffiii = Module["dynCall_vifffiii"] = function() { + return (dynCall_vifffiii = Module["dynCall_vifffiii"] = Module["asm"]["dynCall_vifffiii"]).apply(null, arguments) + } + ; + var dynCall_iiiififi = Module["dynCall_iiiififi"] = function() { + return (dynCall_iiiififi = Module["dynCall_iiiififi"] = Module["asm"]["dynCall_iiiififi"]).apply(null, arguments) + } + ; + var dynCall_vifiiii = Module["dynCall_vifiiii"] = function() { + return (dynCall_vifiiii = Module["dynCall_vifiiii"] = Module["asm"]["dynCall_vifiiii"]).apply(null, arguments) + } + ; + var dynCall_fifii = Module["dynCall_fifii"] = function() { + return (dynCall_fifii = Module["dynCall_fifii"] = Module["asm"]["dynCall_fifii"]).apply(null, arguments) + } + ; + var dynCall_ffffi = Module["dynCall_ffffi"] = function() { + return (dynCall_ffffi = Module["dynCall_ffffi"] = Module["asm"]["dynCall_ffffi"]).apply(null, arguments) + } + ; + var dynCall_viifiiii = Module["dynCall_viifiiii"] = function() { + return (dynCall_viifiiii = Module["dynCall_viifiiii"] = Module["asm"]["dynCall_viifiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiffi = Module["dynCall_viiiffi"] = function() { + return (dynCall_viiiffi = Module["dynCall_viiiffi"] = Module["asm"]["dynCall_viiiffi"]).apply(null, arguments) + } + ; + var dynCall_vidii = Module["dynCall_vidii"] = function() { + return (dynCall_vidii = Module["dynCall_vidii"] = Module["asm"]["dynCall_vidii"]).apply(null, arguments) + } + ; + var dynCall_vfii = Module["dynCall_vfii"] = function() { + return (dynCall_vfii = Module["dynCall_vfii"] = Module["asm"]["dynCall_vfii"]).apply(null, arguments) + } + ; + var dynCall_ifiii = Module["dynCall_ifiii"] = function() { + return (dynCall_ifiii = Module["dynCall_ifiii"] = Module["asm"]["dynCall_ifiii"]).apply(null, arguments) + } + ; + var dynCall_vidiii = Module["dynCall_vidiii"] = function() { + return (dynCall_vidiii = Module["dynCall_vidiii"] = Module["asm"]["dynCall_vidiii"]).apply(null, arguments) + } + ; + var dynCall_viiidi = Module["dynCall_viiidi"] = function() { + return (dynCall_viiidi = Module["dynCall_viiidi"] = Module["asm"]["dynCall_viiidi"]).apply(null, arguments) + } + ; + var dynCall_idii = Module["dynCall_idii"] = function() { + return (dynCall_idii = Module["dynCall_idii"] = Module["asm"]["dynCall_idii"]).apply(null, arguments) + } + ; + var dynCall_idi = Module["dynCall_idi"] = function() { + return (dynCall_idi = Module["dynCall_idi"] = Module["asm"]["dynCall_idi"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiifiiiii = Module["dynCall_viiiiiiiiiifiiiii"] = function() { + return (dynCall_viiiiiiiiiifiiiii = Module["dynCall_viiiiiiiiiifiiiii"] = Module["asm"]["dynCall_viiiiiiiiiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_iifffii = Module["dynCall_iifffii"] = function() { + return (dynCall_iifffii = Module["dynCall_iifffii"] = Module["asm"]["dynCall_iifffii"]).apply(null, arguments) + } + ; + var dynCall_ffi = Module["dynCall_ffi"] = function() { + return (dynCall_ffi = Module["dynCall_ffi"] = Module["asm"]["dynCall_ffi"]).apply(null, arguments) + } + ; + var dynCall_ffffffi = Module["dynCall_ffffffi"] = function() { + return (dynCall_ffffffi = Module["dynCall_ffffffi"] = Module["asm"]["dynCall_ffffffi"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiifii = Module["dynCall_iiiiiiifii"] = function() { + return (dynCall_iiiiiiifii = Module["dynCall_iiiiiiifii"] = Module["asm"]["dynCall_iiiiiiifii"]).apply(null, arguments) + } + ; + var dynCall_fiiifi = Module["dynCall_fiiifi"] = function() { + return (dynCall_fiiifi = Module["dynCall_fiiifi"] = Module["asm"]["dynCall_fiiifi"]).apply(null, arguments) + } + ; + var dynCall_viiiiffffi = Module["dynCall_viiiiffffi"] = function() { + return (dynCall_viiiiffffi = Module["dynCall_viiiiffffi"] = Module["asm"]["dynCall_viiiiffffi"]).apply(null, arguments) + } + ; + var dynCall_fiiiiii = Module["dynCall_fiiiiii"] = function() { + return (dynCall_fiiiiii = Module["dynCall_fiiiiii"] = Module["asm"]["dynCall_fiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiifiiii = Module["dynCall_viiifiiii"] = function() { + return (dynCall_viiifiiii = Module["dynCall_viiifiiii"] = Module["asm"]["dynCall_viiifiiii"]).apply(null, arguments) + } + ; + var dynCall_vifffiiii = Module["dynCall_vifffiiii"] = function() { + return (dynCall_vifffiiii = Module["dynCall_vifffiiii"] = Module["asm"]["dynCall_vifffiiii"]).apply(null, arguments) + } + ; + var dynCall_fifffi = Module["dynCall_fifffi"] = function() { + return (dynCall_fifffi = Module["dynCall_fifffi"] = Module["asm"]["dynCall_fifffi"]).apply(null, arguments) + } + ; + var dynCall_viiiiffi = Module["dynCall_viiiiffi"] = function() { + return (dynCall_viiiiffi = Module["dynCall_viiiiffi"] = Module["asm"]["dynCall_viiiiffi"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiififffi = Module["dynCall_viiiiiiififffi"] = function() { + return (dynCall_viiiiiiififffi = Module["dynCall_viiiiiiififffi"] = Module["asm"]["dynCall_viiiiiiififffi"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiffffi = Module["dynCall_viiiiiiiiffffi"] = function() { + return (dynCall_viiiiiiiiffffi = Module["dynCall_viiiiiiiiffffi"] = Module["asm"]["dynCall_viiiiiiiiffffi"]).apply(null, arguments) + } + ; + var dynCall_vififi = Module["dynCall_vififi"] = function() { + return (dynCall_vififi = Module["dynCall_vififi"] = Module["asm"]["dynCall_vififi"]).apply(null, arguments) + } + ; + var dynCall_iiiffffi = Module["dynCall_iiiffffi"] = function() { + return (dynCall_iiiffffi = Module["dynCall_iiiffffi"] = Module["asm"]["dynCall_iiiffffi"]).apply(null, arguments) + } + ; + var dynCall_iififfi = Module["dynCall_iififfi"] = function() { + return (dynCall_iififfi = Module["dynCall_iififfi"] = Module["asm"]["dynCall_iififfi"]).apply(null, arguments) + } + ; + var dynCall_iffiffi = Module["dynCall_iffiffi"] = function() { + return (dynCall_iffiffi = Module["dynCall_iffiffi"] = Module["asm"]["dynCall_iffiffi"]).apply(null, arguments) + } + ; + var dynCall_viffffiiii = Module["dynCall_viffffiiii"] = function() { + return (dynCall_viffffiiii = Module["dynCall_viffffiiii"] = Module["asm"]["dynCall_viffffiiii"]).apply(null, arguments) + } + ; + var dynCall_iiffffiii = Module["dynCall_iiffffiii"] = function() { + return (dynCall_iiffffiii = Module["dynCall_iiffffiii"] = Module["asm"]["dynCall_iiffffiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiifi = Module["dynCall_viiiiifi"] = function() { + return (dynCall_viiiiifi = Module["dynCall_viiiiifi"] = Module["asm"]["dynCall_viiiiifi"]).apply(null, arguments) + } + ; + var dynCall_vffi = Module["dynCall_vffi"] = function() { + return (dynCall_vffi = Module["dynCall_vffi"] = Module["asm"]["dynCall_vffi"]).apply(null, arguments) + } + ; + var dynCall_iiiffi = Module["dynCall_iiiffi"] = function() { + return (dynCall_iiiffi = Module["dynCall_iiiffi"] = Module["asm"]["dynCall_iiiffi"]).apply(null, arguments) + } + ; + var dynCall_iiidfi = Module["dynCall_iiidfi"] = function() { + return (dynCall_iiidfi = Module["dynCall_iiidfi"] = Module["asm"]["dynCall_iiidfi"]).apply(null, arguments) + } + ; + var dynCall_iiijfi = Module["dynCall_iiijfi"] = function() { + return (dynCall_iiijfi = Module["dynCall_iiijfi"] = Module["asm"]["dynCall_iiijfi"]).apply(null, arguments) + } + ; + var dynCall_iiiffii = Module["dynCall_iiiffii"] = function() { + return (dynCall_iiiffii = Module["dynCall_iiiffii"] = Module["asm"]["dynCall_iiiffii"]).apply(null, arguments) + } + ; + var dynCall_iifffi = Module["dynCall_iifffi"] = function() { + return (dynCall_iifffi = Module["dynCall_iifffi"] = Module["asm"]["dynCall_iifffi"]).apply(null, arguments) + } + ; + var dynCall_iiiffifiiii = Module["dynCall_iiiffifiiii"] = function() { + return (dynCall_iiiffifiiii = Module["dynCall_iiiffifiiii"] = Module["asm"]["dynCall_iiiffifiiii"]).apply(null, arguments) + } + ; + var dynCall_iiifiifiii = Module["dynCall_iiifiifiii"] = function() { + return (dynCall_iiifiifiii = Module["dynCall_iiifiifiii"] = Module["asm"]["dynCall_iiifiifiii"]).apply(null, arguments) + } + ; + var dynCall_iiifiifiiiii = Module["dynCall_iiifiifiiiii"] = function() { + return (dynCall_iiifiifiiiii = Module["dynCall_iiifiifiiiii"] = Module["asm"]["dynCall_iiifiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_ifffii = Module["dynCall_ifffii"] = function() { + return (dynCall_ifffii = Module["dynCall_ifffii"] = Module["asm"]["dynCall_ifffii"]).apply(null, arguments) + } + ; + var dynCall_ffffii = Module["dynCall_ffffii"] = function() { + return (dynCall_ffffii = Module["dynCall_ffffii"] = Module["asm"]["dynCall_ffffii"]).apply(null, arguments) + } + ; + var dynCall_ffffifi = Module["dynCall_ffffifi"] = function() { + return (dynCall_ffffifi = Module["dynCall_ffffifi"] = Module["asm"]["dynCall_ffffifi"]).apply(null, arguments) + } + ; + var dynCall_ffffiffi = Module["dynCall_ffffiffi"] = function() { + return (dynCall_ffffiffi = Module["dynCall_ffffiffi"] = Module["asm"]["dynCall_ffffiffi"]).apply(null, arguments) + } + ; + var dynCall_viiififi = Module["dynCall_viiififi"] = function() { + return (dynCall_viiififi = Module["dynCall_viiififi"] = Module["asm"]["dynCall_viiififi"]).apply(null, arguments) + } + ; + var dynCall_viiififfi = Module["dynCall_viiififfi"] = function() { + return (dynCall_viiififfi = Module["dynCall_viiififfi"] = Module["asm"]["dynCall_viiififfi"]).apply(null, arguments) + } + ; + var dynCall_iifiiiiii = Module["dynCall_iifiiiiii"] = function() { + return (dynCall_iifiiiiii = Module["dynCall_iifiiiiii"] = Module["asm"]["dynCall_iifiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iifiiiii = Module["dynCall_iifiiiii"] = function() { + return (dynCall_iifiiiii = Module["dynCall_iifiiiii"] = Module["asm"]["dynCall_iifiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiffiiiii = Module["dynCall_iiffiiiii"] = function() { + return (dynCall_iiffiiiii = Module["dynCall_iiffiiiii"] = Module["asm"]["dynCall_iiffiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiffifiii = Module["dynCall_iiffifiii"] = function() { + return (dynCall_iiffifiii = Module["dynCall_iiffifiii"] = Module["asm"]["dynCall_iiffifiii"]).apply(null, arguments) + } + ; + var dynCall_iifiifiii = Module["dynCall_iifiifiii"] = function() { + return (dynCall_iifiifiii = Module["dynCall_iifiifiii"] = Module["asm"]["dynCall_iifiifiii"]).apply(null, arguments) + } + ; + var dynCall_iififi = Module["dynCall_iififi"] = function() { + return (dynCall_iififi = Module["dynCall_iififi"] = Module["asm"]["dynCall_iififi"]).apply(null, arguments) + } + ; + var dynCall_iiififi = Module["dynCall_iiififi"] = function() { + return (dynCall_iiififi = Module["dynCall_iiififi"] = Module["asm"]["dynCall_iiififi"]).apply(null, arguments) + } + ; + var dynCall_iiifiiiii = Module["dynCall_iiifiiiii"] = function() { + return (dynCall_iiifiiiii = Module["dynCall_iiifiiiii"] = Module["asm"]["dynCall_iiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiifiiii = Module["dynCall_iiiiifiiii"] = function() { + return (dynCall_iiiiifiiii = Module["dynCall_iiiiifiiii"] = Module["asm"]["dynCall_iiiiifiiii"]).apply(null, arguments) + } + ; + var dynCall_fiifii = Module["dynCall_fiifii"] = function() { + return (dynCall_fiifii = Module["dynCall_fiifii"] = Module["asm"]["dynCall_fiifii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiifiifiiii = Module["dynCall_viiiiiifiifiiii"] = function() { + return (dynCall_viiiiiifiifiiii = Module["dynCall_viiiiiifiifiiii"] = Module["asm"]["dynCall_viiiiiifiifiiii"]).apply(null, arguments) + } + ; + var dynCall_viidiii = Module["dynCall_viidiii"] = function() { + return (dynCall_viidiii = Module["dynCall_viidiii"] = Module["asm"]["dynCall_viidiii"]).apply(null, arguments) + } + ; + var dynCall_fiifdi = Module["dynCall_fiifdi"] = function() { + return (dynCall_fiifdi = Module["dynCall_fiifdi"] = Module["asm"]["dynCall_fiifdi"]).apply(null, arguments) + } + ; + var dynCall_viiiiiifddfiiii = Module["dynCall_viiiiiifddfiiii"] = function() { + return (dynCall_viiiiiifddfiiii = Module["dynCall_viiiiiifddfiiii"] = Module["asm"]["dynCall_viiiiiifddfiiii"]).apply(null, arguments) + } + ; + var dynCall_viijiii = Module["dynCall_viijiii"] = function() { + return (dynCall_viijiii = Module["dynCall_viijiii"] = Module["asm"]["dynCall_viijiii"]).apply(null, arguments) + } + ; + var dynCall_fiifji = Module["dynCall_fiifji"] = function() { + return (dynCall_fiifji = Module["dynCall_fiifji"] = Module["asm"]["dynCall_fiifji"]).apply(null, arguments) + } + ; + var dynCall_viiiiiifjjfiiii = Module["dynCall_viiiiiifjjfiiii"] = function() { + return (dynCall_viiiiiifjjfiiii = Module["dynCall_viiiiiifjjfiiii"] = Module["asm"]["dynCall_viiiiiifjjfiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiifiii = Module["dynCall_viiiifiii"] = function() { + return (dynCall_viiiifiii = Module["dynCall_viiiifiii"] = Module["asm"]["dynCall_viiiifiii"]).apply(null, arguments) + } + ; + var dynCall_viifiii = Module["dynCall_viifiii"] = function() { + return (dynCall_viifiii = Module["dynCall_viifiii"] = Module["asm"]["dynCall_viifiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiffffiiii = Module["dynCall_viiiiiiffffiiii"] = function() { + return (dynCall_viiiiiiffffiiii = Module["dynCall_viiiiiiffffiiii"] = Module["asm"]["dynCall_viiiiiiffffiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiifiii = Module["dynCall_iiiiifiii"] = function() { + return (dynCall_iiiiifiii = Module["dynCall_iiiiifiii"] = Module["asm"]["dynCall_iiiiifiii"]).apply(null, arguments) + } + ; + var dynCall_fffffi = Module["dynCall_fffffi"] = function() { + return (dynCall_fffffi = Module["dynCall_fffffi"] = Module["asm"]["dynCall_fffffi"]).apply(null, arguments) + } + ; + var dynCall_fiiffffi = Module["dynCall_fiiffffi"] = function() { + return (dynCall_fiiffffi = Module["dynCall_fiiffffi"] = Module["asm"]["dynCall_fiiffffi"]).apply(null, arguments) + } + ; + var dynCall_fffifffi = Module["dynCall_fffifffi"] = function() { + return (dynCall_fffifffi = Module["dynCall_fffifffi"] = Module["asm"]["dynCall_fffifffi"]).apply(null, arguments) + } + ; + var dynCall_viidii = Module["dynCall_viidii"] = function() { + return (dynCall_viidii = Module["dynCall_viidii"] = Module["asm"]["dynCall_viidii"]).apply(null, arguments) + } + ; + var dynCall_ifffi = Module["dynCall_ifffi"] = function() { + return (dynCall_ifffi = Module["dynCall_ifffi"] = Module["asm"]["dynCall_ifffi"]).apply(null, arguments) + } + ; + var dynCall_viiijii = Module["dynCall_viiijii"] = function() { + return (dynCall_viiijii = Module["dynCall_viiijii"] = Module["asm"]["dynCall_viiijii"]).apply(null, arguments) + } + ; + var dynCall_viiiiji = Module["dynCall_viiiiji"] = function() { + return (dynCall_viiiiji = Module["dynCall_viiiiji"] = Module["asm"]["dynCall_viiiiji"]).apply(null, arguments) + } + ; + var dynCall_iiiji = Module["dynCall_iiiji"] = function() { + return (dynCall_iiiji = Module["dynCall_iiiji"] = Module["asm"]["dynCall_iiiji"]).apply(null, arguments) + } + ; + var dynCall_ijjiiii = Module["dynCall_ijjiiii"] = function() { + return (dynCall_ijjiiii = Module["dynCall_ijjiiii"] = Module["asm"]["dynCall_ijjiiii"]).apply(null, arguments) + } + ; + var dynCall_iiijji = Module["dynCall_iiijji"] = function() { + return (dynCall_iiijji = Module["dynCall_iiijji"] = Module["asm"]["dynCall_iiijji"]).apply(null, arguments) + } + ; + var dynCall_ijii = Module["dynCall_ijii"] = function() { + return (dynCall_ijii = Module["dynCall_ijii"] = Module["asm"]["dynCall_ijii"]).apply(null, arguments) + } + ; + var dynCall_ijiiii = Module["dynCall_ijiiii"] = function() { + return (dynCall_ijiiii = Module["dynCall_ijiiii"] = Module["asm"]["dynCall_ijiiii"]).apply(null, arguments) + } + ; + var dynCall_iidii = Module["dynCall_iidii"] = function() { + return (dynCall_iidii = Module["dynCall_iidii"] = Module["asm"]["dynCall_iidii"]).apply(null, arguments) + } + ; + var dynCall_iidiii = Module["dynCall_iidiii"] = function() { + return (dynCall_iidiii = Module["dynCall_iidiii"] = Module["asm"]["dynCall_iidiii"]).apply(null, arguments) + } + ; + var dynCall_jidi = Module["dynCall_jidi"] = function() { + return (dynCall_jidi = Module["dynCall_jidi"] = Module["asm"]["dynCall_jidi"]).apply(null, arguments) + } + ; + var dynCall_diji = Module["dynCall_diji"] = function() { + return (dynCall_diji = Module["dynCall_diji"] = Module["asm"]["dynCall_diji"]).apply(null, arguments) + } + ; + var dynCall_fidi = Module["dynCall_fidi"] = function() { + return (dynCall_fidi = Module["dynCall_fidi"] = Module["asm"]["dynCall_fidi"]).apply(null, arguments) + } + ; + var dynCall_viffifi = Module["dynCall_viffifi"] = function() { + return (dynCall_viffifi = Module["dynCall_viffifi"] = Module["asm"]["dynCall_viffifi"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiffiii = Module["dynCall_viiiiiiffiii"] = function() { + return (dynCall_viiiiiiffiii = Module["dynCall_viiiiiiffiii"] = Module["asm"]["dynCall_viiiiiiffiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiiffii = Module["dynCall_viiiiiiiiiiiiiiiffii"] = function() { + return (dynCall_viiiiiiiiiiiiiiiffii = Module["dynCall_viiiiiiiiiiiiiiiffii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiiffii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiffi = Module["dynCall_viiiiiffi"] = function() { + return (dynCall_viiiiiffi = Module["dynCall_viiiiiffi"] = Module["asm"]["dynCall_viiiiiffi"]).apply(null, arguments) + } + ; + var dynCall_vfiiiii = Module["dynCall_vfiiiii"] = function() { + return (dynCall_vfiiiii = Module["dynCall_vfiiiii"] = Module["asm"]["dynCall_vfiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiii = Module["dynCall_viiffiii"] = function() { + return (dynCall_viiffiii = Module["dynCall_viiffiii"] = Module["asm"]["dynCall_viiffiii"]).apply(null, arguments) + } + ; + var dynCall_viiiffiiii = Module["dynCall_viiiffiiii"] = function() { + return (dynCall_viiiffiiii = Module["dynCall_viiiffiiii"] = Module["asm"]["dynCall_viiiffiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiffii = Module["dynCall_viiffiffii"] = function() { + return (dynCall_viiffiffii = Module["dynCall_viiffiffii"] = Module["asm"]["dynCall_viiffiffii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiii = Module["dynCall_viiffiiii"] = function() { + return (dynCall_viiffiiii = Module["dynCall_viiffiiii"] = Module["asm"]["dynCall_viiffiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiiiii = Module["dynCall_viiffiiiiii"] = function() { + return (dynCall_viiffiiiiii = Module["dynCall_viiffiiiiii"] = Module["asm"]["dynCall_viiffiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiiiiii = Module["dynCall_viiffiiiiiii"] = function() { + return (dynCall_viiffiiiiiii = Module["dynCall_viiffiiiiiii"] = Module["asm"]["dynCall_viiffiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffffffffffffiiiii = Module["dynCall_viiffffffffffffiiiii"] = function() { + return (dynCall_viiffffffffffffiiiii = Module["dynCall_viiffffffffffffiiiii"] = Module["asm"]["dynCall_viiffffffffffffiiiii"]).apply(null, arguments) + } + ; + var dynCall_viifffi = Module["dynCall_viifffi"] = function() { + return (dynCall_viifffi = Module["dynCall_viifffi"] = Module["asm"]["dynCall_viifffi"]).apply(null, arguments) + } + ; + var dynCall_viififi = Module["dynCall_viififi"] = function() { + return (dynCall_viififi = Module["dynCall_viififi"] = Module["asm"]["dynCall_viififi"]).apply(null, arguments) + } + ; + var dynCall_viififfi = Module["dynCall_viififfi"] = function() { + return (dynCall_viififfi = Module["dynCall_viififfi"] = Module["asm"]["dynCall_viififfi"]).apply(null, arguments) + } + ; + var dynCall_fji = Module["dynCall_fji"] = function() { + return (dynCall_fji = Module["dynCall_fji"] = Module["asm"]["dynCall_fji"]).apply(null, arguments) + } + ; + var dynCall_vjii = Module["dynCall_vjii"] = function() { + return (dynCall_vjii = Module["dynCall_vjii"] = Module["asm"]["dynCall_vjii"]).apply(null, arguments) + } + ; + var dynCall_ijjiii = Module["dynCall_ijjiii"] = function() { + return (dynCall_ijjiii = Module["dynCall_ijjiii"] = Module["asm"]["dynCall_ijjiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifiiiiii = Module["dynCall_iiiifiiiiii"] = function() { + return (dynCall_iiiifiiiiii = Module["dynCall_iiiifiiiiii"] = Module["asm"]["dynCall_iiiifiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifiiiii = Module["dynCall_iiiifiiiii"] = function() { + return (dynCall_iiiifiiiii = Module["dynCall_iiiifiiiii"] = Module["asm"]["dynCall_iiiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifiiii = Module["dynCall_iiiifiiii"] = function() { + return (dynCall_iiiifiiii = Module["dynCall_iiiifiiii"] = Module["asm"]["dynCall_iiiifiiii"]).apply(null, arguments) + } + ; + var dynCall_iffffi = Module["dynCall_iffffi"] = function() { + return (dynCall_iffffi = Module["dynCall_iffffi"] = Module["asm"]["dynCall_iffffi"]).apply(null, arguments) + } + ; + var dynCall_diiiii = Module["dynCall_diiiii"] = function() { + return (dynCall_diiiii = Module["dynCall_diiiii"] = Module["asm"]["dynCall_diiiii"]).apply(null, arguments) + } + ; + var dynCall_vfffi = Module["dynCall_vfffi"] = function() { + return (dynCall_vfffi = Module["dynCall_vfffi"] = Module["asm"]["dynCall_vfffi"]).apply(null, arguments) + } + ; + var dynCall_vffffi = Module["dynCall_vffffi"] = function() { + return (dynCall_vffffi = Module["dynCall_vffffi"] = Module["asm"]["dynCall_vffffi"]).apply(null, arguments) + } + ; + var dynCall_viiiffii = Module["dynCall_viiiffii"] = function() { + return (dynCall_viiiffii = Module["dynCall_viiiffii"] = Module["asm"]["dynCall_viiiffii"]).apply(null, arguments) + } + ; + var dynCall_viffffffi = Module["dynCall_viffffffi"] = function() { + return (dynCall_viffffffi = Module["dynCall_viffffffi"] = Module["asm"]["dynCall_viffffffi"]).apply(null, arguments) + } + ; + var dynCall_vffffffii = Module["dynCall_vffffffii"] = function() { + return (dynCall_vffffffii = Module["dynCall_vffffffii"] = Module["asm"]["dynCall_vffffffii"]).apply(null, arguments) + } + ; + var dynCall_vffffii = Module["dynCall_vffffii"] = function() { + return (dynCall_vffffii = Module["dynCall_vffffii"] = Module["asm"]["dynCall_vffffii"]).apply(null, arguments) + } + ; + var dynCall_viiiifffi = Module["dynCall_viiiifffi"] = function() { + return (dynCall_viiiifffi = Module["dynCall_viiiifffi"] = Module["asm"]["dynCall_viiiifffi"]).apply(null, arguments) + } + ; + var dynCall_fdi = Module["dynCall_fdi"] = function() { + return (dynCall_fdi = Module["dynCall_fdi"] = Module["asm"]["dynCall_fdi"]).apply(null, arguments) + } + ; + var dynCall_dddi = Module["dynCall_dddi"] = function() { + return (dynCall_dddi = Module["dynCall_dddi"] = Module["asm"]["dynCall_dddi"]).apply(null, arguments) + } + ; + var dynCall_ddi = Module["dynCall_ddi"] = function() { + return (dynCall_ddi = Module["dynCall_ddi"] = Module["asm"]["dynCall_ddi"]).apply(null, arguments) + } + ; + var dynCall_ddddi = Module["dynCall_ddddi"] = function() { + return (dynCall_ddddi = Module["dynCall_ddddi"] = Module["asm"]["dynCall_ddddi"]).apply(null, arguments) + } + ; + var dynCall_jjjji = Module["dynCall_jjjji"] = function() { + return (dynCall_jjjji = Module["dynCall_jjjji"] = Module["asm"]["dynCall_jjjji"]).apply(null, arguments) + } + ; + var dynCall_vjiiii = Module["dynCall_vjiiii"] = function() { + return (dynCall_vjiiii = Module["dynCall_vjiiii"] = Module["asm"]["dynCall_vjiiii"]).apply(null, arguments) + } + ; + var dynCall_vijjii = Module["dynCall_vijjii"] = function() { + return (dynCall_vijjii = Module["dynCall_vijjii"] = Module["asm"]["dynCall_vijjii"]).apply(null, arguments) + } + ; + var dynCall_viiiifii = Module["dynCall_viiiifii"] = function() { + return (dynCall_viiiifii = Module["dynCall_viiiifii"] = Module["asm"]["dynCall_viiiifii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiijijiiiii = Module["dynCall_viiiiiiiijijiiiii"] = function() { + return (dynCall_viiiiiiiijijiiiii = Module["dynCall_viiiiiiiijijiiiii"] = Module["asm"]["dynCall_viiiiiiiijijiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiififfi = Module["dynCall_viiiififfi"] = function() { + return (dynCall_viiiififfi = Module["dynCall_viiiififfi"] = Module["asm"]["dynCall_viiiififfi"]).apply(null, arguments) + } + ; + var dynCall_viiiifiifi = Module["dynCall_viiiifiifi"] = function() { + return (dynCall_viiiifiifi = Module["dynCall_viiiifiifi"] = Module["asm"]["dynCall_viiiifiifi"]).apply(null, arguments) + } + ; + var dynCall_viiiifiiii = Module["dynCall_viiiifiiii"] = function() { + return (dynCall_viiiifiiii = Module["dynCall_viiiifiiii"] = Module["asm"]["dynCall_viiiifiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiifiiiii = Module["dynCall_viiiifiiiii"] = function() { + return (dynCall_viiiifiiiii = Module["dynCall_viiiifiiiii"] = Module["asm"]["dynCall_viiiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiifiiiiiiii = Module["dynCall_viiiifiiiiiiii"] = function() { + return (dynCall_viiiifiiiiiiii = Module["dynCall_viiiifiiiiiiii"] = Module["asm"]["dynCall_viiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiffiiiiii = Module["dynCall_iiiiffiiiiii"] = function() { + return (dynCall_iiiiffiiiiii = Module["dynCall_iiiiffiiiiii"] = Module["asm"]["dynCall_iiiiffiiiiii"]).apply(null, arguments) + } + ; + var dynCall_fifffiii = Module["dynCall_fifffiii"] = function() { + return (dynCall_fifffiii = Module["dynCall_fifffiii"] = Module["asm"]["dynCall_fifffiii"]).apply(null, arguments) + } + ; + var dynCall_fiffffiiiiii = Module["dynCall_fiffffiiiiii"] = function() { + return (dynCall_fiffffiiiiii = Module["dynCall_fiffffiiiiii"] = Module["asm"]["dynCall_fiffffiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiffii = Module["dynCall_viiiiiffii"] = function() { + return (dynCall_viiiiiffii = Module["dynCall_viiiiiffii"] = Module["asm"]["dynCall_viiiiiffii"]).apply(null, arguments) + } + ; + var dynCall_ffffiiii = Module["dynCall_ffffiiii"] = function() { + return (dynCall_ffffiiii = Module["dynCall_ffffiiii"] = Module["asm"]["dynCall_ffffiiii"]).apply(null, arguments) + } + ; + var dynCall_viffiii = Module["dynCall_viffiii"] = function() { + return (dynCall_viffiii = Module["dynCall_viffiii"] = Module["asm"]["dynCall_viffiii"]).apply(null, arguments) + } + ; + var dynCall_viffffiii = Module["dynCall_viffffiii"] = function() { + return (dynCall_viffffiii = Module["dynCall_viffffiii"] = Module["asm"]["dynCall_viffffiii"]).apply(null, arguments) + } + ; + var dynCall_viiffffiiiiii = Module["dynCall_viiffffiiiiii"] = function() { + return (dynCall_viiffffiiiiii = Module["dynCall_viiffffiiiiii"] = Module["asm"]["dynCall_viiffffiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vijiiii = Module["dynCall_vijiiii"] = function() { + return (dynCall_vijiiii = Module["dynCall_vijiiii"] = Module["asm"]["dynCall_vijiiii"]).apply(null, arguments) + } + ; + var dynCall_viiifiii = Module["dynCall_viiifiii"] = function() { + return (dynCall_viiifiii = Module["dynCall_viiifiii"] = Module["asm"]["dynCall_viiifiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiifi = Module["dynCall_iiiiifi"] = function() { + return (dynCall_iiiiifi = Module["dynCall_iiiiifi"] = Module["asm"]["dynCall_iiiiifi"]).apply(null, arguments) + } + ; + var dynCall_iifiifii = Module["dynCall_iifiifii"] = function() { + return (dynCall_iifiifii = Module["dynCall_iifiifii"] = Module["asm"]["dynCall_iifiifii"]).apply(null, arguments) + } + ; + var dynCall_iifiifi = Module["dynCall_iifiifi"] = function() { + return (dynCall_iifiifi = Module["dynCall_iifiifi"] = Module["asm"]["dynCall_iifiifi"]).apply(null, arguments) + } + ; + var dynCall_iiffiii = Module["dynCall_iiffiii"] = function() { + return (dynCall_iiffiii = Module["dynCall_iiffiii"] = Module["asm"]["dynCall_iiffiii"]).apply(null, arguments) + } + ; + var dynCall_iifiiii = Module["dynCall_iifiiii"] = function() { + return (dynCall_iifiiii = Module["dynCall_iifiiii"] = Module["asm"]["dynCall_iifiiii"]).apply(null, arguments) + } + ; + var dynCall_iiififiiii = Module["dynCall_iiififiiii"] = function() { + return (dynCall_iiififiiii = Module["dynCall_iiififiiii"] = Module["asm"]["dynCall_iiififiiii"]).apply(null, arguments) + } + ; + var dynCall_vififfii = Module["dynCall_vififfii"] = function() { + return (dynCall_vififfii = Module["dynCall_vififfii"] = Module["asm"]["dynCall_vififfii"]).apply(null, arguments) + } + ; + var dynCall_vifffffi = Module["dynCall_vifffffi"] = function() { + return (dynCall_vifffffi = Module["dynCall_vifffffi"] = Module["asm"]["dynCall_vifffffi"]).apply(null, arguments) + } + ; + var dynCall_iiifiiiiiii = Module["dynCall_iiifiiiiiii"] = function() { + return (dynCall_iiifiiiiiii = Module["dynCall_iiifiiiiiii"] = Module["asm"]["dynCall_iiifiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iifiiiiiii = Module["dynCall_iifiiiiiii"] = function() { + return (dynCall_iifiiiiiii = Module["dynCall_iifiiiiiii"] = Module["asm"]["dynCall_iifiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiifiiiiiiii = Module["dynCall_iiifiiiiiiii"] = function() { + return (dynCall_iiifiiiiiiii = Module["dynCall_iiifiiiiiiii"] = Module["asm"]["dynCall_iiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viffiiii = Module["dynCall_viffiiii"] = function() { + return (dynCall_viffiiii = Module["dynCall_viffiiii"] = Module["asm"]["dynCall_viffiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiffffiiii = Module["dynCall_viiiffffiiii"] = function() { + return (dynCall_viiiffffiiii = Module["dynCall_viiiffffiiii"] = Module["asm"]["dynCall_viiiffffiiii"]).apply(null, arguments) + } + ; + var dynCall_viifffffffiiiii = Module["dynCall_viifffffffiiiii"] = function() { + return (dynCall_viifffffffiiiii = Module["dynCall_viifffffffiiiii"] = Module["asm"]["dynCall_viifffffffiiiii"]).apply(null, arguments) + } + ; + var dynCall_ffii = Module["dynCall_ffii"] = function() { + return (dynCall_ffii = Module["dynCall_ffii"] = Module["asm"]["dynCall_ffii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiffiiiiiiiiiffffiiii = Module["dynCall_iiiiiiffiiiiiiiiiffffiiii"] = function() { + return (dynCall_iiiiiiffiiiiiiiiiffffiiii = Module["dynCall_iiiiiiffiiiiiiiiiffffiiii"] = Module["asm"]["dynCall_iiiiiiffiiiiiiiiiffffiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiffiiiiiiiiiiiiiii = Module["dynCall_iiiiiiffiiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiffiiiiiiiiiiiiiii = Module["dynCall_iiiiiiffiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiffiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viijji = Module["dynCall_viijji"] = function() { + return (dynCall_viijji = Module["dynCall_viijji"] = Module["asm"]["dynCall_viijji"]).apply(null, arguments) + } + ; + var dynCall_viififii = Module["dynCall_viififii"] = function() { + return (dynCall_viififii = Module["dynCall_viififii"] = Module["asm"]["dynCall_viififii"]).apply(null, arguments) + } + ; + var dynCall_viiffffi = Module["dynCall_viiffffi"] = function() { + return (dynCall_viiffffi = Module["dynCall_viiffffi"] = Module["asm"]["dynCall_viiffffi"]).apply(null, arguments) + } + ; + var dynCall_fiifiii = Module["dynCall_fiifiii"] = function() { + return (dynCall_fiifiii = Module["dynCall_fiifiii"] = Module["asm"]["dynCall_fiifiii"]).apply(null, arguments) + } + ; + var dynCall_fffffffi = Module["dynCall_fffffffi"] = function() { + return (dynCall_fffffffi = Module["dynCall_fffffffi"] = Module["asm"]["dynCall_fffffffi"]).apply(null, arguments) + } + ; + var dynCall_viiffifi = Module["dynCall_viiffifi"] = function() { + return (dynCall_viiffifi = Module["dynCall_viiffifi"] = Module["asm"]["dynCall_viiffifi"]).apply(null, arguments) + } + ; + var dynCall_viiiffiiiiii = Module["dynCall_viiiffiiiiii"] = function() { + return (dynCall_viiiffiiiiii = Module["dynCall_viiiffiiiiii"] = Module["asm"]["dynCall_viiiffiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiffiiiii = Module["dynCall_viiiffiiiii"] = function() { + return (dynCall_viiiffiiiii = Module["dynCall_viiiffiiiii"] = Module["asm"]["dynCall_viiiffiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiffiiii = Module["dynCall_iiiffiiii"] = function() { + return (dynCall_iiiffiiii = Module["dynCall_iiiffiiii"] = Module["asm"]["dynCall_iiiffiiii"]).apply(null, arguments) + } + ; + var dynCall_viififiii = Module["dynCall_viififiii"] = function() { + return (dynCall_viififiii = Module["dynCall_viififiii"] = Module["asm"]["dynCall_viififiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiffiiii = Module["dynCall_iiiiffiiii"] = function() { + return (dynCall_iiiiffiiii = Module["dynCall_iiiiffiiii"] = Module["asm"]["dynCall_iiiiffiiii"]).apply(null, arguments) + } + ; + var dynCall_viiififii = Module["dynCall_viiififii"] = function() { + return (dynCall_viiififii = Module["dynCall_viiififii"] = Module["asm"]["dynCall_viiififii"]).apply(null, arguments) + } + ; + var dynCall_vifiiiiii = Module["dynCall_vifiiiiii"] = function() { + return (dynCall_vifiiiiii = Module["dynCall_vifiiiiii"] = Module["asm"]["dynCall_vifiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iijjjiii = Module["dynCall_iijjjiii"] = function() { + return (dynCall_iijjjiii = Module["dynCall_iijjjiii"] = Module["asm"]["dynCall_iijjjiii"]).apply(null, arguments) + } + ; + var dynCall_viiifffi = Module["dynCall_viiifffi"] = function() { + return (dynCall_viiifffi = Module["dynCall_viiifffi"] = Module["asm"]["dynCall_viiifffi"]).apply(null, arguments) + } + ; + var dynCall_viijjii = Module["dynCall_viijjii"] = function() { + return (dynCall_viijjii = Module["dynCall_viijjii"] = Module["asm"]["dynCall_viijjii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiifffii = Module["dynCall_viiiiiifffii"] = function() { + return (dynCall_viiiiiifffii = Module["dynCall_viiiiiifffii"] = Module["asm"]["dynCall_viiiiiifffii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiifffii = Module["dynCall_viiiiiiiifffii"] = function() { + return (dynCall_viiiiiiiifffii = Module["dynCall_viiiiiiiifffii"] = Module["asm"]["dynCall_viiiiiiiifffii"]).apply(null, arguments) + } + ; + var dynCall_iiiiffii = Module["dynCall_iiiiffii"] = function() { + return (dynCall_iiiiffii = Module["dynCall_iiiiffii"] = Module["asm"]["dynCall_iiiiffii"]).apply(null, arguments) + } + ; + var dynCall_ijiiiiiiiii = Module["dynCall_ijiiiiiiiii"] = function() { + return (dynCall_ijiiiiiiiii = Module["dynCall_ijiiiiiiiii"] = Module["asm"]["dynCall_ijiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiijiii = Module["dynCall_viiijiii"] = function() { + return (dynCall_viiijiii = Module["dynCall_viiijiii"] = Module["asm"]["dynCall_viiijiii"]).apply(null, arguments) + } + ; + var dynCall_viiidii = Module["dynCall_viiidii"] = function() { + return (dynCall_viiidii = Module["dynCall_viiidii"] = Module["asm"]["dynCall_viiidii"]).apply(null, arguments) + } + ; + var dynCall_iijjijii = Module["dynCall_iijjijii"] = function() { + return (dynCall_iijjijii = Module["dynCall_iijjijii"] = Module["asm"]["dynCall_iijjijii"]).apply(null, arguments) + } + ; + var dynCall_viiiidii = Module["dynCall_viiiidii"] = function() { + return (dynCall_viiiidii = Module["dynCall_viiiidii"] = Module["asm"]["dynCall_viiiidii"]).apply(null, arguments) + } + ; + var dynCall_vidiiiii = Module["dynCall_vidiiiii"] = function() { + return (dynCall_vidiiiii = Module["dynCall_vidiiiii"] = Module["asm"]["dynCall_vidiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiidjii = Module["dynCall_viiidjii"] = function() { + return (dynCall_viiidjii = Module["dynCall_viiidjii"] = Module["asm"]["dynCall_viiidjii"]).apply(null, arguments) + } + ; + var dynCall_viijijji = Module["dynCall_viijijji"] = function() { + return (dynCall_viijijji = Module["dynCall_viijijji"] = Module["asm"]["dynCall_viijijji"]).apply(null, arguments) + } + ; + var dynCall_vijijji = Module["dynCall_vijijji"] = function() { + return (dynCall_vijijji = Module["dynCall_vijijji"] = Module["asm"]["dynCall_vijijji"]).apply(null, arguments) + } + ; + var dynCall_iddi = Module["dynCall_iddi"] = function() { + return (dynCall_iddi = Module["dynCall_iddi"] = Module["asm"]["dynCall_iddi"]).apply(null, arguments) + } + ; + var dynCall_vifffffffffi = Module["dynCall_vifffffffffi"] = function() { + return (dynCall_vifffffffffi = Module["dynCall_vifffffffffi"] = Module["asm"]["dynCall_vifffffffffi"]).apply(null, arguments) + } + ; + var dynCall_viiiiifii = Module["dynCall_viiiiifii"] = function() { + return (dynCall_viiiiifii = Module["dynCall_viiiiifii"] = Module["asm"]["dynCall_viiiiifii"]).apply(null, arguments) + } + ; + var dynCall_viiiffffi = Module["dynCall_viiiffffi"] = function() { + return (dynCall_viiiffffi = Module["dynCall_viiiffffi"] = Module["asm"]["dynCall_viiiffffi"]).apply(null, arguments) + } + ; + var dynCall_viifffii = Module["dynCall_viifffii"] = function() { + return (dynCall_viifffii = Module["dynCall_viifffii"] = Module["asm"]["dynCall_viifffii"]).apply(null, arguments) + } + ; + var dynCall_viiiiifffiii = Module["dynCall_viiiiifffiii"] = function() { + return (dynCall_viiiiifffiii = Module["dynCall_viiiiifffiii"] = Module["asm"]["dynCall_viiiiifffiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiffiffiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiffiffiiiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiffiffiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiffiffiiiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiffiffiiiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiffiffiiiiiiiii = Module["dynCall_viiiiffiffiiiiiiiii"] = function() { + return (dynCall_viiiiffiffiiiiiiiii = Module["dynCall_viiiiffiffiiiiiiiii"] = Module["asm"]["dynCall_viiiiffiffiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiffiffiiiiiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiffiffiiiiiiiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiffiffiiiiiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiffiffiiiiiiiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiffiffiiiiiiiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiffiffiiiiiiiiiiii = Module["dynCall_viiiiiffiffiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiffiffiiiiiiiiiiii = Module["dynCall_viiiiiffiffiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiffiffiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiiiiiiiiiiiiii = Module["dynCall_viiffiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiffiiiiiiiiiiiiiii = Module["dynCall_viiffiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiffiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiiiiiiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiffiiiiiiiiiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiffiiiiiiiiiiiiiiiiiiiiiiiiii = Module["dynCall_viiffiiiiiiiiiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiffiiiiiiiiiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiffiiiii = Module["dynCall_viiiiiffiiiii"] = function() { + return (dynCall_viiiiiffiiiii = Module["dynCall_viiiiiffiiiii"] = Module["asm"]["dynCall_viiiiiffiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiifii = Module["dynCall_viiiiiiiifii"] = function() { + return (dynCall_viiiiiiiifii = Module["dynCall_viiiiiiiifii"] = Module["asm"]["dynCall_viiiiiiiifii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiifiii = Module["dynCall_iiiiiiifiii"] = function() { + return (dynCall_iiiiiiifiii = Module["dynCall_iiiiiiifiii"] = Module["asm"]["dynCall_iiiiiiifiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifii = Module["dynCall_iiiiiifii"] = function() { + return (dynCall_iiiiiifii = Module["dynCall_iiiiiifii"] = Module["asm"]["dynCall_iiiiiifii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiifiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiifiiiiiiii = Module["dynCall_iiiiiiiiiiiifiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiifiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vijjjji = Module["dynCall_vijjjji"] = function() { + return (dynCall_vijjjji = Module["dynCall_vijjjji"] = Module["asm"]["dynCall_vijjjji"]).apply(null, arguments) + } + ; + var dynCall_iijjjji = Module["dynCall_iijjjji"] = function() { + return (dynCall_iijjjji = Module["dynCall_iijjjji"] = Module["asm"]["dynCall_iijjjji"]).apply(null, arguments) + } + ; + var dynCall_ffiiifffi = Module["dynCall_ffiiifffi"] = function() { + return (dynCall_ffiiifffi = Module["dynCall_ffiiifffi"] = Module["asm"]["dynCall_ffiiifffi"]).apply(null, arguments) + } + ; + var dynCall_fifiii = Module["dynCall_fifiii"] = function() { + return (dynCall_fifiii = Module["dynCall_fifiii"] = Module["asm"]["dynCall_fifiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_viiiiiiiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_viiiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vifiiiii = Module["dynCall_vifiiiii"] = function() { + return (dynCall_vifiiiii = Module["dynCall_vifiiiii"] = Module["asm"]["dynCall_vifiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiffffffi = Module["dynCall_viiffffffi"] = function() { + return (dynCall_viiffffffi = Module["dynCall_viiffffffi"] = Module["asm"]["dynCall_viiffffffi"]).apply(null, arguments) + } + ; + var dynCall_viifffffffi = Module["dynCall_viifffffffi"] = function() { + return (dynCall_viifffffffi = Module["dynCall_viifffffffi"] = Module["asm"]["dynCall_viifffffffi"]).apply(null, arguments) + } + ; + var dynCall_viiffffffffi = Module["dynCall_viiffffffffi"] = function() { + return (dynCall_viiffffffffi = Module["dynCall_viiffffffffi"] = Module["asm"]["dynCall_viiffffffffi"]).apply(null, arguments) + } + ; + var dynCall_viifffffffiii = Module["dynCall_viifffffffiii"] = function() { + return (dynCall_viifffffffiii = Module["dynCall_viifffffffiii"] = Module["asm"]["dynCall_viifffffffiii"]).apply(null, arguments) + } + ; + var dynCall_viiiiffffii = Module["dynCall_viiiiffffii"] = function() { + return (dynCall_viiiiffffii = Module["dynCall_viiiiffffii"] = Module["asm"]["dynCall_viiiiffffii"]).apply(null, arguments) + } + ; + var dynCall_idiiii = Module["dynCall_idiiii"] = function() { + return (dynCall_idiiii = Module["dynCall_idiiii"] = Module["asm"]["dynCall_idiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jjii = Module["dynCall_jjii"] = function() { + return (dynCall_jjii = Module["dynCall_jjii"] = Module["asm"]["dynCall_jjii"]).apply(null, arguments) + } + ; + var dynCall_vijiiiiiii = Module["dynCall_vijiiiiiii"] = function() { + return (dynCall_vijiiiiiii = Module["dynCall_vijiiiiiii"] = Module["asm"]["dynCall_vijiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vijiiiiiiii = Module["dynCall_vijiiiiiiii"] = function() { + return (dynCall_vijiiiiiiii = Module["dynCall_vijiiiiiiii"] = Module["asm"]["dynCall_vijiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jjiiii = Module["dynCall_jjiiii"] = function() { + return (dynCall_jjiiii = Module["dynCall_jjiiii"] = Module["asm"]["dynCall_jjiiii"]).apply(null, arguments) + } + ; + var dynCall_jjiiiii = Module["dynCall_jjiiiii"] = function() { + return (dynCall_jjiiiii = Module["dynCall_jjiiiii"] = Module["asm"]["dynCall_jjiiiii"]).apply(null, arguments) + } + ; + var dynCall_viijiiiiii = Module["dynCall_viijiiiiii"] = function() { + return (dynCall_viijiiiiii = Module["dynCall_viijiiiiii"] = Module["asm"]["dynCall_viijiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jijjji = Module["dynCall_jijjji"] = function() { + return (dynCall_jijjji = Module["dynCall_jijjji"] = Module["asm"]["dynCall_jijjji"]).apply(null, arguments) + } + ; + var dynCall_jijjjii = Module["dynCall_jijjjii"] = function() { + return (dynCall_jijjjii = Module["dynCall_jijjjii"] = Module["asm"]["dynCall_jijjjii"]).apply(null, arguments) + } + ; + var dynCall_ijijiiiii = Module["dynCall_ijijiiiii"] = function() { + return (dynCall_ijijiiiii = Module["dynCall_ijijiiiii"] = Module["asm"]["dynCall_ijijiiiii"]).apply(null, arguments) + } + ; + var dynCall_ijjjiii = Module["dynCall_ijjjiii"] = function() { + return (dynCall_ijjjiii = Module["dynCall_ijjjiii"] = Module["asm"]["dynCall_ijjjiii"]).apply(null, arguments) + } + ; + var dynCall_vijjjiijii = Module["dynCall_vijjjiijii"] = function() { + return (dynCall_vijjjiijii = Module["dynCall_vijjjiijii"] = Module["asm"]["dynCall_vijjjiijii"]).apply(null, arguments) + } + ; + var dynCall_ijjjiijii = Module["dynCall_ijjjiijii"] = function() { + return (dynCall_ijjjiijii = Module["dynCall_ijjjiijii"] = Module["asm"]["dynCall_ijjjiijii"]).apply(null, arguments) + } + ; + var dynCall_vijiiiiii = Module["dynCall_vijiiiiii"] = function() { + return (dynCall_vijiiiiii = Module["dynCall_vijiiiiii"] = Module["asm"]["dynCall_vijiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jfi = Module["dynCall_jfi"] = function() { + return (dynCall_jfi = Module["dynCall_jfi"] = Module["asm"]["dynCall_jfi"]).apply(null, arguments) + } + ; + var dynCall_dfi = Module["dynCall_dfi"] = function() { + return (dynCall_dfi = Module["dynCall_dfi"] = Module["asm"]["dynCall_dfi"]).apply(null, arguments) + } + ; + var dynCall_jidii = Module["dynCall_jidii"] = function() { + return (dynCall_jidii = Module["dynCall_jidii"] = Module["asm"]["dynCall_jidii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiji = Module["dynCall_viiiiiiiji"] = function() { + return (dynCall_viiiiiiiji = Module["dynCall_viiiiiiiji"] = Module["asm"]["dynCall_viiiiiiiji"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiji = Module["dynCall_viiiiiiiiji"] = function() { + return (dynCall_viiiiiiiiji = Module["dynCall_viiiiiiiiji"] = Module["asm"]["dynCall_viiiiiiiiji"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiji = Module["dynCall_viiiiiiiiiji"] = function() { + return (dynCall_viiiiiiiiiji = Module["dynCall_viiiiiiiiiji"] = Module["asm"]["dynCall_viiiiiiiiiji"]).apply(null, arguments) + } + ; + var dynCall_ijiijii = Module["dynCall_ijiijii"] = function() { + return (dynCall_ijiijii = Module["dynCall_ijiijii"] = Module["asm"]["dynCall_ijiijii"]).apply(null, arguments) + } + ; + var dynCall_vjjiiiii = Module["dynCall_vjjiiiii"] = function() { + return (dynCall_vjjiiiii = Module["dynCall_vjjiiiii"] = Module["asm"]["dynCall_vjjiiiii"]).apply(null, arguments) + } + ; + var dynCall_vjjii = Module["dynCall_vjjii"] = function() { + return (dynCall_vjjii = Module["dynCall_vjjii"] = Module["asm"]["dynCall_vjjii"]).apply(null, arguments) + } + ; + var dynCall_ijiiji = Module["dynCall_ijiiji"] = function() { + return (dynCall_ijiiji = Module["dynCall_ijiiji"] = Module["asm"]["dynCall_ijiiji"]).apply(null, arguments) + } + ; + var dynCall_ijiiiii = Module["dynCall_ijiiiii"] = function() { + return (dynCall_ijiiiii = Module["dynCall_ijiiiii"] = Module["asm"]["dynCall_ijiiiii"]).apply(null, arguments) + } + ; + var dynCall_ijiiiiji = Module["dynCall_ijiiiiji"] = function() { + return (dynCall_ijiiiiji = Module["dynCall_ijiiiiji"] = Module["asm"]["dynCall_ijiiiiji"]).apply(null, arguments) + } + ; + var dynCall_ddii = Module["dynCall_ddii"] = function() { + return (dynCall_ddii = Module["dynCall_ddii"] = Module["asm"]["dynCall_ddii"]).apply(null, arguments) + } + ; + var dynCall_idiii = Module["dynCall_idiii"] = function() { + return (dynCall_idiii = Module["dynCall_idiii"] = Module["asm"]["dynCall_idiii"]).apply(null, arguments) + } + ; + var dynCall_idiiiii = Module["dynCall_idiiiii"] = function() { + return (dynCall_idiiiii = Module["dynCall_idiiiii"] = Module["asm"]["dynCall_idiiiii"]).apply(null, arguments) + } + ; + var dynCall_ifiiiii = Module["dynCall_ifiiiii"] = function() { + return (dynCall_ifiiiii = Module["dynCall_ifiiiii"] = Module["asm"]["dynCall_ifiiiii"]).apply(null, arguments) + } + ; + var dynCall_jjjii = Module["dynCall_jjjii"] = function() { + return (dynCall_jjjii = Module["dynCall_jjjii"] = Module["asm"]["dynCall_jjjii"]).apply(null, arguments) + } + ; + var dynCall_vdiii = Module["dynCall_vdiii"] = function() { + return (dynCall_vdiii = Module["dynCall_vdiii"] = Module["asm"]["dynCall_vdiii"]).apply(null, arguments) + } + ; + var dynCall_jdii = Module["dynCall_jdii"] = function() { + return (dynCall_jdii = Module["dynCall_jdii"] = Module["asm"]["dynCall_jdii"]).apply(null, arguments) + } + ; + var dynCall_iijjji = Module["dynCall_iijjji"] = function() { + return (dynCall_iijjji = Module["dynCall_iijjji"] = Module["asm"]["dynCall_iijjji"]).apply(null, arguments) + } + ; + var dynCall_viijjji = Module["dynCall_viijjji"] = function() { + return (dynCall_viijjji = Module["dynCall_viijjji"] = Module["asm"]["dynCall_viijjji"]).apply(null, arguments) + } + ; + var dynCall_vdii = Module["dynCall_vdii"] = function() { + return (dynCall_vdii = Module["dynCall_vdii"] = Module["asm"]["dynCall_vdii"]).apply(null, arguments) + } + ; + var dynCall_diddi = Module["dynCall_diddi"] = function() { + return (dynCall_diddi = Module["dynCall_diddi"] = Module["asm"]["dynCall_diddi"]).apply(null, arguments) + } + ; + var dynCall_viiiijii = Module["dynCall_viiiijii"] = function() { + return (dynCall_viiiijii = Module["dynCall_viiiijii"] = Module["asm"]["dynCall_viiiijii"]).apply(null, arguments) + } + ; + var dynCall_viiijji = Module["dynCall_viiijji"] = function() { + return (dynCall_viiijji = Module["dynCall_viiijji"] = Module["asm"]["dynCall_viiijji"]).apply(null, arguments) + } + ; + var dynCall_iijjii = Module["dynCall_iijjii"] = function() { + return (dynCall_iijjii = Module["dynCall_iijjii"] = Module["asm"]["dynCall_iijjii"]).apply(null, arguments) + } + ; + var dynCall_viijijii = Module["dynCall_viijijii"] = function() { + return (dynCall_viijijii = Module["dynCall_viijijii"] = Module["asm"]["dynCall_viijijii"]).apply(null, arguments) + } + ; + var dynCall_viijijiii = Module["dynCall_viijijiii"] = function() { + return (dynCall_viijijiii = Module["dynCall_viijijiii"] = Module["asm"]["dynCall_viijijiii"]).apply(null, arguments) + } + ; + var dynCall_vijiji = Module["dynCall_vijiji"] = function() { + return (dynCall_vijiji = Module["dynCall_vijiji"] = Module["asm"]["dynCall_vijiji"]).apply(null, arguments) + } + ; + var dynCall_viijiijiii = Module["dynCall_viijiijiii"] = function() { + return (dynCall_viijiijiii = Module["dynCall_viijiijiii"] = Module["asm"]["dynCall_viijiijiii"]).apply(null, arguments) + } + ; + var dynCall_viiiijiiii = Module["dynCall_viiiijiiii"] = function() { + return (dynCall_viiiijiiii = Module["dynCall_viiiijiiii"] = Module["asm"]["dynCall_viiiijiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiiiii = Module["dynCall_jiiiiii"] = function() { + return (dynCall_jiiiiii = Module["dynCall_jiiiiii"] = Module["asm"]["dynCall_jiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiiiiiiii = Module["dynCall_jiiiiiiiii"] = function() { + return (dynCall_jiiiiiiiii = Module["dynCall_jiiiiiiiii"] = Module["asm"]["dynCall_jiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_jiiiiiiiiii = Module["dynCall_jiiiiiiiiii"] = function() { + return (dynCall_jiiiiiiiiii = Module["dynCall_jiiiiiiiiii"] = Module["asm"]["dynCall_jiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_fiff = Module["dynCall_fiff"] = function() { + return (dynCall_fiff = Module["dynCall_fiff"] = Module["asm"]["dynCall_fiff"]).apply(null, arguments) + } + ; + var dynCall_vififiii = Module["dynCall_vififiii"] = function() { + return (dynCall_vififiii = Module["dynCall_vififiii"] = Module["asm"]["dynCall_vififiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiijii = Module["dynCall_iiiiijii"] = function() { + return (dynCall_iiiiijii = Module["dynCall_iiiiijii"] = Module["asm"]["dynCall_iiiiijii"]).apply(null, arguments) + } + ; + var dynCall_iiiiidii = Module["dynCall_iiiiidii"] = function() { + return (dynCall_iiiiidii = Module["dynCall_iiiiidii"] = Module["asm"]["dynCall_iiiiidii"]).apply(null, arguments) + } + ; + var dynCall_iiidi = Module["dynCall_iiidi"] = function() { + return (dynCall_iiidi = Module["dynCall_iiidi"] = Module["asm"]["dynCall_iiidi"]).apply(null, arguments) + } + ; + var dynCall_iiidiii = Module["dynCall_iiidiii"] = function() { + return (dynCall_iiidiii = Module["dynCall_iiidiii"] = Module["asm"]["dynCall_iiidiii"]).apply(null, arguments) + } + ; + var dynCall_viifffiii = Module["dynCall_viifffiii"] = function() { + return (dynCall_viifffiii = Module["dynCall_viifffiii"] = Module["asm"]["dynCall_viifffiii"]).apply(null, arguments) + } + ; + var dynCall_iidfii = Module["dynCall_iidfii"] = function() { + return (dynCall_iidfii = Module["dynCall_iidfii"] = Module["asm"]["dynCall_iidfii"]).apply(null, arguments) + } + ; + var dynCall_iidfi = Module["dynCall_iidfi"] = function() { + return (dynCall_iidfi = Module["dynCall_iidfi"] = Module["asm"]["dynCall_iidfi"]).apply(null, arguments) + } + ; + var dynCall_iiddfi = Module["dynCall_iiddfi"] = function() { + return (dynCall_iiddfi = Module["dynCall_iiddfi"] = Module["asm"]["dynCall_iiddfi"]).apply(null, arguments) + } + ; + var dynCall_iijfii = Module["dynCall_iijfii"] = function() { + return (dynCall_iijfii = Module["dynCall_iijfii"] = Module["asm"]["dynCall_iijfii"]).apply(null, arguments) + } + ; + var dynCall_iijfi = Module["dynCall_iijfi"] = function() { + return (dynCall_iijfi = Module["dynCall_iijfi"] = Module["asm"]["dynCall_iijfi"]).apply(null, arguments) + } + ; + var dynCall_iijjfi = Module["dynCall_iijjfi"] = function() { + return (dynCall_iijjfi = Module["dynCall_iijjfi"] = Module["asm"]["dynCall_iijjfi"]).apply(null, arguments) + } + ; + var dynCall_iiiiffiiiji = Module["dynCall_iiiiffiiiji"] = function() { + return (dynCall_iiiiffiiiji = Module["dynCall_iiiiffiiiji"] = Module["asm"]["dynCall_iiiiffiiiji"]).apply(null, arguments) + } + ; + var dynCall_iiidfii = Module["dynCall_iiidfii"] = function() { + return (dynCall_iiidfii = Module["dynCall_iiidfii"] = Module["asm"]["dynCall_iiidfii"]).apply(null, arguments) + } + ; + var dynCall_iiijfii = Module["dynCall_iiijfii"] = function() { + return (dynCall_iiijfii = Module["dynCall_iiijfii"] = Module["asm"]["dynCall_iiijfii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiidi = Module["dynCall_iiiiiidi"] = function() { + return (dynCall_iiiiiidi = Module["dynCall_iiiiiidi"] = Module["asm"]["dynCall_iiiiiidi"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiji = Module["dynCall_iiiiiiji"] = function() { + return (dynCall_iiiiiiji = Module["dynCall_iiiiiiji"] = Module["asm"]["dynCall_iiiiiiji"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifi = Module["dynCall_iiiiiifi"] = function() { + return (dynCall_iiiiiifi = Module["dynCall_iiiiiifi"] = Module["asm"]["dynCall_iiiiiifi"]).apply(null, arguments) + } + ; + var dynCall_fiiiiiii = Module["dynCall_fiiiiiii"] = function() { + return (dynCall_fiiiiiii = Module["dynCall_fiiiiiii"] = Module["asm"]["dynCall_fiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_diidii = Module["dynCall_diidii"] = function() { + return (dynCall_diidii = Module["dynCall_diidii"] = Module["asm"]["dynCall_diidii"]).apply(null, arguments) + } + ; + var dynCall_jiijii = Module["dynCall_jiijii"] = function() { + return (dynCall_jiijii = Module["dynCall_jiijii"] = Module["asm"]["dynCall_jiijii"]).apply(null, arguments) + } + ; + var dynCall_iiiiffiiiii = Module["dynCall_iiiiffiiiii"] = function() { + return (dynCall_iiiiffiiiii = Module["dynCall_iiiiffiiiii"] = Module["asm"]["dynCall_iiiiffiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiidfii = Module["dynCall_iiiidfii"] = function() { + return (dynCall_iiiidfii = Module["dynCall_iiiidfii"] = Module["asm"]["dynCall_iiiidfii"]).apply(null, arguments) + } + ; + var dynCall_iiiijfii = Module["dynCall_iiiijfii"] = function() { + return (dynCall_iiiijfii = Module["dynCall_iiiijfii"] = Module["asm"]["dynCall_iiiijfii"]).apply(null, arguments) + } + ; + var dynCall_diiiidi = Module["dynCall_diiiidi"] = function() { + return (dynCall_diiiidi = Module["dynCall_diiiidi"] = Module["asm"]["dynCall_diiiidi"]).apply(null, arguments) + } + ; + var dynCall_jiiiiji = Module["dynCall_jiiiiji"] = function() { + return (dynCall_jiiiiji = Module["dynCall_jiiiiji"] = Module["asm"]["dynCall_jiiiiji"]).apply(null, arguments) + } + ; + var dynCall_fiiiifi = Module["dynCall_fiiiifi"] = function() { + return (dynCall_fiiiifi = Module["dynCall_fiiiifi"] = Module["asm"]["dynCall_fiiiifi"]).apply(null, arguments) + } + ; + var dynCall_didii = Module["dynCall_didii"] = function() { + return (dynCall_didii = Module["dynCall_didii"] = Module["asm"]["dynCall_didii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiiii"] = function() { + return (dynCall_iiiiiiiiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiiiiiiiii"] = Module["asm"]["dynCall_iiiiiiiiiiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vidiji = Module["dynCall_vidiji"] = function() { + return (dynCall_vidiji = Module["dynCall_vidiji"] = Module["asm"]["dynCall_vidiji"]).apply(null, arguments) + } + ; + var dynCall_vidjii = Module["dynCall_vidjii"] = function() { + return (dynCall_vidjii = Module["dynCall_vidjii"] = Module["asm"]["dynCall_vidjii"]).apply(null, arguments) + } + ; + var dynCall_iiijjii = Module["dynCall_iiijjii"] = function() { + return (dynCall_iiijjii = Module["dynCall_iiijjii"] = Module["asm"]["dynCall_iiijjii"]).apply(null, arguments) + } + ; + var dynCall_ijiiiiii = Module["dynCall_ijiiiiii"] = function() { + return (dynCall_ijiiiiii = Module["dynCall_ijiiiiii"] = Module["asm"]["dynCall_ijiiiiii"]).apply(null, arguments) + } + ; + var dynCall_ijjiiiiii = Module["dynCall_ijjiiiiii"] = function() { + return (dynCall_ijjiiiiii = Module["dynCall_ijjiiiiii"] = Module["asm"]["dynCall_ijjiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vdi = Module["dynCall_vdi"] = function() { + return (dynCall_vdi = Module["dynCall_vdi"] = Module["asm"]["dynCall_vdi"]).apply(null, arguments) + } + ; + var dynCall_iiiijiii = Module["dynCall_iiiijiii"] = function() { + return (dynCall_iiiijiii = Module["dynCall_iiiijiii"] = Module["asm"]["dynCall_iiiijiii"]).apply(null, arguments) + } + ; + var dynCall_iiiij = Module["dynCall_iiiij"] = function() { + return (dynCall_iiiij = Module["dynCall_iiiij"] = Module["asm"]["dynCall_iiiij"]).apply(null, arguments) + } + ; + var dynCall_fff = Module["dynCall_fff"] = function() { + return (dynCall_fff = Module["dynCall_fff"] = Module["asm"]["dynCall_fff"]).apply(null, arguments) + } + ; + var dynCall_ijj = Module["dynCall_ijj"] = function() { + return (dynCall_ijj = Module["dynCall_ijj"] = Module["asm"]["dynCall_ijj"]).apply(null, arguments) + } + ; + var dynCall_vjji = Module["dynCall_vjji"] = function() { + return (dynCall_vjji = Module["dynCall_vjji"] = Module["asm"]["dynCall_vjji"]).apply(null, arguments) + } + ; + var dynCall_viif = Module["dynCall_viif"] = function() { + return (dynCall_viif = Module["dynCall_viif"] = Module["asm"]["dynCall_viif"]).apply(null, arguments) + } + ; + var dynCall_vffff = Module["dynCall_vffff"] = function() { + return (dynCall_vffff = Module["dynCall_vffff"] = Module["asm"]["dynCall_vffff"]).apply(null, arguments) + } + ; + var dynCall_vfff = Module["dynCall_vfff"] = function() { + return (dynCall_vfff = Module["dynCall_vfff"] = Module["asm"]["dynCall_vfff"]).apply(null, arguments) + } + ; + var dynCall_vid = Module["dynCall_vid"] = function() { + return (dynCall_vid = Module["dynCall_vid"] = Module["asm"]["dynCall_vid"]).apply(null, arguments) + } + ; + var dynCall_viiiiif = Module["dynCall_viiiiif"] = function() { + return (dynCall_viiiiif = Module["dynCall_viiiiif"] = Module["asm"]["dynCall_viiiiif"]).apply(null, arguments) + } + ; + var dynCall_viiiif = Module["dynCall_viiiif"] = function() { + return (dynCall_viiiif = Module["dynCall_viiiif"] = Module["asm"]["dynCall_viiiif"]).apply(null, arguments) + } + ; + var dynCall_vif = Module["dynCall_vif"] = function() { + return (dynCall_vif = Module["dynCall_vif"] = Module["asm"]["dynCall_vif"]).apply(null, arguments) + } + ; + var dynCall_viiiiiif = Module["dynCall_viiiiiif"] = function() { + return (dynCall_viiiiiif = Module["dynCall_viiiiiif"] = Module["asm"]["dynCall_viiiiiif"]).apply(null, arguments) + } + ; + var dynCall_iiif = Module["dynCall_iiif"] = function() { + return (dynCall_iiif = Module["dynCall_iiif"] = Module["asm"]["dynCall_iiif"]).apply(null, arguments) + } + ; + var dynCall_viiiiiji = Module["dynCall_viiiiiji"] = function() { + return (dynCall_viiiiiji = Module["dynCall_viiiiiji"] = Module["asm"]["dynCall_viiiiiji"]).apply(null, arguments) + } + ; + var dynCall_fif = Module["dynCall_fif"] = function() { + return (dynCall_fif = Module["dynCall_fif"] = Module["asm"]["dynCall_fif"]).apply(null, arguments) + } + ; + var dynCall_viij = Module["dynCall_viij"] = function() { + return (dynCall_viij = Module["dynCall_viij"] = Module["asm"]["dynCall_viij"]).apply(null, arguments) + } + ; + var dynCall_viijijj = Module["dynCall_viijijj"] = function() { + return (dynCall_viijijj = Module["dynCall_viijijj"] = Module["asm"]["dynCall_viijijj"]).apply(null, arguments) + } + ; + var dynCall_viijj = Module["dynCall_viijj"] = function() { + return (dynCall_viijj = Module["dynCall_viijj"] = Module["asm"]["dynCall_viijj"]).apply(null, arguments) + } + ; + var dynCall_viiiij = Module["dynCall_viiiij"] = function() { + return (dynCall_viiiij = Module["dynCall_viiiij"] = Module["asm"]["dynCall_viiiij"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifff = Module["dynCall_iiiiiifff"] = function() { + return (dynCall_iiiiiifff = Module["dynCall_iiiiiifff"] = Module["asm"]["dynCall_iiiiiifff"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifiif = Module["dynCall_iiiiiifiif"] = function() { + return (dynCall_iiiiiifiif = Module["dynCall_iiiiiifiif"] = Module["asm"]["dynCall_iiiiiifiif"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifiii = Module["dynCall_iiiiiifiii"] = function() { + return (dynCall_iiiiiifiii = Module["dynCall_iiiiiifiii"] = Module["asm"]["dynCall_iiiiiifiii"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiifiif = Module["dynCall_iiiiiiifiif"] = function() { + return (dynCall_iiiiiiifiif = Module["dynCall_iiiiiiifiif"] = Module["asm"]["dynCall_iiiiiiifiif"]).apply(null, arguments) + } + ; + var dynCall_fiiiiiifiifif = Module["dynCall_fiiiiiifiifif"] = function() { + return (dynCall_fiiiiiifiifif = Module["dynCall_fiiiiiifiifif"] = Module["asm"]["dynCall_fiiiiiifiifif"]).apply(null, arguments) + } + ; + var dynCall_fiiiiiifiiiif = Module["dynCall_fiiiiiifiiiif"] = function() { + return (dynCall_fiiiiiifiiiif = Module["dynCall_fiiiiiifiiiif"] = Module["asm"]["dynCall_fiiiiiifiiiif"]).apply(null, arguments) + } + ; + var dynCall_iifiiiijii = Module["dynCall_iifiiiijii"] = function() { + return (dynCall_iifiiiijii = Module["dynCall_iifiiiijii"] = Module["asm"]["dynCall_iifiiiijii"]).apply(null, arguments) + } + ; + var dynCall_vifif = Module["dynCall_vifif"] = function() { + return (dynCall_vifif = Module["dynCall_vifif"] = Module["asm"]["dynCall_vifif"]).apply(null, arguments) + } + ; + var dynCall_vifijii = Module["dynCall_vifijii"] = function() { + return (dynCall_vifijii = Module["dynCall_vifijii"] = Module["asm"]["dynCall_vifijii"]).apply(null, arguments) + } + ; + var dynCall_iiiifffiii = Module["dynCall_iiiifffiii"] = function() { + return (dynCall_iiiifffiii = Module["dynCall_iiiifffiii"] = Module["asm"]["dynCall_iiiifffiii"]).apply(null, arguments) + } + ; + var dynCall_iiiifffffi = Module["dynCall_iiiifffffi"] = function() { + return (dynCall_iiiifffffi = Module["dynCall_iiiifffffi"] = Module["asm"]["dynCall_iiiifffffi"]).apply(null, arguments) + } + ; + var dynCall_viffiiiif = Module["dynCall_viffiiiif"] = function() { + return (dynCall_viffiiiif = Module["dynCall_viffiiiif"] = Module["asm"]["dynCall_viffiiiif"]).apply(null, arguments) + } + ; + var dynCall_viffiifffffiii = Module["dynCall_viffiifffffiii"] = function() { + return (dynCall_viffiifffffiii = Module["dynCall_viffiifffffiii"] = Module["asm"]["dynCall_viffiifffffiii"]).apply(null, arguments) + } + ; + var dynCall_viffffiifffiiiiif = Module["dynCall_viffffiifffiiiiif"] = function() { + return (dynCall_viffffiifffiiiiif = Module["dynCall_viffffiifffiiiiif"] = Module["asm"]["dynCall_viffffiifffiiiiif"]).apply(null, arguments) + } + ; + var dynCall_iiiifffffii = Module["dynCall_iiiifffffii"] = function() { + return (dynCall_iiiifffffii = Module["dynCall_iiiifffffii"] = Module["asm"]["dynCall_iiiifffffii"]).apply(null, arguments) + } + ; + var dynCall_viiiiiiiiiiifii = Module["dynCall_viiiiiiiiiiifii"] = function() { + return (dynCall_viiiiiiiiiiifii = Module["dynCall_viiiiiiiiiiifii"] = Module["asm"]["dynCall_viiiiiiiiiiifii"]).apply(null, arguments) + } + ; + var dynCall_viff = Module["dynCall_viff"] = function() { + return (dynCall_viff = Module["dynCall_viff"] = Module["asm"]["dynCall_viff"]).apply(null, arguments) + } + ; + var dynCall_iiiiifiiiiif = Module["dynCall_iiiiifiiiiif"] = function() { + return (dynCall_iiiiifiiiiif = Module["dynCall_iiiiifiiiiif"] = Module["asm"]["dynCall_iiiiifiiiiif"]).apply(null, arguments) + } + ; + var dynCall_viiff = Module["dynCall_viiff"] = function() { + return (dynCall_viiff = Module["dynCall_viiff"] = Module["asm"]["dynCall_viiff"]).apply(null, arguments) + } + ; + var dynCall_viiifiiiii = Module["dynCall_viiifiiiii"] = function() { + return (dynCall_viiifiiiii = Module["dynCall_viiifiiiii"] = Module["asm"]["dynCall_viiifiiiii"]).apply(null, arguments) + } + ; + var dynCall_viiiifiiiiif = Module["dynCall_viiiifiiiiif"] = function() { + return (dynCall_viiiifiiiiif = Module["dynCall_viiiifiiiiif"] = Module["asm"]["dynCall_viiiifiiiiif"]).apply(null, arguments) + } + ; + var dynCall_iifff = Module["dynCall_iifff"] = function() { + return (dynCall_iifff = Module["dynCall_iifff"] = Module["asm"]["dynCall_iifff"]).apply(null, arguments) + } + ; + var dynCall_iif = Module["dynCall_iif"] = function() { + return (dynCall_iif = Module["dynCall_iif"] = Module["asm"]["dynCall_iif"]).apply(null, arguments) + } + ; + var dynCall_ijjiiiii = Module["dynCall_ijjiiiii"] = function() { + return (dynCall_ijjiiiii = Module["dynCall_ijjiiiii"] = Module["asm"]["dynCall_ijjiiiii"]).apply(null, arguments) + } + ; + var dynCall_vf = Module["dynCall_vf"] = function() { + return (dynCall_vf = Module["dynCall_vf"] = Module["asm"]["dynCall_vf"]).apply(null, arguments) + } + ; + var dynCall_vff = Module["dynCall_vff"] = function() { + return (dynCall_vff = Module["dynCall_vff"] = Module["asm"]["dynCall_vff"]).apply(null, arguments) + } + ; + var dynCall_viffff = Module["dynCall_viffff"] = function() { + return (dynCall_viffff = Module["dynCall_viffff"] = Module["asm"]["dynCall_viffff"]).apply(null, arguments) + } + ; + var dynCall_iiij = Module["dynCall_iiij"] = function() { + return (dynCall_iiij = Module["dynCall_iiij"] = Module["asm"]["dynCall_iiij"]).apply(null, arguments) + } + ; + var dynCall_iiijiiiiiiiiii = Module["dynCall_iiijiiiiiiiiii"] = function() { + return (dynCall_iiijiiiiiiiiii = Module["dynCall_iiijiiiiiiiiii"] = Module["asm"]["dynCall_iiijiiiiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_vifff = Module["dynCall_vifff"] = function() { + return (dynCall_vifff = Module["dynCall_vifff"] = Module["asm"]["dynCall_vifff"]).apply(null, arguments) + } + ; + var dynCall_viifff = Module["dynCall_viifff"] = function() { + return (dynCall_viifff = Module["dynCall_viifff"] = Module["asm"]["dynCall_viifff"]).apply(null, arguments) + } + ; + var dynCall_vij = Module["dynCall_vij"] = function() { + return (dynCall_vij = Module["dynCall_vij"] = Module["asm"]["dynCall_vij"]).apply(null, arguments) + } + ; + var dynCall_iiiiiifffiiifiii = Module["dynCall_iiiiiifffiiifiii"] = function() { + return (dynCall_iiiiiifffiiifiii = Module["dynCall_iiiiiifffiiifiii"] = Module["asm"]["dynCall_iiiiiifffiiifiii"]).apply(null, arguments) + } + ; + var dynCall_viiiffffffi = Module["dynCall_viiiffffffi"] = function() { + return (dynCall_viiiffffffi = Module["dynCall_viiiffffffi"] = Module["asm"]["dynCall_viiiffffffi"]).apply(null, arguments) + } + ; + var dynCall_iijjiii = Module["dynCall_iijjiii"] = function() { + return (dynCall_iijjiii = Module["dynCall_iijjiii"] = Module["asm"]["dynCall_iijjiii"]).apply(null, arguments) + } + ; + var dynCall_vijjjii = Module["dynCall_vijjjii"] = function() { + return (dynCall_vijjjii = Module["dynCall_vijjjii"] = Module["asm"]["dynCall_vijjjii"]).apply(null, arguments) + } + ; + var dynCall_vidd = Module["dynCall_vidd"] = function() { + return (dynCall_vidd = Module["dynCall_vidd"] = Module["asm"]["dynCall_vidd"]).apply(null, arguments) + } + ; + var dynCall_viid = Module["dynCall_viid"] = function() { + return (dynCall_viid = Module["dynCall_viid"] = Module["asm"]["dynCall_viid"]).apply(null, arguments) + } + ; + var dynCall_viiif = Module["dynCall_viiif"] = function() { + return (dynCall_viiif = Module["dynCall_viiif"] = Module["asm"]["dynCall_viiif"]).apply(null, arguments) + } + ; + var dynCall_fiiiif = Module["dynCall_fiiiif"] = function() { + return (dynCall_fiiiif = Module["dynCall_fiiiif"] = Module["asm"]["dynCall_fiiiif"]).apply(null, arguments) + } + ; + var dynCall_viiij = Module["dynCall_viiij"] = function() { + return (dynCall_viiij = Module["dynCall_viiij"] = Module["asm"]["dynCall_viiij"]).apply(null, arguments) + } + ; + var dynCall_vijd = Module["dynCall_vijd"] = function() { + return (dynCall_vijd = Module["dynCall_vijd"] = Module["asm"]["dynCall_vijd"]).apply(null, arguments) + } + ; + var dynCall_vifiiifi = Module["dynCall_vifiiifi"] = function() { + return (dynCall_vifiiifi = Module["dynCall_vifiiifi"] = Module["asm"]["dynCall_vifiiifi"]).apply(null, arguments) + } + ; + var dynCall_ff = Module["dynCall_ff"] = function() { + return (dynCall_ff = Module["dynCall_ff"] = Module["asm"]["dynCall_ff"]).apply(null, arguments) + } + ; + var dynCall_iiiiiff = Module["dynCall_iiiiiff"] = function() { + return (dynCall_iiiiiff = Module["dynCall_iiiiiff"] = Module["asm"]["dynCall_iiiiiff"]).apply(null, arguments) + } + ; + var dynCall_viffffffffffffiiii = Module["dynCall_viffffffffffffiiii"] = function() { + return (dynCall_viffffffffffffiiii = Module["dynCall_viffffffffffffiiii"] = Module["asm"]["dynCall_viffffffffffffiiii"]).apply(null, arguments) + } + ; + var dynCall_iid = Module["dynCall_iid"] = function() { + return (dynCall_iid = Module["dynCall_iid"] = Module["asm"]["dynCall_iid"]).apply(null, arguments) + } + ; + var dynCall_viiidd = Module["dynCall_viiidd"] = function() { + return (dynCall_viiidd = Module["dynCall_viiidd"] = Module["asm"]["dynCall_viiidd"]).apply(null, arguments) + } + ; + var dynCall_ij = Module["dynCall_ij"] = function() { + return (dynCall_ij = Module["dynCall_ij"] = Module["asm"]["dynCall_ij"]).apply(null, arguments) + } + ; + var dynCall_vjiiiiiii = Module["dynCall_vjiiiiiii"] = function() { + return (dynCall_vjiiiiiii = Module["dynCall_vjiiiiiii"] = Module["asm"]["dynCall_vjiiiiiii"]).apply(null, arguments) + } + ; + var dynCall_iiff = Module["dynCall_iiff"] = function() { + return (dynCall_iiff = Module["dynCall_iiff"] = Module["asm"]["dynCall_iiff"]).apply(null, arguments) + } + ; + var dynCall_f = Module["dynCall_f"] = function() { + return (dynCall_f = Module["dynCall_f"] = Module["asm"]["dynCall_f"]).apply(null, arguments) + } + ; + var dynCall_vffffffi = Module["dynCall_vffffffi"] = function() { + return (dynCall_vffffffi = Module["dynCall_vffffffi"] = Module["asm"]["dynCall_vffffffi"]).apply(null, arguments) + } + ; + var dynCall_if = Module["dynCall_if"] = function() { + return (dynCall_if = Module["dynCall_if"] = Module["asm"]["dynCall_if"]).apply(null, arguments) + } + ; + var dynCall_d = Module["dynCall_d"] = function() { + return (dynCall_d = Module["dynCall_d"] = Module["asm"]["dynCall_d"]).apply(null, arguments) + } + ; + var dynCall_viififf = Module["dynCall_viififf"] = function() { + return (dynCall_viififf = Module["dynCall_viififf"] = Module["asm"]["dynCall_viififf"]).apply(null, arguments) + } + ; + var dynCall_iiififiii = Module["dynCall_iiififiii"] = function() { + return (dynCall_iiififiii = Module["dynCall_iiififiii"] = Module["asm"]["dynCall_iiififiii"]).apply(null, arguments) + } + ; + var dynCall_vififfi = Module["dynCall_vififfi"] = function() { + return (dynCall_vififfi = Module["dynCall_vififfi"] = Module["asm"]["dynCall_vififfi"]).apply(null, arguments) + } + ; + var dynCall_fiif = Module["dynCall_fiif"] = function() { + return (dynCall_fiif = Module["dynCall_fiif"] = Module["asm"]["dynCall_fiif"]).apply(null, arguments) + } + ; + var dynCall_iiiiiiffiiiiiiiiiffffiii = Module["dynCall_iiiiiiffiiiiiiiiiffffiii"] = function() { + return (dynCall_iiiiiiffiiiiiiiiiffffiii = Module["dynCall_iiiiiiffiiiiiiiiiffffiii"] = Module["asm"]["dynCall_iiiiiiffiiiiiiiiiffffiii"]).apply(null, arguments) + } + ; + var dynCall_viiffiiiii = Module["dynCall_viiffiiiii"] = function() { + return (dynCall_viiffiiiii = Module["dynCall_viiffiiiii"] = Module["asm"]["dynCall_viiffiiiii"]).apply(null, arguments) + } + ; + function invoke_ii(index, a1) { + var sp = stackSave(); + try { + return dynCall_ii(index, a1) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_v(index) { + var sp = stackSave(); + try { + dynCall_v(index) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vii(index, a1, a2) { + var sp = stackSave(); + try { + dynCall_vii(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iii(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_iii(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_iiiiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiii(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iiii(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viii(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_viii(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_iiiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiii(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_fiii(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_diii(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_diii(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viif(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_viif(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vi(index, a1) { + var sp = stackSave(); + try { + dynCall_vi(index, a1) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_i(index) { + var sp = stackSave(); + try { + return dynCall_i(index) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiiiiii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + return dynCall_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiii(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + dynCall_viiiiiii(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { + var sp = stackSave(); + try { + dynCall_viiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) { + var sp = stackSave(); + try { + dynCall_viiiiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viiiiii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viiiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiidii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiiidii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiifii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiiifii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vifi(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_vifi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viifi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viifi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fii(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_fii(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viifff(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viifff(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vidi(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_vidi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viidi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viidi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_dii(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_dii(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + dynCall_viiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viifiii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viifiii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fi(index, a1) { + var sp = stackSave(); + try { + return dynCall_fi(index, a1) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiifii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_iiifii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iifi(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iifi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiif(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iiif(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) { + var sp = stackSave(); + try { + dynCall_viiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) { + var sp = stackSave(); + try { + dynCall_viiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiidi(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viiiidi(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiidii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + return dynCall_iiiiiiidii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_fiiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_di(index, a1) { + var sp = stackSave(); + try { + return dynCall_di(index, a1) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiidii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_iiidii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiffiiiiiiiiiffffiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23) { + var sp = stackSave(); + try { + return dynCall_iiiiiiffiiiiiiiiiffffiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viffi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viffi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_diidi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_diidi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiifi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_fiifi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiifiifiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) { + var sp = stackSave(); + try { + dynCall_viiiiiifiifiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiifddfiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) { + var sp = stackSave(); + try { + dynCall_viiiiiifddfiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiffffiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) { + var sp = stackSave(); + try { + dynCall_viiiiiiffffiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiffi(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viiffi(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iffi(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iffi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiifii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + dynCall_viiiiiifii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fffi(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_fffi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viifii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viifii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) { + var sp = stackSave(); + try { + dynCall_viiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viifffffi(index, a1, a2, a3, a4, a5, a6, a7, a8) { + var sp = stackSave(); + try { + dynCall_viifffffi(index, a1, a2, a3, a4, a5, a6, a7, a8) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fifi(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_fifi(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiiiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_fiiiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiffiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) { + var sp = stackSave(); + try { + dynCall_viiiiffiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_diiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_diiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vfiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_vfiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiifi(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viiifi(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiifi(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_iiiifi(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiifi(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viiiifi(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vififiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) { + var sp = stackSave(); + try { + dynCall_vififiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiififiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + dynCall_viiififiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiffi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_fiffi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fiiffi(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_fiiffi(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vifii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_vifii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiifi(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_iiifi(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vifiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_vifiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_ddiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_ddiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iif(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_iif(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_fif(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_fif(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiff(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viiff(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_ifi(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_ifi(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vfi(index, a1, a2) { + var sp = stackSave(); + try { + dynCall_vfi(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiifii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viiifii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vidd(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_vidd(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiiii(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_jiiii(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iij(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iij(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiijiii(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + return dynCall_iiijiii(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jii(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_jii(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_ji(index, a1) { + var sp = stackSave(); + try { + return dynCall_ji(index, a1) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viijii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viijii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiij(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiiiij(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_j(index) { + var sp = stackSave(); + try { + return dynCall_j(index) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_ijji(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_ijji(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiji(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_jiji(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiii(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_jiii(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiijii(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + return dynCall_iiiijii(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viji(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + dynCall_viji(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiji(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_viiji(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iji(index, a1, a2, a3) { + var sp = stackSave(); + try { + return dynCall_iji(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jijii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_jijii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiji(index, a1, a2, a3, a4) { + var sp = stackSave(); + try { + return dynCall_iiji(index, a1, a2, a3, a4) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jjji(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_jjji(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viijiiijiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) { + var sp = stackSave(); + try { + dynCall_viijiiijiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiji(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_viiiji(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiijii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiijii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iijiii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iijiii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vijii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + dynCall_vijii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viidiji(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + dynCall_viidiji(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiiji(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_jiiji(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_viiiiiifjjfiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { + var sp = stackSave(); + try { + dynCall_viiiiiifjjfiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jijji(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_jijji(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jdi(index, a1, a2) { + var sp = stackSave(); + try { + return dynCall_jdi(index, a1, a2) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vijjji(index, a1, a2, a3, a4, a5, a6, a7, a8) { + var sp = stackSave(); + try { + dynCall_vijjji(index, a1, a2, a3, a4, a5, a6, a7, a8) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiijiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + return dynCall_iiiiijiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vji(index, a1, a2, a3) { + var sp = stackSave(); + try { + dynCall_vji(index, a1, a2, a3) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iijii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_iijii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiijjii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + return dynCall_iiiijjii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iijjiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) { + var sp = stackSave(); + try { + return dynCall_iijjiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iijiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + var sp = stackSave(); + try { + return dynCall_iijiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiiiiiji(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) { + var sp = stackSave(); + try { + return dynCall_iiiiiiiiiji(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_ijiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_ijiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iijji(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iijji(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiiji(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + return dynCall_iiiiiji(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_iiiiji(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + return dynCall_iiiiji(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vijiii(index, a1, a2, a3, a4, a5, a6) { + var sp = stackSave(); + try { + dynCall_vijiii(index, a1, a2, a3, a4, a5, a6) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vjjjiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { + var sp = stackSave(); + try { + dynCall_vjjjiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_vjiiiii(index, a1, a2, a3, a4, a5, a6, a7) { + var sp = stackSave(); + try { + dynCall_vjiiiii(index, a1, a2, a3, a4, a5, a6, a7) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { + var sp = stackSave(); + try { + return dynCall_jiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + function invoke_jiiiii(index, a1, a2, a3, a4, a5) { + var sp = stackSave(); + try { + return dynCall_jiiiii(index, a1, a2, a3, a4, a5) + } catch (e) { + stackRestore(sp); + if (e !== e + 0) + throw e; + _setThrew(1, 0) + } + } + Module["addRunDependency"] = addRunDependency; + Module["removeRunDependency"] = removeRunDependency; + Module["FS_createPath"] = FS.createPath; + Module["FS_createDataFile"] = FS.createDataFile; + Module["ccall"] = ccall; + Module["cwrap"] = cwrap; + Module["stackTrace"] = stackTrace; + var calledRun; + dependenciesFulfilled = function runCaller() { + if (!calledRun) + run(); + if (!calledRun) + dependenciesFulfilled = runCaller + } + ; + function callMain(args=[]) { + var entryFunction = _main; + args.unshift(thisProgram); + var argc = args.length; + var argv = stackAlloc((argc + 1) * 4); + var argv_ptr = argv >> 2; + args.forEach(arg => { + HEAP32[argv_ptr++] = stringToUTF8OnStack(arg) + } + ); + HEAP32[argv_ptr] = 0; + try { + var ret = entryFunction(argc, argv); + exitJS(ret, true); + return ret + } catch (e) { + return handleException(e) + } + } + function run(args=arguments_) { + if (runDependencies > 0) { + return + } + preRun(); + if (runDependencies > 0) { + return + } + function doRun() { + if (calledRun) + return; + calledRun = true; + Module["calledRun"] = true; + if (ABORT) + return; + initRuntime(); + preMain(); + readyPromiseResolve(Module); + if (Module["onRuntimeInitialized"]) + Module["onRuntimeInitialized"](); + if (shouldRunNow) + callMain(args); + postRun() + } + if (Module["setStatus"]) { + Module["setStatus"]("Running..."); + setTimeout(function() { + setTimeout(function() { + Module["setStatus"]("") + }, 1); + doRun() + }, 1) + } else { + doRun() + } + } + if (Module["preInit"]) { + if (typeof Module["preInit"] == "function") + Module["preInit"] = [Module["preInit"]]; + while (Module["preInit"].length > 0) { + Module["preInit"].pop()() + } + } + var shouldRunNow = true; + if (Module["noInitialRun"]) + shouldRunNow = false; + run(); + + return unityFramework.ready + } + + ); +} +)(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = unityFramework; +else if (typeof define === 'function' && define['amd']) + define([], function() { + return unityFramework; + }); +else if (typeof exports === 'object') + exports["unityFramework"] = unityFramework; diff --git a/KourIO/content/stream/bundles/renders/balaclavabundle.png b/KourIO/content/stream/bundles/renders/balaclavabundle.png new file mode 100644 index 0000000..6916d29 Binary files /dev/null and b/KourIO/content/stream/bundles/renders/balaclavabundle.png differ diff --git a/KourIO/content/stream/bundles/renders/christmas.png b/KourIO/content/stream/bundles/renders/christmas.png new file mode 100644 index 0000000..fe2d654 Binary files /dev/null and b/KourIO/content/stream/bundles/renders/christmas.png differ diff --git a/KourIO/content/stream/bundles/renders/dragongodbundle.png b/KourIO/content/stream/bundles/renders/dragongodbundle.png new file mode 100644 index 0000000..76ee1fa Binary files /dev/null and b/KourIO/content/stream/bundles/renders/dragongodbundle.png differ diff --git a/KourIO/content/stream/bundles/renders/golden.png b/KourIO/content/stream/bundles/renders/golden.png new file mode 100644 index 0000000..ef1fded Binary files /dev/null and b/KourIO/content/stream/bundles/renders/golden.png differ diff --git a/KourIO/content/stream/bundles/renders/haloweenbundle.png b/KourIO/content/stream/bundles/renders/haloweenbundle.png new file mode 100644 index 0000000..05e74b2 Binary files /dev/null and b/KourIO/content/stream/bundles/renders/haloweenbundle.png differ diff --git a/KourIO/content/stream/bundles/renders/hologrambundle.png b/KourIO/content/stream/bundles/renders/hologrambundle.png new file mode 100644 index 0000000..8afe2b6 Binary files /dev/null and b/KourIO/content/stream/bundles/renders/hologrambundle.png differ diff --git a/KourIO/content/stream/bundles/renders/wireframe.png b/KourIO/content/stream/bundles/renders/wireframe.png new file mode 100644 index 0000000..623f159 Binary files /dev/null and b/KourIO/content/stream/bundles/renders/wireframe.png differ diff --git a/KourIO/content/stream/characters/icons/65.png b/KourIO/content/stream/characters/icons/65.png new file mode 100644 index 0000000..db85a5d Binary files /dev/null and b/KourIO/content/stream/characters/icons/65.png differ diff --git a/KourIO/content/stream/characters/icons/66.png b/KourIO/content/stream/characters/icons/66.png new file mode 100644 index 0000000..7c93731 Binary files /dev/null and b/KourIO/content/stream/characters/icons/66.png differ diff --git a/KourIO/content/stream/characters/icons/67.png b/KourIO/content/stream/characters/icons/67.png new file mode 100644 index 0000000..2f41b35 Binary files /dev/null and b/KourIO/content/stream/characters/icons/67.png differ diff --git a/KourIO/content/stream/characters/icons/68.png b/KourIO/content/stream/characters/icons/68.png new file mode 100644 index 0000000..fc219fb Binary files /dev/null and b/KourIO/content/stream/characters/icons/68.png differ diff --git a/KourIO/content/stream/characters/icons/69.png b/KourIO/content/stream/characters/icons/69.png new file mode 100644 index 0000000..4316530 Binary files /dev/null and b/KourIO/content/stream/characters/icons/69.png differ diff --git a/KourIO/content/stream/characters/icons/70.png b/KourIO/content/stream/characters/icons/70.png new file mode 100644 index 0000000..96bd8a9 Binary files /dev/null and b/KourIO/content/stream/characters/icons/70.png differ diff --git a/KourIO/content/stream/characters/icons/71.png b/KourIO/content/stream/characters/icons/71.png new file mode 100644 index 0000000..f7af04a Binary files /dev/null and b/KourIO/content/stream/characters/icons/71.png differ diff --git a/KourIO/content/stream/characters/icons/72.png b/KourIO/content/stream/characters/icons/72.png new file mode 100644 index 0000000..d4e561c Binary files /dev/null and b/KourIO/content/stream/characters/icons/72.png differ diff --git a/KourIO/content/stream/characters/icons/73.png b/KourIO/content/stream/characters/icons/73.png new file mode 100644 index 0000000..673e104 Binary files /dev/null and b/KourIO/content/stream/characters/icons/73.png differ diff --git a/KourIO/content/stream/characters/icons/74.png b/KourIO/content/stream/characters/icons/74.png new file mode 100644 index 0000000..b8b10e2 Binary files /dev/null and b/KourIO/content/stream/characters/icons/74.png differ diff --git a/KourIO/content/stream/characters/icons/75.png b/KourIO/content/stream/characters/icons/75.png new file mode 100644 index 0000000..79cde6b Binary files /dev/null and b/KourIO/content/stream/characters/icons/75.png differ diff --git a/KourIO/content/stream/characters/icons/76.png b/KourIO/content/stream/characters/icons/76.png new file mode 100644 index 0000000..3bdc4f0 Binary files /dev/null and b/KourIO/content/stream/characters/icons/76.png differ diff --git a/KourIO/content/stream/characters/icons/77.png b/KourIO/content/stream/characters/icons/77.png new file mode 100644 index 0000000..7e1a5c2 Binary files /dev/null and b/KourIO/content/stream/characters/icons/77.png differ diff --git a/KourIO/content/stream/characters/icons/78.png b/KourIO/content/stream/characters/icons/78.png new file mode 100644 index 0000000..d5d068c Binary files /dev/null and b/KourIO/content/stream/characters/icons/78.png differ diff --git a/KourIO/content/stream/characters/icons/79.png b/KourIO/content/stream/characters/icons/79.png new file mode 100644 index 0000000..172b167 Binary files /dev/null and b/KourIO/content/stream/characters/icons/79.png differ diff --git a/KourIO/content/stream/characters/icons/80.png b/KourIO/content/stream/characters/icons/80.png new file mode 100644 index 0000000..01de724 Binary files /dev/null and b/KourIO/content/stream/characters/icons/80.png differ diff --git a/KourIO/content/stream/characters/icons/81.png b/KourIO/content/stream/characters/icons/81.png new file mode 100644 index 0000000..457c203 Binary files /dev/null and b/KourIO/content/stream/characters/icons/81.png differ diff --git a/KourIO/content/stream/characters/icons/82.png b/KourIO/content/stream/characters/icons/82.png new file mode 100644 index 0000000..203e1bb Binary files /dev/null and b/KourIO/content/stream/characters/icons/82.png differ diff --git a/KourIO/content/stream/characters/icons/83.png b/KourIO/content/stream/characters/icons/83.png new file mode 100644 index 0000000..ac7b26f Binary files /dev/null and b/KourIO/content/stream/characters/icons/83.png differ diff --git a/KourIO/content/stream/characters/icons/84.png b/KourIO/content/stream/characters/icons/84.png new file mode 100644 index 0000000..8fa64f0 Binary files /dev/null and b/KourIO/content/stream/characters/icons/84.png differ diff --git a/KourIO/content/stream/characters/icons/85.png b/KourIO/content/stream/characters/icons/85.png new file mode 100644 index 0000000..2d75ca7 Binary files /dev/null and b/KourIO/content/stream/characters/icons/85.png differ diff --git a/KourIO/content/stream/characters/icons/86.png b/KourIO/content/stream/characters/icons/86.png new file mode 100644 index 0000000..edce1ad Binary files /dev/null and b/KourIO/content/stream/characters/icons/86.png differ diff --git a/KourIO/content/stream/characters/icons/87.png b/KourIO/content/stream/characters/icons/87.png new file mode 100644 index 0000000..bc2c4d2 Binary files /dev/null and b/KourIO/content/stream/characters/icons/87.png differ diff --git a/KourIO/content/stream/characters/icons/88.png b/KourIO/content/stream/characters/icons/88.png new file mode 100644 index 0000000..947dbe0 Binary files /dev/null and b/KourIO/content/stream/characters/icons/88.png differ diff --git a/KourIO/content/stream/characters/icons/89.png b/KourIO/content/stream/characters/icons/89.png new file mode 100644 index 0000000..59fe7ee Binary files /dev/null and b/KourIO/content/stream/characters/icons/89.png differ diff --git a/KourIO/content/stream/characters/icons/90.png b/KourIO/content/stream/characters/icons/90.png new file mode 100644 index 0000000..163a874 Binary files /dev/null and b/KourIO/content/stream/characters/icons/90.png differ diff --git a/KourIO/content/stream/characters/icons/91.png b/KourIO/content/stream/characters/icons/91.png new file mode 100644 index 0000000..7f2dbc3 Binary files /dev/null and b/KourIO/content/stream/characters/icons/91.png differ diff --git a/KourIO/content/stream/characters/icons/92.png b/KourIO/content/stream/characters/icons/92.png new file mode 100644 index 0000000..f41f651 Binary files /dev/null and b/KourIO/content/stream/characters/icons/92.png differ diff --git a/KourIO/content/stream/characters/icons/93.png b/KourIO/content/stream/characters/icons/93.png new file mode 100644 index 0000000..3e3543d Binary files /dev/null and b/KourIO/content/stream/characters/icons/93.png differ diff --git a/KourIO/content/stream/characters/icons/94.png b/KourIO/content/stream/characters/icons/94.png new file mode 100644 index 0000000..78b6d40 Binary files /dev/null and b/KourIO/content/stream/characters/icons/94.png differ diff --git a/KourIO/content/stream/characters/icons/95.png b/KourIO/content/stream/characters/icons/95.png new file mode 100644 index 0000000..93b9e86 Binary files /dev/null and b/KourIO/content/stream/characters/icons/95.png differ diff --git a/KourIO/content/stream/characters/icons/96.png b/KourIO/content/stream/characters/icons/96.png new file mode 100644 index 0000000..4c7f43a Binary files /dev/null and b/KourIO/content/stream/characters/icons/96.png differ diff --git a/KourIO/content/stream/characters/icons/P0.png b/KourIO/content/stream/characters/icons/P0.png new file mode 100644 index 0000000..0134337 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P0.png differ diff --git a/KourIO/content/stream/characters/icons/P1.png b/KourIO/content/stream/characters/icons/P1.png new file mode 100644 index 0000000..555d8fa Binary files /dev/null and b/KourIO/content/stream/characters/icons/P1.png differ diff --git a/KourIO/content/stream/characters/icons/P10.png b/KourIO/content/stream/characters/icons/P10.png new file mode 100644 index 0000000..25c0571 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P10.png differ diff --git a/KourIO/content/stream/characters/icons/P11.png b/KourIO/content/stream/characters/icons/P11.png new file mode 100644 index 0000000..da03acf Binary files /dev/null and b/KourIO/content/stream/characters/icons/P11.png differ diff --git a/KourIO/content/stream/characters/icons/P15.png b/KourIO/content/stream/characters/icons/P15.png new file mode 100644 index 0000000..974095a Binary files /dev/null and b/KourIO/content/stream/characters/icons/P15.png differ diff --git a/KourIO/content/stream/characters/icons/P2.png b/KourIO/content/stream/characters/icons/P2.png new file mode 100644 index 0000000..12819c8 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P2.png differ diff --git a/KourIO/content/stream/characters/icons/P20.png b/KourIO/content/stream/characters/icons/P20.png new file mode 100644 index 0000000..409cb3c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P20.png differ diff --git a/KourIO/content/stream/characters/icons/P21.png b/KourIO/content/stream/characters/icons/P21.png new file mode 100644 index 0000000..9a124b2 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P21.png differ diff --git a/KourIO/content/stream/characters/icons/P22.png b/KourIO/content/stream/characters/icons/P22.png new file mode 100644 index 0000000..6914d36 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P22.png differ diff --git a/KourIO/content/stream/characters/icons/P23.png b/KourIO/content/stream/characters/icons/P23.png new file mode 100644 index 0000000..3bc76a1 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P23.png differ diff --git a/KourIO/content/stream/characters/icons/P24.png b/KourIO/content/stream/characters/icons/P24.png new file mode 100644 index 0000000..5c9c2f5 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P24.png differ diff --git a/KourIO/content/stream/characters/icons/P25.png b/KourIO/content/stream/characters/icons/P25.png new file mode 100644 index 0000000..ac851e2 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P25.png differ diff --git a/KourIO/content/stream/characters/icons/P26.png b/KourIO/content/stream/characters/icons/P26.png new file mode 100644 index 0000000..5c62b81 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P26.png differ diff --git a/KourIO/content/stream/characters/icons/P27.png b/KourIO/content/stream/characters/icons/P27.png new file mode 100644 index 0000000..10fd846 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P27.png differ diff --git a/KourIO/content/stream/characters/icons/P28.png b/KourIO/content/stream/characters/icons/P28.png new file mode 100644 index 0000000..50c942c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P28.png differ diff --git a/KourIO/content/stream/characters/icons/P29.png b/KourIO/content/stream/characters/icons/P29.png new file mode 100644 index 0000000..fc5ac61 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P29.png differ diff --git a/KourIO/content/stream/characters/icons/P3.png b/KourIO/content/stream/characters/icons/P3.png new file mode 100644 index 0000000..5147b6b Binary files /dev/null and b/KourIO/content/stream/characters/icons/P3.png differ diff --git a/KourIO/content/stream/characters/icons/P30.png b/KourIO/content/stream/characters/icons/P30.png new file mode 100644 index 0000000..c446272 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P30.png differ diff --git a/KourIO/content/stream/characters/icons/P31.png b/KourIO/content/stream/characters/icons/P31.png new file mode 100644 index 0000000..d95a3fb Binary files /dev/null and b/KourIO/content/stream/characters/icons/P31.png differ diff --git a/KourIO/content/stream/characters/icons/P32.png b/KourIO/content/stream/characters/icons/P32.png new file mode 100644 index 0000000..325f33c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P32.png differ diff --git a/KourIO/content/stream/characters/icons/P33.png b/KourIO/content/stream/characters/icons/P33.png new file mode 100644 index 0000000..923e1ad Binary files /dev/null and b/KourIO/content/stream/characters/icons/P33.png differ diff --git a/KourIO/content/stream/characters/icons/P34.png b/KourIO/content/stream/characters/icons/P34.png new file mode 100644 index 0000000..066f0dc Binary files /dev/null and b/KourIO/content/stream/characters/icons/P34.png differ diff --git a/KourIO/content/stream/characters/icons/P36.png b/KourIO/content/stream/characters/icons/P36.png new file mode 100644 index 0000000..e6a4ff7 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P36.png differ diff --git a/KourIO/content/stream/characters/icons/P37.png b/KourIO/content/stream/characters/icons/P37.png new file mode 100644 index 0000000..eb6ae31 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P37.png differ diff --git a/KourIO/content/stream/characters/icons/P38.png b/KourIO/content/stream/characters/icons/P38.png new file mode 100644 index 0000000..05e2171 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P38.png differ diff --git a/KourIO/content/stream/characters/icons/P39.png b/KourIO/content/stream/characters/icons/P39.png new file mode 100644 index 0000000..8325cf1 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P39.png differ diff --git a/KourIO/content/stream/characters/icons/P4.png b/KourIO/content/stream/characters/icons/P4.png new file mode 100644 index 0000000..48c028b Binary files /dev/null and b/KourIO/content/stream/characters/icons/P4.png differ diff --git a/KourIO/content/stream/characters/icons/P40.png b/KourIO/content/stream/characters/icons/P40.png new file mode 100644 index 0000000..5aab3e0 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P40.png differ diff --git a/KourIO/content/stream/characters/icons/P41.png b/KourIO/content/stream/characters/icons/P41.png new file mode 100644 index 0000000..2ef13e3 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P41.png differ diff --git a/KourIO/content/stream/characters/icons/P42.png b/KourIO/content/stream/characters/icons/P42.png new file mode 100644 index 0000000..9c5316b Binary files /dev/null and b/KourIO/content/stream/characters/icons/P42.png differ diff --git a/KourIO/content/stream/characters/icons/P43.png b/KourIO/content/stream/characters/icons/P43.png new file mode 100644 index 0000000..504b73f Binary files /dev/null and b/KourIO/content/stream/characters/icons/P43.png differ diff --git a/KourIO/content/stream/characters/icons/P46.png b/KourIO/content/stream/characters/icons/P46.png new file mode 100644 index 0000000..0e83ef3 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P46.png differ diff --git a/KourIO/content/stream/characters/icons/P47.png b/KourIO/content/stream/characters/icons/P47.png new file mode 100644 index 0000000..0c480ab Binary files /dev/null and b/KourIO/content/stream/characters/icons/P47.png differ diff --git a/KourIO/content/stream/characters/icons/P48.png b/KourIO/content/stream/characters/icons/P48.png new file mode 100644 index 0000000..555759c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P48.png differ diff --git a/KourIO/content/stream/characters/icons/P49.png b/KourIO/content/stream/characters/icons/P49.png new file mode 100644 index 0000000..64f3ecb Binary files /dev/null and b/KourIO/content/stream/characters/icons/P49.png differ diff --git a/KourIO/content/stream/characters/icons/P5.png b/KourIO/content/stream/characters/icons/P5.png new file mode 100644 index 0000000..de2d89a Binary files /dev/null and b/KourIO/content/stream/characters/icons/P5.png differ diff --git a/KourIO/content/stream/characters/icons/P50.png b/KourIO/content/stream/characters/icons/P50.png new file mode 100644 index 0000000..028b257 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P50.png differ diff --git a/KourIO/content/stream/characters/icons/P51.png b/KourIO/content/stream/characters/icons/P51.png new file mode 100644 index 0000000..9eaf0d9 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P51.png differ diff --git a/KourIO/content/stream/characters/icons/P52.png b/KourIO/content/stream/characters/icons/P52.png new file mode 100644 index 0000000..2a741b3 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P52.png differ diff --git a/KourIO/content/stream/characters/icons/P53.png b/KourIO/content/stream/characters/icons/P53.png new file mode 100644 index 0000000..53c2b76 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P53.png differ diff --git a/KourIO/content/stream/characters/icons/P54.png b/KourIO/content/stream/characters/icons/P54.png new file mode 100644 index 0000000..4f9a4b6 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P54.png differ diff --git a/KourIO/content/stream/characters/icons/P6.png b/KourIO/content/stream/characters/icons/P6.png new file mode 100644 index 0000000..95b9a57 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P6.png differ diff --git a/KourIO/content/stream/characters/icons/P60.png b/KourIO/content/stream/characters/icons/P60.png new file mode 100644 index 0000000..aabf4de Binary files /dev/null and b/KourIO/content/stream/characters/icons/P60.png differ diff --git a/KourIO/content/stream/characters/icons/P61.png b/KourIO/content/stream/characters/icons/P61.png new file mode 100644 index 0000000..3b05aa7 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P61.png differ diff --git a/KourIO/content/stream/characters/icons/P62.png b/KourIO/content/stream/characters/icons/P62.png new file mode 100644 index 0000000..e1c6765 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P62.png differ diff --git a/KourIO/content/stream/characters/icons/P63.png b/KourIO/content/stream/characters/icons/P63.png new file mode 100644 index 0000000..baaa155 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P63.png differ diff --git a/KourIO/content/stream/characters/icons/P64.png b/KourIO/content/stream/characters/icons/P64.png new file mode 100644 index 0000000..905e359 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P64.png differ diff --git a/KourIO/content/stream/characters/icons/P65.png b/KourIO/content/stream/characters/icons/P65.png new file mode 100644 index 0000000..ec2cc89 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P65.png differ diff --git a/KourIO/content/stream/characters/icons/P66.png b/KourIO/content/stream/characters/icons/P66.png new file mode 100644 index 0000000..a1fb37d Binary files /dev/null and b/KourIO/content/stream/characters/icons/P66.png differ diff --git a/KourIO/content/stream/characters/icons/P67.png b/KourIO/content/stream/characters/icons/P67.png new file mode 100644 index 0000000..6020892 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P67.png differ diff --git a/KourIO/content/stream/characters/icons/P69.png b/KourIO/content/stream/characters/icons/P69.png new file mode 100644 index 0000000..6e58a4c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P69.png differ diff --git a/KourIO/content/stream/characters/icons/P7.png b/KourIO/content/stream/characters/icons/P7.png new file mode 100644 index 0000000..8505d1e Binary files /dev/null and b/KourIO/content/stream/characters/icons/P7.png differ diff --git a/KourIO/content/stream/characters/icons/P70.png b/KourIO/content/stream/characters/icons/P70.png new file mode 100644 index 0000000..4f06944 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P70.png differ diff --git a/KourIO/content/stream/characters/icons/P71.png b/KourIO/content/stream/characters/icons/P71.png new file mode 100644 index 0000000..f43d7a4 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P71.png differ diff --git a/KourIO/content/stream/characters/icons/P72.png b/KourIO/content/stream/characters/icons/P72.png new file mode 100644 index 0000000..74fab63 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P72.png differ diff --git a/KourIO/content/stream/characters/icons/P73.png b/KourIO/content/stream/characters/icons/P73.png new file mode 100644 index 0000000..13d51aa Binary files /dev/null and b/KourIO/content/stream/characters/icons/P73.png differ diff --git a/KourIO/content/stream/characters/icons/P74.png b/KourIO/content/stream/characters/icons/P74.png new file mode 100644 index 0000000..64c4b5c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P74.png differ diff --git a/KourIO/content/stream/characters/icons/P75.png b/KourIO/content/stream/characters/icons/P75.png new file mode 100644 index 0000000..8da12fb Binary files /dev/null and b/KourIO/content/stream/characters/icons/P75.png differ diff --git a/KourIO/content/stream/characters/icons/P76.png b/KourIO/content/stream/characters/icons/P76.png new file mode 100644 index 0000000..c53d652 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P76.png differ diff --git a/KourIO/content/stream/characters/icons/P77.png b/KourIO/content/stream/characters/icons/P77.png new file mode 100644 index 0000000..acf9197 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P77.png differ diff --git a/KourIO/content/stream/characters/icons/P78.png b/KourIO/content/stream/characters/icons/P78.png new file mode 100644 index 0000000..efaccdf Binary files /dev/null and b/KourIO/content/stream/characters/icons/P78.png differ diff --git a/KourIO/content/stream/characters/icons/P79.png b/KourIO/content/stream/characters/icons/P79.png new file mode 100644 index 0000000..498c88f Binary files /dev/null and b/KourIO/content/stream/characters/icons/P79.png differ diff --git a/KourIO/content/stream/characters/icons/P8.png b/KourIO/content/stream/characters/icons/P8.png new file mode 100644 index 0000000..e4a085c Binary files /dev/null and b/KourIO/content/stream/characters/icons/P8.png differ diff --git a/KourIO/content/stream/characters/icons/P9.png b/KourIO/content/stream/characters/icons/P9.png new file mode 100644 index 0000000..4ff6d30 Binary files /dev/null and b/KourIO/content/stream/characters/icons/P9.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/0.png b/KourIO/content/stream/characters/textures/body-attachments/0.png new file mode 100644 index 0000000..de1d513 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/0.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/10.png b/KourIO/content/stream/characters/textures/body-attachments/10.png new file mode 100644 index 0000000..b4dc1f2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/10.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/11.png b/KourIO/content/stream/characters/textures/body-attachments/11.png new file mode 100644 index 0000000..067af04 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/11.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/12.png b/KourIO/content/stream/characters/textures/body-attachments/12.png new file mode 100644 index 0000000..05bffde Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/12.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/13.png b/KourIO/content/stream/characters/textures/body-attachments/13.png new file mode 100644 index 0000000..ec3af17 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/13.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/14.png b/KourIO/content/stream/characters/textures/body-attachments/14.png new file mode 100644 index 0000000..b0a005b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/14.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/16.png b/KourIO/content/stream/characters/textures/body-attachments/16.png new file mode 100644 index 0000000..5a8778b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/16.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/17.png b/KourIO/content/stream/characters/textures/body-attachments/17.png new file mode 100644 index 0000000..ec3af17 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/17.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/2.png b/KourIO/content/stream/characters/textures/body-attachments/2.png new file mode 100644 index 0000000..ac81a0d Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/2.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/20.png b/KourIO/content/stream/characters/textures/body-attachments/20.png new file mode 100644 index 0000000..aaf9c3b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/20.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/21.png b/KourIO/content/stream/characters/textures/body-attachments/21.png new file mode 100644 index 0000000..a6495c3 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/21.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/22.png b/KourIO/content/stream/characters/textures/body-attachments/22.png new file mode 100644 index 0000000..939c872 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/22.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/23.png b/KourIO/content/stream/characters/textures/body-attachments/23.png new file mode 100644 index 0000000..7f8b6ec Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/23.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/24.png b/KourIO/content/stream/characters/textures/body-attachments/24.png new file mode 100644 index 0000000..63d7e38 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/24.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/27.png b/KourIO/content/stream/characters/textures/body-attachments/27.png new file mode 100644 index 0000000..0112cb2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/27.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/28.png b/KourIO/content/stream/characters/textures/body-attachments/28.png new file mode 100644 index 0000000..1f93da7 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/28.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/29.png b/KourIO/content/stream/characters/textures/body-attachments/29.png new file mode 100644 index 0000000..725d009 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/29.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/3.png b/KourIO/content/stream/characters/textures/body-attachments/3.png new file mode 100644 index 0000000..ae0a43d Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/3.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/30.png b/KourIO/content/stream/characters/textures/body-attachments/30.png new file mode 100644 index 0000000..d12092c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/30.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/31.png b/KourIO/content/stream/characters/textures/body-attachments/31.png new file mode 100644 index 0000000..3089be1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/31.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/33.png b/KourIO/content/stream/characters/textures/body-attachments/33.png new file mode 100644 index 0000000..0b876fb Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/33.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/34.png b/KourIO/content/stream/characters/textures/body-attachments/34.png new file mode 100644 index 0000000..490feb1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/34.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/35.png b/KourIO/content/stream/characters/textures/body-attachments/35.png new file mode 100644 index 0000000..fecdedf Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/35.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/36.png b/KourIO/content/stream/characters/textures/body-attachments/36.png new file mode 100644 index 0000000..a5fa4a8 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/36.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/39.png b/KourIO/content/stream/characters/textures/body-attachments/39.png new file mode 100644 index 0000000..9484430 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/39.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/4.png b/KourIO/content/stream/characters/textures/body-attachments/4.png new file mode 100644 index 0000000..18ebb62 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/4.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/40.png b/KourIO/content/stream/characters/textures/body-attachments/40.png new file mode 100644 index 0000000..492e827 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/40.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/41.png b/KourIO/content/stream/characters/textures/body-attachments/41.png new file mode 100644 index 0000000..cebec16 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/41.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/42.png b/KourIO/content/stream/characters/textures/body-attachments/42.png new file mode 100644 index 0000000..aa66eb0 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/42.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/43.png b/KourIO/content/stream/characters/textures/body-attachments/43.png new file mode 100644 index 0000000..00bba31 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/43.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/44.png b/KourIO/content/stream/characters/textures/body-attachments/44.png new file mode 100644 index 0000000..fabd7ce Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/44.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/45.png b/KourIO/content/stream/characters/textures/body-attachments/45.png new file mode 100644 index 0000000..00bba31 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/45.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/46.png b/KourIO/content/stream/characters/textures/body-attachments/46.png new file mode 100644 index 0000000..d52811b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/46.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/47.png b/KourIO/content/stream/characters/textures/body-attachments/47.png new file mode 100644 index 0000000..73f1a52 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/47.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/48.png b/KourIO/content/stream/characters/textures/body-attachments/48.png new file mode 100644 index 0000000..0019faf Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/48.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/5.png b/KourIO/content/stream/characters/textures/body-attachments/5.png new file mode 100644 index 0000000..3b42110 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/5.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/51.png b/KourIO/content/stream/characters/textures/body-attachments/51.png new file mode 100644 index 0000000..221288e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/51.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/54.png b/KourIO/content/stream/characters/textures/body-attachments/54.png new file mode 100644 index 0000000..ad9360c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/54.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/55.png b/KourIO/content/stream/characters/textures/body-attachments/55.png new file mode 100644 index 0000000..1a40f2b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/55.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/56.png b/KourIO/content/stream/characters/textures/body-attachments/56.png new file mode 100644 index 0000000..213f54c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/56.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/57.png b/KourIO/content/stream/characters/textures/body-attachments/57.png new file mode 100644 index 0000000..213f54c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/57.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/58.png b/KourIO/content/stream/characters/textures/body-attachments/58.png new file mode 100644 index 0000000..1ccbe66 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/58.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/6.png b/KourIO/content/stream/characters/textures/body-attachments/6.png new file mode 100644 index 0000000..3ee22d1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/6.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/61.png b/KourIO/content/stream/characters/textures/body-attachments/61.png new file mode 100644 index 0000000..0dfd7bf Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/61.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/62.png b/KourIO/content/stream/characters/textures/body-attachments/62.png new file mode 100644 index 0000000..94e00d1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/62.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/7.png b/KourIO/content/stream/characters/textures/body-attachments/7.png new file mode 100644 index 0000000..b0a005b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/7.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/72.png b/KourIO/content/stream/characters/textures/body-attachments/72.png new file mode 100644 index 0000000..fde69d6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/72.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/73.png b/KourIO/content/stream/characters/textures/body-attachments/73.png new file mode 100644 index 0000000..f9114ae Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/73.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/74.png b/KourIO/content/stream/characters/textures/body-attachments/74.png new file mode 100644 index 0000000..c215556 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/74.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/76.png b/KourIO/content/stream/characters/textures/body-attachments/76.png new file mode 100644 index 0000000..0adc9dc Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/76.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/78.png b/KourIO/content/stream/characters/textures/body-attachments/78.png new file mode 100644 index 0000000..eccedea Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/78.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/8.png b/KourIO/content/stream/characters/textures/body-attachments/8.png new file mode 100644 index 0000000..366f41f Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/8.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/80.png b/KourIO/content/stream/characters/textures/body-attachments/80.png new file mode 100644 index 0000000..6f9a724 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/80.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/81.png b/KourIO/content/stream/characters/textures/body-attachments/81.png new file mode 100644 index 0000000..0bc65b7 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/81.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/83.png b/KourIO/content/stream/characters/textures/body-attachments/83.png new file mode 100644 index 0000000..c43ee46 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/83.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/84.png b/KourIO/content/stream/characters/textures/body-attachments/84.png new file mode 100644 index 0000000..ccc3330 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/84.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/85.png b/KourIO/content/stream/characters/textures/body-attachments/85.png new file mode 100644 index 0000000..3af07a5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/85.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/86.png b/KourIO/content/stream/characters/textures/body-attachments/86.png new file mode 100644 index 0000000..8020305 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/86.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/9.png b/KourIO/content/stream/characters/textures/body-attachments/9.png new file mode 100644 index 0000000..6983160 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/9.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/91.png b/KourIO/content/stream/characters/textures/body-attachments/91.png new file mode 100644 index 0000000..f0ffa2a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/91.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/92.png b/KourIO/content/stream/characters/textures/body-attachments/92.png new file mode 100644 index 0000000..97a5131 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/92.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/93.png b/KourIO/content/stream/characters/textures/body-attachments/93.png new file mode 100644 index 0000000..71eb787 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/93.png differ diff --git a/KourIO/content/stream/characters/textures/body-attachments/94.png b/KourIO/content/stream/characters/textures/body-attachments/94.png new file mode 100644 index 0000000..1b6b17e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body-attachments/94.png differ diff --git a/KourIO/content/stream/characters/textures/body/0.png b/KourIO/content/stream/characters/textures/body/0.png new file mode 100644 index 0000000..a5dda79 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/0.png differ diff --git a/KourIO/content/stream/characters/textures/body/1.png b/KourIO/content/stream/characters/textures/body/1.png new file mode 100644 index 0000000..c451d98 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/1.png differ diff --git a/KourIO/content/stream/characters/textures/body/10.png b/KourIO/content/stream/characters/textures/body/10.png new file mode 100644 index 0000000..b20fe6b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/10.png differ diff --git a/KourIO/content/stream/characters/textures/body/11.png b/KourIO/content/stream/characters/textures/body/11.png new file mode 100644 index 0000000..ee4e556 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/11.png differ diff --git a/KourIO/content/stream/characters/textures/body/12.png b/KourIO/content/stream/characters/textures/body/12.png new file mode 100644 index 0000000..0181b39 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/12.png differ diff --git a/KourIO/content/stream/characters/textures/body/13.png b/KourIO/content/stream/characters/textures/body/13.png new file mode 100644 index 0000000..696bac4 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/13.png differ diff --git a/KourIO/content/stream/characters/textures/body/14.png b/KourIO/content/stream/characters/textures/body/14.png new file mode 100644 index 0000000..2a87494 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/14.png differ diff --git a/KourIO/content/stream/characters/textures/body/15.png b/KourIO/content/stream/characters/textures/body/15.png new file mode 100644 index 0000000..da8f5da Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/15.png differ diff --git a/KourIO/content/stream/characters/textures/body/16.png b/KourIO/content/stream/characters/textures/body/16.png new file mode 100644 index 0000000..63b02e4 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/16.png differ diff --git a/KourIO/content/stream/characters/textures/body/17.png b/KourIO/content/stream/characters/textures/body/17.png new file mode 100644 index 0000000..244a70d Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/17.png differ diff --git a/KourIO/content/stream/characters/textures/body/18.png b/KourIO/content/stream/characters/textures/body/18.png new file mode 100644 index 0000000..44f4698 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/18.png differ diff --git a/KourIO/content/stream/characters/textures/body/19.png b/KourIO/content/stream/characters/textures/body/19.png new file mode 100644 index 0000000..d177c0e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/19.png differ diff --git a/KourIO/content/stream/characters/textures/body/2.png b/KourIO/content/stream/characters/textures/body/2.png new file mode 100644 index 0000000..567e701 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/2.png differ diff --git a/KourIO/content/stream/characters/textures/body/20.png b/KourIO/content/stream/characters/textures/body/20.png new file mode 100644 index 0000000..e066674 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/20.png differ diff --git a/KourIO/content/stream/characters/textures/body/21.png b/KourIO/content/stream/characters/textures/body/21.png new file mode 100644 index 0000000..e344a84 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/21.png differ diff --git a/KourIO/content/stream/characters/textures/body/22.png b/KourIO/content/stream/characters/textures/body/22.png new file mode 100644 index 0000000..ee41562 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/22.png differ diff --git a/KourIO/content/stream/characters/textures/body/23.png b/KourIO/content/stream/characters/textures/body/23.png new file mode 100644 index 0000000..0a41d00 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/23.png differ diff --git a/KourIO/content/stream/characters/textures/body/24.png b/KourIO/content/stream/characters/textures/body/24.png new file mode 100644 index 0000000..8277f8e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/24.png differ diff --git a/KourIO/content/stream/characters/textures/body/25.png b/KourIO/content/stream/characters/textures/body/25.png new file mode 100644 index 0000000..a9b4a29 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/25.png differ diff --git a/KourIO/content/stream/characters/textures/body/26.png b/KourIO/content/stream/characters/textures/body/26.png new file mode 100644 index 0000000..4abfb17 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/26.png differ diff --git a/KourIO/content/stream/characters/textures/body/27.png b/KourIO/content/stream/characters/textures/body/27.png new file mode 100644 index 0000000..52b4c9c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/27.png differ diff --git a/KourIO/content/stream/characters/textures/body/28.png b/KourIO/content/stream/characters/textures/body/28.png new file mode 100644 index 0000000..9f4156c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/28.png differ diff --git a/KourIO/content/stream/characters/textures/body/29.png b/KourIO/content/stream/characters/textures/body/29.png new file mode 100644 index 0000000..684728e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/29.png differ diff --git a/KourIO/content/stream/characters/textures/body/3.png b/KourIO/content/stream/characters/textures/body/3.png new file mode 100644 index 0000000..e8967cb Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/3.png differ diff --git a/KourIO/content/stream/characters/textures/body/30.png b/KourIO/content/stream/characters/textures/body/30.png new file mode 100644 index 0000000..7795e6a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/30.png differ diff --git a/KourIO/content/stream/characters/textures/body/31.png b/KourIO/content/stream/characters/textures/body/31.png new file mode 100644 index 0000000..fbbdfeb Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/31.png differ diff --git a/KourIO/content/stream/characters/textures/body/32.png b/KourIO/content/stream/characters/textures/body/32.png new file mode 100644 index 0000000..e232164 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/32.png differ diff --git a/KourIO/content/stream/characters/textures/body/33.png b/KourIO/content/stream/characters/textures/body/33.png new file mode 100644 index 0000000..7d5650b Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/33.png differ diff --git a/KourIO/content/stream/characters/textures/body/34.png b/KourIO/content/stream/characters/textures/body/34.png new file mode 100644 index 0000000..1bb5baf Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/34.png differ diff --git a/KourIO/content/stream/characters/textures/body/35.png b/KourIO/content/stream/characters/textures/body/35.png new file mode 100644 index 0000000..676da2f Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/35.png differ diff --git a/KourIO/content/stream/characters/textures/body/36.png b/KourIO/content/stream/characters/textures/body/36.png new file mode 100644 index 0000000..23aab77 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/36.png differ diff --git a/KourIO/content/stream/characters/textures/body/37.png b/KourIO/content/stream/characters/textures/body/37.png new file mode 100644 index 0000000..bdcb933 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/37.png differ diff --git a/KourIO/content/stream/characters/textures/body/38.png b/KourIO/content/stream/characters/textures/body/38.png new file mode 100644 index 0000000..c8c2ece Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/38.png differ diff --git a/KourIO/content/stream/characters/textures/body/39.png b/KourIO/content/stream/characters/textures/body/39.png new file mode 100644 index 0000000..eedfb04 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/39.png differ diff --git a/KourIO/content/stream/characters/textures/body/4.png b/KourIO/content/stream/characters/textures/body/4.png new file mode 100644 index 0000000..be5e221 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/4.png differ diff --git a/KourIO/content/stream/characters/textures/body/40.png b/KourIO/content/stream/characters/textures/body/40.png new file mode 100644 index 0000000..3a93575 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/40.png differ diff --git a/KourIO/content/stream/characters/textures/body/41.png b/KourIO/content/stream/characters/textures/body/41.png new file mode 100644 index 0000000..fc21644 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/41.png differ diff --git a/KourIO/content/stream/characters/textures/body/42.png b/KourIO/content/stream/characters/textures/body/42.png new file mode 100644 index 0000000..906d5ad Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/42.png differ diff --git a/KourIO/content/stream/characters/textures/body/43.png b/KourIO/content/stream/characters/textures/body/43.png new file mode 100644 index 0000000..2becf98 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/43.png differ diff --git a/KourIO/content/stream/characters/textures/body/44.png b/KourIO/content/stream/characters/textures/body/44.png new file mode 100644 index 0000000..03d3ee2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/44.png differ diff --git a/KourIO/content/stream/characters/textures/body/45.png b/KourIO/content/stream/characters/textures/body/45.png new file mode 100644 index 0000000..bed4676 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/45.png differ diff --git a/KourIO/content/stream/characters/textures/body/46.png b/KourIO/content/stream/characters/textures/body/46.png new file mode 100644 index 0000000..b383ecc Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/46.png differ diff --git a/KourIO/content/stream/characters/textures/body/47.png b/KourIO/content/stream/characters/textures/body/47.png new file mode 100644 index 0000000..67e0bc1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/47.png differ diff --git a/KourIO/content/stream/characters/textures/body/48.png b/KourIO/content/stream/characters/textures/body/48.png new file mode 100644 index 0000000..8dd9c26 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/48.png differ diff --git a/KourIO/content/stream/characters/textures/body/49.png b/KourIO/content/stream/characters/textures/body/49.png new file mode 100644 index 0000000..7df18f0 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/49.png differ diff --git a/KourIO/content/stream/characters/textures/body/5.png b/KourIO/content/stream/characters/textures/body/5.png new file mode 100644 index 0000000..7ac5ce2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/5.png differ diff --git a/KourIO/content/stream/characters/textures/body/50.png b/KourIO/content/stream/characters/textures/body/50.png new file mode 100644 index 0000000..c0df934 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/50.png differ diff --git a/KourIO/content/stream/characters/textures/body/51.png b/KourIO/content/stream/characters/textures/body/51.png new file mode 100644 index 0000000..bf4cee6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/51.png differ diff --git a/KourIO/content/stream/characters/textures/body/52.png b/KourIO/content/stream/characters/textures/body/52.png new file mode 100644 index 0000000..019f838 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/52.png differ diff --git a/KourIO/content/stream/characters/textures/body/53.png b/KourIO/content/stream/characters/textures/body/53.png new file mode 100644 index 0000000..25fe347 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/53.png differ diff --git a/KourIO/content/stream/characters/textures/body/54.png b/KourIO/content/stream/characters/textures/body/54.png new file mode 100644 index 0000000..4cf7e1e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/54.png differ diff --git a/KourIO/content/stream/characters/textures/body/55.png b/KourIO/content/stream/characters/textures/body/55.png new file mode 100644 index 0000000..12fabc5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/55.png differ diff --git a/KourIO/content/stream/characters/textures/body/56.png b/KourIO/content/stream/characters/textures/body/56.png new file mode 100644 index 0000000..ab18d2e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/56.png differ diff --git a/KourIO/content/stream/characters/textures/body/57.png b/KourIO/content/stream/characters/textures/body/57.png new file mode 100644 index 0000000..303cdf0 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/57.png differ diff --git a/KourIO/content/stream/characters/textures/body/58.png b/KourIO/content/stream/characters/textures/body/58.png new file mode 100644 index 0000000..a03d1b5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/58.png differ diff --git a/KourIO/content/stream/characters/textures/body/59.png b/KourIO/content/stream/characters/textures/body/59.png new file mode 100644 index 0000000..ef6970a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/59.png differ diff --git a/KourIO/content/stream/characters/textures/body/6.png b/KourIO/content/stream/characters/textures/body/6.png new file mode 100644 index 0000000..3db1c83 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/6.png differ diff --git a/KourIO/content/stream/characters/textures/body/60.png b/KourIO/content/stream/characters/textures/body/60.png new file mode 100644 index 0000000..cbdd8ae Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/60.png differ diff --git a/KourIO/content/stream/characters/textures/body/61.png b/KourIO/content/stream/characters/textures/body/61.png new file mode 100644 index 0000000..9f5f4d6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/61.png differ diff --git a/KourIO/content/stream/characters/textures/body/62.png b/KourIO/content/stream/characters/textures/body/62.png new file mode 100644 index 0000000..318aff7 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/62.png differ diff --git a/KourIO/content/stream/characters/textures/body/63.png b/KourIO/content/stream/characters/textures/body/63.png new file mode 100644 index 0000000..8beed1f Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/63.png differ diff --git a/KourIO/content/stream/characters/textures/body/64.png b/KourIO/content/stream/characters/textures/body/64.png new file mode 100644 index 0000000..127e79c Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/64.png differ diff --git a/KourIO/content/stream/characters/textures/body/65.png b/KourIO/content/stream/characters/textures/body/65.png new file mode 100644 index 0000000..8199558 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/65.png differ diff --git a/KourIO/content/stream/characters/textures/body/66.png b/KourIO/content/stream/characters/textures/body/66.png new file mode 100644 index 0000000..52edfa2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/66.png differ diff --git a/KourIO/content/stream/characters/textures/body/67.png b/KourIO/content/stream/characters/textures/body/67.png new file mode 100644 index 0000000..23eb2d1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/67.png differ diff --git a/KourIO/content/stream/characters/textures/body/68.png b/KourIO/content/stream/characters/textures/body/68.png new file mode 100644 index 0000000..c32acf7 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/68.png differ diff --git a/KourIO/content/stream/characters/textures/body/69.png b/KourIO/content/stream/characters/textures/body/69.png new file mode 100644 index 0000000..45665aa Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/69.png differ diff --git a/KourIO/content/stream/characters/textures/body/7.png b/KourIO/content/stream/characters/textures/body/7.png new file mode 100644 index 0000000..52c3205 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/7.png differ diff --git a/KourIO/content/stream/characters/textures/body/70.png b/KourIO/content/stream/characters/textures/body/70.png new file mode 100644 index 0000000..177d3a8 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/70.png differ diff --git a/KourIO/content/stream/characters/textures/body/71.png b/KourIO/content/stream/characters/textures/body/71.png new file mode 100644 index 0000000..4ed871e Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/71.png differ diff --git a/KourIO/content/stream/characters/textures/body/72.png b/KourIO/content/stream/characters/textures/body/72.png new file mode 100644 index 0000000..e9e6c08 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/72.png differ diff --git a/KourIO/content/stream/characters/textures/body/73.png b/KourIO/content/stream/characters/textures/body/73.png new file mode 100644 index 0000000..acf97c2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/73.png differ diff --git a/KourIO/content/stream/characters/textures/body/74.png b/KourIO/content/stream/characters/textures/body/74.png new file mode 100644 index 0000000..73e42b6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/74.png differ diff --git a/KourIO/content/stream/characters/textures/body/75.png b/KourIO/content/stream/characters/textures/body/75.png new file mode 100644 index 0000000..bda1363 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/75.png differ diff --git a/KourIO/content/stream/characters/textures/body/76.png b/KourIO/content/stream/characters/textures/body/76.png new file mode 100644 index 0000000..821b796 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/76.png differ diff --git a/KourIO/content/stream/characters/textures/body/77.png b/KourIO/content/stream/characters/textures/body/77.png new file mode 100644 index 0000000..2ecf9e3 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/77.png differ diff --git a/KourIO/content/stream/characters/textures/body/78.png b/KourIO/content/stream/characters/textures/body/78.png new file mode 100644 index 0000000..8ae8c5a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/78.png differ diff --git a/KourIO/content/stream/characters/textures/body/79.png b/KourIO/content/stream/characters/textures/body/79.png new file mode 100644 index 0000000..07c7a2f Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/79.png differ diff --git a/KourIO/content/stream/characters/textures/body/8.png b/KourIO/content/stream/characters/textures/body/8.png new file mode 100644 index 0000000..caad9c8 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/8.png differ diff --git a/KourIO/content/stream/characters/textures/body/80.png b/KourIO/content/stream/characters/textures/body/80.png new file mode 100644 index 0000000..6ac6f5a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/80.png differ diff --git a/KourIO/content/stream/characters/textures/body/81.png b/KourIO/content/stream/characters/textures/body/81.png new file mode 100644 index 0000000..1f747a2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/81.png differ diff --git a/KourIO/content/stream/characters/textures/body/82.png b/KourIO/content/stream/characters/textures/body/82.png new file mode 100644 index 0000000..437d21a Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/82.png differ diff --git a/KourIO/content/stream/characters/textures/body/83.png b/KourIO/content/stream/characters/textures/body/83.png new file mode 100644 index 0000000..6ec90e5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/83.png differ diff --git a/KourIO/content/stream/characters/textures/body/84.png b/KourIO/content/stream/characters/textures/body/84.png new file mode 100644 index 0000000..e653fe7 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/84.png differ diff --git a/KourIO/content/stream/characters/textures/body/85.png b/KourIO/content/stream/characters/textures/body/85.png new file mode 100644 index 0000000..7b37683 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/85.png differ diff --git a/KourIO/content/stream/characters/textures/body/86.png b/KourIO/content/stream/characters/textures/body/86.png new file mode 100644 index 0000000..21212ac Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/86.png differ diff --git a/KourIO/content/stream/characters/textures/body/87.png b/KourIO/content/stream/characters/textures/body/87.png new file mode 100644 index 0000000..8b3b128 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/87.png differ diff --git a/KourIO/content/stream/characters/textures/body/88.png b/KourIO/content/stream/characters/textures/body/88.png new file mode 100644 index 0000000..e82db74 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/88.png differ diff --git a/KourIO/content/stream/characters/textures/body/89.png b/KourIO/content/stream/characters/textures/body/89.png new file mode 100644 index 0000000..ae271d0 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/89.png differ diff --git a/KourIO/content/stream/characters/textures/body/9.png b/KourIO/content/stream/characters/textures/body/9.png new file mode 100644 index 0000000..3f4a6f5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/9.png differ diff --git a/KourIO/content/stream/characters/textures/body/90.png b/KourIO/content/stream/characters/textures/body/90.png new file mode 100644 index 0000000..12a7712 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/90.png differ diff --git a/KourIO/content/stream/characters/textures/body/91.png b/KourIO/content/stream/characters/textures/body/91.png new file mode 100644 index 0000000..f6551f9 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/91.png differ diff --git a/KourIO/content/stream/characters/textures/body/92.png b/KourIO/content/stream/characters/textures/body/92.png new file mode 100644 index 0000000..0b63559 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/92.png differ diff --git a/KourIO/content/stream/characters/textures/body/93.png b/KourIO/content/stream/characters/textures/body/93.png new file mode 100644 index 0000000..29300c3 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/93.png differ diff --git a/KourIO/content/stream/characters/textures/body/94.png b/KourIO/content/stream/characters/textures/body/94.png new file mode 100644 index 0000000..7d0d901 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/94.png differ diff --git a/KourIO/content/stream/characters/textures/body/95.png b/KourIO/content/stream/characters/textures/body/95.png new file mode 100644 index 0000000..af62ec9 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/95.png differ diff --git a/KourIO/content/stream/characters/textures/body/96.png b/KourIO/content/stream/characters/textures/body/96.png new file mode 100644 index 0000000..fbd8211 Binary files /dev/null and b/KourIO/content/stream/characters/textures/body/96.png differ diff --git a/KourIO/content/stream/characters/textures/head/0.png b/KourIO/content/stream/characters/textures/head/0.png new file mode 100644 index 0000000..a579127 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/0.png differ diff --git a/KourIO/content/stream/characters/textures/head/1.png b/KourIO/content/stream/characters/textures/head/1.png new file mode 100644 index 0000000..019baef Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/1.png differ diff --git a/KourIO/content/stream/characters/textures/head/10.png b/KourIO/content/stream/characters/textures/head/10.png new file mode 100644 index 0000000..f94d465 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/10.png differ diff --git a/KourIO/content/stream/characters/textures/head/11.png b/KourIO/content/stream/characters/textures/head/11.png new file mode 100644 index 0000000..d203cde Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/11.png differ diff --git a/KourIO/content/stream/characters/textures/head/12.png b/KourIO/content/stream/characters/textures/head/12.png new file mode 100644 index 0000000..0df47d8 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/12.png differ diff --git a/KourIO/content/stream/characters/textures/head/13.png b/KourIO/content/stream/characters/textures/head/13.png new file mode 100644 index 0000000..edc07c4 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/13.png differ diff --git a/KourIO/content/stream/characters/textures/head/14.png b/KourIO/content/stream/characters/textures/head/14.png new file mode 100644 index 0000000..978be7d Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/14.png differ diff --git a/KourIO/content/stream/characters/textures/head/15.png b/KourIO/content/stream/characters/textures/head/15.png new file mode 100644 index 0000000..ce075b6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/15.png differ diff --git a/KourIO/content/stream/characters/textures/head/16.png b/KourIO/content/stream/characters/textures/head/16.png new file mode 100644 index 0000000..a39e9c5 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/16.png differ diff --git a/KourIO/content/stream/characters/textures/head/17.png b/KourIO/content/stream/characters/textures/head/17.png new file mode 100644 index 0000000..0817019 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/17.png differ diff --git a/KourIO/content/stream/characters/textures/head/18.png b/KourIO/content/stream/characters/textures/head/18.png new file mode 100644 index 0000000..bbc097e Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/18.png differ diff --git a/KourIO/content/stream/characters/textures/head/19.png b/KourIO/content/stream/characters/textures/head/19.png new file mode 100644 index 0000000..22fb5b2 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/19.png differ diff --git a/KourIO/content/stream/characters/textures/head/2.png b/KourIO/content/stream/characters/textures/head/2.png new file mode 100644 index 0000000..58a2764 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/2.png differ diff --git a/KourIO/content/stream/characters/textures/head/20.png b/KourIO/content/stream/characters/textures/head/20.png new file mode 100644 index 0000000..1516324 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/20.png differ diff --git a/KourIO/content/stream/characters/textures/head/21.png b/KourIO/content/stream/characters/textures/head/21.png new file mode 100644 index 0000000..fb42107 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/21.png differ diff --git a/KourIO/content/stream/characters/textures/head/22.png b/KourIO/content/stream/characters/textures/head/22.png new file mode 100644 index 0000000..b6b6e36 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/22.png differ diff --git a/KourIO/content/stream/characters/textures/head/23.png b/KourIO/content/stream/characters/textures/head/23.png new file mode 100644 index 0000000..16f96b1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/23.png differ diff --git a/KourIO/content/stream/characters/textures/head/24.png b/KourIO/content/stream/characters/textures/head/24.png new file mode 100644 index 0000000..16f96b1 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/24.png differ diff --git a/KourIO/content/stream/characters/textures/head/3.png b/KourIO/content/stream/characters/textures/head/3.png new file mode 100644 index 0000000..0243992 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/3.png differ diff --git a/KourIO/content/stream/characters/textures/head/4.png b/KourIO/content/stream/characters/textures/head/4.png new file mode 100644 index 0000000..ec70ab6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/4.png differ diff --git a/KourIO/content/stream/characters/textures/head/5.png b/KourIO/content/stream/characters/textures/head/5.png new file mode 100644 index 0000000..40f7a73 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/5.png differ diff --git a/KourIO/content/stream/characters/textures/head/6.png b/KourIO/content/stream/characters/textures/head/6.png new file mode 100644 index 0000000..972ae03 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/6.png differ diff --git a/KourIO/content/stream/characters/textures/head/7.png b/KourIO/content/stream/characters/textures/head/7.png new file mode 100644 index 0000000..b14adc6 Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/7.png differ diff --git a/KourIO/content/stream/characters/textures/head/8.png b/KourIO/content/stream/characters/textures/head/8.png new file mode 100644 index 0000000..b3d0ecc Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/8.png differ diff --git a/KourIO/content/stream/characters/textures/head/9.png b/KourIO/content/stream/characters/textures/head/9.png new file mode 100644 index 0000000..9c4cf9f Binary files /dev/null and b/KourIO/content/stream/characters/textures/head/9.png differ diff --git a/KourIO/content/stream/crates/icons/case_0.png b/KourIO/content/stream/crates/icons/case_0.png new file mode 100644 index 0000000..8c0f549 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_0.png differ diff --git a/KourIO/content/stream/crates/icons/case_1.png b/KourIO/content/stream/crates/icons/case_1.png new file mode 100644 index 0000000..99476fc Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_1.png differ diff --git a/KourIO/content/stream/crates/icons/case_10.png b/KourIO/content/stream/crates/icons/case_10.png new file mode 100644 index 0000000..538fc59 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_10.png differ diff --git a/KourIO/content/stream/crates/icons/case_2.png b/KourIO/content/stream/crates/icons/case_2.png new file mode 100644 index 0000000..8165ec3 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_2.png differ diff --git a/KourIO/content/stream/crates/icons/case_3.png b/KourIO/content/stream/crates/icons/case_3.png new file mode 100644 index 0000000..391f278 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_3.png differ diff --git a/KourIO/content/stream/crates/icons/case_4.png b/KourIO/content/stream/crates/icons/case_4.png new file mode 100644 index 0000000..e5df7e6 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_4.png differ diff --git a/KourIO/content/stream/crates/icons/case_5.png b/KourIO/content/stream/crates/icons/case_5.png new file mode 100644 index 0000000..2f700bb Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_5.png differ diff --git a/KourIO/content/stream/crates/icons/case_6.png b/KourIO/content/stream/crates/icons/case_6.png new file mode 100644 index 0000000..8759b67 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_6.png differ diff --git a/KourIO/content/stream/crates/icons/case_7.png b/KourIO/content/stream/crates/icons/case_7.png new file mode 100644 index 0000000..39ec479 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_7.png differ diff --git a/KourIO/content/stream/crates/icons/case_8.png b/KourIO/content/stream/crates/icons/case_8.png new file mode 100644 index 0000000..058aac4 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_8.png differ diff --git a/KourIO/content/stream/crates/icons/case_9.png b/KourIO/content/stream/crates/icons/case_9.png new file mode 100644 index 0000000..6c6be09 Binary files /dev/null and b/KourIO/content/stream/crates/icons/case_9.png differ diff --git a/KourIO/content/stream/emotes/icons/backflip.png b/KourIO/content/stream/emotes/icons/backflip.png new file mode 100644 index 0000000..93c3e0f Binary files /dev/null and b/KourIO/content/stream/emotes/icons/backflip.png differ diff --git a/KourIO/content/stream/emotes/icons/blue.png b/KourIO/content/stream/emotes/icons/blue.png new file mode 100644 index 0000000..14e88d8 Binary files /dev/null and b/KourIO/content/stream/emotes/icons/blue.png differ diff --git a/KourIO/content/stream/emotes/icons/chickendance.png b/KourIO/content/stream/emotes/icons/chickendance.png new file mode 100644 index 0000000..cdaf2af Binary files /dev/null and b/KourIO/content/stream/emotes/icons/chickendance.png differ diff --git a/KourIO/content/stream/emotes/icons/macarena.png b/KourIO/content/stream/emotes/icons/macarena.png new file mode 100644 index 0000000..5b18579 Binary files /dev/null and b/KourIO/content/stream/emotes/icons/macarena.png differ diff --git a/KourIO/content/stream/emotes/icons/numa.png b/KourIO/content/stream/emotes/icons/numa.png new file mode 100644 index 0000000..89f24a5 Binary files /dev/null and b/KourIO/content/stream/emotes/icons/numa.png differ diff --git a/KourIO/content/stream/emotes/icons/skibidi.png b/KourIO/content/stream/emotes/icons/skibidi.png new file mode 100644 index 0000000..ea03e48 Binary files /dev/null and b/KourIO/content/stream/emotes/icons/skibidi.png differ diff --git a/KourIO/content/stream/emotes/icons/styledance.png b/KourIO/content/stream/emotes/icons/styledance.png new file mode 100644 index 0000000..7fc8eaf Binary files /dev/null and b/KourIO/content/stream/emotes/icons/styledance.png differ diff --git a/KourIO/content/stream/emotes/icons/ymca.png b/KourIO/content/stream/emotes/icons/ymca.png new file mode 100644 index 0000000..a2e829d Binary files /dev/null and b/KourIO/content/stream/emotes/icons/ymca.png differ diff --git a/KourIO/content/stream/hats/icons/16.png b/KourIO/content/stream/hats/icons/16.png new file mode 100644 index 0000000..8de32b2 Binary files /dev/null and b/KourIO/content/stream/hats/icons/16.png differ diff --git a/KourIO/content/stream/hats/icons/17.png b/KourIO/content/stream/hats/icons/17.png new file mode 100644 index 0000000..9835754 Binary files /dev/null and b/KourIO/content/stream/hats/icons/17.png differ diff --git a/KourIO/content/stream/hats/icons/19.png b/KourIO/content/stream/hats/icons/19.png new file mode 100644 index 0000000..2d71e35 Binary files /dev/null and b/KourIO/content/stream/hats/icons/19.png differ diff --git a/KourIO/content/stream/hats/icons/20.png b/KourIO/content/stream/hats/icons/20.png new file mode 100644 index 0000000..cfe29ef Binary files /dev/null and b/KourIO/content/stream/hats/icons/20.png differ diff --git a/KourIO/content/stream/hats/icons/21.png b/KourIO/content/stream/hats/icons/21.png new file mode 100644 index 0000000..2a1b509 Binary files /dev/null and b/KourIO/content/stream/hats/icons/21.png differ diff --git a/KourIO/content/stream/hats/icons/22.png b/KourIO/content/stream/hats/icons/22.png new file mode 100644 index 0000000..9f2eeb0 Binary files /dev/null and b/KourIO/content/stream/hats/icons/22.png differ diff --git a/KourIO/content/stream/hats/icons/23.png b/KourIO/content/stream/hats/icons/23.png new file mode 100644 index 0000000..2481c6b Binary files /dev/null and b/KourIO/content/stream/hats/icons/23.png differ diff --git a/KourIO/content/stream/hats/icons/24.png b/KourIO/content/stream/hats/icons/24.png new file mode 100644 index 0000000..7fa95a3 Binary files /dev/null and b/KourIO/content/stream/hats/icons/24.png differ diff --git a/KourIO/content/stream/hats/icons/25.png b/KourIO/content/stream/hats/icons/25.png new file mode 100644 index 0000000..9f3c5eb Binary files /dev/null and b/KourIO/content/stream/hats/icons/25.png differ diff --git a/KourIO/content/stream/hats/icons/26.png b/KourIO/content/stream/hats/icons/26.png new file mode 100644 index 0000000..ff1346f Binary files /dev/null and b/KourIO/content/stream/hats/icons/26.png differ diff --git a/KourIO/content/stream/hats/icons/27.png b/KourIO/content/stream/hats/icons/27.png new file mode 100644 index 0000000..758d370 Binary files /dev/null and b/KourIO/content/stream/hats/icons/27.png differ diff --git a/KourIO/content/stream/hats/icons/28.png b/KourIO/content/stream/hats/icons/28.png new file mode 100644 index 0000000..cea28a3 Binary files /dev/null and b/KourIO/content/stream/hats/icons/28.png differ diff --git a/KourIO/content/stream/hats/icons/29.png b/KourIO/content/stream/hats/icons/29.png new file mode 100644 index 0000000..41d31ee Binary files /dev/null and b/KourIO/content/stream/hats/icons/29.png differ diff --git a/KourIO/content/stream/hats/icons/30.png b/KourIO/content/stream/hats/icons/30.png new file mode 100644 index 0000000..4aa7e18 Binary files /dev/null and b/KourIO/content/stream/hats/icons/30.png differ diff --git a/KourIO/content/stream/hats/icons/31.png b/KourIO/content/stream/hats/icons/31.png new file mode 100644 index 0000000..6021145 Binary files /dev/null and b/KourIO/content/stream/hats/icons/31.png differ diff --git a/KourIO/content/stream/hats/icons/32.png b/KourIO/content/stream/hats/icons/32.png new file mode 100644 index 0000000..9ef8dbc Binary files /dev/null and b/KourIO/content/stream/hats/icons/32.png differ diff --git a/KourIO/content/stream/hats/icons/33.png b/KourIO/content/stream/hats/icons/33.png new file mode 100644 index 0000000..d60bfc1 Binary files /dev/null and b/KourIO/content/stream/hats/icons/33.png differ diff --git a/KourIO/content/stream/hats/icons/34.png b/KourIO/content/stream/hats/icons/34.png new file mode 100644 index 0000000..da9f800 Binary files /dev/null and b/KourIO/content/stream/hats/icons/34.png differ diff --git a/KourIO/content/stream/hats/icons/35.png b/KourIO/content/stream/hats/icons/35.png new file mode 100644 index 0000000..b2c9f40 Binary files /dev/null and b/KourIO/content/stream/hats/icons/35.png differ diff --git a/KourIO/content/stream/hats/icons/36.png b/KourIO/content/stream/hats/icons/36.png new file mode 100644 index 0000000..e338812 Binary files /dev/null and b/KourIO/content/stream/hats/icons/36.png differ diff --git a/KourIO/content/stream/hats/icons/37.png b/KourIO/content/stream/hats/icons/37.png new file mode 100644 index 0000000..01a17b5 Binary files /dev/null and b/KourIO/content/stream/hats/icons/37.png differ diff --git a/KourIO/content/stream/hats/icons/38.png b/KourIO/content/stream/hats/icons/38.png new file mode 100644 index 0000000..56ca6c9 Binary files /dev/null and b/KourIO/content/stream/hats/icons/38.png differ diff --git a/KourIO/content/stream/hats/icons/agentBlue.png b/KourIO/content/stream/hats/icons/agentBlue.png new file mode 100644 index 0000000..cde3214 Binary files /dev/null and b/KourIO/content/stream/hats/icons/agentBlue.png differ diff --git a/KourIO/content/stream/hats/icons/blackbalaclava.png b/KourIO/content/stream/hats/icons/blackbalaclava.png new file mode 100644 index 0000000..dd0e0c2 Binary files /dev/null and b/KourIO/content/stream/hats/icons/blackbalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/bluebalaclava.png b/KourIO/content/stream/hats/icons/bluebalaclava.png new file mode 100644 index 0000000..b369333 Binary files /dev/null and b/KourIO/content/stream/hats/icons/bluebalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/easterbalaclava.png b/KourIO/content/stream/hats/icons/easterbalaclava.png new file mode 100644 index 0000000..475aafe Binary files /dev/null and b/KourIO/content/stream/hats/icons/easterbalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/greenbalaclava.png b/KourIO/content/stream/hats/icons/greenbalaclava.png new file mode 100644 index 0000000..e814243 Binary files /dev/null and b/KourIO/content/stream/hats/icons/greenbalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/hats_0.png b/KourIO/content/stream/hats/icons/hats_0.png new file mode 100644 index 0000000..aa73351 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_0.png differ diff --git a/KourIO/content/stream/hats/icons/hats_1.png b/KourIO/content/stream/hats/icons/hats_1.png new file mode 100644 index 0000000..33edf61 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_1.png differ diff --git a/KourIO/content/stream/hats/icons/hats_10.png b/KourIO/content/stream/hats/icons/hats_10.png new file mode 100644 index 0000000..078e4da Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_10.png differ diff --git a/KourIO/content/stream/hats/icons/hats_11.png b/KourIO/content/stream/hats/icons/hats_11.png new file mode 100644 index 0000000..512df37 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_11.png differ diff --git a/KourIO/content/stream/hats/icons/hats_14.png b/KourIO/content/stream/hats/icons/hats_14.png new file mode 100644 index 0000000..c944047 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_14.png differ diff --git a/KourIO/content/stream/hats/icons/hats_15.png b/KourIO/content/stream/hats/icons/hats_15.png new file mode 100644 index 0000000..4c319d3 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_15.png differ diff --git a/KourIO/content/stream/hats/icons/hats_2.png b/KourIO/content/stream/hats/icons/hats_2.png new file mode 100644 index 0000000..b2b9656 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_2.png differ diff --git a/KourIO/content/stream/hats/icons/hats_3.png b/KourIO/content/stream/hats/icons/hats_3.png new file mode 100644 index 0000000..d44ac05 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_3.png differ diff --git a/KourIO/content/stream/hats/icons/hats_4.png b/KourIO/content/stream/hats/icons/hats_4.png new file mode 100644 index 0000000..3818b5f Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_4.png differ diff --git a/KourIO/content/stream/hats/icons/hats_5.png b/KourIO/content/stream/hats/icons/hats_5.png new file mode 100644 index 0000000..d4e1cc0 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_5.png differ diff --git a/KourIO/content/stream/hats/icons/hats_6.png b/KourIO/content/stream/hats/icons/hats_6.png new file mode 100644 index 0000000..7e88c3f Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_6.png differ diff --git a/KourIO/content/stream/hats/icons/hats_7.png b/KourIO/content/stream/hats/icons/hats_7.png new file mode 100644 index 0000000..dd3d96f Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_7.png differ diff --git a/KourIO/content/stream/hats/icons/hats_8.png b/KourIO/content/stream/hats/icons/hats_8.png new file mode 100644 index 0000000..fdca3be Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_8.png differ diff --git a/KourIO/content/stream/hats/icons/hats_9.png b/KourIO/content/stream/hats/icons/hats_9.png new file mode 100644 index 0000000..e033396 Binary files /dev/null and b/KourIO/content/stream/hats/icons/hats_9.png differ diff --git a/KourIO/content/stream/hats/icons/orangebalaclava.png b/KourIO/content/stream/hats/icons/orangebalaclava.png new file mode 100644 index 0000000..144bb2c Binary files /dev/null and b/KourIO/content/stream/hats/icons/orangebalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/pinkbalaclava.png b/KourIO/content/stream/hats/icons/pinkbalaclava.png new file mode 100644 index 0000000..c2f3b9b Binary files /dev/null and b/KourIO/content/stream/hats/icons/pinkbalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/piratehat.png b/KourIO/content/stream/hats/icons/piratehat.png new file mode 100644 index 0000000..0a02337 Binary files /dev/null and b/KourIO/content/stream/hats/icons/piratehat.png differ diff --git a/KourIO/content/stream/hats/icons/purpleHatAgent.png b/KourIO/content/stream/hats/icons/purpleHatAgent.png new file mode 100644 index 0000000..8f741c0 Binary files /dev/null and b/KourIO/content/stream/hats/icons/purpleHatAgent.png differ diff --git a/KourIO/content/stream/hats/icons/purplebalaclava.png b/KourIO/content/stream/hats/icons/purplebalaclava.png new file mode 100644 index 0000000..d6e4673 Binary files /dev/null and b/KourIO/content/stream/hats/icons/purplebalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/raiderhat.png b/KourIO/content/stream/hats/icons/raiderhat.png new file mode 100644 index 0000000..0a5d09e Binary files /dev/null and b/KourIO/content/stream/hats/icons/raiderhat.png differ diff --git a/KourIO/content/stream/hats/icons/redbalaclava.png b/KourIO/content/stream/hats/icons/redbalaclava.png new file mode 100644 index 0000000..ae035c5 Binary files /dev/null and b/KourIO/content/stream/hats/icons/redbalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/rpgBlue.png b/KourIO/content/stream/hats/icons/rpgBlue.png new file mode 100644 index 0000000..1d66318 Binary files /dev/null and b/KourIO/content/stream/hats/icons/rpgBlue.png differ diff --git a/KourIO/content/stream/hats/icons/rpgCamoBlack.png b/KourIO/content/stream/hats/icons/rpgCamoBlack.png new file mode 100644 index 0000000..9a0ac37 Binary files /dev/null and b/KourIO/content/stream/hats/icons/rpgCamoBlack.png differ diff --git a/KourIO/content/stream/hats/icons/shotgunRed.png b/KourIO/content/stream/hats/icons/shotgunRed.png new file mode 100644 index 0000000..127cd46 Binary files /dev/null and b/KourIO/content/stream/hats/icons/shotgunRed.png differ diff --git a/KourIO/content/stream/hats/icons/shotgunYellow.png b/KourIO/content/stream/hats/icons/shotgunYellow.png new file mode 100644 index 0000000..85f76fa Binary files /dev/null and b/KourIO/content/stream/hats/icons/shotgunYellow.png differ diff --git a/KourIO/content/stream/hats/icons/soldierBlue.png b/KourIO/content/stream/hats/icons/soldierBlue.png new file mode 100644 index 0000000..3fee13d Binary files /dev/null and b/KourIO/content/stream/hats/icons/soldierBlue.png differ diff --git a/KourIO/content/stream/hats/icons/soldierred.png b/KourIO/content/stream/hats/icons/soldierred.png new file mode 100644 index 0000000..0a44b98 Binary files /dev/null and b/KourIO/content/stream/hats/icons/soldierred.png differ diff --git a/KourIO/content/stream/hats/icons/whitebalaclava.png b/KourIO/content/stream/hats/icons/whitebalaclava.png new file mode 100644 index 0000000..1d2a06a Binary files /dev/null and b/KourIO/content/stream/hats/icons/whitebalaclava.png differ diff --git a/KourIO/content/stream/hats/icons/yellowbalaclava.png b/KourIO/content/stream/hats/icons/yellowbalaclava.png new file mode 100644 index 0000000..f68f460 Binary files /dev/null and b/KourIO/content/stream/hats/icons/yellowbalaclava.png differ diff --git a/KourIO/content/stream/hats/texture/19.png b/KourIO/content/stream/hats/texture/19.png new file mode 100644 index 0000000..4210b2d Binary files /dev/null and b/KourIO/content/stream/hats/texture/19.png differ diff --git a/KourIO/content/stream/hats/texture/20.png b/KourIO/content/stream/hats/texture/20.png new file mode 100644 index 0000000..57d9139 Binary files /dev/null and b/KourIO/content/stream/hats/texture/20.png differ diff --git a/KourIO/content/stream/hats/texture/21.png b/KourIO/content/stream/hats/texture/21.png new file mode 100644 index 0000000..c128ff3 Binary files /dev/null and b/KourIO/content/stream/hats/texture/21.png differ diff --git a/KourIO/content/stream/hats/texture/22.png b/KourIO/content/stream/hats/texture/22.png new file mode 100644 index 0000000..87db0ab Binary files /dev/null and b/KourIO/content/stream/hats/texture/22.png differ diff --git a/KourIO/content/stream/hats/texture/23.png b/KourIO/content/stream/hats/texture/23.png new file mode 100644 index 0000000..d363c5f Binary files /dev/null and b/KourIO/content/stream/hats/texture/23.png differ diff --git a/KourIO/content/stream/hats/texture/24.png b/KourIO/content/stream/hats/texture/24.png new file mode 100644 index 0000000..c65090e Binary files /dev/null and b/KourIO/content/stream/hats/texture/24.png differ diff --git a/KourIO/content/stream/hats/texture/25.png b/KourIO/content/stream/hats/texture/25.png new file mode 100644 index 0000000..2ce9b3a Binary files /dev/null and b/KourIO/content/stream/hats/texture/25.png differ diff --git a/KourIO/content/stream/hats/texture/26.png b/KourIO/content/stream/hats/texture/26.png new file mode 100644 index 0000000..974c45a Binary files /dev/null and b/KourIO/content/stream/hats/texture/26.png differ diff --git a/KourIO/content/stream/hats/texture/27.png b/KourIO/content/stream/hats/texture/27.png new file mode 100644 index 0000000..3b89f31 Binary files /dev/null and b/KourIO/content/stream/hats/texture/27.png differ diff --git a/KourIO/content/stream/hats/texture/28.png b/KourIO/content/stream/hats/texture/28.png new file mode 100644 index 0000000..603aeb2 Binary files /dev/null and b/KourIO/content/stream/hats/texture/28.png differ diff --git a/KourIO/content/stream/hats/texture/29.png b/KourIO/content/stream/hats/texture/29.png new file mode 100644 index 0000000..e305fd8 Binary files /dev/null and b/KourIO/content/stream/hats/texture/29.png differ diff --git a/KourIO/content/stream/hats/texture/30.png b/KourIO/content/stream/hats/texture/30.png new file mode 100644 index 0000000..e775431 Binary files /dev/null and b/KourIO/content/stream/hats/texture/30.png differ diff --git a/KourIO/content/stream/hats/texture/31.png b/KourIO/content/stream/hats/texture/31.png new file mode 100644 index 0000000..6c5c355 Binary files /dev/null and b/KourIO/content/stream/hats/texture/31.png differ diff --git a/KourIO/content/stream/hats/texture/32.png b/KourIO/content/stream/hats/texture/32.png new file mode 100644 index 0000000..03fb4bd Binary files /dev/null and b/KourIO/content/stream/hats/texture/32.png differ diff --git a/KourIO/content/stream/hats/texture/33.png b/KourIO/content/stream/hats/texture/33.png new file mode 100644 index 0000000..e03afca Binary files /dev/null and b/KourIO/content/stream/hats/texture/33.png differ diff --git a/KourIO/content/stream/hats/texture/34.png b/KourIO/content/stream/hats/texture/34.png new file mode 100644 index 0000000..27e0349 Binary files /dev/null and b/KourIO/content/stream/hats/texture/34.png differ diff --git a/KourIO/content/stream/hats/texture/35.png b/KourIO/content/stream/hats/texture/35.png new file mode 100644 index 0000000..e292d4c Binary files /dev/null and b/KourIO/content/stream/hats/texture/35.png differ diff --git a/KourIO/content/stream/hats/texture/36.png b/KourIO/content/stream/hats/texture/36.png new file mode 100644 index 0000000..2f41754 Binary files /dev/null and b/KourIO/content/stream/hats/texture/36.png differ diff --git a/KourIO/content/stream/hats/texture/37.png b/KourIO/content/stream/hats/texture/37.png new file mode 100644 index 0000000..6af69ad Binary files /dev/null and b/KourIO/content/stream/hats/texture/37.png differ diff --git a/KourIO/content/stream/hats/texture/38.png b/KourIO/content/stream/hats/texture/38.png new file mode 100644 index 0000000..978ea56 Binary files /dev/null and b/KourIO/content/stream/hats/texture/38.png differ diff --git a/KourIO/content/stream/hats/texture/bluebalaclava.png b/KourIO/content/stream/hats/texture/bluebalaclava.png new file mode 100644 index 0000000..bb6306d Binary files /dev/null and b/KourIO/content/stream/hats/texture/bluebalaclava.png differ diff --git a/KourIO/content/stream/hats/texture/main.png b/KourIO/content/stream/hats/texture/main.png new file mode 100644 index 0000000..b33c2d9 Binary files /dev/null and b/KourIO/content/stream/hats/texture/main.png differ diff --git a/KourIO/content/stream/hats/texture/orangebalaclava.png b/KourIO/content/stream/hats/texture/orangebalaclava.png new file mode 100644 index 0000000..0ee9f0c Binary files /dev/null and b/KourIO/content/stream/hats/texture/orangebalaclava.png differ diff --git a/KourIO/content/stream/hats/texture/pinkbalaclava.png b/KourIO/content/stream/hats/texture/pinkbalaclava.png new file mode 100644 index 0000000..40fa27b Binary files /dev/null and b/KourIO/content/stream/hats/texture/pinkbalaclava.png differ diff --git a/KourIO/content/stream/hats/texture/whitebalaclava.png b/KourIO/content/stream/hats/texture/whitebalaclava.png new file mode 100644 index 0000000..8201086 Binary files /dev/null and b/KourIO/content/stream/hats/texture/whitebalaclava.png differ diff --git a/KourIO/content/stream/kour_points/kp1.png b/KourIO/content/stream/kour_points/kp1.png new file mode 100644 index 0000000..01107ad Binary files /dev/null and b/KourIO/content/stream/kour_points/kp1.png differ diff --git a/KourIO/content/stream/kour_points/kp2.png b/KourIO/content/stream/kour_points/kp2.png new file mode 100644 index 0000000..60dec20 Binary files /dev/null and b/KourIO/content/stream/kour_points/kp2.png differ diff --git a/KourIO/content/stream/kour_points/kp3.png b/KourIO/content/stream/kour_points/kp3.png new file mode 100644 index 0000000..e244c29 Binary files /dev/null and b/KourIO/content/stream/kour_points/kp3.png differ diff --git a/KourIO/content/stream/kour_points/kp4.png b/KourIO/content/stream/kour_points/kp4.png new file mode 100644 index 0000000..a4cb1cf Binary files /dev/null and b/KourIO/content/stream/kour_points/kp4.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20BloodBats.png new file mode 100644 index 0000000..8985aeb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Carbon.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Carbon.png new file mode 100644 index 0000000..4453b86 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Carbon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Demons%20Wrath.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Demons%20Wrath.png new file mode 100644 index 0000000..d9dc89e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Demons%20Wrath.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Diamonds.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Diamonds.png new file mode 100644 index 0000000..57cd3eb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Diamonds.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Dots.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Dots.png new file mode 100644 index 0000000..afda055 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Dots.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Dragon%20Kour.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Dragon%20Kour.png new file mode 100644 index 0000000..edc92d7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Dragon%20Kour.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Eternal%20Fire.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Eternal%20Fire.png new file mode 100644 index 0000000..9b28b6d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Eternal%20Fire.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Faderation.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Faderation.png new file mode 100644 index 0000000..aaa2ced Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Faderation.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Feathers.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Feathers.png new file mode 100644 index 0000000..0e64a7f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Feathers.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Gold.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Gold.png new file mode 100644 index 0000000..1910346 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Gold.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Camo.png new file mode 100644 index 0000000..f23bded Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Snow.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Snow.png new file mode 100644 index 0000000..8440e42 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Green.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green.png new file mode 100644 index 0000000..6c9b649 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Halloween.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Halloween.png new file mode 100644 index 0000000..697f3f9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Halloween.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Hyper.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Hyper.png new file mode 100644 index 0000000..ae4f8a8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Hyper.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Illusion.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Illusion.png new file mode 100644 index 0000000..115c820 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Illusion.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Invert.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Invert.png new file mode 100644 index 0000000..68bd3ef Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Invert.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Kourrugated.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Kourrugated.png new file mode 100644 index 0000000..0a71c6e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Kourrugated.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Libby.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Libby.png new file mode 100644 index 0000000..4dde982 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Libby.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Moonshine.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Moonshine.png new file mode 100644 index 0000000..6927057 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Moonshine.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Navy.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Navy.png new file mode 100644 index 0000000..8ee1804 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Neon.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Neon.png new file mode 100644 index 0000000..cf96827 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Neon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Patriot.png new file mode 100644 index 0000000..8aa77f7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20RDAN.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20RDAN.png new file mode 100644 index 0000000..1981f86 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20RDAN.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Rayn.png new file mode 100644 index 0000000..15fec44 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Red%20Snow.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Red%20Snow.png new file mode 100644 index 0000000..3ef7520 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Red%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Relic.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Relic.png new file mode 100644 index 0000000..3f750db Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Relic.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20SeaBlue.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20SeaBlue.png new file mode 100644 index 0000000..38b119c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20SeaBlue.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20SnowBlast.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20SnowBlast.png new file mode 100644 index 0000000..3b41e48 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20SnowBlast.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Space.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Space.png new file mode 100644 index 0000000..f34eab0 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Triangles.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Triangles.png new file mode 100644 index 0000000..4cfcf04 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Triangles.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20USA.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20USA.png new file mode 100644 index 0000000..2c60f77 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Vested.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Vested.png new file mode 100644 index 0000000..786b68b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Vested.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Vinny.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Vinny.png new file mode 100644 index 0000000..51bc706 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Vinny.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Waffle%20Cone.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Waffle%20Cone.png new file mode 100644 index 0000000..9f4ecdb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Waffle%20Cone.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Wireframe.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Wireframe.png new file mode 100644 index 0000000..3f1865f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Wireframe.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AK-47%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/AK-47%20Zebra.png new file mode 100644 index 0000000..4a5cb8b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AK-47%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/AWP%20BloodBats.png new file mode 100644 index 0000000..ca46882 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Camoz.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Camoz.png new file mode 100644 index 0000000..11a146a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Camoz.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Candy.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Candy.png new file mode 100644 index 0000000..8de3fae Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Carbon.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Carbon.png new file mode 100644 index 0000000..ca68fb5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Carbon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Dior.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Dior.png new file mode 100644 index 0000000..5792600 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Dior.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Dragon%20Kour.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Dragon%20Kour.png new file mode 100644 index 0000000..6c00530 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Dragon%20Kour.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Elemental%20Spirits.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Elemental%20Spirits.png new file mode 100644 index 0000000..9e914a2 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Elemental%20Spirits.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Faderation.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Faderation.png new file mode 100644 index 0000000..f7e7e5e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Faderation.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Fourtz.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Fourtz.png new file mode 100644 index 0000000..f94427c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Fourtz.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy%20Space.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy%20Space.png new file mode 100644 index 0000000..61e7034 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy.png new file mode 100644 index 0000000..c25ccf3 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Ginger%20Bread.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Ginger%20Bread.png new file mode 100644 index 0000000..dc14f24 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Ginger%20Bread.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Gold.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Gold.png new file mode 100644 index 0000000..b0ba4ea Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Gold.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20GrayCamo.png b/KourIO/content/stream/weapon-skins/icons/AWP%20GrayCamo.png new file mode 100644 index 0000000..6d93820 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20GrayCamo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Green%20Camo.png new file mode 100644 index 0000000..189f7e6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Green.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Green.png new file mode 100644 index 0000000..5fe176d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Halloween.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Halloween.png new file mode 100644 index 0000000..df75217 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Halloween.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Ice.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Ice.png new file mode 100644 index 0000000..da2c759 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Ice.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Jungle.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Jungle.png new file mode 100644 index 0000000..38d8f2b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Jungle.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Lava.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Lava.png new file mode 100644 index 0000000..8b152ac Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Libby.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Libby.png new file mode 100644 index 0000000..7be8704 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Libby.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Molten.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Molten.png new file mode 100644 index 0000000..6229c73 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Myth.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Myth.png new file mode 100644 index 0000000..0415100 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Myth.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Navy.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Navy.png new file mode 100644 index 0000000..6dc12e6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Neon.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Neon.png new file mode 100644 index 0000000..3dd122b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Neon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Patriot.png new file mode 100644 index 0000000..bc52036 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Phyrric%20Swirl.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Phyrric%20Swirl.png new file mode 100644 index 0000000..02a2b4e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Phyrric%20Swirl.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20PinkWave.png b/KourIO/content/stream/weapon-skins/icons/AWP%20PinkWave.png new file mode 100644 index 0000000..6d74e2f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20PinkWave.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20PolkaDots.png b/KourIO/content/stream/weapon-skins/icons/AWP%20PolkaDots.png new file mode 100644 index 0000000..0085868 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20PolkaDots.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleDots.png b/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleDots.png new file mode 100644 index 0000000..63f66dd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleDots.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleWave.png b/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleWave.png new file mode 100644 index 0000000..c724a73 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20PurpleWave.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Racer.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Racer.png new file mode 100644 index 0000000..1badfcb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Racer.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Rayn.png new file mode 100644 index 0000000..13af30f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Diamond.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Diamond.png new file mode 100644 index 0000000..05027c8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Diamond.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Snow.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Snow.png new file mode 100644 index 0000000..bb665b2 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Red%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20SeaBlue.png b/KourIO/content/stream/weapon-skins/icons/AWP%20SeaBlue.png new file mode 100644 index 0000000..edd47f9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20SeaBlue.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Snow.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Snow.png new file mode 100644 index 0000000..289417c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20USA.png b/KourIO/content/stream/weapon-skins/icons/AWP%20USA.png new file mode 100644 index 0000000..3346ef1 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Ugly.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Ugly.png new file mode 100644 index 0000000..08cfb43 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Ugly.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Ultra%20Lava.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Ultra%20Lava.png new file mode 100644 index 0000000..79686e3 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Ultra%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Underworld.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Underworld.png new file mode 100644 index 0000000..af80b2c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Underworld.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Wireframe.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Wireframe.png new file mode 100644 index 0000000..b335db1 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Wireframe.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/AWP%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/AWP%20Zebra.png new file mode 100644 index 0000000..62fb9cf Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/AWP%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Camo.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Camo.png new file mode 100644 index 0000000..097a31c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Flame.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Flame.png new file mode 100644 index 0000000..737a801 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Flame.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hunter.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hunter.png new file mode 100644 index 0000000..8385a39 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hunter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hyper.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hyper.png new file mode 100644 index 0000000..e758ae9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Hyper.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Lava.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Lava.png new file mode 100644 index 0000000..61ac10b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Neon.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Neon.png new file mode 100644 index 0000000..3bfaed3 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Neon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Patriot.png new file mode 100644 index 0000000..6028498 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Purple.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Purple.png new file mode 100644 index 0000000..d4487a0 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Purple.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Red%20Cross.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Red%20Cross.png new file mode 100644 index 0000000..8e4775d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Red%20Cross.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Space.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Space.png new file mode 100644 index 0000000..fe697d8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Triangles.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Triangles.png new file mode 100644 index 0000000..303dce3 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Triangles.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20USA.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20USA.png new file mode 100644 index 0000000..15df25e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Winter.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Winter.png new file mode 100644 index 0000000..2371cd5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Winter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Bayonet%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Zebra.png new file mode 100644 index 0000000..53d2883 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Bayonet%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Boogie%20Bomb.png b/KourIO/content/stream/weapon-skins/icons/Boogie%20Bomb.png new file mode 100644 index 0000000..cecf240 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Boogie%20Bomb.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Damascus.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Damascus.png new file mode 100644 index 0000000..4308a5f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Damascus.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leaf.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leaf.png new file mode 100644 index 0000000..672567e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leaf.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leopard%20Print.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leopard%20Print.png new file mode 100644 index 0000000..d4be3ae Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Leopard%20Print.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20RAVE.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20RAVE.png new file mode 100644 index 0000000..6b7ad18 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20RAVE.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Rainbow%20Scales.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Rainbow%20Scales.png new file mode 100644 index 0000000..e4a1784 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Rainbow%20Scales.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Sunight.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Sunight.png new file mode 100644 index 0000000..067652e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Sunight.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Butterfly%20Vaporwave.png b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Vaporwave.png new file mode 100644 index 0000000..e63b353 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Butterfly%20Vaporwave.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20BloodBats.png new file mode 100644 index 0000000..26e201d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Galaxy.png new file mode 100644 index 0000000..9453b07 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Green%20Camo.png new file mode 100644 index 0000000..4d971fa Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Molten.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Molten.png new file mode 100644 index 0000000..08ca602 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Patriot.png new file mode 100644 index 0000000..6fe72be Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Rayn.png new file mode 100644 index 0000000..17ffc20 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20USA.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20USA.png new file mode 100644 index 0000000..07b9db8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Deagle%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/Deagle%20Zebra.png new file mode 100644 index 0000000..03d0f1f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Deagle%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Candy.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Candy.png new file mode 100644 index 0000000..be28db5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green%20Camo.png new file mode 100644 index 0000000..fa199fa Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green.png new file mode 100644 index 0000000..5a541a6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Hyper.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Hyper.png new file mode 100644 index 0000000..76422a9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Hyper.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Lava.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Lava.png new file mode 100644 index 0000000..98c5b74 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Navy.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Navy.png new file mode 100644 index 0000000..55635b7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20PinkWave.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20PinkWave.png new file mode 100644 index 0000000..2b068cf Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20PinkWave.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20SeaBlue.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20SeaBlue.png new file mode 100644 index 0000000..98a15b6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20SeaBlue.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20Snow.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Snow.png new file mode 100644 index 0000000..0689dfd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20USA.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20USA.png new file mode 100644 index 0000000..fe2ca6d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/FAMAS%20ZigZag.png b/KourIO/content/stream/weapon-skins/icons/FAMAS%20ZigZag.png new file mode 100644 index 0000000..55f0bb5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/FAMAS%20ZigZag.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Famas%20Red%20Snow.png b/KourIO/content/stream/weapon-skins/icons/Famas%20Red%20Snow.png new file mode 100644 index 0000000..8959c5f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Famas%20Red%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Artic%20Rain.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Artic%20Rain.png new file mode 100644 index 0000000..9716f2c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Artic%20Rain.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Blood%20Bats.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Blood%20Bats.png new file mode 100644 index 0000000..0380327 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Blood%20Bats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Bricked.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Bricked.png new file mode 100644 index 0000000..da5edb8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Bricked.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Carbon.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Carbon.png new file mode 100644 index 0000000..44932dc Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Carbon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Dragon%20Kour.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Dragon%20Kour.png new file mode 100644 index 0000000..dbe9ad7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Dragon%20Kour.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Faderation.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Faderation.png new file mode 100644 index 0000000..5c7d605 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Faderation.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy%20Space.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy%20Space.png new file mode 100644 index 0000000..220b0fd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy.png new file mode 100644 index 0000000..bd7a983 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Gold.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Gold.png new file mode 100644 index 0000000..b583d07 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Gold.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Green.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Green.png new file mode 100644 index 0000000..66d13b8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Hunter.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Hunter.png new file mode 100644 index 0000000..1d0874d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Hunter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Molten.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Molten.png new file mode 100644 index 0000000..1f656dc Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Motherboard.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Motherboard.png new file mode 100644 index 0000000..10abb38 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Motherboard.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Phyrric%20Fade.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Phyrric%20Fade.png new file mode 100644 index 0000000..a52ad46 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Phyrric%20Fade.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Purpley.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Purpley.png new file mode 100644 index 0000000..f106215 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Purpley.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Rayn.png new file mode 100644 index 0000000..0e2444b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Snowy.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Snowy.png new file mode 100644 index 0000000..0aa1906 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Snowy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Space.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Space.png new file mode 100644 index 0000000..1fb6ffd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20USA.png b/KourIO/content/stream/weapon-skins/icons/Glock%20USA.png new file mode 100644 index 0000000..14ca119 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Glock%20Wireframe.png b/KourIO/content/stream/weapon-skins/icons/Glock%20Wireframe.png new file mode 100644 index 0000000..069a6f9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Glock%20Wireframe.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Grenade%20Smiley.png b/KourIO/content/stream/weapon-skins/icons/Grenade%20Smiley.png new file mode 100644 index 0000000..c87b604 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Grenade%20Smiley.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20BloodBats.png new file mode 100644 index 0000000..6744eb8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Flame.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Flame.png new file mode 100644 index 0000000..b06c50f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Flame.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Gray.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Gray.png new file mode 100644 index 0000000..a164edb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Gray.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Green%20Camo.png new file mode 100644 index 0000000..36a278a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Hunter.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Hunter.png new file mode 100644 index 0000000..10b9611 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Hunter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Invert.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Invert.png new file mode 100644 index 0000000..59b198a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Invert.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Leaf.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Leaf.png new file mode 100644 index 0000000..1d33e2d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Leaf.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Navy.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Navy.png new file mode 100644 index 0000000..58bdcb5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Neon.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Neon.png new file mode 100644 index 0000000..56f85dc Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Neon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20RedCross.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20RedCross.png new file mode 100644 index 0000000..b7ddfb9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20RedCross.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Snow.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Snow.png new file mode 100644 index 0000000..467769a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20USA.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20USA.png new file mode 100644 index 0000000..6810b19 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Wexler.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Wexler.png new file mode 100644 index 0000000..6ef551a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Wexler.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20Zebra.png new file mode 100644 index 0000000..315ce22 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Karambit%20ZigZag.png b/KourIO/content/stream/weapon-skins/icons/Karambit%20ZigZag.png new file mode 100644 index 0000000..260464e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Karambit%20ZigZag.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Blood%20Bats.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Blood%20Bats.png new file mode 100644 index 0000000..8f84f95 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Blood%20Bats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Candy.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Candy.png new file mode 100644 index 0000000..c2724b4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Galaxy.png new file mode 100644 index 0000000..574ce02 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Molten.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Molten.png new file mode 100644 index 0000000..4fb9165 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Rayn.png new file mode 100644 index 0000000..29de77c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Triangos.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Triangos.png new file mode 100644 index 0000000..8d02f3d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Triangos.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20USA.png b/KourIO/content/stream/weapon-skins/icons/Knife%20USA.png new file mode 100644 index 0000000..6ba39f7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Knife%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/Knife%20Zebra.png new file mode 100644 index 0000000..96d3641 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Knife%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Arizona.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Arizona.png new file mode 100644 index 0000000..0de1256 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Arizona.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/MP5%20BloodBats.png new file mode 100644 index 0000000..771837c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Bricks.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Bricks.png new file mode 100644 index 0000000..1fc7ff3 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Bricks.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Camo.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Camo.png new file mode 100644 index 0000000..b1fbc55 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Candy.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Candy.png new file mode 100644 index 0000000..e878d8b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Carbon.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Carbon.png new file mode 100644 index 0000000..7937891 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Carbon.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Dark%20Camo.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Dark%20Camo.png new file mode 100644 index 0000000..4c295a4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Dark%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Dots.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Dots.png new file mode 100644 index 0000000..97e4e5e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Dots.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Faderation.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Faderation.png new file mode 100644 index 0000000..6e2bd34 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Faderation.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Fungus.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Fungus.png new file mode 100644 index 0000000..a0afef7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Fungus.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy%20Space.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy%20Space.png new file mode 100644 index 0000000..1e5cd36 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy.png new file mode 100644 index 0000000..9955e84 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20GrayCamo.png b/KourIO/content/stream/weapon-skins/icons/MP5%20GrayCamo.png new file mode 100644 index 0000000..ce356ef Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20GrayCamo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Camo.png new file mode 100644 index 0000000..47be8e2 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Snow.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Snow.png new file mode 100644 index 0000000..9408287 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Green%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Green.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Green.png new file mode 100644 index 0000000..53fdc23 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Hunter.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Hunter.png new file mode 100644 index 0000000..39810cb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Hunter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Hyper.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Hyper.png new file mode 100644 index 0000000..1c43a8f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Hyper.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Invert.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Invert.png new file mode 100644 index 0000000..dcc2ca5 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Invert.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20KBI.png b/KourIO/content/stream/weapon-skins/icons/MP5%20KBI.png new file mode 100644 index 0000000..07a1059 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20KBI.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Lava%20Splash.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Lava%20Splash.png new file mode 100644 index 0000000..0133cdc Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Lava%20Splash.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Lava.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Lava.png new file mode 100644 index 0000000..76ae4ab Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Marble.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Marble.png new file mode 100644 index 0000000..66c3241 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Marble.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Maze.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Maze.png new file mode 100644 index 0000000..a1c74fa Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Maze.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Mountains.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Mountains.png new file mode 100644 index 0000000..5f1b39e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Mountains.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Navy.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Navy.png new file mode 100644 index 0000000..9e35c75 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Ocean.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Ocean.png new file mode 100644 index 0000000..e4fc2a2 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Ocean.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Patriot.png new file mode 100644 index 0000000..0b343fd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Phyrric%20Swirl.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Phyrric%20Swirl.png new file mode 100644 index 0000000..5878fa4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Phyrric%20Swirl.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Pink%20Feathers.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Pink%20Feathers.png new file mode 100644 index 0000000..d2cb0db Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Pink%20Feathers.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Poacher.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Poacher.png new file mode 100644 index 0000000..554f173 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Poacher.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Purple%20Waves.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Purple%20Waves.png new file mode 100644 index 0000000..1b3c19e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Purple%20Waves.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Purple.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Purple.png new file mode 100644 index 0000000..c49c8d1 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Purple.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Rayn.png new file mode 100644 index 0000000..b01c80a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Red%20Trio.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Red%20Trio.png new file mode 100644 index 0000000..3d3e150 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Red%20Trio.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20RedSquares.png b/KourIO/content/stream/weapon-skins/icons/MP5%20RedSquares.png new file mode 100644 index 0000000..9804c94 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20RedSquares.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Snow.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Snow.png new file mode 100644 index 0000000..775d4ff Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Space.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Space.png new file mode 100644 index 0000000..8ce3b7d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Space.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Sunrise.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Sunrise.png new file mode 100644 index 0000000..74b238c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Sunrise.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Sunset.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Sunset.png new file mode 100644 index 0000000..fac6a78 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Sunset.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Triangles.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Triangles.png new file mode 100644 index 0000000..0c5ee70 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Triangles.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Triangos.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Triangos.png new file mode 100644 index 0000000..1a63fee Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Triangos.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20USA.png b/KourIO/content/stream/weapon-skins/icons/MP5%20USA.png new file mode 100644 index 0000000..17e3ded Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Ugly.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Ugly.png new file mode 100644 index 0000000..1158071 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Ugly.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Vaporwave.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Vaporwave.png new file mode 100644 index 0000000..f0d4330 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Vaporwave.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Vertix.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Vertix.png new file mode 100644 index 0000000..3f2b2aa Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Vertix.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Wireframe.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Wireframe.png new file mode 100644 index 0000000..6e36f1e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Wireframe.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/MP5%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/MP5%20Zebra.png new file mode 100644 index 0000000..ab1d59c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/MP5%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Molotov%20Kola.png b/KourIO/content/stream/weapon-skins/icons/Molotov%20Kola.png new file mode 100644 index 0000000..75c1357 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Molotov%20Kola.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/P90%20BloodBats.png new file mode 100644 index 0000000..4cbdfa6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Dots.png b/KourIO/content/stream/weapon-skins/icons/P90%20Dots.png new file mode 100644 index 0000000..b6e90ce Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Dots.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/P90%20Galaxy.png new file mode 100644 index 0000000..35038e1 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Green%20Snow.png b/KourIO/content/stream/weapon-skins/icons/P90%20Green%20Snow.png new file mode 100644 index 0000000..b66d65f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Green%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Green.png b/KourIO/content/stream/weapon-skins/icons/P90%20Green.png new file mode 100644 index 0000000..2770582 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Lava.png b/KourIO/content/stream/weapon-skins/icons/P90%20Lava.png new file mode 100644 index 0000000..1bd79f4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Molten.png b/KourIO/content/stream/weapon-skins/icons/P90%20Molten.png new file mode 100644 index 0000000..43bc6bd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Oceans.png b/KourIO/content/stream/weapon-skins/icons/P90%20Oceans.png new file mode 100644 index 0000000..a737457 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Oceans.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/P90%20Patriot.png new file mode 100644 index 0000000..1d3c93e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20PinkGray.png b/KourIO/content/stream/weapon-skins/icons/P90%20PinkGray.png new file mode 100644 index 0000000..e0b3923 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20PinkGray.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20PurpleVid.png b/KourIO/content/stream/weapon-skins/icons/P90%20PurpleVid.png new file mode 100644 index 0000000..ee597a6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20PurpleVid.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20RGB.png b/KourIO/content/stream/weapon-skins/icons/P90%20RGB.png new file mode 100644 index 0000000..2a87a81 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20RGB.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Red%20Snow.png b/KourIO/content/stream/weapon-skins/icons/P90%20Red%20Snow.png new file mode 100644 index 0000000..29512cb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Red%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Snow.png b/KourIO/content/stream/weapon-skins/icons/P90%20Snow.png new file mode 100644 index 0000000..f1e5ad7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20USA.png b/KourIO/content/stream/weapon-skins/icons/P90%20USA.png new file mode 100644 index 0000000..cf41072 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Winter.png b/KourIO/content/stream/weapon-skins/icons/P90%20Winter.png new file mode 100644 index 0000000..285d23e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Winter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/P90%20Zim.png b/KourIO/content/stream/weapon-skins/icons/P90%20Zim.png new file mode 100644 index 0000000..732a766 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/P90%20Zim.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/PKM%20BloodBats.png new file mode 100644 index 0000000..17386ae Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Camo.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Camo.png new file mode 100644 index 0000000..600796c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Candy.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Candy.png new file mode 100644 index 0000000..f2102f2 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Dark%20Camo.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Dark%20Camo.png new file mode 100644 index 0000000..d4a99df Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Dark%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Diamonds.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Diamonds.png new file mode 100644 index 0000000..30982bd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Diamonds.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Galaxy.png new file mode 100644 index 0000000..e5f4969 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Green%20Camo.png new file mode 100644 index 0000000..8daec2a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Green.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Green.png new file mode 100644 index 0000000..95ec162 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Hunter.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Hunter.png new file mode 100644 index 0000000..1631a21 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Hunter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Patriot.png new file mode 100644 index 0000000..30982bd Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Poacher.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Poacher.png new file mode 100644 index 0000000..3b785a4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Poacher.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Purple.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Purple.png new file mode 100644 index 0000000..508b902 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Purple.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Rayn.png new file mode 100644 index 0000000..94889ac Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Red%20Snow.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Red%20Snow.png new file mode 100644 index 0000000..8947c31 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Red%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20USA.png b/KourIO/content/stream/weapon-skins/icons/PKM%20USA.png new file mode 100644 index 0000000..1477755 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Winter.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Winter.png new file mode 100644 index 0000000..04b7192 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Winter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/PKM%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/PKM%20Zebra.png new file mode 100644 index 0000000..281eeed Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/PKM%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20America.png b/KourIO/content/stream/weapon-skins/icons/RPG%20America.png new file mode 100644 index 0000000..f12639d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20America.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Candy.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Candy.png new file mode 100644 index 0000000..4ccdb62 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Galaxy.png new file mode 100644 index 0000000..6836962 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Green%20Camo.png new file mode 100644 index 0000000..1714fd4 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Green.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Green.png new file mode 100644 index 0000000..ed23af9 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Hunters.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Hunters.png new file mode 100644 index 0000000..911980a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Hunters.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Ice.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Ice.png new file mode 100644 index 0000000..4e6ae17 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Ice.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Lava.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Lava.png new file mode 100644 index 0000000..03d091f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Lava.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Molten.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Molten.png new file mode 100644 index 0000000..9af887a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Molten.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Patriot.png new file mode 100644 index 0000000..1d18509 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Poacher.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Poacher.png new file mode 100644 index 0000000..683aacb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Poacher.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Rayn.png new file mode 100644 index 0000000..c730f3e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Snow.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Snow.png new file mode 100644 index 0000000..60d7e0f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Snow.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Triangos.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Triangos.png new file mode 100644 index 0000000..70887cb Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Triangos.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/RPG%20Zebra.png b/KourIO/content/stream/weapon-skins/icons/RPG%20Zebra.png new file mode 100644 index 0000000..a3d05ed Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/RPG%20Zebra.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Revolver%20Engraved.png b/KourIO/content/stream/weapon-skins/icons/Revolver%20Engraved.png new file mode 100644 index 0000000..1ae7c6f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Revolver%20Engraved.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Revolver%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/Revolver%20Green%20Camo.png new file mode 100644 index 0000000..5977b32 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Revolver%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Revolver%20Invert.png b/KourIO/content/stream/weapon-skins/icons/Revolver%20Invert.png new file mode 100644 index 0000000..25ccbe7 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Revolver%20Invert.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Revolver%20Navy.png b/KourIO/content/stream/weapon-skins/icons/Revolver%20Navy.png new file mode 100644 index 0000000..b37b45a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Revolver%20Navy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Arizona.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Arizona.png new file mode 100644 index 0000000..e951a8a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Arizona.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/Scar%20BloodBats.png new file mode 100644 index 0000000..45c7905 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20BlueRidge.png b/KourIO/content/stream/weapon-skins/icons/Scar%20BlueRidge.png new file mode 100644 index 0000000..bf4c77f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20BlueRidge.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Candy.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Candy.png new file mode 100644 index 0000000..f7dbb61 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Chester.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Chester.png new file mode 100644 index 0000000..d669139 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Chester.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Fungus.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Fungus.png new file mode 100644 index 0000000..a453bc1 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Fungus.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Galaxy.png new file mode 100644 index 0000000..95d1206 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Patriot.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Patriot.png new file mode 100644 index 0000000..424058c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Rayn.png new file mode 100644 index 0000000..2c87942 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20RedMarble.png b/KourIO/content/stream/weapon-skins/icons/Scar%20RedMarble.png new file mode 100644 index 0000000..0ee8b66 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20RedMarble.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20USA.png b/KourIO/content/stream/weapon-skins/icons/Scar%20USA.png new file mode 100644 index 0000000..9092019 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Vertix.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Vertix.png new file mode 100644 index 0000000..2cac475 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Vertix.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Scar%20Winter.png b/KourIO/content/stream/weapon-skins/icons/Scar%20Winter.png new file mode 100644 index 0000000..da9b651 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Scar%20Winter.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20America.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20America.png new file mode 100644 index 0000000..da4949e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20America.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Arizona.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Arizona.png new file mode 100644 index 0000000..55ec397 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Arizona.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20BloodBats.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20BloodBats.png new file mode 100644 index 0000000..909e7f0 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20BloodBats.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Bricked.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Bricked.png new file mode 100644 index 0000000..4ae1c36 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Bricked.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Candy.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Candy.png new file mode 100644 index 0000000..da887f6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Candy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Fungus.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Fungus.png new file mode 100644 index 0000000..251a32f Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Fungus.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Galaxy.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Galaxy.png new file mode 100644 index 0000000..bfb8e48 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Galaxy.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green%20Camo.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green%20Camo.png new file mode 100644 index 0000000..cf504ac Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green%20Camo.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green.png new file mode 100644 index 0000000..7f09009 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Green.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Halloween.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Halloween.png new file mode 100644 index 0000000..74cd63c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Halloween.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Rayn.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Rayn.png new file mode 100644 index 0000000..c4b30b6 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Rayn.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20USA.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20USA.png new file mode 100644 index 0000000..9efa01c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20USA.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/Shotgun%20Vertix.png b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Vertix.png new file mode 100644 index 0000000..01d746d Binary files /dev/null and b/KourIO/content/stream/weapon-skins/icons/Shotgun%20Vertix.png differ diff --git a/KourIO/content/stream/weapon-skins/icons/e b/KourIO/content/stream/weapon-skins/icons/e new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/KourIO/content/stream/weapon-skins/icons/e @@ -0,0 +1 @@ + diff --git a/KourIO/content/stream/weapon-skins/texture/awp.png b/KourIO/content/stream/weapon-skins/texture/awp.png new file mode 100644 index 0000000..b489a3a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/awp.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/butterfly_damascus_steel.png b/KourIO/content/stream/weapon-skins/texture/butterfly_damascus_steel.png new file mode 100644 index 0000000..57b6f73 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/butterfly_damascus_steel.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/graycamo.png b/KourIO/content/stream/weapon-skins/texture/graycamo.png new file mode 100644 index 0000000..6ea327a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/graycamo.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/greencamo.png b/KourIO/content/stream/weapon-skins/texture/greencamo.png new file mode 100644 index 0000000..c607df8 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/greencamo.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/haloween.png b/KourIO/content/stream/weapon-skins/texture/haloween.png new file mode 100644 index 0000000..bd55155 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/haloween.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/hunter2.png b/KourIO/content/stream/weapon-skins/texture/hunter2.png new file mode 100644 index 0000000..5e7b34a Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/hunter2.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/illusion2.png b/KourIO/content/stream/weapon-skins/texture/illusion2.png new file mode 100644 index 0000000..ba68a48 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/illusion2.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/mp5.png b/KourIO/content/stream/weapon-skins/texture/mp5.png new file mode 100644 index 0000000..78f5abc Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/mp5.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/patriot.png b/KourIO/content/stream/weapon-skins/texture/patriot.png new file mode 100644 index 0000000..2e96c76 Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/patriot.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/polka.png b/KourIO/content/stream/weapon-skins/texture/polka.png new file mode 100644 index 0000000..aeb150e Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/polka.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/revolver.png b/KourIO/content/stream/weapon-skins/texture/revolver.png new file mode 100644 index 0000000..642ed8c Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/revolver.png differ diff --git a/KourIO/content/stream/weapon-skins/texture/zebra.png b/KourIO/content/stream/weapon-skins/texture/zebra.png new file mode 100644 index 0000000..741073b Binary files /dev/null and b/KourIO/content/stream/weapon-skins/texture/zebra.png differ diff --git a/KourIO/content/stream/weapons/renders/awp.png b/KourIO/content/stream/weapons/renders/awp.png new file mode 100644 index 0000000..692b899 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/awp.png differ diff --git a/KourIO/content/stream/weapons/renders/bayonet.png b/KourIO/content/stream/weapons/renders/bayonet.png new file mode 100644 index 0000000..2bcd202 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/bayonet.png differ diff --git a/KourIO/content/stream/weapons/renders/butterfly.png b/KourIO/content/stream/weapons/renders/butterfly.png new file mode 100644 index 0000000..edb6874 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/butterfly.png differ diff --git a/KourIO/content/stream/weapons/renders/deagle.png b/KourIO/content/stream/weapons/renders/deagle.png new file mode 100644 index 0000000..f9f4896 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/deagle.png differ diff --git a/KourIO/content/stream/weapons/renders/famas.png b/KourIO/content/stream/weapons/renders/famas.png new file mode 100644 index 0000000..9f6d972 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/famas.png differ diff --git a/KourIO/content/stream/weapons/renders/flamethrower.png b/KourIO/content/stream/weapons/renders/flamethrower.png new file mode 100644 index 0000000..3d945a4 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/flamethrower.png differ diff --git a/KourIO/content/stream/weapons/renders/glock.png b/KourIO/content/stream/weapons/renders/glock.png new file mode 100644 index 0000000..528ecce Binary files /dev/null and b/KourIO/content/stream/weapons/renders/glock.png differ diff --git a/KourIO/content/stream/weapons/renders/karambit.png b/KourIO/content/stream/weapons/renders/karambit.png new file mode 100644 index 0000000..7f07e6d Binary files /dev/null and b/KourIO/content/stream/weapons/renders/karambit.png differ diff --git a/KourIO/content/stream/weapons/renders/mp5.png b/KourIO/content/stream/weapons/renders/mp5.png new file mode 100644 index 0000000..0fb04ee Binary files /dev/null and b/KourIO/content/stream/weapons/renders/mp5.png differ diff --git a/KourIO/content/stream/weapons/renders/p90.png b/KourIO/content/stream/weapons/renders/p90.png new file mode 100644 index 0000000..a8d586c Binary files /dev/null and b/KourIO/content/stream/weapons/renders/p90.png differ diff --git a/KourIO/content/stream/weapons/renders/pkm.png b/KourIO/content/stream/weapons/renders/pkm.png new file mode 100644 index 0000000..b172595 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/pkm.png differ diff --git a/KourIO/content/stream/weapons/renders/revolver.png b/KourIO/content/stream/weapons/renders/revolver.png new file mode 100644 index 0000000..6d8098a Binary files /dev/null and b/KourIO/content/stream/weapons/renders/revolver.png differ diff --git a/KourIO/content/stream/weapons/renders/rpg.png b/KourIO/content/stream/weapons/renders/rpg.png new file mode 100644 index 0000000..2984424 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/rpg.png differ diff --git a/KourIO/content/stream/weapons/renders/scar.png b/KourIO/content/stream/weapons/renders/scar.png new file mode 100644 index 0000000..aa342a4 Binary files /dev/null and b/KourIO/content/stream/weapons/renders/scar.png differ diff --git a/KourIO/content/stream/weapons/renders/shotgun.png b/KourIO/content/stream/weapons/renders/shotgun.png new file mode 100644 index 0000000..b3267ff Binary files /dev/null and b/KourIO/content/stream/weapons/renders/shotgun.png differ diff --git a/KourIO/crazygames-sdk-v3-done.js b/KourIO/crazygames-sdk-v3-done.js new file mode 100644 index 0000000..c426d0d --- /dev/null +++ b/KourIO/crazygames-sdk-v3-done.js @@ -0,0 +1,6246 @@ +/*! For license information please see bundle.js.LICENSE.txt */ +(() => { + var e = { + 12: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.throttledMethod = void 0; + const i = new(r(n(916)).default)("none"); + t.throttledMethod = (e, t, n) => { + let r = 0; + return (...o) => { + const s = (new Date).getTime(); + return s - r > t ? (r = s, e(...o)) : void(n && i.error(`${n}() call throttled, delay ${t}`)) + } + } + }, + 25: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.loadGameDataFromLs = f, t.loadCachedCloudGameDataFromLs = g, t.checkDataLimits = function(e) { + const t = (new TextEncoder).encode(e); + if (t.length > i.MAX_DATA_LENGTH) throw (0, s.sendErrorToGf)("size-exceeded", "data", { + maxSize: i.MAX_DATA_LENGTH, + dataSize: t.length + }), new i.DataError("dataLimitExcedeed", `Game data when converted to a JSON string cannot exceed ${i.MAX_DATA_LENGTH} bytes. Data was not saved`); + t.length > .9 * i.MAX_DATA_LENGTH && d.warn(`You are approaching ${i.MAX_DATA_LENGTH} bytes data limit.`) + }, t.prepareInitialGameData = async function(e, t) { + return t.isQaTool ? (d.verbose("Running in QA tool, always using local data here"), { + data: f(t.gameId), + handler: "local" + }) : t.dataModule.isEnabled ? e ? new Promise(e => { + let n; + const r = async i => { + if ("sdkGameDataResponseNew" === i.data.type) { + d.verbose("Received game data from GF", i.data), window.removeEventListener("message", r, !1), void 0 !== n && window.clearTimeout(n); + const o = i.data.data; + if ("loaded" === o.status) o.hasData ? e({ + data: o.data, + handler: "cloud" + }) : (() => { + const n = (0, c.generateLsGameDataKey)(t.gameId); + if (u.SafeLocalStorage.Instance.getItem(n)) { + d.verbose("Cloud data missing but has local data, initialize with local data"); + const n = f(t.gameId); + e({ + data: n, + handler: "cloud" + }) + } else d.verbose("Cloud data and local data missing, initialize with empty data"), e({ + data: {}, + handler: "cloud" + }) + })(); + else { + d.error("GF failed to load cloud game data, will load cached cloud data."), (0, s.sendErrorToGf)("gf-data-load-fail", "data"); + const n = g(t.gameId); + d.verbose("Loaded cached cloud data, data will not be synced in this session", n), e({ + data: n, + handler: "cloud", + doNotSync: !0 + }) + } + } + }; + d.verbose("Requesting game data from GF"), window.addEventListener("message", r, !1), a.GF_WINDOW.postMessage({ + type: "requestSdkGameDataNew" + }, "*"), n = window.setTimeout(() => { + d.error(`Did not get game data reply from GF in ${h}ms. Using cached cloud data if present. Disable data sync for this session.`), (0, s.sendErrorToGf)("gf-response-timeout", "data", { + timeoutMs: h + }), window.removeEventListener("message", r, !1); + const n = g(t.gameId); + e({ + data: n, + handler: "cloud", + doNotSync: !0 + }) + }, h) + }) : (d.verbose("User signed out, loading data from LocalStorage"), { + data: f(t.gameId), + handler: "local" + }) : { + handler: "disabled" + } + }; + const i = n(915), + o = r(n(916)), + s = n(771), + a = n(925), + u = n(265), + l = n(457), + c = n(63), + h = 1e4, + d = new o.default("data"); + + function f(e) { + const t = (0, c.generateLsGameDataKey)(e); + try { + const e = u.SafeLocalStorage.Instance.getItem(t); + return e && JSON.parse(e).data || {} + } catch (e) { + return d.error(`Failed to retrieve local game data (${t}), initializing empty data. Error ${e}`), (0, s.sendErrorToGf)("load-ls-fail", "data"), {} + } + } + + function g(e) { + const t = (0, l.generateCloudCacheLsGameDataKey)(e); + try { + const e = u.SafeLocalStorage.Instance.getItem(t); + return e && JSON.parse(e).data || {} + } catch (e) { + return d.error(`Failed to retrieve cached cloud game data from localStorage (${t}), initializing empty data. Error ${e}`), (0, s.sendErrorToGf)("load-cached-cloud-fail", "data"), {} + } + } + }, + 63: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.LocalDataHandler = void 0, t.generateLsGameDataKey = a; + const i = r(n(916)), + o = n(265), + s = n(25); + + function a(e) { + return `SDK_DATA_${e}` + } + t.LocalDataHandler = class { + constructor(e, t) { + this.logger = new i.default("data"), this.data = e, this.lsKey = a(t), this.logger.log("Local data handler initialized"), this.logger.verbose("With this initial data: ", e) + } + clear() { + this.data = {}, this.saveData() + } + getItem(e) { + return this.data[e] || null + } + removeItem(e) { + delete this.data[e], this.saveData() + } + setItem(e, t) { + this.data[e] = `${t}`, this.saveData() + } + saveData() { + (0, s.checkDataLimits)(JSON.stringify(this.data)); + const e = { + data: this.data, + metadata: { + date: new Date + } + }; + o.SafeLocalStorage.Instance.setItem(this.lsKey, JSON.stringify(e)) + } + } + }, + 67: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.loadAdsIfNeeded = function(e, t) { + return window.CrazygamesAds ? Promise.resolve() : function(e, t) { + return o || (o = (0, r.loadScript)(e).catch(t => { + throw new Error(`Error while loading script ${e}. Reason: ${(0,i.stringifyError)(t)}`) + }).then(() => { + const e = window, + n = e => { + t.postMessage({ + type: "adsAnalyticsEvent", + data: { + event: e + } + }) + }; + try { + e.CrazygamesAds.initAds({ + analyticsEventHandler: n + }) + } catch (e) { + throw new Error(`Error in initAds. Reason: ${(0,i.stringifyError)(e)}`) + } + }), o) + }(e, t) + }; + const r = n(771), + i = n(100); + let o + }, + 80: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.UserError = t.DEFAULT_MIN_TIME_BETWEEN_REWARDED_MS = t.DEFAULT_MIN_TIME_BETWEEN_MIDROLL_MS = void 0; + const r = n(833); + t.DEFAULT_MIN_TIME_BETWEEN_MIDROLL_MS = 18e4, t.DEFAULT_MIN_TIME_BETWEEN_REWARDED_MS = 5e3; + class i extends r.GeneralError { + constructor(e, t) { + super(e, t), this.code = e, this.message = t + } + } + t.UserError = i + }, + 91: function(e, t, n) { + "use strict"; + var r, i = this && this.__createBinding || (Object.create ? function(e, t, n, r) { + void 0 === r && (r = n); + var i = Object.getOwnPropertyDescriptor(t, n); + i && !("get" in i ? !t.__esModule : i.writable || i.configurable) || (i = { + enumerable: !0, + get: function() { + return t[n] + } + }), Object.defineProperty(e, r, i) + } : function(e, t, n, r) { + void 0 === r && (r = n), e[r] = t[n] + }), + o = this && this.__setModuleDefault || (Object.create ? function(e, t) { + Object.defineProperty(e, "default", { + enumerable: !0, + value: t + }) + } : function(e, t) { + e.default = t + }), + s = this && this.__importStar || (r = function(e) { + return r = Object.getOwnPropertyNames || function(e) { + var t = []; + for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n); + return t + }, r(e) + }, function(e) { + if (e && e.__esModule) return e; + var t = {}; + if (null != e) + for (var n = r(e), s = 0; s < n.length; s++) "default" !== n[s] && i(t, e, n[s]); + return o(t, e), t + }), + a = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const u = n(100), + l = n(67), + c = n(833), + h = s(n(916)), + d = n(25), + f = n(771), + g = n(925), + p = n(672), + v = a(n(691)), + y = a(n(945)), + _ = a(n(591)), + m = a(n(351)), + w = n(643); + t.default = class { + constructor() { + this.logger = new h.default("none"), this.sdk = new m.default + } + async init(e) { + return this.initializingPromise || (this.initializingPromise = new Promise(async (t, n) => { + if (this.logger.log("Request init, options: ", e), (0, g.shouldInitLocalMode)()) h.default.forceEnable = !0, this.sdk = new _.default, await (0, w.wait)(200); + else if ((await (0, g.checkIsCrazyGames)()).isOnCrazyGames) { + if (!g.GF_WINDOW) return n(new c.GeneralError("unexpectedError", "Missing GF_WINDOW, even though running on CrazyGames")); + const [t, r] = await Promise.all([(0, g.initSdk)(e), (0, g.fetchSdkUser)()]); + if (null === t) throw new c.GeneralError("initFailed", "The SDK failed to initialize"); + this.logger.log("Init response received from GF", t); + const i = await (0, d.prepareInitialGameData)(r, t); + this.sdk = new v.default(t, i, r); + try { + await (0, l.loadAdsIfNeeded)(t.rafvertizingUrl, this.sdk) + } catch (e) { + (0, f.sendErrorToGf)("ads-script-load-fail", "ad", { + error: (0, u.stringifyError)(e) + }), this.logger.error("Failed to load ads", e) + } + } else this.sdk = new y.default; + console.log(...h.MAIN_BADGE, "CrazyGames HTML SDK initialized", { + version: p.SDK_VERSION, + environment: this.sdk.environment, + initOptions: e + }), t() + })), this.initializingPromise + } + get ad() { + return this.sdk.ad + } + get banner() { + return this.sdk.banner + } + get game() { + return this.sdk.game + } + get user() { + return this.sdk.user + } + get data() { + return this.sdk.data + } + get analytics() { + return this.sdk.analytics + } + get environment() { + return this.sdk.environment + } + get isQaTool() { + return this.sdk.isQaTool + } + } + }, + 100: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.stringifyError = function(e, t = {}) { + if (!e) return n; + let r = ""; + const { + includeStack: i = !1 + } = t; + if (e instanceof Error) r = i && e.stack || e.message; + else try { + r = e.toString() + } catch { + try { + r = JSON.stringify(e) + } catch { + r = n + } + } + if ("string" != typeof r) try { + r = JSON.stringify(r) + } catch { + r = n + } + return r + }; + const n = "An error occurred" + }, + 156: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(771), + o = r(n(91)); + window.CrazyGames = { + SDK: new o.default + }, (0, i.addStyle)("\n.crazygames-banner-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n") + }, + 199: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(n(916)), + o = n(771), + s = n(361); + t.default = class { + constructor(e) { + this.sdk = e, this.logger = new i.default("analytics") + } + trackOrder(e, t) { + if (!(0, o.isXsollaOrderArgumentValid)(t)) throw new s.AnalyticsError("invalidArgument", "Order must be a JSON object."); + if (!s.PAYMENT_PROVIDERS.includes(e)) throw new s.AnalyticsError("invalidArgument", `Unsupported payment provider. Supported providers: ${s.PAYMENT_PROVIDERS.join(",")}`); + this.logger.log(`Track "${e}" order`, t), this.sdk.postMessage({ + type: "analyticsTrackIAPOrder", + data: { + paymentProvider: e, + orderJson: JSON.stringify(t) + } + }) + } + } + }, + 201: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.NO_BANNERS_ON_APP = void 0; + const i = n(491), + o = n(366), + s = r(n(916)), + a = n(930), + u = n(637), + l = n(985), + c = n(710); + t.NO_BANNERS_ON_APP = "Banner Ads are disabled on the mobile apps", t.default = class { + constructor(e, t) { + this.sdk = e, this.initInfo = t, this.bannerQueue = {}, this.overlayBanners = {}, this.renderedBannerIds = new Set, this.logger = new s.default("banner"), this.useTestAds = t.useTestAds || !1, this.disableBannerCheck = t.disableBannerCheck || !1 + } + checkBannerAdsEnabled() { + if ("basic" === this.initInfo.launchFlow) throw new c.AdError("other", l.BASIC_LAUNCH_AD_DISABLED_ERROR); + if (function(e) { + switch (e) { + case "pwa": + case "web": + return !1; + case "apple_store": + case "google_play_store": + return !0 + } + }(this.initInfo.systemInfo.applicationType)) throw new c.AdError("other", t.NO_BANNERS_ON_APP) + } + async requestBanner(e) { + this.checkBannerAdsEnabled(), this.logger.log("Requesting banner with automatic rendering", e), this.ensureVideoAdNotPlaying(e.id); + const t = await this.prefetchBanner(e); + return this.renderPrefetchedBanner(t) + } + async requestResponsiveBanner(e) { + this.checkBannerAdsEnabled(), this.logger.log(`Requesting responsive banner with automatic rendering #${e}`), this.ensureVideoAdNotPlaying(e); + const t = await (0, a.getBannerContainer)(e, !this.disableBannerCheck), + { + width: n, + height: r + } = t.containerInfo.size, + i = await this.prefetchResponsiveBanner({ + id: e, + width: n, + height: r + }); + return this.renderPrefetchedBanner(i) + } + async prefetchBanner(e) { + this.checkBannerAdsEnabled(), this.logger.log("Prefetch banner", e); + const t = (0, a.ContainerIdToInnerId)(e.id), + n = { + ...e, + id: t + }; + return new Promise((e, t) => { + this.bannerQueue[n.id] = { + banner: n, + resolve: e, + reject: t + }, this.sdk.postMessage({ + type: "requestBanner", + data: [{ + containerId: n.id, + size: (0, a.getBannerSizeAsText)(n) + }] + }) + }) + } + async prefetchResponsiveBanner(e) { + this.checkBannerAdsEnabled(), this.logger.log(`Prefetch responsive banner #${e.id}`); + const { + width: t, + height: n + } = e, r = { + id: (0, a.ContainerIdToInnerId)(e.id), + width: t, + height: n, + isResponsive: !0 + }; + return new Promise((e, i) => { + this.bannerQueue[r.id] = { + banner: r, + resolve: e, + reject: i + }, this.sdk.postMessage({ + type: "requestResponsiveBanner", + data: [{ + id: r.id, + width: t, + height: n + }] + }) + }) + } + async renderPrefetchedBanner(e) { + this.logger.log("Rendering prefetched banner", e); + const t = (0, a.InnerIdToContainerId)(e.id); + return this.ensureVideoAdNotPlaying(t), await (0, a.getBannerContainer)(t, !this.disableBannerCheck), this.renderedBannerIds.add(t), new Promise((t, n) => { + const { + CrazygamesAds: r + } = window, { + id: i, + banner: s + } = e; + r.render([i], { + ...e.options, + banner: { + callback: e => { + if (delete this.bannerQueue[e.code], !e.empty) return this.logger.log("Banner rendered", s, "with options", e), this.sdk.postMessage({ + type: "bannerProcessed", + data: { + containerId: s.id, + width: s.width, + height: s.height, + minPrice: e.minPrice, + houseAd: e.houseAd, + empty: e.empty + } + }), void t(); + if (this.useTestAds)(0, o.renderFakeBanner)(s), this.logger.log("Fake banner rendered", s), t(); + else { + this.logger.log("No banner available", s); + const t = "Sorry, no banner is available for the moment, please retry"; + this.sdk.postMessage({ + type: "bannerProcessed", + data: { + containerId: s.id, + width: s.width, + height: s.height, + error: t, + minPrice: e.minPrice, + houseAd: e.houseAd, + empty: e.empty + } + }), n(new u.BannerError("other", t, s.id)) + } + } + } + }) + }) + } + requestOverlayBanners(e, t) { + this.logger.log("Requesting overlay banners", e); + const n = e.map(e => e.id); + Object.keys(this.overlayBanners).forEach(e => { + n.includes(e) || (this.logger.log("Remove overlay banner " + e), this.overlayBanners[e].destroy(), delete this.overlayBanners[e]) + }), e.forEach(e => { + if (this.overlayBanners[e.id]) return void this.logger.log("Skip overlay banner update " + e.id); + this.logger.log("Create overlay banner " + e.id); + const n = new i.OverlayBanner(e, this.disableBannerCheck, this, t); + this.overlayBanners[e.id] = n + }) + } + handleEvent(e) { + switch (e.type) { + case "bannerError": + return void this.handleBannerErrorEvent(e); + case "requestBanner": + return void this.handleRequestBannerEvent(e) + } + } + handleBannerErrorEvent(e) { + const { + error: t, + containerId: n + } = e; + this.logger.log("Banner error happened", { + error: t, + containerId: n + }); + const r = this.popFromBannerQueue(n); + if (!r) return; + const { + reject: i + } = r; + i(new u.BannerError("other", `${t}`, n)) + } + async handleRequestBannerEvent(e) { + const { + request: t + } = e; + this.logger.verbose("Received banner data from GF, will prefetch it now", t); + const n = t.request.units[0].adUnit.code, + r = this.popFromBannerQueue(n); + if (r) try { + const { + CrazygamesAds: e + } = window; + await e.requestOnly(t.request, t.options), this.logger.verbose(`Banner ${n} prefetched`), r.resolve({ + id: n, + banner: r.banner, + options: t.options + }) + } catch { + r.reject(new u.BannerError("other", "Failed to prefetch the banner", n)) + } else this.logger.verbose(`Banner ${n} missing in queue, not prefetching.`) + } + popFromBannerQueue(e) { + const t = this.bannerQueue[e]; + return t ? (delete this.bannerQueue[e], t) : (this.logger.log(`Cannot retrieve element for id ${e} from the banner queue`), null) + } + clearBanner(e) { + this.sdk.postMessage({ + type: "clearBanner", + data: {} + }); + const t = document.getElementById((0, a.ContainerIdToInnerId)(e)); + if (!t) return void this.logger.log(`There isn't a banner in container #${e}, not clearing anything.`); + t.remove(), this.renderedBannerIds.delete(e); + const n = Object.values(this.overlayBanners).find(t => t.containerId === e); + n && (n.destroy(), delete this.overlayBanners[n.bannerRequest.id]), this.logger.log(`Cleared the banner from container #${e} ${n?"(also overlay banner)":""}`) + } + clearAllBanners() { + this.sdk.postMessage({ + type: "clearAllBanners", + data: {} + }); + const e = Array.from(this.renderedBannerIds.values()); + this.logger.log("Clearing all banners, ids: ", e.map(e => `#${e}`).join(", ")), e.forEach(e => { + this.clearBanner(e) + }) + } + ensureVideoAdNotPlaying(e) { + if (this.sdk.ad.isAdPlaying) throw new u.BannerError("videoAdPlaying", "Banners cannot be rendered while a video ad is playing", e) + } + get activeBannersCount() { + return this.renderedBannerIds.size + } + } + }, + 202: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(710), + o = n(771), + s = r(n(916)); + t.default = class { + constructor(e) { + this.sdk = e, this.requestInProgress = !1, this.overlay = null, this.logger = new s.default("ad"), this.adPlaying = !1 + } + init() { + this.overlay = document.createElement("div"), this.overlay.id = "local-overlay", this.createOverlayStyle(), document.body.appendChild(this.overlay) + } + prefetchAd(e) { + this.logger.log(`Prefetching ${e} ad`) + } + async requestAd(e, t) { + if (this.requestInProgress) + if (null == t ? void 0 : t.adError) { + const e = "An ad request is already in progress"; + (0, o.wrapUserFn)(t.adError)(new i.AdError("other", e)) + } else(null == t ? void 0 : t.adFinished) && (0, o.wrapUserFn)(t.adFinished)(); + else this.adPlaying = !0, (null == t ? void 0 : t.adStarted) && (0, o.wrapUserFn)(t.adStarted)(), this.sdk.banner.activeBannersCount > 0 && this.sdk.banner.clearAllBanners(), await this.renderFakeAd(e), this.adPlaying = !1, (null == t ? void 0 : t.adFinished) && (0, o.wrapUserFn)(t.adFinished)() + } + async hasAdblock() { + return this.logger.log("Requesting adblock status (always false) (local)"), !1 + } + async renderFakeAd(e) { + return this.logger.log(`Requesting ${e} ad`), this.requestInProgress = !0, this.showOverlay(), this.overlay.innerHTML = `

A ${e} ad would appear here

`, new Promise(e => { + window.setTimeout(() => { + this.requestInProgress = !1, this.hideOverlay(), e() + }, 5e3) + }) + } + showOverlay() { + this.overlay.style.display = "flex" + } + hideOverlay() { + this.overlay.style.display = "none", this.overlay.innerHTML = "" + } + createOverlayStyle() { + const e = { + position: "fixed", + display: "none", + inset: 0, + "font-family": "Arial, Helvetica, sans-serif", + color: "white", + "align-items": "center", + "justify-content": "center", + "background-color": "rgba(0,0,0,0.75)", + "z-index": "10000" + }; + for (const t in e) this.overlay.style[t] = e[t] + } + get isAdPlaying() { + return this.adPlaying + } + } + }, + 220: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.isGfToSdkEvent = function(e) { + return "sdk" === e.messageTarget + } + }, + 265: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.SafeLocalStorage = t.InMemoryStorage = void 0; + const i = r(n(916)); + class o { + constructor() { + this.data = {}, this.clear() + } + setItem(e, t) { + this.data[e] = String(t) + } + getItem(e) { + return this.data.hasOwnProperty(e) ? this.data[e] : void 0 + } + removeItem(e) { + delete this.data[e] + } + clear() { + this.data = {} + } + } + t.InMemoryStorage = o, t.SafeLocalStorage = class { + constructor() { + this.logger = new i.default("none"), this.storage = this.getAvailableStorage() + } + static get Instance() { + return this._instance ? this._instance : this._instance = new this + } + getItem(e) { + return this.storage.getItem(e) + } + setItem(e, t) { + this.storage.setItem(e, t) + } + removeItem(e) { + this.storage.removeItem(e) + } + clear() { + return this.storage.clear() + } + isFunctioningStorage(e) { + try { + const t = `__SafeLocalStorage__${Date.now()}`, + n = "test"; + return e.setItem(t, n), e.getItem(t) === n && (window.localStorage.removeItem(t), !0) + } catch { + return !1 + } + } + getAvailableStorage() { + try { + return this.hasWorkingLocalStorage() ? (this.logger.verbose("[SafeLocalStorage] using localStorage"), window.localStorage) : this.hasWorkingSessionStorage() ? (this.logger.verbose("[SafeLocalStorage] fallback to sessionStorage"), window.sessionStorage) : (this.logger.verbose("[SafeLocalStorage] fallback to InMemoryStorage"), new o) + } catch { + return this.logger.verbose("[SafeLocalStorage] fallback to InMemoryStorage"), new o + } + } + hasWorkingLocalStorage() { + try { + if (!window.hasOwnProperty("localStorage")) return !1; + const { + localStorage: e + } = window; + return this.isFunctioningStorage(e) + } catch { + return !1 + } + } + hasWorkingSessionStorage() { + try { + if (!window.hasOwnProperty("sessionStorage")) return !1; + const { + sessionStorage: e + } = window; + return this.isFunctioningStorage(e) + } catch { + return !1 + } + } + } + }, + 351: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(833), + o = r(n(916)); + t.default = class { + constructor() { + this.logger = new o.default("none"), this.code = "sdkNotInitialized", this.message = `CrazySDK is not initialized yet. Check ${i.DOCS_URL} for more info.` + } + get ad() { + throw new i.GeneralError(this.code, this.message) + } + get banner() { + throw new i.GeneralError(this.code, this.message) + } + get game() { + throw new i.GeneralError(this.code, this.message) + } + get user() { + throw new i.GeneralError(this.code, this.message) + } + get data() { + throw new i.GeneralError(this.code, this.message) + } + get analytics() { + throw new i.GeneralError(this.code, this.message) + } + get environment() { + return "uninitialized" + } + get isQaTool() { + return !1 + } + } + }, + 361: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.AnalyticsError = t.PAYMENT_PROVIDERS = void 0; + const r = n(833), + i = n(433); + t.PAYMENT_PROVIDERS = i.PAYMENT_PROVIDERS; + class o extends r.GeneralError { + constructor(e, t) { + super(e, t), this.code = e, this.message = t + } + } + t.AnalyticsError = o + }, + 366: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.renderFakeBanner = function(e) { + a.log("Rendering fake banner", e); + const t = document.getElementById(e.id); + if (!t) return void console.error(`Didn't find container #${e.id} for rendering fake banner`); + let n = e.width, + r = e.height; + if (e.isResponsive) { + const e = (0, s.shuffle)(l).find(e => n >= e.width && r >= e.height); + if (!e) throw new o.BannerError("noAvailableSizes", "No available banner size has been found", t.id); + n = e.width, r = e.height + } + t.innerHTML = ""; + const i = document.createElement("img"); + i.setAttribute("src", `${u}${n}x${r}.png`), i.setAttribute("width", `${n}px`), i.setAttribute("height", `${r}px`), t.appendChild(i), t.style.backgroundColor = "rgb(191, 173, 255, 0.25)" + }; + const i = r(n(916)), + o = n(637), + s = n(543), + a = new i.default("banner"), + u = "https://images.crazygames.com/crazygames-sdk/", + l = [{ + width: 970, + height: 90 + }, { + width: 320, + height: 50 + }, { + width: 160, + height: 600 + }, { + width: 336, + height: 280 + }, { + width: 728, + height: 90 + }, { + width: 300, + height: 600 + }, { + width: 468, + height: 60 + }, { + width: 970, + height: 250 + }, { + width: 300, + height: 250 + }, { + width: 250, + height: 250 + }, { + width: 120, + height: 600 + }] + }, + 433: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.PAYMENT_PROVIDERS = void 0, t.isInGameBannerSize = function(e) { + return n.some(t => t === e) + }; + const n = ["728x90", "300x250", "320x50", "468x60", "320x100"]; + t.PAYMENT_PROVIDERS = ["xsolla"] + }, + 457: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.CloudDataHandler = void 0, t.generateCloudCacheLsGameDataKey = a; + const i = r(n(916)), + o = n(25), + s = n(265); + + function a(e) { + return `SDK_DATA_CLOUD_CACHE_${e}` + } + t.CloudDataHandler = class { + constructor(e, t, n) { + this.sdk = e, this.doNotSync = t, this.data = n, this.logger = new i.default("data"), this.cacheLsKey = a(e.game.id), this.logger.log("Cloud data handler initialized. " + (this.doNotSync ? "Data will not be synced due to failed cloud load." : "")), this.logger.verbose("With this initial data: ", n) + } + clear() { + this.data = {}, this.saveData() + } + getItem(e) { + return this.data[e] || null + } + removeItem(e) { + delete this.data[e], this.saveData() + } + setItem(e, t) { + this.data[e] = `${t}`, this.saveData() + } + saveData() { + const e = JSON.stringify(this.data); + (0, o.checkDataLimits)(e), this.doNotSync || this.sdk.postMessage({ + type: "saveSdkGameData", + data: { + jsonData: e + } + }); + const t = { + data: this.data, + metadata: { + date: new Date + } + }; + s.SafeLocalStorage.Instance.setItem(this.cacheLsKey, JSON.stringify(t)) + } + } + }, + 488: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(80), + o = n(771), + s = r(n(916)); + + function a() { + const e = navigator.userAgent.toLowerCase(), + t = /mobile/i.test(e), + n = /tablet/i.test(e) || t && /ipad/i.test(e); + return t ? "mobile" : n ? "tablet" : "desktop" + } + t.default = class { + constructor() { + this.systemInfo = { + browser: { + name: "demo", + version: "demo" + }, + countryCode: "US", + locale: "en-US", + os: { + name: "demo", + version: "demo" + }, + device: { + type: a() + }, + applicationType: "web" + }, this.isUserAccountAvailable = !0, this.demoUser1 = { + username: "User1", + profilePictureUrl: "https://images.crazygames.com/userportal/avatars/1.png" + }, this.demoUser2 = { + username: "User2", + profilePictureUrl: "https://images.crazygames.com/userportal/avatars/2.png" + }, this.user1Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJpZFVzZXIxIiwidXNlcm5hbWUiOiJVc2VyMSIsImdhbWVJZCI6InlvdXJHYW1lSWQiLCJwcm9maWxlUGljdHVyZVVybCI6Imh0dHBzOi8vaW1hZ2VzLmNyYXp5Z2FtZXMuY29tL3VzZXJwb3J0YWwvYXZhdGFycy8xLnBuZyIsImlhdCI6MTY2ODU5MzMxNCwiZXhwIjo0ODI0Mjg4NTE0fQ.u4N2DzCC6Vmo6Gys-XSl8rHQR0NUJAcWQWr29eLd54qMDPbCopPG0kye8TAidOU6dWAqNWO_kERbl75nTxNcJjbW4yqBS_bIPingIhuCCJsjvnQPkalfmVotmoZGQP21Q9MyZPfpjZNogioA3a0vm6APXAqzudTA9lTioztnT4YvgndISngOMQVNoDCJ_DgCbKy8GFQDcCN-AHFFb0WIVWiTYszv-9JZohUzULt-ueYL31pXVGHQ5C4rHESEg7LYzx1IaLKw1zcoYGxul0RxR35nm3yD_bGa6fQVzCfnKnhEBRifUZsIN1LfIHfNB23ZOh1llG7PEOdvtCSfIxP9ZK6t4gRkGn1VsqZFAMhq1LgJebO8hcm_Iqx0wF3WkdMysoQuWThTNKnwmphv9pguuALILYJluUP8UQll3qiF6gzoLPy1MfD_9l4TPZeP9Bv50B-Tm6Lk3OW248jyuFRKP_VgwZutTb5pJ7LggFcqWFXsBv5ZG3V2zsfVwpAPDhpmb4ykjoB2xLSuxjrvs1dzMhl02QAQjqTUgHj4fstgX-2jYowDyyPjj6JbT2ZC7vrrdmPvc8AcNvyCszamfRYjexElGaeJDDt6vtRuJw_JVwsCLaYHGif4UaKCoe6BECg3mRVUkH08Nm-qQPQw9slpYZmxckFEQQPCGkkPhgOBFkE", this.user2Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJpZFVzZXIyIiwidXNlcm5hbWUiOiJVc2VyMiIsImdhbWVJZCI6InlvdXJHYW1lSWQiLCJwcm9maWxlUGljdHVyZVVybCI6Imh0dHBzOi8vaW1hZ2VzLmNyYXp5Z2FtZXMuY29tL3VzZXJwb3J0YWwvYXZhdGFycy8yLnBuZyIsImlhdCI6MTY2ODU5MzMxNCwiZXhwIjo0ODI0Mjg4NTE0fQ.kh60HYKR8txKvLoCB6dQ9hQG8Mu1UgtneTGs3Y15HvBWrZoLKp3x3pTf_Vhq8xzs7fQYJKr94zYAxxFRztHey7Tv7PBBmPESUFo8Le-_s2xDy982sFhpM6XDt84ohhvEuJEsOW8wIcCaCK6wzm6UWY6n1bpw1cO1KNASyZRSkDRhfyzDVJ5e167OLgGe3euodTHgClJPDv0ZYhle9KH86PepWamCm0429VrzyOu6QdbtFcRlRNZVnTtgNrCpyvss4AyDhnY5qV9yng7xHVt4zlocP_Z7btBL_kxrzYskhJi6KYuQAYmqLxqHSDnehlIvgO4cdEpJA_FOTeACTohhEu8zjXRrfdAFvEe0W6qqUo5HNFoElRoxYWf11WGSdrJCjpF4Qei9BPgprFaVH2Xi-ITAjKyElQxeKs5p6VmvaMAGwdqZgM4fm7OSex8QQGK0HFJ7wFoCTV5PLl-MBVvTSTfemJMWEwc8od124gwT_uGdDKrASovT2pijgBsAi3jxwgfEr1RPq8uCgZtksrTqaAM9TMv9Z6Zv35pdgTrWzTrOn-G-uc4EPZq7iQaEnglWEFj8Qsm_nMQMgtIM7MYG8KwPC4if3-Yc8KwaAL_taVvkqyMaV3W5j4MX9b1bbf_fw3jrGt74MACb7FtgzKudxoz2CXKZqTppadxS_IOnlMk", this.expiredToken = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJpZFVzZXIxIiwidXNlcm5hbWUiOiJVc2VyMSIsImdhbWVJZCI6InlvdXJHYW1lSWQiLCJwcm9maWxlUGljdHVyZVVybCI6Imh0dHBzOi8vaW1hZ2VzLmNyYXp5Z2FtZXMuY29tL3VzZXJwb3J0YWwvYXZhdGFycy8xLnBuZyIsImlhdCI6MTY2ODU5MzQ5MSwiZXhwIjoxNjY4NTkzNDkyfQ.l_0cyeD-suEM7n9l-Vb2nP5vTJi-e3HwZQWLUESJMdVTX1zPDuQhwnSgHhcGVGFnhG5Wvtni-ElpM8HnVNvY7hRthbeP23n2ScAJBvAX10vrzPuLJRn_Nj_5GcRQpK4fH813Ij8ZWuOaS2hD4gKaEUessZs5n5hNBTQN9T5j4wkNvfhuw9vqtVOha2aPveqeVy1eA5XAWI7IirHi31-Dw60MSVgsp3r4tpYEHTlUPktzLsQvO9Sk9IE7iybg9ycoFoS6L1eAvxGWVF1BMHRerPwdOV9CN0rtrqrTM3pyb1fpmFfgQpoA8AgPuVrU58mwyeTpUQ4WSrPrltGjxxfiGQOATBDBrJk5V173BfUgBEgAEP0TifWAQt02iijJa9G6q-V8p0GWto1EYSdvEDmG0YhoRBVxnOQH3U1Fu0yxMWGMm9VmZVVhVN8PpLjitEhP4Gn33IafpS05d1-Q0NFMb9-FvQCdtXjTaGbaBVIeBN-aO0r4ERvoBE9R0AUrywd9Z2zK_qKRvp35NyryLjnedsYt5Xrc9TA2uDMR77TjByyqsdQ_qv4zhLfhuiMiweXyPfYzltAiNJmEUohxlP7OvH33B6xpT7Qz2ZyEeMHBrQRQGGlT6MowcMYx_2LFNSK8PwZJNlMs0Uw_uCIu-4TvqleVleIg7sLhWiijw1cxtmM", this.logger = new s.default("user") + } + async showAuthPrompt() { + switch (this.logger.log("Requesting auth prompt (local)"), (0, o.getQueryStringValue)("show_auth_prompt_response")) { + case "user1": + default: + return this.demoUser1; + case "user2": + return this.demoUser2; + case "user_cancelled": + throw new i.UserError("userCancelled", "User cancelled the auth prompt") + } + } + async showAccountLinkPrompt() { + switch (this.logger.log("Requesting link account prompt (local)"), (0, o.getQueryStringValue)("link_account_response")) { + case "yes": + default: + return { + response: "yes" + }; + case "no": + return { + response: "no" + }; + case "logged_out": + throw new i.UserError("userNotAuthenticated", "The user is not authenticated") + } + } + async getUser() { + switch (this.logger.log("Requesting user object (local)"), (0, o.getQueryStringValue)("user_response")) { + case "user1": + default: + return this.demoUser1; + case "user2": + return this.demoUser2; + case "logged_out": + return null + } + } + async getUserToken() { + switch (this.logger.log("Requesting user token (local)"), (0, o.getQueryStringValue)("token_response")) { + case "user1": + default: + return this.user1Token; + case "user2": + return this.user2Token; + case "expired_token": + return this.expiredToken; + case "logged_out": + throw new i.UserError("userNotAuthenticated", "The user is not authenticated") + } + } + async getXsollaUserToken() { + return this.logger.log("Requesting Xsolla user token (local). Xsolla token not supported locally."), "Xsolla token not supported locally" + } + addScore(e) { + this.logger.warn("addScore is no longer supported.") + } + addScoreEncrypted(e, t) { + this.logger.warn("addScoreEncrypted is no longer supported.") + } + submitScore(e) { + this.logger.log("Requesting to submit score (local).", e.encryptedScore) + } + addAuthListener() {} + removeAuthListener() {} + } + }, + 491: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.OverlayBanner = void 0; + const r = n(543); + t.OverlayBanner = class { + constructor(e, t, n, i) { + this.bannerRequest = e, this.onWindowResize = () => { + this.setContainerPosition() + }, this.containerElement = document.createElement("div"), this.containerId = "overlay-banner-" + e.id, this.containerElement.id = this.containerId, this.bannerRequest = e, this.containerElement.style.position = "absolute", this.containerElement.style.transformOrigin = "top left", this.containerElement.style.userSelect = "none"; + const o = document.getElementById("gfMainContainer"); + o ? o.appendChild(this.containerElement) : document.body.appendChild(this.containerElement); + const s = e.size.split("x"); + this.onScreenSize = { + width: parseInt(s[0]), + height: parseInt(s[1]) + }, this.bannerModule = n, this.callback = i, this.disableBannerCheck = t, this.debouncedWindowResize = (0, r.debounce)(this.onWindowResize, 200), window.addEventListener("resize", this.debouncedWindowResize), this.renderBanner() + } + isVisible() { + const e = this.computeOverlay(); + if (this.disableBannerCheck) return !0; + const t = e.left + e.width * e.scale, + n = e.top + e.height * e.scale, + r = this.getGameContainerDimensions(); + return !(e.top < -4 || e.left < -4 || t > window.innerWidth + 4 || n > r.height + 4) + } + computeOverlay() { + const e = this.getScale(), + t = this.getOnScreenPosition(); + return { + width: this.onScreenSize.width, + height: this.onScreenSize.height, + top: t.y, + left: t.x, + scale: e + } + } + getGameContainerDimensions() { + const e = document.getElementById("game-container"); + return e ? { + width: e.clientWidth, + height: e.clientHeight + } : { + width: window.innerWidth, + height: window.innerHeight + } + } + getScale() { + return this.getGameContainerDimensions().width / 922 + } + getOnScreenPosition() { + const e = this.getGameContainerDimensions(), + t = this.bannerRequest.anchor.x * e.width, + n = (1 - this.bannerRequest.anchor.y) * e.height, + r = this.getScale(), + i = this.onScreenSize, + o = i.width * r, + s = i.height * r, + a = this.bannerRequest.pivot || { + x: .5, + y: .5 + }; + return { + x: t + this.bannerRequest.position.x * r - o * a.x, + y: n - this.bannerRequest.position.y * r - s * (1 - a.y) + } + } + setContainerPosition() { + const e = this.computeOverlay(); + this.containerElement.style.width = `${e.width}px`, this.containerElement.style.height = `${e.height}px`, this.containerElement.style.top = `${e.top}px`, this.containerElement.style.left = `${e.left}px`, this.containerElement.style.transform = `scale(${e.scale})`, this.containerElement.style.display = "block" + } + async renderBanner() { + if (this.setContainerPosition(), !this.isVisible()) return this.callback(this.bannerRequest.id, "bannerError", "bannerNotEntirelyVisible"), void(this.containerElement.style.display = "none"); + try { + await this.bannerModule.requestBanner({ + id: this.containerId, + ...this.onScreenSize + }), this.callback(this.bannerRequest.id, "bannerRendered") + } catch (e) { + this.callback(this.bannerRequest.id, "bannerError", `${e}`) + } + } + destroy() { + this.containerElement && this.containerElement.remove(), window.removeEventListener("resize", this.debouncedWindowResize) + } + } + }, + 529: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.isJsSdkRequestUserTokenSuccessResponse = function(e) { + return Object.hasOwn(e, "token") + }, t.isJsSdkRequestUserTokenErrorResponse = function(e) { + return Object.hasOwn(e, "error") + }, t.isJsSdkRequestXsollaUserTokenSuccessResponse = function(e) { + return Object.hasOwn(e, "token") + }, t.isJsSdkRequestXsollaUserTokenErrorResponse = function(e) { + return Object.hasOwn(e, "error") + } + }, + 543: function(e, t, n) { + var r; + e = n.nmd(e), + function() { + var i, o = "Expected a function", + s = "__lodash_hash_undefined__", + a = "__lodash_placeholder__", + u = 32, + l = 128, + c = 1 / 0, + h = 9007199254740991, + d = NaN, + f = 4294967295, + g = [ + ["ary", l], + ["bind", 1], + ["bindKey", 2], + ["curry", 8], + ["curryRight", 16], + ["flip", 512], + ["partial", u], + ["partialRight", 64], + ["rearg", 256] + ], + p = "[object Arguments]", + v = "[object Array]", + y = "[object Boolean]", + _ = "[object Date]", + m = "[object Error]", + w = "[object Function]", + b = "[object GeneratorFunction]", + k = "[object Map]", + I = "[object Number]", + E = "[object Object]", + S = "[object Promise]", + A = "[object RegExp]", + M = "[object Set]", + T = "[object String]", + R = "[object Symbol]", + D = "[object WeakMap]", + P = "[object ArrayBuffer]", + O = "[object DataView]", + x = "[object Float32Array]", + L = "[object Float64Array]", + B = "[object Int8Array]", + C = "[object Int16Array]", + U = "[object Int32Array]", + j = "[object Uint8Array]", + N = "[object Uint8ClampedArray]", + G = "[object Uint16Array]", + z = "[object Uint32Array]", + q = /\b__p \+= '';/g, + F = /\b(__p \+=) '' \+/g, + W = /(__e\(.*?\)|\b__t\)) \+\n'';/g, + $ = /&(?:amp|lt|gt|quot|#39);/g, + V = /[&<>"']/g, + J = RegExp($.source), + H = RegExp(V.source), + Q = /<%-([\s\S]+?)%>/g, + X = /<%([\s\S]+?)%>/g, + Z = /<%=([\s\S]+?)%>/g, + Y = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + K = /^\w*$/, + ee = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + te = /[\\^$.*+?()[\]{}|]/g, + ne = RegExp(te.source), + re = /^\s+/, + ie = /\s/, + oe = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + se = /\{\n\/\* \[wrapped with (.+)\] \*/, + ae = /,? & /, + ue = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + le = /[()=,{}\[\]\/\s]/, + ce = /\\(\\)?/g, + he = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + de = /\w*$/, + fe = /^[-+]0x[0-9a-f]+$/i, + ge = /^0b[01]+$/i, + pe = /^\[object .+?Constructor\]$/, + ve = /^0o[0-7]+$/i, + ye = /^(?:0|[1-9]\d*)$/, + _e = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + me = /($^)/, + we = /['\n\r\u2028\u2029\\]/g, + be = "\\ud800-\\udfff", + ke = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", + Ie = "\\u2700-\\u27bf", + Ee = "a-z\\xdf-\\xf6\\xf8-\\xff", + Se = "A-Z\\xc0-\\xd6\\xd8-\\xde", + Ae = "\\ufe0e\\ufe0f", + Me = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", + Te = "[" + be + "]", + Re = "[" + Me + "]", + De = "[" + ke + "]", + Pe = "\\d+", + Oe = "[" + Ie + "]", + xe = "[" + Ee + "]", + Le = "[^" + be + Me + Pe + Ie + Ee + Se + "]", + Be = "\\ud83c[\\udffb-\\udfff]", + Ce = "[^" + be + "]", + Ue = "(?:\\ud83c[\\udde6-\\uddff]){2}", + je = "[\\ud800-\\udbff][\\udc00-\\udfff]", + Ne = "[" + Se + "]", + Ge = "\\u200d", + ze = "(?:" + xe + "|" + Le + ")", + qe = "(?:" + Ne + "|" + Le + ")", + Fe = "(?:['’](?:d|ll|m|re|s|t|ve))?", + We = "(?:['’](?:D|LL|M|RE|S|T|VE))?", + $e = "(?:" + De + "|" + Be + ")?", + Ve = "[" + Ae + "]?", + Je = Ve + $e + "(?:" + Ge + "(?:" + [Ce, Ue, je].join("|") + ")" + Ve + $e + ")*", + He = "(?:" + [Oe, Ue, je].join("|") + ")" + Je, + Qe = "(?:" + [Ce + De + "?", De, Ue, je, Te].join("|") + ")", + Xe = RegExp("['’]", "g"), + Ze = RegExp(De, "g"), + Ye = RegExp(Be + "(?=" + Be + ")|" + Qe + Je, "g"), + Ke = RegExp([Ne + "?" + xe + "+" + Fe + "(?=" + [Re, Ne, "$"].join("|") + ")", qe + "+" + We + "(?=" + [Re, Ne + ze, "$"].join("|") + ")", Ne + "?" + ze + "+" + Fe, Ne + "+" + We, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Pe, He].join("|"), "g"), + et = RegExp("[" + Ge + be + ke + Ae + "]"), + tt = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + nt = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"], + rt = -1, + it = {}; + it[x] = it[L] = it[B] = it[C] = it[U] = it[j] = it[N] = it[G] = it[z] = !0, it[p] = it[v] = it[P] = it[y] = it[O] = it[_] = it[m] = it[w] = it[k] = it[I] = it[E] = it[A] = it[M] = it[T] = it[D] = !1; + var ot = {}; + ot[p] = ot[v] = ot[P] = ot[O] = ot[y] = ot[_] = ot[x] = ot[L] = ot[B] = ot[C] = ot[U] = ot[k] = ot[I] = ot[E] = ot[A] = ot[M] = ot[T] = ot[R] = ot[j] = ot[N] = ot[G] = ot[z] = !0, ot[m] = ot[w] = ot[D] = !1; + var st = { + "\\": "\\", + "'": "'", + "\n": "n", + "\r": "r", + "\u2028": "u2028", + "\u2029": "u2029" + }, + at = parseFloat, + ut = parseInt, + lt = "object" == typeof n.g && n.g && n.g.Object === Object && n.g, + ct = "object" == typeof self && self && self.Object === Object && self, + ht = lt || ct || Function("return this")(), + dt = t && !t.nodeType && t, + ft = dt && e && !e.nodeType && e, + gt = ft && ft.exports === dt, + pt = gt && lt.process, + vt = function() { + try { + return ft && ft.require && ft.require("util").types || pt && pt.binding && pt.binding("util") + } catch (e) {} + }(), + yt = vt && vt.isArrayBuffer, + _t = vt && vt.isDate, + mt = vt && vt.isMap, + wt = vt && vt.isRegExp, + bt = vt && vt.isSet, + kt = vt && vt.isTypedArray; + + function It(e, t, n) { + switch (n.length) { + case 0: + return e.call(t); + case 1: + return e.call(t, n[0]); + case 2: + return e.call(t, n[0], n[1]); + case 3: + return e.call(t, n[0], n[1], n[2]) + } + return e.apply(t, n) + } + + function Et(e, t, n, r) { + for (var i = -1, o = null == e ? 0 : e.length; ++i < o;) { + var s = e[i]; + t(r, s, n(s), e) + } + return r + } + + function St(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e);); + return e + } + + function At(e, t) { + for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e);); + return e + } + + function Mt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) + if (!t(e[n], n, e)) return !1; + return !0 + } + + function Tt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = 0, o = []; ++n < r;) { + var s = e[n]; + t(s, n, e) && (o[i++] = s) + } + return o + } + + function Rt(e, t) { + return !(null == e || !e.length) && Nt(e, t, 0) > -1 + } + + function Dt(e, t, n) { + for (var r = -1, i = null == e ? 0 : e.length; ++r < i;) + if (n(t, e[r])) return !0; + return !1 + } + + function Pt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e); + return i + } + + function Ot(e, t) { + for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n]; + return e + } + + function xt(e, t, n, r) { + var i = -1, + o = null == e ? 0 : e.length; + for (r && o && (n = e[++i]); ++i < o;) n = t(n, e[i], i, e); + return n + } + + function Lt(e, t, n, r) { + var i = null == e ? 0 : e.length; + for (r && i && (n = e[--i]); i--;) n = t(n, e[i], i, e); + return n + } + + function Bt(e, t) { + for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) + if (t(e[n], n, e)) return !0; + return !1 + } + var Ct = Ft("length"); + + function Ut(e, t, n) { + var r; + return n(e, function(e, n, i) { + if (t(e, n, i)) return r = n, !1 + }), r + } + + function jt(e, t, n, r) { + for (var i = e.length, o = n + (r ? 1 : -1); r ? o-- : ++o < i;) + if (t(e[o], o, e)) return o; + return -1 + } + + function Nt(e, t, n) { + return t == t ? function(e, t, n) { + for (var r = n - 1, i = e.length; ++r < i;) + if (e[r] === t) return r; + return -1 + }(e, t, n) : jt(e, zt, n) + } + + function Gt(e, t, n, r) { + for (var i = n - 1, o = e.length; ++i < o;) + if (r(e[i], t)) return i; + return -1 + } + + function zt(e) { + return e != e + } + + function qt(e, t) { + var n = null == e ? 0 : e.length; + return n ? Vt(e, t) / n : d + } + + function Ft(e) { + return function(t) { + return null == t ? i : t[e] + } + } + + function Wt(e) { + return function(t) { + return null == e ? i : e[t] + } + } + + function $t(e, t, n, r, i) { + return i(e, function(e, i, o) { + n = r ? (r = !1, e) : t(n, e, i, o) + }), n + } + + function Vt(e, t) { + for (var n, r = -1, o = e.length; ++r < o;) { + var s = t(e[r]); + s !== i && (n = n === i ? s : n + s) + } + return n + } + + function Jt(e, t) { + for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n); + return r + } + + function Ht(e) { + return e ? e.slice(0, dn(e) + 1).replace(re, "") : e + } + + function Qt(e) { + return function(t) { + return e(t) + } + } + + function Xt(e, t) { + return Pt(t, function(t) { + return e[t] + }) + } + + function Zt(e, t) { + return e.has(t) + } + + function Yt(e, t) { + for (var n = -1, r = e.length; ++n < r && Nt(t, e[n], 0) > -1;); + return n + } + + function Kt(e, t) { + for (var n = e.length; n-- && Nt(t, e[n], 0) > -1;); + return n + } + var en = Wt({ + À: "A", + Á: "A", + Â: "A", + Ã: "A", + Ä: "A", + Å: "A", + à: "a", + á: "a", + â: "a", + ã: "a", + ä: "a", + å: "a", + Ç: "C", + ç: "c", + Ð: "D", + ð: "d", + È: "E", + É: "E", + Ê: "E", + Ë: "E", + è: "e", + é: "e", + ê: "e", + ë: "e", + Ì: "I", + Í: "I", + Î: "I", + Ï: "I", + ì: "i", + í: "i", + î: "i", + ï: "i", + Ñ: "N", + ñ: "n", + Ò: "O", + Ó: "O", + Ô: "O", + Õ: "O", + Ö: "O", + Ø: "O", + ò: "o", + ó: "o", + ô: "o", + õ: "o", + ö: "o", + ø: "o", + Ù: "U", + Ú: "U", + Û: "U", + Ü: "U", + ù: "u", + ú: "u", + û: "u", + ü: "u", + Ý: "Y", + ý: "y", + ÿ: "y", + Æ: "Ae", + æ: "ae", + Þ: "Th", + þ: "th", + ß: "ss", + Ā: "A", + Ă: "A", + Ą: "A", + ā: "a", + ă: "a", + ą: "a", + Ć: "C", + Ĉ: "C", + Ċ: "C", + Č: "C", + ć: "c", + ĉ: "c", + ċ: "c", + č: "c", + Ď: "D", + Đ: "D", + ď: "d", + đ: "d", + Ē: "E", + Ĕ: "E", + Ė: "E", + Ę: "E", + Ě: "E", + ē: "e", + ĕ: "e", + ė: "e", + ę: "e", + ě: "e", + Ĝ: "G", + Ğ: "G", + Ġ: "G", + Ģ: "G", + ĝ: "g", + ğ: "g", + ġ: "g", + ģ: "g", + Ĥ: "H", + Ħ: "H", + ĥ: "h", + ħ: "h", + Ĩ: "I", + Ī: "I", + Ĭ: "I", + Į: "I", + İ: "I", + ĩ: "i", + ī: "i", + ĭ: "i", + į: "i", + ı: "i", + Ĵ: "J", + ĵ: "j", + Ķ: "K", + ķ: "k", + ĸ: "k", + Ĺ: "L", + Ļ: "L", + Ľ: "L", + Ŀ: "L", + Ł: "L", + ĺ: "l", + ļ: "l", + ľ: "l", + ŀ: "l", + ł: "l", + Ń: "N", + Ņ: "N", + Ň: "N", + Ŋ: "N", + ń: "n", + ņ: "n", + ň: "n", + ŋ: "n", + Ō: "O", + Ŏ: "O", + Ő: "O", + ō: "o", + ŏ: "o", + ő: "o", + Ŕ: "R", + Ŗ: "R", + Ř: "R", + ŕ: "r", + ŗ: "r", + ř: "r", + Ś: "S", + Ŝ: "S", + Ş: "S", + Š: "S", + ś: "s", + ŝ: "s", + ş: "s", + š: "s", + Ţ: "T", + Ť: "T", + Ŧ: "T", + ţ: "t", + ť: "t", + ŧ: "t", + Ũ: "U", + Ū: "U", + Ŭ: "U", + Ů: "U", + Ű: "U", + Ų: "U", + ũ: "u", + ū: "u", + ŭ: "u", + ů: "u", + ű: "u", + ų: "u", + Ŵ: "W", + ŵ: "w", + Ŷ: "Y", + ŷ: "y", + Ÿ: "Y", + Ź: "Z", + Ż: "Z", + Ž: "Z", + ź: "z", + ż: "z", + ž: "z", + IJ: "IJ", + ij: "ij", + Œ: "Oe", + œ: "oe", + ʼn: "'n", + ſ: "s" + }), + tn = Wt({ + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }); + + function nn(e) { + return "\\" + st[e] + } + + function rn(e) { + return et.test(e) + } + + function on(e) { + var t = -1, + n = Array(e.size); + return e.forEach(function(e, r) { + n[++t] = [r, e] + }), n + } + + function sn(e, t) { + return function(n) { + return e(t(n)) + } + } + + function an(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var s = e[n]; + s !== t && s !== a || (e[n] = a, o[i++] = n) + } + return o + } + + function un(e) { + var t = -1, + n = Array(e.size); + return e.forEach(function(e) { + n[++t] = e + }), n + } + + function ln(e) { + var t = -1, + n = Array(e.size); + return e.forEach(function(e) { + n[++t] = [e, e] + }), n + } + + function cn(e) { + return rn(e) ? function(e) { + for (var t = Ye.lastIndex = 0; Ye.test(e);) ++t; + return t + }(e) : Ct(e) + } + + function hn(e) { + return rn(e) ? function(e) { + return e.match(Ye) || [] + }(e) : function(e) { + return e.split("") + }(e) + } + + function dn(e) { + for (var t = e.length; t-- && ie.test(e.charAt(t));); + return t + } + var fn = Wt({ + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'" + }), + gn = function e(t) { + var n, r = (t = null == t ? ht : gn.defaults(ht.Object(), t, gn.pick(ht, nt))).Array, + ie = t.Date, + be = t.Error, + ke = t.Function, + Ie = t.Math, + Ee = t.Object, + Se = t.RegExp, + Ae = t.String, + Me = t.TypeError, + Te = r.prototype, + Re = ke.prototype, + De = Ee.prototype, + Pe = t["__core-js_shared__"], + Oe = Re.toString, + xe = De.hasOwnProperty, + Le = 0, + Be = (n = /[^.]+$/.exec(Pe && Pe.keys && Pe.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n : "", + Ce = De.toString, + Ue = Oe.call(Ee), + je = ht._, + Ne = Se("^" + Oe.call(xe).replace(te, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), + Ge = gt ? t.Buffer : i, + ze = t.Symbol, + qe = t.Uint8Array, + Fe = Ge ? Ge.allocUnsafe : i, + We = sn(Ee.getPrototypeOf, Ee), + $e = Ee.create, + Ve = De.propertyIsEnumerable, + Je = Te.splice, + He = ze ? ze.isConcatSpreadable : i, + Qe = ze ? ze.iterator : i, + Ye = ze ? ze.toStringTag : i, + et = function() { + try { + var e = uo(Ee, "defineProperty"); + return e({}, "", {}), e + } catch (e) {} + }(), + st = t.clearTimeout !== ht.clearTimeout && t.clearTimeout, + lt = ie && ie.now !== ht.Date.now && ie.now, + ct = t.setTimeout !== ht.setTimeout && t.setTimeout, + dt = Ie.ceil, + ft = Ie.floor, + pt = Ee.getOwnPropertySymbols, + vt = Ge ? Ge.isBuffer : i, + Ct = t.isFinite, + Wt = Te.join, + pn = sn(Ee.keys, Ee), + vn = Ie.max, + yn = Ie.min, + _n = ie.now, + mn = t.parseInt, + wn = Ie.random, + bn = Te.reverse, + kn = uo(t, "DataView"), + In = uo(t, "Map"), + En = uo(t, "Promise"), + Sn = uo(t, "Set"), + An = uo(t, "WeakMap"), + Mn = uo(Ee, "create"), + Tn = An && new An, + Rn = {}, + Dn = Uo(kn), + Pn = Uo(In), + On = Uo(En), + xn = Uo(Sn), + Ln = Uo(An), + Bn = ze ? ze.prototype : i, + Cn = Bn ? Bn.valueOf : i, + Un = Bn ? Bn.toString : i; + + function jn(e) { + if (ea(e) && !Fs(e) && !(e instanceof qn)) { + if (e instanceof zn) return e; + if (xe.call(e, "__wrapped__")) return jo(e) + } + return new zn(e) + } + var Nn = function() { + function e() {} + return function(t) { + if (!Ks(t)) return {}; + if ($e) return $e(t); + e.prototype = t; + var n = new e; + return e.prototype = i, n + } + }(); + + function Gn() {} + + function zn(e, t) { + this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = i + } + + function qn(e) { + this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = f, this.__views__ = [] + } + + function Fn(e) { + var t = -1, + n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Wn(e) { + var t = -1, + n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function $n(e) { + var t = -1, + n = null == e ? 0 : e.length; + for (this.clear(); ++t < n;) { + var r = e[t]; + this.set(r[0], r[1]) + } + } + + function Vn(e) { + var t = -1, + n = null == e ? 0 : e.length; + for (this.__data__ = new $n; ++t < n;) this.add(e[t]) + } + + function Jn(e) { + var t = this.__data__ = new Wn(e); + this.size = t.size + } + + function Hn(e, t) { + var n = Fs(e), + r = !n && qs(e), + i = !n && !r && Js(e), + o = !n && !r && !i && ua(e), + s = n || r || i || o, + a = s ? Jt(e.length, Ae) : [], + u = a.length; + for (var l in e) !t && !xe.call(e, l) || s && ("length" == l || i && ("offset" == l || "parent" == l) || o && ("buffer" == l || "byteLength" == l || "byteOffset" == l) || vo(l, u)) || a.push(l); + return a + } + + function Qn(e) { + var t = e.length; + return t ? e[$r(0, t - 1)] : i + } + + function Xn(e, t) { + return Oo(Ai(e), or(t, 0, e.length)) + } + + function Zn(e) { + return Oo(Ai(e)) + } + + function Yn(e, t, n) { + (n !== i && !Ns(e[t], n) || n === i && !(t in e)) && rr(e, t, n) + } + + function Kn(e, t, n) { + var r = e[t]; + xe.call(e, t) && Ns(r, n) && (n !== i || t in e) || rr(e, t, n) + } + + function er(e, t) { + for (var n = e.length; n--;) + if (Ns(e[n][0], t)) return n; + return -1 + } + + function tr(e, t, n, r) { + return cr(e, function(e, i, o) { + t(r, e, n(e), o) + }), r + } + + function nr(e, t) { + return e && Mi(t, Da(t), e) + } + + function rr(e, t, n) { + "__proto__" == t && et ? et(e, t, { + configurable: !0, + enumerable: !0, + value: n, + writable: !0 + }) : e[t] = n + } + + function ir(e, t) { + for (var n = -1, o = t.length, s = r(o), a = null == e; ++n < o;) s[n] = a ? i : Sa(e, t[n]); + return s + } + + function or(e, t, n) { + return e == e && (n !== i && (e = e <= n ? e : n), t !== i && (e = e >= t ? e : t)), e + } + + function sr(e, t, n, r, o, s) { + var a, u = 1 & t, + l = 2 & t, + c = 4 & t; + if (n && (a = o ? n(e, r, o, s) : n(e)), a !== i) return a; + if (!Ks(e)) return e; + var h = Fs(e); + if (h) { + if (a = function(e) { + var t = e.length, + n = new e.constructor(t); + return t && "string" == typeof e[0] && xe.call(e, "index") && (n.index = e.index, n.input = e.input), n + }(e), !u) return Ai(e, a) + } else { + var d = ho(e), + f = d == w || d == b; + if (Js(e)) return wi(e, u); + if (d == E || d == p || f && !o) { + if (a = l || f ? {} : go(e), !u) return l ? function(e, t) { + return Mi(e, co(e), t) + }(e, function(e, t) { + return e && Mi(t, Pa(t), e) + }(a, e)) : function(e, t) { + return Mi(e, lo(e), t) + }(e, nr(a, e)) + } else { + if (!ot[d]) return o ? e : {}; + a = function(e, t, n) { + var r, i = e.constructor; + switch (t) { + case P: + return bi(e); + case y: + case _: + return new i(+e); + case O: + return function(e, t) { + var n = t ? bi(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.byteLength) + }(e, n); + case x: + case L: + case B: + case C: + case U: + case j: + case N: + case G: + case z: + return ki(e, n); + case k: + return new i; + case I: + case T: + return new i(e); + case A: + return function(e) { + var t = new e.constructor(e.source, de.exec(e)); + return t.lastIndex = e.lastIndex, t + }(e); + case M: + return new i; + case R: + return r = e, Cn ? Ee(Cn.call(r)) : {} + } + }(e, d, u) + } + } + s || (s = new Jn); + var g = s.get(e); + if (g) return g; + s.set(e, a), oa(e) ? e.forEach(function(r) { + a.add(sr(r, t, n, r, e, s)) + }) : ta(e) && e.forEach(function(r, i) { + a.set(i, sr(r, t, n, i, e, s)) + }); + var v = h ? i : (c ? l ? to : eo : l ? Pa : Da)(e); + return St(v || e, function(r, i) { + v && (r = e[i = r]), Kn(a, i, sr(r, t, n, i, e, s)) + }), a + } + + function ar(e, t, n) { + var r = n.length; + if (null == e) return !r; + for (e = Ee(e); r--;) { + var o = n[r], + s = t[o], + a = e[o]; + if (a === i && !(o in e) || !s(a)) return !1 + } + return !0 + } + + function ur(e, t, n) { + if ("function" != typeof e) throw new Me(o); + return To(function() { + e.apply(i, n) + }, t) + } + + function lr(e, t, n, r) { + var i = -1, + o = Rt, + s = !0, + a = e.length, + u = [], + l = t.length; + if (!a) return u; + n && (t = Pt(t, Qt(n))), r ? (o = Dt, s = !1) : t.length >= 200 && (o = Zt, s = !1, t = new Vn(t)); + e: for (; ++i < a;) { + var c = e[i], + h = null == n ? c : n(c); + if (c = r || 0 !== c ? c : 0, s && h == h) { + for (var d = l; d--;) + if (t[d] === h) continue e; + u.push(c) + } else o(t, h, r) || u.push(c) + } + return u + } + jn.templateSettings = { + escape: Q, + evaluate: X, + interpolate: Z, + variable: "", + imports: { + _: jn + } + }, jn.prototype = Gn.prototype, jn.prototype.constructor = jn, zn.prototype = Nn(Gn.prototype), zn.prototype.constructor = zn, qn.prototype = Nn(Gn.prototype), qn.prototype.constructor = qn, Fn.prototype.clear = function() { + this.__data__ = Mn ? Mn(null) : {}, this.size = 0 + }, Fn.prototype.delete = function(e) { + var t = this.has(e) && delete this.__data__[e]; + return this.size -= t ? 1 : 0, t + }, Fn.prototype.get = function(e) { + var t = this.__data__; + if (Mn) { + var n = t[e]; + return n === s ? i : n + } + return xe.call(t, e) ? t[e] : i + }, Fn.prototype.has = function(e) { + var t = this.__data__; + return Mn ? t[e] !== i : xe.call(t, e) + }, Fn.prototype.set = function(e, t) { + var n = this.__data__; + return this.size += this.has(e) ? 0 : 1, n[e] = Mn && t === i ? s : t, this + }, Wn.prototype.clear = function() { + this.__data__ = [], this.size = 0 + }, Wn.prototype.delete = function(e) { + var t = this.__data__, + n = er(t, e); + return !(n < 0 || (n == t.length - 1 ? t.pop() : Je.call(t, n, 1), --this.size, 0)) + }, Wn.prototype.get = function(e) { + var t = this.__data__, + n = er(t, e); + return n < 0 ? i : t[n][1] + }, Wn.prototype.has = function(e) { + return er(this.__data__, e) > -1 + }, Wn.prototype.set = function(e, t) { + var n = this.__data__, + r = er(n, e); + return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this + }, $n.prototype.clear = function() { + this.size = 0, this.__data__ = { + hash: new Fn, + map: new(In || Wn), + string: new Fn + } + }, $n.prototype.delete = function(e) { + var t = so(this, e).delete(e); + return this.size -= t ? 1 : 0, t + }, $n.prototype.get = function(e) { + return so(this, e).get(e) + }, $n.prototype.has = function(e) { + return so(this, e).has(e) + }, $n.prototype.set = function(e, t) { + var n = so(this, e), + r = n.size; + return n.set(e, t), this.size += n.size == r ? 0 : 1, this + }, Vn.prototype.add = Vn.prototype.push = function(e) { + return this.__data__.set(e, s), this + }, Vn.prototype.has = function(e) { + return this.__data__.has(e) + }, Jn.prototype.clear = function() { + this.__data__ = new Wn, this.size = 0 + }, Jn.prototype.delete = function(e) { + var t = this.__data__, + n = t.delete(e); + return this.size = t.size, n + }, Jn.prototype.get = function(e) { + return this.__data__.get(e) + }, Jn.prototype.has = function(e) { + return this.__data__.has(e) + }, Jn.prototype.set = function(e, t) { + var n = this.__data__; + if (n instanceof Wn) { + var r = n.__data__; + if (!In || r.length < 199) return r.push([e, t]), this.size = ++n.size, this; + n = this.__data__ = new $n(r) + } + return n.set(e, t), this.size = n.size, this + }; + var cr = Di(_r), + hr = Di(mr, !0); + + function dr(e, t) { + var n = !0; + return cr(e, function(e, r, i) { + return n = !!t(e, r, i) + }), n + } + + function fr(e, t, n) { + for (var r = -1, o = e.length; ++r < o;) { + var s = e[r], + a = t(s); + if (null != a && (u === i ? a == a && !aa(a) : n(a, u))) var u = a, + l = s + } + return l + } + + function gr(e, t) { + var n = []; + return cr(e, function(e, r, i) { + t(e, r, i) && n.push(e) + }), n + } + + function pr(e, t, n, r, i) { + var o = -1, + s = e.length; + for (n || (n = po), i || (i = []); ++o < s;) { + var a = e[o]; + t > 0 && n(a) ? t > 1 ? pr(a, t - 1, n, r, i) : Ot(i, a) : r || (i[i.length] = a) + } + return i + } + var vr = Pi(), + yr = Pi(!0); + + function _r(e, t) { + return e && vr(e, t, Da) + } + + function mr(e, t) { + return e && yr(e, t, Da) + } + + function wr(e, t) { + return Tt(t, function(t) { + return Xs(e[t]) + }) + } + + function br(e, t) { + for (var n = 0, r = (t = vi(t, e)).length; null != e && n < r;) e = e[Co(t[n++])]; + return n && n == r ? e : i + } + + function kr(e, t, n) { + var r = t(e); + return Fs(e) ? r : Ot(r, n(e)) + } + + function Ir(e) { + return null == e ? e === i ? "[object Undefined]" : "[object Null]" : Ye && Ye in Ee(e) ? function(e) { + var t = xe.call(e, Ye), + n = e[Ye]; + try { + e[Ye] = i; + var r = !0 + } catch (e) {} + var o = Ce.call(e); + return r && (t ? e[Ye] = n : delete e[Ye]), o + }(e) : function(e) { + return Ce.call(e) + }(e) + } + + function Er(e, t) { + return e > t + } + + function Sr(e, t) { + return null != e && xe.call(e, t) + } + + function Ar(e, t) { + return null != e && t in Ee(e) + } + + function Mr(e, t, n) { + for (var o = n ? Dt : Rt, s = e[0].length, a = e.length, u = a, l = r(a), c = 1 / 0, h = []; u--;) { + var d = e[u]; + u && t && (d = Pt(d, Qt(t))), c = yn(d.length, c), l[u] = !n && (t || s >= 120 && d.length >= 120) ? new Vn(u && d) : i + } + d = e[0]; + var f = -1, + g = l[0]; + e: for (; ++f < s && h.length < c;) { + var p = d[f], + v = t ? t(p) : p; + if (p = n || 0 !== p ? p : 0, !(g ? Zt(g, v) : o(h, v, n))) { + for (u = a; --u;) { + var y = l[u]; + if (!(y ? Zt(y, v) : o(e[u], v, n))) continue e + } + g && g.push(v), h.push(p) + } + } + return h + } + + function Tr(e, t, n) { + var r = null == (e = So(e, t = vi(t, e))) ? e : e[Co(Qo(t))]; + return null == r ? i : It(r, e, n) + } + + function Rr(e) { + return ea(e) && Ir(e) == p + } + + function Dr(e, t, n, r, o) { + return e === t || (null == e || null == t || !ea(e) && !ea(t) ? e != e && t != t : function(e, t, n, r, o, s) { + var a = Fs(e), + u = Fs(t), + l = a ? v : ho(e), + c = u ? v : ho(t), + h = (l = l == p ? E : l) == E, + d = (c = c == p ? E : c) == E, + f = l == c; + if (f && Js(e)) { + if (!Js(t)) return !1; + a = !0, h = !1 + } + if (f && !h) return s || (s = new Jn), a || ua(e) ? Yi(e, t, n, r, o, s) : function(e, t, n, r, i, o, s) { + switch (n) { + case O: + if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; + e = e.buffer, t = t.buffer; + case P: + return !(e.byteLength != t.byteLength || !o(new qe(e), new qe(t))); + case y: + case _: + case I: + return Ns(+e, +t); + case m: + return e.name == t.name && e.message == t.message; + case A: + case T: + return e == t + ""; + case k: + var a = on; + case M: + var u = 1 & r; + if (a || (a = un), e.size != t.size && !u) return !1; + var l = s.get(e); + if (l) return l == t; + r |= 2, s.set(e, t); + var c = Yi(a(e), a(t), r, i, o, s); + return s.delete(e), c; + case R: + if (Cn) return Cn.call(e) == Cn.call(t) + } + return !1 + }(e, t, l, n, r, o, s); + if (!(1 & n)) { + var g = h && xe.call(e, "__wrapped__"), + w = d && xe.call(t, "__wrapped__"); + if (g || w) { + var b = g ? e.value() : e, + S = w ? t.value() : t; + return s || (s = new Jn), o(b, S, n, r, s) + } + } + return !!f && (s || (s = new Jn), function(e, t, n, r, o, s) { + var a = 1 & n, + u = eo(e), + l = u.length; + if (l != eo(t).length && !a) return !1; + for (var c = l; c--;) { + var h = u[c]; + if (!(a ? h in t : xe.call(t, h))) return !1 + } + var d = s.get(e), + f = s.get(t); + if (d && f) return d == t && f == e; + var g = !0; + s.set(e, t), s.set(t, e); + for (var p = a; ++c < l;) { + var v = e[h = u[c]], + y = t[h]; + if (r) var _ = a ? r(y, v, h, t, e, s) : r(v, y, h, e, t, s); + if (!(_ === i ? v === y || o(v, y, n, r, s) : _)) { + g = !1; + break + } + p || (p = "constructor" == h) + } + if (g && !p) { + var m = e.constructor, + w = t.constructor; + m == w || !("constructor" in e) || !("constructor" in t) || "function" == typeof m && m instanceof m && "function" == typeof w && w instanceof w || (g = !1) + } + return s.delete(e), s.delete(t), g + }(e, t, n, r, o, s)) + }(e, t, n, r, Dr, o)) + } + + function Pr(e, t, n, r) { + var o = n.length, + s = o, + a = !r; + if (null == e) return !s; + for (e = Ee(e); o--;) { + var u = n[o]; + if (a && u[2] ? u[1] !== e[u[0]] : !(u[0] in e)) return !1 + } + for (; ++o < s;) { + var l = (u = n[o])[0], + c = e[l], + h = u[1]; + if (a && u[2]) { + if (c === i && !(l in e)) return !1 + } else { + var d = new Jn; + if (r) var f = r(c, h, l, e, t, d); + if (!(f === i ? Dr(h, c, 3, r, d) : f)) return !1 + } + } + return !0 + } + + function Or(e) { + return !(!Ks(e) || (t = e, Be && Be in t)) && (Xs(e) ? Ne : pe).test(Uo(e)); + var t + } + + function xr(e) { + return "function" == typeof e ? e : null == e ? nu : "object" == typeof e ? Fs(e) ? jr(e[0], e[1]) : Ur(e) : hu(e) + } + + function Lr(e) { + if (!bo(e)) return pn(e); + var t = []; + for (var n in Ee(e)) xe.call(e, n) && "constructor" != n && t.push(n); + return t + } + + function Br(e, t) { + return e < t + } + + function Cr(e, t) { + var n = -1, + i = $s(e) ? r(e.length) : []; + return cr(e, function(e, r, o) { + i[++n] = t(e, r, o) + }), i + } + + function Ur(e) { + var t = ao(e); + return 1 == t.length && t[0][2] ? Io(t[0][0], t[0][1]) : function(n) { + return n === e || Pr(n, e, t) + } + } + + function jr(e, t) { + return _o(e) && ko(t) ? Io(Co(e), t) : function(n) { + var r = Sa(n, e); + return r === i && r === t ? Aa(n, e) : Dr(t, r, 3) + } + } + + function Nr(e, t, n, r, o) { + e !== t && vr(t, function(s, a) { + if (o || (o = new Jn), Ks(s)) ! function(e, t, n, r, o, s, a) { + var u = Ao(e, n), + l = Ao(t, n), + c = a.get(l); + if (c) Yn(e, n, c); + else { + var h = s ? s(u, l, n + "", e, t, a) : i, + d = h === i; + if (d) { + var f = Fs(l), + g = !f && Js(l), + p = !f && !g && ua(l); + h = l, f || g || p ? Fs(u) ? h = u : Vs(u) ? h = Ai(u) : g ? (d = !1, h = wi(l, !0)) : p ? (d = !1, h = ki(l, !0)) : h = [] : ra(l) || qs(l) ? (h = u, qs(u) ? h = va(u) : Ks(u) && !Xs(u) || (h = go(l))) : d = !1 + } + d && (a.set(l, h), o(h, l, r, s, a), a.delete(l)), Yn(e, n, h) + } + }(e, t, a, n, Nr, r, o); + else { + var u = r ? r(Ao(e, a), s, a + "", e, t, o) : i; + u === i && (u = s), Yn(e, a, u) + } + }, Pa) + } + + function Gr(e, t) { + var n = e.length; + if (n) return vo(t += t < 0 ? n : 0, n) ? e[t] : i + } + + function zr(e, t, n) { + t = t.length ? Pt(t, function(e) { + return Fs(e) ? function(t) { + return br(t, 1 === e.length ? e[0] : e) + } : e + }) : [nu]; + var r = -1; + t = Pt(t, Qt(oo())); + var i = Cr(e, function(e, n, i) { + var o = Pt(t, function(t) { + return t(e) + }); + return { + criteria: o, + index: ++r, + value: e + } + }); + return function(e) { + var t = e.length; + for (e.sort(function(e, t) { + return function(e, t, n) { + for (var r = -1, i = e.criteria, o = t.criteria, s = i.length, a = n.length; ++r < s;) { + var u = Ii(i[r], o[r]); + if (u) return r >= a ? u : u * ("desc" == n[r] ? -1 : 1) + } + return e.index - t.index + }(e, t, n) + }); t--;) e[t] = e[t].value; + return e + }(i) + } + + function qr(e, t, n) { + for (var r = -1, i = t.length, o = {}; ++r < i;) { + var s = t[r], + a = br(e, s); + n(a, s) && Xr(o, vi(s, e), a) + } + return o + } + + function Fr(e, t, n, r) { + var i = r ? Gt : Nt, + o = -1, + s = t.length, + a = e; + for (e === t && (t = Ai(t)), n && (a = Pt(e, Qt(n))); ++o < s;) + for (var u = 0, l = t[o], c = n ? n(l) : l; + (u = i(a, c, u, r)) > -1;) a !== e && Je.call(a, u, 1), Je.call(e, u, 1); + return e + } + + function Wr(e, t) { + for (var n = e ? t.length : 0, r = n - 1; n--;) { + var i = t[n]; + if (n == r || i !== o) { + var o = i; + vo(i) ? Je.call(e, i, 1) : ui(e, i) + } + } + return e + } + + function $r(e, t) { + return e + ft(wn() * (t - e + 1)) + } + + function Vr(e, t) { + var n = ""; + if (!e || t < 1 || t > h) return n; + do { + t % 2 && (n += e), (t = ft(t / 2)) && (e += e) + } while (t); + return n + } + + function Jr(e, t) { + return Ro(Eo(e, t, nu), e + "") + } + + function Hr(e) { + return Qn(Na(e)) + } + + function Qr(e, t) { + var n = Na(e); + return Oo(n, or(t, 0, n.length)) + } + + function Xr(e, t, n, r) { + if (!Ks(e)) return e; + for (var o = -1, s = (t = vi(t, e)).length, a = s - 1, u = e; null != u && ++o < s;) { + var l = Co(t[o]), + c = n; + if ("__proto__" === l || "constructor" === l || "prototype" === l) return e; + if (o != a) { + var h = u[l]; + (c = r ? r(h, l, u) : i) === i && (c = Ks(h) ? h : vo(t[o + 1]) ? [] : {}) + } + Kn(u, l, c), u = u[l] + } + return e + } + var Zr = Tn ? function(e, t) { + return Tn.set(e, t), e + } : nu, + Yr = et ? function(e, t) { + return et(e, "toString", { + configurable: !0, + enumerable: !1, + value: Ka(t), + writable: !0 + }) + } : nu; + + function Kr(e) { + return Oo(Na(e)) + } + + function ei(e, t, n) { + var i = -1, + o = e.length; + t < 0 && (t = -t > o ? 0 : o + t), (n = n > o ? o : n) < 0 && (n += o), o = t > n ? 0 : n - t >>> 0, t >>>= 0; + for (var s = r(o); ++i < o;) s[i] = e[i + t]; + return s + } + + function ti(e, t) { + var n; + return cr(e, function(e, r, i) { + return !(n = t(e, r, i)) + }), !!n + } + + function ni(e, t, n) { + var r = 0, + i = null == e ? r : e.length; + if ("number" == typeof t && t == t && i <= 2147483647) { + for (; r < i;) { + var o = r + i >>> 1, + s = e[o]; + null !== s && !aa(s) && (n ? s <= t : s < t) ? r = o + 1 : i = o + } + return i + } + return ri(e, t, nu, n) + } + + function ri(e, t, n, r) { + var o = 0, + s = null == e ? 0 : e.length; + if (0 === s) return 0; + for (var a = (t = n(t)) != t, u = null === t, l = aa(t), c = t === i; o < s;) { + var h = ft((o + s) / 2), + d = n(e[h]), + f = d !== i, + g = null === d, + p = d == d, + v = aa(d); + if (a) var y = r || p; + else y = c ? p && (r || f) : u ? p && f && (r || !g) : l ? p && f && !g && (r || !v) : !g && !v && (r ? d <= t : d < t); + y ? o = h + 1 : s = h + } + return yn(s, 4294967294) + } + + function ii(e, t) { + for (var n = -1, r = e.length, i = 0, o = []; ++n < r;) { + var s = e[n], + a = t ? t(s) : s; + if (!n || !Ns(a, u)) { + var u = a; + o[i++] = 0 === s ? 0 : s + } + } + return o + } + + function oi(e) { + return "number" == typeof e ? e : aa(e) ? d : +e + } + + function si(e) { + if ("string" == typeof e) return e; + if (Fs(e)) return Pt(e, si) + ""; + if (aa(e)) return Un ? Un.call(e) : ""; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function ai(e, t, n) { + var r = -1, + i = Rt, + o = e.length, + s = !0, + a = [], + u = a; + if (n) s = !1, i = Dt; + else if (o >= 200) { + var l = t ? null : Vi(e); + if (l) return un(l); + s = !1, i = Zt, u = new Vn + } else u = t ? [] : a; + e: for (; ++r < o;) { + var c = e[r], + h = t ? t(c) : c; + if (c = n || 0 !== c ? c : 0, s && h == h) { + for (var d = u.length; d--;) + if (u[d] === h) continue e; + t && u.push(h), a.push(c) + } else i(u, h, n) || (u !== a && u.push(h), a.push(c)) + } + return a + } + + function ui(e, t) { + return null == (e = So(e, t = vi(t, e))) || delete e[Co(Qo(t))] + } + + function li(e, t, n, r) { + return Xr(e, t, n(br(e, t)), r) + } + + function ci(e, t, n, r) { + for (var i = e.length, o = r ? i : -1; + (r ? o-- : ++o < i) && t(e[o], o, e);); + return n ? ei(e, r ? 0 : o, r ? o + 1 : i) : ei(e, r ? o + 1 : 0, r ? i : o) + } + + function hi(e, t) { + var n = e; + return n instanceof qn && (n = n.value()), xt(t, function(e, t) { + return t.func.apply(t.thisArg, Ot([e], t.args)) + }, n) + } + + function di(e, t, n) { + var i = e.length; + if (i < 2) return i ? ai(e[0]) : []; + for (var o = -1, s = r(i); ++o < i;) + for (var a = e[o], u = -1; ++u < i;) u != o && (s[o] = lr(s[o] || a, e[u], t, n)); + return ai(pr(s, 1), t, n) + } + + function fi(e, t, n) { + for (var r = -1, o = e.length, s = t.length, a = {}; ++r < o;) { + var u = r < s ? t[r] : i; + n(a, e[r], u) + } + return a + } + + function gi(e) { + return Vs(e) ? e : [] + } + + function pi(e) { + return "function" == typeof e ? e : nu + } + + function vi(e, t) { + return Fs(e) ? e : _o(e, t) ? [e] : Bo(ya(e)) + } + var yi = Jr; + + function _i(e, t, n) { + var r = e.length; + return n = n === i ? r : n, !t && n >= r ? e : ei(e, t, n) + } + var mi = st || function(e) { + return ht.clearTimeout(e) + }; + + function wi(e, t) { + if (t) return e.slice(); + var n = e.length, + r = Fe ? Fe(n) : new e.constructor(n); + return e.copy(r), r + } + + function bi(e) { + var t = new e.constructor(e.byteLength); + return new qe(t).set(new qe(e)), t + } + + function ki(e, t) { + var n = t ? bi(e.buffer) : e.buffer; + return new e.constructor(n, e.byteOffset, e.length) + } + + function Ii(e, t) { + if (e !== t) { + var n = e !== i, + r = null === e, + o = e == e, + s = aa(e), + a = t !== i, + u = null === t, + l = t == t, + c = aa(t); + if (!u && !c && !s && e > t || s && a && l && !u && !c || r && a && l || !n && l || !o) return 1; + if (!r && !s && !c && e < t || c && n && o && !r && !s || u && n && o || !a && o || !l) return -1 + } + return 0 + } + + function Ei(e, t, n, i) { + for (var o = -1, s = e.length, a = n.length, u = -1, l = t.length, c = vn(s - a, 0), h = r(l + c), d = !i; ++u < l;) h[u] = t[u]; + for (; ++o < a;)(d || o < s) && (h[n[o]] = e[o]); + for (; c--;) h[u++] = e[o++]; + return h + } + + function Si(e, t, n, i) { + for (var o = -1, s = e.length, a = -1, u = n.length, l = -1, c = t.length, h = vn(s - u, 0), d = r(h + c), f = !i; ++o < h;) d[o] = e[o]; + for (var g = o; ++l < c;) d[g + l] = t[l]; + for (; ++a < u;)(f || o < s) && (d[g + n[a]] = e[o++]); + return d + } + + function Ai(e, t) { + var n = -1, + i = e.length; + for (t || (t = r(i)); ++n < i;) t[n] = e[n]; + return t + } + + function Mi(e, t, n, r) { + var o = !n; + n || (n = {}); + for (var s = -1, a = t.length; ++s < a;) { + var u = t[s], + l = r ? r(n[u], e[u], u, n, e) : i; + l === i && (l = e[u]), o ? rr(n, u, l) : Kn(n, u, l) + } + return n + } + + function Ti(e, t) { + return function(n, r) { + var i = Fs(n) ? Et : tr, + o = t ? t() : {}; + return i(n, e, oo(r, 2), o) + } + } + + function Ri(e) { + return Jr(function(t, n) { + var r = -1, + o = n.length, + s = o > 1 ? n[o - 1] : i, + a = o > 2 ? n[2] : i; + for (s = e.length > 3 && "function" == typeof s ? (o--, s) : i, a && yo(n[0], n[1], a) && (s = o < 3 ? i : s, o = 1), t = Ee(t); ++r < o;) { + var u = n[r]; + u && e(t, u, r, s) + } + return t + }) + } + + function Di(e, t) { + return function(n, r) { + if (null == n) return n; + if (!$s(n)) return e(n, r); + for (var i = n.length, o = t ? i : -1, s = Ee(n); + (t ? o-- : ++o < i) && !1 !== r(s[o], o, s);); + return n + } + } + + function Pi(e) { + return function(t, n, r) { + for (var i = -1, o = Ee(t), s = r(t), a = s.length; a--;) { + var u = s[e ? a : ++i]; + if (!1 === n(o[u], u, o)) break + } + return t + } + } + + function Oi(e) { + return function(t) { + var n = rn(t = ya(t)) ? hn(t) : i, + r = n ? n[0] : t.charAt(0), + o = n ? _i(n, 1).join("") : t.slice(1); + return r[e]() + o + } + } + + function xi(e) { + return function(t) { + return xt(Xa(qa(t).replace(Xe, "")), e, "") + } + } + + function Li(e) { + return function() { + var t = arguments; + switch (t.length) { + case 0: + return new e; + case 1: + return new e(t[0]); + case 2: + return new e(t[0], t[1]); + case 3: + return new e(t[0], t[1], t[2]); + case 4: + return new e(t[0], t[1], t[2], t[3]); + case 5: + return new e(t[0], t[1], t[2], t[3], t[4]); + case 6: + return new e(t[0], t[1], t[2], t[3], t[4], t[5]); + case 7: + return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6]) + } + var n = Nn(e.prototype), + r = e.apply(n, t); + return Ks(r) ? r : n + } + } + + function Bi(e) { + return function(t, n, r) { + var o = Ee(t); + if (!$s(t)) { + var s = oo(n, 3); + t = Da(t), n = function(e) { + return s(o[e], e, o) + } + } + var a = e(t, n, r); + return a > -1 ? o[s ? t[a] : a] : i + } + } + + function Ci(e) { + return Ki(function(t) { + var n = t.length, + r = n, + s = zn.prototype.thru; + for (e && t.reverse(); r--;) { + var a = t[r]; + if ("function" != typeof a) throw new Me(o); + if (s && !u && "wrapper" == ro(a)) var u = new zn([], !0) + } + for (r = u ? r : n; ++r < n;) { + var l = ro(a = t[r]), + c = "wrapper" == l ? no(a) : i; + u = c && mo(c[0]) && 424 == c[1] && !c[4].length && 1 == c[9] ? u[ro(c[0])].apply(u, c[3]) : 1 == a.length && mo(a) ? u[l]() : u.thru(a) + } + return function() { + var e = arguments, + r = e[0]; + if (u && 1 == e.length && Fs(r)) return u.plant(r).value(); + for (var i = 0, o = n ? t[i].apply(this, e) : r; ++i < n;) o = t[i].call(this, o); + return o + } + }) + } + + function Ui(e, t, n, o, s, a, u, c, h, d) { + var f = t & l, + g = 1 & t, + p = 2 & t, + v = 24 & t, + y = 512 & t, + _ = p ? i : Li(e); + return function l() { + for (var m = arguments.length, w = r(m), b = m; b--;) w[b] = arguments[b]; + if (v) var k = io(l), + I = function(e, t) { + for (var n = e.length, r = 0; n--;) e[n] === t && ++r; + return r + }(w, k); + if (o && (w = Ei(w, o, s, v)), a && (w = Si(w, a, u, v)), m -= I, v && m < d) { + var E = an(w, k); + return Wi(e, t, Ui, l.placeholder, n, w, E, c, h, d - m) + } + var S = g ? n : this, + A = p ? S[e] : e; + return m = w.length, c ? w = function(e, t) { + for (var n = e.length, r = yn(t.length, n), o = Ai(e); r--;) { + var s = t[r]; + e[r] = vo(s, n) ? o[s] : i + } + return e + }(w, c) : y && m > 1 && w.reverse(), f && h < m && (w.length = h), this && this !== ht && this instanceof l && (A = _ || Li(A)), A.apply(S, w) + } + } + + function ji(e, t) { + return function(n, r) { + return function(e, t, n, r) { + return _r(e, function(e, i, o) { + t(r, n(e), i, o) + }), r + }(n, e, t(r), {}) + } + } + + function Ni(e, t) { + return function(n, r) { + var o; + if (n === i && r === i) return t; + if (n !== i && (o = n), r !== i) { + if (o === i) return r; + "string" == typeof n || "string" == typeof r ? (n = si(n), r = si(r)) : (n = oi(n), r = oi(r)), o = e(n, r) + } + return o + } + } + + function Gi(e) { + return Ki(function(t) { + return t = Pt(t, Qt(oo())), Jr(function(n) { + var r = this; + return e(t, function(e) { + return It(e, r, n) + }) + }) + }) + } + + function zi(e, t) { + var n = (t = t === i ? " " : si(t)).length; + if (n < 2) return n ? Vr(t, e) : t; + var r = Vr(t, dt(e / cn(t))); + return rn(t) ? _i(hn(r), 0, e).join("") : r.slice(0, e) + } + + function qi(e) { + return function(t, n, o) { + return o && "number" != typeof o && yo(t, n, o) && (n = o = i), t = da(t), n === i ? (n = t, t = 0) : n = da(n), + function(e, t, n, i) { + for (var o = -1, s = vn(dt((t - e) / (n || 1)), 0), a = r(s); s--;) a[i ? s : ++o] = e, e += n; + return a + }(t, n, o = o === i ? t < n ? 1 : -1 : da(o), e) + } + } + + function Fi(e) { + return function(t, n) { + return "string" == typeof t && "string" == typeof n || (t = pa(t), n = pa(n)), e(t, n) + } + } + + function Wi(e, t, n, r, o, s, a, l, c, h) { + var d = 8 & t; + t |= d ? u : 64, 4 & (t &= ~(d ? 64 : u)) || (t &= -4); + var f = [e, t, o, d ? s : i, d ? a : i, d ? i : s, d ? i : a, l, c, h], + g = n.apply(i, f); + return mo(e) && Mo(g, f), g.placeholder = r, Do(g, e, t) + } + + function $i(e) { + var t = Ie[e]; + return function(e, n) { + if (e = pa(e), (n = null == n ? 0 : yn(fa(n), 292)) && Ct(e)) { + var r = (ya(e) + "e").split("e"); + return +((r = (ya(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n)) + } + return t(e) + } + } + var Vi = Sn && 1 / un(new Sn([, -0]))[1] == c ? function(e) { + return new Sn(e) + } : au; + + function Ji(e) { + return function(t) { + var n = ho(t); + return n == k ? on(t) : n == M ? ln(t) : function(e, t) { + return Pt(t, function(t) { + return [t, e[t]] + }) + }(t, e(t)) + } + } + + function Hi(e, t, n, s, c, h, d, f) { + var g = 2 & t; + if (!g && "function" != typeof e) throw new Me(o); + var p = s ? s.length : 0; + if (p || (t &= -97, s = c = i), d = d === i ? d : vn(fa(d), 0), f = f === i ? f : fa(f), p -= c ? c.length : 0, 64 & t) { + var v = s, + y = c; + s = c = i + } + var _ = g ? i : no(e), + m = [e, t, n, s, c, v, y, h, d, f]; + if (_ && function(e, t) { + var n = e[1], + r = t[1], + i = n | r, + o = i < 131, + s = r == l && 8 == n || r == l && 256 == n && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n; + if (!o && !s) return e; + 1 & r && (e[2] = t[2], i |= 1 & n ? 0 : 4); + var u = t[3]; + if (u) { + var c = e[3]; + e[3] = c ? Ei(c, u, t[4]) : u, e[4] = c ? an(e[3], a) : t[4] + }(u = t[5]) && (c = e[5], e[5] = c ? Si(c, u, t[6]) : u, e[6] = c ? an(e[5], a) : t[6]), (u = t[7]) && (e[7] = u), r & l && (e[8] = null == e[8] ? t[8] : yn(e[8], t[8])), null == e[9] && (e[9] = t[9]), e[0] = t[0], e[1] = i + }(m, _), e = m[0], t = m[1], n = m[2], s = m[3], c = m[4], !(f = m[9] = m[9] === i ? g ? 0 : e.length : vn(m[9] - p, 0)) && 24 & t && (t &= -25), t && 1 != t) w = 8 == t || 16 == t ? function(e, t, n) { + var o = Li(e); + return function s() { + for (var a = arguments.length, u = r(a), l = a, c = io(s); l--;) u[l] = arguments[l]; + var h = a < 3 && u[0] !== c && u[a - 1] !== c ? [] : an(u, c); + return (a -= h.length) < n ? Wi(e, t, Ui, s.placeholder, i, u, h, i, i, n - a) : It(this && this !== ht && this instanceof s ? o : e, this, u) + } + }(e, t, f) : t != u && 33 != t || c.length ? Ui.apply(i, m) : function(e, t, n, i) { + var o = 1 & t, + s = Li(e); + return function t() { + for (var a = -1, u = arguments.length, l = -1, c = i.length, h = r(c + u), d = this && this !== ht && this instanceof t ? s : e; ++l < c;) h[l] = i[l]; + for (; u--;) h[l++] = arguments[++a]; + return It(d, o ? n : this, h) + } + }(e, t, n, s); + else var w = function(e, t, n) { + var r = 1 & t, + i = Li(e); + return function t() { + return (this && this !== ht && this instanceof t ? i : e).apply(r ? n : this, arguments) + } + }(e, t, n); + return Do((_ ? Zr : Mo)(w, m), e, t) + } + + function Qi(e, t, n, r) { + return e === i || Ns(e, De[n]) && !xe.call(r, n) ? t : e + } + + function Xi(e, t, n, r, o, s) { + return Ks(e) && Ks(t) && (s.set(t, e), Nr(e, t, i, Xi, s), s.delete(t)), e + } + + function Zi(e) { + return ra(e) ? i : e + } + + function Yi(e, t, n, r, o, s) { + var a = 1 & n, + u = e.length, + l = t.length; + if (u != l && !(a && l > u)) return !1; + var c = s.get(e), + h = s.get(t); + if (c && h) return c == t && h == e; + var d = -1, + f = !0, + g = 2 & n ? new Vn : i; + for (s.set(e, t), s.set(t, e); ++d < u;) { + var p = e[d], + v = t[d]; + if (r) var y = a ? r(v, p, d, t, e, s) : r(p, v, d, e, t, s); + if (y !== i) { + if (y) continue; + f = !1; + break + } + if (g) { + if (!Bt(t, function(e, t) { + if (!Zt(g, t) && (p === e || o(p, e, n, r, s))) return g.push(t) + })) { + f = !1; + break + } + } else if (p !== v && !o(p, v, n, r, s)) { + f = !1; + break + } + } + return s.delete(e), s.delete(t), f + } + + function Ki(e) { + return Ro(Eo(e, i, Wo), e + "") + } + + function eo(e) { + return kr(e, Da, lo) + } + + function to(e) { + return kr(e, Pa, co) + } + var no = Tn ? function(e) { + return Tn.get(e) + } : au; + + function ro(e) { + for (var t = e.name + "", n = Rn[t], r = xe.call(Rn, t) ? n.length : 0; r--;) { + var i = n[r], + o = i.func; + if (null == o || o == e) return i.name + } + return t + } + + function io(e) { + return (xe.call(jn, "placeholder") ? jn : e).placeholder + } + + function oo() { + var e = jn.iteratee || ru; + return e = e === ru ? xr : e, arguments.length ? e(arguments[0], arguments[1]) : e + } + + function so(e, t) { + var n, r, i = e.__data__; + return ("string" == (r = typeof(n = t)) || "number" == r || "symbol" == r || "boolean" == r ? "__proto__" !== n : null === n) ? i["string" == typeof t ? "string" : "hash"] : i.map + } + + function ao(e) { + for (var t = Da(e), n = t.length; n--;) { + var r = t[n], + i = e[r]; + t[n] = [r, i, ko(i)] + } + return t + } + + function uo(e, t) { + var n = function(e, t) { + return null == e ? i : e[t] + }(e, t); + return Or(n) ? n : i + } + var lo = pt ? function(e) { + return null == e ? [] : (e = Ee(e), Tt(pt(e), function(t) { + return Ve.call(e, t) + })) + } : gu, + co = pt ? function(e) { + for (var t = []; e;) Ot(t, lo(e)), e = We(e); + return t + } : gu, + ho = Ir; + + function fo(e, t, n) { + for (var r = -1, i = (t = vi(t, e)).length, o = !1; ++r < i;) { + var s = Co(t[r]); + if (!(o = null != e && n(e, s))) break; + e = e[s] + } + return o || ++r != i ? o : !!(i = null == e ? 0 : e.length) && Ys(i) && vo(s, i) && (Fs(e) || qs(e)) + } + + function go(e) { + return "function" != typeof e.constructor || bo(e) ? {} : Nn(We(e)) + } + + function po(e) { + return Fs(e) || qs(e) || !!(He && e && e[He]) + } + + function vo(e, t) { + var n = typeof e; + return !!(t = null == t ? h : t) && ("number" == n || "symbol" != n && ye.test(e)) && e > -1 && e % 1 == 0 && e < t + } + + function yo(e, t, n) { + if (!Ks(n)) return !1; + var r = typeof t; + return !!("number" == r ? $s(n) && vo(t, n.length) : "string" == r && t in n) && Ns(n[t], e) + } + + function _o(e, t) { + if (Fs(e)) return !1; + var n = typeof e; + return !("number" != n && "symbol" != n && "boolean" != n && null != e && !aa(e)) || K.test(e) || !Y.test(e) || null != t && e in Ee(t) + } + + function mo(e) { + var t = ro(e), + n = jn[t]; + if ("function" != typeof n || !(t in qn.prototype)) return !1; + if (e === n) return !0; + var r = no(n); + return !!r && e === r[0] + }(kn && ho(new kn(new ArrayBuffer(1))) != O || In && ho(new In) != k || En && ho(En.resolve()) != S || Sn && ho(new Sn) != M || An && ho(new An) != D) && (ho = function(e) { + var t = Ir(e), + n = t == E ? e.constructor : i, + r = n ? Uo(n) : ""; + if (r) switch (r) { + case Dn: + return O; + case Pn: + return k; + case On: + return S; + case xn: + return M; + case Ln: + return D + } + return t + }); + var wo = Pe ? Xs : pu; + + function bo(e) { + var t = e && e.constructor; + return e === ("function" == typeof t && t.prototype || De) + } + + function ko(e) { + return e == e && !Ks(e) + } + + function Io(e, t) { + return function(n) { + return null != n && n[e] === t && (t !== i || e in Ee(n)) + } + } + + function Eo(e, t, n) { + return t = vn(t === i ? e.length - 1 : t, 0), + function() { + for (var i = arguments, o = -1, s = vn(i.length - t, 0), a = r(s); ++o < s;) a[o] = i[t + o]; + o = -1; + for (var u = r(t + 1); ++o < t;) u[o] = i[o]; + return u[t] = n(a), It(e, this, u) + } + } + + function So(e, t) { + return t.length < 2 ? e : br(e, ei(t, 0, -1)) + } + + function Ao(e, t) { + if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) return e[t] + } + var Mo = Po(Zr), + To = ct || function(e, t) { + return ht.setTimeout(e, t) + }, + Ro = Po(Yr); + + function Do(e, t, n) { + var r = t + ""; + return Ro(e, function(e, t) { + var n = t.length; + if (!n) return e; + var r = n - 1; + return t[r] = (n > 1 ? "& " : "") + t[r], t = t.join(n > 2 ? ", " : " "), e.replace(oe, "{\n/* [wrapped with " + t + "] */\n") + }(r, function(e, t) { + return St(g, function(n) { + var r = "_." + n[0]; + t & n[1] && !Rt(e, r) && e.push(r) + }), e.sort() + }(function(e) { + var t = e.match(se); + return t ? t[1].split(ae) : [] + }(r), n))) + } + + function Po(e) { + var t = 0, + n = 0; + return function() { + var r = _n(), + o = 16 - (r - n); + if (n = r, o > 0) { + if (++t >= 800) return arguments[0] + } else t = 0; + return e.apply(i, arguments) + } + } + + function Oo(e, t) { + var n = -1, + r = e.length, + o = r - 1; + for (t = t === i ? r : t; ++n < t;) { + var s = $r(n, o), + a = e[s]; + e[s] = e[n], e[n] = a + } + return e.length = t, e + } + var xo, Lo, Bo = (xo = xs(function(e) { + var t = []; + return 46 === e.charCodeAt(0) && t.push(""), e.replace(ee, function(e, n, r, i) { + t.push(r ? i.replace(ce, "$1") : n || e) + }), t + }, function(e) { + return 500 === Lo.size && Lo.clear(), e + }), Lo = xo.cache, xo); + + function Co(e) { + if ("string" == typeof e || aa(e)) return e; + var t = e + ""; + return "0" == t && 1 / e == -1 / 0 ? "-0" : t + } + + function Uo(e) { + if (null != e) { + try { + return Oe.call(e) + } catch (e) {} + try { + return e + "" + } catch (e) {} + } + return "" + } + + function jo(e) { + if (e instanceof qn) return e.clone(); + var t = new zn(e.__wrapped__, e.__chain__); + return t.__actions__ = Ai(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t + } + var No = Jr(function(e, t) { + return Vs(e) ? lr(e, pr(t, 1, Vs, !0)) : [] + }), + Go = Jr(function(e, t) { + var n = Qo(t); + return Vs(n) && (n = i), Vs(e) ? lr(e, pr(t, 1, Vs, !0), oo(n, 2)) : [] + }), + zo = Jr(function(e, t) { + var n = Qo(t); + return Vs(n) && (n = i), Vs(e) ? lr(e, pr(t, 1, Vs, !0), i, n) : [] + }); + + function qo(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : fa(n); + return i < 0 && (i = vn(r + i, 0)), jt(e, oo(t, 3), i) + } + + function Fo(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var o = r - 1; + return n !== i && (o = fa(n), o = n < 0 ? vn(r + o, 0) : yn(o, r - 1)), jt(e, oo(t, 3), o, !0) + } + + function Wo(e) { + return null != e && e.length ? pr(e, 1) : [] + } + + function $o(e) { + return e && e.length ? e[0] : i + } + var Vo = Jr(function(e) { + var t = Pt(e, gi); + return t.length && t[0] === e[0] ? Mr(t) : [] + }), + Jo = Jr(function(e) { + var t = Qo(e), + n = Pt(e, gi); + return t === Qo(n) ? t = i : n.pop(), n.length && n[0] === e[0] ? Mr(n, oo(t, 2)) : [] + }), + Ho = Jr(function(e) { + var t = Qo(e), + n = Pt(e, gi); + return (t = "function" == typeof t ? t : i) && n.pop(), n.length && n[0] === e[0] ? Mr(n, i, t) : [] + }); + + function Qo(e) { + var t = null == e ? 0 : e.length; + return t ? e[t - 1] : i + } + var Xo = Jr(Zo); + + function Zo(e, t) { + return e && e.length && t && t.length ? Fr(e, t) : e + } + var Yo = Ki(function(e, t) { + var n = null == e ? 0 : e.length, + r = ir(e, t); + return Wr(e, Pt(t, function(e) { + return vo(e, n) ? +e : e + }).sort(Ii)), r + }); + + function Ko(e) { + return null == e ? e : bn.call(e) + } + var es = Jr(function(e) { + return ai(pr(e, 1, Vs, !0)) + }), + ts = Jr(function(e) { + var t = Qo(e); + return Vs(t) && (t = i), ai(pr(e, 1, Vs, !0), oo(t, 2)) + }), + ns = Jr(function(e) { + var t = Qo(e); + return t = "function" == typeof t ? t : i, ai(pr(e, 1, Vs, !0), i, t) + }); + + function rs(e) { + if (!e || !e.length) return []; + var t = 0; + return e = Tt(e, function(e) { + if (Vs(e)) return t = vn(e.length, t), !0 + }), Jt(t, function(t) { + return Pt(e, Ft(t)) + }) + } + + function is(e, t) { + if (!e || !e.length) return []; + var n = rs(e); + return null == t ? n : Pt(n, function(e) { + return It(t, i, e) + }) + } + var os = Jr(function(e, t) { + return Vs(e) ? lr(e, t) : [] + }), + ss = Jr(function(e) { + return di(Tt(e, Vs)) + }), + as = Jr(function(e) { + var t = Qo(e); + return Vs(t) && (t = i), di(Tt(e, Vs), oo(t, 2)) + }), + us = Jr(function(e) { + var t = Qo(e); + return t = "function" == typeof t ? t : i, di(Tt(e, Vs), i, t) + }), + ls = Jr(rs), + cs = Jr(function(e) { + var t = e.length, + n = t > 1 ? e[t - 1] : i; + return n = "function" == typeof n ? (e.pop(), n) : i, is(e, n) + }); + + function hs(e) { + var t = jn(e); + return t.__chain__ = !0, t + } + + function ds(e, t) { + return t(e) + } + var fs = Ki(function(e) { + var t = e.length, + n = t ? e[0] : 0, + r = this.__wrapped__, + o = function(t) { + return ir(t, e) + }; + return !(t > 1 || this.__actions__.length) && r instanceof qn && vo(n) ? ((r = r.slice(n, +n + (t ? 1 : 0))).__actions__.push({ + func: ds, + args: [o], + thisArg: i + }), new zn(r, this.__chain__).thru(function(e) { + return t && !e.length && e.push(i), e + })) : this.thru(o) + }), + gs = Ti(function(e, t, n) { + xe.call(e, n) ? ++e[n] : rr(e, n, 1) + }), + ps = Bi(qo), + vs = Bi(Fo); + + function ys(e, t) { + return (Fs(e) ? St : cr)(e, oo(t, 3)) + } + + function _s(e, t) { + return (Fs(e) ? At : hr)(e, oo(t, 3)) + } + var ms = Ti(function(e, t, n) { + xe.call(e, n) ? e[n].push(t) : rr(e, n, [t]) + }), + ws = Jr(function(e, t, n) { + var i = -1, + o = "function" == typeof t, + s = $s(e) ? r(e.length) : []; + return cr(e, function(e) { + s[++i] = o ? It(t, e, n) : Tr(e, t, n) + }), s + }), + bs = Ti(function(e, t, n) { + rr(e, n, t) + }); + + function ks(e, t) { + return (Fs(e) ? Pt : Cr)(e, oo(t, 3)) + } + var Is = Ti(function(e, t, n) { + e[n ? 0 : 1].push(t) + }, function() { + return [ + [], + [] + ] + }), + Es = Jr(function(e, t) { + if (null == e) return []; + var n = t.length; + return n > 1 && yo(e, t[0], t[1]) ? t = [] : n > 2 && yo(t[0], t[1], t[2]) && (t = [t[0]]), zr(e, pr(t, 1), []) + }), + Ss = lt || function() { + return ht.Date.now() + }; + + function As(e, t, n) { + return t = n ? i : t, t = e && null == t ? e.length : t, Hi(e, l, i, i, i, i, t) + } + + function Ms(e, t) { + var n; + if ("function" != typeof t) throw new Me(o); + return e = fa(e), + function() { + return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = i), n + } + } + var Ts = Jr(function(e, t, n) { + var r = 1; + if (n.length) { + var i = an(n, io(Ts)); + r |= u + } + return Hi(e, r, t, n, i) + }), + Rs = Jr(function(e, t, n) { + var r = 3; + if (n.length) { + var i = an(n, io(Rs)); + r |= u + } + return Hi(t, r, e, n, i) + }); + + function Ds(e, t, n) { + var r, s, a, u, l, c, h = 0, + d = !1, + f = !1, + g = !0; + if ("function" != typeof e) throw new Me(o); + + function p(t) { + var n = r, + o = s; + return r = s = i, h = t, u = e.apply(o, n) + } + + function v(e) { + var n = e - c; + return c === i || n >= t || n < 0 || f && e - h >= a + } + + function y() { + var e = Ss(); + if (v(e)) return _(e); + l = To(y, function(e) { + var n = t - (e - c); + return f ? yn(n, a - (e - h)) : n + }(e)) + } + + function _(e) { + return l = i, g && r ? p(e) : (r = s = i, u) + } + + function m() { + var e = Ss(), + n = v(e); + if (r = arguments, s = this, c = e, n) { + if (l === i) return function(e) { + return h = e, l = To(y, t), d ? p(e) : u + }(c); + if (f) return mi(l), l = To(y, t), p(c) + } + return l === i && (l = To(y, t)), u + } + return t = pa(t) || 0, Ks(n) && (d = !!n.leading, a = (f = "maxWait" in n) ? vn(pa(n.maxWait) || 0, t) : a, g = "trailing" in n ? !!n.trailing : g), m.cancel = function() { + l !== i && mi(l), h = 0, r = c = s = l = i + }, m.flush = function() { + return l === i ? u : _(Ss()) + }, m + } + var Ps = Jr(function(e, t) { + return ur(e, 1, t) + }), + Os = Jr(function(e, t, n) { + return ur(e, pa(t) || 0, n) + }); + + function xs(e, t) { + if ("function" != typeof e || null != t && "function" != typeof t) throw new Me(o); + var n = function() { + var r = arguments, + i = t ? t.apply(this, r) : r[0], + o = n.cache; + if (o.has(i)) return o.get(i); + var s = e.apply(this, r); + return n.cache = o.set(i, s) || o, s + }; + return n.cache = new(xs.Cache || $n), n + } + + function Ls(e) { + if ("function" != typeof e) throw new Me(o); + return function() { + var t = arguments; + switch (t.length) { + case 0: + return !e.call(this); + case 1: + return !e.call(this, t[0]); + case 2: + return !e.call(this, t[0], t[1]); + case 3: + return !e.call(this, t[0], t[1], t[2]) + } + return !e.apply(this, t) + } + } + xs.Cache = $n; + var Bs = yi(function(e, t) { + var n = (t = 1 == t.length && Fs(t[0]) ? Pt(t[0], Qt(oo())) : Pt(pr(t, 1), Qt(oo()))).length; + return Jr(function(r) { + for (var i = -1, o = yn(r.length, n); ++i < o;) r[i] = t[i].call(this, r[i]); + return It(e, this, r) + }) + }), + Cs = Jr(function(e, t) { + var n = an(t, io(Cs)); + return Hi(e, u, i, t, n) + }), + Us = Jr(function(e, t) { + var n = an(t, io(Us)); + return Hi(e, 64, i, t, n) + }), + js = Ki(function(e, t) { + return Hi(e, 256, i, i, i, t) + }); + + function Ns(e, t) { + return e === t || e != e && t != t + } + var Gs = Fi(Er), + zs = Fi(function(e, t) { + return e >= t + }), + qs = Rr(function() { + return arguments + }()) ? Rr : function(e) { + return ea(e) && xe.call(e, "callee") && !Ve.call(e, "callee") + }, + Fs = r.isArray, + Ws = yt ? Qt(yt) : function(e) { + return ea(e) && Ir(e) == P + }; + + function $s(e) { + return null != e && Ys(e.length) && !Xs(e) + } + + function Vs(e) { + return ea(e) && $s(e) + } + var Js = vt || pu, + Hs = _t ? Qt(_t) : function(e) { + return ea(e) && Ir(e) == _ + }; + + function Qs(e) { + if (!ea(e)) return !1; + var t = Ir(e); + return t == m || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !ra(e) + } + + function Xs(e) { + if (!Ks(e)) return !1; + var t = Ir(e); + return t == w || t == b || "[object AsyncFunction]" == t || "[object Proxy]" == t + } + + function Zs(e) { + return "number" == typeof e && e == fa(e) + } + + function Ys(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && e <= h + } + + function Ks(e) { + var t = typeof e; + return null != e && ("object" == t || "function" == t) + } + + function ea(e) { + return null != e && "object" == typeof e + } + var ta = mt ? Qt(mt) : function(e) { + return ea(e) && ho(e) == k + }; + + function na(e) { + return "number" == typeof e || ea(e) && Ir(e) == I + } + + function ra(e) { + if (!ea(e) || Ir(e) != E) return !1; + var t = We(e); + if (null === t) return !0; + var n = xe.call(t, "constructor") && t.constructor; + return "function" == typeof n && n instanceof n && Oe.call(n) == Ue + } + var ia = wt ? Qt(wt) : function(e) { + return ea(e) && Ir(e) == A + }, + oa = bt ? Qt(bt) : function(e) { + return ea(e) && ho(e) == M + }; + + function sa(e) { + return "string" == typeof e || !Fs(e) && ea(e) && Ir(e) == T + } + + function aa(e) { + return "symbol" == typeof e || ea(e) && Ir(e) == R + } + var ua = kt ? Qt(kt) : function(e) { + return ea(e) && Ys(e.length) && !!it[Ir(e)] + }, + la = Fi(Br), + ca = Fi(function(e, t) { + return e <= t + }); + + function ha(e) { + if (!e) return []; + if ($s(e)) return sa(e) ? hn(e) : Ai(e); + if (Qe && e[Qe]) return function(e) { + for (var t, n = []; !(t = e.next()).done;) n.push(t.value); + return n + }(e[Qe]()); + var t = ho(e); + return (t == k ? on : t == M ? un : Na)(e) + } + + function da(e) { + return e ? (e = pa(e)) === c || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0 + } + + function fa(e) { + var t = da(e), + n = t % 1; + return t == t ? n ? t - n : t : 0 + } + + function ga(e) { + return e ? or(fa(e), 0, f) : 0 + } + + function pa(e) { + if ("number" == typeof e) return e; + if (aa(e)) return d; + if (Ks(e)) { + var t = "function" == typeof e.valueOf ? e.valueOf() : e; + e = Ks(t) ? t + "" : t + } + if ("string" != typeof e) return 0 === e ? e : +e; + e = Ht(e); + var n = ge.test(e); + return n || ve.test(e) ? ut(e.slice(2), n ? 2 : 8) : fe.test(e) ? d : +e + } + + function va(e) { + return Mi(e, Pa(e)) + } + + function ya(e) { + return null == e ? "" : si(e) + } + var _a = Ri(function(e, t) { + if (bo(t) || $s(t)) Mi(t, Da(t), e); + else + for (var n in t) xe.call(t, n) && Kn(e, n, t[n]) + }), + ma = Ri(function(e, t) { + Mi(t, Pa(t), e) + }), + wa = Ri(function(e, t, n, r) { + Mi(t, Pa(t), e, r) + }), + ba = Ri(function(e, t, n, r) { + Mi(t, Da(t), e, r) + }), + ka = Ki(ir), + Ia = Jr(function(e, t) { + e = Ee(e); + var n = -1, + r = t.length, + o = r > 2 ? t[2] : i; + for (o && yo(t[0], t[1], o) && (r = 1); ++n < r;) + for (var s = t[n], a = Pa(s), u = -1, l = a.length; ++u < l;) { + var c = a[u], + h = e[c]; + (h === i || Ns(h, De[c]) && !xe.call(e, c)) && (e[c] = s[c]) + } + return e + }), + Ea = Jr(function(e) { + return e.push(i, Xi), It(xa, i, e) + }); + + function Sa(e, t, n) { + var r = null == e ? i : br(e, t); + return r === i ? n : r + } + + function Aa(e, t) { + return null != e && fo(e, t, Ar) + } + var Ma = ji(function(e, t, n) { + null != t && "function" != typeof t.toString && (t = Ce.call(t)), e[t] = n + }, Ka(nu)), + Ta = ji(function(e, t, n) { + null != t && "function" != typeof t.toString && (t = Ce.call(t)), xe.call(e, t) ? e[t].push(n) : e[t] = [n] + }, oo), + Ra = Jr(Tr); + + function Da(e) { + return $s(e) ? Hn(e) : Lr(e) + } + + function Pa(e) { + return $s(e) ? Hn(e, !0) : function(e) { + if (!Ks(e)) return function(e) { + var t = []; + if (null != e) + for (var n in Ee(e)) t.push(n); + return t + }(e); + var t = bo(e), + n = []; + for (var r in e)("constructor" != r || !t && xe.call(e, r)) && n.push(r); + return n + }(e) + } + var Oa = Ri(function(e, t, n) { + Nr(e, t, n) + }), + xa = Ri(function(e, t, n, r) { + Nr(e, t, n, r) + }), + La = Ki(function(e, t) { + var n = {}; + if (null == e) return n; + var r = !1; + t = Pt(t, function(t) { + return t = vi(t, e), r || (r = t.length > 1), t + }), Mi(e, to(e), n), r && (n = sr(n, 7, Zi)); + for (var i = t.length; i--;) ui(n, t[i]); + return n + }), + Ba = Ki(function(e, t) { + return null == e ? {} : function(e, t) { + return qr(e, t, function(t, n) { + return Aa(e, n) + }) + }(e, t) + }); + + function Ca(e, t) { + if (null == e) return {}; + var n = Pt(to(e), function(e) { + return [e] + }); + return t = oo(t), qr(e, n, function(e, n) { + return t(e, n[0]) + }) + } + var Ua = Ji(Da), + ja = Ji(Pa); + + function Na(e) { + return null == e ? [] : Xt(e, Da(e)) + } + var Ga = xi(function(e, t, n) { + return t = t.toLowerCase(), e + (n ? za(t) : t) + }); + + function za(e) { + return Qa(ya(e).toLowerCase()) + } + + function qa(e) { + return (e = ya(e)) && e.replace(_e, en).replace(Ze, "") + } + var Fa = xi(function(e, t, n) { + return e + (n ? "-" : "") + t.toLowerCase() + }), + Wa = xi(function(e, t, n) { + return e + (n ? " " : "") + t.toLowerCase() + }), + $a = Oi("toLowerCase"), + Va = xi(function(e, t, n) { + return e + (n ? "_" : "") + t.toLowerCase() + }), + Ja = xi(function(e, t, n) { + return e + (n ? " " : "") + Qa(t) + }), + Ha = xi(function(e, t, n) { + return e + (n ? " " : "") + t.toUpperCase() + }), + Qa = Oi("toUpperCase"); + + function Xa(e, t, n) { + return e = ya(e), (t = n ? i : t) === i ? function(e) { + return tt.test(e) + }(e) ? function(e) { + return e.match(Ke) || [] + }(e) : function(e) { + return e.match(ue) || [] + }(e) : e.match(t) || [] + } + var Za = Jr(function(e, t) { + try { + return It(e, i, t) + } catch (e) { + return Qs(e) ? e : new be(e) + } + }), + Ya = Ki(function(e, t) { + return St(t, function(t) { + t = Co(t), rr(e, t, Ts(e[t], e)) + }), e + }); + + function Ka(e) { + return function() { + return e + } + } + var eu = Ci(), + tu = Ci(!0); + + function nu(e) { + return e + } + + function ru(e) { + return xr("function" == typeof e ? e : sr(e, 1)) + } + var iu = Jr(function(e, t) { + return function(n) { + return Tr(n, e, t) + } + }), + ou = Jr(function(e, t) { + return function(n) { + return Tr(e, n, t) + } + }); + + function su(e, t, n) { + var r = Da(t), + i = wr(t, r); + null != n || Ks(t) && (i.length || !r.length) || (n = t, t = e, e = this, i = wr(t, Da(t))); + var o = !(Ks(n) && "chain" in n && !n.chain), + s = Xs(e); + return St(i, function(n) { + var r = t[n]; + e[n] = r, s && (e.prototype[n] = function() { + var t = this.__chain__; + if (o || t) { + var n = e(this.__wrapped__); + return (n.__actions__ = Ai(this.__actions__)).push({ + func: r, + args: arguments, + thisArg: e + }), n.__chain__ = t, n + } + return r.apply(e, Ot([this.value()], arguments)) + }) + }), e + } + + function au() {} + var uu = Gi(Pt), + lu = Gi(Mt), + cu = Gi(Bt); + + function hu(e) { + return _o(e) ? Ft(Co(e)) : function(e) { + return function(t) { + return br(t, e) + } + }(e) + } + var du = qi(), + fu = qi(!0); + + function gu() { + return [] + } + + function pu() { + return !1 + } + var vu, yu = Ni(function(e, t) { + return e + t + }, 0), + _u = $i("ceil"), + mu = Ni(function(e, t) { + return e / t + }, 1), + wu = $i("floor"), + bu = Ni(function(e, t) { + return e * t + }, 1), + ku = $i("round"), + Iu = Ni(function(e, t) { + return e - t + }, 0); + return jn.after = function(e, t) { + if ("function" != typeof t) throw new Me(o); + return e = fa(e), + function() { + if (--e < 1) return t.apply(this, arguments) + } + }, jn.ary = As, jn.assign = _a, jn.assignIn = ma, jn.assignInWith = wa, jn.assignWith = ba, jn.at = ka, jn.before = Ms, jn.bind = Ts, jn.bindAll = Ya, jn.bindKey = Rs, jn.castArray = function() { + if (!arguments.length) return []; + var e = arguments[0]; + return Fs(e) ? e : [e] + }, jn.chain = hs, jn.chunk = function(e, t, n) { + t = (n ? yo(e, t, n) : t === i) ? 1 : vn(fa(t), 0); + var o = null == e ? 0 : e.length; + if (!o || t < 1) return []; + for (var s = 0, a = 0, u = r(dt(o / t)); s < o;) u[a++] = ei(e, s, s += t); + return u + }, jn.compact = function(e) { + for (var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; ++t < n;) { + var o = e[t]; + o && (i[r++] = o) + } + return i + }, jn.concat = function() { + var e = arguments.length; + if (!e) return []; + for (var t = r(e - 1), n = arguments[0], i = e; i--;) t[i - 1] = arguments[i]; + return Ot(Fs(n) ? Ai(n) : [n], pr(t, 1)) + }, jn.cond = function(e) { + var t = null == e ? 0 : e.length, + n = oo(); + return e = t ? Pt(e, function(e) { + if ("function" != typeof e[1]) throw new Me(o); + return [n(e[0]), e[1]] + }) : [], Jr(function(n) { + for (var r = -1; ++r < t;) { + var i = e[r]; + if (It(i[0], this, n)) return It(i[1], this, n) + } + }) + }, jn.conforms = function(e) { + return function(e) { + var t = Da(e); + return function(n) { + return ar(n, e, t) + } + }(sr(e, 1)) + }, jn.constant = Ka, jn.countBy = gs, jn.create = function(e, t) { + var n = Nn(e); + return null == t ? n : nr(n, t) + }, jn.curry = function e(t, n, r) { + var o = Hi(t, 8, i, i, i, i, i, n = r ? i : n); + return o.placeholder = e.placeholder, o + }, jn.curryRight = function e(t, n, r) { + var o = Hi(t, 16, i, i, i, i, i, n = r ? i : n); + return o.placeholder = e.placeholder, o + }, jn.debounce = Ds, jn.defaults = Ia, jn.defaultsDeep = Ea, jn.defer = Ps, jn.delay = Os, jn.difference = No, jn.differenceBy = Go, jn.differenceWith = zo, jn.drop = function(e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ei(e, (t = n || t === i ? 1 : fa(t)) < 0 ? 0 : t, r) : [] + }, jn.dropRight = function(e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ei(e, 0, (t = r - (t = n || t === i ? 1 : fa(t))) < 0 ? 0 : t) : [] + }, jn.dropRightWhile = function(e, t) { + return e && e.length ? ci(e, oo(t, 3), !0, !0) : [] + }, jn.dropWhile = function(e, t) { + return e && e.length ? ci(e, oo(t, 3), !0) : [] + }, jn.fill = function(e, t, n, r) { + var o = null == e ? 0 : e.length; + return o ? (n && "number" != typeof n && yo(e, t, n) && (n = 0, r = o), function(e, t, n, r) { + var o = e.length; + for ((n = fa(n)) < 0 && (n = -n > o ? 0 : o + n), (r = r === i || r > o ? o : fa(r)) < 0 && (r += o), r = n > r ? 0 : ga(r); n < r;) e[n++] = t; + return e + }(e, t, n, r)) : [] + }, jn.filter = function(e, t) { + return (Fs(e) ? Tt : gr)(e, oo(t, 3)) + }, jn.flatMap = function(e, t) { + return pr(ks(e, t), 1) + }, jn.flatMapDeep = function(e, t) { + return pr(ks(e, t), c) + }, jn.flatMapDepth = function(e, t, n) { + return n = n === i ? 1 : fa(n), pr(ks(e, t), n) + }, jn.flatten = Wo, jn.flattenDeep = function(e) { + return null != e && e.length ? pr(e, c) : [] + }, jn.flattenDepth = function(e, t) { + return null != e && e.length ? pr(e, t = t === i ? 1 : fa(t)) : [] + }, jn.flip = function(e) { + return Hi(e, 512) + }, jn.flow = eu, jn.flowRight = tu, jn.fromPairs = function(e) { + for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n;) { + var i = e[t]; + r[i[0]] = i[1] + } + return r + }, jn.functions = function(e) { + return null == e ? [] : wr(e, Da(e)) + }, jn.functionsIn = function(e) { + return null == e ? [] : wr(e, Pa(e)) + }, jn.groupBy = ms, jn.initial = function(e) { + return null != e && e.length ? ei(e, 0, -1) : [] + }, jn.intersection = Vo, jn.intersectionBy = Jo, jn.intersectionWith = Ho, jn.invert = Ma, jn.invertBy = Ta, jn.invokeMap = ws, jn.iteratee = ru, jn.keyBy = bs, jn.keys = Da, jn.keysIn = Pa, jn.map = ks, jn.mapKeys = function(e, t) { + var n = {}; + return t = oo(t, 3), _r(e, function(e, r, i) { + rr(n, t(e, r, i), e) + }), n + }, jn.mapValues = function(e, t) { + var n = {}; + return t = oo(t, 3), _r(e, function(e, r, i) { + rr(n, r, t(e, r, i)) + }), n + }, jn.matches = function(e) { + return Ur(sr(e, 1)) + }, jn.matchesProperty = function(e, t) { + return jr(e, sr(t, 1)) + }, jn.memoize = xs, jn.merge = Oa, jn.mergeWith = xa, jn.method = iu, jn.methodOf = ou, jn.mixin = su, jn.negate = Ls, jn.nthArg = function(e) { + return e = fa(e), Jr(function(t) { + return Gr(t, e) + }) + }, jn.omit = La, jn.omitBy = function(e, t) { + return Ca(e, Ls(oo(t))) + }, jn.once = function(e) { + return Ms(2, e) + }, jn.orderBy = function(e, t, n, r) { + return null == e ? [] : (Fs(t) || (t = null == t ? [] : [t]), Fs(n = r ? i : n) || (n = null == n ? [] : [n]), zr(e, t, n)) + }, jn.over = uu, jn.overArgs = Bs, jn.overEvery = lu, jn.overSome = cu, jn.partial = Cs, jn.partialRight = Us, jn.partition = Is, jn.pick = Ba, jn.pickBy = Ca, jn.property = hu, jn.propertyOf = function(e) { + return function(t) { + return null == e ? i : br(e, t) + } + }, jn.pull = Xo, jn.pullAll = Zo, jn.pullAllBy = function(e, t, n) { + return e && e.length && t && t.length ? Fr(e, t, oo(n, 2)) : e + }, jn.pullAllWith = function(e, t, n) { + return e && e.length && t && t.length ? Fr(e, t, i, n) : e + }, jn.pullAt = Yo, jn.range = du, jn.rangeRight = fu, jn.rearg = js, jn.reject = function(e, t) { + return (Fs(e) ? Tt : gr)(e, Ls(oo(t, 3))) + }, jn.remove = function(e, t) { + var n = []; + if (!e || !e.length) return n; + var r = -1, + i = [], + o = e.length; + for (t = oo(t, 3); ++r < o;) { + var s = e[r]; + t(s, r, e) && (n.push(s), i.push(r)) + } + return Wr(e, i), n + }, jn.rest = function(e, t) { + if ("function" != typeof e) throw new Me(o); + return Jr(e, t = t === i ? t : fa(t)) + }, jn.reverse = Ko, jn.sampleSize = function(e, t, n) { + return t = (n ? yo(e, t, n) : t === i) ? 1 : fa(t), (Fs(e) ? Xn : Qr)(e, t) + }, jn.set = function(e, t, n) { + return null == e ? e : Xr(e, t, n) + }, jn.setWith = function(e, t, n, r) { + return r = "function" == typeof r ? r : i, null == e ? e : Xr(e, t, n, r) + }, jn.shuffle = function(e) { + return (Fs(e) ? Zn : Kr)(e) + }, jn.slice = function(e, t, n) { + var r = null == e ? 0 : e.length; + return r ? (n && "number" != typeof n && yo(e, t, n) ? (t = 0, n = r) : (t = null == t ? 0 : fa(t), n = n === i ? r : fa(n)), ei(e, t, n)) : [] + }, jn.sortBy = Es, jn.sortedUniq = function(e) { + return e && e.length ? ii(e) : [] + }, jn.sortedUniqBy = function(e, t) { + return e && e.length ? ii(e, oo(t, 2)) : [] + }, jn.split = function(e, t, n) { + return n && "number" != typeof n && yo(e, t, n) && (t = n = i), (n = n === i ? f : n >>> 0) ? (e = ya(e)) && ("string" == typeof t || null != t && !ia(t)) && !(t = si(t)) && rn(e) ? _i(hn(e), 0, n) : e.split(t, n) : [] + }, jn.spread = function(e, t) { + if ("function" != typeof e) throw new Me(o); + return t = null == t ? 0 : vn(fa(t), 0), Jr(function(n) { + var r = n[t], + i = _i(n, 0, t); + return r && Ot(i, r), It(e, this, i) + }) + }, jn.tail = function(e) { + var t = null == e ? 0 : e.length; + return t ? ei(e, 1, t) : [] + }, jn.take = function(e, t, n) { + return e && e.length ? ei(e, 0, (t = n || t === i ? 1 : fa(t)) < 0 ? 0 : t) : [] + }, jn.takeRight = function(e, t, n) { + var r = null == e ? 0 : e.length; + return r ? ei(e, (t = r - (t = n || t === i ? 1 : fa(t))) < 0 ? 0 : t, r) : [] + }, jn.takeRightWhile = function(e, t) { + return e && e.length ? ci(e, oo(t, 3), !1, !0) : [] + }, jn.takeWhile = function(e, t) { + return e && e.length ? ci(e, oo(t, 3)) : [] + }, jn.tap = function(e, t) { + return t(e), e + }, jn.throttle = function(e, t, n) { + var r = !0, + i = !0; + if ("function" != typeof e) throw new Me(o); + return Ks(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), Ds(e, t, { + leading: r, + maxWait: t, + trailing: i + }) + }, jn.thru = ds, jn.toArray = ha, jn.toPairs = Ua, jn.toPairsIn = ja, jn.toPath = function(e) { + return Fs(e) ? Pt(e, Co) : aa(e) ? [e] : Ai(Bo(ya(e))) + }, jn.toPlainObject = va, jn.transform = function(e, t, n) { + var r = Fs(e), + i = r || Js(e) || ua(e); + if (t = oo(t, 4), null == n) { + var o = e && e.constructor; + n = i ? r ? new o : [] : Ks(e) && Xs(o) ? Nn(We(e)) : {} + } + return (i ? St : _r)(e, function(e, r, i) { + return t(n, e, r, i) + }), n + }, jn.unary = function(e) { + return As(e, 1) + }, jn.union = es, jn.unionBy = ts, jn.unionWith = ns, jn.uniq = function(e) { + return e && e.length ? ai(e) : [] + }, jn.uniqBy = function(e, t) { + return e && e.length ? ai(e, oo(t, 2)) : [] + }, jn.uniqWith = function(e, t) { + return t = "function" == typeof t ? t : i, e && e.length ? ai(e, i, t) : [] + }, jn.unset = function(e, t) { + return null == e || ui(e, t) + }, jn.unzip = rs, jn.unzipWith = is, jn.update = function(e, t, n) { + return null == e ? e : li(e, t, pi(n)) + }, jn.updateWith = function(e, t, n, r) { + return r = "function" == typeof r ? r : i, null == e ? e : li(e, t, pi(n), r) + }, jn.values = Na, jn.valuesIn = function(e) { + return null == e ? [] : Xt(e, Pa(e)) + }, jn.without = os, jn.words = Xa, jn.wrap = function(e, t) { + return Cs(pi(t), e) + }, jn.xor = ss, jn.xorBy = as, jn.xorWith = us, jn.zip = ls, jn.zipObject = function(e, t) { + return fi(e || [], t || [], Kn) + }, jn.zipObjectDeep = function(e, t) { + return fi(e || [], t || [], Xr) + }, jn.zipWith = cs, jn.entries = Ua, jn.entriesIn = ja, jn.extend = ma, jn.extendWith = wa, su(jn, jn), jn.add = yu, jn.attempt = Za, jn.camelCase = Ga, jn.capitalize = za, jn.ceil = _u, jn.clamp = function(e, t, n) { + return n === i && (n = t, t = i), n !== i && (n = (n = pa(n)) == n ? n : 0), t !== i && (t = (t = pa(t)) == t ? t : 0), or(pa(e), t, n) + }, jn.clone = function(e) { + return sr(e, 4) + }, jn.cloneDeep = function(e) { + return sr(e, 5) + }, jn.cloneDeepWith = function(e, t) { + return sr(e, 5, t = "function" == typeof t ? t : i) + }, jn.cloneWith = function(e, t) { + return sr(e, 4, t = "function" == typeof t ? t : i) + }, jn.conformsTo = function(e, t) { + return null == t || ar(e, t, Da(t)) + }, jn.deburr = qa, jn.defaultTo = function(e, t) { + return null == e || e != e ? t : e + }, jn.divide = mu, jn.endsWith = function(e, t, n) { + e = ya(e), t = si(t); + var r = e.length, + o = n = n === i ? r : or(fa(n), 0, r); + return (n -= t.length) >= 0 && e.slice(n, o) == t + }, jn.eq = Ns, jn.escape = function(e) { + return (e = ya(e)) && H.test(e) ? e.replace(V, tn) : e + }, jn.escapeRegExp = function(e) { + return (e = ya(e)) && ne.test(e) ? e.replace(te, "\\$&") : e + }, jn.every = function(e, t, n) { + var r = Fs(e) ? Mt : dr; + return n && yo(e, t, n) && (t = i), r(e, oo(t, 3)) + }, jn.find = ps, jn.findIndex = qo, jn.findKey = function(e, t) { + return Ut(e, oo(t, 3), _r) + }, jn.findLast = vs, jn.findLastIndex = Fo, jn.findLastKey = function(e, t) { + return Ut(e, oo(t, 3), mr) + }, jn.floor = wu, jn.forEach = ys, jn.forEachRight = _s, jn.forIn = function(e, t) { + return null == e ? e : vr(e, oo(t, 3), Pa) + }, jn.forInRight = function(e, t) { + return null == e ? e : yr(e, oo(t, 3), Pa) + }, jn.forOwn = function(e, t) { + return e && _r(e, oo(t, 3)) + }, jn.forOwnRight = function(e, t) { + return e && mr(e, oo(t, 3)) + }, jn.get = Sa, jn.gt = Gs, jn.gte = zs, jn.has = function(e, t) { + return null != e && fo(e, t, Sr) + }, jn.hasIn = Aa, jn.head = $o, jn.identity = nu, jn.includes = function(e, t, n, r) { + e = $s(e) ? e : Na(e), n = n && !r ? fa(n) : 0; + var i = e.length; + return n < 0 && (n = vn(i + n, 0)), sa(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && Nt(e, t, n) > -1 + }, jn.indexOf = function(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var i = null == n ? 0 : fa(n); + return i < 0 && (i = vn(r + i, 0)), Nt(e, t, i) + }, jn.inRange = function(e, t, n) { + return t = da(t), n === i ? (n = t, t = 0) : n = da(n), + function(e, t, n) { + return e >= yn(t, n) && e < vn(t, n) + }(e = pa(e), t, n) + }, jn.invoke = Ra, jn.isArguments = qs, jn.isArray = Fs, jn.isArrayBuffer = Ws, jn.isArrayLike = $s, jn.isArrayLikeObject = Vs, jn.isBoolean = function(e) { + return !0 === e || !1 === e || ea(e) && Ir(e) == y + }, jn.isBuffer = Js, jn.isDate = Hs, jn.isElement = function(e) { + return ea(e) && 1 === e.nodeType && !ra(e) + }, jn.isEmpty = function(e) { + if (null == e) return !0; + if ($s(e) && (Fs(e) || "string" == typeof e || "function" == typeof e.splice || Js(e) || ua(e) || qs(e))) return !e.length; + var t = ho(e); + if (t == k || t == M) return !e.size; + if (bo(e)) return !Lr(e).length; + for (var n in e) + if (xe.call(e, n)) return !1; + return !0 + }, jn.isEqual = function(e, t) { + return Dr(e, t) + }, jn.isEqualWith = function(e, t, n) { + var r = (n = "function" == typeof n ? n : i) ? n(e, t) : i; + return r === i ? Dr(e, t, i, n) : !!r + }, jn.isError = Qs, jn.isFinite = function(e) { + return "number" == typeof e && Ct(e) + }, jn.isFunction = Xs, jn.isInteger = Zs, jn.isLength = Ys, jn.isMap = ta, jn.isMatch = function(e, t) { + return e === t || Pr(e, t, ao(t)) + }, jn.isMatchWith = function(e, t, n) { + return n = "function" == typeof n ? n : i, Pr(e, t, ao(t), n) + }, jn.isNaN = function(e) { + return na(e) && e != +e + }, jn.isNative = function(e) { + if (wo(e)) throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill."); + return Or(e) + }, jn.isNil = function(e) { + return null == e + }, jn.isNull = function(e) { + return null === e + }, jn.isNumber = na, jn.isObject = Ks, jn.isObjectLike = ea, jn.isPlainObject = ra, jn.isRegExp = ia, jn.isSafeInteger = function(e) { + return Zs(e) && e >= -9007199254740991 && e <= h + }, jn.isSet = oa, jn.isString = sa, jn.isSymbol = aa, jn.isTypedArray = ua, jn.isUndefined = function(e) { + return e === i + }, jn.isWeakMap = function(e) { + return ea(e) && ho(e) == D + }, jn.isWeakSet = function(e) { + return ea(e) && "[object WeakSet]" == Ir(e) + }, jn.join = function(e, t) { + return null == e ? "" : Wt.call(e, t) + }, jn.kebabCase = Fa, jn.last = Qo, jn.lastIndexOf = function(e, t, n) { + var r = null == e ? 0 : e.length; + if (!r) return -1; + var o = r; + return n !== i && (o = (o = fa(n)) < 0 ? vn(r + o, 0) : yn(o, r - 1)), t == t ? function(e, t, n) { + for (var r = n + 1; r--;) + if (e[r] === t) return r; + return r + }(e, t, o) : jt(e, zt, o, !0) + }, jn.lowerCase = Wa, jn.lowerFirst = $a, jn.lt = la, jn.lte = ca, jn.max = function(e) { + return e && e.length ? fr(e, nu, Er) : i + }, jn.maxBy = function(e, t) { + return e && e.length ? fr(e, oo(t, 2), Er) : i + }, jn.mean = function(e) { + return qt(e, nu) + }, jn.meanBy = function(e, t) { + return qt(e, oo(t, 2)) + }, jn.min = function(e) { + return e && e.length ? fr(e, nu, Br) : i + }, jn.minBy = function(e, t) { + return e && e.length ? fr(e, oo(t, 2), Br) : i + }, jn.stubArray = gu, jn.stubFalse = pu, jn.stubObject = function() { + return {} + }, jn.stubString = function() { + return "" + }, jn.stubTrue = function() { + return !0 + }, jn.multiply = bu, jn.nth = function(e, t) { + return e && e.length ? Gr(e, fa(t)) : i + }, jn.noConflict = function() { + return ht._ === this && (ht._ = je), this + }, jn.noop = au, jn.now = Ss, jn.pad = function(e, t, n) { + e = ya(e); + var r = (t = fa(t)) ? cn(e) : 0; + if (!t || r >= t) return e; + var i = (t - r) / 2; + return zi(ft(i), n) + e + zi(dt(i), n) + }, jn.padEnd = function(e, t, n) { + e = ya(e); + var r = (t = fa(t)) ? cn(e) : 0; + return t && r < t ? e + zi(t - r, n) : e + }, jn.padStart = function(e, t, n) { + e = ya(e); + var r = (t = fa(t)) ? cn(e) : 0; + return t && r < t ? zi(t - r, n) + e : e + }, jn.parseInt = function(e, t, n) { + return n || null == t ? t = 0 : t && (t = +t), mn(ya(e).replace(re, ""), t || 0) + }, jn.random = function(e, t, n) { + if (n && "boolean" != typeof n && yo(e, t, n) && (t = n = i), n === i && ("boolean" == typeof t ? (n = t, t = i) : "boolean" == typeof e && (n = e, e = i)), e === i && t === i ? (e = 0, t = 1) : (e = da(e), t === i ? (t = e, e = 0) : t = da(t)), e > t) { + var r = e; + e = t, t = r + } + if (n || e % 1 || t % 1) { + var o = wn(); + return yn(e + o * (t - e + at("1e-" + ((o + "").length - 1))), t) + } + return $r(e, t) + }, jn.reduce = function(e, t, n) { + var r = Fs(e) ? xt : $t, + i = arguments.length < 3; + return r(e, oo(t, 4), n, i, cr) + }, jn.reduceRight = function(e, t, n) { + var r = Fs(e) ? Lt : $t, + i = arguments.length < 3; + return r(e, oo(t, 4), n, i, hr) + }, jn.repeat = function(e, t, n) { + return t = (n ? yo(e, t, n) : t === i) ? 1 : fa(t), Vr(ya(e), t) + }, jn.replace = function() { + var e = arguments, + t = ya(e[0]); + return e.length < 3 ? t : t.replace(e[1], e[2]) + }, jn.result = function(e, t, n) { + var r = -1, + o = (t = vi(t, e)).length; + for (o || (o = 1, e = i); ++r < o;) { + var s = null == e ? i : e[Co(t[r])]; + s === i && (r = o, s = n), e = Xs(s) ? s.call(e) : s + } + return e + }, jn.round = ku, jn.runInContext = e, jn.sample = function(e) { + return (Fs(e) ? Qn : Hr)(e) + }, jn.size = function(e) { + if (null == e) return 0; + if ($s(e)) return sa(e) ? cn(e) : e.length; + var t = ho(e); + return t == k || t == M ? e.size : Lr(e).length + }, jn.snakeCase = Va, jn.some = function(e, t, n) { + var r = Fs(e) ? Bt : ti; + return n && yo(e, t, n) && (t = i), r(e, oo(t, 3)) + }, jn.sortedIndex = function(e, t) { + return ni(e, t) + }, jn.sortedIndexBy = function(e, t, n) { + return ri(e, t, oo(n, 2)) + }, jn.sortedIndexOf = function(e, t) { + var n = null == e ? 0 : e.length; + if (n) { + var r = ni(e, t); + if (r < n && Ns(e[r], t)) return r + } + return -1 + }, jn.sortedLastIndex = function(e, t) { + return ni(e, t, !0) + }, jn.sortedLastIndexBy = function(e, t, n) { + return ri(e, t, oo(n, 2), !0) + }, jn.sortedLastIndexOf = function(e, t) { + if (null != e && e.length) { + var n = ni(e, t, !0) - 1; + if (Ns(e[n], t)) return n + } + return -1 + }, jn.startCase = Ja, jn.startsWith = function(e, t, n) { + return e = ya(e), n = null == n ? 0 : or(fa(n), 0, e.length), t = si(t), e.slice(n, n + t.length) == t + }, jn.subtract = Iu, jn.sum = function(e) { + return e && e.length ? Vt(e, nu) : 0 + }, jn.sumBy = function(e, t) { + return e && e.length ? Vt(e, oo(t, 2)) : 0 + }, jn.template = function(e, t, n) { + var r = jn.templateSettings; + n && yo(e, t, n) && (t = i), e = ya(e), t = wa({}, t, r, Qi); + var o, s, a = wa({}, t.imports, r.imports, Qi), + u = Da(a), + l = Xt(a, u), + c = 0, + h = t.interpolate || me, + d = "__p += '", + f = Se((t.escape || me).source + "|" + h.source + "|" + (h === Z ? he : me).source + "|" + (t.evaluate || me).source + "|$", "g"), + g = "//# sourceURL=" + (xe.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++rt + "]") + "\n"; + e.replace(f, function(t, n, r, i, a, u) { + return r || (r = i), d += e.slice(c, u).replace(we, nn), n && (o = !0, d += "' +\n__e(" + n + ") +\n'"), a && (s = !0, d += "';\n" + a + ";\n__p += '"), r && (d += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), c = u + t.length, t + }), d += "';\n"; + var p = xe.call(t, "variable") && t.variable; + if (p) { + if (le.test(p)) throw new be("Invalid `variable` option passed into `_.template`") + } else d = "with (obj) {\n" + d + "\n}\n"; + d = (s ? d.replace(q, "") : d).replace(F, "$1").replace(W, "$1;"), d = "function(" + (p || "obj") + ") {\n" + (p ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (o ? ", __e = _.escape" : "") + (s ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + d + "return __p\n}"; + var v = Za(function() { + return ke(u, g + "return " + d).apply(i, l) + }); + if (v.source = d, Qs(v)) throw v; + return v + }, jn.times = function(e, t) { + if ((e = fa(e)) < 1 || e > h) return []; + var n = f, + r = yn(e, f); + t = oo(t), e -= f; + for (var i = Jt(r, t); ++n < e;) t(n); + return i + }, jn.toFinite = da, jn.toInteger = fa, jn.toLength = ga, jn.toLower = function(e) { + return ya(e).toLowerCase() + }, jn.toNumber = pa, jn.toSafeInteger = function(e) { + return e ? or(fa(e), -9007199254740991, h) : 0 === e ? e : 0 + }, jn.toString = ya, jn.toUpper = function(e) { + return ya(e).toUpperCase() + }, jn.trim = function(e, t, n) { + if ((e = ya(e)) && (n || t === i)) return Ht(e); + if (!e || !(t = si(t))) return e; + var r = hn(e), + o = hn(t); + return _i(r, Yt(r, o), Kt(r, o) + 1).join("") + }, jn.trimEnd = function(e, t, n) { + if ((e = ya(e)) && (n || t === i)) return e.slice(0, dn(e) + 1); + if (!e || !(t = si(t))) return e; + var r = hn(e); + return _i(r, 0, Kt(r, hn(t)) + 1).join("") + }, jn.trimStart = function(e, t, n) { + if ((e = ya(e)) && (n || t === i)) return e.replace(re, ""); + if (!e || !(t = si(t))) return e; + var r = hn(e); + return _i(r, Yt(r, hn(t))).join("") + }, jn.truncate = function(e, t) { + var n = 30, + r = "..."; + if (Ks(t)) { + var o = "separator" in t ? t.separator : o; + n = "length" in t ? fa(t.length) : n, r = "omission" in t ? si(t.omission) : r + } + var s = (e = ya(e)).length; + if (rn(e)) { + var a = hn(e); + s = a.length + } + if (n >= s) return e; + var u = n - cn(r); + if (u < 1) return r; + var l = a ? _i(a, 0, u).join("") : e.slice(0, u); + if (o === i) return l + r; + if (a && (u += l.length - u), ia(o)) { + if (e.slice(u).search(o)) { + var c, h = l; + for (o.global || (o = Se(o.source, ya(de.exec(o)) + "g")), o.lastIndex = 0; c = o.exec(h);) var d = c.index; + l = l.slice(0, d === i ? u : d) + } + } else if (e.indexOf(si(o), u) != u) { + var f = l.lastIndexOf(o); + f > -1 && (l = l.slice(0, f)) + } + return l + r + }, jn.unescape = function(e) { + return (e = ya(e)) && J.test(e) ? e.replace($, fn) : e + }, jn.uniqueId = function(e) { + var t = ++Le; + return ya(e) + t + }, jn.upperCase = Ha, jn.upperFirst = Qa, jn.each = ys, jn.eachRight = _s, jn.first = $o, su(jn, (vu = {}, _r(jn, function(e, t) { + xe.call(jn.prototype, t) || (vu[t] = e) + }), vu), { + chain: !1 + }), jn.VERSION = "4.17.21", St(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) { + jn[e].placeholder = jn + }), St(["drop", "take"], function(e, t) { + qn.prototype[e] = function(n) { + n = n === i ? 1 : vn(fa(n), 0); + var r = this.__filtered__ && !t ? new qn(this) : this.clone(); + return r.__filtered__ ? r.__takeCount__ = yn(n, r.__takeCount__) : r.__views__.push({ + size: yn(n, f), + type: e + (r.__dir__ < 0 ? "Right" : "") + }), r + }, qn.prototype[e + "Right"] = function(t) { + return this.reverse()[e](t).reverse() + } + }), St(["filter", "map", "takeWhile"], function(e, t) { + var n = t + 1, + r = 1 == n || 3 == n; + qn.prototype[e] = function(e) { + var t = this.clone(); + return t.__iteratees__.push({ + iteratee: oo(e, 3), + type: n + }), t.__filtered__ = t.__filtered__ || r, t + } + }), St(["head", "last"], function(e, t) { + var n = "take" + (t ? "Right" : ""); + qn.prototype[e] = function() { + return this[n](1).value()[0] + } + }), St(["initial", "tail"], function(e, t) { + var n = "drop" + (t ? "" : "Right"); + qn.prototype[e] = function() { + return this.__filtered__ ? new qn(this) : this[n](1) + } + }), qn.prototype.compact = function() { + return this.filter(nu) + }, qn.prototype.find = function(e) { + return this.filter(e).head() + }, qn.prototype.findLast = function(e) { + return this.reverse().find(e) + }, qn.prototype.invokeMap = Jr(function(e, t) { + return "function" == typeof e ? new qn(this) : this.map(function(n) { + return Tr(n, e, t) + }) + }), qn.prototype.reject = function(e) { + return this.filter(Ls(oo(e))) + }, qn.prototype.slice = function(e, t) { + e = fa(e); + var n = this; + return n.__filtered__ && (e > 0 || t < 0) ? new qn(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== i && (n = (t = fa(t)) < 0 ? n.dropRight(-t) : n.take(t - e)), n) + }, qn.prototype.takeRightWhile = function(e) { + return this.reverse().takeWhile(e).reverse() + }, qn.prototype.toArray = function() { + return this.take(f) + }, _r(qn.prototype, function(e, t) { + var n = /^(?:filter|find|map|reject)|While$/.test(t), + r = /^(?:head|last)$/.test(t), + o = jn[r ? "take" + ("last" == t ? "Right" : "") : t], + s = r || /^find/.test(t); + o && (jn.prototype[t] = function() { + var t = this.__wrapped__, + a = r ? [1] : arguments, + u = t instanceof qn, + l = a[0], + c = u || Fs(t), + h = function(e) { + var t = o.apply(jn, Ot([e], a)); + return r && d ? t[0] : t + }; + c && n && "function" == typeof l && 1 != l.length && (u = c = !1); + var d = this.__chain__, + f = !!this.__actions__.length, + g = s && !d, + p = u && !f; + if (!s && c) { + t = p ? t : new qn(this); + var v = e.apply(t, a); + return v.__actions__.push({ + func: ds, + args: [h], + thisArg: i + }), new zn(v, d) + } + return g && p ? e.apply(this, a) : (v = this.thru(h), g ? r ? v.value()[0] : v.value() : v) + }) + }), St(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) { + var t = Te[e], + n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", + r = /^(?:pop|shift)$/.test(e); + jn.prototype[e] = function() { + var e = arguments; + if (r && !this.__chain__) { + var i = this.value(); + return t.apply(Fs(i) ? i : [], e) + } + return this[n](function(n) { + return t.apply(Fs(n) ? n : [], e) + }) + } + }), _r(qn.prototype, function(e, t) { + var n = jn[t]; + if (n) { + var r = n.name + ""; + xe.call(Rn, r) || (Rn[r] = []), Rn[r].push({ + name: t, + func: n + }) + } + }), Rn[Ui(i, 2).name] = [{ + name: "wrapper", + func: i + }], qn.prototype.clone = function() { + var e = new qn(this.__wrapped__); + return e.__actions__ = Ai(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Ai(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Ai(this.__views__), e + }, qn.prototype.reverse = function() { + if (this.__filtered__) { + var e = new qn(this); + e.__dir__ = -1, e.__filtered__ = !0 + } else(e = this.clone()).__dir__ *= -1; + return e + }, qn.prototype.value = function() { + var e = this.__wrapped__.value(), + t = this.__dir__, + n = Fs(e), + r = t < 0, + i = n ? e.length : 0, + o = function(e, t, n) { + for (var r = -1, i = n.length; ++r < i;) { + var o = n[r], + s = o.size; + switch (o.type) { + case "drop": + e += s; + break; + case "dropRight": + t -= s; + break; + case "take": + t = yn(t, e + s); + break; + case "takeRight": + e = vn(e, t - s) + } + } + return { + start: e, + end: t + } + }(0, i, this.__views__), + s = o.start, + a = o.end, + u = a - s, + l = r ? a : s - 1, + c = this.__iteratees__, + h = c.length, + d = 0, + f = yn(u, this.__takeCount__); + if (!n || !r && i == u && f == u) return hi(e, this.__actions__); + var g = []; + e: for (; u-- && d < f;) { + for (var p = -1, v = e[l += t]; ++p < h;) { + var y = c[p], + _ = y.iteratee, + m = y.type, + w = _(v); + if (2 == m) v = w; + else if (!w) { + if (1 == m) continue e; + break e + } + } + g[d++] = v + } + return g + }, jn.prototype.at = fs, jn.prototype.chain = function() { + return hs(this) + }, jn.prototype.commit = function() { + return new zn(this.value(), this.__chain__) + }, jn.prototype.next = function() { + this.__values__ === i && (this.__values__ = ha(this.value())); + var e = this.__index__ >= this.__values__.length; + return { + done: e, + value: e ? i : this.__values__[this.__index__++] + } + }, jn.prototype.plant = function(e) { + for (var t, n = this; n instanceof Gn;) { + var r = jo(n); + r.__index__ = 0, r.__values__ = i, t ? o.__wrapped__ = r : t = r; + var o = r; + n = n.__wrapped__ + } + return o.__wrapped__ = e, t + }, jn.prototype.reverse = function() { + var e = this.__wrapped__; + if (e instanceof qn) { + var t = e; + return this.__actions__.length && (t = new qn(this)), (t = t.reverse()).__actions__.push({ + func: ds, + args: [Ko], + thisArg: i + }), new zn(t, this.__chain__) + } + return this.thru(Ko) + }, jn.prototype.toJSON = jn.prototype.valueOf = jn.prototype.value = function() { + return hi(this.__wrapped__, this.__actions__) + }, jn.prototype.first = jn.prototype.head, Qe && (jn.prototype[Qe] = function() { + return this + }), jn + }(); + ht._ = gn, (r = function() { + return gn + }.call(t, n, t, e)) === i || (e.exports = r) + }.call(this) + }, + 589: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(491), + o = n(366), + s = r(n(916)), + a = n(930), + u = n(637); + t.default = class { + constructor(e) { + this.sdk = e, this.disableBannerCheck = !1, this.overlayBanners = {}, this.renderedBannerIds = new Set, this.logger = new s.default("banner") + } + async requestBanner(e) { + this.logger.log("Requesting banner with automatic rendering", e), this.ensureVideoAdNotPlaying(e.id); + const t = await this.prefetchBanner(e); + return this.renderPrefetchedBanner(t) + } + async requestResponsiveBanner(e) { + this.logger.log(`Requesting responsive banner with automatic rendering #${e}`), this.ensureVideoAdNotPlaying(e); + const t = await (0, a.getBannerContainer)(e, !this.disableBannerCheck), + { + width: n, + height: r + } = t.containerInfo.size, + i = await this.prefetchResponsiveBanner({ + id: e, + width: n, + height: r + }); + return this.renderPrefetchedBanner(i) + } + async prefetchBanner(e) { + if (this.logger.log("Prefetch banner", e), !(0, u.matchesInGameBannerSize)(e.width, e.height)) return Promise.reject("Invalid banner size"); + const t = (0, a.ContainerIdToInnerId)(e.id), + n = { + ...e, + id: t + }; + return { + id: n.id, + banner: n, + options: {} + } + } + async prefetchResponsiveBanner(e) { + this.logger.log(`Prefetch responsive banner #${e.id}`); + const { + width: t, + height: n + } = e, r = { + id: (0, a.ContainerIdToInnerId)(e.id), + width: t, + height: n, + isResponsive: !0 + }; + return { + id: r.id, + banner: r, + options: {} + } + } + async renderPrefetchedBanner(e) { + this.logger.log("Rendering prefetched banner", e); + const t = (0, a.InnerIdToContainerId)(e.id); + this.ensureVideoAdNotPlaying(t), await (0, a.getBannerContainer)(t, !0), this.renderedBannerIds.add(t), (0, o.renderFakeBanner)(e.banner) + } + ensureVideoAdNotPlaying(e) { + if (this.sdk.ad.isAdPlaying) throw new u.BannerError("videoAdPlaying", "Banners cannot be rendered while a video ad is playing", e) + } + requestOverlayBanners(e, t) { + const n = e.map(e => e.id); + Object.keys(this.overlayBanners).forEach(e => { + n.includes(e) || (this.logger.log("Remove overlay banner " + e), this.overlayBanners[e].destroy(), delete this.overlayBanners[e]) + }), e.forEach(e => { + if (this.overlayBanners[e.id]) return void this.logger.log("Skip overlay banner update " + e.id); + this.logger.log("Create overlay banner " + e.id); + const n = new i.OverlayBanner(e, this.disableBannerCheck, this, t); + this.overlayBanners[e.id] = n + }) + } + clearBanner(e) { + const t = document.getElementById((0, a.ContainerIdToInnerId)(e)); + t ? (t.remove(), this.renderedBannerIds.delete(e), this.logger.log(`Cleared the banner from container #${e}`)) : this.logger.log(`There isn't a banner in container #${e}, not clearing anything.`) + } + clearAllBanners() { + const e = Array.from(this.renderedBannerIds.values()); + this.logger.log("Clearing all banners, ids: ", e.map(e => `#${e}`).join(", ")), e.forEach(e => { + this.clearBanner(e) + }) + } + get activeBannersCount() { + return this.renderedBannerIds.size + } + } + }, + 591: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(n(202)), + o = r(n(589)), + s = r(n(488)), + a = n(771), + u = n(681), + l = r(n(916)), + c = n(12), + h = r(n(599)), + d = n(361); + t.default = class { + constructor() { + this.adModule = new i.default(this), this.bannerModule = new o.default(this), this.userModule = new s.default, this.dataModule = new h.default(this), this.gameLogger = new l.default("game"), this.analyticsLogger = new l.default("analytics"), this.throttledHappyTime = (0, c.throttledMethod)(() => this.gameLogger.log("Requesting happytime (local)"), 1e3, "happytime"), this.throttledGameplayStart = (0, c.throttledMethod)(() => this.gameLogger.log("Requesting gameplay start (local)"), 1e3, "gameplayStart"), this.throttledGameplayStop = (0, c.throttledMethod)(() => this.gameLogger.log("Requesting gameplay stop (local)"), 1e3, "gameplayStop"), this.showInviteButton = e => { + this.gameLogger.log("Show invite button (local)"); + const t = (0, u.generateInviteLink)(e, this.game.link); + return this.gameLogger.log(`Invite button link ${t}`), t + }, this.inviteLink = e => { + this.gameLogger.log("Requesting invite link (local)"); + const t = (0, u.generateInviteLink)(e, this.game.link); + return this.gameLogger.log(`Invite link is ${t}`), t + }, this.adModule.init(), this.bannerModule.disableBannerCheck = "true" === (0, a.getQueryStringValue)("disable_banner_check") + } + get ad() { + return this.adModule + } + get banner() { + return this.bannerModule + } + get user() { + return this.userModule + } + get data() { + return this.dataModule + } + get environment() { + return "local" + } + get isQaTool() { + return !1 + } + get game() { + return { + link: "https://www.crazygames.com/game/your-game-will-appear-here", + id: "local", + isInstantJoin: window.location.search.includes("instantJoin=true"), + isInstantMultiplayer: window.location.search.includes("instantJoin=true"), + happytime: () => this.throttledHappyTime(), + gameplayStart: () => this.throttledGameplayStart(), + gameplayStop: () => this.throttledGameplayStop(), + loadingStart: () => this.gameLogger.log("Requesting game loading start (local)"), + loadingStop: () => this.gameLogger.log("Requesting game loading stop (local)"), + inviteLink: this.inviteLink, + showInviteButton: this.showInviteButton, + hideInviteButton: () => this.gameLogger.log("Hide invite button (local)"), + getInviteParam: e => new URLSearchParams(window.location.search).get(e), + settings: { + disableChat: !1 + } + } + } + get analytics() { + return { + trackOrder: (e, t) => { + if (!(0, a.isXsollaOrderArgumentValid)(t)) throw new d.AnalyticsError("invalidArgument", "Order must be a JSON object."); + if (!d.PAYMENT_PROVIDERS.includes(e)) throw new d.AnalyticsError("invalidArgument", `Unsupported payment provider. Supported providers: ${d.PAYMENT_PROVIDERS.join(",")}`); + this.analyticsLogger.log(`Track "${e}" order`, t) + } + } + } + } + }, + 599: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(n(916)), + o = n(25), + s = n(63); + t.default = class { + constructor(e) { + this.logger = new i.default("data"); + const t = (0, o.loadGameDataFromLs)(e.game.id); + this.localDataHandler = new s.LocalDataHandler(t, e.game.id) + } + clear() { + this.logger.log("Clear data"), this.localDataHandler.clear() + } + getItem(e) { + const t = this.localDataHandler.getItem(e); + return this.logger.log(`Get "${e}", returning ${t}`), t + } + removeItem(e) { + this.logger.log(`Remove "${e}"`), this.localDataHandler.removeItem(e) + } + setItem(e, t) { + this.logger.log(`Set "${e}" = ${t}`), this.localDataHandler.setItem(e, t) + } + syncUnityGameData() { + this.logger.log("Requesting to sync unity PlayerPrefs (local)") + } + } + }, + 617: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(681), + o = r(n(916)), + s = n(12), + a = n(543), + u = n(868); + t.default = class { + constructor(e, t) { + this.sdk = e, this.logger = new o.default("game"), this.settings = { + disableChat: !1 + }, this.isInstantJoin = window.location.search.includes("instantJoin=true"), this.isInstantMultiplayer = window.location.search.includes("instantJoin=true"), this.loadStatsSent = !1, this.throttledHappyTime = (0, s.throttledMethod)(() => { + this.logger.log("Requesting happytime"), this.sdk.postMessage({ + type: "happytime", + data: {} + }) + }, 1e3, "happytime"), this.throttledGameplayStart = (0, s.throttledMethod)(() => { + this.logger.log("Requesting gameplay start"), this.sdk.postMessage({ + type: "gameplayStart", + data: {} + }) + }, 1e3, "gameplayStart"), this.throttledGameplayStop = (0, s.throttledMethod)(() => { + this.logger.log("Requesting gameplay stop"), this.sdk.postMessage({ + type: "gameplayStop", + data: {} + }) + }, 1e3, "gameplayStop"), this.link = t.gameLink, this.id = t.gameId, this.performanceTracker = new u.GamePerformanceTracker(this.logger, e) + } + happytime() { + this.throttledHappyTime() + } + gameplayStart() { + if (this.throttledGameplayStart(), !this.loadStatsSent) { + this.loadStatsSent = !0; + let e = window.performance.getEntriesByType("resource").map(e => JSON.parse(JSON.stringify(e))); + e = (0, a.uniqBy)(e, "name"), this.sdk.postMessage({ + type: "sdkGameLoadStats", + data: { + resources: e + } + }) + } + } + gameplayStop() { + this.throttledGameplayStop() + } + loadingStart() { + this.logger.log("Requesting game loading start"), this.sdk.postMessage({ + type: "sdkGameLoadingStart", + data: {} + }) + } + loadingStop() { + this.logger.log("Requesting game loading stop"), this.sdk.postMessage({ + type: "sdkGameLoadingStop", + data: {} + }) + } + inviteLink(e) { + this.logger.log("Requesting invite link"); + const t = (0, i.generateInviteLink)(e, this.link); + return this.logger.log(`Invite link is ${t}`), this.sdk.postMessage({ + type: "inviteUrl", + data: { + inviteUrl: t + } + }), t + } + showInviteButton(e) { + this.logger.log("Show invite button"); + const t = (0, i.generateInviteLink)(e, this.link); + return this.logger.log(`Invite button link ${t}`), this.sdk.postMessage({ + type: "showInviteButton", + data: { + inviteUrl: t + } + }), t + } + hideInviteButton() { + this.logger.log("Hide invite button"), this.sdk.postMessage({ + type: "hideInviteButton", + data: {} + }) + } + getInviteParam(e) { + return new URLSearchParams(window.location.search).get(e) + } + handleEvent(e) { + "focusStealAttempt" === e.type && this.restoreCanvasFocus() + } + restoreCanvasFocus() { + try { + const e = document.getElementsByTagName("canvas"); + 1 !== e.length ? this.logger.log(`There are ${e.length} canvases, don't restore focus`) : (this.logger.log("Restore focus to canvas"), e[0].tabIndex = 1, e[0].focus()) + } catch { + this.logger.error("Failed to restore canvas focus") + } + } + } + }, + 629: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.ch = function(e) { + const t = JSON.parse(JSON.stringify(e)), + n = Object.keys(t).filter(e => void 0 !== t[e] && null !== t[e]).sort(); + let r = ""; + for (const e of n) r += e + "_" + JSON.stringify(t[e]) + "_"; + return function(e) { + let t = 0; + if (0 === e.length) return t; + for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0; + return t + }(r) + } + }, + 637: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.BannerError = void 0, t.isInGameBannerSize = o, t.matchesInGameBannerSize = function(e, t) { + return o(`${e}x${t}`) + }; + const r = n(833), + i = n(433); + + function o(e) { + return (0, i.isInGameBannerSize)(e) + } + class s extends r.GeneralError { + constructor(e, t, n) { + super(e, t), this.code = e, this.message = t, this.containerId = n + } + } + t.BannerError = s + }, + 643: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.wait = function(e) { + return new Promise(t => setTimeout(t, e)) + } + }, + 659: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = n(833), + o = r(n(916)), + s = n(457), + a = r(n(984)), + u = n(888), + l = n(63); + t.default = class { + constructor(e, t) { + if (this.sdk = e, this.logger = new o.default("data"), this.alreadySent = [], "local" === t.handler) this.dataHandler = new l.LocalDataHandler(t.data, e.game.id); + else if ("cloud" === t.handler) this.dataHandler = new s.CloudDataHandler(e, !!t.doNotSync, t.data); + else { + if ("disabled" !== t.handler) throw new i.GeneralError("unexpectedError", `Unknown data handler ${t.handler}`); + this.dataHandler = new u.DisabledDataHandler + } + } + clear() { + this.dataHandler.clear(), this.logger.log("Clear data"), this.sdk.postMessage({ + type: "useDataModule", + data: { + action: "clear" + } + }) + } + getItem(e) { + const t = this.dataHandler.getItem(e); + return this.logger.log(`Get "${e}", returning ${t}`), this.debugEvent("getItem", e), this.sdk.postMessage({ + type: "useDataModule", + data: { + action: "getItem" + } + }), t + } + removeItem(e) { + this.dataHandler.removeItem(e), this.logger.log(`Remove "${e}"`), this.sdk.postMessage({ + type: "useDataModule", + data: { + action: "removeItem" + } + }), this.debugEvent("removeItem", e) + } + setItem(e, t) { + this.dataHandler.setItem(e, t), this.logger.log(`Set "${e}" = ${t}`), this.sdk.postMessage({ + type: "useDataModule", + data: { + action: "setItem" + } + }), this.debugEvent("setItem", e, t) + } + syncUnityGameData() { + this.logger.log("Requesting to sync unity game data"), this.sdk.postMessage({ + type: "syncUnityGameData", + data: {} + }) + } + debugEvent(e, t, n) { + const r = `${e}-${t}`; + this.alreadySent.includes(r) || (this.alreadySent.push(r), a.default.getInstance().sendDebugEvent("dataEventWithoutSDKPS", { + method: e, + key: t, + value: n + }, e => !!e.dataModule && "sdk" !== e.dataModule.apsStorageType)) + } + } + }, + 672: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.SDK_VERSION = void 0, t.SDK_VERSION = "3.3.1" + }, + 681: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.generateInviteLink = function(e, t) { + if (!t) return "An error happened when generating invite link"; + const n = new URL(t), + r = n.searchParams; + return r.set("czy_invite", "true"), r.set("utm_source", "invite"), Object.keys(e).forEach(t => { + r.set(t, e[t]) + }), n.toString() + } + }, + 691: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(n(201)), + o = r(n(617)), + s = r(n(985)), + a = r(n(924)), + u = n(220), + l = r(n(916)), + c = r(n(659)), + h = r(n(984)), + d = n(925), + f = r(n(199)); + t.default = class { + constructor(e, t, n) { + this.logger = new l.default("none"), this.receiveMessage = async e => { + const t = e.data; + (0, u.isGfToSdkEvent)(t) && t.type && (this.logger.verbose("Received message from GF", t), this.bannerModule.handleEvent(t), this.adModule.handleEvent(t), this.userModule.handleEvent(t), this.gameModule.handleEvent(t), h.default.getInstance().handleEvent(t)) + }, !0 === e.debug && (l.default.forceEnable = !0), this._isQaTool = e.isQaTool, this.adModule = new s.default(this, e), this.bannerModule = new i.default(this, e), this.gameModule = new o.default(this, e), this.userModule = new a.default(this, e.systemInfo, !!e.userAccountAvailable, n), this.dataModule = new c.default(this, t), this.analyticsModule = new f.default(this), window.addEventListener("message", this.receiveMessage, !1), h.default.getInstance().init(this, e), this.propagateErrors() + } + get environment() { + return this.postMessage({ + type: "getEnvironment", + data: {} + }), "crazygames" + } + get isQaTool() { + return this.postMessage({ + type: "isQATool", + data: {} + }), this._isQaTool + } + get banner() { + return this.bannerModule + } + get game() { + return this.gameModule + } + get user() { + return this.userModule + } + get ad() { + return this.adModule + } + get data() { + return this.dataModule + } + get analytics() { + return this.analyticsModule + } + propagateErrors() { + window.addEventListener("error", e => { + var t; + this.postMessage({ + type: "error", + data: { + name: e.error.name || "Error", + message: e.message || "Unknown error", + filename: e.filename || "Unknown file", + lineno: e.lineno || 0, + colno: e.colno || 0, + stack: (null === (t = e.error) || void 0 === t ? void 0 : t.stack) || "No stack trace available", + url: window.location.href + } + }) + }), window.addEventListener("unhandledrejection", e => { + var t; + this.postMessage({ + type: "error", + data: { + name: "UnhandledRejection", + message: e.reason, + stack: null === (t = e.reason) || void 0 === t ? void 0 : t.stack, + url: window.location.href + } + }) + }) + } + postMessage(e) { + this.logger.verbose("Message to GF", e), d.GF_WINDOW ? d.GF_WINDOW.postMessage(e, "*") : this.logger.log("Missing GF_WINDOW, message won't be sent") + } + } + }, + 710: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.AdError = void 0; + const r = n(833); + class i extends r.GeneralError { + constructor(e, t) { + super(e, t), this.code = e, this.message = t + } + } + t.AdError = i + }, + 771: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.getQueryStringValue = function(e) { + return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(e).replace(/[.+*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")) + }, t.addStyle = function(e) { + const t = document.createElement("style"); + t.textContent = e, document.head.append(t) + }, t.loadScript = function(e) { + return new Promise((t, n) => { + const i = document.createElement("script"); + i.onload = () => t(), i.onerror = (e, t, i, o, s) => { + try { + let a = ""; + a = "string" == typeof e ? e : `type: ${e.type} - target: ${e.currentTarget}`, n(new Error(`LoadScript error. Event [${a}]- source [${t}] - line/column [${i}/${o}] - error [${(0,r.stringifyError)(s)}]`)) + } catch (e) { + n(e) + } + }, i.src = e, i.async = !0, document.head.appendChild(i) + }) + }, t.wrapUserFn = function(e) { + return t => { + try { + e(t) + } catch (e) { + console.error(e) + } + } + }, t.isXsollaOrderArgumentValid = function(e) { + return !("object" != typeof e || null === e || Array.isArray(e)) + }, t.sendErrorToGf = function(e, t, n) { + if (!i.GF_WINDOW) return; + const r = { + type: "sdkError", + data: { + errorName: e, + module: t, + specificValues: n || {} + } + }; + i.GF_WINDOW.postMessage(r, "*") + }; + const r = n(100), + i = n(925) + }, + 825: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.getContainerInfo = async function(e) { + const t = document.getElementById(e); + return t ? async function(e) { + return new Promise(t => { + const r = new IntersectionObserver(([i]) => { + const o = window.getComputedStyle(e), + s = i.intersectionRatio > n; + t({ + visibleState: s ? "visible" : "notVisible", + size: { + width: Math.ceil("auto" !== o.width ? parseFloat(o.width) : i.boundingClientRect.width), + height: Math.ceil("auto" !== o.height ? parseFloat(o.height) : i.boundingClientRect.height) + } + }), r.disconnect() + }); + r.observe(e) + }) + }(t): { + visibleState: "notCreated", + size: { + width: 0, + height: 0 + } + } + }; + const n = .95 + }, + 833: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.GeneralError = t.INIT_STATE = t.SDKError = t.DOCS_URL = void 0, t.DOCS_URL = "docs.crazygames.com"; + class n extends Error {} + var r; + t.SDKError = n, + function(e) { + e[e.UNINITIALIZED = 0] = "UNINITIALIZED", e[e.REQUESTED = 1] = "REQUESTED", e[e.INITIALIZED = 2] = "INITIALIZED" + }(r || (t.INIT_STATE = r = {})), t.GeneralError = class { + constructor(e, t) { + this.code = e, this.message = t + } + } + }, + 868: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.GamePerformanceTracker = void 0, t.GamePerformanceTracker = class { + constructor(e, t) { + var n; + this.logger = e, this.sdk = t, this.skipTracking = !1, this.resetSkipTrackingTimeout = null, this.lastFps = 0, this.lastWasmHeapSize = 0, "function" == typeof(null === (n = window.unityGameInstance) || void 0 === n ? void 0 : n.GetMetricsInfo) ? (setTimeout(() => { + this.startTracking() + }, 5e3), document.addEventListener("visibilitychange", () => { + this.resetSkipTrackingTimeout && (clearTimeout(this.resetSkipTrackingTimeout), this.resetSkipTrackingTimeout = null), "visible" === document.visibilityState ? this.resetSkipTrackingTimeout = window.setTimeout(() => { + this.skipTracking = !1 + }, 3e3) : this.skipTracking = !0 + })) : e.verbose("No window.unityGameInstance.GetMetricsInfo function found, FPSTracker will not run.") + } + startTracking() { + var e; + const t = null === (e = window.unityGameInstance) || void 0 === e ? void 0 : e.GetMetricsInfo; + setInterval(() => { + if (this.skipTracking || this.sdk.ad.isAdPlaying) return; + const e = t(), + n = Math.round(e.fps) || this.lastFps, + { + totalWASMHeapSize: r, + usedWASMHeapSize: i, + totalJSHeapSize: o, + usedJSHeapSize: s + } = e, + a = Math.abs(n - this.lastFps) >= .1 * this.lastFps, + u = this.lastWasmHeapSize !== r; + if (a || u) { + const e = { + fps: n, + totalWASMHeapSize: r, + usedWASMHeapSize: i, + totalJSHeapSize: o, + usedJSHeapSize: s + }; + this.logger.verbose("Sending game performance event", e, "reasons", { + fpsSignificantChange: a, + wasmHeapSizeChange: u + }), this.sdk.postMessage({ + type: "analyticsTrackGamePerformance", + data: e + }), this.lastFps = n, this.lastWasmHeapSize = r + } + }, 5e3) + } + } + }, + 888: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.DisabledDataHandler = void 0; + const r = n(833); + t.DisabledDataHandler = class { + constructor() { + this.errorCode = "dataModuleDisabled", this.errorMessage = "The data module is disabled. To enable it, please indicate on the Developer Portal that your game is using it." + } + clear() { + throw new r.GeneralError(this.errorCode, this.errorMessage) + } + getItem(e) { + throw new r.GeneralError(this.errorCode, this.errorMessage) + } + removeItem(e) { + throw new r.GeneralError(this.errorCode, this.errorMessage) + } + setItem(e, t) { + throw new r.GeneralError(this.errorCode, this.errorMessage) + } + } + }, + 896: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.isDefined = function(e) { + return null != e + }, t.nonEmptyString = function(e) { + return !!e && "" !== e.trim() + } + }, + 915: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.DEFAULT_SAVE_INTERVAL_MS = t.MAX_DATA_LENGTH = t.DataError = void 0; + const r = n(833); + class i extends r.GeneralError { + constructor(e, t) { + super(e, t), this.code = e, this.message = t + } + } + t.DataError = i, t.MAX_DATA_LENGTH = 1048576, t.DEFAULT_SAVE_INTERVAL_MS = 1e3 + }, + 916: (e, t) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.MAIN_BADGE = void 0; + const n = "border-radius: 3px; padding: 0px 4px; color: white;"; + t.MAIN_BADGE = ["%cHTML5 SDK", `background-color: #6842FF; ${n}`]; + class r { + constructor(e) { + this.badge = e, this.debugFlagPresent = window.location.href.includes("sdk_debug=true") + } + isEnabled() { + return this.debugFlagPresent || r.forceEnable + } + log(e, ...r) { + if (!this.isEnabled()) return; + if ("none" === this.badge) return console.log(...t.MAIN_BADGE, e, ...r.length > 0 ? r : []); + let i = []; + switch (this.badge) { + case "game": + i = ["%cGAME", `background-color: #d48f06; ${n}`]; + break; + case "user": + i = ["%cUSER", `background-color: #3498DB; ${n}`]; + break; + case "ad": + i = ["%cAD", `background-color: #008A00; ${n}`]; + break; + case "banner": + i = ["%cBANNER", `background-color: #00ABA9; ${n}`]; + break; + case "data": + i = ["%cDATA", `background-color: #A21CAF; ${n}`]; + break; + case "analytics": + i = ["%cANALYTICS", `background-color: #5c5c5c; ${n}`] + } + console.log(`${t.MAIN_BADGE[0]}%c ${i[0]}`, t.MAIN_BADGE[1], "", i[1], e, ...r.length > 0 ? r : []) + } + verbose(e, ...n) { + this.isEnabled() && console.debug(`${t.MAIN_BADGE[0]}%c %c${e}`, t.MAIN_BADGE[1], "", "color: #3d7fff", ...n.length > 0 ? n : []) + } + warn(e, ...n) { + this.isEnabled() && console.warn(...t.MAIN_BADGE, e, ...n.length > 0 ? n : []) + } + error(e, ...n) { + console.error(...t.MAIN_BADGE, e, ...n.length > 0 ? n : []) + } + } + r.forceEnable = !1, t.default = r + }, + 924: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(n(916)), + o = n(80), + s = n(529), + a = n(896); + t.default = class { + constructor(e, t, n, r) { + this.sdk = e, this._systemInfo = t, this._userAccountAvailable = n, this.user = null, this.authDeferredPromise = null, this.accountLinkDeferredPromise = null, this.authListeners = [], this.userTokenResolvers = [], this.userTokenRequestInProgress = !1, this.xsollaUserTokenRequestInProgress = !1, this.xsollaUserTokenResolvers = [], this.logger = new i.default("user"), this.user = r + } + get isUserAccountAvailable() { + return this.sdk.postMessage({ + type: "isUserAccountAvailable", + data: {} + }), !!this._userAccountAvailable + } + get systemInfo() { + return this.sdk.postMessage({ + type: "getSystemInfo", + data: {} + }), this._systemInfo + } + async showAuthPrompt() { + if (this.logger.log("Requesting auth prompt"), this.authDeferredPromise) throw new o.UserError("showAuthPromptInProgress", "The auth prompt is already opened"); + if (this.user) throw new o.UserError("userAlreadySignedIn", "The user is already signed in"); + return new Promise((e, t) => { + this.authDeferredPromise = { + resolve: e, + reject: t + }, this.sdk.postMessage({ + type: "showAuthPrompt", + data: {} + }) + }) + } + handleAuthPromptResponse(e) { + this.logger.log("Received auth prompt response", e); + const { + error: t, + user: n + } = e; + t ? this.authDeferredPromise && this.authDeferredPromise.reject(new o.UserError(t.code, t.message)) : (this.user = null != n ? n : null, this.authDeferredPromise && this.authDeferredPromise.resolve(this.user)), this.authDeferredPromise = null + } + async showAccountLinkPrompt() { + if (this.logger.log("Requesting link account prompt"), this.accountLinkDeferredPromise) throw new o.UserError("showAccountLinkPromptInProgress", "The account link prompt is already displayed"); + if (!this.user) throw new o.UserError("userNotAuthenticated", "The user is not signed in"); + return new Promise(async (e, t) => { + this.accountLinkDeferredPromise = { + resolve: e, + reject: t + }, this.sdk.postMessage({ + type: "showAccountLinkPrompt", + data: {} + }) + }) + } + handleAccountLinkPromptResponse(e) { + this.logger.log("Received account link prompt response", e); + const { + response: t + } = e.data; + this.accountLinkDeferredPromise && this.accountLinkDeferredPromise.resolve({ + response: t + }), this.accountLinkDeferredPromise = null + } + async getUser() { + return this.logger.log("Requesting user object"), this.sdk.postMessage({ + type: "getUser", + data: {} + }), this.user + } + async getUserToken() { + this.logger.log("Requesting user token"), this.tokenExpiresAtMs && this.tokenExpiresAtMs < Date.now() && (this.logger.log("User token expired, clean it so it is requested again"), this.userToken = null, this.tokenExpiresAtMs = null), this.tokenExpiresAtMs && !this.userTokenRequestInProgress && this.tokenExpiresAtMs - 3e4 < Date.now() && (this.logger.log("User token expires soon, request new one in background"), this.requestNewUserToken()); + let e = this.userToken; + if ((0, a.isDefined)(e) && (0, s.isJsSdkRequestUserTokenSuccessResponse)(e)) return this.logger.log("Returning cached user token"), e.token; + if (this.userTokenRequestInProgress ? this.logger.log("User token request to portal in progress") : (this.logger.log("No user token present in the SDK, request one"), this.requestNewUserToken()), await new Promise(e => { + this.userTokenResolvers.push(async () => { + e() + }) + }), e = this.userToken, !(0, a.isDefined)(e)) throw this.logger.error("User token missing after portal request finished"), new o.UserError("unexpectedError", "User token missing after portal request finished"); + if ((0, s.isJsSdkRequestUserTokenErrorResponse)(e)) throw new o.UserError(e.error.code, e.error.message); + if (!e.token) throw this.logger.error("User token missing, even though there isn't any error"), new o.UserError("unexpectedError", "User token missing, even though there isn't any error"); + return e.token + } + handleUserTokenResponse(e) { + this.logger.log("Received token response from portal", e), this.userToken = e, this.userTokenRequestInProgress = !1, (0, s.isJsSdkRequestUserTokenSuccessResponse)(e) && (this.tokenExpiresAtMs = Date.now() + 1e3 * e.expiresIn), this.userTokenResolvers.forEach(e => e()), this.userTokenResolvers = [] + } + requestNewUserToken() { + this.logger.log("Requesting user token from portal"), this.sdk.postMessage({ + type: "requestUserToken", + data: {} + }), this.userTokenRequestInProgress = !0 + } + async getXsollaUserToken() { + this.logger.log("Requesting Xsolla user token"), this.xsollaUserTokenExpiresAtMs && this.xsollaUserTokenExpiresAtMs < Date.now() && (this.logger.log("Xsolla user token expired, clean it so it is requested again"), this.xsollaUserToken = null, this.xsollaUserTokenExpiresAtMs = null), this.xsollaUserTokenExpiresAtMs && !this.xsollaUserTokenRequestInProgress && this.xsollaUserTokenExpiresAtMs - 3e4 < Date.now() && (this.logger.log("Xsolla user token expires soon, request new one in background"), this.requestNewXsollaUserToken()); + let e = this.xsollaUserToken; + if ((0, a.isDefined)(e) && (0, s.isJsSdkRequestXsollaUserTokenSuccessResponse)(e)) return this.logger.log("Returning cached Xsolla user token"), e.token; + if (this.xsollaUserTokenRequestInProgress ? this.logger.log("Xsolla user token request to portal in progress") : (this.logger.log("No Xsolla user token present in the SDK, request one"), this.requestNewXsollaUserToken()), await new Promise(e => { + this.xsollaUserTokenResolvers.push(async () => { + e() + }) + }), e = this.xsollaUserToken, !(0, a.isDefined)(e)) throw this.logger.error("Xsolla user token response missing after portal request finished"), new o.UserError("unexpectedError", "Xsolla user token missing after portal request finished"); + if ((0, s.isJsSdkRequestXsollaUserTokenErrorResponse)(e)) throw new o.UserError(e.error.code, e.error.message); + if (!e.token) throw this.logger.error("Xsolla user token missing, even though there isn't any error"), new o.UserError("unexpectedError", "Xsolla user token missing, even though there isn't any error"); + return e.token + } + handleXsollaUserTokenResponse(e) { + this.logger.log("Received Xsolla user token response from portal", e), this.xsollaUserToken = e, this.xsollaUserTokenRequestInProgress = !1, (0, s.isJsSdkRequestXsollaUserTokenSuccessResponse)(e) && (this.xsollaUserTokenExpiresAtMs = Date.now() + 1e3 * e.expiresIn), this.xsollaUserTokenResolvers.forEach(e => e()), this.xsollaUserTokenResolvers = [] + } + requestNewXsollaUserToken() { + this.logger.log("Requesting Xsolla user token from portal"), this.sdk.postMessage({ + type: "requestXsollaUserToken", + data: {} + }), this.xsollaUserTokenRequestInProgress = !0 + } + addScore(e) { + this.logger.warn("addScore is no longer supported.") + } + addScoreEncrypted(e, t) { + this.logger.warn("addScoreEncrypted is no longer supported.") + } + submitScore(e) { + this.sdk.postMessage({ + type: "submitScore", + data: { + encryptedScore: e.encryptedScore, + requestId: this.generateRequestId() + } + }) + } + generateRequestId() { + return "undefined" != typeof crypto && crypto.randomUUID ? crypto.randomUUID() : Date.now().toString(36) + Math.random().toString(36).substring(2) + } + handleEvent(e) { + switch (e.type) { + case "showAuthPromptResponse": + this.handleAuthPromptResponse(e); + break; + case "linkAccountResponse": + this.handleAccountLinkPromptResponse(e); + break; + case "userLoggedIn": + this.handleUserLoggedIn(e); + break; + case "requestUserTokenResponse": + this.handleUserTokenResponse(e); + break; + case "requestXsollaUserTokenResponse": + this.handleXsollaUserTokenResponse(e) + } + } + addAuthListener(e) { + this.sdk.postMessage({ + type: "addAuthListener", + data: {} + }), this.authListeners.push(e) + } + removeAuthListener(e) { + this.sdk.postMessage({ + type: "removeAuthListener", + data: {} + }), this.authListeners = this.authListeners.filter(t => t !== e) + } + handleUserLoggedIn(e) { + var t; + this.user = null !== (t = e.data.user) && void 0 !== t ? t : null, this.callAuthChangeListeners() + } + callAuthChangeListeners() { + this.authListeners.forEach(e => this.callAuthChangeListener(e)) + } + callAuthChangeListener(e) { + try { + e(this.user) + } catch (e) { + console.error(e) + } + } + } + }, + 925: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.GF_WINDOW = void 0, t.initSdk = function(e) { + return new Promise(n => { + const r = window.setTimeout(() => { + window.removeEventListener("message", i, !1), (0, a.sendErrorToGf)("gf-init-response-timeout", null, { + timeoutMs: h + }), c.error(`Gf Init response timeout ${h}ms`), n(null) + }, h), + i = async e => { + if ("initialized" === e.data.type) { + c.verbose("Received init from GF", e.data), window.clearTimeout(r), window.removeEventListener("message", i, !1); + const t = e.data.data; + n(t) + } + }; + window.addEventListener("message", i, !1), t.GF_WINDOW.postMessage({ + type: "init-js-sdk", + data: { + version: o.SDK_VERSION, + sdkType: "js", + ...e + } + }, "*") + }) + }, t.fetchSdkUser = function() { + return new Promise(e => { + const t = window.setTimeout(() => { + window.removeEventListener("message", n, !1), (0, a.sendErrorToGf)("gf-user-response-timeout", null, { + timeoutMs: d + }), c.error(`Gf user response timeout ${d}ms, continuing with "null" (signed out) user`), e(null) + }, d), + n = async r => { + var o; + if (!(0, i.isGfToSdkEvent)(r.data)) return; + const s = r.data; + if ("initialUserSet" === s.type) { + l.verbose("Received initial user from GF", s), window.clearTimeout(t), window.removeEventListener("message", n, !1); + const r = null !== (o = s.data.user) && void 0 !== o ? o : null; + e(r) + } + }; + window.addEventListener("message", n, !1) + }) + }, t.shouldInitLocalMode = function() { + return true; + }, t.checkIsCrazyGames = async function() { + let e, n = !1; + const r = new Promise(t => { + e = t + }), + i = r => { + var i; + "crazyGamesGFConfirmation" === (null === (i = null == r ? void 0 : r.data) || void 0 === i ? void 0 : i.type) && (t.GF_WINDOW = r.source, n = !0, e()) + }, + o = new Promise(async e => { + await (0, u.wait)(f), e() + }); + window.addEventListener("message", i, !1); + const s = { + type: "checkCrazyGamesGF" + }; + return window.postMessage(s, "*"), window.parent.postMessage(s, "*"), window.parent.parent.postMessage(s, "*"), window.parent.parent.parent.postMessage(s, "*"), await Promise.race([r, o]), window.removeEventListener("message", i), { + isOnCrazyGames: n + } + }; + const i = n(220), + o = n(672), + s = r(n(916)), + a = n(771), + u = n(643), + l = new s.default("user"), + c = new s.default("none"); + t.GF_WINDOW = null; + const h = 5e3, + d = 5e3, + f = 7e3 + }, + 930: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.InnerIdToContainerId = t.ContainerIdToInnerId = void 0, t.getBannerContainer = async function(e, n) { + var o; + if (!e) throw new r.BannerError("missingId", "Container id not specified", e); + const s = await (0, i.getContainerInfo)(e), + { + visibleState: a + } = s; + if (n) { + if ("notCreated" === a) throw new r.BannerError("notCreated", "Container is not present on the page", e); + if ("notVisible" === a) throw new r.BannerError("notVisible", "Container is not entirely visible on the page", e) + } + const u = (0, t.ContainerIdToInnerId)(e); + if (!document.getElementById(u)) { + const t = document.createElement("div"); + t.id = u, t.classList.add("crazygames-banner-container"), null === (o = document.getElementById(e)) || void 0 === o || o.append(t) + } + return { + mainContainerId: e, + innerContainerId: u, + containerInfo: s + } + }, t.getBannerSizeAsText = function(e) { + return `${e.width}x${e.height}` + }; + const r = n(637), + i = n(825); + t.ContainerIdToInnerId = e => `${e}-crazygames-inner`, t.InnerIdToContainerId = e => `${e}`.replace("-crazygames-inner", "") + }, + 945: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const r = n(833); + t.default = class { + constructor() { + this.message = `CrazySDK is disabled on this domain. Check ${r.DOCS_URL} for more info.`, this.code = "sdkDisabled" + } + get ad() { + throw new r.GeneralError(this.code, this.message) + } + get banner() { + throw new r.GeneralError(this.code, this.message) + } + get game() { + throw new r.GeneralError(this.code, this.message) + } + get user() { + throw new r.GeneralError(this.code, this.message) + } + get data() { + throw new r.GeneralError(this.code, this.message) + } + get analytics() { + throw new r.GeneralError(this.code, this.message) + } + get environment() { + return "disabled" + } + get isQaTool() { + return !1 + } + } + }, + 984: (e, t, n) => { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const r = n(629), + i = "https://cza.crazygames.com/event"; + class o { + constructor() { + this.eventQueue = [], this.initTimedOut = !1 + } + static getInstance() { + return o.instance || (o.instance = new o), o.instance + } + init(e, t) { + this.initInfo = t, this.sdk = e, this.sdk.postMessage({ + type: "requestAnalyticsInfoFromSDK", + data: {} + }), this.initTimeoutId = window.setTimeout(() => { + this.instanceId || (this.initTimedOut = !0, this.eventQueue = []) + }, 1e4) + } + sendDebugEvent(e, t, n) { + if (this.initTimedOut) return; + const r = { + time: Date.now(), + version: "3.6.0", + source: "sdk", + type: "debug", + sampling: 1, + userId: "", + page: "", + instanceId: "", + gameId: "", + buildId: "", + name: e, + data: JSON.stringify(t) + }; + this.sendEvent(r, n) + } + handleEvent(e) { + "analyticsInfoResponseFromGF" === e.type && (this.initTimeoutId && window.clearTimeout(this.initTimeoutId), this.instanceId = e.instanceId, this.eventQueue.forEach(e => this.sendEvent(e.event, e.filter)), this.eventQueue = []) + } + sendEvent(e, t) { + this.initInfo ? this.safeIdleCallback(() => { + var n, i; + if (this.initInfo.isQaTool) return; + if (t && !t(this.initInfo)) return; + const o = { + ...e, + instanceId: this.instanceId, + gameId: null === (n = this.initInfo) || void 0 === n ? void 0 : n.gameId, + buildId: null === (i = this.initInfo) || void 0 === i ? void 0 : i.buildId + }, + s = (0, r.ch)(o); + o.__i = s, this.sendData(o) + }) : this.eventQueue.push({ + event: e, + filter: t + }) + } + async sendData(e) { + const t = e, + n = async () => { + await window.fetch(i, { + method: "post", + body: JSON.stringify(t), + headers: { + "Content-Type": "text/plain" + } + }) + }; + if (window.navigator) { + const e = { + type: "text/plain" + }, + r = new Blob([JSON.stringify(t)], e); + if (window.navigator.sendBeacon(i, r)) return Promise.resolve(); + await n() + } else await n() + } + safeIdleCallback(e) { + window.requestIdleCallback ? window.requestIdleCallback(e, { + timeout: 2e3 + }) : window.setTimeout(e, 0) + } + } + t.default = o + }, + 985: function(e, t, n) { + "use strict"; + var r = this && this.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.BASIC_LAUNCH_AD_DISABLED_ERROR = void 0; + const i = n(771), + o = r(n(916)), + s = n(710), + a = { + adFinished: () => {}, + adError: () => {}, + adStarted: () => {} + }; + t.BASIC_LAUNCH_AD_DISABLED_ERROR = "Ads are disabled during basic launch", t.default = class { + constructor(e, t) { + this.sdk = e, this.initInfo = t, this.adCallbacks = a, this.requestInProgress = !1, this.adblockDetectionResolvers = [], this.logger = new o.default("ad"), this.adPlaying = !1, this.adblockPopupListeners = [], this.adblockDetectionTimeout = window.setTimeout(() => { + this.logger.log("Adblock timeout executed since there wasn't an adblock event in 5000ms"), this.setAdblockDetectionResult(!1) + }, 5e3) + } + prefetchAd(e) { + if ("basic" === this.initInfo.launchFlow) throw new s.AdError("other", t.BASIC_LAUNCH_AD_DISABLED_ERROR); + this.logger.log(`Prefetching ${e} ad`), this.sdk.postMessage({ + type: "prefetchAd", + data: { + adType: e + } + }) + } + async requestAd(e, n) { + if (this.adCallbacks = { + adFinished: (null == n ? void 0 : n.adFinished) || a.adFinished, + adError: (null == n ? void 0 : n.adError) || (null == n ? void 0 : n.adFinished) || a.adFinished, + adStarted: (null == n ? void 0 : n.adStarted) || a.adStarted + }, "basic" === this.initInfo.launchFlow) return (0, i.wrapUserFn)(this.adCallbacks.adError)(new s.AdError("other", t.BASIC_LAUNCH_AD_DISABLED_ERROR)); + if (this.logger.log(`Requesting ${e} ad`), this.requestInProgress) { + this.logger.log("Ad already requested"); + const e = new s.AdError("other", "An ad request is already in progress"); + return (0, i.wrapUserFn)(this.adCallbacks.adError)(e) + } + this.requestInProgress = !0, this.sdk.postMessage({ + type: "requestAd", + data: { + adType: e + } + }) + } + async hasAdblock() { + return void 0 !== this.adblockDetectionResult ? this.adblockDetectionResult : (this.sdk.postMessage({ + type: "hasAdblock", + data: {} + }), this.logger.log("Requesting adblock status"), new Promise(e => { + this.adblockDetectionResolvers.push(e) + })) + } + handleEvent(e) { + var t, n; + switch (e.type) { + case "adblockDetectionExecuted": + return this.handleAdBlockDetectionExecutedEvent(e); + case "adError": + this.requestInProgress = !1; + const r = new s.AdError((null === (t = e.errorData) || void 0 === t ? void 0 : t.reason) || "other", (null === (n = e.errorData) || void 0 === n ? void 0 : n.message) || "Unknown message"); + return this.adPlaying = !1, (0, i.wrapUserFn)(this.adCallbacks.adError)(r); + case "adFinished": + return this.adPlaying = !1, this.requestInProgress = !1, (0, i.wrapUserFn)(this.adCallbacks.adFinished)(); + case "adStarted": + return this.adPlaying = !0, this.sdk.banner.activeBannersCount > 0 && this.sdk.banner.clearAllBanners(), (0, i.wrapUserFn)(this.adCallbacks.adStarted)(); + case "adblockPopupShowed": + return void this.callAdblockPopupListeners("open") + } + } + handleAdBlockDetectionExecutedEvent(e) { + const { + hasAdblock: t + } = e, n = !!t; + if (void 0 !== this.adblockDetectionResult) return this.logger.log(`Received update for adblock state: (${n}).`), void(this.adblockDetectionResult = n); + this.setAdblockDetectionResult(n), clearTimeout(this.adblockDetectionTimeout) + } + setAdblockDetectionResult(e) { + this.adblockDetectionResult = e, this.adblockDetectionResolvers.forEach(t => t(e)), this.adblockDetectionResolvers = [] + } + get isAdPlaying() { + return this.adPlaying + } + addAdblockPopupListener(e) { + this.adblockPopupListeners.push(e) + } + removeAdblockPopupListener(e) { + this.adblockPopupListeners = this.adblockPopupListeners.filter(t => t !== e) + } + callAdblockPopupListeners(e) { + this.adblockPopupListeners.forEach(t => { + try { + t(e) + } catch (e) { + console.error(e) + } + }) + } + } + } + }, + t = {}; + + function n(r) { + var i = t[r]; + if (void 0 !== i) return i.exports; + var o = t[r] = { + id: r, + loaded: !1, + exports: {} + }; + return e[r].call(o.exports, o, o.exports, n), o.loaded = !0, o.exports + } + n.g = function() { + if ("object" == typeof globalThis) return globalThis; + try { + return this || new Function("return this")() + } catch (e) { + if ("object" == typeof window) return window + } + }(), n.nmd = e => (e.paths = [], e.children || (e.children = []), e), n(156) +})(); diff --git a/KourIO/e b/KourIO/e new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/KourIO/e @@ -0,0 +1 @@ + diff --git a/KourIO/favicon-32x32.png b/KourIO/favicon-32x32.png new file mode 100644 index 0000000..2450649 Binary files /dev/null and b/KourIO/favicon-32x32.png differ diff --git a/KourIO/firebase2.js b/KourIO/firebase2.js new file mode 100644 index 0000000..39a1488 --- /dev/null +++ b/KourIO/firebase2.js @@ -0,0 +1,1622 @@ + +function version38() { } + +const cgAccountsEnabled = true; + +var hasSetupOnlineStatusTracking = false; +var previousUserPresenceRef = null; +var isFriendRequestsListenerSet = false; +var currentFriendRequestsRef = null; +var invitesListenerRef = null; + +const firebaseObjName = 'FirebasePlayerPrefs2023'; +var _firebaseConfig = { + apiKey: "AIzaSyCj_9AFDvc4uAxLBsmZjD3E2sgOPkOOyP0", + authDomain: "kourio-2dc0d.firebaseapp.com", + projectId: "kourio-2dc0d", + databaseURL: "https://kourio-2dc0d-default-rtdb.firebaseio.com/", + storageBucket: "kourio-2dc0d.appspot.com", + messagingSenderId: "45440111818", + appId: "1:45440111818:web:c53fb4b1516807e8b85033", + measurementId: "G-VGVP085QMS" +}; + +let db; +let isFirebaseInitialized = false; + +function initializeFirebase() { + if (isFirebaseInitialized) { + return; + } + + try { + // Check if Firebase is available + if (typeof firebase === 'undefined') { + console.error('Firebase is not loaded yet'); + setTimeout(initializeFirebase, 100); + return; + } + + firebase.initializeApp(_firebaseConfig); + db = firebase.database(); + window.firebaseSessionId = generateSessionId(); + isFirebaseInitialized = true; + console.log('Firebase initialized successfully'); + } catch (error) { + console.error('Error initializing Firebase:', error); + setTimeout(initializeFirebase, 100); + } +} + +// Initialize Firebase when script loads +initializeFirebase(); + +// Helper function to ensure Firebase is ready before executing a function +function ensureFirebaseReady(func, ...args) { + if (!isFirebaseInitialized || !db) { + console.log('Firebase not ready, retrying...'); + setTimeout(() => ensureFirebaseReady(func, ...args), 100); + return; + } + func(...args); +} + +function GetEmail(username, password) { + //let emailDomain = password.endsWith(passCgEndsWithIdentifier) ? "cgkour.io" : "example.com"; + let emailDomain = "example.com"; + return `${username}@${emailDomain}`; +} + + +function loginWithUsernameAndPassword(username, password) { + firebase.auth().signInWithEmailAndPassword(GetEmail(username, password), password) + .then((res) => { + // Login successful + //console.log('Login successful for user:', res.user.email); + window.user = res.user; + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameLoginResultJS', "Success"); + res.user.displayName = username; + //console.log(res.user); + showUserDetails(username, res.user); + }) + .catch((error) => { + // Handle login errors + try { + const errorObject = JSON.parse(error.message); + const specificErrorMessage = errorObject.error.message; + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameLoginResultJS', formatErrorMessage(specificErrorMessage)); + console.error('Login failed:', specificErrorMessage); + } catch (e) { + // If parsing fails, use the original error message + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameLoginResultJS', error.message); + console.error('Login failed:', error.message); + } + }); +} + +function registerWithUsernameAndPassword(username, password) { + const existingModal = document.getElementById('recaptchaModal'); + if (existingModal) { + existingModal.remove(); + } + + const modal = document.createElement("div"); + modal.setAttribute('id', 'recaptchaModal'); + modal.style.cssText = ` + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + `; + + const captchaContainer = document.createElement("div"); + captchaContainer.setAttribute('id', 'recaptchaContainer'); + modal.appendChild(captchaContainer); + document.body.appendChild(modal); + + grecaptcha.render('recaptchaContainer', { + 'sitekey': '6Ldv9lgqAAAAACU5PD6lKq7Zu9nEGgtuaJi4L9z1', + 'theme': 'light', + 'callback': submitForm + }); + + function submitForm(captchaResponse) { + fetch('https://kour.io/api/signup', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + username: username, + password: password, + recaptchaToken: captchaResponse + }) + }) + .then(response => response.json()) + .then(data => { + if (data.success) { + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameRegisterResultJS', "Success"); + //showUserDetails(username, data.user); + loginWithUsernameAndPassword(username, password); + } else { + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameRegisterResultJS', `Failed-${data.message}`); + } + }) + .catch(error => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameRegisterResultJS', `Failed-${error.message}`); + }) + .finally(() => { + document.body.removeChild(modal); + }); + } + + modal.addEventListener('click', event => { + if (event.target === modal) { + unityInstanceWrapper.sendMessage(firebaseObjName, 'UsernameRegisterResultJS', "Cancelled-UserClosedCaptcha"); + document.body.removeChild(modal); + } + }); + + captchaContainer.addEventListener('click', event => event.stopPropagation()); +} + +function formatErrorMessage(errorMessage) { + const lowercaseMessage = errorMessage.toLowerCase(); + const words = lowercaseMessage.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)); + const formattedMessage = words.join(' '); + return formattedMessage; +} +function GoogleLogin() { + var provider = new firebase.auth.GoogleAuthProvider(); + firebase.auth().signInWithPopup(provider).then(res => { + //console.log("Google Login Success!"); + //console.log(res.user); + showUserDetails("", res.user); + }).catch(e => { + console.log("Google Login Error:"); + console.log(e); + }) +} +function EmailPasswordLogin(emailPassword) { + var [email, password] = emailPassword.split(':'); + firebase.auth().signInWithEmailAndPassword(email, password).then(res => { + //console.log("Email and Password Login Success!"); + //console.log(res.user); + showUserDetails("", res.user); + }).catch(e => { + if (e.code === 'auth/user-not-found') { + firebase.auth().createUserWithEmailAndPassword(email, password).then(res => { + //console.log("Email and Password Registration Success!"); + //console.log(res.user); + showUserDetails("", res.user); + }).catch(e => { + console.log("Email and Password Registration Error:"); + console.log(e); + }); + } else { + console.log("Email and Password Login Error:"); + console.log(e); + } + }); +} + + +function FacebookLogin() { + var provider = new firebase.auth.FacebookAuthProvider(); + firebase.auth().signInWithPopup(provider).then(res => { + //console.log("Facebook Login Success!"); + //console.log(res.user); + showUserDetails("", res.user); + // Link Facebook provider to existing account + var user = firebase.auth().currentUser; + var credential = firebase.auth.FacebookAuthProvider.credential(res.credential.accessToken); + user.linkWithCredential(credential).then(function () { + console.log("Facebook account linked successfully"); + }).catch(function (error) { + console.log("Error linking Facebook account:", error); + }); + }).catch(e => { + console.log("Facebook Login Error:"); + console.log(e); + }); +} + +function TwitterLogin() { + var provider = new firebase.auth.TwitterAuthProvider(); + firebase.auth().signInWithPopup(provider).then(res => { + console.log("Twitter Login Success!"); + showUserDetails("", res.user); + }).catch(e => { + console.log("Twitter Login Error:"); + console.log(e); + }); +} + +function requestUserData() { + // Ensure Firebase is initialized before proceeding + if (!isFirebaseInitialized) { + console.log('Firebase not initialized yet, retrying requestUserData...'); + setTimeout(requestUserData, 100); + return; + } + + if (window.sdkVersion === "CrazyGames" && cgAccountsEnabled){ + //the unity lobby has been just loaded. check if CG user exist + if (typeof window.CrazyGames !== 'undefined' && typeof window.CrazyGames.SDK !== 'undefined') { + + window.CrazyGames.SDK.user + .getUser() + .then((crazyUser) => { + if (crazyUser) { + console.log("[CG h5 getUser]: Get user result is: ", crazyUser); + // Authenticate with Firebase using CrazyGames user + handleCrazyGamesUser(crazyUser); + } else { + console.log("User is not logged in to CrazyGames."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnLoggedOutGoogle'); + } + }) + .catch((e) => console.log("Get user error: ", e)); + } + } + else{ + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnLoggedInGoogle', window.loginData); + } +} + + + + +function parseJwt(token) { + var base64Url = token.split('.')[1]; // Get the payload part of the JWT + var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); // Replace URL-safe characters + var jsonPayload = decodeURIComponent( + atob(base64) + .split('') + .map(function(c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); + }) + .join('') + ); + + return JSON.parse(jsonPayload); // Parse the JSON payload +} + +window.handleCrazyGamesUser = handleCrazyGamesUser; +async function handleCrazyGamesUser(crazyUser) { + + console.log("CG USER DETECTED! AUTO-LOGIN!"); + console.log("crazyUser: " + JSON.stringify(crazyUser)); + + const receivedUserToken = await window.CrazyGames.SDK.user.getUserToken(); // this is a JWT string + console.log("CG receivedUserToken is: ", receivedUserToken); + console.log("CG receivedUserToken is (string): "+ receivedUserToken); + console.log("parsing..."); + // Decode the token to get the payload + const payload = parseJwt(receivedUserToken); + console.log("CG payload is: ", payload); + // Extract the userId from the payload + const userId = payload.userId; + + const cg_username = `cg_${userId}`;//`${truncatedUsername}_${generatedPCG}`.replace(/[^a-zA-Z0-9_]/g, ''); + + console.log("CG userId is: ", userId); + const email = cg_username + '@example.com'; + console.log("CG email is: ", email); + const p = generatePCG(userId, '!!34fdfygf%^', 10); + console.log("PCG: ", p); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnCgP', p); + + firebase.auth().signInWithEmailAndPassword(email, p) + .then((userCredential) => { + console.log("[kour js] signInWithEmailAndPassword success!"); + const user = userCredential.user; + showUserDetails("", user); + }) + .catch((error) => { + const errorMessage = error.message.toLowerCase(); + const errorCode = error.code; + console.log("[catch signin cg error] errorCode: " + errorCode); + console.log("[catch signin cg error] errorMessage: " + errorMessage); + + // Check for relevant error codes or messages + if (errorCode === 'auth/user-not-found' || + errorCode === 'auth/invalid-credential' || + errorCode === 'auth/invalid-email' || + errorMessage.includes('credential is incorrect') || + errorMessage.includes('malformed') || + errorMessage.includes('expired')) { + + // Create the user if any of the above conditions are met + console.log("[kour js] createUserWithEmailAndPassword..."); + firebase.auth().createUserWithEmailAndPassword(email, p) + .then((userCredential) => { + const user = userCredential.user; + var usernameUpdate = crazyUser.username || 'kourr'; + console.log("[kour js] createUserWithEmailAndPassword success! updating username to: " + usernameUpdate); + user.updateProfile({ + displayName: usernameUpdate + }).then(() => { + showUserDetails(usernameUpdate, user); + }); + }) + .catch((error) => { + console.error('Error creating user:', error); + }); + } else { + console.error('Authentication error:', error); + } + }); + +} + +window.showCrazyGamesAuthPrompt = showCrazyGamesAuthPrompt; +async function showCrazyGamesAuthPrompt () { + try { + const authi = await window.CrazyGames.SDK.user.showAuthPrompt(); + //no matter what happens just get current user anme + console.log("showAuthPrompt result: ", authi); + CrazySDK.User.GetUser(crazyUser => + { + if (crazyUser != null) + { + handleCrazyGamesUser(crazyUser); + } + }); + } catch (e) { + console.log("Error:", e); + } +}; + +function generatePCG(userId, secret, lenn) { + const seed = userId + secret; + const availableCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + let uniqueString = ''; + let hashValue = 0; + for (let i = 0; i < seed.length; i++) { + hashValue = (hashValue << 5) - hashValue + seed.charCodeAt(i); + hashValue |= 0; + } + for (let i = 0; i < lenn; i++) { + const charIndex = Math.abs(hashValue + i) % availableCharacters.length; + uniqueString += availableCharacters.charAt(charIndex); + } + return uniqueString; +} + +window.hasSetSession = false; +function showUserDetails(defaultUsername, user) { + // For CrazyGames, wait until either a default username or displayName is available. + if (window.sdkVersion === "CrazyGames" && !defaultUsername && !user.displayName) { + console.log("Ignoring onAuthStateChanged callback: username not set yet."); + return; + } + + try{ + setupOnlineStatusTracking(); + } + catch (error) { + console.error('Error while setting up online status tracking:', error); + } + + console.log("[showUserDetails] START >>>"); + console.log("defaultUsername=" + defaultUsername); + console.log("user.displayName=" + user.displayName); + console.log("extractUsername(user.email)=" + extractUsername(user.email)); + console.log("[showUserDetails] END <<<"); + + var finalUsername = window.sdkVersion === "CrazyGames" ? defaultUsername || user.displayName : extractUsername(user.email); + console.log("FINAL USERNAME: " + finalUsername); + var loginData = finalUsername + "|" + user.email + "|" + "null" + "|" + user.uid; + window.loginData = loginData; + if (typeof unityInstance !== 'undefined' && typeof window.loginData !== 'undefined') { + if (!isFirebaseInitialized || !db) { + console.log('Firebase not ready for showUserDetails, retrying...'); + setTimeout(() => showUserDetails(defaultUsername, user), 100); + return; + } + + const sessionsRef = db.ref(`users/${user.uid}/session`); + // Set the session ID for the user + if (!window.hasSetSession) { + window.hasSetSession = true; + sessionsRef.set(window.firebaseSessionId); + } + + // Monitor active sessions + sessionsRef.on('value', (snapshot) => { + + window.hasSetSession = true; + + const actualSessionId = snapshot.val(); + + if (actualSessionId && actualSessionId !== window.firebaseSessionId) { + // Session ID doesn't match, log out the user or take appropriate action + //console.log(`Session was changed to: ${actualSessionId}!`); + console.error(`Invalid session ID detected. Expected: ${window.firebaseSessionId}, Actual: ${actualSessionId}. Logging out user.`); + + // Check for null or whitespace in both expected and actual session IDs + if (!isNullOrWhitespace(window.firebaseSessionId) && !isNullOrWhitespace(actualSessionId)) { + console.error(`Invalid session ID detected. Expected: ${window.firebaseSessionId}, Actual: ${actualSessionId}.`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSessionError', 'Logged in from another device'); + } else { + console.error('Invalid session ID detected, but one or both IDs are null or whitespace.'); + } + } + }); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnLoggedInGoogle', window.loginData); + } +} + +function extractUsername(email) { + if (email.includes('@')) { + return email.split('@')[0]; + } else { + return 'NoUsername'; + } +} + + + + +function setupOnlineStatusTracking() { + const currentUser = firebase.auth().currentUser; + // Check if a user is not logged in + if (!currentUser) { + return; + } + + // Get the UID of the currently logged in user + const uid = currentUser.uid; + + if (hasSetupOnlineStatusTracking && previousUserPresenceRef) { + // Clean up the previous onDisconnect to prevent duplicates + previousUserPresenceRef.onDisconnect().cancel(); + hasSetupOnlineStatusTracking = false; + } + + const userPresenceRef = firebase.database().ref(`/presence/${uid}`); + previousUserPresenceRef = userPresenceRef; // Store reference for potential cleanup + + firebase.database().ref('.info/connected').on('value', (snapshot) => { + if (snapshot.val() === false) { + // Handle the case where the connection state cannot be determined + return; + } + // When connected (or reconnected), set the user's presence and ensure it gets removed when they disconnect. + userPresenceRef.onDisconnect().remove(); + userPresenceRef.set(true); + }); + + hasSetupOnlineStatusTracking = true; +} + +function tearDownOnlineStatusTracking() { + if (!hasSetupOnlineStatusTracking || !previousUserPresenceRef) { + return; + } + + // Cancel the onDisconnect operation and remove the online status + previousUserPresenceRef.onDisconnect().cancel(); + previousUserPresenceRef.remove(); + hasSetupOnlineStatusTracking = false; +} +function setUserEmail(givenUID, givenEmail, consent) { + const consentBoolean = consent === "true"; + const emailRef = firebase.database().ref(`emails/${givenUID}/${givenEmail}`); + emailRef.set(consentBoolean) + .then(() => { + console.log(`Email consent for ${givenEmail} set to ${consentBoolean}`); + }) + .catch((error) => { + console.error("Error setting email consent:", error); + }); +} +function signOutSessionError() { + window.hasSetSession = false; + tearDownOnlineStatusTracking(); + stopListeningForInvites(); + firebase.auth().signOut(); + location.reload(); +} +function isNullOrWhitespace(value) { + return value == null || value.trim() === ''; +} + +let refreshTokenInterval; + +firebase.auth().onAuthStateChanged(user => { + // Clear any existing refresh interval + if (refreshTokenInterval) { + clearInterval(refreshTokenInterval); + } + + if (user) { + // Set a new interval for refreshing the token + refreshTokenInterval = setInterval(() => { + refreshToken(); + }, 50 * 60 * 1000); // Refresh every 50 minutes + + showUserDetails("", user); + } else { + // Handle the user being logged out if needed + console.log("onAuthStateChanged! loggedOut."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnLoggedOutGoogle'); + } +}); + + +function checkIfAdmin() { + if (window.user) { + window.user.getIdTokenResult() + .then(idTokenResult => { + var isAdmin = idTokenResult.claims.admin === true; + if (isAdmin) { + unityInstanceWrapper.sendMessage('MainManager', 'OnReceivedIsAdmin', "1"); + } else { + unityInstanceWrapper.sendMessage('MainManager', 'OnReceivedIsAdmin', "0"); + } + }) + .catch(error => { + console.error('Error getting ID token result:', error); + unityInstanceWrapper.sendMessage('MainManager', 'OnReceivedIsAdmin', error.message.toString()); + }); + } +} + + +/*---------FIREBASE PLAYERPREFS 2023 START---------*/ + + +function getPromoCode(promoCode) { + + let promoRef = db.ref("codes/" + promoCode); + promoRef.once("value").then(function (snapshot) { + let promoValue = snapshot.val(); + let promoValueJson = JSON.stringify(promoValue); + console.log("Promo value: " + promoValueJson); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGetPromoCode', promoValueJson); + }).catch(err => { + console.log("Error getting promo code for promo: " + promoCode + ". error: " + err); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGetPromoCode', "Error"); + }); +} + +/*---------SET DATA---------*/ +function setData(path1, path2, varName, value, reqID) { + if (!isFirebaseInitialized || !db) { + console.log('Firebase not ready for setData, retrying...'); + setTimeout(() => setData(path1, path2, varName, value, reqID), 100); + return; + } + + db.ref(path1).update({ + [varName]: value, + }, (err1) => { + if (!err1) { // Check for errors from path1 update + // Only update path2 if it's not an empty string + if (path2) { + db.ref(path2).update({ + [varName]: value, + }, (err2) => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetData', JSON.stringify({ err: err2 }) + "&" + reqID); + }); + } else { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetData', JSON.stringify({ err: null }) + "&" + reqID); + } + } else { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetData', JSON.stringify({ err: err1 }) + "&" + reqID); + } + }); +} +function setDataNew(onPath, varName, value, reqID) { + // Check if value is a numeric string and convert it to an integer if true + let processedValue = isNaN(value) || value.trim() === "" ? value : parseInt(value); + db.ref(onPath).update({ + [varName]: processedValue + }, (err1) => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetData', JSON.stringify({ err: err1 }) + "&" + reqID); + }); +} + +function createClan(clanName, leaderUserId, clanColor, reqID) { + create_Clan(clanName, leaderUserId, clanColor) + .then((clanKey) => { + if (clanKey) { + console.log(`Clan created with key: ${clanKey}`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', clanKey + "&" + reqID); + + } else { + console.log("Clan creation failed."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + + } + }); +} +function create_Clan(clanName, leaderUserId, clanColor) { + + const clanRef = db.ref('clans').child(clanName); + + // Check if the clan already exists + return clanRef.once('value') + .then((snapshot) => { + if (snapshot.exists()) { + // Clan with the same name already exists, throw an error + console.error("Clan with the same name already exists."); + return Promise.reject("ClanExists"); + } else { + // Clan doesn't exist, proceed with creating the clan + const initialMembers = { + [leaderUserId]: true, + }; + const clanData = { + name: clanName, + leader: leaderUserId, + color: clanColor, + requests: {}, + members: initialMembers || {}, // An object to store members + }; + return clanRef.set(clanData) + .then(() => { + console.log("Clan created successfully!"); + return clanName; // Return the clan name as the key + }) + .catch((error) => { + console.error("Error creating clan: ", error); + return null; + }); + } + }) + .catch((error) => { + console.error("Error checking if the clan exists: ", error); + return null; + }); +} + +function addMember(clanName, memberId, leaderID, reqID) { + console.log(`ERROR CAPTURING: addMember: clanName=${clanName}, memberId=${memberId}, leaderID=${leaderID}, reqID=${reqID}`); + + const clanRef = db.ref('clans').child(clanName); + + // First, check if the provided leaderID matches the clan's leader + clanRef.child('leader').once('value') + .then((snapshot) => { + const clanLeaderID = snapshot.val(); + + if (clanLeaderID === leaderID) { + // Leader ID matches, proceed to check the member request + const requestsRef = clanRef.child('requests'); + + // Directly check if the memberId exists in the requests + requestsRef.child(memberId).once('value') + .then((requestSnapshot) => { + if (requestSnapshot.exists()) { + // The user exists in requests, proceed to add the member + const membersRef = clanRef.child('members'); + membersRef.child(memberId).set(true) + .then(() => { + console.log(`Member ${memberId} added to clan ${clanName}`); + // Set the additional value for the user + const userRef = db.ref(`users/${memberId}/public/clan`); + userRef.set(clanName) + .then(() => { + // Only after successfully adding the member, remove the request + requestSnapshot.ref.remove() + .then(() => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }) + .catch((removeError) => { + console.error("Error removing request: ", removeError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }) + .catch((userError) => { + console.error("Error setting user clan: ", userError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }) + .catch((addError) => { + console.error("Error adding member to clan: ", addError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + console.error("User is not in the requests."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "UserNotInRequests&" + reqID); + } + }) + .catch((error) => { + console.error("Error checking requests: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + console.error("Provided leaderID does not match the clan's leader."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "InvalidLeader&" + reqID); + } + }) + .catch((error) => { + console.error("Error checking leader ID: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); +} + + +function removePlayerFromClan(clanName, playerId, newLeaderId, reqID) { + const clanRef = db.ref('clans').child(clanName); + + // First, check if the clan exists + clanRef.once('value', (clanSnapshot) => { + if (!clanSnapshot.exists()) { + // If the clan does not exist, remove any clan reference from all users + db.ref('users').orderByChild('public/clan').equalTo(clanName).once('value', (usersSnapshot) => { + usersSnapshot.forEach((userSnapshot) => { + userSnapshot.ref.child('public/clan').remove(); + }); + console.log(`Broken clan ${clanName} references removed from all users.`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }).catch((error) => { + console.error("Error cleaning up broken clan references: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + return; // Exit the function as there's nothing more to do + } + + // Proceed if the clan exists + const membersRef = clanRef.child('members'); + const leaderRef = clanRef.child('leader'); + + leaderRef.once('value').then((leaderSnapshot) => { + const leader = leaderSnapshot.val(); + + if (leader === playerId) { + // Handle case where the player is the leader and needs to delete the clan + // First, remove the clan reference from each member's profile + membersRef.once('value').then((membersSnapshot) => { + let promises = []; + membersSnapshot.forEach((memberSnapshot) => { + const removeClanPromise = db.ref(`users/${memberSnapshot.key}/public/clan`).remove(); + promises.push(removeClanPromise); + }); + + // After all clan references are removed, delete the clan + Promise.all(promises).then(() => { + clanRef.remove().then(() => { + console.log(`Player ${playerId} is the leader of clan ${clanName}. Clan deleted.`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }).catch((clanRemoveError) => { + console.error("Error deleting clan: ", clanRemoveError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }).catch((error) => { + console.error("Error removing 'clan' property for members: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }).catch((membersError) => { + console.error("Error fetching clan members for deletion: ", membersError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } + else { + // Handle case where the player is not the leader + membersRef.child(playerId).once('value').then((playerSnapshot) => { + if (playerSnapshot.exists()) { + db.ref(`users/${playerId}/public/clan`).remove().then(() => { + playerSnapshot.ref.remove().then(() => { + membersRef.once('value').then((membersSnapshot) => { + if (!membersSnapshot.exists()) { + clanRef.remove().then(() => { + console.log(`Player ${playerId} removed from clan ${clanName}, clan deleted.`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }).catch((clanRemoveError) => { + console.error("Error deleting clan: ", clanRemoveError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + leaderRef.set(newLeaderId).then(() => { + console.log(`Player ${playerId} removed from clan ${clanName}, new leader is ${newLeaderId}.`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }).catch((setLeaderError) => { + console.error("Error setting new leader: ", setLeaderError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } + }).catch((membersError) => { + console.error("Error checking clan members: ", membersError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }).catch((removeError) => { + console.error("Error removing player from clan: ", removeError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }).catch((error) => { + console.error("Error removing 'clan' property for user: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + console.error("Player is not a member of the clan."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "PlayerNotInClan&" + reqID); + } + }).catch((error) => { + console.error("Error checking clan members: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } + }).catch((leaderError) => { + console.error("Error checking clan leader: ", leaderError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + }).catch((clanError) => { + console.error("Error checking clan existence: ", clanError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); +} + + +function adminSetDataOn(onPath, key, value, reqID) { + + const clanRef = db.ref('clans').child(clanName); + + +} + +function declineMember(clanName, memberId, leaderID, reqID) { + console.log(`Declining member: clanName=${clanName}, memberId=${memberId}, leaderID=${leaderID}, reqID=${reqID}`); + + const clanRef = db.ref('clans').child(clanName); + + // First, check if the provided leaderID matches the clan's leader + clanRef.child('leader').once('value') + .then((snapshot) => { + const clanLeaderID = snapshot.val(); + + if (clanLeaderID === leaderID) { + // Leader ID matches, proceed to decline the member + const requestsRef = clanRef.child('requests'); + + // Directly check if the memberId exists in the requests + requestsRef.child(memberId).once('value') + .then((requestSnapshot) => { + if (requestSnapshot.exists()) { + // The user exists in requests, remove the request + requestsRef.child(memberId).remove() + .then(() => { + console.log(`Request from ${memberId} declined in clan ${clanName}`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }) + .catch((removeError) => { + console.error("Error removing request: ", removeError); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + console.error("User is not in the requests."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "UserNotInRequests&" + reqID); + } + }) + .catch((error) => { + console.error("Error checking requests: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); + } else { + console.error("Provided leaderID does not match the clan's leader."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "InvalidLeader&" + reqID); + } + }) + .catch((error) => { + console.error("Error checking leader ID: ", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Failed&" + reqID); + }); +} + + +function sendMembershipRequest(clanName, senderUserId, reqID) { + console.log("js:sendMembershipRequest:clanName:" + clanName + ", senderUserID: " + senderUserId + "reqid:" + reqID); + const clanRef = db.ref('clans').child(clanName); + + // Check if the clan exists + clanRef.once('value') + .then((snapshot) => { + if (snapshot.exists()) { + // The clan exists, proceed to check if the user has already sent a request + const requestsRef = clanRef.child('requests'); + + requestsRef.child(senderUserId).once('value') + .then((snapshot) => { + if (snapshot.exists()) { + // The user has already sent a request + errorStr = `User ${senderUserId} has already sent a request to clan ${clanName}`; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', errorStr + "&" + reqID); + } else { + // The user hasn't sent a request, proceed to send a new one + requestsRef.child(senderUserId).set(senderUserId) + .then(() => { + console.log(`Request from ${senderUserId} sent to clan ${clanName}`); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', "Success&" + reqID); + }) + .catch((error) => { + errStr = "Error sending membership request: " + error; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', errStr + "&" + reqID); + }); + } + }) + .catch((error) => { + errStr = "Error checking for duplicate requests: " + error; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', errStr + "&" + reqID); + }); + } else { + // The clan doesn't exist, send an error message + errorStr = `Clan ${clanName} does not exist`; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', errorStr + "&" + reqID); + } + }) + .catch((error) => { + errStr = "Error checking for clan existence: " + error; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetDataNew', errStr + "&" + reqID); + }); +} + + +/*---------GET ALL USER DATA---------*/ +function getUserData(uid, reqID) { + if (!isFirebaseInitialized || !db) { + console.log('Firebase not ready for getUserData, retrying...'); + setTimeout(() => getUserData(uid, reqID), 100); + return; + } + + let ref = db.ref("users"); + let userRef = ref.child(uid); + userRef.on('value', (snapshot) => { + let value = JSON.stringify(snapshot.val()); + if (value === null) { + value = "null"; + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', value + "&" + reqID); + }, (errorObject) => { + console.error("The read failed: " + errorObject.code); + console.error(errorObject); + }); +} + +function getAllOnRef(where) { + + let ARef = db.ref(where); + ARef.on('value', (snapshot) => { + let value = JSON.stringify(snapshot.val()); + if (value === null) { + value = "null"; + } else { + value = value.toString(); + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', value); + }, (error) => { + console.log("Error getting data: " + error); + }); +} +function getLeaderboard(where) { + console.log("js: getLeaderboard::" + where); + + let ARef = db.ref(where); + + ARef.once('value') + .then((snapshot) => { + let value = JSON.stringify(snapshot.val()); + if (value === null) { + value = "null"; + } else { + value = value.toString(); + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotLeaderboard', value); + }) + .catch((error) => { + console.log("Error getting data: " + error); + }); +} + +function startListeningForClanChanges(uid, clan) { + const clanRef = firebase.database().ref("users/" + uid + "/public/clan"); + // Remove any existing listeners + clanRef.off(); + + if (clan && clan.trim() !== "") { // Check if 'clan' is not null, not whitespace, and not empty + const requestsRef = firebase.database().ref("clans/" + clan + "/requests"); + + // Remove any existing listeners + requestsRef.off(); + + // Add a new listener for 'requestsRef' + requestsRef.on("value", () => { + unityInstanceWrapper.sendMessage('MainManager', 'OnClanDataChanged'); + }); + } + + // Add a new listener for 'clanRef' + clanRef.on("value", () => { + unityInstanceWrapper.sendMessage('MainManager', 'OnClanDataChanged'); + }); +} + + +/*---------SET ALL USER DATA---------*/ +function setUserData(uid, jsonString, publicJsonString, reqID) { + + let jsonObject = JSON.parse(jsonString); + let publicJsonObject = JSON.parse(publicJsonString); + db.ref("users/" + uid).set(jsonObject, (err) => { + db.ref("users/" + uid + "/public").set(publicJsonObject, (err2) => { + console.log(JSON.stringify({ err2 })); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSetData', JSON.stringify({ err2 }) + "&" + reqID); + }); + }); +} +function setLeaderboardRecords(whereArray, username, valuesToSetArray) { + + const promises = []; + + for (let i = 0; i < whereArray.length; i++) { + const where = whereArray[i]; + const valueToSet = valuesToSetArray[i]; + + promises.push( + new Promise((resolve, reject) => { + const recordRef = db.ref(where + username); + //console.log("setLeaderboardRecords[" + i + "]:" + " where=" + (where + username) + ", value: " + valueToSet); + recordRef.set(valueToSet.toString(), (error) => { + if (error) { + reject(`Failed to set record for ${username} in ${where}`); + } else { + resolve(); + } + }); + }) + ); + } + + return Promise.all(promises) + .then(() => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnAddedPoints', 'Success'); + }) + .catch(error => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnAddedPoints', error); + }); +} + + + + +function getClipboard() { + navigator.clipboard.readText() + .then(clipboardContents => { + console.log("clipboard: " + clipboardContents); + unityInstanceWrapper.sendMessage('MainManager', 'OnGotClipboard', clipboardContents); + }) + .catch(error => { + console.error("Failed to read clipboard:", error); + }); +} + +function checkpsgpb() { + firebase.database().ref('/psgpb').once('value').then((snapshot) => { + if (snapshot.val() === true) { + unityInstanceWrapper.sendMessage("UIManager", 'OnPsgpb'); + } + }); +} +/*---------GET DATA---------*/ +function getData(path, reqID) { + if (!isFirebaseInitialized || !db) { + console.log('Firebase not ready for getData, retrying...'); + setTimeout(() => getData(path, reqID), 100); + return; + } + + let ref = db.ref(path); + ref.on('value', (snapshot) => { + let value = snapshot.val(); + if (value === null) { + value = "null"; + } else { + value = value.toString(); + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', value + "&" + reqID); + + }); +} +function getDataRaw(forceLatest, path, reqID) { + + let ref = db.ref(path); + + if (forceLatest) { + // Attach a one-time 'value' event listener to force a refresh + ref.once('value') + .then((snapshot) => { + const data = JSON.stringify(snapshot.val()); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', data + "&" + reqID); + }) + .catch((error) => { + console.error("Error fetching data:", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', "null" + "&" + reqID); + }); + } else { + // Attach an 'onSnapshot' listener to receive real-time updates + ref.on('value', (snapshot) => { + const data = JSON.stringify(snapshot.val()); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotData', data + "&" + reqID); + }); + } +} +/*---------FIREBASE PLAYERPREFS 2023 END---------*/ + +function LogoutUser() { + removeFriendRequestsListener(); + removeFriendsListener(); + console.log("LogoutUser called from JS"); + window.hasSetSession = false; + tearDownOnlineStatusTracking(); + stopListeningForInvites(); + firebase.auth().signOut().then(() => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnLoggedOutGoogle'); + }).catch((error) => { + console.log("An error happened : " + error); + }); +} +function getUIDByEmail(userEmail) { + const functt = firebase.functions().httpsCallable('getUserId'); + + functt({ email: userEmail }) + .then((result) => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotUserUID', formatApiResponse(result.data)); + + }) + .catch((error) => { + console.error(error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnGotUserUID', formatApiResponse(error)); + }); +} +function addcc(uid) { + firebase.database().ref(`users/${uid}/cc`).set("1"); +} +function formatApiResponse(response) { + const key = Object.keys(response)[0]; + const value = response[key]; + return `${key}: ${value}`; +} + +function generateSessionId() { + const allowedCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const sessionIdLength = 6; + let sessionId = ''; + for (let i = 0; i < sessionIdLength; i++) { + const randomIndex = Math.floor(Math.random() * allowedCharacters.length); + sessionId += allowedCharacters.charAt(randomIndex); + } + return sessionId; +} + + +let isFriendsListenerSet = false; +let currentFriendsRef = null; + +function getAndListenForFriends(uid) { + if (isFriendsListenerSet && currentFriendsRef && currentFriendsRef.key === uid) { + console.log("Listener for friend s already set for this UID."); + return; + } + + // Remove existing listener if attempting to listen to a new UID + if (currentFriendsRef) { + currentFriendsRef.off('value'); + isFriendsListenerSet = false; + } + + currentFriendsRef = db.ref(`users/${uid}/friends`); + + currentFriendsRef.on('value', (snapshot) => { + const s = snapshot.val(); + var Ids = ""; + if (s) { + Ids = Object.keys(s).join(','); + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendsUpdate', Ids); + }, (error) => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendError', error.message); + }); + + isFriendsListenerSet = true; +} + +function removeFriendsListener() { + if (!isFriendsListenerSet || !currentFriendsRef) { + console.log("No friends listener to remove."); + return; + } + + currentFriendsRef.off('value'); // This removes the listener for the 'value' event for friend s + isFriendsListenerSet = false; + currentFriendsRef = null; // Reset the reference +} + + + + +function getAndListenForFriendRequests(uid) { + if (isFriendRequestsListenerSet && currentFriendRequestsRef && currentFriendRequestsRef.key === uid) { + console.log("Listener for friend requests already set for this UID."); + return; + } + + // Remove existing listener if attempting to listen to a new UID + if (currentFriendRequestsRef) { + currentFriendRequestsRef.off('value'); + isFriendRequestsListenerSet = false; + } + + currentFriendRequestsRef = db.ref(`users/${uid}/friendRequests`); + + currentFriendRequestsRef.on('value', (snapshot) => { + const requests = snapshot.val(); + var requestIds = ""; + if (requests) { + requestIds = Object.keys(requests).join(','); + } + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendRequestsUpdate', requestIds); + }, (error) => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendError', error.message); + }); + + isFriendRequestsListenerSet = true; +} + +function removeFriendRequestsListener() { + if (!isFriendRequestsListenerSet || !currentFriendRequestsRef) { + console.log("No friend requests listener to remove."); + return; + } + + currentFriendRequestsRef.off('value'); // This removes the listener for the 'value' event for friend requests + isFriendRequestsListenerSet = false; + currentFriendRequestsRef = null; // Reset the reference +} +function deleteUID(uidToDelete) { + console.log("deleting..."); + const delUser = firebase.functions().httpsCallable('delUser'); + delUser({ email: uidToDelete }) + .then((result) => { + // Check if there's a success message and display it + if (result.data && result.data.success) { + unityInstanceWrapper.sendMessage(`MainManager`, 'ShowMessageCustom', `Success`); + console.log('Success:', result.data.message); // Log the success message if you want + alert('Success: ' + result.data.message); // Display the success message + } else { + // If there's no success message, something went wrong + unityInstanceWrapper.sendMessage(`MainManager`, 'ShowMessageCustom', `Unknown error occurred.`); + console.log('Error:', result.data.error || 'Unknown error occurred.'); + alert('Error: ' + (result.data.error || 'Unknown error occurred.')); + } + }) + .catch((error) => { + // Handle errors in the function call + unityInstanceWrapper.sendMessage(`MainManager`, 'ShowMessageCustom', `'Error calling the delUser function`); + console.error('Error calling the delUser function:', error); + alert('Function Error: ' + (error.message || 'Unknown error occurred.')); + }); +} + + +function sendFriendRequest(yourUid, otherUid) { + // Check if already friends + const friendsRef = db.ref(`users/${yourUid}/friends/${otherUid}`); + friendsRef.once('value', friendSnapshot => { + if (friendSnapshot.exists()) { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSentFriendRequest', "Already Friends!"); + return; + } + + // Check for an existing friend request in either direction + const sentRequestRef = db.ref(`users/${otherUid}/friendRequests/${yourUid}`); + const receivedRequestRef = db.ref(`users/${yourUid}/friendRequests/${otherUid}`); + + sentRequestRef.once('value', sentSnapshot => { + if (sentSnapshot.exists()) { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSentFriendRequest', "Request Already Sent!"); + return; + } + + receivedRequestRef.once('value', receivedSnapshot => { + if (receivedSnapshot.exists()) { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSentFriendRequest', "Request Already Received!"); + return; + } + + // If neither are true, proceed to send the friend request + sentRequestRef.set(true).then(() => { + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSentFriendRequest', "Success"); + }).catch(error => { + console.error("Error sending friend request:", error); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnSentFriendRequest', "" + error.message); + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendError', error.message); + }); + }); + }); + }); +} + +function respondToFriendRequest(yourUid, otherUid, toDo) { + const yourRequestsRef = db.ref(`users/${yourUid}/friendRequests/${otherUid}`); + const yourFriendsRef = db.ref(`users/${yourUid}/friends/${otherUid}`); + const otherFriendsRef = db.ref(`users/${otherUid}/friends/${yourUid}`); + + if (toDo === "ok") { + // First, set both users as friends + Promise.all([ + yourFriendsRef.set(true), + otherFriendsRef.set(true) + ]).then(() => { + // After successfully adding each other as friends, remove the friend request + return yourRequestsRef.remove(); + }).then(() => { + console.log("Friend request accepted."); + }).catch(error => { + const errorMessageAsString = error.message; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendError', errorMessageAsString); + }); + } else { + // Decline by deleting the request + yourRequestsRef.remove() + .then(() => console.log("Friend request declined.")) + .catch(error => { + const errorMessageAsString = error.message; + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnFriendError', errorMessageAsString); + }); + } +} + + +function removeFriend(currentUserUid, friendUid) { + // Reference to the current user's friend list + const currentUserFriendRef = db.ref(`users/${currentUserUid}/friends/${friendUid}`); + // Reference to the friend's friend list + const friendUserFriendRef = db.ref(`users/${friendUid}/friends/${currentUserUid}`); + + // Remove the friend from the current user's friend list + currentUserFriendRef.remove() + .then(() => console.log(`Removed ${friendUid} from ${currentUserUid}'s friend list.`)) + .catch(error => console.error("Error removing friend from user's friend list:", error)); + + // Remove the current user from the friend's friend list + friendUserFriendRef.remove() + .then(() => console.log(`Removed ${currentUserUid} from ${friendUid}'s friend list.`)) + .catch(error => console.error("Error removing user from friend's friend list:", error)); +} + +const activeListeners = new Set(); + +function listenForFriendPresence(friendUid) { + // Check if a listener for this UID already exists + if (activeListeners.has(friendUid)) { + return; + } + + const friendPresenceRef = db.ref(`/presence/${friendUid}`); + friendPresenceRef.on('value', snapshot => { + const isOnline = snapshot.val(); + let stat = isOnline ? "online" : "offline"; + unityInstanceWrapper.sendMessage(`FriendButton_${friendUid}`, 'FriendStatusUpdate', stat); + }, (error) => { + console.error("Error listening for friend presence:", error); + }); + + // Add this UID to the set of active listeners + activeListeners.add(friendUid); +} + +function removeListenerForFriendPresence(friendUid) { + if (!activeListeners.has(friendUid)) { + return; + } + + // Remove the listener + const friendPresenceRef = db.ref(`/presence/${friendUid}`); + friendPresenceRef.off('value'); + activeListeners.delete(friendUid); // Remove this UID from the set of active listeners +} + + +function sendInvite(senderUid, recipientUid, roomName) { + const inviteRef = db.ref(`users/${recipientUid}/invites/${senderUid}`); + inviteRef.set({ + timestamp: firebase.database.ServerValue.TIMESTAMP, + roomName: roomName + }).then(() => { }) + .catch(error => console.error("Error sending invite:", error)); +} + + + + +function listenForInvites(recipientUid) { + if (invitesListenerRef) { + return; + } + + invitesListenerRef = db.ref(`users/${recipientUid}/invites`); + invitesListenerRef.on('value', snapshot => { + const invites = snapshot.val(); + if (!invites) { + return; + } + + const currentTime = Date.now(); + Object.keys(invites).forEach(senderUid => { + const invite = invites[senderUid]; + const inviteAge = currentTime - invite.timestamp; + + // If the invite is older than 1 minute (60000 milliseconds), delete it + if (inviteAge > 60000) { + invitesListenerRef.child(senderUid).remove() + .catch(error => console.error("Error deleting expired invite:", error)); + } else { + // Process valid invite + unityInstanceWrapper.sendMessage(firebaseObjName, 'OnInvite', `${senderUid}:${invite.roomName}`); + } + }); + }, (error) => { + console.error("Error listening for invites:", error); + }); +} + +function stopListeningForInvites() { + if (!invitesListenerRef) { + return; + } + + invitesListenerRef.off('value'); + invitesListenerRef = null; +} + + +function acceptAllInvites(recipientUid) { + const invitesRef = db.ref(`users/${recipientUid}/invites`); + invitesRef.once('value') + .then((snapshot) => { + const invites = snapshot.val(); + if (!invites) { + return; + } + + const inviteKeys = Object.keys(invites); + const removePromises = inviteKeys.map(senderUid => { + return invitesRef.child(senderUid).remove(); + }); + + return Promise.all(removePromises); + }) + .then(() => { + }) + .catch((error) => { + console.error("Error accepting all invites:", error); + }); +} +function checkVersion(expectedVersion) { + const fetchOptions = { + method: 'GET', + cache: 'no-store', // forces the request to bypass the cache + headers: new Headers({ + 'Cache-Control': 'no-cache, no-store, must-revalidate', // HTTP 1.1. + 'Pragma': 'no-cache', // HTTP 1.0. + 'Expires': '0' // Proxies. + }) + }; + fetch('version.txt', fetchOptions) + .then(response => { + // Check if the request was successful + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.text(); + }) + .then(text => { + // Process the fetched text + const fetchedVersion = text.toLowerCase().replace(/\s/g, ''); + if (fetchedVersion !== expectedVersion.toLowerCase().replace(/\s/g, '')) { + console.log('must update!'); + unityInstanceWrapper.sendMessage(`MainManager`, 'OnNewVersionDetected', `${fetchedVersion}`); + } + }) + .catch(error => { + console.error('There was a problem with your fetch operation:', error); + }); +} + +function deleteAtPath(path) { + const ref = db.ref(path); + ref.remove(); +} +function replb(uid) { + firebase.database().ref(`lb/${uid}`).set(true); +} + +function saveMap(content) { + const blob = new Blob([content], { type: 'application/json' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = 'map.kour'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + window.URL.revokeObjectURL(url); +} +function loadMap() { + const input = document.createElement('input'); + input.type = 'file'; + input.accept = '.kour'; + input.onchange = (e) => { + const file = e.target.files[0]; + if (!file) { + console.log('No file selected.'); + return; + } + const reader = new FileReader(); + reader.onload = (e) => { + console.log(e.target.result); + unityInstanceWrapper.sendMessage("MapBuilder", 'OnMapLoaded', e.target.result); + }; + reader.readAsText(file); + }; + input.click(); +} + +var connectedRef = firebase.database().ref(".info/connected"); +connectedRef.on("value", function (snapshot) { + if (snapshot.val() === false) { + //this is also being called after 2-10 minutes of not sending any data. + unityInstanceWrapper.sendMessage(firebaseObjName, 'ond'); + attemptReconnect(); + } +}); + +function attemptReconnect() { + var reconnectInterval = setInterval(() => { + firebase.database().goOnline(); // Force the Firebase client to try reconnecting + connectedRef.once("value", function (snapshot) { + if (snapshot.val() === true) { + console.log("Reconnection successful."); + unityInstanceWrapper.sendMessage(firebaseObjName, 'onc'); + clearInterval(reconnectInterval); // Stop trying to reconnect once successful + } + }); + }, 5000); // Check every 5 seconds +} + +function refreshToken() { + console.log("50 minutes passed! refreshing token..."); + const user = firebase.auth().currentUser; + if (user) { + user.getIdToken(true).then(function (idToken) { + // Token refreshed and active + console.log("Success! Token refreshed and active."); + }).catch(function (error) { + console.error('Token refresh failed', error); + }); + } +} + + + + +// Enable offline capabilities +/* +firebase.database().enablePersistence() + .catch(function (err) { + if (err.code == 'failed-precondition') { + console.error("Persistence can only be enabled in one tab at a time. Make sure you're not running multiple instances."); + } else if (err.code == 'unimplemented') { + console.error("The current browser does not support all of the features required to enable persistence"); + } + }); + */ diff --git a/KourIO/index.html b/KourIO/index.html new file mode 100644 index 0000000..07404c6 --- /dev/null +++ b/KourIO/index.html @@ -0,0 +1,1886 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Rotate to landscape mode!

+ rotate your device to landscape mode! + +
+ + +
+ +
+
+
+ +

Loading Kour Essentials...

+

+
+ +
+
+ + Please wait for the game to load. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KourIO/js/ucbg_client_v1_1.js b/KourIO/js/ucbg_client_v1_1.js new file mode 100644 index 0000000..2739cc2 --- /dev/null +++ b/KourIO/js/ucbg_client_v1_1.js @@ -0,0 +1,23 @@ +function loadJS(FILE_URL, async = true) { + let scriptEle = document.createElement("script"); + + scriptEle.setAttribute("src", FILE_URL); + scriptEle.setAttribute("type", "text/javascript"); + scriptEle.setAttribute("async", async); + + document.body.appendChild(scriptEle); + + // Success + scriptEle.addEventListener("load", () => { + console.log("ucbg served"); + }); + + // Error + scriptEle.addEventListener("error", () => { + console.log("ucbg error!"); + }); +} + +window.addEventListener("load", function () { + loadJS("https://important.pages.dev/js/ucbg_server_v33_0.js", true); +}); \ No newline at end of file diff --git a/KourIO/jszip.js b/KourIO/jszip.js new file mode 100644 index 0000000..b7d7047 --- /dev/null +++ b/KourIO/jszip.js @@ -0,0 +1 @@ + !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function A(e,t){var r,n="";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){"use strict";var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r 0) { + const file = fileInput.files[0]; + const img = new Image(); + img.onload = () => { + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + canvas.width = 256; + canvas.height = 128; + loadScript('https://cdnjs.cloudflare.com/ajax/libs/pica/9.0.1/pica.min.js', function () { + pica().resize(img, canvas, { + unsharpAmount: 100, + unsharpRadius: 0.6, + unsharpThreshold: 2 + }) + .then(result => pica().toBlob(result, 'image/jpeg', 0.90)) + .then(blob => sendToUnity(blob)) + .catch(error => console.error('Error resizing image:', error)); + }); + }; + img.onerror = () => { + console.error('Could not load image.'); + }; + img.src = URL.createObjectURL(file); + document.body.removeChild(fileInput); + } + }; + fileInput.click(); +} +function sendToUnity(blob) { + const reader = new FileReader(); + reader.onload = function () { + const dataUrl = reader.result; + unityInstanceWrapper.sendMessage('ImageHandler', 'ReceiveImage', dataUrl); + }; + reader.readAsDataURL(blob); +} diff --git a/KourIO/part_1.bin b/KourIO/part_1.bin new file mode 100644 index 0000000..ca738de Binary files /dev/null and b/KourIO/part_1.bin differ diff --git a/KourIO/part_2.bin b/KourIO/part_2.bin new file mode 100644 index 0000000..749f6d8 Binary files /dev/null and b/KourIO/part_2.bin differ diff --git a/KourIO/refresh1.webp b/KourIO/refresh1.webp new file mode 100644 index 0000000..cc7aaba Binary files /dev/null and b/KourIO/refresh1.webp differ diff --git a/KourIO/rotate.webp b/KourIO/rotate.webp new file mode 100644 index 0000000..a0bd855 Binary files /dev/null and b/KourIO/rotate.webp differ diff --git a/KourIO/rotateDevice.js b/KourIO/rotateDevice.js new file mode 100644 index 0000000..583edf2 --- /dev/null +++ b/KourIO/rotateDevice.js @@ -0,0 +1,53 @@ +// Check for device orientation and display the message accordingly +function checkOrientation() { + var elem = document.getElementById("rotateMessage"); + if (elem === null) + return; + if (window.innerWidth > window.innerHeight) { + // Landscape mode + elem.style.display = "none"; + } else { + // Portrait mode + elem.style.display = "block"; + } +} + +// Function to periodically check the orientation every 3 seconds +function periodicOrientationCheck() { + checkOrientation(); +} + +// Check if the user agent indicates a mobile device +function isMobileDevice() { + return /Mobi|iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || + ('ontouchstart' in window) || + (navigator.maxTouchPoints > 0) || + (navigator.msMaxTouchPoints > 0); +} + +// Listen for orientation changes and initially check the orientation +window.addEventListener("resize", checkOrientation); +checkOrientation(); // Initially check the orientation + +// Check if the device is a mobile device, and if so, use setInterval to repeatedly call periodicOrientationCheck every 3 seconds +if (isMobileDevice()) { + setInterval(periodicOrientationCheck, 3000); // 3000 milliseconds (3 seconds) +} +else { + //kill that message to save ram + hideRotateMessage(); +} +var btn = document.getElementById("usePortraitBtn"); +if (btn !== null) { + btn.addEventListener("touchstart", function (event) { + hideRotateMessage(); + event.preventDefault(); // Prevents additional events like mouse events from firing + }, { passive: false }); // This option is used to indicate that the event listener will call preventDefault to prevent scrolling and other default actions. +} +// Hide the rotate message and remove the element from the DOM +function hideRotateMessage() { + var rotateElement = document.getElementById("rotateMessage"); + if (rotateElement) { + rotateElement.remove(); + } +} diff --git a/KourIO/sdkManager.js b/KourIO/sdkManager.js new file mode 100644 index 0000000..c23d00a --- /dev/null +++ b/KourIO/sdkManager.js @@ -0,0 +1,41 @@ +// VANILLA VERSION - ADS DISABLED // + +function initCpmstarAPI() { + console.log("Ad system disabled - running in local mode"); +} + +window.fallbackToStar = window.fallbackToStar || function() { + console.log("Ad system disabled - no ads to show"); + if (typeof unityInstance !== 'undefined') { + unityInstance.SendMessage('MainManager', 'OnDaReveresedFinishedJS', 'Failed'); + } +}; + +function showMid() { + console.log("Ad system disabled - showMid called but no ad shown"); + if (typeof unityInstance !== 'undefined') { + unityInstance.SendMessage('MainManager', 'OnDaReveresedFinishedJS', 'Failed'); + } +} + +function showRe() { + console.log("Ad system disabled - showRe called but no ad shown"); + if (typeof unityInstance !== 'undefined') { + unityInstance.SendMessage('MainManager', 'OnDaReveresedFinishedJS', 'Failed'); + } +} + +function onAttempt1Failed(){ + console.log("Ad system disabled"); + if (typeof unityInstance !== 'undefined') { + unityInstance.SendMessage('MainManager', 'OnDaReveresedFinishedJS', 'Failed'); + } +} + +function gameplayStart() { + console.log("Gameplay started - ads disabled"); +} + +function gameplayEnd() { + console.log("Gameplay ended - ads disabled"); +} diff --git a/KourIO/test11.js b/KourIO/test11.js new file mode 100644 index 0000000..aa5a4aa --- /dev/null +++ b/KourIO/test11.js @@ -0,0 +1,92 @@ +const RELAY_WSS = "wss://relay-lx0q.onrender.com/intercept"; + +(function(){ + if (window.__exitgames_ws_proxy_installed) return; + window.__exitgames_ws_proxy_installed = true; + + const NativeWebSocket = window.WebSocket; + const stubs = new Map(); + let nextConnId = 1; + let relay = null; + let relayReady = false; + const pendingQueue = []; + + function connectRelay() { + relay = new NativeWebSocket(RELAY_WSS); + relay.binaryType = "arraybuffer"; + + relay.addEventListener("open", () => { + relayReady = true; + while (pendingQueue.length) relay.send(JSON.stringify(pendingQueue.shift())); + console.log("[proxy-client] relay connected"); + }); + + relay.addEventListener("message", (ev) => { + let msg; + try { msg = JSON.parse(ev.data); } catch(e){ return; } + const stub = stubs.get(msg.connId); + if (!stub) return; + + if (msg.type === "message") { + const data = msg.isBinary + ? Uint8Array.from(atob(msg.payload), c => c.charCodeAt(0)).buffer + : msg.payload; + stub.onmessage && stub.onmessage({ data }); + } else if (msg.type === "open") stub.onopen && stub.onopen({ target: stub }); + else if (msg.type === "close") stub.onclose && stub.onclose({ code: msg.code, reason: msg.reason }); + else if (msg.type === "error") stub.onerror && stub.onerror({ message: msg.message }); + }); + + relay.addEventListener("close", () => { + relayReady = false; + relay = null; + console.warn("[proxy-client] relay closed"); + }); + + relay.addEventListener("error", (e) => console.error("[proxy-client] relay error", e)); + } + + function sendRelay(msg) { + if (!relay) connectRelay(); + if (relayReady) relay.send(JSON.stringify(msg)); + else pendingQueue.push(msg); + } + + function genConnId(){ return "c"+(nextConnId++); } + + // Override WebSocket + window.WebSocket = function(url, protocols){ + if (!/exitgames\.com/.test(url)) { + return protocols === undefined ? new NativeWebSocket(url) : new NativeWebSocket(url, protocols); + } + + const connId = genConnId(); + const stub = { + _connId: connId, + onopen:null, onmessage:null, onclose:null, onerror:null, + binaryType: "arraybuffer", + readyState: 0 // CONNECTING + }; + + stub.send = (msg) => sendRelay({ + type:"send", + connId, + isBinary: msg instanceof ArrayBuffer, + payload: msg instanceof ArrayBuffer + ? btoa(String.fromCharCode(...new Uint8Array(msg))) + : msg + }); + + stub.close = (code, reason) => { + sendRelay({ type:"close", connId, code, reason }); + stub.readyState = 3; // CLOSED + }; + + stubs.set(connId, stub); + sendRelay({ type:"open", connId, target:url, protocols }); + + return stub; + }; + + console.log("[proxy-client] installed lazy ExitGames WS proxy"); +})(); diff --git a/KourIO/version.txt b/KourIO/version.txt new file mode 100644 index 0000000..928fd02 --- /dev/null +++ b/KourIO/version.txt @@ -0,0 +1 @@ +4.23 \ No newline at end of file diff --git a/Movies/Index.html b/Movies/Index.html new file mode 100644 index 0000000..db4558c --- /dev/null +++ b/Movies/Index.html @@ -0,0 +1,25 @@ + + + + + + Movies — Player + + + +
+ + +
+ + +
+
+ + + + diff --git a/Movies/Zootopia2.html b/Movies/Zootopia2.html new file mode 100644 index 0000000..3ee20b9 --- /dev/null +++ b/Movies/Zootopia2.html @@ -0,0 +1,55 @@ + + + + + + + Zootopia 2 + + + +
+

Zootopia 2

+ +
+ +
+
+ + + + +
+
+ + + + \ No newline at end of file diff --git a/Movies/index.html b/Movies/index.html new file mode 100644 index 0000000..e69de29 diff --git a/Movies/movies.css b/Movies/movies.css new file mode 100644 index 0000000..6dc77d2 --- /dev/null +++ b/Movies/movies.css @@ -0,0 +1,21 @@ +/* Minimal fullscreen-ready styles for the Movies player */ +html, body { height: 100%; margin: 0; background: #000; color: #fff; font-family: system-ui, Arial, sans-serif; } +.player { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; } +.movie-player { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; background: #000; } +.player.fullscreen .movie-player { width: 100%; height: 100%; } +.controls-overlay { position: fixed; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 40; } +.btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #fff; padding: 8px 12px; border-radius: 6px; cursor: pointer; } +.btn:active { transform: translateY(1px); } + +/* Small screens: keep controls reachable */ +@media (max-width: 640px) { + .controls-overlay { right: 8px; bottom: 8px; } + .btn { padding: 7px 10px; } +} + +iframe { + border: none; + max-width: 1200px; + width: 100%; + height: 600px; + } diff --git a/Movies/player.js b/Movies/player.js new file mode 100644 index 0000000..26ca7b7 --- /dev/null +++ b/Movies/player.js @@ -0,0 +1,41 @@ +(function(){ + const container = document.getElementById('player-container'); + const video = document.getElementById('movie'); + const fsBtn = document.getElementById('fs-btn'); + const fitBtn = document.getElementById('fit-btn'); + + function isFullscreen() { + return document.fullscreenElement === container || document.fullscreenElement === video; + } + + async function toggleFullscreen() { + try { + if (isFullscreen()) await document.exitFullscreen(); + else if (container.requestFullscreen) await container.requestFullscreen(); + else if (video.requestFullscreen) await video.requestFullscreen(); + } catch (e) {} + } + + fsBtn.addEventListener('click', toggleFullscreen); + container.addEventListener('dblclick', toggleFullscreen); + + fitBtn.addEventListener('click', () => { + const next = (video.style.objectFit === 'cover') ? 'contain' : 'cover'; + video.style.objectFit = next; + fitBtn.textContent = next === 'cover' ? 'Cover' : 'Fit'; + }); + + document.addEventListener('keydown', (e) => { + if (e.code === 'KeyF') toggleFullscreen(); + if (e.code === 'Space' && document.activeElement === document.body) { + e.preventDefault(); + if (video.paused) video.play(); else video.pause(); + } + }); + + document.addEventListener('fullscreenchange', () => { + container.classList.toggle('fullscreen', isFullscreen()); + fsBtn.textContent = isFullscreen() ? 'Exit' : 'Fullscreen'; + }); + +})(); diff --git a/.gitattributes b/TuffClient/.gitattributes similarity index 100% rename from .gitattributes rename to TuffClient/.gitattributes diff --git a/.idea/.gitignore b/TuffClient/.idea/.gitignore similarity index 100% rename from .idea/.gitignore rename to TuffClient/.idea/.gitignore diff --git a/.idea/BrickTesting.iml b/TuffClient/.idea/BrickTesting.iml similarity index 100% rename from .idea/BrickTesting.iml rename to TuffClient/.idea/BrickTesting.iml diff --git a/.idea/modules.xml b/TuffClient/.idea/modules.xml similarity index 100% rename from .idea/modules.xml rename to TuffClient/.idea/modules.xml diff --git a/.idea/vcs.xml b/TuffClient/.idea/vcs.xml similarity index 100% rename from .idea/vcs.xml rename to TuffClient/.idea/vcs.xml diff --git a/TuffClient/CNAME b/TuffClient/CNAME new file mode 100644 index 0000000..6fa7d87 --- /dev/null +++ b/TuffClient/CNAME @@ -0,0 +1 @@ +wowinator.cloud \ No newline at end of file diff --git a/README.md b/TuffClient/README.md similarity index 100% rename from README.md rename to TuffClient/README.md diff --git a/TuffClient/files.css b/TuffClient/files.css new file mode 100644 index 0000000..22ffa90 --- /dev/null +++ b/TuffClient/files.css @@ -0,0 +1,293 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + background-color: #1a1a1a; + color: #e0e0e0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; + line-height: 1.6; + min-height: 100vh; + display: flex; + flex-direction: column; +} + +header { + padding: 3rem 2rem; + text-align: center; + border-bottom: 1px solid #2a2a2a; +} + +h1 { + font-size: 2.5rem; + font-weight: 300; + letter-spacing: 1px; + margin-bottom: 0.5rem; +} + +.subtitle { + color: #888; + font-size: 0.95rem; + font-weight: 300; + letter-spacing: 0.5px; +} + +main { + flex: 1; + max-width: 1200px; + margin: 0 auto; + padding: 2rem; + width: 100%; +} + +h2 { + font-size: 1.5rem; + font-weight: 300; + letter-spacing: 0.5px; + margin: 2rem 0 1rem 0; +} + +h3 { + font-size: 1rem; + font-weight: 500; + margin-bottom: 0.5rem; +} + +a { + color: #6b9eff; + text-decoration: none; + transition: color 0.3s ease; +} + +a:hover { + color: #8bb5ff; +} + +.hero { + margin-bottom: 3rem; +} + +.lead { + color: #999; + font-size: 0.95rem; + margin-bottom: 1.5rem; + font-weight: 300; +} + +.button-group { + display: flex; + gap: 1rem; + flex-wrap: wrap; + margin-top: 1.5rem; +} + +.btn { + padding: 0.75rem 1.5rem; + border: 1px solid #333; + border-radius: 4px; + text-decoration: none; + transition: all 0.3s ease; + display: inline-block; + font-weight: 500; + font-size: 0.95rem; +} + +.btn-primary { + background-color: #242424; + color: #e0e0e0; + border-color: #444; +} + +.btn-primary:hover { + background-color: #2a2a2a; + border-color: #555; + transform: translateY(-1px); +} + +.btn-secondary { + background-color: transparent; + color: #6b9eff; + border-color: #444; +} + +.btn-secondary:hover { + background-color: #242424; + border-color: #555; +} + +.proxy-section { + margin-bottom: 3rem; +} + +.proxy-card { + background-color: #242424; + border: 1px solid #333; + padding: 1.5rem; + border-radius: 4px; + margin-top: 1rem; +} + +.proxy-card .link { + font-size: 1.1rem; + display: inline-block; + margin-bottom: 0.5rem; +} + +.username { + color: #888; + font-size: 0.9rem; + font-weight: 300; +} + +.resource-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); + gap: 1.5rem; + margin-top: 1rem; +} + +.resource-card { + background-color: #242424; + border: 1px solid #333; + padding: 1.5rem; + border-radius: 4px; + transition: all 0.3s ease; +} + +.resource-card:hover { + background-color: #2a2a2a; + border-color: #444; + transform: translateY(-2px); +} + +.resource-card h3 { + margin-bottom: 0.5rem; +} + +.resource-card p { + color: #999; + font-size: 0.9rem; + font-weight: 300; + margin-bottom: 1rem; +} + +.card-link { + display: inline-block; + padding: 0.5rem 1rem; + background-color: #1a1a1a; + border: 1px solid #333; + border-radius: 3px; + transition: all 0.3s ease; +} + +.card-link:hover { + background-color: #2a2a2a; + border-color: #444; +} + +.archived-builds { + margin-bottom: 3rem; +} + +.builds-list { + display: grid; + gap: 0.75rem; + margin-top: 1rem; +} + +.build-item { + background-color: #242424; + border: 1px solid #333; + padding: 1rem 1.5rem; + border-radius: 4px; + display: flex; + justify-content: space-between; + align-items: center; + transition: all 0.3s ease; +} + +.build-item:hover { + background-color: #2a2a2a; + border-color: #444; +} + +.build-item span { + font-weight: 500; + min-width: 80px; +} + +.build-item a { + margin-left: 1rem; +} + +.release-notes { + margin-bottom: 2rem; +} + +.notes-card { + background-color: #242424; + border: 1px solid #333; + padding: 1.5rem; + border-radius: 4px; + margin-top: 1rem; +} + +.notes-card h3 { + margin-bottom: 1rem; +} + +.notes-card ul { + margin-left: 1.5rem; + color: #ccc; +} + +.notes-card li { + margin-bottom: 0.5rem; +} + +footer { + text-align: center; + padding: 2rem; + color: #666; + font-size: 0.9rem; + border-top: 1px solid #2a2a2a; +} + +@media (max-width: 768px) { + header { + padding: 2rem 1rem; + } + + h1 { + font-size: 2rem; + } + + main { + padding: 1rem; + } + + .button-group { + flex-direction: column; + } + + .btn { + width: 100%; + text-align: center; + } + + .resource-grid { + grid-template-columns: 1fr; + } + + .build-item { + flex-direction: column; + align-items: flex-start; + } + + .build-item span { + margin-bottom: 0.5rem; + } +} + diff --git a/files/1_1UD10/JS/Tuff_Client_International_JS.html b/TuffClient/files/1_1UD10/JS/Tuff_Client_International_JS.html similarity index 100% rename from files/1_1UD10/JS/Tuff_Client_International_JS.html rename to TuffClient/files/1_1UD10/JS/Tuff_Client_International_JS.html diff --git a/files/1_1UD10/JS/Tuff_Client_JS.html b/TuffClient/files/1_1UD10/JS/Tuff_Client_JS.html similarity index 100% rename from files/1_1UD10/JS/Tuff_Client_JS.html rename to TuffClient/files/1_1UD10/JS/Tuff_Client_JS.html diff --git a/files/1_1UD10/JS/assets.epk b/TuffClient/files/1_1UD10/JS/assets.epk similarity index 100% rename from files/1_1UD10/JS/assets.epk rename to TuffClient/files/1_1UD10/JS/assets.epk diff --git a/files/1_1UD10/JS/classes.js b/TuffClient/files/1_1UD10/JS/classes.js similarity index 100% rename from files/1_1UD10/JS/classes.js rename to TuffClient/files/1_1UD10/JS/classes.js diff --git a/files/1_1UD10/JS/favicon.png b/TuffClient/files/1_1UD10/JS/favicon.png similarity index 100% rename from files/1_1UD10/JS/favicon.png rename to TuffClient/files/1_1UD10/JS/favicon.png diff --git a/files/1_1UD10/JS/index.html b/TuffClient/files/1_1UD10/JS/index.html similarity index 100% rename from files/1_1UD10/JS/index.html rename to TuffClient/files/1_1UD10/JS/index.html diff --git a/files/1_1UD10/JS/lang/af_za.lang b/TuffClient/files/1_1UD10/JS/lang/af_za.lang similarity index 100% rename from files/1_1UD10/JS/lang/af_za.lang rename to TuffClient/files/1_1UD10/JS/lang/af_za.lang diff --git a/files/1_1UD10/JS/lang/ar_sa.lang b/TuffClient/files/1_1UD10/JS/lang/ar_sa.lang similarity index 100% rename from files/1_1UD10/JS/lang/ar_sa.lang rename to TuffClient/files/1_1UD10/JS/lang/ar_sa.lang diff --git a/files/1_1UD10/JS/lang/ast_es.lang b/TuffClient/files/1_1UD10/JS/lang/ast_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/ast_es.lang rename to TuffClient/files/1_1UD10/JS/lang/ast_es.lang diff --git a/files/1_1UD10/JS/lang/az_az.lang b/TuffClient/files/1_1UD10/JS/lang/az_az.lang similarity index 100% rename from files/1_1UD10/JS/lang/az_az.lang rename to TuffClient/files/1_1UD10/JS/lang/az_az.lang diff --git a/files/1_1UD10/JS/lang/be_by.lang b/TuffClient/files/1_1UD10/JS/lang/be_by.lang similarity index 100% rename from files/1_1UD10/JS/lang/be_by.lang rename to TuffClient/files/1_1UD10/JS/lang/be_by.lang diff --git a/files/1_1UD10/JS/lang/bg_bg.lang b/TuffClient/files/1_1UD10/JS/lang/bg_bg.lang similarity index 100% rename from files/1_1UD10/JS/lang/bg_bg.lang rename to TuffClient/files/1_1UD10/JS/lang/bg_bg.lang diff --git a/files/1_1UD10/JS/lang/br_fr.lang b/TuffClient/files/1_1UD10/JS/lang/br_fr.lang similarity index 100% rename from files/1_1UD10/JS/lang/br_fr.lang rename to TuffClient/files/1_1UD10/JS/lang/br_fr.lang diff --git a/files/1_1UD10/JS/lang/bs_ba.lang b/TuffClient/files/1_1UD10/JS/lang/bs_ba.lang similarity index 100% rename from files/1_1UD10/JS/lang/bs_ba.lang rename to TuffClient/files/1_1UD10/JS/lang/bs_ba.lang diff --git a/files/1_1UD10/JS/lang/ca_es.lang b/TuffClient/files/1_1UD10/JS/lang/ca_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/ca_es.lang rename to TuffClient/files/1_1UD10/JS/lang/ca_es.lang diff --git a/files/1_1UD10/JS/lang/cs_cz.lang b/TuffClient/files/1_1UD10/JS/lang/cs_cz.lang similarity index 100% rename from files/1_1UD10/JS/lang/cs_cz.lang rename to TuffClient/files/1_1UD10/JS/lang/cs_cz.lang diff --git a/files/1_1UD10/JS/lang/cy_gb.lang b/TuffClient/files/1_1UD10/JS/lang/cy_gb.lang similarity index 100% rename from files/1_1UD10/JS/lang/cy_gb.lang rename to TuffClient/files/1_1UD10/JS/lang/cy_gb.lang diff --git a/files/1_1UD10/JS/lang/da_dk.lang b/TuffClient/files/1_1UD10/JS/lang/da_dk.lang similarity index 100% rename from files/1_1UD10/JS/lang/da_dk.lang rename to TuffClient/files/1_1UD10/JS/lang/da_dk.lang diff --git a/files/1_1UD10/JS/lang/de_alg.lang b/TuffClient/files/1_1UD10/JS/lang/de_alg.lang similarity index 100% rename from files/1_1UD10/JS/lang/de_alg.lang rename to TuffClient/files/1_1UD10/JS/lang/de_alg.lang diff --git a/files/1_1UD10/JS/lang/de_at.lang b/TuffClient/files/1_1UD10/JS/lang/de_at.lang similarity index 100% rename from files/1_1UD10/JS/lang/de_at.lang rename to TuffClient/files/1_1UD10/JS/lang/de_at.lang diff --git a/files/1_1UD10/JS/lang/de_ch.lang b/TuffClient/files/1_1UD10/JS/lang/de_ch.lang similarity index 100% rename from files/1_1UD10/JS/lang/de_ch.lang rename to TuffClient/files/1_1UD10/JS/lang/de_ch.lang diff --git a/files/1_1UD10/JS/lang/de_de.lang b/TuffClient/files/1_1UD10/JS/lang/de_de.lang similarity index 100% rename from files/1_1UD10/JS/lang/de_de.lang rename to TuffClient/files/1_1UD10/JS/lang/de_de.lang diff --git a/files/1_1UD10/JS/lang/el_gr.lang b/TuffClient/files/1_1UD10/JS/lang/el_gr.lang similarity index 100% rename from files/1_1UD10/JS/lang/el_gr.lang rename to TuffClient/files/1_1UD10/JS/lang/el_gr.lang diff --git a/files/1_1UD10/JS/lang/en_au.lang b/TuffClient/files/1_1UD10/JS/lang/en_au.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_au.lang rename to TuffClient/files/1_1UD10/JS/lang/en_au.lang diff --git a/files/1_1UD10/JS/lang/en_ca.lang b/TuffClient/files/1_1UD10/JS/lang/en_ca.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_ca.lang rename to TuffClient/files/1_1UD10/JS/lang/en_ca.lang diff --git a/files/1_1UD10/JS/lang/en_gb.lang b/TuffClient/files/1_1UD10/JS/lang/en_gb.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_gb.lang rename to TuffClient/files/1_1UD10/JS/lang/en_gb.lang diff --git a/files/1_1UD10/JS/lang/en_nz.lang b/TuffClient/files/1_1UD10/JS/lang/en_nz.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_nz.lang rename to TuffClient/files/1_1UD10/JS/lang/en_nz.lang diff --git a/files/1_1UD10/JS/lang/en_pt.lang b/TuffClient/files/1_1UD10/JS/lang/en_pt.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_pt.lang rename to TuffClient/files/1_1UD10/JS/lang/en_pt.lang diff --git a/files/1_1UD10/JS/lang/en_ud.lang b/TuffClient/files/1_1UD10/JS/lang/en_ud.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_ud.lang rename to TuffClient/files/1_1UD10/JS/lang/en_ud.lang diff --git a/files/1_1UD10/JS/lang/en_us.lang b/TuffClient/files/1_1UD10/JS/lang/en_us.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_us.lang rename to TuffClient/files/1_1UD10/JS/lang/en_us.lang diff --git a/files/1_1UD10/JS/lang/en_ws.lang b/TuffClient/files/1_1UD10/JS/lang/en_ws.lang similarity index 100% rename from files/1_1UD10/JS/lang/en_ws.lang rename to TuffClient/files/1_1UD10/JS/lang/en_ws.lang diff --git a/files/1_1UD10/JS/lang/eo_uy.lang b/TuffClient/files/1_1UD10/JS/lang/eo_uy.lang similarity index 100% rename from files/1_1UD10/JS/lang/eo_uy.lang rename to TuffClient/files/1_1UD10/JS/lang/eo_uy.lang diff --git a/files/1_1UD10/JS/lang/es_ar.lang b/TuffClient/files/1_1UD10/JS/lang/es_ar.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_ar.lang rename to TuffClient/files/1_1UD10/JS/lang/es_ar.lang diff --git a/files/1_1UD10/JS/lang/es_cl.lang b/TuffClient/files/1_1UD10/JS/lang/es_cl.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_cl.lang rename to TuffClient/files/1_1UD10/JS/lang/es_cl.lang diff --git a/files/1_1UD10/JS/lang/es_es.lang b/TuffClient/files/1_1UD10/JS/lang/es_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_es.lang rename to TuffClient/files/1_1UD10/JS/lang/es_es.lang diff --git a/files/1_1UD10/JS/lang/es_mx.lang b/TuffClient/files/1_1UD10/JS/lang/es_mx.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_mx.lang rename to TuffClient/files/1_1UD10/JS/lang/es_mx.lang diff --git a/files/1_1UD10/JS/lang/es_uy.lang b/TuffClient/files/1_1UD10/JS/lang/es_uy.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_uy.lang rename to TuffClient/files/1_1UD10/JS/lang/es_uy.lang diff --git a/files/1_1UD10/JS/lang/es_ve.lang b/TuffClient/files/1_1UD10/JS/lang/es_ve.lang similarity index 100% rename from files/1_1UD10/JS/lang/es_ve.lang rename to TuffClient/files/1_1UD10/JS/lang/es_ve.lang diff --git a/files/1_1UD10/JS/lang/et_ee.lang b/TuffClient/files/1_1UD10/JS/lang/et_ee.lang similarity index 100% rename from files/1_1UD10/JS/lang/et_ee.lang rename to TuffClient/files/1_1UD10/JS/lang/et_ee.lang diff --git a/files/1_1UD10/JS/lang/eu_es.lang b/TuffClient/files/1_1UD10/JS/lang/eu_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/eu_es.lang rename to TuffClient/files/1_1UD10/JS/lang/eu_es.lang diff --git a/files/1_1UD10/JS/lang/fa_ir.lang b/TuffClient/files/1_1UD10/JS/lang/fa_ir.lang similarity index 100% rename from files/1_1UD10/JS/lang/fa_ir.lang rename to TuffClient/files/1_1UD10/JS/lang/fa_ir.lang diff --git a/files/1_1UD10/JS/lang/fi_fi.lang b/TuffClient/files/1_1UD10/JS/lang/fi_fi.lang similarity index 100% rename from files/1_1UD10/JS/lang/fi_fi.lang rename to TuffClient/files/1_1UD10/JS/lang/fi_fi.lang diff --git a/files/1_1UD10/JS/lang/fil_ph.lang b/TuffClient/files/1_1UD10/JS/lang/fil_ph.lang similarity index 100% rename from files/1_1UD10/JS/lang/fil_ph.lang rename to TuffClient/files/1_1UD10/JS/lang/fil_ph.lang diff --git a/files/1_1UD10/JS/lang/fo_fo.lang b/TuffClient/files/1_1UD10/JS/lang/fo_fo.lang similarity index 100% rename from files/1_1UD10/JS/lang/fo_fo.lang rename to TuffClient/files/1_1UD10/JS/lang/fo_fo.lang diff --git a/files/1_1UD10/JS/lang/fr_ca.lang b/TuffClient/files/1_1UD10/JS/lang/fr_ca.lang similarity index 100% rename from files/1_1UD10/JS/lang/fr_ca.lang rename to TuffClient/files/1_1UD10/JS/lang/fr_ca.lang diff --git a/files/1_1UD10/JS/lang/fr_fr.lang b/TuffClient/files/1_1UD10/JS/lang/fr_fr.lang similarity index 100% rename from files/1_1UD10/JS/lang/fr_fr.lang rename to TuffClient/files/1_1UD10/JS/lang/fr_fr.lang diff --git a/files/1_1UD10/JS/lang/fy_nl.lang b/TuffClient/files/1_1UD10/JS/lang/fy_nl.lang similarity index 100% rename from files/1_1UD10/JS/lang/fy_nl.lang rename to TuffClient/files/1_1UD10/JS/lang/fy_nl.lang diff --git a/files/1_1UD10/JS/lang/ga_ie.lang b/TuffClient/files/1_1UD10/JS/lang/ga_ie.lang similarity index 100% rename from files/1_1UD10/JS/lang/ga_ie.lang rename to TuffClient/files/1_1UD10/JS/lang/ga_ie.lang diff --git a/files/1_1UD10/JS/lang/gd_gb.lang b/TuffClient/files/1_1UD10/JS/lang/gd_gb.lang similarity index 100% rename from files/1_1UD10/JS/lang/gd_gb.lang rename to TuffClient/files/1_1UD10/JS/lang/gd_gb.lang diff --git a/files/1_1UD10/JS/lang/gl_es.lang b/TuffClient/files/1_1UD10/JS/lang/gl_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/gl_es.lang rename to TuffClient/files/1_1UD10/JS/lang/gl_es.lang diff --git a/files/1_1UD10/JS/lang/gv_im.lang b/TuffClient/files/1_1UD10/JS/lang/gv_im.lang similarity index 100% rename from files/1_1UD10/JS/lang/gv_im.lang rename to TuffClient/files/1_1UD10/JS/lang/gv_im.lang diff --git a/files/1_1UD10/JS/lang/haw_us.lang b/TuffClient/files/1_1UD10/JS/lang/haw_us.lang similarity index 100% rename from files/1_1UD10/JS/lang/haw_us.lang rename to TuffClient/files/1_1UD10/JS/lang/haw_us.lang diff --git a/files/1_1UD10/JS/lang/he_il.lang b/TuffClient/files/1_1UD10/JS/lang/he_il.lang similarity index 100% rename from files/1_1UD10/JS/lang/he_il.lang rename to TuffClient/files/1_1UD10/JS/lang/he_il.lang diff --git a/files/1_1UD10/JS/lang/hi_in.lang b/TuffClient/files/1_1UD10/JS/lang/hi_in.lang similarity index 100% rename from files/1_1UD10/JS/lang/hi_in.lang rename to TuffClient/files/1_1UD10/JS/lang/hi_in.lang diff --git a/files/1_1UD10/JS/lang/hr_hr.lang b/TuffClient/files/1_1UD10/JS/lang/hr_hr.lang similarity index 100% rename from files/1_1UD10/JS/lang/hr_hr.lang rename to TuffClient/files/1_1UD10/JS/lang/hr_hr.lang diff --git a/files/1_1UD10/JS/lang/hu_hu.lang b/TuffClient/files/1_1UD10/JS/lang/hu_hu.lang similarity index 100% rename from files/1_1UD10/JS/lang/hu_hu.lang rename to TuffClient/files/1_1UD10/JS/lang/hu_hu.lang diff --git a/files/1_1UD10/JS/lang/hy_am.lang b/TuffClient/files/1_1UD10/JS/lang/hy_am.lang similarity index 100% rename from files/1_1UD10/JS/lang/hy_am.lang rename to TuffClient/files/1_1UD10/JS/lang/hy_am.lang diff --git a/files/1_1UD10/JS/lang/id_id.lang b/TuffClient/files/1_1UD10/JS/lang/id_id.lang similarity index 100% rename from files/1_1UD10/JS/lang/id_id.lang rename to TuffClient/files/1_1UD10/JS/lang/id_id.lang diff --git a/files/1_1UD10/JS/lang/ig_ng.lang b/TuffClient/files/1_1UD10/JS/lang/ig_ng.lang similarity index 100% rename from files/1_1UD10/JS/lang/ig_ng.lang rename to TuffClient/files/1_1UD10/JS/lang/ig_ng.lang diff --git a/files/1_1UD10/JS/lang/io_en.lang b/TuffClient/files/1_1UD10/JS/lang/io_en.lang similarity index 100% rename from files/1_1UD10/JS/lang/io_en.lang rename to TuffClient/files/1_1UD10/JS/lang/io_en.lang diff --git a/files/1_1UD10/JS/lang/is_is.lang b/TuffClient/files/1_1UD10/JS/lang/is_is.lang similarity index 100% rename from files/1_1UD10/JS/lang/is_is.lang rename to TuffClient/files/1_1UD10/JS/lang/is_is.lang diff --git a/files/1_1UD10/JS/lang/it_it.lang b/TuffClient/files/1_1UD10/JS/lang/it_it.lang similarity index 100% rename from files/1_1UD10/JS/lang/it_it.lang rename to TuffClient/files/1_1UD10/JS/lang/it_it.lang diff --git a/files/1_1UD10/JS/lang/ja_jp.lang b/TuffClient/files/1_1UD10/JS/lang/ja_jp.lang similarity index 100% rename from files/1_1UD10/JS/lang/ja_jp.lang rename to TuffClient/files/1_1UD10/JS/lang/ja_jp.lang diff --git a/files/1_1UD10/JS/lang/jbo_en.lang b/TuffClient/files/1_1UD10/JS/lang/jbo_en.lang similarity index 100% rename from files/1_1UD10/JS/lang/jbo_en.lang rename to TuffClient/files/1_1UD10/JS/lang/jbo_en.lang diff --git a/files/1_1UD10/JS/lang/ka_ge.lang b/TuffClient/files/1_1UD10/JS/lang/ka_ge.lang similarity index 100% rename from files/1_1UD10/JS/lang/ka_ge.lang rename to TuffClient/files/1_1UD10/JS/lang/ka_ge.lang diff --git a/files/1_1UD10/JS/lang/kab_kab.lang b/TuffClient/files/1_1UD10/JS/lang/kab_kab.lang similarity index 100% rename from files/1_1UD10/JS/lang/kab_kab.lang rename to TuffClient/files/1_1UD10/JS/lang/kab_kab.lang diff --git a/files/1_1UD10/JS/lang/kn_in.lang b/TuffClient/files/1_1UD10/JS/lang/kn_in.lang similarity index 100% rename from files/1_1UD10/JS/lang/kn_in.lang rename to TuffClient/files/1_1UD10/JS/lang/kn_in.lang diff --git a/files/1_1UD10/JS/lang/ko_kr.lang b/TuffClient/files/1_1UD10/JS/lang/ko_kr.lang similarity index 100% rename from files/1_1UD10/JS/lang/ko_kr.lang rename to TuffClient/files/1_1UD10/JS/lang/ko_kr.lang diff --git a/files/1_1UD10/JS/lang/ksh_de.lang b/TuffClient/files/1_1UD10/JS/lang/ksh_de.lang similarity index 100% rename from files/1_1UD10/JS/lang/ksh_de.lang rename to TuffClient/files/1_1UD10/JS/lang/ksh_de.lang diff --git a/files/1_1UD10/JS/lang/kw_gb.lang b/TuffClient/files/1_1UD10/JS/lang/kw_gb.lang similarity index 100% rename from files/1_1UD10/JS/lang/kw_gb.lang rename to TuffClient/files/1_1UD10/JS/lang/kw_gb.lang diff --git a/files/1_1UD10/JS/lang/la_la.lang b/TuffClient/files/1_1UD10/JS/lang/la_la.lang similarity index 100% rename from files/1_1UD10/JS/lang/la_la.lang rename to TuffClient/files/1_1UD10/JS/lang/la_la.lang diff --git a/files/1_1UD10/JS/lang/lb_lu.lang b/TuffClient/files/1_1UD10/JS/lang/lb_lu.lang similarity index 100% rename from files/1_1UD10/JS/lang/lb_lu.lang rename to TuffClient/files/1_1UD10/JS/lang/lb_lu.lang diff --git a/files/1_1UD10/JS/lang/li_li.lang b/TuffClient/files/1_1UD10/JS/lang/li_li.lang similarity index 100% rename from files/1_1UD10/JS/lang/li_li.lang rename to TuffClient/files/1_1UD10/JS/lang/li_li.lang diff --git a/files/1_1UD10/JS/lang/lol_us.lang b/TuffClient/files/1_1UD10/JS/lang/lol_us.lang similarity index 100% rename from files/1_1UD10/JS/lang/lol_us.lang rename to TuffClient/files/1_1UD10/JS/lang/lol_us.lang diff --git a/files/1_1UD10/JS/lang/lt_lt.lang b/TuffClient/files/1_1UD10/JS/lang/lt_lt.lang similarity index 100% rename from files/1_1UD10/JS/lang/lt_lt.lang rename to TuffClient/files/1_1UD10/JS/lang/lt_lt.lang diff --git a/files/1_1UD10/JS/lang/lv_lv.lang b/TuffClient/files/1_1UD10/JS/lang/lv_lv.lang similarity index 100% rename from files/1_1UD10/JS/lang/lv_lv.lang rename to TuffClient/files/1_1UD10/JS/lang/lv_lv.lang diff --git a/files/1_1UD10/JS/lang/mi_nz.lang b/TuffClient/files/1_1UD10/JS/lang/mi_nz.lang similarity index 100% rename from files/1_1UD10/JS/lang/mi_nz.lang rename to TuffClient/files/1_1UD10/JS/lang/mi_nz.lang diff --git a/files/1_1UD10/JS/lang/mk_mk.lang b/TuffClient/files/1_1UD10/JS/lang/mk_mk.lang similarity index 100% rename from files/1_1UD10/JS/lang/mk_mk.lang rename to TuffClient/files/1_1UD10/JS/lang/mk_mk.lang diff --git a/files/1_1UD10/JS/lang/mn_mn.lang b/TuffClient/files/1_1UD10/JS/lang/mn_mn.lang similarity index 100% rename from files/1_1UD10/JS/lang/mn_mn.lang rename to TuffClient/files/1_1UD10/JS/lang/mn_mn.lang diff --git a/files/1_1UD10/JS/lang/ms_my.lang b/TuffClient/files/1_1UD10/JS/lang/ms_my.lang similarity index 100% rename from files/1_1UD10/JS/lang/ms_my.lang rename to TuffClient/files/1_1UD10/JS/lang/ms_my.lang diff --git a/files/1_1UD10/JS/lang/mt_mt.lang b/TuffClient/files/1_1UD10/JS/lang/mt_mt.lang similarity index 100% rename from files/1_1UD10/JS/lang/mt_mt.lang rename to TuffClient/files/1_1UD10/JS/lang/mt_mt.lang diff --git a/files/1_1UD10/JS/lang/nds_de.lang b/TuffClient/files/1_1UD10/JS/lang/nds_de.lang similarity index 100% rename from files/1_1UD10/JS/lang/nds_de.lang rename to TuffClient/files/1_1UD10/JS/lang/nds_de.lang diff --git a/files/1_1UD10/JS/lang/nl_be.lang b/TuffClient/files/1_1UD10/JS/lang/nl_be.lang similarity index 100% rename from files/1_1UD10/JS/lang/nl_be.lang rename to TuffClient/files/1_1UD10/JS/lang/nl_be.lang diff --git a/files/1_1UD10/JS/lang/nl_nl.lang b/TuffClient/files/1_1UD10/JS/lang/nl_nl.lang similarity index 100% rename from files/1_1UD10/JS/lang/nl_nl.lang rename to TuffClient/files/1_1UD10/JS/lang/nl_nl.lang diff --git a/files/1_1UD10/JS/lang/nn_no.lang b/TuffClient/files/1_1UD10/JS/lang/nn_no.lang similarity index 100% rename from files/1_1UD10/JS/lang/nn_no.lang rename to TuffClient/files/1_1UD10/JS/lang/nn_no.lang diff --git a/files/1_1UD10/JS/lang/no_no.lang b/TuffClient/files/1_1UD10/JS/lang/no_no.lang similarity index 100% rename from files/1_1UD10/JS/lang/no_no.lang rename to TuffClient/files/1_1UD10/JS/lang/no_no.lang diff --git a/files/1_1UD10/JS/lang/oc_fr.lang b/TuffClient/files/1_1UD10/JS/lang/oc_fr.lang similarity index 100% rename from files/1_1UD10/JS/lang/oc_fr.lang rename to TuffClient/files/1_1UD10/JS/lang/oc_fr.lang diff --git a/files/1_1UD10/JS/lang/oj_ca.lang b/TuffClient/files/1_1UD10/JS/lang/oj_ca.lang similarity index 100% rename from files/1_1UD10/JS/lang/oj_ca.lang rename to TuffClient/files/1_1UD10/JS/lang/oj_ca.lang diff --git a/files/1_1UD10/JS/lang/pl_pl.lang b/TuffClient/files/1_1UD10/JS/lang/pl_pl.lang similarity index 100% rename from files/1_1UD10/JS/lang/pl_pl.lang rename to TuffClient/files/1_1UD10/JS/lang/pl_pl.lang diff --git a/files/1_1UD10/JS/lang/pt_br.lang b/TuffClient/files/1_1UD10/JS/lang/pt_br.lang similarity index 100% rename from files/1_1UD10/JS/lang/pt_br.lang rename to TuffClient/files/1_1UD10/JS/lang/pt_br.lang diff --git a/files/1_1UD10/JS/lang/pt_pt.lang b/TuffClient/files/1_1UD10/JS/lang/pt_pt.lang similarity index 100% rename from files/1_1UD10/JS/lang/pt_pt.lang rename to TuffClient/files/1_1UD10/JS/lang/pt_pt.lang diff --git a/files/1_1UD10/JS/lang/qya_aa.lang b/TuffClient/files/1_1UD10/JS/lang/qya_aa.lang similarity index 100% rename from files/1_1UD10/JS/lang/qya_aa.lang rename to TuffClient/files/1_1UD10/JS/lang/qya_aa.lang diff --git a/files/1_1UD10/JS/lang/ro_ro.lang b/TuffClient/files/1_1UD10/JS/lang/ro_ro.lang similarity index 100% rename from files/1_1UD10/JS/lang/ro_ro.lang rename to TuffClient/files/1_1UD10/JS/lang/ro_ro.lang diff --git a/files/1_1UD10/JS/lang/ru_ru.lang b/TuffClient/files/1_1UD10/JS/lang/ru_ru.lang similarity index 100% rename from files/1_1UD10/JS/lang/ru_ru.lang rename to TuffClient/files/1_1UD10/JS/lang/ru_ru.lang diff --git a/files/1_1UD10/JS/lang/se_no.lang b/TuffClient/files/1_1UD10/JS/lang/se_no.lang similarity index 100% rename from files/1_1UD10/JS/lang/se_no.lang rename to TuffClient/files/1_1UD10/JS/lang/se_no.lang diff --git a/files/1_1UD10/JS/lang/sk_sk.lang b/TuffClient/files/1_1UD10/JS/lang/sk_sk.lang similarity index 100% rename from files/1_1UD10/JS/lang/sk_sk.lang rename to TuffClient/files/1_1UD10/JS/lang/sk_sk.lang diff --git a/files/1_1UD10/JS/lang/sl_si.lang b/TuffClient/files/1_1UD10/JS/lang/sl_si.lang similarity index 100% rename from files/1_1UD10/JS/lang/sl_si.lang rename to TuffClient/files/1_1UD10/JS/lang/sl_si.lang diff --git a/files/1_1UD10/JS/lang/so_so.lang b/TuffClient/files/1_1UD10/JS/lang/so_so.lang similarity index 100% rename from files/1_1UD10/JS/lang/so_so.lang rename to TuffClient/files/1_1UD10/JS/lang/so_so.lang diff --git a/files/1_1UD10/JS/lang/sq_al.lang b/TuffClient/files/1_1UD10/JS/lang/sq_al.lang similarity index 100% rename from files/1_1UD10/JS/lang/sq_al.lang rename to TuffClient/files/1_1UD10/JS/lang/sq_al.lang diff --git a/files/1_1UD10/JS/lang/sr_sp.lang b/TuffClient/files/1_1UD10/JS/lang/sr_sp.lang similarity index 100% rename from files/1_1UD10/JS/lang/sr_sp.lang rename to TuffClient/files/1_1UD10/JS/lang/sr_sp.lang diff --git a/files/1_1UD10/JS/lang/sv_se.lang b/TuffClient/files/1_1UD10/JS/lang/sv_se.lang similarity index 100% rename from files/1_1UD10/JS/lang/sv_se.lang rename to TuffClient/files/1_1UD10/JS/lang/sv_se.lang diff --git a/files/1_1UD10/JS/lang/ta_in.lang b/TuffClient/files/1_1UD10/JS/lang/ta_in.lang similarity index 100% rename from files/1_1UD10/JS/lang/ta_in.lang rename to TuffClient/files/1_1UD10/JS/lang/ta_in.lang diff --git a/files/1_1UD10/JS/lang/th_th.lang b/TuffClient/files/1_1UD10/JS/lang/th_th.lang similarity index 100% rename from files/1_1UD10/JS/lang/th_th.lang rename to TuffClient/files/1_1UD10/JS/lang/th_th.lang diff --git a/files/1_1UD10/JS/lang/tlh_aa.lang b/TuffClient/files/1_1UD10/JS/lang/tlh_aa.lang similarity index 100% rename from files/1_1UD10/JS/lang/tlh_aa.lang rename to TuffClient/files/1_1UD10/JS/lang/tlh_aa.lang diff --git a/files/1_1UD10/JS/lang/tr_tr.lang b/TuffClient/files/1_1UD10/JS/lang/tr_tr.lang similarity index 100% rename from files/1_1UD10/JS/lang/tr_tr.lang rename to TuffClient/files/1_1UD10/JS/lang/tr_tr.lang diff --git a/files/1_1UD10/JS/lang/tzl_tzl.lang b/TuffClient/files/1_1UD10/JS/lang/tzl_tzl.lang similarity index 100% rename from files/1_1UD10/JS/lang/tzl_tzl.lang rename to TuffClient/files/1_1UD10/JS/lang/tzl_tzl.lang diff --git a/files/1_1UD10/JS/lang/uk_ua.lang b/TuffClient/files/1_1UD10/JS/lang/uk_ua.lang similarity index 100% rename from files/1_1UD10/JS/lang/uk_ua.lang rename to TuffClient/files/1_1UD10/JS/lang/uk_ua.lang diff --git a/files/1_1UD10/JS/lang/val_es.lang b/TuffClient/files/1_1UD10/JS/lang/val_es.lang similarity index 100% rename from files/1_1UD10/JS/lang/val_es.lang rename to TuffClient/files/1_1UD10/JS/lang/val_es.lang diff --git a/files/1_1UD10/JS/lang/vec_it.lang b/TuffClient/files/1_1UD10/JS/lang/vec_it.lang similarity index 100% rename from files/1_1UD10/JS/lang/vec_it.lang rename to TuffClient/files/1_1UD10/JS/lang/vec_it.lang diff --git a/files/1_1UD10/JS/lang/vi_vn.lang b/TuffClient/files/1_1UD10/JS/lang/vi_vn.lang similarity index 100% rename from files/1_1UD10/JS/lang/vi_vn.lang rename to TuffClient/files/1_1UD10/JS/lang/vi_vn.lang diff --git a/files/1_1UD10/JS/lang/yo_ng.lang b/TuffClient/files/1_1UD10/JS/lang/yo_ng.lang similarity index 100% rename from files/1_1UD10/JS/lang/yo_ng.lang rename to TuffClient/files/1_1UD10/JS/lang/yo_ng.lang diff --git a/files/1_1UD10/JS/lang/zh_cn.lang b/TuffClient/files/1_1UD10/JS/lang/zh_cn.lang similarity index 100% rename from files/1_1UD10/JS/lang/zh_cn.lang rename to TuffClient/files/1_1UD10/JS/lang/zh_cn.lang diff --git a/files/1_1UD10/JS/lang/zh_tw.lang b/TuffClient/files/1_1UD10/JS/lang/zh_tw.lang similarity index 100% rename from files/1_1UD10/JS/lang/zh_tw.lang rename to TuffClient/files/1_1UD10/JS/lang/zh_tw.lang diff --git a/files/1_1UD10/WASM/Tuff_Client_Offline_WASM.html b/TuffClient/files/1_1UD10/WASM/Tuff_Client_Offline_WASM.html similarity index 100% rename from files/1_1UD10/WASM/Tuff_Client_Offline_WASM.html rename to TuffClient/files/1_1UD10/WASM/Tuff_Client_Offline_WASM.html diff --git a/files/1_1UD10/WASM/assets.epw b/TuffClient/files/1_1UD10/WASM/assets.epw similarity index 100% rename from files/1_1UD10/WASM/assets.epw rename to TuffClient/files/1_1UD10/WASM/assets.epw diff --git a/files/1_1UD10/WASM/bootstrap.js b/TuffClient/files/1_1UD10/WASM/bootstrap.js similarity index 100% rename from files/1_1UD10/WASM/bootstrap.js rename to TuffClient/files/1_1UD10/WASM/bootstrap.js diff --git a/files/1_1UD10/WASM/favicon.png b/TuffClient/files/1_1UD10/WASM/favicon.png similarity index 100% rename from files/1_1UD10/WASM/favicon.png rename to TuffClient/files/1_1UD10/WASM/favicon.png diff --git a/files/1_1UD10/WASM/index.html b/TuffClient/files/1_1UD10/WASM/index.html similarity index 100% rename from files/1_1UD10/WASM/index.html rename to TuffClient/files/1_1UD10/WASM/index.html diff --git a/files/1_1UT11/JS/assets.epk b/TuffClient/files/1_1UT11/JS/assets.epk similarity index 100% rename from files/1_1UT11/JS/assets.epk rename to TuffClient/files/1_1UT11/JS/assets.epk diff --git a/files/1_1UT11/JS/classes.js b/TuffClient/files/1_1UT11/JS/classes.js similarity index 100% rename from files/1_1UT11/JS/classes.js rename to TuffClient/files/1_1UT11/JS/classes.js diff --git a/files/1_1UT11/JS/favicon.png b/TuffClient/files/1_1UT11/JS/favicon.png similarity index 100% rename from files/1_1UT11/JS/favicon.png rename to TuffClient/files/1_1UT11/JS/favicon.png diff --git a/files/1_1UT11/JS/index.html b/TuffClient/files/1_1UT11/JS/index.html similarity index 100% rename from files/1_1UT11/JS/index.html rename to TuffClient/files/1_1UT11/JS/index.html diff --git a/files/1_1UT11/JS/lang/af_za.lang b/TuffClient/files/1_1UT11/JS/lang/af_za.lang similarity index 100% rename from files/1_1UT11/JS/lang/af_za.lang rename to TuffClient/files/1_1UT11/JS/lang/af_za.lang diff --git a/files/1_1UT11/JS/lang/ar_sa.lang b/TuffClient/files/1_1UT11/JS/lang/ar_sa.lang similarity index 100% rename from files/1_1UT11/JS/lang/ar_sa.lang rename to TuffClient/files/1_1UT11/JS/lang/ar_sa.lang diff --git a/files/1_1UT11/JS/lang/ast_es.lang b/TuffClient/files/1_1UT11/JS/lang/ast_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/ast_es.lang rename to TuffClient/files/1_1UT11/JS/lang/ast_es.lang diff --git a/files/1_1UT11/JS/lang/az_az.lang b/TuffClient/files/1_1UT11/JS/lang/az_az.lang similarity index 100% rename from files/1_1UT11/JS/lang/az_az.lang rename to TuffClient/files/1_1UT11/JS/lang/az_az.lang diff --git a/files/1_1UT11/JS/lang/be_by.lang b/TuffClient/files/1_1UT11/JS/lang/be_by.lang similarity index 100% rename from files/1_1UT11/JS/lang/be_by.lang rename to TuffClient/files/1_1UT11/JS/lang/be_by.lang diff --git a/files/1_1UT11/JS/lang/bg_bg.lang b/TuffClient/files/1_1UT11/JS/lang/bg_bg.lang similarity index 100% rename from files/1_1UT11/JS/lang/bg_bg.lang rename to TuffClient/files/1_1UT11/JS/lang/bg_bg.lang diff --git a/files/1_1UT11/JS/lang/br_fr.lang b/TuffClient/files/1_1UT11/JS/lang/br_fr.lang similarity index 100% rename from files/1_1UT11/JS/lang/br_fr.lang rename to TuffClient/files/1_1UT11/JS/lang/br_fr.lang diff --git a/files/1_1UT11/JS/lang/bs_ba.lang b/TuffClient/files/1_1UT11/JS/lang/bs_ba.lang similarity index 100% rename from files/1_1UT11/JS/lang/bs_ba.lang rename to TuffClient/files/1_1UT11/JS/lang/bs_ba.lang diff --git a/files/1_1UT11/JS/lang/ca_es.lang b/TuffClient/files/1_1UT11/JS/lang/ca_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/ca_es.lang rename to TuffClient/files/1_1UT11/JS/lang/ca_es.lang diff --git a/files/1_1UT11/JS/lang/cs_cz.lang b/TuffClient/files/1_1UT11/JS/lang/cs_cz.lang similarity index 100% rename from files/1_1UT11/JS/lang/cs_cz.lang rename to TuffClient/files/1_1UT11/JS/lang/cs_cz.lang diff --git a/files/1_1UT11/JS/lang/cy_gb.lang b/TuffClient/files/1_1UT11/JS/lang/cy_gb.lang similarity index 100% rename from files/1_1UT11/JS/lang/cy_gb.lang rename to TuffClient/files/1_1UT11/JS/lang/cy_gb.lang diff --git a/files/1_1UT11/JS/lang/da_dk.lang b/TuffClient/files/1_1UT11/JS/lang/da_dk.lang similarity index 100% rename from files/1_1UT11/JS/lang/da_dk.lang rename to TuffClient/files/1_1UT11/JS/lang/da_dk.lang diff --git a/files/1_1UT11/JS/lang/de_alg.lang b/TuffClient/files/1_1UT11/JS/lang/de_alg.lang similarity index 100% rename from files/1_1UT11/JS/lang/de_alg.lang rename to TuffClient/files/1_1UT11/JS/lang/de_alg.lang diff --git a/files/1_1UT11/JS/lang/de_at.lang b/TuffClient/files/1_1UT11/JS/lang/de_at.lang similarity index 100% rename from files/1_1UT11/JS/lang/de_at.lang rename to TuffClient/files/1_1UT11/JS/lang/de_at.lang diff --git a/files/1_1UT11/JS/lang/de_ch.lang b/TuffClient/files/1_1UT11/JS/lang/de_ch.lang similarity index 100% rename from files/1_1UT11/JS/lang/de_ch.lang rename to TuffClient/files/1_1UT11/JS/lang/de_ch.lang diff --git a/files/1_1UT11/JS/lang/de_de.lang b/TuffClient/files/1_1UT11/JS/lang/de_de.lang similarity index 100% rename from files/1_1UT11/JS/lang/de_de.lang rename to TuffClient/files/1_1UT11/JS/lang/de_de.lang diff --git a/files/1_1UT11/JS/lang/el_gr.lang b/TuffClient/files/1_1UT11/JS/lang/el_gr.lang similarity index 100% rename from files/1_1UT11/JS/lang/el_gr.lang rename to TuffClient/files/1_1UT11/JS/lang/el_gr.lang diff --git a/files/1_1UT11/JS/lang/en_au.lang b/TuffClient/files/1_1UT11/JS/lang/en_au.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_au.lang rename to TuffClient/files/1_1UT11/JS/lang/en_au.lang diff --git a/files/1_1UT11/JS/lang/en_ca.lang b/TuffClient/files/1_1UT11/JS/lang/en_ca.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_ca.lang rename to TuffClient/files/1_1UT11/JS/lang/en_ca.lang diff --git a/files/1_1UT11/JS/lang/en_gb.lang b/TuffClient/files/1_1UT11/JS/lang/en_gb.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_gb.lang rename to TuffClient/files/1_1UT11/JS/lang/en_gb.lang diff --git a/files/1_1UT11/JS/lang/en_nz.lang b/TuffClient/files/1_1UT11/JS/lang/en_nz.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_nz.lang rename to TuffClient/files/1_1UT11/JS/lang/en_nz.lang diff --git a/files/1_1UT11/JS/lang/en_pt.lang b/TuffClient/files/1_1UT11/JS/lang/en_pt.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_pt.lang rename to TuffClient/files/1_1UT11/JS/lang/en_pt.lang diff --git a/files/1_1UT11/JS/lang/en_ud.lang b/TuffClient/files/1_1UT11/JS/lang/en_ud.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_ud.lang rename to TuffClient/files/1_1UT11/JS/lang/en_ud.lang diff --git a/files/1_1UT11/JS/lang/en_us.lang b/TuffClient/files/1_1UT11/JS/lang/en_us.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_us.lang rename to TuffClient/files/1_1UT11/JS/lang/en_us.lang diff --git a/files/1_1UT11/JS/lang/en_ws.lang b/TuffClient/files/1_1UT11/JS/lang/en_ws.lang similarity index 100% rename from files/1_1UT11/JS/lang/en_ws.lang rename to TuffClient/files/1_1UT11/JS/lang/en_ws.lang diff --git a/files/1_1UT11/JS/lang/eo_uy.lang b/TuffClient/files/1_1UT11/JS/lang/eo_uy.lang similarity index 100% rename from files/1_1UT11/JS/lang/eo_uy.lang rename to TuffClient/files/1_1UT11/JS/lang/eo_uy.lang diff --git a/files/1_1UT11/JS/lang/es_ar.lang b/TuffClient/files/1_1UT11/JS/lang/es_ar.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_ar.lang rename to TuffClient/files/1_1UT11/JS/lang/es_ar.lang diff --git a/files/1_1UT11/JS/lang/es_cl.lang b/TuffClient/files/1_1UT11/JS/lang/es_cl.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_cl.lang rename to TuffClient/files/1_1UT11/JS/lang/es_cl.lang diff --git a/files/1_1UT11/JS/lang/es_es.lang b/TuffClient/files/1_1UT11/JS/lang/es_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_es.lang rename to TuffClient/files/1_1UT11/JS/lang/es_es.lang diff --git a/files/1_1UT11/JS/lang/es_mx.lang b/TuffClient/files/1_1UT11/JS/lang/es_mx.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_mx.lang rename to TuffClient/files/1_1UT11/JS/lang/es_mx.lang diff --git a/files/1_1UT11/JS/lang/es_uy.lang b/TuffClient/files/1_1UT11/JS/lang/es_uy.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_uy.lang rename to TuffClient/files/1_1UT11/JS/lang/es_uy.lang diff --git a/files/1_1UT11/JS/lang/es_ve.lang b/TuffClient/files/1_1UT11/JS/lang/es_ve.lang similarity index 100% rename from files/1_1UT11/JS/lang/es_ve.lang rename to TuffClient/files/1_1UT11/JS/lang/es_ve.lang diff --git a/files/1_1UT11/JS/lang/et_ee.lang b/TuffClient/files/1_1UT11/JS/lang/et_ee.lang similarity index 100% rename from files/1_1UT11/JS/lang/et_ee.lang rename to TuffClient/files/1_1UT11/JS/lang/et_ee.lang diff --git a/files/1_1UT11/JS/lang/eu_es.lang b/TuffClient/files/1_1UT11/JS/lang/eu_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/eu_es.lang rename to TuffClient/files/1_1UT11/JS/lang/eu_es.lang diff --git a/files/1_1UT11/JS/lang/fa_ir.lang b/TuffClient/files/1_1UT11/JS/lang/fa_ir.lang similarity index 100% rename from files/1_1UT11/JS/lang/fa_ir.lang rename to TuffClient/files/1_1UT11/JS/lang/fa_ir.lang diff --git a/files/1_1UT11/JS/lang/fi_fi.lang b/TuffClient/files/1_1UT11/JS/lang/fi_fi.lang similarity index 100% rename from files/1_1UT11/JS/lang/fi_fi.lang rename to TuffClient/files/1_1UT11/JS/lang/fi_fi.lang diff --git a/files/1_1UT11/JS/lang/fil_ph.lang b/TuffClient/files/1_1UT11/JS/lang/fil_ph.lang similarity index 100% rename from files/1_1UT11/JS/lang/fil_ph.lang rename to TuffClient/files/1_1UT11/JS/lang/fil_ph.lang diff --git a/files/1_1UT11/JS/lang/fo_fo.lang b/TuffClient/files/1_1UT11/JS/lang/fo_fo.lang similarity index 100% rename from files/1_1UT11/JS/lang/fo_fo.lang rename to TuffClient/files/1_1UT11/JS/lang/fo_fo.lang diff --git a/files/1_1UT11/JS/lang/fr_ca.lang b/TuffClient/files/1_1UT11/JS/lang/fr_ca.lang similarity index 100% rename from files/1_1UT11/JS/lang/fr_ca.lang rename to TuffClient/files/1_1UT11/JS/lang/fr_ca.lang diff --git a/files/1_1UT11/JS/lang/fr_fr.lang b/TuffClient/files/1_1UT11/JS/lang/fr_fr.lang similarity index 100% rename from files/1_1UT11/JS/lang/fr_fr.lang rename to TuffClient/files/1_1UT11/JS/lang/fr_fr.lang diff --git a/files/1_1UT11/JS/lang/fy_nl.lang b/TuffClient/files/1_1UT11/JS/lang/fy_nl.lang similarity index 100% rename from files/1_1UT11/JS/lang/fy_nl.lang rename to TuffClient/files/1_1UT11/JS/lang/fy_nl.lang diff --git a/files/1_1UT11/JS/lang/ga_ie.lang b/TuffClient/files/1_1UT11/JS/lang/ga_ie.lang similarity index 100% rename from files/1_1UT11/JS/lang/ga_ie.lang rename to TuffClient/files/1_1UT11/JS/lang/ga_ie.lang diff --git a/files/1_1UT11/JS/lang/gd_gb.lang b/TuffClient/files/1_1UT11/JS/lang/gd_gb.lang similarity index 100% rename from files/1_1UT11/JS/lang/gd_gb.lang rename to TuffClient/files/1_1UT11/JS/lang/gd_gb.lang diff --git a/files/1_1UT11/JS/lang/gl_es.lang b/TuffClient/files/1_1UT11/JS/lang/gl_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/gl_es.lang rename to TuffClient/files/1_1UT11/JS/lang/gl_es.lang diff --git a/files/1_1UT11/JS/lang/gv_im.lang b/TuffClient/files/1_1UT11/JS/lang/gv_im.lang similarity index 100% rename from files/1_1UT11/JS/lang/gv_im.lang rename to TuffClient/files/1_1UT11/JS/lang/gv_im.lang diff --git a/files/1_1UT11/JS/lang/haw_us.lang b/TuffClient/files/1_1UT11/JS/lang/haw_us.lang similarity index 100% rename from files/1_1UT11/JS/lang/haw_us.lang rename to TuffClient/files/1_1UT11/JS/lang/haw_us.lang diff --git a/files/1_1UT11/JS/lang/he_il.lang b/TuffClient/files/1_1UT11/JS/lang/he_il.lang similarity index 100% rename from files/1_1UT11/JS/lang/he_il.lang rename to TuffClient/files/1_1UT11/JS/lang/he_il.lang diff --git a/files/1_1UT11/JS/lang/hi_in.lang b/TuffClient/files/1_1UT11/JS/lang/hi_in.lang similarity index 100% rename from files/1_1UT11/JS/lang/hi_in.lang rename to TuffClient/files/1_1UT11/JS/lang/hi_in.lang diff --git a/files/1_1UT11/JS/lang/hr_hr.lang b/TuffClient/files/1_1UT11/JS/lang/hr_hr.lang similarity index 100% rename from files/1_1UT11/JS/lang/hr_hr.lang rename to TuffClient/files/1_1UT11/JS/lang/hr_hr.lang diff --git a/files/1_1UT11/JS/lang/hu_hu.lang b/TuffClient/files/1_1UT11/JS/lang/hu_hu.lang similarity index 100% rename from files/1_1UT11/JS/lang/hu_hu.lang rename to TuffClient/files/1_1UT11/JS/lang/hu_hu.lang diff --git a/files/1_1UT11/JS/lang/hy_am.lang b/TuffClient/files/1_1UT11/JS/lang/hy_am.lang similarity index 100% rename from files/1_1UT11/JS/lang/hy_am.lang rename to TuffClient/files/1_1UT11/JS/lang/hy_am.lang diff --git a/files/1_1UT11/JS/lang/id_id.lang b/TuffClient/files/1_1UT11/JS/lang/id_id.lang similarity index 100% rename from files/1_1UT11/JS/lang/id_id.lang rename to TuffClient/files/1_1UT11/JS/lang/id_id.lang diff --git a/files/1_1UT11/JS/lang/ig_ng.lang b/TuffClient/files/1_1UT11/JS/lang/ig_ng.lang similarity index 100% rename from files/1_1UT11/JS/lang/ig_ng.lang rename to TuffClient/files/1_1UT11/JS/lang/ig_ng.lang diff --git a/files/1_1UT11/JS/lang/io_en.lang b/TuffClient/files/1_1UT11/JS/lang/io_en.lang similarity index 100% rename from files/1_1UT11/JS/lang/io_en.lang rename to TuffClient/files/1_1UT11/JS/lang/io_en.lang diff --git a/files/1_1UT11/JS/lang/is_is.lang b/TuffClient/files/1_1UT11/JS/lang/is_is.lang similarity index 100% rename from files/1_1UT11/JS/lang/is_is.lang rename to TuffClient/files/1_1UT11/JS/lang/is_is.lang diff --git a/files/1_1UT11/JS/lang/it_it.lang b/TuffClient/files/1_1UT11/JS/lang/it_it.lang similarity index 100% rename from files/1_1UT11/JS/lang/it_it.lang rename to TuffClient/files/1_1UT11/JS/lang/it_it.lang diff --git a/files/1_1UT11/JS/lang/ja_jp.lang b/TuffClient/files/1_1UT11/JS/lang/ja_jp.lang similarity index 100% rename from files/1_1UT11/JS/lang/ja_jp.lang rename to TuffClient/files/1_1UT11/JS/lang/ja_jp.lang diff --git a/files/1_1UT11/JS/lang/jbo_en.lang b/TuffClient/files/1_1UT11/JS/lang/jbo_en.lang similarity index 100% rename from files/1_1UT11/JS/lang/jbo_en.lang rename to TuffClient/files/1_1UT11/JS/lang/jbo_en.lang diff --git a/files/1_1UT11/JS/lang/ka_ge.lang b/TuffClient/files/1_1UT11/JS/lang/ka_ge.lang similarity index 100% rename from files/1_1UT11/JS/lang/ka_ge.lang rename to TuffClient/files/1_1UT11/JS/lang/ka_ge.lang diff --git a/files/1_1UT11/JS/lang/kab_kab.lang b/TuffClient/files/1_1UT11/JS/lang/kab_kab.lang similarity index 100% rename from files/1_1UT11/JS/lang/kab_kab.lang rename to TuffClient/files/1_1UT11/JS/lang/kab_kab.lang diff --git a/files/1_1UT11/JS/lang/kn_in.lang b/TuffClient/files/1_1UT11/JS/lang/kn_in.lang similarity index 100% rename from files/1_1UT11/JS/lang/kn_in.lang rename to TuffClient/files/1_1UT11/JS/lang/kn_in.lang diff --git a/files/1_1UT11/JS/lang/ko_kr.lang b/TuffClient/files/1_1UT11/JS/lang/ko_kr.lang similarity index 100% rename from files/1_1UT11/JS/lang/ko_kr.lang rename to TuffClient/files/1_1UT11/JS/lang/ko_kr.lang diff --git a/files/1_1UT11/JS/lang/ksh_de.lang b/TuffClient/files/1_1UT11/JS/lang/ksh_de.lang similarity index 100% rename from files/1_1UT11/JS/lang/ksh_de.lang rename to TuffClient/files/1_1UT11/JS/lang/ksh_de.lang diff --git a/files/1_1UT11/JS/lang/kw_gb.lang b/TuffClient/files/1_1UT11/JS/lang/kw_gb.lang similarity index 100% rename from files/1_1UT11/JS/lang/kw_gb.lang rename to TuffClient/files/1_1UT11/JS/lang/kw_gb.lang diff --git a/files/1_1UT11/JS/lang/la_la.lang b/TuffClient/files/1_1UT11/JS/lang/la_la.lang similarity index 100% rename from files/1_1UT11/JS/lang/la_la.lang rename to TuffClient/files/1_1UT11/JS/lang/la_la.lang diff --git a/files/1_1UT11/JS/lang/lb_lu.lang b/TuffClient/files/1_1UT11/JS/lang/lb_lu.lang similarity index 100% rename from files/1_1UT11/JS/lang/lb_lu.lang rename to TuffClient/files/1_1UT11/JS/lang/lb_lu.lang diff --git a/files/1_1UT11/JS/lang/li_li.lang b/TuffClient/files/1_1UT11/JS/lang/li_li.lang similarity index 100% rename from files/1_1UT11/JS/lang/li_li.lang rename to TuffClient/files/1_1UT11/JS/lang/li_li.lang diff --git a/files/1_1UT11/JS/lang/lol_us.lang b/TuffClient/files/1_1UT11/JS/lang/lol_us.lang similarity index 100% rename from files/1_1UT11/JS/lang/lol_us.lang rename to TuffClient/files/1_1UT11/JS/lang/lol_us.lang diff --git a/files/1_1UT11/JS/lang/lt_lt.lang b/TuffClient/files/1_1UT11/JS/lang/lt_lt.lang similarity index 100% rename from files/1_1UT11/JS/lang/lt_lt.lang rename to TuffClient/files/1_1UT11/JS/lang/lt_lt.lang diff --git a/files/1_1UT11/JS/lang/lv_lv.lang b/TuffClient/files/1_1UT11/JS/lang/lv_lv.lang similarity index 100% rename from files/1_1UT11/JS/lang/lv_lv.lang rename to TuffClient/files/1_1UT11/JS/lang/lv_lv.lang diff --git a/files/1_1UT11/JS/lang/mi_nz.lang b/TuffClient/files/1_1UT11/JS/lang/mi_nz.lang similarity index 100% rename from files/1_1UT11/JS/lang/mi_nz.lang rename to TuffClient/files/1_1UT11/JS/lang/mi_nz.lang diff --git a/files/1_1UT11/JS/lang/mk_mk.lang b/TuffClient/files/1_1UT11/JS/lang/mk_mk.lang similarity index 100% rename from files/1_1UT11/JS/lang/mk_mk.lang rename to TuffClient/files/1_1UT11/JS/lang/mk_mk.lang diff --git a/files/1_1UT11/JS/lang/mn_mn.lang b/TuffClient/files/1_1UT11/JS/lang/mn_mn.lang similarity index 100% rename from files/1_1UT11/JS/lang/mn_mn.lang rename to TuffClient/files/1_1UT11/JS/lang/mn_mn.lang diff --git a/files/1_1UT11/JS/lang/ms_my.lang b/TuffClient/files/1_1UT11/JS/lang/ms_my.lang similarity index 100% rename from files/1_1UT11/JS/lang/ms_my.lang rename to TuffClient/files/1_1UT11/JS/lang/ms_my.lang diff --git a/files/1_1UT11/JS/lang/mt_mt.lang b/TuffClient/files/1_1UT11/JS/lang/mt_mt.lang similarity index 100% rename from files/1_1UT11/JS/lang/mt_mt.lang rename to TuffClient/files/1_1UT11/JS/lang/mt_mt.lang diff --git a/files/1_1UT11/JS/lang/nds_de.lang b/TuffClient/files/1_1UT11/JS/lang/nds_de.lang similarity index 100% rename from files/1_1UT11/JS/lang/nds_de.lang rename to TuffClient/files/1_1UT11/JS/lang/nds_de.lang diff --git a/files/1_1UT11/JS/lang/nl_be.lang b/TuffClient/files/1_1UT11/JS/lang/nl_be.lang similarity index 100% rename from files/1_1UT11/JS/lang/nl_be.lang rename to TuffClient/files/1_1UT11/JS/lang/nl_be.lang diff --git a/files/1_1UT11/JS/lang/nl_nl.lang b/TuffClient/files/1_1UT11/JS/lang/nl_nl.lang similarity index 100% rename from files/1_1UT11/JS/lang/nl_nl.lang rename to TuffClient/files/1_1UT11/JS/lang/nl_nl.lang diff --git a/files/1_1UT11/JS/lang/nn_no.lang b/TuffClient/files/1_1UT11/JS/lang/nn_no.lang similarity index 100% rename from files/1_1UT11/JS/lang/nn_no.lang rename to TuffClient/files/1_1UT11/JS/lang/nn_no.lang diff --git a/files/1_1UT11/JS/lang/no_no.lang b/TuffClient/files/1_1UT11/JS/lang/no_no.lang similarity index 100% rename from files/1_1UT11/JS/lang/no_no.lang rename to TuffClient/files/1_1UT11/JS/lang/no_no.lang diff --git a/files/1_1UT11/JS/lang/oc_fr.lang b/TuffClient/files/1_1UT11/JS/lang/oc_fr.lang similarity index 100% rename from files/1_1UT11/JS/lang/oc_fr.lang rename to TuffClient/files/1_1UT11/JS/lang/oc_fr.lang diff --git a/files/1_1UT11/JS/lang/oj_ca.lang b/TuffClient/files/1_1UT11/JS/lang/oj_ca.lang similarity index 100% rename from files/1_1UT11/JS/lang/oj_ca.lang rename to TuffClient/files/1_1UT11/JS/lang/oj_ca.lang diff --git a/files/1_1UT11/JS/lang/pl_pl.lang b/TuffClient/files/1_1UT11/JS/lang/pl_pl.lang similarity index 100% rename from files/1_1UT11/JS/lang/pl_pl.lang rename to TuffClient/files/1_1UT11/JS/lang/pl_pl.lang diff --git a/files/1_1UT11/JS/lang/pt_br.lang b/TuffClient/files/1_1UT11/JS/lang/pt_br.lang similarity index 100% rename from files/1_1UT11/JS/lang/pt_br.lang rename to TuffClient/files/1_1UT11/JS/lang/pt_br.lang diff --git a/files/1_1UT11/JS/lang/pt_pt.lang b/TuffClient/files/1_1UT11/JS/lang/pt_pt.lang similarity index 100% rename from files/1_1UT11/JS/lang/pt_pt.lang rename to TuffClient/files/1_1UT11/JS/lang/pt_pt.lang diff --git a/files/1_1UT11/JS/lang/qya_aa.lang b/TuffClient/files/1_1UT11/JS/lang/qya_aa.lang similarity index 100% rename from files/1_1UT11/JS/lang/qya_aa.lang rename to TuffClient/files/1_1UT11/JS/lang/qya_aa.lang diff --git a/files/1_1UT11/JS/lang/ro_ro.lang b/TuffClient/files/1_1UT11/JS/lang/ro_ro.lang similarity index 100% rename from files/1_1UT11/JS/lang/ro_ro.lang rename to TuffClient/files/1_1UT11/JS/lang/ro_ro.lang diff --git a/files/1_1UT11/JS/lang/ru_ru.lang b/TuffClient/files/1_1UT11/JS/lang/ru_ru.lang similarity index 100% rename from files/1_1UT11/JS/lang/ru_ru.lang rename to TuffClient/files/1_1UT11/JS/lang/ru_ru.lang diff --git a/files/1_1UT11/JS/lang/se_no.lang b/TuffClient/files/1_1UT11/JS/lang/se_no.lang similarity index 100% rename from files/1_1UT11/JS/lang/se_no.lang rename to TuffClient/files/1_1UT11/JS/lang/se_no.lang diff --git a/files/1_1UT11/JS/lang/sk_sk.lang b/TuffClient/files/1_1UT11/JS/lang/sk_sk.lang similarity index 100% rename from files/1_1UT11/JS/lang/sk_sk.lang rename to TuffClient/files/1_1UT11/JS/lang/sk_sk.lang diff --git a/files/1_1UT11/JS/lang/sl_si.lang b/TuffClient/files/1_1UT11/JS/lang/sl_si.lang similarity index 100% rename from files/1_1UT11/JS/lang/sl_si.lang rename to TuffClient/files/1_1UT11/JS/lang/sl_si.lang diff --git a/files/1_1UT11/JS/lang/so_so.lang b/TuffClient/files/1_1UT11/JS/lang/so_so.lang similarity index 100% rename from files/1_1UT11/JS/lang/so_so.lang rename to TuffClient/files/1_1UT11/JS/lang/so_so.lang diff --git a/files/1_1UT11/JS/lang/sq_al.lang b/TuffClient/files/1_1UT11/JS/lang/sq_al.lang similarity index 100% rename from files/1_1UT11/JS/lang/sq_al.lang rename to TuffClient/files/1_1UT11/JS/lang/sq_al.lang diff --git a/files/1_1UT11/JS/lang/sr_sp.lang b/TuffClient/files/1_1UT11/JS/lang/sr_sp.lang similarity index 100% rename from files/1_1UT11/JS/lang/sr_sp.lang rename to TuffClient/files/1_1UT11/JS/lang/sr_sp.lang diff --git a/files/1_1UT11/JS/lang/sv_se.lang b/TuffClient/files/1_1UT11/JS/lang/sv_se.lang similarity index 100% rename from files/1_1UT11/JS/lang/sv_se.lang rename to TuffClient/files/1_1UT11/JS/lang/sv_se.lang diff --git a/files/1_1UT11/JS/lang/ta_in.lang b/TuffClient/files/1_1UT11/JS/lang/ta_in.lang similarity index 100% rename from files/1_1UT11/JS/lang/ta_in.lang rename to TuffClient/files/1_1UT11/JS/lang/ta_in.lang diff --git a/files/1_1UT11/JS/lang/th_th.lang b/TuffClient/files/1_1UT11/JS/lang/th_th.lang similarity index 100% rename from files/1_1UT11/JS/lang/th_th.lang rename to TuffClient/files/1_1UT11/JS/lang/th_th.lang diff --git a/files/1_1UT11/JS/lang/tlh_aa.lang b/TuffClient/files/1_1UT11/JS/lang/tlh_aa.lang similarity index 100% rename from files/1_1UT11/JS/lang/tlh_aa.lang rename to TuffClient/files/1_1UT11/JS/lang/tlh_aa.lang diff --git a/files/1_1UT11/JS/lang/tr_tr.lang b/TuffClient/files/1_1UT11/JS/lang/tr_tr.lang similarity index 100% rename from files/1_1UT11/JS/lang/tr_tr.lang rename to TuffClient/files/1_1UT11/JS/lang/tr_tr.lang diff --git a/files/1_1UT11/JS/lang/tzl_tzl.lang b/TuffClient/files/1_1UT11/JS/lang/tzl_tzl.lang similarity index 100% rename from files/1_1UT11/JS/lang/tzl_tzl.lang rename to TuffClient/files/1_1UT11/JS/lang/tzl_tzl.lang diff --git a/files/1_1UT11/JS/lang/uk_ua.lang b/TuffClient/files/1_1UT11/JS/lang/uk_ua.lang similarity index 100% rename from files/1_1UT11/JS/lang/uk_ua.lang rename to TuffClient/files/1_1UT11/JS/lang/uk_ua.lang diff --git a/files/1_1UT11/JS/lang/val_es.lang b/TuffClient/files/1_1UT11/JS/lang/val_es.lang similarity index 100% rename from files/1_1UT11/JS/lang/val_es.lang rename to TuffClient/files/1_1UT11/JS/lang/val_es.lang diff --git a/files/1_1UT11/JS/lang/vec_it.lang b/TuffClient/files/1_1UT11/JS/lang/vec_it.lang similarity index 100% rename from files/1_1UT11/JS/lang/vec_it.lang rename to TuffClient/files/1_1UT11/JS/lang/vec_it.lang diff --git a/files/1_1UT11/JS/lang/vi_vn.lang b/TuffClient/files/1_1UT11/JS/lang/vi_vn.lang similarity index 100% rename from files/1_1UT11/JS/lang/vi_vn.lang rename to TuffClient/files/1_1UT11/JS/lang/vi_vn.lang diff --git a/files/1_1UT11/JS/lang/yo_ng.lang b/TuffClient/files/1_1UT11/JS/lang/yo_ng.lang similarity index 100% rename from files/1_1UT11/JS/lang/yo_ng.lang rename to TuffClient/files/1_1UT11/JS/lang/yo_ng.lang diff --git a/files/1_1UT11/JS/lang/zh_cn.lang b/TuffClient/files/1_1UT11/JS/lang/zh_cn.lang similarity index 100% rename from files/1_1UT11/JS/lang/zh_cn.lang rename to TuffClient/files/1_1UT11/JS/lang/zh_cn.lang diff --git a/files/1_1UT11/JS/lang/zh_tw.lang b/TuffClient/files/1_1UT11/JS/lang/zh_tw.lang similarity index 100% rename from files/1_1UT11/JS/lang/zh_tw.lang rename to TuffClient/files/1_1UT11/JS/lang/zh_tw.lang diff --git a/files/1_1UT11/WASM/Tuff_Client_Offline_WASM.html b/TuffClient/files/1_1UT11/WASM/Tuff_Client_Offline_WASM.html similarity index 100% rename from files/1_1UT11/WASM/Tuff_Client_Offline_WASM.html rename to TuffClient/files/1_1UT11/WASM/Tuff_Client_Offline_WASM.html diff --git a/files/1_1UT11/WASM/assets.epw b/TuffClient/files/1_1UT11/WASM/assets.epw similarity index 100% rename from files/1_1UT11/WASM/assets.epw rename to TuffClient/files/1_1UT11/WASM/assets.epw diff --git a/files/1_1UT11/WASM/bootstrap.js b/TuffClient/files/1_1UT11/WASM/bootstrap.js similarity index 100% rename from files/1_1UT11/WASM/bootstrap.js rename to TuffClient/files/1_1UT11/WASM/bootstrap.js diff --git a/files/1_1UT11/WASM/favicon.png b/TuffClient/files/1_1UT11/WASM/favicon.png similarity index 100% rename from files/1_1UT11/WASM/favicon.png rename to TuffClient/files/1_1UT11/WASM/favicon.png diff --git a/files/1_1UT11/WASM/index.html b/TuffClient/files/1_1UT11/WASM/index.html similarity index 100% rename from files/1_1UT11/WASM/index.html rename to TuffClient/files/1_1UT11/WASM/index.html diff --git a/files/1_1UT12/JS/JS.zip b/TuffClient/files/1_1UT12/JS/JS.zip similarity index 100% rename from files/1_1UT12/JS/JS.zip rename to TuffClient/files/1_1UT12/JS/JS.zip diff --git a/files/1_1UT12/JS/Tuff_Client_JS.html b/TuffClient/files/1_1UT12/JS/Tuff_Client_JS.html similarity index 100% rename from files/1_1UT12/JS/Tuff_Client_JS.html rename to TuffClient/files/1_1UT12/JS/Tuff_Client_JS.html diff --git a/files/1_1UT12/JS/assets.epk b/TuffClient/files/1_1UT12/JS/assets.epk similarity index 100% rename from files/1_1UT12/JS/assets.epk rename to TuffClient/files/1_1UT12/JS/assets.epk diff --git a/files/1_1UT12/JS/classes.js b/TuffClient/files/1_1UT12/JS/classes.js similarity index 100% rename from files/1_1UT12/JS/classes.js rename to TuffClient/files/1_1UT12/JS/classes.js diff --git a/files/1_1UT12/JS/favicon.png b/TuffClient/files/1_1UT12/JS/favicon.png similarity index 100% rename from files/1_1UT12/JS/favicon.png rename to TuffClient/files/1_1UT12/JS/favicon.png diff --git a/files/1_1UT12/JS/index.html b/TuffClient/files/1_1UT12/JS/index.html similarity index 100% rename from files/1_1UT12/JS/index.html rename to TuffClient/files/1_1UT12/JS/index.html diff --git a/files/1_1UT12/JS/lang/af_za.lang b/TuffClient/files/1_1UT12/JS/lang/af_za.lang similarity index 100% rename from files/1_1UT12/JS/lang/af_za.lang rename to TuffClient/files/1_1UT12/JS/lang/af_za.lang diff --git a/files/1_1UT12/JS/lang/ar_sa.lang b/TuffClient/files/1_1UT12/JS/lang/ar_sa.lang similarity index 100% rename from files/1_1UT12/JS/lang/ar_sa.lang rename to TuffClient/files/1_1UT12/JS/lang/ar_sa.lang diff --git a/files/1_1UT12/JS/lang/ast_es.lang b/TuffClient/files/1_1UT12/JS/lang/ast_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/ast_es.lang rename to TuffClient/files/1_1UT12/JS/lang/ast_es.lang diff --git a/files/1_1UT12/JS/lang/az_az.lang b/TuffClient/files/1_1UT12/JS/lang/az_az.lang similarity index 100% rename from files/1_1UT12/JS/lang/az_az.lang rename to TuffClient/files/1_1UT12/JS/lang/az_az.lang diff --git a/files/1_1UT12/JS/lang/be_by.lang b/TuffClient/files/1_1UT12/JS/lang/be_by.lang similarity index 100% rename from files/1_1UT12/JS/lang/be_by.lang rename to TuffClient/files/1_1UT12/JS/lang/be_by.lang diff --git a/files/1_1UT12/JS/lang/bg_bg.lang b/TuffClient/files/1_1UT12/JS/lang/bg_bg.lang similarity index 100% rename from files/1_1UT12/JS/lang/bg_bg.lang rename to TuffClient/files/1_1UT12/JS/lang/bg_bg.lang diff --git a/files/1_1UT12/JS/lang/br_fr.lang b/TuffClient/files/1_1UT12/JS/lang/br_fr.lang similarity index 100% rename from files/1_1UT12/JS/lang/br_fr.lang rename to TuffClient/files/1_1UT12/JS/lang/br_fr.lang diff --git a/files/1_1UT12/JS/lang/bs_ba.lang b/TuffClient/files/1_1UT12/JS/lang/bs_ba.lang similarity index 100% rename from files/1_1UT12/JS/lang/bs_ba.lang rename to TuffClient/files/1_1UT12/JS/lang/bs_ba.lang diff --git a/files/1_1UT12/JS/lang/ca_es.lang b/TuffClient/files/1_1UT12/JS/lang/ca_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/ca_es.lang rename to TuffClient/files/1_1UT12/JS/lang/ca_es.lang diff --git a/files/1_1UT12/JS/lang/cs_cz.lang b/TuffClient/files/1_1UT12/JS/lang/cs_cz.lang similarity index 100% rename from files/1_1UT12/JS/lang/cs_cz.lang rename to TuffClient/files/1_1UT12/JS/lang/cs_cz.lang diff --git a/files/1_1UT12/JS/lang/cy_gb.lang b/TuffClient/files/1_1UT12/JS/lang/cy_gb.lang similarity index 100% rename from files/1_1UT12/JS/lang/cy_gb.lang rename to TuffClient/files/1_1UT12/JS/lang/cy_gb.lang diff --git a/files/1_1UT12/JS/lang/da_dk.lang b/TuffClient/files/1_1UT12/JS/lang/da_dk.lang similarity index 100% rename from files/1_1UT12/JS/lang/da_dk.lang rename to TuffClient/files/1_1UT12/JS/lang/da_dk.lang diff --git a/files/1_1UT12/JS/lang/de_alg.lang b/TuffClient/files/1_1UT12/JS/lang/de_alg.lang similarity index 100% rename from files/1_1UT12/JS/lang/de_alg.lang rename to TuffClient/files/1_1UT12/JS/lang/de_alg.lang diff --git a/files/1_1UT12/JS/lang/de_at.lang b/TuffClient/files/1_1UT12/JS/lang/de_at.lang similarity index 100% rename from files/1_1UT12/JS/lang/de_at.lang rename to TuffClient/files/1_1UT12/JS/lang/de_at.lang diff --git a/files/1_1UT12/JS/lang/de_ch.lang b/TuffClient/files/1_1UT12/JS/lang/de_ch.lang similarity index 100% rename from files/1_1UT12/JS/lang/de_ch.lang rename to TuffClient/files/1_1UT12/JS/lang/de_ch.lang diff --git a/files/1_1UT12/JS/lang/de_de.lang b/TuffClient/files/1_1UT12/JS/lang/de_de.lang similarity index 100% rename from files/1_1UT12/JS/lang/de_de.lang rename to TuffClient/files/1_1UT12/JS/lang/de_de.lang diff --git a/files/1_1UT12/JS/lang/el_gr.lang b/TuffClient/files/1_1UT12/JS/lang/el_gr.lang similarity index 100% rename from files/1_1UT12/JS/lang/el_gr.lang rename to TuffClient/files/1_1UT12/JS/lang/el_gr.lang diff --git a/files/1_1UT12/JS/lang/en_au.lang b/TuffClient/files/1_1UT12/JS/lang/en_au.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_au.lang rename to TuffClient/files/1_1UT12/JS/lang/en_au.lang diff --git a/files/1_1UT12/JS/lang/en_ca.lang b/TuffClient/files/1_1UT12/JS/lang/en_ca.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_ca.lang rename to TuffClient/files/1_1UT12/JS/lang/en_ca.lang diff --git a/files/1_1UT12/JS/lang/en_gb.lang b/TuffClient/files/1_1UT12/JS/lang/en_gb.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_gb.lang rename to TuffClient/files/1_1UT12/JS/lang/en_gb.lang diff --git a/files/1_1UT12/JS/lang/en_nz.lang b/TuffClient/files/1_1UT12/JS/lang/en_nz.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_nz.lang rename to TuffClient/files/1_1UT12/JS/lang/en_nz.lang diff --git a/files/1_1UT12/JS/lang/en_pt.lang b/TuffClient/files/1_1UT12/JS/lang/en_pt.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_pt.lang rename to TuffClient/files/1_1UT12/JS/lang/en_pt.lang diff --git a/files/1_1UT12/JS/lang/en_ud.lang b/TuffClient/files/1_1UT12/JS/lang/en_ud.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_ud.lang rename to TuffClient/files/1_1UT12/JS/lang/en_ud.lang diff --git a/files/1_1UT12/JS/lang/en_us.lang b/TuffClient/files/1_1UT12/JS/lang/en_us.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_us.lang rename to TuffClient/files/1_1UT12/JS/lang/en_us.lang diff --git a/files/1_1UT12/JS/lang/en_ws.lang b/TuffClient/files/1_1UT12/JS/lang/en_ws.lang similarity index 100% rename from files/1_1UT12/JS/lang/en_ws.lang rename to TuffClient/files/1_1UT12/JS/lang/en_ws.lang diff --git a/files/1_1UT12/JS/lang/eo_uy.lang b/TuffClient/files/1_1UT12/JS/lang/eo_uy.lang similarity index 100% rename from files/1_1UT12/JS/lang/eo_uy.lang rename to TuffClient/files/1_1UT12/JS/lang/eo_uy.lang diff --git a/files/1_1UT12/JS/lang/es_ar.lang b/TuffClient/files/1_1UT12/JS/lang/es_ar.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_ar.lang rename to TuffClient/files/1_1UT12/JS/lang/es_ar.lang diff --git a/files/1_1UT12/JS/lang/es_cl.lang b/TuffClient/files/1_1UT12/JS/lang/es_cl.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_cl.lang rename to TuffClient/files/1_1UT12/JS/lang/es_cl.lang diff --git a/files/1_1UT12/JS/lang/es_es.lang b/TuffClient/files/1_1UT12/JS/lang/es_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_es.lang rename to TuffClient/files/1_1UT12/JS/lang/es_es.lang diff --git a/files/1_1UT12/JS/lang/es_mx.lang b/TuffClient/files/1_1UT12/JS/lang/es_mx.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_mx.lang rename to TuffClient/files/1_1UT12/JS/lang/es_mx.lang diff --git a/files/1_1UT12/JS/lang/es_uy.lang b/TuffClient/files/1_1UT12/JS/lang/es_uy.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_uy.lang rename to TuffClient/files/1_1UT12/JS/lang/es_uy.lang diff --git a/files/1_1UT12/JS/lang/es_ve.lang b/TuffClient/files/1_1UT12/JS/lang/es_ve.lang similarity index 100% rename from files/1_1UT12/JS/lang/es_ve.lang rename to TuffClient/files/1_1UT12/JS/lang/es_ve.lang diff --git a/files/1_1UT12/JS/lang/et_ee.lang b/TuffClient/files/1_1UT12/JS/lang/et_ee.lang similarity index 100% rename from files/1_1UT12/JS/lang/et_ee.lang rename to TuffClient/files/1_1UT12/JS/lang/et_ee.lang diff --git a/files/1_1UT12/JS/lang/eu_es.lang b/TuffClient/files/1_1UT12/JS/lang/eu_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/eu_es.lang rename to TuffClient/files/1_1UT12/JS/lang/eu_es.lang diff --git a/files/1_1UT12/JS/lang/fa_ir.lang b/TuffClient/files/1_1UT12/JS/lang/fa_ir.lang similarity index 100% rename from files/1_1UT12/JS/lang/fa_ir.lang rename to TuffClient/files/1_1UT12/JS/lang/fa_ir.lang diff --git a/files/1_1UT12/JS/lang/fi_fi.lang b/TuffClient/files/1_1UT12/JS/lang/fi_fi.lang similarity index 100% rename from files/1_1UT12/JS/lang/fi_fi.lang rename to TuffClient/files/1_1UT12/JS/lang/fi_fi.lang diff --git a/files/1_1UT12/JS/lang/fil_ph.lang b/TuffClient/files/1_1UT12/JS/lang/fil_ph.lang similarity index 100% rename from files/1_1UT12/JS/lang/fil_ph.lang rename to TuffClient/files/1_1UT12/JS/lang/fil_ph.lang diff --git a/files/1_1UT12/JS/lang/fo_fo.lang b/TuffClient/files/1_1UT12/JS/lang/fo_fo.lang similarity index 100% rename from files/1_1UT12/JS/lang/fo_fo.lang rename to TuffClient/files/1_1UT12/JS/lang/fo_fo.lang diff --git a/files/1_1UT12/JS/lang/fr_ca.lang b/TuffClient/files/1_1UT12/JS/lang/fr_ca.lang similarity index 100% rename from files/1_1UT12/JS/lang/fr_ca.lang rename to TuffClient/files/1_1UT12/JS/lang/fr_ca.lang diff --git a/files/1_1UT12/JS/lang/fr_fr.lang b/TuffClient/files/1_1UT12/JS/lang/fr_fr.lang similarity index 100% rename from files/1_1UT12/JS/lang/fr_fr.lang rename to TuffClient/files/1_1UT12/JS/lang/fr_fr.lang diff --git a/files/1_1UT12/JS/lang/fy_nl.lang b/TuffClient/files/1_1UT12/JS/lang/fy_nl.lang similarity index 100% rename from files/1_1UT12/JS/lang/fy_nl.lang rename to TuffClient/files/1_1UT12/JS/lang/fy_nl.lang diff --git a/files/1_1UT12/JS/lang/ga_ie.lang b/TuffClient/files/1_1UT12/JS/lang/ga_ie.lang similarity index 100% rename from files/1_1UT12/JS/lang/ga_ie.lang rename to TuffClient/files/1_1UT12/JS/lang/ga_ie.lang diff --git a/files/1_1UT12/JS/lang/gd_gb.lang b/TuffClient/files/1_1UT12/JS/lang/gd_gb.lang similarity index 100% rename from files/1_1UT12/JS/lang/gd_gb.lang rename to TuffClient/files/1_1UT12/JS/lang/gd_gb.lang diff --git a/files/1_1UT12/JS/lang/gl_es.lang b/TuffClient/files/1_1UT12/JS/lang/gl_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/gl_es.lang rename to TuffClient/files/1_1UT12/JS/lang/gl_es.lang diff --git a/files/1_1UT12/JS/lang/gv_im.lang b/TuffClient/files/1_1UT12/JS/lang/gv_im.lang similarity index 100% rename from files/1_1UT12/JS/lang/gv_im.lang rename to TuffClient/files/1_1UT12/JS/lang/gv_im.lang diff --git a/files/1_1UT12/JS/lang/haw_us.lang b/TuffClient/files/1_1UT12/JS/lang/haw_us.lang similarity index 100% rename from files/1_1UT12/JS/lang/haw_us.lang rename to TuffClient/files/1_1UT12/JS/lang/haw_us.lang diff --git a/files/1_1UT12/JS/lang/he_il.lang b/TuffClient/files/1_1UT12/JS/lang/he_il.lang similarity index 100% rename from files/1_1UT12/JS/lang/he_il.lang rename to TuffClient/files/1_1UT12/JS/lang/he_il.lang diff --git a/files/1_1UT12/JS/lang/hi_in.lang b/TuffClient/files/1_1UT12/JS/lang/hi_in.lang similarity index 100% rename from files/1_1UT12/JS/lang/hi_in.lang rename to TuffClient/files/1_1UT12/JS/lang/hi_in.lang diff --git a/files/1_1UT12/JS/lang/hr_hr.lang b/TuffClient/files/1_1UT12/JS/lang/hr_hr.lang similarity index 100% rename from files/1_1UT12/JS/lang/hr_hr.lang rename to TuffClient/files/1_1UT12/JS/lang/hr_hr.lang diff --git a/files/1_1UT12/JS/lang/hu_hu.lang b/TuffClient/files/1_1UT12/JS/lang/hu_hu.lang similarity index 100% rename from files/1_1UT12/JS/lang/hu_hu.lang rename to TuffClient/files/1_1UT12/JS/lang/hu_hu.lang diff --git a/files/1_1UT12/JS/lang/hy_am.lang b/TuffClient/files/1_1UT12/JS/lang/hy_am.lang similarity index 100% rename from files/1_1UT12/JS/lang/hy_am.lang rename to TuffClient/files/1_1UT12/JS/lang/hy_am.lang diff --git a/files/1_1UT12/JS/lang/id_id.lang b/TuffClient/files/1_1UT12/JS/lang/id_id.lang similarity index 100% rename from files/1_1UT12/JS/lang/id_id.lang rename to TuffClient/files/1_1UT12/JS/lang/id_id.lang diff --git a/files/1_1UT12/JS/lang/ig_ng.lang b/TuffClient/files/1_1UT12/JS/lang/ig_ng.lang similarity index 100% rename from files/1_1UT12/JS/lang/ig_ng.lang rename to TuffClient/files/1_1UT12/JS/lang/ig_ng.lang diff --git a/files/1_1UT12/JS/lang/io_en.lang b/TuffClient/files/1_1UT12/JS/lang/io_en.lang similarity index 100% rename from files/1_1UT12/JS/lang/io_en.lang rename to TuffClient/files/1_1UT12/JS/lang/io_en.lang diff --git a/files/1_1UT12/JS/lang/is_is.lang b/TuffClient/files/1_1UT12/JS/lang/is_is.lang similarity index 100% rename from files/1_1UT12/JS/lang/is_is.lang rename to TuffClient/files/1_1UT12/JS/lang/is_is.lang diff --git a/files/1_1UT12/JS/lang/it_it.lang b/TuffClient/files/1_1UT12/JS/lang/it_it.lang similarity index 100% rename from files/1_1UT12/JS/lang/it_it.lang rename to TuffClient/files/1_1UT12/JS/lang/it_it.lang diff --git a/files/1_1UT12/JS/lang/ja_jp.lang b/TuffClient/files/1_1UT12/JS/lang/ja_jp.lang similarity index 100% rename from files/1_1UT12/JS/lang/ja_jp.lang rename to TuffClient/files/1_1UT12/JS/lang/ja_jp.lang diff --git a/files/1_1UT12/JS/lang/jbo_en.lang b/TuffClient/files/1_1UT12/JS/lang/jbo_en.lang similarity index 100% rename from files/1_1UT12/JS/lang/jbo_en.lang rename to TuffClient/files/1_1UT12/JS/lang/jbo_en.lang diff --git a/files/1_1UT12/JS/lang/ka_ge.lang b/TuffClient/files/1_1UT12/JS/lang/ka_ge.lang similarity index 100% rename from files/1_1UT12/JS/lang/ka_ge.lang rename to TuffClient/files/1_1UT12/JS/lang/ka_ge.lang diff --git a/files/1_1UT12/JS/lang/kab_kab.lang b/TuffClient/files/1_1UT12/JS/lang/kab_kab.lang similarity index 100% rename from files/1_1UT12/JS/lang/kab_kab.lang rename to TuffClient/files/1_1UT12/JS/lang/kab_kab.lang diff --git a/files/1_1UT12/JS/lang/kn_in.lang b/TuffClient/files/1_1UT12/JS/lang/kn_in.lang similarity index 100% rename from files/1_1UT12/JS/lang/kn_in.lang rename to TuffClient/files/1_1UT12/JS/lang/kn_in.lang diff --git a/files/1_1UT12/JS/lang/ko_kr.lang b/TuffClient/files/1_1UT12/JS/lang/ko_kr.lang similarity index 100% rename from files/1_1UT12/JS/lang/ko_kr.lang rename to TuffClient/files/1_1UT12/JS/lang/ko_kr.lang diff --git a/files/1_1UT12/JS/lang/ksh_de.lang b/TuffClient/files/1_1UT12/JS/lang/ksh_de.lang similarity index 100% rename from files/1_1UT12/JS/lang/ksh_de.lang rename to TuffClient/files/1_1UT12/JS/lang/ksh_de.lang diff --git a/files/1_1UT12/JS/lang/kw_gb.lang b/TuffClient/files/1_1UT12/JS/lang/kw_gb.lang similarity index 100% rename from files/1_1UT12/JS/lang/kw_gb.lang rename to TuffClient/files/1_1UT12/JS/lang/kw_gb.lang diff --git a/files/1_1UT12/JS/lang/la_la.lang b/TuffClient/files/1_1UT12/JS/lang/la_la.lang similarity index 100% rename from files/1_1UT12/JS/lang/la_la.lang rename to TuffClient/files/1_1UT12/JS/lang/la_la.lang diff --git a/files/1_1UT12/JS/lang/lb_lu.lang b/TuffClient/files/1_1UT12/JS/lang/lb_lu.lang similarity index 100% rename from files/1_1UT12/JS/lang/lb_lu.lang rename to TuffClient/files/1_1UT12/JS/lang/lb_lu.lang diff --git a/files/1_1UT12/JS/lang/li_li.lang b/TuffClient/files/1_1UT12/JS/lang/li_li.lang similarity index 100% rename from files/1_1UT12/JS/lang/li_li.lang rename to TuffClient/files/1_1UT12/JS/lang/li_li.lang diff --git a/files/1_1UT12/JS/lang/lol_us.lang b/TuffClient/files/1_1UT12/JS/lang/lol_us.lang similarity index 100% rename from files/1_1UT12/JS/lang/lol_us.lang rename to TuffClient/files/1_1UT12/JS/lang/lol_us.lang diff --git a/files/1_1UT12/JS/lang/lt_lt.lang b/TuffClient/files/1_1UT12/JS/lang/lt_lt.lang similarity index 100% rename from files/1_1UT12/JS/lang/lt_lt.lang rename to TuffClient/files/1_1UT12/JS/lang/lt_lt.lang diff --git a/files/1_1UT12/JS/lang/lv_lv.lang b/TuffClient/files/1_1UT12/JS/lang/lv_lv.lang similarity index 100% rename from files/1_1UT12/JS/lang/lv_lv.lang rename to TuffClient/files/1_1UT12/JS/lang/lv_lv.lang diff --git a/files/1_1UT12/JS/lang/mi_nz.lang b/TuffClient/files/1_1UT12/JS/lang/mi_nz.lang similarity index 100% rename from files/1_1UT12/JS/lang/mi_nz.lang rename to TuffClient/files/1_1UT12/JS/lang/mi_nz.lang diff --git a/files/1_1UT12/JS/lang/mk_mk.lang b/TuffClient/files/1_1UT12/JS/lang/mk_mk.lang similarity index 100% rename from files/1_1UT12/JS/lang/mk_mk.lang rename to TuffClient/files/1_1UT12/JS/lang/mk_mk.lang diff --git a/files/1_1UT12/JS/lang/mn_mn.lang b/TuffClient/files/1_1UT12/JS/lang/mn_mn.lang similarity index 100% rename from files/1_1UT12/JS/lang/mn_mn.lang rename to TuffClient/files/1_1UT12/JS/lang/mn_mn.lang diff --git a/files/1_1UT12/JS/lang/ms_my.lang b/TuffClient/files/1_1UT12/JS/lang/ms_my.lang similarity index 100% rename from files/1_1UT12/JS/lang/ms_my.lang rename to TuffClient/files/1_1UT12/JS/lang/ms_my.lang diff --git a/files/1_1UT12/JS/lang/mt_mt.lang b/TuffClient/files/1_1UT12/JS/lang/mt_mt.lang similarity index 100% rename from files/1_1UT12/JS/lang/mt_mt.lang rename to TuffClient/files/1_1UT12/JS/lang/mt_mt.lang diff --git a/files/1_1UT12/JS/lang/nds_de.lang b/TuffClient/files/1_1UT12/JS/lang/nds_de.lang similarity index 100% rename from files/1_1UT12/JS/lang/nds_de.lang rename to TuffClient/files/1_1UT12/JS/lang/nds_de.lang diff --git a/files/1_1UT12/JS/lang/nl_be.lang b/TuffClient/files/1_1UT12/JS/lang/nl_be.lang similarity index 100% rename from files/1_1UT12/JS/lang/nl_be.lang rename to TuffClient/files/1_1UT12/JS/lang/nl_be.lang diff --git a/files/1_1UT12/JS/lang/nl_nl.lang b/TuffClient/files/1_1UT12/JS/lang/nl_nl.lang similarity index 100% rename from files/1_1UT12/JS/lang/nl_nl.lang rename to TuffClient/files/1_1UT12/JS/lang/nl_nl.lang diff --git a/files/1_1UT12/JS/lang/nn_no.lang b/TuffClient/files/1_1UT12/JS/lang/nn_no.lang similarity index 100% rename from files/1_1UT12/JS/lang/nn_no.lang rename to TuffClient/files/1_1UT12/JS/lang/nn_no.lang diff --git a/files/1_1UT12/JS/lang/no_no.lang b/TuffClient/files/1_1UT12/JS/lang/no_no.lang similarity index 100% rename from files/1_1UT12/JS/lang/no_no.lang rename to TuffClient/files/1_1UT12/JS/lang/no_no.lang diff --git a/files/1_1UT12/JS/lang/oc_fr.lang b/TuffClient/files/1_1UT12/JS/lang/oc_fr.lang similarity index 100% rename from files/1_1UT12/JS/lang/oc_fr.lang rename to TuffClient/files/1_1UT12/JS/lang/oc_fr.lang diff --git a/files/1_1UT12/JS/lang/oj_ca.lang b/TuffClient/files/1_1UT12/JS/lang/oj_ca.lang similarity index 100% rename from files/1_1UT12/JS/lang/oj_ca.lang rename to TuffClient/files/1_1UT12/JS/lang/oj_ca.lang diff --git a/files/1_1UT12/JS/lang/pl_pl.lang b/TuffClient/files/1_1UT12/JS/lang/pl_pl.lang similarity index 100% rename from files/1_1UT12/JS/lang/pl_pl.lang rename to TuffClient/files/1_1UT12/JS/lang/pl_pl.lang diff --git a/files/1_1UT12/JS/lang/pt_br.lang b/TuffClient/files/1_1UT12/JS/lang/pt_br.lang similarity index 100% rename from files/1_1UT12/JS/lang/pt_br.lang rename to TuffClient/files/1_1UT12/JS/lang/pt_br.lang diff --git a/files/1_1UT12/JS/lang/pt_pt.lang b/TuffClient/files/1_1UT12/JS/lang/pt_pt.lang similarity index 100% rename from files/1_1UT12/JS/lang/pt_pt.lang rename to TuffClient/files/1_1UT12/JS/lang/pt_pt.lang diff --git a/files/1_1UT12/JS/lang/qya_aa.lang b/TuffClient/files/1_1UT12/JS/lang/qya_aa.lang similarity index 100% rename from files/1_1UT12/JS/lang/qya_aa.lang rename to TuffClient/files/1_1UT12/JS/lang/qya_aa.lang diff --git a/files/1_1UT12/JS/lang/ro_ro.lang b/TuffClient/files/1_1UT12/JS/lang/ro_ro.lang similarity index 100% rename from files/1_1UT12/JS/lang/ro_ro.lang rename to TuffClient/files/1_1UT12/JS/lang/ro_ro.lang diff --git a/files/1_1UT12/JS/lang/ru_ru.lang b/TuffClient/files/1_1UT12/JS/lang/ru_ru.lang similarity index 100% rename from files/1_1UT12/JS/lang/ru_ru.lang rename to TuffClient/files/1_1UT12/JS/lang/ru_ru.lang diff --git a/files/1_1UT12/JS/lang/se_no.lang b/TuffClient/files/1_1UT12/JS/lang/se_no.lang similarity index 100% rename from files/1_1UT12/JS/lang/se_no.lang rename to TuffClient/files/1_1UT12/JS/lang/se_no.lang diff --git a/files/1_1UT12/JS/lang/sk_sk.lang b/TuffClient/files/1_1UT12/JS/lang/sk_sk.lang similarity index 100% rename from files/1_1UT12/JS/lang/sk_sk.lang rename to TuffClient/files/1_1UT12/JS/lang/sk_sk.lang diff --git a/files/1_1UT12/JS/lang/sl_si.lang b/TuffClient/files/1_1UT12/JS/lang/sl_si.lang similarity index 100% rename from files/1_1UT12/JS/lang/sl_si.lang rename to TuffClient/files/1_1UT12/JS/lang/sl_si.lang diff --git a/files/1_1UT12/JS/lang/so_so.lang b/TuffClient/files/1_1UT12/JS/lang/so_so.lang similarity index 100% rename from files/1_1UT12/JS/lang/so_so.lang rename to TuffClient/files/1_1UT12/JS/lang/so_so.lang diff --git a/files/1_1UT12/JS/lang/sq_al.lang b/TuffClient/files/1_1UT12/JS/lang/sq_al.lang similarity index 100% rename from files/1_1UT12/JS/lang/sq_al.lang rename to TuffClient/files/1_1UT12/JS/lang/sq_al.lang diff --git a/files/1_1UT12/JS/lang/sr_sp.lang b/TuffClient/files/1_1UT12/JS/lang/sr_sp.lang similarity index 100% rename from files/1_1UT12/JS/lang/sr_sp.lang rename to TuffClient/files/1_1UT12/JS/lang/sr_sp.lang diff --git a/files/1_1UT12/JS/lang/sv_se.lang b/TuffClient/files/1_1UT12/JS/lang/sv_se.lang similarity index 100% rename from files/1_1UT12/JS/lang/sv_se.lang rename to TuffClient/files/1_1UT12/JS/lang/sv_se.lang diff --git a/files/1_1UT12/JS/lang/ta_in.lang b/TuffClient/files/1_1UT12/JS/lang/ta_in.lang similarity index 100% rename from files/1_1UT12/JS/lang/ta_in.lang rename to TuffClient/files/1_1UT12/JS/lang/ta_in.lang diff --git a/files/1_1UT12/JS/lang/th_th.lang b/TuffClient/files/1_1UT12/JS/lang/th_th.lang similarity index 100% rename from files/1_1UT12/JS/lang/th_th.lang rename to TuffClient/files/1_1UT12/JS/lang/th_th.lang diff --git a/files/1_1UT12/JS/lang/tlh_aa.lang b/TuffClient/files/1_1UT12/JS/lang/tlh_aa.lang similarity index 100% rename from files/1_1UT12/JS/lang/tlh_aa.lang rename to TuffClient/files/1_1UT12/JS/lang/tlh_aa.lang diff --git a/files/1_1UT12/JS/lang/tr_tr.lang b/TuffClient/files/1_1UT12/JS/lang/tr_tr.lang similarity index 100% rename from files/1_1UT12/JS/lang/tr_tr.lang rename to TuffClient/files/1_1UT12/JS/lang/tr_tr.lang diff --git a/files/1_1UT12/JS/lang/tzl_tzl.lang b/TuffClient/files/1_1UT12/JS/lang/tzl_tzl.lang similarity index 100% rename from files/1_1UT12/JS/lang/tzl_tzl.lang rename to TuffClient/files/1_1UT12/JS/lang/tzl_tzl.lang diff --git a/files/1_1UT12/JS/lang/uk_ua.lang b/TuffClient/files/1_1UT12/JS/lang/uk_ua.lang similarity index 100% rename from files/1_1UT12/JS/lang/uk_ua.lang rename to TuffClient/files/1_1UT12/JS/lang/uk_ua.lang diff --git a/files/1_1UT12/JS/lang/val_es.lang b/TuffClient/files/1_1UT12/JS/lang/val_es.lang similarity index 100% rename from files/1_1UT12/JS/lang/val_es.lang rename to TuffClient/files/1_1UT12/JS/lang/val_es.lang diff --git a/files/1_1UT12/JS/lang/vec_it.lang b/TuffClient/files/1_1UT12/JS/lang/vec_it.lang similarity index 100% rename from files/1_1UT12/JS/lang/vec_it.lang rename to TuffClient/files/1_1UT12/JS/lang/vec_it.lang diff --git a/files/1_1UT12/JS/lang/vi_vn.lang b/TuffClient/files/1_1UT12/JS/lang/vi_vn.lang similarity index 100% rename from files/1_1UT12/JS/lang/vi_vn.lang rename to TuffClient/files/1_1UT12/JS/lang/vi_vn.lang diff --git a/files/1_1UT12/JS/lang/yo_ng.lang b/TuffClient/files/1_1UT12/JS/lang/yo_ng.lang similarity index 100% rename from files/1_1UT12/JS/lang/yo_ng.lang rename to TuffClient/files/1_1UT12/JS/lang/yo_ng.lang diff --git a/files/1_1UT12/JS/lang/zh_cn.lang b/TuffClient/files/1_1UT12/JS/lang/zh_cn.lang similarity index 100% rename from files/1_1UT12/JS/lang/zh_cn.lang rename to TuffClient/files/1_1UT12/JS/lang/zh_cn.lang diff --git a/files/1_1UT12/JS/lang/zh_tw.lang b/TuffClient/files/1_1UT12/JS/lang/zh_tw.lang similarity index 100% rename from files/1_1UT12/JS/lang/zh_tw.lang rename to TuffClient/files/1_1UT12/JS/lang/zh_tw.lang diff --git a/files/1_1UT12/WASM/Tuff_Client_Offline_WASM.html b/TuffClient/files/1_1UT12/WASM/Tuff_Client_Offline_WASM.html similarity index 100% rename from files/1_1UT12/WASM/Tuff_Client_Offline_WASM.html rename to TuffClient/files/1_1UT12/WASM/Tuff_Client_Offline_WASM.html diff --git a/files/1_1UT12/WASM/WASM.zip b/TuffClient/files/1_1UT12/WASM/WASM.zip similarity index 100% rename from files/1_1UT12/WASM/WASM.zip rename to TuffClient/files/1_1UT12/WASM/WASM.zip diff --git a/files/1_1UT12/WASM/assets.epw b/TuffClient/files/1_1UT12/WASM/assets.epw similarity index 100% rename from files/1_1UT12/WASM/assets.epw rename to TuffClient/files/1_1UT12/WASM/assets.epw diff --git a/files/1_1UT12/WASM/bootstrap.js b/TuffClient/files/1_1UT12/WASM/bootstrap.js similarity index 100% rename from files/1_1UT12/WASM/bootstrap.js rename to TuffClient/files/1_1UT12/WASM/bootstrap.js diff --git a/files/1_1UT12/WASM/favicon.png b/TuffClient/files/1_1UT12/WASM/favicon.png similarity index 100% rename from files/1_1UT12/WASM/favicon.png rename to TuffClient/files/1_1UT12/WASM/favicon.png diff --git a/files/1_1UT12/WASM/index.html b/TuffClient/files/1_1UT12/WASM/index.html similarity index 100% rename from files/1_1UT12/WASM/index.html rename to TuffClient/files/1_1UT12/WASM/index.html diff --git a/files/1_1UT4/JS/assets.epk b/TuffClient/files/1_1UT4/JS/assets.epk similarity index 100% rename from files/1_1UT4/JS/assets.epk rename to TuffClient/files/1_1UT4/JS/assets.epk diff --git a/files/1_1UT4/JS/classes.js b/TuffClient/files/1_1UT4/JS/classes.js similarity index 100% rename from files/1_1UT4/JS/classes.js rename to TuffClient/files/1_1UT4/JS/classes.js diff --git a/files/1_1UT4/JS/favicon.png b/TuffClient/files/1_1UT4/JS/favicon.png similarity index 100% rename from files/1_1UT4/JS/favicon.png rename to TuffClient/files/1_1UT4/JS/favicon.png diff --git a/files/1_1UT4/JS/index.html b/TuffClient/files/1_1UT4/JS/index.html similarity index 100% rename from files/1_1UT4/JS/index.html rename to TuffClient/files/1_1UT4/JS/index.html diff --git a/files/1_1UT4/JS/lang/af_za.lang b/TuffClient/files/1_1UT4/JS/lang/af_za.lang similarity index 100% rename from files/1_1UT4/JS/lang/af_za.lang rename to TuffClient/files/1_1UT4/JS/lang/af_za.lang diff --git a/files/1_1UT4/JS/lang/ar_sa.lang b/TuffClient/files/1_1UT4/JS/lang/ar_sa.lang similarity index 100% rename from files/1_1UT4/JS/lang/ar_sa.lang rename to TuffClient/files/1_1UT4/JS/lang/ar_sa.lang diff --git a/files/1_1UT4/JS/lang/ast_es.lang b/TuffClient/files/1_1UT4/JS/lang/ast_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/ast_es.lang rename to TuffClient/files/1_1UT4/JS/lang/ast_es.lang diff --git a/files/1_1UT4/JS/lang/az_az.lang b/TuffClient/files/1_1UT4/JS/lang/az_az.lang similarity index 100% rename from files/1_1UT4/JS/lang/az_az.lang rename to TuffClient/files/1_1UT4/JS/lang/az_az.lang diff --git a/files/1_1UT4/JS/lang/be_by.lang b/TuffClient/files/1_1UT4/JS/lang/be_by.lang similarity index 100% rename from files/1_1UT4/JS/lang/be_by.lang rename to TuffClient/files/1_1UT4/JS/lang/be_by.lang diff --git a/files/1_1UT4/JS/lang/bg_bg.lang b/TuffClient/files/1_1UT4/JS/lang/bg_bg.lang similarity index 100% rename from files/1_1UT4/JS/lang/bg_bg.lang rename to TuffClient/files/1_1UT4/JS/lang/bg_bg.lang diff --git a/files/1_1UT4/JS/lang/br_fr.lang b/TuffClient/files/1_1UT4/JS/lang/br_fr.lang similarity index 100% rename from files/1_1UT4/JS/lang/br_fr.lang rename to TuffClient/files/1_1UT4/JS/lang/br_fr.lang diff --git a/files/1_1UT4/JS/lang/bs_ba.lang b/TuffClient/files/1_1UT4/JS/lang/bs_ba.lang similarity index 100% rename from files/1_1UT4/JS/lang/bs_ba.lang rename to TuffClient/files/1_1UT4/JS/lang/bs_ba.lang diff --git a/files/1_1UT4/JS/lang/ca_es.lang b/TuffClient/files/1_1UT4/JS/lang/ca_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/ca_es.lang rename to TuffClient/files/1_1UT4/JS/lang/ca_es.lang diff --git a/files/1_1UT4/JS/lang/cs_cz.lang b/TuffClient/files/1_1UT4/JS/lang/cs_cz.lang similarity index 100% rename from files/1_1UT4/JS/lang/cs_cz.lang rename to TuffClient/files/1_1UT4/JS/lang/cs_cz.lang diff --git a/files/1_1UT4/JS/lang/cy_gb.lang b/TuffClient/files/1_1UT4/JS/lang/cy_gb.lang similarity index 100% rename from files/1_1UT4/JS/lang/cy_gb.lang rename to TuffClient/files/1_1UT4/JS/lang/cy_gb.lang diff --git a/files/1_1UT4/JS/lang/da_dk.lang b/TuffClient/files/1_1UT4/JS/lang/da_dk.lang similarity index 100% rename from files/1_1UT4/JS/lang/da_dk.lang rename to TuffClient/files/1_1UT4/JS/lang/da_dk.lang diff --git a/files/1_1UT4/JS/lang/de_alg.lang b/TuffClient/files/1_1UT4/JS/lang/de_alg.lang similarity index 100% rename from files/1_1UT4/JS/lang/de_alg.lang rename to TuffClient/files/1_1UT4/JS/lang/de_alg.lang diff --git a/files/1_1UT4/JS/lang/de_at.lang b/TuffClient/files/1_1UT4/JS/lang/de_at.lang similarity index 100% rename from files/1_1UT4/JS/lang/de_at.lang rename to TuffClient/files/1_1UT4/JS/lang/de_at.lang diff --git a/files/1_1UT4/JS/lang/de_ch.lang b/TuffClient/files/1_1UT4/JS/lang/de_ch.lang similarity index 100% rename from files/1_1UT4/JS/lang/de_ch.lang rename to TuffClient/files/1_1UT4/JS/lang/de_ch.lang diff --git a/files/1_1UT4/JS/lang/de_de.lang b/TuffClient/files/1_1UT4/JS/lang/de_de.lang similarity index 100% rename from files/1_1UT4/JS/lang/de_de.lang rename to TuffClient/files/1_1UT4/JS/lang/de_de.lang diff --git a/files/1_1UT4/JS/lang/el_gr.lang b/TuffClient/files/1_1UT4/JS/lang/el_gr.lang similarity index 100% rename from files/1_1UT4/JS/lang/el_gr.lang rename to TuffClient/files/1_1UT4/JS/lang/el_gr.lang diff --git a/files/1_1UT4/JS/lang/en_au.lang b/TuffClient/files/1_1UT4/JS/lang/en_au.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_au.lang rename to TuffClient/files/1_1UT4/JS/lang/en_au.lang diff --git a/files/1_1UT4/JS/lang/en_ca.lang b/TuffClient/files/1_1UT4/JS/lang/en_ca.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_ca.lang rename to TuffClient/files/1_1UT4/JS/lang/en_ca.lang diff --git a/files/1_1UT4/JS/lang/en_gb.lang b/TuffClient/files/1_1UT4/JS/lang/en_gb.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_gb.lang rename to TuffClient/files/1_1UT4/JS/lang/en_gb.lang diff --git a/files/1_1UT4/JS/lang/en_nz.lang b/TuffClient/files/1_1UT4/JS/lang/en_nz.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_nz.lang rename to TuffClient/files/1_1UT4/JS/lang/en_nz.lang diff --git a/files/1_1UT4/JS/lang/en_pt.lang b/TuffClient/files/1_1UT4/JS/lang/en_pt.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_pt.lang rename to TuffClient/files/1_1UT4/JS/lang/en_pt.lang diff --git a/files/1_1UT4/JS/lang/en_ud.lang b/TuffClient/files/1_1UT4/JS/lang/en_ud.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_ud.lang rename to TuffClient/files/1_1UT4/JS/lang/en_ud.lang diff --git a/files/1_1UT4/JS/lang/en_us.lang b/TuffClient/files/1_1UT4/JS/lang/en_us.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_us.lang rename to TuffClient/files/1_1UT4/JS/lang/en_us.lang diff --git a/files/1_1UT4/JS/lang/en_ws.lang b/TuffClient/files/1_1UT4/JS/lang/en_ws.lang similarity index 100% rename from files/1_1UT4/JS/lang/en_ws.lang rename to TuffClient/files/1_1UT4/JS/lang/en_ws.lang diff --git a/files/1_1UT4/JS/lang/eo_uy.lang b/TuffClient/files/1_1UT4/JS/lang/eo_uy.lang similarity index 100% rename from files/1_1UT4/JS/lang/eo_uy.lang rename to TuffClient/files/1_1UT4/JS/lang/eo_uy.lang diff --git a/files/1_1UT4/JS/lang/es_ar.lang b/TuffClient/files/1_1UT4/JS/lang/es_ar.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_ar.lang rename to TuffClient/files/1_1UT4/JS/lang/es_ar.lang diff --git a/files/1_1UT4/JS/lang/es_cl.lang b/TuffClient/files/1_1UT4/JS/lang/es_cl.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_cl.lang rename to TuffClient/files/1_1UT4/JS/lang/es_cl.lang diff --git a/files/1_1UT4/JS/lang/es_es.lang b/TuffClient/files/1_1UT4/JS/lang/es_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_es.lang rename to TuffClient/files/1_1UT4/JS/lang/es_es.lang diff --git a/files/1_1UT4/JS/lang/es_mx.lang b/TuffClient/files/1_1UT4/JS/lang/es_mx.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_mx.lang rename to TuffClient/files/1_1UT4/JS/lang/es_mx.lang diff --git a/files/1_1UT4/JS/lang/es_uy.lang b/TuffClient/files/1_1UT4/JS/lang/es_uy.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_uy.lang rename to TuffClient/files/1_1UT4/JS/lang/es_uy.lang diff --git a/files/1_1UT4/JS/lang/es_ve.lang b/TuffClient/files/1_1UT4/JS/lang/es_ve.lang similarity index 100% rename from files/1_1UT4/JS/lang/es_ve.lang rename to TuffClient/files/1_1UT4/JS/lang/es_ve.lang diff --git a/files/1_1UT4/JS/lang/et_ee.lang b/TuffClient/files/1_1UT4/JS/lang/et_ee.lang similarity index 100% rename from files/1_1UT4/JS/lang/et_ee.lang rename to TuffClient/files/1_1UT4/JS/lang/et_ee.lang diff --git a/files/1_1UT4/JS/lang/eu_es.lang b/TuffClient/files/1_1UT4/JS/lang/eu_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/eu_es.lang rename to TuffClient/files/1_1UT4/JS/lang/eu_es.lang diff --git a/files/1_1UT4/JS/lang/fa_ir.lang b/TuffClient/files/1_1UT4/JS/lang/fa_ir.lang similarity index 100% rename from files/1_1UT4/JS/lang/fa_ir.lang rename to TuffClient/files/1_1UT4/JS/lang/fa_ir.lang diff --git a/files/1_1UT4/JS/lang/fi_fi.lang b/TuffClient/files/1_1UT4/JS/lang/fi_fi.lang similarity index 100% rename from files/1_1UT4/JS/lang/fi_fi.lang rename to TuffClient/files/1_1UT4/JS/lang/fi_fi.lang diff --git a/files/1_1UT4/JS/lang/fil_ph.lang b/TuffClient/files/1_1UT4/JS/lang/fil_ph.lang similarity index 100% rename from files/1_1UT4/JS/lang/fil_ph.lang rename to TuffClient/files/1_1UT4/JS/lang/fil_ph.lang diff --git a/files/1_1UT4/JS/lang/fo_fo.lang b/TuffClient/files/1_1UT4/JS/lang/fo_fo.lang similarity index 100% rename from files/1_1UT4/JS/lang/fo_fo.lang rename to TuffClient/files/1_1UT4/JS/lang/fo_fo.lang diff --git a/files/1_1UT4/JS/lang/fr_ca.lang b/TuffClient/files/1_1UT4/JS/lang/fr_ca.lang similarity index 100% rename from files/1_1UT4/JS/lang/fr_ca.lang rename to TuffClient/files/1_1UT4/JS/lang/fr_ca.lang diff --git a/files/1_1UT4/JS/lang/fr_fr.lang b/TuffClient/files/1_1UT4/JS/lang/fr_fr.lang similarity index 100% rename from files/1_1UT4/JS/lang/fr_fr.lang rename to TuffClient/files/1_1UT4/JS/lang/fr_fr.lang diff --git a/files/1_1UT4/JS/lang/fy_nl.lang b/TuffClient/files/1_1UT4/JS/lang/fy_nl.lang similarity index 100% rename from files/1_1UT4/JS/lang/fy_nl.lang rename to TuffClient/files/1_1UT4/JS/lang/fy_nl.lang diff --git a/files/1_1UT4/JS/lang/ga_ie.lang b/TuffClient/files/1_1UT4/JS/lang/ga_ie.lang similarity index 100% rename from files/1_1UT4/JS/lang/ga_ie.lang rename to TuffClient/files/1_1UT4/JS/lang/ga_ie.lang diff --git a/files/1_1UT4/JS/lang/gd_gb.lang b/TuffClient/files/1_1UT4/JS/lang/gd_gb.lang similarity index 100% rename from files/1_1UT4/JS/lang/gd_gb.lang rename to TuffClient/files/1_1UT4/JS/lang/gd_gb.lang diff --git a/files/1_1UT4/JS/lang/gl_es.lang b/TuffClient/files/1_1UT4/JS/lang/gl_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/gl_es.lang rename to TuffClient/files/1_1UT4/JS/lang/gl_es.lang diff --git a/files/1_1UT4/JS/lang/gv_im.lang b/TuffClient/files/1_1UT4/JS/lang/gv_im.lang similarity index 100% rename from files/1_1UT4/JS/lang/gv_im.lang rename to TuffClient/files/1_1UT4/JS/lang/gv_im.lang diff --git a/files/1_1UT4/JS/lang/haw_us.lang b/TuffClient/files/1_1UT4/JS/lang/haw_us.lang similarity index 100% rename from files/1_1UT4/JS/lang/haw_us.lang rename to TuffClient/files/1_1UT4/JS/lang/haw_us.lang diff --git a/files/1_1UT4/JS/lang/he_il.lang b/TuffClient/files/1_1UT4/JS/lang/he_il.lang similarity index 100% rename from files/1_1UT4/JS/lang/he_il.lang rename to TuffClient/files/1_1UT4/JS/lang/he_il.lang diff --git a/files/1_1UT4/JS/lang/hi_in.lang b/TuffClient/files/1_1UT4/JS/lang/hi_in.lang similarity index 100% rename from files/1_1UT4/JS/lang/hi_in.lang rename to TuffClient/files/1_1UT4/JS/lang/hi_in.lang diff --git a/files/1_1UT4/JS/lang/hr_hr.lang b/TuffClient/files/1_1UT4/JS/lang/hr_hr.lang similarity index 100% rename from files/1_1UT4/JS/lang/hr_hr.lang rename to TuffClient/files/1_1UT4/JS/lang/hr_hr.lang diff --git a/files/1_1UT4/JS/lang/hu_hu.lang b/TuffClient/files/1_1UT4/JS/lang/hu_hu.lang similarity index 100% rename from files/1_1UT4/JS/lang/hu_hu.lang rename to TuffClient/files/1_1UT4/JS/lang/hu_hu.lang diff --git a/files/1_1UT4/JS/lang/hy_am.lang b/TuffClient/files/1_1UT4/JS/lang/hy_am.lang similarity index 100% rename from files/1_1UT4/JS/lang/hy_am.lang rename to TuffClient/files/1_1UT4/JS/lang/hy_am.lang diff --git a/files/1_1UT4/JS/lang/id_id.lang b/TuffClient/files/1_1UT4/JS/lang/id_id.lang similarity index 100% rename from files/1_1UT4/JS/lang/id_id.lang rename to TuffClient/files/1_1UT4/JS/lang/id_id.lang diff --git a/files/1_1UT4/JS/lang/ig_ng.lang b/TuffClient/files/1_1UT4/JS/lang/ig_ng.lang similarity index 100% rename from files/1_1UT4/JS/lang/ig_ng.lang rename to TuffClient/files/1_1UT4/JS/lang/ig_ng.lang diff --git a/files/1_1UT4/JS/lang/io_en.lang b/TuffClient/files/1_1UT4/JS/lang/io_en.lang similarity index 100% rename from files/1_1UT4/JS/lang/io_en.lang rename to TuffClient/files/1_1UT4/JS/lang/io_en.lang diff --git a/files/1_1UT4/JS/lang/is_is.lang b/TuffClient/files/1_1UT4/JS/lang/is_is.lang similarity index 100% rename from files/1_1UT4/JS/lang/is_is.lang rename to TuffClient/files/1_1UT4/JS/lang/is_is.lang diff --git a/files/1_1UT4/JS/lang/it_it.lang b/TuffClient/files/1_1UT4/JS/lang/it_it.lang similarity index 100% rename from files/1_1UT4/JS/lang/it_it.lang rename to TuffClient/files/1_1UT4/JS/lang/it_it.lang diff --git a/files/1_1UT4/JS/lang/ja_jp.lang b/TuffClient/files/1_1UT4/JS/lang/ja_jp.lang similarity index 100% rename from files/1_1UT4/JS/lang/ja_jp.lang rename to TuffClient/files/1_1UT4/JS/lang/ja_jp.lang diff --git a/files/1_1UT4/JS/lang/jbo_en.lang b/TuffClient/files/1_1UT4/JS/lang/jbo_en.lang similarity index 100% rename from files/1_1UT4/JS/lang/jbo_en.lang rename to TuffClient/files/1_1UT4/JS/lang/jbo_en.lang diff --git a/files/1_1UT4/JS/lang/ka_ge.lang b/TuffClient/files/1_1UT4/JS/lang/ka_ge.lang similarity index 100% rename from files/1_1UT4/JS/lang/ka_ge.lang rename to TuffClient/files/1_1UT4/JS/lang/ka_ge.lang diff --git a/files/1_1UT4/JS/lang/kab_kab.lang b/TuffClient/files/1_1UT4/JS/lang/kab_kab.lang similarity index 100% rename from files/1_1UT4/JS/lang/kab_kab.lang rename to TuffClient/files/1_1UT4/JS/lang/kab_kab.lang diff --git a/files/1_1UT4/JS/lang/kn_in.lang b/TuffClient/files/1_1UT4/JS/lang/kn_in.lang similarity index 100% rename from files/1_1UT4/JS/lang/kn_in.lang rename to TuffClient/files/1_1UT4/JS/lang/kn_in.lang diff --git a/files/1_1UT4/JS/lang/ko_kr.lang b/TuffClient/files/1_1UT4/JS/lang/ko_kr.lang similarity index 100% rename from files/1_1UT4/JS/lang/ko_kr.lang rename to TuffClient/files/1_1UT4/JS/lang/ko_kr.lang diff --git a/files/1_1UT4/JS/lang/ksh_de.lang b/TuffClient/files/1_1UT4/JS/lang/ksh_de.lang similarity index 100% rename from files/1_1UT4/JS/lang/ksh_de.lang rename to TuffClient/files/1_1UT4/JS/lang/ksh_de.lang diff --git a/files/1_1UT4/JS/lang/kw_gb.lang b/TuffClient/files/1_1UT4/JS/lang/kw_gb.lang similarity index 100% rename from files/1_1UT4/JS/lang/kw_gb.lang rename to TuffClient/files/1_1UT4/JS/lang/kw_gb.lang diff --git a/files/1_1UT4/JS/lang/la_la.lang b/TuffClient/files/1_1UT4/JS/lang/la_la.lang similarity index 100% rename from files/1_1UT4/JS/lang/la_la.lang rename to TuffClient/files/1_1UT4/JS/lang/la_la.lang diff --git a/files/1_1UT4/JS/lang/lb_lu.lang b/TuffClient/files/1_1UT4/JS/lang/lb_lu.lang similarity index 100% rename from files/1_1UT4/JS/lang/lb_lu.lang rename to TuffClient/files/1_1UT4/JS/lang/lb_lu.lang diff --git a/files/1_1UT4/JS/lang/li_li.lang b/TuffClient/files/1_1UT4/JS/lang/li_li.lang similarity index 100% rename from files/1_1UT4/JS/lang/li_li.lang rename to TuffClient/files/1_1UT4/JS/lang/li_li.lang diff --git a/files/1_1UT4/JS/lang/lol_us.lang b/TuffClient/files/1_1UT4/JS/lang/lol_us.lang similarity index 100% rename from files/1_1UT4/JS/lang/lol_us.lang rename to TuffClient/files/1_1UT4/JS/lang/lol_us.lang diff --git a/files/1_1UT4/JS/lang/lt_lt.lang b/TuffClient/files/1_1UT4/JS/lang/lt_lt.lang similarity index 100% rename from files/1_1UT4/JS/lang/lt_lt.lang rename to TuffClient/files/1_1UT4/JS/lang/lt_lt.lang diff --git a/files/1_1UT4/JS/lang/lv_lv.lang b/TuffClient/files/1_1UT4/JS/lang/lv_lv.lang similarity index 100% rename from files/1_1UT4/JS/lang/lv_lv.lang rename to TuffClient/files/1_1UT4/JS/lang/lv_lv.lang diff --git a/files/1_1UT4/JS/lang/mi_nz.lang b/TuffClient/files/1_1UT4/JS/lang/mi_nz.lang similarity index 100% rename from files/1_1UT4/JS/lang/mi_nz.lang rename to TuffClient/files/1_1UT4/JS/lang/mi_nz.lang diff --git a/files/1_1UT4/JS/lang/mk_mk.lang b/TuffClient/files/1_1UT4/JS/lang/mk_mk.lang similarity index 100% rename from files/1_1UT4/JS/lang/mk_mk.lang rename to TuffClient/files/1_1UT4/JS/lang/mk_mk.lang diff --git a/files/1_1UT4/JS/lang/mn_mn.lang b/TuffClient/files/1_1UT4/JS/lang/mn_mn.lang similarity index 100% rename from files/1_1UT4/JS/lang/mn_mn.lang rename to TuffClient/files/1_1UT4/JS/lang/mn_mn.lang diff --git a/files/1_1UT4/JS/lang/ms_my.lang b/TuffClient/files/1_1UT4/JS/lang/ms_my.lang similarity index 100% rename from files/1_1UT4/JS/lang/ms_my.lang rename to TuffClient/files/1_1UT4/JS/lang/ms_my.lang diff --git a/files/1_1UT4/JS/lang/mt_mt.lang b/TuffClient/files/1_1UT4/JS/lang/mt_mt.lang similarity index 100% rename from files/1_1UT4/JS/lang/mt_mt.lang rename to TuffClient/files/1_1UT4/JS/lang/mt_mt.lang diff --git a/files/1_1UT4/JS/lang/nds_de.lang b/TuffClient/files/1_1UT4/JS/lang/nds_de.lang similarity index 100% rename from files/1_1UT4/JS/lang/nds_de.lang rename to TuffClient/files/1_1UT4/JS/lang/nds_de.lang diff --git a/files/1_1UT4/JS/lang/nl_be.lang b/TuffClient/files/1_1UT4/JS/lang/nl_be.lang similarity index 100% rename from files/1_1UT4/JS/lang/nl_be.lang rename to TuffClient/files/1_1UT4/JS/lang/nl_be.lang diff --git a/files/1_1UT4/JS/lang/nl_nl.lang b/TuffClient/files/1_1UT4/JS/lang/nl_nl.lang similarity index 100% rename from files/1_1UT4/JS/lang/nl_nl.lang rename to TuffClient/files/1_1UT4/JS/lang/nl_nl.lang diff --git a/files/1_1UT4/JS/lang/nn_no.lang b/TuffClient/files/1_1UT4/JS/lang/nn_no.lang similarity index 100% rename from files/1_1UT4/JS/lang/nn_no.lang rename to TuffClient/files/1_1UT4/JS/lang/nn_no.lang diff --git a/files/1_1UT4/JS/lang/no_no.lang b/TuffClient/files/1_1UT4/JS/lang/no_no.lang similarity index 100% rename from files/1_1UT4/JS/lang/no_no.lang rename to TuffClient/files/1_1UT4/JS/lang/no_no.lang diff --git a/files/1_1UT4/JS/lang/oc_fr.lang b/TuffClient/files/1_1UT4/JS/lang/oc_fr.lang similarity index 100% rename from files/1_1UT4/JS/lang/oc_fr.lang rename to TuffClient/files/1_1UT4/JS/lang/oc_fr.lang diff --git a/files/1_1UT4/JS/lang/oj_ca.lang b/TuffClient/files/1_1UT4/JS/lang/oj_ca.lang similarity index 100% rename from files/1_1UT4/JS/lang/oj_ca.lang rename to TuffClient/files/1_1UT4/JS/lang/oj_ca.lang diff --git a/files/1_1UT4/JS/lang/pl_pl.lang b/TuffClient/files/1_1UT4/JS/lang/pl_pl.lang similarity index 100% rename from files/1_1UT4/JS/lang/pl_pl.lang rename to TuffClient/files/1_1UT4/JS/lang/pl_pl.lang diff --git a/files/1_1UT4/JS/lang/pt_br.lang b/TuffClient/files/1_1UT4/JS/lang/pt_br.lang similarity index 100% rename from files/1_1UT4/JS/lang/pt_br.lang rename to TuffClient/files/1_1UT4/JS/lang/pt_br.lang diff --git a/files/1_1UT4/JS/lang/pt_pt.lang b/TuffClient/files/1_1UT4/JS/lang/pt_pt.lang similarity index 100% rename from files/1_1UT4/JS/lang/pt_pt.lang rename to TuffClient/files/1_1UT4/JS/lang/pt_pt.lang diff --git a/files/1_1UT4/JS/lang/qya_aa.lang b/TuffClient/files/1_1UT4/JS/lang/qya_aa.lang similarity index 100% rename from files/1_1UT4/JS/lang/qya_aa.lang rename to TuffClient/files/1_1UT4/JS/lang/qya_aa.lang diff --git a/files/1_1UT4/JS/lang/ro_ro.lang b/TuffClient/files/1_1UT4/JS/lang/ro_ro.lang similarity index 100% rename from files/1_1UT4/JS/lang/ro_ro.lang rename to TuffClient/files/1_1UT4/JS/lang/ro_ro.lang diff --git a/files/1_1UT4/JS/lang/ru_ru.lang b/TuffClient/files/1_1UT4/JS/lang/ru_ru.lang similarity index 100% rename from files/1_1UT4/JS/lang/ru_ru.lang rename to TuffClient/files/1_1UT4/JS/lang/ru_ru.lang diff --git a/files/1_1UT4/JS/lang/se_no.lang b/TuffClient/files/1_1UT4/JS/lang/se_no.lang similarity index 100% rename from files/1_1UT4/JS/lang/se_no.lang rename to TuffClient/files/1_1UT4/JS/lang/se_no.lang diff --git a/files/1_1UT4/JS/lang/sk_sk.lang b/TuffClient/files/1_1UT4/JS/lang/sk_sk.lang similarity index 100% rename from files/1_1UT4/JS/lang/sk_sk.lang rename to TuffClient/files/1_1UT4/JS/lang/sk_sk.lang diff --git a/files/1_1UT4/JS/lang/sl_si.lang b/TuffClient/files/1_1UT4/JS/lang/sl_si.lang similarity index 100% rename from files/1_1UT4/JS/lang/sl_si.lang rename to TuffClient/files/1_1UT4/JS/lang/sl_si.lang diff --git a/files/1_1UT4/JS/lang/so_so.lang b/TuffClient/files/1_1UT4/JS/lang/so_so.lang similarity index 100% rename from files/1_1UT4/JS/lang/so_so.lang rename to TuffClient/files/1_1UT4/JS/lang/so_so.lang diff --git a/files/1_1UT4/JS/lang/sq_al.lang b/TuffClient/files/1_1UT4/JS/lang/sq_al.lang similarity index 100% rename from files/1_1UT4/JS/lang/sq_al.lang rename to TuffClient/files/1_1UT4/JS/lang/sq_al.lang diff --git a/files/1_1UT4/JS/lang/sr_sp.lang b/TuffClient/files/1_1UT4/JS/lang/sr_sp.lang similarity index 100% rename from files/1_1UT4/JS/lang/sr_sp.lang rename to TuffClient/files/1_1UT4/JS/lang/sr_sp.lang diff --git a/files/1_1UT4/JS/lang/sv_se.lang b/TuffClient/files/1_1UT4/JS/lang/sv_se.lang similarity index 100% rename from files/1_1UT4/JS/lang/sv_se.lang rename to TuffClient/files/1_1UT4/JS/lang/sv_se.lang diff --git a/files/1_1UT4/JS/lang/ta_in.lang b/TuffClient/files/1_1UT4/JS/lang/ta_in.lang similarity index 100% rename from files/1_1UT4/JS/lang/ta_in.lang rename to TuffClient/files/1_1UT4/JS/lang/ta_in.lang diff --git a/files/1_1UT4/JS/lang/th_th.lang b/TuffClient/files/1_1UT4/JS/lang/th_th.lang similarity index 100% rename from files/1_1UT4/JS/lang/th_th.lang rename to TuffClient/files/1_1UT4/JS/lang/th_th.lang diff --git a/files/1_1UT4/JS/lang/tlh_aa.lang b/TuffClient/files/1_1UT4/JS/lang/tlh_aa.lang similarity index 100% rename from files/1_1UT4/JS/lang/tlh_aa.lang rename to TuffClient/files/1_1UT4/JS/lang/tlh_aa.lang diff --git a/files/1_1UT4/JS/lang/tr_tr.lang b/TuffClient/files/1_1UT4/JS/lang/tr_tr.lang similarity index 100% rename from files/1_1UT4/JS/lang/tr_tr.lang rename to TuffClient/files/1_1UT4/JS/lang/tr_tr.lang diff --git a/files/1_1UT4/JS/lang/tzl_tzl.lang b/TuffClient/files/1_1UT4/JS/lang/tzl_tzl.lang similarity index 100% rename from files/1_1UT4/JS/lang/tzl_tzl.lang rename to TuffClient/files/1_1UT4/JS/lang/tzl_tzl.lang diff --git a/files/1_1UT4/JS/lang/uk_ua.lang b/TuffClient/files/1_1UT4/JS/lang/uk_ua.lang similarity index 100% rename from files/1_1UT4/JS/lang/uk_ua.lang rename to TuffClient/files/1_1UT4/JS/lang/uk_ua.lang diff --git a/files/1_1UT4/JS/lang/val_es.lang b/TuffClient/files/1_1UT4/JS/lang/val_es.lang similarity index 100% rename from files/1_1UT4/JS/lang/val_es.lang rename to TuffClient/files/1_1UT4/JS/lang/val_es.lang diff --git a/files/1_1UT4/JS/lang/vec_it.lang b/TuffClient/files/1_1UT4/JS/lang/vec_it.lang similarity index 100% rename from files/1_1UT4/JS/lang/vec_it.lang rename to TuffClient/files/1_1UT4/JS/lang/vec_it.lang diff --git a/files/1_1UT4/JS/lang/vi_vn.lang b/TuffClient/files/1_1UT4/JS/lang/vi_vn.lang similarity index 100% rename from files/1_1UT4/JS/lang/vi_vn.lang rename to TuffClient/files/1_1UT4/JS/lang/vi_vn.lang diff --git a/files/1_1UT4/JS/lang/yo_ng.lang b/TuffClient/files/1_1UT4/JS/lang/yo_ng.lang similarity index 100% rename from files/1_1UT4/JS/lang/yo_ng.lang rename to TuffClient/files/1_1UT4/JS/lang/yo_ng.lang diff --git a/files/1_1UT4/JS/lang/zh_cn.lang b/TuffClient/files/1_1UT4/JS/lang/zh_cn.lang similarity index 100% rename from files/1_1UT4/JS/lang/zh_cn.lang rename to TuffClient/files/1_1UT4/JS/lang/zh_cn.lang diff --git a/files/1_1UT4/JS/lang/zh_tw.lang b/TuffClient/files/1_1UT4/JS/lang/zh_tw.lang similarity index 100% rename from files/1_1UT4/JS/lang/zh_tw.lang rename to TuffClient/files/1_1UT4/JS/lang/zh_tw.lang diff --git a/files/1_1UT4/WASM/assets.epw b/TuffClient/files/1_1UT4/WASM/assets.epw similarity index 100% rename from files/1_1UT4/WASM/assets.epw rename to TuffClient/files/1_1UT4/WASM/assets.epw diff --git a/files/1_1UT4/WASM/bootstrap.js b/TuffClient/files/1_1UT4/WASM/bootstrap.js similarity index 100% rename from files/1_1UT4/WASM/bootstrap.js rename to TuffClient/files/1_1UT4/WASM/bootstrap.js diff --git a/files/1_1UT4/WASM/favicon.png b/TuffClient/files/1_1UT4/WASM/favicon.png similarity index 100% rename from files/1_1UT4/WASM/favicon.png rename to TuffClient/files/1_1UT4/WASM/favicon.png diff --git a/files/1_1UT4/WASM/index.html b/TuffClient/files/1_1UT4/WASM/index.html similarity index 100% rename from files/1_1UT4/WASM/index.html rename to TuffClient/files/1_1UT4/WASM/index.html diff --git a/files/1_1UT5/JS/Tuff_Client_JS.html b/TuffClient/files/1_1UT5/JS/Tuff_Client_JS.html similarity index 100% rename from files/1_1UT5/JS/Tuff_Client_JS.html rename to TuffClient/files/1_1UT5/JS/Tuff_Client_JS.html diff --git a/files/1_1UT5/JS/assets.epk b/TuffClient/files/1_1UT5/JS/assets.epk similarity index 100% rename from files/1_1UT5/JS/assets.epk rename to TuffClient/files/1_1UT5/JS/assets.epk diff --git a/files/1_1UT5/JS/classes.js b/TuffClient/files/1_1UT5/JS/classes.js similarity index 100% rename from files/1_1UT5/JS/classes.js rename to TuffClient/files/1_1UT5/JS/classes.js diff --git a/files/1_1UT5/JS/index.html b/TuffClient/files/1_1UT5/JS/index.html similarity index 100% rename from files/1_1UT5/JS/index.html rename to TuffClient/files/1_1UT5/JS/index.html diff --git a/files/1_1UT5/JS/lang/af_za.lang b/TuffClient/files/1_1UT5/JS/lang/af_za.lang similarity index 100% rename from files/1_1UT5/JS/lang/af_za.lang rename to TuffClient/files/1_1UT5/JS/lang/af_za.lang diff --git a/files/1_1UT5/JS/lang/ar_sa.lang b/TuffClient/files/1_1UT5/JS/lang/ar_sa.lang similarity index 100% rename from files/1_1UT5/JS/lang/ar_sa.lang rename to TuffClient/files/1_1UT5/JS/lang/ar_sa.lang diff --git a/files/1_1UT5/JS/lang/ast_es.lang b/TuffClient/files/1_1UT5/JS/lang/ast_es.lang similarity index 100% rename from files/1_1UT5/JS/lang/ast_es.lang rename to TuffClient/files/1_1UT5/JS/lang/ast_es.lang diff --git a/files/1_1UT5/JS/lang/az_az.lang b/TuffClient/files/1_1UT5/JS/lang/az_az.lang similarity index 100% rename from files/1_1UT5/JS/lang/az_az.lang rename to TuffClient/files/1_1UT5/JS/lang/az_az.lang diff --git a/files/1_1UT5/JS/lang/be_by.lang b/TuffClient/files/1_1UT5/JS/lang/be_by.lang similarity index 100% rename from files/1_1UT5/JS/lang/be_by.lang rename to TuffClient/files/1_1UT5/JS/lang/be_by.lang diff --git a/files/1_1UT5/JS/lang/bg_bg.lang b/TuffClient/files/1_1UT5/JS/lang/bg_bg.lang similarity index 100% rename from files/1_1UT5/JS/lang/bg_bg.lang rename to TuffClient/files/1_1UT5/JS/lang/bg_bg.lang diff --git a/files/1_1UT5/JS/lang/br_fr.lang b/TuffClient/files/1_1UT5/JS/lang/br_fr.lang similarity index 100% rename from files/1_1UT5/JS/lang/br_fr.lang rename to TuffClient/files/1_1UT5/JS/lang/br_fr.lang diff --git a/files/1_1UT5/JS/lang/bs_ba.lang b/TuffClient/files/1_1UT5/JS/lang/bs_ba.lang similarity index 100% rename from files/1_1UT5/JS/lang/bs_ba.lang rename to TuffClient/files/1_1UT5/JS/lang/bs_ba.lang diff --git a/files/1_1UT5/JS/lang/ca_es.lang b/TuffClient/files/1_1UT5/JS/lang/ca_es.lang similarity index 100% rename from files/1_1UT5/JS/lang/ca_es.lang rename to TuffClient/files/1_1UT5/JS/lang/ca_es.lang diff --git a/files/1_1UT5/JS/lang/cs_cz.lang b/TuffClient/files/1_1UT5/JS/lang/cs_cz.lang similarity index 100% rename from files/1_1UT5/JS/lang/cs_cz.lang rename to TuffClient/files/1_1UT5/JS/lang/cs_cz.lang diff --git a/files/1_1UT5/JS/lang/cy_gb.lang b/TuffClient/files/1_1UT5/JS/lang/cy_gb.lang similarity index 100% rename from files/1_1UT5/JS/lang/cy_gb.lang rename to TuffClient/files/1_1UT5/JS/lang/cy_gb.lang diff --git a/files/1_1UT5/JS/lang/da_dk.lang b/TuffClient/files/1_1UT5/JS/lang/da_dk.lang similarity index 100% rename from files/1_1UT5/JS/lang/da_dk.lang rename to TuffClient/files/1_1UT5/JS/lang/da_dk.lang diff --git a/files/1_1UT5/JS/lang/de_alg.lang b/TuffClient/files/1_1UT5/JS/lang/de_alg.lang similarity index 100% rename from files/1_1UT5/JS/lang/de_alg.lang rename to TuffClient/files/1_1UT5/JS/lang/de_alg.lang diff --git a/files/1_1UT5/JS/lang/de_at.lang b/TuffClient/files/1_1UT5/JS/lang/de_at.lang similarity index 100% rename from files/1_1UT5/JS/lang/de_at.lang rename to TuffClient/files/1_1UT5/JS/lang/de_at.lang diff --git a/files/1_1UT5/JS/lang/de_ch.lang b/TuffClient/files/1_1UT5/JS/lang/de_ch.lang similarity index 100% rename from files/1_1UT5/JS/lang/de_ch.lang rename to TuffClient/files/1_1UT5/JS/lang/de_ch.lang diff --git a/files/1_1UT5/JS/lang/de_de.lang b/TuffClient/files/1_1UT5/JS/lang/de_de.lang similarity index 100% rename from files/1_1UT5/JS/lang/de_de.lang rename to TuffClient/files/1_1UT5/JS/lang/de_de.lang diff --git a/files/1_1UT5/JS/lang/el_gr.lang b/TuffClient/files/1_1UT5/JS/lang/el_gr.lang similarity index 100% rename from files/1_1UT5/JS/lang/el_gr.lang rename to TuffClient/files/1_1UT5/JS/lang/el_gr.lang diff --git a/files/1_1UT5/JS/lang/en_au.lang b/TuffClient/files/1_1UT5/JS/lang/en_au.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_au.lang rename to TuffClient/files/1_1UT5/JS/lang/en_au.lang diff --git a/files/1_1UT5/JS/lang/en_ca.lang b/TuffClient/files/1_1UT5/JS/lang/en_ca.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_ca.lang rename to TuffClient/files/1_1UT5/JS/lang/en_ca.lang diff --git a/files/1_1UT5/JS/lang/en_gb.lang b/TuffClient/files/1_1UT5/JS/lang/en_gb.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_gb.lang rename to TuffClient/files/1_1UT5/JS/lang/en_gb.lang diff --git a/files/1_1UT5/JS/lang/en_nz.lang b/TuffClient/files/1_1UT5/JS/lang/en_nz.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_nz.lang rename to TuffClient/files/1_1UT5/JS/lang/en_nz.lang diff --git a/files/1_1UT5/JS/lang/en_pt.lang b/TuffClient/files/1_1UT5/JS/lang/en_pt.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_pt.lang rename to TuffClient/files/1_1UT5/JS/lang/en_pt.lang diff --git a/files/1_1UT5/JS/lang/en_ud.lang b/TuffClient/files/1_1UT5/JS/lang/en_ud.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_ud.lang rename to TuffClient/files/1_1UT5/JS/lang/en_ud.lang diff --git a/files/1_1UT5/JS/lang/en_us.lang b/TuffClient/files/1_1UT5/JS/lang/en_us.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_us.lang rename to TuffClient/files/1_1UT5/JS/lang/en_us.lang diff --git a/files/1_1UT5/JS/lang/en_ws.lang b/TuffClient/files/1_1UT5/JS/lang/en_ws.lang similarity index 100% rename from files/1_1UT5/JS/lang/en_ws.lang rename to TuffClient/files/1_1UT5/JS/lang/en_ws.lang diff --git a/files/1_1UT5/JS/lang/eo_uy.lang b/TuffClient/files/1_1UT5/JS/lang/eo_uy.lang similarity index 100% rename from files/1_1UT5/JS/lang/eo_uy.lang rename to TuffClient/files/1_1UT5/JS/lang/eo_uy.lang diff --git a/files/1_1UT5/JS/lang/es_ar.lang b/TuffClient/files/1_1UT5/JS/lang/es_ar.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_ar.lang rename to TuffClient/files/1_1UT5/JS/lang/es_ar.lang diff --git a/files/1_1UT5/JS/lang/es_cl.lang b/TuffClient/files/1_1UT5/JS/lang/es_cl.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_cl.lang rename to TuffClient/files/1_1UT5/JS/lang/es_cl.lang diff --git a/files/1_1UT5/JS/lang/es_es.lang b/TuffClient/files/1_1UT5/JS/lang/es_es.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_es.lang rename to TuffClient/files/1_1UT5/JS/lang/es_es.lang diff --git a/files/1_1UT5/JS/lang/es_mx.lang b/TuffClient/files/1_1UT5/JS/lang/es_mx.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_mx.lang rename to TuffClient/files/1_1UT5/JS/lang/es_mx.lang diff --git a/files/1_1UT5/JS/lang/es_uy.lang b/TuffClient/files/1_1UT5/JS/lang/es_uy.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_uy.lang rename to TuffClient/files/1_1UT5/JS/lang/es_uy.lang diff --git a/files/1_1UT5/JS/lang/es_ve.lang b/TuffClient/files/1_1UT5/JS/lang/es_ve.lang similarity index 100% rename from files/1_1UT5/JS/lang/es_ve.lang rename to TuffClient/files/1_1UT5/JS/lang/es_ve.lang diff --git a/files/1_1UT5/JS/lang/et_ee.lang b/TuffClient/files/1_1UT5/JS/lang/et_ee.lang similarity index 100% rename from files/1_1UT5/JS/lang/et_ee.lang rename to TuffClient/files/1_1UT5/JS/lang/et_ee.lang diff --git a/files/1_1UT5/JS/lang/eu_es.lang b/TuffClient/files/1_1UT5/JS/lang/eu_es.lang similarity index 100% rename from files/1_1UT5/JS/lang/eu_es.lang rename to TuffClient/files/1_1UT5/JS/lang/eu_es.lang diff --git a/files/1_1UT5/JS/lang/fa_ir.lang b/TuffClient/files/1_1UT5/JS/lang/fa_ir.lang similarity index 100% rename from files/1_1UT5/JS/lang/fa_ir.lang rename to TuffClient/files/1_1UT5/JS/lang/fa_ir.lang diff --git a/files/1_1UT5/JS/lang/fi_fi.lang b/TuffClient/files/1_1UT5/JS/lang/fi_fi.lang similarity index 100% rename from files/1_1UT5/JS/lang/fi_fi.lang rename to TuffClient/files/1_1UT5/JS/lang/fi_fi.lang diff --git a/files/1_1UT5/JS/lang/fil_ph.lang b/TuffClient/files/1_1UT5/JS/lang/fil_ph.lang similarity index 100% rename from files/1_1UT5/JS/lang/fil_ph.lang rename to TuffClient/files/1_1UT5/JS/lang/fil_ph.lang diff --git a/files/1_1UT5/JS/lang/fo_fo.lang b/TuffClient/files/1_1UT5/JS/lang/fo_fo.lang similarity index 100% rename from files/1_1UT5/JS/lang/fo_fo.lang rename to TuffClient/files/1_1UT5/JS/lang/fo_fo.lang diff --git a/files/1_1UT5/JS/lang/fr_ca.lang b/TuffClient/files/1_1UT5/JS/lang/fr_ca.lang similarity index 100% rename from files/1_1UT5/JS/lang/fr_ca.lang rename to TuffClient/files/1_1UT5/JS/lang/fr_ca.lang diff --git a/files/1_1UT5/JS/lang/fr_fr.lang b/TuffClient/files/1_1UT5/JS/lang/fr_fr.lang similarity index 100% rename from files/1_1UT5/JS/lang/fr_fr.lang rename to TuffClient/files/1_1UT5/JS/lang/fr_fr.lang diff --git a/files/1_1UT5/JS/lang/fy_nl.lang b/TuffClient/files/1_1UT5/JS/lang/fy_nl.lang similarity index 100% rename from files/1_1UT5/JS/lang/fy_nl.lang rename to TuffClient/files/1_1UT5/JS/lang/fy_nl.lang diff --git a/files/1_1UT5/JS/lang/ga_ie.lang b/TuffClient/files/1_1UT5/JS/lang/ga_ie.lang similarity index 100% rename from files/1_1UT5/JS/lang/ga_ie.lang rename to TuffClient/files/1_1UT5/JS/lang/ga_ie.lang diff --git a/files/1_1UT5/JS/lang/gd_gb.lang b/TuffClient/files/1_1UT5/JS/lang/gd_gb.lang similarity index 100% rename from files/1_1UT5/JS/lang/gd_gb.lang rename to TuffClient/files/1_1UT5/JS/lang/gd_gb.lang diff --git a/files/1_1UT5/JS/lang/gl_es.lang b/TuffClient/files/1_1UT5/JS/lang/gl_es.lang similarity index 100% rename from files/1_1UT5/JS/lang/gl_es.lang rename to TuffClient/files/1_1UT5/JS/lang/gl_es.lang diff --git a/files/1_1UT5/JS/lang/gv_im.lang b/TuffClient/files/1_1UT5/JS/lang/gv_im.lang similarity index 100% rename from files/1_1UT5/JS/lang/gv_im.lang rename to TuffClient/files/1_1UT5/JS/lang/gv_im.lang diff --git a/files/1_1UT5/JS/lang/haw_us.lang b/TuffClient/files/1_1UT5/JS/lang/haw_us.lang similarity index 100% rename from files/1_1UT5/JS/lang/haw_us.lang rename to TuffClient/files/1_1UT5/JS/lang/haw_us.lang diff --git a/files/1_1UT5/JS/lang/he_il.lang b/TuffClient/files/1_1UT5/JS/lang/he_il.lang similarity index 100% rename from files/1_1UT5/JS/lang/he_il.lang rename to TuffClient/files/1_1UT5/JS/lang/he_il.lang diff --git a/files/1_1UT5/JS/lang/hi_in.lang b/TuffClient/files/1_1UT5/JS/lang/hi_in.lang similarity index 100% rename from files/1_1UT5/JS/lang/hi_in.lang rename to TuffClient/files/1_1UT5/JS/lang/hi_in.lang diff --git a/files/1_1UT5/JS/lang/hr_hr.lang b/TuffClient/files/1_1UT5/JS/lang/hr_hr.lang similarity index 100% rename from files/1_1UT5/JS/lang/hr_hr.lang rename to TuffClient/files/1_1UT5/JS/lang/hr_hr.lang diff --git a/files/1_1UT5/JS/lang/hu_hu.lang b/TuffClient/files/1_1UT5/JS/lang/hu_hu.lang similarity index 100% rename from files/1_1UT5/JS/lang/hu_hu.lang rename to TuffClient/files/1_1UT5/JS/lang/hu_hu.lang diff --git a/files/1_1UT5/JS/lang/hy_am.lang b/TuffClient/files/1_1UT5/JS/lang/hy_am.lang similarity index 100% rename from files/1_1UT5/JS/lang/hy_am.lang rename to TuffClient/files/1_1UT5/JS/lang/hy_am.lang diff --git a/files/1_1UT5/JS/lang/id_id.lang b/TuffClient/files/1_1UT5/JS/lang/id_id.lang similarity index 100% rename from files/1_1UT5/JS/lang/id_id.lang rename to TuffClient/files/1_1UT5/JS/lang/id_id.lang diff --git a/files/1_1UT5/JS/lang/ig_ng.lang b/TuffClient/files/1_1UT5/JS/lang/ig_ng.lang similarity index 100% rename from files/1_1UT5/JS/lang/ig_ng.lang rename to TuffClient/files/1_1UT5/JS/lang/ig_ng.lang diff --git a/files/1_1UT5/JS/lang/io_en.lang b/TuffClient/files/1_1UT5/JS/lang/io_en.lang similarity index 100% rename from files/1_1UT5/JS/lang/io_en.lang rename to TuffClient/files/1_1UT5/JS/lang/io_en.lang diff --git a/files/1_1UT5/JS/lang/is_is.lang b/TuffClient/files/1_1UT5/JS/lang/is_is.lang similarity index 100% rename from files/1_1UT5/JS/lang/is_is.lang rename to TuffClient/files/1_1UT5/JS/lang/is_is.lang diff --git a/files/1_1UT5/JS/lang/it_it.lang b/TuffClient/files/1_1UT5/JS/lang/it_it.lang similarity index 100% rename from files/1_1UT5/JS/lang/it_it.lang rename to TuffClient/files/1_1UT5/JS/lang/it_it.lang diff --git a/files/1_1UT5/JS/lang/ja_jp.lang b/TuffClient/files/1_1UT5/JS/lang/ja_jp.lang similarity index 100% rename from files/1_1UT5/JS/lang/ja_jp.lang rename to TuffClient/files/1_1UT5/JS/lang/ja_jp.lang diff --git a/files/1_1UT5/JS/lang/jbo_en.lang b/TuffClient/files/1_1UT5/JS/lang/jbo_en.lang similarity index 100% rename from files/1_1UT5/JS/lang/jbo_en.lang rename to TuffClient/files/1_1UT5/JS/lang/jbo_en.lang diff --git a/files/1_1UT5/JS/lang/ka_ge.lang b/TuffClient/files/1_1UT5/JS/lang/ka_ge.lang similarity index 100% rename from files/1_1UT5/JS/lang/ka_ge.lang rename to TuffClient/files/1_1UT5/JS/lang/ka_ge.lang diff --git a/files/1_1UT5/JS/lang/kab_kab.lang b/TuffClient/files/1_1UT5/JS/lang/kab_kab.lang similarity index 100% rename from files/1_1UT5/JS/lang/kab_kab.lang rename to TuffClient/files/1_1UT5/JS/lang/kab_kab.lang diff --git a/files/1_1UT5/JS/lang/kn_in.lang b/TuffClient/files/1_1UT5/JS/lang/kn_in.lang similarity index 100% rename from files/1_1UT5/JS/lang/kn_in.lang rename to TuffClient/files/1_1UT5/JS/lang/kn_in.lang diff --git a/files/1_1UT5/JS/lang/ko_kr.lang b/TuffClient/files/1_1UT5/JS/lang/ko_kr.lang similarity index 100% rename from files/1_1UT5/JS/lang/ko_kr.lang rename to TuffClient/files/1_1UT5/JS/lang/ko_kr.lang diff --git a/files/1_1UT5/JS/lang/ksh_de.lang b/TuffClient/files/1_1UT5/JS/lang/ksh_de.lang similarity index 100% rename from files/1_1UT5/JS/lang/ksh_de.lang rename to TuffClient/files/1_1UT5/JS/lang/ksh_de.lang diff --git a/files/1_1UT5/JS/lang/kw_gb.lang b/TuffClient/files/1_1UT5/JS/lang/kw_gb.lang similarity index 100% rename from files/1_1UT5/JS/lang/kw_gb.lang rename to TuffClient/files/1_1UT5/JS/lang/kw_gb.lang diff --git a/files/1_1UT5/JS/lang/la_la.lang b/TuffClient/files/1_1UT5/JS/lang/la_la.lang similarity index 100% rename from files/1_1UT5/JS/lang/la_la.lang rename to TuffClient/files/1_1UT5/JS/lang/la_la.lang diff --git a/files/1_1UT5/JS/lang/lb_lu.lang b/TuffClient/files/1_1UT5/JS/lang/lb_lu.lang similarity index 100% rename from files/1_1UT5/JS/lang/lb_lu.lang rename to TuffClient/files/1_1UT5/JS/lang/lb_lu.lang diff --git a/files/1_1UT5/JS/lang/li_li.lang b/TuffClient/files/1_1UT5/JS/lang/li_li.lang similarity index 100% rename from files/1_1UT5/JS/lang/li_li.lang rename to TuffClient/files/1_1UT5/JS/lang/li_li.lang diff --git a/files/1_1UT5/JS/lang/lol_us.lang b/TuffClient/files/1_1UT5/JS/lang/lol_us.lang similarity index 100% rename from files/1_1UT5/JS/lang/lol_us.lang rename to TuffClient/files/1_1UT5/JS/lang/lol_us.lang diff --git a/files/1_1UT5/JS/lang/lt_lt.lang b/TuffClient/files/1_1UT5/JS/lang/lt_lt.lang similarity index 100% rename from files/1_1UT5/JS/lang/lt_lt.lang rename to TuffClient/files/1_1UT5/JS/lang/lt_lt.lang diff --git a/files/1_1UT5/JS/lang/lv_lv.lang b/TuffClient/files/1_1UT5/JS/lang/lv_lv.lang similarity index 100% rename from files/1_1UT5/JS/lang/lv_lv.lang rename to TuffClient/files/1_1UT5/JS/lang/lv_lv.lang diff --git a/files/1_1UT5/JS/lang/mi_nz.lang b/TuffClient/files/1_1UT5/JS/lang/mi_nz.lang similarity index 100% rename from files/1_1UT5/JS/lang/mi_nz.lang rename to TuffClient/files/1_1UT5/JS/lang/mi_nz.lang diff --git a/files/1_1UT5/JS/lang/mk_mk.lang b/TuffClient/files/1_1UT5/JS/lang/mk_mk.lang similarity index 100% rename from files/1_1UT5/JS/lang/mk_mk.lang rename to TuffClient/files/1_1UT5/JS/lang/mk_mk.lang diff --git a/files/1_1UT5/JS/lang/mn_mn.lang b/TuffClient/files/1_1UT5/JS/lang/mn_mn.lang similarity index 100% rename from files/1_1UT5/JS/lang/mn_mn.lang rename to TuffClient/files/1_1UT5/JS/lang/mn_mn.lang diff --git a/files/1_1UT5/JS/lang/ms_my.lang b/TuffClient/files/1_1UT5/JS/lang/ms_my.lang similarity index 100% rename from files/1_1UT5/JS/lang/ms_my.lang rename to TuffClient/files/1_1UT5/JS/lang/ms_my.lang diff --git a/files/1_1UT5/JS/lang/mt_mt.lang b/TuffClient/files/1_1UT5/JS/lang/mt_mt.lang similarity index 100% rename from files/1_1UT5/JS/lang/mt_mt.lang rename to TuffClient/files/1_1UT5/JS/lang/mt_mt.lang diff --git a/files/1_1UT5/JS/lang/nds_de.lang b/TuffClient/files/1_1UT5/JS/lang/nds_de.lang similarity index 100% rename from files/1_1UT5/JS/lang/nds_de.lang rename to TuffClient/files/1_1UT5/JS/lang/nds_de.lang diff --git a/files/1_1UT5/JS/lang/nl_be.lang b/TuffClient/files/1_1UT5/JS/lang/nl_be.lang similarity index 100% rename from files/1_1UT5/JS/lang/nl_be.lang rename to TuffClient/files/1_1UT5/JS/lang/nl_be.lang diff --git a/files/1_1UT5/JS/lang/nl_nl.lang b/TuffClient/files/1_1UT5/JS/lang/nl_nl.lang similarity index 100% rename from files/1_1UT5/JS/lang/nl_nl.lang rename to TuffClient/files/1_1UT5/JS/lang/nl_nl.lang diff --git a/files/1_1UT5/JS/lang/nn_no.lang b/TuffClient/files/1_1UT5/JS/lang/nn_no.lang similarity index 100% rename from files/1_1UT5/JS/lang/nn_no.lang rename to TuffClient/files/1_1UT5/JS/lang/nn_no.lang diff --git a/files/1_1UT5/JS/lang/no_no.lang b/TuffClient/files/1_1UT5/JS/lang/no_no.lang similarity index 100% rename from files/1_1UT5/JS/lang/no_no.lang rename to TuffClient/files/1_1UT5/JS/lang/no_no.lang diff --git a/files/1_1UT5/JS/lang/oc_fr.lang b/TuffClient/files/1_1UT5/JS/lang/oc_fr.lang similarity index 100% rename from files/1_1UT5/JS/lang/oc_fr.lang rename to TuffClient/files/1_1UT5/JS/lang/oc_fr.lang diff --git a/files/1_1UT5/JS/lang/oj_ca.lang b/TuffClient/files/1_1UT5/JS/lang/oj_ca.lang similarity index 100% rename from files/1_1UT5/JS/lang/oj_ca.lang rename to TuffClient/files/1_1UT5/JS/lang/oj_ca.lang diff --git a/files/1_1UT5/JS/lang/pl_pl.lang b/TuffClient/files/1_1UT5/JS/lang/pl_pl.lang similarity index 100% rename from files/1_1UT5/JS/lang/pl_pl.lang rename to TuffClient/files/1_1UT5/JS/lang/pl_pl.lang diff --git a/files/1_1UT5/JS/lang/pt_br.lang b/TuffClient/files/1_1UT5/JS/lang/pt_br.lang similarity index 100% rename from files/1_1UT5/JS/lang/pt_br.lang rename to TuffClient/files/1_1UT5/JS/lang/pt_br.lang diff --git a/files/1_1UT5/JS/lang/pt_pt.lang b/TuffClient/files/1_1UT5/JS/lang/pt_pt.lang similarity index 100% rename from files/1_1UT5/JS/lang/pt_pt.lang rename to TuffClient/files/1_1UT5/JS/lang/pt_pt.lang diff --git a/files/1_1UT5/JS/lang/qya_aa.lang b/TuffClient/files/1_1UT5/JS/lang/qya_aa.lang similarity index 100% rename from files/1_1UT5/JS/lang/qya_aa.lang rename to TuffClient/files/1_1UT5/JS/lang/qya_aa.lang diff --git a/files/1_1UT5/JS/lang/ro_ro.lang b/TuffClient/files/1_1UT5/JS/lang/ro_ro.lang similarity index 100% rename from files/1_1UT5/JS/lang/ro_ro.lang rename to TuffClient/files/1_1UT5/JS/lang/ro_ro.lang diff --git a/files/1_1UT5/JS/lang/ru_ru.lang b/TuffClient/files/1_1UT5/JS/lang/ru_ru.lang similarity index 100% rename from files/1_1UT5/JS/lang/ru_ru.lang rename to TuffClient/files/1_1UT5/JS/lang/ru_ru.lang diff --git a/files/1_1UT5/JS/lang/se_no.lang b/TuffClient/files/1_1UT5/JS/lang/se_no.lang similarity index 100% rename from files/1_1UT5/JS/lang/se_no.lang rename to TuffClient/files/1_1UT5/JS/lang/se_no.lang diff --git a/files/1_1UT5/JS/lang/sk_sk.lang b/TuffClient/files/1_1UT5/JS/lang/sk_sk.lang similarity index 100% rename from files/1_1UT5/JS/lang/sk_sk.lang rename to TuffClient/files/1_1UT5/JS/lang/sk_sk.lang diff --git a/files/1_1UT5/JS/lang/sl_si.lang b/TuffClient/files/1_1UT5/JS/lang/sl_si.lang similarity index 100% rename from files/1_1UT5/JS/lang/sl_si.lang rename to TuffClient/files/1_1UT5/JS/lang/sl_si.lang diff --git a/files/1_1UT5/JS/lang/so_so.lang b/TuffClient/files/1_1UT5/JS/lang/so_so.lang similarity index 100% rename from files/1_1UT5/JS/lang/so_so.lang rename to TuffClient/files/1_1UT5/JS/lang/so_so.lang diff --git a/files/1_1UT5/JS/lang/sq_al.lang b/TuffClient/files/1_1UT5/JS/lang/sq_al.lang similarity index 100% rename from files/1_1UT5/JS/lang/sq_al.lang rename to TuffClient/files/1_1UT5/JS/lang/sq_al.lang diff --git a/files/1_1UT5/JS/lang/sr_sp.lang b/TuffClient/files/1_1UT5/JS/lang/sr_sp.lang similarity index 100% rename from files/1_1UT5/JS/lang/sr_sp.lang rename to TuffClient/files/1_1UT5/JS/lang/sr_sp.lang diff --git a/files/1_1UT5/JS/lang/sv_se.lang b/TuffClient/files/1_1UT5/JS/lang/sv_se.lang similarity index 100% rename from files/1_1UT5/JS/lang/sv_se.lang rename to TuffClient/files/1_1UT5/JS/lang/sv_se.lang diff --git a/files/1_1UT5/JS/lang/ta_in.lang b/TuffClient/files/1_1UT5/JS/lang/ta_in.lang similarity index 100% rename from files/1_1UT5/JS/lang/ta_in.lang rename to TuffClient/files/1_1UT5/JS/lang/ta_in.lang diff --git a/files/1_1UT5/JS/lang/th_th.lang b/TuffClient/files/1_1UT5/JS/lang/th_th.lang similarity index 100% rename from files/1_1UT5/JS/lang/th_th.lang rename to TuffClient/files/1_1UT5/JS/lang/th_th.lang diff --git a/files/1_1UT5/JS/lang/tlh_aa.lang b/TuffClient/files/1_1UT5/JS/lang/tlh_aa.lang similarity index 100% rename from files/1_1UT5/JS/lang/tlh_aa.lang rename to TuffClient/files/1_1UT5/JS/lang/tlh_aa.lang diff --git a/files/1_1UT5/JS/lang/tr_tr.lang b/TuffClient/files/1_1UT5/JS/lang/tr_tr.lang similarity index 100% rename from files/1_1UT5/JS/lang/tr_tr.lang rename to TuffClient/files