You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
166 KiB
95 lines
166 KiB
2 years ago
|
/**
|
||
|
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
|
||
|
*
|
||
|
* Copyright 2011-2017 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/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
|
||
|
*/
|
||
|
/**
|
||
|
* @licence
|
||
|
* crunch/crnlib uses the ZLIB license:
|
||
|
* http://opensource.org/licenses/Zlib
|
||
|
*
|
||
|
* Copyright (c) 2010-2016 Richard Geldreich, Jr. and Binomial LLC
|
||
|
*
|
||
|
* This software is provided 'as-is', without any express or implied
|
||
|
* warranty. In no event will the authors be held liable for any damages
|
||
|
* arising from the use of this software.
|
||
|
*
|
||
|
* Permission is granted to anyone to use this software for any purpose,
|
||
|
* including commercial applications, and to alter it and redistribute it
|
||
|
* freely, subject to the following restrictions:
|
||
|
*
|
||
|
* 1. The origin of this software must not be misrepresented; you must not
|
||
|
* claim that you wrote the original software. If you use this software
|
||
|
* in a product, an acknowledgment in the product documentation would be
|
||
|
* appreciated but is not required.
|
||
|
*
|
||
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
||
|
* misrepresented as being the original software.
|
||
|
*
|
||
|
* 3. This notice may not be removed or altered from any source distribution.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
when.js - https://github.com/cujojs/when
|
||
|
|
||
|
MIT License (c) copyright B Cavalier & J Hann
|
||
|
|
||
|
* A lightweight CommonJS Promises/A and when() implementation
|
||
|
* when is part of the cujo.js family of libraries (http://cujojs.com/)
|
||
|
*
|
||
|
* Licensed under the MIT License at:
|
||
|
* http://www.opensource.org/licenses/mit-license.php
|
||
|
*
|
||
|
* @version 1.7.1
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @license
|
||
|
*
|
||
|
* Copyright (c) 2014, Brandon Jones. All rights reserved.
|
||
|
*
|
||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||
|
* are permitted provided that the following conditions are met:
|
||
|
*
|
||
|
* * Redistributions of source code must retain the above copyright notice, this
|
||
|
* list of conditions and the following disclaimer.
|
||
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
||
|
* this list of conditions and the following disclaimer in the documentation
|
||
|
* and/or other materials provided with the distribution.
|
||
|
*
|
||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
!function(){define("Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Core/defineProperties",["./defined"],function(e){"use strict";var r=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(e){return!1}}(),n=Object.defineProperties;return r&&e(n)||(n=function(e){return e}),n}),define("Core/CompressedTextureBuffer",["./defined","./defineProperties"],function(e,r){"use strict";function n(e,r,n,t){this._format=e,this._width=r,this._height=n,this._buffer=t}return r(n.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}}),n.clone=function(r){if(e(r))return new n(r._format,r._width,r._height,r._buffer)},n.prototype.clone=function(){return n.clone(this)},n}),define("Core/freezeObject",["./defined"],function(e){"use strict";var r=Object.freeze;return e(r)||(r=function(e){return e}),r}),define("Core/WebGLConstants",["./freezeObject"],function(e){"use strict";return e({DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:3571
|
||
|
function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function r(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()))}function exit(e,r){r&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=e,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE&&process.exit(e),Module.quit(e,new ExitStatus(e)))}function abort(e){Module.onAbort&&Module.onAbort(e),void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0,EXITSTATUS=1;var r="abort("+e+") at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";throw abortDecorators&&abortDecorators.forEach(function(n){r=n(r,e)}),r}var Module;Module||(Module=(void 0!==Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),e=nodePath.normalize(e);var n=nodeFS.readFileSync(e);return r?n:n.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof ExitStatus))throw e}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),"undefined"!=typeof read?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert("object"==typeof r),r},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:void 0!==arguments&&(Module.arguments=arguments),"function"==typeof quit&&(Module.quit=function(e,r){quit(e)});else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,n){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=function(){200==t.status||0==t.status&&t.response?r(t.response):n()},t.
|
||
|
invoke_vi:invoke_vi,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_viiii:invoke_viiii,_pthread_getspecific:_pthread_getspecific,___syscall54:___syscall54,_pthread_setspecific:_pthread_setspecific,___gxx_personality_v0:___gxx_personality_v0,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,___cxa_begin_catch:___cxa_begin_catch,_pthread_once:_pthread_once,_emscripten_memcpy_big:_emscripten_memcpy_big,_pthread_key_create:_pthread_key_create,___syscall140:___syscall140,___resumeException:___resumeException,___cxa_find_matching_catch:___cxa_find_matching_catch,___syscall146:___syscall146,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,DYNAMICTOP_PTR:DYNAMICTOP_PTR,tempDoublePtr:tempDoublePtr,ABORT:ABORT,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,cttz_i8:cttz_i8};var asm=function(e,r,n){"almost asm";function t(e){return!(16777215&nn(e)||nn(e)<=16777215||nn(e)>2147483648)&&(Xr=new Hr(e),Yr=new Vr(e),Kr=new xr(e),Zr=new Wr(e),jr=new zr(e),Qr=new Jr(e),$r=new qr(e),rn=new en(e),n=e,!0)}function i(e){e|=0;var r=0,n=0,t=0,i=0,_=0,o=0,a=0,u=0,E=0,f=0,T=0,c=0,l=0,s=0,A=0,R=0,d=0,M=0,S=0,N=0,I=0;I=on,on=on+16|0,c=I;do{if(e>>>0<245){if(E=e>>>0<11?16:e+11&-8,e=E>>>3,T=0|Kr[1144],3&(n=T>>>e)|0)return r=(1&n^1)+e|0,e=4616+(r<<1<<2)|0,n=e+8|0,t=0|Kr[n>>2],i=t+8|0,_=0|Kr[i>>2],(0|e)==(0|_)?Kr[1144]=T&~(1<<r):(Kr[_+12>>2]=e,Kr[n>>2]=_),N=r<<3,Kr[t+4>>2]=3|N,N=t+N+4|0,Kr[N>>2]=1|Kr[N>>2],N=i,on=I,0|N;if(f=0|Kr[1146],E>>>0>f>>>0){if(0|n)return r=2<<e,r=n<<e&(r|0-r),r=(r&0-r)-1|0,o=r>>>12&16,r>>>=o,n=r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Kr[n+12>>2]=r,Kr[r+8>>2]=n,n=r}while(0);do{if(0|i){if(r=0|Kr[u+28>>2],e=4880+(r<<2)|0,(0|u)==(0|Kr[e>>2])){if(Kr[e>>2]=n,!n){Kr[1145]=a&~(1<<r);break}}else if(Kr[i+16+(((0|Kr[i+16>>2])!=(0|u)&1)<<2)>>2]=n,!n)break;Kr[n+24>>2]=i,r=0|Kr[u+16>>2],0|r&&(Kr[n+16>>2]=r,Kr[r+24>>2]=n),r=0|Kr[u+20>>2],0|r&&(Kr[n+20>>2]=r,Kr[r+24>>2]=n)}}while(0);return _>>>0<16?(N=_+E|0,Kr[u+4>>2]=3|N,N=u+N+4|0,Kr[N>>2]=1|Kr[N>>2]):(Kr[u+4>>2]=3|E,Kr[o+4>>2]=1|_,Kr[o+_>>2]=_,0|f&&(t=0|Kr[1149],r=f>>>3,n=4616+(r<<1<<2)|0,r=1<<r,T&r?(e=n+8|0,r=0|Kr[e>>2]):(Kr[1144]=T|r,r=n,e=n+8|0),Kr[e>>2]=t,Kr[r+12>>2]=t,Kr[t+8>>2]=r,Kr[t+12>>2]=n),Kr[1146]=_,Kr[1149]=o),N=u+8|0,on=I,0|N}T=E}else T=E}else T=E}else if(e>>>0<=4294967231)if(e=e+11|0,E=-8&e,u=0|Kr[1145]){t=0-E|0,e>>>=8,e?E>>>0>16777215?a=31:(T=(e+1048320|0)>>>16&8,S=e<<T,f=(S+520192|0)>>>16&4,S<<=f,a=(S+245760|0)>>>16&2,a=14-(f|T|a)+(S<<a>>>15)|0,a=E>>>(a+7|0)&1|a<<1):a=0,n=0|Kr[4880+(a<<2)>>2];e:do{if(n)for(e=0,o=E<<(31==(0|a)?0:25-(a>>>1)|0),_=0;;){if((i=(-8&Kr[n+4>>2])-E|0)>>>0<t>>>0){if(!i){e=n,t=0,i=n,S=61;break e}e=n,t=i}if(i=0|Kr[n+20>>2],n=0|Kr[n+16+(o>>>31<<2)>>2],_=0==(0|i)|(0|i)==(0|n)?_:i,i=0==(0|n)){n=_,S=57;break}o<<=1&(1^i)}else n=0,e=0,S=57}while(0);if(57==(0|S)){if(0==(0|n)&0==(0|e)){if(e=2<<a,!(e=u&(e|0-e))){T=E;break}T=(e&0-e)-1|0,o=T>>>12&16,T>>>=o,_=T>>>5&8,T>>>=_,a=T>>>2&4,T>>>=a,f=T>>>1&2,T>>>=f,n=T>>>1&1,e=0,n=0|Kr[4880+((_|o|a|f|n)+(T>>>n)<<2)>>2]}n?(i=n,S=61):
|
||
|
ce(W)),Kr[s+12>>2]=Kr[(0|Kr[h>>2])+(_<<2)>>2],Kr[s+(X<<2)>>2]=Kr[Z+((0|Zr[1547+(l<<2)+2>>0])<<2)>>2],te=(0|I(p,F))+_|0,ie=te-G|0,_=ie>>31,_=_&te|ie&~_,(0|Kr[w>>2])>>>0<=_>>>0&&(Kr[j>>2]=866,Kr[j+4>>2]=910,Kr[j+8>>2]=1497,He(W,812,j),ce(W)),Kr[s+(P<<2)>>2]=Kr[(0|Kr[h>>2])+(_<<2)>>2],Kr[s+(L<<2)>>2]=Kr[Z+((0|Zr[1547+(l<<2)+3>>0])<<2)>>2],te=(0|I(p,F))+_|0,ie=te-G|0,_=ie>>31,_=_&te|ie&~_,(0|Kr[w>>2])>>>0<=_>>>0&&(Kr[J>>2]=866,Kr[J+4>>2]=910,Kr[J+8>>2]=1497,He(W,812,J),ce(W)),Kr[s+(b<<2)>>2]=Kr[(0|Kr[h>>2])+(_<<2)>>2];if((0|(u=M+u|0))==(0|R))break;s=s+d|0}if((0|(O=O+1|0))==(0|a))break;N=N+D|0}C=C+1|0}while((0|C)!=(0|H));return on=ne,1}function f(e,r,n,t,i,_,o,a){e|=0,r|=0,n|=0,t|=0,i|=0,_|=0,o|=0,a|=0;var u=0,E=0,f=0,T=0,c=0,l=0,s=0,A=0,R=0,d=0,M=0,S=0,N=0,O=0,C=0,h=0,P=0,L=0,b=0,F=0,U=0,m=0,D=0,p=0,B=0,v=0,k=0,y=0,g=0,w=0,G=0,H=0,X=0,V=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0|jr[T>>1])<<16|Kr[$+(s<<2)>>2],Kr[R+4>>2]=(0|jr[T+4>>1])<<16|0|jr[T+2>>1],Kr[R+8>>2]=(0|jr[M>>1])<<16|Kr[g+(s<<2)>>2],Kr[R+12>>2]=(0|jr[M+4>>1])<<16|0|jr[M+2>>1]),2==(0|(A=A+1|0)))break;R=R+16|0}if(2==(0|(N=N+1|0)))break;O=O+t|0}if((0|(E=U+E|0))==(0|L))break;P=P+F|0}if((0|(D=D+1|0))==(0|a))break;m=m+W|0}p=p+1|0}while((0|p)!=(0|X));return on=oe,1}function T(e){e|=0;var r=0,n=0,t=0,i=0,_=0,o=0,a=0,u=0;if(e){n=e+-8|0,i=0|Kr[1148],e=0|Kr[e+-4>>2],r=-8&e,u=n+r|0;do{if(1&e)a=n,o=n;else{if(t=0|Kr[n>>2],!(3&e))return;if(o=n+(0-t)|0,_=t+r|0,o>>>0<i>>>0)return;if((0|o)==(0|Kr[1149])){if(e=u+4|0,3!=(3&(r=0|Kr[e>>2])|0)){a=o,r=_;break}return Kr[1146]=_,Kr[e>>2]=-2&r,Kr[o+4>>2]=1|_,void(Kr[o+_>>2]=_)}if(n=t>>>3,t>>>0<256){if(e=0|Kr[o+8>>2],(0|(r=0|Kr[o+12>>2]))==(0|e)){Kr[1144]=Kr[1144]&~(1<<n),a=o,r=_;break}Kr[e+12>>2]=r,Kr[r+8>>2]=e,a=o,r=_;break}i=0|Kr[o+24>>2],e=0|Kr[o+12>>2];do{if((0|e)==(0|o)){if(n=o+16|0,r=n+4|0,!(e=0|Kr[r>>2])){if(!(e=0|Kr[n>>2])){e=0;break}r=n}for(;;)if(n=e+20|0,0|(t=0|Kr[n>>2]))e=t,r=n;else{if(n=e+16|0
|
||
|
0|l):(_e(u,0,0,1,0),l=0,on=c,0|l))}function b(e,r,n){e|=0,r|=0,n|=0;var t=0,i=0,_=0,o=0,a=0,u=0;switch(a=on,on=on+576|0,_=a+40|0,i=a+56|0,u=a,Kr[u>>2]=40,G(e,r,u),t=(3+((0|Kr[u+4>>2])>>>n)|0)>>>2,r=(3+((0|Kr[u+8>>2])>>>n)|0)>>>2,n=u+32|0,e=0|Kr[n+4>>2],0|Kr[n>>2]){case 0:e?o=14:e=8;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:o=e?14:13;break;case 9:case 10:e?o=14:e=8;break;default:o=14}return 13==(0|o)?e=16:14==(0|o)&&(Kr[_>>2]=866,Kr[_+4>>2]=2672,Kr[_+8>>2]=1251,He(i,812,_),ce(i),e=0),u=0|cn(0|cn(r,t),e),on=a,0|u}function F(e,r){e|=0,r|=0;var n=0,t=0,i=0,_=0;switch(i=on,on=on+576|0,t=i+40|0,n=i+56|0,_=i,Kr[_>>2]=40,G(e,r,_),r=_+32|0,e=0|Kr[r+4>>2],0|Kr[r>>2]){case 0:if(!e)return _=8,on=i,0|_;e=14;break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:e=e?14:13;break;case 9:case 10:if(!e)return _=8,on=i,0|_;e=14;break;default:e=14}return 13==(0|e)?(_=16,on=i,0|_):14==(0|e)?(Kr[t>>2]=866,Kr[t+4>>2]=2672,Kr[t+8>>2]=1251,He(n,812,t),ce(n),_=0,on=i,0|_):0}function U(e,r,n,t,i,_,o){e|=0,r|=0,n|=0,t|=0,i|=0,_|=0,o|=0;var a=0,u=0,T=0,l=0;if(l=0|Kr[e+88>>2],u=(Zr[l+12>>0]<<8|Zr[l+13>>0])>>>o,T=(Zr[l+14>>0]<<8|Zr[l+15>>0])>>>o,u=((u>>>0>1?u:1)+3|0)>>>2,T=((T>>>0>1?T:1)+3|0)>>>2,l=l+18|0,o=0|Xr[l>>0],o=0|cn(u,o<<24>>24==0|o<<24>>24==9?8:16),_){if(!(0==(3&_|0)&o>>>0<=_>>>0))return 0|(i=0);o=_}if((0|cn(o,T))>>>0>i>>>0)return 0|(i=0);if(_=(u+1|0)>>>1,a=(T+1|0)>>>1,!n)return 0|(i=0);switch(Kr[e+92>>2]=r,Kr[e+96>>2]=r,Kr[e+104>>2]=n,Kr[e+100>>2]=r+n,Kr[e+108>>2]=0,Kr[e+112>>2]=0,0|Xr[l>>0]){case 0:if(!(0|E(e,t,i,o,u,T,_,a)))return 0|(i=0);break;case 4:case 6:case 5:case 3:case 2:if(!(0|c(e,t,i,o,u,T,_,a)))return 0|(i=0);break;case 9:if(!(0|R(e,t,i,o,u,T,_,a)))return 0|(i=0);break;case 8:case 7:if(!(0|f(e,t,i,o,u,T,_,a)))return 0|(i=0);break;default:return 0|(i=0)}return 0|(i=1)}function m(e,r,n){e|=0,r|=0,n|=0;var t=0,i=0,_=0;if((0|n)>=8192)return 0|Pn(0|e,0|r,0|n);if(_=0|e,i=e+n|0,(3&e)==(3&r)){for(;3&e;){if(!n)return 0|_;Xr[e>>0]=0|Xr[r>>0],e=e+1|0,r=r+1|0,n=n-1|0}for(n=-4&i|0,t=n-64|0;(0|e)<=(0|t);)Kr[e>>2]=Kr[r>>2],Kr[e+4>>2]=Kr[r+4>>2],Kr[e+8>>2]=Kr[r+8>>2],Kr[e+12>>2]=Kr[r+12>>2],Kr[e+16>>2]=Kr[r+16>>2],Kr[e+20>>2]=Kr[r+20>>2],Kr[e+24>>2]=Kr[r+24>>2],Kr[e+28>>2]=Kr[r+28>>2],Kr[e+32>>2]=Kr[r+32>>2],Kr[e+36>>2]=Kr[r+36>>2],Kr[e+40>>2]=Kr[r+40>>2],Kr[e+44>>2]=Kr[r+44>>2],Kr[e+48>>2]=Kr[r+48>>2],Kr[e+52>>2]=Kr[r+52>>2],Kr[e+56>>2]=Kr[r+56>>2],Kr[e+60>>2]=Kr[r+60>>2],e=e+64|0,r=r+64|0;for(;(0|e)<(0|n);)Kr[e>>2]=Kr[r>>2],e=e+4|0,r=r+4|0}else for(n=i-4|0;(0|e)<(0|n);)Xr[e>>0]=0|Xr[r>>0],Xr[e+1>>0]=0|Xr[r+1>>0],Xr[e+2>>0]=0|Xr[r+2>>0],Xr[e+3>>0]=0|Xr[r+3>>0],e=e+4|0,r=r+4|0;for(;(0|e)<(0|i);)Xr[e>>0]=0|Xr[r>>0],e=e+1|0,r=r+1|0;return 0|_}function D(e){e|=0;var r=0,n=0,t=0,i=0;if(i=e+92|0,t=e+88|0,n=0|Kr[t>>2],r=(0|Kr[e+4>>2])+((0|Zr[n+68>>0])<<8|(0|Zr[n+67>>0])<<16|0|Zr[n+69>>0])|0,!(n=(0|Zr[n+65>>0])<<8|0|Zr[n+66>>0]))return 0|(i=0);if(Kr[i>>2]=r,Kr[e+96>>2]=r,Kr[e+104>>2]=n,Kr[e+100>>2]=r+n,Kr[e+108>>2]=0,Kr[e+112>>2]=0,!(0|a(i,e+116|0)))return 0|(i=0);r=0|Kr[t>>2];do{if((0|Zr[r+39>>0])<<8|0|Zr[r+40>>0]){if(!(0|a(i,e+140|0)))return 0|(i=0);if(0|a(i,e+188|0)){r=0|Kr[t>>2];break}return 0|(i=0)}if(!((0|Zr[r+55>>0])<<8|0|Zr[r+56>>0]))return 0|(i=0)}while(0);if((0|Zr[r+55>>0])<<8|0|Zr[r+56>>0]|0){if(!(0|a(i,e+164|0)))return 0|(i=0);if(!(0|a(i,e+212|0)))return 0|(i=0)}return 0|(i=1)}function p(e,r,n){e|=0,r|=0,n|=0;var t=0,i=0,_=0,o=0,a=0,u=0,E=0,f=0,T=0,c=0,l=0;T=on,on=on+48|0,E=T+16|0,_=T,i=T+32|0,a=e+28|0,t=0|Kr[a>>2],Kr[i>>2]=t,u=e+20|0,t=(0|Kr[u>>2])-t|0,Kr[i+4>>2]=t,Kr[i+8>>2]=r,Kr[i+12>>2]=n,t=t+n|0,o=e+60|0,Kr[_>>2]=Kr[o>>2],Kr[_+4>>2]=i,Kr[_+8>>2]=2,_=0|$e(0|Fn(146,0|_));e:do{if((0|t)!=(0|_)){for(r=2;;){if((0|_)<0)break;if(t=t-_|0,l=0|Kr[i+4>>2],c=_>>>0>l>>>0,i=c?i+8|0:i,r=(c<<31>>31)+r|0,l=_-(c?l:0)|0,Kr[i>>2]=(0|Kr[i>>2])+l,c=i+4|0,Kr[c>>2]=(0|Kr[c>>2])-l,Kr[E>>2]=Kr[o>>2],Kr[E+4>>2]=i,Kr[E+8>>2]=r,_=0|$e(0|Fn(146,0|E)),(0|t)==(0|_)){f=3;break e}}Kr[e+16>>2]=0,Kr[a>>2]=0,Kr[u>>2]=0,Kr[e>>2]=32|Kr[e>>2],n=2==(0|r)?0:n-(0|Kr[i+4>>2])|0}else f=3}while(0);return 3==(0|f)&&(l=0|Kr[e+44>>2],Kr[e+16>>2]=l+(0|Kr[e
|
||
|
Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){function r(){for(var e=0;e<3;e++)t.push(0)}e=e||[],ensureInitRuntime();var n=e.length+1,t=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];r();for(var i=0;i<n-1;i+=1)t.push(allocate(intArrayFromString(e[i]),"i8",ALLOC_NORMAL)),r();t.push(0),t=allocate(t,"i32",ALLOC_NORMAL);try{exit(Module._main(n,t,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);var _=e;e&&"object"==typeof e&&e.stack&&(_=[e,e.stack]),Module.printErr("exception thrown: "+_),Module.quit(1,e)}finally{calledMain=!0}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),Module.noExitRuntime=!0,run(),Module}),function(e){"use strict";e("ThirdParty/when",[],function(){function e(e,n,t,i){return r(e).then(n,t,i)}function r(e){var r,n;return e instanceof t?r=e:a(e)?(n=o(),e.then(function(e){n.resolve(e)},function(e){n.reject(e)},function(e){n.progress(e)}),r=n.promise):r=i(e),r}function n(r){return e(r,_)}function t(e){this.then=e}function i(e){return new t(function(n){try{return r(n?n(e):e)}catch(e){return _(e)}})}function _(e){return new t(function(n,t){try{return t?r(t(e)):_(e)}catch(e){return _(e)}})}function o(){function e(e,r,n){return c(e,r,n)}function n(e){return s(e)}function i(e){return s(_(e))}function a(e){return l(e)}var u,E,f,T,c,l,s;return E=new t(e),u={then:e,resolve:n,reject:i,progress:a,promise:E,resolver:{resolve:n,reject:i,progress:a}},f=[],T=[],c=function(e,r,n){var t,i;return t=o(),i="function"==typeof n?function(e){try{t.progress(n(e))}catch(e){t.progress(e)}}:function(e){t.progress(e)},f.push(function(n){n.then(e,r).then(t.resolve,t.reject,i)}),T.push(i),t.promise},l=function(e){return A(T,e),e},s=function(e){return e=r(e),c=e.then,s=r,l=d,A(f,e),T=f=I,e},u}function a(e){return e&&"function"==typeof e.then}function u(r,n,t,i,_){return R(2,arguments),e(r,function(r){function a(e){A(e)}function u(e){s(e)}var E,f,T,c,l,s,A,R,M,S;if(M=r.length>>>0,E=Math.max(0,Math.min(n,M)),T=[],f=M-E+1,c=[],l=o(),E)for(R=l.progress,A=function(e){c.push(e),--f||(s=A=d,l.reject(c))},s=function(e){T.push(e),--E||(s=A=d,l.resolve(T))},S=0;S<M;++S)S in r&&e(r[S],u,a,R);else l.resolve(T);return l.then(t,i,_)})}function E(e,r,n,t){function i(e){return r?r(e[0]):e[0]}return u(e,1,i,n,t)}function f(e,r,n,t){return R(1,arguments),c(e,M).then(r,n,t)}function T(){return c(arguments,M)}function c(r,n){return e(r,function(r){var t,i,_,a,u,E;if(_=i=r.length>>>0,t=[],E=o(),_)for(a=function(r,i){e(r,n).then(function(e){t[i]=e,--_||E.resolve(t)},E.reject)},u=0;u<i;u++)u in r?a(r[u],u):--_;else E.resolve(t);return E.promise})}function l(r,n){var t=N.call(arguments,1);return e(r,function(r){var i;return i=r.length,t[0]=function(r,t,_){return e(r,function(r){return e(t,function(e){return n(r,e,_,i)})})},S.apply(r,t)})}function s(r,n,t){var i=arguments.length>2;return e(r,function(e){return e=i?t:e,n.resolve(e),e},function(e){return n.reject(e),_(e)},n.progress)}function A(e,r){for(var n,t=0;n=e[t++];)n(r)}function R(e,r){for(var n,t=r.length;t>e;)if(null!=(n=r[--t])&&"function"!=typeof n)throw new Error("arg "+t+" must be a function")}function d(){}function M(e){return e}var S,N,I;return e.defer=o,e.resolve=r,e.reject=n,e.join=T,e.all=f,e.map=c,e.reduce=l,e.any=E,e.some=u,e.chain=s,e.isPromise=a,t.prototype={always:function(e,r){return this.then(e,e,r)},otherwise:function(e){return this.then(I,e)},yield:function(e){return this.then(function(){return e})},spread:function(e){return this.then(function(r){return f(r,function(r){return e.apply(I,r)})})}},N=[].slice,S=[].reduce||function(e){var r,n,t,i,_;if(_=0,r=Object(this),i=r.length>>>0,n=arguments,n.length<=1)for(;;){if(_ in r){t=r[_++];break}if(++_>=i)throw new TypeError}else t=n[1];for(;_<i;++_)_
|