/** * Cesium - https://github.com/CesiumGS/cesium * * Copyright 2011-2020 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details. */ define(["exports"],function(e){if("undefined"!=typeof WebAssembly&&"object"!=typeof window){var t,_=void 0!==_?_:{},n={};for(t in _)_.hasOwnProperty(t)&&(n[t]=_[t]);_.arguments=[],_.thisProgram="./this.program",_.quit=function(e,t){throw t},_.preRun=[];var r,i,s=!(_.postRun=[]),u=!1;if(s="object"==typeof window,u="function"==typeof importScripts,r="object"==typeof process&&"function"==typeof require&&!s&&!u,i=!s&&!r&&!u,_.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var o,a,l="";if(r)l=__dirname+"/",_.read=function(e,t){var n;return o||(o=require("fs")),a||(a=require("path")),e=a.normalize(e),n=o.readFileSync(e),t?n:n.toString()},_.readBinary=function(e){var t=_.read(e,!0);return t.buffer||(t=new Uint8Array(t)),m(t.buffer),t},1>6,t[n++]=128|63&s}else if(s<=65535){if(o<=n+2)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(o<=n+3)break;2097152<=s&&p("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0}(t,S,n,r)}return i},array:function(e){var t,n,r=he(e.length);return n=r,m(0<=(t=e).length,"writeArrayToMemory array must have a length (should be an array or typed array)"),M.set(t,n),r}};var a,s,u=(m(s=_["_"+(a=e)],"Cannot call unknown function "+a+", make sure it is exported"),s),l=[],d=0;if(m("array"!==t,'Return type should not be "array".'),r)for(var c=0;c>10,56320|1023&l)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function g(e,t){return e?w(S,e,t):""}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function A(){var e=function(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}();return _.extraStackTrace&&(e+="\n"+_.extraStackTrace()),e.replace(/__Z[\w\d_]+/g,function(e){var t=e;return e===t?e:t+" ["+e+"]"})}var O,M,S,b,F,v,I,N;function x(e,t){return 0>2)-1]&&2310721022==v[(U>>2)-2]||Ae("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+v[(U>>2)-2].toString(16)+" "+v[(U>>2)-1].toString(16)),1668509029!==F[0]&&Ae("Runtime error: The application has corrupted its heap memory area (address zero)!")}if(P>2]},getStr:function(){return g(ee.get())},get64:function(){var e=ee.get(),t=ee.get();return m(0<=e?0===t:-1===t),e},getZero:function(){m(0===ee.get())}};function te(){return M.length}function ne(t){t=x(t,65536);var n=O.byteLength;try{return-1!==f.grow((t-n)/65536)&&(O=f.buffer,!0)}catch(e){return console.error("emscripten_realloc_buffer: Attempted to grow from "+n+" bytes to "+t+" bytes, but got error: "+e),!1}}var re={abort:Ae,setTempRet0:function(e){T=e},getTempRet0:function(){return T},abortStackOverflow:function(e){Ae("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(U-ye()+e)+" bytes available!")},nullFunc_ii:function(e){c("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),c("Build with ASSERTIONS=2 for more info."),Ae(e)},nullFunc_iiii:function(e){c("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),c("Build with ASSERTIONS=2 for more info."),Ae(e)},nullFunc_jiji:function(e){c("Invalid function pointer called with signature 'jiji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),c("Build with ASSERTIONS=2 for more info."),Ae(e)},nullFunc_vii:function(e){c("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),c("Build with ASSERTIONS=2 for more info."),Ae(e)},___lock:function(){},___setErrNo:function(e){return _.___errno_location?F[_.___errno_location()>>2]=e:c("failed to set errno from JS"),e},___syscall140:function(e,t){ee.varargs=t;try{return ee.getStreamFromFD(),ee.get(),ee.get(),ee.get(),ee.get(),Ae("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM"),0}catch(e){return void 0!==G&&e instanceof G.ErrnoError||Ae(e),-e.errno}},___syscall146:function(e,t){ee.varargs=t;try{for(var n=ee.get(),r=ee.get(),i=ee.get(),o=0,a=0;a>2],u=F[r+(8*a+4)>>2],l=0;l>2)-1]=34821223,v[(U>>2)-2]=2310721022,function(){if(_.preRun)for("function"==typeof _.preRun&&(_.preRun=[_.preRun]);_.preRun.length;)e=_.preRun.shift(),H.unshift(e);var e;k(H)}(),0>0];case"i16":return b[e>>1];case"i32":case"i64":return F[e>>2];case"float":return I[e>>2];case"double":return N[e>>3];default:Ae("invalid type for getValue: "+t)}return null},_.allocate||(_.allocate=function(){Ae("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getMemory||(_.getMemory=function(){Ae("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.AsciiToString||(_.AsciiToString=function(){Ae("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stringToAscii||(_.stringToAscii=function(){Ae("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.UTF8ArrayToString||(_.UTF8ArrayToString=function(){Ae("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.UTF8ToString||(_.UTF8ToString=function(){Ae("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stringToUTF8Array||(_.stringToUTF8Array=function(){Ae("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stringToUTF8||(_.stringToUTF8=function(){Ae("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.lengthBytesUTF8||(_.lengthBytesUTF8=function(){Ae("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.UTF16ToString||(_.UTF16ToString=function(){Ae("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stringToUTF16||(_.stringToUTF16=function(){Ae("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.lengthBytesUTF16||(_.lengthBytesUTF16=function(){Ae("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.UTF32ToString||(_.UTF32ToString=function(){Ae("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stringToUTF32||(_.stringToUTF32=function(){Ae("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.lengthBytesUTF32||(_.lengthBytesUTF32=function(){Ae("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.allocateUTF8||(_.allocateUTF8=function(){Ae("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stackTrace||(_.stackTrace=function(){Ae("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addOnPreRun||(_.addOnPreRun=function(){Ae("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addOnInit||(_.addOnInit=function(){Ae("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addOnPreMain||(_.addOnPreMain=function(){Ae("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addOnExit||(_.addOnExit=function(){Ae("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addOnPostRun||(_.addOnPostRun=function(){Ae("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.writeStringToMemory||(_.writeStringToMemory=function(){Ae("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.writeArrayToMemory||(_.writeArrayToMemory=function(){Ae("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.writeAsciiToMemory||(_.writeAsciiToMemory=function(){Ae("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addRunDependency||(_.addRunDependency=function(){Ae("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.removeRunDependency||(_.removeRunDependency=function(){Ae("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.ENV||(_.ENV=function(){Ae("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.FS||(_.FS=function(){Ae("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.FS_createFolder||(_.FS_createFolder=function(){Ae("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createPath||(_.FS_createPath=function(){Ae("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createDataFile||(_.FS_createDataFile=function(){Ae("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createPreloadedFile||(_.FS_createPreloadedFile=function(){Ae("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createLazyFile||(_.FS_createLazyFile=function(){Ae("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createLink||(_.FS_createLink=function(){Ae("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_createDevice||(_.FS_createDevice=function(){Ae("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.FS_unlink||(_.FS_unlink=function(){Ae("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),_.GL||(_.GL=function(){Ae("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.dynamicAlloc||(_.dynamicAlloc=function(){Ae("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.warnOnce||(_.warnOnce=function(){Ae("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.loadDynamicLibrary||(_.loadDynamicLibrary=function(){Ae("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.loadWebAssemblyModule||(_.loadWebAssemblyModule=function(){Ae("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getLEB||(_.getLEB=function(){Ae("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getFunctionTables||(_.getFunctionTables=function(){Ae("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.alignFunctionTables||(_.alignFunctionTables=function(){Ae("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.registerFunctions||(_.registerFunctions=function(){Ae("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.addFunction||(_.addFunction=function(){Ae("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.removeFunction||(_.removeFunction=function(){Ae("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getFuncWrapper||(_.getFuncWrapper=function(){Ae("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.prettyPrint||(_.prettyPrint=function(){Ae("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.makeBigInt||(_.makeBigInt=function(){Ae("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.dynCall||(_.dynCall=function(){Ae("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getCompilerSetting||(_.getCompilerSetting=function(){Ae("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stackSave||(_.stackSave=function(){Ae("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stackRestore||(_.stackRestore=function(){Ae("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.stackAlloc||(_.stackAlloc=function(){Ae("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.establishStackSpace||(_.establishStackSpace=function(){Ae("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.print||(_.print=function(){Ae("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.printErr||(_.printErr=function(){Ae("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.getTempRet0||(_.getTempRet0=function(){Ae("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.setTempRet0||(_.setTempRet0=function(){Ae("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.Pointer_stringify||(_.Pointer_stringify=function(){Ae("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),_.ALLOC_NORMAL||Object.defineProperty(_,"ALLOC_NORMAL",{get:function(){Ae("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_.ALLOC_STACK||Object.defineProperty(_,"ALLOC_STACK",{get:function(){Ae("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_.ALLOC_DYNAMIC||Object.defineProperty(_,"ALLOC_DYNAMIC",{get:function(){Ae("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),_.ALLOC_NONE||Object.defineProperty(_,"ALLOC_NONE",{get:function(){Ae("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),(Re.prototype=new Error).constructor=Re,j=function e(){_.calledRun||we(),_.calledRun||(j=e)},_.run=we;var ge=[];function Ae(t){_.onAbort&&_.onAbort(t),h=!0;var n="abort("+(t=void 0!==t?'"'+t+'"':"")+") at "+A();throw ge&&ge.forEach(function(e){n=e(n,t)}),n}if(_.abort=Ae,_.preInit)for("function"==typeof _.preInit&&(_.preInit=[_.preInit]);0<_.preInit.length;)_.preInit.pop()();_.noExitRuntime=!0,we()}else _=null;var Oe,Me=_;e.unzip=Me});