mars3d-cesium
Advanced tools
Comparing version 1.95.1 to 1.96.0
@@ -1,1 +0,56 @@ | ||
var BASIS=function(){var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(r=r||__filename),function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(r,t){e=r,readyPromiseRejectza=t}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var u=[],s=!1,c=!1,f=!1,l=!1;s="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,l=!s&&!f&&!c;var p,d,h,v,y,m="";function g(r){return o.locateFile?o.locateFile(r,m):m+r}f?(m=c?require("path").dirname(m)+"/":__dirname+"/",p=function(r,t){return v||(v=require("fs")),y||(y=require("path")),r=y.normalize(r),v.readFileSync(r,t?null:"utf8")},h=function(r){var t=p(r,!0);return t.buffer||(t=new Uint8Array(t)),A(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),u=process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof Qe))throw r})),process.on("unhandledRejection",dr),function(r){process.exit(r)},o.inspect=function(){return"[Emscripten Module object]"}):l?("undefined"!=typeof read&&(p=function(r){return read(r)}),h=function(r){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(r)):(A("object"==typeof(t=read(r,"binary"))),t)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&function(r){quit(r)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(s||c)&&(c?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),r&&(m=r),m=0!==m.indexOf("blob:")?m.substr(0,m.lastIndexOf("/")+1):"",p=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},c&&(h=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),d=function(r,t,e){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)});var w=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&(u=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit;var b,C=function(r){r};o.wasmBinary&&(b=o.wasmBinary);var $;o.noExitRuntime;"object"!=typeof WebAssembly&&dr("no native wasm support detected");var P=!1;function A(r,t){r||dr("Assertion failed: "+t)}var _="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&_)return _.decode(r.subarray(t,o));for(var i="";t<o;){var a=r[t++];if(128&a){var u=63&r[t++];if(192!=(224&a)){var s=63&r[t++];if((a=224==(240&a)?(15&a)<<12|u<<6|s:(7&a)<<18|u<<12|s<<6|63&r[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i}function W(r,t){return r?S(R,r,t):""}function E(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a<r.length;++a){var u=r.charCodeAt(a);if(u>=55296&&u<=57343)u=65536+((1023&u)<<10)|1023&r.charCodeAt(++a);if(u<=127){if(e>=i)break;t[e++]=u}else if(u<=2047){if(e+1>=i)break;t[e++]=192|u>>6,t[e++]=128|63&u}else if(u<=65535){if(e+2>=i)break;t[e++]=224|u>>12,t[e++]=128|u>>6&63,t[e++]=128|63&u}else{if(e+3>=i)break;t[e++]=240|u>>18,t[e++]=128|u>>12&63,t[e++]=128|u>>6&63,t[e++]=128|63&u}}return t[e]=0,e-o}function F(r,t,e){return E(r,R,t,e)}function k(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var O,j,R,x,I,D,U,B,M,V="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function q(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&I[n];)++n;if((e=n<<1)-r>32&&V)return V.decode(R.subarray(r,e));for(var i="",a=0;!(a>=t/2);++a){var u=x[r+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function H(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,i=0;i<o;++i){var a=r.charCodeAt(i);x[t>>1]=a,t+=2}return x[t>>1]=0,t-n}function z(r){return 2*r.length}function N(r,t){for(var e=0,n="";!(e>=t/4);){var o=D[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function G(r,t,e){if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,i=0;i<r.length;++i){var a=r.charCodeAt(i);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&r.charCodeAt(++i);if(D[t>>2]=a,(t+=4)+4>o)break}return D[t>>2]=0,t-n}function L(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t}function X(r,t){return r%t>0&&(r+=t-r%t),r}function J(r){O=r,o.HEAP8=j=new Int8Array(r),o.HEAP16=x=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=R=new Uint8Array(r),o.HEAPU16=I=new Uint16Array(r),o.HEAPU32=U=new Uint32Array(r),o.HEAPF32=B=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var K,Q=[],Y=[],Z=[],rr=[];function tr(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)ir(o.preRun.shift());$r(Q)}function er(){!0,$r(Y)}function nr(){$r(Z)}function or(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)ur(o.postRun.shift());$r(rr)}function ir(r){Q.unshift(r)}function ar(r){Y.unshift(r)}function ur(r){rr.unshift(r)}var sr=0,cr=null,fr=null;function lr(r){sr++,o.monitorRunDependencies&&o.monitorRunDependencies(sr)}function pr(r){if(sr--,o.monitorRunDependencies&&o.monitorRunDependencies(sr),0==sr&&(null!==cr&&(clearInterval(cr),cr=null),fr)){var t=fr;fr=null,t()}}function dr(r){o.onAbort&&o.onAbort(r),T(r+=""),P=!0,1,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function hr(r,t){return String.prototype.startsWith?r.startsWith(t):0===r.indexOf(t)}o.preloadedImages={},o.preloadedAudios={};var vr="data:application/octet-stream;base64,";function yr(r){return hr(r,vr)}var mr="file://";function gr(r){return hr(r,mr)}var wr="basis_transcoder.wasm";function Tr(r){try{if(r==wr&&b)return new Uint8Array(b);if(h)return h(r);throw"both async and sync fetching of the wasm failed"}catch(r){dr(r)}}function br(){if(!b&&(s||c)){if("function"==typeof fetch&&!gr(wr))return fetch(wr,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+wr+"'";return r.arrayBuffer()})).catch((function(){return Tr(wr)}));if(d)return new Promise((function(r,t){d(wr,(function(t){r(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Tr(wr)}))}function Cr(){var r={a:Le};function t(r,t){var e=r.exports;o.asm=e,J(($=o.asm.K).buffer),K=o.asm.O,ar(o.asm.L),pr()}function e(r){t(r.instance)}function i(t){return br().then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){T("failed to asynchronously prepare wasm: "+r),dr(r)}))}if(lr(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){return T("Module.instantiateWasm callback failed with error: "+r),!1}return(b||"function"!=typeof WebAssembly.instantiateStreaming||yr(wr)||gr(wr)||"function"!=typeof fetch?i(e):fetch(wr,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){return T("wasm streaming compile failed: "+r),T("falling back to ArrayBuffer instantiation"),i(e)}))}))).catch(n),{}}function $r(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?K.get(e)():K.get(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(o)}}yr(wr)||(wr=g(wr));var Pr={};function Ar(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function _r(r){return this.fromWireType(U[r>>2])}var Sr={},Wr={},Er={},Fr=48,kr=57;function Or(r){if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Fr&&t<=kr?"_"+r:r}function jr(r,t){return r=Or(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Rr(r,t){var e=jr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var xr=void 0;function Ir(r){throw new xr(r)}function Dr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ir("Mismatched type converter count");for(var o=0;o<r.length;++o)Nr(r[o],n[o])}r.forEach((function(r){Er[r]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(r,t){Wr.hasOwnProperty(r)?o[t]=Wr[r]:(i.push(r),Sr.hasOwnProperty(r)||(Sr[r]=[]),Sr[r].push((function(){o[t]=Wr[r],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ur(r){var t=Pr[r];delete Pr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;Dr([r],o.map((function(r){return r.getterReturnType})).concat(o.map((function(r){return r.setterArgumentType}))),(function(r){var i={};return o.forEach((function(t,e){var n=t.fieldName,a=r[e],u=t.getter,s=t.getterContext,c=r[e+o.length],f=t.setter,l=t.setterContext;i[n]={read:function(r){return a.fromWireType(u(s,r))},write:function(r,t){var e=[];f(l,r,c.toWireType(e,t)),Ar(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in i)t[e]=i[e].read(r);return n(r),t},toWireType:function(r,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=e();for(o in i)i[o].write(a,t[o]);return null!==r&&r.push(n,a),a},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:n}]}))}function Br(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}function Mr(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);Vr=r}var Vr=void 0;function qr(r){for(var t="",e=r;R[e];)t+=Vr[R[e++]];return t}var Hr=void 0;function zr(r){throw new Hr(r)}function Nr(r,t,e){if(e=e||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||zr('type "'+n+'" must have a positive integer typeid pointer'),Wr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;zr("Cannot register type '"+n+"' twice")}if(Wr[r]=t,delete Er[r],Sr.hasOwnProperty(r)){var o=Sr[r];delete Sr[r],o.forEach((function(r){r()}))}}function Gr(r,t,e,n,o){var i=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=j;else if(2===e)n=x;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=D}return this.fromWireType(n[r>>i])},destructorFunction:null})}function Lr(r){if(!(this instanceof ct))return!1;if(!(r instanceof ct))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}function Xr(r){return{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}}function Jr(r){zr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Kr=!1;function Qr(r){}function Yr(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}function Zr(r){r.count.value-=1,0===r.count.value&&Yr(r)}function rt(r){return"undefined"==typeof FinalizationGroup?(rt=function(r){return r},r):(Kr=new FinalizationGroup((function(r){for(var t=r.next();!t.done;t=r.next()){var e=t.value;e.ptr?Zr(e):console.warn("object already deleted: "+e.ptr)}})),rt=function(r){return Kr.register(r,r.$$,r.$$),r},Qr=function(r){Kr.unregister(r.$$)},rt(r))}function tt(){if(this.$$.ptr||Jr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=rt(Object.create(Object.getPrototypeOf(this),{$$:{value:Xr(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function et(){this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),Qr(this),Zr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function nt(){return!this.$$.ptr}var ot=void 0,it=[];function at(){for(;it.length;){var r=it.pop();r.$$.deleteScheduled=!1,r.delete()}}function ut(){return this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zr("Object already scheduled for deletion"),it.push(this),1===it.length&&ot&&ot(at),this.$$.deleteScheduled=!0,this}function st(){ct.prototype.isAliasOf=Lr,ct.prototype.clone=tt,ct.prototype.delete=et,ct.prototype.isDeleted=nt,ct.prototype.deleteLater=ut}function ct(){}var ft={};function lt(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||zr("Function '"+e+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[t].overloadTable+")!"),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}}function pt(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&zr("Cannot register public name '"+r+"' twice"),lt(o,r,r),o.hasOwnProperty(e)&&zr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function dt(r,t,e,n,o,i,a,u){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=u,this.pureVirtualFunctions=[]}function ht(r,t,e){for(;t!==e;)t.upcast||zr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function vt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function yt(r,t){var e;if(null===t)return this.isReference&&zr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ht(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&zr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:zr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,re((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:zr("Unsupporting sharing policy")}return e}function mt(r,t){if(null===t)return this.isReference&&zr("null is not a valid "+this.name),0;t.$$||zr('Cannot pass "'+ae(t)+'" as a '+this.name),t.$$.ptr||zr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&zr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ht(t.$$.ptr,e,this.registeredClass)}function gt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function wt(r){this.rawDestructor&&this.rawDestructor(r)}function Tt(r){null!==r&&r.delete()}function bt(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=bt(r,t,e.baseClass);return null===n?null:e.downcast(n)}function Ct(){return Object.keys(_t).length}function $t(){var r=[];for(var t in _t)_t.hasOwnProperty(t)&&r.push(_t[t]);return r}function Pt(r){ot=r,it.length&&ot&&ot(at)}function At(){o.getInheritedInstanceCount=Ct,o.getLiveInheritedInstances=$t,o.flushPendingDeletes=at,o.setDelayFunction=Pt}var _t={};function St(r,t){for(void 0===t&&zr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}function Wt(r,t){return t=St(r,t),_t[t]}function Et(r,t){return t.ptrType&&t.ptr||Ir("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ir("Both smartPtrType and smartPtr must be specified"),t.count={value:1},rt(Object.create(r,{$$:{value:t}}))}function Ft(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Wt(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var i,a=this.registeredClass.getActualType(t),u=ft[a];if(!u)return o.call(this);i=this.isConst?u.constPointerType:u.pointerType;var s=bt(t,this.registeredClass,i.registeredClass);return null===s?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s,smartPtrType:this,smartPtr:r}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:s})}function kt(){Ot.prototype.getPointee=gt,Ot.prototype.destructor=wt,Ot.prototype.argPackAdvance=8,Ot.prototype.readValueFromPointer=_r,Ot.prototype.deleteObject=Tt,Ot.prototype.fromWireType=Ft}function Ot(r,t,e,n,o,i,a,u,s,c,f){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=yt:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=mt,this.destructorFunction=null)}function jt(r,t,e){o.hasOwnProperty(r)||Ir("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function Rt(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}function xt(r,t,e){return-1!=r.indexOf("j")?Rt(r,t,e):K.get(t).apply(null,e)}function It(r,t){var e=[];return function(){e.length=arguments.length;for(var n=0;n<arguments.length;n++)e[n]=arguments[n];return xt(r,t,e)}}function Dt(r,t){var e=-1!=(r=qr(r)).indexOf("j")?It(r,t):K.get(t);return"function"!=typeof e&&zr("unknown function pointer with signature "+r+": "+t),e}var Ut=void 0;function Bt(r){var t=Ke(r),e=qr(t);return Je(t),e}function Mt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Wr[t]||(Er[t]?Er[t].forEach(r):(e.push(t),n[t]=!0))})),new Ut(r+": "+e.map(Bt).join([", "]))}function Vt(r,t,e,n,o,i,a,u,s,c,f,l,p){f=qr(f),i=Dt(o,i),u&&(u=Dt(a,u)),c&&(c=Dt(s,c)),p=Dt(l,p);var d=Or(f);pt(d,(function(){Mt("Cannot construct "+f+" due to unbound types",[n])})),Dr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:ct.prototype;var a=jr(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Hr("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Hr(f+" has no accessible constructor");var r=l.constructor_body[arguments.length];if(void 0===r)throw new Hr("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return r.apply(this,arguments)})),s=Object.create(o,{constructor:{value:a}});a.prototype=s;var l=new dt(f,a,s,p,e,i,u,c),h=new Ot(f,l,!0,!1,!1),v=new Ot(f+"*",l,!1,!1,!1),y=new Ot(f+" const*",l,!1,!0,!1);return ft[r]={pointerType:v,constPointerType:y},jt(d,a),[h,v,y]}))}function qt(r,t){for(var e=[],n=0;n<r;n++)e.push(D[(t>>2)+n]);return e}function Ht(r,t,e,n,o,i){A(t>0);var a=qt(t,e);o=Dt(n,o);var u=[i],s=[];Dr([],[r],(function(r){var e="constructor "+(r=r[0]).name;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new Hr("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+r.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return r.registeredClass.constructor_body[t-1]=function(){Mt("Cannot construct "+r.name+" due to unbound types",a)},Dr([],a,(function(n){return r.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&zr(e+" called with "+arguments.length+" arguments, expected "+(t-1)),s.length=0,u.length=t;for(var r=1;r<t;++r)u[r]=n[r].toWireType(s,arguments[r-1]);var i=o.apply(null,u);return Ar(s),n[0].fromWireType(i)},[]})),[]}))}function zt(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=jr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function Nt(r,t,e,n,o){var i=t.length;i<2&&zr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==e,u=!1,s=1;s<t.length;++s)if(null!==t[s]&&void 0===t[s].destructorFunction){u=!0;break}var c="void"!==t[0].name,f="",l="";for(s=0;s<i-2;++s)f+=(0!==s?", ":"")+"arg"+s,l+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Or(r)+"("+f+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[zr,n,o,Ar,t[0],t[1]];a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n");for(s=0;s<i-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+t[s+2].name+"\n",h.push("argType"+s),v.push(t[s+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)p+="runDestructors(destructors);\n";else for(s=a?1:2;s<t.length;++s){var y=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==t[s].destructorFunction&&(p+=y+"_dtor("+y+"); // "+t[s].name+"\n",h.push(y+"_dtor"),v.push(t[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),zt(Function,h).apply(null,v)}function Gt(r,t,e,n,o,i,a,u){var s=qt(e,n);t=qr(t),i=Dt(o,i),Dr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){Mt("Cannot call "+n+" due to unbound types",s)}u&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(lt(c,t,n),c[t].overloadTable[e-2]=o),Dr([],s,(function(o){var u=Nt(n,o,r,i,a);return void 0===c[t].overloadTable?(u.argCount=e-2,c[t]=u):c[t].overloadTable[e-2]=u,[]})),[]}))}function Lt(r,t,e){r=qr(r),Dr([],[t],(function(t){return t=t[0],o[r]=t.fromWireType(e),[]}))}var Xt=[],Jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Kt(r){r>4&&0==--Jt[r].refcount&&(Jt[r]=void 0,Xt.push(r))}function Qt(){for(var r=0,t=5;t<Jt.length;++t)void 0!==Jt[t]&&++r;return r}function Yt(){for(var r=5;r<Jt.length;++r)if(void 0!==Jt[r])return Jt[r];return null}function Zt(){o.count_emval_handles=Qt,o.get_first_emval=Yt}function re(r){switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Xt.length?Xt.pop():Jt.length;return Jt[t]={refcount:1,value:r},t}}function te(r,t){Nr(r,{name:t=qr(t),fromWireType:function(r){var t=Jt[r].value;return Kt(r),t},toWireType:function(r,t){return re(t)},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:null})}function ee(r,t,e){switch(t){case 0:return function(r){var t=e?j:R;return this.fromWireType(t[r])};case 1:return function(r){var t=e?x:I;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?D:U;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function ne(r,t,e,n){var o=Br(e);function i(){}t=qr(t),i.values={},Nr(r,{name:t,constructor:i,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:ee(t,o,n),destructorFunction:null}),pt(t,i)}function oe(r,t){var e=Wr[r];return void 0===e&&zr(t+" has unknown type "+Bt(r)),e}function ie(r,t,e){var n=oe(r,"enum");t=qr(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:jr(n.name+"_"+t,(function(){}))}});o.values[e]=i,o[t]=i}function ae(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function ue(r,t){switch(t){case 2:return function(r){return this.fromWireType(B[r>>2])};case 3:return function(r){return this.fromWireType(M[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function se(r,t,e){var n=Br(e);Nr(r,{name:t=qr(t),fromWireType:function(r){return r},toWireType:function(r,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ae(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:ue(t,n),destructorFunction:null})}function ce(r,t,e,n,o,i){var a=qt(t,e);r=qr(r),o=Dt(n,o),pt(r,(function(){Mt("Cannot call "+r+" due to unbound types",a)}),t-1),Dr([],a,(function(e){var n=[e[0],null].concat(e.slice(1));return jt(r,Nt(r,n,null,o,i),t-1),[]}))}function fe(r,t,e){switch(t){case 0:return e?function(r){return j[r]}:function(r){return R[r]};case 1:return e?function(r){return x[r>>1]}:function(r){return I[r>>1]};case 2:return e?function(r){return D[r>>2]}:function(r){return U[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}function le(r,t,e,n,o){t=qr(t),-1===o&&(o=4294967295);var i=Br(e),a=function(r){return r};if(0===n){var u=32-8*e;a=function(r){return r<<u>>>u}}var s=-1!=t.indexOf("unsigned");Nr(r,{name:t,fromWireType:a,toWireType:function(r,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+ae(e)+'" to '+this.name);if(e<n||e>o)throw new TypeError('Passing a number "'+ae(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return s?e>>>0:0|e},argPackAdvance:8,readValueFromPointer:fe(t,i,0!==n),destructorFunction:null})}function pe(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=U,e=t[r>>=2],o=t[r+1];return new n(O,o,e)}Nr(r,{name:e=qr(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function de(r,t){var e="std::string"===(t=qr(t));Nr(r,{name:t,fromWireType:function(r){var t,n=U[r>>2];if(e)for(var o=r+4,i=0;i<=n;++i){var a=r+4+i;if(i==n||0==R[a]){var u=W(o,a-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=a+1}}else{var s=new Array(n);for(i=0;i<n;++i)s[i]=String.fromCharCode(R[r+4+i]);t=s.join("")}return Je(r),t},toWireType:function(r,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||zr("Cannot pass non-string to std::string");var o=(e&&n?function(){return k(t)}:function(){return t.length})(),i=Xe(4+o+1);if(U[i>>2]=o,e&&n)F(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var u=t.charCodeAt(a);u>255&&(Je(i),zr("String has UTF-16 code units that do not fit in 8 bits")),R[i+4+a]=u}else for(a=0;a<o;++a)R[i+4+a]=t[a];return null!==r&&r.push(Je,i),i},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function he(r,t,e){var n,o,i,a,u;e=qr(e),2===t?(n=q,o=H,a=z,i=function(){return I},u=1):4===t&&(n=N,o=G,a=L,i=function(){return U},u=2),Nr(r,{name:e,fromWireType:function(r){for(var e,o=U[r>>2],a=i(),s=r+4,c=0;c<=o;++c){var f=r+4+c*t;if(c==o||0==a[f>>u]){var l=n(s,f-s);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),s=f+t}}return Je(r),e},toWireType:function(r,n){"string"!=typeof n&&zr("Cannot pass non-string to C++ string type "+e);var i=a(n),s=Xe(4+i+t);return U[s>>2]=i>>u,o(n,s+4,i+t),null!==r&&r.push(Je,s),s},argPackAdvance:8,readValueFromPointer:_r,destructorFunction:function(r){Je(r)}})}function ve(r,t,e,n,o,i){Pr[r]={name:qr(t),rawConstructor:Dt(e,n),rawDestructor:Dt(o,i),fields:[]}}function ye(r,t,e,n,o,i,a,u,s,c){Pr[r].fields.push({fieldName:qr(t),getterReturnType:e,getter:Dt(n,o),getterContext:i,setterArgumentType:a,setter:Dt(u,s),setterContext:c})}function me(r,t){Nr(r,{isVoid:!0,name:t=qr(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})}function ge(r){return r||zr("Cannot use deleted val. handle = "+r),Jt[r].value}function we(r,t,e){r=ge(r),t=oe(t,"emval::as");var n=[],o=re(n);return D[e>>2]=o,t.toWireType(n,r)}var Te={};function be(r){var t=Te[r];return void 0===t?qr(r):t}var Ce=[];function $e(r,t,e,n){(r=Ce[r])(t=ge(t),e=be(e),null,n)}function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(r){return 0===r?re(Pe()):(r=be(r),re(Pe()[r]))}function _e(r){var t=Ce.length;return Ce.push(r),t}function Se(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=oe(D[(t>>2)+n],"parameter "+n);return e}function We(r,t){for(var e=Se(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",i=["retType"],a=[n],u="",s=0;s<r-1;++s)u+=(0!==s?", ":"")+"arg"+s,i.push("argType"+s),a.push(e[1+s]);var c="return function "+Or("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(s=0;s<r-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=e[s+1].argPackAdvance;c+=" var rv = handle[name]("+u+");\n";for(s=0;s<r-1;++s)e[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");return n.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",i.push(c),_e(zt(Function,i).apply(null,a))}function Ee(r){return r=be(r),re(o[r])}function Fe(r,t){return re((r=ge(r))[t=ge(t)])}function ke(r){r>4&&(Jt[r].refcount+=1)}function Oe(r){for(var t="",e=0;e<r;++e)t+=(0!==e?", ":"")+"arg"+e;var n="return function emval_allocator_"+r+"(constructor, argTypes, args) {\n";for(e=0;e<r;++e)n+="var argType"+e+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+e+'], "parameter '+e+'");\nvar arg'+e+" = argType"+e+".readValueFromPointer(args);\nargs += argType"+e+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(oe,o,re)}var je={};function Re(r,t,e,n){r=ge(r);var o=je[t];return o||(o=Oe(t),je[t]=o),o(r,e,n)}function xe(r){return re(be(r))}function Ie(r){Ar(Jt[r].value),Kt(r)}function De(){dr()}function Ue(r,t,e){R.copyWithin(r,t,t+e)}function Be(r){try{return $.grow(r-O.byteLength+65535>>>16),J($.buffer),1}catch(r){}}function Me(r){var t=R.length,e=2147483648;if((r>>>=0)>e)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,r+100663296),Be(Math.min(e,X(Math.max(r,o),65536))))return!0}return!1}var Ve={mappings:{},buffers:[null,[],[]],printChar:function(r,t){var e=Ve.buffers[r];0===t||10===t?((1===r?w:T)(S(e,0)),e.length=0):e.push(t)},varargs:void 0,get:function(){return Ve.varargs+=4,D[Ve.varargs-4>>2]},getStr:function(r){return W(r)},get64:function(r,t){return r}};function qe(r){return 0}function He(r,t,e,n,o){}function ze(r,t,e,n){for(var o=0,i=0;i<e;i++){for(var a=D[t+8*i>>2],u=D[t+(8*i+4)>>2],s=0;s<u;s++)Ve.printChar(r,R[a+s]);o+=u}return D[n>>2]=o,0}function Ne(r){C(0|r)}xr=o.InternalError=Rr(Error,"InternalError"),Mr(),Hr=o.BindingError=Rr(Error,"BindingError"),st(),kt(),At(),Ut=o.UnboundTypeError=Rr(Error,"UnboundTypeError"),Zt();var Ge,Le={t:Ur,I:Gr,x:Vt,w:Ht,d:Gt,k:Lt,H:te,n:ne,a:ie,A:se,i:ce,j:le,h:pe,B:de,v:he,u:ve,c:ye,J:me,m:we,s:$e,b:Kt,y:Ae,p:We,r:Ee,e:Fe,g:ke,q:Re,f:xe,l:Ie,o:De,E:Ue,F:Me,G:qe,C:He,z:ze,D:Ne},Xe=(Cr(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.L).apply(null,arguments)},o._malloc=function(){return(Xe=o._malloc=o.asm.M).apply(null,arguments)}),Je=o._free=function(){return(Je=o._free=o.asm.N).apply(null,arguments)},Ke=o.___getTypeName=function(){return(Ke=o.___getTypeName=o.asm.P).apply(null,arguments)};o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.Q).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.R).apply(null,arguments)};function Qe(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Ye(r){function t(){Ge||(Ge=!0,o.calledRun=!0,P||(er(),nr(),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),or()))}r=r||u,sr>0||(tr(),sr>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(fr=function r(){Ge||Ye(),Ge||(fr=r)},o.run=Ye,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Ye(),t.ready}}();"object"==typeof exports&&"object"==typeof module?module.exports=BASIS:"function"==typeof define&&define.amd?define([],(function(){return BASIS})):"object"==typeof exports&&(exports.BASIS=BASIS); | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
var BASIS=function(){var ae=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(ae=ae||__filename),function(x){x=x||{};var u=typeof x<"u"?x:{},xe,Ge;u.ready=new Promise(function(e,r){xe=e,readyPromiseRejectza=r});var G={},D;for(D in u)u.hasOwnProperty(D)&&(G[D]=u[D]);var z=[],ze="./this.program",Ae=function(e,r){throw r},se=!1,I=!1,$e=!1,Xe=!1;se=typeof window=="object",I=typeof importScripts=="function",$e=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Xe=!se&&!$e&&!I;var w="";function Er(e){return u.locateFile?u.locateFile(e,w):w+e}var ue,Fe,X,Rr,Ee,Re;$e?(I?w=require("path").dirname(w)+"/":w=__dirname+"/",ue=function(r,t){return Ee||(Ee=require("fs")),Re||(Re=require("path")),r=Re.normalize(r),Ee.readFileSync(r,t?null:"utf8")},X=function(r){var t=ue(r,!0);return t.buffer||(t=new Uint8Array(t)),Se(t.buffer),t},process.argv.length>1&&(ze=process.argv[1].replace(/\\/g,"/")),z=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof On))throw e}),process.on("unhandledRejection",L),Ae=function(e){process.exit(e)},u.inspect=function(){return"[Emscripten Module object]"}):Xe?(typeof read<"u"&&(ue=function(r){return read(r)}),X=function(r){var t;return typeof readbuffer=="function"?new Uint8Array(readbuffer(r)):(t=read(r,"binary"),Se(typeof t=="object"),t)},typeof scriptArgs<"u"?z=scriptArgs:typeof arguments<"u"&&(z=arguments),typeof quit=="function"&&(Ae=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(se||I)&&(I?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),ae&&(w=ae),w.indexOf("blob:")!==0?w=w.substr(0,w.lastIndexOf("/")+1):w="",ue=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},I&&(X=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Fe=function(e,r,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){if(n.status==200||n.status==0&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)},Rr=function(e){document.title=e});var Sr=u.print||console.log.bind(console),V=u.printErr||console.warn.bind(console);for(D in G)G.hasOwnProperty(D)&&(u[D]=G[D]);G=null,u.arguments&&(z=u.arguments),u.thisProgram&&(ze=u.thisProgram),u.quit&&(Ae=u.quit);var Or=0,Wr=function(e){Or=e},Y;u.wasmBinary&&(Y=u.wasmBinary);var Dn=u.noExitRuntime||!0;typeof WebAssembly!="object"&&L("no native wasm support detected");var fe,Ye=!1,Dr;function Se(e,r){e||L("Assertion failed: "+r)}var Je=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Ke(e,r,t){for(var n=r+t,i=r;e[i]&&!(i>=n);)++i;if(i-r>16&&e.subarray&&Je)return Je.decode(e.subarray(r,i));for(var s="";r<i;){var f=e[r++];if(!(f&128)){s+=String.fromCharCode(f);continue}var o=e[r++]&63;if((f&224)==192){s+=String.fromCharCode((f&31)<<6|o);continue}var a=e[r++]&63;if((f&240)==224?f=(f&15)<<12|o<<6|a:f=(f&7)<<18|o<<12|a<<6|e[r++]&63,f<65536)s+=String.fromCharCode(f);else{var c=f-65536;s+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return s}function Qe(e,r){return e?Ke(_,e,r):""}function Ur(e,r,t,n){if(!(n>0))return 0;for(var i=t,s=t+n-1,f=0;f<e.length;++f){var o=e.charCodeAt(f);if(o>=55296&&o<=57343){var a=e.charCodeAt(++f);o=65536+((o&1023)<<10)|a&1023}if(o<=127){if(t>=s)break;r[t++]=o}else if(o<=2047){if(t+1>=s)break;r[t++]=192|o>>6,r[t++]=128|o&63}else if(o<=65535){if(t+2>=s)break;r[t++]=224|o>>12,r[t++]=128|o>>6&63,r[t++]=128|o&63}else{if(t+3>=s)break;r[t++]=240|o>>18,r[t++]=128|o>>12&63,r[t++]=128|o>>6&63,r[t++]=128|o&63}}return r[t]=0,t-i}function jr(e,r,t){return Ur(e,_,r,t)}function Ir(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((n&1023)<<10)|e.charCodeAt(++t)&1023),n<=127?++r:n<=2047?r+=2:n<=65535?r+=3:r+=4}return r}var Ze=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function kr(e,r){for(var t=e,n=t>>1,i=n+r/2;!(n>=i)&&J[n];)++n;if(t=n<<1,t-e>32&&Ze)return Ze.decode(_.subarray(e,t));for(var s="",f=0;!(f>=r/2);++f){var o=k[e+f*2>>1];if(o==0)break;s+=String.fromCharCode(o)}return s}function Hr(e,r,t){if(t===void 0&&(t=2147483647),t<2)return 0;t-=2;for(var n=r,i=t<e.length*2?t/2:e.length,s=0;s<i;++s){var f=e.charCodeAt(s);k[r>>1]=f,r+=2}return k[r>>1]=0,r-n}function Mr(e){return e.length*2}function Vr(e,r){for(var t=0,n="";!(t>=r/4);){var i=b[e+t*4>>2];if(i==0)break;if(++t,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|s&1023)}else n+=String.fromCharCode(i)}return n}function Lr(e,r,t){if(t===void 0&&(t=2147483647),t<4)return 0;for(var n=r,i=n+t-4,s=0;s<e.length;++s){var f=e.charCodeAt(s);if(f>=55296&&f<=57343){var o=e.charCodeAt(++s);f=65536+((f&1023)<<10)|o&1023}if(b[r>>2]=f,r+=4,r+4>i)break}return b[r>>2]=0,r-n}function Br(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r}function qr(e,r){return e%r>0&&(e+=r-e%r),e}var Oe,ce,_,k,J,b,$,er,rr;function tr(e){Oe=e,u.HEAP8=ce=new Int8Array(e),u.HEAP16=k=new Int16Array(e),u.HEAP32=b=new Int32Array(e),u.HEAPU8=_=new Uint8Array(e),u.HEAPU16=J=new Uint16Array(e),u.HEAPU32=$=new Uint32Array(e),u.HEAPF32=er=new Float32Array(e),u.HEAPF64=rr=new Float64Array(e)}var Un=u.INITIAL_MEMORY||16777216,K,nr=[],ir=[],Nr=[],or=[],xr=!1;function Gr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Jr(u.preRun.shift());le(nr)}function zr(){xr=!0,le(ir)}function Xr(){le(Nr)}function Yr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Qr(u.postRun.shift());le(or)}function Jr(e){nr.unshift(e)}function Kr(e){ir.unshift(e)}function Qr(e){or.unshift(e)}var H=0,We=null,Q=null;function Zr(e){H++,u.monitorRunDependencies&&u.monitorRunDependencies(H)}function et(e){if(H--,u.monitorRunDependencies&&u.monitorRunDependencies(H),H==0&&(We!==null&&(clearInterval(We),We=null),Q)){var r=Q;Q=null,r()}}u.preloadedImages={},u.preloadedAudios={};function L(e){u.onAbort&&u.onAbort(e),e+="",V(e),Ye=!0,Dr=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var r=new WebAssembly.RuntimeError(e);throw Ge(r),r}function ar(e,r){return String.prototype.startsWith?e.startsWith(r):e.indexOf(r)===0}var rt="data:application/octet-stream;base64,";function sr(e){return ar(e,rt)}var tt="file://";function ur(e){return ar(e,tt)}var T="basis_transcoder.wasm";sr(T)||(T=Er(T));function fr(e){try{if(e==T&&Y)return new Uint8Array(Y);if(X)return X(e);throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}}function nt(){if(!Y&&(se||I)){if(typeof fetch=="function"&&!ur(T))return fetch(T,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+T+"'";return e.arrayBuffer()}).catch(function(){return fr(T)});if(Fe)return new Promise(function(e,r){Fe(T,function(t){e(new Uint8Array(t))},r)})}return Promise.resolve().then(function(){return fr(T)})}function it(){var e={a:Fn};function r(f,o){var a=f.exports;u.asm=a,fe=u.asm.K,tr(fe.buffer),K=u.asm.O,Kr(u.asm.L),et("wasm-instantiate")}Zr("wasm-instantiate");function t(f){r(f.instance)}function n(f){return nt().then(function(o){var a=WebAssembly.instantiate(o,e);return a}).then(f,function(o){V("failed to asynchronously prepare wasm: "+o),L(o)})}function i(){return!Y&&typeof WebAssembly.instantiateStreaming=="function"&&!sr(T)&&!ur(T)&&typeof fetch=="function"?fetch(T,{credentials:"same-origin"}).then(function(f){var o=WebAssembly.instantiateStreaming(f,e);return o.then(t,function(a){return V("wasm streaming compile failed: "+a),V("falling back to ArrayBuffer instantiation"),n(t)})}):n(t)}if(u.instantiateWasm)try{var s=u.instantiateWasm(e,r);return s}catch(f){return V("Module.instantiateWasm callback failed with error: "+f),!1}return i().catch(Ge),{}}function le(e){for(;e.length>0;){var r=e.shift();if(typeof r=="function"){r(u);continue}var t=r.func;typeof t=="number"?r.arg===void 0?K.get(t)():K.get(t)(r.arg):t(r.arg===void 0?null:r.arg)}}var de={};function pe(e){for(;e.length;){var r=e.pop(),t=e.pop();t(r)}}function Z(e){return this.fromWireType($[e>>2])}var B={},M={},ve={},ot=48,at=57;function ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var r=e.charCodeAt(0);return r>=ot&&r<=at?"_"+e:e}function he(e,r){return e=ye(e),new Function("body","return function "+e+`() { | ||
"use strict"; return body.apply(this, arguments); | ||
}; | ||
`)(r)}function De(e,r){var t=he(r,function(n){this.name=r,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+` | ||
`+i.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},t}var cr=void 0;function ge(e){throw new cr(e)}function U(e,r,t){e.forEach(function(o){ve[o]=r});function n(o){var a=t(o);a.length!==e.length&&ge("Mismatched type converter count");for(var c=0;c<e.length;++c)F(e[c],a[c])}var i=new Array(r.length),s=[],f=0;r.forEach(function(o,a){M.hasOwnProperty(o)?i[a]=M[o]:(s.push(o),B.hasOwnProperty(o)||(B[o]=[]),B[o].push(function(){i[a]=M[o],++f,f===s.length&&n(i)}))}),s.length===0&&n(i)}function st(e){var r=de[e];delete de[e];var t=r.rawConstructor,n=r.rawDestructor,i=r.fields,s=i.map(function(f){return f.getterReturnType}).concat(i.map(function(f){return f.setterArgumentType}));U([e],s,function(f){var o={};return i.forEach(function(a,c){var l=a.fieldName,d=f[c],v=a.getter,y=a.getterContext,g=f[c+i.length],m=a.setter,C=a.setterContext;o[l]={read:function(E){return d.fromWireType(v(y,E))},write:function(E,oe){var W=[];m(C,E,g.toWireType(W,oe)),pe(W)}}}),[{name:r.name,fromWireType:function(a){var c={};for(var l in o)c[l]=o[l].read(a);return n(a),c},toWireType:function(a,c){for(var l in o)if(!(l in c))throw new TypeError('Missing field: "'+l+'"');var d=t();for(l in o)o[l].write(d,c[l]);return a!==null&&a.push(n,d),d},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:n}]})}function _e(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function ut(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);lr=e}var lr=void 0;function h(e){for(var r="",t=e;_[t];)r+=lr[_[t++]];return r}var q=void 0;function p(e){throw new q(e)}function F(e,r,t){if(t=t||{},!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=r.name;if(e||p('type "'+n+'" must have a positive integer typeid pointer'),M.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;p("Cannot register type '"+n+"' twice")}if(M[e]=r,delete ve[e],B.hasOwnProperty(e)){var i=B[e];delete B[e],i.forEach(function(s){s()})}}function ft(e,r,t,n,i){var s=_e(t);r=h(r),F(e,{name:r,fromWireType:function(f){return!!f},toWireType:function(f,o){return o?n:i},argPackAdvance:8,readValueFromPointer:function(f){var o;if(t===1)o=ce;else if(t===2)o=k;else if(t===4)o=b;else throw new TypeError("Unknown boolean type size: "+r);return this.fromWireType(o[f>>s])},destructorFunction:null})}function ct(e){if(!(this instanceof j)||!(e instanceof j))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return r===n&&t===i}function lt(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ue(e){function r(t){return t.$$.ptrType.registeredClass.name}p(r(e)+" instance already deleted")}var je=!1;function dr(e){}function dt(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function pr(e){e.count.value-=1;var r=e.count.value===0;r&&dt(e)}function ee(e){return typeof FinalizationGroup>"u"?(ee=function(r){return r},e):(je=new FinalizationGroup(function(r){for(var t=r.next();!t.done;t=r.next()){var n=t.value;n.ptr?pr(n):console.warn("object already deleted: "+n.ptr)}}),ee=function(r){return je.register(r,r.$$,r.$$),r},dr=function(r){je.unregister(r.$$)},ee(e))}function pt(){if(this.$$.ptr||Ue(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ee(Object.create(Object.getPrototypeOf(this),{$$:{value:lt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function vt(){this.$$.ptr||Ue(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&p("Object already scheduled for deletion"),dr(this),pr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function yt(){return!this.$$.ptr}var re=void 0,te=[];function Ie(){for(;te.length;){var e=te.pop();e.$$.deleteScheduled=!1,e.delete()}}function ht(){return this.$$.ptr||Ue(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&p("Object already scheduled for deletion"),te.push(this),te.length===1&&re&&re(Ie),this.$$.deleteScheduled=!0,this}function gt(){j.prototype.isAliasOf=ct,j.prototype.clone=pt,j.prototype.delete=vt,j.prototype.isDeleted=yt,j.prototype.deleteLater=ht}function j(){}var vr={};function yr(e,r,t){if(e[r].overloadTable===void 0){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||p("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].overloadTable+")!"),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}}function ke(e,r,t){u.hasOwnProperty(e)?((t===void 0||u[e].overloadTable!==void 0&&u[e].overloadTable[t]!==void 0)&&p("Cannot register public name '"+e+"' twice"),yr(u,e,e),u.hasOwnProperty(t)&&p("Cannot register multiple overloads of a function with the same number of arguments ("+t+")!"),u[e].overloadTable[t]=r):(u[e]=r,t!==void 0&&(u[e].numArguments=t))}function _t(e,r,t,n,i,s,f,o){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=f,this.downcast=o,this.pureVirtualFunctions=[]}function He(e,r,t){for(;r!==t;)r.upcast||p("Expected null or instance of "+t.name+", got an instance of "+r.name),e=r.upcast(e),r=r.baseClass;return e}function mt(e,r){if(r===null)return this.isReference&&p("null is not a valid "+this.name),0;r.$$||p('Cannot pass "'+N(r)+'" as a '+this.name),r.$$.ptr||p("Cannot pass deleted object as a pointer of type "+this.name);var t=r.$$.ptrType.registeredClass,n=He(r.$$.ptr,t,this.registeredClass);return n}function bt(e,r){var t;if(r===null)return this.isReference&&p("null is not a valid "+this.name),this.isSmartPointer?(t=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,t),t):0;r.$$||p('Cannot pass "'+N(r)+'" as a '+this.name),r.$$.ptr||p("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&r.$$.ptrType.isConst&&p("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);var n=r.$$.ptrType.registeredClass;if(t=He(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(r.$$.smartPtr===void 0&&p("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:p("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var i=r.clone();t=this.rawShare(t,S(function(){i.delete()})),e!==null&&e.push(this.rawDestructor,t)}break;default:p("Unsupporting sharing policy")}return t}function wt(e,r){if(r===null)return this.isReference&&p("null is not a valid "+this.name),0;r.$$||p('Cannot pass "'+N(r)+'" as a '+this.name),r.$$.ptr||p("Cannot pass deleted object as a pointer of type "+this.name),r.$$.ptrType.isConst&&p("Cannot convert argument of type "+r.$$.ptrType.name+" to parameter type "+this.name);var t=r.$$.ptrType.registeredClass,n=He(r.$$.ptr,t,this.registeredClass);return n}function Tt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Pt(e){this.rawDestructor&&this.rawDestructor(e)}function Ct(e){e!==null&&e.delete()}function hr(e,r,t){if(r===t)return e;if(t.baseClass===void 0)return null;var n=hr(e,r,t.baseClass);return n===null?null:t.downcast(n)}function At(){return Object.keys(ne).length}function $t(){var e=[];for(var r in ne)ne.hasOwnProperty(r)&&e.push(ne[r]);return e}function Ft(e){re=e,te.length&&re&&re(Ie)}function Et(){u.getInheritedInstanceCount=At,u.getLiveInheritedInstances=$t,u.flushPendingDeletes=Ie,u.setDelayFunction=Ft}var ne={};function Rt(e,r){for(r===void 0&&p("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r}function St(e,r){return r=Rt(e,r),ne[r]}function me(e,r){(!r.ptrType||!r.ptr)&&ge("makeClassHandle requires ptr and ptrType");var t=!!r.smartPtrType,n=!!r.smartPtr;return t!==n&&ge("Both smartPtrType and smartPtr must be specified"),r.count={value:1},ee(Object.create(e,{$$:{value:r}}))}function Ot(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=St(this.registeredClass,r);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?me(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):me(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s=this.registeredClass.getActualType(r),f=vr[s];if(!f)return i.call(this);var o;this.isConst?o=f.constPointerType:o=f.pointerType;var a=hr(r,this.registeredClass,o.registeredClass);return a===null?i.call(this):this.isSmartPointer?me(o.registeredClass.instancePrototype,{ptrType:o,ptr:a,smartPtrType:this,smartPtr:e}):me(o.registeredClass.instancePrototype,{ptrType:o,ptr:a})}function Wt(){R.prototype.getPointee=Tt,R.prototype.destructor=Pt,R.prototype.argPackAdvance=8,R.prototype.readValueFromPointer=Z,R.prototype.deleteObject=Ct,R.prototype.fromWireType=Ot}function R(e,r,t,n,i,s,f,o,a,c,l){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=f,this.rawGetPointee=o,this.rawConstructor=a,this.rawShare=c,this.rawDestructor=l,!i&&r.baseClass===void 0?n?(this.toWireType=mt,this.destructorFunction=null):(this.toWireType=wt,this.destructorFunction=null):this.toWireType=bt}function gr(e,r,t){u.hasOwnProperty(e)||ge("Replacing nonexistant public symbol"),u[e].overloadTable!==void 0&&t!==void 0?u[e].overloadTable[t]=r:(u[e]=r,u[e].argCount=t)}function Dt(e,r,t){var n=u["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)}function Ut(e,r,t){return e.indexOf("j")!=-1?Dt(e,r,t):K.get(r).apply(null,t)}function jt(e,r){var t=[];return function(){t.length=arguments.length;for(var n=0;n<arguments.length;n++)t[n]=arguments[n];return Ut(e,r,t)}}function A(e,r){e=h(e);function t(){return e.indexOf("j")!=-1?jt(e,r):K.get(r)}var n=t();return typeof n!="function"&&p("unknown function pointer with signature "+e+": "+r),n}var _r=void 0;function mr(e){var r=Cr(e),t=h(r);return O(r),t}function be(e,r){var t=[],n={};function i(s){if(!n[s]&&!M[s]){if(ve[s]){ve[s].forEach(i);return}t.push(s),n[s]=!0}}throw r.forEach(i),new _r(e+": "+t.map(mr).join([", "]))}function It(e,r,t,n,i,s,f,o,a,c,l,d,v){l=h(l),s=A(i,s),o&&(o=A(f,o)),c&&(c=A(a,c)),v=A(d,v);var y=ye(l);ke(y,function(){be("Cannot construct "+l+" due to unbound types",[n])}),U([e,r,t],n?[n]:[],function(g){g=g[0];var m,C;n?(m=g.registeredClass,C=m.instancePrototype):C=j.prototype;var E=he(y,function(){if(Object.getPrototypeOf(this)!==oe)throw new q("Use 'new' to construct "+l);if(W.constructor_body===void 0)throw new q(l+" has no accessible constructor");var Fr=W.constructor_body[arguments.length];if(Fr===void 0)throw new q("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(W.constructor_body).toString()+") parameters instead!");return Fr.apply(this,arguments)}),oe=Object.create(C,{constructor:{value:E}});E.prototype=oe;var W=new _t(l,E,oe,v,m,s,o,c),Wn=new R(l,W,!0,!1,!1),Ar=new R(l+"*",W,!1,!1,!1),$r=new R(l+" const*",W,!1,!0,!1);return vr[e]={pointerType:Ar,constPointerType:$r},gr(y,E),[Wn,Ar,$r]})}function Me(e,r){for(var t=[],n=0;n<e;n++)t.push(b[(r>>2)+n]);return t}function kt(e,r,t,n,i,s){Se(r>0);var f=Me(r,t);i=A(n,i);var o=[s],a=[];U([],[e],function(c){c=c[0];var l="constructor "+c.name;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[r-1]!==void 0)throw new q("Cannot register multiple constructors with identical number of parameters ("+(r-1)+") for class '"+c.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return c.registeredClass.constructor_body[r-1]=function(){be("Cannot construct "+c.name+" due to unbound types",f)},U([],f,function(d){return c.registeredClass.constructor_body[r-1]=function(){arguments.length!==r-1&&p(l+" called with "+arguments.length+" arguments, expected "+(r-1)),a.length=0,o.length=r;for(var y=1;y<r;++y)o[y]=d[y].toWireType(a,arguments[y-1]);var g=i.apply(null,o);return pe(a),d[0].fromWireType(g)},[]}),[]})}function br(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=he(e.name||"unknownFunctionName",function(){});t.prototype=e.prototype;var n=new t,i=e.apply(n,r);return i instanceof Object?i:n}function wr(e,r,t,n,i){var s=r.length;s<2&&p("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var f=r[1]!==null&&t!==null,o=!1,a=1;a<r.length;++a)if(r[a]!==null&&r[a].destructorFunction===void 0){o=!0;break}for(var c=r[0].name!=="void",l="",d="",a=0;a<s-2;++a)l+=(a!==0?", ":"")+"arg"+a,d+=(a!==0?", ":"")+"arg"+a+"Wired";var v="return function "+ye(e)+"("+l+`) { | ||
if (arguments.length !== `+(s-2)+`) { | ||
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(s-2)+` args!'); | ||
} | ||
`;o&&(v+=`var destructors = []; | ||
`);var y=o?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[p,n,i,pe,r[0],r[1]];f&&(v+="var thisWired = classParam.toWireType("+y+`, this); | ||
`);for(var a=0;a<s-2;++a)v+="var arg"+a+"Wired = argType"+a+".toWireType("+y+", arg"+a+"); // "+r[a+2].name+` | ||
`,g.push("argType"+a),m.push(r[a+2]);if(f&&(d="thisWired"+(d.length>0?", ":"")+d),v+=(c?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+`); | ||
`,o)v+=`runDestructors(destructors); | ||
`;else for(var a=f?1:2;a<r.length;++a){var C=a===1?"thisWired":"arg"+(a-2)+"Wired";r[a].destructorFunction!==null&&(v+=C+"_dtor("+C+"); // "+r[a].name+` | ||
`,g.push(C+"_dtor"),m.push(r[a].destructorFunction))}c&&(v+=`var ret = retType.fromWireType(rv); | ||
return ret; | ||
`),v+=`} | ||
`,g.push(v);var E=br(Function,g).apply(null,m);return E}function Ht(e,r,t,n,i,s,f,o){var a=Me(t,n);r=h(r),s=A(i,s),U([],[e],function(c){c=c[0];var l=c.name+"."+r;o&&c.registeredClass.pureVirtualFunctions.push(r);function d(){be("Cannot call "+l+" due to unbound types",a)}var v=c.registeredClass.instancePrototype,y=v[r];return y===void 0||y.overloadTable===void 0&&y.className!==c.name&&y.argCount===t-2?(d.argCount=t-2,d.className=c.name,v[r]=d):(yr(v,r,l),v[r].overloadTable[t-2]=d),U([],a,function(g){var m=wr(l,g,c,s,f);return v[r].overloadTable===void 0?(m.argCount=t-2,v[r]=m):v[r].overloadTable[t-2]=m,[]}),[]})}function Mt(e,r,t){e=h(e),U([],[r],function(n){return n=n[0],u[e]=n.fromWireType(t),[]})}var Ve=[],P=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Le(e){e>4&&--P[e].refcount===0&&(P[e]=void 0,Ve.push(e))}function Vt(){for(var e=0,r=5;r<P.length;++r)P[r]!==void 0&&++e;return e}function Lt(){for(var e=5;e<P.length;++e)if(P[e]!==void 0)return P[e];return null}function Bt(){u.count_emval_handles=Vt,u.get_first_emval=Lt}function S(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var r=Ve.length?Ve.pop():P.length;return P[r]={refcount:1,value:e},r}}}function qt(e,r){r=h(r),F(e,{name:r,fromWireType:function(t){var n=P[t].value;return Le(t),n},toWireType:function(t,n){return S(n)},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:null})}function Nt(e,r,t){switch(r){case 0:return function(n){var i=t?ce:_;return this.fromWireType(i[n])};case 1:return function(n){var i=t?k:J;return this.fromWireType(i[n>>1])};case 2:return function(n){var i=t?b:$;return this.fromWireType(i[n>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function xt(e,r,t,n){var i=_e(t);r=h(r);function s(){}s.values={},F(e,{name:r,constructor:s,fromWireType:function(f){return this.constructor.values[f]},toWireType:function(f,o){return o.value},argPackAdvance:8,readValueFromPointer:Nt(r,i,n),destructorFunction:null}),ke(r,s)}function we(e,r){var t=M[e];return t===void 0&&p(r+" has unknown type "+mr(e)),t}function Gt(e,r,t){var n=we(e,"enum");r=h(r);var i=n.constructor,s=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:he(n.name+"_"+r,function(){})}});i.values[t]=s,i[r]=s}function N(e){if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e}function zt(e,r){switch(r){case 2:return function(t){return this.fromWireType(er[t>>2])};case 3:return function(t){return this.fromWireType(rr[t>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Xt(e,r,t){var n=_e(t);r=h(r),F(e,{name:r,fromWireType:function(i){return i},toWireType:function(i,s){if(typeof s!="number"&&typeof s!="boolean")throw new TypeError('Cannot convert "'+N(s)+'" to '+this.name);return s},argPackAdvance:8,readValueFromPointer:zt(r,n),destructorFunction:null})}function Yt(e,r,t,n,i,s){var f=Me(r,t);e=h(e),i=A(n,i),ke(e,function(){be("Cannot call "+e+" due to unbound types",f)},r-1),U([],f,function(o){var a=[o[0],null].concat(o.slice(1));return gr(e,wr(e,a,null,i,s),r-1),[]})}function Jt(e,r,t){switch(r){case 0:return t?function(i){return ce[i]}:function(i){return _[i]};case 1:return t?function(i){return k[i>>1]}:function(i){return J[i>>1]};case 2:return t?function(i){return b[i>>2]}:function(i){return $[i>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Kt(e,r,t,n,i){r=h(r),i===-1&&(i=4294967295);var s=_e(t),f=function(c){return c};if(n===0){var o=32-8*t;f=function(c){return c<<o>>>o}}var a=r.indexOf("unsigned")!=-1;F(e,{name:r,fromWireType:f,toWireType:function(c,l){if(typeof l!="number"&&typeof l!="boolean")throw new TypeError('Cannot convert "'+N(l)+'" to '+this.name);if(l<n||l>i)throw new TypeError('Passing a number "'+N(l)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+n+", "+i+"]!");return a?l>>>0:l|0},argPackAdvance:8,readValueFromPointer:Jt(r,s,n!==0),destructorFunction:null})}function Qt(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[r];function s(f){f=f>>2;var o=$,a=o[f],c=o[f+1];return new i(Oe,c,a)}t=h(t),F(e,{name:t,fromWireType:s,argPackAdvance:8,readValueFromPointer:s},{ignoreDuplicateRegistrations:!0})}function Zt(e,r){r=h(r);var t=r==="std::string";F(e,{name:r,fromWireType:function(n){var i=$[n>>2],s;if(t)for(var f=n+4,o=0;o<=i;++o){var a=n+4+o;if(o==i||_[a]==0){var c=a-f,l=Qe(f,c);s===void 0?s=l:(s+=String.fromCharCode(0),s+=l),f=a+1}}else{for(var d=new Array(i),o=0;o<i;++o)d[o]=String.fromCharCode(_[n+4+o]);s=d.join("")}return O(n),s},toWireType:function(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var s,f=typeof i=="string";f||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array||p("Cannot pass non-string to std::string"),t&&f?s=function(){return Ir(i)}:s=function(){return i.length};var o=s(),a=qe(4+o+1);if($[a>>2]=o,t&&f)jr(i,a+4,o+1);else if(f)for(var c=0;c<o;++c){var l=i.charCodeAt(c);l>255&&(O(a),p("String has UTF-16 code units that do not fit in 8 bits")),_[a+4+c]=l}else for(var c=0;c<o;++c)_[a+4+c]=i[c];return n!==null&&n.push(O,a),a},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(n){O(n)}})}function en(e,r,t){t=h(t);var n,i,s,f,o;r===2?(n=kr,i=Hr,f=Mr,s=function(){return J},o=1):r===4&&(n=Vr,i=Lr,f=Br,s=function(){return $},o=2),F(e,{name:t,fromWireType:function(a){for(var c=$[a>>2],l=s(),d,v=a+4,y=0;y<=c;++y){var g=a+4+y*r;if(y==c||l[g>>o]==0){var m=g-v,C=n(v,m);d===void 0?d=C:(d+=String.fromCharCode(0),d+=C),v=g+r}}return O(a),d},toWireType:function(a,c){typeof c!="string"&&p("Cannot pass non-string to C++ string type "+t);var l=f(c),d=qe(4+l+r);return $[d>>2]=l>>o,i(c,d+4,l+r),a!==null&&a.push(O,d),d},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(a){O(a)}})}function rn(e,r,t,n,i,s){de[e]={name:h(r),rawConstructor:A(t,n),rawDestructor:A(i,s),fields:[]}}function tn(e,r,t,n,i,s,f,o,a,c){de[e].fields.push({fieldName:h(r),getterReturnType:t,getter:A(n,i),getterContext:s,setterArgumentType:f,setter:A(o,a),setterContext:c})}function nn(e,r){r=h(r),F(e,{isVoid:!0,name:r,argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){}})}function ie(e){return e||p("Cannot use deleted val. handle = "+e),P[e].value}function on(e,r,t){e=ie(e),r=we(r,"emval::as");var n=[],i=S(n);return b[t>>2]=i,r.toWireType(n,e)}var an={};function Te(e){var r=an[e];return r===void 0?h(e):r}var Be=[];function sn(e,r,t,n){e=Be[e],r=ie(r),t=Te(t),e(r,t,null,n)}function Tr(){return typeof globalThis=="object"?globalThis:function(){return Function}()("return this")()}function un(e){return e===0?S(Tr()):(e=Te(e),S(Tr()[e]))}function fn(e){var r=Be.length;return Be.push(e),r}function cn(e,r){for(var t=new Array(e),n=0;n<e;++n)t[n]=we(b[(r>>2)+n],"parameter "+n);return t}function ln(e,r){for(var t=cn(e,r),n=t[0],i=n.name+"_$"+t.slice(1).map(function(y){return y.name}).join("_")+"$",s=["retType"],f=[n],o="",a=0;a<e-1;++a)o+=(a!==0?", ":"")+"arg"+a,s.push("argType"+a),f.push(t[1+a]);for(var c=ye("methodCaller_"+i),l="return function "+c+`(handle, name, destructors, args) { | ||
`,d=0,a=0;a<e-1;++a)l+=" var arg"+a+" = argType"+a+".readValueFromPointer(args"+(d?"+"+d:"")+`); | ||
`,d+=t[a+1].argPackAdvance;l+=" var rv = handle[name]("+o+`); | ||
`;for(var a=0;a<e-1;++a)t[a+1].deleteObject&&(l+=" argType"+a+".deleteObject(arg"+a+`); | ||
`);n.isVoid||(l+=` return retType.toWireType(destructors, rv); | ||
`),l+=`}; | ||
`,s.push(l);var v=br(Function,s).apply(null,f);return fn(v)}function dn(e){return e=Te(e),S(u[e])}function pn(e,r){return e=ie(e),r=ie(r),S(e[r])}function vn(e){e>4&&(P[e].refcount+=1)}function yn(e){for(var r="",t=0;t<e;++t)r+=(t!==0?", ":"")+"arg"+t;for(var n="return function emval_allocator_"+e+`(constructor, argTypes, args) { | ||
`,t=0;t<e;++t)n+="var argType"+t+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+t+'], "parameter '+t+`"); | ||
var arg`+t+" = argType"+t+`.readValueFromPointer(args); | ||
args += argType`+t+`['argPackAdvance']; | ||
`;return n+="var obj = new constructor("+r+`); | ||
return __emval_register(obj); | ||
} | ||
`,new Function("requireRegisteredType","Module","__emval_register",n)(we,u,S)}var Pr={};function hn(e,r,t,n){e=ie(e);var i=Pr[r];return i||(i=yn(r),Pr[r]=i),i(e,t,n)}function gn(e){return S(Te(e))}function _n(e){var r=P[e].value;pe(r),Le(e)}function mn(){L()}function bn(e,r,t){_.copyWithin(e,r,r+t)}function wn(e){try{return fe.grow(e-Oe.byteLength+65535>>>16),tr(fe.buffer),1}catch{}}function Tn(e){var r=_.length;e=e>>>0;var t=2147483648;if(e>t)return!1;for(var n=1;n<=4;n*=2){var i=r*(1+.2/n);i=Math.min(i,e+100663296);var s=Math.min(t,qr(Math.max(e,i),65536)),f=wn(s);if(f)return!0}return!1}var Pe={mappings:{},buffers:[null,[],[]],printChar:function(e,r){var t=Pe.buffers[e];r===0||r===10?((e===1?Sr:V)(Ke(t,0)),t.length=0):t.push(r)},varargs:void 0,get:function(){Pe.varargs+=4;var e=b[Pe.varargs-4>>2];return e},getStr:function(e){var r=Qe(e);return r},get64:function(e,r){return e}};function Pn(e){return 0}function Cn(e,r,t,n,i){}function An(e,r,t,n){for(var i=0,s=0;s<t;s++){for(var f=b[r+s*8>>2],o=b[r+(s*8+4)>>2],a=0;a<o;a++)Pe.printChar(e,_[f+a]);i+=o}return b[n>>2]=i,0}function $n(e){Wr(e|0)}cr=u.InternalError=De(Error,"InternalError"),ut(),q=u.BindingError=De(Error,"BindingError"),gt(),Wt(),Et(),_r=u.UnboundTypeError=De(Error,"UnboundTypeError"),Bt();var Fn={t:st,I:ft,x:It,w:kt,d:Ht,k:Mt,H:qt,n:xt,a:Gt,A:Xt,i:Yt,j:Kt,h:Qt,B:Zt,v:en,u:rn,c:tn,J:nn,m:on,s:sn,b:Le,y:un,p:ln,r:dn,e:pn,g:vn,q:hn,f:gn,l:_n,o:mn,E:bn,F:Tn,G:Pn,C:Cn,z:An,D:$n},jn=it(),En=u.___wasm_call_ctors=function(){return(En=u.___wasm_call_ctors=u.asm.L).apply(null,arguments)},qe=u._malloc=function(){return(qe=u._malloc=u.asm.M).apply(null,arguments)},O=u._free=function(){return(O=u._free=u.asm.N).apply(null,arguments)},Cr=u.___getTypeName=function(){return(Cr=u.___getTypeName=u.asm.P).apply(null,arguments)},Rn=u.___embind_register_native_and_builtin_types=function(){return(Rn=u.___embind_register_native_and_builtin_types=u.asm.Q).apply(null,arguments)},Sn=u.dynCall_jiji=function(){return(Sn=u.dynCall_jiji=u.asm.R).apply(null,arguments)},Ce;function On(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Q=function e(){Ce||Ne(),Ce||(Q=e)};function Ne(e){if(e=e||z,H>0||(Gr(),H>0))return;function r(){Ce||(Ce=!0,u.calledRun=!0,!Ye&&(zr(),Xr(),xe(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Yr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),r()},1)):r()}if(u.run=Ne,u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return Ne(),x.ready}}();typeof exports=="object"&&typeof module=="object"?module.exports=BASIS:typeof define=="function"&&define.amd?define([],function(){return BASIS}):typeof exports=="object"&&(exports.BASIS=BASIS); |
@@ -1,116 +0,26 @@ | ||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(k,n){return Object.prototype.hasOwnProperty.call(k,n)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1; | ||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(k,n,l){if(k==Array.prototype||k==Object.prototype)return k;k[n]=l.value;return k};$jscomp.getGlobal=function(k){k=["object"==typeof globalThis&&globalThis,k,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<k.length;++n){var l=k[n];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); | ||
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(k,n){var l=$jscomp.propertyToPolyfillSymbol[n];if(null==l)return k[n];l=k[l];return void 0!==l?l:k[n]}; | ||
$jscomp.polyfill=function(k,n,l,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(k,n,l,p):$jscomp.polyfillUnisolated(k,n,l,p))};$jscomp.polyfillUnisolated=function(k,n,l,p){l=$jscomp.global;k=k.split(".");for(p=0;p<k.length-1;p++){var h=k[p];if(!(h in l))return;l=l[h]}k=k[k.length-1];p=l[k];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(l,k,{configurable:!0,writable:!0,value:n})}; | ||
$jscomp.polyfillIsolated=function(k,n,l,p){var h=k.split(".");k=1===h.length;p=h[0];p=!k&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var A=0;A<h.length-1;A++){var f=h[A];if(!(f in p))return;p=p[f]}h=h[h.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?p[h]:null;n=n(l);null!=n&&(k?$jscomp.defineProperty($jscomp.polyfills,h,{configurable:!0,writable:!0,value:n}):n!==l&&(void 0===$jscomp.propertyToPolyfillSymbol[h]&&(l=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE? | ||
$jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+l+"$"+h),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:n})))};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(k,n){for(var l=1;l<arguments.length;l++){var p=arguments[l];if(p)for(var h in p)$jscomp.owns(p,h)&&(k[h]=p[h])}return k};$jscomp.polyfill("Object.assign",function(k){return k||$jscomp.assign},"es6","es3"); | ||
$jscomp.arrayIteratorImpl=function(k){var n=0;return function(){return n<k.length?{done:!1,value:k[n++]}:{done:!0}}};$jscomp.arrayIterator=function(k){return{next:$jscomp.arrayIteratorImpl(k)}};$jscomp.makeIterator=function(k){var n="undefined"!=typeof Symbol&&Symbol.iterator&&k[Symbol.iterator];return n?n.call(k):$jscomp.arrayIterator(k)}; | ||
$jscomp.polyfill("Promise",function(k){function n(){this.batch_=null}function l(f){return f instanceof h?f:new h(function(q,v){q(f)})}if(k&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return k;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)}; | ||
var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var v=f[q];f[q]=null;try{v()}catch(z){this.asyncThrow_(z)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var h=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_(); | ||
try{f(q.resolve,q.reject)}catch(v){q.reject(v)}};h.prototype.createResolveAndReject_=function(){function f(z){return function(F){v||(v=!0,z.call(q,F))}}var q=this,v=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};h.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof h)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f): | ||
this.fulfill_(f)}};h.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(v){this.reject_(v);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};h.prototype.reject_=function(f){this.settle_(2,f)};h.prototype.fulfill_=function(f){this.settle_(1,f)};h.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_(); | ||
this.executeOnSettledCallbacks_()};h.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};h.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,v=$jscomp.global.dispatchEvent;if("undefined"===typeof v)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}): | ||
"function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return v(f)};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)A.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var A=new n;h.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_(); | ||
f.callWhenSettled_(q.resolve,q.reject)};h.prototype.settleSameAsThenable_=function(f,q){var v=this.createResolveAndReject_();try{f.call(q,v.resolve,v.reject)}catch(z){v.reject(z)}};h.prototype.then=function(f,q){function v(Q,u){return"function"==typeof Q?function(x){try{z(Q(x))}catch(D){F(D)}}:u}var z,F,da=new h(function(Q,u){z=Q;F=u});this.callWhenSettled_(v(f,z),v(q,F));return da};h.prototype.catch=function(f){return this.then(void 0,f)};h.prototype.callWhenSettled_=function(f,q){function v(){switch(z.state_){case 1:f(z.result_); | ||
break;case 2:q(z.result_);break;default:throw Error("Unexpected state: "+z.state_);}}var z=this;null==this.onSettledCallbacks_?A.asyncExecute(v):this.onSettledCallbacks_.push(v);this.isRejectionHandled_=!0};h.resolve=l;h.reject=function(f){return new h(function(q,v){v(f)})};h.race=function(f){return new h(function(q,v){for(var z=$jscomp.makeIterator(f),F=z.next();!F.done;F=z.next())l(F.value).callWhenSettled_(q,v)})};h.all=function(f){var q=$jscomp.makeIterator(f),v=q.next();return v.done?l([]):new h(function(z, | ||
F){function da(x){return function(D){Q[x]=D;u--;0==u&&z(Q)}}var Q=[],u=0;do Q.push(void 0),u++,l(v.value).callWhenSettled_(da(Q.length-1),F),v=q.next();while(!v.done)})};return h},"es6","es3");$jscomp.checkStringArgs=function(k,n,l){if(null==k)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return k+""}; | ||
$jscomp.polyfill("String.prototype.startsWith",function(k){return k?k:function(n,l){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var h=p.length,A=n.length;l=Math.max(0,Math.min(l|0,p.length));for(var f=0;f<A&&l<h;)if(p[l++]!=n[f++])return!1;return f>=A}},"es6","es3"); | ||
$jscomp.polyfill("Array.prototype.copyWithin",function(k){function n(l){l=Number(l);return Infinity===l||-Infinity===l?l:l|0}return k?k:function(l,p,h){var A=this.length;l=n(l);p=n(p);h=void 0===h?A:n(h);l=0>l?Math.max(A+l,0):Math.min(l,A);p=0>p?Math.max(A+p,0):Math.min(p,A);h=0>h?Math.max(A+h,0):Math.min(h,A);if(l<p)for(;p<h;)p in this?this[l++]=this[p++]:(delete this[l++],p++);else for(h=Math.min(h,A+p-l),l+=h-p;h>p;)--h in this?this[--l]=this[h]:delete this[--l];return this}},"es6","es3"); | ||
$jscomp.typedArrayCopyWithin=function(k){return k?k:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); | ||
$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); | ||
var DracoDecoderModule=function(){var k="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(k=k||__filename);return function(n){function l(e){return a.locateFile?a.locateFile(e,V):V+e}function p(e,b,c){var d=b+c;for(c=b;e[c]&&!(c>=d);)++c;if(16<c-b&&e.subarray&&xa)return xa.decode(e.subarray(b,c));for(d="";b<c;){var g=e[b++];if(g&128){var t=e[b++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|t);else{var W=e[b++]&63;g=224== | ||
(g&240)?(g&15)<<12|t<<6|W:(g&7)<<18|t<<12|W<<6|e[b++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function h(e,b){return e?p(ea,e,b):""}function A(e){ya=e;a.HEAP8=Y=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=G=new Int32Array(e);a.HEAPU8=ea=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function f(e){if(a.onAbort)a.onAbort(e); | ||
e="Aborted("+e+")";ca(e);za=!0;e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info.");oa(e);throw e;}function q(e){try{if(e==R&&fa)return new Uint8Array(fa);if(pa)return pa(e);throw"both async and sync fetching of the wasm failed";}catch(b){f(b)}}function v(){if(!fa&&(Aa||ha)){if("function"===typeof fetch&&!R.startsWith("file://"))return fetch(R,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+R+"'";return e.arrayBuffer()}).catch(function(){return q(R)}); | ||
if(qa)return new Promise(function(e,b){qa(R,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return q(R)})}function z(e){for(;0<e.length;){var b=e.shift();if("function"==typeof b)b(a);else{var c=b.func;"number"===typeof c?void 0===b.arg?F(c)():F(c)(b.arg):c(void 0===b.arg?null:b.arg)}}}function F(e){var b=ka[e];b||(e>=ka.length&&(ka.length=e+1),ka[e]=b=Ba.get(e));return b}function da(e){this.excPtr=e;this.ptr=e-16;this.set_type=function(b){G[this.ptr+4>>2]=b};this.get_type= | ||
function(){return G[this.ptr+4>>2]};this.set_destructor=function(b){G[this.ptr+8>>2]=b};this.get_destructor=function(){return G[this.ptr+8>>2]};this.set_refcount=function(b){G[this.ptr>>2]=b};this.set_caught=function(b){Y[this.ptr+12>>0]=b?1:0};this.get_caught=function(){return 0!=Y[this.ptr+12>>0]};this.set_rethrown=function(b){Y[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Y[this.ptr+13>>0]};this.init=function(b,c){this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1); | ||
this.set_rethrown(!1)};this.add_ref=function(){G[this.ptr>>2]+=1};this.release_ref=function(){var b=G[this.ptr>>2];G[this.ptr>>2]=b-1;return 1===b}}function Q(e){function b(){if(!la&&(la=!0,a.calledRun=!0,!za)){Ca=!0;z(ra);Da(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ea.unshift(a.postRun.shift());z(Ea)}}if(!(0<ba)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)Fa.unshift(a.preRun.shift()); | ||
z(Fa);0<ba||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}function u(){}function x(e){return(e||u).__cache__}function D(e,b){var c=x(b),d=c[e];if(d)return d;d=Object.create((b||u).prototype);d.ptr=e;return c[e]=d}function aa(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|e.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}b=Array(b+1); | ||
c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var t=e.charCodeAt(g);if(55296<=t&&57343>=t){var W=e.charCodeAt(++g);t=65536+((t&1023)<<10)|W&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,Y);r.copy(b,Y,e);return e}return e}function sa(e){if("object"===typeof e){var b=r.alloc(e,Y);r.copy(e, | ||
Y,b);return b}return e}function Z(){throw"cannot construct a VoidPtr, no constructor in IDL";}function T(){this.ptr=Ga();x(T)[this.ptr]=this}function S(){this.ptr=Ha();x(S)[this.ptr]=this}function X(){this.ptr=Ia();x(X)[this.ptr]=this}function w(){this.ptr=Ja();x(w)[this.ptr]=this}function C(){this.ptr=Ka();x(C)[this.ptr]=this}function H(){this.ptr=La();x(H)[this.ptr]=this}function I(){this.ptr=Ma();x(I)[this.ptr]=this}function E(){this.ptr=Na();x(E)[this.ptr]=this}function U(){this.ptr=Oa();x(U)[this.ptr]= | ||
this}function B(){throw"cannot construct a Status, no constructor in IDL";}function J(){this.ptr=Pa();x(J)[this.ptr]=this}function K(){this.ptr=Qa();x(K)[this.ptr]=this}function L(){this.ptr=Ra();x(L)[this.ptr]=this}function M(){this.ptr=Sa();x(M)[this.ptr]=this}function N(){this.ptr=Ta();x(N)[this.ptr]=this}function O(){this.ptr=Ua();x(O)[this.ptr]=this}function P(){this.ptr=Va();x(P)[this.ptr]=this}function y(){this.ptr=Wa();x(y)[this.ptr]=this}function m(){this.ptr=Xa();x(m)[this.ptr]=this}n=n|| | ||
{};var a="undefined"!==typeof n?n:{},Ya=Object.assign,Da,oa;a.ready=new Promise(function(e,b){Da=e;oa=b});var Za=!1,$a=!1;a.onRuntimeInitialized=function(){Za=!0;if($a&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){$a=!0;if(Za&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<e[1]?!1:!0};var ab=Ya({}, | ||
a),Aa="object"===typeof window,ha="function"===typeof importScripts,V="",ta,ma;if("object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node){V=ha?require("path").dirname(V)+"/":__dirname+"/";var bb=function(){ma||(ta=require("fs"),ma=require("path"))};var cb=function(e,b){bb();e=ma.normalize(e);return ta.readFileSync(e,b?null:"utf8")};var pa=function(e){e=cb(e,!0);e.buffer||(e=new Uint8Array(e));return e};var qa=function(e,b,c){bb();e=ma.normalize(e);ta.readFile(e, | ||
function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(Aa||ha)ha?V=self.location.href:"undefined"!==typeof document&&document.currentScript&&(V=document.currentScript.src),k&&(V=k),V=0!==V.indexOf("blob:")?V.substr(0,V.replace(/[?#].*/,"").lastIndexOf("/")+1):"",cb=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.send(null);return b.responseText},ha&&(pa=function(e){var b= | ||
new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),qa=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var xd=a.print||console.log.bind(console),ca=a.printErr||console.warn.bind(console);Ya(a,ab);ab=null;var fa;a.wasmBinary&&(fa=a.wasmBinary);"object"!==typeof WebAssembly&&f("no native wasm support detected"); | ||
var na,za=!1,xa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0,ya,Y,ea,G,Ba,Fa=[],ra=[],Ea=[],Ca=!1,ba=0,ua=null,ia=null;a.preloadedImages={};a.preloadedAudios={};var R="draco_decoder.wasm";R.startsWith("data:application/octet-stream;base64,")||(R=l(R));var ka=[],yd=0,ja={mappings:{},buffers:[null,[],[]],printChar:function(e,b){var c=ja.buffers[e];0===b||10===b?((1===e?xd:ca)(p(c,0)),c.length=0):c.push(b)},varargs:void 0,get:function(){ja.varargs+=4;return G[ja.varargs-4>>2]},getStr:function(e){return h(e)}, | ||
get64:function(e,b){return e}},zd={h:function(e){return db(e+16)+16},g:function(e,b,c){(new da(e)).init(b,c);yd++;throw e;},a:function(){f("")},f:function(e,b,c){ea.copyWithin(e,b,b+c)},d:function(e){var b=ea.length;e>>>=0;if(2147483648<e)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math,t=g.min;d=Math.max(e,d);0<d%65536&&(d+=65536-d%65536);g=t.call(g,2147483648,d);a:{try{na.grow(g-ya.byteLength+65535>>>16);A(na.buffer);var W=1;break a}catch(va){}W=void 0}if(W)return!0}return!1}, | ||
e:function(e){return 0},c:function(e,b,c,d,g){},b:function(e,b,c,d){for(var g=0,t=0;t<c;t++){var W=G[b>>2],va=G[b+4>>2];b+=8;for(var wa=0;wa<va;wa++)ja.printChar(e,ea[W+wa]);g+=va}G[d>>2]=g;return 0}};(function(){function e(g,t){a.asm=g.exports;na=a.asm.i;A(na.buffer);Ba=a.asm.k;ra.unshift(a.asm.j);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==ua&&(clearInterval(ua),ua=null),ia&&(g=ia,ia=null,g()))}function b(g){e(g.instance)}function c(g){return v().then(function(t){return WebAssembly.instantiate(t, | ||
d)}).then(function(t){return t}).then(g,function(t){ca("failed to asynchronously prepare wasm: "+t);f(t)})}var d={a:zd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){return ca("Module.instantiateWasm callback failed with error: "+g),!1}(function(){return fa||"function"!==typeof WebAssembly.instantiateStreaming||R.startsWith("data:application/octet-stream;base64,")||R.startsWith("file://")||"function"!==typeof fetch?c(b): | ||
fetch(R,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){ca("wasm streaming compile failed: "+t);ca("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(oa);return{}})();a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.j).apply(null,arguments)};var eb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(eb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.l).apply(null,arguments)},Ga=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0= | ||
function(){return(Ga=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.m).apply(null,arguments)},fb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(fb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.n).apply(null,arguments)},gb=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(gb=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.o).apply(null,arguments)},Ha=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ha=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= | ||
a.asm.p).apply(null,arguments)},hb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(hb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.q).apply(null,arguments)},ib=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ib=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.r).apply(null,arguments)},Ia=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ia=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0= | ||
a.asm.s).apply(null,arguments)},jb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(jb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.t).apply(null,arguments)},Ja=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ja=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.u).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_size_0=function(){return(kb=a._emscripten_bind_PointAttribute_size_0=a.asm.v).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0= | ||
function(){return(lb=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.w).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(mb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.x).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(nb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.y).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_num_components_0=function(){return(ob=a._emscripten_bind_PointAttribute_num_components_0= | ||
a.asm.z).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(pb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.A).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(qb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.B).apply(null,arguments)},rb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(rb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.C).apply(null,arguments)},sb=a._emscripten_bind_PointAttribute_unique_id_0= | ||
function(){return(sb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.D).apply(null,arguments)},tb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(tb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.E).apply(null,arguments)},Ka=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ka=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.F).apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1= | ||
function(){return(ub=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.G).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.H).apply(null,arguments)},wb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(wb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.I).apply(null,arguments)},xb= | ||
a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(xb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.J).apply(null,arguments)},yb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(yb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.K).apply(null,arguments)},La=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(La=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0= | ||
a.asm.L).apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.M).apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.N).apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(Bb= | ||
a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.O).apply(null,arguments)},Ma=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ma=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.P).apply(null,arguments)},Cb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(Cb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.Q).apply(null,arguments)},Db=a._emscripten_bind_PointCloud_num_points_0=function(){return(Db=a._emscripten_bind_PointCloud_num_points_0=a.asm.R).apply(null, | ||
arguments)},Eb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Eb=a._emscripten_bind_PointCloud___destroy___0=a.asm.S).apply(null,arguments)},Na=a._emscripten_bind_Mesh_Mesh_0=function(){return(Na=a._emscripten_bind_Mesh_Mesh_0=a.asm.T).apply(null,arguments)},Fb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Fb=a._emscripten_bind_Mesh_num_faces_0=a.asm.U).apply(null,arguments)},Gb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(Gb=a._emscripten_bind_Mesh_num_attributes_0= | ||
a.asm.V).apply(null,arguments)},Hb=a._emscripten_bind_Mesh_num_points_0=function(){return(Hb=a._emscripten_bind_Mesh_num_points_0=a.asm.W).apply(null,arguments)},Ib=a._emscripten_bind_Mesh___destroy___0=function(){return(Ib=a._emscripten_bind_Mesh___destroy___0=a.asm.X).apply(null,arguments)},Oa=a._emscripten_bind_Metadata_Metadata_0=function(){return(Oa=a._emscripten_bind_Metadata_Metadata_0=a.asm.Y).apply(null,arguments)},Jb=a._emscripten_bind_Metadata___destroy___0=function(){return(Jb=a._emscripten_bind_Metadata___destroy___0= | ||
a.asm.Z).apply(null,arguments)},Kb=a._emscripten_bind_Status_code_0=function(){return(Kb=a._emscripten_bind_Status_code_0=a.asm._).apply(null,arguments)},Lb=a._emscripten_bind_Status_ok_0=function(){return(Lb=a._emscripten_bind_Status_ok_0=a.asm.$).apply(null,arguments)},Mb=a._emscripten_bind_Status_error_msg_0=function(){return(Mb=a._emscripten_bind_Status_error_msg_0=a.asm.aa).apply(null,arguments)},Nb=a._emscripten_bind_Status___destroy___0=function(){return(Nb=a._emscripten_bind_Status___destroy___0= | ||
a.asm.ba).apply(null,arguments)},Pa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Pa=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.ca).apply(null,arguments)},Ob=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Ob=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.da).apply(null,arguments)},Pb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Pb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.ea).apply(null,arguments)}, | ||
Qb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Qb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.fa).apply(null,arguments)},Qa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Qa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ga).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.ha).apply(null,arguments)},Sb=a._emscripten_bind_DracoInt8Array_size_0= | ||
function(){return(Sb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ia).apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Tb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ra=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ka).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoUInt8Array_GetValue_1= | ||
a.asm.la).apply(null,arguments)},Vb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Vb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ma).apply(null,arguments)},Wb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.na).apply(null,arguments)},Sa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Sa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.oa).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt16Array_GetValue_1= | ||
function(){return(Xb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Yb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Yb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.qa).apply(null,arguments)},Zb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Ta=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ta=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0= | ||
a.asm.sa).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return($b=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.ta).apply(null,arguments)},ac=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(ac=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.ua).apply(null,arguments)},bc=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.va).apply(null,arguments)},Ua=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0= | ||
function(){return(Ua=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.wa).apply(null,arguments)},cc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},dc=a._emscripten_bind_DracoInt32Array_size_0=function(){return(dc=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ya).apply(null,arguments)},ec=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoInt32Array___destroy___0= | ||
a.asm.za).apply(null,arguments)},Va=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Va=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.Aa).apply(null,arguments)},fc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(fc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.Ba).apply(null,arguments)},gc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(gc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.Ca).apply(null,arguments)},hc=a._emscripten_bind_DracoUInt32Array___destroy___0= | ||
function(){return(hc=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.Da).apply(null,arguments)},Wa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Wa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Ea).apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ic=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Fa).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2= | ||
a.asm.Ga).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(kc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Ha).apply(null,arguments)},lc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ia).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(mc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Ja).apply(null, | ||
arguments)},nc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(nc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ka).apply(null,arguments)},oc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(oc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.La).apply(null,arguments)},pc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(pc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ma).apply(null,arguments)},Xa=a._emscripten_bind_Decoder_Decoder_0= | ||
function(){return(Xa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Na).apply(null,arguments)},qc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(qc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Oa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(rc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.Pa).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(sc=a._emscripten_bind_Decoder_GetAttributeId_2= | ||
a.asm.Qa).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(tc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Ra).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(uc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Sa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(vc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Ta).apply(null,arguments)}, | ||
wc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Ua).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(xc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Va).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Wa).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetFaceFromMesh_3= | ||
function(){return(zc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Xa).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(Ac=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ya).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(Bc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Za).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(Cc= | ||
a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm._a).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.$a).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.ab).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3= | ||
a.asm.bb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.cb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.db).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3= | ||
a.asm.eb).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.fb).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Kc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.gb).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Lc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3= | ||
a.asm.hb).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Mc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.ib).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Nc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.jb).apply(null,arguments)},Oc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Oc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1= | ||
a.asm.kb).apply(null,arguments)},Pc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Pc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.lb).apply(null,arguments)},Qc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Qc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.mb).apply(null,arguments)},Rc=a._emscripten_bind_Decoder___destroy___0=function(){return(Rc=a._emscripten_bind_Decoder___destroy___0=a.asm.nb).apply(null,arguments)},Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM= | ||
function(){return(Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.ob).apply(null,arguments)},Tc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Tc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.pb).apply(null,arguments)},Uc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Uc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM= | ||
a.asm.qb).apply(null,arguments)},Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Vc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.rb).apply(null,arguments)},Wc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Wc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.sb).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION= | ||
a.asm.tb).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Yc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.ub).apply(null,arguments)},Zc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Zc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.vb).apply(null,arguments)},$c=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return($c=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD= | ||
a.asm.wb).apply(null,arguments)},ad=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(ad=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.xb).apply(null,arguments)},bd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(bd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.yb).apply(null,arguments)},cd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(cd=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD= | ||
a.asm.zb).apply(null,arguments)},dd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(dd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.Ab).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(ed=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.Bb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(fd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.Cb).apply(null,arguments)},gd= | ||
a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(gd=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.Db).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(hd=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Eb).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(id=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Fb).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(jd=a._emscripten_enum_draco_DataType_DT_INT32= | ||
a.asm.Gb).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(kd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Hb).apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(ld=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Ib).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(md=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Jb).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_FLOAT32= | ||
function(){return(nd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Kb).apply(null,arguments)},od=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(od=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Lb).apply(null,arguments)},pd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(pd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Mb).apply(null,arguments)},qd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(qd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT= | ||
a.asm.Nb).apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_OK=function(){return(rd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Ob).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(sd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Pb).apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(td=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Qb).apply(null,arguments)},ud=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER= | ||
function(){return(ud=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Rb).apply(null,arguments)},vd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(vd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Sb).apply(null,arguments)},wd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(wd=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Tb).apply(null,arguments)},db=a._malloc=function(){return(db=a._malloc=a.asm.Ub).apply(null, | ||
arguments)};a._free=function(){return(a._free=a.asm.Vb).apply(null,arguments)};var la;ia=function b(){la||Q();la||(ia=b)};a.run=Q;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();Q();u.prototype=Object.create(u.prototype);u.prototype.constructor=u;u.prototype.__class__=u;u.__cache__={};a.WrapperObject=u;a.getCache=x;a.wrapPointer=D;a.castObject=function(b,c){return D(b.ptr,c)};a.NULL=D(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)"; | ||
b.__destroy__();delete x(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||f(void 0));r.pos=0},alloc:function(b,c){r.buffer||f(void 0);b= | ||
b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||f(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};Z.prototype=Object.create(u.prototype);Z.prototype.constructor=Z;Z.prototype.__class__=Z;Z.__cache__={};a.VoidPtr=Z;Z.prototype.__destroy__=Z.prototype.__destroy__=function(){eb(this.ptr)};T.prototype= | ||
Object.create(u.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.DecoderBuffer=T;T.prototype.Init=T.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=sa(b));c&&"object"===typeof c&&(c=c.ptr);fb(d,b,c)};T.prototype.__destroy__=T.prototype.__destroy__=function(){gb(this.ptr)};S.prototype=Object.create(u.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.AttributeTransformData=S;S.prototype.transform_type=S.prototype.transform_type= | ||
function(){return hb(this.ptr)};S.prototype.__destroy__=S.prototype.__destroy__=function(){ib(this.ptr)};X.prototype=Object.create(u.prototype);X.prototype.constructor=X;X.prototype.__class__=X;X.__cache__={};a.GeometryAttribute=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){jb(this.ptr)};w.prototype=Object.create(u.prototype);w.prototype.constructor=w;w.prototype.__class__=w;w.__cache__={};a.PointAttribute=w;w.prototype.size=w.prototype.size=function(){return kb(this.ptr)};w.prototype.GetAttributeTransformData= | ||
w.prototype.GetAttributeTransformData=function(){return D(lb(this.ptr),S)};w.prototype.attribute_type=w.prototype.attribute_type=function(){return mb(this.ptr)};w.prototype.data_type=w.prototype.data_type=function(){return nb(this.ptr)};w.prototype.num_components=w.prototype.num_components=function(){return ob(this.ptr)};w.prototype.normalized=w.prototype.normalized=function(){return!!pb(this.ptr)};w.prototype.byte_stride=w.prototype.byte_stride=function(){return qb(this.ptr)};w.prototype.byte_offset= | ||
w.prototype.byte_offset=function(){return rb(this.ptr)};w.prototype.unique_id=w.prototype.unique_id=function(){return sb(this.ptr)};w.prototype.__destroy__=w.prototype.__destroy__=function(){tb(this.ptr)};C.prototype=Object.create(u.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.AttributeQuantizationTransform=C;C.prototype.InitFromAttribute=C.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!ub(c,b)};C.prototype.quantization_bits= | ||
C.prototype.quantization_bits=function(){return vb(this.ptr)};C.prototype.min_value=C.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return wb(c,b)};C.prototype.range=C.prototype.range=function(){return xb(this.ptr)};C.prototype.__destroy__=C.prototype.__destroy__=function(){yb(this.ptr)};H.prototype=Object.create(u.prototype);H.prototype.constructor=H;H.prototype.__class__=H;H.__cache__={};a.AttributeOctahedronTransform=H;H.prototype.InitFromAttribute=H.prototype.InitFromAttribute= | ||
function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!zb(c,b)};H.prototype.quantization_bits=H.prototype.quantization_bits=function(){return Ab(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){Bb(this.ptr)};I.prototype=Object.create(u.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.PointCloud=I;I.prototype.num_attributes=I.prototype.num_attributes=function(){return Cb(this.ptr)};I.prototype.num_points=I.prototype.num_points=function(){return Db(this.ptr)}; | ||
I.prototype.__destroy__=I.prototype.__destroy__=function(){Eb(this.ptr)};E.prototype=Object.create(u.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return Fb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=function(){return Gb(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return Hb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Ib(this.ptr)};U.prototype= | ||
Object.create(u.prototype);U.prototype.constructor=U;U.prototype.__class__=U;U.__cache__={};a.Metadata=U;U.prototype.__destroy__=U.prototype.__destroy__=function(){Jb(this.ptr)};B.prototype=Object.create(u.prototype);B.prototype.constructor=B;B.prototype.__class__=B;B.__cache__={};a.Status=B;B.prototype.code=B.prototype.code=function(){return Kb(this.ptr)};B.prototype.ok=B.prototype.ok=function(){return!!Lb(this.ptr)};B.prototype.error_msg=B.prototype.error_msg=function(){return h(Mb(this.ptr))}; | ||
B.prototype.__destroy__=B.prototype.__destroy__=function(){Nb(this.ptr)};J.prototype=Object.create(u.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoFloat32Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Ob(c,b)};J.prototype.size=J.prototype.size=function(){return Pb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Qb(this.ptr)};K.prototype=Object.create(u.prototype);K.prototype.constructor= | ||
K;K.prototype.__class__=K;K.__cache__={};a.DracoInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Rb(c,b)};K.prototype.size=K.prototype.size=function(){return Sb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Tb(this.ptr)};L.prototype=Object.create(u.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoUInt8Array=L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c= | ||
this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Ub(c,b)};L.prototype.size=L.prototype.size=function(){return Vb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Wb(this.ptr)};M.prototype=Object.create(u.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoInt16Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Xb(c,b)};M.prototype.size=M.prototype.size=function(){return Yb(this.ptr)}; | ||
M.prototype.__destroy__=M.prototype.__destroy__=function(){Zb(this.ptr)};N.prototype=Object.create(u.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoUInt16Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return $b(c,b)};N.prototype.size=N.prototype.size=function(){return ac(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){bc(this.ptr)};O.prototype=Object.create(u.prototype);O.prototype.constructor= | ||
O;O.prototype.__class__=O;O.__cache__={};a.DracoInt32Array=O;O.prototype.GetValue=O.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return cc(c,b)};O.prototype.size=O.prototype.size=function(){return dc(this.ptr)};O.prototype.__destroy__=O.prototype.__destroy__=function(){ec(this.ptr)};P.prototype=Object.create(u.prototype);P.prototype.constructor=P;P.prototype.__class__=P;P.__cache__={};a.DracoUInt32Array=P;P.prototype.GetValue=P.prototype.GetValue=function(b){var c= | ||
this.ptr;b&&"object"===typeof b&&(b=b.ptr);return fc(c,b)};P.prototype.size=P.prototype.size=function(){return gc(this.ptr)};P.prototype.__destroy__=P.prototype.__destroy__=function(){hc(this.ptr)};y.prototype=Object.create(u.prototype);y.prototype.constructor=y;y.prototype.__class__=y;y.__cache__={};a.MetadataQuerier=y;y.prototype.HasEntry=y.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:aa(c);return!!ic(d,b,c)};y.prototype.GetIntEntry= | ||
y.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:aa(c);return jc(d,b,c)};y.prototype.GetIntEntryArray=y.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:aa(c);d&&"object"===typeof d&&(d=d.ptr);kc(g,b,c,d)};y.prototype.GetDoubleEntry=y.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr); | ||
c=c&&"object"===typeof c?c.ptr:aa(c);return lc(d,b,c)};y.prototype.GetStringEntry=y.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:aa(c);return h(mc(d,b,c))};y.prototype.NumEntries=y.prototype.NumEntries=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return nc(c,b)};y.prototype.GetEntryName=y.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&& | ||
(c=c.ptr);return h(oc(d,b,c))};y.prototype.__destroy__=y.prototype.__destroy__=function(){pc(this.ptr)};m.prototype=Object.create(u.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=sa(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return D(qc(g,b,c,d),B)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh= | ||
function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=sa(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return D(rc(g,b,c,d),B)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return sc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c? | ||
c.ptr:aa(c);return tc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:aa(c);d=d&&"object"===typeof d?d.ptr:aa(d);return uc(g,b,c,d)};m.prototype.GetAttribute=m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(vc(d,b,c),w)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId= | ||
function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(wc(d,b,c),w)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return D(xc(c,b),U)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(yc(d,b,c),U)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b, | ||
c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return Ac(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr); | ||
d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints= | ||
m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ec(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Fc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints= | ||
function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Gc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Hc(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr; | ||
b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ic(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Jc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&& | ||
(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Kc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Lc(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,t){var W=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&& | ||
"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);t&&"object"===typeof t&&(t=t.ptr);return!!Mc(W,b,c,d,g,t)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Nc(c,b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Oc(c,b)};m.prototype.DecodeBufferToPointCloud= | ||
m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(Pc(d,b,c),B)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return D(Qc(d,b,c),B)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Rc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Sc();a.ATTRIBUTE_NO_TRANSFORM=Tc(); | ||
a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Uc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Vc();a.INVALID=Wc();a.POSITION=Xc();a.NORMAL=Yc();a.COLOR=Zc();a.TEX_COORD=$c();a.GENERIC=ad();a.INVALID_GEOMETRY_TYPE=bd();a.POINT_CLOUD=cd();a.TRIANGULAR_MESH=dd();a.DT_INVALID=ed();a.DT_INT8=fd();a.DT_UINT8=gd();a.DT_INT16=hd();a.DT_UINT16=id();a.DT_INT32=jd();a.DT_UINT32=kd();a.DT_INT64=ld();a.DT_UINT64=md();a.DT_FLOAT32=nd();a.DT_FLOAT64=od();a.DT_BOOL=pd();a.DT_TYPES_COUNT=qd();a.OK=rd();a.DRACO_ERROR=sd();a.IO_ERROR=td(); | ||
a.INVALID_PARAMETER=ud();a.UNSUPPORTED_VERSION=vd();a.UNKNOWN_VERSION=wd()}Ca?b():ra.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}(); | ||
"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule); | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.owns=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.ISOLATE_POLYFILLS=!1,$jscomp.FORCE_POLYFILL_PROMISE=!1,$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(a,s,p){return a==Array.prototype||a==Object.prototype||(a[s]=p.value),a},$jscomp.getGlobal=function(a){a=[typeof globalThis=="object"&&globalThis,a,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var s=0;s<a.length;++s){var p=a[s];if(p&&p.Math==Math)return p}throw Error("Cannot find global object")},$jscomp.global=$jscomp.getGlobal(this),$jscomp.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol",$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE,$jscomp.polyfills={},$jscomp.propertyToPolyfillSymbol={},$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,s){var p=$jscomp.propertyToPolyfillSymbol[s];return p==null?a[s]:(p=a[p],p!==void 0?p:a[s])};$jscomp.polyfill=function(a,s,p,c){s&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,s,p,c):$jscomp.polyfillUnisolated(a,s,p,c))},$jscomp.polyfillUnisolated=function(a,s,p,c){for(p=$jscomp.global,a=a.split("."),c=0;c<a.length-1;c++){var i=a[c];if(!(i in p))return;p=p[i]}a=a[a.length-1],c=p[a],s=s(c),s!=c&&s!=null&&$jscomp.defineProperty(p,a,{configurable:!0,writable:!0,value:s})},$jscomp.polyfillIsolated=function(a,s,p,c){var i=a.split(".");a=i.length===1,c=i[0],c=!a&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var I=0;I<i.length-1;I++){var _=i[I];if(!(_ in c))return;c=c[_]}i=i[i.length-1],p=$jscomp.IS_SYMBOL_NATIVE&&p==="es6"?c[i]:null,s=s(p),s!=null&&(a?$jscomp.defineProperty($jscomp.polyfills,i,{configurable:!0,writable:!0,value:s}):s!==p&&($jscomp.propertyToPolyfillSymbol[i]===void 0&&(p=1e9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[i]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(i):$jscomp.POLYFILL_PREFIX+p+"$"+i),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[i],{configurable:!0,writable:!0,value:s})))},$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&typeof Object.assign=="function"?Object.assign:function(a,s){for(var p=1;p<arguments.length;p++){var c=arguments[p];if(c)for(var i in c)$jscomp.owns(c,i)&&(a[i]=c[i])}return a},$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3"),$jscomp.arrayIteratorImpl=function(a){var s=0;return function(){return s<a.length?{done:!1,value:a[s++]}:{done:!0}}},$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}},$jscomp.makeIterator=function(a){var s=typeof Symbol<"u"&&Symbol.iterator&&a[Symbol.iterator];return s?s.call(a):$jscomp.arrayIterator(a)},$jscomp.polyfill("Promise",function(a){function s(){this.batch_=null}function p(_){return _ instanceof i?_:new i(function(y,b){y(_)})}if(a&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof $jscomp.global.PromiseRejectionEvent>"u")||!$jscomp.global.Promise||$jscomp.global.Promise.toString().indexOf("[native code]")===-1))return a;s.prototype.asyncExecute=function(_){if(this.batch_==null){this.batch_=[];var y=this;this.asyncExecuteFunction(function(){y.executeBatch_()})}this.batch_.push(_)};var c=$jscomp.global.setTimeout;s.prototype.asyncExecuteFunction=function(_){c(_,0)},s.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var _=this.batch_;this.batch_=[];for(var y=0;y<_.length;++y){var b=_[y];_[y]=null;try{b()}catch(D){this.asyncThrow_(D)}}}this.batch_=null},s.prototype.asyncThrow_=function(_){this.asyncExecuteFunction(function(){throw _})};var i=function(_){this.state_=0,this.result_=void 0,this.onSettledCallbacks_=[],this.isRejectionHandled_=!1;var y=this.createResolveAndReject_();try{_(y.resolve,y.reject)}catch(b){y.reject(b)}};i.prototype.createResolveAndReject_=function(){function _(D){return function(O){b||(b=!0,D.call(y,O))}}var y=this,b=!1;return{resolve:_(this.resolveTo_),reject:_(this.reject_)}},i.prototype.resolveTo_=function(_){if(_===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(_ instanceof i)this.settleSameAsPromise_(_);else{t:switch(typeof _){case"object":var y=_!=null;break t;case"function":y=!0;break t;default:y=!1}y?this.resolveToNonPromiseObj_(_):this.fulfill_(_)}},i.prototype.resolveToNonPromiseObj_=function(_){var y=void 0;try{y=_.then}catch(b){this.reject_(b);return}typeof y=="function"?this.settleSameAsThenable_(y,_):this.fulfill_(_)},i.prototype.reject_=function(_){this.settle_(2,_)},i.prototype.fulfill_=function(_){this.settle_(1,_)},i.prototype.settle_=function(_,y){if(this.state_!=0)throw Error("Cannot settle("+_+", "+y+"): Promise already settled in state"+this.state_);this.state_=_,this.result_=y,this.state_===2&&this.scheduleUnhandledRejectionCheck_(),this.executeOnSettledCallbacks_()},i.prototype.scheduleUnhandledRejectionCheck_=function(){var _=this;c(function(){if(_.notifyUnhandledRejection_()){var y=$jscomp.global.console;typeof y<"u"&&y.error(_.result_)}},1)},i.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var _=$jscomp.global.CustomEvent,y=$jscomp.global.Event,b=$jscomp.global.dispatchEvent;return typeof b>"u"?!0:(typeof _=="function"?_=new _("unhandledrejection",{cancelable:!0}):typeof y=="function"?_=new y("unhandledrejection",{cancelable:!0}):(_=$jscomp.global.document.createEvent("CustomEvent"),_.initCustomEvent("unhandledrejection",!1,!0,_)),_.promise=this,_.reason=this.result_,b(_))},i.prototype.executeOnSettledCallbacks_=function(){if(this.onSettledCallbacks_!=null){for(var _=0;_<this.onSettledCallbacks_.length;++_)I.asyncExecute(this.onSettledCallbacks_[_]);this.onSettledCallbacks_=null}};var I=new s;return i.prototype.settleSameAsPromise_=function(_){var y=this.createResolveAndReject_();_.callWhenSettled_(y.resolve,y.reject)},i.prototype.settleSameAsThenable_=function(_,y){var b=this.createResolveAndReject_();try{_.call(y,b.resolve,b.reject)}catch(D){b.reject(D)}},i.prototype.then=function(_,y){function b(L,m){return typeof L=="function"?function(A){try{D(L(A))}catch(E){O(E)}}:m}var D,O,$=new i(function(L,m){D=L,O=m});return this.callWhenSettled_(b(_,D),b(y,O)),$},i.prototype.catch=function(_){return this.then(void 0,_)},i.prototype.callWhenSettled_=function(_,y){function b(){switch(D.state_){case 1:_(D.result_);break;case 2:y(D.result_);break;default:throw Error("Unexpected state: "+D.state_)}}var D=this;this.onSettledCallbacks_==null?I.asyncExecute(b):this.onSettledCallbacks_.push(b),this.isRejectionHandled_=!0},i.resolve=p,i.reject=function(_){return new i(function(y,b){b(_)})},i.race=function(_){return new i(function(y,b){for(var D=$jscomp.makeIterator(_),O=D.next();!O.done;O=D.next())p(O.value).callWhenSettled_(y,b)})},i.all=function(_){var y=$jscomp.makeIterator(_),b=y.next();return b.done?p([]):new i(function(D,O){function $(A){return function(E){L[A]=E,m--,m==0&&D(L)}}var L=[],m=0;do L.push(void 0),m++,p(b.value).callWhenSettled_($(L.length-1),O),b=y.next();while(!b.done)})},i},"es6","es3"),$jscomp.checkStringArgs=function(a,s,p){if(a==null)throw new TypeError("The 'this' value for String.prototype."+p+" must not be null or undefined");if(s instanceof RegExp)throw new TypeError("First argument to String.prototype."+p+" must not be a regular expression");return a+""},$jscomp.polyfill("String.prototype.startsWith",function(a){return a||function(s,p){var c=$jscomp.checkStringArgs(this,s,"startsWith");s+="";var i=c.length,I=s.length;p=Math.max(0,Math.min(p|0,c.length));for(var _=0;_<I&&p<i;)if(c[p++]!=s[_++])return!1;return _>=I}},"es6","es3"),$jscomp.polyfill("Array.prototype.copyWithin",function(a){function s(p){return p=Number(p),p===1/0||p===-1/0?p:p|0}return a||function(p,c,i){var I=this.length;if(p=s(p),c=s(c),i=i===void 0?I:s(i),p=0>p?Math.max(I+p,0):Math.min(p,I),c=0>c?Math.max(I+c,0):Math.min(c,I),i=0>i?Math.max(I+i,0):Math.min(i,I),p<c)for(;c<i;)c in this?this[p++]=this[c++]:(delete this[p++],c++);else for(i=Math.min(i,I+c-p),p+=i-c;i>c;)--i in this?this[--p]=this[i]:delete this[--p];return this}},"es6","es3"),$jscomp.typedArrayCopyWithin=function(a){return a||Array.prototype.copyWithin},$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"),$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");var DracoDecoderModule=function(){var a=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(a=a||__filename),function(s){function p(e){return t.locateFile?t.locateFile(e,Q):Q+e}function c(e,r,n){var o=r+n;for(n=r;e[n]&&!(n>=o);)++n;if(16<n-r&&e.subarray&&Et)return Et.decode(e.subarray(r,n));for(o="";r<n;){var l=e[r++];if(l&128){var d=e[r++]&63;if((l&224)==192)o+=String.fromCharCode((l&31)<<6|d);else{var q=e[r++]&63;l=(l&240)==224?(l&15)<<12|d<<6|q:(l&7)<<18|d<<12|q<<6|e[r++]&63,65536>l?o+=String.fromCharCode(l):(l-=65536,o+=String.fromCharCode(55296|l>>10,56320|l&1023))}}else o+=String.fromCharCode(l)}return o}function i(e,r){return e?c(tt,e,r):""}function I(e){Gt=e,t.HEAP8=H=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=z=new Int32Array(e),t.HEAPU8=tt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=new Float64Array(e)}function _(e){throw t.onAbort&&t.onAbort(e),e="Aborted("+e+")",K(e),vt=!0,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),pt(e),e}function y(e){try{if(e==V&&Z)return new Uint8Array(Z);if(st)return st(e);throw"both async and sync fetching of the wasm failed"}catch(r){_(r)}}function b(){if(!Z&&(Dt||J)){if(typeof fetch=="function"&&!V.startsWith("file://"))return fetch(V,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+V+"'";return e.arrayBuffer()}).catch(function(){return y(V)});if(ct)return new Promise(function(e,r){ct(V,function(n){e(new Uint8Array(n))},r)})}return Promise.resolve().then(function(){return y(V)})}function D(e){for(;0<e.length;){var r=e.shift();if(typeof r=="function")r(t);else{var n=r.func;typeof n=="number"?r.arg===void 0?O(n)():O(n)(r.arg):n(r.arg===void 0?null:r.arg)}}}function O(e){var r=ot[e];return r||(e>=ot.length&&(ot.length=e+1),ot[e]=r=Ot.get(e)),r}function $(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(r){z[this.ptr+4>>2]=r},this.get_type=function(){return z[this.ptr+4>>2]},this.set_destructor=function(r){z[this.ptr+8>>2]=r},this.get_destructor=function(){return z[this.ptr+8>>2]},this.set_refcount=function(r){z[this.ptr>>2]=r},this.set_caught=function(r){H[this.ptr+12>>0]=r?1:0},this.get_caught=function(){return H[this.ptr+12>>0]!=0},this.set_rethrown=function(r){H[this.ptr+13>>0]=r?1:0},this.get_rethrown=function(){return H[this.ptr+13>>0]!=0},this.init=function(r,n){this.set_type(r),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){z[this.ptr>>2]+=1},this.release_ref=function(){var r=z[this.ptr>>2];return z[this.ptr>>2]=r-1,r===1}}function L(e){function r(){if(!it&&(it=!0,t.calledRun=!0,!vt)){if(Rt=!0,D(yt),bt(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Pt.unshift(t.postRun.shift());D(Pt)}}if(!(0<X)){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)jt.unshift(t.preRun.shift());D(jt),0<X||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),r()},1)):r())}}function m(){}function A(e){return(e||m).__cache__}function E(e,r){var n=A(r),o=n[e];return o||(o=Object.create((r||m).prototype),o.ptr=e,n[e]=o)}function k(e){if(typeof e=="string"){for(var r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);55296<=o&&57343>=o&&(o=65536+((o&1023)<<10)|e.charCodeAt(++n)&1023),127>=o?++r:r=2047>=o?r+2:65535>=o?r+3:r+4}if(r=Array(r+1),n=0,o=r.length,0<o){o=n+o-1;for(var l=0;l<e.length;++l){var d=e.charCodeAt(l);if(55296<=d&&57343>=d){var q=e.charCodeAt(++l);d=65536+((d&1023)<<10)|q&1023}if(127>=d){if(n>=o)break;r[n++]=d}else{if(2047>=d){if(n+1>=o)break;r[n++]=192|d>>6}else{if(65535>=d){if(n+2>=o)break;r[n++]=224|d>>12}else{if(n+3>=o)break;r[n++]=240|d>>18,r[n++]=128|d>>12&63}r[n++]=128|d>>6&63}r[n++]=128|d&63}}r[n]=0}return e=f.alloc(r,H),f.copy(r,H,e),e}return e}function at(e){if(typeof e=="object"){var r=f.alloc(e,H);return f.copy(e,H,r),r}return e}function Y(){throw"cannot construct a VoidPtr, no constructor in IDL"}function B(){this.ptr=Mt(),A(B)[this.ptr]=this}function w(){this.ptr=Ft(),A(w)[this.ptr]=this}function x(){this.ptr=wt(),A(x)[this.ptr]=this}function h(){this.ptr=Vt(),A(h)[this.ptr]=this}function v(){this.ptr=$t(),A(v)[this.ptr]=this}function j(){this.ptr=ne(),A(j)[this.ptr]=this}function P(){this.ptr=ae(),A(P)[this.ptr]=this}function G(){this.ptr=ce(),A(G)[this.ptr]=this}function W(){this.ptr=de(),A(W)[this.ptr]=this}function g(){throw"cannot construct a Status, no constructor in IDL"}function R(){this.ptr=Ie(),A(R)[this.ptr]=this}function S(){this.ptr=Ge(),A(S)[this.ptr]=this}function M(){this.ptr=Re(),A(M)[this.ptr]=this}function N(){this.ptr=Ue(),A(N)[this.ptr]=this}function U(){this.ptr=we(),A(U)[this.ptr]=this}function F(){this.ptr=We(),A(F)[this.ptr]=this}function C(){this.ptr=He(),A(C)[this.ptr]=this}function T(){this.ptr=Ke(),A(T)[this.ptr]=this}function u(){this.ptr=_r(),A(u)[this.ptr]=this}s=s||{};var t=typeof s<"u"?s:{},dt=Object.assign,bt,pt;t.ready=new Promise(function(e,r){bt=e,pt=r});var ht=!1,At=!1;t.onRuntimeInitialized=function(){ht=!0,At&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.onModuleParsed=function(){At=!0,ht&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.isVersionSupported=function(e){return typeof e!="string"?!1:(e=e.split("."),2>e.length||3<e.length?!1:e[0]==1&&0<=e[1]&&5>=e[1]?!0:!(e[0]!=0||10<e[1]))};var Tt=dt({},t),Dt=typeof window=="object",J=typeof importScripts=="function",Q="",ut,rt;if(typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"){Q=J?require("path").dirname(Q)+"/":__dirname+"/";var It=function(){rt||(ut=require("fs"),rt=require("path"))},gt=function(e,r){return It(),e=rt.normalize(e),ut.readFileSync(e,r?null:"utf8")},st=function(e){return e=gt(e,!0),e.buffer||(e=new Uint8Array(e)),e},ct=function(e,r,n){It(),e=rt.normalize(e),ut.readFile(e,function(o,l){o?n(o):r(l.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.inspect=function(){return"[Emscripten Module object]"}}else(Dt||J)&&(J?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),a&&(Q=a),Q=Q.indexOf("blob:")!==0?Q.substr(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1):"",gt=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},J&&(st=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),ct=function(e,r,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){o.status==200||o.status==0&&o.response?r(o.response):n()},o.onerror=n,o.send(null)});var mn=t.print||console.log.bind(console),K=t.printErr||console.warn.bind(console);dt(t,Tt),Tt=null;var Z;t.wasmBinary&&(Z=t.wasmBinary),typeof WebAssembly!="object"&&_("no native wasm support detected");var nt,vt=!1,Et=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Gt,H,tt,z,Ot,jt=[],yt=[],Pt=[],Rt=!1,X=0,lt=null,et=null;t.preloadedImages={},t.preloadedAudios={};var V="draco_decoder.wasm";V.startsWith("data:application/octet-stream;base64,")||(V=p(V));var ot=[],fn=0,_t={mappings:{},buffers:[null,[],[]],printChar:function(e,r){var n=_t.buffers[e];r===0||r===10?((e===1?mn:K)(c(n,0)),n.length=0):n.push(r)},varargs:void 0,get:function(){return _t.varargs+=4,z[_t.varargs-4>>2]},getStr:function(e){return i(e)},get64:function(e,r){return e}},dn={h:function(e){return ln(e+16)+16},g:function(e,r,n){throw new $(e).init(r,n),fn++,e},a:function(){_("")},f:function(e,r,n){tt.copyWithin(e,r,r+n)},d:function(e){var r=tt.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var l=Math,d=l.min;o=Math.max(e,o),0<o%65536&&(o+=65536-o%65536),l=d.call(l,2147483648,o);t:{try{nt.grow(l-Gt.byteLength+65535>>>16),I(nt.buffer);var q=1;break t}catch{}q=void 0}if(q)return!0}return!1},e:function(e){return 0},c:function(e,r,n,o,l){},b:function(e,r,n,o){for(var l=0,d=0;d<n;d++){var q=z[r>>2],mt=z[r+4>>2];r+=8;for(var ft=0;ft<mt;ft++)_t.printChar(e,tt[q+ft]);l+=mt}return z[o>>2]=l,0}};(function(){function e(l,d){t.asm=l.exports,nt=t.asm.i,I(nt.buffer),Ot=t.asm.k,yt.unshift(t.asm.j),X--,t.monitorRunDependencies&&t.monitorRunDependencies(X),X==0&&(lt!==null&&(clearInterval(lt),lt=null),et&&(l=et,et=null,l()))}function r(l){e(l.instance)}function n(l){return b().then(function(d){return WebAssembly.instantiate(d,o)}).then(function(d){return d}).then(l,function(d){K("failed to asynchronously prepare wasm: "+d),_(d)})}var o={a:dn};if(X++,t.monitorRunDependencies&&t.monitorRunDependencies(X),t.instantiateWasm)try{return t.instantiateWasm(o,e)}catch(l){return K("Module.instantiateWasm callback failed with error: "+l),!1}return function(){return Z||typeof WebAssembly.instantiateStreaming!="function"||V.startsWith("data:application/octet-stream;base64,")||V.startsWith("file://")||typeof fetch!="function"?n(r):fetch(V,{credentials:"same-origin"}).then(function(l){return WebAssembly.instantiateStreaming(l,o).then(r,function(d){return K("wasm streaming compile failed: "+d),K("falling back to ArrayBuffer instantiation"),n(r)})})}().catch(pt),{}})(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.j).apply(null,arguments)};var St=t._emscripten_bind_VoidPtr___destroy___0=function(){return(St=t._emscripten_bind_VoidPtr___destroy___0=t.asm.l).apply(null,arguments)},Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=t.asm.m).apply(null,arguments)},Nt=t._emscripten_bind_DecoderBuffer_Init_2=function(){return(Nt=t._emscripten_bind_DecoderBuffer_Init_2=t.asm.n).apply(null,arguments)},Ut=t._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Ut=t._emscripten_bind_DecoderBuffer___destroy___0=t.asm.o).apply(null,arguments)},Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=t.asm.p).apply(null,arguments)},Ct=t._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(Ct=t._emscripten_bind_AttributeTransformData_transform_type_0=t.asm.q).apply(null,arguments)},Lt=t._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Lt=t._emscripten_bind_AttributeTransformData___destroy___0=t.asm.r).apply(null,arguments)},wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=t.asm.s).apply(null,arguments)},zt=t._emscripten_bind_GeometryAttribute___destroy___0=function(){return(zt=t._emscripten_bind_GeometryAttribute___destroy___0=t.asm.t).apply(null,arguments)},Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=t.asm.u).apply(null,arguments)},Bt=t._emscripten_bind_PointAttribute_size_0=function(){return(Bt=t._emscripten_bind_PointAttribute_size_0=t.asm.v).apply(null,arguments)},Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=t.asm.w).apply(null,arguments)},Qt=t._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Qt=t._emscripten_bind_PointAttribute_attribute_type_0=t.asm.x).apply(null,arguments)},xt=t._emscripten_bind_PointAttribute_data_type_0=function(){return(xt=t._emscripten_bind_PointAttribute_data_type_0=t.asm.y).apply(null,arguments)},Yt=t._emscripten_bind_PointAttribute_num_components_0=function(){return(Yt=t._emscripten_bind_PointAttribute_num_components_0=t.asm.z).apply(null,arguments)},Ht=t._emscripten_bind_PointAttribute_normalized_0=function(){return(Ht=t._emscripten_bind_PointAttribute_normalized_0=t.asm.A).apply(null,arguments)},qt=t._emscripten_bind_PointAttribute_byte_stride_0=function(){return(qt=t._emscripten_bind_PointAttribute_byte_stride_0=t.asm.B).apply(null,arguments)},kt=t._emscripten_bind_PointAttribute_byte_offset_0=function(){return(kt=t._emscripten_bind_PointAttribute_byte_offset_0=t.asm.C).apply(null,arguments)},Xt=t._emscripten_bind_PointAttribute_unique_id_0=function(){return(Xt=t._emscripten_bind_PointAttribute_unique_id_0=t.asm.D).apply(null,arguments)},Kt=t._emscripten_bind_PointAttribute___destroy___0=function(){return(Kt=t._emscripten_bind_PointAttribute___destroy___0=t.asm.E).apply(null,arguments)},$t=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return($t=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=t.asm.F).apply(null,arguments)},Jt=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(Jt=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=t.asm.G).apply(null,arguments)},Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=t.asm.H).apply(null,arguments)},te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=t.asm.I).apply(null,arguments)},ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=t.asm.J).apply(null,arguments)},re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=t.asm.K).apply(null,arguments)},ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=t.asm.L).apply(null,arguments)},oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=t.asm.M).apply(null,arguments)},_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=t.asm.N).apply(null,arguments)},ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=t.asm.O).apply(null,arguments)},ae=t._emscripten_bind_PointCloud_PointCloud_0=function(){return(ae=t._emscripten_bind_PointCloud_PointCloud_0=t.asm.P).apply(null,arguments)},pe=t._emscripten_bind_PointCloud_num_attributes_0=function(){return(pe=t._emscripten_bind_PointCloud_num_attributes_0=t.asm.Q).apply(null,arguments)},ue=t._emscripten_bind_PointCloud_num_points_0=function(){return(ue=t._emscripten_bind_PointCloud_num_points_0=t.asm.R).apply(null,arguments)},se=t._emscripten_bind_PointCloud___destroy___0=function(){return(se=t._emscripten_bind_PointCloud___destroy___0=t.asm.S).apply(null,arguments)},ce=t._emscripten_bind_Mesh_Mesh_0=function(){return(ce=t._emscripten_bind_Mesh_Mesh_0=t.asm.T).apply(null,arguments)},ye=t._emscripten_bind_Mesh_num_faces_0=function(){return(ye=t._emscripten_bind_Mesh_num_faces_0=t.asm.U).apply(null,arguments)},le=t._emscripten_bind_Mesh_num_attributes_0=function(){return(le=t._emscripten_bind_Mesh_num_attributes_0=t.asm.V).apply(null,arguments)},me=t._emscripten_bind_Mesh_num_points_0=function(){return(me=t._emscripten_bind_Mesh_num_points_0=t.asm.W).apply(null,arguments)},fe=t._emscripten_bind_Mesh___destroy___0=function(){return(fe=t._emscripten_bind_Mesh___destroy___0=t.asm.X).apply(null,arguments)},de=t._emscripten_bind_Metadata_Metadata_0=function(){return(de=t._emscripten_bind_Metadata_Metadata_0=t.asm.Y).apply(null,arguments)},be=t._emscripten_bind_Metadata___destroy___0=function(){return(be=t._emscripten_bind_Metadata___destroy___0=t.asm.Z).apply(null,arguments)},he=t._emscripten_bind_Status_code_0=function(){return(he=t._emscripten_bind_Status_code_0=t.asm._).apply(null,arguments)},Ae=t._emscripten_bind_Status_ok_0=function(){return(Ae=t._emscripten_bind_Status_ok_0=t.asm.$).apply(null,arguments)},Te=t._emscripten_bind_Status_error_msg_0=function(){return(Te=t._emscripten_bind_Status_error_msg_0=t.asm.aa).apply(null,arguments)},De=t._emscripten_bind_Status___destroy___0=function(){return(De=t._emscripten_bind_Status___destroy___0=t.asm.ba).apply(null,arguments)},Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=t.asm.ca).apply(null,arguments)},ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=t.asm.da).apply(null,arguments)},ve=t._emscripten_bind_DracoFloat32Array_size_0=function(){return(ve=t._emscripten_bind_DracoFloat32Array_size_0=t.asm.ea).apply(null,arguments)},Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=t.asm.fa).apply(null,arguments)},Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=t.asm.ga).apply(null,arguments)},Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=t.asm.ha).apply(null,arguments)},je=t._emscripten_bind_DracoInt8Array_size_0=function(){return(je=t._emscripten_bind_DracoInt8Array_size_0=t.asm.ia).apply(null,arguments)},Pe=t._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Pe=t._emscripten_bind_DracoInt8Array___destroy___0=t.asm.ja).apply(null,arguments)},Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=t.asm.ka).apply(null,arguments)},Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=t.asm.la).apply(null,arguments)},Me=t._emscripten_bind_DracoUInt8Array_size_0=function(){return(Me=t._emscripten_bind_DracoUInt8Array_size_0=t.asm.ma).apply(null,arguments)},Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=t.asm.na).apply(null,arguments)},Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=t.asm.oa).apply(null,arguments)},Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=t.asm.pa).apply(null,arguments)},Ce=t._emscripten_bind_DracoInt16Array_size_0=function(){return(Ce=t._emscripten_bind_DracoInt16Array_size_0=t.asm.qa).apply(null,arguments)},Le=t._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Le=t._emscripten_bind_DracoInt16Array___destroy___0=t.asm.ra).apply(null,arguments)},we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=t.asm.sa).apply(null,arguments)},ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=t.asm.ta).apply(null,arguments)},Ve=t._emscripten_bind_DracoUInt16Array_size_0=function(){return(Ve=t._emscripten_bind_DracoUInt16Array_size_0=t.asm.ua).apply(null,arguments)},Be=t._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Be=t._emscripten_bind_DracoUInt16Array___destroy___0=t.asm.va).apply(null,arguments)},We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=t.asm.wa).apply(null,arguments)},Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=t.asm.xa).apply(null,arguments)},xe=t._emscripten_bind_DracoInt32Array_size_0=function(){return(xe=t._emscripten_bind_DracoInt32Array_size_0=t.asm.ya).apply(null,arguments)},Ye=t._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ye=t._emscripten_bind_DracoInt32Array___destroy___0=t.asm.za).apply(null,arguments)},He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=t.asm.Aa).apply(null,arguments)},qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=t.asm.Ba).apply(null,arguments)},ke=t._emscripten_bind_DracoUInt32Array_size_0=function(){return(ke=t._emscripten_bind_DracoUInt32Array_size_0=t.asm.Ca).apply(null,arguments)},Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=t.asm.Da).apply(null,arguments)},Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=t.asm.Ea).apply(null,arguments)},$e=t._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return($e=t._emscripten_bind_MetadataQuerier_HasEntry_2=t.asm.Fa).apply(null,arguments)},Je=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(Je=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=t.asm.Ga).apply(null,arguments)},Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=t.asm.Ha).apply(null,arguments)},tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=t.asm.Ia).apply(null,arguments)},er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=t.asm.Ja).apply(null,arguments)},rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=t.asm.Ka).apply(null,arguments)},nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=t.asm.La).apply(null,arguments)},or=t._emscripten_bind_MetadataQuerier___destroy___0=function(){return(or=t._emscripten_bind_MetadataQuerier___destroy___0=t.asm.Ma).apply(null,arguments)},_r=t._emscripten_bind_Decoder_Decoder_0=function(){return(_r=t._emscripten_bind_Decoder_Decoder_0=t.asm.Na).apply(null,arguments)},ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=t.asm.Oa).apply(null,arguments)},ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=t.asm.Pa).apply(null,arguments)},pr=t._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pr=t._emscripten_bind_Decoder_GetAttributeId_2=t.asm.Qa).apply(null,arguments)},ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=t.asm.Ra).apply(null,arguments)},sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=t.asm.Sa).apply(null,arguments)},cr=t._emscripten_bind_Decoder_GetAttribute_2=function(){return(cr=t._emscripten_bind_Decoder_GetAttribute_2=t.asm.Ta).apply(null,arguments)},yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=t.asm.Ua).apply(null,arguments)},lr=t._emscripten_bind_Decoder_GetMetadata_1=function(){return(lr=t._emscripten_bind_Decoder_GetMetadata_1=t.asm.Va).apply(null,arguments)},mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=t.asm.Wa).apply(null,arguments)},fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=t.asm.Xa).apply(null,arguments)},dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=t.asm.Ya).apply(null,arguments)},br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=t.asm.Za).apply(null,arguments)},hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=t.asm._a).apply(null,arguments)},Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=t.asm.$a).apply(null,arguments)},Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=t.asm.ab).apply(null,arguments)},Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=t.asm.bb).apply(null,arguments)},Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=t.asm.cb).apply(null,arguments)},gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=t.asm.db).apply(null,arguments)},vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=t.asm.eb).apply(null,arguments)},Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=t.asm.fb).apply(null,arguments)},Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=t.asm.gb).apply(null,arguments)},Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=t.asm.hb).apply(null,arguments)},jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=t.asm.ib).apply(null,arguments)},Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=t.asm.jb).apply(null,arguments)},Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=t.asm.kb).apply(null,arguments)},Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=t.asm.lb).apply(null,arguments)},Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=t.asm.mb).apply(null,arguments)},Nr=t._emscripten_bind_Decoder___destroy___0=function(){return(Nr=t._emscripten_bind_Decoder___destroy___0=t.asm.nb).apply(null,arguments)},Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=t.asm.ob).apply(null,arguments)},Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=t.asm.pb).apply(null,arguments)},Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=t.asm.qb).apply(null,arguments)},Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=t.asm.rb).apply(null,arguments)},wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=t.asm.sb).apply(null,arguments)},zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=t.asm.tb).apply(null,arguments)},Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=t.asm.ub).apply(null,arguments)},Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=t.asm.vb).apply(null,arguments)},Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=t.asm.wb).apply(null,arguments)},Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=t.asm.xb).apply(null,arguments)},xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=t.asm.yb).apply(null,arguments)},Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=t.asm.zb).apply(null,arguments)},Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=t.asm.Ab).apply(null,arguments)},qr=t._emscripten_enum_draco_DataType_DT_INVALID=function(){return(qr=t._emscripten_enum_draco_DataType_DT_INVALID=t.asm.Bb).apply(null,arguments)},kr=t._emscripten_enum_draco_DataType_DT_INT8=function(){return(kr=t._emscripten_enum_draco_DataType_DT_INT8=t.asm.Cb).apply(null,arguments)},Xr=t._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Xr=t._emscripten_enum_draco_DataType_DT_UINT8=t.asm.Db).apply(null,arguments)},Kr=t._emscripten_enum_draco_DataType_DT_INT16=function(){return(Kr=t._emscripten_enum_draco_DataType_DT_INT16=t.asm.Eb).apply(null,arguments)},$r=t._emscripten_enum_draco_DataType_DT_UINT16=function(){return($r=t._emscripten_enum_draco_DataType_DT_UINT16=t.asm.Fb).apply(null,arguments)},Jr=t._emscripten_enum_draco_DataType_DT_INT32=function(){return(Jr=t._emscripten_enum_draco_DataType_DT_INT32=t.asm.Gb).apply(null,arguments)},Zr=t._emscripten_enum_draco_DataType_DT_UINT32=function(){return(Zr=t._emscripten_enum_draco_DataType_DT_UINT32=t.asm.Hb).apply(null,arguments)},tn=t._emscripten_enum_draco_DataType_DT_INT64=function(){return(tn=t._emscripten_enum_draco_DataType_DT_INT64=t.asm.Ib).apply(null,arguments)},en=t._emscripten_enum_draco_DataType_DT_UINT64=function(){return(en=t._emscripten_enum_draco_DataType_DT_UINT64=t.asm.Jb).apply(null,arguments)},rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=t.asm.Kb).apply(null,arguments)},nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=t.asm.Lb).apply(null,arguments)},on=t._emscripten_enum_draco_DataType_DT_BOOL=function(){return(on=t._emscripten_enum_draco_DataType_DT_BOOL=t.asm.Mb).apply(null,arguments)},_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=t.asm.Nb).apply(null,arguments)},an=t._emscripten_enum_draco_StatusCode_OK=function(){return(an=t._emscripten_enum_draco_StatusCode_OK=t.asm.Ob).apply(null,arguments)},pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=t.asm.Pb).apply(null,arguments)},un=t._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(un=t._emscripten_enum_draco_StatusCode_IO_ERROR=t.asm.Qb).apply(null,arguments)},sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=t.asm.Rb).apply(null,arguments)},cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=t.asm.Sb).apply(null,arguments)},yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=t.asm.Tb).apply(null,arguments)},ln=t._malloc=function(){return(ln=t._malloc=t.asm.Ub).apply(null,arguments)};t._free=function(){return(t._free=t.asm.Vb).apply(null,arguments)};var it;if(et=function e(){it||L(),it||(et=e)},t.run=L,t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();L(),m.prototype=Object.create(m.prototype),m.prototype.constructor=m,m.prototype.__class__=m,m.__cache__={},t.WrapperObject=m,t.getCache=A,t.wrapPointer=E,t.castObject=function(e,r){return E(e.ptr,r)},t.NULL=E(0),t.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete A(e.__class__)[e.ptr]},t.compare=function(e,r){return e.ptr===r.ptr},t.getPointer=function(e){return e.ptr},t.getClass=function(e){return e.__class__};var f={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(f.needed){for(var e=0;e<f.temps.length;e++)t._free(f.temps[e]);f.temps.length=0,t._free(f.buffer),f.buffer=0,f.size+=f.needed,f.needed=0}f.buffer||(f.size+=128,f.buffer=t._malloc(f.size),f.buffer||_(void 0)),f.pos=0},alloc:function(e,r){return f.buffer||_(void 0),e=e.length*r.BYTES_PER_ELEMENT,e=e+7&-8,f.pos+e>=f.size?(0<e||_(void 0),f.needed+=e,r=t._malloc(e),f.temps.push(r)):(r=f.buffer+f.pos,f.pos+=e),r},copy:function(e,r,n){switch(n>>>=0,r.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var o=0;o<e.length;o++)r[n+o]=e[o]}};return Y.prototype=Object.create(m.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},t.VoidPtr=Y,Y.prototype.__destroy__=Y.prototype.__destroy__=function(){St(this.ptr)},B.prototype=Object.create(m.prototype),B.prototype.constructor=B,B.prototype.__class__=B,B.__cache__={},t.DecoderBuffer=B,B.prototype.Init=B.prototype.Init=function(e,r){var n=this.ptr;f.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),Nt(n,e,r)},B.prototype.__destroy__=B.prototype.__destroy__=function(){Ut(this.ptr)},w.prototype=Object.create(m.prototype),w.prototype.constructor=w,w.prototype.__class__=w,w.__cache__={},t.AttributeTransformData=w,w.prototype.transform_type=w.prototype.transform_type=function(){return Ct(this.ptr)},w.prototype.__destroy__=w.prototype.__destroy__=function(){Lt(this.ptr)},x.prototype=Object.create(m.prototype),x.prototype.constructor=x,x.prototype.__class__=x,x.__cache__={},t.GeometryAttribute=x,x.prototype.__destroy__=x.prototype.__destroy__=function(){zt(this.ptr)},h.prototype=Object.create(m.prototype),h.prototype.constructor=h,h.prototype.__class__=h,h.__cache__={},t.PointAttribute=h,h.prototype.size=h.prototype.size=function(){return Bt(this.ptr)},h.prototype.GetAttributeTransformData=h.prototype.GetAttributeTransformData=function(){return E(Wt(this.ptr),w)},h.prototype.attribute_type=h.prototype.attribute_type=function(){return Qt(this.ptr)},h.prototype.data_type=h.prototype.data_type=function(){return xt(this.ptr)},h.prototype.num_components=h.prototype.num_components=function(){return Yt(this.ptr)},h.prototype.normalized=h.prototype.normalized=function(){return!!Ht(this.ptr)},h.prototype.byte_stride=h.prototype.byte_stride=function(){return qt(this.ptr)},h.prototype.byte_offset=h.prototype.byte_offset=function(){return kt(this.ptr)},h.prototype.unique_id=h.prototype.unique_id=function(){return Xt(this.ptr)},h.prototype.__destroy__=h.prototype.__destroy__=function(){Kt(this.ptr)},v.prototype=Object.create(m.prototype),v.prototype.constructor=v,v.prototype.__class__=v,v.__cache__={},t.AttributeQuantizationTransform=v,v.prototype.InitFromAttribute=v.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!Jt(r,e)},v.prototype.quantization_bits=v.prototype.quantization_bits=function(){return Zt(this.ptr)},v.prototype.min_value=v.prototype.min_value=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),te(r,e)},v.prototype.range=v.prototype.range=function(){return ee(this.ptr)},v.prototype.__destroy__=v.prototype.__destroy__=function(){re(this.ptr)},j.prototype=Object.create(m.prototype),j.prototype.constructor=j,j.prototype.__class__=j,j.__cache__={},t.AttributeOctahedronTransform=j,j.prototype.InitFromAttribute=j.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!oe(r,e)},j.prototype.quantization_bits=j.prototype.quantization_bits=function(){return _e(this.ptr)},j.prototype.__destroy__=j.prototype.__destroy__=function(){ie(this.ptr)},P.prototype=Object.create(m.prototype),P.prototype.constructor=P,P.prototype.__class__=P,P.__cache__={},t.PointCloud=P,P.prototype.num_attributes=P.prototype.num_attributes=function(){return pe(this.ptr)},P.prototype.num_points=P.prototype.num_points=function(){return ue(this.ptr)},P.prototype.__destroy__=P.prototype.__destroy__=function(){se(this.ptr)},G.prototype=Object.create(m.prototype),G.prototype.constructor=G,G.prototype.__class__=G,G.__cache__={},t.Mesh=G,G.prototype.num_faces=G.prototype.num_faces=function(){return ye(this.ptr)},G.prototype.num_attributes=G.prototype.num_attributes=function(){return le(this.ptr)},G.prototype.num_points=G.prototype.num_points=function(){return me(this.ptr)},G.prototype.__destroy__=G.prototype.__destroy__=function(){fe(this.ptr)},W.prototype=Object.create(m.prototype),W.prototype.constructor=W,W.prototype.__class__=W,W.__cache__={},t.Metadata=W,W.prototype.__destroy__=W.prototype.__destroy__=function(){be(this.ptr)},g.prototype=Object.create(m.prototype),g.prototype.constructor=g,g.prototype.__class__=g,g.__cache__={},t.Status=g,g.prototype.code=g.prototype.code=function(){return he(this.ptr)},g.prototype.ok=g.prototype.ok=function(){return!!Ae(this.ptr)},g.prototype.error_msg=g.prototype.error_msg=function(){return i(Te(this.ptr))},g.prototype.__destroy__=g.prototype.__destroy__=function(){De(this.ptr)},R.prototype=Object.create(m.prototype),R.prototype.constructor=R,R.prototype.__class__=R,R.__cache__={},t.DracoFloat32Array=R,R.prototype.GetValue=R.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ge(r,e)},R.prototype.size=R.prototype.size=function(){return ve(this.ptr)},R.prototype.__destroy__=R.prototype.__destroy__=function(){Ee(this.ptr)},S.prototype=Object.create(m.prototype),S.prototype.constructor=S,S.prototype.__class__=S,S.__cache__={},t.DracoInt8Array=S,S.prototype.GetValue=S.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Oe(r,e)},S.prototype.size=S.prototype.size=function(){return je(this.ptr)},S.prototype.__destroy__=S.prototype.__destroy__=function(){Pe(this.ptr)},M.prototype=Object.create(m.prototype),M.prototype.constructor=M,M.prototype.__class__=M,M.__cache__={},t.DracoUInt8Array=M,M.prototype.GetValue=M.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Se(r,e)},M.prototype.size=M.prototype.size=function(){return Me(this.ptr)},M.prototype.__destroy__=M.prototype.__destroy__=function(){Ne(this.ptr)},N.prototype=Object.create(m.prototype),N.prototype.constructor=N,N.prototype.__class__=N,N.__cache__={},t.DracoInt16Array=N,N.prototype.GetValue=N.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Fe(r,e)},N.prototype.size=N.prototype.size=function(){return Ce(this.ptr)},N.prototype.__destroy__=N.prototype.__destroy__=function(){Le(this.ptr)},U.prototype=Object.create(m.prototype),U.prototype.constructor=U,U.prototype.__class__=U,U.__cache__={},t.DracoUInt16Array=U,U.prototype.GetValue=U.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ze(r,e)},U.prototype.size=U.prototype.size=function(){return Ve(this.ptr)},U.prototype.__destroy__=U.prototype.__destroy__=function(){Be(this.ptr)},F.prototype=Object.create(m.prototype),F.prototype.constructor=F,F.prototype.__class__=F,F.__cache__={},t.DracoInt32Array=F,F.prototype.GetValue=F.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Qe(r,e)},F.prototype.size=F.prototype.size=function(){return xe(this.ptr)},F.prototype.__destroy__=F.prototype.__destroy__=function(){Ye(this.ptr)},C.prototype=Object.create(m.prototype),C.prototype.constructor=C,C.prototype.__class__=C,C.__cache__={},t.DracoUInt32Array=C,C.prototype.GetValue=C.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),qe(r,e)},C.prototype.size=C.prototype.size=function(){return ke(this.ptr)},C.prototype.__destroy__=C.prototype.__destroy__=function(){Xe(this.ptr)},T.prototype=Object.create(m.prototype),T.prototype.constructor=T,T.prototype.__class__=T,T.__cache__={},t.MetadataQuerier=T,T.prototype.HasEntry=T.prototype.HasEntry=function(e,r){var n=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),!!$e(n,e,r)},T.prototype.GetIntEntry=T.prototype.GetIntEntry=function(e,r){var n=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),Je(n,e,r)},T.prototype.GetIntEntryArray=T.prototype.GetIntEntryArray=function(e,r,n){var o=this.ptr;f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),n&&typeof n=="object"&&(n=n.ptr),Ze(o,e,r,n)},T.prototype.GetDoubleEntry=T.prototype.GetDoubleEntry=function(e,r){var n=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),tr(n,e,r)},T.prototype.GetStringEntry=T.prototype.GetStringEntry=function(e,r){var n=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),i(er(n,e,r))},T.prototype.NumEntries=T.prototype.NumEntries=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),rr(r,e)},T.prototype.GetEntryName=T.prototype.GetEntryName=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),i(nr(n,e,r))},T.prototype.__destroy__=T.prototype.__destroy__=function(){or(this.ptr)},u.prototype=Object.create(m.prototype),u.prototype.constructor=u,u.prototype.__class__=u,u.__cache__={},t.Decoder=u,u.prototype.DecodeArrayToPointCloud=u.prototype.DecodeArrayToPointCloud=function(e,r,n){var o=this.ptr;return f.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),E(ir(o,e,r,n),g)},u.prototype.DecodeArrayToMesh=u.prototype.DecodeArrayToMesh=function(e,r,n){var o=this.ptr;return f.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),E(ar(o,e,r,n),g)},u.prototype.GetAttributeId=u.prototype.GetAttributeId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),pr(n,e,r)},u.prototype.GetAttributeIdByName=u.prototype.GetAttributeIdByName=function(e,r){var n=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),ur(n,e,r)},u.prototype.GetAttributeIdByMetadataEntry=u.prototype.GetAttributeIdByMetadataEntry=function(e,r,n){var o=this.ptr;return f.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:k(r),n=n&&typeof n=="object"?n.ptr:k(n),sr(o,e,r,n)},u.prototype.GetAttribute=u.prototype.GetAttribute=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),E(cr(n,e,r),h)},u.prototype.GetAttributeByUniqueId=u.prototype.GetAttributeByUniqueId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),E(yr(n,e,r),h)},u.prototype.GetMetadata=u.prototype.GetMetadata=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),E(lr(r,e),W)},u.prototype.GetAttributeMetadata=u.prototype.GetAttributeMetadata=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),E(mr(n,e,r),W)},u.prototype.GetFaceFromMesh=u.prototype.GetFaceFromMesh=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!fr(o,e,r,n)},u.prototype.GetTriangleStripsFromMesh=u.prototype.GetTriangleStripsFromMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),dr(n,e,r)},u.prototype.GetTrianglesUInt16Array=u.prototype.GetTrianglesUInt16Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!br(o,e,r,n)},u.prototype.GetTrianglesUInt32Array=u.prototype.GetTrianglesUInt32Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!hr(o,e,r,n)},u.prototype.GetAttributeFloat=u.prototype.GetAttributeFloat=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ar(o,e,r,n)},u.prototype.GetAttributeFloatForAllPoints=u.prototype.GetAttributeFloatForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Tr(o,e,r,n)},u.prototype.GetAttributeIntForAllPoints=u.prototype.GetAttributeIntForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Dr(o,e,r,n)},u.prototype.GetAttributeInt8ForAllPoints=u.prototype.GetAttributeInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ir(o,e,r,n)},u.prototype.GetAttributeUInt8ForAllPoints=u.prototype.GetAttributeUInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!gr(o,e,r,n)},u.prototype.GetAttributeInt16ForAllPoints=u.prototype.GetAttributeInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!vr(o,e,r,n)},u.prototype.GetAttributeUInt16ForAllPoints=u.prototype.GetAttributeUInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Er(o,e,r,n)},u.prototype.GetAttributeInt32ForAllPoints=u.prototype.GetAttributeInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Gr(o,e,r,n)},u.prototype.GetAttributeUInt32ForAllPoints=u.prototype.GetAttributeUInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Or(o,e,r,n)},u.prototype.GetAttributeDataArrayForAllPoints=u.prototype.GetAttributeDataArrayForAllPoints=function(e,r,n,o,l){var d=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),o&&typeof o=="object"&&(o=o.ptr),l&&typeof l=="object"&&(l=l.ptr),!!jr(d,e,r,n,o,l)},u.prototype.SkipAttributeTransform=u.prototype.SkipAttributeTransform=function(e){var r=this.ptr;e&&typeof e=="object"&&(e=e.ptr),Pr(r,e)},u.prototype.GetEncodedGeometryType_Deprecated=u.prototype.GetEncodedGeometryType_Deprecated=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Rr(r,e)},u.prototype.DecodeBufferToPointCloud=u.prototype.DecodeBufferToPointCloud=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),E(Sr(n,e,r),g)},u.prototype.DecodeBufferToMesh=u.prototype.DecodeBufferToMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),E(Mr(n,e,r),g)},u.prototype.__destroy__=u.prototype.__destroy__=function(){Nr(this.ptr)},function(){function e(){t.ATTRIBUTE_INVALID_TRANSFORM=Ur(),t.ATTRIBUTE_NO_TRANSFORM=Fr(),t.ATTRIBUTE_QUANTIZATION_TRANSFORM=Cr(),t.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Lr(),t.INVALID=wr(),t.POSITION=zr(),t.NORMAL=Vr(),t.COLOR=Br(),t.TEX_COORD=Wr(),t.GENERIC=Qr(),t.INVALID_GEOMETRY_TYPE=xr(),t.POINT_CLOUD=Yr(),t.TRIANGULAR_MESH=Hr(),t.DT_INVALID=qr(),t.DT_INT8=kr(),t.DT_UINT8=Xr(),t.DT_INT16=Kr(),t.DT_UINT16=$r(),t.DT_INT32=Jr(),t.DT_UINT32=Zr(),t.DT_INT64=tn(),t.DT_UINT64=en(),t.DT_FLOAT32=rn(),t.DT_FLOAT64=nn(),t.DT_BOOL=on(),t.DT_TYPES_COUNT=_n(),t.OK=an(),t.DRACO_ERROR=pn(),t.IO_ERROR=un(),t.INVALID_PARAMETER=sn(),t.UNSUPPORTED_VERSION=cn(),t.UNKNOWN_VERSION=yn()}Rt?e():yt.unshift(e)}(),typeof t.onModuleParsed=="function"&&t.onModuleParsed(),t.Decoder.prototype.GetEncodedGeometryType=function(e){if(e.__class__&&e.__class__===t.DecoderBuffer)return t.Decoder.prototype.GetEncodedGeometryType_Deprecated(e);if(8>e.byteLength)return t.INVALID_GEOMETRY_TYPE;switch(e[7]){case 0:return t.POINT_CLOUD;case 1:return t.TRIANGULAR_MESH;default:return t.INVALID_GEOMETRY_TYPE}},s.ready}}();typeof exports=="object"&&typeof module=="object"?module.exports=DracoDecoderModule:typeof define=="function"&&define.amd?define([],function(){return DracoDecoderModule}):typeof exports=="object"&&(exports.DracoDecoderModule=DracoDecoderModule); |
@@ -1,1 +0,26 @@ | ||
!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}((function(){return function t(e,a,n){function r(s,h){if(!a[s]){if(!e[s]){var l="function"==typeof require&&require;if(!h&&l)return l(s,!0);if(i)return i(s,!0);var o=new Error("Cannot find module '"+s+"'");throw o.code="MODULE_NOT_FOUND",o}var _=a[s]={exports:{}};e[s][0].call(_.exports,(function(t){return r(e[s][1][t]||t)}),_,_.exports,t,e,a,n)}return a[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,a){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e,a,n=Array.prototype.slice.call(arguments,1);n.length;){var r=n.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)e=r,a=i,Object.prototype.hasOwnProperty.call(e,a)&&(t[i]=r[i])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),r);else for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(e=n=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),e=r=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},i={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,i))},a.setTyped(n)},{}],2:[function(t,e,a){"use strict";var n=t("./common"),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){i=!1}for(var s=new n.Buf8(256),h=0;h<256;h++)s[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function l(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,r,i,s,h=t.length,l=0;for(i=0;i<h;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<h&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),l+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(l),i=s=0;s<l;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<h&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),a<128?e[s++]=a:(a<2048?e[s++]=192|a>>>6:(a<65536?e[s++]=224|a>>>12:(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63),e[s++]=128|a>>>6&63),e[s++]=128|63&a);return e},a.buf2binstring=function(t){return l(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,r=e.length;a<r;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,i,h=e||t.length,o=new Array(2*h);for(a=n=0;a<h;)if((r=t[a++])<128)o[n++]=r;else if(4<(i=s[r]))o[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;1<i&&a<h;)r=r<<6|63&t[a++],i--;1<i?o[n++]=65533:r<65536?o[n++]=r:(r-=65536,o[n++]=55296|r>>10&1023,o[n++]=56320|1023&r)}return l(o,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0||0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3<a?2e3:a;i=i+(r=r+e[n++]|0)|0,--s;);r%=65521,i%=65521}return r|i<<16|0}},{}],4:[function(t,e,a){"use strict";var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,r){var i=n,s=r+a;t^=-1;for(var h=r;h<s;h++)t=t>>>8^i[255&(t^e[h])];return-1^t}},{}],5:[function(t,e,a){"use strict";var n,r=t("../utils/common"),i=t("./trees"),s=t("./adler32"),h=t("./crc32"),l=t("./messages"),o=-2,_=258,d=262,u=113;function f(t,e){return t.msg=l[e],e}function c(t){return(t<<1)-(4<t?9:0)}function p(t){for(var e=t.length;0<=--e;)t[e]=0}function g(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(r.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function m(t,e){i._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function b(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,o=t.window,u=t.w_mask,f=t.prev,c=t.strstart+_,p=o[i+s-1],g=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===g&&o[a+s-1]===p&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&i<c);if(n=_-(c-i),i=c-_,s<n){if(t.match_start=e,h<=(s=n))break;p=o[i+s-1],g=o[i+s]}}}while((e=f[e&u])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead}function y(t){var e,a,n,i,l,o,_,u,f,c,p=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-d)){for(r.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=a=t.hash_size;n=t.head[--e],t.head[e]=p<=n?n-p:0,--a;);for(e=a=p;n=t.prev[--e],t.prev[e]=p<=n?n-p:0,--a;);i+=p}if(0===t.strm.avail_in)break;if(o=t.strm,_=t.window,u=t.strstart+t.lookahead,c=void 0,(f=i)<(c=o.avail_in)&&(c=f),a=0===c?0:(o.avail_in-=c,r.arraySet(_,o.input,o.next_in,c,u),1===o.state.wrap?o.adler=s(o.adler,_,c,u):2===o.state.wrap&&(o.adler=h(o.adler,_,c,u)),o.next_in+=c,o.total_in+=c,c),t.lookahead+=a,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+3-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<d&&0!==t.strm.avail_in)}function k(t,e){for(var a,n;;){if(t.lookahead<d){if(y(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-d&&(t.match_length=w(t,a)),t.match_length>=3)if(n=i._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function z(t,e){for(var a,n,r;;){if(t.lookahead<d){if(y(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-d&&(t.match_length=w(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-3,n=i._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(m(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=i._tr_tally(t,0,t.window[t.strstart-1]))&&m(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function x(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function B(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),p(this.dyn_ltree),p(this.dyn_dtree),p(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),p(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),p(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function A(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:u,t.adler=2===e.wrap?0:1,e.last_flush=0,i._tr_init(e),0):f(t,o)}function C(t){var e,a=A(t);return 0===a&&((e=t.state).window_size=2*e.w_size,p(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a}function S(t,e,a,n,i,s){if(!t)return o;var h=1;if(-1===e&&(e=6),n<0?(h=0,n=-n):15<n&&(h=2,n-=16),i<1||9<i||8!==a||n<8||15<n||e<0||9<e||s<0||4<s)return f(t,o);8===n&&(n=9);var l=new B;return(t.state=l).strm=t,l.wrap=h,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new r.Buf8(2*l.w_size),l.head=new r.Buf16(l.hash_size),l.prev=new r.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new r.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=a,C(t)}n=[new x(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(y(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,m(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(m(t,!1),t.strm.avail_out),1)})),new x(4,4,8,4,k),new x(4,5,16,8,k),new x(4,6,32,32,k),new x(4,4,16,16,z),new x(8,16,32,32,z),new x(8,16,128,128,z),new x(8,32,128,256,z),new x(32,128,258,1024,z),new x(32,258,258,4096,z)],a.deflateInit=function(t,e){return S(t,e,8,15,8,0)},a.deflateInit2=S,a.deflateReset=C,a.deflateResetKeep=A,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?o:(t.state.gzhead=e,0):o},a.deflate=function(t,e){var a,r,s,l;if(!t||!t.state||5<e||e<0)return t?f(t,o):o;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return f(t,0===t.avail_out?-5:o);if(r.strm=t,a=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,b(r,31),b(r,139),b(r,8),r.gzhead?(b(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),b(r,255&r.gzhead.time),b(r,r.gzhead.time>>8&255),b(r,r.gzhead.time>>16&255),b(r,r.gzhead.time>>24&255),b(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),b(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(b(r,255&r.gzhead.extra.length),b(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=h(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(b(r,0),b(r,0),b(r,0),b(r,0),b(r,0),b(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),b(r,3),r.status=u);else{var d=8+(r.w_bits-8<<4)<<8;d|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(d|=32),d+=31-d%31,r.status=u,v(r,d),0!==r.strstart&&(v(r,t.adler>>>16),v(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),g(t),s=r.pending,r.pending!==r.pending_buf_size));)b(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),g(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}b(r,l=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),g(t),s=r.pending,r.pending===r.pending_buf_size)){l=1;break}b(r,l=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0)}while(0!==l);r.gzhead.hcrc&&r.pending>s&&(t.adler=h(t.adler,r.pending_buf,r.pending-s,s)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&g(t),r.pending+2<=r.pending_buf_size&&(b(r,255&t.adler),b(r,t.adler>>8&255),t.adler=0,r.status=u)):r.status=u),0!==r.pending){if(g(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&c(e)<=c(a)&&4!==e)return f(t,-5);if(666===r.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var w=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(y(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,s,h=t.window;;){if(t.lookahead<=_){if(y(t),t.lookahead<=_&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=h[r=t.strstart-1])===h[++r]&&n===h[++r]&&n===h[++r]){s=t.strstart+_;do{}while(n===h[++r]&&n===h[++r]&&n===h[++r]&&n===h[++r]&&n===h[++r]&&n===h[++r]&&n===h[++r]&&n===h[++r]&&r<s);t.match_length=_-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=i._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===e?i._tr_align(r):5!==e&&(i._tr_stored_block(r,0,0,!1),3===e&&(p(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),g(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(b(r,255&t.adler),b(r,t.adler>>8&255),b(r,t.adler>>16&255),b(r,t.adler>>24&255),b(r,255&t.total_in),b(r,t.total_in>>8&255),b(r,t.total_in>>16&255),b(r,t.total_in>>24&255)):(v(r,t.adler>>>16),v(r,65535&t.adler)),g(t),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?0:1)},a.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==u&&666!==e?f(t,o):(t.state=null,e===u?f(t,-3):0):o},a.deflateSetDictionary=function(t,e){var a,n,i,h,l,_,d,u,f=e.length;if(!t||!t.state)return o;if(2===(h=(a=t.state).wrap)||1===h&&42!==a.status||a.lookahead)return o;for(1===h&&(t.adler=s(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===h&&(p(a.head),a.strstart=0,a.block_start=0,a.insert=0),u=new r.Buf8(a.w_size),r.arraySet(u,e,f-a.w_size,a.w_size,0),e=u,f=a.w_size),l=t.avail_in,_=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,y(a);a.lookahead>=3;){for(n=a.strstart,i=a.lookahead-2;a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+3-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++,--i;);a.strstart=n,a.lookahead=2,y(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=2,a.match_available=0,t.next_in=_,t.input=d,t.avail_in=l,a.wrap=h,0},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){"use strict";var n=t("../utils/common");function r(t){for(var e=t.length;0<=--e;)t[e]=0}var i=256,s=286,h=30,l=15,o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],_=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);r(f);var c=new Array(60);r(c);var p=new Array(512);r(p);var g=new Array(256);r(g);var m=new Array(29);r(m);var b,v,w,y=new Array(h);function k(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function z(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function x(t){return t<256?p[t]:p[256+(t>>>7)]}function B(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function A(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,B(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function C(t,e,a){A(t,a[2*e],a[2*e+1])}function S(t,e){for(var a=0;a|=1&t,t>>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=l;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=S(i[h]++,h))}}function E(t){var e;for(e=0;e<s;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function U(t){8<t.bi_valid?B(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function D(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function I(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&D(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!D(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function O(t,e,a){var n,r,s,h,l=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?C(t,r,e):(C(t,(s=g[r])+i+1,e),0!==(h=o[s])&&A(t,r-=m[s],h),C(t,s=x(--n),a),0!==(h=_[s])&&A(t,n-=y[s],h)),l<t.last_lit;);C(t,256,e)}function q(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,o=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;1<=a;a--)I(t,i,a);for(r=o;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,I(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,o=e.dyn_tree,_=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=l;i++)t.bl_count[i]=0;for(o[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)p<(i=o[2*o[2*(n=t.heap[a])+1]+1]+1)&&(i=p,g++),o[2*n+1]=i,_<n||(t.bl_count[i]++,s=0,c<=n&&(s=f[n-c]),h=o[2*n],t.opt_len+=h*(i+s),u&&(t.static_len+=h*(d[2*n+1]+s)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(0<g);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)_<(r=t.heap[--a])||(o[2*r+1]!==i&&(t.opt_len+=(i-o[2*r+1])*o[2*r],o[2*r+1]=i),n--)}}(t,e),j(i,_,t.bl_count)}function T(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<o?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,i=r,(h=0)===s?(l=138,o=3):r===s?(l=6,o=3):(l=7,o=4))}function L(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,o=4;for(0===s&&(l=138,o=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<o)for(;C(t,r,t.bl_tree),0!=--h;);else 0!==r?(r!==i&&(C(t,r,t.bl_tree),h--),C(t,16,t.bl_tree),A(t,h-3,2)):h<=10?(C(t,17,t.bl_tree),A(t,h-3,3)):(C(t,18,t.bl_tree),A(t,h-11,7));i=r,(h=0)===s?(l=138,o=3):r===s?(l=6,o=3):(l=7,o=4)}}r(y);var N=!1;function R(t,e,a,r){var i,s,h;A(t,0+(r?1:0),3),s=e,h=a,U(i=t),B(i,h),B(i,~h),n.arraySet(i.pending_buf,i.window,s,h,i.pending),i.pending+=h}a._tr_init=function(t){N||(function(){var t,e,a,n,r,i=new Array(16);for(n=a=0;n<28;n++)for(m[n]=a,t=0;t<1<<o[n];t++)g[a++]=n;for(g[a-1]=n,n=r=0;n<16;n++)for(y[n]=r,t=0;t<1<<_[n];t++)p[r++]=n;for(r>>=7;n<h;n++)for(y[n]=r<<7,t=0;t<1<<_[n]-7;t++)p[256+r++]=n;for(e=0;e<=l;e++)i[e]=0;for(t=0;t<=143;)f[2*t+1]=8,t++,i[8]++;for(;t<=255;)f[2*t+1]=9,t++,i[9]++;for(;t<=279;)f[2*t+1]=7,t++,i[7]++;for(;t<=287;)f[2*t+1]=8,t++,i[8]++;for(j(f,287,i),t=0;t<h;t++)c[2*t+1]=5,c[2*t]=S(t,5);b=new k(f,o,257,s,l),v=new k(c,_,0,h,l),w=new k(new Array(0),d,0,19,7)}(),N=!0),t.l_desc=new z(t.dyn_ltree,b),t.d_desc=new z(t.dyn_dtree,v),t.bl_desc=new z(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,E(t)},a._tr_stored_block=R,a._tr_flush_block=function(t,e,a,n){var r,s,h=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<i;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),q(t,t.l_desc),q(t,t.d_desc),h=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),q(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=a+5,a+4<=r&&-1!==e?R(t,e,a,n):4===t.strategy||s===r?(A(t,2+(n?1:0),3),O(t,f,c)):(A(t,4+(n?1:0),3),function(t,e,a,n){var r;for(A(t,e-257,5),A(t,a-1,5),A(t,n-4,4),r=0;r<n;r++)A(t,t.bl_tree[2*u[r]+1],3);L(t,t.dyn_ltree,e-1),L(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),O(t,t.dyn_ltree,t.dyn_dtree)),E(t),n&&U(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(g[a]+i+1)]++,t.dyn_dtree[2*x(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;A(t,2,3),C(t,256,f),16===(e=t).bi_valid?(B(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)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.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}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var n=t("./zlib/deflate"),r=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),h=t("./zlib/zstream"),l=Object.prototype.toString;function o(t){if(!(this instanceof o))return new o(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var a=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==a)throw new Error(s[a]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var _;if(_="string"==typeof e.dictionary?i.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(a=n.deflateSetDictionary(this.strm,_)))throw new Error(s[a]);this._dict_set=!0}}function _(t,e){var a=new o(e);if(a.push(t,!0),a.err)throw a.msg||s[a.err];return a.result}o.prototype.push=function(t,e){var a,s,h=this.strm,o=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?h.input=i.string2buf(t):"[object ArrayBuffer]"===l.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new r.Buf8(o),h.next_out=0,h.avail_out=o),1!==(a=n.deflate(h,s))&&0!==a)return this.onEnd(a),!(this.ended=!0);0!==h.avail_out&&(0!==h.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(r.shrinkBuf(h.output,h.next_out))):this.onData(r.shrinkBuf(h.output,h.next_out)))}while((0<h.avail_in||0===h.avail_out)&&1!==a);return 4===s?(a=n.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),!(h.avail_out=0))},o.prototype.onData=function(t){this.chunks.push(t)},o.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=o,a.deflate=_,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,_(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,_(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")})); | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
(function(D){typeof exports=="object"&&typeof module<"u"?module.exports=D():typeof define=="function"&&define.amd?define([],D):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).pako=D()})(function(){return function D(H,v,E){function w(p,A){if(!v[p]){if(!H[p]){var u=typeof require=="function"&&require;if(!A&&u)return u(p,!0);if(x)return x(p,!0);var f=new Error("Cannot find module '"+p+"'");throw f.code="MODULE_NOT_FOUND",f}var _=v[p]={exports:{}};H[p][0].call(_.exports,function(y){return w(H[p][1][y]||y)},_,_.exports,D,H,v,E)}return v[p].exports}for(var x=typeof require=="function"&&require,g=0;g<E.length;g++)w(E[g]);return w}({1:[function(D,H,v){"use strict";var E=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";v.assign=function(g){for(var p,A,u=Array.prototype.slice.call(arguments,1);u.length;){var f=u.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var _ in f)p=f,A=_,Object.prototype.hasOwnProperty.call(p,A)&&(g[_]=f[_])}}return g},v.shrinkBuf=function(g,p){return g.length===p?g:g.subarray?g.subarray(0,p):(g.length=p,g)};var w={arraySet:function(g,p,A,u,f){if(p.subarray&&g.subarray)g.set(p.subarray(A,A+u),f);else for(var _=0;_<u;_++)g[f+_]=p[A+_]},flattenChunks:function(g){var p,A,u,f,_,y;for(p=u=0,A=g.length;p<A;p++)u+=g[p].length;for(y=new Uint8Array(u),p=f=0,A=g.length;p<A;p++)_=g[p],y.set(_,f),f+=_.length;return y}},x={arraySet:function(g,p,A,u,f){for(var _=0;_<u;_++)g[f+_]=p[A+_]},flattenChunks:function(g){return[].concat.apply([],g)}};v.setTyped=function(g){g?(v.Buf8=Uint8Array,v.Buf16=Uint16Array,v.Buf32=Int32Array,v.assign(v,w)):(v.Buf8=Array,v.Buf16=Array,v.Buf32=Array,v.assign(v,x))},v.setTyped(E)},{}],2:[function(D,H,v){"use strict";var E=D("./common"),w=!0,x=!0;try{String.fromCharCode.apply(null,[0])}catch{w=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{x=!1}for(var g=new E.Buf8(256),p=0;p<256;p++)g[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;function A(u,f){if(f<65534&&(u.subarray&&x||!u.subarray&&w))return String.fromCharCode.apply(null,E.shrinkBuf(u,f));for(var _="",y=0;y<f;y++)_+=String.fromCharCode(u[y]);return _}g[254]=g[254]=1,v.string2buf=function(u){var f,_,y,k,j,S=u.length,m=0;for(k=0;k<S;k++)(64512&(_=u.charCodeAt(k)))==55296&&k+1<S&&(64512&(y=u.charCodeAt(k+1)))==56320&&(_=65536+(_-55296<<10)+(y-56320),k++),m+=_<128?1:_<2048?2:_<65536?3:4;for(f=new E.Buf8(m),k=j=0;j<m;k++)(64512&(_=u.charCodeAt(k)))==55296&&k+1<S&&(64512&(y=u.charCodeAt(k+1)))==56320&&(_=65536+(_-55296<<10)+(y-56320),k++),_<128?f[j++]=_:(_<2048?f[j++]=192|_>>>6:(_<65536?f[j++]=224|_>>>12:(f[j++]=240|_>>>18,f[j++]=128|_>>>12&63),f[j++]=128|_>>>6&63),f[j++]=128|63&_);return f},v.buf2binstring=function(u){return A(u,u.length)},v.binstring2buf=function(u){for(var f=new E.Buf8(u.length),_=0,y=f.length;_<y;_++)f[_]=u.charCodeAt(_);return f},v.buf2string=function(u,f){var _,y,k,j,S=f||u.length,m=new Array(2*S);for(_=y=0;_<S;)if((k=u[_++])<128)m[y++]=k;else if(4<(j=g[k]))m[y++]=65533,_+=j-1;else{for(k&=j===2?31:j===3?15:7;1<j&&_<S;)k=k<<6|63&u[_++],j--;1<j?m[y++]=65533:k<65536?m[y++]=k:(k-=65536,m[y++]=55296|k>>10&1023,m[y++]=56320|1023&k)}return A(m,y)},v.utf8border=function(u,f){var _;for((f=f||u.length)>u.length&&(f=u.length),_=f-1;0<=_&&(192&u[_])==128;)_--;return _<0||_===0?f:_+g[u[_]]>f?_:f}},{"./common":1}],3:[function(D,H,v){"use strict";H.exports=function(E,w,x,g){for(var p=65535&E|0,A=E>>>16&65535|0,u=0;x!==0;){for(x-=u=2e3<x?2e3:x;A=A+(p=p+w[g++]|0)|0,--u;);p%=65521,A%=65521}return p|A<<16|0}},{}],4:[function(D,H,v){"use strict";var E=function(){for(var w,x=[],g=0;g<256;g++){w=g;for(var p=0;p<8;p++)w=1&w?3988292384^w>>>1:w>>>1;x[g]=w}return x}();H.exports=function(w,x,g,p){var A=E,u=p+g;w^=-1;for(var f=p;f<u;f++)w=w>>>8^A[255&(w^x[f])];return-1^w}},{}],5:[function(D,H,v){"use strict";var E,w=D("../utils/common"),x=D("./trees"),g=D("./adler32"),p=D("./crc32"),A=D("./messages"),u=0,f=4,_=0,y=-2,k=-1,j=4,S=2,m=8,O=9,F=286,I=30,ie=19,_e=2*F+1,te=15,B=3,V=258,T=V+B+1,X=42,K=113,q=1,ee=2,Y=3,ae=4;function W(e,s){return e.msg=A[s],s}function se(e){return(e<<1)-(4<e?9:0)}function G(e){for(var s=e.length;0<=--s;)e[s]=0}function J(e){var s=e.state,t=s.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(w.arraySet(e.output,s.pending_buf,s.pending_out,t,e.next_out),e.next_out+=t,s.pending_out+=t,e.total_out+=t,e.avail_out-=t,s.pending-=t,s.pending===0&&(s.pending_out=0))}function N(e,s){x._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,s),e.block_start=e.strstart,J(e.strm)}function z(e,s){e.pending_buf[e.pending++]=s}function R(e,s){e.pending_buf[e.pending++]=s>>>8&255,e.pending_buf[e.pending++]=255&s}function M(e,s){var t,r,a=e.max_chain_length,n=e.strstart,h=e.prev_length,l=e.nice_match,i=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,o=e.window,c=e.w_mask,d=e.prev,b=e.strstart+V,U=o[n+h-1],C=o[n+h];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do if(o[(t=s)+h]===C&&o[t+h-1]===U&&o[t]===o[n]&&o[++t]===o[n+1]){n+=2,t++;do;while(o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&o[++n]===o[++t]&&n<b);if(r=V-(b-n),n=b-V,h<r){if(e.match_start=s,l<=(h=r))break;U=o[n+h-1],C=o[n+h]}}while((s=d[s&c])>i&&--a!=0);return h<=e.lookahead?h:e.lookahead}function Z(e){var s,t,r,a,n,h,l,i,o,c,d=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-T)){for(w.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,s=t=e.hash_size;r=e.head[--s],e.head[s]=d<=r?r-d:0,--t;);for(s=t=d;r=e.prev[--s],e.prev[s]=d<=r?r-d:0,--t;);a+=d}if(e.strm.avail_in===0)break;if(h=e.strm,l=e.window,i=e.strstart+e.lookahead,o=a,c=void 0,c=h.avail_in,o<c&&(c=o),t=c===0?0:(h.avail_in-=c,w.arraySet(l,h.input,h.next_in,c,i),h.state.wrap===1?h.adler=g(h.adler,l,c,i):h.state.wrap===2&&(h.adler=p(h.adler,l,c,i)),h.next_in+=c,h.total_in+=c,c),e.lookahead+=t,e.lookahead+e.insert>=B)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=(e.ins_h<<e.hash_shift^e.window[n+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[n+B-1])&e.hash_mask,e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<B)););}while(e.lookahead<T&&e.strm.avail_in!==0)}function he(e,s){for(var t,r;;){if(e.lookahead<T){if(Z(e),e.lookahead<T&&s===u)return q;if(e.lookahead===0)break}if(t=0,e.lookahead>=B&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-T&&(e.match_length=M(e,t)),e.match_length>=B)if(r=x._tr_tally(e,e.strstart-e.match_start,e.match_length-B),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=B){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=x._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(N(e,!1),e.strm.avail_out===0))return q}return e.insert=e.strstart<B-1?e.strstart:B-1,s===f?(N(e,!0),e.strm.avail_out===0?Y:ae):e.last_lit&&(N(e,!1),e.strm.avail_out===0)?q:ee}function re(e,s){for(var t,r,a;;){if(e.lookahead<T){if(Z(e),e.lookahead<T&&s===u)return q;if(e.lookahead===0)break}if(t=0,e.lookahead>=B&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=B-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-T&&(e.match_length=M(e,t),e.match_length<=5&&(e.strategy===1||e.match_length===B&&4096<e.strstart-e.match_start)&&(e.match_length=B-1)),e.prev_length>=B&&e.match_length<=e.prev_length){for(a=e.strstart+e.lookahead-B,r=x._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-B),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=B-1,e.strstart++,r&&(N(e,!1),e.strm.avail_out===0))return q}else if(e.match_available){if((r=x._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return q}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=x._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<B-1?e.strstart:B-1,s===f?(N(e,!0),e.strm.avail_out===0?Y:ae):e.last_lit&&(N(e,!1),e.strm.avail_out===0)?q:ee}function P(e,s,t,r,a){this.good_length=e,this.max_lazy=s,this.nice_length=t,this.max_chain=r,this.func=a}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new w.Buf16(2*_e),this.dyn_dtree=new w.Buf16(2*(2*I+1)),this.bl_tree=new w.Buf16(2*(2*ie+1)),G(this.dyn_ltree),G(this.dyn_dtree),G(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new w.Buf16(te+1),this.heap=new w.Buf16(2*F+1),G(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new w.Buf16(2*F+1),G(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function le(e){var s;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=S,(s=e.state).pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?X:K,e.adler=s.wrap===2?0:1,s.last_flush=u,x._tr_init(s),_):W(e,y)}function de(e){var s,t=le(e);return t===_&&((s=e.state).window_size=2*s.w_size,G(s.head),s.max_lazy_match=E[s.level].max_lazy,s.good_match=E[s.level].good_length,s.nice_match=E[s.level].nice_length,s.max_chain_length=E[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=B-1,s.match_available=0,s.ins_h=0),t}function oe(e,s,t,r,a,n){if(!e)return y;var h=1;if(s===k&&(s=6),r<0?(h=0,r=-r):15<r&&(h=2,r-=16),a<1||O<a||t!==m||r<8||15<r||s<0||9<s||n<0||j<n)return W(e,y);r===8&&(r=9);var l=new pe;return(e.state=l).strm=e,l.wrap=h,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+B-1)/B),l.window=new w.Buf8(2*l.w_size),l.head=new w.Buf16(l.hash_size),l.prev=new w.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new w.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=s,l.strategy=n,l.method=t,de(e)}E=[new P(0,0,0,0,function(e,s){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Z(e),e.lookahead===0&&s===u)return q;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+t;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,N(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(N(e,!1),e.strm.avail_out===0))return q}return e.insert=0,s===f?(N(e,!0),e.strm.avail_out===0?Y:ae):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),q)}),new P(4,4,8,4,he),new P(4,5,16,8,he),new P(4,6,32,32,he),new P(4,4,16,16,re),new P(8,16,32,32,re),new P(8,16,128,128,re),new P(8,32,128,256,re),new P(32,128,258,1024,re),new P(32,258,258,4096,re)],v.deflateInit=function(e,s){return oe(e,s,m,15,8,0)},v.deflateInit2=oe,v.deflateReset=de,v.deflateResetKeep=le,v.deflateSetHeader=function(e,s){return e&&e.state?e.state.wrap!==2?y:(e.state.gzhead=s,_):y},v.deflate=function(e,s){var t,r,a,n;if(!e||!e.state||5<s||s<0)return e?W(e,y):y;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===666&&s!==f)return W(e,e.avail_out===0?-5:y);if(r.strm=e,t=r.last_flush,r.last_flush=s,r.status===X)if(r.wrap===2)e.adler=0,z(r,31),z(r,139),z(r,8),r.gzhead?(z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),z(r,255&r.gzhead.time),z(r,r.gzhead.time>>8&255),z(r,r.gzhead.time>>16&255),z(r,r.gzhead.time>>24&255),z(r,r.level===9?2:2<=r.strategy||r.level<2?4:0),z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(z(r,255&r.gzhead.extra.length),z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=p(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(z(r,0),z(r,0),z(r,0),z(r,0),z(r,0),z(r,r.level===9?2:2<=r.strategy||r.level<2?4:0),z(r,3),r.status=K);else{var h=m+(r.w_bits-8<<4)<<8;h|=(2<=r.strategy||r.level<2?0:r.level<6?1:r.level===6?2:3)<<6,r.strstart!==0&&(h|=32),h+=31-h%31,r.status=K,R(r,h),r.strstart!==0&&(R(r,e.adler>>>16),R(r,65535&e.adler)),e.adler=1}if(r.status===69)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),J(e),a=r.pending,r.pending!==r.pending_buf_size));)z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(r.status===73)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),J(e),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}z(r,n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0)}while(n!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),n===0&&(r.gzindex=0,r.status=91)}else r.status=91;if(r.status===91)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),J(e),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}z(r,n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0)}while(n!==0);r.gzhead.hcrc&&r.pending>a&&(e.adler=p(e.adler,r.pending_buf,r.pending-a,a)),n===0&&(r.status=103)}else r.status=103;if(r.status===103&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&J(e),r.pending+2<=r.pending_buf_size&&(z(r,255&e.adler),z(r,e.adler>>8&255),e.adler=0,r.status=K)):r.status=K),r.pending!==0){if(J(e),e.avail_out===0)return r.last_flush=-1,_}else if(e.avail_in===0&&se(s)<=se(t)&&s!==f)return W(e,-5);if(r.status===666&&e.avail_in!==0)return W(e,-5);if(e.avail_in!==0||r.lookahead!==0||s!==u&&r.status!==666){var l=r.strategy===2?function(i,o){for(var c;;){if(i.lookahead===0&&(Z(i),i.lookahead===0)){if(o===u)return q;break}if(i.match_length=0,c=x._tr_tally(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++,c&&(N(i,!1),i.strm.avail_out===0))return q}return i.insert=0,o===f?(N(i,!0),i.strm.avail_out===0?Y:ae):i.last_lit&&(N(i,!1),i.strm.avail_out===0)?q:ee}(r,s):r.strategy===3?function(i,o){for(var c,d,b,U,C=i.window;;){if(i.lookahead<=V){if(Z(i),i.lookahead<=V&&o===u)return q;if(i.lookahead===0)break}if(i.match_length=0,i.lookahead>=B&&0<i.strstart&&(d=C[b=i.strstart-1])===C[++b]&&d===C[++b]&&d===C[++b]){U=i.strstart+V;do;while(d===C[++b]&&d===C[++b]&&d===C[++b]&&d===C[++b]&&d===C[++b]&&d===C[++b]&&d===C[++b]&&d===C[++b]&&b<U);i.match_length=V-(U-b),i.match_length>i.lookahead&&(i.match_length=i.lookahead)}if(i.match_length>=B?(c=x._tr_tally(i,1,i.match_length-B),i.lookahead-=i.match_length,i.strstart+=i.match_length,i.match_length=0):(c=x._tr_tally(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++),c&&(N(i,!1),i.strm.avail_out===0))return q}return i.insert=0,o===f?(N(i,!0),i.strm.avail_out===0?Y:ae):i.last_lit&&(N(i,!1),i.strm.avail_out===0)?q:ee}(r,s):E[r.level].func(r,s);if(l!==Y&&l!==ae||(r.status=666),l===q||l===Y)return e.avail_out===0&&(r.last_flush=-1),_;if(l===ee&&(s===1?x._tr_align(r):s!==5&&(x._tr_stored_block(r,0,0,!1),s===3&&(G(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),J(e),e.avail_out===0))return r.last_flush=-1,_}return s!==f?_:r.wrap<=0?1:(r.wrap===2?(z(r,255&e.adler),z(r,e.adler>>8&255),z(r,e.adler>>16&255),z(r,e.adler>>24&255),z(r,255&e.total_in),z(r,e.total_in>>8&255),z(r,e.total_in>>16&255),z(r,e.total_in>>24&255)):(R(r,e.adler>>>16),R(r,65535&e.adler)),J(e),0<r.wrap&&(r.wrap=-r.wrap),r.pending!==0?_:1)},v.deflateEnd=function(e){var s;return e&&e.state?(s=e.state.status)!==X&&s!==69&&s!==73&&s!==91&&s!==103&&s!==K&&s!==666?W(e,y):(e.state=null,s===K?W(e,-3):_):y},v.deflateSetDictionary=function(e,s){var t,r,a,n,h,l,i,o,c=s.length;if(!e||!e.state||(n=(t=e.state).wrap)===2||n===1&&t.status!==X||t.lookahead)return y;for(n===1&&(e.adler=g(e.adler,s,c,0)),t.wrap=0,c>=t.w_size&&(n===0&&(G(t.head),t.strstart=0,t.block_start=0,t.insert=0),o=new w.Buf8(t.w_size),w.arraySet(o,s,c-t.w_size,t.w_size,0),s=o,c=t.w_size),h=e.avail_in,l=e.next_in,i=e.input,e.avail_in=c,e.next_in=0,e.input=s,Z(t);t.lookahead>=B;){for(r=t.strstart,a=t.lookahead-(B-1);t.ins_h=(t.ins_h<<t.hash_shift^t.window[r+B-1])&t.hash_mask,t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,--a;);t.strstart=r,t.lookahead=B-1,Z(t)}return t.strstart+=t.lookahead,t.block_start=t.strstart,t.insert=t.lookahead,t.lookahead=0,t.match_length=t.prev_length=B-1,t.match_available=0,e.next_in=l,e.input=i,e.avail_in=h,t.wrap=n,_},v.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(D,H,v){"use strict";H.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(D,H,v){"use strict";var E=D("../utils/common"),w=0,x=1;function g(a){for(var n=a.length;0<=--n;)a[n]=0}var p=0,A=29,u=256,f=u+1+A,_=30,y=19,k=2*f+1,j=15,S=16,m=7,O=256,F=16,I=17,ie=18,_e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],te=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],B=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=new Array(2*(f+2));g(T);var X=new Array(2*_);g(X);var K=new Array(512);g(K);var q=new Array(256);g(q);var ee=new Array(A);g(ee);var Y,ae,W,se=new Array(_);function G(a,n,h,l,i){this.static_tree=a,this.extra_bits=n,this.extra_base=h,this.elems=l,this.max_length=i,this.has_stree=a&&a.length}function J(a,n){this.dyn_tree=a,this.max_code=0,this.stat_desc=n}function N(a){return a<256?K[a]:K[256+(a>>>7)]}function z(a,n){a.pending_buf[a.pending++]=255&n,a.pending_buf[a.pending++]=n>>>8&255}function R(a,n,h){a.bi_valid>S-h?(a.bi_buf|=n<<a.bi_valid&65535,z(a,a.bi_buf),a.bi_buf=n>>S-a.bi_valid,a.bi_valid+=h-S):(a.bi_buf|=n<<a.bi_valid&65535,a.bi_valid+=h)}function M(a,n,h){R(a,h[2*n],h[2*n+1])}function Z(a,n){for(var h=0;h|=1&a,a>>>=1,h<<=1,0<--n;);return h>>>1}function he(a,n,h){var l,i,o=new Array(j+1),c=0;for(l=1;l<=j;l++)o[l]=c=c+h[l-1]<<1;for(i=0;i<=n;i++){var d=a[2*i+1];d!==0&&(a[2*i]=Z(o[d]++,d))}}function re(a){var n;for(n=0;n<f;n++)a.dyn_ltree[2*n]=0;for(n=0;n<_;n++)a.dyn_dtree[2*n]=0;for(n=0;n<y;n++)a.bl_tree[2*n]=0;a.dyn_ltree[2*O]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function P(a){8<a.bi_valid?z(a,a.bi_buf):0<a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function pe(a,n,h,l){var i=2*n,o=2*h;return a[i]<a[o]||a[i]===a[o]&&l[n]<=l[h]}function le(a,n,h){for(var l=a.heap[h],i=h<<1;i<=a.heap_len&&(i<a.heap_len&&pe(n,a.heap[i+1],a.heap[i],a.depth)&&i++,!pe(n,l,a.heap[i],a.depth));)a.heap[h]=a.heap[i],h=i,i<<=1;a.heap[h]=l}function de(a,n,h){var l,i,o,c,d=0;if(a.last_lit!==0)for(;l=a.pending_buf[a.d_buf+2*d]<<8|a.pending_buf[a.d_buf+2*d+1],i=a.pending_buf[a.l_buf+d],d++,l===0?M(a,i,n):(M(a,(o=q[i])+u+1,n),(c=_e[o])!==0&&R(a,i-=ee[o],c),M(a,o=N(--l),h),(c=te[o])!==0&&R(a,l-=se[o],c)),d<a.last_lit;);M(a,O,n)}function oe(a,n){var h,l,i,o=n.dyn_tree,c=n.stat_desc.static_tree,d=n.stat_desc.has_stree,b=n.stat_desc.elems,U=-1;for(a.heap_len=0,a.heap_max=k,h=0;h<b;h++)o[2*h]!==0?(a.heap[++a.heap_len]=U=h,a.depth[h]=0):o[2*h+1]=0;for(;a.heap_len<2;)o[2*(i=a.heap[++a.heap_len]=U<2?++U:0)]=1,a.depth[i]=0,a.opt_len--,d&&(a.static_len-=c[2*i+1]);for(n.max_code=U,h=a.heap_len>>1;1<=h;h--)le(a,o,h);for(i=b;h=a.heap[1],a.heap[1]=a.heap[a.heap_len--],le(a,o,1),l=a.heap[1],a.heap[--a.heap_max]=h,a.heap[--a.heap_max]=l,o[2*i]=o[2*h]+o[2*l],a.depth[i]=(a.depth[h]>=a.depth[l]?a.depth[h]:a.depth[l])+1,o[2*h+1]=o[2*l+1]=i,a.heap[1]=i++,le(a,o,1),2<=a.heap_len;);a.heap[--a.heap_max]=a.heap[1],function(C,Q){var ue,$,fe,L,ge,be,ne=Q.dyn_tree,ve=Q.max_code,ye=Q.stat_desc.static_tree,ke=Q.stat_desc.has_stree,ze=Q.stat_desc.extra_bits,we=Q.stat_desc.extra_base,ce=Q.stat_desc.max_length,me=0;for(L=0;L<=j;L++)C.bl_count[L]=0;for(ne[2*C.heap[C.heap_max]+1]=0,ue=C.heap_max+1;ue<k;ue++)ce<(L=ne[2*ne[2*($=C.heap[ue])+1]+1]+1)&&(L=ce,me++),ne[2*$+1]=L,ve<$||(C.bl_count[L]++,ge=0,we<=$&&(ge=ze[$-we]),be=ne[2*$],C.opt_len+=be*(L+ge),ke&&(C.static_len+=be*(ye[2*$+1]+ge)));if(me!==0){do{for(L=ce-1;C.bl_count[L]===0;)L--;C.bl_count[L]--,C.bl_count[L+1]+=2,C.bl_count[ce]--,me-=2}while(0<me);for(L=ce;L!==0;L--)for($=C.bl_count[L];$!==0;)ve<(fe=C.heap[--ue])||(ne[2*fe+1]!==L&&(C.opt_len+=(L-ne[2*fe+1])*ne[2*fe],ne[2*fe+1]=L),$--)}}(a,n),he(o,U,a.bl_count)}function e(a,n,h){var l,i,o=-1,c=n[1],d=0,b=7,U=4;for(c===0&&(b=138,U=3),n[2*(h+1)+1]=65535,l=0;l<=h;l++)i=c,c=n[2*(l+1)+1],++d<b&&i===c||(d<U?a.bl_tree[2*i]+=d:i!==0?(i!==o&&a.bl_tree[2*i]++,a.bl_tree[2*F]++):d<=10?a.bl_tree[2*I]++:a.bl_tree[2*ie]++,o=i,(d=0)===c?(b=138,U=3):i===c?(b=6,U=3):(b=7,U=4))}function s(a,n,h){var l,i,o=-1,c=n[1],d=0,b=7,U=4;for(c===0&&(b=138,U=3),l=0;l<=h;l++)if(i=c,c=n[2*(l+1)+1],!(++d<b&&i===c)){if(d<U)for(;M(a,i,a.bl_tree),--d!=0;);else i!==0?(i!==o&&(M(a,i,a.bl_tree),d--),M(a,F,a.bl_tree),R(a,d-3,2)):d<=10?(M(a,I,a.bl_tree),R(a,d-3,3)):(M(a,ie,a.bl_tree),R(a,d-11,7));o=i,(d=0)===c?(b=138,U=3):i===c?(b=6,U=3):(b=7,U=4)}}g(se);var t=!1;function r(a,n,h,l){var i,o,c,d;R(a,(p<<1)+(l?1:0),3),o=n,c=h,d=!0,P(i=a),d&&(z(i,c),z(i,~c)),E.arraySet(i.pending_buf,i.window,o,c,i.pending),i.pending+=c}v._tr_init=function(a){t||(function(){var n,h,l,i,o,c=new Array(j+1);for(i=l=0;i<A-1;i++)for(ee[i]=l,n=0;n<1<<_e[i];n++)q[l++]=i;for(q[l-1]=i,i=o=0;i<16;i++)for(se[i]=o,n=0;n<1<<te[i];n++)K[o++]=i;for(o>>=7;i<_;i++)for(se[i]=o<<7,n=0;n<1<<te[i]-7;n++)K[256+o++]=i;for(h=0;h<=j;h++)c[h]=0;for(n=0;n<=143;)T[2*n+1]=8,n++,c[8]++;for(;n<=255;)T[2*n+1]=9,n++,c[9]++;for(;n<=279;)T[2*n+1]=7,n++,c[7]++;for(;n<=287;)T[2*n+1]=8,n++,c[8]++;for(he(T,f+1,c),n=0;n<_;n++)X[2*n+1]=5,X[2*n]=Z(n,5);Y=new G(T,_e,u+1,f,j),ae=new G(X,te,0,_,j),W=new G(new Array(0),B,0,y,m)}(),t=!0),a.l_desc=new J(a.dyn_ltree,Y),a.d_desc=new J(a.dyn_dtree,ae),a.bl_desc=new J(a.bl_tree,W),a.bi_buf=0,a.bi_valid=0,re(a)},v._tr_stored_block=r,v._tr_flush_block=function(a,n,h,l){var i,o,c=0;0<a.level?(a.strm.data_type===2&&(a.strm.data_type=function(d){var b,U=4093624447;for(b=0;b<=31;b++,U>>>=1)if(1&U&&d.dyn_ltree[2*b]!==0)return w;if(d.dyn_ltree[18]!==0||d.dyn_ltree[20]!==0||d.dyn_ltree[26]!==0)return x;for(b=32;b<u;b++)if(d.dyn_ltree[2*b]!==0)return x;return w}(a)),oe(a,a.l_desc),oe(a,a.d_desc),c=function(d){var b;for(e(d,d.dyn_ltree,d.l_desc.max_code),e(d,d.dyn_dtree,d.d_desc.max_code),oe(d,d.bl_desc),b=y-1;3<=b&&d.bl_tree[2*V[b]+1]===0;b--);return d.opt_len+=3*(b+1)+5+5+4,b}(a),i=a.opt_len+3+7>>>3,(o=a.static_len+3+7>>>3)<=i&&(i=o)):i=o=h+5,h+4<=i&&n!==-1?r(a,n,h,l):a.strategy===4||o===i?(R(a,2+(l?1:0),3),de(a,T,X)):(R(a,4+(l?1:0),3),function(d,b,U,C){var Q;for(R(d,b-257,5),R(d,U-1,5),R(d,C-4,4),Q=0;Q<C;Q++)R(d,d.bl_tree[2*V[Q]+1],3);s(d,d.dyn_ltree,b-1),s(d,d.dyn_dtree,U-1)}(a,a.l_desc.max_code+1,a.d_desc.max_code+1,c+1),de(a,a.dyn_ltree,a.dyn_dtree)),re(a),l&&P(a)},v._tr_tally=function(a,n,h){return a.pending_buf[a.d_buf+2*a.last_lit]=n>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&n,a.pending_buf[a.l_buf+a.last_lit]=255&h,a.last_lit++,n===0?a.dyn_ltree[2*h]++:(a.matches++,n--,a.dyn_ltree[2*(q[h]+u+1)]++,a.dyn_dtree[2*N(n)]++),a.last_lit===a.lit_bufsize-1},v._tr_align=function(a){var n;R(a,2,3),M(a,O,T),(n=a).bi_valid===16?(z(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):8<=n.bi_valid&&(n.pending_buf[n.pending++]=255&n.bi_buf,n.bi_buf>>=8,n.bi_valid-=8)}},{"../utils/common":1}],8:[function(D,H,v){"use strict";H.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}},{}],"/lib/deflate.js":[function(D,H,v){"use strict";var E=D("./zlib/deflate"),w=D("./utils/common"),x=D("./utils/strings"),g=D("./zlib/messages"),p=D("./zlib/zstream"),A=Object.prototype.toString,u=0,f=-1,_=0,y=8;function k(S){if(!(this instanceof k))return new k(S);this.options=w.assign({level:f,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:_,to:""},S||{});var m=this.options;m.raw&&0<m.windowBits?m.windowBits=-m.windowBits:m.gzip&&0<m.windowBits&&m.windowBits<16&&(m.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var O=E.deflateInit2(this.strm,m.level,m.method,m.windowBits,m.memLevel,m.strategy);if(O!==u)throw new Error(g[O]);if(m.header&&E.deflateSetHeader(this.strm,m.header),m.dictionary){var F;if(F=typeof m.dictionary=="string"?x.string2buf(m.dictionary):A.call(m.dictionary)==="[object ArrayBuffer]"?new Uint8Array(m.dictionary):m.dictionary,(O=E.deflateSetDictionary(this.strm,F))!==u)throw new Error(g[O]);this._dict_set=!0}}function j(S,m){var O=new k(m);if(O.push(S,!0),O.err)throw O.msg||g[O.err];return O.result}k.prototype.push=function(S,m){var O,F,I=this.strm,ie=this.options.chunkSize;if(this.ended)return!1;F=m===~~m?m:m===!0?4:0,typeof S=="string"?I.input=x.string2buf(S):A.call(S)==="[object ArrayBuffer]"?I.input=new Uint8Array(S):I.input=S,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new w.Buf8(ie),I.next_out=0,I.avail_out=ie),(O=E.deflate(I,F))!==1&&O!==u)return this.onEnd(O),!(this.ended=!0);I.avail_out!==0&&(I.avail_in!==0||F!==4&&F!==2)||(this.options.to==="string"?this.onData(x.buf2binstring(w.shrinkBuf(I.output,I.next_out))):this.onData(w.shrinkBuf(I.output,I.next_out)))}while((0<I.avail_in||I.avail_out===0)&&O!==1);return F===4?(O=E.deflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===u):F!==2||(this.onEnd(u),!(I.avail_out=0))},k.prototype.onData=function(S){this.chunks.push(S)},k.prototype.onEnd=function(S){S===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=w.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg},v.Deflate=k,v.deflate=j,v.deflateRaw=function(S,m){return(m=m||{}).raw=!0,j(S,m)},v.gzip=function(S,m){return(m=m||{}).gzip=!0,j(S,m)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")}); |
@@ -1,1 +0,26 @@ | ||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}((function(){return function e(t,i,n){function a(o,s){if(!i[o]){if(!t[o]){var f="function"==typeof require&&require;if(!s&&f)return f(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var d=i[o]={exports:{}};t[o][0].call(d.exports,(function(e){return a(t[o][1][e]||e)}),d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t,i,n=Array.prototype.slice.call(arguments,1);n.length;){var a=n.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var r in a)t=a,i=r,Object.prototype.hasOwnProperty.call(t,i)&&(e[r]=a[r])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),a);else for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,n,a,r,o;for(t=n=0,i=e.length;t<i;t++)n+=e[t].length;for(o=new Uint8Array(n),t=a=0,i=e.length;t<i;t++)r=e[t],o.set(r,a),a+=r.length;return o}},r={arraySet:function(e,t,i,n,a){for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,r))},i.setTyped(n)},{}],2:[function(e,t,i){"use strict";var n=e("./common"),a=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function f(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&a))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",o=0;o<t;o++)i+=String.fromCharCode(e[o]);return i}o[254]=o[254]=1,i.string2buf=function(e){var t,i,a,r,o,s=e.length,f=0;for(r=0;r<s;r++)55296==(64512&(i=e.charCodeAt(r)))&&r+1<s&&56320==(64512&(a=e.charCodeAt(r+1)))&&(i=65536+(i-55296<<10)+(a-56320),r++),f+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(f),r=o=0;o<f;r++)55296==(64512&(i=e.charCodeAt(r)))&&r+1<s&&56320==(64512&(a=e.charCodeAt(r+1)))&&(i=65536+(i-55296<<10)+(a-56320),r++),i<128?t[o++]=i:(i<2048?t[o++]=192|i>>>6:(i<65536?t[o++]=224|i>>>12:(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63),t[o++]=128|i>>>6&63),t[o++]=128|63&i);return t},i.buf2binstring=function(e){return f(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,a=t.length;i<a;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,a,r,s=t||e.length,l=new Array(2*s);for(i=n=0;i<s;)if((a=e[i++])<128)l[n++]=a;else if(4<(r=o[a]))l[n++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;1<r&&i<s;)a=a<<6|63&e[i++],r--;1<r?l[n++]=65533:a<65536?l[n++]=a:(a-=65536,l[n++]=55296|a>>10&1023,l[n++]=56320|1023&a)}return f(l,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0||0===i?t:i+o[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;r=r+(a=a+t[n++]|0)|0,--o;);a%=65521,r%=65521}return a|r<<16|0}},{}],4:[function(e,t,i){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,i){"use strict";var n=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,a){var r=n,o=a+i;e^=-1;for(var s=a;s<o;s++)e=e>>>8^r[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<<i.lenbits)-1,_=(1<<i.distbits)-1;e:do{b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=m[h&k];t:for(;;){if(h>>>=v=g>>>24,b-=v,0==(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<<v)-1)];continue t}if(32&v){i.mode=12;break e}e.msg="invalid literal/length code",i.mode=30;break e}p=65535&g,(v&=15)&&(b<v&&(h+=E[n++]<<b,b+=8),p+=h&(1<<v)-1,h>>>=v,b-=v),b<15&&(h+=E[n++]<<b,b+=8,h+=E[n++]<<b,b+=8),g=w[h&_];i:for(;;){if(h>>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<<v)-1)];continue i}e.msg="invalid distance code",i.mode=30;break e}if(x=65535&g,b<(v&=15)&&(h+=E[n++]<<b,(b+=8)<v&&(h+=E[n++]<<b,b+=8)),f<(x+=h&(1<<v)-1)){e.msg="invalid distance too far back",i.mode=30;break e}if(h>>>=v,b-=v,(v=r-o)<x){if(d<(v=x-v)&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(S=u,(y=0)===c){if(y+=l-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}}else if(c<v){if(y+=l+c-v,(v-=c)<p){for(p-=v;Z[r++]=u[y++],--v;);if(y=0,c<p){for(p-=v=c;Z[r++]=u[y++],--v;);y=r-x,S=Z}}}else if(y+=c-v,v<p){for(p-=v;Z[r++]=u[y++],--v;);y=r-x,S=Z}for(;2<p;)Z[r++]=S[y++],Z[r++]=S[y++],Z[r++]=S[y++],p-=3;p&&(Z[r++]=S[y++],1<p&&(Z[r++]=S[y++]))}else{for(y=r-x;Z[r++]=Z[y++],Z[r++]=Z[y++],Z[r++]=Z[y++],2<(p-=3););p&&(Z[r++]=Z[y++],1<p&&(Z[r++]=Z[y++]))}break}}break}}while(n<a&&r<s);n-=p=b>>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=r<s?s-r+257:257-(r-s),i.hold=h,i.bits=b}},{}],8:[function(e,t,i){"use strict";var n=e("../utils/common"),a=e("./adler32"),r=e("./crc32"),o=e("./inffast"),s=e("./inftrees"),f=-2;function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(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=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):f}function u(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):f}function h(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,u(e))):f}function b(e,t){var i,n;return e?(n=new d,(e.state=n).window=null,0!==(i=h(e,t))&&(e.state=null),i):f}var m,w,k=!0;function _(e){if(k){var t;for(m=new n.Buf32(512),w=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,w,0,e.work,{bits:5}),k=!1}e.lencode=m,e.lenbits=9,e.distcode=w,e.distbits=5}function g(e,t,i,a){var r,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),a>=o.wsize?(n.arraySet(o.window,t,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a<(r=o.wsize-o.wnext)&&(r=a),n.arraySet(o.window,t,i-a,r,o.wnext),(a-=r)?(n.arraySet(o.window,t,i-a,a,0),o.wnext=a,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0}i.inflateReset=u,i.inflateReset2=h,i.inflateResetKeep=c,i.inflateInit=function(e){return b(e,15)},i.inflateInit2=b,i.inflate=function(e,t){var i,d,c,u,h,b,m,w,k,v,p,x,y,S,E,Z,B,A,z,R,N,O,C,I,D=0,T=new n.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return f;12===(i=e.state).mode&&(i.mode=13),h=e.next_out,c=e.output,m=e.avail_out,u=e.next_in,d=e.input,b=e.avail_in,w=i.hold,k=i.bits,v=b,p=m,O=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;k<16;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(2&i.wrap&&35615===w){T[i.check=0]=255&w,T[1]=w>>>8&255,i.check=r(i.check,T,2,0),k=w=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",i.mode=30;break}if(k-=4,N=8+(15&(w>>>=4)),0===i.wbits)i.wbits=N;else if(N>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<N,e.adler=i.check=1,i.mode=512&w?10:12,k=w=0;break;case 2:for(;k<16;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(i.flags=w,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=w>>8&1),512&i.flags&&(T[0]=255&w,T[1]=w>>>8&255,i.check=r(i.check,T,2,0)),k=w=0,i.mode=3;case 3:for(;k<32;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.head&&(i.head.time=w),512&i.flags&&(T[0]=255&w,T[1]=w>>>8&255,T[2]=w>>>16&255,T[3]=w>>>24&255,i.check=r(i.check,T,4,0)),k=w=0,i.mode=4;case 4:for(;k<16;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.head&&(i.head.xflags=255&w,i.head.os=w>>8),512&i.flags&&(T[0]=255&w,T[1]=w>>>8&255,i.check=r(i.check,T,2,0)),k=w=0,i.mode=5;case 5:if(1024&i.flags){for(;k<16;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.length=w,i.head&&(i.head.extra_len=w),512&i.flags&&(T[0]=255&w,T[1]=w>>>8&255,i.check=r(i.check,T,2,0)),k=w=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(b<(x=i.length)&&(x=b),x&&(i.head&&(N=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,d,u,x,N)),512&i.flags&&(i.check=r(i.check,d,x,u)),b-=x,u+=x,i.length-=x),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===b)break e;for(x=0;N=d[u+x++],i.head&&N&&i.length<65536&&(i.head.name+=String.fromCharCode(N)),N&&x<b;);if(512&i.flags&&(i.check=r(i.check,d,x,u)),b-=x,u+=x,N)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===b)break e;for(x=0;N=d[u+x++],i.head&&N&&i.length<65536&&(i.head.comment+=String.fromCharCode(N)),N&&x<b;);if(512&i.flags&&(i.check=r(i.check,d,x,u)),b-=x,u+=x,N)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;k<16;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(w!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}k=w=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;k<32;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}e.adler=i.check=l(w),k=w=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=h,e.avail_out=m,e.next_in=u,e.avail_in=b,i.hold=w,i.bits=k,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){w>>>=7&k,k-=7&k,i.mode=27;break}for(;k<3;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}switch(i.last=1&w,k-=1,3&(w>>>=1)){case 0:i.mode=14;break;case 1:if(_(i),i.mode=20,6!==t)break;w>>>=2,k-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}w>>>=2,k-=2;break;case 14:for(w>>>=7&k,k-=7&k;k<32;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&w,k=w=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(x=i.length){if(b<x&&(x=b),m<x&&(x=m),0===x)break e;n.arraySet(c,d,u,x,h),b-=x,u+=x,m-=x,h+=x,i.length-=x;break}i.mode=12;break;case 17:for(;k<14;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(i.nlen=257+(31&w),w>>>=5,k-=5,i.ndist=1+(31&w),w>>>=5,k-=5,i.ncode=4+(15&w),w>>>=4,k-=4,286<i.nlen||30<i.ndist){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;k<3;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.lens[U[i.have++]]=7&w,w>>>=3,k-=3}for(;i.have<19;)i.lens[U[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,C={bits:i.lenbits},O=s(0,i.lens,0,19,i.lencode,0,i.work,C),i.lenbits=C.bits,O){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;Z=(D=i.lencode[w&(1<<i.lenbits)-1])>>>16&255,B=65535&D,!((E=D>>>24)<=k);){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(B<16)w>>>=E,k-=E,i.lens[i.have++]=B;else{if(16===B){for(I=E+2;k<I;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(w>>>=E,k-=E,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}N=i.lens[i.have-1],x=3+(3&w),w>>>=2,k-=2}else if(17===B){for(I=E+3;k<I;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}k-=E,N=0,x=3+(7&(w>>>=E)),w>>>=3,k-=3}else{for(I=E+7;k<I;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}k-=E,N=0,x=11+(127&(w>>>=E)),w>>>=7,k-=7}if(i.have+x>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;x--;)i.lens[i.have++]=N}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,C={bits:i.lenbits},O=s(1,i.lens,0,i.nlen,i.lencode,0,i.work,C),i.lenbits=C.bits,O){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,C={bits:i.distbits},O=s(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,C),i.distbits=C.bits,O){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=b&&258<=m){e.next_out=h,e.avail_out=m,e.next_in=u,e.avail_in=b,i.hold=w,i.bits=k,o(e,p),h=e.next_out,c=e.output,m=e.avail_out,u=e.next_in,d=e.input,b=e.avail_in,w=i.hold,k=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;Z=(D=i.lencode[w&(1<<i.lenbits)-1])>>>16&255,B=65535&D,!((E=D>>>24)<=k);){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(Z&&0==(240&Z)){for(A=E,z=Z,R=B;Z=(D=i.lencode[R+((w&(1<<A+z)-1)>>A)])>>>16&255,B=65535&D,!(A+(E=D>>>24)<=k);){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}w>>>=A,k-=A,i.back+=A}if(w>>>=E,k-=E,i.back+=E,i.length=B,0===Z){i.mode=26;break}if(32&Z){i.back=-1,i.mode=12;break}if(64&Z){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&Z,i.mode=22;case 22:if(i.extra){for(I=i.extra;k<I;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.length+=w&(1<<i.extra)-1,w>>>=i.extra,k-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;Z=(D=i.distcode[w&(1<<i.distbits)-1])>>>16&255,B=65535&D,!((E=D>>>24)<=k);){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(0==(240&Z)){for(A=E,z=Z,R=B;Z=(D=i.distcode[R+((w&(1<<A+z)-1)>>A)])>>>16&255,B=65535&D,!(A+(E=D>>>24)<=k);){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}w>>>=A,k-=A,i.back+=A}if(w>>>=E,k-=E,i.back+=E,64&Z){e.msg="invalid distance code",i.mode=30;break}i.offset=B,i.extra=15&Z,i.mode=24;case 24:if(i.extra){for(I=i.extra;k<I;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}i.offset+=w&(1<<i.extra)-1,w>>>=i.extra,k-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===m)break e;if(x=p-m,i.offset>x){if((x=i.offset-x)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}x>i.wnext?(x-=i.wnext,y=i.wsize-x):y=i.wnext-x,x>i.length&&(x=i.length),S=i.window}else S=c,y=h-i.offset,x=i.length;for(m<x&&(x=m),m-=x,i.length-=x;c[h++]=S[y++],--x;);0===i.length&&(i.mode=21);break;case 26:if(0===m)break e;c[h++]=i.length,m--,i.mode=21;break;case 27:if(i.wrap){for(;k<32;){if(0===b)break e;b--,w|=d[u++]<<k,k+=8}if(p-=m,e.total_out+=p,i.total+=p,p&&(e.adler=i.check=i.flags?r(i.check,c,p,h-p):a(i.check,c,p,h-p)),p=m,(i.flags?w:l(w))!==i.check){e.msg="incorrect data check",i.mode=30;break}k=w=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;k<32;){if(0===b)break e;b--,w+=d[u++]<<k,k+=8}if(w!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}k=w=0}i.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;default:return f}return e.next_out=h,e.avail_out=m,e.next_in=u,e.avail_in=b,i.hold=w,i.bits=k,(i.wsize||p!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&g(e,e.output,e.next_out,p-e.avail_out)?(i.mode=31,-4):(v-=e.avail_in,p-=e.avail_out,e.total_in+=v,e.total_out+=p,i.total+=p,i.wrap&&p&&(e.adler=i.check=i.flags?r(i.check,c,p,e.next_out-p):a(i.check,c,p,e.next_out-p)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===v&&0===p||4===t)&&0===O&&(O=-5),O)},i.inflateEnd=function(e){if(!e||!e.state)return f;var t=e.state;return t.window&&(t.window=null),e.state=null,0},i.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?f:((i.head=t).done=!1,0):f},i.inflateSetDictionary=function(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?f:11===i.mode&&a(1,t,n,0)!==i.check?-3:g(e,t,n,n)?(i.mode=31,-4):(i.havedict=1,0):f},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,i){"use strict";var n=e("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],r=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,i,f,l,d,c,u){var h,b,m,w,k,_,g,v,p,x=u.bits,y=0,S=0,E=0,Z=0,B=0,A=0,z=0,R=0,N=0,O=0,C=null,I=0,D=new n.Buf16(16),T=new n.Buf16(16),U=null,F=0;for(y=0;y<=15;y++)D[y]=0;for(S=0;S<f;S++)D[t[i+S]]++;for(B=x,Z=15;1<=Z&&0===D[Z];Z--);if(Z<B&&(B=Z),0===Z)return l[d++]=20971520,l[d++]=20971520,u.bits=1,0;for(E=1;E<Z&&0===D[E];E++);for(B<E&&(B=E),y=R=1;y<=15;y++)if(R<<=1,(R-=D[y])<0)return-1;if(0<R&&(0===e||1!==Z))return-1;for(T[1]=0,y=1;y<15;y++)T[y+1]=T[y]+D[y];for(S=0;S<f;S++)0!==t[i+S]&&(c[T[t[i+S]]++]=S);if(0===e?(C=U=c,_=19):1===e?(C=a,I-=257,U=r,F-=257,_=256):(C=o,U=s,_=-1),y=E,k=d,z=S=O=0,m=-1,w=(N=1<<(A=B))-1,1===e&&852<N||2===e&&592<N)return 1;for(;;){for(g=y-z,c[S]<_?(v=0,p=c[S]):c[S]>_?(v=U[F+c[S]],p=C[I+c[S]]):(v=96,p=0),h=1<<y-z,E=b=1<<A;l[k+(O>>z)+(b-=h)]=g<<24|v<<16|p|0,0!==b;);for(h=1<<y-1;O&h;)h>>=1;if(0!==h?(O&=h-1,O+=h):O=0,S++,0==--D[y]){if(y===Z)break;y=t[i+c[S]]}if(B<y&&(O&w)!==m){for(0===z&&(z=B),k+=E,R=1<<(A=y-z);A+z<Z&&!((R-=D[A+z])<=0);)A++,R<<=1;if(N+=1<<A,1===e&&852<N||2===e&&592<N)return 1;l[m=O&w]=B<<24|A<<16|k-d|0}}return 0!==O&&(l[k+O]=y-z<<24|64<<16|0),u.bits=B,0}},{"../utils/common":1}],10:[function(e,t,i){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,i){"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}},{}],"/lib/inflate.js":[function(e,t,i){"use strict";var n=e("./zlib/inflate"),a=e("./utils/common"),r=e("./utils/strings"),o=e("./zlib/constants"),s=e("./zlib/messages"),f=e("./zlib/zstream"),l=e("./zlib/gzheader"),d=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==o.Z_OK)throw new Error(s[i]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===d.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(s[i])}function u(e,t){var i=new c(t);if(i.push(e,!0),i.err)throw i.msg||s[i.err];return i.result}c.prototype.push=function(e,t){var i,s,f,l,c,u=this.strm,h=this.options.chunkSize,b=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?u.input=r.binstring2buf(e):"[object ArrayBuffer]"===d.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new a.Buf8(h),u.next_out=0,u.avail_out=h),(i=n.inflate(u,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&b&&(i=n.inflateSetDictionary(this.strm,b)),i===o.Z_BUF_ERROR&&!0===m&&(i=o.Z_OK,m=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),!(this.ended=!0);u.next_out&&(0!==u.avail_out&&i!==o.Z_STREAM_END&&(0!==u.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(f=r.utf8border(u.output,u.next_out),l=u.next_out-f,c=r.buf2string(u.output,f),u.next_out=l,u.avail_out=h-l,l&&a.arraySet(u.output,u.output,f,l,0),this.onData(c)):this.onData(a.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(m=!0)}while((0<u.avail_in||0===u.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(u.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=c,i.inflate=u,i.inflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},i.ungzip=u},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})); | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
(function(A){typeof exports=="object"&&typeof module<"u"?module.exports=A():typeof define=="function"&&define.amd?define([],A):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).pako=A()})(function(){return function A(O,p,w){function Z(u,h){if(!p[u]){if(!O[u]){var b=typeof require=="function"&&require;if(!h&&b)return b(u,!0);if(k)return k(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var r=p[u]={exports:{}};O[u][0].call(r.exports,function(y){return Z(O[u][1][y]||y)},r,r.exports,A,O,p,w)}return p[u].exports}for(var k=typeof require=="function"&&require,s=0;s<w.length;s++)Z(w[s]);return Z}({1:[function(A,O,p){"use strict";var w=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";p.assign=function(s){for(var u,h,b=Array.prototype.slice.call(arguments,1);b.length;){var l=b.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var r in l)u=l,h=r,Object.prototype.hasOwnProperty.call(u,h)&&(s[r]=l[r])}}return s},p.shrinkBuf=function(s,u){return s.length===u?s:s.subarray?s.subarray(0,u):(s.length=u,s)};var Z={arraySet:function(s,u,h,b,l){if(u.subarray&&s.subarray)s.set(u.subarray(h,h+b),l);else for(var r=0;r<b;r++)s[l+r]=u[h+r]},flattenChunks:function(s){var u,h,b,l,r,y;for(u=b=0,h=s.length;u<h;u++)b+=s[u].length;for(y=new Uint8Array(b),u=l=0,h=s.length;u<h;u++)r=s[u],y.set(r,l),l+=r.length;return y}},k={arraySet:function(s,u,h,b,l){for(var r=0;r<b;r++)s[l+r]=u[h+r]},flattenChunks:function(s){return[].concat.apply([],s)}};p.setTyped=function(s){s?(p.Buf8=Uint8Array,p.Buf16=Uint16Array,p.Buf32=Int32Array,p.assign(p,Z)):(p.Buf8=Array,p.Buf16=Array,p.Buf32=Array,p.assign(p,k))},p.setTyped(w)},{}],2:[function(A,O,p){"use strict";var w=A("./common"),Z=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch{Z=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{k=!1}for(var s=new w.Buf8(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function h(b,l){if(l<65534&&(b.subarray&&k||!b.subarray&&Z))return String.fromCharCode.apply(null,w.shrinkBuf(b,l));for(var r="",y=0;y<l;y++)r+=String.fromCharCode(b[y]);return r}s[254]=s[254]=1,p.string2buf=function(b){var l,r,y,_,d,x=b.length,v=0;for(_=0;_<x;_++)(64512&(r=b.charCodeAt(_)))==55296&&_+1<x&&(64512&(y=b.charCodeAt(_+1)))==56320&&(r=65536+(r-55296<<10)+(y-56320),_++),v+=r<128?1:r<2048?2:r<65536?3:4;for(l=new w.Buf8(v),_=d=0;d<v;_++)(64512&(r=b.charCodeAt(_)))==55296&&_+1<x&&(64512&(y=b.charCodeAt(_+1)))==56320&&(r=65536+(r-55296<<10)+(y-56320),_++),r<128?l[d++]=r:(r<2048?l[d++]=192|r>>>6:(r<65536?l[d++]=224|r>>>12:(l[d++]=240|r>>>18,l[d++]=128|r>>>12&63),l[d++]=128|r>>>6&63),l[d++]=128|63&r);return l},p.buf2binstring=function(b){return h(b,b.length)},p.binstring2buf=function(b){for(var l=new w.Buf8(b.length),r=0,y=l.length;r<y;r++)l[r]=b.charCodeAt(r);return l},p.buf2string=function(b,l){var r,y,_,d,x=l||b.length,v=new Array(2*x);for(r=y=0;r<x;)if((_=b[r++])<128)v[y++]=_;else if(4<(d=s[_]))v[y++]=65533,r+=d-1;else{for(_&=d===2?31:d===3?15:7;1<d&&r<x;)_=_<<6|63&b[r++],d--;1<d?v[y++]=65533:_<65536?v[y++]=_:(_-=65536,v[y++]=55296|_>>10&1023,v[y++]=56320|1023&_)}return h(v,y)},p.utf8border=function(b,l){var r;for((l=l||b.length)>b.length&&(l=b.length),r=l-1;0<=r&&(192&b[r])==128;)r--;return r<0||r===0?l:r+s[b[r]]>l?r:l}},{"./common":1}],3:[function(A,O,p){"use strict";O.exports=function(w,Z,k,s){for(var u=65535&w|0,h=w>>>16&65535|0,b=0;k!==0;){for(k-=b=2e3<k?2e3:k;h=h+(u=u+Z[s++]|0)|0,--b;);u%=65521,h%=65521}return u|h<<16|0}},{}],4:[function(A,O,p){"use strict";O.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(A,O,p){"use strict";var w=function(){for(var Z,k=[],s=0;s<256;s++){Z=s;for(var u=0;u<8;u++)Z=1&Z?3988292384^Z>>>1:Z>>>1;k[s]=Z}return k}();O.exports=function(Z,k,s,u){var h=w,b=u+s;Z^=-1;for(var l=u;l<b;l++)Z=Z>>>8^h[255&(Z^k[l])];return-1^Z}},{}],6:[function(A,O,p){"use strict";O.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(A,O,p){"use strict";O.exports=function(w,Z){var k,s,u,h,b,l,r,y,_,d,x,v,E,F,M,S,L,I,g,R,P,e,a,t,o;k=w.state,s=w.next_in,t=w.input,u=s+(w.avail_in-5),h=w.next_out,o=w.output,b=h-(Z-w.avail_out),l=h+(w.avail_out-257),r=k.dmax,y=k.wsize,_=k.whave,d=k.wnext,x=k.window,v=k.hold,E=k.bits,F=k.lencode,M=k.distcode,S=(1<<k.lenbits)-1,L=(1<<k.distbits)-1;t:do{E<15&&(v+=t[s++]<<E,E+=8,v+=t[s++]<<E,E+=8),I=F[v&S];e:for(;;){if(v>>>=g=I>>>24,E-=g,(g=I>>>16&255)===0)o[h++]=65535&I;else{if(!(16&g)){if((64&g)==0){I=F[(65535&I)+(v&(1<<g)-1)];continue e}if(32&g){k.mode=12;break t}w.msg="invalid literal/length code",k.mode=30;break t}R=65535&I,(g&=15)&&(E<g&&(v+=t[s++]<<E,E+=8),R+=v&(1<<g)-1,v>>>=g,E-=g),E<15&&(v+=t[s++]<<E,E+=8,v+=t[s++]<<E,E+=8),I=M[v&L];i:for(;;){if(v>>>=g=I>>>24,E-=g,!(16&(g=I>>>16&255))){if((64&g)==0){I=M[(65535&I)+(v&(1<<g)-1)];continue i}w.msg="invalid distance code",k.mode=30;break t}if(P=65535&I,E<(g&=15)&&(v+=t[s++]<<E,(E+=8)<g&&(v+=t[s++]<<E,E+=8)),r<(P+=v&(1<<g)-1)){w.msg="invalid distance too far back",k.mode=30;break t}if(v>>>=g,E-=g,(g=h-b)<P){if(_<(g=P-g)&&k.sane){w.msg="invalid distance too far back",k.mode=30;break t}if(a=x,(e=0)===d){if(e+=y-g,g<R){for(R-=g;o[h++]=x[e++],--g;);e=h-P,a=o}}else if(d<g){if(e+=y+d-g,(g-=d)<R){for(R-=g;o[h++]=x[e++],--g;);if(e=0,d<R){for(R-=g=d;o[h++]=x[e++],--g;);e=h-P,a=o}}}else if(e+=d-g,g<R){for(R-=g;o[h++]=x[e++],--g;);e=h-P,a=o}for(;2<R;)o[h++]=a[e++],o[h++]=a[e++],o[h++]=a[e++],R-=3;R&&(o[h++]=a[e++],1<R&&(o[h++]=a[e++]))}else{for(e=h-P;o[h++]=o[e++],o[h++]=o[e++],o[h++]=o[e++],2<(R-=3););R&&(o[h++]=o[e++],1<R&&(o[h++]=o[e++]))}break}}break}}while(s<u&&h<l);s-=R=E>>3,v&=(1<<(E-=R<<3))-1,w.next_in=s,w.next_out=h,w.avail_in=s<u?u-s+5:5-(s-u),w.avail_out=h<l?l-h+257:257-(h-l),k.hold=v,k.bits=E}},{}],8:[function(A,O,p){"use strict";var w=A("../utils/common"),Z=A("./adler32"),k=A("./crc32"),s=A("./inffast"),u=A("./inftrees"),h=1,b=2,l=0,r=-2,y=1,_=852,d=592;function x(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function v(){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 w.Buf16(320),this.work=new w.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(e){var a;return e&&e.state?(a=e.state,e.total_in=e.total_out=a.total=0,e.msg="",a.wrap&&(e.adler=1&a.wrap),a.mode=y,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=a.lendyn=new w.Buf32(_),a.distcode=a.distdyn=new w.Buf32(d),a.sane=1,a.back=-1,l):r}function F(e){var a;return e&&e.state?((a=e.state).wsize=0,a.whave=0,a.wnext=0,E(e)):r}function M(e,a){var t,o;return e&&e.state?(o=e.state,a<0?(t=0,a=-a):(t=1+(a>>4),a<48&&(a&=15)),a&&(a<8||15<a)?r:(o.window!==null&&o.wbits!==a&&(o.window=null),o.wrap=t,o.wbits=a,F(e))):r}function S(e,a){var t,o;return e?(o=new v,(e.state=o).window=null,(t=M(e,a))!==l&&(e.state=null),t):r}var L,I,g=!0;function R(e){if(g){var a;for(L=new w.Buf32(512),I=new w.Buf32(32),a=0;a<144;)e.lens[a++]=8;for(;a<256;)e.lens[a++]=9;for(;a<280;)e.lens[a++]=7;for(;a<288;)e.lens[a++]=8;for(u(h,e.lens,0,288,L,0,e.work,{bits:9}),a=0;a<32;)e.lens[a++]=5;u(b,e.lens,0,32,I,0,e.work,{bits:5}),g=!1}e.lencode=L,e.lenbits=9,e.distcode=I,e.distbits=5}function P(e,a,t,o){var z,f=e.state;return f.window===null&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new w.Buf8(f.wsize)),o>=f.wsize?(w.arraySet(f.window,a,t-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(o<(z=f.wsize-f.wnext)&&(z=o),w.arraySet(f.window,a,t-o,z,f.wnext),(o-=z)?(w.arraySet(f.window,a,t-o,o,0),f.wnext=o,f.whave=f.wsize):(f.wnext+=z,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=z))),0}p.inflateReset=F,p.inflateReset2=M,p.inflateResetKeep=E,p.inflateInit=function(e){return S(e,15)},p.inflateInit2=S,p.inflate=function(e,a){var t,o,z,f,D,c,N,i,n,J,B,m,X,Q,C,H,Y,K,V,$,T,q,W,G,j=0,U=new w.Buf8(4),tt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return r;(t=e.state).mode===12&&(t.mode=13),D=e.next_out,z=e.output,N=e.avail_out,f=e.next_in,o=e.input,c=e.avail_in,i=t.hold,n=t.bits,J=c,B=N,q=l;t:for(;;)switch(t.mode){case y:if(t.wrap===0){t.mode=13;break}for(;n<16;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(2&t.wrap&&i===35615){U[t.check=0]=255&i,U[1]=i>>>8&255,t.check=k(t.check,U,2,0),n=i=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&i)<<8)+(i>>8))%31){e.msg="incorrect header check",t.mode=30;break}if((15&i)!=8){e.msg="unknown compression method",t.mode=30;break}if(n-=4,T=8+(15&(i>>>=4)),t.wbits===0)t.wbits=T;else if(T>t.wbits){e.msg="invalid window size",t.mode=30;break}t.dmax=1<<T,e.adler=t.check=1,t.mode=512&i?10:12,n=i=0;break;case 2:for(;n<16;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(t.flags=i,(255&t.flags)!=8){e.msg="unknown compression method",t.mode=30;break}if(57344&t.flags){e.msg="unknown header flags set",t.mode=30;break}t.head&&(t.head.text=i>>8&1),512&t.flags&&(U[0]=255&i,U[1]=i>>>8&255,t.check=k(t.check,U,2,0)),n=i=0,t.mode=3;case 3:for(;n<32;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.head&&(t.head.time=i),512&t.flags&&(U[0]=255&i,U[1]=i>>>8&255,U[2]=i>>>16&255,U[3]=i>>>24&255,t.check=k(t.check,U,4,0)),n=i=0,t.mode=4;case 4:for(;n<16;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.head&&(t.head.xflags=255&i,t.head.os=i>>8),512&t.flags&&(U[0]=255&i,U[1]=i>>>8&255,t.check=k(t.check,U,2,0)),n=i=0,t.mode=5;case 5:if(1024&t.flags){for(;n<16;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.length=i,t.head&&(t.head.extra_len=i),512&t.flags&&(U[0]=255&i,U[1]=i>>>8&255,t.check=k(t.check,U,2,0)),n=i=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(c<(m=t.length)&&(m=c),m&&(t.head&&(T=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),w.arraySet(t.head.extra,o,f,m,T)),512&t.flags&&(t.check=k(t.check,o,m,f)),c-=m,f+=m,t.length-=m),t.length))break t;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(c===0)break t;for(m=0;T=o[f+m++],t.head&&T&&t.length<65536&&(t.head.name+=String.fromCharCode(T)),T&&m<c;);if(512&t.flags&&(t.check=k(t.check,o,m,f)),c-=m,f+=m,T)break t}else t.head&&(t.head.name=null);t.length=0,t.mode=8;case 8:if(4096&t.flags){if(c===0)break t;for(m=0;T=o[f+m++],t.head&&T&&t.length<65536&&(t.head.comment+=String.fromCharCode(T)),T&&m<c;);if(512&t.flags&&(t.check=k(t.check,o,m,f)),c-=m,f+=m,T)break t}else t.head&&(t.head.comment=null);t.mode=9;case 9:if(512&t.flags){for(;n<16;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(i!==(65535&t.check)){e.msg="header crc mismatch",t.mode=30;break}n=i=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=12;break;case 10:for(;n<32;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}e.adler=t.check=x(i),n=i=0,t.mode=11;case 11:if(t.havedict===0)return e.next_out=D,e.avail_out=N,e.next_in=f,e.avail_in=c,t.hold=i,t.bits=n,2;e.adler=t.check=1,t.mode=12;case 12:if(a===5||a===6)break t;case 13:if(t.last){i>>>=7&n,n-=7&n,t.mode=27;break}for(;n<3;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}switch(t.last=1&i,n-=1,3&(i>>>=1)){case 0:t.mode=14;break;case 1:if(R(t),t.mode=20,a!==6)break;i>>>=2,n-=2;break t;case 2:t.mode=17;break;case 3:e.msg="invalid block type",t.mode=30}i>>>=2,n-=2;break;case 14:for(i>>>=7&n,n-=7&n;n<32;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if((65535&i)!=(i>>>16^65535)){e.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&i,n=i=0,t.mode=15,a===6)break t;case 15:t.mode=16;case 16:if(m=t.length){if(c<m&&(m=c),N<m&&(m=N),m===0)break t;w.arraySet(z,o,f,m,D),c-=m,f+=m,N-=m,D+=m,t.length-=m;break}t.mode=12;break;case 17:for(;n<14;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(t.nlen=257+(31&i),i>>>=5,n-=5,t.ndist=1+(31&i),i>>>=5,n-=5,t.ncode=4+(15&i),i>>>=4,n-=4,286<t.nlen||30<t.ndist){e.msg="too many length or distance symbols",t.mode=30;break}t.have=0,t.mode=18;case 18:for(;t.have<t.ncode;){for(;n<3;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.lens[tt[t.have++]]=7&i,i>>>=3,n-=3}for(;t.have<19;)t.lens[tt[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,W={bits:t.lenbits},q=u(0,t.lens,0,19,t.lencode,0,t.work,W),t.lenbits=W.bits,q){e.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have<t.nlen+t.ndist;){for(;H=(j=t.lencode[i&(1<<t.lenbits)-1])>>>16&255,Y=65535&j,!((C=j>>>24)<=n);){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(Y<16)i>>>=C,n-=C,t.lens[t.have++]=Y;else{if(Y===16){for(G=C+2;n<G;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(i>>>=C,n-=C,t.have===0){e.msg="invalid bit length repeat",t.mode=30;break}T=t.lens[t.have-1],m=3+(3&i),i>>>=2,n-=2}else if(Y===17){for(G=C+3;n<G;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}n-=C,T=0,m=3+(7&(i>>>=C)),i>>>=3,n-=3}else{for(G=C+7;n<G;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}n-=C,T=0,m=11+(127&(i>>>=C)),i>>>=7,n-=7}if(t.have+m>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=30;break}for(;m--;)t.lens[t.have++]=T}}if(t.mode===30)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,W={bits:t.lenbits},q=u(h,t.lens,0,t.nlen,t.lencode,0,t.work,W),t.lenbits=W.bits,q){e.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,W={bits:t.distbits},q=u(b,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,W),t.distbits=W.bits,q){e.msg="invalid distances set",t.mode=30;break}if(t.mode=20,a===6)break t;case 20:t.mode=21;case 21:if(6<=c&&258<=N){e.next_out=D,e.avail_out=N,e.next_in=f,e.avail_in=c,t.hold=i,t.bits=n,s(e,B),D=e.next_out,z=e.output,N=e.avail_out,f=e.next_in,o=e.input,c=e.avail_in,i=t.hold,n=t.bits,t.mode===12&&(t.back=-1);break}for(t.back=0;H=(j=t.lencode[i&(1<<t.lenbits)-1])>>>16&255,Y=65535&j,!((C=j>>>24)<=n);){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(H&&(240&H)==0){for(K=C,V=H,$=Y;H=(j=t.lencode[$+((i&(1<<K+V)-1)>>K)])>>>16&255,Y=65535&j,!(K+(C=j>>>24)<=n);){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}i>>>=K,n-=K,t.back+=K}if(i>>>=C,n-=C,t.back+=C,t.length=Y,H===0){t.mode=26;break}if(32&H){t.back=-1,t.mode=12;break}if(64&H){e.msg="invalid literal/length code",t.mode=30;break}t.extra=15&H,t.mode=22;case 22:if(t.extra){for(G=t.extra;n<G;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.length+=i&(1<<t.extra)-1,i>>>=t.extra,n-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;H=(j=t.distcode[i&(1<<t.distbits)-1])>>>16&255,Y=65535&j,!((C=j>>>24)<=n);){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if((240&H)==0){for(K=C,V=H,$=Y;H=(j=t.distcode[$+((i&(1<<K+V)-1)>>K)])>>>16&255,Y=65535&j,!(K+(C=j>>>24)<=n);){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}i>>>=K,n-=K,t.back+=K}if(i>>>=C,n-=C,t.back+=C,64&H){e.msg="invalid distance code",t.mode=30;break}t.offset=Y,t.extra=15&H,t.mode=24;case 24:if(t.extra){for(G=t.extra;n<G;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}t.offset+=i&(1<<t.extra)-1,i>>>=t.extra,n-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(N===0)break t;if(m=B-N,t.offset>m){if((m=t.offset-m)>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=30;break}m>t.wnext?(m-=t.wnext,X=t.wsize-m):X=t.wnext-m,m>t.length&&(m=t.length),Q=t.window}else Q=z,X=D-t.offset,m=t.length;for(N<m&&(m=N),N-=m,t.length-=m;z[D++]=Q[X++],--m;);t.length===0&&(t.mode=21);break;case 26:if(N===0)break t;z[D++]=t.length,N--,t.mode=21;break;case 27:if(t.wrap){for(;n<32;){if(c===0)break t;c--,i|=o[f++]<<n,n+=8}if(B-=N,e.total_out+=B,t.total+=B,B&&(e.adler=t.check=t.flags?k(t.check,z,B,D-B):Z(t.check,z,B,D-B)),B=N,(t.flags?i:x(i))!==t.check){e.msg="incorrect data check",t.mode=30;break}n=i=0}t.mode=28;case 28:if(t.wrap&&t.flags){for(;n<32;){if(c===0)break t;c--,i+=o[f++]<<n,n+=8}if(i!==(4294967295&t.total)){e.msg="incorrect length check",t.mode=30;break}n=i=0}t.mode=29;case 29:q=1;break t;case 30:q=-3;break t;case 31:return-4;case 32:default:return r}return e.next_out=D,e.avail_out=N,e.next_in=f,e.avail_in=c,t.hold=i,t.bits=n,(t.wsize||B!==e.avail_out&&t.mode<30&&(t.mode<27||a!==4))&&P(e,e.output,e.next_out,B-e.avail_out)?(t.mode=31,-4):(J-=e.avail_in,B-=e.avail_out,e.total_in+=J,e.total_out+=B,t.total+=B,t.wrap&&B&&(e.adler=t.check=t.flags?k(t.check,z,B,e.next_out-B):Z(t.check,z,B,e.next_out-B)),e.data_type=t.bits+(t.last?64:0)+(t.mode===12?128:0)+(t.mode===20||t.mode===15?256:0),(J===0&&B===0||a===4)&&q===l&&(q=-5),q)},p.inflateEnd=function(e){if(!e||!e.state)return r;var a=e.state;return a.window&&(a.window=null),e.state=null,l},p.inflateGetHeader=function(e,a){var t;return e&&e.state?(2&(t=e.state).wrap)==0?r:((t.head=a).done=!1,l):r},p.inflateSetDictionary=function(e,a){var t,o=a.length;return e&&e.state?(t=e.state).wrap!==0&&t.mode!==11?r:t.mode===11&&Z(1,a,o,0)!==t.check?-3:P(e,a,o,o)?(t.mode=31,-4):(t.havedict=1,l):r},p.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(A,O,p){"use strict";var w=A("../utils/common"),Z=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];O.exports=function(h,b,l,r,y,_,d,x){var v,E,F,M,S,L,I,g,R,P=x.bits,e=0,a=0,t=0,o=0,z=0,f=0,D=0,c=0,N=0,i=0,n=null,J=0,B=new w.Buf16(16),m=new w.Buf16(16),X=null,Q=0;for(e=0;e<=15;e++)B[e]=0;for(a=0;a<r;a++)B[b[l+a]]++;for(z=P,o=15;1<=o&&B[o]===0;o--);if(o<z&&(z=o),o===0)return y[_++]=20971520,y[_++]=20971520,x.bits=1,0;for(t=1;t<o&&B[t]===0;t++);for(z<t&&(z=t),e=c=1;e<=15;e++)if(c<<=1,(c-=B[e])<0)return-1;if(0<c&&(h===0||o!==1))return-1;for(m[1]=0,e=1;e<15;e++)m[e+1]=m[e]+B[e];for(a=0;a<r;a++)b[l+a]!==0&&(d[m[b[l+a]]++]=a);if(h===0?(n=X=d,L=19):h===1?(n=Z,J-=257,X=k,Q-=257,L=256):(n=s,X=u,L=-1),e=t,S=_,D=a=i=0,F=-1,M=(N=1<<(f=z))-1,h===1&&852<N||h===2&&592<N)return 1;for(;;){for(I=e-D,d[a]<L?(g=0,R=d[a]):d[a]>L?(g=X[Q+d[a]],R=n[J+d[a]]):(g=96,R=0),v=1<<e-D,t=E=1<<f;y[S+(i>>D)+(E-=v)]=I<<24|g<<16|R|0,E!==0;);for(v=1<<e-1;i&v;)v>>=1;if(v!==0?(i&=v-1,i+=v):i=0,a++,--B[e]==0){if(e===o)break;e=b[l+d[a]]}if(z<e&&(i&M)!==F){for(D===0&&(D=z),S+=t,c=1<<(f=e-D);f+D<o&&!((c-=B[f+D])<=0);)f++,c<<=1;if(N+=1<<f,h===1&&852<N||h===2&&592<N)return 1;y[F=i&M]=z<<24|f<<16|S-_|0}}return i!==0&&(y[S+i]=e-D<<24|64<<16|0),x.bits=z,0}},{"../utils/common":1}],10:[function(A,O,p){"use strict";O.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(A,O,p){"use strict";O.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}},{}],"/lib/inflate.js":[function(A,O,p){"use strict";var w=A("./zlib/inflate"),Z=A("./utils/common"),k=A("./utils/strings"),s=A("./zlib/constants"),u=A("./zlib/messages"),h=A("./zlib/zstream"),b=A("./zlib/gzheader"),l=Object.prototype.toString;function r(_){if(!(this instanceof r))return new r(_);this.options=Z.assign({chunkSize:16384,windowBits:0,to:""},_||{});var d=this.options;d.raw&&0<=d.windowBits&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),!(0<=d.windowBits&&d.windowBits<16)||_&&_.windowBits||(d.windowBits+=32),15<d.windowBits&&d.windowBits<48&&(15&d.windowBits)==0&&(d.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var x=w.inflateInit2(this.strm,d.windowBits);if(x!==s.Z_OK)throw new Error(u[x]);if(this.header=new b,w.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=k.string2buf(d.dictionary):l.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(x=w.inflateSetDictionary(this.strm,d.dictionary))!==s.Z_OK))throw new Error(u[x])}function y(_,d){var x=new r(d);if(x.push(_,!0),x.err)throw x.msg||u[x.err];return x.result}r.prototype.push=function(_,d){var x,v,E,F,M,S=this.strm,L=this.options.chunkSize,I=this.options.dictionary,g=!1;if(this.ended)return!1;v=d===~~d?d:d===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof _=="string"?S.input=k.binstring2buf(_):l.call(_)==="[object ArrayBuffer]"?S.input=new Uint8Array(_):S.input=_,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new Z.Buf8(L),S.next_out=0,S.avail_out=L),(x=w.inflate(S,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&I&&(x=w.inflateSetDictionary(this.strm,I)),x===s.Z_BUF_ERROR&&g===!0&&(x=s.Z_OK,g=!1),x!==s.Z_STREAM_END&&x!==s.Z_OK)return this.onEnd(x),!(this.ended=!0);S.next_out&&(S.avail_out!==0&&x!==s.Z_STREAM_END&&(S.avail_in!==0||v!==s.Z_FINISH&&v!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=k.utf8border(S.output,S.next_out),F=S.next_out-E,M=k.buf2string(S.output,E),S.next_out=F,S.avail_out=L-F,F&&Z.arraySet(S.output,S.output,E,F,0),this.onData(M)):this.onData(Z.shrinkBuf(S.output,S.next_out)))),S.avail_in===0&&S.avail_out===0&&(g=!0)}while((0<S.avail_in||S.avail_out===0)&&x!==s.Z_STREAM_END);return x===s.Z_STREAM_END&&(v=s.Z_FINISH),v===s.Z_FINISH?(x=w.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===s.Z_OK):v!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(S.avail_out=0))},r.prototype.onData=function(_){this.chunks.push(_)},r.prototype.onEnd=function(_){_===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Z.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},p.Inflate=r,p.inflate=y,p.inflateRaw=function(_,d){return(d=d||{}).raw=!0,y(_,d)},p.ungzip=y},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")}); |
@@ -1,1 +0,26 @@ | ||
!function(){"use strict";const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;s<r;s++)n=n>>>8^t[255&(n^e[s])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const s=t[t.length-1],r=n.getPartial(s);return 32===r?t.concat(e):n._shiftRight(e,r,0|s,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const s=t[e-1];return 32*(e-1)+n.getPartial(s)},clamp(t,e){if(32*t.length<e)return t;const s=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,s>0&&e&&(t[s-1]=n.partial(e,t[s-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,s,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(s),s=0;if(0===e)return r.concat(t);for(let n=0;n<t.length;n++)r.push(s|t[n]>>>e),s=t[n]<<32-e;const a=t.length?t[t.length-1]:0,i=n.getPartial(a);return r.push(n.partial(e+i&31,e+i>32?s:r.pop(),1)),r}},s={bytes:{fromBits(t){const e=n.bitLength(t)/8,s=new Uint8Array(e);let r;for(let n=0;n<e;n++)0==(3&n)&&(r=t[n/4]),s[n]=r>>>24,r<<=8;return s},toBits(t){const e=[];let s,r=0;for(s=0;s<t.length;s++)r=r<<8|t[s],3==(3&s)&&(e.push(r),r=0);return 3&s&&e.push(n.partial(8*(3&s),r)),e}}},r={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};r.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=s.utf8String.toBits(t));const r=e._buffer=n.concat(e._buffer,t),a=e._length,i=e._length=a+n.bitLength(t);if(i>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const c=new Uint32Array(r);let o=0;for(let t=e.blockSize+a-(e.blockSize+a&e.blockSize-1);t<=i;t+=e.blockSize)e._block(c.subarray(16*o,16*(o+1))),o+=1;return r.splice(0,16*o),e},finalize:function(){const t=this;let e=t._buffer;const s=t._h;e=n.concat(e,[n.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,s){return t<=19?e&n|~e&s:t<=39?e^n^s:t<=59?e&n|e&s|n&s:t<=79?e^n^s:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){const e=this,n=e._h,s=Array(80);for(let e=0;e<16;e++)s[e]=t[e];let r=n[0],a=n[1],i=n[2],c=n[3],o=n[4];for(let t=0;t<=79;t++){t>=16&&(s[t]=e._S(1,s[t-3]^s[t-8]^s[t-14]^s[t-16]));const n=e._S(5,r)+e._f(t,a,i,c)+o+s[t]+e._key[Math.floor(t/20)]|0;o=c,c=i,i=e._S(30,a),a=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+c|0,n[4]=n[4]+o|0}};const a=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,i,c,o=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(e._key=[i=t.slice(0),c=[]],a=r;a<4*r+28;a++){let t=i[a-1];(a%r==0||8===r&&a%r==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),i[a]=i[a-r]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];c[t]=a<=4||t<4?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let i,c,o,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let h=i=0;!n[h];h^=c||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[o=r[c=r[h]]];let p=16843009*l^65537*o^257*c^16843008*h,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][h]=u=u<<24^u>>>8,e[n][a]=p=p<<24^p>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],i=a[0],c=a[1],o=a[2],l=a[3],h=a[4];let p,u,d,f=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],w=t[e?1:3]^n[3],_=4;for(let t=0;t<s;t++)p=i[f>>>24]^c[g>>16&255]^o[y>>8&255]^l[255&w]^n[_],u=i[g>>>24]^c[y>>16&255]^o[w>>8&255]^l[255&f]^n[_+1],d=i[y>>>24]^c[w>>16&255]^o[f>>8&255]^l[255&g]^n[_+2],w=i[w>>>24]^c[f>>16&255]^o[g>>8&255]^l[255&y]^n[_+3],_+=4,f=p,g=u,y=d;for(let t=0;t<4;t++)r[e?3&-t:t]=h[f>>>24]<<24^h[g>>16&255]<<16^h[y>>8&255]<<8^h[255&w]^n[_++],p=f,f=g,g=y,y=w,w=p;return r}},i=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,s){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;n<r;n+=4){this.incCounter(s);const r=t.encrypt(s);e[n]^=r[0],e[n+1]^=r[1],e[n+2]^=r[2],e[n+3]^=r[3]}return n.clamp(e,a)}},c=class{constructor(t){const e=this,n=e._hash=r.sha1,s=[[],[]],a=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>a&&(t=n.hash(t));for(let e=0;e<a;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}},o="Invalid pasword",l=16,h={name:"PBKDF2"},p=Object.assign({hash:{name:"HMAC"}},h),u=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},h),d=["deriveBits"],f=[8,12,16],g=[16,24,32],y=10,w=[0,0,0,0],_=s.bytes,b=a,m=i,k=c;class A{constructor(t,e,n){Object.assign(this,{password:t,signed:e,strength:n-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const n=S(t,0,f[e.strength]+2);await async function(t,e,n){await v(t,n,S(e,0,f[t.strength]));const s=S(e,f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=s[0]||r[1]!=s[1])throw new Error(o)}(e,n,e.password),e.password=null,e.aesCtrGladman=new m(new b(e.keys.key),Array.from(w)),e.hmac=new k(e.keys.authentication),t=S(t,f[e.strength]+2)}return z(e,t,new Uint8Array(t.length-y-(t.length-y)%l),0,y,!0)}flush(){const t=this,e=t.pendingInput,n=S(e,0,e.length-y),s=S(e,e.length-y);let r=new Uint8Array(0);if(n.length){const e=_.toBits(n);t.hmac.update(e);const s=t.aesCtrGladman.update(e);r=_.fromBits(s)}let a=!0;if(t.signed){const e=S(_.fromBits(t.hmac.digest()),0,y);for(let t=0;t<y;t++)e[t]!=s[t]&&(a=!1)}return{valid:a,data:r}}}class U{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let n=new Uint8Array(0);e.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await v(t,e,n),C(n,t.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new m(new b(e.keys.key),Array.from(w)),e.hmac=new k(e.keys.authentication));const s=new Uint8Array(n.length+t.length-t.length%l);return s.set(n,0),z(e,t,s,n.length,0)}flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(_.toBits(t.pendingInput));t.hmac.update(n),e=_.fromBits(n)}const n=S(_.fromBits(t.hmac.digest()),0,y);return{data:C(e,n),signature:n}}}function z(t,e,n,s,r,a){const i=e.length-r;let c;for(t.pendingInput.length&&(e=C(t.pendingInput,e),n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,i-i%l)),c=0;c<=i-l;c+=l){const r=_.toBits(S(e,c,c+l));a&&t.hmac.update(r);const i=t.aesCtrGladman.update(r);a||t.hmac.update(i),n.set(_.fromBits(i),c+s)}return t.pendingInput=S(e,c),n}async function v(t,e,n){const s=(new TextEncoder).encode(e),r=await crypto.subtle.importKey("raw",s,p,!1,d),a=await crypto.subtle.deriveBits(Object.assign({salt:n},u),r,8*(2*g[t.strength]+2)),i=new Uint8Array(a);t.keys={key:_.toBits(S(i,0,g[t.strength])),authentication:_.toBits(S(i,g[t.strength],2*g[t.strength])),passwordVerification:S(i,2*g[t.strength])}}function C(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function S(t,e,n){return t.subarray(e,n)}class B{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),V(this,t)}append(t){const e=this;if(e.password){const n=I(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new Error(o);t=t.subarray(12)}return I(e,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class D{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),V(this,t)}append(t){const e=this;let n,s;if(e.password){e.password=null;const r=crypto.getRandomValues(new Uint8Array(12));r[11]=e.passwordVerification,n=new Uint8Array(t.length+r.length),n.set(H(e,r),0),s=12}else n=new Uint8Array(t.length),s=0;return n.set(H(e,t),s),n}flush(){return{data:new Uint8Array(0)}}}function I(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=j(t)^e[s],M(t,n[s]);return n}function H(t,e){const n=new Uint8Array(e.length);for(let s=0;s<e.length;s++)n[s]=j(t)^e[s],M(t,e[s]);return n}function V(t,n){t.keys=[305419896,591751049,878082192],t.crcKey0=new e(t.keys[0]),t.crcKey2=new e(t.keys[2]);for(let e=0;e<n.length;e++)M(t,n.charCodeAt(e))}function M(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=E(t.keys[1]+O(t.keys[0])),t.keys[1]=E(Math.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function j(t){const e=2|t.keys[2];return O(Math.imul(e,1^e)>>>8)}function O(t){return 255&t}function E(t){return 4294967295&t}const K="deflate",W="inflate",G="Invalid signature";class L{constructor(t,{signature:n,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:c,encryptionStrength:o},{chunkSize:l}){const h=Boolean(s);Object.assign(this,{signature:n,encrypted:h,signed:r,compressed:a,inflate:a&&new t({chunkSize:l}),crc32:r&&new e,zipCrypto:i,decrypt:h&&i?new B(s,c):new A(s,r,o)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new Error(G);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new Error(G)}return t.compressed&&(n=await t.inflate.append(n)||new Uint8Array(0),await t.inflate.flush()),{data:n,signature:e}}}class P{constructor(t,{encrypted:n,signed:s,compressed:r,level:a,zipCrypto:i,password:c,passwordVerification:o,encryptionStrength:l},{chunkSize:h}){Object.assign(this,{encrypted:n,signed:s,compressed:r,deflate:r&&new t({level:a||5,chunkSize:h}),crc32:s&&new e,zipCrypto:i,encrypt:n&&i?new D(c,o):new U(c,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new Uint8Array(0);if(t.compressed&&(n=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){n=await t.encrypt.append(n);const s=t.encrypt.flush();e=s.signature;const r=new Uint8Array(n.length+s.data.length);r.set(n,0),r.set(s.data,n.length),n=r}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const T={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith(K)?n=self.Deflate:e.codecType.startsWith(W)&&(n=self.Inflate),R=function(t,e,n){return e.codecType.startsWith(K)?new P(t,e,n):e.codecType.startsWith(W)?new L(t,e,n):void 0}(n,e,t.config)},append:async t=>({data:await R.append(t.data)}),flush:()=>R.flush()};let R;function x(t,e,n){return class{constructor(s){const r=this;r.codec=new t(Object.assign({},e,s)),n(r.codec,(t=>{if(r.pendingData){const e=r.pendingData;r.pendingData=new Uint8Array(e.length+t.length),r.pendingData.set(e,0),r.pendingData.set(t,e.length)}else r.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),s(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),s(this)}};function s(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}addEventListener("message",(async t=>{const e=t.data,n=e.type,s=T[n];if(s)try{e.data&&(e.data=new Uint8Array(e.data));const t=await s(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}})),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={},n)=>({Deflate:x(t.Deflate,e.deflate,n),Inflate:x(t.Inflate,e.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((t,e)=>t.onData=e));self.Deflate=t,self.Inflate=e}}(); | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
(function(){"use strict";const V=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;V[n]=t}class S{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let s=0,r=0|t.length;s<r;s++)e=e>>>8^V[255&(e^t[s])];this.crc=e}get(){return~this.crc}}const p={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],s=p.getPartial(e);return s===32?n.concat(t):p._shiftRight(t,s,0|e,n.slice(0,n.length-1))},bitLength(n){const t=n.length;if(t===0)return 0;const e=n[t-1];return 32*(t-1)+p.getPartial(e)},clamp(n,t){if(32*n.length<t)return n;const e=(n=n.slice(0,Math.ceil(t/32))).length;return t&=31,e>0&&t&&(n[e-1]=p.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial:(n,t,e)=>n===32?t:(e?0|t:t<<32-n)+1099511627776*n,getPartial:n=>Math.round(n/1099511627776)||32,_shiftRight(n,t,e,s){for(s===void 0&&(s=[]);t>=32;t-=32)s.push(e),e=0;if(t===0)return s.concat(n);for(let i=0;i<n.length;i++)s.push(e|n[i]>>>t),e=n[i]<<32-t;const r=n.length?n[n.length-1]:0,a=p.getPartial(r);return s.push(p.partial(t+a&31,t+a>32?e:s.pop(),1)),s}},M={bytes:{fromBits(n){const t=p.bitLength(n)/8,e=new Uint8Array(t);let s;for(let r=0;r<t;r++)(3&r)==0&&(s=n[r/4]),e[r]=s>>>24,s<<=8;return e},toBits(n){const t=[];let e,s=0;for(e=0;e<n.length;e++)s=s<<8|n[e],(3&e)==3&&(t.push(s),s=0);return 3&e&&t.push(p.partial(8*(3&e),s)),t}}},j={sha1:function(n){n?(this._h=n._h.slice(0),this._buffer=n._buffer.slice(0),this._length=n._length):this.reset()}};j.sha1.prototype={blockSize:512,reset:function(){const n=this;return n._h=this._init.slice(0),n._buffer=[],n._length=0,n},update:function(n){const t=this;typeof n=="string"&&(n=M.utf8String.toBits(n));const e=t._buffer=p.concat(t._buffer,n),s=t._length,r=t._length=s+p.bitLength(n);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(e);let i=0;for(let o=t.blockSize+s-(t.blockSize+s&t.blockSize-1);o<=r;o+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return e.splice(0,16*i),t},finalize:function(){const n=this;let t=n._buffer;const e=n._h;t=p.concat(t,[p.partial(1,1)]);for(let s=t.length+2;15&s;s++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(0|n._length);t.length;)n._block(t.splice(0,16));return n.reset(),e},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(n,t,e,s){return n<=19?t&e|~t&s:n<=39?t^e^s:n<=59?t&e|t&s|e&s:n<=79?t^e^s:void 0},_S:function(n,t){return t<<n|t>>>32-n},_block:function(n){const t=this,e=t._h,s=Array(80);for(let c=0;c<16;c++)s[c]=n[c];let r=e[0],a=e[1],i=e[2],o=e[3],h=e[4];for(let c=0;c<=79;c++){c>=16&&(s[c]=t._S(1,s[c-3]^s[c-8]^s[c-14]^s[c-16]));const l=t._S(5,r)+t._f(c,a,i,o)+h+s[c]+t._key[Math.floor(c/20)]|0;h=o,o=i,i=t._S(30,a),a=r,r=l}e[0]=e[0]+r|0,e[1]=e[1]+a|0,e[2]=e[2]+i|0,e[3]=e[3]+o|0,e[4]=e[4]+h|0}};const $={aes:class{constructor(n){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],s=t._tables[1],r=n.length;let a,i,o,h=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[i=n.slice(0),o=[]],a=r;a<4*r+28;a++){let c=i[a-1];(a%r==0||r===8&&a%r==4)&&(c=e[c>>>24]<<24^e[c>>16&255]<<16^e[c>>8&255]<<8^e[255&c],a%r==0&&(c=c<<8^c>>>24^h<<24,h=h<<1^283*(h>>7))),i[a]=i[a-r]^c}for(let c=0;a;c++,a--){const l=i[3&c?a:a-4];o[c]=a<=4||c<4?l:s[0][e[l>>>24]]^s[1][e[l>>16&255]]^s[2][e[l>>8&255]]^s[3][e[255&l]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],t=this._tables[1],e=n[4],s=t[4],r=[],a=[];let i,o,h,c;for(let l=0;l<256;l++)a[(r[l]=l<<1^283*(l>>7))^l]=l;for(let l=i=0;!e[l];l^=o||1,i=a[i]||1){let d=i^i<<1^i<<2^i<<3^i<<4;d=d>>8^255&d^99,e[l]=d,s[d]=l,c=r[h=r[o=r[l]]];let A=16843009*c^65537*h^257*o^16843008*l,U=257*r[d]^16843008*d;for(let f=0;f<4;f++)n[f][l]=U=U<<24^U>>>8,t[f][d]=A=A<<24^A>>>8}for(let l=0;l<5;l++)n[l]=n[l].slice(0),t[l]=t[l].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");const e=this._key[t],s=e.length/4-2,r=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],h=a[2],c=a[3],l=a[4];let d,A,U,f=n[0]^e[0],w=n[t?3:1]^e[1],_=n[2]^e[2],b=n[t?1:3]^e[3],z=4;for(let m=0;m<s;m++)d=i[f>>>24]^o[w>>16&255]^h[_>>8&255]^c[255&b]^e[z],A=i[w>>>24]^o[_>>16&255]^h[b>>8&255]^c[255&f]^e[z+1],U=i[_>>>24]^o[b>>16&255]^h[f>>8&255]^c[255&w]^e[z+2],b=i[b>>>24]^o[f>>16&255]^h[w>>8&255]^c[255&_]^e[z+3],z+=4,f=d,w=A,_=U;for(let m=0;m<4;m++)r[t?3&-m:m]=l[f>>>24]<<24^l[w>>16&255]<<16^l[_>>8&255]<<8^l[255&b]^e[z++],d=f,f=w,w=_,_=b,b=d;return r}}},tt={ctrGladman:class{constructor(n,t){this._prf=n,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)==255){let t=n>>16&255,e=n>>8&255,s=255&n;t===255?(t=0,e===255?(e=0,s===255?s=0:++s):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=s}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let s;if(!(s=t.length))return[];const r=p.bitLength(t);for(let a=0;a<s;a+=4){this.incCounter(e);const i=n.encrypt(e);t[a]^=i[0],t[a+1]^=i[1],t[a+2]^=i[2],t[a+3]^=i[3]}return p.clamp(t,r)}}},et={hmacSha1:class{constructor(n){const t=this,e=t._hash=j.sha1,s=[[],[]],r=e.prototype.blockSize/32;t._baseHash=[new e,new e],n.length>r&&(n=e.hash(n));for(let a=0;a<r;a++)s[0][a]=909522486^n[a],s[1][a]=1549556828^n[a];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new e(t._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){this._updated=!0,this._resultHash.update(n)}digest(){const n=this,t=n._resultHash.finalize(),e=new n._hash(n._baseHash[1]).update(t).finalize();return n.reset(),e}}},O="Invalid pasword",k=16,E={name:"PBKDF2"},nt=Object.assign({hash:{name:"HMAC"}},E),st=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},E),rt=["deriveBits"],v=[8,12,16],C=[16,24,32],y=10,K=[0,0,0,0],g=M.bytes,G=$.aes,W=tt.ctrGladman,L=et.hmacSha1;class at{constructor(t,e,s){Object.assign(this,{password:t,signed:e,strength:s-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;if(e.password){const s=u(t,0,v[e.strength]+2);await async function(r,a,i){await T(r,i,u(a,0,v[r.strength]));const o=u(a,v[r.strength]),h=r.keys.passwordVerification;if(h[0]!=o[0]||h[1]!=o[1])throw new Error(O)}(e,s,e.password),e.password=null,e.aesCtrGladman=new W(new G(e.keys.key),Array.from(K)),e.hmac=new L(e.keys.authentication),t=u(t,v[e.strength]+2)}return P(e,t,new Uint8Array(t.length-y-(t.length-y)%k),0,y,!0)}flush(){const t=this,e=t.pendingInput,s=u(e,0,e.length-y),r=u(e,e.length-y);let a=new Uint8Array(0);if(s.length){const o=g.toBits(s);t.hmac.update(o);const h=t.aesCtrGladman.update(o);a=g.fromBits(h)}let i=!0;if(t.signed){const o=u(g.fromBits(t.hmac.digest()),0,y);for(let h=0;h<y;h++)o[h]!=r[h]&&(i=!1)}return{valid:i,data:a}}}class it{constructor(t,e){Object.assign(this,{password:t,strength:e-1,pendingInput:new Uint8Array(0)})}async append(t){const e=this;let s=new Uint8Array(0);e.password&&(s=await async function(a,i){const o=crypto.getRandomValues(new Uint8Array(v[a.strength]));return await T(a,i,o),D(o,a.keys.passwordVerification)}(e,e.password),e.password=null,e.aesCtrGladman=new W(new G(e.keys.key),Array.from(K)),e.hmac=new L(e.keys.authentication));const r=new Uint8Array(s.length+t.length-t.length%k);return r.set(s,0),P(e,t,r,s.length,0)}flush(){const t=this;let e=new Uint8Array(0);if(t.pendingInput.length){const r=t.aesCtrGladman.update(g.toBits(t.pendingInput));t.hmac.update(r),e=g.fromBits(r)}const s=u(g.fromBits(t.hmac.digest()),0,y);return{data:D(e,s),signature:s}}}function P(n,t,e,s,r,a){const i=t.length-r;let o;for(n.pendingInput.length&&(t=D(n.pendingInput,t),e=function(h,c){if(c&&c>h.length){const l=h;(h=new Uint8Array(c)).set(l,0)}return h}(e,i-i%k)),o=0;o<=i-k;o+=k){const h=g.toBits(u(t,o,o+k));a&&n.hmac.update(h);const c=n.aesCtrGladman.update(h);a||n.hmac.update(c),e.set(g.fromBits(c),o+s)}return n.pendingInput=u(t,o),e}async function T(n,t,e){const s=new TextEncoder().encode(t),r=await crypto.subtle.importKey("raw",s,nt,!1,rt),a=await crypto.subtle.deriveBits(Object.assign({salt:e},st),r,8*(2*C[n.strength]+2)),i=new Uint8Array(a);n.keys={key:g.toBits(u(i,0,C[n.strength])),authentication:g.toBits(u(i,C[n.strength],2*C[n.strength])),passwordVerification:u(i,2*C[n.strength])}}function D(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function u(n,t,e){return n.subarray(t,e)}const B=12;class ct{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),F(this,t)}append(t){const e=this;if(e.password){const s=R(e,t.subarray(0,B));if(e.password=null,s[11]!=e.passwordVerification)throw new Error(O);t=t.subarray(B)}return R(e,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class ot{constructor(t,e){Object.assign(this,{password:t,passwordVerification:e}),F(this,t)}append(t){const e=this;let s,r;if(e.password){e.password=null;const a=crypto.getRandomValues(new Uint8Array(B));a[11]=e.passwordVerification,s=new Uint8Array(t.length+a.length),s.set(x(e,a),0),r=B}else s=new Uint8Array(t.length),r=0;return s.set(x(e,t),r),s}flush(){return{data:new Uint8Array(0)}}}function R(n,t){const e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=q(n)^t[s],I(n,e[s]);return e}function x(n,t){const e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=q(n)^t[s],I(n,t[s]);return e}function F(n,t){n.keys=[305419896,591751049,878082192],n.crcKey0=new S(n.keys[0]),n.crcKey2=new S(n.keys[2]);for(let e=0;e<t.length;e++)I(n,t.charCodeAt(e))}function I(n,t){n.crcKey0.append([t]),n.keys[0]=~n.crcKey0.get(),n.keys[1]=N(n.keys[1]+J(n.keys[0])),n.keys[1]=N(Math.imul(n.keys[1],134775813)+1),n.crcKey2.append([n.keys[1]>>>24]),n.keys[2]=~n.crcKey2.get()}function q(n){const t=2|n.keys[2];return J(Math.imul(t,1^t)>>>8)}function J(n){return 255&n}function N(n){return 4294967295&n}const Q="deflate",X="inflate",Y="Invalid signature";class lt{constructor(t,{signature:e,password:s,signed:r,compressed:a,zipCrypto:i,passwordVerification:o,encryptionStrength:h},{chunkSize:c}){const l=Boolean(s);Object.assign(this,{signature:e,encrypted:l,signed:r,compressed:a,inflate:a&&new t({chunkSize:c}),crc32:r&&new S,zipCrypto:i,decrypt:l&&i?new ct(s,o):new at(s,r,h)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,s=new Uint8Array(0);if(t.encrypted){const r=t.decrypt.flush();if(!r.valid)throw new Error(Y);s=r.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const r=new DataView(new Uint8Array(4).buffer);if(e=t.crc32.get(),r.setUint32(0,e),t.signature!=r.getUint32(0,!1))throw new Error(Y)}return t.compressed&&(s=await t.inflate.append(s)||new Uint8Array(0),await t.inflate.flush()),{data:s,signature:e}}}class ht{constructor(t,{encrypted:e,signed:s,compressed:r,level:a,zipCrypto:i,password:o,passwordVerification:h,encryptionStrength:c},{chunkSize:l}){Object.assign(this,{encrypted:e,signed:s,compressed:r,deflate:r&&new t({level:a||5,chunkSize:l}),crc32:s&&new S,zipCrypto:i,encrypt:e&&i?new ot(o,h):new it(o,c)})}async append(t){const e=this;let s=t;return e.compressed&&t.length&&(s=await e.deflate.append(t)),e.encrypted&&s.length&&(s=await e.encrypt.append(s)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),s}async flush(){const t=this;let e,s=new Uint8Array(0);if(t.compressed&&(s=await t.deflate.flush()||new Uint8Array(0)),t.encrypted){s=await t.encrypt.append(s);const r=t.encrypt.flush();e=r.signature;const a=new Uint8Array(s.length+r.data.length);a.set(s,0),a.set(r.data,s.length),s=a}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:s,signature:e}}}const pt={init(n){n.scripts&&n.scripts.length&&importScripts.apply(void 0,n.scripts);const t=n.options;let e;self.initCodec&&self.initCodec(),t.codecType.startsWith(Q)?e=self.Deflate:t.codecType.startsWith(X)&&(e=self.Inflate),H=function(s,r,a){return r.codecType.startsWith(Q)?new ht(s,r,a):r.codecType.startsWith(X)?new lt(s,r,a):void 0}(e,t,n.config)},append:async n=>({data:await H.append(n.data)}),flush:()=>H.flush()};let H;addEventListener("message",async n=>{const t=n.data,e=t.type,s=pt[e];if(s)try{t.data&&(t.data=new Uint8Array(t.data));const r=await s(t)||{};if(r.type=e,r.data)try{r.data=r.data.buffer,postMessage(r,[r.data])}catch{postMessage(r)}else postMessage(r)}catch(r){postMessage({type:e,error:{message:r.message,stack:r.stack}})}});function Z(n,t,e){return class{constructor(r){const a=this;a.codec=new n(Object.assign({},t,r)),e(a.codec,i=>{if(a.pendingData){const o=a.pendingData;a.pendingData=new Uint8Array(o.length+i.length),a.pendingData.set(o,0),a.pendingData.set(i,o.length)}else a.pendingData=new Uint8Array(i)})}async append(r){return this.codec.push(r),s(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),s(this)}};function s(r){if(r.pendingData){const a=r.pendingData;return r.pendingData=null,a}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:n,Inflate:t}=((e,s={},r)=>({Deflate:Z(e.Deflate,s.deflate,r),Inflate:Z(e.Inflate,s.inflate,r)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},(e,s)=>e.onData=s);self.Deflate=n,self.Inflate=t}})(); |
@@ -1,6 +0,31 @@ | ||
function setTimeout(e){e()} | ||
/** vim: et:ts=4:sw=4:sts=4 | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
typeof self>"u"&&(self={}),self.onmessage=function(r){var a=r.data;require(a.loaderConfig,[a.workerModule],function(c){self.onmessage=c,CESIUM_BASE_URL=a.loaderConfig.baseUrl})};function setTimeout(r){r()}/** vim: et:ts=4:sw=4:sts=4 | ||
* @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. | ||
* Available via the MIT or new BSD license. | ||
* see: http://github.com/jrburke/requirejs for details | ||
*/var requirejs,require,define;"undefined"==typeof self&&(self={}),self.onmessage=function(e){var t=e.data;require(t.loaderConfig,[t.workerModule],(function(e){self.onmessage=e,CESIUM_BASE_URL=t.loaderConfig.baseUrl}))},function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,(function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))})),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),(function(e){t=t[e]})),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],(function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}})),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return r=req.createNode(n,t,i),n.onNodeCreated&&n.onNodeCreated(r,n,t,i),r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),(function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0})),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(e){var t,i,r,n,o,a={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},d=[],p={},f={},l={},h=1,m=1;function g(e,t,i){var r,n,o,s,u,c,d,p,f,l,h=t&&t.split("/"),m=a.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&m&&(h||g)){e:for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h)for(s=h.length;s>0;s-=1)if((r=getOwn(m,h.slice(0,s).join("/")))&&(r=getOwn(r,u))){d=r,p=o;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=o)}!d&&f&&(d=f,p=l),d&&(n.splice(0,p,d),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function v(e){isBrowser&&each(scripts(),(function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0}))}function x(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function q(e,t,i,n){var o,a,s,u,c=null,d=t?t.name:null,f=e,l=!0,v="";return e||(l=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,d,n),a=getOwn(p,c)),e&&(c?v=a&&a.normalize?a.normalize(e,(function(e){return g(e,d,n)})):-1===e.indexOf("!")?g(e,d,n):e:(c=(u=b(v=g(e,d,n)))[0],v=u[1],i=!0,o=r.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||i?"":"_unnormalized"+(m+=1)),url:o,originalName:f,isDefine:l,id:(c?c+"!"+v:v)+s}}function E(e){var t=e.id,i=getOwn(s,t);return i||(i=s[t]=new r.Module(e)),i}function w(e,t,i){var r=e.id,n=getOwn(s,r);!hasProp(p,r)||n&&!n.defineEmitComplete?(n=E(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(p[r])}function y(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,(function(t){var i=getOwn(s,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))})),r||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,(function(e){var t=e[0];"string"==typeof t&&(r.defQueueMap[t]=!0),d.push(e)})),globalDefQueue=[])}function k(e){delete s[e],delete u[e]}function M(e,t,i){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,(function(r,n){var o=r.id,a=getOwn(s,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,p[o]),e.check()):M(a,t,i))})),i[r]=!0)}function O(){var e,i,n=1e3*a.waitSeconds,s=n&&r.startTime+n<(new Date).getTime(),c=[],d=[],p=!1,f=!0;if(!t){if(t=!0,eachProp(u,(function(e){var t=e.map,r=t.id;if(e.enabled&&(t.isDefine||d.push(e),!e.error))if(!e.inited&&s)x(r)?(i=!0,p=!0):(c.push(r),v(r));else if(!e.inited&&e.fetched&&t.isDefine&&(p=!0,!t.prefix))return f=!1})),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=r.contextName,y(e);f&&each(d,(function(e){M(e,{},{})})),s&&!i||!p||!isBrowser&&!isWebWorker||o||(o=setTimeout((function(){o=0,O()}),50)),t=!1}}function j(e){hasProp(p,e[0])||E(q(e[0],null,!0)).init(e[1],e[2])}function P(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function R(e){var t=e.currentTarget||e.srcElement;return P(t,r.onScriptLoad,"load","onreadystatechange"),P(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function A(){var e;for(S();d.length;){if(null===(e=d.shift())[0])return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}r.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?p[e.map.id]=e.exports:e.exports=p[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(i=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,(function(e){this.emit("error",e)}))),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,(function(){return e.prefix?this.callPlugin():this.load()})))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,r.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=r.execCb(i,a,n,o)}catch(t){e=t}else o=r.execCb(i,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else o=a;this.exports=o,this.map.isDefine&&!this.ignore&&(p[i]=o,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),k(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(r.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=q(e.prefix);this.depMaps.push(i),w(i,"defined",bind(this,(function(i){var n,o,u,c=getOwn(l,this.map.id),d=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,f=r.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(d=i.normalize(d,(function(e){return g(e,p,!0)}))||""),w(o=q(e.prefix+"!"+d,this.map.parentMap),"defined",bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0,ignore:!0})}))),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,(function(e){this.emit("error",e)}))),u.enable()))):c?(this.map.url=r.nameToUrl(c),void this.load()):((n=bind(this,(function(e){this.init([],(function(){return e}),null,{enabled:!0})}))).error=bind(this,(function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,(function(e){0===e.map.id.indexOf(t+"_unnormalized")&&k(e.map.id)})),y(e)})),n.fromText=bind(this,(function(i,o){var s=e.name,u=q(s),c=useInteractive;o&&(i=o),c&&(useInteractive=!1),E(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(i)}catch(e){return y(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),r.completeLoad(s),f([s],n)})),void i.load(e.name,f,n,a))}))),r.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,(function(e,t){var i,o,a;if("string"==typeof e){if(e=q(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,w(e,"defined",bind(this,(function(e){this.undefed||(this.defineDep(t,e),this.check())}))),this.errback?w(e,"error",bind(this,this.errback)):this.events.error&&w(e,"error",bind(this,(function(e){this.emit("error",e)})))}i=e.id,o=s[i],hasProp(n,i)||!o||o.enabled||r.enable(e,this)}))),eachProp(this.pluginMaps,bind(this,(function(e){var t=getOwn(s,e.id);t&&!t.enabled&&r.enable(e,this)}))),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],(function(e){e(t)})),"error"===e&&delete this.events[e]}},r={config:a,contextName:e,registry:s,defined:p,urlFetched:f,defQueue:d,defQueueMap:{},Module:i,makeModuleMap:q,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=a.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,(function(e,t){i[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e})),e.bundles&&eachProp(e.bundles,(function(e,t){each(e,(function(e){e!==t&&(l[e]=t)}))})),e.shim&&(eachProp(e.shim,(function(e,i){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=r.makeShimExports(e)),t[i]=e})),a.shim=t),e.packages&&each(e.packages,(function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),eachProp(s,(function(e,t){e.inited||e.map.unnormalized||(e.map=q(t,null,!0))})),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,i){function o(a,u,c){var d,f;return i.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?y(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(r,a,t,o):(d=q(a,t,!1,!0).id,hasProp(p,d)?p[d]:y(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(A(),r.nextTick((function(){A(),(f=E(q(null,t))).skipMap=i.skipMap,f.init(a,u,c,{enabled:!0}),O()})),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var i,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(i=e.substring(n,e.length),e=e.substring(0,n)),r.nameToUrl(g(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(p,q(e,t,!1,!0).id)},specified:function(e){return e=q(e,t,!1,!0).id,hasProp(p,e)||hasProp(s,e)}}),t||(o.undef=function(e){S();var i=q(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(e),delete p[e],delete f[i.url],delete c[e],eachReverse(d,(function(t,i){t[0]===e&&d.splice(i,1)})),delete r.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),k(e))}),o},enable:function(e){getOwn(s,e.id)&&E(e).enable()},completeLoad:function(e){var t,i,n,o=getOwn(a.shim,e)||{},u=o.exports;for(S();d.length;){if(null===(i=d.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);j(i)}if(r.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(p,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return x(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));j([e,o.deps||[],o.exportsFn])}O()},nameToUrl:function(e,t,i){var n,o,s,u,c,d,p=getOwn(a.pkgs,e);if(p&&(e=p),d=getOwn(l,e))return r.nameToUrl(d,t,i);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data\:|\?/.test(u)||i?"":".js")).charAt(0)||u.match(/^[\w\+\.\-]+:/)?"":a.baseUrl)+u}return a.urlArgs?u+(-1===u.indexOf("?")?"?":"&")+a.urlArgs:u},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=R(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=R(e);if(!x(t.id))return y(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),(function(e){if("interactive"===e.readyState)return interactiveScript=e})),interactiveScript}}(this); | ||
*/var requirejs,require,define;(function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.20",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,isBrowser=!!(typeof window<"u"&&typeof navigator<"u"&&window.document),isWebWorker=!isBrowser&&typeof importScripts<"u",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera<"u"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(r){return ostring.call(r)==="[object Function]"}function isArray(r){return ostring.call(r)==="[object Array]"}function each(r,a){if(r){var c;for(c=0;c<r.length&&!(r[c]&&a(r[c],c,r));c+=1);}}function eachReverse(r,a){if(r){var c;for(c=r.length-1;c>-1&&!(r[c]&&a(r[c],c,r));c-=1);}}function hasProp(r,a){return hasOwn.call(r,a)}function getOwn(r,a){return hasProp(r,a)&&r[a]}function eachProp(r,a){var c;for(c in r)if(hasProp(r,c)&&a(r[c],c))break}function mixin(r,a,c,u){return a&&eachProp(a,function(d,q){(c||!hasProp(r,q))&&(u&&typeof d=="object"&&d&&!isArray(d)&&!isFunction(d)&&!(d instanceof RegExp)?(r[q]||(r[q]={}),mixin(r[q],d,c,u)):r[q]=d)}),r}function bind(r,a){return function(){return a.apply(r,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(r){throw r}function getGlobal(r){if(!r)return r;var a=global;return each(r.split("."),function(c){a=a[c]}),a}function makeError(r,a,c,u){var d=new Error(a+` | ||
http://requirejs.org/docs/errors.html#`+r);return d.requireType=r,d.requireModules=u,c&&(d.originalError=c),d}if(typeof define<"u")return;if(typeof requirejs<"u"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}typeof require<"u"&&!isFunction(require)&&(cfg=require,require=void 0);function newContext(r){var a,c,u,d,q,g={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},v={},B={},I={},O=[],w={},D={},L={},H=1,K=1;function X(e){var i,o;for(i=0;i<e.length;i++)if(o=e[i],o===".")e.splice(i,1),i-=1;else if(o===".."){if(i===0||i===1&&e[2]===".."||e[i-1]==="..")continue;i>0&&(e.splice(i-1,2),i-=2)}}function C(e,i,o){var t,n,f,l,p,h,x,E,m,b,M,A,k=i&&i.split("/"),R=g.map,j=R&&R["*"];if(e&&(e=e.split("/"),x=e.length-1,g.nodeIdCompat&&jsSuffixRegExp.test(e[x])&&(e[x]=e[x].replace(jsSuffixRegExp,"")),e[0].charAt(0)==="."&&k&&(A=k.slice(0,k.length-1),e=A.concat(e)),X(e),e=e.join("/")),o&&R&&(k||j)){f=e.split("/");e:for(l=f.length;l>0;l-=1){if(h=f.slice(0,l).join("/"),k){for(p=k.length;p>0;p-=1)if(n=getOwn(R,k.slice(0,p).join("/")),n&&(n=getOwn(n,h),n)){E=n,m=l;break e}}!b&&j&&getOwn(j,h)&&(b=getOwn(j,h),M=l)}!E&&b&&(E=b,m=M),E&&(f.splice(0,m,E),e=f.join("/"))}return t=getOwn(g.pkgs,e),t||e}function W(e){isBrowser&&each(scripts(),function(i){if(i.getAttribute("data-requiremodule")===e&&i.getAttribute("data-requirecontext")===u.contextName)return i.parentNode.removeChild(i),!0})}function U(e){var i=getOwn(g.paths,e);if(i&&isArray(i)&&i.length>1)return i.shift(),u.require.undef(e),u.makeRequire(null,{skipMap:!0})([e]),!0}function G(e){var i,o=e?e.indexOf("!"):-1;return o>-1&&(i=e.substring(0,o),e=e.substring(o+1,e.length)),[i,e]}function S(e,i,o,t){var n,f,l,p,h=null,x=i?i.name:null,E=e,m=!0,b="";return e||(m=!1,e="_@r"+(H+=1)),p=G(e),h=p[0],e=p[1],h&&(h=C(h,x,t),f=getOwn(w,h)),e&&(h?f&&f.normalize?b=f.normalize(e,function(M){return C(M,x,t)}):b=e.indexOf("!")===-1?C(e,x,t):e:(b=C(e,x,t),p=G(b),h=p[0],b=p[1],o=!0,n=u.nameToUrl(b))),l=h&&!f&&!o?"_unnormalized"+(K+=1):"",{prefix:h,name:b,parentMap:i,unnormalized:!!l,url:n,originalName:E,isDefine:m,id:(h?h+"!"+b:b)+l}}function P(e){var i=e.id,o=getOwn(v,i);return o||(o=v[i]=new u.Module(e)),o}function T(e,i,o){var t=e.id,n=getOwn(v,t);hasProp(w,t)&&(!n||n.defineEmitComplete)?i==="defined"&&o(w[t]):(n=P(e),n.error&&i==="error"?o(n.error):n.on(i,o))}function y(e,i){var o=e.requireModules,t=!1;i?i(e):(each(o,function(n){var f=getOwn(v,n);f&&(f.error=e,f.events.error&&(t=!0,f.emit("error",e)))}),t||req.onError(e))}function Q(){globalDefQueue.length&&(each(globalDefQueue,function(e){var i=e[0];typeof i=="string"&&(u.defQueueMap[i]=!0),O.push(e)}),globalDefQueue=[])}d={require:function(e){return e.require?e.require:e.require=u.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?w[e.map.id]=e.exports:e.exports=w[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(g.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}};function F(e){delete v[e],delete B[e]}function $(e,i,o){var t=e.map.id;e.error?e.emit("error",e.error):(i[t]=!0,each(e.depMaps,function(n,f){var l=n.id,p=getOwn(v,l);p&&!e.depMatched[f]&&!o[l]&&(getOwn(i,l)?(e.defineDep(f,w[l]),e.check()):$(p,i,o))}),o[t]=!0)}function z(){var e,i,o=g.waitSeconds*1e3,t=o&&u.startTime+o<new Date().getTime(),n=[],f=[],l=!1,p=!0;if(!a){if(a=!0,eachProp(B,function(h){var x=h.map,E=x.id;if(!!h.enabled&&(x.isDefine||f.push(h),!h.error)){if(!h.inited&&t)U(E)?(i=!0,l=!0):(n.push(E),W(E));else if(!h.inited&&h.fetched&&x.isDefine&&(l=!0,!x.prefix))return p=!1}}),t&&n.length)return e=makeError("timeout","Load timeout for modules: "+n,null,n),e.contextName=u.contextName,y(e);p&&each(f,function(h){$(h,{},{})}),(!t||i)&&l&&(isBrowser||isWebWorker)&&!q&&(q=setTimeout(function(){q=0,z()},50)),a=!1}}c=function(e){this.events=getOwn(I,e.id)||{},this.map=e,this.shim=getOwn(g.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,i,o,t){t=t||{},!this.inited&&(this.factory=i,o?this.on("error",o):this.events.error&&(o=bind(this,function(n){this.emit("error",n)})),this.depMaps=e&&e.slice(0),this.errback=o,this.inited=!0,this.ignore=t.ignore,t.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,i){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=i)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=new Date().getTime();var e=this.map;if(this.shim)u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}));else return e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;D[e]||(D[e]=!0,u.load(this.map.id,e))},check:function(){if(!(!this.enabled||this.enabling)){var e,i,o=this.map.id,t=this.depExports,n=this.exports,f=this.factory;if(!this.inited)hasProp(u.defQueueMap,o)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=u.execCb(o,f,t,n)}catch(l){e=l}else n=u.execCb(o,f,t,n);if(this.map.isDefine&&n===void 0&&(i=this.module,i?n=i.exports:this.usingExports&&(n=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",y(this.error=e)}else n=f;this.exports=n,this.map.isDefine&&!this.ignore&&(w[o]=n,req.onResourceLoad&&req.onResourceLoad(u,this.map,this.depMaps)),F(o),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var e=this.map,i=e.id,o=S(e.prefix);this.depMaps.push(o),T(o,"defined",bind(this,function(t){var n,f,l,p=getOwn(L,this.map.id),h=this.map.name,x=this.map.parentMap?this.map.parentMap.name:null,E=u.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){t.normalize&&(h=t.normalize(h,function(m){return C(m,x,!0)})||""),f=S(e.prefix+"!"+h,this.map.parentMap),T(f,"defined",bind(this,function(m){this.init([],function(){return m},null,{enabled:!0,ignore:!0})})),l=getOwn(v,f.id),l&&(this.depMaps.push(f),this.events.error&&l.on("error",bind(this,function(m){this.emit("error",m)})),l.enable());return}if(p){this.map.url=u.nameToUrl(p),this.load();return}n=bind(this,function(m){this.init([],function(){return m},null,{enabled:!0})}),n.error=bind(this,function(m){this.inited=!0,this.error=m,m.requireModules=[i],eachProp(v,function(b){b.map.id.indexOf(i+"_unnormalized")===0&&F(b.map.id)}),y(m)}),n.fromText=bind(this,function(m,b){var M=e.name,A=S(M),k=useInteractive;b&&(m=b),k&&(useInteractive=!1),P(A),hasProp(g.config,i)&&(g.config[M]=g.config[i]);try{req.exec(m)}catch(R){return y(makeError("fromtexteval","fromText eval for "+i+" failed: "+R,R,[i]))}k&&(useInteractive=!0),this.depMaps.push(A),u.completeLoad(M),E([M],n)}),t.load(e.name,E,n,g)})),u.enable(o,this),this.pluginMaps[o.id]=o},enable:function(){B[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,i){var o,t,n;if(typeof e=="string"){if(e=S(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[i]=e,n=getOwn(d,e.id),n){this.depExports[i]=n(this);return}this.depCount+=1,T(e,"defined",bind(this,function(f){this.undefed||(this.defineDep(i,f),this.check())})),this.errback?T(e,"error",bind(this,this.errback)):this.events.error&&T(e,"error",bind(this,function(f){this.emit("error",f)}))}o=e.id,t=v[o],!hasProp(d,o)&&t&&!t.enabled&&u.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var i=getOwn(v,e.id);i&&!i.enabled&&u.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,i){var o=this.events[e];o||(o=this.events[e]=[]),o.push(i)},emit:function(e,i){each(this.events[e],function(o){o(i)}),e==="error"&&delete this.events[e]}};function _(e){hasProp(w,e[0])||P(S(e[0],null,!0)).init(e[1],e[2])}function J(e,i,o,t){e.detachEvent&&!isOpera?t&&e.detachEvent(t,i):e.removeEventListener(o,i,!1)}function V(e){var i=e.currentTarget||e.srcElement;return J(i,u.onScriptLoad,"load","onreadystatechange"),J(i,u.onScriptError,"error"),{node:i,id:i&&i.getAttribute("data-requiremodule")}}function Y(){var e;for(Q();O.length;){if(e=O.shift(),e[0]===null)return y(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));_(e)}u.defQueueMap={}}return u={config:g,contextName:r,registry:v,defined:w,urlFetched:D,defQueue:O,defQueueMap:{},Module:c,makeModuleMap:S,nextTick:req.nextTick,onError:y,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var i=g.shim,o={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(t,n){o[n]?(g[n]||(g[n]={}),mixin(g[n],t,!0,!0)):g[n]=t}),e.bundles&&eachProp(e.bundles,function(t,n){each(t,function(f){f!==n&&(L[f]=n)})}),e.shim&&(eachProp(e.shim,function(t,n){isArray(t)&&(t={deps:t}),(t.exports||t.init)&&!t.exportsFn&&(t.exportsFn=u.makeShimExports(t)),i[n]=t}),g.shim=i),e.packages&&each(e.packages,function(t){var n,f;t=typeof t=="string"?{name:t}:t,f=t.name,n=t.location,n&&(g.paths[f]=t.location),g.pkgs[f]=t.name+"/"+(t.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(v,function(t,n){!t.inited&&!t.map.unnormalized&&(t.map=S(n,null,!0))}),(e.deps||e.callback)&&u.require(e.deps||[],e.callback)},makeShimExports:function(e){function i(){var o;return e.init&&(o=e.init.apply(global,arguments)),o||e.exports&&getGlobal(e.exports)}return i},makeRequire:function(e,i){i=i||{};function o(t,n,f){var l,p,h;return i.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),typeof t=="string"?isFunction(n)?y(makeError("requireargs","Invalid require call"),f):e&&hasProp(d,t)?d[t](v[e.id]):req.get?req.get(u,t,e,o):(p=S(t,e,!1,!0),l=p.id,hasProp(w,l)?w[l]:y(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+r+(e?"":". Use require([])")))):(Y(),u.nextTick(function(){Y(),h=P(S(null,e)),h.skipMap=i.skipMap,h.init(t,n,f,{enabled:!0}),z()}),o)}return mixin(o,{isBrowser,toUrl:function(t){var n,f=t.lastIndexOf("."),l=t.split("/")[0],p=l==="."||l==="..";return f!==-1&&(!p||f>1)&&(n=t.substring(f,t.length),t=t.substring(0,f)),u.nameToUrl(C(t,e&&e.id,!0),n,!0)},defined:function(t){return hasProp(w,S(t,e,!1,!0).id)},specified:function(t){return t=S(t,e,!1,!0).id,hasProp(w,t)||hasProp(v,t)}}),e||(o.undef=function(t){Q();var n=S(t,e,!0),f=getOwn(v,t);f.undefed=!0,W(t),delete w[t],delete D[n.url],delete I[t],eachReverse(O,function(l,p){l[0]===t&&O.splice(p,1)}),delete u.defQueueMap[t],f&&(f.events.defined&&(I[t]=f.events),F(t))}),o},enable:function(e){var i=getOwn(v,e.id);i&&P(e).enable()},completeLoad:function(e){var i,o,t,n=getOwn(g.shim,e)||{},f=n.exports;for(Q();O.length;){if(o=O.shift(),o[0]===null){if(o[0]=e,i)break;i=!0}else o[0]===e&&(i=!0);_(o)}if(u.defQueueMap={},t=getOwn(v,e),!i&&!hasProp(w,e)&&t&&!t.inited){if(g.enforceDefine&&(!f||!getGlobal(f)))return U(e)?void 0:y(makeError("nodefine","No define call for "+e,null,[e]));_([e,n.deps||[],n.exportsFn])}z()},nameToUrl:function(e,i,o){var t,n,f,l,p,h,x,E=getOwn(g.pkgs,e);if(E&&(e=E),x=getOwn(L,e),x)return u.nameToUrl(x,i,o);if(req.jsExtRegExp.test(e))p=e+(i||"");else{for(t=g.paths,n=e.split("/"),f=n.length;f>0;f-=1)if(l=n.slice(0,f).join("/"),h=getOwn(t,l),h){isArray(h)&&(h=h[0]),n.splice(0,f,h);break}p=n.join("/"),p+=i||(/^data\:|\?/.test(p)||o?"":".js"),p=(p.charAt(0)==="/"||p.match(/^[\w\+\.\-]+:/)?"":g.baseUrl)+p}return g.urlArgs?p+((p.indexOf("?")===-1?"?":"&")+g.urlArgs):p},load:function(e,i){req.load(u,e,i)},execCb:function(e,i,o,t){return i.apply(t,o)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var i=V(e);u.completeLoad(i.id)}},onScriptError:function(e){var i=V(e);if(!U(i.id))return y(makeError("scripterror","Script error for: "+i.id,e,[i.id]))}},u.require=u.makeRequire(),u}req=requirejs=function(r,a,c,u){var d,q,g=defContextName;return!isArray(r)&&typeof r!="string"&&(q=r,isArray(a)?(r=a,a=c,c=u):r=[]),q&&q.context&&(g=q.context),d=getOwn(contexts,g),d||(d=contexts[g]=req.s.newContext(g)),q&&d.configure(q),d.require(r,a,c)},req.config=function(r){return req(r)},req.nextTick=typeof setTimeout<"u"?function(r){setTimeout(r,4)}:function(r){r()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts,newContext},req({}),each(["toUrl","undef","defined","specified"],function(r){req[r]=function(){var a=contexts[defContextName];return a.require[r].apply(a,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(r,a,c){var u=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return u.type=r.scriptType||"text/javascript",u.charset="utf-8",u.async=!0,u},req.load=function(r,a,c){var u=r&&r.config||{},d;if(isBrowser)return d=req.createNode(u,a,c),u.onNodeCreated&&u.onNodeCreated(d,u,a,c),d.setAttribute("data-requirecontext",r.contextName),d.setAttribute("data-requiremodule",a),d.attachEvent&&!(d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,d.attachEvent("onreadystatechange",r.onScriptLoad)):(d.addEventListener("load",r.onScriptLoad,!1),d.addEventListener("error",r.onScriptError,!1)),d.src=c,currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{importScripts(c),r.completeLoad(a)}catch(q){r.onError(makeError("importscripts","importScripts failed for "+a+" at "+c,q,[a]))}};function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"||eachReverse(scripts(),function(r){if(r.readyState==="interactive")return interactiveScript=r}),interactiveScript}isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(r){if(head||(head=r.parentNode),dataMain=r.getAttribute("data-main"),dataMain)return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(r,a,c){var u,d;typeof r!="string"&&(c=a,a=r,r=null),isArray(a)||(c=a,a=null),!a&&isFunction(c)&&(a=[],c.length&&(c.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(q,g){a.push(g)}),a=(c.length===1?["require"]:["require","exports","module"]).concat(a))),useInteractive&&(u=currentlyAddingScript||getInteractiveScript(),u&&(r||(r=u.getAttribute("data-requiremodule")),d=contexts[u.getAttribute("data-requirecontext")])),d?(d.defQueue.push([r,a,c]),d.defQueueMap[r]=!0):globalDefQueue.push([r,a,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./PrimitivePipeline-4b589c04","./createTaskProcessorWorker","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./defaultValue-ac2201bb","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryPipeline-f5483757","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./IndexDatatype-88be9f5a","./IntersectionTests-4db2368e","./Plane-a0b66c27","./WebMercatorProjection-a6181c09"],(function(e,t,i,r,n,a,o,c,s,m,b,d,f,u,P,p,l,y,G){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))})); | ||
define(["./PrimitivePipeline-6579baa1","./createTaskProcessorWorker","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryPipeline-9eaa7fbb","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./IndexDatatype-d42fd89c","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./WebMercatorProjection-4d21b562"],(function(e,t,i,r,a,n,o,c,s,m,b,d,f,u,P,p,l,y,G){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),a=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(a,i)}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./BoxGeometry-d7bce895","./defaultValue-ac2201bb","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./VertexFormat-d53ce9da"],(function(e,t,r,a,o,d,n,c,m,f,b,u,i){"use strict";return function(r,a){return t.defined(a)&&(r=e.BoxGeometry.unpack(r,a)),e.BoxGeometry.createGeometry(r)}})); | ||
define(["./BoxGeometry-07b61a36","./defaultValue-6ed27e8d","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./VertexFormat-4362bb4a"],(function(e,t,r,o,a,n,f,c,m,d,b,u,i){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a"],(function(e,t,n,a,i,r,o,u,s,m,f){"use strict";const c=new t.Cartesian3;function d(e){const n=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).minimum,a=e.maximum;this._min=t.Cartesian3.clone(n),this._max=t.Cartesian3.clone(a),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}d.fromDimensions=function(e){const n=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).dimensions,a=t.Cartesian3.multiplyByScalar(n,.5,new t.Cartesian3);return new d({minimum:t.Cartesian3.negate(a,new t.Cartesian3),maximum:a,offsetAttribute:e.offsetAttribute})},d.fromAxisAlignedBoundingBox=function(e){return new d({minimum:e.minimum,maximum:e.maximum})},d.packedLength=2*t.Cartesian3.packedLength+1,d.pack=function(e,n,a){return a=i.defaultValue(a,0),t.Cartesian3.pack(e._min,n,a),t.Cartesian3.pack(e._max,n,a+t.Cartesian3.packedLength),n[a+2*t.Cartesian3.packedLength]=i.defaultValue(e._offsetAttribute,-1),n};const p=new t.Cartesian3,l=new t.Cartesian3,b={minimum:p,maximum:l,offsetAttribute:void 0};return d.unpack=function(e,n,a){n=i.defaultValue(n,0);const r=t.Cartesian3.unpack(e,n,p),o=t.Cartesian3.unpack(e,n+t.Cartesian3.packedLength,l),u=e[n+2*t.Cartesian3.packedLength];return i.defined(a)?(a._min=t.Cartesian3.clone(r,a._min),a._max=t.Cartesian3.clone(o,a._max),a._offsetAttribute=-1===u?void 0:u,a):(b.offsetAttribute=-1===u?void 0:u,new d(b))},d.createGeometry=function(n){const s=n._min,m=n._max;if(t.Cartesian3.equals(s,m))return;const f=new o.GeometryAttributes,d=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new r.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),d[0]=4,d[1]=5,d[2]=5,d[3]=6,d[4]=6,d[5]=7,d[6]=7,d[7]=4,d[8]=0,d[9]=1,d[10]=1,d[11]=2,d[12]=2,d[13]=3,d[14]=3,d[15]=0,d[16]=0,d[17]=4,d[18]=1,d[19]=5,d[20]=2,d[21]=6,d[22]=3,d[23]=7;const l=t.Cartesian3.subtract(m,s,c),b=.5*t.Cartesian3.magnitude(l);if(i.defined(n._offsetAttribute)){const e=p.length,t=n._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);f.applyOffset=new r.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return new r.Geometry({attributes:f,indices:d,primitiveType:r.PrimitiveType.LINES,boundingSphere:new e.BoundingSphere(t.Cartesian3.ZERO,b),offsetAttribute:n._offsetAttribute})},function(e,t){return i.defined(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}})); | ||
define(["./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52"],(function(e,t,n,a,i,r,o,u,s,m,f){"use strict";const c=new t.Cartesian3;function d(e){const n=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).minimum,a=e.maximum;this._min=t.Cartesian3.clone(n),this._max=t.Cartesian3.clone(a),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}d.fromDimensions=function(e){const n=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).dimensions,a=t.Cartesian3.multiplyByScalar(n,.5,new t.Cartesian3);return new d({minimum:t.Cartesian3.negate(a,new t.Cartesian3),maximum:a,offsetAttribute:e.offsetAttribute})},d.fromAxisAlignedBoundingBox=function(e){return new d({minimum:e.minimum,maximum:e.maximum})},d.packedLength=2*t.Cartesian3.packedLength+1,d.pack=function(e,n,a){return a=i.defaultValue(a,0),t.Cartesian3.pack(e._min,n,a),t.Cartesian3.pack(e._max,n,a+t.Cartesian3.packedLength),n[a+2*t.Cartesian3.packedLength]=i.defaultValue(e._offsetAttribute,-1),n};const p=new t.Cartesian3,l=new t.Cartesian3,y={minimum:p,maximum:l,offsetAttribute:void 0};return d.unpack=function(e,n,a){n=i.defaultValue(n,0);const r=t.Cartesian3.unpack(e,n,p),o=t.Cartesian3.unpack(e,n+t.Cartesian3.packedLength,l),u=e[n+2*t.Cartesian3.packedLength];return i.defined(a)?(a._min=t.Cartesian3.clone(r,a._min),a._max=t.Cartesian3.clone(o,a._max),a._offsetAttribute=-1===u?void 0:u,a):(y.offsetAttribute=-1===u?void 0:u,new d(y))},d.createGeometry=function(n){const s=n._min,m=n._max;if(t.Cartesian3.equals(s,m))return;const f=new o.GeometryAttributes,d=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new r.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),d[0]=4,d[1]=5,d[2]=5,d[3]=6,d[4]=6,d[5]=7,d[6]=7,d[7]=4,d[8]=0,d[9]=1,d[10]=1,d[11]=2,d[12]=2,d[13]=3,d[14]=3,d[15]=0,d[16]=0,d[17]=4,d[18]=1,d[19]=5,d[20]=2,d[21]=6,d[22]=3,d[23]=7;const l=t.Cartesian3.subtract(m,s,c),y=.5*t.Cartesian3.magnitude(l);if(i.defined(n._offsetAttribute)){const e=p.length,t=n._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);f.applyOffset=new r.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return new r.Geometry({attributes:f,indices:d,primitiveType:r.PrimitiveType.LINES,boundingSphere:new e.BoundingSphere(t.Cartesian3.ZERO,y),offsetAttribute:n._offsetAttribute})},function(e,t){return i.defined(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./RuntimeError-d45af186","./defaultValue-ac2201bb","./EllipseGeometry-81d0a760","./VertexFormat-d53ce9da","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./EllipseGeometryLibrary-70788c4f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryOffsetAttribute-a17b96d9","./GeometryPipeline-f5483757","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./IndexDatatype-88be9f5a","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,i,r,o,n,s,a,l,d,m,c,u,p,y,_,G,x,h,f,g){"use strict";function b(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new r.EllipseGeometry(o),this._workerName="createCircleGeometry"}b.packedLength=r.EllipseGeometry.packedLength,b.pack=function(e,t,i){return r.EllipseGeometry.pack(e._ellipseGeometry,t,i)};const E=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),w={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new o.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return b.unpack=function(t,n,s){const a=r.EllipseGeometry.unpack(t,n,E);return w.center=e.Cartesian3.clone(a._center,w.center),w.ellipsoid=e.Ellipsoid.clone(a._ellipsoid,w.ellipsoid),w.height=a._height,w.extrudedHeight=a._extrudedHeight,w.granularity=a._granularity,w.vertexFormat=o.VertexFormat.clone(a._vertexFormat,w.vertexFormat),w.stRotation=a._stRotation,w.shadowVolume=a._shadowVolume,i.defined(s)?(w.semiMajorAxis=a._semiMajorAxis,w.semiMinorAxis=a._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(w),s):(w.radius=a._semiMajorAxis,new b(w))},b.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},b.createShadowVolume=function(e,t,i){const r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(r,n),a=i(r,n);return new b({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:s,height:a,vertexFormat:o.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(b.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,r){return i.defined(r)&&(t=b.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),b.createGeometry(t)}})); | ||
define(["./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./EllipseGeometry-197109d7","./VertexFormat-4362bb4a","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./EllipseGeometryLibrary-402d6780","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryOffsetAttribute-ddcc2f7f","./GeometryPipeline-9eaa7fbb","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./IndexDatatype-d42fd89c","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,i,r,o,n,s,a,l,d,m,c,u,p,y,_,G,f,x,h,g){"use strict";function E(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new r.EllipseGeometry(o),this._workerName="createCircleGeometry"}E.packedLength=r.EllipseGeometry.packedLength,E.pack=function(e,t,i){return r.EllipseGeometry.pack(e._ellipseGeometry,t,i)};const b=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),w={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new o.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return E.unpack=function(t,n,s){const a=r.EllipseGeometry.unpack(t,n,b);return w.center=e.Cartesian3.clone(a._center,w.center),w.ellipsoid=e.Ellipsoid.clone(a._ellipsoid,w.ellipsoid),w.height=a._height,w.extrudedHeight=a._extrudedHeight,w.granularity=a._granularity,w.vertexFormat=o.VertexFormat.clone(a._vertexFormat,w.vertexFormat),w.stRotation=a._stRotation,w.shadowVolume=a._shadowVolume,i.defined(s)?(w.semiMajorAxis=a._semiMajorAxis,w.semiMinorAxis=a._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(w),s):(w.radius=a._semiMajorAxis,new E(w))},E.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},E.createShadowVolume=function(e,t,i){const r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(r,n),a=i(r,n);return new E({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:s,height:a,vertexFormat:o.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(E.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,r){return i.defined(r)&&(t=E.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),E.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./RuntimeError-d45af186","./defaultValue-ac2201bb","./EllipseOutlineGeometry-ef9f1c9f","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./EllipseGeometryLibrary-70788c4f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a"],(function(e,i,t,r,l,n,s,o,a,d,u,c,m,p){"use strict";function y(e){const i=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}y.packedLength=r.EllipseOutlineGeometry.packedLength,y.pack=function(e,i,t){return r.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,t)};const f=new r.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),G={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return y.unpack=function(i,l,n){const s=r.EllipseOutlineGeometry.unpack(i,l,f);return G.center=e.Cartesian3.clone(s._center,G.center),G.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,G.ellipsoid),G.height=s._height,G.extrudedHeight=s._extrudedHeight,G.granularity=s._granularity,G.numberOfVerticalLines=s._numberOfVerticalLines,t.defined(n)?(G.semiMajorAxis=s._semiMajorAxis,G.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new r.EllipseOutlineGeometry(G),n):(G.radius=s._semiMajorAxis,new y(G))},y.createGeometry=function(e){return r.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(i,r){return t.defined(r)&&(i=y.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),y.createGeometry(i)}})); | ||
define(["./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./EllipseOutlineGeometry-bde24798","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./EllipseGeometryLibrary-402d6780","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c"],(function(e,i,t,r,l,n,s,o,a,d,c,u,m,p){"use strict";function y(e){const i=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}y.packedLength=r.EllipseOutlineGeometry.packedLength,y.pack=function(e,i,t){return r.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,t)};const f=new r.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),G={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return y.unpack=function(i,l,n){const s=r.EllipseOutlineGeometry.unpack(i,l,f);return G.center=e.Cartesian3.clone(s._center,G.center),G.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,G.ellipsoid),G.height=s._height,G.extrudedHeight=s._extrudedHeight,G.granularity=s._granularity,G.numberOfVerticalLines=s._numberOfVerticalLines,t.defined(n)?(G.semiMajorAxis=s._semiMajorAxis,G.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new r.EllipseOutlineGeometry(G),n):(G.radius=s._semiMajorAxis,new y(G))},y.createGeometry=function(e){return r.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(i,r){return t.defined(r)&&(i=y.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),y.createGeometry(i)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./arrayRemoveDuplicates-75feaa04","./BoundingRectangle-6bfae79e","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./CoplanarPolygonGeometryLibrary-a1f1ef31","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonGeometryLibrary-c5c437c2","./PolygonPipeline-666b269f","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./OrientedBoundingBox-e7e81288","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./ArcType-5c683766","./EllipsoidRhumbLine-e7a75836"],(function(e,t,n,o,a,r,i,s,l,c,y,p,d,u,m,g,b,f,C,h,x,P,A,L,w,G,F,v){"use strict";const E=new o.Cartesian3,_=new t.BoundingRectangle,T=new o.Cartesian2,k=new o.Cartesian2,D=new o.Cartesian3,V=new o.Cartesian3,R=new o.Cartesian3,H=new o.Cartesian3,I=new o.Cartesian3,M=new o.Cartesian3,B=new n.Quaternion,O=new o.Matrix3,z=new o.Matrix3,S=new o.Cartesian3;function N(e,t,a,i,y,p,u,g,b){const f=e.positions;let C=m.PolygonPipeline.triangulate(e.positions2D,e.holes);C.length<3&&(C=[0,1,2]);const h=d.IndexDatatype.createTypedArray(f.length,C.length);h.set(C);let x=O;if(0!==i){let e=n.Quaternion.fromAxisAngle(u,i,B);if(x=o.Matrix3.fromQuaternion(e,x),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(u,-i,B);const a=o.Matrix3.fromQuaternion(e,z);g=o.Cartesian3.normalize(o.Matrix3.multiplyByVector(a,g,g),g),t.bitangent&&(b=o.Cartesian3.normalize(o.Cartesian3.cross(u,g,b),b))}}else x=o.Matrix3.clone(o.Matrix3.IDENTITY,x);const P=k;t.st&&(P.x=a.x,P.y=a.y);const A=f.length,L=3*A,w=new Float64Array(L),G=t.normal?new Float32Array(L):void 0,F=t.tangent?new Float32Array(L):void 0,v=t.bitangent?new Float32Array(L):void 0,_=t.st?new Float32Array(2*A):void 0;let D=0,V=0,R=0,H=0,I=0;for(let e=0;e<A;e++){const n=f[e];if(w[D++]=n.x,w[D++]=n.y,w[D++]=n.z,t.st)if(s.defined(y)&&y.positions.length===A)_[I++]=y.positions[e].x,_[I++]=y.positions[e].y;else{const e=p(o.Matrix3.multiplyByVector(x,n,E),T);o.Cartesian2.subtract(e,P,e);const t=r.CesiumMath.clamp(e.x/a.width,0,1),i=r.CesiumMath.clamp(e.y/a.height,0,1);_[I++]=t,_[I++]=i}t.normal&&(G[V++]=u.x,G[V++]=u.y,G[V++]=u.z),t.tangent&&(F[H++]=g.x,F[H++]=g.y,F[H++]=g.z),t.bitangent&&(v[R++]=b.x,v[R++]=b.y,v[R++]=b.z)}const M=new c.GeometryAttributes;return t.position&&(M.position=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})),t.normal&&(M.normal=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),t.tangent&&(M.tangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:F})),t.bitangent&&(M.bitangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.st&&(M.st=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:_})),new l.Geometry({attributes:M,indices:h,primitiveType:l.PrimitiveType.TRIANGLES})}function Q(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,a=s.defaultValue(e.vertexFormat,g.VertexFormat.DEFAULT);this._vertexFormat=g.VertexFormat.clone(a),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=o.Ellipsoid.clone(s.defaultValue(e.ellipsoid,o.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t,o.Cartesian3)+g.VertexFormat.packedLength+o.Ellipsoid.packedLength+(s.defined(n)?u.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}Q.fromPositions=function(e){return new Q({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},Q.pack=function(e,t,n){return n=s.defaultValue(n,0),n=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,o.Cartesian3),o.Ellipsoid.pack(e._ellipsoid,t,n),n+=o.Ellipsoid.packedLength,g.VertexFormat.pack(e._vertexFormat,t,n),n+=g.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=u.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const j=o.Ellipsoid.clone(o.Ellipsoid.UNIT_SPHERE),U=new g.VertexFormat,Y={polygonHierarchy:{}};return Q.unpack=function(e,t,n){t=s.defaultValue(t,0);const a=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian3);t=a.startingIndex,delete a.startingIndex;const r=o.Ellipsoid.unpack(e,t,j);t+=o.Ellipsoid.packedLength;const i=g.VertexFormat.unpack(e,t,U);t+=g.VertexFormat.packedLength;const l=e[t++],c=-1===e[t]?void 0:u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(c)?(t=c.startingIndex,delete c.startingIndex):t++;const y=e[t++];return s.defined(n)||(n=new Q(Y)),n._polygonHierarchy=a,n._ellipsoid=o.Ellipsoid.clone(r,n._ellipsoid),n._vertexFormat=g.VertexFormat.clone(i,n._vertexFormat),n._stRotation=l,n._textureCoordinates=c,n.packedLength=y,n},Q.createGeometry=function(t){const a=t._vertexFormat,c=t._polygonHierarchy,m=t._stRotation,g=t._textureCoordinates,b=s.defined(g);let f=c.positions;if(f=e.arrayRemoveDuplicates(f,o.Cartesian3.equalsEpsilon,!0),f.length<3)return;let C=D,h=V,x=R,P=I;const A=M;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(f,H,P,A))return;if(C=o.Cartesian3.cross(P,A,C),C=o.Cartesian3.normalize(C,C),!o.Cartesian3.equalsEpsilon(H,o.Cartesian3.ZERO,r.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(H,S);o.Cartesian3.dot(C,e)<0&&(C=o.Cartesian3.negate(C,C),P=o.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(H,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(H,P,A);a.tangent&&(h=o.Cartesian3.clone(P,h)),a.bitangent&&(x=o.Cartesian3.clone(A,x));const G=u.PolygonGeometryLibrary.polygonsFromHierarchy(c,b,L,!1),F=G.hierarchy,v=G.polygons,E=b?u.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;f=F[0].outerRing;const T=n.BoundingSphere.fromPoints(f),k=u.PolygonGeometryLibrary.computeBoundingRectangle(C,w,f,m,_),B=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:N(v[e],a,k,m,b?E[e]:void 0,w,C,h,x)});B.push(t)}const O=p.GeometryPipeline.combineInstances(B)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=d.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return a.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:T})},function(e,t){return s.defined(t)&&(e=Q.unpack(e,t)),Q.createGeometry(e)}})); | ||
define(["./arrayRemoveDuplicates-d332a3bf","./BoundingRectangle-d55ba9f7","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./CoplanarPolygonGeometryLibrary-81615a1e","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonGeometryLibrary-b5d25b76","./PolygonPipeline-71c413e2","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./OrientedBoundingBox-771a41b6","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./ArcType-b570b3ee","./EllipsoidRhumbLine-c3b11f35"],(function(e,t,n,o,a,r,i,s,l,c,y,p,u,d,m,g,b,f,C,h,x,P,A,L,w,G,F,v){"use strict";const E=new o.Cartesian3,_=new t.BoundingRectangle,T=new o.Cartesian2,k=new o.Cartesian2,D=new o.Cartesian3,V=new o.Cartesian3,R=new o.Cartesian3,H=new o.Cartesian3,I=new o.Cartesian3,M=new o.Cartesian3,B=new n.Quaternion,O=new o.Matrix3,z=new o.Matrix3,S=new o.Cartesian3;function N(e,t,a,i,y,p,d,g,b){const f=e.positions;let C=m.PolygonPipeline.triangulate(e.positions2D,e.holes);C.length<3&&(C=[0,1,2]);const h=u.IndexDatatype.createTypedArray(f.length,C.length);h.set(C);let x=O;if(0!==i){let e=n.Quaternion.fromAxisAngle(d,i,B);if(x=o.Matrix3.fromQuaternion(e,x),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(d,-i,B);const a=o.Matrix3.fromQuaternion(e,z);g=o.Cartesian3.normalize(o.Matrix3.multiplyByVector(a,g,g),g),t.bitangent&&(b=o.Cartesian3.normalize(o.Cartesian3.cross(d,g,b),b))}}else x=o.Matrix3.clone(o.Matrix3.IDENTITY,x);const P=k;t.st&&(P.x=a.x,P.y=a.y);const A=f.length,L=3*A,w=new Float64Array(L),G=t.normal?new Float32Array(L):void 0,F=t.tangent?new Float32Array(L):void 0,v=t.bitangent?new Float32Array(L):void 0,_=t.st?new Float32Array(2*A):void 0;let D=0,V=0,R=0,H=0,I=0;for(let e=0;e<A;e++){const n=f[e];if(w[D++]=n.x,w[D++]=n.y,w[D++]=n.z,t.st)if(s.defined(y)&&y.positions.length===A)_[I++]=y.positions[e].x,_[I++]=y.positions[e].y;else{const e=p(o.Matrix3.multiplyByVector(x,n,E),T);o.Cartesian2.subtract(e,P,e);const t=r.CesiumMath.clamp(e.x/a.width,0,1),i=r.CesiumMath.clamp(e.y/a.height,0,1);_[I++]=t,_[I++]=i}t.normal&&(G[V++]=d.x,G[V++]=d.y,G[V++]=d.z),t.tangent&&(F[H++]=g.x,F[H++]=g.y,F[H++]=g.z),t.bitangent&&(v[R++]=b.x,v[R++]=b.y,v[R++]=b.z)}const M=new c.GeometryAttributes;return t.position&&(M.position=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})),t.normal&&(M.normal=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),t.tangent&&(M.tangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:F})),t.bitangent&&(M.bitangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.st&&(M.st=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:_})),new l.Geometry({attributes:M,indices:h,primitiveType:l.PrimitiveType.TRIANGLES})}function Q(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,a=s.defaultValue(e.vertexFormat,g.VertexFormat.DEFAULT);this._vertexFormat=g.VertexFormat.clone(a),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=o.Ellipsoid.clone(s.defaultValue(e.ellipsoid,o.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=d.PolygonGeometryLibrary.computeHierarchyPackedLength(t,o.Cartesian3)+g.VertexFormat.packedLength+o.Ellipsoid.packedLength+(s.defined(n)?d.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}Q.fromPositions=function(e){return new Q({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},Q.pack=function(e,t,n){return n=s.defaultValue(n,0),n=d.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,o.Cartesian3),o.Ellipsoid.pack(e._ellipsoid,t,n),n+=o.Ellipsoid.packedLength,g.VertexFormat.pack(e._vertexFormat,t,n),n+=g.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=d.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const j=o.Ellipsoid.clone(o.Ellipsoid.UNIT_SPHERE),U=new g.VertexFormat,Y={polygonHierarchy:{}};return Q.unpack=function(e,t,n){t=s.defaultValue(t,0);const a=d.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian3);t=a.startingIndex,delete a.startingIndex;const r=o.Ellipsoid.unpack(e,t,j);t+=o.Ellipsoid.packedLength;const i=g.VertexFormat.unpack(e,t,U);t+=g.VertexFormat.packedLength;const l=e[t++],c=-1===e[t]?void 0:d.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(c)?(t=c.startingIndex,delete c.startingIndex):t++;const y=e[t++];return s.defined(n)||(n=new Q(Y)),n._polygonHierarchy=a,n._ellipsoid=o.Ellipsoid.clone(r,n._ellipsoid),n._vertexFormat=g.VertexFormat.clone(i,n._vertexFormat),n._stRotation=l,n._textureCoordinates=c,n.packedLength=y,n},Q.createGeometry=function(t){const a=t._vertexFormat,c=t._polygonHierarchy,m=t._stRotation,g=t._textureCoordinates,b=s.defined(g);let f=c.positions;if(f=e.arrayRemoveDuplicates(f,o.Cartesian3.equalsEpsilon,!0),f.length<3)return;let C=D,h=V,x=R,P=I;const A=M;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(f,H,P,A))return;if(C=o.Cartesian3.cross(P,A,C),C=o.Cartesian3.normalize(C,C),!o.Cartesian3.equalsEpsilon(H,o.Cartesian3.ZERO,r.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(H,S);o.Cartesian3.dot(C,e)<0&&(C=o.Cartesian3.negate(C,C),P=o.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(H,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(H,P,A);a.tangent&&(h=o.Cartesian3.clone(P,h)),a.bitangent&&(x=o.Cartesian3.clone(A,x));const G=d.PolygonGeometryLibrary.polygonsFromHierarchy(c,b,L,!1),F=G.hierarchy,v=G.polygons,E=b?d.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;f=F[0].outerRing;const T=n.BoundingSphere.fromPoints(f),k=d.PolygonGeometryLibrary.computeBoundingRectangle(C,w,f,m,_),B=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:N(v[e],a,k,m,b?E[e]:void 0,w,C,h,x)});B.push(t)}const O=p.GeometryPipeline.combineInstances(B)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=u.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return a.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:T})},function(e,t){return s.defined(t)&&(e=Q.unpack(e,t)),Q.createGeometry(e)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./arrayRemoveDuplicates-75feaa04","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./CoplanarPolygonGeometryLibrary-a1f1ef31","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonGeometryLibrary-c5c437c2","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./OrientedBoundingBox-e7e81288","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./ArcType-5c683766","./EllipsoidRhumbLine-e7a75836","./PolygonPipeline-666b269f"],(function(e,t,n,o,r,i,a,c,y,l,s,u,p,d,m,f,g,b,h,P,G,L,C,T,E,H){"use strict";function A(e){const t=e.length,n=new Float64Array(3*t),o=u.IndexDatatype.createTypedArray(t,2*t);let i=0,a=0;for(let r=0;r<t;r++){const c=e[r];n[i++]=c.x,n[i++]=c.y,n[i++]=c.z,o[a++]=r,o[a++]=(r+1)%t}const l=new y.GeometryAttributes({position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new c.Geometry({attributes:l,indices:o,primitiveType:c.PrimitiveType.LINES})}function k(e){const t=(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=p.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}k.fromPositions=function(e){return new k({polygonHierarchy:{positions:(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).positions}})},k.pack=function(e,t,o){return o=a.defaultValue(o,0),t[o=p.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const _={polygonHierarchy:{}};return k.unpack=function(e,t,o){t=a.defaultValue(t,0);const r=p.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const i=e[t];return a.defined(o)||(o=new k(_)),o._polygonHierarchy=r,o.packedLength=i,o},k.createGeometry=function(o){const r=o._polygonHierarchy;let a=r.positions;if(a=e.arrayRemoveDuplicates(a,n.Cartesian3.equalsEpsilon,!0),a.length<3)return;if(!i.CoplanarPolygonGeometryLibrary.validOutline(a))return;const y=p.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(r,!1);if(0===y.length)return;const u=[];for(let e=0;e<y.length;e++){const t=new l.GeometryInstance({geometry:A(y[e])});u.push(t)}const d=s.GeometryPipeline.combineInstances(u)[0],m=t.BoundingSphere.fromPoints(r.positions);return new c.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:m})},function(e,t){return a.defined(t)&&(e=k.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),k.createGeometry(e)}})); | ||
define(["./arrayRemoveDuplicates-d332a3bf","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./CoplanarPolygonGeometryLibrary-81615a1e","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonGeometryLibrary-b5d25b76","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./OrientedBoundingBox-771a41b6","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./ArcType-b570b3ee","./EllipsoidRhumbLine-c3b11f35","./PolygonPipeline-71c413e2"],(function(e,t,n,o,r,i,a,c,y,l,s,u,p,d,m,f,b,g,h,P,G,L,C,T,E,H){"use strict";function A(e){const t=e.length,n=new Float64Array(3*t),o=u.IndexDatatype.createTypedArray(t,2*t);let i=0,a=0;for(let r=0;r<t;r++){const c=e[r];n[i++]=c.x,n[i++]=c.y,n[i++]=c.z,o[a++]=r,o[a++]=(r+1)%t}const l=new y.GeometryAttributes({position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new c.Geometry({attributes:l,indices:o,primitiveType:c.PrimitiveType.LINES})}function k(e){const t=(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=p.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}k.fromPositions=function(e){return new k({polygonHierarchy:{positions:(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).positions}})},k.pack=function(e,t,o){return o=a.defaultValue(o,0),t[o=p.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const _={polygonHierarchy:{}};return k.unpack=function(e,t,o){t=a.defaultValue(t,0);const r=p.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const i=e[t];return a.defined(o)||(o=new k(_)),o._polygonHierarchy=r,o.packedLength=i,o},k.createGeometry=function(o){const r=o._polygonHierarchy;let a=r.positions;if(a=e.arrayRemoveDuplicates(a,n.Cartesian3.equalsEpsilon,!0),a.length<3)return;if(!i.CoplanarPolygonGeometryLibrary.validOutline(a))return;const y=p.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(r,!1);if(0===y.length)return;const u=[];for(let e=0;e<y.length;e++){const t=new l.GeometryInstance({geometry:A(y[e])});u.push(t)}const d=s.GeometryPipeline.combineInstances(u)[0],m=t.BoundingSphere.fromPoints(r.positions);return new c.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:m})},function(e,t){return a.defined(t)&&(e=k.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),k.createGeometry(e)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./arrayRemoveDuplicates-75feaa04","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./PolylineVolumeGeometryLibrary-f2bf0782","./CorridorGeometryLibrary-c42346a1","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,b,C,A,_,w,v){"use strict";const T=new r.Cartesian3,G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3;function N(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,o,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,P),P);s.normal&&n.CorridorGeometryLibrary.addAttribute(l,e,i,o),s.tangent&&n.CorridorGeometryLibrary.addAttribute(d,c,i,o),s.bitangent&&n.CorridorGeometryLibrary.addAttribute(u,a,i,o)}function M(t,e,a){const o=t.positions,u=t.corners,m=t.endPositions,f=t.lefts,y=t.normals,p=new d.GeometryAttributes;let g,h,b,C=0,A=0,_=0;for(h=0;h<o.length;h+=2)b=o[h].length-3,C+=b,_+=2*b,A+=o[h+1].length-3;for(C+=3,A+=3,h=0;h<u.length;h++){g=u[h];const t=u[h].leftPositions;s.defined(t)?(b=t.length,C+=b,_+=b):(b=u[h].rightPositions.length,A+=b,_+=b)}const w=s.defined(m);let v;w&&(v=m[0].length-3,C+=v,A+=v,v/=3,_+=6*v);const x=C+A,N=new Float64Array(x),M={normals:e.normal?new Float32Array(x):void 0,tangents:e.tangent?new Float32Array(x):void 0,bitangents:e.bitangent?new Float32Array(x):void 0};let O,I,S,R,k,H,z=0,B=x-1,U=T,Y=G;const W=v/2,q=c.IndexDatatype.createTypedArray(x/3,_);let j=0;if(w){H=E,k=V;const t=m[0];for(U=r.Cartesian3.fromArray(y,0,U),Y=r.Cartesian3.fromArray(f,0,Y),h=0;h<W;h++)H=r.Cartesian3.fromArray(t,3*(W-1-h),H),k=r.Cartesian3.fromArray(t,3*(W+h),k),n.CorridorGeometryLibrary.addAttribute(N,k,z),n.CorridorGeometryLibrary.addAttribute(N,H,void 0,B),D(M,U,Y,z,B,e),I=z/3,R=I+1,O=(B-2)/3,S=O-1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3}let J,K,Q=0,X=0,Z=o[Q++],$=o[Q++];for(N.set(Z,z),N.set($,B-$.length+1),Y=r.Cartesian3.fromArray(f,X,Y),b=$.length-3,h=0;h<b;h+=3)J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,h,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b-h,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),D(M,U,Y,z,B,e),I=z/3,R=I+1,O=(B-2)/3,S=O-1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3;for(J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,b,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),X+=3,h=0;h<u.length;h++){let t;g=u[h];const i=g.leftPositions,l=g.rightPositions;let d,c,m=L,p=E,C=V;if(U=r.Cartesian3.fromArray(y,X,U),s.defined(i)){for(D(M,U,Y,void 0,B,e),B-=3,d=R,c=S,t=0;t<i.length/3;t++)m=r.Cartesian3.fromArray(i,3*t,m),q[j++]=d,q[j++]=c-t-1,q[j++]=c-t,n.CorridorGeometryLibrary.addAttribute(N,m,void 0,B),p=r.Cartesian3.fromArray(N,3*(c-t-1),p),C=r.Cartesian3.fromArray(N,3*d,C),Y=r.Cartesian3.normalize(r.Cartesian3.subtract(p,C,Y),Y),D(M,U,Y,void 0,B,e),B-=3;m=r.Cartesian3.fromArray(N,3*d,m),p=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*c,p),m,p),C=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*(c-t),C),m,C),Y=r.Cartesian3.normalize(r.Cartesian3.add(p,C,Y),Y),D(M,U,Y,z,void 0,e),z+=3}else{for(D(M,U,Y,z,void 0,e),z+=3,d=S,c=R,t=0;t<l.length/3;t++)m=r.Cartesian3.fromArray(l,3*t,m),q[j++]=d,q[j++]=c+t,q[j++]=c+t+1,n.CorridorGeometryLibrary.addAttribute(N,m,z),p=r.Cartesian3.fromArray(N,3*d,p),C=r.Cartesian3.fromArray(N,3*(c+t),C),Y=r.Cartesian3.normalize(r.Cartesian3.subtract(p,C,Y),Y),D(M,U,Y,z,void 0,e),z+=3;m=r.Cartesian3.fromArray(N,3*d,m),p=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*(c+t),p),m,p),C=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*c,C),m,C),Y=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(C,p,Y),Y),Y),D(M,U,Y,void 0,B,e),B-=3}for(Z=o[Q++],$=o[Q++],Z.splice(0,3),$.splice($.length-3,3),N.set(Z,z),N.set($,B-$.length+1),b=$.length-3,X+=3,Y=r.Cartesian3.fromArray(f,X,Y),t=0;t<$.length;t+=3)J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,t,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b-t,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),D(M,U,Y,z,B,e),R=z/3,I=R-1,S=(B-2)/3,O=S+1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3;z-=3,B+=3}if(U=r.Cartesian3.fromArray(y,y.length-3,U),D(M,U,Y,z,B,e),w){z+=3,B-=3,H=E,k=V;const t=m[1];for(h=0;h<W;h++)H=r.Cartesian3.fromArray(t,3*(v-h-1),H),k=r.Cartesian3.fromArray(t,3*h,k),n.CorridorGeometryLibrary.addAttribute(N,H,void 0,B),n.CorridorGeometryLibrary.addAttribute(N,k,z),D(M,U,Y,z,B,e),R=z/3,I=R-1,S=(B-2)/3,O=S+1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3}if(p.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:N}),e.st){const t=new Float32Array(x/3*2);let e,r,a=0;if(w){C/=3,A/=3;const o=Math.PI/(v+1);let n;r=1/(C-v+1),e=1/(A-v+1);const s=v/2;for(h=s+1;h<v+1;h++)n=i.CesiumMath.PI_OVER_TWO+o*h,t[a++]=e*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=1;h<A-v+1;h++)t[a++]=h*e,t[a++]=0;for(h=v;h>s;h--)n=i.CesiumMath.PI_OVER_TWO-h*o,t[a++]=1-e*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=s;h>0;h--)n=i.CesiumMath.PI_OVER_TWO-o*h,t[a++]=1-r*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=C-v;h>0;h--)t[a++]=h*r,t[a++]=1;for(h=1;h<s+1;h++)n=i.CesiumMath.PI_OVER_TWO+o*h,t[a++]=r*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n))}else{for(C/=3,A/=3,r=1/(C-1),e=1/(A-1),h=0;h<A;h++)t[a++]=h*e,t[a++]=0;for(h=C;h>0;h--)t[a++]=(h-1)*r,t[a++]=1}p.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(p.normal=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.normals})),e.tangent&&(p.tangent=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.tangents})),e.bitangent&&(p.bitangent=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.bitangents})),{attributes:p,indices:q}}function O(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function I(t,e){const a=new f.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),o=t.ellipsoid,d=M(n.CorridorGeometryLibrary.computePositions(t),a,o),y=t.height,p=t.extrudedHeight;let g=d.attributes;const h=d.indices;let b=g.position.values,C=b.length;const A=new Float64Array(6*C);let _=new Float64Array(C);_.set(b);let w,v=new Float64Array(4*C);b=m.PolygonPipeline.scaleToGeodeticHeight(b,y,o),v=O(b,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,o),v=O(_,2*C,v),A.set(b),A.set(_,C),A.set(v,2*C),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,o;(e.normal||e.bitangent)&&(i=t.normal.values,o=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=T,y=G,p=E,g=V,h=x,b=L,C=u;for(c=0;c<l;c+=3){const t=C+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(n.CorridorGeometryLibrary.addAttribute(s,g,t),n.CorridorGeometryLibrary.addAttribute(s,g,t+3),n.CorridorGeometryLibrary.addAttribute(s,g,C),n.CorridorGeometryLibrary.addAttribute(s,g,C+3)),(e.tangent||e.bitangent)&&(b=r.Cartesian3.fromArray(i,c,b),e.bitangent&&(n.CorridorGeometryLibrary.addAttribute(m,b,t),n.CorridorGeometryLibrary.addAttribute(m,b,t+3),n.CorridorGeometryLibrary.addAttribute(m,b,C),n.CorridorGeometryLibrary.addAttribute(m,b,C+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(b,g,h),h),n.CorridorGeometryLibrary.addAttribute(d,h,t),n.CorridorGeometryLibrary.addAttribute(d,h,t+3),n.CorridorGeometryLibrary.addAttribute(d,h,C),n.CorridorGeometryLibrary.addAttribute(d,h,C+3))),C+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(o),m.set(o,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const P=C/3;if(t.shadowVolume){const t=g.normal.values;C=t.length;let r=new Float32Array(6*C);for(w=0;w<C;w++)t[w]=-t[w];r.set(t,C),r=O(t,4*C,r),g.extrudeDirection=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(s.defined(t.offsetAttribute)){let e=new Uint8Array(6*P);if(t.offsetAttribute===u.GeometryOffsetAttribute.TOP)e=e.fill(1,0,P).fill(1,2*P,4*P);else{const r=t.offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=P+P,D=c.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);D.set(h);let I,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];D[H++]=r+P,D[H++]=e+P,D[H++]=t+P}for(w=0;w<N;w+=2)I=w+N,S=I+N,R=I+1,k=S+1,D[H++]=I,D[H++]=S,D[H++]=R,D[H++]=R,D[H++]=S,D[H++]=k;return{attributes:g,indices:D}}const S=new r.Cartesian3,R=new r.Cartesian3,k=new r.Cartographic;function H(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,S);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,R),d=r.Cartesian3.cross(s,l,S);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,R),a.cartesianToCartographic(R,k);let y=k.latitude,p=k.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,R),a.cartesianToCartographic(R,k),y=k.latitude,p=k.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const z=new r.Cartesian3,B=new r.Cartesian3,U=new r.Cartographic,Y=new r.Cartographic;function W(e,a,i,n,l){e=N(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||i<=0)return new r.Rectangle;const c=.5*i;let m,f;if(U.latitude=Number.POSITIVE_INFINITY,U.longitude=Number.POSITIVE_INFINITY,Y.latitude=Number.NEGATIVE_INFINITY,Y.longitude=Number.NEGATIVE_INFINITY,n===o.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],z),r.Cartesian3.normalize(z,z),r.Cartesian3.multiplyByScalar(z,c,z),r.Cartesian3.add(t,z,B),a.cartesianToCartographic(B,k),m=k.latitude,f=k.longitude,U.latitude=Math.min(U.latitude,m),U.longitude=Math.min(U.longitude,f),Y.latitude=Math.max(Y.latitude,m),Y.longitude=Math.max(Y.longitude,f)}for(let t=0;t<u-1;++t)H(d[t],d[t+1],a,c,U,Y);const y=d[u-1];r.Cartesian3.subtract(y,d[u-2],z),r.Cartesian3.normalize(z,z),r.Cartesian3.multiplyByScalar(z,c,z),r.Cartesian3.add(y,z,B),H(y,B,a,c,U,Y),n===o.CornerType.ROUNDED&&(a.cartesianToCartographic(B,k),m=k.latitude,f=k.longitude,U.latitude=Math.min(U.latitude,m),U.longitude=Math.min(U.longitude,f),Y.latitude=Math.max(Y.latitude,m),Y.longitude=Math.max(Y.longitude,f));const p=s.defined(l)?l:new r.Rectangle;return p.north=Y.latitude,p.south=U.latitude,p.east=Y.longitude,p.west=U.longitude,p}function q(t){const e=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).positions,a=t.width,n=s.defaultValue(t.height,0),l=s.defaultValue(t.extrudedHeight,n);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(s.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=f.VertexFormat.clone(s.defaultValue(t.vertexFormat,f.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(n,l),this._extrudedHeight=Math.min(n,l),this._cornerType=s.defaultValue(t.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(t.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=s.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+f.VertexFormat.packedLength+7}q.pack=function(t,e,a){a=s.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,f.VertexFormat.pack(t._vertexFormat,e,a),a+=f.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=s.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),J=new f.VertexFormat,K={positions:void 0,ellipsoid:j,vertexFormat:J,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return q.unpack=function(t,e,a){e=s.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const n=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(t,e,J);e+=f.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],y=t[e++],p=1===t[e++],g=t[e];return s.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(n,a._ellipsoid),a._vertexFormat=f.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=y,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(K.positions=o,K.width=d,K.height=u,K.extrudedHeight=c,K.cornerType=m,K.granularity=y,K.shadowVolume=p,K.offsetAttribute=-1===g?void 0:g,new q(K))},q.computeRectangle=function(t,e){const a=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).positions,i=t.width;return W(a,s.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),i,s.defaultValue(t.cornerType,o.CornerType.ROUNDED),e)},q.createGeometry=function(a){let o=a._positions;const d=a._width,c=a._ellipsoid;o=N(o,c);const f=t.arrayRemoveDuplicates(o,r.Cartesian3.equalsEpsilon);if(f.length<2||d<=0)return;const y=a._height,p=a._extrudedHeight,g=!i.CesiumMath.equalsEpsilon(y,p,0,i.CesiumMath.EPSILON2),h=a._vertexFormat,b={ellipsoid:c,positions:f,width:d,cornerType:a._cornerType,granularity:a._granularity,saveAttributes:!0};let C;if(g)b.height=y,b.extrudedHeight=p,b.shadowVolume=a._shadowVolume,b.offsetAttribute=a._offsetAttribute,C=I(b,h);else{if(C=M(n.CorridorGeometryLibrary.computePositions(b),h,c),C.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(C.attributes.position.values,y,c),s.defined(a._offsetAttribute)){const t=a._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=C.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);C.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const A=C.attributes,_=e.BoundingSphere.fromVertices(A.position.values,void 0,3);return h.position||(C.attributes.position.values=void 0),new l.Geometry({attributes:A,indices:C.indices,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:_,offsetAttribute:a._offsetAttribute})},q.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new q({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(q.prototype,{rectangle:{get:function(){return s.defined(this._rectangle)||(this._rectangle=W(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return s.defined(e)&&(t=q.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),q.createGeometry(t)}})); | ||
define(["./arrayRemoveDuplicates-d332a3bf","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./PolylineVolumeGeometryLibrary-1c97d86c","./CorridorGeometryLibrary-4ce028fc","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,C,b,A,_,w,v){"use strict";const T=new r.Cartesian3,G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3;function N(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,o,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,P),P);s.normal&&n.CorridorGeometryLibrary.addAttribute(l,e,i,o),s.tangent&&n.CorridorGeometryLibrary.addAttribute(d,c,i,o),s.bitangent&&n.CorridorGeometryLibrary.addAttribute(u,a,i,o)}function M(t,e,a){const o=t.positions,u=t.corners,m=t.endPositions,f=t.lefts,y=t.normals,p=new d.GeometryAttributes;let g,h,C,b=0,A=0,_=0;for(h=0;h<o.length;h+=2)C=o[h].length-3,b+=C,_+=2*C,A+=o[h+1].length-3;for(b+=3,A+=3,h=0;h<u.length;h++){g=u[h];const t=u[h].leftPositions;s.defined(t)?(C=t.length,b+=C,_+=C):(C=u[h].rightPositions.length,A+=C,_+=C)}const w=s.defined(m);let v;w&&(v=m[0].length-3,b+=v,A+=v,v/=3,_+=6*v);const x=b+A,N=new Float64Array(x),M={normals:e.normal?new Float32Array(x):void 0,tangents:e.tangent?new Float32Array(x):void 0,bitangents:e.bitangent?new Float32Array(x):void 0};let O,I,S,R,k,H,z=0,B=x-1,U=T,Y=G;const W=v/2,q=c.IndexDatatype.createTypedArray(x/3,_);let j=0;if(w){H=E,k=V;const t=m[0];for(U=r.Cartesian3.fromArray(y,0,U),Y=r.Cartesian3.fromArray(f,0,Y),h=0;h<W;h++)H=r.Cartesian3.fromArray(t,3*(W-1-h),H),k=r.Cartesian3.fromArray(t,3*(W+h),k),n.CorridorGeometryLibrary.addAttribute(N,k,z),n.CorridorGeometryLibrary.addAttribute(N,H,void 0,B),D(M,U,Y,z,B,e),I=z/3,R=I+1,O=(B-2)/3,S=O-1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3}let J,K,Q=0,X=0,Z=o[Q++],$=o[Q++];for(N.set(Z,z),N.set($,B-$.length+1),Y=r.Cartesian3.fromArray(f,X,Y),C=$.length-3,h=0;h<C;h+=3)J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,h,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C-h,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),D(M,U,Y,z,B,e),I=z/3,R=I+1,O=(B-2)/3,S=O-1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3;for(J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,C,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),X+=3,h=0;h<u.length;h++){let t;g=u[h];const i=g.leftPositions,l=g.rightPositions;let d,c,m=L,p=E,b=V;if(U=r.Cartesian3.fromArray(y,X,U),s.defined(i)){for(D(M,U,Y,void 0,B,e),B-=3,d=R,c=S,t=0;t<i.length/3;t++)m=r.Cartesian3.fromArray(i,3*t,m),q[j++]=d,q[j++]=c-t-1,q[j++]=c-t,n.CorridorGeometryLibrary.addAttribute(N,m,void 0,B),p=r.Cartesian3.fromArray(N,3*(c-t-1),p),b=r.Cartesian3.fromArray(N,3*d,b),Y=r.Cartesian3.normalize(r.Cartesian3.subtract(p,b,Y),Y),D(M,U,Y,void 0,B,e),B-=3;m=r.Cartesian3.fromArray(N,3*d,m),p=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*c,p),m,p),b=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*(c-t),b),m,b),Y=r.Cartesian3.normalize(r.Cartesian3.add(p,b,Y),Y),D(M,U,Y,z,void 0,e),z+=3}else{for(D(M,U,Y,z,void 0,e),z+=3,d=S,c=R,t=0;t<l.length/3;t++)m=r.Cartesian3.fromArray(l,3*t,m),q[j++]=d,q[j++]=c+t,q[j++]=c+t+1,n.CorridorGeometryLibrary.addAttribute(N,m,z),p=r.Cartesian3.fromArray(N,3*d,p),b=r.Cartesian3.fromArray(N,3*(c+t),b),Y=r.Cartesian3.normalize(r.Cartesian3.subtract(p,b,Y),Y),D(M,U,Y,z,void 0,e),z+=3;m=r.Cartesian3.fromArray(N,3*d,m),p=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*(c+t),p),m,p),b=r.Cartesian3.subtract(r.Cartesian3.fromArray(N,3*c,b),m,b),Y=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(b,p,Y),Y),Y),D(M,U,Y,void 0,B,e),B-=3}for(Z=o[Q++],$=o[Q++],Z.splice(0,3),$.splice($.length-3,3),N.set(Z,z),N.set($,B-$.length+1),C=$.length-3,X+=3,Y=r.Cartesian3.fromArray(f,X,Y),t=0;t<$.length;t+=3)J=a.geodeticSurfaceNormal(r.Cartesian3.fromArray(Z,t,P),P),K=a.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C-t,F),F),U=r.Cartesian3.normalize(r.Cartesian3.add(J,K,U),U),D(M,U,Y,z,B,e),R=z/3,I=R-1,S=(B-2)/3,O=S+1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3;z-=3,B+=3}if(U=r.Cartesian3.fromArray(y,y.length-3,U),D(M,U,Y,z,B,e),w){z+=3,B-=3,H=E,k=V;const t=m[1];for(h=0;h<W;h++)H=r.Cartesian3.fromArray(t,3*(v-h-1),H),k=r.Cartesian3.fromArray(t,3*h,k),n.CorridorGeometryLibrary.addAttribute(N,H,void 0,B),n.CorridorGeometryLibrary.addAttribute(N,k,z),D(M,U,Y,z,B,e),R=z/3,I=R-1,S=(B-2)/3,O=S+1,q[j++]=O,q[j++]=I,q[j++]=S,q[j++]=S,q[j++]=I,q[j++]=R,z+=3,B-=3}if(p.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:N}),e.st){const t=new Float32Array(x/3*2);let e,r,a=0;if(w){b/=3,A/=3;const o=Math.PI/(v+1);let n;r=1/(b-v+1),e=1/(A-v+1);const s=v/2;for(h=s+1;h<v+1;h++)n=i.CesiumMath.PI_OVER_TWO+o*h,t[a++]=e*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=1;h<A-v+1;h++)t[a++]=h*e,t[a++]=0;for(h=v;h>s;h--)n=i.CesiumMath.PI_OVER_TWO-h*o,t[a++]=1-e*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=s;h>0;h--)n=i.CesiumMath.PI_OVER_TWO-o*h,t[a++]=1-r*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n));for(h=b-v;h>0;h--)t[a++]=h*r,t[a++]=1;for(h=1;h<s+1;h++)n=i.CesiumMath.PI_OVER_TWO+o*h,t[a++]=r*(1+Math.cos(n)),t[a++]=.5*(1+Math.sin(n))}else{for(b/=3,A/=3,r=1/(b-1),e=1/(A-1),h=0;h<A;h++)t[a++]=h*e,t[a++]=0;for(h=b;h>0;h--)t[a++]=(h-1)*r,t[a++]=1}p.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(p.normal=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.normals})),e.tangent&&(p.tangent=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.tangents})),e.bitangent&&(p.bitangent=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:M.bitangents})),{attributes:p,indices:q}}function O(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function I(t,e){const a=new f.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),o=t.ellipsoid,d=M(n.CorridorGeometryLibrary.computePositions(t),a,o),y=t.height,p=t.extrudedHeight;let g=d.attributes;const h=d.indices;let C=g.position.values,b=C.length;const A=new Float64Array(6*b);let _=new Float64Array(b);_.set(C);let w,v=new Float64Array(4*b);C=m.PolygonPipeline.scaleToGeodeticHeight(C,y,o),v=O(C,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,o),v=O(_,2*b,v),A.set(C),A.set(_,b),A.set(v,2*b),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,o;(e.normal||e.bitangent)&&(i=t.normal.values,o=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=T,y=G,p=E,g=V,h=x,C=L,b=u;for(c=0;c<l;c+=3){const t=b+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(n.CorridorGeometryLibrary.addAttribute(s,g,t),n.CorridorGeometryLibrary.addAttribute(s,g,t+3),n.CorridorGeometryLibrary.addAttribute(s,g,b),n.CorridorGeometryLibrary.addAttribute(s,g,b+3)),(e.tangent||e.bitangent)&&(C=r.Cartesian3.fromArray(i,c,C),e.bitangent&&(n.CorridorGeometryLibrary.addAttribute(m,C,t),n.CorridorGeometryLibrary.addAttribute(m,C,t+3),n.CorridorGeometryLibrary.addAttribute(m,C,b),n.CorridorGeometryLibrary.addAttribute(m,C,b+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(C,g,h),h),n.CorridorGeometryLibrary.addAttribute(d,h,t),n.CorridorGeometryLibrary.addAttribute(d,h,t+3),n.CorridorGeometryLibrary.addAttribute(d,h,b),n.CorridorGeometryLibrary.addAttribute(d,h,b+3))),b+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(o),m.set(o,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const P=b/3;if(t.shadowVolume){const t=g.normal.values;b=t.length;let r=new Float32Array(6*b);for(w=0;w<b;w++)t[w]=-t[w];r.set(t,b),r=O(t,4*b,r),g.extrudeDirection=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(s.defined(t.offsetAttribute)){let e=new Uint8Array(6*P);if(t.offsetAttribute===u.GeometryOffsetAttribute.TOP)e=e.fill(1,0,P).fill(1,2*P,4*P);else{const r=t.offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=P+P,D=c.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);D.set(h);let I,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];D[H++]=r+P,D[H++]=e+P,D[H++]=t+P}for(w=0;w<N;w+=2)I=w+N,S=I+N,R=I+1,k=S+1,D[H++]=I,D[H++]=S,D[H++]=R,D[H++]=R,D[H++]=S,D[H++]=k;return{attributes:g,indices:D}}const S=new r.Cartesian3,R=new r.Cartesian3,k=new r.Cartographic;function H(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,S);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,R),d=r.Cartesian3.cross(s,l,S);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,R),a.cartesianToCartographic(R,k);let y=k.latitude,p=k.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,R),a.cartesianToCartographic(R,k),y=k.latitude,p=k.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const z=new r.Cartesian3,B=new r.Cartesian3,U=new r.Cartographic,Y=new r.Cartographic;function W(e,a,i,n,l){e=N(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||i<=0)return new r.Rectangle;const c=.5*i;let m,f;if(U.latitude=Number.POSITIVE_INFINITY,U.longitude=Number.POSITIVE_INFINITY,Y.latitude=Number.NEGATIVE_INFINITY,Y.longitude=Number.NEGATIVE_INFINITY,n===o.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],z),r.Cartesian3.normalize(z,z),r.Cartesian3.multiplyByScalar(z,c,z),r.Cartesian3.add(t,z,B),a.cartesianToCartographic(B,k),m=k.latitude,f=k.longitude,U.latitude=Math.min(U.latitude,m),U.longitude=Math.min(U.longitude,f),Y.latitude=Math.max(Y.latitude,m),Y.longitude=Math.max(Y.longitude,f)}for(let t=0;t<u-1;++t)H(d[t],d[t+1],a,c,U,Y);const y=d[u-1];r.Cartesian3.subtract(y,d[u-2],z),r.Cartesian3.normalize(z,z),r.Cartesian3.multiplyByScalar(z,c,z),r.Cartesian3.add(y,z,B),H(y,B,a,c,U,Y),n===o.CornerType.ROUNDED&&(a.cartesianToCartographic(B,k),m=k.latitude,f=k.longitude,U.latitude=Math.min(U.latitude,m),U.longitude=Math.min(U.longitude,f),Y.latitude=Math.max(Y.latitude,m),Y.longitude=Math.max(Y.longitude,f));const p=s.defined(l)?l:new r.Rectangle;return p.north=Y.latitude,p.south=U.latitude,p.east=Y.longitude,p.west=U.longitude,p}function q(t){const e=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).positions,a=t.width,n=s.defaultValue(t.height,0),l=s.defaultValue(t.extrudedHeight,n);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(s.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=f.VertexFormat.clone(s.defaultValue(t.vertexFormat,f.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(n,l),this._extrudedHeight=Math.min(n,l),this._cornerType=s.defaultValue(t.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(t.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=s.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+f.VertexFormat.packedLength+7}q.pack=function(t,e,a){a=s.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,f.VertexFormat.pack(t._vertexFormat,e,a),a+=f.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=s.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),J=new f.VertexFormat,K={positions:void 0,ellipsoid:j,vertexFormat:J,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return q.unpack=function(t,e,a){e=s.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const n=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(t,e,J);e+=f.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],y=t[e++],p=1===t[e++],g=t[e];return s.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(n,a._ellipsoid),a._vertexFormat=f.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=y,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(K.positions=o,K.width=d,K.height=u,K.extrudedHeight=c,K.cornerType=m,K.granularity=y,K.shadowVolume=p,K.offsetAttribute=-1===g?void 0:g,new q(K))},q.computeRectangle=function(t,e){const a=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).positions,i=t.width;return W(a,s.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),i,s.defaultValue(t.cornerType,o.CornerType.ROUNDED),e)},q.createGeometry=function(a){let o=a._positions;const d=a._width,c=a._ellipsoid;o=N(o,c);const f=t.arrayRemoveDuplicates(o,r.Cartesian3.equalsEpsilon);if(f.length<2||d<=0)return;const y=a._height,p=a._extrudedHeight,g=!i.CesiumMath.equalsEpsilon(y,p,0,i.CesiumMath.EPSILON2),h=a._vertexFormat,C={ellipsoid:c,positions:f,width:d,cornerType:a._cornerType,granularity:a._granularity,saveAttributes:!0};let b;if(g)C.height=y,C.extrudedHeight=p,C.shadowVolume=a._shadowVolume,C.offsetAttribute=a._offsetAttribute,b=I(C,h);else{if(b=M(n.CorridorGeometryLibrary.computePositions(C),h,c),b.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(b.attributes.position.values,y,c),s.defined(a._offsetAttribute)){const t=a._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=b.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);b.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const A=b.attributes,_=e.BoundingSphere.fromVertices(A.position.values,void 0,3);return h.position||(b.attributes.position.values=void 0),new l.Geometry({attributes:A,indices:b.indices,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:_,offsetAttribute:a._offsetAttribute})},q.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new q({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(q.prototype,{rectangle:{get:function(){return s.defined(this._rectangle)||(this._rectangle=W(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return s.defined(e)&&(t=q.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),q.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./arrayRemoveDuplicates-75feaa04","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./PolylineVolumeGeometryLibrary-f2bf0782","./CorridorGeometryLibrary-c42346a1","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836"],(function(e,t,i,r,o,n,s,a,l,d,u,p,f,c,h,y,g,b,m,A,_,E,C){"use strict";const G=new i.Cartesian3,T=new i.Cartesian3,P=new i.Cartesian3;function v(e,t){const r=[],u=e.positions,f=e.corners,c=e.endPositions,h=new d.GeometryAttributes;let y,g,b,m=0,A=0,_=0;for(g=0;g<u.length;g+=2)b=u[g].length-3,m+=b,_+=b/3*4,A+=u[g+1].length-3;for(m+=3,A+=3,g=0;g<f.length;g++){y=f[g];const e=f[g].leftPositions;a.defined(e)?(b=e.length,m+=b,_+=b/3*2):(b=f[g].rightPositions.length,A+=b,_+=b/3*2)}const E=a.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const v=m+A,w=new Float64Array(v);let L,D,x,k,V,H,N=0,O=v-1;const I=C/2,S=p.IndexDatatype.createTypedArray(v/3,_+4);let B=0;if(S[B++]=N/3,S[B++]=(O-2)/3,E){r.push(N/3),H=G,V=T;const e=c[0];for(g=0;g<I;g++)H=i.Cartesian3.fromArray(e,3*(I-1-g),H),V=i.Cartesian3.fromArray(e,3*(I+g),V),s.CorridorGeometryLibrary.addAttribute(w,V,N),s.CorridorGeometryLibrary.addAttribute(w,H,void 0,O),D=N/3,k=D+1,L=(O-2)/3,x=L-1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3}let M=0,R=u[M++],U=u[M++];for(w.set(R,N),w.set(U,O-U.length+1),b=U.length-3,r.push(N/3,(O-2)/3),g=0;g<b;g+=3)D=N/3,k=D+1,L=(O-2)/3,x=L-1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;for(g=0;g<f.length;g++){let e;y=f[g];const o=y.leftPositions,l=y.rightPositions;let d,p=P;if(a.defined(o)){for(O-=3,d=x,r.push(k),e=0;e<o.length/3;e++)p=i.Cartesian3.fromArray(o,3*e,p),S[B++]=d-e-1,S[B++]=d-e,s.CorridorGeometryLibrary.addAttribute(w,p,void 0,O),O-=3;r.push(d-Math.floor(o.length/6)),t===n.CornerType.BEVELED&&r.push((O-2)/3+1),N+=3}else{for(N+=3,d=k,r.push(x),e=0;e<l.length/3;e++)p=i.Cartesian3.fromArray(l,3*e,p),S[B++]=d+e,S[B++]=d+e+1,s.CorridorGeometryLibrary.addAttribute(w,p,N),N+=3;r.push(d+Math.floor(l.length/6)),t===n.CornerType.BEVELED&&r.push(N/3-1),O-=3}for(R=u[M++],U=u[M++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,N),w.set(U,O-U.length+1),b=U.length-3,e=0;e<U.length;e+=3)k=N/3,D=k-1,x=(O-2)/3,L=x+1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;N-=3,O+=3,r.push(N/3,(O-2)/3)}if(E){N+=3,O-=3,H=G,V=T;const e=c[1];for(g=0;g<I;g++)H=i.Cartesian3.fromArray(e,3*(C-g-1),H),V=i.Cartesian3.fromArray(e,3*g,V),s.CorridorGeometryLibrary.addAttribute(w,H,void 0,O),s.CorridorGeometryLibrary.addAttribute(w,V,N),k=N/3,D=k-1,x=(O-2)/3,L=x+1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;r.push(N/3)}else r.push(N/3,(O-2)/3);return S[B++]=N/3,S[B++]=(O-2)/3,h.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:S,wallIndices:r}}function w(e){const t=(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).positions,r=e.width,s=a.defaultValue(e.height,0),l=a.defaultValue(e.extrudedHeight,s);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(a.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(s,l),this._extrudedHeight=Math.min(s,l),this._cornerType=a.defaultValue(e.cornerType,n.CornerType.ROUNDED),this._granularity=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}w.pack=function(e,t,r){r=a.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=a.defaultValue(e._offsetAttribute,-1),t};const L=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),D={positions:void 0,ellipsoid:L,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return w.unpack=function(e,t,r){t=a.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const s=i.Ellipsoid.unpack(e,t,L);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],p=e[t++],f=e[t++],c=e[t];return a.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(s,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=p,r._granularity=f,r._offsetAttribute=-1===c?void 0:c,r):(D.positions=n,D.width=l,D.height=d,D.extrudedHeight=u,D.cornerType=p,D.granularity=f,D.offsetAttribute=-1===c?void 0:c,new w(D))},w.createGeometry=function(r){let n=r._positions;const d=r._width,c=r._ellipsoid;n=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(n,c);const h=e.arrayRemoveDuplicates(n,i.Cartesian3.equalsEpsilon);if(h.length<2||d<=0)return;const y=r._height,g=r._extrudedHeight,b=!o.CesiumMath.equalsEpsilon(y,g,0,o.CesiumMath.EPSILON2),m={ellipsoid:c,positions:h,width:d,cornerType:r._cornerType,granularity:r._granularity,saveAttributes:!1};let A;if(b)m.height=y,m.extrudedHeight=g,m.offsetAttribute=r._offsetAttribute,A=function(e){const t=e.ellipsoid,i=v(s.CorridorGeometryLibrary.computePositions(e),e.cornerType),r=i.wallIndices,n=e.height,d=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,g=y.length,b=new Float64Array(g);b.set(y);const m=new Float64Array(2*g);if(y=f.PolygonPipeline.scaleToGeodeticHeight(y,n,t),b=f.PolygonPipeline.scaleToGeodeticHeight(b,d,t),m.set(y),m.set(b,g),c.position.values=m,g/=3,a.defined(e.offsetAttribute)){let t=new Uint8Array(2*g);if(e.offsetAttribute===u.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g);else{const i=e.offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=p.IndexDatatype.createTypedArray(m.length/3,2*(_+r.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+g,E[T++]=t+g}for(A=0;A<r.length;A++)C=r[A],G=C+g,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(m);else{if(A=v(s.CorridorGeometryLibrary.computePositions(m),m.cornerType),A.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,y,c),a.defined(r._offsetAttribute)){const e=A.attributes.position.values.length,t=r._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const _=A.attributes,E=t.BoundingSphere.fromVertices(_.position.values,void 0,3);return new l.Geometry({attributes:_,indices:A.indices,primitiveType:l.PrimitiveType.LINES,boundingSphere:E,offsetAttribute:r._offsetAttribute})},function(e,t){return a.defined(t)&&(e=w.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),w.createGeometry(e)}})); | ||
define(["./arrayRemoveDuplicates-d332a3bf","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./PolylineVolumeGeometryLibrary-1c97d86c","./CorridorGeometryLibrary-4ce028fc","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35"],(function(e,t,i,r,o,n,s,a,l,d,u,f,p,c,h,y,g,b,m,A,_,E,C){"use strict";const G=new i.Cartesian3,T=new i.Cartesian3,P=new i.Cartesian3;function v(e,t){const r=[],u=e.positions,p=e.corners,c=e.endPositions,h=new d.GeometryAttributes;let y,g,b,m=0,A=0,_=0;for(g=0;g<u.length;g+=2)b=u[g].length-3,m+=b,_+=b/3*4,A+=u[g+1].length-3;for(m+=3,A+=3,g=0;g<p.length;g++){y=p[g];const e=p[g].leftPositions;a.defined(e)?(b=e.length,m+=b,_+=b/3*2):(b=p[g].rightPositions.length,A+=b,_+=b/3*2)}const E=a.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const v=m+A,w=new Float64Array(v);let L,D,x,k,V,H,N=0,O=v-1;const I=C/2,S=f.IndexDatatype.createTypedArray(v/3,_+4);let B=0;if(S[B++]=N/3,S[B++]=(O-2)/3,E){r.push(N/3),H=G,V=T;const e=c[0];for(g=0;g<I;g++)H=i.Cartesian3.fromArray(e,3*(I-1-g),H),V=i.Cartesian3.fromArray(e,3*(I+g),V),s.CorridorGeometryLibrary.addAttribute(w,V,N),s.CorridorGeometryLibrary.addAttribute(w,H,void 0,O),D=N/3,k=D+1,L=(O-2)/3,x=L-1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3}let M=0,R=u[M++],U=u[M++];for(w.set(R,N),w.set(U,O-U.length+1),b=U.length-3,r.push(N/3,(O-2)/3),g=0;g<b;g+=3)D=N/3,k=D+1,L=(O-2)/3,x=L-1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;for(g=0;g<p.length;g++){let e;y=p[g];const o=y.leftPositions,l=y.rightPositions;let d,f=P;if(a.defined(o)){for(O-=3,d=x,r.push(k),e=0;e<o.length/3;e++)f=i.Cartesian3.fromArray(o,3*e,f),S[B++]=d-e-1,S[B++]=d-e,s.CorridorGeometryLibrary.addAttribute(w,f,void 0,O),O-=3;r.push(d-Math.floor(o.length/6)),t===n.CornerType.BEVELED&&r.push((O-2)/3+1),N+=3}else{for(N+=3,d=k,r.push(x),e=0;e<l.length/3;e++)f=i.Cartesian3.fromArray(l,3*e,f),S[B++]=d+e,S[B++]=d+e+1,s.CorridorGeometryLibrary.addAttribute(w,f,N),N+=3;r.push(d+Math.floor(l.length/6)),t===n.CornerType.BEVELED&&r.push(N/3-1),O-=3}for(R=u[M++],U=u[M++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,N),w.set(U,O-U.length+1),b=U.length-3,e=0;e<U.length;e+=3)k=N/3,D=k-1,x=(O-2)/3,L=x+1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;N-=3,O+=3,r.push(N/3,(O-2)/3)}if(E){N+=3,O-=3,H=G,V=T;const e=c[1];for(g=0;g<I;g++)H=i.Cartesian3.fromArray(e,3*(C-g-1),H),V=i.Cartesian3.fromArray(e,3*g,V),s.CorridorGeometryLibrary.addAttribute(w,H,void 0,O),s.CorridorGeometryLibrary.addAttribute(w,V,N),k=N/3,D=k-1,x=(O-2)/3,L=x+1,S[B++]=L,S[B++]=x,S[B++]=D,S[B++]=k,N+=3,O-=3;r.push(N/3)}else r.push(N/3,(O-2)/3);return S[B++]=N/3,S[B++]=(O-2)/3,h.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:S,wallIndices:r}}function w(e){const t=(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).positions,r=e.width,s=a.defaultValue(e.height,0),l=a.defaultValue(e.extrudedHeight,s);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(a.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(s,l),this._extrudedHeight=Math.min(s,l),this._cornerType=a.defaultValue(e.cornerType,n.CornerType.ROUNDED),this._granularity=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}w.pack=function(e,t,r){r=a.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=a.defaultValue(e._offsetAttribute,-1),t};const L=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),D={positions:void 0,ellipsoid:L,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return w.unpack=function(e,t,r){t=a.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const s=i.Ellipsoid.unpack(e,t,L);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],f=e[t++],p=e[t++],c=e[t];return a.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(s,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=f,r._granularity=p,r._offsetAttribute=-1===c?void 0:c,r):(D.positions=n,D.width=l,D.height=d,D.extrudedHeight=u,D.cornerType=f,D.granularity=p,D.offsetAttribute=-1===c?void 0:c,new w(D))},w.createGeometry=function(r){let n=r._positions;const d=r._width,c=r._ellipsoid;n=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(n,c);const h=e.arrayRemoveDuplicates(n,i.Cartesian3.equalsEpsilon);if(h.length<2||d<=0)return;const y=r._height,g=r._extrudedHeight,b=!o.CesiumMath.equalsEpsilon(y,g,0,o.CesiumMath.EPSILON2),m={ellipsoid:c,positions:h,width:d,cornerType:r._cornerType,granularity:r._granularity,saveAttributes:!1};let A;if(b)m.height=y,m.extrudedHeight=g,m.offsetAttribute=r._offsetAttribute,A=function(e){const t=e.ellipsoid,i=v(s.CorridorGeometryLibrary.computePositions(e),e.cornerType),r=i.wallIndices,n=e.height,d=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,g=y.length,b=new Float64Array(g);b.set(y);const m=new Float64Array(2*g);if(y=p.PolygonPipeline.scaleToGeodeticHeight(y,n,t),b=p.PolygonPipeline.scaleToGeodeticHeight(b,d,t),m.set(y),m.set(b,g),c.position.values=m,g/=3,a.defined(e.offsetAttribute)){let t=new Uint8Array(2*g);if(e.offsetAttribute===u.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g);else{const i=e.offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=f.IndexDatatype.createTypedArray(m.length/3,2*(_+r.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+g,E[T++]=t+g}for(A=0;A<r.length;A++)C=r[A],G=C+g,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(m);else{if(A=v(s.CorridorGeometryLibrary.computePositions(m),m.cornerType),A.attributes.position.values=p.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,y,c),a.defined(r._offsetAttribute)){const e=A.attributes.position.values.length,t=r._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const _=A.attributes,E=t.BoundingSphere.fromVertices(_.position.values,void 0,3);return new l.Geometry({attributes:_,indices:A.indices,primitiveType:l.PrimitiveType.LINES,boundingSphere:E,offsetAttribute:r._offsetAttribute})},function(e,t){return a.defined(t)&&(e=w.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),w.createGeometry(e)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./CylinderGeometry-d2fb2852","./defaultValue-ac2201bb","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./CylinderGeometryLibrary-ce947880","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./VertexFormat-d53ce9da"],(function(e,t,r,a,d,n,o,i,c,f,m,y,b,u,s){"use strict";return function(r,a){return t.defined(a)&&(r=e.CylinderGeometry.unpack(r,a)),e.CylinderGeometry.createGeometry(r)}})); | ||
define(["./CylinderGeometry-dbd49111","./defaultValue-6ed27e8d","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./CylinderGeometryLibrary-24ffef71","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./VertexFormat-4362bb4a"],(function(e,t,r,a,d,n,f,o,c,i,m,y,b,u,s){"use strict";return function(r,a){return t.defined(a)&&(r=e.CylinderGeometry.unpack(r,a)),e.CylinderGeometry.createGeometry(r)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./CylinderGeometryLibrary-ce947880","./defaultValue-ac2201bb","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a"],(function(t,e,i,n,o,r,a,s,u,f,d,c,l){"use strict";const m=new e.Cartesian2;function b(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}b.packedLength=6,b.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const p={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return b.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(p.length=n,p.topRadius=o,p.bottomRadius=a,p.slices=s,p.numberOfVerticalLines=u,p.offsetAttribute=-1===f?void 0:f,new b(p))},b.createGeometry=function(i){let d=i._length;const c=i._topRadius,l=i._bottomRadius,b=i._slices,p=i._numberOfVerticalLines;if(d<=0||c<0||l<0||0===c&&0===l)return;const y=2*b,_=o.CylinderGeometryLibrary.computePositions(d,c,l,b,!1);let h,A=2*b;if(p>0){const t=Math.min(p,b);h=Math.round(b/t),A+=t}const R=f.IndexDatatype.createTypedArray(y,2*A);let G,O=0;for(G=0;G<b-1;G++)R[O++]=G,R[O++]=G+1,R[O++]=G+b,R[O++]=G+1+b;if(R[O++]=b-1,R[O++]=0,R[O++]=b+b-1,R[O++]=b,p>0)for(G=0;G<b;G+=h)R[O++]=G,R[O++]=G+b;const V=new s.GeometryAttributes;V.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:_}),m.x=.5*d,m.y=Math.max(l,c);const L=new t.BoundingSphere(e.Cartesian3.ZERO,e.Cartesian2.magnitude(m));if(r.defined(i._offsetAttribute)){d=_.length;const t=i._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(d/3).fill(t);V.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:V,indices:R,primitiveType:a.PrimitiveType.LINES,boundingSphere:L,offsetAttribute:i._offsetAttribute})},function(t,e){return r.defined(e)&&(t=b.unpack(t,e)),b.createGeometry(t)}})); | ||
define(["./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./CylinderGeometryLibrary-24ffef71","./defaultValue-6ed27e8d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52"],(function(t,e,i,n,o,r,a,s,u,f,d,c,l){"use strict";const m=new e.Cartesian2;function b(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}b.packedLength=6,b.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const p={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return b.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(p.length=n,p.topRadius=o,p.bottomRadius=a,p.slices=s,p.numberOfVerticalLines=u,p.offsetAttribute=-1===f?void 0:f,new b(p))},b.createGeometry=function(i){let d=i._length;const c=i._topRadius,l=i._bottomRadius,b=i._slices,p=i._numberOfVerticalLines;if(d<=0||c<0||l<0||0===c&&0===l)return;const y=2*b,_=o.CylinderGeometryLibrary.computePositions(d,c,l,b,!1);let h,A=2*b;if(p>0){const t=Math.min(p,b);h=Math.round(b/t),A+=t}const R=f.IndexDatatype.createTypedArray(y,2*A);let G,O=0;for(G=0;G<b-1;G++)R[O++]=G,R[O++]=G+1,R[O++]=G+b,R[O++]=G+1+b;if(R[O++]=b-1,R[O++]=0,R[O++]=b+b-1,R[O++]=b,p>0)for(G=0;G<b;G+=h)R[O++]=G,R[O++]=G+b;const V=new s.GeometryAttributes;V.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:_}),m.x=.5*d,m.y=Math.max(l,c);const L=new t.BoundingSphere(e.Cartesian3.ZERO,e.Cartesian2.magnitude(m));if(r.defined(i._offsetAttribute)){d=_.length;const t=i._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(d/3).fill(t);V.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:V,indices:R,primitiveType:a.PrimitiveType.LINES,boundingSphere:L,offsetAttribute:i._offsetAttribute})},function(t,e){return r.defined(e)&&(t=b.unpack(t,e)),b.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./defaultValue-ac2201bb","./EllipseGeometry-81d0a760","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./EllipseGeometryLibrary-70788c4f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryOffsetAttribute-a17b96d9","./GeometryPipeline-f5483757","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./IndexDatatype-88be9f5a","./IntersectionTests-4db2368e","./Plane-a0b66c27","./VertexFormat-d53ce9da"],(function(e,t,r,a,n,o,i,d,c,s,l,b,f,m,p,u,y,G,E,C,_){"use strict";return function(a,n){return t.defined(n)&&(a=r.EllipseGeometry.unpack(a,n)),a._center=e.Cartesian3.clone(a._center),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),r.EllipseGeometry.createGeometry(a)}})); | ||
define(["./Matrix2-735f0ea9","./defaultValue-6ed27e8d","./EllipseGeometry-197109d7","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./EllipseGeometryLibrary-402d6780","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryOffsetAttribute-ddcc2f7f","./GeometryPipeline-9eaa7fbb","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./IndexDatatype-d42fd89c","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./VertexFormat-4362bb4a"],(function(e,t,r,a,n,o,i,c,d,s,f,l,m,b,p,u,y,G,E,C,_){"use strict";return function(a,n){return t.defined(n)&&(a=r.EllipseGeometry.unpack(a,n)),a._center=e.Cartesian3.clone(a._center),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),r.EllipseGeometry.createGeometry(a)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./defaultValue-ac2201bb","./EllipseOutlineGeometry-ef9f1c9f","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./EllipseGeometryLibrary-70788c4f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a"],(function(e,t,r,i,n,a,o,l,c,d,f,s,u,m){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}})); | ||
define(["./Matrix2-735f0ea9","./defaultValue-6ed27e8d","./EllipseOutlineGeometry-bde24798","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./EllipseGeometryLibrary-402d6780","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c"],(function(e,t,r,i,n,o,a,l,d,c,s,f,u,m){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./EllipsoidGeometry-46aff949","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./VertexFormat-d53ce9da"],(function(e,t,a,r,o,d,n,i,f,c,m,s,b,u){"use strict";return function(a,r){return e.defined(r)&&(a=t.EllipsoidGeometry.unpack(a,r)),t.EllipsoidGeometry.createGeometry(a)}})); | ||
define(["./defaultValue-6ed27e8d","./EllipsoidGeometry-1d494c03","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./VertexFormat-4362bb4a"],(function(e,t,r,a,o,d,n,c,f,i,m,s,u,b){"use strict";return function(r,a){return e.defined(a)&&(r=t.EllipsoidGeometry.unpack(r,a)),t.EllipsoidGeometry.createGeometry(r)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./EllipsoidOutlineGeometry-cdba69a2","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a"],(function(e,t,a,r,n,i,o,d,f,u,b,c,m){"use strict";return function(a,r){return e.defined(a.buffer)&&(a=t.EllipsoidOutlineGeometry.unpack(a,r)),t.EllipsoidOutlineGeometry.createGeometry(a)}})); | ||
define(["./defaultValue-6ed27e8d","./EllipsoidOutlineGeometry-86039893","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c"],(function(e,t,r,n,i,o,a,d,f,c,u,m,s){"use strict";return function(r,n){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,n)),t.EllipsoidOutlineGeometry.createGeometry(r)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./FrustumGeometry-ea1e1a92","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./Plane-a0b66c27","./VertexFormat-d53ce9da"],(function(e,t,r,a,n,o,u,m,c,d,s,f,b){"use strict";return function(r,a){return e.defined(a)&&(r=t.FrustumGeometry.unpack(r,a)),t.FrustumGeometry.createGeometry(r)}})); | ||
define(["./defaultValue-6ed27e8d","./FrustumGeometry-7dd263a9","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./Plane-6c77dfaf","./VertexFormat-4362bb4a"],(function(e,t,r,a,n,o,u,m,c,d,f,s,b){"use strict";return function(r,a){return e.defined(a)&&(r=t.FrustumGeometry.unpack(r,a)),t.FrustumGeometry.createGeometry(r)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./FrustumGeometry-ea1e1a92","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./Plane-a0b66c27","./VertexFormat-d53ce9da"],(function(e,t,r,n,a,u,i,o,c,s,p,m,d){"use strict";function f(n){const a=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;a instanceof u.PerspectiveFrustum?(s=0,p=u.PerspectiveFrustum.packedLength):a instanceof u.OrthographicFrustum&&(s=1,p=u.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=a.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}f.pack=function(n,a,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return a[i++]=o,0===o?(u.PerspectiveFrustum.pack(c,a,i),i+=u.PerspectiveFrustum.packedLength):(u.OrthographicFrustum.pack(c,a,i),i+=u.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,a,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,a,i),a[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,a};const h=new u.PerspectiveFrustum,l=new u.OrthographicFrustum,g=new t.Quaternion,_=new r.Cartesian3;return f.unpack=function(n,a,i){a=e.defaultValue(a,0);const o=n[a++];let c;0===o?(c=u.PerspectiveFrustum.unpack(n,a,h),a+=u.PerspectiveFrustum.packedLength):(c=u.OrthographicFrustum.unpack(n,a,l),a+=u.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,a,_);a+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,a,g),m=1===n[a+=t.Quaternion.packedLength];if(!e.defined(i))return new f({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const d=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(d),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},f.createGeometry=function(e){const r=e._frustumType,n=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);u.FrustumGeometry._computeNearFarPlanes(c,s,r,n,m);const d=new o.GeometryAttributes({position:new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let f,h;const l=p?2:1,g=new Uint16Array(8*(l+1));let _=p?0:1;for(;_<2;++_)f=p?8*_:0,h=4*_,g[f]=h,g[f+1]=h+1,g[f+2]=h+1,g[f+3]=h+2,g[f+4]=h+2,g[f+5]=h+3,g[f+6]=h+3,g[f+7]=h;for(_=0;_<2;++_)f=8*(l+_),h=4*_,g[f]=h,g[f+1]=h+4,g[f+2]=h+1,g[f+3]=h+5,g[f+4]=h+2,g[f+5]=h+6,g[f+6]=h+3,g[f+7]=h+7;return new i.Geometry({attributes:d,indices:g,primitiveType:i.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=f.unpack(t,r)),f.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./FrustumGeometry-7dd263a9","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./Plane-6c77dfaf","./VertexFormat-4362bb4a"],(function(e,t,r,n,a,u,i,o,c,s,p,m,d){"use strict";function f(n){const a=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;a instanceof u.PerspectiveFrustum?(s=0,p=u.PerspectiveFrustum.packedLength):a instanceof u.OrthographicFrustum&&(s=1,p=u.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=a.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}f.pack=function(n,a,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return a[i++]=o,0===o?(u.PerspectiveFrustum.pack(c,a,i),i+=u.PerspectiveFrustum.packedLength):(u.OrthographicFrustum.pack(c,a,i),i+=u.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,a,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,a,i),a[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,a};const h=new u.PerspectiveFrustum,l=new u.OrthographicFrustum,g=new t.Quaternion,_=new r.Cartesian3;return f.unpack=function(n,a,i){a=e.defaultValue(a,0);const o=n[a++];let c;0===o?(c=u.PerspectiveFrustum.unpack(n,a,h),a+=u.PerspectiveFrustum.packedLength):(c=u.OrthographicFrustum.unpack(n,a,l),a+=u.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,a,_);a+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,a,g),m=1===n[a+=t.Quaternion.packedLength];if(!e.defined(i))return new f({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const d=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(d),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},f.createGeometry=function(e){const r=e._frustumType,n=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);u.FrustumGeometry._computeNearFarPlanes(c,s,r,n,m);const d=new o.GeometryAttributes({position:new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let f,h;const l=p?2:1,g=new Uint16Array(8*(l+1));let _=p?0:1;for(;_<2;++_)f=p?8*_:0,h=4*_,g[f]=h,g[f+1]=h+1,g[f+2]=h+1,g[f+3]=h+2,g[f+4]=h+2,g[f+5]=h+3,g[f+6]=h+3,g[f+7]=h;for(_=0;_<2;++_)f=8*(l+_),h=4*_,g[f]=h,g[f+1]=h+4,g[f+2]=h+1,g[f+3]=h+5,g[f+4]=h+2,g[f+5]=h+6,g[f+6]=h+3,g[f+7]=h+7;return new i.Geometry({attributes:d,indices:g,primitiveType:i.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=f.unpack(t,r)),f.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./PrimitivePipeline-4b589c04","./createTaskProcessorWorker","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryPipeline-f5483757","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./IndexDatatype-88be9f5a","./IntersectionTests-4db2368e","./Plane-a0b66c27","./WebMercatorProjection-a6181c09"],(function(e,t,r,n,o,i,a,s,c,f,d,u,b,m,l,p,y,P,k){"use strict";const C={};function G(t){let r=C[t];return e.defined(r)||("object"==typeof exports?C[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,C[r]=e}))),r}return r((function(r,n){const o=r.subTasks,i=o.length,a=new Array(i);for(let t=0;t<i;t++){const r=o[t],n=r.geometry,i=r.moduleName;if(e.defined(i)){const e=G(i);a[t]=e(n,r.offset)}else a[t]=n}return Promise.all(a).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))})); | ||
define(["./defaultValue-6ed27e8d","./PrimitivePipeline-6579baa1","./createTaskProcessorWorker","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryPipeline-9eaa7fbb","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./IndexDatatype-d42fd89c","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./WebMercatorProjection-4d21b562"],(function(e,t,r,n,o,a,i,s,c,f,d,u,b,m,l,p,y,P,k){"use strict";const C={};function G(t){let r=C[t];return e.defined(r)||("object"==typeof exports?C[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,C[r]=e}))),r}return r((function(r,n){const o=r.subTasks,a=o.length,i=new Array(a);for(let t=0;t<a;t++){const r=o[t],n=r.geometry,a=r.moduleName;if(e.defined(a)){const e=G(a);i[t]=e(n,r.offset)}else i[t]=n}return Promise.all(i).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./defaultValue-ac2201bb","./ComponentDatatype-43ab226f","./ArcType-5c683766","./arrayRemoveDuplicates-75feaa04","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./EncodedCartesian3-3f5898d8","./GeometryAttribute-a34d86d0","./IntersectionTests-4db2368e","./Plane-a0b66c27","./WebMercatorProjection-a6181c09","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a"],(function(e,t,a,n,i,r,s,o,l,c,u,C,p,d,h,g,f){"use strict";function m(a){a=n.defaultValue(a,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84),this._rectangle=n.defaultValue(a.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(a.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(a.numberOfLevelZeroTilesY,1)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},m.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},m.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},m.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},m.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,p=s.height/l,d=s.north-a*p,h=s.north-(a+1)*p;return n.defined(r)||(r=new t.Rectangle(u,h,C,d)),r.west=u,r.south=h,r.east=C,r.north=d,r},m.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let p=(C-s.west)/c|0;p>=o&&(p=o-1);let d=(s.north-e.latitude)/u|0;return d>=l&&(d=l-1),n.defined(r)?(r.x=p,r.y=d,r):new t.Cartesian2(p,d)};const w=new t.Cartesian3,y=new t.Cartesian3,M=new t.Cartographic,T=new t.Cartesian3,E=new t.Cartesian3,_=new e.BoundingSphere,O=new m,b=[new t.Cartographic,new t.Cartographic,new t.Cartographic,new t.Cartographic],P=new t.Cartesian2,A={};function k(e){t.Cartographic.fromRadians(e.east,e.north,0,b[0]),t.Cartographic.fromRadians(e.west,e.north,0,b[1]),t.Cartographic.fromRadians(e.east,e.south,0,b[2]),t.Cartographic.fromRadians(e.west,e.south,0,b[3]);let a=0,n=0,i=0,r=0;const s=A._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=b[t];if(O.positionToTileXY(a,o,P),0===t)i=P.x,r=P.y;else if(i!==P.x||r!==P.y){e=!0;break}}if(e)break;a=i,n=r}if(0!==o)return{x:a,y:n,level:o>s?s:o-1}}A.initialize=function(){let t=A._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){A._terrainHeights=e})),A._initPromise=t),t},A.getMinimumMaximumHeights=function(e,a){a=n.defaultValue(a,t.Ellipsoid.WGS84);const i=k(e);let r=A._defaultMinTerrainHeight,s=A._defaultMaxTerrainHeight;if(n.defined(i)){const o=`${i.level}-${i.x}-${i.y}`,l=A._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),a.cartographicToCartesian(t.Rectangle.northeast(e,M),w),a.cartographicToCartesian(t.Rectangle.southwest(e,M),y),t.Cartesian3.midpoint(y,w,T);const c=a.scaleToGeodeticSurface(T,E);if(n.defined(c)){const e=t.Cartesian3.distance(T,c);r=Math.min(r,-e)}else r=A._defaultMinTerrainHeight}return r=Math.max(A._defaultMinTerrainHeight,r),{minimumTerrainHeight:r,maximumTerrainHeight:s}},A.getBoundingSphere=function(a,i){i=n.defaultValue(i,t.Ellipsoid.WGS84);const r=k(a);let s=A._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=A._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(a,i,0);return e.BoundingSphere.fromRectangle3D(a,i,s,_),e.BoundingSphere.union(o,_,o)},A._terrainHeightsMaxLevel=6,A._defaultMaxTerrainHeight=9e3,A._defaultMinTerrainHeight=-1e5,A._terrainHeights=void 0,A._initPromise=void 0,Object.defineProperties(A,{initialized:{get:function(){return n.defined(A._terrainHeights)}}});const L=[e.GeographicProjection,d.WebMercatorProjection],S=L.length,x=Math.cos(i.CesiumMath.toRadians(30)),I=Math.cos(i.CesiumMath.toRadians(150));function N(e){const a=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=a,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=t.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(N.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.Ellipsoid.packedLength+1+1}}}),N.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<S;e++)if(t instanceof L[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const R=new t.Cartesian3,D=new t.Cartesian3,v=new t.Cartesian3;function z(e,a,n,i,r){const s=F(i,e,0,R),o=F(i,e,n,D),l=F(i,a,0,v),c=q(o,s,D),u=q(l,s,v);return t.Cartesian3.cross(u,c,r),t.Cartesian3.normalize(r,r)}const H=new t.Cartographic,j=new t.Cartesian3,B=new t.Cartesian3,V=new t.Cartesian3;function G(e,a,n,i,s,c,u,C,p,d,h){if(0===s)return;let g;c===r.ArcType.GEODESIC?g=new o.EllipsoidGeodesic(e,a,u):c===r.ArcType.RHUMB&&(g=new l.EllipsoidRhumbLine(e,a,u));const f=g.surfaceDistance;if(f<s)return;const m=z(e,a,i,u,V),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,H),a=F(u,e,n,j),r=F(u,e,i,B);t.Cartesian3.pack(m,C,E),t.Cartesian3.pack(a,p,E),t.Cartesian3.pack(r,d,E),h.push(e.latitude),h.push(e.longitude),E+=3,M+=y}}const Y=new t.Cartographic;function F(e,a,n,i){return t.Cartographic.clone(a,Y),Y.height=n,t.Cartographic.toCartesian(Y,e,i)}function q(e,a,n){return t.Cartesian3.subtract(e,a,n),t.Cartesian3.normalize(n,n),n}function X(e,a,n,i){return i=q(e,a,i),i=t.Cartesian3.cross(i,n,i),i=t.Cartesian3.normalize(i,i),i=t.Cartesian3.cross(n,i,i)}N.pack=function(e,a,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;a[r++]=o;for(let e=0;e<o;++e){const n=s[e];t.Cartesian3.pack(n,a,r),r+=3}return a[r++]=e.granularity,a[r++]=e.loop?1:0,a[r++]=e.arcType,t.Ellipsoid.pack(e._ellipsoid,a,r),r+=t.Ellipsoid.packedLength,a[r++]=e._projectionIndex,a[r++]=e._scene3DOnly?1:0,a},N.unpack=function(e,a,i){let r=n.defaultValue(a,0);const s=e[r++],o=new Array(s);for(let a=0;a<s;a++)o[a]=t.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=t.Ellipsoid.unpack(e,r);r+=t.Ellipsoid.packedLength;const p=e[r++],d=1===e[r++];return n.defined(i)||(i=new N({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=p,i._scene3DOnly=d,i};const W=new t.Cartesian3,U=new t.Cartesian3,Z=new t.Cartesian3,$=new t.Cartesian3;function J(e,a,n,r,s){const o=q(n,a,$),l=X(e,a,o,W),c=X(r,a,o,U);if(i.CesiumMath.equalsEpsilon(t.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=t.Cartesian3.cross(o,l,s),s=t.Cartesian3.normalize(s,s);s=t.Cartesian3.add(c,l,s),s=t.Cartesian3.normalize(s,s);const u=t.Cartesian3.cross(o,s,Z);return t.Cartesian3.dot(c,u)<0&&(s=t.Cartesian3.negate(s,s)),s}const Q=p.Plane.fromPointNormal(t.Cartesian3.ZERO,t.Cartesian3.UNIT_Y),K=new t.Cartesian3,ee=new t.Cartesian3,te=new t.Cartesian3,ae=new t.Cartesian3,ne=new t.Cartesian3,ie=new t.Cartesian3,re=new t.Cartographic,se=new t.Cartographic,oe=new t.Cartographic;N.createGeometry=function(a){const o=!a._scene3DOnly;let p=a.loop;const d=a._ellipsoid,h=a.granularity,g=a.arcType,f=new L[a._projectionIndex](d),m=1e3;let w,y;const M=a._positions,T=M.length;let E,_,O,b;2===T&&(p=!1);const P=new l.EllipsoidRhumbLine(void 0,void 0,d);let k,S,I;const N=[M[0]];for(y=0;y<T-1;y++)E=M[y],_=M[y+1],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))),N.push(_);p&&(E=M[T-1],_=M[0],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))));let R=N.length,D=new Array(R);for(y=0;y<R;y++){const e=t.Cartographic.fromCartesian(N[y],d);e.height=0,D[y]=e}if(D=s.arrayRemoveDuplicates(D,t.Cartographic.equalsEpsilon),R=D.length,R<2)return;const v=[],H=[],j=[],B=[];let V=K,Y=ee,X=te,W=ae,U=ne;const Z=D[0],$=D[1];for(V=F(d,D[R-1],0,V),W=F(d,$,0,W),Y=F(d,Z,0,Y),X=F(d,Z,m,X),U=p?J(V,Y,X,W,U):z(Z,$,m,d,U),t.Cartesian3.pack(U,H,0),t.Cartesian3.pack(Y,j,0),t.Cartesian3.pack(X,B,0),v.push(Z.latitude),v.push(Z.longitude),G(Z,$,0,m,h,g,d,H,j,B,v),y=1;y<R-1;++y){V=t.Cartesian3.clone(Y,V),Y=t.Cartesian3.clone(W,Y);const e=D[y];F(d,e,m,X),F(d,D[y+1],0,W),J(V,Y,X,W,U),w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(e.latitude),v.push(e.longitude),G(D[y],D[y+1],0,m,h,g,d,H,j,B,v)}const le=D[R-1],ce=D[R-2];if(Y=F(d,le,0,Y),X=F(d,le,m,X),p){const e=D[0];V=F(d,ce,0,V),W=F(d,e,0,W),U=J(V,Y,X,W,U)}else U=z(ce,le,m,d,U);if(w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(le.latitude),v.push(le.longitude),p){for(G(le,Z,0,m,h,g,d,H,j,B,v),w=H.length,y=0;y<3;++y)H[w+y]=H[y],j[w+y]=j[y],B[w+y]=B[y];v.push(Z.latitude),v.push(Z.longitude)}return function(a,n,r,s,o,l,C){let p,d;const h=n._ellipsoid,g=r.length/3-1,f=8*g,m=4*f,w=36*g,y=f>65535?new Uint32Array(w):new Uint16Array(w),M=new Float64Array(3*f),T=new Float32Array(m),E=new Float32Array(m),_=new Float32Array(m),O=new Float32Array(m),b=new Float32Array(m);let P,k,L,S;C&&(P=new Float32Array(m),k=new Float32Array(m),L=new Float32Array(m),S=new Float32Array(2*f));const I=l.length/2;let N=0;const R=Ee;R.height=0;const D=_e;D.height=0;let v=Oe,z=be;if(C)for(d=0,p=1;p<I;p++)R.latitude=l[d],R.longitude=l[d+1],D.latitude=l[d+2],D.longitude=l[d+3],v=n.project(R,v),z=n.project(D,z),N+=t.Cartesian3.distance(v,z),d+=2;const H=s.length/3;z=t.Cartesian3.unpack(s,0,z);let j,B=0;for(d=3,p=1;p<H;p++)v=t.Cartesian3.clone(z,v),z=t.Cartesian3.unpack(s,d,z),B+=t.Cartesian3.distance(v,z),d+=3;d=3;let V=0,G=0,Y=0,F=0,X=!1,W=t.Cartesian3.unpack(r,0,Ae),U=t.Cartesian3.unpack(s,0,be),Z=t.Cartesian3.unpack(o,0,Le);if(a){Ce(Z,t.Cartesian3.unpack(r,r.length-6,Pe),W,U)&&(Z=t.Cartesian3.negate(Z,Z))}let $=0,J=0,Q=0;for(p=0;p<g;p++){const e=t.Cartesian3.clone(W,Pe),a=t.Cartesian3.clone(U,Oe);let u,p,g,f,m=t.Cartesian3.clone(Z,ke);if(X&&(m=t.Cartesian3.negate(m,m)),W=t.Cartesian3.unpack(r,d,Ae),U=t.Cartesian3.unpack(s,d,be),Z=t.Cartesian3.unpack(o,d,Le),X=Ce(Z,e,W,U),R.latitude=l[V],R.longitude=l[V+1],D.latitude=l[V+2],D.longitude=l[V+3],C){const e=Te(R,D);u=n.project(R,ve),p=n.project(D,ze);const a=q(p,u,Ue);a.y=Math.abs(a.y),g=He,f=je,0===e||t.Cartesian3.dot(a,t.Cartesian3.UNIT_Y)>x?(g=ge(n,R,m,u,He),f=ge(n,D,Z,p,je)):1===e?(f=ge(n,D,Z,p,je),g.x=0,g.y=i.CesiumMath.sign(R.longitude-Math.abs(D.longitude)),g.z=0):(g=ge(n,R,m,u,He),f.x=0,f.y=i.CesiumMath.sign(R.longitude-D.longitude),f.z=0)}const w=t.Cartesian3.distance(a,U),y=c.EncodedCartesian3.fromCartesian(e,Xe),I=t.Cartesian3.subtract(W,e,Be),v=t.Cartesian3.normalize(I,Ye);let z=t.Cartesian3.subtract(a,e,Ve);z=t.Cartesian3.normalize(z,z);let H=t.Cartesian3.cross(v,z,Ye);H=t.Cartesian3.normalize(H,H);let K=t.Cartesian3.cross(z,m,Fe);K=t.Cartesian3.normalize(K,K);let ee=t.Cartesian3.subtract(U,W,Ge);ee=t.Cartesian3.normalize(ee,ee);let te=t.Cartesian3.cross(Z,ee,qe);te=t.Cartesian3.normalize(te,te);const ae=w/B,ne=$/B;let ie,re,se,oe=0,le=0,ce=0;if(C){oe=t.Cartesian3.distance(u,p),ie=c.EncodedCartesian3.fromCartesian(u,We),re=t.Cartesian3.subtract(p,u,Ue),se=t.Cartesian3.normalize(re,Ze);const e=se.x;se.x=se.y,se.y=-e,le=oe/N,ce=J/N}for(j=0;j<8;j++){const e=F+4*j,a=G+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;t.Cartesian3.pack(y.high,T,e),T[n]=I.x,t.Cartesian3.pack(y.low,E,e),E[n]=I.y,t.Cartesian3.pack(K,_,e),_[n]=I.z,t.Cartesian3.pack(te,O,e),O[n]=ae*i,t.Cartesian3.pack(H,b,e);let s=ne*r;0===s&&r<0&&(s=9),b[n]=s,C&&(P[e]=ie.high.x,P[e+1]=ie.high.y,P[e+2]=ie.low.x,P[e+3]=ie.low.y,L[e]=-g.y,L[e+1]=g.x,L[e+2]=f.y,L[e+3]=-f.x,k[e]=re.x,k[e+1]=re.y,k[e+2]=se.x,k[e+3]=se.y,S[a]=le*i,s=ce*r,0===s&&r<0&&(s=9),S[a+1]=s)}const ue=Re,pe=De,de=Ie,he=Ne,fe=t.Rectangle.fromCartographicArray(Se,xe),me=A.getMinimumMaximumHeights(fe,h),ye=me.minimumTerrainHeight,Ee=me.maximumTerrainHeight;Q+=ye,Q+=Ee,we(e,a,ye,Ee,ue,de),we(W,U,ye,Ee,pe,he);let _e=t.Cartesian3.multiplyByScalar(H,i.CesiumMath.EPSILON5,$e);t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y),t.Cartesian3.pack(pe,M,Y+3),t.Cartesian3.pack(he,M,Y+6),t.Cartesian3.pack(de,M,Y+9),_e=t.Cartesian3.multiplyByScalar(H,-2*i.CesiumMath.EPSILON5,$e),t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y+12),t.Cartesian3.pack(pe,M,Y+15),t.Cartesian3.pack(he,M,Y+18),t.Cartesian3.pack(de,M,Y+21),V+=2,d+=3,G+=16,Y+=24,F+=32,$+=w,J+=oe}d=0;let K=0;for(p=0;p<g;p++){for(j=0;j<Ke;j++)y[d+j]=Qe[j]+K;K+=8,d+=Ke}const ee=Je;e.BoundingSphere.fromVertices(r,t.Cartesian3.ZERO,3,ee[0]),e.BoundingSphere.fromVertices(s,t.Cartesian3.ZERO,3,ee[1]);const te=e.BoundingSphere.fromBoundingSpheres(ee);te.radius+=Q/(2*g);const ae={position:new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:M}),startHiAndForwardOffsetX:et(T),startLoAndForwardOffsetY:et(E),startNormalAndForwardOffsetZ:et(_),endNormalAndTextureCoordinateNormalizationX:et(O),rightNormalAndTextureCoordinateNormalizationY:et(b)};C&&(ae.startHiLo2D=et(P),ae.offsetAndRight2D=et(k),ae.startEndNormals2D=et(L),ae.texcoordNormalization2D=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:S}));return new u.Geometry({attributes:ae,indices:y,boundingSphere:te})}(p,f,j,B,H,v,o)};const le=new t.Cartesian3,ce=new t.Matrix3,ue=new e.Quaternion;function Ce(a,n,r,s){const o=q(r,n,le),l=t.Cartesian3.dot(o,a);if(l>x||l<I){const n=q(s,r,$),o=l<I?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,ue),u=t.Matrix3.fromQuaternion(c,ce);return t.Matrix3.multiplyByVector(u,a,a),!0}return!1}const pe=new t.Cartographic,de=new t.Cartesian3,he=new t.Cartesian3;function ge(e,a,n,r,s){const o=t.Cartographic.toCartesian(a,e._ellipsoid,de);let l=t.Cartesian3.add(o,n,he),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,pe);Math.abs(a.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=t.Cartesian3.subtract(o,n,he),C=u.cartesianToCartographic(l,pe)),C.height=0;const p=e.project(C,s);return(s=t.Cartesian3.subtract(p,r,s)).z=0,s=t.Cartesian3.normalize(s,s),c&&t.Cartesian3.negate(s,s),s}const fe=new t.Cartesian3,me=new t.Cartesian3;function we(e,a,n,i,r,s){const o=t.Cartesian3.subtract(a,e,fe);t.Cartesian3.normalize(o,o);const l=n-0;let c=t.Cartesian3.multiplyByScalar(o,l,me);t.Cartesian3.add(e,c,r);const u=i-1e3;c=t.Cartesian3.multiplyByScalar(o,u,me),t.Cartesian3.add(a,c,s)}const ye=new t.Cartesian3;function Me(e,a){const n=p.Plane.getPointDistance(Q,e),r=p.Plane.getPointDistance(Q,a);let s=ye;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=q(a,e,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=q(e,a,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(a,s,a))}function Te(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Ee=new t.Cartographic,_e=new t.Cartographic,Oe=new t.Cartesian3,be=new t.Cartesian3,Pe=new t.Cartesian3,Ae=new t.Cartesian3,ke=new t.Cartesian3,Le=new t.Cartesian3,Se=[Ee,_e],xe=new t.Rectangle,Ie=new t.Cartesian3,Ne=new t.Cartesian3,Re=new t.Cartesian3,De=new t.Cartesian3,ve=new t.Cartesian3,ze=new t.Cartesian3,He=new t.Cartesian3,je=new t.Cartesian3,Be=new t.Cartesian3,Ve=new t.Cartesian3,Ge=new t.Cartesian3,Ye=new t.Cartesian3,Fe=new t.Cartesian3,qe=new t.Cartesian3,Xe=new c.EncodedCartesian3,We=new c.EncodedCartesian3,Ue=new t.Cartesian3,Ze=new t.Cartesian3,$e=new t.Cartesian3,Je=[new e.BoundingSphere,new e.BoundingSphere],Qe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Ke=Qe.length;function et(e){return new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return N._projectNormal=ge,function(e,t){return A.initialize().then((function(){return n.defined(t)&&(e=N.unpack(e,t)),N.createGeometry(e)}))}})); | ||
define(["./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./ComponentDatatype-6ff7d2c3","./ArcType-b570b3ee","./arrayRemoveDuplicates-d332a3bf","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./EncodedCartesian3-1e797130","./GeometryAttribute-29ed65a7","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./WebMercatorProjection-4d21b562","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52"],(function(e,t,a,n,i,r,s,o,l,c,u,C,p,d,h,g,f){"use strict";function m(a){a=n.defaultValue(a,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84),this._rectangle=n.defaultValue(a.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(a.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(a.numberOfLevelZeroTilesY,1)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},m.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},m.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},m.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},m.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,p=s.height/l,d=s.north-a*p,h=s.north-(a+1)*p;return n.defined(r)||(r=new t.Rectangle(u,h,C,d)),r.west=u,r.south=h,r.east=C,r.north=d,r},m.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let p=(C-s.west)/c|0;p>=o&&(p=o-1);let d=(s.north-e.latitude)/u|0;return d>=l&&(d=l-1),n.defined(r)?(r.x=p,r.y=d,r):new t.Cartesian2(p,d)};const w=new t.Cartesian3,y=new t.Cartesian3,M=new t.Cartographic,T=new t.Cartesian3,E=new t.Cartesian3,_=new e.BoundingSphere,O=new m,b=[new t.Cartographic,new t.Cartographic,new t.Cartographic,new t.Cartographic],P=new t.Cartesian2,A={};function k(e){t.Cartographic.fromRadians(e.east,e.north,0,b[0]),t.Cartographic.fromRadians(e.west,e.north,0,b[1]),t.Cartographic.fromRadians(e.east,e.south,0,b[2]),t.Cartographic.fromRadians(e.west,e.south,0,b[3]);let a=0,n=0,i=0,r=0;const s=A._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=b[t];if(O.positionToTileXY(a,o,P),0===t)i=P.x,r=P.y;else if(i!==P.x||r!==P.y){e=!0;break}}if(e)break;a=i,n=r}if(0!==o)return{x:a,y:n,level:o>s?s:o-1}}A.initialize=function(){let t=A._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){A._terrainHeights=e})),A._initPromise=t),t},A.getMinimumMaximumHeights=function(e,a){a=n.defaultValue(a,t.Ellipsoid.WGS84);const i=k(e);let r=A._defaultMinTerrainHeight,s=A._defaultMaxTerrainHeight;if(n.defined(i)){const o=`${i.level}-${i.x}-${i.y}`,l=A._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),a.cartographicToCartesian(t.Rectangle.northeast(e,M),w),a.cartographicToCartesian(t.Rectangle.southwest(e,M),y),t.Cartesian3.midpoint(y,w,T);const c=a.scaleToGeodeticSurface(T,E);if(n.defined(c)){const e=t.Cartesian3.distance(T,c);r=Math.min(r,-e)}else r=A._defaultMinTerrainHeight}return r=Math.max(A._defaultMinTerrainHeight,r),{minimumTerrainHeight:r,maximumTerrainHeight:s}},A.getBoundingSphere=function(a,i){i=n.defaultValue(i,t.Ellipsoid.WGS84);const r=k(a);let s=A._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=A._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(a,i,0);return e.BoundingSphere.fromRectangle3D(a,i,s,_),e.BoundingSphere.union(o,_,o)},A._terrainHeightsMaxLevel=6,A._defaultMaxTerrainHeight=9e3,A._defaultMinTerrainHeight=-1e5,A._terrainHeights=void 0,A._initPromise=void 0,Object.defineProperties(A,{initialized:{get:function(){return n.defined(A._terrainHeights)}}});const L=[e.GeographicProjection,d.WebMercatorProjection],S=L.length,x=Math.cos(i.CesiumMath.toRadians(30)),I=Math.cos(i.CesiumMath.toRadians(150));function N(e){const a=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=a,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=t.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(N.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.Ellipsoid.packedLength+1+1}}}),N.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<S;e++)if(t instanceof L[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const R=new t.Cartesian3,D=new t.Cartesian3,v=new t.Cartesian3;function z(e,a,n,i,r){const s=F(i,e,0,R),o=F(i,e,n,D),l=F(i,a,0,v),c=q(o,s,D),u=q(l,s,v);return t.Cartesian3.cross(u,c,r),t.Cartesian3.normalize(r,r)}const H=new t.Cartographic,j=new t.Cartesian3,B=new t.Cartesian3,V=new t.Cartesian3;function G(e,a,n,i,s,c,u,C,p,d,h){if(0===s)return;let g;c===r.ArcType.GEODESIC?g=new o.EllipsoidGeodesic(e,a,u):c===r.ArcType.RHUMB&&(g=new l.EllipsoidRhumbLine(e,a,u));const f=g.surfaceDistance;if(f<s)return;const m=z(e,a,i,u,V),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,H),a=F(u,e,n,j),r=F(u,e,i,B);t.Cartesian3.pack(m,C,E),t.Cartesian3.pack(a,p,E),t.Cartesian3.pack(r,d,E),h.push(e.latitude),h.push(e.longitude),E+=3,M+=y}}const Y=new t.Cartographic;function F(e,a,n,i){return t.Cartographic.clone(a,Y),Y.height=n,t.Cartographic.toCartesian(Y,e,i)}function q(e,a,n){return t.Cartesian3.subtract(e,a,n),t.Cartesian3.normalize(n,n),n}function X(e,a,n,i){return i=q(e,a,i),i=t.Cartesian3.cross(i,n,i),i=t.Cartesian3.normalize(i,i),i=t.Cartesian3.cross(n,i,i)}N.pack=function(e,a,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;a[r++]=o;for(let e=0;e<o;++e){const n=s[e];t.Cartesian3.pack(n,a,r),r+=3}return a[r++]=e.granularity,a[r++]=e.loop?1:0,a[r++]=e.arcType,t.Ellipsoid.pack(e._ellipsoid,a,r),r+=t.Ellipsoid.packedLength,a[r++]=e._projectionIndex,a[r++]=e._scene3DOnly?1:0,a},N.unpack=function(e,a,i){let r=n.defaultValue(a,0);const s=e[r++],o=new Array(s);for(let a=0;a<s;a++)o[a]=t.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=t.Ellipsoid.unpack(e,r);r+=t.Ellipsoid.packedLength;const p=e[r++],d=1===e[r++];return n.defined(i)||(i=new N({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=p,i._scene3DOnly=d,i};const W=new t.Cartesian3,U=new t.Cartesian3,Z=new t.Cartesian3,$=new t.Cartesian3;function J(e,a,n,r,s){const o=q(n,a,$),l=X(e,a,o,W),c=X(r,a,o,U);if(i.CesiumMath.equalsEpsilon(t.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=t.Cartesian3.cross(o,l,s),s=t.Cartesian3.normalize(s,s);s=t.Cartesian3.add(c,l,s),s=t.Cartesian3.normalize(s,s);const u=t.Cartesian3.cross(o,s,Z);return t.Cartesian3.dot(c,u)<0&&(s=t.Cartesian3.negate(s,s)),s}const Q=p.Plane.fromPointNormal(t.Cartesian3.ZERO,t.Cartesian3.UNIT_Y),K=new t.Cartesian3,ee=new t.Cartesian3,te=new t.Cartesian3,ae=new t.Cartesian3,ne=new t.Cartesian3,ie=new t.Cartesian3,re=new t.Cartographic,se=new t.Cartographic,oe=new t.Cartographic;N.createGeometry=function(a){const o=!a._scene3DOnly;let p=a.loop;const d=a._ellipsoid,h=a.granularity,g=a.arcType,f=new L[a._projectionIndex](d),m=1e3;let w,y;const M=a._positions,T=M.length;let E,_,O,b;2===T&&(p=!1);const P=new l.EllipsoidRhumbLine(void 0,void 0,d);let k,S,I;const N=[M[0]];for(y=0;y<T-1;y++)E=M[y],_=M[y+1],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))),N.push(_);p&&(E=M[T-1],_=M[0],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))));let R=N.length,D=new Array(R);for(y=0;y<R;y++){const e=t.Cartographic.fromCartesian(N[y],d);e.height=0,D[y]=e}if(D=s.arrayRemoveDuplicates(D,t.Cartographic.equalsEpsilon),R=D.length,R<2)return;const v=[],H=[],j=[],B=[];let V=K,Y=ee,X=te,W=ae,U=ne;const Z=D[0],$=D[1];for(V=F(d,D[R-1],0,V),W=F(d,$,0,W),Y=F(d,Z,0,Y),X=F(d,Z,m,X),U=p?J(V,Y,X,W,U):z(Z,$,m,d,U),t.Cartesian3.pack(U,H,0),t.Cartesian3.pack(Y,j,0),t.Cartesian3.pack(X,B,0),v.push(Z.latitude),v.push(Z.longitude),G(Z,$,0,m,h,g,d,H,j,B,v),y=1;y<R-1;++y){V=t.Cartesian3.clone(Y,V),Y=t.Cartesian3.clone(W,Y);const e=D[y];F(d,e,m,X),F(d,D[y+1],0,W),J(V,Y,X,W,U),w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(e.latitude),v.push(e.longitude),G(D[y],D[y+1],0,m,h,g,d,H,j,B,v)}const le=D[R-1],ce=D[R-2];if(Y=F(d,le,0,Y),X=F(d,le,m,X),p){const e=D[0];V=F(d,ce,0,V),W=F(d,e,0,W),U=J(V,Y,X,W,U)}else U=z(ce,le,m,d,U);if(w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(le.latitude),v.push(le.longitude),p){for(G(le,Z,0,m,h,g,d,H,j,B,v),w=H.length,y=0;y<3;++y)H[w+y]=H[y],j[w+y]=j[y],B[w+y]=B[y];v.push(Z.latitude),v.push(Z.longitude)}return function(a,n,r,s,o,l,C){let p,d;const h=n._ellipsoid,g=r.length/3-1,f=8*g,m=4*f,w=36*g,y=f>65535?new Uint32Array(w):new Uint16Array(w),M=new Float64Array(3*f),T=new Float32Array(m),E=new Float32Array(m),_=new Float32Array(m),O=new Float32Array(m),b=new Float32Array(m);let P,k,L,S;C&&(P=new Float32Array(m),k=new Float32Array(m),L=new Float32Array(m),S=new Float32Array(2*f));const I=l.length/2;let N=0;const R=Ee;R.height=0;const D=_e;D.height=0;let v=Oe,z=be;if(C)for(d=0,p=1;p<I;p++)R.latitude=l[d],R.longitude=l[d+1],D.latitude=l[d+2],D.longitude=l[d+3],v=n.project(R,v),z=n.project(D,z),N+=t.Cartesian3.distance(v,z),d+=2;const H=s.length/3;z=t.Cartesian3.unpack(s,0,z);let j,B=0;for(d=3,p=1;p<H;p++)v=t.Cartesian3.clone(z,v),z=t.Cartesian3.unpack(s,d,z),B+=t.Cartesian3.distance(v,z),d+=3;d=3;let V=0,G=0,Y=0,F=0,X=!1,W=t.Cartesian3.unpack(r,0,Ae),U=t.Cartesian3.unpack(s,0,be),Z=t.Cartesian3.unpack(o,0,Le);if(a){Ce(Z,t.Cartesian3.unpack(r,r.length-6,Pe),W,U)&&(Z=t.Cartesian3.negate(Z,Z))}let $=0,J=0,Q=0;for(p=0;p<g;p++){const e=t.Cartesian3.clone(W,Pe),a=t.Cartesian3.clone(U,Oe);let u,p,g,f,m=t.Cartesian3.clone(Z,ke);if(X&&(m=t.Cartesian3.negate(m,m)),W=t.Cartesian3.unpack(r,d,Ae),U=t.Cartesian3.unpack(s,d,be),Z=t.Cartesian3.unpack(o,d,Le),X=Ce(Z,e,W,U),R.latitude=l[V],R.longitude=l[V+1],D.latitude=l[V+2],D.longitude=l[V+3],C){const e=Te(R,D);u=n.project(R,ve),p=n.project(D,ze);const a=q(p,u,Ue);a.y=Math.abs(a.y),g=He,f=je,0===e||t.Cartesian3.dot(a,t.Cartesian3.UNIT_Y)>x?(g=ge(n,R,m,u,He),f=ge(n,D,Z,p,je)):1===e?(f=ge(n,D,Z,p,je),g.x=0,g.y=i.CesiumMath.sign(R.longitude-Math.abs(D.longitude)),g.z=0):(g=ge(n,R,m,u,He),f.x=0,f.y=i.CesiumMath.sign(R.longitude-D.longitude),f.z=0)}const w=t.Cartesian3.distance(a,U),y=c.EncodedCartesian3.fromCartesian(e,Xe),I=t.Cartesian3.subtract(W,e,Be),v=t.Cartesian3.normalize(I,Ye);let z=t.Cartesian3.subtract(a,e,Ve);z=t.Cartesian3.normalize(z,z);let H=t.Cartesian3.cross(v,z,Ye);H=t.Cartesian3.normalize(H,H);let K=t.Cartesian3.cross(z,m,Fe);K=t.Cartesian3.normalize(K,K);let ee=t.Cartesian3.subtract(U,W,Ge);ee=t.Cartesian3.normalize(ee,ee);let te=t.Cartesian3.cross(Z,ee,qe);te=t.Cartesian3.normalize(te,te);const ae=w/B,ne=$/B;let ie,re,se,oe=0,le=0,ce=0;if(C){oe=t.Cartesian3.distance(u,p),ie=c.EncodedCartesian3.fromCartesian(u,We),re=t.Cartesian3.subtract(p,u,Ue),se=t.Cartesian3.normalize(re,Ze);const e=se.x;se.x=se.y,se.y=-e,le=oe/N,ce=J/N}for(j=0;j<8;j++){const e=F+4*j,a=G+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;t.Cartesian3.pack(y.high,T,e),T[n]=I.x,t.Cartesian3.pack(y.low,E,e),E[n]=I.y,t.Cartesian3.pack(K,_,e),_[n]=I.z,t.Cartesian3.pack(te,O,e),O[n]=ae*i,t.Cartesian3.pack(H,b,e);let s=ne*r;0===s&&r<0&&(s=9),b[n]=s,C&&(P[e]=ie.high.x,P[e+1]=ie.high.y,P[e+2]=ie.low.x,P[e+3]=ie.low.y,L[e]=-g.y,L[e+1]=g.x,L[e+2]=f.y,L[e+3]=-f.x,k[e]=re.x,k[e+1]=re.y,k[e+2]=se.x,k[e+3]=se.y,S[a]=le*i,s=ce*r,0===s&&r<0&&(s=9),S[a+1]=s)}const ue=Re,pe=De,de=Ie,he=Ne,fe=t.Rectangle.fromCartographicArray(Se,xe),me=A.getMinimumMaximumHeights(fe,h),ye=me.minimumTerrainHeight,Ee=me.maximumTerrainHeight;Q+=ye,Q+=Ee,we(e,a,ye,Ee,ue,de),we(W,U,ye,Ee,pe,he);let _e=t.Cartesian3.multiplyByScalar(H,i.CesiumMath.EPSILON5,$e);t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y),t.Cartesian3.pack(pe,M,Y+3),t.Cartesian3.pack(he,M,Y+6),t.Cartesian3.pack(de,M,Y+9),_e=t.Cartesian3.multiplyByScalar(H,-2*i.CesiumMath.EPSILON5,$e),t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y+12),t.Cartesian3.pack(pe,M,Y+15),t.Cartesian3.pack(he,M,Y+18),t.Cartesian3.pack(de,M,Y+21),V+=2,d+=3,G+=16,Y+=24,F+=32,$+=w,J+=oe}d=0;let K=0;for(p=0;p<g;p++){for(j=0;j<Ke;j++)y[d+j]=Qe[j]+K;K+=8,d+=Ke}const ee=Je;e.BoundingSphere.fromVertices(r,t.Cartesian3.ZERO,3,ee[0]),e.BoundingSphere.fromVertices(s,t.Cartesian3.ZERO,3,ee[1]);const te=e.BoundingSphere.fromBoundingSpheres(ee);te.radius+=Q/(2*g);const ae={position:new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:M}),startHiAndForwardOffsetX:et(T),startLoAndForwardOffsetY:et(E),startNormalAndForwardOffsetZ:et(_),endNormalAndTextureCoordinateNormalizationX:et(O),rightNormalAndTextureCoordinateNormalizationY:et(b)};C&&(ae.startHiLo2D=et(P),ae.offsetAndRight2D=et(k),ae.startEndNormals2D=et(L),ae.texcoordNormalization2D=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:S}));return new u.Geometry({attributes:ae,indices:y,boundingSphere:te})}(p,f,j,B,H,v,o)};const le=new t.Cartesian3,ce=new t.Matrix3,ue=new e.Quaternion;function Ce(a,n,r,s){const o=q(r,n,le),l=t.Cartesian3.dot(o,a);if(l>x||l<I){const n=q(s,r,$),o=l<I?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,ue),u=t.Matrix3.fromQuaternion(c,ce);return t.Matrix3.multiplyByVector(u,a,a),!0}return!1}const pe=new t.Cartographic,de=new t.Cartesian3,he=new t.Cartesian3;function ge(e,a,n,r,s){const o=t.Cartographic.toCartesian(a,e._ellipsoid,de);let l=t.Cartesian3.add(o,n,he),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,pe);Math.abs(a.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=t.Cartesian3.subtract(o,n,he),C=u.cartesianToCartographic(l,pe)),C.height=0;const p=e.project(C,s);return(s=t.Cartesian3.subtract(p,r,s)).z=0,s=t.Cartesian3.normalize(s,s),c&&t.Cartesian3.negate(s,s),s}const fe=new t.Cartesian3,me=new t.Cartesian3;function we(e,a,n,i,r,s){const o=t.Cartesian3.subtract(a,e,fe);t.Cartesian3.normalize(o,o);const l=n-0;let c=t.Cartesian3.multiplyByScalar(o,l,me);t.Cartesian3.add(e,c,r);const u=i-1e3;c=t.Cartesian3.multiplyByScalar(o,u,me),t.Cartesian3.add(a,c,s)}const ye=new t.Cartesian3;function Me(e,a){const n=p.Plane.getPointDistance(Q,e),r=p.Plane.getPointDistance(Q,a);let s=ye;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=q(a,e,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=q(e,a,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(a,s,a))}function Te(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Ee=new t.Cartographic,_e=new t.Cartographic,Oe=new t.Cartesian3,be=new t.Cartesian3,Pe=new t.Cartesian3,Ae=new t.Cartesian3,ke=new t.Cartesian3,Le=new t.Cartesian3,Se=[Ee,_e],xe=new t.Rectangle,Ie=new t.Cartesian3,Ne=new t.Cartesian3,Re=new t.Cartesian3,De=new t.Cartesian3,ve=new t.Cartesian3,ze=new t.Cartesian3,He=new t.Cartesian3,je=new t.Cartesian3,Be=new t.Cartesian3,Ve=new t.Cartesian3,Ge=new t.Cartesian3,Ye=new t.Cartesian3,Fe=new t.Cartesian3,qe=new t.Cartesian3,Xe=new c.EncodedCartesian3,We=new c.EncodedCartesian3,Ue=new t.Cartesian3,Ze=new t.Cartesian3,$e=new t.Cartesian3,Je=[new e.BoundingSphere,new e.BoundingSphere],Qe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Ke=Qe.length;function et(e){return new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return N._projectNormal=ge,function(e,t){return A.initialize().then((function(){return n.defined(t)&&(e=N.unpack(e,t)),N.createGeometry(e)}))}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a"],(function(e,t,n,r,a,o,i,m,u,c,p){"use strict";function s(t){t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT);const n=e.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}s.packedLength=m.VertexFormat.packedLength,s.pack=function(t,n,r){return r=e.defaultValue(r,0),m.VertexFormat.pack(t._vertexFormat,n,r),n};const y=new m.VertexFormat,l={vertexFormat:y};s.unpack=function(t,n,r){n=e.defaultValue(n,0);const a=m.VertexFormat.unpack(t,n,y);return e.defined(r)?(r._vertexFormat=m.VertexFormat.clone(a,r._vertexFormat),r):new s(l)};const d=new n.Cartesian3(-.5,-.5,0),f=new n.Cartesian3(.5,.5,0);return s.createGeometry=function(e){const r=e._vertexFormat,m=new i.GeometryAttributes;let u,c;if(r.position){if(c=new Float64Array(12),c[0]=d.x,c[1]=d.y,c[2]=0,c[3]=f.x,c[4]=d.y,c[5]=0,c[6]=f.x,c[7]=f.y,c[8]=0,c[9]=d.x,c[10]=f.y,c[11]=0,m.position=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),r.normal){const e=new Float32Array(12);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,m.normal=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(r.st){const e=new Float32Array(8);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=1,e[5]=1,e[6]=0,e[7]=1,m.st=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:e})}if(r.tangent){const e=new Float32Array(12);e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=1,e[7]=0,e[8]=0,e[9]=1,e[10]=0,e[11]=0,m.tangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(r.bitangent){const e=new Float32Array(12);e[0]=0,e[1]=1,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=1,e[8]=0,e[9]=0,e[10]=1,e[11]=0,m.bitangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new o.Geometry({attributes:m,indices:u,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=s.unpack(t,n)),s.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52"],(function(e,t,n,r,a,o,i,m,u,c,p){"use strict";function s(t){t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT);const n=e.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}s.packedLength=m.VertexFormat.packedLength,s.pack=function(t,n,r){return r=e.defaultValue(r,0),m.VertexFormat.pack(t._vertexFormat,n,r),n};const y=new m.VertexFormat,l={vertexFormat:y};s.unpack=function(t,n,r){n=e.defaultValue(n,0);const a=m.VertexFormat.unpack(t,n,y);return e.defined(r)?(r._vertexFormat=m.VertexFormat.clone(a,r._vertexFormat),r):new s(l)};const f=new n.Cartesian3(-.5,-.5,0),b=new n.Cartesian3(.5,.5,0);return s.createGeometry=function(e){const r=e._vertexFormat,m=new i.GeometryAttributes;let u,c;if(r.position){if(c=new Float64Array(12),c[0]=f.x,c[1]=f.y,c[2]=0,c[3]=b.x,c[4]=f.y,c[5]=0,c[6]=b.x,c[7]=b.y,c[8]=0,c[9]=f.x,c[10]=b.y,c[11]=0,m.position=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),r.normal){const e=new Float32Array(12);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,m.normal=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(r.st){const e=new Float32Array(8);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=1,e[5]=1,e[6]=0,e[7]=1,m.st=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:e})}if(r.tangent){const e=new Float32Array(12);e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=1,e[7]=0,e[8]=0,e[9]=1,e[10]=0,e[11]=0,m.tangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(r.bitangent){const e=new Float32Array(12);e[0]=0,e[1]=1,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=1,e[8]=0,e[9]=0,e[10]=1,e[11]=0,m.bitangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new o.Geometry({attributes:m,indices:u,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=s.unpack(t,n)),s.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Transforms-6c4dd71f","./Matrix2-6555478a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a"],(function(e,t,n,r,a,i,o,c,u,s){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const d=new n.Cartesian3(-.5,-.5,0),y=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new o.GeometryAttributes,r=new Uint16Array(8),c=new Float64Array(12);return c[0]=d.x,c[1]=d.y,c[2]=d.z,c[3]=y.x,c[4]=d.y,c[5]=d.z,c[6]=y.x,c[7]=y.y,c[8]=d.z,c[9]=d.x,c[10]=y.y,c[11]=d.z,e.position=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),r[0]=0,r[1]=1,r[2]=1,r[3]=2,r[4]=2,r[5]=3,r[6]=3,r[7]=0,new i.Geometry({attributes:e,indices:r,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Transforms-b683baff","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52"],(function(e,t,n,r,a,i,o,c,u,s){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const y=new n.Cartesian3(-.5,-.5,0),p=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new o.GeometryAttributes,r=new Uint16Array(8),c=new Float64Array(12);return c[0]=y.x,c[1]=y.y,c[2]=y.z,c[3]=p.x,c[4]=y.y,c[5]=y.z,c[6]=p.x,c[7]=p.y,c[8]=y.z,c[9]=y.x,c[10]=p.y,c[11]=y.z,e.position=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),r[0]=0,r[1]=1,r[2]=1,r[3]=2,r[4]=2,r[5]=3,r[6]=3,r[7]=0,new i.Geometry({attributes:e,indices:r,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./ArcType-5c683766","./BoundingRectangle-6bfae79e","./Transforms-6c4dd71f","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./EllipsoidGeodesic-a67aa524","./EllipsoidTangentPlane-764a8df1","./GeometryAttribute-a34d86d0","./GeometryInstance-9c4e19d7","./GeometryOffsetAttribute-a17b96d9","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonGeometryLibrary-c5c437c2","./PolygonPipeline-666b269f","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./arrayRemoveDuplicates-75feaa04","./EllipsoidRhumbLine-e7a75836","./GeometryAttributes-d060f8b5"],(function(e,t,o,r,i,n,a,s,l,c,u,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v){"use strict";const E=new t.Cartographic,G=new t.Cartographic;function O(e,t,o,r){const i=r.cartesianToCartographic(e,E).height,n=r.cartesianToCartographic(t,G);n.height=i,r.cartographicToCartesian(n,t);const a=r.cartesianToCartographic(o,G);a.height=i-100,r.cartographicToCartesian(a,o)}const L=new r.BoundingRectangle,V=new t.Cartesian3,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3;let M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian3;const k=new t.Cartesian2,z=new t.Cartesian2,W=new t.Cartesian3,Y=new i.Quaternion,U=new t.Matrix3,j=new t.Matrix3;function Q(o){const r=o.vertexFormat,n=o.geometry,s=o.shadowVolume,l=n.attributes.position.values,u=e.defined(n.attributes.st)?n.attributes.st.values:void 0;let p=l.length;const y=o.wall,m=o.top||y,g=o.bottom||y;if(r.st||r.normal||r.tangent||r.bitangent||s){const d=o.boundingRectangle,h=o.tangentPlane,f=o.ellipsoid,b=o.stRotation,_=o.perPositionHeight,P=k;P.x=d.x,P.y=d.y;const C=r.st?new Float32Array(p/3*2):void 0;let x;r.normal&&(x=_&&m&&!y?n.attributes.normal.values:new Float32Array(p));const w=r.tangent?new Float32Array(p):void 0,T=r.bitangent?new Float32Array(p):void 0,I=s?new Float32Array(p):void 0;let A=0,v=0,E=H,G=D,L=N,Q=!0,q=U,K=j;if(0!==b){let e=i.Quaternion.fromAxisAngle(h._plane.normal,b,Y);q=t.Matrix3.fromQuaternion(e,q),e=i.Quaternion.fromAxisAngle(h._plane.normal,-b,Y),K=t.Matrix3.fromQuaternion(e,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);let Z=0,J=0;m&&g&&(Z=p/2,J=p/3,p/=2);for(let i=0;i<p;i+=3){const n=t.Cartesian3.fromArray(l,i,W);if(r.st&&!e.defined(u)){let e=t.Matrix3.multiplyByVector(q,n,V);e=f.scaleToGeodeticSurface(e,e);const o=h.projectPointOntoPlane(e,z);t.Cartesian2.subtract(o,P,o);const r=a.CesiumMath.clamp(o.x/d.width,0,1),i=a.CesiumMath.clamp(o.y/d.height,0,1);g&&(C[A+J]=r,C[A+1+J]=i),m&&(C[A]=r,C[A+1]=i),A+=2}if(r.normal||r.tangent||r.bitangent||s){const e=v+1,c=v+2;if(y){if(i+3<p){const e=t.Cartesian3.fromArray(l,i+3,F);if(Q){const o=t.Cartesian3.fromArray(l,i+p,R);_&&O(n,e,o,f),t.Cartesian3.subtract(e,n,e),t.Cartesian3.subtract(o,n,o),E=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,E),E),Q=!1}t.Cartesian3.equalsEpsilon(e,n,a.CesiumMath.EPSILON10)&&(Q=!0)}(r.tangent||r.bitangent)&&(L=f.geodeticSurfaceNormal(n,L),r.tangent&&(G=t.Cartesian3.normalize(t.Cartesian3.cross(L,E,G),G)))}else E=f.geodeticSurfaceNormal(n,E),(r.tangent||r.bitangent)&&(_&&(M=t.Cartesian3.fromArray(x,v,M),S=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,M,S),S=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,S,S),S),r.bitangent&&(B=t.Cartesian3.normalize(t.Cartesian3.cross(M,S,B),B))),G=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,E,G),G=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,G,G),G),r.bitangent&&(L=t.Cartesian3.normalize(t.Cartesian3.cross(E,G,L),L)));r.normal&&(o.wall?(x[v+Z]=E.x,x[e+Z]=E.y,x[c+Z]=E.z):g&&(x[v+Z]=-E.x,x[e+Z]=-E.y,x[c+Z]=-E.z),(m&&!_||y)&&(x[v]=E.x,x[e]=E.y,x[c]=E.z)),s&&(y&&(E=f.geodeticSurfaceNormal(n,E)),I[v+Z]=-E.x,I[e+Z]=-E.y,I[c+Z]=-E.z),r.tangent&&(o.wall?(w[v+Z]=G.x,w[e+Z]=G.y,w[c+Z]=G.z):g&&(w[v+Z]=-G.x,w[e+Z]=-G.y,w[c+Z]=-G.z),m&&(_?(w[v]=S.x,w[e]=S.y,w[c]=S.z):(w[v]=G.x,w[e]=G.y,w[c]=G.z))),r.bitangent&&(g&&(T[v+Z]=L.x,T[e+Z]=L.y,T[c+Z]=L.z),m&&(_?(T[v]=B.x,T[e]=B.y,T[c]=B.z):(T[v]=L.x,T[e]=L.y,T[c]=L.z))),v+=3}}r.st&&!e.defined(u)&&(n.attributes.st=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),r.normal&&(n.attributes.normal=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),r.tangent&&(n.attributes.tangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})),r.bitangent&&(n.attributes.bitangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),s&&(n.attributes.extrudeDirection=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=l.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===d.GeometryOffsetAttribute.TOP)m&&g||y?t=t.fill(1,0,e/2):m&&(t=t.fill(1));else{const e=o.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}n.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return n}const q=new t.Cartographic,K=new t.Cartographic,Z={westOverIDL:0,eastOverIDL:0};let J=new s.EllipsoidGeodesic;function X(r,i,n,l,c){if(c=e.defaultValue(c,new t.Rectangle),!e.defined(r)||r.length<3)return c.west=0,c.north=0,c.south=0,c.east=0,c;if(n===o.ArcType.RHUMB)return t.Rectangle.fromCartesianArray(r,i,c);J.ellipsoid.equals(i)||(J=new s.EllipsoidGeodesic(void 0,void 0,i)),c.west=Number.POSITIVE_INFINITY,c.east=Number.NEGATIVE_INFINITY,c.south=Number.POSITIVE_INFINITY,c.north=Number.NEGATIVE_INFINITY,Z.westOverIDL=Number.POSITIVE_INFINITY,Z.eastOverIDL=Number.NEGATIVE_INFINITY;const u=1/a.CesiumMath.chordLength(l,i.maximumRadius),d=r.length;let p,y=i.cartesianToCartographic(r[0],K),m=q;for(let e=1;e<d;e++)p=m,m=y,y=i.cartesianToCartographic(r[e],p),J.setEndPoints(m,y),ee(J,u,c,Z);return p=m,m=y,y=i.cartesianToCartographic(r[0],p),J.setEndPoints(m,y),ee(J,u,c,Z),c.east-c.west>Z.eastOverIDL-Z.westOverIDL&&(c.west=Z.westOverIDL,c.east=Z.eastOverIDL,c.east>a.CesiumMath.PI&&(c.east=c.east-a.CesiumMath.TWO_PI),c.west>a.CesiumMath.PI&&(c.west=c.west-a.CesiumMath.TWO_PI)),c}const $=new t.Cartographic;function ee(e,t,o,r){const i=e.surfaceDistance,n=Math.ceil(i*t),s=n>0?i/(n-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(l,$);l+=s;const i=t.longitude,n=t.latitude;o.west=Math.min(o.west,i),o.east=Math.max(o.east,i),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const c=i>=0?i:i+a.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,c),r.eastOverIDL=Math.max(r.eastOverIDL,c)}}const te=[];function oe(t,o,r,i,n,a,s,c,d,p){const h={walls:[]};let f;if(s||c){const n=m.PolygonGeometryLibrary.createGeometryFromPositions(t,o,r,i,a,d,p),l=n.attributes.position.values,g=n.indices;let b,_;if(s&&c){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*g.length),_.set(g);const o=g.length,i=b/2;for(f=0;f<o;f+=3){const e=_[f]+i,t=_[f+1]+i,r=_[f+2]+i;_[f+o]=r,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&d.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(d.st&&e.defined(r)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(c){for(b=l.length/3,_=y.IndexDatatype.createTypedArray(b,g.length),f=0;f<g.length;f+=3)_[f]=g[f+2],_[f+1]=g[f+1],_[f+2]=g[f];n.indices=_}h.topAndBottom=new u.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,te),C=g.PolygonPipeline.computeWindingOrder2D(P);C===g.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=m.PolygonGeometryLibrary.computeWallGeometry(b,r,t,i,a,p);h.walls.push(new u.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,te),C=g.PolygonPipeline.computeWindingOrder2D(P),C===g.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=m.PolygonGeometryLibrary.computeWallGeometry(e,r,t,i,a,p),h.walls.push(new u.GeometryInstance({geometry:x}))}return h}function re(r){const i=r.polygonHierarchy,n=e.defaultValue(r.vertexFormat,h.VertexFormat.DEFAULT),s=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),c=e.defaultValue(r.stRotation,0),u=r.textureCoordinates,d=e.defaultValue(r.perPositionHeight,!1),p=d&&e.defined(r.extrudedHeight);let y=e.defaultValue(r.height,0),g=e.defaultValue(r.extrudedHeight,y);if(!p){const e=Math.max(y,g);g=Math.min(y,g),y=e}this._vertexFormat=h.VertexFormat.clone(n),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=c,this._height=y,this._extrudedHeight=g,this._closeTop=e.defaultValue(r.closeTop,!0),this._closeBottom=e.defaultValue(r.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=d,this._perPositionHeightExtrude=p,this._shadowVolume=e.defaultValue(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=u,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(i,t.Cartesian3)+t.Ellipsoid.packedLength+h.VertexFormat.packedLength+(u?m.PolygonGeometryLibrary.computeHierarchyPackedLength(u,t.Cartesian2):1)+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates})},re.pack=function(o,r,i){return i=e.defaultValue(i,0),i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,r,i,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,r,i),i+=t.Ellipsoid.packedLength,h.VertexFormat.pack(o._vertexFormat,r,i),i+=h.VertexFormat.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=e.defaultValue(o._offsetAttribute,-1),r[i++]=o._arcType,e.defined(o._textureCoordinates)?i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,r,i,t.Cartesian2):r[i++]=-1,r[i++]=o.packedLength,r};const ie=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ne=new h.VertexFormat,ae={polygonHierarchy:{}};return re.unpack=function(o,r,i){r=e.defaultValue(r,0);const n=m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian3);r=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(o,r,ie);r+=t.Ellipsoid.packedLength;const s=h.VertexFormat.unpack(o,r,ne);r+=h.VertexFormat.packedLength;const l=o[r++],c=o[r++],u=o[r++],d=o[r++],p=1===o[r++],y=1===o[r++],g=1===o[r++],f=1===o[r++],b=1===o[r++],_=o[r++],P=o[r++],C=-1===o[r]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian2);e.defined(C)?(r=C.startingIndex,delete C.startingIndex):r++;const x=o[r++];return e.defined(i)||(i=new re(ae)),i._polygonHierarchy=n,i._ellipsoid=t.Ellipsoid.clone(a,i._ellipsoid),i._vertexFormat=h.VertexFormat.clone(s,i._vertexFormat),i._height=l,i._extrudedHeight=c,i._granularity=u,i._stRotation=d,i._perPositionHeightExtrude=p,i._perPositionHeight=y,i._closeTop=g,i._closeBottom=f,i._shadowVolume=b,i._offsetAttribute=-1===_?void 0:_,i._arcType=P,i._textureCoordinates=C,i.packedLength=x,i},re.computeRectangle=function(r,i){const n=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(r.arcType,o.ArcType.GEODESIC),l=r.polygonHierarchy,c=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84);return X(l.positions,c,s,n,i)},re.createGeometry=function(t){const o=t._vertexFormat,r=t._ellipsoid,n=t._granularity,s=t._stRotation,h=t._polygonHierarchy,f=t._perPositionHeight,b=t._closeTop,_=t._closeBottom,P=t._arcType,C=t._textureCoordinates,x=e.defined(C);let w=h.positions;if(w.length<3)return;const T=l.EllipsoidTangentPlane.fromPoints(w,r),I=m.PolygonGeometryLibrary.polygonsFromHierarchy(h,x,T.projectPointsOntoPlane.bind(T),!f,r),A=I.hierarchy,v=I.polygons,E=x?m.PolygonGeometryLibrary.polygonsFromHierarchy(C,!0,(function(e){return e}),!1).polygons:void 0;if(0===A.length)return;w=A[0].outerRing;const G=m.PolygonGeometryLibrary.computeBoundingRectangle(T.plane.normal,T.projectPointOntoPlane.bind(T),w,s,L),O=[],V=t._height,H=t._extrudedHeight,D={perPositionHeight:f,vertexFormat:o,geometry:void 0,tangentPlane:T,boundingRectangle:G,ellipsoid:r,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:P};let N;if(t._perPositionHeightExtrude||!a.CesiumMath.equalsEpsilon(V,H,0,a.CesiumMath.EPSILON2))for(D.extrude=!0,D.top=b,D.bottom=_,D.shadowVolume=t._shadowVolume,D.offsetAttribute=t._offsetAttribute,N=0;N<v.length;N++){const e=oe(r,v[N],x?E[N]:void 0,n,A[N],f,b,_,o,P);let t;b&&_?(t=e.topAndBottom,D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f)):b?(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,V,r,!f),D.geometry=t.geometry):_&&(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,r,!0),D.geometry=t.geometry),(b||_)&&(D.wall=!1,t.geometry=Q(D),O.push(t));const i=e.walls;D.wall=!0;for(let e=0;e<i.length;e++){const t=i[e];D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f),t.geometry=Q(D),O.push(t)}}else for(N=0;N<v.length;N++){const i=new u.GeometryInstance({geometry:m.PolygonGeometryLibrary.createGeometryFromPositions(r,v[N],x?E[N]:void 0,n,f,o,P)});if(i.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(i.geometry.attributes.position.values,V,r,!f),D.geometry=i.geometry,i.geometry=Q(D),e.defined(t._offsetAttribute)){const e=i.geometry.attributes.position.values.length,o=t._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(o);i.geometry.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}O.push(i)}const F=p.GeometryPipeline.combineInstances(O)[0];F.attributes.position.values=new Float64Array(F.attributes.position.values),F.indices=y.IndexDatatype.createTypedArray(F.attributes.position.values.length/3,F.indices);const R=F.attributes,M=i.BoundingSphere.fromVertices(R.position.values);return o.position||delete R.position,new c.Geometry({attributes:R,indices:F.indices,primitiveType:F.primitiveType,boundingSphere:M,offsetAttribute:t._offsetAttribute})},re.createShadowVolume=function(e,t,o){const r=e._granularity,i=e._ellipsoid,n=t(r,i),a=o(r,i);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:i,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:h.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=X(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,r=e._polygonHierarchy.positions,i=e.rectangle;return c.Geometry._textureCoordinateRotationPoints(r,t,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return e.defined(r)&&(o=re.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),re.createGeometry(o)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./ArcType-b570b3ee","./BoundingRectangle-d55ba9f7","./Transforms-b683baff","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./EllipsoidGeodesic-84738e5f","./EllipsoidTangentPlane-12fe3e10","./GeometryAttribute-29ed65a7","./GeometryInstance-8a2d7ac1","./GeometryOffsetAttribute-ddcc2f7f","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonGeometryLibrary-b5d25b76","./PolygonPipeline-71c413e2","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./arrayRemoveDuplicates-d332a3bf","./EllipsoidRhumbLine-c3b11f35","./GeometryAttributes-cb1bf806"],(function(e,t,o,r,i,n,a,s,l,c,u,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v){"use strict";const E=new t.Cartographic,G=new t.Cartographic;function O(e,t,o,r){const i=r.cartesianToCartographic(e,E).height,n=r.cartesianToCartographic(t,G);n.height=i,r.cartographicToCartesian(n,t);const a=r.cartesianToCartographic(o,G);a.height=i-100,r.cartographicToCartesian(a,o)}const L=new r.BoundingRectangle,V=new t.Cartesian3,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3;let M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian3;const k=new t.Cartesian2,z=new t.Cartesian2,W=new t.Cartesian3,Y=new i.Quaternion,U=new t.Matrix3,j=new t.Matrix3;function Q(o){const r=o.vertexFormat,n=o.geometry,s=o.shadowVolume,l=n.attributes.position.values,u=e.defined(n.attributes.st)?n.attributes.st.values:void 0;let p=l.length;const y=o.wall,m=o.top||y,g=o.bottom||y;if(r.st||r.normal||r.tangent||r.bitangent||s){const d=o.boundingRectangle,h=o.tangentPlane,f=o.ellipsoid,b=o.stRotation,_=o.perPositionHeight,P=k;P.x=d.x,P.y=d.y;const C=r.st?new Float32Array(p/3*2):void 0;let x;r.normal&&(x=_&&m&&!y?n.attributes.normal.values:new Float32Array(p));const w=r.tangent?new Float32Array(p):void 0,T=r.bitangent?new Float32Array(p):void 0,I=s?new Float32Array(p):void 0;let A=0,v=0,E=H,G=D,L=N,Q=!0,q=U,K=j;if(0!==b){let e=i.Quaternion.fromAxisAngle(h._plane.normal,b,Y);q=t.Matrix3.fromQuaternion(e,q),e=i.Quaternion.fromAxisAngle(h._plane.normal,-b,Y),K=t.Matrix3.fromQuaternion(e,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);let Z=0,J=0;m&&g&&(Z=p/2,J=p/3,p/=2);for(let i=0;i<p;i+=3){const n=t.Cartesian3.fromArray(l,i,W);if(r.st&&!e.defined(u)){let e=t.Matrix3.multiplyByVector(q,n,V);e=f.scaleToGeodeticSurface(e,e);const o=h.projectPointOntoPlane(e,z);t.Cartesian2.subtract(o,P,o);const r=a.CesiumMath.clamp(o.x/d.width,0,1),i=a.CesiumMath.clamp(o.y/d.height,0,1);g&&(C[A+J]=r,C[A+1+J]=i),m&&(C[A]=r,C[A+1]=i),A+=2}if(r.normal||r.tangent||r.bitangent||s){const e=v+1,c=v+2;if(y){if(i+3<p){const e=t.Cartesian3.fromArray(l,i+3,F);if(Q){const o=t.Cartesian3.fromArray(l,i+p,R);_&&O(n,e,o,f),t.Cartesian3.subtract(e,n,e),t.Cartesian3.subtract(o,n,o),E=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,E),E),Q=!1}t.Cartesian3.equalsEpsilon(e,n,a.CesiumMath.EPSILON10)&&(Q=!0)}(r.tangent||r.bitangent)&&(L=f.geodeticSurfaceNormal(n,L),r.tangent&&(G=t.Cartesian3.normalize(t.Cartesian3.cross(L,E,G),G)))}else E=f.geodeticSurfaceNormal(n,E),(r.tangent||r.bitangent)&&(_&&(M=t.Cartesian3.fromArray(x,v,M),S=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,M,S),S=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,S,S),S),r.bitangent&&(B=t.Cartesian3.normalize(t.Cartesian3.cross(M,S,B),B))),G=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,E,G),G=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,G,G),G),r.bitangent&&(L=t.Cartesian3.normalize(t.Cartesian3.cross(E,G,L),L)));r.normal&&(o.wall?(x[v+Z]=E.x,x[e+Z]=E.y,x[c+Z]=E.z):g&&(x[v+Z]=-E.x,x[e+Z]=-E.y,x[c+Z]=-E.z),(m&&!_||y)&&(x[v]=E.x,x[e]=E.y,x[c]=E.z)),s&&(y&&(E=f.geodeticSurfaceNormal(n,E)),I[v+Z]=-E.x,I[e+Z]=-E.y,I[c+Z]=-E.z),r.tangent&&(o.wall?(w[v+Z]=G.x,w[e+Z]=G.y,w[c+Z]=G.z):g&&(w[v+Z]=-G.x,w[e+Z]=-G.y,w[c+Z]=-G.z),m&&(_?(w[v]=S.x,w[e]=S.y,w[c]=S.z):(w[v]=G.x,w[e]=G.y,w[c]=G.z))),r.bitangent&&(g&&(T[v+Z]=L.x,T[e+Z]=L.y,T[c+Z]=L.z),m&&(_?(T[v]=B.x,T[e]=B.y,T[c]=B.z):(T[v]=L.x,T[e]=L.y,T[c]=L.z))),v+=3}}r.st&&!e.defined(u)&&(n.attributes.st=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),r.normal&&(n.attributes.normal=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),r.tangent&&(n.attributes.tangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})),r.bitangent&&(n.attributes.bitangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),s&&(n.attributes.extrudeDirection=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=l.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===d.GeometryOffsetAttribute.TOP)m&&g||y?t=t.fill(1,0,e/2):m&&(t=t.fill(1));else{const e=o.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}n.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return n}const q=new t.Cartographic,K=new t.Cartographic,Z={westOverIDL:0,eastOverIDL:0};let J=new s.EllipsoidGeodesic;function X(r,i,n,l,c){if(c=e.defaultValue(c,new t.Rectangle),!e.defined(r)||r.length<3)return c.west=0,c.north=0,c.south=0,c.east=0,c;if(n===o.ArcType.RHUMB)return t.Rectangle.fromCartesianArray(r,i,c);J.ellipsoid.equals(i)||(J=new s.EllipsoidGeodesic(void 0,void 0,i)),c.west=Number.POSITIVE_INFINITY,c.east=Number.NEGATIVE_INFINITY,c.south=Number.POSITIVE_INFINITY,c.north=Number.NEGATIVE_INFINITY,Z.westOverIDL=Number.POSITIVE_INFINITY,Z.eastOverIDL=Number.NEGATIVE_INFINITY;const u=1/a.CesiumMath.chordLength(l,i.maximumRadius),d=r.length;let p,y=i.cartesianToCartographic(r[0],K),m=q;for(let e=1;e<d;e++)p=m,m=y,y=i.cartesianToCartographic(r[e],p),J.setEndPoints(m,y),ee(J,u,c,Z);return p=m,m=y,y=i.cartesianToCartographic(r[0],p),J.setEndPoints(m,y),ee(J,u,c,Z),c.east-c.west>Z.eastOverIDL-Z.westOverIDL&&(c.west=Z.westOverIDL,c.east=Z.eastOverIDL,c.east>a.CesiumMath.PI&&(c.east=c.east-a.CesiumMath.TWO_PI),c.west>a.CesiumMath.PI&&(c.west=c.west-a.CesiumMath.TWO_PI)),c}const $=new t.Cartographic;function ee(e,t,o,r){const i=e.surfaceDistance,n=Math.ceil(i*t),s=n>0?i/(n-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(l,$);l+=s;const i=t.longitude,n=t.latitude;o.west=Math.min(o.west,i),o.east=Math.max(o.east,i),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const c=i>=0?i:i+a.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,c),r.eastOverIDL=Math.max(r.eastOverIDL,c)}}const te=[];function oe(t,o,r,i,n,a,s,c,d,p){const h={walls:[]};let f;if(s||c){const n=m.PolygonGeometryLibrary.createGeometryFromPositions(t,o,r,i,a,d,p),l=n.attributes.position.values,g=n.indices;let b,_;if(s&&c){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*g.length),_.set(g);const o=g.length,i=b/2;for(f=0;f<o;f+=3){const e=_[f]+i,t=_[f+1]+i,r=_[f+2]+i;_[f+o]=r,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&d.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(d.st&&e.defined(r)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(c){for(b=l.length/3,_=y.IndexDatatype.createTypedArray(b,g.length),f=0;f<g.length;f+=3)_[f]=g[f+2],_[f+1]=g[f+1],_[f+2]=g[f];n.indices=_}h.topAndBottom=new u.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,te),C=g.PolygonPipeline.computeWindingOrder2D(P);C===g.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=m.PolygonGeometryLibrary.computeWallGeometry(b,r,t,i,a,p);h.walls.push(new u.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,te),C=g.PolygonPipeline.computeWindingOrder2D(P),C===g.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=m.PolygonGeometryLibrary.computeWallGeometry(e,r,t,i,a,p),h.walls.push(new u.GeometryInstance({geometry:x}))}return h}function re(r){const i=r.polygonHierarchy,n=e.defaultValue(r.vertexFormat,h.VertexFormat.DEFAULT),s=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),c=e.defaultValue(r.stRotation,0),u=r.textureCoordinates,d=e.defaultValue(r.perPositionHeight,!1),p=d&&e.defined(r.extrudedHeight);let y=e.defaultValue(r.height,0),g=e.defaultValue(r.extrudedHeight,y);if(!p){const e=Math.max(y,g);g=Math.min(y,g),y=e}this._vertexFormat=h.VertexFormat.clone(n),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=c,this._height=y,this._extrudedHeight=g,this._closeTop=e.defaultValue(r.closeTop,!0),this._closeBottom=e.defaultValue(r.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=d,this._perPositionHeightExtrude=p,this._shadowVolume=e.defaultValue(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=u,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(i,t.Cartesian3)+t.Ellipsoid.packedLength+h.VertexFormat.packedLength+(u?m.PolygonGeometryLibrary.computeHierarchyPackedLength(u,t.Cartesian2):1)+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates})},re.pack=function(o,r,i){return i=e.defaultValue(i,0),i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,r,i,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,r,i),i+=t.Ellipsoid.packedLength,h.VertexFormat.pack(o._vertexFormat,r,i),i+=h.VertexFormat.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=e.defaultValue(o._offsetAttribute,-1),r[i++]=o._arcType,e.defined(o._textureCoordinates)?i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,r,i,t.Cartesian2):r[i++]=-1,r[i++]=o.packedLength,r};const ie=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ne=new h.VertexFormat,ae={polygonHierarchy:{}};return re.unpack=function(o,r,i){r=e.defaultValue(r,0);const n=m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian3);r=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(o,r,ie);r+=t.Ellipsoid.packedLength;const s=h.VertexFormat.unpack(o,r,ne);r+=h.VertexFormat.packedLength;const l=o[r++],c=o[r++],u=o[r++],d=o[r++],p=1===o[r++],y=1===o[r++],g=1===o[r++],f=1===o[r++],b=1===o[r++],_=o[r++],P=o[r++],C=-1===o[r]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian2);e.defined(C)?(r=C.startingIndex,delete C.startingIndex):r++;const x=o[r++];return e.defined(i)||(i=new re(ae)),i._polygonHierarchy=n,i._ellipsoid=t.Ellipsoid.clone(a,i._ellipsoid),i._vertexFormat=h.VertexFormat.clone(s,i._vertexFormat),i._height=l,i._extrudedHeight=c,i._granularity=u,i._stRotation=d,i._perPositionHeightExtrude=p,i._perPositionHeight=y,i._closeTop=g,i._closeBottom=f,i._shadowVolume=b,i._offsetAttribute=-1===_?void 0:_,i._arcType=P,i._textureCoordinates=C,i.packedLength=x,i},re.computeRectangle=function(r,i){const n=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(r.arcType,o.ArcType.GEODESIC),l=r.polygonHierarchy,c=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84);return X(l.positions,c,s,n,i)},re.createGeometry=function(t){const o=t._vertexFormat,r=t._ellipsoid,n=t._granularity,s=t._stRotation,h=t._polygonHierarchy,f=t._perPositionHeight,b=t._closeTop,_=t._closeBottom,P=t._arcType,C=t._textureCoordinates,x=e.defined(C);let w=h.positions;if(w.length<3)return;const T=l.EllipsoidTangentPlane.fromPoints(w,r),I=m.PolygonGeometryLibrary.polygonsFromHierarchy(h,x,T.projectPointsOntoPlane.bind(T),!f,r),A=I.hierarchy,v=I.polygons,E=x?m.PolygonGeometryLibrary.polygonsFromHierarchy(C,!0,(function(e){return e}),!1).polygons:void 0;if(0===A.length)return;w=A[0].outerRing;const G=m.PolygonGeometryLibrary.computeBoundingRectangle(T.plane.normal,T.projectPointOntoPlane.bind(T),w,s,L),O=[],V=t._height,H=t._extrudedHeight,D={perPositionHeight:f,vertexFormat:o,geometry:void 0,tangentPlane:T,boundingRectangle:G,ellipsoid:r,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:P};let N;if(t._perPositionHeightExtrude||!a.CesiumMath.equalsEpsilon(V,H,0,a.CesiumMath.EPSILON2))for(D.extrude=!0,D.top=b,D.bottom=_,D.shadowVolume=t._shadowVolume,D.offsetAttribute=t._offsetAttribute,N=0;N<v.length;N++){const e=oe(r,v[N],x?E[N]:void 0,n,A[N],f,b,_,o,P);let t;b&&_?(t=e.topAndBottom,D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f)):b?(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,V,r,!f),D.geometry=t.geometry):_&&(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,r,!0),D.geometry=t.geometry),(b||_)&&(D.wall=!1,t.geometry=Q(D),O.push(t));const i=e.walls;D.wall=!0;for(let e=0;e<i.length;e++){const t=i[e];D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f),t.geometry=Q(D),O.push(t)}}else for(N=0;N<v.length;N++){const i=new u.GeometryInstance({geometry:m.PolygonGeometryLibrary.createGeometryFromPositions(r,v[N],x?E[N]:void 0,n,f,o,P)});if(i.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(i.geometry.attributes.position.values,V,r,!f),D.geometry=i.geometry,i.geometry=Q(D),e.defined(t._offsetAttribute)){const e=i.geometry.attributes.position.values.length,o=t._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(o);i.geometry.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}O.push(i)}const F=p.GeometryPipeline.combineInstances(O)[0];F.attributes.position.values=new Float64Array(F.attributes.position.values),F.indices=y.IndexDatatype.createTypedArray(F.attributes.position.values.length/3,F.indices);const R=F.attributes,M=i.BoundingSphere.fromVertices(R.position.values);return o.position||delete R.position,new c.Geometry({attributes:R,indices:F.indices,primitiveType:F.primitiveType,boundingSphere:M,offsetAttribute:t._offsetAttribute})},re.createShadowVolume=function(e,t,o){const r=e._granularity,i=e._ellipsoid,n=t(r,i),a=o(r,i);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:i,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:h.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=X(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,r=e._polygonHierarchy.positions,i=e.rectangle;return c.Geometry._textureCoordinateRotationPoints(r,t,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return e.defined(r)&&(o=re.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),re.createGeometry(o)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./ArcType-5c683766","./Transforms-6c4dd71f","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./EllipsoidTangentPlane-764a8df1","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryOffsetAttribute-a17b96d9","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonGeometryLibrary-c5c437c2","./PolygonPipeline-666b269f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./arrayRemoveDuplicates-75feaa04","./EllipsoidRhumbLine-e7a75836"],(function(e,t,i,o,r,n,a,s,l,y,u,p,d,c,f,g,m,h,b,P,E,A,_,G,L){"use strict";const H=[],T=[];function v(e,t,o,r,u){const p=a.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(r)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,T):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,T));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=d.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new y.GeometryInstance({geometry:new s.Geometry({attributes:new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:s.PrimitiveType.LINES})})}function C(e,t,o,r,u){const p=a.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(r)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,T):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,T));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=d.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new y.GeometryInstance({geometry:new s.Geometry({attributes:new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:s.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,a=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),s=e.defaultValue(o.granularity,n.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(o.perPositionHeight,!1),y=l&&e.defined(o.extrudedHeight),u=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let p=e.defaultValue(o.height,0),d=e.defaultValue(o.extrudedHeight,p);if(!y){const e=Math.max(p,d);d=Math.min(p,d),p=e}this._ellipsoid=t.Ellipsoid.clone(a),this._granularity=s,this._height=p,this._extrudedHeight=d,this._arcType=u,this._polygonHierarchy=r,this._perPositionHeight=l,this._perPositionHeightExtrude=y,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=c.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=c.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),D={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=c.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,x);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],p=1===i[o++],d=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(D)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=p,r._perPositionHeightExtrude=u,r._arcType=d,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,r=t._granularity,a=t._polygonHierarchy,l=t._perPositionHeight,y=t._arcType,d=c.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(a,!l,i);if(0===d.length)return;let g;const m=[],h=n.CesiumMath.chordLength(r,i.maximumRadius),b=t._height,P=t._extrudedHeight;let E,A;if(t._perPositionHeightExtrude||!n.CesiumMath.equalsEpsilon(b,P,0,n.CesiumMath.EPSILON2))for(A=0;A<d.length;A++){if(g=C(i,d[A],h,l,y),g.geometry=c.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(g.geometry,b,P,i,l),e.defined(t._offsetAttribute)){const e=g.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===u.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(E=t._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=i.fill(E)),g.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}m.push(g)}else for(A=0;A<d.length;A++){if(g=v(i,d[A],h,l,y),g.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(g.geometry.attributes.position.values,b,i,!l),e.defined(t._offsetAttribute)){const e=g.geometry.attributes.position.values.length;E=t._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(E);g.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}m.push(g)}const _=p.GeometryPipeline.combineInstances(m)[0],G=o.BoundingSphere.fromVertices(_.attributes.position.values);return new s.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:G,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./ArcType-b570b3ee","./Transforms-b683baff","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./EllipsoidTangentPlane-12fe3e10","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryOffsetAttribute-ddcc2f7f","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonGeometryLibrary-b5d25b76","./PolygonPipeline-71c413e2","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./arrayRemoveDuplicates-d332a3bf","./EllipsoidRhumbLine-c3b11f35"],(function(e,t,i,o,r,n,a,s,l,y,u,p,d,c,f,g,m,h,b,P,E,A,_,G,L){"use strict";const H=[],T=[];function v(e,t,o,r,u){const p=a.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(r)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,T):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,T));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=d.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new y.GeometryInstance({geometry:new s.Geometry({attributes:new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:s.PrimitiveType.LINES})})}function C(e,t,o,r,u){const p=a.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(p)===f.WindingOrder.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(r)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,T):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,T));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=d.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new y.GeometryInstance({geometry:new s.Geometry({attributes:new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:s.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,a=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),s=e.defaultValue(o.granularity,n.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(o.perPositionHeight,!1),y=l&&e.defined(o.extrudedHeight),u=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let p=e.defaultValue(o.height,0),d=e.defaultValue(o.extrudedHeight,p);if(!y){const e=Math.max(p,d);d=Math.min(p,d),p=e}this._ellipsoid=t.Ellipsoid.clone(a),this._granularity=s,this._height=p,this._extrudedHeight=d,this._arcType=u,this._polygonHierarchy=r,this._perPositionHeight=l,this._perPositionHeightExtrude=y,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=c.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=c.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),D={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=c.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,x);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],p=1===i[o++],d=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(D)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=p,r._perPositionHeightExtrude=u,r._arcType=d,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,r=t._granularity,a=t._polygonHierarchy,l=t._perPositionHeight,y=t._arcType,d=c.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(a,!l,i);if(0===d.length)return;let g;const m=[],h=n.CesiumMath.chordLength(r,i.maximumRadius),b=t._height,P=t._extrudedHeight;let E,A;if(t._perPositionHeightExtrude||!n.CesiumMath.equalsEpsilon(b,P,0,n.CesiumMath.EPSILON2))for(A=0;A<d.length;A++){if(g=C(i,d[A],h,l,y),g.geometry=c.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(g.geometry,b,P,i,l),e.defined(t._offsetAttribute)){const e=g.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===u.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(E=t._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,i=i.fill(E)),g.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}m.push(g)}else for(A=0;A<d.length;A++){if(g=v(i,d[A],h,l,y),g.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(g.geometry.attributes.position.values,b,i,!l),e.defined(t._offsetAttribute)){const e=g.geometry.attributes.position.values.length;E=t._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(E);g.geometry.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}m.push(g)}const _=p.GeometryPipeline.combineInstances(m)[0],G=o.BoundingSphere.fromVertices(_.attributes.position.values);return new s.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:G,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./ArcType-5c683766","./arrayRemoveDuplicates-75feaa04","./Transforms-6c4dd71f","./Color-d0ee8196","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./IndexDatatype-88be9f5a","./PolylinePipeline-5d154ff9","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,o,n,r,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_){"use strict";const A=[];function E(e,t,o,n,r){const i=A;let l;i.length=r;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=n.red,y=n.green,m=n.blue,f=n.alpha;if(a.Color.equals(o,n)){for(l=0;l<r;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/r,C=(y-c)/r,g=(m-p)/r,_=(f-d)/r;for(l=0;l<r;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function b(n){const r=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,l=n.colors,s=e.defaultValue(n.width,1),c=e.defaultValue(n.colorsPerVertex,!1);this._positions=r,this._colors=l,this._width=s,this._colorsPerVertex=c,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(n.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(n.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(n.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let p=1+r.length*t.Cartesian3.packedLength;p+=e.defined(l)?1+l.length*a.Color.packedLength:1,this.packedLength=p+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}b.pack=function(o,n,r){let i;r=e.defaultValue(r,0);const l=o._positions;let s=l.length;for(n[r++]=s,i=0;i<s;++i,r+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],n,r);const c=o._colors;for(s=e.defined(c)?c.length:0,n[r++]=s,i=0;i<s;++i,r+=a.Color.packedLength)a.Color.pack(c[i],n,r);return t.Ellipsoid.pack(o._ellipsoid,n,r),r+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,n,r),r+=u.VertexFormat.packedLength,n[r++]=o._width,n[r++]=o._colorsPerVertex?1:0,n[r++]=o._arcType,n[r]=o._granularity,n};const P=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,x={positions:void 0,colors:void 0,ellipsoid:P,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};b.unpack=function(o,n,r){let i;n=e.defaultValue(n,0);let l=o[n++];const s=new Array(l);for(i=0;i<l;++i,n+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,n);l=o[n++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,n+=a.Color.packedLength)c[i]=a.Color.unpack(o,n);const p=t.Ellipsoid.unpack(o,n,P);n+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,n,w);n+=u.VertexFormat.packedLength;const y=o[n++],m=1===o[n++],f=o[n++],h=o[n];return e.defined(r)?(r._positions=s,r._colors=c,r._ellipsoid=t.Ellipsoid.clone(p,r._ellipsoid),r._vertexFormat=u.VertexFormat.clone(d,r._vertexFormat),r._width=y,r._colorsPerVertex=m,r._arcType=f,r._granularity=h,r):(x.positions=s,x.colors=c,x.width=y,x.colorsPerVertex=m,x.arcType=f,x.granularity=h,new b(x))};const T=new t.Cartesian3,D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3;return b.createGeometry=function(l){const u=l._width,y=l._vertexFormat;let m=l._colors;const f=l._colorsPerVertex,h=l._arcType,C=l._granularity,g=l._ellipsoid;let _,b,P;const w=[];let x=n.arrayRemoveDuplicates(l._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(m)&&w.length>0){let e=0,t=w[0];m=m.filter((function(o,n){let r=!1;return r=f?n===t||0===n&&1===t:n+1===t,!r||(e++,t=w[e],!1)}))}let v=x.length;if(v<2||u<=0)return;if(h===o.ArcType.GEODESIC||h===o.ArcType.RHUMB){let t,n;h===o.ArcType.GEODESIC?(t=i.CesiumMath.chordLength(C,g.maximumRadius),n=d.PolylinePipeline.numberOfPoints):(t=C,n=d.PolylinePipeline.numberOfPointsRhumbLine);const r=d.PolylinePipeline.extractHeights(x,g);if(e.defined(m)){let e=1;for(_=0;_<v-1;++_)e+=n(x[_],x[_+1],t);const o=new Array(e);let r=0;for(_=0;_<v-1;++_){const i=x[_],l=x[_+1],s=m[_],c=n(i,l,t);if(f&&_<e){const e=E(0,0,s,m[_+1],c),t=e.length;for(b=0;b<t;++b)o[r++]=e[b]}else for(b=0;b<c;++b)o[r++]=a.Color.clone(s)}o[r]=a.Color.clone(m[m.length-1]),m=o,A.length=0}x=h===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:x,minDistance:t,ellipsoid:g,height:r}):d.PolylinePipeline.generateCartesianRhumbArc({positions:x,granularity:t,ellipsoid:g,height:r})}v=x.length;const L=4*v-4,F=new Float64Array(3*L),G=new Float64Array(3*L),O=new Float64Array(3*L),R=new Float32Array(2*L),I=y.st?new Float32Array(2*L):void 0,S=e.defined(m)?new Uint8Array(4*L):void 0;let B,U=0,N=0,M=0,H=0;for(b=0;b<v;++b){let o,n;0===b?(B=T,t.Cartesian3.subtract(x[0],x[1],B),t.Cartesian3.add(x[0],B,B)):B=x[b-1],t.Cartesian3.clone(B,k),t.Cartesian3.clone(x[b],D),b===v-1?(B=T,t.Cartesian3.subtract(x[v-1],x[v-2],B),t.Cartesian3.add(x[v-1],B,B)):B=x[b+1],t.Cartesian3.clone(B,V),e.defined(S)&&(o=0===b||f?m[b]:m[b-1],b!==v-1&&(n=m[b]));const r=b===v-1?2:4;for(P=0===b?2:0;P<r;++P){t.Cartesian3.pack(D,F,U),t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),U+=3;const r=P-2<0?-1:1;if(R[N++]=P%2*2-1,R[N++]=r*u,y.st&&(I[M++]=b/(v-1),I[M++]=Math.max(R[N-2],0)),e.defined(S)){const e=P<2?o:n;S[H++]=a.Color.floatToByte(e.red),S[H++]=a.Color.floatToByte(e.green),S[H++]=a.Color.floatToByte(e.blue),S[H++]=a.Color.floatToByte(e.alpha)}}}const W=new c.GeometryAttributes;W.position=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F}),W.prevPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),W.nextPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),W.expandAndWidth=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R}),y.st&&(W.st=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I})),e.defined(S)&&(W.color=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:S,normalize:!0}));const Y=p.IndexDatatype.createTypedArray(L,6*v-6);let q=0,j=0;const z=v-1;for(b=0;b<z;++b)Y[j++]=q,Y[j++]=q+2,Y[j++]=q+1,Y[j++]=q+1,Y[j++]=q+2,Y[j++]=q+3,q+=4;return new s.Geometry({attributes:W,indices:Y,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:r.BoundingSphere.fromPoints(x),geometryType:s.GeometryType.POLYLINES})},function(o,n){return e.defined(n)&&(o=b.unpack(o,n)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),b.createGeometry(o)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./ArcType-b570b3ee","./arrayRemoveDuplicates-d332a3bf","./Transforms-b683baff","./Color-661a230d","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./IndexDatatype-d42fd89c","./PolylinePipeline-4244f016","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,o,n,r,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_){"use strict";const b=[];function A(e,t,o,n,r){const i=b;let l;i.length=r;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=n.red,y=n.green,m=n.blue,f=n.alpha;if(a.Color.equals(o,n)){for(l=0;l<r;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/r,C=(y-c)/r,g=(m-p)/r,_=(f-d)/r;for(l=0;l<r;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function E(n){const r=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,l=n.colors,s=e.defaultValue(n.width,1),c=e.defaultValue(n.colorsPerVertex,!1);this._positions=r,this._colors=l,this._width=s,this._colorsPerVertex=c,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(n.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(n.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(n.granularity,i.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let p=1+r.length*t.Cartesian3.packedLength;p+=e.defined(l)?1+l.length*a.Color.packedLength:1,this.packedLength=p+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}E.pack=function(o,n,r){let i;r=e.defaultValue(r,0);const l=o._positions;let s=l.length;for(n[r++]=s,i=0;i<s;++i,r+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],n,r);const c=o._colors;for(s=e.defined(c)?c.length:0,n[r++]=s,i=0;i<s;++i,r+=a.Color.packedLength)a.Color.pack(c[i],n,r);return t.Ellipsoid.pack(o._ellipsoid,n,r),r+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,n,r),r+=u.VertexFormat.packedLength,n[r++]=o._width,n[r++]=o._colorsPerVertex?1:0,n[r++]=o._arcType,n[r]=o._granularity,n};const P=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,x={positions:void 0,colors:void 0,ellipsoid:P,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};E.unpack=function(o,n,r){let i;n=e.defaultValue(n,0);let l=o[n++];const s=new Array(l);for(i=0;i<l;++i,n+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,n);l=o[n++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,n+=a.Color.packedLength)c[i]=a.Color.unpack(o,n);const p=t.Ellipsoid.unpack(o,n,P);n+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,n,w);n+=u.VertexFormat.packedLength;const y=o[n++],m=1===o[n++],f=o[n++],h=o[n];return e.defined(r)?(r._positions=s,r._colors=c,r._ellipsoid=t.Ellipsoid.clone(p,r._ellipsoid),r._vertexFormat=u.VertexFormat.clone(d,r._vertexFormat),r._width=y,r._colorsPerVertex=m,r._arcType=f,r._granularity=h,r):(x.positions=s,x.colors=c,x.width=y,x.colorsPerVertex=m,x.arcType=f,x.granularity=h,new E(x))};const T=new t.Cartesian3,D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3;return E.createGeometry=function(l){const u=l._width,y=l._vertexFormat;let m=l._colors;const f=l._colorsPerVertex,h=l._arcType,C=l._granularity,g=l._ellipsoid;let _,E,P;const w=[];let x=n.arrayRemoveDuplicates(l._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(m)&&w.length>0){let e=0,t=w[0];m=m.filter((function(o,n){let r=!1;return r=f?n===t||0===n&&1===t:n+1===t,!r||(e++,t=w[e],!1)}))}let v=x.length;if(v<2||u<=0)return;if(h===o.ArcType.GEODESIC||h===o.ArcType.RHUMB){let t,n;h===o.ArcType.GEODESIC?(t=i.CesiumMath.chordLength(C,g.maximumRadius),n=d.PolylinePipeline.numberOfPoints):(t=C,n=d.PolylinePipeline.numberOfPointsRhumbLine);const r=d.PolylinePipeline.extractHeights(x,g);if(e.defined(m)){let e=1;for(_=0;_<v-1;++_)e+=n(x[_],x[_+1],t);const o=new Array(e);let r=0;for(_=0;_<v-1;++_){const i=x[_],l=x[_+1],s=m[_],c=n(i,l,t);if(f&&_<e){const e=A(0,0,s,m[_+1],c),t=e.length;for(E=0;E<t;++E)o[r++]=e[E]}else for(E=0;E<c;++E)o[r++]=a.Color.clone(s)}o[r]=a.Color.clone(m[m.length-1]),m=o,b.length=0}x=h===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:x,minDistance:t,ellipsoid:g,height:r}):d.PolylinePipeline.generateCartesianRhumbArc({positions:x,granularity:t,ellipsoid:g,height:r})}v=x.length;const L=4*v-4,F=new Float64Array(3*L),G=new Float64Array(3*L),O=new Float64Array(3*L),R=new Float32Array(2*L),I=y.st?new Float32Array(2*L):void 0,S=e.defined(m)?new Uint8Array(4*L):void 0;let B,U=0,N=0,M=0,H=0;for(E=0;E<v;++E){let o,n;0===E?(B=T,t.Cartesian3.subtract(x[0],x[1],B),t.Cartesian3.add(x[0],B,B)):B=x[E-1],t.Cartesian3.clone(B,k),t.Cartesian3.clone(x[E],D),E===v-1?(B=T,t.Cartesian3.subtract(x[v-1],x[v-2],B),t.Cartesian3.add(x[v-1],B,B)):B=x[E+1],t.Cartesian3.clone(B,V),e.defined(S)&&(o=0===E||f?m[E]:m[E-1],E!==v-1&&(n=m[E]));const r=E===v-1?2:4;for(P=0===E?2:0;P<r;++P){t.Cartesian3.pack(D,F,U),t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),U+=3;const r=P-2<0?-1:1;if(R[N++]=P%2*2-1,R[N++]=r*u,y.st&&(I[M++]=E/(v-1),I[M++]=Math.max(R[N-2],0)),e.defined(S)){const e=P<2?o:n;S[H++]=a.Color.floatToByte(e.red),S[H++]=a.Color.floatToByte(e.green),S[H++]=a.Color.floatToByte(e.blue),S[H++]=a.Color.floatToByte(e.alpha)}}}const W=new c.GeometryAttributes;W.position=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F}),W.prevPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),W.nextPosition=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),W.expandAndWidth=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:R}),y.st&&(W.st=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I})),e.defined(S)&&(W.color=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:S,normalize:!0}));const Y=p.IndexDatatype.createTypedArray(L,6*v-6);let q=0,j=0;const z=v-1;for(E=0;E<z;++E)Y[j++]=q,Y[j++]=q+2,Y[j++]=q+1,Y[j++]=q+1,Y[j++]=q+2,Y[j++]=q+3,q+=4;return new s.Geometry({attributes:W,indices:Y,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:r.BoundingSphere.fromPoints(x),geometryType:s.GeometryType.POLYLINES})},function(o,n){return e.defined(n)&&(o=E.unpack(o,n)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),E.createGeometry(o)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./arrayRemoveDuplicates-75feaa04","./BoundingRectangle-6bfae79e","./Transforms-6c4dd71f","./ComponentDatatype-43ab226f","./PolylineVolumeGeometryLibrary-f2bf0782","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,_,E,k,v,V,L){"use strict";function x(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,r.CornerType.ROUNDED),this._vertexFormat=m.VertexFormat.clone(e.defaultValue(n.vertexFormat,m.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let l=1+o.length*t.Cartesian3.packedLength;l+=1+i.length*t.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+m.VertexFormat.packedLength+2}x.pack=function(n,o,i){let a;i=e.defaultValue(i,0);const r=n._positions;let l=r.length;for(o[i++]=l,a=0;a<l;++a,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[a],o,i);const s=n._shape;for(l=s.length,o[i++]=l,a=0;a<l;++a,i+=t.Cartesian2.packedLength)t.Cartesian2.pack(s[a],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,m.VertexFormat.pack(n._vertexFormat,o,i),i+=m.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const C=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),F=new m.VertexFormat,A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,vertexFormat:F,cornerType:void 0,granularity:void 0};x.unpack=function(n,o,i){let a;o=e.defaultValue(o,0);let r=n[o++];const l=new Array(r);for(a=0;a<r;++a,o+=t.Cartesian3.packedLength)l[a]=t.Cartesian3.unpack(n,o);r=n[o++];const s=new Array(r);for(a=0;a<r;++a,o+=t.Cartesian2.packedLength)s[a]=t.Cartesian2.unpack(n,o);const p=t.Ellipsoid.unpack(n,o,C);o+=t.Ellipsoid.packedLength;const c=m.VertexFormat.unpack(n,o,F);o+=m.VertexFormat.packedLength;const d=n[o++],u=n[o];return e.defined(i)?(i._positions=l,i._shape=s,i._ellipsoid=t.Ellipsoid.clone(p,i._ellipsoid),i._vertexFormat=m.VertexFormat.clone(c,i._vertexFormat),i._cornerType=d,i._granularity=u,i):(A.polylinePositions=l,A.shapePositions=s,A.cornerType=d,A.granularity=u,new x(A))};const T=new o.BoundingRectangle;return x.createGeometry=function(e){const l=e._positions,m=n.arrayRemoveDuplicates(l,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),m.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,T);return function(e,t,n,o){const l=new p.GeometryAttributes;o.position&&(l.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const m=t.length,y=e.length/3,g=(y-2*m)/(2*m),f=u.PolygonPipeline.triangulate(t),h=(g-1)*m*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,_,E,k,v,V;const L=2*m;let x=0;for(P=0;P<g-1;P++){for(_=0;_<m-1;_++)E=2*_+P*m*2,V=E+L,k=E+1,v=k+L,b[x++]=k,b[x++]=E,b[x++]=v,b[x++]=v,b[x++]=E,b[x++]=V;E=2*m-2+P*m*2,k=E+1,v=k+L,V=E+L,b[x++]=k,b[x++]=E,b[x++]=v,b[x++]=v,b[x++]=E,b[x++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,r=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+r),e[d++]=p,e[d++]=c,_=1;_<m;_++)c=i*(t[_].y+r),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+r),e[d++]=p,e[d++]=c}for(_=0;_<m;_++)p=0,c=i*(t[_].y+r),e[d++]=p,e[d++]=c;for(_=0;_<m;_++)p=(g-1)*o,c=i*(t[_].y+r),e[d++]=p,e[d++]=c;l.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*m;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[x++]=e,b[x++]=t,b[x++]=n,b[x++]=n+m,b[x++]=t+m,b[x++]=e+m}let F=new s.Geometry({attributes:l,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){r.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(r.PolylineVolumeGeometryLibrary.computePositions(m,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=x.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),x.createGeometry(n)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./arrayRemoveDuplicates-d332a3bf","./BoundingRectangle-d55ba9f7","./Transforms-b683baff","./ComponentDatatype-6ff7d2c3","./PolylineVolumeGeometryLibrary-1c97d86c","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,_,E,k,v,V,L){"use strict";function x(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,r.CornerType.ROUNDED),this._vertexFormat=m.VertexFormat.clone(e.defaultValue(n.vertexFormat,m.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let l=1+o.length*t.Cartesian3.packedLength;l+=1+i.length*t.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+m.VertexFormat.packedLength+2}x.pack=function(n,o,i){let a;i=e.defaultValue(i,0);const r=n._positions;let l=r.length;for(o[i++]=l,a=0;a<l;++a,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[a],o,i);const s=n._shape;for(l=s.length,o[i++]=l,a=0;a<l;++a,i+=t.Cartesian2.packedLength)t.Cartesian2.pack(s[a],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,m.VertexFormat.pack(n._vertexFormat,o,i),i+=m.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const C=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),F=new m.VertexFormat,A={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,vertexFormat:F,cornerType:void 0,granularity:void 0};x.unpack=function(n,o,i){let a;o=e.defaultValue(o,0);let r=n[o++];const l=new Array(r);for(a=0;a<r;++a,o+=t.Cartesian3.packedLength)l[a]=t.Cartesian3.unpack(n,o);r=n[o++];const s=new Array(r);for(a=0;a<r;++a,o+=t.Cartesian2.packedLength)s[a]=t.Cartesian2.unpack(n,o);const p=t.Ellipsoid.unpack(n,o,C);o+=t.Ellipsoid.packedLength;const c=m.VertexFormat.unpack(n,o,F);o+=m.VertexFormat.packedLength;const d=n[o++],u=n[o];return e.defined(i)?(i._positions=l,i._shape=s,i._ellipsoid=t.Ellipsoid.clone(p,i._ellipsoid),i._vertexFormat=m.VertexFormat.clone(c,i._vertexFormat),i._cornerType=d,i._granularity=u,i):(A.polylinePositions=l,A.shapePositions=s,A.cornerType=d,A.granularity=u,new x(A))};const T=new o.BoundingRectangle;return x.createGeometry=function(e){const l=e._positions,m=n.arrayRemoveDuplicates(l,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),m.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,T);return function(e,t,n,o){const l=new p.GeometryAttributes;o.position&&(l.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const m=t.length,y=e.length/3,g=(y-2*m)/(2*m),f=u.PolygonPipeline.triangulate(t),h=(g-1)*m*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,_,E,k,v,V;const L=2*m;let x=0;for(P=0;P<g-1;P++){for(_=0;_<m-1;_++)E=2*_+P*m*2,V=E+L,k=E+1,v=k+L,b[x++]=k,b[x++]=E,b[x++]=v,b[x++]=v,b[x++]=E,b[x++]=V;E=2*m-2+P*m*2,k=E+1,v=k+L,V=E+L,b[x++]=k,b[x++]=E,b[x++]=v,b[x++]=v,b[x++]=E,b[x++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,r=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+r),e[d++]=p,e[d++]=c,_=1;_<m;_++)c=i*(t[_].y+r),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+r),e[d++]=p,e[d++]=c}for(_=0;_<m;_++)p=0,c=i*(t[_].y+r),e[d++]=p,e[d++]=c;for(_=0;_<m;_++)p=(g-1)*o,c=i*(t[_].y+r),e[d++]=p,e[d++]=c;l.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*m;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[x++]=e,b[x++]=t,b[x++]=n,b[x++]=n+m,b[x++]=t+m,b[x++]=e+m}let F=new s.Geometry({attributes:l,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){r.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(r.PolylineVolumeGeometryLibrary.computePositions(m,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=x.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),x.createGeometry(n)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./arrayRemoveDuplicates-75feaa04","./BoundingRectangle-6bfae79e","./Transforms-6c4dd71f","./ComponentDatatype-43ab226f","./PolylineVolumeGeometryLibrary-f2bf0782","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836"],(function(e,t,n,i,o,a,l,r,s,p,c,d,u,y,f,g,h,m,E,_,b,P){"use strict";function k(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=n.shapePositions;this._positions=i,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._granularity=e.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let r=1+i.length*t.Cartesian3.packedLength;r+=1+o.length*t.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+2}k.pack=function(n,i,o){let a;o=e.defaultValue(o,0);const l=n._positions;let r=l.length;for(i[o++]=r,a=0;a<r;++a,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[a],i,o);const s=n._shape;for(r=s.length,i[o++]=r,a=0;a<r;++a,o+=t.Cartesian2.packedLength)t.Cartesian2.pack(s[a],i,o);return t.Ellipsoid.pack(n._ellipsoid,i,o),o+=t.Ellipsoid.packedLength,i[o++]=n._cornerType,i[o]=n._granularity,i};const C=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),L={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,height:void 0,cornerType:void 0,granularity:void 0};k.unpack=function(n,i,o){let a;i=e.defaultValue(i,0);let l=n[i++];const r=new Array(l);for(a=0;a<l;++a,i+=t.Cartesian3.packedLength)r[a]=t.Cartesian3.unpack(n,i);l=n[i++];const s=new Array(l);for(a=0;a<l;++a,i+=t.Cartesian2.packedLength)s[a]=t.Cartesian2.unpack(n,i);const p=t.Ellipsoid.unpack(n,i,C);i+=t.Ellipsoid.packedLength;const c=n[i++],d=n[i];return e.defined(o)?(o._positions=r,o._shape=s,o._ellipsoid=t.Ellipsoid.clone(p,o._ellipsoid),o._cornerType=c,o._granularity=d,o):(L.polylinePositions=r,L.shapePositions=s,L.cornerType=c,L.granularity=d,new k(L))};const T=new i.BoundingRectangle;return k.createGeometry=function(e){const r=e._positions,u=n.arrayRemoveDuplicates(r,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;d.PolygonPipeline.computeWindingOrder2D(y)===d.WindingOrder.CLOCKWISE&&y.reverse();const f=i.BoundingRectangle.fromPoints(y,T);return function(e,t){const n=new p.GeometryAttributes;n.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const i=t.length,l=n.position.values.length/3,r=e.length/3/i,d=c.IndexDatatype.createTypedArray(l,2*i*(r+1));let u,y,f=0;u=0;let g=u*i;for(y=0;y<i-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=i-1+g,d[f++]=g,u=r-1,g=u*i,y=0;y<i-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=i-1+g,d[f++]=g,u=0;u<r-1;u++){const e=i*u,t=e+i;for(y=0;y<i;y++)d[f++]=y+e,d[f++]=y+t}return new s.Geometry({attributes:n,indices:c.IndexDatatype.createTypedArray(l,d),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,f,e,!1),y)},function(n,i){return e.defined(i)&&(n=k.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),k.createGeometry(n)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./arrayRemoveDuplicates-d332a3bf","./BoundingRectangle-d55ba9f7","./Transforms-b683baff","./ComponentDatatype-6ff7d2c3","./PolylineVolumeGeometryLibrary-1c97d86c","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35"],(function(e,t,n,i,o,a,l,r,s,p,c,d,u,y,f,g,h,m,E,_,P,b){"use strict";function k(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=n.shapePositions;this._positions=i,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._granularity=e.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let r=1+i.length*t.Cartesian3.packedLength;r+=1+o.length*t.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+2}k.pack=function(n,i,o){let a;o=e.defaultValue(o,0);const l=n._positions;let r=l.length;for(i[o++]=r,a=0;a<r;++a,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[a],i,o);const s=n._shape;for(r=s.length,i[o++]=r,a=0;a<r;++a,o+=t.Cartesian2.packedLength)t.Cartesian2.pack(s[a],i,o);return t.Ellipsoid.pack(n._ellipsoid,i,o),o+=t.Ellipsoid.packedLength,i[o++]=n._cornerType,i[o]=n._granularity,i};const C=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),L={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,height:void 0,cornerType:void 0,granularity:void 0};k.unpack=function(n,i,o){let a;i=e.defaultValue(i,0);let l=n[i++];const r=new Array(l);for(a=0;a<l;++a,i+=t.Cartesian3.packedLength)r[a]=t.Cartesian3.unpack(n,i);l=n[i++];const s=new Array(l);for(a=0;a<l;++a,i+=t.Cartesian2.packedLength)s[a]=t.Cartesian2.unpack(n,i);const p=t.Ellipsoid.unpack(n,i,C);i+=t.Ellipsoid.packedLength;const c=n[i++],d=n[i];return e.defined(o)?(o._positions=r,o._shape=s,o._ellipsoid=t.Ellipsoid.clone(p,o._ellipsoid),o._cornerType=c,o._granularity=d,o):(L.polylinePositions=r,L.shapePositions=s,L.cornerType=c,L.granularity=d,new k(L))};const T=new i.BoundingRectangle;return k.createGeometry=function(e){const r=e._positions,u=n.arrayRemoveDuplicates(r,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;d.PolygonPipeline.computeWindingOrder2D(y)===d.WindingOrder.CLOCKWISE&&y.reverse();const f=i.BoundingRectangle.fromPoints(y,T);return function(e,t){const n=new p.GeometryAttributes;n.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const i=t.length,l=n.position.values.length/3,r=e.length/3/i,d=c.IndexDatatype.createTypedArray(l,2*i*(r+1));let u,y,f=0;u=0;let g=u*i;for(y=0;y<i-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=i-1+g,d[f++]=g,u=r-1,g=u*i,y=0;y<i-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=i-1+g,d[f++]=g,u=0;u<r-1;u++){const e=i*u,t=e+i;for(y=0;y<i;y++)d[f++]=y+e,d[f++]=y+t}return new s.Geometry({attributes:n,indices:c.IndexDatatype.createTypedArray(l,d),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,f,e,!1),y)},function(n,i){return e.defined(i)&&(n=k.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),k.createGeometry(n)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./Transforms-6c4dd71f","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryInstance-9c4e19d7","./GeometryOffsetAttribute-a17b96d9","./GeometryPipeline-f5483757","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./RectangleGeometryLibrary-3c753379","./VertexFormat-d53ce9da","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./AttributeCompression-d9dabbfc","./EncodedCartesian3-3f5898d8","./IntersectionTests-4db2368e","./Plane-a0b66c27","./EllipsoidRhumbLine-e7a75836"],(function(t,e,n,a,o,r,i,s,l,u,c,m,d,p,g,y,f,h,b,_,A,x){"use strict";const w=new e.Cartesian3,C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Rectangle,G=new e.Cartesian2,F=new n.BoundingSphere,P=new n.BoundingSphere;function V(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const L=new e.Cartesian3,D=new e.Cartesian3;function M(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let p=0,g=s,y=s,f=0;u&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=w,E=G;let F=Number.MAX_VALUE,P=Number.MAX_VALUE,L=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=p;t<g;++t)for(let e=0;e<l;++e)d.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y));if(u&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=E.x,P=E.y,L=E.x,D=E.y)),m&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=E.x,b[A]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y))),a.st&&(F<0||P<0||L>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-F)/(L-F),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=R,m=v;let d=C;if(n.normal||n.tangent||n.bitangent)for(let p=0;p<r;p+=3){const r=e.Cartesian3.fromArray(t,p,w),g=u+1,y=u+2;d=a.geodeticSurfaceNormal(r,d),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,d,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(d,m,c),c)),n.normal&&(i[u]=d.x,i[g]=d.y,i[y]=d.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function T(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function O(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const N=new p.VertexFormat;function S(n,a){const i=n._shadowVolume,d=n._offsetAttribute,g=n._vertexFormat,y=n._extrudedHeight,f=n._surfaceHeight,h=n._ellipsoid,b=a.height,_=a.width;let A;if(i){const t=p.VertexFormat.clone(g,N);t.normal=!0,n._vertexFormat=t}const x=M(n,a);i&&(n._vertexFormat=g);let E=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,f,h,!1);E=new Float64Array(E);let G=E.length;const F=2*G,P=new Float64Array(F);P.set(E);const S=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,y,h);P.set(S,G),x.attributes.position.values=P;const I=g.normal?new Float32Array(F):void 0,k=g.tangent?new Float32Array(F):void 0,H=g.bitangent?new Float32Array(F):void 0,z=g.st?new Float32Array(F/3*2):void 0;let B,U,Y;if(g.normal){for(U=x.attributes.normal.values,I.set(U),A=0;A<G;A++)U[A]=-U[A];I.set(U,G),x.attributes.normal.values=I}if(i){U=x.attributes.normal.values,g.normal||(x.attributes.normal=void 0);const t=new Float32Array(F);for(A=0;A<G;A++)U[A]=-U[A];t.set(U,G),x.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const q=t.defined(d);if(q){const t=G/3*2;let e=new Uint8Array(t);d===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(Y=d===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(Y)),x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(g.tangent){const t=x.attributes.tangent.values;for(k.set(t),A=0;A<G;A++)t[A]=-t[A];k.set(t,G),x.attributes.tangent.values=k}if(g.bitangent){const t=x.attributes.bitangent.values;H.set(t),H.set(t,G),x.attributes.bitangent.values=H}g.st&&(B=x.attributes.st.values,z.set(B),z.set(B,G/3*2),x.attributes.st.values=z);const X=x.indices,Q=X.length,W=G/3,j=c.IndexDatatype.createTypedArray(F/3,2*Q);for(j.set(X),A=0;A<Q;A+=3)j[A+Q]=X[A+2]+W,j[A+1+Q]=X[A+1]+W,j[A+2+Q]=X[A]+W;x.indices=j;const J=a.northCap,Z=a.southCap;let K=b,$=2,tt=0,et=4,nt=4;J&&($-=1,K-=1,tt+=1,et-=2,nt-=1),Z&&($-=1,K-=1,tt+=1,et-=2,nt-=1),tt+=$*_+2*K-et;const at=2*(tt+nt);let ot=new Float64Array(3*at);const rt=i?new Float32Array(3*at):void 0;let it=q?new Uint8Array(at):void 0,st=g.st?new Float32Array(2*at):void 0;const lt=d===l.GeometryOffsetAttribute.TOP;q&&!lt&&(Y=d===l.GeometryOffsetAttribute.ALL?1:0,it=it.fill(Y));let ut=0,ct=0,mt=0,dt=0;const pt=_*K;let gt;for(A=0;A<pt;A+=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(Z){const t=J?pt+1:pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=pt-_;A<pt;A++)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);for(A=pt-1;A>0;A-=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(J){const t=pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=_-1;A>=0;A--)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);let yt=function(t,n,a){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0,c=0,m=0,d=!0,p=R,g=v,y=C;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<r;f+=6){const h=e.Cartesian3.fromArray(t,f,w),b=e.Cartesian3.fromArray(t,(f+6)%r,L);if(d){const n=e.Cartesian3.fromArray(t,(f+3)%r,D);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),d=!1}e.Cartesian3.equalsEpsilon(b,h,o.CesiumMath.EPSILON10)&&(d=!0),(n.tangent||n.bitangent)&&(p=a.geodeticSurfaceNormal(h,p),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(p,y,g),g))),n.normal&&(i[u++]=y.x,i[u++]=y.y,i[u++]=y.z,i[u++]=y.x,i[u++]=y.y,i[u++]=y.z),n.tangent&&(s[c++]=g.x,s[c++]=g.y,s[c++]=g.z,s[c++]=g.x,s[c++]=g.y,s[c++]=g.z),n.bitangent&&(l[m++]=p.x,l[m++]=p.y,l[m++]=p.z,l[m++]=p.x,l[m++]=p.y,l[m++]=p.z)}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(ot,g,h);g.st&&(yt.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:st})),i&&(yt.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:rt})),q&&(yt.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:it}));const ft=c.IndexDatatype.createTypedArray(at,6*tt);let ht,bt,_t,At;G=ot.length/3;let xt=0;for(A=0;A<G-1;A+=2){ht=A,At=(ht+2)%G;const t=e.Cartesian3.fromArray(ot,3*ht,L),n=e.Cartesian3.fromArray(ot,3*At,D);e.Cartesian3.equalsEpsilon(t,n,o.CesiumMath.EPSILON10)||(bt=(ht+1)%G,_t=(bt+2)%G,ft[xt++]=ht,ft[xt++]=bt,ft[xt++]=At,ft[xt++]=At,ft[xt++]=bt,ft[xt++]=_t)}return yt.indices=ft,yt=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:x}),new s.GeometryInstance({geometry:yt})]),yt[0]}const I=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],k=new e.Cartographic,H=new e.Cartographic;function z(t,n,a,o,r){if(0===a)return e.Rectangle.clone(t,r);const i=d.RectangleGeometryLibrary.computeOptions(t,n,a,0,E,k),s=i.height,l=i.width,u=I;return d.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),d.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),e.Rectangle.fromCartesianArray(u,o,r)}function B(n){const a=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.height,0),i=t.defaultValue(n.extrudedHeight,r);this._rectangle=e.Rectangle.clone(a),this._granularity=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(n.rotation,0),this._stRotation=t.defaultValue(n.stRotation,0),this._vertexFormat=p.VertexFormat.clone(t.defaultValue(n.vertexFormat,p.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(n.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=n.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}B.packedLength=e.Rectangle.packedLength+e.Ellipsoid.packedLength+p.VertexFormat.packedLength+7,B.pack=function(n,a,o){return o=t.defaultValue(o,0),e.Rectangle.pack(n._rectangle,a,o),o+=e.Rectangle.packedLength,e.Ellipsoid.pack(n._ellipsoid,a,o),o+=e.Ellipsoid.packedLength,p.VertexFormat.pack(n._vertexFormat,a,o),o+=p.VertexFormat.packedLength,a[o++]=n._granularity,a[o++]=n._surfaceHeight,a[o++]=n._rotation,a[o++]=n._stRotation,a[o++]=n._extrudedHeight,a[o++]=n._shadowVolume?1:0,a[o]=t.defaultValue(n._offsetAttribute,-1),a};const U=new e.Rectangle,Y=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),q={rectangle:U,ellipsoid:Y,vertexFormat:N,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};B.unpack=function(n,a,o){a=t.defaultValue(a,0);const r=e.Rectangle.unpack(n,a,U);a+=e.Rectangle.packedLength;const i=e.Ellipsoid.unpack(n,a,Y);a+=e.Ellipsoid.packedLength;const s=p.VertexFormat.unpack(n,a,N);a+=p.VertexFormat.packedLength;const l=n[a++],u=n[a++],c=n[a++],m=n[a++],d=n[a++],g=1===n[a++],y=n[a];return t.defined(o)?(o._rectangle=e.Rectangle.clone(r,o._rectangle),o._ellipsoid=e.Ellipsoid.clone(i,o._ellipsoid),o._vertexFormat=p.VertexFormat.clone(s,o._vertexFormat),o._granularity=l,o._surfaceHeight=u,o._rotation=c,o._stRotation=m,o._extrudedHeight=d,o._shadowVolume=g,o._offsetAttribute=-1===y?void 0:y,o):(q.granularity=l,q.height=u,q.rotation=c,q.stRotation=m,q.extrudedHeight=d,q.shadowVolume=g,q.offsetAttribute=-1===y?void 0:y,new B(q))},B.computeRectangle=function(n,a){const r=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,i=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),s=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return z(r,i,t.defaultValue(n.rotation,0),s,a)};const X=new e.Matrix3,Q=new n.Quaternion,W=new e.Cartographic;B.createGeometry=function(a){if(o.CesiumMath.equalsEpsilon(a._rectangle.north,a._rectangle.south,o.CesiumMath.EPSILON10)||o.CesiumMath.equalsEpsilon(a._rectangle.east,a._rectangle.west,o.CesiumMath.EPSILON10))return;let i=a._rectangle;const s=a._ellipsoid,u=a._rotation,c=a._stRotation,p=a._vertexFormat,g=d.RectangleGeometryLibrary.computeOptions(i,a._granularity,u,c,E,k,H),y=X;if(0!==c||0!==u){const t=e.Rectangle.center(i,W),a=s.geodeticSurfaceNormalCartographic(t,L);n.Quaternion.fromAxisAngle(a,-c,Q),e.Matrix3.fromQuaternion(Q,y)}else e.Matrix3.clone(e.Matrix3.IDENTITY,y);const f=a._surfaceHeight,h=a._extrudedHeight,b=!o.CesiumMath.equalsEpsilon(f,h,0,o.CesiumMath.EPSILON2);let _,A;if(g.lonScalar=1/a._rectangle.width,g.latScalar=1/a._rectangle.height,g.tangentRotationMatrix=y,i=a._rectangle,b){_=S(a,g);const t=n.BoundingSphere.fromRectangle3D(i,s,f,P),e=n.BoundingSphere.fromRectangle3D(i,s,h,F);A=n.BoundingSphere.union(t,e)}else{if(_=M(a,g),_.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,f,s,!1),t.defined(a._offsetAttribute)){const t=_.attributes.position.values.length,e=a._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);_.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}A=n.BoundingSphere.fromRectangle3D(i,s,f)}return p.position||delete _.attributes.position,new r.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:A,offsetAttribute:a._offsetAttribute})},B.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new B({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:p.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new e.Rectangle,J=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],Z=new e.Matrix2,K=new e.Cartographic;return Object.defineProperties(B.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=z(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const n=e.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=z(n,a,t._rotation-t._stRotation,o,j),i=J;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=e.Matrix2.fromRotation(t._stRotation,Z),u=e.Rectangle.center(s,K);for(let t=0;t<3;++t){const n=i[t];n.x-=u.longitude,n.y-=u.latitude,e.Matrix2.multiplyByVector(l,n,n),n.x+=u.longitude,n.y+=u.latitude,n.x=(n.x-s.west)/s.width,n.y=(n.y-s.south)/s.height}const c=i[0],m=i[1],d=i[2],p=new Array(6);return e.Cartesian2.pack(c,p),e.Cartesian2.pack(m,p,2),e.Cartesian2.pack(d,p,4),p}(this)),this._textureCoordinateRotationPoints}}}),function(n,a){return t.defined(a)&&(n=B.unpack(n,a)),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),n._rectangle=e.Rectangle.clone(n._rectangle),B.createGeometry(n)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./Transforms-b683baff","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryInstance-8a2d7ac1","./GeometryOffsetAttribute-ddcc2f7f","./GeometryPipeline-9eaa7fbb","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./RectangleGeometryLibrary-2d6a51a1","./VertexFormat-4362bb4a","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./AttributeCompression-f967afc2","./EncodedCartesian3-1e797130","./IntersectionTests-1cdbb657","./Plane-6c77dfaf","./EllipsoidRhumbLine-c3b11f35"],(function(t,e,n,a,o,r,i,s,l,u,c,m,d,p,g,y,f,h,b,_,A,x){"use strict";const w=new e.Cartesian3,C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Rectangle,G=new e.Cartesian2,F=new n.BoundingSphere,P=new n.BoundingSphere;function V(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const L=new e.Cartesian3,D=new e.Cartesian3;function M(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let p=0,g=s,y=s,f=0;u&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=w,E=G;let F=Number.MAX_VALUE,P=Number.MAX_VALUE,L=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=p;t<g;++t)for(let e=0;e<l;++e)d.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y));if(u&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=E.x,P=E.y,L=E.x,D=E.y)),m&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=E.x,b[A]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y))),a.st&&(F<0||P<0||L>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-F)/(L-F),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=R,m=v;let d=C;if(n.normal||n.tangent||n.bitangent)for(let p=0;p<r;p+=3){const r=e.Cartesian3.fromArray(t,p,w),g=u+1,y=u+2;d=a.geodeticSurfaceNormal(r,d),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,d,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(d,m,c),c)),n.normal&&(i[u]=d.x,i[g]=d.y,i[y]=d.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function T(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function O(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const N=new p.VertexFormat;function S(n,a){const i=n._shadowVolume,d=n._offsetAttribute,g=n._vertexFormat,y=n._extrudedHeight,f=n._surfaceHeight,h=n._ellipsoid,b=a.height,_=a.width;let A;if(i){const t=p.VertexFormat.clone(g,N);t.normal=!0,n._vertexFormat=t}const x=M(n,a);i&&(n._vertexFormat=g);let E=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,f,h,!1);E=new Float64Array(E);let G=E.length;const F=2*G,P=new Float64Array(F);P.set(E);const S=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,y,h);P.set(S,G),x.attributes.position.values=P;const I=g.normal?new Float32Array(F):void 0,k=g.tangent?new Float32Array(F):void 0,H=g.bitangent?new Float32Array(F):void 0,z=g.st?new Float32Array(F/3*2):void 0;let B,U,Y;if(g.normal){for(U=x.attributes.normal.values,I.set(U),A=0;A<G;A++)U[A]=-U[A];I.set(U,G),x.attributes.normal.values=I}if(i){U=x.attributes.normal.values,g.normal||(x.attributes.normal=void 0);const t=new Float32Array(F);for(A=0;A<G;A++)U[A]=-U[A];t.set(U,G),x.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const q=t.defined(d);if(q){const t=G/3*2;let e=new Uint8Array(t);d===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(Y=d===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(Y)),x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(g.tangent){const t=x.attributes.tangent.values;for(k.set(t),A=0;A<G;A++)t[A]=-t[A];k.set(t,G),x.attributes.tangent.values=k}if(g.bitangent){const t=x.attributes.bitangent.values;H.set(t),H.set(t,G),x.attributes.bitangent.values=H}g.st&&(B=x.attributes.st.values,z.set(B),z.set(B,G/3*2),x.attributes.st.values=z);const X=x.indices,Q=X.length,W=G/3,j=c.IndexDatatype.createTypedArray(F/3,2*Q);for(j.set(X),A=0;A<Q;A+=3)j[A+Q]=X[A+2]+W,j[A+1+Q]=X[A+1]+W,j[A+2+Q]=X[A]+W;x.indices=j;const J=a.northCap,Z=a.southCap;let K=b,$=2,tt=0,et=4,nt=4;J&&($-=1,K-=1,tt+=1,et-=2,nt-=1),Z&&($-=1,K-=1,tt+=1,et-=2,nt-=1),tt+=$*_+2*K-et;const at=2*(tt+nt);let ot=new Float64Array(3*at);const rt=i?new Float32Array(3*at):void 0;let it=q?new Uint8Array(at):void 0,st=g.st?new Float32Array(2*at):void 0;const lt=d===l.GeometryOffsetAttribute.TOP;q&&!lt&&(Y=d===l.GeometryOffsetAttribute.ALL?1:0,it=it.fill(Y));let ut=0,ct=0,mt=0,dt=0;const pt=_*K;let gt;for(A=0;A<pt;A+=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(Z){const t=J?pt+1:pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=pt-_;A<pt;A++)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);for(A=pt-1;A>0;A-=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(J){const t=pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=_-1;A>=0;A--)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);let yt=function(t,n,a){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0,c=0,m=0,d=!0,p=R,g=v,y=C;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<r;f+=6){const h=e.Cartesian3.fromArray(t,f,w),b=e.Cartesian3.fromArray(t,(f+6)%r,L);if(d){const n=e.Cartesian3.fromArray(t,(f+3)%r,D);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),d=!1}e.Cartesian3.equalsEpsilon(b,h,o.CesiumMath.EPSILON10)&&(d=!0),(n.tangent||n.bitangent)&&(p=a.geodeticSurfaceNormal(h,p),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(p,y,g),g))),n.normal&&(i[u++]=y.x,i[u++]=y.y,i[u++]=y.z,i[u++]=y.x,i[u++]=y.y,i[u++]=y.z),n.tangent&&(s[c++]=g.x,s[c++]=g.y,s[c++]=g.z,s[c++]=g.x,s[c++]=g.y,s[c++]=g.z),n.bitangent&&(l[m++]=p.x,l[m++]=p.y,l[m++]=p.z,l[m++]=p.x,l[m++]=p.y,l[m++]=p.z)}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(ot,g,h);g.st&&(yt.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:st})),i&&(yt.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:rt})),q&&(yt.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:it}));const ft=c.IndexDatatype.createTypedArray(at,6*tt);let ht,bt,_t,At;G=ot.length/3;let xt=0;for(A=0;A<G-1;A+=2){ht=A,At=(ht+2)%G;const t=e.Cartesian3.fromArray(ot,3*ht,L),n=e.Cartesian3.fromArray(ot,3*At,D);e.Cartesian3.equalsEpsilon(t,n,o.CesiumMath.EPSILON10)||(bt=(ht+1)%G,_t=(bt+2)%G,ft[xt++]=ht,ft[xt++]=bt,ft[xt++]=At,ft[xt++]=At,ft[xt++]=bt,ft[xt++]=_t)}return yt.indices=ft,yt=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:x}),new s.GeometryInstance({geometry:yt})]),yt[0]}const I=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],k=new e.Cartographic,H=new e.Cartographic;function z(t,n,a,o,r){if(0===a)return e.Rectangle.clone(t,r);const i=d.RectangleGeometryLibrary.computeOptions(t,n,a,0,E,k),s=i.height,l=i.width,u=I;return d.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),d.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),e.Rectangle.fromCartesianArray(u,o,r)}function B(n){const a=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.height,0),i=t.defaultValue(n.extrudedHeight,r);this._rectangle=e.Rectangle.clone(a),this._granularity=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(n.rotation,0),this._stRotation=t.defaultValue(n.stRotation,0),this._vertexFormat=p.VertexFormat.clone(t.defaultValue(n.vertexFormat,p.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(n.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=n.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}B.packedLength=e.Rectangle.packedLength+e.Ellipsoid.packedLength+p.VertexFormat.packedLength+7,B.pack=function(n,a,o){return o=t.defaultValue(o,0),e.Rectangle.pack(n._rectangle,a,o),o+=e.Rectangle.packedLength,e.Ellipsoid.pack(n._ellipsoid,a,o),o+=e.Ellipsoid.packedLength,p.VertexFormat.pack(n._vertexFormat,a,o),o+=p.VertexFormat.packedLength,a[o++]=n._granularity,a[o++]=n._surfaceHeight,a[o++]=n._rotation,a[o++]=n._stRotation,a[o++]=n._extrudedHeight,a[o++]=n._shadowVolume?1:0,a[o]=t.defaultValue(n._offsetAttribute,-1),a};const U=new e.Rectangle,Y=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),q={rectangle:U,ellipsoid:Y,vertexFormat:N,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};B.unpack=function(n,a,o){a=t.defaultValue(a,0);const r=e.Rectangle.unpack(n,a,U);a+=e.Rectangle.packedLength;const i=e.Ellipsoid.unpack(n,a,Y);a+=e.Ellipsoid.packedLength;const s=p.VertexFormat.unpack(n,a,N);a+=p.VertexFormat.packedLength;const l=n[a++],u=n[a++],c=n[a++],m=n[a++],d=n[a++],g=1===n[a++],y=n[a];return t.defined(o)?(o._rectangle=e.Rectangle.clone(r,o._rectangle),o._ellipsoid=e.Ellipsoid.clone(i,o._ellipsoid),o._vertexFormat=p.VertexFormat.clone(s,o._vertexFormat),o._granularity=l,o._surfaceHeight=u,o._rotation=c,o._stRotation=m,o._extrudedHeight=d,o._shadowVolume=g,o._offsetAttribute=-1===y?void 0:y,o):(q.granularity=l,q.height=u,q.rotation=c,q.stRotation=m,q.extrudedHeight=d,q.shadowVolume=g,q.offsetAttribute=-1===y?void 0:y,new B(q))},B.computeRectangle=function(n,a){const r=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,i=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),s=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return z(r,i,t.defaultValue(n.rotation,0),s,a)};const X=new e.Matrix3,Q=new n.Quaternion,W=new e.Cartographic;B.createGeometry=function(a){if(o.CesiumMath.equalsEpsilon(a._rectangle.north,a._rectangle.south,o.CesiumMath.EPSILON10)||o.CesiumMath.equalsEpsilon(a._rectangle.east,a._rectangle.west,o.CesiumMath.EPSILON10))return;let i=a._rectangle;const s=a._ellipsoid,u=a._rotation,c=a._stRotation,p=a._vertexFormat,g=d.RectangleGeometryLibrary.computeOptions(i,a._granularity,u,c,E,k,H),y=X;if(0!==c||0!==u){const t=e.Rectangle.center(i,W),a=s.geodeticSurfaceNormalCartographic(t,L);n.Quaternion.fromAxisAngle(a,-c,Q),e.Matrix3.fromQuaternion(Q,y)}else e.Matrix3.clone(e.Matrix3.IDENTITY,y);const f=a._surfaceHeight,h=a._extrudedHeight,b=!o.CesiumMath.equalsEpsilon(f,h,0,o.CesiumMath.EPSILON2);let _,A;if(g.lonScalar=1/a._rectangle.width,g.latScalar=1/a._rectangle.height,g.tangentRotationMatrix=y,i=a._rectangle,b){_=S(a,g);const t=n.BoundingSphere.fromRectangle3D(i,s,f,P),e=n.BoundingSphere.fromRectangle3D(i,s,h,F);A=n.BoundingSphere.union(t,e)}else{if(_=M(a,g),_.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,f,s,!1),t.defined(a._offsetAttribute)){const t=_.attributes.position.values.length,e=a._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);_.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}A=n.BoundingSphere.fromRectangle3D(i,s,f)}return p.position||delete _.attributes.position,new r.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:A,offsetAttribute:a._offsetAttribute})},B.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new B({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:p.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new e.Rectangle,J=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],Z=new e.Matrix2,K=new e.Cartographic;return Object.defineProperties(B.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=z(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const n=e.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=z(n,a,t._rotation-t._stRotation,o,j),i=J;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=e.Matrix2.fromRotation(t._stRotation,Z),u=e.Rectangle.center(s,K);for(let t=0;t<3;++t){const n=i[t];n.x-=u.longitude,n.y-=u.latitude,e.Matrix2.multiplyByVector(l,n,n),n.x+=u.longitude,n.y+=u.latitude,n.x=(n.x-s.west)/s.width,n.y=(n.y-s.south)/s.height}const c=i[0],m=i[1],d=i[2],p=new Array(6);return e.Cartesian2.pack(c,p),e.Cartesian2.pack(m,p,2),e.Cartesian2.pack(d,p,4),p}(this)),this._textureCoordinateRotationPoints}}}),function(n,a){return t.defined(a)&&(n=B.unpack(n,a)),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),n._rectangle=e.Rectangle.clone(n._rectangle),B.createGeometry(n)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./Transforms-6c4dd71f","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a","./PolygonPipeline-666b269f","./RectangleGeometryLibrary-3c753379","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidRhumbLine-e7a75836"],(function(e,t,i,n,o,a,r,l,s,u,c,d,p,f,g){"use strict";const h=new i.BoundingSphere,y=new i.BoundingSphere,m=new t.Cartesian3,b=new t.Rectangle;function _(e,t){const i=e._ellipsoid,o=t.height,l=t.width,u=t.northCap,d=t.southCap;let p=o,f=2,g=0,h=4;u&&(f-=1,p-=1,g+=1,h-=2),d&&(f-=1,p-=1,g+=1,h-=2),g+=f*l+2*p-h;const y=new Float64Array(3*g);let b,_=0,E=0;const A=m;if(u)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(b=0;b<l;b++)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=l-1,E=1;E<o;E++)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=o-1,!d)for(b=l-2;b>=0;b--)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=0,E=o-2;E>0;E--)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function E(i){const o=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(i.granularity,n.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(i.rotation,0),s=e.defaultValue(i.height,0),u=e.defaultValue(i.extrudedHeight,s);this._rectangle=t.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,u),this._rotation=l,this._extrudedHeight=Math.min(s,u),this._offsetAttribute=i.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}E.packedLength=t.Rectangle.packedLength+t.Ellipsoid.packedLength+5,E.pack=function(i,n,o){return o=e.defaultValue(o,0),t.Rectangle.pack(i._rectangle,n,o),o+=t.Rectangle.packedLength,t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._granularity,n[o++]=i._surfaceHeight,n[o++]=i._rotation,n[o++]=i._extrudedHeight,n[o]=e.defaultValue(i._offsetAttribute,-1),n};const A=new t.Rectangle,G=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),R={rectangle:A,ellipsoid:G,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};E.unpack=function(i,n,o){n=e.defaultValue(n,0);const a=t.Rectangle.unpack(i,n,A);n+=t.Rectangle.packedLength;const r=t.Ellipsoid.unpack(i,n,G);n+=t.Ellipsoid.packedLength;const l=i[n++],s=i[n++],u=i[n++],c=i[n++],d=i[n];return e.defined(o)?(o._rectangle=t.Rectangle.clone(a,o._rectangle),o._ellipsoid=t.Ellipsoid.clone(r,o._ellipsoid),o._surfaceHeight=s,o._rotation=u,o._extrudedHeight=c,o._offsetAttribute=-1===d?void 0:d,o):(R.granularity=l,R.height=s,R.rotation=u,R.extrudedHeight=c,R.offsetAttribute=-1===d?void 0:d,new E(R))};const P=new t.Cartographic;return E.createGeometry=function(t){const o=t._rectangle,r=t._ellipsoid,d=c.RectangleGeometryLibrary.computeOptions(o,t._granularity,t._rotation,0,b,P);let p,f;if(n.CesiumMath.equalsEpsilon(o.north,o.south,n.CesiumMath.EPSILON10)||n.CesiumMath.equalsEpsilon(o.east,o.west,n.CesiumMath.EPSILON10))return;const g=t._surfaceHeight,m=t._extrudedHeight;let E;if(!n.CesiumMath.equalsEpsilon(g,m,0,n.CesiumMath.EPSILON2)){if(p=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=_(e,t),c=t.height,d=t.width,p=u.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=p.length;const g=new Float64Array(2*f);g.set(p);const h=u.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,m=t.southCap;let b=4;y&&(b-=1),m&&(b-=1);const E=2*(g.length/3+b),A=s.IndexDatatype.createTypedArray(g.length/3,E);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=c-1;else{const e=d-1;A[R++]=e,A[R++]=e+f,G=d+c-2}if(A[R++]=G,A[R++]=G+f,!m){const e=d+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,d),e.defined(t._offsetAttribute)){const e=p.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(E=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(E)),p.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const c=i.BoundingSphere.fromRectangle3D(o,r,g,y),b=i.BoundingSphere.fromRectangle3D(o,r,m,h);f=i.BoundingSphere.union(c,b)}else{if(p=_(t,d),p.attributes.position.values=u.PolygonPipeline.scaleToGeodeticHeight(p.attributes.position.values,g,r,!1),e.defined(t._offsetAttribute)){const e=p.attributes.position.values.length;E=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(E);p.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}f=i.BoundingSphere.fromRectangle3D(o,r,g)}return new a.Geometry({attributes:p.attributes,indices:p.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:f,offsetAttribute:t._offsetAttribute})},function(i,n){return e.defined(n)&&(i=E.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),i._rectangle=t.Rectangle.clone(i._rectangle),E.createGeometry(i)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./Transforms-b683baff","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c","./PolygonPipeline-71c413e2","./RectangleGeometryLibrary-2d6a51a1","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidRhumbLine-c3b11f35"],(function(e,t,i,n,o,a,r,l,s,u,c,d,p,f,g){"use strict";const h=new i.BoundingSphere,y=new i.BoundingSphere,m=new t.Cartesian3,b=new t.Rectangle;function _(e,t){const i=e._ellipsoid,o=t.height,l=t.width,u=t.northCap,d=t.southCap;let p=o,f=2,g=0,h=4;u&&(f-=1,p-=1,g+=1,h-=2),d&&(f-=1,p-=1,g+=1,h-=2),g+=f*l+2*p-h;const y=new Float64Array(3*g);let b,_=0,E=0;const A=m;if(u)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(b=0;b<l;b++)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=l-1,E=1;E<o;E++)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=o-1,!d)for(b=l-2;b>=0;b--)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(b=0,E=o-2;E>0;E--)c.RectangleGeometryLibrary.computePosition(t,i,!1,E,b,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function E(i){const o=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(i.granularity,n.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(i.rotation,0),s=e.defaultValue(i.height,0),u=e.defaultValue(i.extrudedHeight,s);this._rectangle=t.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,u),this._rotation=l,this._extrudedHeight=Math.min(s,u),this._offsetAttribute=i.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}E.packedLength=t.Rectangle.packedLength+t.Ellipsoid.packedLength+5,E.pack=function(i,n,o){return o=e.defaultValue(o,0),t.Rectangle.pack(i._rectangle,n,o),o+=t.Rectangle.packedLength,t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._granularity,n[o++]=i._surfaceHeight,n[o++]=i._rotation,n[o++]=i._extrudedHeight,n[o]=e.defaultValue(i._offsetAttribute,-1),n};const A=new t.Rectangle,G=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),R={rectangle:A,ellipsoid:G,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};E.unpack=function(i,n,o){n=e.defaultValue(n,0);const a=t.Rectangle.unpack(i,n,A);n+=t.Rectangle.packedLength;const r=t.Ellipsoid.unpack(i,n,G);n+=t.Ellipsoid.packedLength;const l=i[n++],s=i[n++],u=i[n++],c=i[n++],d=i[n];return e.defined(o)?(o._rectangle=t.Rectangle.clone(a,o._rectangle),o._ellipsoid=t.Ellipsoid.clone(r,o._ellipsoid),o._surfaceHeight=s,o._rotation=u,o._extrudedHeight=c,o._offsetAttribute=-1===d?void 0:d,o):(R.granularity=l,R.height=s,R.rotation=u,R.extrudedHeight=c,R.offsetAttribute=-1===d?void 0:d,new E(R))};const P=new t.Cartographic;return E.createGeometry=function(t){const o=t._rectangle,r=t._ellipsoid,d=c.RectangleGeometryLibrary.computeOptions(o,t._granularity,t._rotation,0,b,P);let p,f;if(n.CesiumMath.equalsEpsilon(o.north,o.south,n.CesiumMath.EPSILON10)||n.CesiumMath.equalsEpsilon(o.east,o.west,n.CesiumMath.EPSILON10))return;const g=t._surfaceHeight,m=t._extrudedHeight;let E;if(!n.CesiumMath.equalsEpsilon(g,m,0,n.CesiumMath.EPSILON2)){if(p=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=_(e,t),c=t.height,d=t.width,p=u.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=p.length;const g=new Float64Array(2*f);g.set(p);const h=u.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,m=t.southCap;let b=4;y&&(b-=1),m&&(b-=1);const E=2*(g.length/3+b),A=s.IndexDatatype.createTypedArray(g.length/3,E);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=c-1;else{const e=d-1;A[R++]=e,A[R++]=e+f,G=d+c-2}if(A[R++]=G,A[R++]=G+f,!m){const e=d+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,d),e.defined(t._offsetAttribute)){const e=p.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(E=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(E)),p.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const c=i.BoundingSphere.fromRectangle3D(o,r,g,y),b=i.BoundingSphere.fromRectangle3D(o,r,m,h);f=i.BoundingSphere.union(c,b)}else{if(p=_(t,d),p.attributes.position.values=u.PolygonPipeline.scaleToGeodeticHeight(p.attributes.position.values,g,r,!1),e.defined(t._offsetAttribute)){const e=p.attributes.position.values.length;E=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(E);p.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}f=i.BoundingSphere.fromRectangle3D(o,r,g)}return new a.Geometry({attributes:p.attributes,indices:p.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:f,offsetAttribute:t._offsetAttribute})},function(i,n){return e.defined(n)&&(i=E.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),i._rectangle=t.Rectangle.clone(i._rectangle),E.createGeometry(i)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./ArcType-5c683766","./Transforms-6c4dd71f","./Color-d0ee8196","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./IndexDatatype-88be9f5a","./PolylinePipeline-5d154ff9","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,m){"use strict";function T(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,m=l.blue,T=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const g=(h-d)/s,b=(C-f)/s,_=(m-y)/s,P=(T-u)/s;let B=a;for(c=0;c<s;c++)i[B++]=r.Color.floatToByte(d+c*g),i[B++]=r.Color.floatToByte(f+c*b),i[B++]=r.Color.floatToByte(y+c*_),i[B++]=r.Color.floatToByte(u+c*P);return B}function g(l){const i=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,a=l.colors,s=e.defaultValue(l.colorsPerVertex,!1);this._positions=i,this._colors=a,this._colorsPerVertex=s,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,n.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let c=1+i.length*o.Cartesian3.packedLength;c+=e.defined(a)?1+a.length*r.Color.packedLength:1,this.packedLength=c+o.Ellipsoid.packedLength+3}g.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},g.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new g({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const b=new Array(2),_=new Array(2),P={positions:b,height:_,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return g.createGeometry=function(i){const d=i._positions,f=i._colors,y=i._colorsPerVertex,u=i._arcType,h=i._granularity,C=i._ellipsoid,m=n.CesiumMath.chordLength(h,C.maximumRadius),g=e.defined(f)&&!y;let B;const A=d.length;let E,k,G,D,L=0;if(u===t.ArcType.GEODESIC||u===t.ArcType.RHUMB){let o,l,i;u===t.ArcType.GEODESIC?(o=n.CesiumMath.chordLength(h,C.maximumRadius),l=p.PolylinePipeline.numberOfPoints,i=p.PolylinePipeline.generateArc):(o=h,l=p.PolylinePipeline.numberOfPointsRhumbLine,i=p.PolylinePipeline.generateRhumbArc);const a=p.PolylinePipeline.extractHeights(d,C),s=P;if(u===t.ArcType.GEODESIC?s.minDistance=m:s.granularity=h,s.ellipsoid=C,g){let t=0;for(B=0;B<A-1;B++)t+=l(d[B],d[B+1],o)+1;E=new Float64Array(3*t),G=new Uint8Array(4*t),s.positions=b,s.height=_;let n=0;for(B=0;B<A-1;++B){b[0]=d[B],b[1]=d[B+1],_[0]=a[B],_[1]=a[B+1];const o=i(s);if(e.defined(f)){const e=o.length/3;D=f[B];for(let o=0;o<e;++o)G[n++]=r.Color.floatToByte(D.red),G[n++]=r.Color.floatToByte(D.green),G[n++]=r.Color.floatToByte(D.blue),G[n++]=r.Color.floatToByte(D.alpha)}E.set(o,L),L+=o.length}}else if(s.positions=d,s.height=a,E=new Float64Array(i(s)),e.defined(f)){for(G=new Uint8Array(E.length/3*4),B=0;B<A-1;++B){L=T(d[B],d[B+1],f[B],f[B+1],m,G,L)}const e=f[A-1];G[L++]=r.Color.floatToByte(e.red),G[L++]=r.Color.floatToByte(e.green),G[L++]=r.Color.floatToByte(e.blue),G[L++]=r.Color.floatToByte(e.alpha)}}else{k=g?2*A-2:A,E=new Float64Array(3*k),G=e.defined(f)?new Uint8Array(4*k):void 0;let t=0,l=0;for(B=0;B<A;++B){const n=d[B];if(g&&B>0&&(o.Cartesian3.pack(n,E,t),t+=3,D=f[B-1],G[l++]=r.Color.floatToByte(D.red),G[l++]=r.Color.floatToByte(D.green),G[l++]=r.Color.floatToByte(D.blue),G[l++]=r.Color.floatToByte(D.alpha)),g&&B===A-1)break;o.Cartesian3.pack(n,E,t),t+=3,e.defined(f)&&(D=f[B],G[l++]=r.Color.floatToByte(D.red),G[l++]=r.Color.floatToByte(D.green),G[l++]=r.Color.floatToByte(D.blue),G[l++]=r.Color.floatToByte(D.alpha))}}const w=new s.GeometryAttributes;w.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:E}),e.defined(f)&&(w.color=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:G,normalize:!0})),k=E.length/3;const V=2*(k-1),x=c.IndexDatatype.createTypedArray(k,V);let S=0;for(B=0;B<k-1;++B)x[S++]=B,x[S++]=B+1;return new a.Geometry({attributes:w,indices:x,primitiveType:a.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(d)})},function(t,l){return e.defined(l)&&(t=g.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),g.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./ArcType-b570b3ee","./Transforms-b683baff","./Color-661a230d","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./IndexDatatype-d42fd89c","./PolylinePipeline-4244f016","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,m){"use strict";function T(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,m=l.blue,T=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const g=(h-d)/s,b=(C-f)/s,_=(m-y)/s,P=(T-u)/s;let B=a;for(c=0;c<s;c++)i[B++]=r.Color.floatToByte(d+c*g),i[B++]=r.Color.floatToByte(f+c*b),i[B++]=r.Color.floatToByte(y+c*_),i[B++]=r.Color.floatToByte(u+c*P);return B}function g(l){const i=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,a=l.colors,s=e.defaultValue(l.colorsPerVertex,!1);this._positions=i,this._colors=a,this._colorsPerVertex=s,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,n.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let c=1+i.length*o.Cartesian3.packedLength;c+=e.defined(a)?1+a.length*r.Color.packedLength:1,this.packedLength=c+o.Ellipsoid.packedLength+3}g.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},g.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new g({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const b=new Array(2),_=new Array(2),P={positions:b,height:_,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return g.createGeometry=function(i){const d=i._positions,f=i._colors,y=i._colorsPerVertex,u=i._arcType,h=i._granularity,C=i._ellipsoid,m=n.CesiumMath.chordLength(h,C.maximumRadius),g=e.defined(f)&&!y;let B;const A=d.length;let E,k,G,D,L=0;if(u===t.ArcType.GEODESIC||u===t.ArcType.RHUMB){let o,l,i;u===t.ArcType.GEODESIC?(o=n.CesiumMath.chordLength(h,C.maximumRadius),l=p.PolylinePipeline.numberOfPoints,i=p.PolylinePipeline.generateArc):(o=h,l=p.PolylinePipeline.numberOfPointsRhumbLine,i=p.PolylinePipeline.generateRhumbArc);const a=p.PolylinePipeline.extractHeights(d,C),s=P;if(u===t.ArcType.GEODESIC?s.minDistance=m:s.granularity=h,s.ellipsoid=C,g){let t=0;for(B=0;B<A-1;B++)t+=l(d[B],d[B+1],o)+1;E=new Float64Array(3*t),G=new Uint8Array(4*t),s.positions=b,s.height=_;let n=0;for(B=0;B<A-1;++B){b[0]=d[B],b[1]=d[B+1],_[0]=a[B],_[1]=a[B+1];const o=i(s);if(e.defined(f)){const e=o.length/3;D=f[B];for(let o=0;o<e;++o)G[n++]=r.Color.floatToByte(D.red),G[n++]=r.Color.floatToByte(D.green),G[n++]=r.Color.floatToByte(D.blue),G[n++]=r.Color.floatToByte(D.alpha)}E.set(o,L),L+=o.length}}else if(s.positions=d,s.height=a,E=new Float64Array(i(s)),e.defined(f)){for(G=new Uint8Array(E.length/3*4),B=0;B<A-1;++B){L=T(d[B],d[B+1],f[B],f[B+1],m,G,L)}const e=f[A-1];G[L++]=r.Color.floatToByte(e.red),G[L++]=r.Color.floatToByte(e.green),G[L++]=r.Color.floatToByte(e.blue),G[L++]=r.Color.floatToByte(e.alpha)}}else{k=g?2*A-2:A,E=new Float64Array(3*k),G=e.defined(f)?new Uint8Array(4*k):void 0;let t=0,l=0;for(B=0;B<A;++B){const n=d[B];if(g&&B>0&&(o.Cartesian3.pack(n,E,t),t+=3,D=f[B-1],G[l++]=r.Color.floatToByte(D.red),G[l++]=r.Color.floatToByte(D.green),G[l++]=r.Color.floatToByte(D.blue),G[l++]=r.Color.floatToByte(D.alpha)),g&&B===A-1)break;o.Cartesian3.pack(n,E,t),t+=3,e.defined(f)&&(D=f[B],G[l++]=r.Color.floatToByte(D.red),G[l++]=r.Color.floatToByte(D.green),G[l++]=r.Color.floatToByte(D.blue),G[l++]=r.Color.floatToByte(D.alpha))}}const w=new s.GeometryAttributes;w.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:E}),e.defined(f)&&(w.color=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:G,normalize:!0})),k=E.length/3;const V=2*(k-1),x=c.IndexDatatype.createTypedArray(k,V);let S=0;for(B=0;B<k-1;++B)x[S++]=B,x[S++]=B+1;return new a.Geometry({attributes:w,indices:x,primitiveType:a.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(d)})},function(t,l){return e.defined(l)&&(t=g.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),g.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./RuntimeError-d45af186","./EllipsoidGeometry-46aff949","./VertexFormat-d53ce9da","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a"],(function(e,t,i,r,a,o,n,s,d,c,l,m,u,p){"use strict";function f(i){const a=e.defaultValue(i.radius,1),o={radii:new t.Cartesian3(a,a,a),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,vertexFormat:i.vertexFormat};this._ellipsoidGeometry=new r.EllipsoidGeometry(o),this._workerName="createSphereGeometry"}f.packedLength=r.EllipsoidGeometry.packedLength,f.pack=function(e,t,i){return r.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,i)};const y=new r.EllipsoidGeometry,G={radius:void 0,radii:new t.Cartesian3,vertexFormat:new a.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return f.unpack=function(i,o,n){const s=r.EllipsoidGeometry.unpack(i,o,y);return G.vertexFormat=a.VertexFormat.clone(s._vertexFormat,G.vertexFormat),G.stackPartitions=s._stackPartitions,G.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,G.radii),n._ellipsoidGeometry=new r.EllipsoidGeometry(G),n):(G.radius=s._radii.x,new f(G))},f.createGeometry=function(e){return r.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=f.unpack(t,i)),f.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./EllipsoidGeometry-1d494c03","./VertexFormat-4362bb4a","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c"],(function(e,t,i,r,o,a,n,s,c,d,l,m,u,p){"use strict";function f(i){const o=e.defaultValue(i.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,vertexFormat:i.vertexFormat};this._ellipsoidGeometry=new r.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}f.packedLength=r.EllipsoidGeometry.packedLength,f.pack=function(e,t,i){return r.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,i)};const y=new r.EllipsoidGeometry,G={radius:void 0,radii:new t.Cartesian3,vertexFormat:new o.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return f.unpack=function(i,a,n){const s=r.EllipsoidGeometry.unpack(i,a,y);return G.vertexFormat=o.VertexFormat.clone(s._vertexFormat,G.vertexFormat),G.stackPartitions=s._stackPartitions,G.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,G.radii),n._ellipsoidGeometry=new r.EllipsoidGeometry(G),n):(G.radius=s._radii.x,new f(G))},f.createGeometry=function(e){return r.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=f.unpack(t,i)),f.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./RuntimeError-d45af186","./EllipsoidOutlineGeometry-cdba69a2","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./IndexDatatype-88be9f5a"],(function(e,i,t,n,o,r,s,a,d,l,c,u,m){"use strict";function p(t){const o=e.defaultValue(t.radius,1),r={radii:new i.Cartesian3(o,o,o),stackPartitions:t.stackPartitions,slicePartitions:t.slicePartitions,subdivisions:t.subdivisions};this._ellipsoidGeometry=new n.EllipsoidOutlineGeometry(r),this._workerName="createSphereOutlineGeometry"}p.packedLength=n.EllipsoidOutlineGeometry.packedLength,p.pack=function(e,i,t){return n.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,t)};const y=new n.EllipsoidOutlineGeometry,f={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return p.unpack=function(t,o,r){const s=n.EllipsoidOutlineGeometry.unpack(t,o,y);return f.stackPartitions=s._stackPartitions,f.slicePartitions=s._slicePartitions,f.subdivisions=s._subdivisions,e.defined(r)?(i.Cartesian3.clone(s._radii,f.radii),r._ellipsoidGeometry=new n.EllipsoidOutlineGeometry(f),r):(f.radius=s._radii.x,new p(f))},p.createGeometry=function(e){return n.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=p.unpack(i,t)),p.createGeometry(i)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./RuntimeError-17a7ed3d","./EllipsoidOutlineGeometry-86039893","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./IndexDatatype-d42fd89c"],(function(e,i,t,n,o,r,s,a,d,l,c,u,m){"use strict";function p(t){const o=e.defaultValue(t.radius,1),r={radii:new i.Cartesian3(o,o,o),stackPartitions:t.stackPartitions,slicePartitions:t.slicePartitions,subdivisions:t.subdivisions};this._ellipsoidGeometry=new n.EllipsoidOutlineGeometry(r),this._workerName="createSphereOutlineGeometry"}p.packedLength=n.EllipsoidOutlineGeometry.packedLength,p.pack=function(e,i,t){return n.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,t)};const f=new n.EllipsoidOutlineGeometry,y={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return p.unpack=function(t,o,r){const s=n.EllipsoidOutlineGeometry.unpack(t,o,f);return y.stackPartitions=s._stackPartitions,y.slicePartitions=s._slicePartitions,y.subdivisions=s._subdivisions,e.defined(r)?(i.Cartesian3.clone(s._radii,y.radii),r._ellipsoidGeometry=new n.EllipsoidOutlineGeometry(y),r):(y.radius=s._radii.x,new p(y))},p.createGeometry=function(e){return n.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=p.unpack(i,t)),p.createGeometry(i)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb"],(function(e){"use strict";return function(r){let t;return function(n){const s=n.data,a=[],i={id:s.id,result:void 0,error:void 0};return Promise.resolve(function(e,r,t){let n;try{return n=e(r,t),n}catch(e){return Promise.reject(e)}}(r,s.parameters,a)).then((function(e){i.result=e})).catch((function(e){e instanceof Error?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e})).finally((function(){e.defined(t)||(t=e.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{t(i,a)}catch(r){i.result=void 0,i.error=`postMessage failed with error: ${function(r){let t;const n=r.name,s=r.message;t=e.defined(n)&&e.defined(s)?`${n}: ${s}`:r.toString();const a=r.stack;return e.defined(a)&&(t+=`\n${a}`),t}(r)}\n with responseMessage: ${JSON.stringify(i)}`,t(i)}}))}}})); | ||
define(["./defaultValue-6ed27e8d"],(function(e){"use strict";return function(r){let t;return function(n){const s=n.data,a=[],i={id:s.id,result:void 0,error:void 0};return Promise.resolve(function(e,r,t){let n;try{return n=e(r,t),n}catch(e){return Promise.reject(e)}}(r,s.parameters,a)).then((function(e){i.result=e})).catch((function(e){e instanceof Error?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e})).finally((function(){e.defined(t)||(t=e.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{t(i,a)}catch(r){i.result=void 0,i.error=`postMessage failed with error: ${function(r){let t;const n=r.name,s=r.message;t=e.defined(n)&&e.defined(s)?`${n}: ${s}`:r.toString();const a=r.stack;return e.defined(a)&&(t+=`\n${a}`),t}(r)}\n with responseMessage: ${JSON.stringify(i)}`,t(i)}}))}}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AttributeCompression-d9dabbfc","./Matrix2-6555478a","./combine-0dce9b0f","./IndexDatatype-88be9f5a","./ComponentDatatype-43ab226f","./createTaskProcessorWorker","./RuntimeError-d45af186","./defaultValue-ac2201bb","./WebGLConstants-e12cdc8a"],(function(t,e,a,s,n,r,i,o,c){"use strict";const d=32767,l=Math.cos(n.CesiumMath.toRadians(150)),f=new e.Cartographic,u=new e.Cartesian3;const h=new e.Cartographic,C=new e.Cartographic;function p(t){const e=8*t,a=3*e,n=4*e;this.startEllipsoidNormals=new Float32Array(a),this.endEllipsoidNormals=new Float32Array(a),this.startPositionAndHeights=new Float32Array(n),this.startFaceNormalAndVertexCornerIds=new Float32Array(n),this.endPositionAndHeights=new Float32Array(n),this.endFaceNormalAndHalfWidths=new Float32Array(n),this.vertexBatchIds=new Uint16Array(e),this.indices=s.IndexDatatype.createTypedArray(e,36*t),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}const b=new e.Cartesian3,m=new e.Cartesian3;function A(t,a,s,n,r){const i=e.Cartesian3.subtract(s,a,m);let o=e.Cartesian3.subtract(a,t,b);return e.Cartesian3.normalize(i,i),e.Cartesian3.normalize(o,o),e.Cartesian3.dot(i,o)<l&&(o=e.Cartesian3.multiplyByScalar(o,-1,b)),e.Cartesian3.add(i,o,r),e.Cartesian3.equals(r,e.Cartesian3.ZERO)&&(r=e.Cartesian3.subtract(t,a)),e.Cartesian3.cross(r,n,r),e.Cartesian3.cross(n,r,r),e.Cartesian3.normalize(r,r),r}const w=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],g=w.length,y=new e.Cartesian3,N=new e.Cartesian3,k=new e.Cartesian3,I=new e.Cartesian3,x=new e.Cartesian3;p.prototype.addVolume=function(t,a,s,n,r,i,o,c,d,l){let f=e.Cartesian3.add(a,d,y);const u=l.geodeticSurfaceNormal(f,N);f=e.Cartesian3.add(s,d,y);const h=l.geodeticSurfaceNormal(f,I),C=A(t,a,s,u,k),p=A(n,s,a,h,x),b=this.startEllipsoidNormals,m=this.endEllipsoidNormals,E=this.startPositionAndHeights,F=this.startFaceNormalAndVertexCornerIds,H=this.endPositionAndHeights,O=this.endFaceNormalAndHalfWidths,P=this.vertexBatchIds;let v,D=this.batchIdOffset,S=this.vec3Offset,M=this.vec4Offset;for(v=0;v<8;v++)e.Cartesian3.pack(u,b,S),e.Cartesian3.pack(h,m,S),e.Cartesian3.pack(a,E,M),E[M+3]=r,e.Cartesian3.pack(s,H,M),H[M+3]=i,e.Cartesian3.pack(C,F,M),F[M+3]=v,e.Cartesian3.pack(p,O,M),O[M+3]=o,P[D++]=c,S+=3,M+=4;this.batchIdOffset=D,this.vec3Offset=S,this.vec4Offset=M;const R=this.indices,U=this.volumeStartIndex,B=this.indexOffset;for(v=0;v<g;v++)R[B+v]=w[v]+U;this.volumeStartIndex+=8,this.indexOffset+=g};const E=new e.Rectangle,F=new e.Ellipsoid,H=new e.Cartesian3,O=new e.Cartesian3,P=new e.Cartesian3,v=new e.Cartesian3,D=new e.Cartesian3;return r((function(r,i){const o=new Uint16Array(r.positions),c=new Uint16Array(r.widths),l=new Uint32Array(r.counts),b=new Uint16Array(r.batchIds),m=E,A=F,w=H,g=new Float64Array(r.packedBuffer);let y=0;const N=g[y++],k=g[y++];let I;e.Rectangle.unpack(g,y,m),y+=e.Rectangle.packedLength,e.Ellipsoid.unpack(g,y,A),y+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(g,y,w);let x=o.length/3;const S=o.subarray(0,x),M=o.subarray(x,2*x),R=o.subarray(2*x,3*x);t.AttributeCompression.zigZagDeltaDecode(S,M,R),function(t,a,s,n){const r=n.length,i=t.length,o=new Uint8Array(i),c=h,d=C;let l=0;for(let s=0;s<r;s++){const r=n[s];let i=r;for(let s=1;s<r;s++){const n=l+s,r=n-1;d.longitude=t[n],d.latitude=a[n],c.longitude=t[r],c.latitude=a[r],e.Cartographic.equals(d,c)&&(i--,o[r]=1)}n[s]=i,l+=r}let f=0;for(let e=0;e<i;e++)1!==o[e]&&(t[f]=t[e],a[f]=a[e],s[f]=s[e],f++)}(S,M,R,l);const U=l.length;let B=0;for(I=0;I<U;I++){B+=l[I]-1}const V=new p(B),T=function(t,a,s,r,i,o,c){const l=t.length,h=new Float64Array(3*l);for(let C=0;C<l;++C){const l=t[C],p=a[C],b=s[C],m=n.CesiumMath.lerp(r.west,r.east,l/d),A=n.CesiumMath.lerp(r.south,r.north,p/d),w=n.CesiumMath.lerp(i,o,b/d),g=e.Cartographic.fromRadians(m,A,w,f),y=c.cartographicToCartesian(g,u);e.Cartesian3.pack(y,h,3*C)}return h}(S,M,R,m,N,k,A);x=S.length;const W=new Float32Array(3*x);for(I=0;I<x;++I)W[3*I]=T[3*I]-w.x,W[3*I+1]=T[3*I+1]-w.y,W[3*I+2]=T[3*I+2]-w.z;let z=0,q=0;for(I=0;I<U;I++){const t=l[I]-1,a=.5*c[I],s=b[I],r=z;for(let i=0;i<t;i++){const o=e.Cartesian3.unpack(W,z,P),c=e.Cartesian3.unpack(W,z+3,v);let l=R[q],f=R[q+1];l=n.CesiumMath.lerp(N,k,l/d),f=n.CesiumMath.lerp(N,k,f/d),q++;let u=O,h=D;if(0===i){const a=r+3*t,s=e.Cartesian3.unpack(W,a,O);if(e.Cartesian3.equals(s,o))e.Cartesian3.unpack(W,a-3,u);else{const t=e.Cartesian3.subtract(o,c,O);u=e.Cartesian3.add(t,o,O)}}else e.Cartesian3.unpack(W,z-3,u);if(i===t-1){const t=e.Cartesian3.unpack(W,r,D);if(e.Cartesian3.equals(t,c))e.Cartesian3.unpack(W,r+3,h);else{const t=e.Cartesian3.subtract(c,o,D);h=e.Cartesian3.add(t,c,D)}}else e.Cartesian3.unpack(W,z+6,h);V.addVolume(u,o,c,h,l,f,a,s,w,A),z+=3}z+=3,q++}const L=V.indices;i.push(V.startEllipsoidNormals.buffer),i.push(V.endEllipsoidNormals.buffer),i.push(V.startPositionAndHeights.buffer),i.push(V.startFaceNormalAndVertexCornerIds.buffer),i.push(V.endPositionAndHeights.buffer),i.push(V.endFaceNormalAndHalfWidths.buffer),i.push(V.vertexBatchIds.buffer),i.push(L.buffer);let _={indexDatatype:2===L.BYTES_PER_ELEMENT?s.IndexDatatype.UNSIGNED_SHORT:s.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:V.startEllipsoidNormals.buffer,endEllipsoidNormals:V.endEllipsoidNormals.buffer,startPositionAndHeights:V.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:V.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:V.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:V.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:V.vertexBatchIds.buffer,indices:L.buffer};if(r.keepDecodedPositions){const t=function(t){const e=t.length,a=new Uint32Array(e+1);let s=0;for(let n=0;n<e;++n)a[n]=s,s+=t[n];return a[e]=s,a}(l);i.push(T.buffer,t.buffer),_=a.combine(_,{decodedPositions:T.buffer,decodedPositionOffsets:t.buffer})}return _}))})); | ||
define(["./AttributeCompression-f967afc2","./Matrix2-735f0ea9","./combine-c04aaa26","./IndexDatatype-d42fd89c","./ComponentDatatype-6ff7d2c3","./createTaskProcessorWorker","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./WebGLConstants-d878ea52"],(function(t,e,a,s,n,r,i,o,d){"use strict";const c=32767,l=Math.cos(n.CesiumMath.toRadians(150)),f=new e.Cartographic,u=new e.Cartesian3;const h=new e.Cartographic,C=new e.Cartographic;function p(t){const e=8*t,a=3*e,n=4*e;this.startEllipsoidNormals=new Float32Array(a),this.endEllipsoidNormals=new Float32Array(a),this.startPositionAndHeights=new Float32Array(n),this.startFaceNormalAndVertexCornerIds=new Float32Array(n),this.endPositionAndHeights=new Float32Array(n),this.endFaceNormalAndHalfWidths=new Float32Array(n),this.vertexBatchIds=new Uint16Array(e),this.indices=s.IndexDatatype.createTypedArray(e,36*t),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}const m=new e.Cartesian3,A=new e.Cartesian3;function b(t,a,s,n,r){const i=e.Cartesian3.subtract(s,a,A);let o=e.Cartesian3.subtract(a,t,m);return e.Cartesian3.normalize(i,i),e.Cartesian3.normalize(o,o),e.Cartesian3.dot(i,o)<l&&(o=e.Cartesian3.multiplyByScalar(o,-1,m)),e.Cartesian3.add(i,o,r),e.Cartesian3.equals(r,e.Cartesian3.ZERO)&&(r=e.Cartesian3.subtract(t,a)),e.Cartesian3.cross(r,n,r),e.Cartesian3.cross(n,r,r),e.Cartesian3.normalize(r,r),r}const w=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],g=w.length,y=new e.Cartesian3,N=new e.Cartesian3,k=new e.Cartesian3,I=new e.Cartesian3,x=new e.Cartesian3;p.prototype.addVolume=function(t,a,s,n,r,i,o,d,c,l){let f=e.Cartesian3.add(a,c,y);const u=l.geodeticSurfaceNormal(f,N);f=e.Cartesian3.add(s,c,y);const h=l.geodeticSurfaceNormal(f,I),C=b(t,a,s,u,k),p=b(n,s,a,h,x),m=this.startEllipsoidNormals,A=this.endEllipsoidNormals,E=this.startPositionAndHeights,F=this.startFaceNormalAndVertexCornerIds,H=this.endPositionAndHeights,O=this.endFaceNormalAndHalfWidths,P=this.vertexBatchIds;let v,D=this.batchIdOffset,S=this.vec3Offset,M=this.vec4Offset;for(v=0;v<8;v++)e.Cartesian3.pack(u,m,S),e.Cartesian3.pack(h,A,S),e.Cartesian3.pack(a,E,M),E[M+3]=r,e.Cartesian3.pack(s,H,M),H[M+3]=i,e.Cartesian3.pack(C,F,M),F[M+3]=v,e.Cartesian3.pack(p,O,M),O[M+3]=o,P[D++]=d,S+=3,M+=4;this.batchIdOffset=D,this.vec3Offset=S,this.vec4Offset=M;const R=this.indices,U=this.volumeStartIndex,B=this.indexOffset;for(v=0;v<g;v++)R[B+v]=w[v]+U;this.volumeStartIndex+=8,this.indexOffset+=g};const E=new e.Rectangle,F=new e.Ellipsoid,H=new e.Cartesian3,O=new e.Cartesian3,P=new e.Cartesian3,v=new e.Cartesian3,D=new e.Cartesian3;return r((function(r,i){const o=new Uint16Array(r.positions),d=new Uint16Array(r.widths),l=new Uint32Array(r.counts),m=new Uint16Array(r.batchIds),A=E,b=F,w=H,g=new Float64Array(r.packedBuffer);let y=0;const N=g[y++],k=g[y++];let I;e.Rectangle.unpack(g,y,A),y+=e.Rectangle.packedLength,e.Ellipsoid.unpack(g,y,b),y+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(g,y,w);let x=o.length/3;const S=o.subarray(0,x),M=o.subarray(x,2*x),R=o.subarray(2*x,3*x);t.AttributeCompression.zigZagDeltaDecode(S,M,R),function(t,a,s,n){const r=n.length,i=t.length,o=new Uint8Array(i),d=h,c=C;let l=0;for(let s=0;s<r;s++){const r=n[s];let i=r;for(let s=1;s<r;s++){const n=l+s,r=n-1;c.longitude=t[n],c.latitude=a[n],d.longitude=t[r],d.latitude=a[r],e.Cartographic.equals(c,d)&&(i--,o[r]=1)}n[s]=i,l+=r}let f=0;for(let e=0;e<i;e++)1!==o[e]&&(t[f]=t[e],a[f]=a[e],s[f]=s[e],f++)}(S,M,R,l);const U=l.length;let B=0;for(I=0;I<U;I++){B+=l[I]-1}const V=new p(B),T=function(t,a,s,r,i,o,d){const l=t.length,h=new Float64Array(3*l);for(let C=0;C<l;++C){const l=t[C],p=a[C],m=s[C],A=n.CesiumMath.lerp(r.west,r.east,l/c),b=n.CesiumMath.lerp(r.south,r.north,p/c),w=n.CesiumMath.lerp(i,o,m/c),g=e.Cartographic.fromRadians(A,b,w,f),y=d.cartographicToCartesian(g,u);e.Cartesian3.pack(y,h,3*C)}return h}(S,M,R,A,N,k,b);x=S.length;const W=new Float32Array(3*x);for(I=0;I<x;++I)W[3*I]=T[3*I]-w.x,W[3*I+1]=T[3*I+1]-w.y,W[3*I+2]=T[3*I+2]-w.z;let z=0,q=0;for(I=0;I<U;I++){const t=l[I]-1,a=.5*d[I],s=m[I],r=z;for(let i=0;i<t;i++){const o=e.Cartesian3.unpack(W,z,P),d=e.Cartesian3.unpack(W,z+3,v);let l=R[q],f=R[q+1];l=n.CesiumMath.lerp(N,k,l/c),f=n.CesiumMath.lerp(N,k,f/c),q++;let u=O,h=D;if(0===i){const a=r+3*t,s=e.Cartesian3.unpack(W,a,O);if(e.Cartesian3.equals(s,o))e.Cartesian3.unpack(W,a-3,u);else{const t=e.Cartesian3.subtract(o,d,O);u=e.Cartesian3.add(t,o,O)}}else e.Cartesian3.unpack(W,z-3,u);if(i===t-1){const t=e.Cartesian3.unpack(W,r,D);if(e.Cartesian3.equals(t,d))e.Cartesian3.unpack(W,r+3,h);else{const t=e.Cartesian3.subtract(d,o,D);h=e.Cartesian3.add(t,d,D)}}else e.Cartesian3.unpack(W,z+6,h);V.addVolume(u,o,d,h,l,f,a,s,w,b),z+=3}z+=3,q++}const L=V.indices;i.push(V.startEllipsoidNormals.buffer),i.push(V.endEllipsoidNormals.buffer),i.push(V.startPositionAndHeights.buffer),i.push(V.startFaceNormalAndVertexCornerIds.buffer),i.push(V.endPositionAndHeights.buffer),i.push(V.endFaceNormalAndHalfWidths.buffer),i.push(V.vertexBatchIds.buffer),i.push(L.buffer);let _={indexDatatype:2===L.BYTES_PER_ELEMENT?s.IndexDatatype.UNSIGNED_SHORT:s.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:V.startEllipsoidNormals.buffer,endEllipsoidNormals:V.endEllipsoidNormals.buffer,startPositionAndHeights:V.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:V.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:V.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:V.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:V.vertexBatchIds.buffer,indices:L.buffer};if(r.keepDecodedPositions){const t=function(t){const e=t.length,a=new Uint32Array(e+1);let s=0;for(let n=0;n<e;++n)a[n]=s,s+=t[n];return a[e]=s,a}(l);i.push(T.buffer,t.buffer),_=a.combine(_,{decodedPositions:T.buffer,decodedPositionOffsets:t.buffer})}return _}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Transforms-6c4dd71f","./BoxGeometry-d7bce895","./Matrix2-6555478a","./Color-d0ee8196","./CylinderGeometry-d2fb2852","./defaultValue-ac2201bb","./EllipsoidGeometry-46aff949","./IndexDatatype-88be9f5a","./createTaskProcessorWorker","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./GeometryOffsetAttribute-a17b96d9","./VertexFormat-d53ce9da","./CylinderGeometryLibrary-ce947880"],(function(e,t,n,r,a,i,o,s,d,c,l,f,u,h,b,p,y,x,g){"use strict";function m(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const C=new n.Cartesian3,I=n.Matrix4.packedLength+n.Cartesian3.packedLength,k=n.Matrix4.packedLength+2,M=n.Matrix4.packedLength+n.Cartesian3.packedLength,B=n.Cartesian3.packedLength+1,w={modelMatrix:new n.Matrix4,boundingVolume:new e.BoundingSphere};function A(e,t){let r=t*I;const a=n.Cartesian3.unpack(e,r,C);r+=n.Cartesian3.packedLength;const i=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);const o=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),w}function O(e,t){let r=t*k;const a=e[r++],i=e[r++],o=n.Cartesian3.fromElements(a,a,i,C),s=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(s,o,s);const d=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),w}function L(e,t){let r=t*M;const a=n.Cartesian3.unpack(e,r,C);r+=n.Cartesian3.packedLength;const i=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);const o=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,w}function v(e,t){let r=t*B;const a=e[r++],i=n.Cartesian3.unpack(e,r,C),o=n.Matrix4.fromTranslation(i,w.modelMatrix);n.Matrix4.multiplyByUniformScale(o,a,o);const s=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,w}const E=new n.Cartesian3;function U(t,a,o,s,d){if(!i.defined(a))return;const c=o.length,l=s.attributes.position.values,f=s.indices,u=t.positions,h=t.vertexBatchIds,b=t.indices,p=t.batchIds,y=t.batchTableColors,x=t.batchedIndices,g=t.indexOffsets,C=t.indexCounts,I=t.boundingVolumes,k=t.modelMatrix,M=t.center;let B=t.positionOffset,w=t.batchIdIndex,A=t.indexOffset;const O=t.batchedIndicesOffset;for(let t=0;t<c;++t){const i=d(a,t),s=i.modelMatrix;n.Matrix4.multiply(k,s,s);const c=o[t],L=l.length;for(let e=0;e<L;e+=3){const t=n.Cartesian3.unpack(l,e,E);n.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,M,t),n.Cartesian3.pack(t,u,3*B+e),h[w++]=c}const v=f.length;for(let e=0;e<v;++e)b[A+e]=f[e]+B;const U=t+O;x[U]=new m({offset:A,count:v,color:r.Color.fromRgba(y[c]),batchIds:[c]}),p[U]=c,g[U]=A,C[U]=v,I[U]=e.BoundingSphere.transform(i.boundingVolume,s),B+=L/3,A+=v}t.positionOffset=B,t.batchIdIndex=w,t.indexOffset=A,t.batchedIndicesOffset+=c}const G=new n.Cartesian3,S=new n.Matrix4;function V(t,n,a){const i=a.length,o=2+i*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let a=0;a<t;++a)n+=r.Color.packedLength+3+e[a].batchIds.length;return n}(n),s=new Float64Array(o);let d=0;s[d++]=t,s[d++]=i;for(let t=0;t<i;++t)e.BoundingSphere.pack(a[t],s,d),d+=e.BoundingSphere.packedLength;const c=n.length;s[d++]=c;for(let e=0;e<c;++e){const t=n[e];r.Color.pack(t.color,s,d),d+=r.Color.packedLength,s[d++]=t.offset,s[d++]=t.count;const a=t.batchIds,i=a.length;s[d++]=i;for(let e=0;e<i;++e)s[d++]=a[e]}return s}return d((function(e,r){const d=i.defined(e.boxes)?new Float32Array(e.boxes):void 0,c=i.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,l=i.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,f=i.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,u=i.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=i.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=i.defined(e.spheres)?new Float32Array(e.spheres):void 0,p=i.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=i.defined(d)?c.length:0,x=i.defined(l)?f.length:0,g=i.defined(u)?h.length:0,m=i.defined(b)?p.length:0,C=t.BoxGeometry.getUnitBox(),I=a.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),M=C.attributes.position.values,B=I.attributes.position.values,w=k.attributes.position.values;let E=M.length*y;E+=B.length*x,E+=w.length*(g+m);const T=C.indices,F=I.indices,R=k.indices;let Z=T.length*y;Z+=F.length*x,Z+=R.length*(g+m);const D=new Float32Array(E),P=new Uint16Array(E/3),_=s.IndexDatatype.createTypedArray(E/3,Z),q=y+x+g+m,W=new Uint16Array(q),j=new Array(q),H=new Uint32Array(q),N=new Uint32Array(q),Y=new Array(q);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,G),r+=n.Cartesian3.packedLength,n.Matrix4.unpack(t,r,S)}(e.packedBuffer);const z={batchTableColors:new Uint32Array(e.batchTableColors),positions:D,vertexBatchIds:P,indices:_,batchIds:W,batchedIndices:j,indexOffsets:H,indexCounts:N,boundingVolumes:Y,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:S,center:G};U(z,d,c,C,A),U(z,l,f,I,O),U(z,u,h,k,L),U(z,b,p,k,v);const J=V(_.BYTES_PER_ELEMENT,j,Y);return r.push(D.buffer,P.buffer,_.buffer),r.push(W.buffer,H.buffer,N.buffer),r.push(J.buffer),{positions:D.buffer,vertexBatchIds:P.buffer,indices:_.buffer,indexOffsets:H.buffer,indexCounts:N.buffer,batchIds:W.buffer,packedBuffer:J.buffer}}))})); | ||
define(["./Transforms-b683baff","./BoxGeometry-07b61a36","./Matrix2-735f0ea9","./Color-661a230d","./CylinderGeometry-dbd49111","./defaultValue-6ed27e8d","./EllipsoidGeometry-1d494c03","./IndexDatatype-d42fd89c","./createTaskProcessorWorker","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./GeometryOffsetAttribute-ddcc2f7f","./VertexFormat-4362bb4a","./CylinderGeometryLibrary-24ffef71"],(function(e,t,n,r,a,i,o,s,d,c,l,f,u,h,b,p,y,x,g){"use strict";function m(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const C=new n.Cartesian3,I=n.Matrix4.packedLength+n.Cartesian3.packedLength,k=n.Matrix4.packedLength+2,M=n.Matrix4.packedLength+n.Cartesian3.packedLength,B=n.Cartesian3.packedLength+1,w={modelMatrix:new n.Matrix4,boundingVolume:new e.BoundingSphere};function A(e,t){let r=t*I;const a=n.Cartesian3.unpack(e,r,C);r+=n.Cartesian3.packedLength;const i=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);const o=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),w}function O(e,t){let r=t*k;const a=e[r++],i=e[r++],o=n.Cartesian3.fromElements(a,a,i,C),s=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(s,o,s);const d=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),w}function L(e,t){let r=t*M;const a=n.Cartesian3.unpack(e,r,C);r+=n.Cartesian3.packedLength;const i=n.Matrix4.unpack(e,r,w.modelMatrix);n.Matrix4.multiplyByScale(i,a,i);const o=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,w}function v(e,t){let r=t*B;const a=e[r++],i=n.Cartesian3.unpack(e,r,C),o=n.Matrix4.fromTranslation(i,w.modelMatrix);n.Matrix4.multiplyByUniformScale(o,a,o);const s=w.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,w}const E=new n.Cartesian3;function U(t,a,o,s,d){if(!i.defined(a))return;const c=o.length,l=s.attributes.position.values,f=s.indices,u=t.positions,h=t.vertexBatchIds,b=t.indices,p=t.batchIds,y=t.batchTableColors,x=t.batchedIndices,g=t.indexOffsets,C=t.indexCounts,I=t.boundingVolumes,k=t.modelMatrix,M=t.center;let B=t.positionOffset,w=t.batchIdIndex,A=t.indexOffset;const O=t.batchedIndicesOffset;for(let t=0;t<c;++t){const i=d(a,t),s=i.modelMatrix;n.Matrix4.multiply(k,s,s);const c=o[t],L=l.length;for(let e=0;e<L;e+=3){const t=n.Cartesian3.unpack(l,e,E);n.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,M,t),n.Cartesian3.pack(t,u,3*B+e),h[w++]=c}const v=f.length;for(let e=0;e<v;++e)b[A+e]=f[e]+B;const U=t+O;x[U]=new m({offset:A,count:v,color:r.Color.fromRgba(y[c]),batchIds:[c]}),p[U]=c,g[U]=A,C[U]=v,I[U]=e.BoundingSphere.transform(i.boundingVolume,s),B+=L/3,A+=v}t.positionOffset=B,t.batchIdIndex=w,t.indexOffset=A,t.batchedIndicesOffset+=c}const G=new n.Cartesian3,S=new n.Matrix4;function V(t,n,a){const i=a.length,o=2+i*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let a=0;a<t;++a)n+=r.Color.packedLength+3+e[a].batchIds.length;return n}(n),s=new Float64Array(o);let d=0;s[d++]=t,s[d++]=i;for(let t=0;t<i;++t)e.BoundingSphere.pack(a[t],s,d),d+=e.BoundingSphere.packedLength;const c=n.length;s[d++]=c;for(let e=0;e<c;++e){const t=n[e];r.Color.pack(t.color,s,d),d+=r.Color.packedLength,s[d++]=t.offset,s[d++]=t.count;const a=t.batchIds,i=a.length;s[d++]=i;for(let e=0;e<i;++e)s[d++]=a[e]}return s}return d((function(e,r){const d=i.defined(e.boxes)?new Float32Array(e.boxes):void 0,c=i.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,l=i.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,f=i.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,u=i.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=i.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=i.defined(e.spheres)?new Float32Array(e.spheres):void 0,p=i.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=i.defined(d)?c.length:0,x=i.defined(l)?f.length:0,g=i.defined(u)?h.length:0,m=i.defined(b)?p.length:0,C=t.BoxGeometry.getUnitBox(),I=a.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),M=C.attributes.position.values,B=I.attributes.position.values,w=k.attributes.position.values;let E=M.length*y;E+=B.length*x,E+=w.length*(g+m);const T=C.indices,F=I.indices,R=k.indices;let Z=T.length*y;Z+=F.length*x,Z+=R.length*(g+m);const D=new Float32Array(E),P=new Uint16Array(E/3),_=s.IndexDatatype.createTypedArray(E/3,Z),q=y+x+g+m,W=new Uint16Array(q),j=new Array(q),H=new Uint32Array(q),N=new Uint32Array(q),Y=new Array(q);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,G),r+=n.Cartesian3.packedLength,n.Matrix4.unpack(t,r,S)}(e.packedBuffer);const z={batchTableColors:new Uint32Array(e.batchTableColors),positions:D,vertexBatchIds:P,indices:_,batchIds:W,batchedIndices:j,indexOffsets:H,indexCounts:N,boundingVolumes:Y,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:S,center:G};U(z,d,c,C,A),U(z,l,f,I,O),U(z,u,h,k,L),U(z,b,p,k,v);const J=V(_.BYTES_PER_ELEMENT,j,Y);return r.push(D.buffer,P.buffer,_.buffer),r.push(W.buffer,H.buffer,N.buffer),r.push(J.buffer),{positions:D.buffer,vertexBatchIds:P.buffer,indices:_.buffer,indexOffsets:H.buffer,indexCounts:N.buffer,batchIds:W.buffer,packedBuffer:J.buffer}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AttributeCompression-d9dabbfc","./Matrix2-6555478a","./ComponentDatatype-43ab226f","./createTaskProcessorWorker","./RuntimeError-d45af186","./defaultValue-ac2201bb","./WebGLConstants-e12cdc8a"],(function(e,a,t,r,n,o,i){"use strict";const s=32767,c=new a.Cartographic,u=new a.Cartesian3,p=new a.Rectangle,l=new a.Ellipsoid,f={min:void 0,max:void 0};return r((function(r,n){const o=new Uint16Array(r.positions);!function(e){e=new Float64Array(e);let t=0;f.min=e[t++],f.max=e[t++],a.Rectangle.unpack(e,t,p),t+=a.Rectangle.packedLength,a.Ellipsoid.unpack(e,t,l)}(r.packedBuffer);const i=p,d=l,m=f.min,b=f.max,h=o.length/3,C=o.subarray(0,h),g=o.subarray(h,2*h),w=o.subarray(2*h,3*h);e.AttributeCompression.zigZagDeltaDecode(C,g,w);const k=new Float64Array(o.length);for(let e=0;e<h;++e){const r=C[e],n=g[e],o=w[e],p=t.CesiumMath.lerp(i.west,i.east,r/s),l=t.CesiumMath.lerp(i.south,i.north,n/s),f=t.CesiumMath.lerp(m,b,o/s),h=a.Cartographic.fromRadians(p,l,f,c),y=d.cartographicToCartesian(h,u);a.Cartesian3.pack(y,k,3*e)}return n.push(k.buffer),{positions:k.buffer}}))})); | ||
define(["./AttributeCompression-f967afc2","./Matrix2-735f0ea9","./ComponentDatatype-6ff7d2c3","./createTaskProcessorWorker","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./WebGLConstants-d878ea52"],(function(e,a,t,r,n,o,i){"use strict";const s=32767,c=new a.Cartographic,u=new a.Cartesian3,p=new a.Rectangle,l=new a.Ellipsoid,f={min:void 0,max:void 0};return r((function(r,n){const o=new Uint16Array(r.positions);!function(e){e=new Float64Array(e);let t=0;f.min=e[t++],f.max=e[t++],a.Rectangle.unpack(e,t,p),t+=a.Rectangle.packedLength,a.Ellipsoid.unpack(e,t,l)}(r.packedBuffer);const i=p,d=l,m=f.min,h=f.max,C=o.length/3,g=o.subarray(0,C),b=o.subarray(C,2*C),w=o.subarray(2*C,3*C);e.AttributeCompression.zigZagDeltaDecode(g,b,w);const k=new Float64Array(o.length);for(let e=0;e<C;++e){const r=g[e],n=b[e],o=w[e],p=t.CesiumMath.lerp(i.west,i.east,r/s),l=t.CesiumMath.lerp(i.south,i.north,n/s),f=t.CesiumMath.lerp(m,h,o/s),C=a.Cartographic.fromRadians(p,l,f,c),y=d.cartographicToCartesian(C,u);a.Cartesian3.pack(y,k,3*e)}return n.push(k.buffer),{positions:k.buffer}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AttributeCompression-d9dabbfc","./Matrix2-6555478a","./Color-d0ee8196","./defaultValue-ac2201bb","./IndexDatatype-88be9f5a","./ComponentDatatype-43ab226f","./OrientedBoundingBox-e7e81288","./createTaskProcessorWorker","./RuntimeError-d45af186","./Transforms-6c4dd71f","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,n,a,r,o,s,i,c,d,f,l,u,h,g,p,b){"use strict";const m=new t.Cartesian3,y=new t.Ellipsoid,C=new t.Rectangle,I={min:void 0,max:void 0,indexBytesPerElement:void 0};function x(e,t,a){const r=t.length,o=2+r*s.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),i=new Float64Array(o);let c=0;i[c++]=e,i[c++]=r;for(let e=0;e<r;++e)s.OrientedBoundingBox.pack(t[e],i,c),c+=s.OrientedBoundingBox.packedLength;const d=a.length;i[c++]=d;for(let e=0;e<d;++e){const t=a[e];n.Color.pack(t.color,i,c),c+=n.Color.packedLength,i[c++]=t.offset,i[c++]=t.count;const r=t.batchIds,o=r.length;i[c++]=o;for(let e=0;e<o;++e)i[c++]=r[e]}return i}const w=new t.Cartesian3,A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartographic,k=new t.Rectangle;return i((function(i,c){let d;!function(e){const n=new Float64Array(e);let a=0;I.indexBytesPerElement=n[a++],I.min=n[a++],I.max=n[a++],t.Cartesian3.unpack(n,a,m),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,y),a+=t.Ellipsoid.packedLength,t.Rectangle.unpack(n,a,C)}(i.packedBuffer),d=2===I.indexBytesPerElement?new Uint16Array(i.indices):new Uint32Array(i.indices);const f=new Uint16Array(i.positions),l=new Uint32Array(i.counts),u=new Uint32Array(i.indexCounts),h=new Uint32Array(i.batchIds),g=new Uint32Array(i.batchTableColors),p=new Array(l.length),b=m,L=y;let O=C;const U=I.min,P=I.max;let F,S,D,R=i.minimumHeights,_=i.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const M=f.length/2,G=f.subarray(0,M),V=f.subarray(M,2*M);e.AttributeCompression.zigZagDeltaDecode(G,V);const Y=new Float64Array(3*M);for(F=0;F<M;++F){const e=G[F],n=V[F],a=o.CesiumMath.lerp(O.west,O.east,e/32767),r=o.CesiumMath.lerp(O.south,O.north,n/32767),s=t.Cartographic.fromRadians(a,r,0,B),i=L.cartographicToCartesian(s,w);t.Cartesian3.pack(i,Y,3*F)}const H=l.length,v=new Array(H),W=new Array(H);let j=0,z=0;for(F=0;F<H;++F)v[F]=j,W[F]=z,j+=l[F],z+=u[F];const Z=new Float32Array(3*M*2),q=new Uint16Array(2*M),J=new Uint32Array(W.length),K=new Uint32Array(u.length);let Q=[];const X={};for(F=0;F<H;++F)D=g[F],a.defined(X[D])?(X[D].positionLength+=l[F],X[D].indexLength+=u[F],X[D].batchIds.push(F)):X[D]={positionLength:l[F],indexLength:u[F],offset:0,indexOffset:0,batchIds:[F]};let $,ee=0,te=0;for(D in X)if(X.hasOwnProperty(D)){$=X[D],$.offset=ee,$.indexOffset=te;const e=2*$.positionLength,t=2*$.indexLength+6*$.positionLength;ee+=e,te+=t,$.indexLength=t}const ne=[];for(D in X)X.hasOwnProperty(D)&&($=X[D],ne.push({color:n.Color.fromRgba(parseInt(D)),offset:$.indexOffset,count:$.indexLength,batchIds:$.batchIds}));for(F=0;F<H;++F){D=g[F],$=X[D];const e=$.offset;let n=3*e,r=e;const o=v[F],i=l[F],c=h[F];let f=U,m=P;a.defined(R)&&a.defined(_)&&(f=R[F],m=_[F]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<i;++S){const e=t.Cartesian3.unpack(Y,3*o+3*S,w);L.scaleToGeodeticSurface(e,e);const a=L.cartesianToCartographic(e,B),s=a.latitude,i=a.longitude;y=Math.min(s,y),C=Math.max(s,C),I=Math.min(i,I),x=Math.max(i,x);const d=L.geodeticSurfaceNormal(e,A);let l=t.Cartesian3.multiplyByScalar(d,f,E);const u=t.Cartesian3.add(e,l,N);l=t.Cartesian3.multiplyByScalar(d,m,l);const h=t.Cartesian3.add(e,l,T);t.Cartesian3.subtract(h,b,h),t.Cartesian3.subtract(u,b,u),t.Cartesian3.pack(h,Z,n),t.Cartesian3.pack(u,Z,n+3),q[r]=c,q[r+1]=c,n+=6,r+=2}O=k,O.west=I,O.east=x,O.south=y,O.north=C,p[F]=s.OrientedBoundingBox.fromRectangle(O,U,P,L);let M=$.indexOffset;const G=W[F],V=u[F];for(J[F]=M,S=0;S<V;S+=3){const t=d[G+S]-o,n=d[G+S+1]-o,a=d[G+S+2]-o;Q[M++]=2*t+e,Q[M++]=2*n+e,Q[M++]=2*a+e,Q[M++]=2*a+1+e,Q[M++]=2*n+1+e,Q[M++]=2*t+1+e}for(S=0;S<i;++S){const t=S,n=(S+1)%i;Q[M++]=2*t+1+e,Q[M++]=2*n+e,Q[M++]=2*t+e,Q[M++]=2*t+1+e,Q[M++]=2*n+1+e,Q[M++]=2*n+e}$.offset+=2*i,$.indexOffset=M,K[F]=M-J[F]}Q=r.IndexDatatype.createTypedArray(Z.length/3,Q);const ae=ne.length;for(let e=0;e<ae;++e){const t=ne[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=K[t[e]];ne[e].count=n}const re=x(2===Q.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,p,ne);return c.push(Z.buffer,Q.buffer,J.buffer,K.buffer,q.buffer,re.buffer),{positions:Z.buffer,indices:Q.buffer,indexOffsets:J.buffer,indexCounts:K.buffer,batchIds:q.buffer,packedBuffer:re.buffer}}))})); | ||
define(["./AttributeCompression-f967afc2","./Matrix2-735f0ea9","./Color-661a230d","./defaultValue-6ed27e8d","./IndexDatatype-d42fd89c","./ComponentDatatype-6ff7d2c3","./OrientedBoundingBox-771a41b6","./createTaskProcessorWorker","./RuntimeError-17a7ed3d","./Transforms-b683baff","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,n,a,r,o,s,i,c,f,d,l,u,h,g,p,b){"use strict";const m=new t.Cartesian3,y=new t.Ellipsoid,C=new t.Rectangle,I={min:void 0,max:void 0,indexBytesPerElement:void 0};function x(e,t,a){const r=t.length,o=2+r*s.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),i=new Float64Array(o);let c=0;i[c++]=e,i[c++]=r;for(let e=0;e<r;++e)s.OrientedBoundingBox.pack(t[e],i,c),c+=s.OrientedBoundingBox.packedLength;const f=a.length;i[c++]=f;for(let e=0;e<f;++e){const t=a[e];n.Color.pack(t.color,i,c),c+=n.Color.packedLength,i[c++]=t.offset,i[c++]=t.count;const r=t.batchIds,o=r.length;i[c++]=o;for(let e=0;e<o;++e)i[c++]=r[e]}return i}const w=new t.Cartesian3,A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartographic,k=new t.Rectangle;return i((function(i,c){let f;!function(e){const n=new Float64Array(e);let a=0;I.indexBytesPerElement=n[a++],I.min=n[a++],I.max=n[a++],t.Cartesian3.unpack(n,a,m),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,y),a+=t.Ellipsoid.packedLength,t.Rectangle.unpack(n,a,C)}(i.packedBuffer),f=2===I.indexBytesPerElement?new Uint16Array(i.indices):new Uint32Array(i.indices);const d=new Uint16Array(i.positions),l=new Uint32Array(i.counts),u=new Uint32Array(i.indexCounts),h=new Uint32Array(i.batchIds),g=new Uint32Array(i.batchTableColors),p=new Array(l.length),b=m,L=y;let O=C;const U=I.min,P=I.max;let F,S,D,R=i.minimumHeights,_=i.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const M=d.length/2,G=d.subarray(0,M),V=d.subarray(M,2*M);e.AttributeCompression.zigZagDeltaDecode(G,V);const Y=new Float64Array(3*M);for(F=0;F<M;++F){const e=G[F],n=V[F],a=o.CesiumMath.lerp(O.west,O.east,e/32767),r=o.CesiumMath.lerp(O.south,O.north,n/32767),s=t.Cartographic.fromRadians(a,r,0,B),i=L.cartographicToCartesian(s,w);t.Cartesian3.pack(i,Y,3*F)}const H=l.length,v=new Array(H),W=new Array(H);let j=0,z=0;for(F=0;F<H;++F)v[F]=j,W[F]=z,j+=l[F],z+=u[F];const Z=new Float32Array(3*M*2),q=new Uint16Array(2*M),J=new Uint32Array(W.length),K=new Uint32Array(u.length);let Q=[];const X={};for(F=0;F<H;++F)D=g[F],a.defined(X[D])?(X[D].positionLength+=l[F],X[D].indexLength+=u[F],X[D].batchIds.push(F)):X[D]={positionLength:l[F],indexLength:u[F],offset:0,indexOffset:0,batchIds:[F]};let $,ee=0,te=0;for(D in X)if(X.hasOwnProperty(D)){$=X[D],$.offset=ee,$.indexOffset=te;const e=2*$.positionLength,t=2*$.indexLength+6*$.positionLength;ee+=e,te+=t,$.indexLength=t}const ne=[];for(D in X)X.hasOwnProperty(D)&&($=X[D],ne.push({color:n.Color.fromRgba(parseInt(D)),offset:$.indexOffset,count:$.indexLength,batchIds:$.batchIds}));for(F=0;F<H;++F){D=g[F],$=X[D];const e=$.offset;let n=3*e,r=e;const o=v[F],i=l[F],c=h[F];let d=U,m=P;a.defined(R)&&a.defined(_)&&(d=R[F],m=_[F]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<i;++S){const e=t.Cartesian3.unpack(Y,3*o+3*S,w);L.scaleToGeodeticSurface(e,e);const a=L.cartesianToCartographic(e,B),s=a.latitude,i=a.longitude;y=Math.min(s,y),C=Math.max(s,C),I=Math.min(i,I),x=Math.max(i,x);const f=L.geodeticSurfaceNormal(e,A);let l=t.Cartesian3.multiplyByScalar(f,d,E);const u=t.Cartesian3.add(e,l,N);l=t.Cartesian3.multiplyByScalar(f,m,l);const h=t.Cartesian3.add(e,l,T);t.Cartesian3.subtract(h,b,h),t.Cartesian3.subtract(u,b,u),t.Cartesian3.pack(h,Z,n),t.Cartesian3.pack(u,Z,n+3),q[r]=c,q[r+1]=c,n+=6,r+=2}O=k,O.west=I,O.east=x,O.south=y,O.north=C,p[F]=s.OrientedBoundingBox.fromRectangle(O,U,P,L);let M=$.indexOffset;const G=W[F],V=u[F];for(J[F]=M,S=0;S<V;S+=3){const t=f[G+S]-o,n=f[G+S+1]-o,a=f[G+S+2]-o;Q[M++]=2*t+e,Q[M++]=2*n+e,Q[M++]=2*a+e,Q[M++]=2*a+1+e,Q[M++]=2*n+1+e,Q[M++]=2*t+1+e}for(S=0;S<i;++S){const t=S,n=(S+1)%i;Q[M++]=2*t+1+e,Q[M++]=2*n+e,Q[M++]=2*t+e,Q[M++]=2*t+1+e,Q[M++]=2*n+1+e,Q[M++]=2*n+e}$.offset+=2*i,$.indexOffset=M,K[F]=M-J[F]}Q=r.IndexDatatype.createTypedArray(Z.length/3,Q);const ae=ne.length;for(let e=0;e<ae;++e){const t=ne[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=K[t[e]];ne[e].count=n}const re=x(2===Q.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,p,ne);return c.push(Z.buffer,Q.buffer,J.buffer,K.buffer,q.buffer,re.buffer),{positions:Z.buffer,indices:Q.buffer,indexOffsets:J.buffer,indexCounts:K.buffer,batchIds:q.buffer,packedBuffer:re.buffer}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./combine-0dce9b0f","./AttributeCompression-d9dabbfc","./ComponentDatatype-43ab226f","./IndexDatatype-88be9f5a","./createTaskProcessorWorker","./RuntimeError-d45af186","./defaultValue-ac2201bb","./WebGLConstants-e12cdc8a"],(function(e,a,t,n,r,s,i,o,c){"use strict";const u=32767,f=new e.Cartographic,p=new e.Cartesian3;const d=new e.Rectangle,l=new e.Ellipsoid,b=new e.Cartesian3,C={min:void 0,max:void 0};const w=new e.Cartesian3,y=new e.Cartesian3,h=new e.Cartesian3,k=new e.Cartesian3,m=new e.Cartesian3;return s((function(s,i){const o=new Uint16Array(s.positions),c=new Uint16Array(s.widths),A=new Uint32Array(s.counts),g=new Uint16Array(s.batchIds);!function(a){a=new Float64Array(a);let t=0;C.min=a[t++],C.max=a[t++],e.Rectangle.unpack(a,t,d),t+=e.Rectangle.packedLength,e.Ellipsoid.unpack(a,t,l),t+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(a,t,b)}(s.packedBuffer);const x=l,D=b,E=function(a,r,s,i,o){const c=a.length/3,d=a.subarray(0,c),l=a.subarray(c,2*c),b=a.subarray(2*c,3*c);t.AttributeCompression.zigZagDeltaDecode(d,l,b);const C=new Float64Array(a.length);for(let a=0;a<c;++a){const t=d[a],c=l[a],w=b[a],y=n.CesiumMath.lerp(r.west,r.east,t/u),h=n.CesiumMath.lerp(r.south,r.north,c/u),k=n.CesiumMath.lerp(s,i,w/u),m=e.Cartographic.fromRadians(y,h,k,f),A=o.cartographicToCartesian(m,p);e.Cartesian3.pack(A,C,3*a)}return C}(o,d,C.min,C.max,x),I=E.length/3,P=4*I-4,U=new Float32Array(3*P),R=new Float32Array(3*P),T=new Float32Array(3*P),F=new Float32Array(2*P),N=new Uint16Array(P);let M,L=0,S=0,_=0,v=0,G=A.length;for(M=0;M<G;++M){const a=A[M],t=c[M],n=g[M];for(let r=0;r<a;++r){let s;if(0===r){const a=e.Cartesian3.unpack(E,3*v,w),t=e.Cartesian3.unpack(E,3*(v+1),y);s=e.Cartesian3.subtract(a,t,h),e.Cartesian3.add(a,s,s)}else s=e.Cartesian3.unpack(E,3*(v+r-1),h);const i=e.Cartesian3.unpack(E,3*(v+r),k);let o;if(r===a-1){const t=e.Cartesian3.unpack(E,3*(v+a-1),w),n=e.Cartesian3.unpack(E,3*(v+a-2),y);o=e.Cartesian3.subtract(t,n,m),e.Cartesian3.add(t,o,o)}else o=e.Cartesian3.unpack(E,3*(v+r+1),m);e.Cartesian3.subtract(s,D,s),e.Cartesian3.subtract(i,D,i),e.Cartesian3.subtract(o,D,o);const c=r===a-1?2:4;for(let a=0===r?2:0;a<c;++a){e.Cartesian3.pack(i,U,L),e.Cartesian3.pack(s,R,L),e.Cartesian3.pack(o,T,L),L+=3;const r=a-2<0?-1:1;F[S++]=a%2*2-1,F[S++]=r*t,N[_++]=n}}v+=a}const W=r.IndexDatatype.createTypedArray(P,6*I-6);let B=0,O=0;for(G=I-1,M=0;M<G;++M)W[O++]=B,W[O++]=B+2,W[O++]=B+1,W[O++]=B+1,W[O++]=B+2,W[O++]=B+3,B+=4;i.push(U.buffer,R.buffer,T.buffer),i.push(F.buffer,N.buffer,W.buffer);let z={indexDatatype:2===W.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,currentPositions:U.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:W.buffer};if(s.keepDecodedPositions){const e=function(e){const a=e.length,t=new Uint32Array(a+1);let n=0;for(let r=0;r<a;++r)t[r]=n,n+=e[r];return t[a]=n,t}(A);i.push(E.buffer,e.buffer),z=a.combine(z,{decodedPositions:E.buffer,decodedPositionOffsets:e.buffer})}return z}))})); | ||
define(["./Matrix2-735f0ea9","./combine-c04aaa26","./AttributeCompression-f967afc2","./ComponentDatatype-6ff7d2c3","./IndexDatatype-d42fd89c","./createTaskProcessorWorker","./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./WebGLConstants-d878ea52"],(function(e,a,t,n,r,s,i,o,c){"use strict";const u=32767,f=new e.Cartographic,d=new e.Cartesian3;const p=new e.Rectangle,l=new e.Ellipsoid,C=new e.Cartesian3,b={min:void 0,max:void 0};const w=new e.Cartesian3,y=new e.Cartesian3,h=new e.Cartesian3,k=new e.Cartesian3,m=new e.Cartesian3;return s((function(s,i){const o=new Uint16Array(s.positions),c=new Uint16Array(s.widths),A=new Uint32Array(s.counts),g=new Uint16Array(s.batchIds);!function(a){a=new Float64Array(a);let t=0;b.min=a[t++],b.max=a[t++],e.Rectangle.unpack(a,t,p),t+=e.Rectangle.packedLength,e.Ellipsoid.unpack(a,t,l),t+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(a,t,C)}(s.packedBuffer);const x=l,D=C,E=function(a,r,s,i,o){const c=a.length/3,p=a.subarray(0,c),l=a.subarray(c,2*c),C=a.subarray(2*c,3*c);t.AttributeCompression.zigZagDeltaDecode(p,l,C);const b=new Float64Array(a.length);for(let a=0;a<c;++a){const t=p[a],c=l[a],w=C[a],y=n.CesiumMath.lerp(r.west,r.east,t/u),h=n.CesiumMath.lerp(r.south,r.north,c/u),k=n.CesiumMath.lerp(s,i,w/u),m=e.Cartographic.fromRadians(y,h,k,f),A=o.cartographicToCartesian(m,d);e.Cartesian3.pack(A,b,3*a)}return b}(o,p,b.min,b.max,x),I=E.length/3,P=4*I-4,U=new Float32Array(3*P),R=new Float32Array(3*P),T=new Float32Array(3*P),F=new Float32Array(2*P),N=new Uint16Array(P);let M,L=0,S=0,_=0,v=0,G=A.length;for(M=0;M<G;++M){const a=A[M],t=c[M],n=g[M];for(let r=0;r<a;++r){let s;if(0===r){const a=e.Cartesian3.unpack(E,3*v,w),t=e.Cartesian3.unpack(E,3*(v+1),y);s=e.Cartesian3.subtract(a,t,h),e.Cartesian3.add(a,s,s)}else s=e.Cartesian3.unpack(E,3*(v+r-1),h);const i=e.Cartesian3.unpack(E,3*(v+r),k);let o;if(r===a-1){const t=e.Cartesian3.unpack(E,3*(v+a-1),w),n=e.Cartesian3.unpack(E,3*(v+a-2),y);o=e.Cartesian3.subtract(t,n,m),e.Cartesian3.add(t,o,o)}else o=e.Cartesian3.unpack(E,3*(v+r+1),m);e.Cartesian3.subtract(s,D,s),e.Cartesian3.subtract(i,D,i),e.Cartesian3.subtract(o,D,o);const c=r===a-1?2:4;for(let a=0===r?2:0;a<c;++a){e.Cartesian3.pack(i,U,L),e.Cartesian3.pack(s,R,L),e.Cartesian3.pack(o,T,L),L+=3;const r=a-2<0?-1:1;F[S++]=a%2*2-1,F[S++]=r*t,N[_++]=n}}v+=a}const W=r.IndexDatatype.createTypedArray(P,6*I-6);let B=0,O=0;for(G=I-1,M=0;M<G;++M)W[O++]=B,W[O++]=B+2,W[O++]=B+1,W[O++]=B+1,W[O++]=B+2,W[O++]=B+3,B+=4;i.push(U.buffer,R.buffer,T.buffer),i.push(F.buffer,N.buffer,W.buffer);let z={indexDatatype:2===W.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,currentPositions:U.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:W.buffer};if(s.keepDecodedPositions){const e=function(e){const a=e.length,t=new Uint32Array(a+1);let n=0;for(let r=0;r<a;++r)t[r]=n,n+=e[r];return t[a]=n,t}(A);i.push(E.buffer,e.buffer),z=a.combine(z,{decodedPositions:E.buffer,decodedPositionOffsets:e.buffer})}return z}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AxisAlignedBoundingBox-b6ec0c56","./Transforms-6c4dd71f","./Matrix2-6555478a","./defaultValue-ac2201bb","./TerrainEncoding-9f3d813c","./ComponentDatatype-43ab226f","./OrientedBoundingBox-e7e81288","./RuntimeError-d45af186","./WebMercatorProjection-a6181c09","./createTaskProcessorWorker","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./AttributeCompression-d9dabbfc","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,I){"use strict";const f=Uint16Array.BYTES_PER_ELEMENT,E=Int32Array.BYTES_PER_ELEMENT,T=Uint32Array.BYTES_PER_ELEMENT,C=Float32Array.BYTES_PER_ELEMENT,M=Float64Array.BYTES_PER_ELEMENT;function x(t,e,n){n=i.defaultValue(n,a.CesiumMath);const o=t.length;for(let i=0;i<o;++i)if(n.equalsEpsilon(t[i],e,a.CesiumMath.EPSILON12))return i;return-1}const N=new n.Cartographic,b=new n.Cartesian3,S=new n.Cartesian3,w=new n.Cartesian3,B=new n.Matrix4;function P(t,e,o,r,s,c,u,h,d,l,g){const m=h.length;for(let p=0;p<m;++p){const I=h[p],f=I.cartographic,E=I.index,T=t.length,C=f.longitude;let M=f.latitude;M=a.CesiumMath.clamp(M,-a.CesiumMath.PI_OVER_TWO,a.CesiumMath.PI_OVER_TWO);const x=f.height-u.skirtHeight;u.hMin=Math.min(u.hMin,x),n.Cartographic.fromRadians(C,M,x,N),l&&(N.longitude+=d),l?p===m-1?N.latitude+=g:0===p&&(N.latitude-=g):N.latitude+=d;const S=u.ellipsoid.cartographicToCartesian(N);t.push(S),e.push(x),o.push(n.Cartesian2.clone(o[E])),r.length>0&&r.push(r[E]),s.length>0&&s.push(s[E]),n.Matrix4.multiplyByPoint(u.toENU,S,b);const w=u.minimum,B=u.maximum;n.Cartesian3.minimumByComponent(b,w,w),n.Cartesian3.maximumByComponent(b,B,B);const P=u.lastBorderPoint;if(i.defined(P)){const t=P.index;c.push(t,T-1,T,T,E,t)}u.lastBorderPoint=I}}return u((function(u,h){u.ellipsoid=n.Ellipsoid.clone(u.ellipsoid),u.rectangle=n.Rectangle.clone(u.rectangle);const d=function(u,h,d,l,g,m,p,I,A,y,R){let _,W,v,F,O,V;i.defined(l)?(_=l.west,W=l.south,v=l.east,F=l.north,O=l.width,V=l.height):(_=a.CesiumMath.toRadians(g.west),W=a.CesiumMath.toRadians(g.south),v=a.CesiumMath.toRadians(g.east),F=a.CesiumMath.toRadians(g.north),O=a.CesiumMath.toRadians(l.width),V=a.CesiumMath.toRadians(l.height));const Y=[W,F],H=[_,v],U=e.Transforms.eastNorthUpToFixedFrame(h,d),k=n.Matrix4.inverseTransformation(U,B);let L,j;A&&(L=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(W),j=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-L));const D=1!==m,G=new DataView(u);let z=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY;const J=S;J.x=Number.POSITIVE_INFINITY,J.y=Number.POSITIVE_INFINITY,J.z=Number.POSITIVE_INFINITY;const K=w;K.x=Number.NEGATIVE_INFINITY,K.y=Number.NEGATIVE_INFINITY,K.z=Number.NEGATIVE_INFINITY;let Q,X,Z=0,$=0,tt=0;for(X=0;X<4;++X){let t=Z;Q=G.getUint32(t,!0),t+=T;const e=a.CesiumMath.toRadians(180*G.getFloat64(t,!0));t+=M,-1===x(H,e)&&H.push(e);const n=a.CesiumMath.toRadians(180*G.getFloat64(t,!0));t+=M,-1===x(Y,n)&&Y.push(n),t+=2*M;let i=G.getInt32(t,!0);t+=E,$+=i,i=G.getInt32(t,!0),tt+=3*i,Z+=Q+T}const et=[],nt=[],it=new Array($),ot=new Array($),at=new Array($),rt=A?new Array($):[],st=D?new Array($):[],ct=new Array(tt),ut=[],ht=[],dt=[],lt=[];let gt=0,mt=0;for(Z=0,X=0;X<4;++X){Q=G.getUint32(Z,!0),Z+=T;const t=Z,e=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0));Z+=M;const i=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0));Z+=M;const o=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0)),r=.5*o;Z+=M;const u=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0)),h=.5*u;Z+=M;const l=G.getInt32(Z,!0);Z+=E;const g=G.getInt32(Z,!0);Z+=E,Z+=E;const m=new Array(l);for(let t=0;t<l;++t){const s=e+G.getUint8(Z++)*o;N.longitude=s;const l=i+G.getUint8(Z++)*u;N.latitude=l;let g=G.getFloat32(Z,!0);if(Z+=C,0!==g&&g<R&&(g*=-Math.pow(2,y)),g*=6371010,N.height=g,-1!==x(H,s)||-1!==x(Y,l)){const e=x(et,N,n.Cartographic);if(-1!==e){m[t]=nt[e];continue}et.push(n.Cartographic.clone(N)),nt.push(gt)}m[t]=gt,Math.abs(s-_)<r?ut.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(s-v)<r?dt.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(l-W)<h?ht.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(l-F)<h&<.push({index:gt,cartographic:n.Cartographic.clone(N)}),z=Math.min(g,z),q=Math.max(g,q),at[gt]=g;const p=d.cartographicToCartesian(N);if(it[gt]=p,A&&(rt[gt]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(l)-L)*j),D){const t=d.geodeticSurfaceNormal(p);st[gt]=t}n.Matrix4.multiplyByPoint(k,p,b),n.Cartesian3.minimumByComponent(b,J,J),n.Cartesian3.maximumByComponent(b,K,K);let I=(s-_)/(v-_);I=a.CesiumMath.clamp(I,0,1);let f=(l-W)/(F-W);f=a.CesiumMath.clamp(f,0,1),ot[gt]=new n.Cartesian2(I,f),++gt}const p=3*g;for(let t=0;t<p;++t,++mt)ct[mt]=m[G.getUint16(Z,!0)],Z+=f;if(Q!==Z-t)throw new s.RuntimeError("Invalid terrain tile.")}it.length=gt,ot.length=gt,at.length=gt,A&&(rt.length=gt);D&&(st.length=gt);const pt=gt,It=mt,ft={hMin:z,lastBorderPoint:void 0,skirtHeight:I,toENU:k,ellipsoid:d,minimum:J,maximum:K};ut.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),ht.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),dt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),lt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Et=1e-5;if(P(it,at,ot,rt,st,ct,ft,ut,-Et*O,!0,-Et*V),P(it,at,ot,rt,st,ct,ft,ht,-Et*V,!1),P(it,at,ot,rt,st,ct,ft,dt,Et*O,!0,Et*V),P(it,at,ot,rt,st,ct,ft,lt,Et*V,!1),ut.length>0&<.length>0){const t=ut[0].index,e=pt,n=lt[lt.length-1].index,i=it.length-1;ct.push(n,i,e,e,t,n)}$=it.length;const Tt=e.BoundingSphere.fromPoints(it);let Ct;i.defined(l)&&(Ct=r.OrientedBoundingBox.fromRectangle(l,z,q,d));const Mt=new o.EllipsoidalOccluder(d).computeHorizonCullingPointPossiblyUnderEllipsoid(h,it,z),xt=new t.AxisAlignedBoundingBox(J,K,h),Nt=new o.TerrainEncoding(h,xt,ft.hMin,q,U,!1,A,D,m,p),bt=new Float32Array($*Nt.stride);let St=0;for(let t=0;t<$;++t)St=Nt.encode(bt,St,it[t],ot[t],at[t],void 0,rt[t],st[t]);const wt=ut.map((function(t){return t.index})).reverse(),Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse();return Bt.unshift(Pt[Pt.length-1]),Bt.push(wt[0]),At.unshift(wt[wt.length-1]),At.push(Pt[0]),{vertices:bt,indices:new Uint16Array(ct),maximumHeight:q,minimumHeight:z,encoding:Nt,boundingSphere3D:Tt,orientedBoundingBox:Ct,occludeePointInScaledSpace:Mt,vertexCountWithoutSkirts:pt,indexCountWithoutSkirts:It,westIndicesSouthToNorth:wt,southIndicesEastToWest:Bt,eastIndicesNorthToSouth:Pt,northIndicesWestToEast:At}}(u.buffer,u.relativeToCenter,u.ellipsoid,u.rectangle,u.nativeRectangle,u.exaggeration,u.exaggerationRelativeHeight,u.skirtHeight,u.includeWebMercatorT,u.negativeAltitudeExponentBias,u.negativeElevationThreshold),l=d.vertices;h.push(l.buffer);const g=d.indices;return h.push(g.buffer),{vertices:l.buffer,indices:g.buffer,numberOfAttributes:d.encoding.stride,minimumHeight:d.minimumHeight,maximumHeight:d.maximumHeight,boundingSphere3D:d.boundingSphere3D,orientedBoundingBox:d.orientedBoundingBox,occludeePointInScaledSpace:d.occludeePointInScaledSpace,encoding:d.encoding,vertexCountWithoutSkirts:d.vertexCountWithoutSkirts,indexCountWithoutSkirts:d.indexCountWithoutSkirts,westIndicesSouthToNorth:d.westIndicesSouthToNorth,southIndicesEastToWest:d.southIndicesEastToWest,eastIndicesNorthToSouth:d.eastIndicesNorthToSouth,northIndicesWestToEast:d.northIndicesWestToEast}}))})); | ||
define(["./AxisAlignedBoundingBox-b14143c9","./Transforms-b683baff","./Matrix2-735f0ea9","./defaultValue-6ed27e8d","./TerrainEncoding-d51253d2","./ComponentDatatype-6ff7d2c3","./OrientedBoundingBox-771a41b6","./RuntimeError-17a7ed3d","./WebMercatorProjection-4d21b562","./createTaskProcessorWorker","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./AttributeCompression-f967afc2","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,f){"use strict";const I=Uint16Array.BYTES_PER_ELEMENT,E=Int32Array.BYTES_PER_ELEMENT,T=Uint32Array.BYTES_PER_ELEMENT,C=Float32Array.BYTES_PER_ELEMENT,M=Float64Array.BYTES_PER_ELEMENT;function x(t,e,n){n=i.defaultValue(n,a.CesiumMath);const o=t.length;for(let i=0;i<o;++i)if(n.equalsEpsilon(t[i],e,a.CesiumMath.EPSILON12))return i;return-1}const N=new n.Cartographic,b=new n.Cartesian3,S=new n.Cartesian3,w=new n.Cartesian3,B=new n.Matrix4;function P(t,e,o,r,s,c,u,h,d,l,g){const m=h.length;for(let p=0;p<m;++p){const f=h[p],I=f.cartographic,E=f.index,T=t.length,C=I.longitude;let M=I.latitude;M=a.CesiumMath.clamp(M,-a.CesiumMath.PI_OVER_TWO,a.CesiumMath.PI_OVER_TWO);const x=I.height-u.skirtHeight;u.hMin=Math.min(u.hMin,x),n.Cartographic.fromRadians(C,M,x,N),l&&(N.longitude+=d),l?p===m-1?N.latitude+=g:0===p&&(N.latitude-=g):N.latitude+=d;const S=u.ellipsoid.cartographicToCartesian(N);t.push(S),e.push(x),o.push(n.Cartesian2.clone(o[E])),r.length>0&&r.push(r[E]),s.length>0&&s.push(s[E]),n.Matrix4.multiplyByPoint(u.toENU,S,b);const w=u.minimum,B=u.maximum;n.Cartesian3.minimumByComponent(b,w,w),n.Cartesian3.maximumByComponent(b,B,B);const P=u.lastBorderPoint;if(i.defined(P)){const t=P.index;c.push(t,T-1,T,T,E,t)}u.lastBorderPoint=f}}return u((function(u,h){u.ellipsoid=n.Ellipsoid.clone(u.ellipsoid),u.rectangle=n.Rectangle.clone(u.rectangle);const d=function(u,h,d,l,g,m,p,f,A,y,R){let _,W,v,F,O,V;i.defined(l)?(_=l.west,W=l.south,v=l.east,F=l.north,O=l.width,V=l.height):(_=a.CesiumMath.toRadians(g.west),W=a.CesiumMath.toRadians(g.south),v=a.CesiumMath.toRadians(g.east),F=a.CesiumMath.toRadians(g.north),O=a.CesiumMath.toRadians(l.width),V=a.CesiumMath.toRadians(l.height));const Y=[W,F],H=[_,v],U=e.Transforms.eastNorthUpToFixedFrame(h,d),k=n.Matrix4.inverseTransformation(U,B);let L,j;A&&(L=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(W),j=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(F)-L));const D=1!==m,G=new DataView(u);let z=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY;const J=S;J.x=Number.POSITIVE_INFINITY,J.y=Number.POSITIVE_INFINITY,J.z=Number.POSITIVE_INFINITY;const K=w;K.x=Number.NEGATIVE_INFINITY,K.y=Number.NEGATIVE_INFINITY,K.z=Number.NEGATIVE_INFINITY;let Q,X,Z=0,$=0,tt=0;for(X=0;X<4;++X){let t=Z;Q=G.getUint32(t,!0),t+=T;const e=a.CesiumMath.toRadians(180*G.getFloat64(t,!0));t+=M,-1===x(H,e)&&H.push(e);const n=a.CesiumMath.toRadians(180*G.getFloat64(t,!0));t+=M,-1===x(Y,n)&&Y.push(n),t+=2*M;let i=G.getInt32(t,!0);t+=E,$+=i,i=G.getInt32(t,!0),tt+=3*i,Z+=Q+T}const et=[],nt=[],it=new Array($),ot=new Array($),at=new Array($),rt=A?new Array($):[],st=D?new Array($):[],ct=new Array(tt),ut=[],ht=[],dt=[],lt=[];let gt=0,mt=0;for(Z=0,X=0;X<4;++X){Q=G.getUint32(Z,!0),Z+=T;const t=Z,e=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0));Z+=M;const i=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0));Z+=M;const o=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0)),r=.5*o;Z+=M;const u=a.CesiumMath.toRadians(180*G.getFloat64(Z,!0)),h=.5*u;Z+=M;const l=G.getInt32(Z,!0);Z+=E;const g=G.getInt32(Z,!0);Z+=E,Z+=E;const m=new Array(l);for(let t=0;t<l;++t){const s=e+G.getUint8(Z++)*o;N.longitude=s;const l=i+G.getUint8(Z++)*u;N.latitude=l;let g=G.getFloat32(Z,!0);if(Z+=C,0!==g&&g<R&&(g*=-Math.pow(2,y)),g*=6371010,N.height=g,-1!==x(H,s)||-1!==x(Y,l)){const e=x(et,N,n.Cartographic);if(-1!==e){m[t]=nt[e];continue}et.push(n.Cartographic.clone(N)),nt.push(gt)}m[t]=gt,Math.abs(s-_)<r?ut.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(s-v)<r?dt.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(l-W)<h?ht.push({index:gt,cartographic:n.Cartographic.clone(N)}):Math.abs(l-F)<h&<.push({index:gt,cartographic:n.Cartographic.clone(N)}),z=Math.min(g,z),q=Math.max(g,q),at[gt]=g;const p=d.cartographicToCartesian(N);if(it[gt]=p,A&&(rt[gt]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(l)-L)*j),D){const t=d.geodeticSurfaceNormal(p);st[gt]=t}n.Matrix4.multiplyByPoint(k,p,b),n.Cartesian3.minimumByComponent(b,J,J),n.Cartesian3.maximumByComponent(b,K,K);let f=(s-_)/(v-_);f=a.CesiumMath.clamp(f,0,1);let I=(l-W)/(F-W);I=a.CesiumMath.clamp(I,0,1),ot[gt]=new n.Cartesian2(f,I),++gt}const p=3*g;for(let t=0;t<p;++t,++mt)ct[mt]=m[G.getUint16(Z,!0)],Z+=I;if(Q!==Z-t)throw new s.RuntimeError("Invalid terrain tile.")}it.length=gt,ot.length=gt,at.length=gt,A&&(rt.length=gt);D&&(st.length=gt);const pt=gt,ft=mt,It={hMin:z,lastBorderPoint:void 0,skirtHeight:f,toENU:k,ellipsoid:d,minimum:J,maximum:K};ut.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),ht.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),dt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),lt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Et=1e-5;if(P(it,at,ot,rt,st,ct,It,ut,-Et*O,!0,-Et*V),P(it,at,ot,rt,st,ct,It,ht,-Et*V,!1),P(it,at,ot,rt,st,ct,It,dt,Et*O,!0,Et*V),P(it,at,ot,rt,st,ct,It,lt,Et*V,!1),ut.length>0&<.length>0){const t=ut[0].index,e=pt,n=lt[lt.length-1].index,i=it.length-1;ct.push(n,i,e,e,t,n)}$=it.length;const Tt=e.BoundingSphere.fromPoints(it);let Ct;i.defined(l)&&(Ct=r.OrientedBoundingBox.fromRectangle(l,z,q,d));const Mt=new o.EllipsoidalOccluder(d).computeHorizonCullingPointPossiblyUnderEllipsoid(h,it,z),xt=new t.AxisAlignedBoundingBox(J,K,h),Nt=new o.TerrainEncoding(h,xt,It.hMin,q,U,!1,A,D,m,p),bt=new Float32Array($*Nt.stride);let St=0;for(let t=0;t<$;++t)St=Nt.encode(bt,St,it[t],ot[t],at[t],void 0,rt[t],st[t]);const wt=ut.map((function(t){return t.index})).reverse(),Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse();return Bt.unshift(Pt[Pt.length-1]),Bt.push(wt[0]),At.unshift(wt[wt.length-1]),At.push(Pt[0]),{vertices:bt,indices:new Uint16Array(ct),maximumHeight:q,minimumHeight:z,encoding:Nt,boundingSphere3D:Tt,orientedBoundingBox:Ct,occludeePointInScaledSpace:Mt,vertexCountWithoutSkirts:pt,indexCountWithoutSkirts:ft,westIndicesSouthToNorth:wt,southIndicesEastToWest:Bt,eastIndicesNorthToSouth:Pt,northIndicesWestToEast:At}}(u.buffer,u.relativeToCenter,u.ellipsoid,u.rectangle,u.nativeRectangle,u.exaggeration,u.exaggerationRelativeHeight,u.skirtHeight,u.includeWebMercatorT,u.negativeAltitudeExponentBias,u.negativeElevationThreshold),l=d.vertices;h.push(l.buffer);const g=d.indices;return h.push(g.buffer),{vertices:l.buffer,indices:g.buffer,numberOfAttributes:d.encoding.stride,minimumHeight:d.minimumHeight,maximumHeight:d.maximumHeight,boundingSphere3D:d.boundingSphere3D,orientedBoundingBox:d.orientedBoundingBox,occludeePointInScaledSpace:d.occludeePointInScaledSpace,encoding:d.encoding,vertexCountWithoutSkirts:d.vertexCountWithoutSkirts,indexCountWithoutSkirts:d.indexCountWithoutSkirts,westIndicesSouthToNorth:d.westIndicesSouthToNorth,southIndicesEastToWest:d.southIndicesEastToWest,eastIndicesNorthToSouth:d.eastIndicesNorthToSouth,northIndicesWestToEast:d.northIndicesWestToEast}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,4 +25,4 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./Matrix2-6555478a","./AxisAlignedBoundingBox-b6ec0c56","./Transforms-6c4dd71f","./defaultValue-ac2201bb","./RuntimeError-d45af186","./TerrainEncoding-9f3d813c","./ComponentDatatype-43ab226f","./OrientedBoundingBox-e7e81288","./WebMercatorProjection-a6181c09","./_commonjsHelpers-3aae1032-ac53d93e","./createTaskProcessorWorker","./combine-0dce9b0f","./AttributeCompression-d9dabbfc","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p){"use strict";var x=Object.freeze({NONE:0,LERC:1});const w={};w.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const k=new e.Cartesian3,y=new e.Matrix4,I=new e.Cartesian3,b=new e.Cartesian3;w.computeVertices=function(n){const f=Math.cos,u=Math.sin,c=Math.sqrt,d=Math.atan,h=Math.exp,m=s.CesiumMath.PI_OVER_TWO,g=s.CesiumMath.toRadians,p=n.heightmap,x=n.width,U=n.height,T=n.skirtHeight,M=T>0,V=a.defaultValue(n.isGeographic,!0),v=a.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84),A=1/v.maximumRadius,B=e.Rectangle.clone(n.nativeRectangle),D=e.Rectangle.clone(n.rectangle);let S,P,E,C;a.defined(D)?(S=D.west,P=D.south,E=D.east,C=D.north):V?(S=g(B.west),P=g(B.south),E=g(B.east),C=g(B.north)):(S=B.west*A,P=m-2*d(h(-B.south*A)),E=B.east*A,C=m-2*d(h(-B.north*A)));let F=n.relativeToCenter;const N=a.defined(F);F=N?F:e.Cartesian3.ZERO;const O=a.defaultValue(n.includeWebMercatorT,!1),R=a.defaultValue(n.exaggeration,1),L=a.defaultValue(n.exaggerationRelativeHeight,0),z=1!==R,H=a.defaultValue(n.structure,w.DEFAULT_STRUCTURE),_=a.defaultValue(H.heightScale,w.DEFAULT_STRUCTURE.heightScale),Y=a.defaultValue(H.heightOffset,w.DEFAULT_STRUCTURE.heightOffset),W=a.defaultValue(H.elementsPerHeight,w.DEFAULT_STRUCTURE.elementsPerHeight),X=a.defaultValue(H.stride,w.DEFAULT_STRUCTURE.stride),Z=a.defaultValue(H.elementMultiplier,w.DEFAULT_STRUCTURE.elementMultiplier),j=a.defaultValue(H.isBigEndian,w.DEFAULT_STRUCTURE.isBigEndian);let G=e.Rectangle.computeWidth(B),q=e.Rectangle.computeHeight(B);const Q=G/(x-1),J=q/(U-1);V||(G*=A,q*=A);const K=v.radiiSquared,$=K.x,ee=K.y,te=K.z;let ie=65536,ae=-65536;const ne=i.Transforms.eastNorthUpToFixedFrame(F,v),re=e.Matrix4.inverseTransformation(ne,y);let se,le;O&&(se=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(P),le=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(C)-se));const oe=I;oe.x=Number.POSITIVE_INFINITY,oe.y=Number.POSITIVE_INFINITY,oe.z=Number.POSITIVE_INFINITY;const fe=b;fe.x=Number.NEGATIVE_INFINITY,fe.y=Number.NEGATIVE_INFINITY,fe.z=Number.NEGATIVE_INFINITY;let ue=Number.POSITIVE_INFINITY;const ce=x*U,de=ce+(T>0?2*x+2*U:0),he=new Array(de),me=new Array(de),ge=new Array(de),pe=O?new Array(de):[],xe=z?new Array(de):[];let we=0,ke=U,ye=0,Ie=x;M&&(--we,++ke,--ye,++Ie);const be=1e-5;for(let t=we;t<ke;++t){let i=t;i<0&&(i=0),i>=U&&(i=U-1);let a=B.north-J*i;a=V?g(a):m-2*d(h(-a*A));let n=(a-P)/(C-P);n=s.CesiumMath.clamp(n,0,1);const r=t===we,l=t===ke-1;T>0&&(r?a+=be*q:l&&(a-=be*q));const w=f(a),y=u(a),I=te*y;let b;O&&(b=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(a)-se)*le);for(let t=ye;t<Ie;++t){let a=t;a<0&&(a=0),a>=x&&(a=x-1);const o=i*(x*X)+a*X;let d;if(1===W)d=p[o];else{let e;if(d=0,j)for(e=0;e<W;++e)d=d*Z+p[o+e];else for(e=W-1;e>=0;--e)d=d*Z+p[o+e]}d=d*_+Y,ae=Math.max(ae,d),ie=Math.min(ie,d);let h=B.west+Q*a;V?h=g(h):h*=A;let m=(h-S)/(E-S);m=s.CesiumMath.clamp(m,0,1);let M=i*x+a;if(T>0){const e=t===ye,n=t===Ie-1,s=r||l||e||n;if((r||l)&&(e||n))continue;s&&(d-=T,e?(M=ce+(U-i-1),h-=be*G):l?M=ce+U+(x-a-1):n?(M=ce+U+x+i,h+=be*G):r&&(M=ce+U+x+U+a))}const D=w*f(h),P=w*u(h),C=$*D,F=ee*P,N=1/c(C*D+F*P+I*y),R=C*N,L=F*N,H=I*N,q=new e.Cartesian3;q.x=R+D*d,q.y=L+P*d,q.z=H+y*d,e.Matrix4.multiplyByPoint(re,q,k),e.Cartesian3.minimumByComponent(k,oe,oe),e.Cartesian3.maximumByComponent(k,fe,fe),ue=Math.min(ue,d),he[M]=q,ge[M]=new e.Cartesian2(m,n),me[M]=d,O&&(pe[M]=b),z&&(xe[M]=v.geodeticSurfaceNormal(q))}}const Ue=i.BoundingSphere.fromPoints(he);let Te,Me;if(a.defined(D)&&(Te=l.OrientedBoundingBox.fromRectangle(D,ie,ae,v)),N){Me=new r.EllipsoidalOccluder(v).computeHorizonCullingPointPossiblyUnderEllipsoid(F,he,ie)}const Ve=new t.AxisAlignedBoundingBox(oe,fe,F),ve=new r.TerrainEncoding(F,Ve,ue,ae,ne,!1,O,z,R,L),Ae=new Float32Array(de*ve.stride);let Be=0;for(let e=0;e<de;++e)Be=ve.encode(Ae,Be,he[e],ge[e],me[e],void 0,pe[e],xe[e]);return{vertices:Ae,maximumHeight:ae,minimumHeight:ie,encoding:ve,boundingSphere3D:Ue,orientedBoundingBox:Te,occludeePointInScaledSpace:Me}};var U=f.createCommonjsModule((function(e){ | ||
define(["./Matrix2-735f0ea9","./AxisAlignedBoundingBox-b14143c9","./Transforms-b683baff","./defaultValue-6ed27e8d","./RuntimeError-17a7ed3d","./TerrainEncoding-d51253d2","./ComponentDatatype-6ff7d2c3","./OrientedBoundingBox-771a41b6","./WebMercatorProjection-4d21b562","./_commonjsHelpers-c27c962c","./createTaskProcessorWorker","./combine-c04aaa26","./AttributeCompression-f967afc2","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p){"use strict";var x=Object.freeze({NONE:0,LERC:1});const w={};w.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const k=new e.Cartesian3,y=new e.Matrix4,I=new e.Cartesian3,b=new e.Cartesian3;w.computeVertices=function(n){const f=Math.cos,u=Math.sin,c=Math.sqrt,d=Math.atan,h=Math.exp,m=s.CesiumMath.PI_OVER_TWO,g=s.CesiumMath.toRadians,p=n.heightmap,x=n.width,U=n.height,T=n.skirtHeight,M=T>0,V=a.defaultValue(n.isGeographic,!0),v=a.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84),A=1/v.maximumRadius,B=e.Rectangle.clone(n.nativeRectangle),D=e.Rectangle.clone(n.rectangle);let S,P,E,C;a.defined(D)?(S=D.west,P=D.south,E=D.east,C=D.north):V?(S=g(B.west),P=g(B.south),E=g(B.east),C=g(B.north)):(S=B.west*A,P=m-2*d(h(-B.south*A)),E=B.east*A,C=m-2*d(h(-B.north*A)));let F=n.relativeToCenter;const N=a.defined(F);F=N?F:e.Cartesian3.ZERO;const O=a.defaultValue(n.includeWebMercatorT,!1),R=a.defaultValue(n.exaggeration,1),L=a.defaultValue(n.exaggerationRelativeHeight,0),z=1!==R,H=a.defaultValue(n.structure,w.DEFAULT_STRUCTURE),_=a.defaultValue(H.heightScale,w.DEFAULT_STRUCTURE.heightScale),Y=a.defaultValue(H.heightOffset,w.DEFAULT_STRUCTURE.heightOffset),W=a.defaultValue(H.elementsPerHeight,w.DEFAULT_STRUCTURE.elementsPerHeight),X=a.defaultValue(H.stride,w.DEFAULT_STRUCTURE.stride),Z=a.defaultValue(H.elementMultiplier,w.DEFAULT_STRUCTURE.elementMultiplier),j=a.defaultValue(H.isBigEndian,w.DEFAULT_STRUCTURE.isBigEndian);let G=e.Rectangle.computeWidth(B),q=e.Rectangle.computeHeight(B);const Q=G/(x-1),J=q/(U-1);V||(G*=A,q*=A);const K=v.radiiSquared,$=K.x,ee=K.y,te=K.z;let ie=65536,ae=-65536;const ne=i.Transforms.eastNorthUpToFixedFrame(F,v),re=e.Matrix4.inverseTransformation(ne,y);let se,le;O&&(se=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(P),le=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(C)-se));const oe=I;oe.x=Number.POSITIVE_INFINITY,oe.y=Number.POSITIVE_INFINITY,oe.z=Number.POSITIVE_INFINITY;const fe=b;fe.x=Number.NEGATIVE_INFINITY,fe.y=Number.NEGATIVE_INFINITY,fe.z=Number.NEGATIVE_INFINITY;let ue=Number.POSITIVE_INFINITY;const ce=x*U,de=ce+(T>0?2*x+2*U:0),he=new Array(de),me=new Array(de),ge=new Array(de),pe=O?new Array(de):[],xe=z?new Array(de):[];let we=0,ke=U,ye=0,Ie=x;M&&(--we,++ke,--ye,++Ie);const be=1e-5;for(let t=we;t<ke;++t){let i=t;i<0&&(i=0),i>=U&&(i=U-1);let a=B.north-J*i;a=V?g(a):m-2*d(h(-a*A));let n=(a-P)/(C-P);n=s.CesiumMath.clamp(n,0,1);const r=t===we,l=t===ke-1;T>0&&(r?a+=be*q:l&&(a-=be*q));const w=f(a),y=u(a),I=te*y;let b;O&&(b=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(a)-se)*le);for(let t=ye;t<Ie;++t){let a=t;a<0&&(a=0),a>=x&&(a=x-1);const o=i*(x*X)+a*X;let d;if(1===W)d=p[o];else{let e;if(d=0,j)for(e=0;e<W;++e)d=d*Z+p[o+e];else for(e=W-1;e>=0;--e)d=d*Z+p[o+e]}d=d*_+Y,ae=Math.max(ae,d),ie=Math.min(ie,d);let h=B.west+Q*a;V?h=g(h):h*=A;let m=(h-S)/(E-S);m=s.CesiumMath.clamp(m,0,1);let M=i*x+a;if(T>0){const e=t===ye,n=t===Ie-1,s=r||l||e||n;if((r||l)&&(e||n))continue;s&&(d-=T,e?(M=ce+(U-i-1),h-=be*G):l?M=ce+U+(x-a-1):n?(M=ce+U+x+i,h+=be*G):r&&(M=ce+U+x+U+a))}const D=w*f(h),P=w*u(h),C=$*D,F=ee*P,N=1/c(C*D+F*P+I*y),R=C*N,L=F*N,H=I*N,q=new e.Cartesian3;q.x=R+D*d,q.y=L+P*d,q.z=H+y*d,e.Matrix4.multiplyByPoint(re,q,k),e.Cartesian3.minimumByComponent(k,oe,oe),e.Cartesian3.maximumByComponent(k,fe,fe),ue=Math.min(ue,d),he[M]=q,ge[M]=new e.Cartesian2(m,n),me[M]=d,O&&(pe[M]=b),z&&(xe[M]=v.geodeticSurfaceNormal(q))}}const Ue=i.BoundingSphere.fromPoints(he);let Te,Me;if(a.defined(D)&&(Te=l.OrientedBoundingBox.fromRectangle(D,ie,ae,v)),N){Me=new r.EllipsoidalOccluder(v).computeHorizonCullingPointPossiblyUnderEllipsoid(F,he,ie)}const Ve=new t.AxisAlignedBoundingBox(oe,fe,F),ve=new r.TerrainEncoding(F,Ve,ue,ae,ne,!1,O,z,R,L),Ae=new Float32Array(de*ve.stride);let Be=0;for(let e=0;e<de;++e)Be=ve.encode(Ae,Be,he[e],ge[e],me[e],void 0,pe[e],xe[e]);return{vertices:Ae,maximumHeight:ae,minimumHeight:ie,encoding:ve,boundingSphere3D:Ue,orientedBoundingBox:Te,occludeePointInScaledSpace:Me}};var U=f.createCommonjsModule((function(e){ | ||
/* Copyright 2015-2018 Esri. 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 @preserve */ | ||
!function(){var t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p,x=(t={defaultNoDataValue:-34027999387901484e22,decode:function(e,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=r(e,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:t.defaultNoDataValue,u=i(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(c.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=a(o),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=n(o))),c}},i=function(e,t,i,a,n){var r,l,o,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,d=Math.floor(e.width/u),h=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),n&&i&&(o=new Uint8Array(e.width*e.height));for(var p,x,w=new Float32Array(d*h),k=0;k<=c;k++){var y=k!==c?h:e.height%c;if(0!==y)for(var I=0;I<=u;I++){var b=I!==u?d:e.width%u;if(0!==b){var U,T,M,V,v=k*e.width*h+I*d,A=e.width-b,B=e.pixels.blocks[f];if(B.encoding<2?(0===B.encoding?U=B.rawData:(s(B.stuffedData,B.bitsPerPixel,B.numValidPixels,B.offset,m,w,e.pixels.maxValue),U=w),T=0):M=2===B.encoding?0:B.offset,i)for(x=0;x<y;x++){for(7&v&&(V=i[v>>3],V<<=7&v),p=0;p<b;p++)7&v||(V=i[v>>3]),128&V?(o&&(o[v]=1),g=g>(r=B.encoding<2?U[T++]:M)?r:g,l[v++]=r):(o&&(o[v]=0),l[v++]=a),V<<=1;v+=A}else if(B.encoding<2)for(x=0;x<y;x++){for(p=0;p<b;p++)g=g>(r=U[T++])?r:g,l[v++]=r;v+=A}else for(g=g>M?M:g,x=0;x<y;x++){for(p=0;p<b;p++)l[v++]=M;v+=A}if(1===B.encoding&&T!==B.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:l,resultMask:o,minValue:g}},a=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},a=0;a<t;a++){var n=e.pixels.blocks[a];0===n.encoding?i.float32=!0:1===n.encoding?i[n.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},r=function(e,t,i){var a={},n=new Uint8Array(e,t,10);if(a.fileIdentifierString=String.fromCharCode.apply(null,n),"CntZImage"!==a.fileIdentifierString.trim())throw"Unexpected file identifier string: "+a.fileIdentifierString;t+=10;var r=new DataView(e,t,24);if(a.fileVersion=r.getInt32(0,!0),a.imageType=r.getInt32(4,!0),a.height=r.getUint32(8,!0),a.width=r.getUint32(12,!0),a.maxZError=r.getFloat64(16,!0),t+=24,!i)if(r=new DataView(e,t,16),a.mask={},a.mask.numBlocksY=r.getUint32(0,!0),a.mask.numBlocksX=r.getUint32(4,!0),a.mask.numBytes=r.getUint32(8,!0),a.mask.maxValue=r.getFloat32(12,!0),t+=16,a.mask.numBytes>0){var s=new Uint8Array(Math.ceil(a.width*a.height/8)),l=(r=new DataView(e,t,a.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=r.getUint8(o++);else{var u=r.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=r.getInt16(o,!0),o+=2}while(o<a.mask.numBytes);if(-32768!==l||f<s.length)throw"Unexpected end of mask RLE encoding";a.mask.bitset=s,t+=a.mask.numBytes}else 0==(a.mask.numBytes|a.mask.numBlocksY|a.mask.maxValue)&&(a.mask.bitset=new Uint8Array(Math.ceil(a.width*a.height/8)));r=new DataView(e,t,16),a.pixels={},a.pixels.numBlocksY=r.getUint32(0,!0),a.pixels.numBlocksX=r.getUint32(4,!0),a.pixels.numBytes=r.getUint32(8,!0),a.pixels.maxValue=r.getFloat32(12,!0),t+=16;var c=a.pixels.numBlocksX,d=a.pixels.numBlocksY,h=c+(a.width%c>0?1:0),m=d+(a.height%d>0?1:0);a.pixels.blocks=new Array(h*m);for(var g=0,p=0;p<m;p++)for(var x=0;x<h;x++){var w=0,k=e.byteLength-t;r=new DataView(e,t,Math.min(10,k));var y={};a.pixels.blocks[g++]=y;var I=r.getUint8(0);if(w++,y.encoding=63&I,y.encoding>3)throw"Invalid block encoding ("+y.encoding+")";if(2!==y.encoding){if(0!==I&&2!==I){if(I>>=6,y.offsetType=I,2===I)y.offset=r.getInt8(1),w++;else if(1===I)y.offset=r.getInt16(1,!0),w+=2;else{if(0!==I)throw"Invalid block offset type";y.offset=r.getFloat32(1,!0),w+=4}if(1===y.encoding)if(I=r.getUint8(w),w++,y.bitsPerPixel=63&I,I>>=6,y.numValidPixelsType=I,2===I)y.numValidPixels=r.getUint8(w),w++;else if(1===I)y.numValidPixels=r.getUint16(w,!0),w+=2;else{if(0!==I)throw"Invalid valid pixel count type";y.numValidPixels=r.getUint32(w,!0),w+=4}}var b;if(t+=w,3!==y.encoding)if(0===y.encoding){var U=(a.pixels.numBytes-1)/4;if(U!==Math.floor(U))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*U),new Uint8Array(b).set(new Uint8Array(e,t,4*U));var T=new Float32Array(b);y.rawData=T,t+=4*U}else if(1===y.encoding){var M=Math.ceil(y.numValidPixels*y.bitsPerPixel/8),V=Math.ceil(M/4);b=new ArrayBuffer(4*V),new Uint8Array(b).set(new Uint8Array(e,t,M)),y.stuffedData=new Uint32Array(b),t+=M}}else t++}return a.eofOffset=t,a},s=function(e,t,i,a,n,r,s){var l,o,f,u=(1<<t)-1,c=0,d=0,h=Math.ceil((s-a)/n),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,l=0;l<i;l++){if(0===d&&(f=e[c++],d=32),d>=t)o=f>>>d-t&u,d-=t;else{var g=t-d;o=(f&u)<<g&u,o+=(f=e[c++])>>>(d=32-g)}r[l]=o<h?a+o*n:s}return r},t),w=(l=function(e,t,i,a,n,r,s,l){var o,f,u,c,d,h=(1<<i)-1,m=0,g=0,p=4*e.length-Math.ceil(i*a/8);if(e[e.length-1]<<=8*p,n)for(o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=n[f];else for(d=Math.ceil((l-r)/s),o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f<d?r+f*s:l},o=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=[],m=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*m;var g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32),c>=t?(d=s>>>c-t&l,c-=t):(d=(s&l)<<(u=t-c)&l,d+=(s=e[o++])>>>(c=32-u)),h[f]=d<g?a+d*n:r;return h.unshift(a),h},f=function(e,t,i,a,n,r,s,l){var o,f,u,c,d=(1<<i)-1,h=0,m=0,g=0;if(n)for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=n[f];else{var p=Math.ceil((l-r)/s);for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=f<p?r+f*s:l}return t},u=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=0,m=[],g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32,h=0),c>=t?(d=s>>>h&l,c-=t,h+=t):(d=s>>>h&l,c=32-(u=t-c),d|=((s=e[o++])&(1<<u)-1)<<t-u,h=u),m[f]=d<g?a+d*n:r;return m.unshift(a),m},c=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=4*e.length-Math.ceil(i*a/8);for(e[e.length-1]<<=8*c,n=0;n<a;n++)0===u&&(s=e[f++],u=32),u>=i?(r=s>>>u-i&o,u-=i):(r=(s&o)<<(l=i-u)&o,r+=(s=e[f++])>>>(u=32-l)),t[n]=r;return t},d=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=0;for(n=0;n<a;n++)0===u&&(s=e[f++],u=32,c=0),u>=i?(r=s>>>c&o,u-=i,c+=i):(r=s>>>c&o,u=32-(l=i-u),r|=((s=e[f++])&(1<<l)-1)<<i-l,c=l),t[n]=r;return t},h={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,a=e.length,n=Math.floor(a/2),r=0;n;){var s=n>=359?359:n;n-=s;do{t+=e[r++]<<8,i+=t+=e[r++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&a&&(i+=t+=e[r]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,a=new Uint8Array(e,i,6),n={};if(n.fileIdentifierString=String.fromCharCode.apply(null,a),0!==n.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+n.fileIdentifierString;i+=6;var r,s=new DataView(e,i,8),l=s.getInt32(0,!0);if(n.fileVersion=l,i+=4,l>=3&&(n.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),n.height=s.getUint32(0,!0),n.width=s.getUint32(4,!0),i+=8,l>=4?(n.numDims=s.getUint32(8,!0),i+=4):n.numDims=1,s=new DataView(e,i,40),n.numValidPixel=s.getUint32(0,!0),n.microBlockSize=s.getInt32(4,!0),n.blobSize=s.getInt32(8,!0),n.imageType=s.getInt32(12,!0),n.maxZError=s.getFloat64(16,!0),n.zMin=s.getFloat64(24,!0),n.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=n,t.ptr=i,l>=3&&(r=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,n.blobSize-14))!==n.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,a=this.getDataTypeArray(i.imageType),n=i.numDims*this.getDataTypeSize(i.imageType),r=this.readSubArray(e,t.ptr,a,n),s=this.readSubArray(e,t.ptr+n,a,n);t.ptr+=2*n;var l,o=!0;for(l=0;l<i.numDims;l++)if(r[l]!==s[l]){o=!1;break}return i.minValues=r,i.maxValues=s,o},readSubArray:function(e,t,i,a){var n;if(i===Uint8Array)n=new Uint8Array(e,t,a);else{var r=new ArrayBuffer(a);new Uint8Array(r).set(new Uint8Array(e,t,a)),n=new i(r)}return n},readMask:function(e,t){var i,a,n=t.ptr,r=t.headerInfo,s=r.width*r.height,l=r.numValidPixel,o=new DataView(e,n,4),f={};if(f.numBytes=o.getUint32(0,!0),n+=4,(0===l||s===l)&&0!==f.numBytes)throw"invalid mask";if(0===l)i=new Uint8Array(Math.ceil(s/8)),f.bitset=i,a=new Uint8Array(s),t.pixels.resultMask=a,n+=f.numBytes;else if(f.numBytes>0){i=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,n,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)i[d++]=o.getUint8(c++);else for(h=o.getUint8(c++),u=-u;u--;)i[d++]=h;u=o.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||d<i.length)throw"Unexpected end of mask RLE encoding";a=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=i[g>>3],m<<=7&g):m=i[g>>3],128&m&&(a[g]=1);t.pixels.resultMask=a,f.bitset=i,n+=f.numBytes}return t.ptr=n,t.mask=f,!0},readDataOneSweep:function(e,t,i){var a,n=t.ptr,r=t.headerInfo,s=r.numDims,l=r.width*r.height,o=r.imageType,f=r.numValidPixel*h.getDataTypeSize(o)*s,u=t.pixels.resultMask;if(i===Uint8Array)a=new Uint8Array(e,n,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,n,f)),a=new i(c)}if(a.length===l*s)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new i(l*s);var d=0,m=0,g=0,p=0;if(s>1)for(g=0;g<s;g++)for(p=g*l,m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[p+m]=a[d++]);else for(m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[m]=a[d++])}return n+=f,t.ptr=n,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,t.ptr,16);if(t.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=a.getInt32(4,!0),r=a.getInt32(8,!0),s=a.getInt32(12,!0);if(r>=s)return!1;var l=new Uint32Array(s-r);h.decodeBits(e,t,l);var o,f,u,c,d=[];for(o=r;o<s;o++)d[f=o-(o<n?0:n)]={first:l[o-r],second:null};var g=e.byteLength-t.ptr,p=Math.ceil(g/4),x=new ArrayBuffer(4*p);new Uint8Array(x).set(new Uint8Array(e,t.ptr,g));var w,k=new Uint32Array(x),y=0,I=0;for(w=k[0],o=r;o<s;o++)(c=d[f=o-(o<n?0:n)].first)>0&&(d[f].second=w<<y>>>32-c,32-y>=c?32===(y+=c)&&(y=0,w=k[++I]):(y+=c-32,w=k[++I],d[f].second|=w>>>32-y));var b=0,U=0,T=new m;for(o=0;o<d.length;o++)void 0!==d[o]&&(b=Math.max(b,d[o].first));U=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var M,V,v,A,B,D=[];for(o=r;o<s;o++)if((c=d[f=o-(o<n?0:n)].first)>0)if(M=[c,f],c<=U)for(V=d[f].second<<U-c,v=1<<U-c,u=0;u<v;u++)D[V|u]=M;else for(V=d[f].second,B=T,A=c-1;A>=0;A--)V>>>A&1?(B.right||(B.right=new m),B=B.right):(B.left||(B.left=new m),B=B.left),0!==A||B.val||(B.val=M[1]);return{decodeLut:D,numBitsLUTQick:U,numBitsLUT:b,tree:T,stuffedData:k,srcPtr:I,bitPos:y}},readHuffman:function(e,t,i){var a,n,r,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,x=this.readHuffmanTree(e,t),w=x.decodeLut,k=x.tree,y=x.stuffedData,I=x.srcPtr,b=x.bitPos,U=x.numBitsLUTQick,T=x.numBitsLUT,M=0===t.headerInfo.imageType?128:0,V=t.pixels.resultMask,v=0;b>0&&(I++,b=0);var A,B=y[I],D=1===t.encodeMode,S=new i(p*h),P=S;for(A=0;A<d.numDims;A++){if(h>1&&(P=new i(S.buffer,p*A,p),v=0),t.headerInfo.numValidPixel===g*m)for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-T,32-b<T&&(l=s|=y[I+1]>>>64-b-T),a=k,c=0;c<T;c++)if(!(a=s>>>T-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),r=n-M,D?(r+=f>0?v:o>0?P[u-g]:v,r&=255,P[u]=r,v=r):P[u]=r}else for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++)if(V[u]){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=y[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-T,32-b<T&&(l=s|=y[I+1]>>>64-b-T),a=k,c=0;c<T;c++)if(!(a=s>>>T-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=y[++I]),r=n-M,D?(f>0&&V[u-1]?r+=v:o>0&&V[u-g]?r+=P[u-g]:r+=v,r&=255,P[u]=r,v=r):P[u]=r}t.ptr=t.ptr+4*(I+1)+(b>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,i,a,n){var r=t.headerInfo,s=r.fileVersion,h=0,m=new DataView(e,t.ptr,5),g=m.getUint8(0);h++;var p=g>>6,x=0===p?4:3-p,w=(32&g)>0,k=31&g,y=0;if(1===x)y=m.getUint8(h),h++;else if(2===x)y=m.getUint16(h,!0),h+=2;else{if(4!==x)throw"Invalid valid pixel count type";y=m.getUint32(h,!0),h+=4}var I,b,U,T,M,V,v,A,B,D=2*r.maxZError,S=r.numDims>1?r.maxValues[n]:r.zMax;if(w){for(t.counter.lut++,A=m.getUint8(h),h++,T=Math.ceil((A-1)*k/8),M=Math.ceil(T/4),b=new ArrayBuffer(4*M),U=new Uint8Array(b),t.ptr+=h,U.set(new Uint8Array(e,t.ptr,T)),v=new Uint32Array(b),t.ptr+=T,B=0;A-1>>>B;)B++;T=Math.ceil(y*B/8),M=Math.ceil(T/4),b=new ArrayBuffer(4*M),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,T)),I=new Uint32Array(b),t.ptr+=T,V=s>=3?u(v,k,A-1,a,D,S):o(v,k,A-1,a,D,S),s>=3?f(I,i,B,y,V):l(I,i,B,y,V)}else t.counter.bitstuffer++,B=k,t.ptr+=h,B>0&&(T=Math.ceil(y*B/8),M=Math.ceil(T/4),b=new ArrayBuffer(4*M),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,T)),I=new Uint32Array(b),t.ptr+=T,s>=3?null==a?d(I,i,B,y):f(I,i,B,y,!1,a,D,S):null==a?c(I,i,B,y):l(I,i,B,y,!1,a,D,S))},readTiles:function(e,t,i){var a=t.headerInfo,n=a.width,r=a.height,s=a.microBlockSize,l=a.imageType,o=h.getDataTypeSize(l),f=Math.ceil(n/s),u=Math.ceil(r/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,d,m,g,p,x,w,k,y=0,I=0,b=0,U=0,T=0,M=0,V=0,v=0,A=0,B=0,D=0,S=0,P=0,E=0,C=0,F=new i(s*s),N=r%s||s,O=n%s||s,R=a.numDims,L=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<u;b++)for(T=b!==u-1?s:N,U=0;U<f;U++)for(B=b*n*s+U*s,D=n-(M=U!==f-1?s:O),k=0;k<R;k++){if(R>1&&(z=new i(t.pixels.resultPixels.buffer,n*r*k*o,n*r)),V=e.byteLength-t.ptr,d={},C=0,C++,A=(v=(c=new DataView(e,t.ptr,Math.min(10,V))).getUint8(0))>>6&255,(v>>2&15)!=(U*s>>3&15))throw"integrity issue";if((p=3&v)>3)throw t.ptr+=C,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=C,S=(S=T*M*o)<(P=e.byteLength-t.ptr)?S:P,m=new ArrayBuffer(S%o==0?S:S+o-S%o),new Uint8Array(m).set(new Uint8Array(e,t.ptr,S)),g=new i(m),E=0,L)for(y=0;y<T;y++){for(I=0;I<M;I++)L[B]&&(z[B]=g[E++]),B++;B+=D}else for(y=0;y<T;y++){for(I=0;I<M;I++)z[B++]=g[E++];B+=D}t.ptr+=E*o}else if(x=h.getDataTypeUsed(l,A),w=h.getOnePixel(d,C,x,c),C+=h.getDataTypeSize(x),3===p)if(t.ptr+=C,t.counter.constantoffset++,L)for(y=0;y<T;y++){for(I=0;I<M;I++)L[B]&&(z[B]=w),B++;B+=D}else for(y=0;y<T;y++){for(I=0;I<M;I++)z[B++]=w;B+=D}else if(t.ptr+=C,h.decodeBits(e,t,F,w,k),C=0,L)for(y=0;y<T;y++){for(I=0;I<M;I++)L[B]&&(z[B]=F[C++]),B++;B+=D}else for(y=0;y<T;y++){for(I=0;I<M;I++)z[B++]=F[C++];B+=D}else t.counter.constant++,t.ptr+=C}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:h.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,a=e.headerInfo.height*e.headerInfo.width,n=a*i,r=0,s=0,l=0,o=e.pixels.resultMask;if(o)if(i>1)for(r=0;r<i;r++)for(l=r*a,s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[l+s]=t);else for(s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<n;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,a){var n=0;switch(i){case 0:n=a.getInt8(t);break;case 1:n=a.getUint8(t);break;case 2:n=a.getInt16(t,!0);break;case 3:n=a.getUint16(t,!0);break;case 4:n=a.getInt32(t,!0);break;case 5:n=a.getUInt32(t,!0);break;case 6:n=a.getFloat32(t,!0);break;case 7:n=a.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return n}},m=function(e,t,i){this.val=e,this.left=t,this.right=i},{decode:function(e,t){var i=(t=t||{}).noDataValue,a=0,n={};n.ptr=t.inputOffset||0,n.pixels={},h.readHeaderInfo(e,n);var r=n.headerInfo,s=r.fileVersion,l=h.getDataTypeArray(r.imageType);h.readMask(e,n),r.numValidPixel===r.width*r.height||n.pixels.resultMask||(n.pixels.resultMask=t.maskData);var o,f=r.width*r.height;if(n.pixels.resultPixels=new l(f*r.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==r.numValidPixel)if(r.zMax===r.zMin)h.constructConstantSurface(n);else if(s>=4&&h.checkMinMaxRanges(e,n))h.constructConstantSurface(n);else{var u=new DataView(e,n.ptr,2),c=u.getUint8(0);if(n.ptr++,c)h.readDataOneSweep(e,n,l);else if(s>1&&r.imageType<=1&&Math.abs(r.maxZError-.5)<1e-5){var d=u.getUint8(1);if(n.ptr++,n.encodeMode=d,d>2||s<4&&d>1)throw"Invalid Huffman flag "+d;d?h.readHuffman(e,n,l):h.readTiles(e,n,l)}else h.readTiles(e,n,l)}n.eofOffset=n.ptr,t.inputOffset?(o=n.headerInfo.blobSize+t.inputOffset-n.ptr,Math.abs(o)>=1&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(o=n.headerInfo.blobSize-n.ptr,Math.abs(o)>=1&&(n.eofOffset=n.headerInfo.blobSize));var m={width:r.width,height:r.height,pixelData:n.pixels.resultPixels,minValue:r.zMin,maxValue:r.zMax,validPixelCount:r.numValidPixel,dimCount:r.numDims,dimStats:{minValues:r.minValues,maxValues:r.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&h.isValidPixelValue(r.imageType,i)){var g=n.pixels.resultMask;for(a=0;a<f;a++)g[a]||(m.pixelData[a]=i);m.noDataValue=i}return n.noDataValue=i,t.returnFileInfo&&(m.fileInfo=h.formatFileInfo(n)),m},getBandCount:function(e){for(var t=0,i=0,a={ptr:0,pixels:{}};i<e.byteLength-58;)h.readHeaderInfo(e,a),i+=a.headerInfo.blobSize,t++,a.ptr=i;return t}}),k=(g=new ArrayBuffer(4),p=new Uint8Array(g),new Uint32Array(g)[0]=1,1===p[0]),y={decode:function(e,t){if(!k)throw"Big endian system is not supported.";var i,a,n=(t=t||{}).inputOffset||0,r=new Uint8Array(e,n,10),s=String.fromCharCode.apply(null,r);if("CntZImage"===s.trim())i=x,a=1;else{if("Lerc2"!==s.substring(0,5))throw"Unexpected file identifier string: "+s;i=w,a=2}for(var l,o,f,u,c,d,h=0,m=e.byteLength-10,g=[],p={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};n<m;){var y=i.decode(e,{inputOffset:n,encodedMaskData:l,maskData:f,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});n=y.fileInfo.eofOffset,0===h&&(l=y.encodedMaskData,f=y.maskData,p.width=y.width,p.height=y.height,p.dimCount=y.dimCount||1,p.pixelType=y.pixelType||y.fileInfo.pixelType,p.mask=y.maskData),a>1&&y.fileInfo.mask&&y.fileInfo.mask.numBytes>0&&g.push(y.maskData),h++,p.pixels.push(y.pixelData),p.statistics.push({minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue,dimStats:y.dimStats})}if(a>1&&g.length>1){for(d=p.width*p.height,p.bandMasks=g,(f=new Uint8Array(d)).set(g[0]),u=1;u<g.length;u++)for(o=g[u],c=0;c<d;c++)f[c]=f[c]&o[c];p.maskData=f}return p}};e.exports?e.exports=y:this.Lerc=y}()}));return u((function(t,i){if(t.encoding===x.LERC){let e;try{e=U.decode(t.heightmap)}catch(e){throw new n.RuntimeError(e)}if(e.statistics[0].minValue===Number.MAX_VALUE)throw new n.RuntimeError("Invalid tile data");t.heightmap=e.pixels[0],t.width=e.width,t.height=e.height}t.ellipsoid=e.Ellipsoid.clone(t.ellipsoid),t.rectangle=e.Rectangle.clone(t.rectangle);const a=w.computeVertices(t),r=a.vertices;return i.push(r.buffer),{vertices:r.buffer,numberOfAttributes:a.encoding.stride,minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:a.boundingSphere3D,orientedBoundingBox:a.orientedBoundingBox,occludeePointInScaledSpace:a.occludeePointInScaledSpace,encoding:a.encoding,westIndicesSouthToNorth:a.westIndicesSouthToNorth,southIndicesEastToWest:a.southIndicesEastToWest,eastIndicesNorthToSouth:a.eastIndicesNorthToSouth,northIndicesWestToEast:a.northIndicesWestToEast}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AxisAlignedBoundingBox-b6ec0c56","./Matrix2-6555478a","./defaultValue-ac2201bb","./TerrainEncoding-9f3d813c","./IndexDatatype-88be9f5a","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./Transforms-6c4dd71f","./WebMercatorProjection-a6181c09","./createTaskProcessorWorker","./AttributeCompression-d9dabbfc","./WebGLConstants-e12cdc8a","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I){"use strict";function g(){a.DeveloperError.throwInstantiationError()}Object.defineProperties(g.prototype,{errorEvent:{get:a.DeveloperError.throwInstantiationError},credit:{get:a.DeveloperError.throwInstantiationError},tilingScheme:{get:a.DeveloperError.throwInstantiationError},ready:{get:a.DeveloperError.throwInstantiationError},readyPromise:{get:a.DeveloperError.throwInstantiationError},hasWaterMask:{get:a.DeveloperError.throwInstantiationError},hasVertexNormals:{get:a.DeveloperError.throwInstantiationError},availability:{get:a.DeveloperError.throwInstantiationError}});const m=[];g.getRegularGridIndices=function(e,t){let n=m[e];r.defined(n)||(m[e]=n=[]);let o=n[t];return r.defined(o)||(o=e*t<i.CesiumMath.SIXTY_FOUR_KILOBYTES?n[t]=new Uint16Array((e-1)*(t-1)*6):n[t]=new Uint32Array((e-1)*(t-1)*6),p(e,t,o,0)),o};const T=[];g.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=T[e];r.defined(n)||(T[e]=n=[]);let o=n[t];if(!r.defined(o)){const r=g.getRegularGridIndices(e,t),i=E(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=n[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const f=[];function E(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function p(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function y(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}g.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=f[e];r.defined(n)||(f[e]=n=[]);let i=n[t];if(!r.defined(i)){const r=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=r+s,d=a+6*Math.max(0,s-4),h=E(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,m=h.northIndicesWestToEast,T=o.IndexDatatype.createTypedArray(c,d);p(e,t,T,0),g.addSkirtIndices(u,l,I,m,r,T,a),i=n[t]={indices:T,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:m,indexCountWithoutSkirts:a}}return i},g.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=y(e,s,i,a),s+=e.length,a=y(t,s,i,a),s+=t.length,a=y(r,s,i,a),s+=r.length,y(n,s,i,a)},g.heightmapTerrainQuality=.25,g.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*g.heightmapTerrainQuality/(t*r)},g.prototype.requestTileGeometry=a.DeveloperError.throwInstantiationError,g.prototype.getLevelMaximumGeometricError=a.DeveloperError.throwInstantiationError,g.prototype.getTileDataAvailable=a.DeveloperError.throwInstantiationError,g.prototype.loadTileDataAvailability=a.DeveloperError.throwInstantiationError;const N=32767,w=new t.Cartesian3,b=new t.Cartesian3,S=new t.Cartesian3,M=new t.Cartographic,x=new t.Cartesian2;function A(e,r,n,o,a,s,c,d,h){let u=Number.POSITIVE_INFINITY;const l=a.north,I=a.south;let g=a.east;const m=a.west;g<m&&(g+=i.CesiumMath.TWO_PI);const T=e.length;for(let a=0;a<T;++a){const T=e[a],f=n[T],E=o[T];M.longitude=i.CesiumMath.lerp(m,g,E.x),M.latitude=i.CesiumMath.lerp(I,l,E.y),M.height=f-r;const p=s.cartographicToCartesian(M,w);t.Matrix4.multiplyByPoint(c,p,p),t.Cartesian3.minimumByComponent(p,d,d),t.Cartesian3.maximumByComponent(p,h,h),u=Math.min(u,M.height)}return u}function C(e,t,n,o,a,s,d,h,u,l,I,g,m,T){const f=r.defined(d),E=u.north,p=u.south;let y=u.east;const N=u.west;y<N&&(y+=i.CesiumMath.TWO_PI);const b=n.length;for(let r=0;r<b;++r){const u=n[r],b=a[u],S=s[u];M.longitude=i.CesiumMath.lerp(N,y,S.x)+m,M.latitude=i.CesiumMath.lerp(p,E,S.y)+T,M.height=b-l;const A=h.cartographicToCartesian(M,w);if(f){const e=2*u;x.x=d[e],x.y=d[e+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(M.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=h.geodeticSurfaceNormal(A)),t=o.encode(e,t,A,S,M.height,x,C,W)}}function W(e,t){let n;return"function"==typeof e.slice&&(n=e.slice(),"function"!=typeof n.sort&&(n=void 0)),r.defined(n)||(n=Array.prototype.slice.call(e)),n.sort(t),n}return d((function(a,d){const h=a.quantizedVertices,u=h.length/3,l=a.octEncodedNormals,I=a.westIndices.length+a.eastIndices.length+a.southIndices.length+a.northIndices.length,m=a.includeWebMercatorT,T=a.exaggeration,f=a.exaggerationRelativeHeight,E=1!==T,p=t.Rectangle.clone(a.rectangle),y=p.west,v=p.south,P=p.east,D=p.north,k=t.Ellipsoid.clone(a.ellipsoid),F=a.minimumHeight,H=a.maximumHeight,_=a.relativeToCenter,G=s.Transforms.eastNorthUpToFixedFrame(_,k),V=t.Matrix4.inverseTransformation(G,new t.Matrix4);let Y,O;m&&(Y=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),O=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(D)-Y));const B=h.subarray(0,u),R=h.subarray(u,2*u),L=h.subarray(2*u,3*u),j=r.defined(l),U=new Array(u),z=new Array(u),q=new Array(u),Q=m?new Array(u):[],K=E?new Array(u):[],X=b;X.x=Number.POSITIVE_INFINITY,X.y=Number.POSITIVE_INFINITY,X.z=Number.POSITIVE_INFINITY;const Z=S;Z.x=Number.NEGATIVE_INFINITY,Z.y=Number.NEGATIVE_INFINITY,Z.z=Number.NEGATIVE_INFINITY;let J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,ee=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY;for(let e=0;e<u;++e){const r=B[e],n=R[e],o=r/N,a=n/N,s=i.CesiumMath.lerp(F,H,L[e]/N);M.longitude=i.CesiumMath.lerp(y,P,o),M.latitude=i.CesiumMath.lerp(v,D,a),M.height=s,J=Math.min(M.longitude,J),$=Math.max(M.longitude,$),ee=Math.min(M.latitude,ee),te=Math.max(M.latitude,te);const d=k.cartographicToCartesian(M);U[e]=new t.Cartesian2(o,a),z[e]=s,q[e]=d,m&&(Q[e]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(M.latitude)-Y)*O),E&&(K[e]=k.geodeticSurfaceNormal(d)),t.Matrix4.multiplyByPoint(V,d,w),t.Cartesian3.minimumByComponent(w,X,X),t.Cartesian3.maximumByComponent(w,Z,Z)}const re=W(a.westIndices,(function(e,t){return U[e].y-U[t].y})),ne=W(a.eastIndices,(function(e,t){return U[t].y-U[e].y})),oe=W(a.southIndices,(function(e,t){return U[t].x-U[e].x})),ie=W(a.northIndices,(function(e,t){return U[e].x-U[t].x}));let ae;if(F<0){ae=new n.EllipsoidalOccluder(k).computeHorizonCullingPointPossiblyUnderEllipsoid(_,q,F)}let se=F;se=Math.min(se,A(a.westIndices,a.westSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.southIndices,a.southSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.eastIndices,a.eastSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.northIndices,a.northSkirtHeight,z,U,p,k,V,X,Z));const ce=new e.AxisAlignedBoundingBox(X,Z,_),de=new n.TerrainEncoding(_,ce,se,H,G,j,m,E,T,f),he=de.stride,ue=new Float32Array(u*he+I*he);let le=0;for(let e=0;e<u;++e){if(j){const t=2*e;x.x=l[t],x.y=l[t+1]}le=de.encode(ue,le,q[e],U[e],z[e],x,Q[e],K[e])}const Ie=Math.max(0,2*(I-4)),ge=a.indices.length+3*Ie,me=o.IndexDatatype.createTypedArray(u+I,ge);me.set(a.indices,0);const Te=1e-4,fe=($-J)*Te,Ee=(te-ee)*Te,pe=-fe,ye=fe,Ne=Ee,we=-Ee;let be=u*he;return C(ue,be,re,de,z,U,l,k,p,a.westSkirtHeight,Y,O,pe,0),be+=a.westIndices.length*he,C(ue,be,oe,de,z,U,l,k,p,a.southSkirtHeight,Y,O,0,we),be+=a.southIndices.length*he,C(ue,be,ne,de,z,U,l,k,p,a.eastSkirtHeight,Y,O,ye,0),be+=a.eastIndices.length*he,C(ue,be,ie,de,z,U,l,k,p,a.northSkirtHeight,Y,O,0,Ne),g.addSkirtIndices(re,oe,ne,ie,u,me,a.indices.length),d.push(ue.buffer,me.buffer),{vertices:ue.buffer,indices:me.buffer,westIndicesSouthToNorth:re,southIndicesEastToWest:oe,eastIndicesNorthToSouth:ne,northIndicesWestToEast:ie,vertexStride:he,center:_,minimumHeight:F,maximumHeight:H,occludeePointInScaledSpace:ae,encoding:de,indexCountWithoutSkirts:a.indices.length}}))})); | ||
define(["./AxisAlignedBoundingBox-b14143c9","./Matrix2-735f0ea9","./defaultValue-6ed27e8d","./TerrainEncoding-d51253d2","./IndexDatatype-d42fd89c","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./Transforms-b683baff","./WebMercatorProjection-4d21b562","./createTaskProcessorWorker","./AttributeCompression-f967afc2","./WebGLConstants-d878ea52","./_commonjsHelpers-c27c962c","./combine-c04aaa26"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I){"use strict";function g(){a.DeveloperError.throwInstantiationError()}Object.defineProperties(g.prototype,{errorEvent:{get:a.DeveloperError.throwInstantiationError},credit:{get:a.DeveloperError.throwInstantiationError},tilingScheme:{get:a.DeveloperError.throwInstantiationError},ready:{get:a.DeveloperError.throwInstantiationError},readyPromise:{get:a.DeveloperError.throwInstantiationError},hasWaterMask:{get:a.DeveloperError.throwInstantiationError},hasVertexNormals:{get:a.DeveloperError.throwInstantiationError},availability:{get:a.DeveloperError.throwInstantiationError}});const m=[];g.getRegularGridIndices=function(e,t){let n=m[e];r.defined(n)||(m[e]=n=[]);let o=n[t];return r.defined(o)||(o=e*t<i.CesiumMath.SIXTY_FOUR_KILOBYTES?n[t]=new Uint16Array((e-1)*(t-1)*6):n[t]=new Uint32Array((e-1)*(t-1)*6),p(e,t,o,0)),o};const T=[];g.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=T[e];r.defined(n)||(T[e]=n=[]);let o=n[t];if(!r.defined(o)){const r=g.getRegularGridIndices(e,t),i=E(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=n[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const f=[];function E(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function p(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function y(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}g.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=f[e];r.defined(n)||(f[e]=n=[]);let i=n[t];if(!r.defined(i)){const r=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=r+s,d=a+6*Math.max(0,s-4),h=E(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,m=h.northIndicesWestToEast,T=o.IndexDatatype.createTypedArray(c,d);p(e,t,T,0),g.addSkirtIndices(u,l,I,m,r,T,a),i=n[t]={indices:T,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:m,indexCountWithoutSkirts:a}}return i},g.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=y(e,s,i,a),s+=e.length,a=y(t,s,i,a),s+=t.length,a=y(r,s,i,a),s+=r.length,y(n,s,i,a)},g.heightmapTerrainQuality=.25,g.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*g.heightmapTerrainQuality/(t*r)},g.prototype.requestTileGeometry=a.DeveloperError.throwInstantiationError,g.prototype.getLevelMaximumGeometricError=a.DeveloperError.throwInstantiationError,g.prototype.getTileDataAvailable=a.DeveloperError.throwInstantiationError,g.prototype.loadTileDataAvailability=a.DeveloperError.throwInstantiationError;const N=32767,w=new t.Cartesian3,S=new t.Cartesian3,M=new t.Cartesian3,x=new t.Cartographic,b=new t.Cartesian2;function A(e,r,n,o,a,s,c,d,h){let u=Number.POSITIVE_INFINITY;const l=a.north,I=a.south;let g=a.east;const m=a.west;g<m&&(g+=i.CesiumMath.TWO_PI);const T=e.length;for(let a=0;a<T;++a){const T=e[a],f=n[T],E=o[T];x.longitude=i.CesiumMath.lerp(m,g,E.x),x.latitude=i.CesiumMath.lerp(I,l,E.y),x.height=f-r;const p=s.cartographicToCartesian(x,w);t.Matrix4.multiplyByPoint(c,p,p),t.Cartesian3.minimumByComponent(p,d,d),t.Cartesian3.maximumByComponent(p,h,h),u=Math.min(u,x.height)}return u}function C(e,t,n,o,a,s,d,h,u,l,I,g,m,T){const f=r.defined(d),E=u.north,p=u.south;let y=u.east;const N=u.west;y<N&&(y+=i.CesiumMath.TWO_PI);const S=n.length;for(let r=0;r<S;++r){const u=n[r],S=a[u],M=s[u];x.longitude=i.CesiumMath.lerp(N,y,M.x)+m,x.latitude=i.CesiumMath.lerp(p,E,M.y)+T,x.height=S-l;const A=h.cartographicToCartesian(x,w);if(f){const e=2*u;b.x=d[e],b.y=d[e+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(x.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=h.geodeticSurfaceNormal(A)),t=o.encode(e,t,A,M,x.height,b,C,W)}}function W(e,t){let n;return"function"==typeof e.slice&&(n=e.slice(),"function"!=typeof n.sort&&(n=void 0)),r.defined(n)||(n=Array.prototype.slice.call(e)),n.sort(t),n}return d((function(a,d){const h=a.quantizedVertices,u=h.length/3,l=a.octEncodedNormals,I=a.westIndices.length+a.eastIndices.length+a.southIndices.length+a.northIndices.length,m=a.includeWebMercatorT,T=a.exaggeration,f=a.exaggerationRelativeHeight,E=1!==T,p=t.Rectangle.clone(a.rectangle),y=p.west,v=p.south,P=p.east,D=p.north,k=t.Ellipsoid.clone(a.ellipsoid),F=a.minimumHeight,H=a.maximumHeight,_=a.relativeToCenter,G=s.Transforms.eastNorthUpToFixedFrame(_,k),V=t.Matrix4.inverseTransformation(G,new t.Matrix4);let Y,O;m&&(Y=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),O=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(D)-Y));const B=h.subarray(0,u),R=h.subarray(u,2*u),L=h.subarray(2*u,3*u),j=r.defined(l),U=new Array(u),z=new Array(u),q=new Array(u),Q=m?new Array(u):[],K=E?new Array(u):[],X=S;X.x=Number.POSITIVE_INFINITY,X.y=Number.POSITIVE_INFINITY,X.z=Number.POSITIVE_INFINITY;const Z=M;Z.x=Number.NEGATIVE_INFINITY,Z.y=Number.NEGATIVE_INFINITY,Z.z=Number.NEGATIVE_INFINITY;let J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,ee=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY;for(let e=0;e<u;++e){const r=B[e],n=R[e],o=r/N,a=n/N,s=i.CesiumMath.lerp(F,H,L[e]/N);x.longitude=i.CesiumMath.lerp(y,P,o),x.latitude=i.CesiumMath.lerp(v,D,a),x.height=s,J=Math.min(x.longitude,J),$=Math.max(x.longitude,$),ee=Math.min(x.latitude,ee),te=Math.max(x.latitude,te);const d=k.cartographicToCartesian(x);U[e]=new t.Cartesian2(o,a),z[e]=s,q[e]=d,m&&(Q[e]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(x.latitude)-Y)*O),E&&(K[e]=k.geodeticSurfaceNormal(d)),t.Matrix4.multiplyByPoint(V,d,w),t.Cartesian3.minimumByComponent(w,X,X),t.Cartesian3.maximumByComponent(w,Z,Z)}const re=W(a.westIndices,(function(e,t){return U[e].y-U[t].y})),ne=W(a.eastIndices,(function(e,t){return U[t].y-U[e].y})),oe=W(a.southIndices,(function(e,t){return U[t].x-U[e].x})),ie=W(a.northIndices,(function(e,t){return U[e].x-U[t].x}));let ae;if(F<0){ae=new n.EllipsoidalOccluder(k).computeHorizonCullingPointPossiblyUnderEllipsoid(_,q,F)}let se=F;se=Math.min(se,A(a.westIndices,a.westSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.southIndices,a.southSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.eastIndices,a.eastSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(a.northIndices,a.northSkirtHeight,z,U,p,k,V,X,Z));const ce=new e.AxisAlignedBoundingBox(X,Z,_),de=new n.TerrainEncoding(_,ce,se,H,G,j,m,E,T,f),he=de.stride,ue=new Float32Array(u*he+I*he);let le=0;for(let e=0;e<u;++e){if(j){const t=2*e;b.x=l[t],b.y=l[t+1]}le=de.encode(ue,le,q[e],U[e],z[e],b,Q[e],K[e])}const Ie=Math.max(0,2*(I-4)),ge=a.indices.length+3*Ie,me=o.IndexDatatype.createTypedArray(u+I,ge);me.set(a.indices,0);const Te=1e-4,fe=($-J)*Te,Ee=(te-ee)*Te,pe=-fe,ye=fe,Ne=Ee,we=-Ee;let Se=u*he;return C(ue,Se,re,de,z,U,l,k,p,a.westSkirtHeight,Y,O,pe,0),Se+=a.westIndices.length*he,C(ue,Se,oe,de,z,U,l,k,p,a.southSkirtHeight,Y,O,0,we),Se+=a.southIndices.length*he,C(ue,Se,ne,de,z,U,l,k,p,a.eastSkirtHeight,Y,O,ye,0),Se+=a.eastIndices.length*he,C(ue,Se,ie,de,z,U,l,k,p,a.northSkirtHeight,Y,O,0,Ne),g.addSkirtIndices(re,oe,ne,ie,u,me,a.indices.length),d.push(ue.buffer,me.buffer),{vertices:ue.buffer,indices:me.buffer,westIndicesSouthToNorth:re,southIndicesEastToWest:oe,eastIndicesNorthToSouth:ne,northIndicesWestToEast:ie,vertexStride:he,center:_,minimumHeight:F,maximumHeight:H,occludeePointInScaledSpace:ae,encoding:de,indexCountWithoutSkirts:a.indices.length}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./Transforms-6c4dd71f","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./IndexDatatype-88be9f5a","./VertexFormat-d53ce9da","./WallGeometryLibrary-45fce2ce","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./arrayRemoveDuplicates-75feaa04","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,n,i,a,o,r,s,l,m,u,c,d,p,f,y,g,h,C){"use strict";const b=new t.Cartesian3,x=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3;function v(n){const a=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,o=n.maximumHeights,r=n.minimumHeights,s=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,i.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=a,this._minimumHeights=r,this._maximumHeights=o,this._vertexFormat=l.VertexFormat.clone(s),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";let c=1+a.length*t.Cartesian3.packedLength+2;e.defined(r)&&(c+=r.length),e.defined(o)&&(c+=o.length),this.packedLength=c+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}v.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const u=n._maximumHeights;if(s=e.defined(u)?u.length:0,i[a++]=s,e.defined(u))for(o=0;o<s;++o)i[a++]=u[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),H=new l.VertexFormat,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:L,vertexFormat:H,granularity:void 0};return v.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,u;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(u=new Array(r),o=0;o<r;++o)u[o]=n[i++];const c=t.Ellipsoid.unpack(n,i,L);i+=t.Ellipsoid.packedLength;const d=l.VertexFormat.unpack(n,i,H),p=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=t.Ellipsoid.clone(c,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(d,a._vertexFormat),a._granularity=p,a):(V.positions=s,V.minimumHeights=m,V.maximumHeights=u,V.granularity=p,new v(V))},v.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new v({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},v.createGeometry=function(a){const l=a._positions,u=a._minimumHeights,c=a._maximumHeights,d=a._vertexFormat,p=a._granularity,f=a._ellipsoid,y=m.WallGeometryLibrary.computePositions(f,l,c,u,p,!0);if(!e.defined(y))return;const g=y.bottomPositions,h=y.topPositions,C=y.numCorners;let v=h.length,L=2*v;const H=d.position?new Float64Array(L):void 0,V=d.normal?new Float32Array(L):void 0,k=d.tangent?new Float32Array(L):void 0,G=d.bitangent?new Float32Array(L):void 0,D=d.st?new Float32Array(L/3*2):void 0;let P,T=0,z=0,O=0,R=0,S=0,I=F,N=w,M=E,W=!0;v/=3;let B=0;const U=1/(v-C-1);for(P=0;P<v;++P){const e=3*P,n=t.Cartesian3.fromArray(h,e,b),a=t.Cartesian3.fromArray(g,e,x);if(d.position&&(H[T++]=a.x,H[T++]=a.y,H[T++]=a.z,H[T++]=n.x,H[T++]=n.y,H[T++]=n.z),d.st&&(D[S++]=B,D[S++]=0,D[S++]=B,D[S++]=1),d.normal||d.tangent||d.bitangent){let a=t.Cartesian3.clone(t.Cartesian3.ZERO,_);const o=t.Cartesian3.subtract(n,f.geodeticSurfaceNormal(n,x),x);if(P+1<v&&(a=t.Cartesian3.fromArray(h,e+3,_)),W){const e=t.Cartesian3.subtract(a,n,A),i=t.Cartesian3.subtract(o,n,b);I=t.Cartesian3.normalize(t.Cartesian3.cross(i,e,I),I),W=!1}t.Cartesian3.equalsEpsilon(n,a,i.CesiumMath.EPSILON10)?W=!0:(B+=U,d.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(a,n,N),N)),d.bitangent&&(M=t.Cartesian3.normalize(t.Cartesian3.cross(I,N,M),M))),d.normal&&(V[z++]=I.x,V[z++]=I.y,V[z++]=I.z,V[z++]=I.x,V[z++]=I.y,V[z++]=I.z),d.tangent&&(k[R++]=N.x,k[R++]=N.y,k[R++]=N.z,k[R++]=N.x,k[R++]=N.y,k[R++]=N.z),d.bitangent&&(G[O++]=M.x,G[O++]=M.y,G[O++]=M.z,G[O++]=M.x,G[O++]=M.y,G[O++]=M.z)}}const q=new r.GeometryAttributes;d.position&&(q.position=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})),d.normal&&(q.normal=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),d.tangent&&(q.tangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),d.bitangent&&(q.bitangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),d.st&&(q.st=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D}));const J=L/3;L-=6*(C+1);const Y=s.IndexDatatype.createTypedArray(J,L);let j=0;for(P=0;P<J-2;P+=2){const e=P,n=P+2,a=t.Cartesian3.fromArray(H,3*e,b),o=t.Cartesian3.fromArray(H,3*n,x);if(t.Cartesian3.equalsEpsilon(a,o,i.CesiumMath.EPSILON10))continue;const r=P+1,s=P+3;Y[j++]=r,Y[j++]=e,Y[j++]=s,Y[j++]=s,Y[j++]=e,Y[j++]=n}return new o.Geometry({attributes:q,indices:Y,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(H)})},function(n,i){return e.defined(i)&&(n=v.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),v.createGeometry(n)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./Transforms-b683baff","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./IndexDatatype-d42fd89c","./VertexFormat-4362bb4a","./WallGeometryLibrary-135603d8","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./arrayRemoveDuplicates-d332a3bf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,n,i,a,o,r,s,l,m,u,c,d,p,f,y,g,h,C){"use strict";const b=new t.Cartesian3,x=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3;function v(n){const a=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,o=n.maximumHeights,r=n.minimumHeights,s=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,i.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=a,this._minimumHeights=r,this._maximumHeights=o,this._vertexFormat=l.VertexFormat.clone(s),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";let c=1+a.length*t.Cartesian3.packedLength+2;e.defined(r)&&(c+=r.length),e.defined(o)&&(c+=o.length),this.packedLength=c+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}v.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const u=n._maximumHeights;if(s=e.defined(u)?u.length:0,i[a++]=s,e.defined(u))for(o=0;o<s;++o)i[a++]=u[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),H=new l.VertexFormat,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:L,vertexFormat:H,granularity:void 0};return v.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,u;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(u=new Array(r),o=0;o<r;++o)u[o]=n[i++];const c=t.Ellipsoid.unpack(n,i,L);i+=t.Ellipsoid.packedLength;const d=l.VertexFormat.unpack(n,i,H),p=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=t.Ellipsoid.clone(c,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(d,a._vertexFormat),a._granularity=p,a):(V.positions=s,V.minimumHeights=m,V.maximumHeights=u,V.granularity=p,new v(V))},v.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new v({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},v.createGeometry=function(a){const l=a._positions,u=a._minimumHeights,c=a._maximumHeights,d=a._vertexFormat,p=a._granularity,f=a._ellipsoid,y=m.WallGeometryLibrary.computePositions(f,l,c,u,p,!0);if(!e.defined(y))return;const g=y.bottomPositions,h=y.topPositions,C=y.numCorners;let v=h.length,L=2*v;const H=d.position?new Float64Array(L):void 0,V=d.normal?new Float32Array(L):void 0,k=d.tangent?new Float32Array(L):void 0,G=d.bitangent?new Float32Array(L):void 0,D=d.st?new Float32Array(L/3*2):void 0;let P,T=0,z=0,O=0,R=0,S=0,I=F,N=w,M=E,W=!0;v/=3;let B=0;const U=1/(v-C-1);for(P=0;P<v;++P){const e=3*P,n=t.Cartesian3.fromArray(h,e,b),a=t.Cartesian3.fromArray(g,e,x);if(d.position&&(H[T++]=a.x,H[T++]=a.y,H[T++]=a.z,H[T++]=n.x,H[T++]=n.y,H[T++]=n.z),d.st&&(D[S++]=B,D[S++]=0,D[S++]=B,D[S++]=1),d.normal||d.tangent||d.bitangent){let a=t.Cartesian3.clone(t.Cartesian3.ZERO,_);const o=t.Cartesian3.subtract(n,f.geodeticSurfaceNormal(n,x),x);if(P+1<v&&(a=t.Cartesian3.fromArray(h,e+3,_)),W){const e=t.Cartesian3.subtract(a,n,A),i=t.Cartesian3.subtract(o,n,b);I=t.Cartesian3.normalize(t.Cartesian3.cross(i,e,I),I),W=!1}t.Cartesian3.equalsEpsilon(n,a,i.CesiumMath.EPSILON10)?W=!0:(B+=U,d.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(a,n,N),N)),d.bitangent&&(M=t.Cartesian3.normalize(t.Cartesian3.cross(I,N,M),M))),d.normal&&(V[z++]=I.x,V[z++]=I.y,V[z++]=I.z,V[z++]=I.x,V[z++]=I.y,V[z++]=I.z),d.tangent&&(k[R++]=N.x,k[R++]=N.y,k[R++]=N.z,k[R++]=N.x,k[R++]=N.y,k[R++]=N.z),d.bitangent&&(G[O++]=M.x,G[O++]=M.y,G[O++]=M.z,G[O++]=M.x,G[O++]=M.y,G[O++]=M.z)}}const q=new r.GeometryAttributes;d.position&&(q.position=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})),d.normal&&(q.normal=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),d.tangent&&(q.tangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:k})),d.bitangent&&(q.bitangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),d.st&&(q.st=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D}));const J=L/3;L-=6*(C+1);const Y=s.IndexDatatype.createTypedArray(J,L);let j=0;for(P=0;P<J-2;P+=2){const e=P,n=P+2,a=t.Cartesian3.fromArray(H,3*e,b),o=t.Cartesian3.fromArray(H,3*n,x);if(t.Cartesian3.equalsEpsilon(a,o,i.CesiumMath.EPSILON10))continue;const r=P+1,s=P+3;Y[j++]=r,Y[j++]=e,Y[j++]=s,Y[j++]=s,Y[j++]=e,Y[j++]=n}return new o.Geometry({attributes:q,indices:Y,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(H)})},function(n,i){return e.defined(i)&&(n=v.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),v.createGeometry(n)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./Matrix2-6555478a","./Transforms-6c4dd71f","./ComponentDatatype-43ab226f","./RuntimeError-d45af186","./GeometryAttribute-a34d86d0","./GeometryAttributes-d060f8b5","./IndexDatatype-88be9f5a","./WallGeometryLibrary-45fce2ce","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./arrayRemoveDuplicates-75feaa04","./PolylinePipeline-5d154ff9","./EllipsoidGeodesic-a67aa524","./EllipsoidRhumbLine-e7a75836","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,i,t,n,a,o,s,r,l,m,d,u,c,p,f,h,g,y){"use strict";const _=new i.Cartesian3,E=new i.Cartesian3;function b(t){const a=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,o=t.maximumHeights,s=t.minimumHeights,r=e.defaultValue(t.granularity,n.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=a,this._minimumHeights=s,this._maximumHeights=o,this._granularity=r,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let m=1+a.length*i.Cartesian3.packedLength+2;e.defined(s)&&(m+=s.length),e.defined(o)&&(m+=o.length),this.packedLength=m+i.Ellipsoid.packedLength+1}b.pack=function(t,n,a){let o;a=e.defaultValue(a,0);const s=t._positions;let r=s.length;for(n[a++]=r,o=0;o<r;++o,a+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[o],n,a);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[a++]=r,e.defined(l))for(o=0;o<r;++o)n[a++]=l[o];const m=t._maximumHeights;if(r=e.defined(m)?m.length:0,n[a++]=r,e.defined(m))for(o=0;o<r;++o)n[a++]=m[o];return i.Ellipsoid.pack(t._ellipsoid,n,a),n[a+=i.Ellipsoid.packedLength]=t._granularity,n};const H=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),C={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,granularity:void 0};return b.unpack=function(t,n,a){let o;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(o=0;o<s;++o,n+=i.Cartesian3.packedLength)r[o]=i.Cartesian3.unpack(t,n);let l,m;if(s=t[n++],s>0)for(l=new Array(s),o=0;o<s;++o)l[o]=t[n++];if(s=t[n++],s>0)for(m=new Array(s),o=0;o<s;++o)m[o]=t[n++];const d=i.Ellipsoid.unpack(t,n,H),u=t[n+=i.Ellipsoid.packedLength];return e.defined(a)?(a._positions=r,a._minimumHeights=l,a._maximumHeights=m,a._ellipsoid=i.Ellipsoid.clone(d,a._ellipsoid),a._granularity=u,a):(C.positions=r,C.minimumHeights=l,C.maximumHeights=m,C.granularity=u,new b(C))},b.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,a;const o=i.minimumHeight,s=i.maximumHeight,r=e.defined(o),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,a=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=o),l&&(a[i]=s)}return new b({positions:t,maximumHeights:a,minimumHeights:n,ellipsoid:i.ellipsoid})},b.createGeometry=function(a){const m=a._positions,d=a._minimumHeights,u=a._maximumHeights,c=a._granularity,p=a._ellipsoid,f=l.WallGeometryLibrary.computePositions(p,m,u,d,c,!1);if(!e.defined(f))return;const h=f.bottomPositions,g=f.topPositions;let y=g.length,b=2*y;const H=new Float64Array(b);let C,A=0;for(y/=3,C=0;C<y;++C){const e=3*C,t=i.Cartesian3.fromArray(g,e,_),n=i.Cartesian3.fromArray(h,e,E);H[A++]=n.x,H[A++]=n.y,H[A++]=n.z,H[A++]=t.x,H[A++]=t.y,H[A++]=t.z}const k=new s.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})}),w=b/3;b=2*w-4+w;const x=r.IndexDatatype.createTypedArray(w,b);let G=0;for(C=0;C<w-2;C+=2){const e=C,t=C+2,a=i.Cartesian3.fromArray(H,3*e,_),o=i.Cartesian3.fromArray(H,3*t,E);if(i.Cartesian3.equalsEpsilon(a,o,n.CesiumMath.EPSILON10))continue;const s=C+1,r=C+3;x[G++]=s,x[G++]=e,x[G++]=s,x[G++]=r,x[G++]=e,x[G++]=t}return x[G++]=w-2,x[G++]=w-1,new o.Geometry({attributes:k,indices:x,primitiveType:o.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(H)})},function(t,n){return e.defined(n)&&(t=b.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}})); | ||
define(["./defaultValue-6ed27e8d","./Matrix2-735f0ea9","./Transforms-b683baff","./ComponentDatatype-6ff7d2c3","./RuntimeError-17a7ed3d","./GeometryAttribute-29ed65a7","./GeometryAttributes-cb1bf806","./IndexDatatype-d42fd89c","./WallGeometryLibrary-135603d8","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./arrayRemoveDuplicates-d332a3bf","./PolylinePipeline-4244f016","./EllipsoidGeodesic-84738e5f","./EllipsoidRhumbLine-c3b11f35","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,i,t,n,o,a,s,r,l,d,m,u,c,p,f,h,g,y){"use strict";const _=new i.Cartesian3,E=new i.Cartesian3;function b(t){const o=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,a=t.maximumHeights,s=t.minimumHeights,r=e.defaultValue(t.granularity,n.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=o,this._minimumHeights=s,this._maximumHeights=a,this._granularity=r,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let d=1+o.length*i.Cartesian3.packedLength+2;e.defined(s)&&(d+=s.length),e.defined(a)&&(d+=a.length),this.packedLength=d+i.Ellipsoid.packedLength+1}b.pack=function(t,n,o){let a;o=e.defaultValue(o,0);const s=t._positions;let r=s.length;for(n[o++]=r,a=0;a<r;++a,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[a],n,o);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[o++]=r,e.defined(l))for(a=0;a<r;++a)n[o++]=l[a];const d=t._maximumHeights;if(r=e.defined(d)?d.length:0,n[o++]=r,e.defined(d))for(a=0;a<r;++a)n[o++]=d[a];return i.Ellipsoid.pack(t._ellipsoid,n,o),n[o+=i.Ellipsoid.packedLength]=t._granularity,n};const H=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),C={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,granularity:void 0};return b.unpack=function(t,n,o){let a;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(a=0;a<s;++a,n+=i.Cartesian3.packedLength)r[a]=i.Cartesian3.unpack(t,n);let l,d;if(s=t[n++],s>0)for(l=new Array(s),a=0;a<s;++a)l[a]=t[n++];if(s=t[n++],s>0)for(d=new Array(s),a=0;a<s;++a)d[a]=t[n++];const m=i.Ellipsoid.unpack(t,n,H),u=t[n+=i.Ellipsoid.packedLength];return e.defined(o)?(o._positions=r,o._minimumHeights=l,o._maximumHeights=d,o._ellipsoid=i.Ellipsoid.clone(m,o._ellipsoid),o._granularity=u,o):(C.positions=r,C.minimumHeights=l,C.maximumHeights=d,C.granularity=u,new b(C))},b.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,o;const a=i.minimumHeight,s=i.maximumHeight,r=e.defined(a),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,o=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=a),l&&(o[i]=s)}return new b({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},b.createGeometry=function(o){const d=o._positions,m=o._minimumHeights,u=o._maximumHeights,c=o._granularity,p=o._ellipsoid,f=l.WallGeometryLibrary.computePositions(p,d,u,m,c,!1);if(!e.defined(f))return;const h=f.bottomPositions,g=f.topPositions;let y=g.length,b=2*y;const H=new Float64Array(b);let C,A=0;for(y/=3,C=0;C<y;++C){const e=3*C,t=i.Cartesian3.fromArray(g,e,_),n=i.Cartesian3.fromArray(h,e,E);H[A++]=n.x,H[A++]=n.y,H[A++]=n.z,H[A++]=t.x,H[A++]=t.y,H[A++]=t.z}const k=new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})}),w=b/3;b=2*w-4+w;const x=r.IndexDatatype.createTypedArray(w,b);let G=0;for(C=0;C<w-2;C+=2){const e=C,t=C+2,o=i.Cartesian3.fromArray(H,3*e,_),a=i.Cartesian3.fromArray(H,3*t,E);if(i.Cartesian3.equalsEpsilon(o,a,n.CesiumMath.EPSILON10))continue;const s=C+1,r=C+3;x[G++]=s,x[G++]=e,x[G++]=s,x[G++]=r,x[G++]=e,x[G++]=t}return x[G++]=w-2,x[G++]=w-1,new a.Geometry({attributes:k,indices:x,primitiveType:a.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(H)})},function(t,n){return e.defined(n)&&(t=b.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./ComponentDatatype-43ab226f","./defaultValue-ac2201bb","./IndexDatatype-88be9f5a","./RuntimeError-d45af186","./createTaskProcessorWorker","./WebGLConstants-e12cdc8a"],(function(t,e,r,n,o,a){"use strict";let i;function s(t,e){const n=t.num_points(),o=t.num_faces(),a=new i.DracoInt32Array,s=3*o,u=r.IndexDatatype.createTypedArray(n,s);let c=0;for(let r=0;r<o;++r)e.GetFaceFromMesh(t,r,a),u[c+0]=a.GetValue(0),u[c+1]=a.GetValue(1),u[c+2]=a.GetValue(2),c+=3;return i.destroy(a),{typedArray:u,numberOfIndices:s}}function u(r,n,o){const a=r.num_points(),s=o.num_components();let u,c=new i.AttributeQuantizationTransform;if(c.InitFromAttribute(o)){const t=new Array(s);for(let e=0;e<s;++e)t[e]=c.min_value(e);u={quantizationBits:c.quantization_bits(),minValues:t,range:c.range(),octEncoded:!1}}i.destroy(c),c=new i.AttributeOctahedronTransform,c.InitFromAttribute(o)&&(u={quantizationBits:c.quantization_bits(),octEncoded:!0}),i.destroy(c);const d=a*s;let f;f=e.defined(u)?function(t,e,r,n,o){let a,s;n.quantizationBits<=8?(s=new i.DracoUInt8Array,a=new Uint8Array(o),e.GetAttributeUInt8ForAllPoints(t,r,s)):(s=new i.DracoUInt16Array,a=new Uint16Array(o),e.GetAttributeUInt16ForAllPoints(t,r,s));for(let t=0;t<o;++t)a[t]=s.GetValue(t);return i.destroy(s),a}(r,n,o,u,d):function(t,e,r,n){let o,a;switch(r.data_type()){case 1:case 11:a=new i.DracoInt8Array,o=new Int8Array(n),e.GetAttributeInt8ForAllPoints(t,r,a);break;case 2:a=new i.DracoUInt8Array,o=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,r,a);break;case 3:a=new i.DracoInt16Array,o=new Int16Array(n),e.GetAttributeInt16ForAllPoints(t,r,a);break;case 4:a=new i.DracoUInt16Array,o=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,r,a);break;case 5:case 7:a=new i.DracoInt32Array,o=new Int32Array(n),e.GetAttributeInt32ForAllPoints(t,r,a);break;case 6:case 8:a=new i.DracoUInt32Array,o=new Uint32Array(n),e.GetAttributeUInt32ForAllPoints(t,r,a);break;case 9:case 10:a=new i.DracoFloat32Array,o=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,r,a)}for(let t=0;t<n;++t)o[t]=a.GetValue(t);return i.destroy(a),o}(r,n,o,d);const y=t.ComponentDatatype.fromTypedArray(f);return{array:f,data:{componentsPerAttribute:s,componentDatatype:y,byteOffset:o.byte_offset(),byteStride:t.ComponentDatatype.getSizeInBytes(y)*s,normalized:o.normalized(),quantization:u}}}function c(t){return e.defined(t.bufferView)?function(t){const e=new i.Decoder,r=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let t=0;t<r.length;++t)e.SkipAttributeTransform(i[r[t]]);const o=t.bufferView,a=new i.DecoderBuffer;if(a.Init(t.array,o.byteLength),e.GetEncodedGeometryType(a)!==i.TRIANGULAR_MESH)throw new n.RuntimeError("Unsupported draco mesh geometry type.");const c=new i.Mesh,d=e.DecodeBufferToMesh(a,c);if(!d.ok()||0===c.ptr)throw new n.RuntimeError(`Error decoding draco mesh geometry: ${d.error_msg()}`);i.destroy(a);const f={},y=t.compressedAttributes;for(const t in y)if(y.hasOwnProperty(t)){const r=y[t],n=e.GetAttributeByUniqueId(c,r);f[t]=u(c,e,n)}const A={indexArray:s(c,e),attributeData:f};return i.destroy(c),i.destroy(e),A}(t):function(t){const e=new i.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(i.POSITION),e.SkipAttributeTransform(i.NORMAL));const r=new i.DecoderBuffer;if(r.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(r)!==i.POINT_CLOUD)throw new n.RuntimeError("Draco geometry type must be POINT_CLOUD.");const o=new i.PointCloud,a=e.DecodeBufferToPointCloud(r,o);if(!a.ok()||0===o.ptr)throw new n.RuntimeError(`Error decoding draco point cloud: ${a.error_msg()}`);i.destroy(r);const s={},c=t.properties;for(const t in c)if(c.hasOwnProperty(t)){let r;if("POSITION"===t||"NORMAL"===t){const n=e.GetAttributeId(o,i[t]);r=e.GetAttribute(o,n)}else{const n=c[t];r=e.GetAttributeByUniqueId(o,n)}s[t]=u(o,e,r)}return i.destroy(o),i.destroy(e),s}(t)}function d(t){i=t,self.onmessage=o(c),self.postMessage(!0)}return function(t){const r=t.data.webAssemblyConfig;if(e.defined(r))return require([r.modulePath],(function(t){e.defined(r.wasmBinaryFile)?(e.defined(t)||(t=self.DracoDecoderModule),t(r).then((function(t){d(t)}))):d(t())}))}})); | ||
define(["./ComponentDatatype-6ff7d2c3","./defaultValue-6ed27e8d","./IndexDatatype-d42fd89c","./RuntimeError-17a7ed3d","./createTaskProcessorWorker","./WebGLConstants-d878ea52"],(function(t,e,r,n,o,a){"use strict";let i;function s(t,e){const n=t.num_points(),o=t.num_faces(),a=new i.DracoInt32Array,s=3*o,u=r.IndexDatatype.createTypedArray(n,s);let c=0;for(let r=0;r<o;++r)e.GetFaceFromMesh(t,r,a),u[c+0]=a.GetValue(0),u[c+1]=a.GetValue(1),u[c+2]=a.GetValue(2),c+=3;return i.destroy(a),{typedArray:u,numberOfIndices:s}}function u(r,n,o){const a=r.num_points(),s=o.num_components();let u,c=new i.AttributeQuantizationTransform;if(c.InitFromAttribute(o)){const t=new Array(s);for(let e=0;e<s;++e)t[e]=c.min_value(e);u={quantizationBits:c.quantization_bits(),minValues:t,range:c.range(),octEncoded:!1}}i.destroy(c),c=new i.AttributeOctahedronTransform,c.InitFromAttribute(o)&&(u={quantizationBits:c.quantization_bits(),octEncoded:!0}),i.destroy(c);const d=a*s;let f;f=e.defined(u)?function(t,e,r,n,o){let a,s;n.quantizationBits<=8?(s=new i.DracoUInt8Array,a=new Uint8Array(o),e.GetAttributeUInt8ForAllPoints(t,r,s)):(s=new i.DracoUInt16Array,a=new Uint16Array(o),e.GetAttributeUInt16ForAllPoints(t,r,s));for(let t=0;t<o;++t)a[t]=s.GetValue(t);return i.destroy(s),a}(r,n,o,u,d):function(t,e,r,n){let o,a;switch(r.data_type()){case 1:case 11:a=new i.DracoInt8Array,o=new Int8Array(n),e.GetAttributeInt8ForAllPoints(t,r,a);break;case 2:a=new i.DracoUInt8Array,o=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,r,a);break;case 3:a=new i.DracoInt16Array,o=new Int16Array(n),e.GetAttributeInt16ForAllPoints(t,r,a);break;case 4:a=new i.DracoUInt16Array,o=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,r,a);break;case 5:case 7:a=new i.DracoInt32Array,o=new Int32Array(n),e.GetAttributeInt32ForAllPoints(t,r,a);break;case 6:case 8:a=new i.DracoUInt32Array,o=new Uint32Array(n),e.GetAttributeUInt32ForAllPoints(t,r,a);break;case 9:case 10:a=new i.DracoFloat32Array,o=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,r,a)}for(let t=0;t<n;++t)o[t]=a.GetValue(t);return i.destroy(a),o}(r,n,o,d);const y=t.ComponentDatatype.fromTypedArray(f);return{array:f,data:{componentsPerAttribute:s,componentDatatype:y,byteOffset:o.byte_offset(),byteStride:t.ComponentDatatype.getSizeInBytes(y)*s,normalized:o.normalized(),quantization:u}}}function c(t){return e.defined(t.bufferView)?function(t){const e=new i.Decoder,r=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let t=0;t<r.length;++t)e.SkipAttributeTransform(i[r[t]]);const o=t.bufferView,a=new i.DecoderBuffer;if(a.Init(t.array,o.byteLength),e.GetEncodedGeometryType(a)!==i.TRIANGULAR_MESH)throw new n.RuntimeError("Unsupported draco mesh geometry type.");const c=new i.Mesh,d=e.DecodeBufferToMesh(a,c);if(!d.ok()||0===c.ptr)throw new n.RuntimeError(`Error decoding draco mesh geometry: ${d.error_msg()}`);i.destroy(a);const f={},y=t.compressedAttributes;for(const t in y)if(y.hasOwnProperty(t)){const r=y[t],n=e.GetAttributeByUniqueId(c,r);f[t]=u(c,e,n)}const A={indexArray:s(c,e),attributeData:f};return i.destroy(c),i.destroy(e),A}(t):function(t){const e=new i.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(i.POSITION),e.SkipAttributeTransform(i.NORMAL));const r=new i.DecoderBuffer;if(r.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(r)!==i.POINT_CLOUD)throw new n.RuntimeError("Draco geometry type must be POINT_CLOUD.");const o=new i.PointCloud,a=e.DecodeBufferToPointCloud(r,o);if(!a.ok()||0===o.ptr)throw new n.RuntimeError(`Error decoding draco point cloud: ${a.error_msg()}`);i.destroy(r);const s={},c=t.properties;for(const t in c)if(c.hasOwnProperty(t)){let r;if("POSITION"===t||"NORMAL"===t){const n=e.GetAttributeId(o,i[t]);r=e.GetAttribute(o,n)}else{const n=c[t];r=e.GetAttributeByUniqueId(o,n)}s[t]=u(o,e,r)}return i.destroy(o),i.destroy(e),s}(t)}function d(t){i=t,self.onmessage=o(c),self.postMessage(!0)}return function(t){const r=t.data.webAssemblyConfig;if(e.defined(r))return require([r.modulePath],(function(t){e.defined(r.wasmBinaryFile)?(e.defined(t)||(t=self.DracoDecoderModule),t(r).then((function(t){d(t)}))):d(t())}))}})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./RuntimeError-d45af186","./defaultValue-ac2201bb","./_commonjsHelpers-3aae1032-ac53d93e","./createTaskProcessorWorker"],(function(e,t,n,i){"use strict";function r(t,n){if(r.passThroughDataForTesting)return n;const i=t.byteLength;if(0===i||i%4!=0)throw new e.RuntimeError("The length of key must be greater than 0 and a multiple of 4.");const a=new DataView(n),o=a.getUint32(0,!0);if(1953029805===o||2917034100===o)return n;const s=new DataView(t);let f=0;const l=n.byteLength,d=l-l%8,c=i;let h,u=8;for(;f<d;)for(u=(u+8)%24,h=u;f<d&&h<c;)a.setUint32(f,a.getUint32(f,!0)^s.getUint32(h,!0),!0),a.setUint32(f+4,a.getUint32(f+4,!0)^s.getUint32(h+4,!0),!0),f+=8,h+=24;if(f<l)for(h>=c&&(u=(u+8)%24,h=u);f<l;)a.setUint8(f,a.getUint8(f)^s.getUint8(h)),f++,h++}function a(e,t){return 0!=(e&t)}r.passThroughDataForTesting=!1;const o=[1,2,4,8];function s(e,t,n,i,r,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=r,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}s.clone=function(e,n){return t.defined(n)?(n._bits=e._bits,n.cnodeVersion=e.cnodeVersion,n.imageryVersion=e.imageryVersion,n.terrainVersion=e.terrainVersion,n.imageryProvider=e.imageryProvider,n.terrainProvider=e.terrainProvider):n=new s(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),n.ancestorHasTerrain=e.ancestorHasTerrain,n.terrainState=e.terrainState,n},s.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},s.prototype.hasSubtree=function(){return a(this._bits,16)},s.prototype.hasImagery=function(){return a(this._bits,64)},s.prototype.hasTerrain=function(){return a(this._bits,128)},s.prototype.hasChildren=function(){return a(this._bits,15)},s.prototype.hasChild=function(e){return a(this._bits,o[e])},s.prototype.getChildBitmask=function(){return 15&this._bits};var f=n.createCommonjsModule((function(e,t){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var a=0;a<i;a++)e[r+a]=t[n+a]},flattenChunks:function(e){var t,n,i,r,a,o;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(o=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,r),r+=a.length;return o}},a={arraySet:function(e,t,n,i,r){for(var a=0;a<i;a++)e[r+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)}));var l=function(e,t,n,i){for(var r=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(r=r+t[i++]|0)|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};var d=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var c=function(e,t,n,i){var r=d,a=i+n;e^=-1;for(var o=i;o<a;o++)e=e>>>8^r[255&(e^t[o])];return-1^e},h=function(e,t){var n,i,r,a,o,s,f,l,d,c,h,u,w,b,m,g,k,v,p,y,_,x,B,E,A;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),a=e.next_out,A=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),f=n.dmax,l=n.wsize,d=n.whave,c=n.wnext,h=n.window,u=n.hold,w=n.bits,b=n.lencode,m=n.distcode,g=(1<<n.lenbits)-1,k=(1<<n.distbits)-1;e:do{w<15&&(u+=E[i++]<<w,w+=8,u+=E[i++]<<w,w+=8),v=b[u&g];t:for(;;){if(u>>>=p=v>>>24,w-=p,0===(p=v>>>16&255))A[a++]=65535&v;else{if(!(16&p)){if(0==(64&p)){v=b[(65535&v)+(u&(1<<p)-1)];continue t}if(32&p){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}y=65535&v,(p&=15)&&(w<p&&(u+=E[i++]<<w,w+=8),y+=u&(1<<p)-1,u>>>=p,w-=p),w<15&&(u+=E[i++]<<w,w+=8,u+=E[i++]<<w,w+=8),v=m[u&k];n:for(;;){if(u>>>=p=v>>>24,w-=p,!(16&(p=v>>>16&255))){if(0==(64&p)){v=m[(65535&v)+(u&(1<<p)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&v,w<(p&=15)&&(u+=E[i++]<<w,(w+=8)<p&&(u+=E[i++]<<w,w+=8)),(_+=u&(1<<p)-1)>f){e.msg="invalid distance too far back",n.mode=30;break e}if(u>>>=p,w-=p,_>(p=a-o)){if((p=_-p)>d&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,B=h,0===c){if(x+=l-p,p<y){y-=p;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}}else if(c<p){if(x+=l+c-p,(p-=c)<y){y-=p;do{A[a++]=h[x++]}while(--p);if(x=0,c<y){y-=p=c;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}}}else if(x+=c-p,p<y){y-=p;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}for(;y>2;)A[a++]=B[x++],A[a++]=B[x++],A[a++]=B[x++],y-=3;y&&(A[a++]=B[x++],y>1&&(A[a++]=B[x++]))}else{x=a-_;do{A[a++]=A[x++],A[a++]=A[x++],A[a++]=A[x++],y-=3}while(y>2);y&&(A[a++]=A[x++],y>1&&(A[a++]=A[x++]))}break}}break}}while(i<r&&a<s);i-=y=w>>3,u&=(1<<(w-=y<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=u,n.bits=w},u=15,w=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],b=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],k=function(e,t,n,i,r,a,o,s){var l,d,c,h,k,v,p,y,_,x=s.bits,B=0,E=0,A=0,T=0,U=0,S=0,R=0,C=0,I=0,z=0,D=null,V=0,P=new f.Buf16(16),O=new f.Buf16(16),j=null,M=0;for(B=0;B<=u;B++)P[B]=0;for(E=0;E<i;E++)P[t[n+E]]++;for(U=x,T=u;T>=1&&0===P[T];T--);if(U>T&&(U=T),0===T)return r[a++]=20971520,r[a++]=20971520,s.bits=1,0;for(A=1;A<T&&0===P[A];A++);for(U<A&&(U=A),C=1,B=1;B<=u;B++)if(C<<=1,(C-=P[B])<0)return-1;if(C>0&&(0===e||1!==T))return-1;for(O[1]=0,B=1;B<u;B++)O[B+1]=O[B]+P[B];for(E=0;E<i;E++)0!==t[n+E]&&(o[O[t[n+E]]++]=E);if(0===e?(D=j=o,v=19):1===e?(D=w,V-=257,j=b,M-=257,v=256):(D=m,j=g,v=-1),z=0,E=0,B=A,k=a,S=U,R=0,c=-1,h=(I=1<<U)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){p=B-R,o[E]<v?(y=0,_=o[E]):o[E]>v?(y=j[M+o[E]],_=D[V+o[E]]):(y=96,_=0),l=1<<B-R,A=d=1<<S;do{r[k+(z>>R)+(d-=l)]=p<<24|y<<16|_|0}while(0!==d);for(l=1<<B-1;z&l;)l>>=1;if(0!==l?(z&=l-1,z+=l):z=0,E++,0==--P[B]){if(B===T)break;B=t[n+o[E]]}if(B>U&&(z&h)!==c){for(0===R&&(R=U),k+=A,C=1<<(S=B-R);S+R<T&&!((C-=P[S+R])<=0);)S++,C<<=1;if(I+=1<<S,1===e&&I>852||2===e&&I>592)return 1;r[c=z&h]=U<<24|S<<16|k-a|0}}return 0!==z&&(r[k+z]=B-R<<24|64<<16|0),s.bits=U,0},v=-2,p=12,y=30;function _(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function x(){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 f.Buf16(320),this.work=new f.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function B(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=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new f.Buf32(852),t.distcode=t.distdyn=new f.Buf32(592),t.sane=1,t.back=-1,0):v}function E(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,B(e)):v}function A(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,E(e))):v}function T(e,t){var n,i;return e?(i=new x,e.state=i,i.window=null,0!==(n=A(e,t))&&(e.state=null),n):v}var U,S,R=!0;function C(e){if(R){var t;for(U=new f.Buf32(512),S=new f.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(1,e.lens,0,288,U,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(2,e.lens,0,32,S,0,e.work,{bits:5}),R=!1}e.lencode=U,e.lenbits=9,e.distcode=S,e.distbits=5}function I(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new f.Buf8(a.wsize)),i>=a.wsize?(f.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((r=a.wsize-a.wnext)>i&&(r=i),f.arraySet(a.window,t,n-i,r,a.wnext),(i-=r)?(f.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}var z={inflateReset:E,inflateReset2:A,inflateResetKeep:B,inflateInit:function(e){return T(e,15)},inflateInit2:T,inflate:function(e,t){var n,i,r,a,o,s,d,u,w,b,m,g,x,B,E,A,T,U,S,R,z,D,V,P,O=0,j=new f.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===p&&(n.mode=13),o=e.next_out,r=e.output,d=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,u=n.hold,w=n.bits,b=s,m=d,D=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(2&n.wrap&&35615===u){n.check=0,j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0),u=0,w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=y;break}if(8!=(15&u)){e.msg="unknown compression method",n.mode=y;break}if(w-=4,z=8+(15&(u>>>=4)),0===n.wbits)n.wbits=z;else if(z>n.wbits){e.msg="invalid window size",n.mode=y;break}n.dmax=1<<z,e.adler=n.check=1,n.mode=512&u?10:p,u=0,w=0;break;case 2:for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(n.flags=u,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=y;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=y;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0,n.mode=3;case 3:for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.head&&(n.head.time=u),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,j[2]=u>>>16&255,j[3]=u>>>24&255,n.check=c(n.check,j,4,0)),u=0,w=0,n.mode=4;case 4:for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((g=n.length)>s&&(g=s),g&&(n.head&&(z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),f.arraySet(n.head.extra,i,a,g,z)),512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,n.length-=g),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;g=0;do{z=i[a+g++],n.head&&z&&n.length<65536&&(n.head.name+=String.fromCharCode(z))}while(z&&g<s);if(512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,z)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;g=0;do{z=i[a+g++],n.head&&z&&n.length<65536&&(n.head.comment+=String.fromCharCode(z))}while(z&&g<s);if(512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,z)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=y;break}u=0,w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=p;break;case 10:for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}e.adler=n.check=_(u),u=0,w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,2;e.adler=n.check=1,n.mode=p;case p:if(5===t||6===t)break e;case 13:if(n.last){u>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}switch(n.last=1&u,w-=1,3&(u>>>=1)){case 0:n.mode=14;break;case 1:if(C(n),n.mode=20,6===t){u>>>=2,w-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=y}u>>>=2,w-=2;break;case 14:for(u>>>=7&w,w-=7&w;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=y;break}if(n.length=65535&u,u=0,w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(g=n.length){if(g>s&&(g=s),g>d&&(g=d),0===g)break e;f.arraySet(r,i,a,g,o),s-=g,a+=g,d-=g,o+=g,n.length-=g;break}n.mode=p;break;case 17:for(;w<14;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(n.nlen=257+(31&u),u>>>=5,w-=5,n.ndist=1+(31&u),u>>>=5,w-=5,n.ncode=4+(15&u),u>>>=4,w-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=y;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.lens[M[n.have++]]=7&u,u>>>=3,w-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,V={bits:n.lenbits},D=k(0,n.lens,0,19,n.lencode,0,n.work,V),n.lenbits=V.bits,D){e.msg="invalid code lengths set",n.mode=y;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(O=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(T<16)u>>>=E,w-=E,n.lens[n.have++]=T;else{if(16===T){for(P=E+2;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u>>>=E,w-=E,0===n.have){e.msg="invalid bit length repeat",n.mode=y;break}z=n.lens[n.have-1],g=3+(3&u),u>>>=2,w-=2}else if(17===T){for(P=E+3;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}w-=E,z=0,g=3+(7&(u>>>=E)),u>>>=3,w-=3}else{for(P=E+7;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}w-=E,z=0,g=11+(127&(u>>>=E)),u>>>=7,w-=7}if(n.have+g>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=y;break}for(;g--;)n.lens[n.have++]=z}}if(n.mode===y)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=y;break}if(n.lenbits=9,V={bits:n.lenbits},D=k(1,n.lens,0,n.nlen,n.lencode,0,n.work,V),n.lenbits=V.bits,D){e.msg="invalid literal/lengths set",n.mode=y;break}if(n.distbits=6,n.distcode=n.distdyn,V={bits:n.distbits},D=k(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,V),n.distbits=V.bits,D){e.msg="invalid distances set",n.mode=y;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&d>=258){e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,h(e,m),o=e.next_out,r=e.output,d=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,u=n.hold,w=n.bits,n.mode===p&&(n.back=-1);break}for(n.back=0;A=(O=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(A&&0==(240&A)){for(U=E,S=A,R=T;A=(O=n.lencode[R+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}u>>>=U,w-=U,n.back+=U}if(u>>>=E,w-=E,n.back+=E,n.length=T,0===A){n.mode=26;break}if(32&A){n.back=-1,n.mode=p;break}if(64&A){e.msg="invalid literal/length code",n.mode=y;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(P=n.extra;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(O=n.distcode[u&(1<<n.distbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(0==(240&A)){for(U=E,S=A,R=T;A=(O=n.distcode[R+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}u>>>=U,w-=U,n.back+=U}if(u>>>=E,w-=E,n.back+=E,64&A){e.msg="invalid distance code",n.mode=y;break}n.offset=T,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(P=n.extra;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=y;break}n.mode=25;case 25:if(0===d)break e;if(g=m-d,n.offset>g){if((g=n.offset-g)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=y;break}g>n.wnext?(g-=n.wnext,x=n.wsize-g):x=n.wnext-g,g>n.length&&(g=n.length),B=n.window}else B=r,x=o-n.offset,g=n.length;g>d&&(g=d),d-=g,n.length-=g;do{r[o++]=B[x++]}while(--g);0===n.length&&(n.mode=21);break;case 26:if(0===d)break e;r[o++]=n.length,d--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===s)break e;s--,u|=i[a++]<<w,w+=8}if(m-=d,e.total_out+=m,n.total+=m,m&&(e.adler=n.check=n.flags?c(n.check,r,m,o-m):l(n.check,r,m,o-m)),m=d,(n.flags?u:_(u))!==n.check){e.msg="incorrect data check",n.mode=y;break}u=0,w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=y;break}u=0,w=0}n.mode=29;case 29:D=1;break e;case y:D=-3;break e;case 31:return-4;default:return v}return e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,(n.wsize||m!==e.avail_out&&n.mode<y&&(n.mode<27||4!==t))&&I(e,e.output,e.next_out,m-e.avail_out),b-=e.avail_in,m-=e.avail_out,e.total_in+=b,e.total_out+=m,n.total+=m,n.wrap&&m&&(e.adler=n.check=n.flags?c(n.check,r,m,e.next_out-m):l(n.check,r,m,e.next_out-m)),e.data_type=n.bits+(n.last?64:0)+(n.mode===p?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===m||4===t)&&0===D&&(D=-5),D},inflateEnd:function(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflateGetHeader:function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?v:(n.head=t,t.done=!1,0):v},inflateSetDictionary:function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?v:11===n.mode&&l(1,t,i,0)!==n.check?-3:I(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):v},inflateInfo:"pako inflate (from Nodeca project)"},D=!0,V=!0;try{String.fromCharCode.apply(null,[0])}catch(e){D=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){V=!1}for(var P=new f.Buf8(256),O=0;O<256;O++)P[O]=O>=252?6:O>=248?5:O>=240?4:O>=224?3:O>=192?2:1;P[254]=P[254]=1;function j(e,t){if(t<65534&&(e.subarray&&V||!e.subarray&&D))return String.fromCharCode.apply(null,f.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}var M=function(e){var t,n,i,r,a,o=e.length,s=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new f.Buf8(s),a=0,r=0;a<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},H=function(e){for(var t=new f.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},N=function(e,t){var n,i,r,a,o=t||e.length,s=new Array(2*o);for(i=0,n=0;n<o;)if((r=e[n++])<128)s[i++]=r;else if((a=P[r])>4)s[i++]=65533,n+=a-1;else{for(r&=2===a?31:3===a?15:7;a>1&&n<o;)r=r<<6|63&e[n++],a--;a>1?s[i++]=65533:r<65536?s[i++]=r:(r-=65536,s[i++]=55296|r>>10&1023,s[i++]=56320|1023&r)}return j(s,i)},L=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+P[e[n]]>t?n:t},Y=0,F=2,G=4,K=0,Q=1,q=2,W=-5,J={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var X=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};var Z=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$=Object.prototype.toString;function ee(e){if(!(this instanceof ee))return new ee(e);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new X,this.strm.avail_out=0;var n=z.inflateInit2(this.strm,t.windowBits);if(n!==K)throw new Error(J[n]);if(this.header=new Z,z.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=M(t.dictionary):"[object ArrayBuffer]"===$.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=z.inflateSetDictionary(this.strm,t.dictionary))!==K))throw new Error(J[n])}function te(e,t){var n=new ee(t);if(n.push(e,!0),n.err)throw n.msg||J[n.err];return n.result}ee.prototype.push=function(e,t){var n,i,r,a,o,s=this.strm,l=this.options.chunkSize,d=this.options.dictionary,c=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?G:Y,"string"==typeof e?s.input=H(e):"[object ArrayBuffer]"===$.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new f.Buf8(l),s.next_out=0,s.avail_out=l),(n=z.inflate(s,Y))===q&&d&&(n=z.inflateSetDictionary(this.strm,d)),n===W&&!0===c&&(n=K,c=!1),n!==Q&&n!==K)return this.onEnd(n),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&n!==Q&&(0!==s.avail_in||i!==G&&i!==F)||("string"===this.options.to?(r=L(s.output,s.next_out),a=s.next_out-r,o=N(s.output,r),s.next_out=a,s.avail_out=l-a,a&&f.arraySet(s.output,s.output,r,a,0),this.onData(o)):this.onData(f.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(c=!0)}while((s.avail_in>0||0===s.avail_out)&&n!==Q);return n===Q&&(i=G),i===G?(n=z.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===K):i!==F||(this.onEnd(K),s.avail_out=0,!0)},ee.prototype.onData=function(e){this.chunks.push(e)},ee.prototype.onEnd=function(e){e===K&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ne={Inflate:ee,inflate:te,inflateRaw:function(e,t){return(t=t||{}).raw=!0,te(e,t)},ungzip:te};const ie=Uint16Array.BYTES_PER_ELEMENT,re=Int32Array.BYTES_PER_ELEMENT,ae=Uint32Array.BYTES_PER_ELEMENT,oe={METADATA:0,TERRAIN:1,DBROOT:2};oe.fromString=function(e){return"Metadata"===e?oe.METADATA:"Terrain"===e?oe.TERRAIN:"DbRoot"===e?oe.DBROOT:void 0};const se=1953029805,fe=2917034100;return i((function(t,n){const i=oe.fromString(t.type);let a=t.buffer;r(t.key,a);const o=function(t){const n=new DataView(t);let i=0;const r=n.getUint32(i,!0);if(i+=ae,r!==se&&r!==fe)throw new e.RuntimeError("Invalid magic");const a=n.getUint32(i,r===se);i+=ae;const o=new Uint8Array(t,i),s=ne.inflate(o);if(s.length!==a)throw new e.RuntimeError("Size of packet doesn't match header");return s}(a);a=o.buffer;const f=o.length;switch(i){case oe.METADATA:return function(t,n,i){const r=new DataView(t);let a=0;const o=r.getUint32(a,!0);if(a+=ae,32301!==o)throw new e.RuntimeError("Invalid magic");const f=r.getUint32(a,!0);if(a+=ae,1!==f)throw new e.RuntimeError("Invalid data type. Must be 1 for QuadTreePacket");const l=r.getUint32(a,!0);if(a+=ae,2!==l)throw new e.RuntimeError("Invalid QuadTreePacket version. Only version 2 is supported.");const d=r.getInt32(a,!0);a+=re;const c=r.getInt32(a,!0);if(a+=re,32!==c)throw new e.RuntimeError("Invalid instance size.");const h=r.getInt32(a,!0);a+=re;const u=r.getInt32(a,!0);a+=re;const w=r.getInt32(a,!0);if(a+=re,h!==d*c+a)throw new e.RuntimeError("Invalid dataBufferOffset");if(h+u+w!==n)throw new e.RuntimeError("Invalid packet offsets");const b=[];for(let e=0;e<d;++e){const e=r.getUint8(a);++a,++a;const t=r.getUint16(a,!0);a+=ie;const n=r.getUint16(a,!0);a+=ie;const i=r.getUint16(a,!0);a+=ie,a+=ie,a+=ie,a+=re,a+=re,a+=8;const o=r.getUint8(a++),f=r.getUint8(a++);a+=ie,b.push(new s(e,t,n,i,o,f))}const m=[];let g=0;function k(e,t,n){let i=!1;if(4===n){if(t.hasSubtree())return;i=!0}for(let r=0;r<4;++r){const a=e+r.toString();if(i)m[a]=null;else if(n<4)if(t.hasChild(r)){if(g===d)return void console.log("Incorrect number of instances");const e=b[g++];m[a]=e,k(a,e,n+1)}else m[a]=null}}let v=0;const p=b[g++];""===i?++v:m[i]=p;return k(i,p,v),m}(a,f,t.quadKey);case oe.TERRAIN:return function(t,n,i){const r=new DataView(t),a=function(t){for(let i=0;i<4;++i){const i=r.getUint32(t,!0);if(t+=ae,(t+=i)>n)throw new e.RuntimeError("Malformed terrain packet found.")}return t};let o=0;const s=[];for(;s.length<5;){const e=o;o=a(o);const n=t.slice(e,o);i.push(n),s.push(n)}return s}(a,f,n);case oe.DBROOT:return n.push(a),{buffer:a}}}))})); | ||
define(["./RuntimeError-17a7ed3d","./defaultValue-6ed27e8d","./_commonjsHelpers-c27c962c","./createTaskProcessorWorker"],(function(e,t,n,i){"use strict";function r(t,n){if(r.passThroughDataForTesting)return n;const i=t.byteLength;if(0===i||i%4!=0)throw new e.RuntimeError("The length of key must be greater than 0 and a multiple of 4.");const a=new DataView(n),o=a.getUint32(0,!0);if(1953029805===o||2917034100===o)return n;const s=new DataView(t);let f=0;const l=n.byteLength,d=l-l%8,c=i;let h,u=8;for(;f<d;)for(u=(u+8)%24,h=u;f<d&&h<c;)a.setUint32(f,a.getUint32(f,!0)^s.getUint32(h,!0),!0),a.setUint32(f+4,a.getUint32(f+4,!0)^s.getUint32(h+4,!0),!0),f+=8,h+=24;if(f<l)for(h>=c&&(u=(u+8)%24,h=u);f<l;)a.setUint8(f,a.getUint8(f)^s.getUint8(h)),f++,h++}function a(e,t){return 0!=(e&t)}r.passThroughDataForTesting=!1;const o=[1,2,4,8];function s(e,t,n,i,r,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=r,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}s.clone=function(e,n){return t.defined(n)?(n._bits=e._bits,n.cnodeVersion=e.cnodeVersion,n.imageryVersion=e.imageryVersion,n.terrainVersion=e.terrainVersion,n.imageryProvider=e.imageryProvider,n.terrainProvider=e.terrainProvider):n=new s(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),n.ancestorHasTerrain=e.ancestorHasTerrain,n.terrainState=e.terrainState,n},s.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},s.prototype.hasSubtree=function(){return a(this._bits,16)},s.prototype.hasImagery=function(){return a(this._bits,64)},s.prototype.hasTerrain=function(){return a(this._bits,128)},s.prototype.hasChildren=function(){return a(this._bits,15)},s.prototype.hasChild=function(e){return a(this._bits,o[e])},s.prototype.getChildBitmask=function(){return 15&this._bits};var f=n.createCommonjsModule((function(e,t){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var a=0;a<i;a++)e[r+a]=t[n+a]},flattenChunks:function(e){var t,n,i,r,a,o;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(o=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,r),r+=a.length;return o}},a={arraySet:function(e,t,n,i,r){for(var a=0;a<i;a++)e[r+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)}));var l=function(e,t,n,i){for(var r=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(r=r+t[i++]|0)|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};var d=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var c=function(e,t,n,i){var r=d,a=i+n;e^=-1;for(var o=i;o<a;o++)e=e>>>8^r[255&(e^t[o])];return-1^e},h=function(e,t){var n,i,r,a,o,s,f,l,d,c,h,u,w,m,b,g,k,v,p,y,_,x,B,E,A;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),a=e.next_out,A=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),f=n.dmax,l=n.wsize,d=n.whave,c=n.wnext,h=n.window,u=n.hold,w=n.bits,m=n.lencode,b=n.distcode,g=(1<<n.lenbits)-1,k=(1<<n.distbits)-1;e:do{w<15&&(u+=E[i++]<<w,w+=8,u+=E[i++]<<w,w+=8),v=m[u&g];t:for(;;){if(u>>>=p=v>>>24,w-=p,0===(p=v>>>16&255))A[a++]=65535&v;else{if(!(16&p)){if(0==(64&p)){v=m[(65535&v)+(u&(1<<p)-1)];continue t}if(32&p){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}y=65535&v,(p&=15)&&(w<p&&(u+=E[i++]<<w,w+=8),y+=u&(1<<p)-1,u>>>=p,w-=p),w<15&&(u+=E[i++]<<w,w+=8,u+=E[i++]<<w,w+=8),v=b[u&k];n:for(;;){if(u>>>=p=v>>>24,w-=p,!(16&(p=v>>>16&255))){if(0==(64&p)){v=b[(65535&v)+(u&(1<<p)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&v,w<(p&=15)&&(u+=E[i++]<<w,(w+=8)<p&&(u+=E[i++]<<w,w+=8)),(_+=u&(1<<p)-1)>f){e.msg="invalid distance too far back",n.mode=30;break e}if(u>>>=p,w-=p,_>(p=a-o)){if((p=_-p)>d&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,B=h,0===c){if(x+=l-p,p<y){y-=p;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}}else if(c<p){if(x+=l+c-p,(p-=c)<y){y-=p;do{A[a++]=h[x++]}while(--p);if(x=0,c<y){y-=p=c;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}}}else if(x+=c-p,p<y){y-=p;do{A[a++]=h[x++]}while(--p);x=a-_,B=A}for(;y>2;)A[a++]=B[x++],A[a++]=B[x++],A[a++]=B[x++],y-=3;y&&(A[a++]=B[x++],y>1&&(A[a++]=B[x++]))}else{x=a-_;do{A[a++]=A[x++],A[a++]=A[x++],A[a++]=A[x++],y-=3}while(y>2);y&&(A[a++]=A[x++],y>1&&(A[a++]=A[x++]))}break}}break}}while(i<r&&a<s);i-=y=w>>3,u&=(1<<(w-=y<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=u,n.bits=w},u=15,w=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],m=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],b=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],g=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],k=function(e,t,n,i,r,a,o,s){var l,d,c,h,k,v,p,y,_,x=s.bits,B=0,E=0,A=0,T=0,U=0,S=0,R=0,C=0,I=0,z=0,D=null,V=0,P=new f.Buf16(16),O=new f.Buf16(16),j=null,M=0;for(B=0;B<=u;B++)P[B]=0;for(E=0;E<i;E++)P[t[n+E]]++;for(U=x,T=u;T>=1&&0===P[T];T--);if(U>T&&(U=T),0===T)return r[a++]=20971520,r[a++]=20971520,s.bits=1,0;for(A=1;A<T&&0===P[A];A++);for(U<A&&(U=A),C=1,B=1;B<=u;B++)if(C<<=1,(C-=P[B])<0)return-1;if(C>0&&(0===e||1!==T))return-1;for(O[1]=0,B=1;B<u;B++)O[B+1]=O[B]+P[B];for(E=0;E<i;E++)0!==t[n+E]&&(o[O[t[n+E]]++]=E);if(0===e?(D=j=o,v=19):1===e?(D=w,V-=257,j=m,M-=257,v=256):(D=b,j=g,v=-1),z=0,E=0,B=A,k=a,S=U,R=0,c=-1,h=(I=1<<U)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){p=B-R,o[E]<v?(y=0,_=o[E]):o[E]>v?(y=j[M+o[E]],_=D[V+o[E]]):(y=96,_=0),l=1<<B-R,A=d=1<<S;do{r[k+(z>>R)+(d-=l)]=p<<24|y<<16|_|0}while(0!==d);for(l=1<<B-1;z&l;)l>>=1;if(0!==l?(z&=l-1,z+=l):z=0,E++,0==--P[B]){if(B===T)break;B=t[n+o[E]]}if(B>U&&(z&h)!==c){for(0===R&&(R=U),k+=A,C=1<<(S=B-R);S+R<T&&!((C-=P[S+R])<=0);)S++,C<<=1;if(I+=1<<S,1===e&&I>852||2===e&&I>592)return 1;r[c=z&h]=U<<24|S<<16|k-a|0}}return 0!==z&&(r[k+z]=B-R<<24|64<<16|0),s.bits=U,0},v=-2,p=12,y=30;function _(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function x(){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 f.Buf16(320),this.work=new f.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function B(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=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new f.Buf32(852),t.distcode=t.distdyn=new f.Buf32(592),t.sane=1,t.back=-1,0):v}function E(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,B(e)):v}function A(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,E(e))):v}function T(e,t){var n,i;return e?(i=new x,e.state=i,i.window=null,0!==(n=A(e,t))&&(e.state=null),n):v}var U,S,R=!0;function C(e){if(R){var t;for(U=new f.Buf32(512),S=new f.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(1,e.lens,0,288,U,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(2,e.lens,0,32,S,0,e.work,{bits:5}),R=!1}e.lencode=U,e.lenbits=9,e.distcode=S,e.distbits=5}function I(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new f.Buf8(a.wsize)),i>=a.wsize?(f.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((r=a.wsize-a.wnext)>i&&(r=i),f.arraySet(a.window,t,n-i,r,a.wnext),(i-=r)?(f.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}var z={inflateReset:E,inflateReset2:A,inflateResetKeep:B,inflateInit:function(e){return T(e,15)},inflateInit2:T,inflate:function(e,t){var n,i,r,a,o,s,d,u,w,m,b,g,x,B,E,A,T,U,S,R,z,D,V,P,O=0,j=new f.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===p&&(n.mode=13),o=e.next_out,r=e.output,d=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,u=n.hold,w=n.bits,m=s,b=d,D=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(2&n.wrap&&35615===u){n.check=0,j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0),u=0,w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=y;break}if(8!=(15&u)){e.msg="unknown compression method",n.mode=y;break}if(w-=4,z=8+(15&(u>>>=4)),0===n.wbits)n.wbits=z;else if(z>n.wbits){e.msg="invalid window size",n.mode=y;break}n.dmax=1<<z,e.adler=n.check=1,n.mode=512&u?10:p,u=0,w=0;break;case 2:for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(n.flags=u,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=y;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=y;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0,n.mode=3;case 3:for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.head&&(n.head.time=u),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,j[2]=u>>>16&255,j[3]=u>>>24&255,n.check=c(n.check,j,4,0)),u=0,w=0,n.mode=4;case 4:for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(j[0]=255&u,j[1]=u>>>8&255,n.check=c(n.check,j,2,0)),u=0,w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((g=n.length)>s&&(g=s),g&&(n.head&&(z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),f.arraySet(n.head.extra,i,a,g,z)),512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,n.length-=g),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;g=0;do{z=i[a+g++],n.head&&z&&n.length<65536&&(n.head.name+=String.fromCharCode(z))}while(z&&g<s);if(512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,z)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;g=0;do{z=i[a+g++],n.head&&z&&n.length<65536&&(n.head.comment+=String.fromCharCode(z))}while(z&&g<s);if(512&n.flags&&(n.check=c(n.check,i,g,a)),s-=g,a+=g,z)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=y;break}u=0,w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=p;break;case 10:for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}e.adler=n.check=_(u),u=0,w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,2;e.adler=n.check=1,n.mode=p;case p:if(5===t||6===t)break e;case 13:if(n.last){u>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}switch(n.last=1&u,w-=1,3&(u>>>=1)){case 0:n.mode=14;break;case 1:if(C(n),n.mode=20,6===t){u>>>=2,w-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=y}u>>>=2,w-=2;break;case 14:for(u>>>=7&w,w-=7&w;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=y;break}if(n.length=65535&u,u=0,w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(g=n.length){if(g>s&&(g=s),g>d&&(g=d),0===g)break e;f.arraySet(r,i,a,g,o),s-=g,a+=g,d-=g,o+=g,n.length-=g;break}n.mode=p;break;case 17:for(;w<14;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(n.nlen=257+(31&u),u>>>=5,w-=5,n.ndist=1+(31&u),u>>>=5,w-=5,n.ncode=4+(15&u),u>>>=4,w-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=y;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.lens[M[n.have++]]=7&u,u>>>=3,w-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,V={bits:n.lenbits},D=k(0,n.lens,0,19,n.lencode,0,n.work,V),n.lenbits=V.bits,D){e.msg="invalid code lengths set",n.mode=y;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(O=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(T<16)u>>>=E,w-=E,n.lens[n.have++]=T;else{if(16===T){for(P=E+2;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u>>>=E,w-=E,0===n.have){e.msg="invalid bit length repeat",n.mode=y;break}z=n.lens[n.have-1],g=3+(3&u),u>>>=2,w-=2}else if(17===T){for(P=E+3;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}w-=E,z=0,g=3+(7&(u>>>=E)),u>>>=3,w-=3}else{for(P=E+7;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}w-=E,z=0,g=11+(127&(u>>>=E)),u>>>=7,w-=7}if(n.have+g>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=y;break}for(;g--;)n.lens[n.have++]=z}}if(n.mode===y)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=y;break}if(n.lenbits=9,V={bits:n.lenbits},D=k(1,n.lens,0,n.nlen,n.lencode,0,n.work,V),n.lenbits=V.bits,D){e.msg="invalid literal/lengths set",n.mode=y;break}if(n.distbits=6,n.distcode=n.distdyn,V={bits:n.distbits},D=k(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,V),n.distbits=V.bits,D){e.msg="invalid distances set",n.mode=y;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&d>=258){e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,h(e,b),o=e.next_out,r=e.output,d=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,u=n.hold,w=n.bits,n.mode===p&&(n.back=-1);break}for(n.back=0;A=(O=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(A&&0==(240&A)){for(U=E,S=A,R=T;A=(O=n.lencode[R+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}u>>>=U,w-=U,n.back+=U}if(u>>>=E,w-=E,n.back+=E,n.length=T,0===A){n.mode=26;break}if(32&A){n.back=-1,n.mode=p;break}if(64&A){e.msg="invalid literal/length code",n.mode=y;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(P=n.extra;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(O=n.distcode[u&(1<<n.distbits)-1])>>>16&255,T=65535&O,!((E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(0==(240&A)){for(U=E,S=A,R=T;A=(O=n.distcode[R+((u&(1<<U+S)-1)>>U)])>>>16&255,T=65535&O,!(U+(E=O>>>24)<=w);){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}u>>>=U,w-=U,n.back+=U}if(u>>>=E,w-=E,n.back+=E,64&A){e.msg="invalid distance code",n.mode=y;break}n.offset=T,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(P=n.extra;w<P;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=y;break}n.mode=25;case 25:if(0===d)break e;if(g=b-d,n.offset>g){if((g=n.offset-g)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=y;break}g>n.wnext?(g-=n.wnext,x=n.wsize-g):x=n.wnext-g,g>n.length&&(g=n.length),B=n.window}else B=r,x=o-n.offset,g=n.length;g>d&&(g=d),d-=g,n.length-=g;do{r[o++]=B[x++]}while(--g);0===n.length&&(n.mode=21);break;case 26:if(0===d)break e;r[o++]=n.length,d--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===s)break e;s--,u|=i[a++]<<w,w+=8}if(b-=d,e.total_out+=b,n.total+=b,b&&(e.adler=n.check=n.flags?c(n.check,r,b,o-b):l(n.check,r,b,o-b)),b=d,(n.flags?u:_(u))!==n.check){e.msg="incorrect data check",n.mode=y;break}u=0,w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===s)break e;s--,u+=i[a++]<<w,w+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=y;break}u=0,w=0}n.mode=29;case 29:D=1;break e;case y:D=-3;break e;case 31:return-4;default:return v}return e.next_out=o,e.avail_out=d,e.next_in=a,e.avail_in=s,n.hold=u,n.bits=w,(n.wsize||b!==e.avail_out&&n.mode<y&&(n.mode<27||4!==t))&&I(e,e.output,e.next_out,b-e.avail_out),m-=e.avail_in,b-=e.avail_out,e.total_in+=m,e.total_out+=b,n.total+=b,n.wrap&&b&&(e.adler=n.check=n.flags?c(n.check,r,b,e.next_out-b):l(n.check,r,b,e.next_out-b)),e.data_type=n.bits+(n.last?64:0)+(n.mode===p?128:0)+(20===n.mode||15===n.mode?256:0),(0===m&&0===b||4===t)&&0===D&&(D=-5),D},inflateEnd:function(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflateGetHeader:function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?v:(n.head=t,t.done=!1,0):v},inflateSetDictionary:function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?v:11===n.mode&&l(1,t,i,0)!==n.check?-3:I(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):v},inflateInfo:"pako inflate (from Nodeca project)"},D=!0,V=!0;try{String.fromCharCode.apply(null,[0])}catch(e){D=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){V=!1}for(var P=new f.Buf8(256),O=0;O<256;O++)P[O]=O>=252?6:O>=248?5:O>=240?4:O>=224?3:O>=192?2:1;P[254]=P[254]=1;function j(e,t){if(t<65534&&(e.subarray&&V||!e.subarray&&D))return String.fromCharCode.apply(null,f.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}var M=function(e){var t,n,i,r,a,o=e.length,s=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new f.Buf8(s),a=0,r=0;a<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},H=function(e){for(var t=new f.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},N=function(e,t){var n,i,r,a,o=t||e.length,s=new Array(2*o);for(i=0,n=0;n<o;)if((r=e[n++])<128)s[i++]=r;else if((a=P[r])>4)s[i++]=65533,n+=a-1;else{for(r&=2===a?31:3===a?15:7;a>1&&n<o;)r=r<<6|63&e[n++],a--;a>1?s[i++]=65533:r<65536?s[i++]=r:(r-=65536,s[i++]=55296|r>>10&1023,s[i++]=56320|1023&r)}return j(s,i)},L=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+P[e[n]]>t?n:t},Y=0,F=2,G=4,K=0,Q=1,q=2,W=-5,J={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var X=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};var Z=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$=Object.prototype.toString;function ee(e){if(!(this instanceof ee))return new ee(e);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new X,this.strm.avail_out=0;var n=z.inflateInit2(this.strm,t.windowBits);if(n!==K)throw new Error(J[n]);if(this.header=new Z,z.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=M(t.dictionary):"[object ArrayBuffer]"===$.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=z.inflateSetDictionary(this.strm,t.dictionary))!==K))throw new Error(J[n])}function te(e,t){var n=new ee(t);if(n.push(e,!0),n.err)throw n.msg||J[n.err];return n.result}ee.prototype.push=function(e,t){var n,i,r,a,o,s=this.strm,l=this.options.chunkSize,d=this.options.dictionary,c=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?G:Y,"string"==typeof e?s.input=H(e):"[object ArrayBuffer]"===$.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new f.Buf8(l),s.next_out=0,s.avail_out=l),(n=z.inflate(s,Y))===q&&d&&(n=z.inflateSetDictionary(this.strm,d)),n===W&&!0===c&&(n=K,c=!1),n!==Q&&n!==K)return this.onEnd(n),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&n!==Q&&(0!==s.avail_in||i!==G&&i!==F)||("string"===this.options.to?(r=L(s.output,s.next_out),a=s.next_out-r,o=N(s.output,r),s.next_out=a,s.avail_out=l-a,a&&f.arraySet(s.output,s.output,r,a,0),this.onData(o)):this.onData(f.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(c=!0)}while((s.avail_in>0||0===s.avail_out)&&n!==Q);return n===Q&&(i=G),i===G?(n=z.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===K):i!==F||(this.onEnd(K),s.avail_out=0,!0)},ee.prototype.onData=function(e){this.chunks.push(e)},ee.prototype.onEnd=function(e){e===K&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ne={Inflate:ee,inflate:te,inflateRaw:function(e,t){return(t=t||{}).raw=!0,te(e,t)},ungzip:te};const ie=Uint16Array.BYTES_PER_ELEMENT,re=Int32Array.BYTES_PER_ELEMENT,ae=Uint32Array.BYTES_PER_ELEMENT,oe={METADATA:0,TERRAIN:1,DBROOT:2};oe.fromString=function(e){return"Metadata"===e?oe.METADATA:"Terrain"===e?oe.TERRAIN:"DbRoot"===e?oe.DBROOT:void 0};const se=1953029805,fe=2917034100;return i((function(t,n){const i=oe.fromString(t.type);let a=t.buffer;r(t.key,a);const o=function(t){const n=new DataView(t);let i=0;const r=n.getUint32(i,!0);if(i+=ae,r!==se&&r!==fe)throw new e.RuntimeError("Invalid magic");const a=n.getUint32(i,r===se);i+=ae;const o=new Uint8Array(t,i),s=ne.inflate(o);if(s.length!==a)throw new e.RuntimeError("Size of packet doesn't match header");return s}(a);a=o.buffer;const f=o.length;switch(i){case oe.METADATA:return function(t,n,i){const r=new DataView(t);let a=0;const o=r.getUint32(a,!0);if(a+=ae,32301!==o)throw new e.RuntimeError("Invalid magic");const f=r.getUint32(a,!0);if(a+=ae,1!==f)throw new e.RuntimeError("Invalid data type. Must be 1 for QuadTreePacket");const l=r.getUint32(a,!0);if(a+=ae,2!==l)throw new e.RuntimeError("Invalid QuadTreePacket version. Only version 2 is supported.");const d=r.getInt32(a,!0);a+=re;const c=r.getInt32(a,!0);if(a+=re,32!==c)throw new e.RuntimeError("Invalid instance size.");const h=r.getInt32(a,!0);a+=re;const u=r.getInt32(a,!0);a+=re;const w=r.getInt32(a,!0);if(a+=re,h!==d*c+a)throw new e.RuntimeError("Invalid dataBufferOffset");if(h+u+w!==n)throw new e.RuntimeError("Invalid packet offsets");const m=[];for(let e=0;e<d;++e){const e=r.getUint8(a);++a,++a;const t=r.getUint16(a,!0);a+=ie;const n=r.getUint16(a,!0);a+=ie;const i=r.getUint16(a,!0);a+=ie,a+=ie,a+=ie,a+=re,a+=re,a+=8;const o=r.getUint8(a++),f=r.getUint8(a++);a+=ie,m.push(new s(e,t,n,i,o,f))}const b=[];let g=0;function k(e,t,n){let i=!1;if(4===n){if(t.hasSubtree())return;i=!0}for(let r=0;r<4;++r){const a=e+r.toString();if(i)b[a]=null;else if(n<4)if(t.hasChild(r)){if(g===d)return void console.log("Incorrect number of instances");const e=m[g++];b[a]=e,k(a,e,n+1)}else b[a]=null}}let v=0;const p=m[g++];""===i?++v:b[i]=p;return k(i,p,v),b}(a,f,t.quadKey);case oe.TERRAIN:return function(t,n,i){const r=new DataView(t),a=function(t){for(let i=0;i<4;++i){const i=r.getUint32(t,!0);if(t+=ae,(t+=i)>n)throw new e.RuntimeError("Malformed terrain packet found.")}return t};let o=0;const s=[];for(;s.length<5;){const e=o;o=a(o);const n=t.slice(e,o);i.push(n),s.push(n)}return s}(a,f,n);case oe.DBROOT:return n.push(a),{buffer:a}}}))})); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./defaultValue-ac2201bb","./RuntimeError-d45af186","./WebGLConstants-e12cdc8a","./createTaskProcessorWorker"],(function(_,R,t,A){"use strict";const e={UNSIGNED_BYTE:t.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:t.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:t.WebGLConstants.UNSIGNED_INT,FLOAT:t.WebGLConstants.FLOAT,HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:t.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:t.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,R){switch(_){case e.UNSIGNED_BYTE:return t.WebGLConstants.UNSIGNED_BYTE;case e.UNSIGNED_SHORT:return t.WebGLConstants.UNSIGNED_SHORT;case e.UNSIGNED_INT:return t.WebGLConstants.UNSIGNED_INT;case e.FLOAT:return t.WebGLConstants.FLOAT;case e.HALF_FLOAT:return R.webgl2?t.WebGLConstants.HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES;case e.UNSIGNED_INT_24_8:return t.WebGLConstants.UNSIGNED_INT_24_8;case e.UNSIGNED_SHORT_4_4_4_4:return t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case e.UNSIGNED_SHORT_5_5_5_1:return t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case e.UNSIGNED_SHORT_5_6_5:return e.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case e.UNSIGNED_BYTE:return 1;case e.UNSIGNED_SHORT:case e.UNSIGNED_SHORT_4_4_4_4:case e.UNSIGNED_SHORT_5_5_5_1:case e.UNSIGNED_SHORT_5_6_5:case e.HALF_FLOAT:return 2;case e.UNSIGNED_INT:case e.FLOAT:case e.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===e.UNSIGNED_BYTE||_===e.UNSIGNED_SHORT||_===e.UNSIGNED_INT||_===e.FLOAT||_===e.HALF_FLOAT||_===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5}};var T=Object.freeze(e);const O={DEPTH_COMPONENT:t.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:t.WebGLConstants.DEPTH_STENCIL,ALPHA:t.WebGLConstants.ALPHA,RGB:t.WebGLConstants.RGB,RGBA:t.WebGLConstants.RGBA,LUMINANCE:t.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:t.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:t.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:t.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:t.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:t.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:t.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:t.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:return 2;case O.ALPHA:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA||_===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isColorFormat:function(_){return _===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL},isCompressedFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isDXTFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5},isPVRTCFormat:function(_){return _===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===O.RGBA_ASTC},isETC1Format:function(_){return _===O.RGB_ETC1},isETC2Format:function(_){return _===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===O.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,t){switch(_){case O.RGB_DXT1:case O.RGBA_DXT1:case O.RGB_ETC1:case O.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*8;case O.RGBA_DXT3:case O.RGBA_DXT5:case O.RGBA_ASTC:case O.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*16;case O.RGB_PVRTC_4BPPV1:case O.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(t,8)*4+7)/8);case O.RGB_PVRTC_2BPPV1:case O.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(t,8)*2+7)/8);case O.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(t/4)*16;default:return 0}},textureSizeInBytes:function(_,R,t,A){let e=O.componentsLength(_);return T.isPacked(R)&&(e=1),e*T.sizeInBytes(R)*t*A},alignmentInBytes:function(_,R,t){const A=O.textureSizeInBytes(_,R,t,1)%4;return 0===A?4:2===A?2:1},createTypedArray:function(_,R,t,A){let e;const n=T.sizeInBytes(R);e=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&R===T.FLOAT?Float32Array:Uint32Array;return new e(O.componentsLength(_)*t*A)},flipY:function(_,R,t,A,e){if(1===e)return _;const T=O.createTypedArray(R,t,A,e),n=O.componentsLength(R),B=A*n;for(let R=0;R<e;++R){const t=R*A*n,O=(e-R-1)*A*n;for(let R=0;R<B;++R)T[O+R]=_[t+R]}return T},toInternalFormat:function(_,R,A){if(!A.webgl2)return _;if(_===O.DEPTH_STENCIL)return t.WebGLConstants.DEPTH24_STENCIL8;if(_===O.DEPTH_COMPONENT){if(R===T.UNSIGNED_SHORT)return t.WebGLConstants.DEPTH_COMPONENT16;if(R===T.UNSIGNED_INT)return t.WebGLConstants.DEPTH_COMPONENT24}if(R===T.FLOAT)switch(_){case O.RGBA:return t.WebGLConstants.RGBA32F;case O.RGB:return t.WebGLConstants.RGB32F;case O.RG:return t.WebGLConstants.RG32F;case O.R:return t.WebGLConstants.R32F}if(R===T.HALF_FLOAT)switch(_){case O.RGBA:return t.WebGLConstants.RGBA16F;case O.RGB:return t.WebGLConstants.RGB16F;case O.RG:return t.WebGLConstants.RG16F;case O.R:return t.WebGLConstants.R16F}return _}};var n=Object.freeze(O);var B=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});const G=[171,75,84,88,32,50,48,187,13,10,26,10];var M,C,K,s,F,N,r,i,S;(S=M||(M={}))[S.NONE=0]="NONE",S[S.BASISLZ=1]="BASISLZ",S[S.ZSTD=2]="ZSTD",S[S.ZLIB=3]="ZLIB",function(_){_[_.BASICFORMAT=0]="BASICFORMAT"}(C||(C={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.ETC1S=163]="ETC1S",_[_.UASTC=166]="UASTC"}(K||(K={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.SRGB=1]="SRGB"}(s||(s={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.LINEAR=1]="LINEAR",_[_.SRGB=2]="SRGB",_[_.ITU=3]="ITU",_[_.NTSC=4]="NTSC",_[_.SLOG=5]="SLOG",_[_.SLOG2=6]="SLOG2"}(F||(F={})),function(_){_[_.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",_[_.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(N||(N={})),function(_){_[_.RGB=0]="RGB",_[_.RRR=3]="RRR",_[_.GGG=4]="GGG",_[_.AAA=15]="AAA"}(r||(r={})),function(_){_[_.RGB=0]="RGB",_[_.RGBA=3]="RGBA",_[_.RRR=4]="RRR",_[_.RRRG=5]="RRRG"}(i||(i={}));class V{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=M.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:C.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:K.UNSPECIFIED,colorPrimaries:s.SRGB,transferFunction:s.SRGB,flags:N.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class o{constructor(_,R,t,A){this._dataView=new DataView(_.buffer,_.byteOffset+R,t),this._littleEndian=A,this._offset=0}_nextUint8(){const _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){const _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){const _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){const _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){const t=this._offset;let A=0;for(;this._dataView.getUint8(this._offset)!==R&&A<_;)A++,this._offset++;return A<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+t,A)}}function a(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}const U=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"];let E;function L(t,A){const e=t.ktx2Buffer,O=t.supportedTargetFormats;let M;try{M=function(_){const R=new Uint8Array(_.buffer,_.byteOffset,G.length);if(R[0]!==G[0]||R[1]!==G[1]||R[2]!==G[2]||R[3]!==G[3]||R[4]!==G[4]||R[5]!==G[5]||R[6]!==G[6]||R[7]!==G[7]||R[8]!==G[8]||R[9]!==G[9]||R[10]!==G[10]||R[11]!==G[11])throw new Error("Missing KTX 2.0 identifier.");const t=new V,A=17*Uint32Array.BYTES_PER_ELEMENT,e=new o(_,G.length,A,!0);t.vkFormat=e._nextUint32(),t.typeSize=e._nextUint32(),t.pixelWidth=e._nextUint32(),t.pixelHeight=e._nextUint32(),t.pixelDepth=e._nextUint32(),t.layerCount=e._nextUint32(),t.faceCount=e._nextUint32();const T=e._nextUint32();t.supercompressionScheme=e._nextUint32();const O=e._nextUint32(),n=e._nextUint32(),B=e._nextUint32(),M=e._nextUint32(),C=e._nextUint64(),K=e._nextUint64(),s=new o(_,G.length+A,3*T*8,!0);for(let R=0;R<T;R++)t.levels.push({levelData:new Uint8Array(_.buffer,_.byteOffset+s._nextUint64(),s._nextUint64()),uncompressedByteLength:s._nextUint64()});const F=new o(_,O,n,!0),N={vendorId:F._skip(4)._nextUint16(),descriptorType:F._nextUint16(),versionNumber:F._nextUint16(),descriptorBlockSize:F._nextUint16(),colorModel:F._nextUint8(),colorPrimaries:F._nextUint8(),transferFunction:F._nextUint8(),flags:F._nextUint8(),texelBlockDimension:{x:F._nextUint8()+1,y:F._nextUint8()+1,z:F._nextUint8()+1,w:F._nextUint8()+1},bytesPlane:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],samples:[]},r=(N.descriptorBlockSize/4-6)/4;for(let _=0;_<r;_++)N.samples[_]={bitOffset:F._nextUint16(),bitLength:F._nextUint8(),channelID:F._nextUint8(),samplePosition:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],sampleLower:F._nextUint32(),sampleUpper:F._nextUint32()};t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(N);const i=new o(_,B,M,!0);for(;i._offset<M;){const _=i._nextUint32(),R=i._scan(_),A=a(R),e=i._scan(_-R.byteLength);t.keyValue[A]=A.match(/^ktx/i)?a(e):e,i._offset%4&&i._skip(4-i._offset%4)}if(K<=0)return t;const S=new o(_,C,K,!0),U=S._nextUint16(),E=S._nextUint16(),L=S._nextUint32(),P=S._nextUint32(),c=S._nextUint32(),f=S._nextUint32(),I=[];for(let _=0;_<T;_++)I.push({imageFlags:S._nextUint32(),rgbSliceByteOffset:S._nextUint32(),rgbSliceByteLength:S._nextUint32(),alphaSliceByteOffset:S._nextUint32(),alphaSliceByteLength:S._nextUint32()});const l=C+S._offset,u=l+L,X=u+P,D=X+c,x=new Uint8Array(_.buffer,_.byteOffset+l,L),h=new Uint8Array(_.buffer,_.byteOffset+u,P),H=new Uint8Array(_.buffer,_.byteOffset+X,c),d=new Uint8Array(_.buffer,_.byteOffset+D,f);return t.globalData={endpointCount:U,selectorCount:E,imageDescs:I,endpointsData:x,selectorsData:h,tablesData:H,extendedData:d},t}(e)}catch(_){throw new R.RuntimeError("Invalid KTX2 file.")}if(0!==M.layerCount)throw new R.RuntimeError("KTX2 texture arrays are not supported.");if(0!==M.pixelDepth)throw new R.RuntimeError("KTX2 3D textures are unsupported.");const C=M.dataFormatDescriptor[0],K=new Array(M.levelCount);return 0!==M.vkFormat||163!==C.colorModel&&166!==C.colorModel?(A.push(e.buffer),function(R,t){const A=R.vkFormat===B.VK_FORMAT_R8G8B8_SRGB?n.RGB:n.RGBA;let e;R.vkFormat===B.VK_FORMAT_R8G8B8A8_UNORM?e=T.UNSIGNED_BYTE:R.vkFormat===B.VK_FORMAT_R16G16B16A16_SFLOAT?e=T.HALF_FLOAT:R.vkFormat===B.VK_FORMAT_R32G32B32A32_SFLOAT&&(e=T.FLOAT);for(let O=0;O<R.levels.length;++O){const B={};t[O]=B;const G=R.levels[O].levelData,M=R.pixelWidth>>O,C=R.pixelHeight>>O,K=M*C*n.componentsLength(A);for(let t=0;t<R.faceCount;++t){const O=G.byteOffset+K*R.typeSize*t;let n;n=_.defined(e)&&1!==T.sizeInBytes(e)?2===T.sizeInBytes(e)?new Uint16Array(G.buffer,O,K):new Float32Array(G.buffer,O,K):new Uint8Array(G.buffer,O,K),B[U[t]]={internalFormat:A,datatype:e,width:M,height:C,levelBuffer:n}}}}(M,K)):function(t,A,e,T,O,B){const G=new T.KTX2File(t);let M=G.getWidth(),C=G.getHeight();const K=G.getLevels(),s=G.getHasAlpha();if(!(M>0&&C>0&&K>0))throw G.close(),G.delete(),new R.RuntimeError("Invalid KTX2 file");let F,N;const r=A.dataFormatDescriptor[0],i=T.transcoder_texture_format;if(163===r.colorModel)if(e.etc)F=s?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=s?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!s)F=n.RGB_ETC1,N=i.cTFETC1_RGB;else if(e.s3tc)F=s?n.RGBA_DXT5:n.RGB_DXT1,N=s?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.pvrtc)F=s?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=s?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB;else if(e.astc)F=n.RGBA_ASTC,N=i.cTFASTC_4x4_RGBA;else{if(!e.bc7)throw new R.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");F=n.RGBA_BC7,N=i.cTFBC7_RGBA}else if(166===r.colorModel)if(e.astc)F=n.RGBA_ASTC,N=i.cTFASTC_4x4_RGBA;else if(e.bc7)F=n.RGBA_BC7,N=i.cTFBC7_RGBA;else if(e.s3tc)F=s?n.RGBA_DXT5:n.RGB_DXT1,N=s?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.etc)F=s?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=s?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!s)F=n.RGB_ETC1,N=i.cTFETC1_RGB;else{if(!e.pvrtc)throw new R.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");F=s?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=s?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB}if(!G.startTranscoding())throw G.close(),G.delete(),new R.RuntimeError("startTranscoding() failed");for(let t=0;t<A.levels.length;++t){const e={};B[t]=e,M=A.pixelWidth>>t,C=A.pixelHeight>>t;const T=G.getImageTranscodedSizeInBytes(t,0,0,N.value),n=new Uint8Array(T),K=G.transcodeImage(n,t,0,0,N.value,0,-1,-1);if(!_.defined(K))throw new R.RuntimeError("transcodeImage() failed.");O.push(n.buffer),e[U[0]]={internalFormat:F,width:M,height:C,levelBuffer:n}}G.close(),G.delete()}(e,M,O,E,A,K),K}function P(_){E=_,E.initializeBasis(),self.onmessage=A(L),self.postMessage(!0)}return function(R){const t=R.data.webAssemblyConfig;if(_.defined(t))return require([t.modulePath],(function(R){if(!_.defined(t.wasmBinaryFile))return R().then((function(_){P(_)}));_.defined(R)||(R=self.MSC_TRANSCODER),R(t).then((function(_){P(_)}))}))}})); | ||
define(["./defaultValue-6ed27e8d","./RuntimeError-17a7ed3d","./WebGLConstants-d878ea52","./createTaskProcessorWorker"],(function(_,R,t,A){"use strict";const e={UNSIGNED_BYTE:t.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:t.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:t.WebGLConstants.UNSIGNED_INT,FLOAT:t.WebGLConstants.FLOAT,HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES,UNSIGNED_INT_24_8:t.WebGLConstants.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:t.WebGLConstants.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(_,R){switch(_){case e.UNSIGNED_BYTE:return t.WebGLConstants.UNSIGNED_BYTE;case e.UNSIGNED_SHORT:return t.WebGLConstants.UNSIGNED_SHORT;case e.UNSIGNED_INT:return t.WebGLConstants.UNSIGNED_INT;case e.FLOAT:return t.WebGLConstants.FLOAT;case e.HALF_FLOAT:return R.webgl2?t.WebGLConstants.HALF_FLOAT:t.WebGLConstants.HALF_FLOAT_OES;case e.UNSIGNED_INT_24_8:return t.WebGLConstants.UNSIGNED_INT_24_8;case e.UNSIGNED_SHORT_4_4_4_4:return t.WebGLConstants.UNSIGNED_SHORT_4_4_4_4;case e.UNSIGNED_SHORT_5_5_5_1:return t.WebGLConstants.UNSIGNED_SHORT_5_5_5_1;case e.UNSIGNED_SHORT_5_6_5:return e.UNSIGNED_SHORT_5_6_5}},isPacked:function(_){return _===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(_){switch(_){case e.UNSIGNED_BYTE:return 1;case e.UNSIGNED_SHORT:case e.UNSIGNED_SHORT_4_4_4_4:case e.UNSIGNED_SHORT_5_5_5_1:case e.UNSIGNED_SHORT_5_6_5:case e.HALF_FLOAT:return 2;case e.UNSIGNED_INT:case e.FLOAT:case e.UNSIGNED_INT_24_8:return 4}},validate:function(_){return _===e.UNSIGNED_BYTE||_===e.UNSIGNED_SHORT||_===e.UNSIGNED_INT||_===e.FLOAT||_===e.HALF_FLOAT||_===e.UNSIGNED_INT_24_8||_===e.UNSIGNED_SHORT_4_4_4_4||_===e.UNSIGNED_SHORT_5_5_5_1||_===e.UNSIGNED_SHORT_5_6_5}};var T=Object.freeze(e);const O={DEPTH_COMPONENT:t.WebGLConstants.DEPTH_COMPONENT,DEPTH_STENCIL:t.WebGLConstants.DEPTH_STENCIL,ALPHA:t.WebGLConstants.ALPHA,RGB:t.WebGLConstants.RGB,RGBA:t.WebGLConstants.RGBA,LUMINANCE:t.WebGLConstants.LUMINANCE,LUMINANCE_ALPHA:t.WebGLConstants.LUMINANCE_ALPHA,RGB_DXT1:t.WebGLConstants.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:t.WebGLConstants.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:t.WebGLConstants.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:t.WebGLConstants.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:t.WebGLConstants.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:t.WebGLConstants.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:t.WebGLConstants.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:t.WebGLConstants.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(_){switch(_){case O.RGB:return 3;case O.RGBA:return 4;case O.LUMINANCE_ALPHA:return 2;case O.ALPHA:case O.LUMINANCE:default:return 1}},validate:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL||_===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA||_===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isColorFormat:function(_){return _===O.ALPHA||_===O.RGB||_===O.RGBA||_===O.LUMINANCE||_===O.LUMINANCE_ALPHA},isDepthFormat:function(_){return _===O.DEPTH_COMPONENT||_===O.DEPTH_STENCIL},isCompressedFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5||_===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1||_===O.RGBA_ASTC||_===O.RGB_ETC1||_===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC||_===O.RGBA_BC7},isDXTFormat:function(_){return _===O.RGB_DXT1||_===O.RGBA_DXT1||_===O.RGBA_DXT3||_===O.RGBA_DXT5},isPVRTCFormat:function(_){return _===O.RGB_PVRTC_4BPPV1||_===O.RGB_PVRTC_2BPPV1||_===O.RGBA_PVRTC_4BPPV1||_===O.RGBA_PVRTC_2BPPV1},isASTCFormat:function(_){return _===O.RGBA_ASTC},isETC1Format:function(_){return _===O.RGB_ETC1},isETC2Format:function(_){return _===O.RGB8_ETC2||_===O.RGBA8_ETC2_EAC},isBC7Format:function(_){return _===O.RGBA_BC7},compressedTextureSizeInBytes:function(_,R,t){switch(_){case O.RGB_DXT1:case O.RGBA_DXT1:case O.RGB_ETC1:case O.RGB8_ETC2:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*8;case O.RGBA_DXT3:case O.RGBA_DXT5:case O.RGBA_ASTC:case O.RGBA8_ETC2_EAC:return Math.floor((R+3)/4)*Math.floor((t+3)/4)*16;case O.RGB_PVRTC_4BPPV1:case O.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(R,8)*Math.max(t,8)*4+7)/8);case O.RGB_PVRTC_2BPPV1:case O.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(R,16)*Math.max(t,8)*2+7)/8);case O.RGBA_BC7:return Math.ceil(R/4)*Math.ceil(t/4)*16;default:return 0}},textureSizeInBytes:function(_,R,t,A){let e=O.componentsLength(_);return T.isPacked(R)&&(e=1),e*T.sizeInBytes(R)*t*A},alignmentInBytes:function(_,R,t){const A=O.textureSizeInBytes(_,R,t,1)%4;return 0===A?4:2===A?2:1},createTypedArray:function(_,R,t,A){let e;const n=T.sizeInBytes(R);e=n===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:n===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:n===Float32Array.BYTES_PER_ELEMENT&&R===T.FLOAT?Float32Array:Uint32Array;return new e(O.componentsLength(_)*t*A)},flipY:function(_,R,t,A,e){if(1===e)return _;const T=O.createTypedArray(R,t,A,e),n=O.componentsLength(R),B=A*n;for(let R=0;R<e;++R){const t=R*A*n,O=(e-R-1)*A*n;for(let R=0;R<B;++R)T[O+R]=_[t+R]}return T},toInternalFormat:function(_,R,A){if(!A.webgl2)return _;if(_===O.DEPTH_STENCIL)return t.WebGLConstants.DEPTH24_STENCIL8;if(_===O.DEPTH_COMPONENT){if(R===T.UNSIGNED_SHORT)return t.WebGLConstants.DEPTH_COMPONENT16;if(R===T.UNSIGNED_INT)return t.WebGLConstants.DEPTH_COMPONENT24}if(R===T.FLOAT)switch(_){case O.RGBA:return t.WebGLConstants.RGBA32F;case O.RGB:return t.WebGLConstants.RGB32F;case O.RG:return t.WebGLConstants.RG32F;case O.R:return t.WebGLConstants.R32F}if(R===T.HALF_FLOAT)switch(_){case O.RGBA:return t.WebGLConstants.RGBA16F;case O.RGB:return t.WebGLConstants.RGB16F;case O.RG:return t.WebGLConstants.RG16F;case O.R:return t.WebGLConstants.R16F}return _}};var n=Object.freeze(O);var B=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033});const G=[171,75,84,88,32,50,48,187,13,10,26,10];var M,C,K,s,F,N,r,i,S;(S=M||(M={}))[S.NONE=0]="NONE",S[S.BASISLZ=1]="BASISLZ",S[S.ZSTD=2]="ZSTD",S[S.ZLIB=3]="ZLIB",function(_){_[_.BASICFORMAT=0]="BASICFORMAT"}(C||(C={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.ETC1S=163]="ETC1S",_[_.UASTC=166]="UASTC"}(K||(K={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.SRGB=1]="SRGB"}(s||(s={})),function(_){_[_.UNSPECIFIED=0]="UNSPECIFIED",_[_.LINEAR=1]="LINEAR",_[_.SRGB=2]="SRGB",_[_.ITU=3]="ITU",_[_.NTSC=4]="NTSC",_[_.SLOG=5]="SLOG",_[_.SLOG2=6]="SLOG2"}(F||(F={})),function(_){_[_.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",_[_.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(N||(N={})),function(_){_[_.RGB=0]="RGB",_[_.RRR=3]="RRR",_[_.GGG=4]="GGG",_[_.AAA=15]="AAA"}(r||(r={})),function(_){_[_.RGB=0]="RGB",_[_.RGBA=3]="RGBA",_[_.RRR=4]="RRR",_[_.RRRG=5]="RRRG"}(i||(i={}));class V{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=M.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:C.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:K.UNSPECIFIED,colorPrimaries:s.SRGB,transferFunction:s.SRGB,flags:N.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class o{constructor(_,R,t,A){this._dataView=new DataView(_.buffer,_.byteOffset+R,t),this._littleEndian=A,this._offset=0}_nextUint8(){const _=this._dataView.getUint8(this._offset);return this._offset+=1,_}_nextUint16(){const _=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,_}_nextUint32(){const _=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,_}_nextUint64(){const _=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,_}_skip(_){return this._offset+=_,this}_scan(_,R=0){const t=this._offset;let A=0;for(;this._dataView.getUint8(this._offset)!==R&&A<_;)A++,this._offset++;return A<_&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+t,A)}}function a(_){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(_):Buffer.from(_).toString("utf8")}const U=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"];let E;function L(t,A){const e=t.ktx2Buffer,O=t.supportedTargetFormats;let M;try{M=function(_){const R=new Uint8Array(_.buffer,_.byteOffset,G.length);if(R[0]!==G[0]||R[1]!==G[1]||R[2]!==G[2]||R[3]!==G[3]||R[4]!==G[4]||R[5]!==G[5]||R[6]!==G[6]||R[7]!==G[7]||R[8]!==G[8]||R[9]!==G[9]||R[10]!==G[10]||R[11]!==G[11])throw new Error("Missing KTX 2.0 identifier.");const t=new V,A=17*Uint32Array.BYTES_PER_ELEMENT,e=new o(_,G.length,A,!0);t.vkFormat=e._nextUint32(),t.typeSize=e._nextUint32(),t.pixelWidth=e._nextUint32(),t.pixelHeight=e._nextUint32(),t.pixelDepth=e._nextUint32(),t.layerCount=e._nextUint32(),t.faceCount=e._nextUint32();const T=e._nextUint32();t.supercompressionScheme=e._nextUint32();const O=e._nextUint32(),n=e._nextUint32(),B=e._nextUint32(),M=e._nextUint32(),C=e._nextUint64(),K=e._nextUint64(),s=new o(_,G.length+A,3*T*8,!0);for(let R=0;R<T;R++)t.levels.push({levelData:new Uint8Array(_.buffer,_.byteOffset+s._nextUint64(),s._nextUint64()),uncompressedByteLength:s._nextUint64()});const F=new o(_,O,n,!0),N={vendorId:F._skip(4)._nextUint16(),descriptorType:F._nextUint16(),versionNumber:F._nextUint16(),descriptorBlockSize:F._nextUint16(),colorModel:F._nextUint8(),colorPrimaries:F._nextUint8(),transferFunction:F._nextUint8(),flags:F._nextUint8(),texelBlockDimension:{x:F._nextUint8()+1,y:F._nextUint8()+1,z:F._nextUint8()+1,w:F._nextUint8()+1},bytesPlane:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],samples:[]},r=(N.descriptorBlockSize/4-6)/4;for(let _=0;_<r;_++)N.samples[_]={bitOffset:F._nextUint16(),bitLength:F._nextUint8(),channelID:F._nextUint8(),samplePosition:[F._nextUint8(),F._nextUint8(),F._nextUint8(),F._nextUint8()],sampleLower:F._nextUint32(),sampleUpper:F._nextUint32()};t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(N);const i=new o(_,B,M,!0);for(;i._offset<M;){const _=i._nextUint32(),R=i._scan(_),A=a(R),e=i._scan(_-R.byteLength);t.keyValue[A]=A.match(/^ktx/i)?a(e):e,i._offset%4&&i._skip(4-i._offset%4)}if(K<=0)return t;const S=new o(_,C,K,!0),U=S._nextUint16(),E=S._nextUint16(),L=S._nextUint32(),P=S._nextUint32(),c=S._nextUint32(),f=S._nextUint32(),I=[];for(let _=0;_<T;_++)I.push({imageFlags:S._nextUint32(),rgbSliceByteOffset:S._nextUint32(),rgbSliceByteLength:S._nextUint32(),alphaSliceByteOffset:S._nextUint32(),alphaSliceByteLength:S._nextUint32()});const l=C+S._offset,u=l+L,X=u+P,D=X+c,x=new Uint8Array(_.buffer,_.byteOffset+l,L),h=new Uint8Array(_.buffer,_.byteOffset+u,P),H=new Uint8Array(_.buffer,_.byteOffset+X,c),d=new Uint8Array(_.buffer,_.byteOffset+D,f);return t.globalData={endpointCount:U,selectorCount:E,imageDescs:I,endpointsData:x,selectorsData:h,tablesData:H,extendedData:d},t}(e)}catch(_){throw new R.RuntimeError("Invalid KTX2 file.")}if(0!==M.layerCount)throw new R.RuntimeError("KTX2 texture arrays are not supported.");if(0!==M.pixelDepth)throw new R.RuntimeError("KTX2 3D textures are unsupported.");const C=M.dataFormatDescriptor[0],K=new Array(M.levelCount);return 0!==M.vkFormat||163!==C.colorModel&&166!==C.colorModel?(A.push(e.buffer),function(R,t){const A=R.vkFormat===B.VK_FORMAT_R8G8B8_SRGB?n.RGB:n.RGBA;let e;R.vkFormat===B.VK_FORMAT_R8G8B8A8_UNORM?e=T.UNSIGNED_BYTE:R.vkFormat===B.VK_FORMAT_R16G16B16A16_SFLOAT?e=T.HALF_FLOAT:R.vkFormat===B.VK_FORMAT_R32G32B32A32_SFLOAT&&(e=T.FLOAT);for(let O=0;O<R.levels.length;++O){const B={};t[O]=B;const G=R.levels[O].levelData,M=R.pixelWidth>>O,C=R.pixelHeight>>O,K=M*C*n.componentsLength(A);for(let t=0;t<R.faceCount;++t){const O=G.byteOffset+K*R.typeSize*t;let n;n=_.defined(e)&&1!==T.sizeInBytes(e)?2===T.sizeInBytes(e)?new Uint16Array(G.buffer,O,K):new Float32Array(G.buffer,O,K):new Uint8Array(G.buffer,O,K),B[U[t]]={internalFormat:A,datatype:e,width:M,height:C,levelBuffer:n}}}}(M,K)):function(t,A,e,T,O,B){const G=new T.KTX2File(t);let M=G.getWidth(),C=G.getHeight();const K=G.getLevels(),s=G.getHasAlpha();if(!(M>0&&C>0&&K>0))throw G.close(),G.delete(),new R.RuntimeError("Invalid KTX2 file");let F,N;const r=A.dataFormatDescriptor[0],i=T.transcoder_texture_format;if(163===r.colorModel)if(e.etc)F=s?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=s?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!s)F=n.RGB_ETC1,N=i.cTFETC1_RGB;else if(e.s3tc)F=s?n.RGBA_DXT5:n.RGB_DXT1,N=s?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.pvrtc)F=s?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=s?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB;else if(e.astc)F=n.RGBA_ASTC,N=i.cTFASTC_4x4_RGBA;else{if(!e.bc7)throw new R.RuntimeError("No transcoding format target available for ETC1S compressed ktx2.");F=n.RGBA_BC7,N=i.cTFBC7_RGBA}else if(166===r.colorModel)if(e.astc)F=n.RGBA_ASTC,N=i.cTFASTC_4x4_RGBA;else if(e.bc7)F=n.RGBA_BC7,N=i.cTFBC7_RGBA;else if(e.s3tc)F=s?n.RGBA_DXT5:n.RGB_DXT1,N=s?i.cTFBC3_RGBA:i.cTFBC1_RGB;else if(e.etc)F=s?n.RGBA8_ETC2_EAC:n.RGB8_ETC2,N=s?i.cTFETC2_RGBA:i.cTFETC1_RGB;else if(e.etc1&&!s)F=n.RGB_ETC1,N=i.cTFETC1_RGB;else{if(!e.pvrtc)throw new R.RuntimeError("No transcoding format target available for UASTC compressed ktx2.");F=s?n.RGBA_PVRTC_4BPPV1:n.RGB_PVRTC_4BPPV1,N=s?i.cTFPVRTC1_4_RGBA:i.cTFPVRTC1_4_RGB}if(!G.startTranscoding())throw G.close(),G.delete(),new R.RuntimeError("startTranscoding() failed");for(let t=0;t<A.levels.length;++t){const e={};B[t]=e,M=A.pixelWidth>>t,C=A.pixelHeight>>t;const T=G.getImageTranscodedSizeInBytes(t,0,0,N.value),n=new Uint8Array(T),K=G.transcodeImage(n,t,0,0,N.value,0,-1,-1);if(!_.defined(K))throw new R.RuntimeError("transcodeImage() failed.");O.push(n.buffer),e[U[0]]={internalFormat:F,width:M,height:C,levelBuffer:n}}G.close(),G.delete()}(e,M,O,E,A,K),K}function P(_){E=_,E.initializeBasis(),self.onmessage=A(L),self.postMessage(!0)}return function(R){const t=R.data.webAssemblyConfig;if(_.defined(t))return require([t.modulePath],(function(R){if(!_.defined(t.wasmBinaryFile))return R().then((function(_){P(_)}));_.defined(R)||(R=self.MSC_TRANSCODER),R(t).then((function(_){P(_)}))}))}})); |
@@ -1,1 +0,26 @@ | ||
"undefined"==typeof self&&(self={}),self.onmessage=function(e){const s=e.data.array,a=self.webkitPostMessage||self.postMessage;try{a({array:s},[s.buffer])}catch(e){a({})}}; | ||
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.96 | ||
* | ||
* Copyright 2011-2022 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/main/LICENSE.md for full licensing details. | ||
*/ | ||
typeof self>"u"&&(self={}),self.onmessage=function(a){const e=a.data.array,s=self.webkitPostMessage||self.postMessage;try{s({array:e},[e.buffer])}catch{s({})}}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.95 | ||
* Version 1.96 | ||
* | ||
@@ -25,2 +25,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
*/ | ||
define(["./AttributeCompression-d9dabbfc","./Transforms-6c4dd71f","./Matrix2-6555478a","./defaultValue-ac2201bb","./TerrainEncoding-9f3d813c","./IndexDatatype-88be9f5a","./RuntimeError-d45af186","./ComponentDatatype-43ab226f","./OrientedBoundingBox-e7e81288","./createTaskProcessorWorker","./_commonjsHelpers-3aae1032-ac53d93e","./combine-0dce9b0f","./WebGLConstants-e12cdc8a","./EllipsoidTangentPlane-764a8df1","./AxisAlignedBoundingBox-b6ec0c56","./IntersectionTests-4db2368e","./Plane-a0b66c27"],(function(e,t,n,i,s,r,h,o,u,d,p,a,l,c,f,g,m){"use strict";const x={clipTriangleAtAxisAlignedThreshold:function(e,t,n,s,r,h){let o,u,d;i.defined(h)?h.length=0:h=[],t?(o=n<e,u=s<e,d=r<e):(o=n>e,u=s>e,d=r>e);const p=o+u+d;let a,l,c,f,g,m;return 1===p?o?(a=(e-n)/(s-n),l=(e-n)/(r-n),h.push(1),h.push(2),1!==l&&(h.push(-1),h.push(0),h.push(2),h.push(l)),1!==a&&(h.push(-1),h.push(0),h.push(1),h.push(a))):u?(c=(e-s)/(r-s),f=(e-s)/(n-s),h.push(2),h.push(0),1!==f&&(h.push(-1),h.push(1),h.push(0),h.push(f)),1!==c&&(h.push(-1),h.push(1),h.push(2),h.push(c))):d&&(g=(e-r)/(n-r),m=(e-r)/(s-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===p?o||n===e?u||s===e?d||r===e||(l=(e-n)/(r-n),c=(e-s)/(r-s),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(l),h.push(-1),h.push(1),h.push(2),h.push(c)):(m=(e-r)/(s-r),a=(e-n)/(s-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(a)):(f=(e-s)/(n-s),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(f),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==p&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,s,r,h,o,u,d,p){const a=s-u,l=u-h,c=o-d,f=r-d,g=1/(c*a+l*f),m=t-d,x=e-u,w=(c*x+l*m)*g,C=(-f*x+a*m)*g,B=1-w-C;return i.defined(p)?(p.x=w,p.y=C,p.z=B,p):new n.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,s,r,h,o,u,d,p){const a=(d-o)*(s-e)-(u-h)*(r-t);if(0===a)return;const l=((u-h)*(t-o)-(d-o)*(e-h))/a,c=((s-e)*(t-o)-(r-t)*(e-h))/a;return l>=0&&l<=1&&c>=0&&c<=1?(i.defined(p)||(p=new n.Cartesian2),p.x=e+l*(s-e),p.y=t+l*(r-t),p):void 0}},w=32767,C=16383,B=[],y=[],b=[],I=new n.Cartographic;let A=new n.Cartesian3;const v=[],T=[],z=[],V=[],M=[],N=new n.Cartesian3,E=new t.BoundingSphere,H=new u.OrientedBoundingBox,R=new n.Cartesian2,O=new n.Cartesian3;function S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}S.prototype.clone=function(e){return i.defined(e)||(e=new S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},S.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},S.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},S.prototype.isIndexed=function(){return i.defined(this.index)},S.prototype.getH=function(){return i.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},S.prototype.getU=function(){return i.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},S.prototype.getV=function(){return i.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let U=new n.Cartesian2,F=-1;const P=[new n.Cartesian3,new n.Cartesian3],D=[new n.Cartesian3,new n.Cartesian3];function W(t,i){++F;let s=P[F],r=D[F];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),A=n.Cartesian3.lerp(s,r,t.ratio,A),n.Cartesian3.normalize(A,A),e.AttributeCompression.octEncode(A,i),--F,i}S.prototype.getNormalX=function(){return i.defined(this.index)?this.normalBuffer[2*this.index]:(U=W(this,U),U.x)},S.prototype.getNormalY=function(){return i.defined(this.index)?this.normalBuffer[2*this.index+1]:(U=W(this,U),U.y)};const X=[];function k(e,t,n,s,r,h,o,u,d){if(0===o.length)return;let p=0,a=0;for(;a<o.length;)a=X[p++].initializeFromClipResult(o,a,u);for(let r=0;r<p;++r){const o=X[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,d&&(o.normalBuffer=s);else{const r=o.getKey();if(i.defined(h[r]))o.newIndex=h[r];else{const i=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),d&&(s.push(o.getNormalX()),s.push(o.getNormalY())),o.newIndex=i,h[r]=i}}}3===p?(r.push(X[0].newIndex),r.push(X[1].newIndex),r.push(X[2].newIndex)):4===p&&(r.push(X[0].newIndex),r.push(X[1].newIndex),r.push(X[2].newIndex),r.push(X[0].newIndex),r.push(X[2].newIndex),r.push(X[3].newIndex))}return X.push(new S),X.push(new S),X.push(new S),X.push(new S),d((function(e,i){const h=e.isEastChild,d=e.isNorthChild,p=h?C:0,a=h?w:C,l=d?C:0,c=d?w:C,f=v,g=T,m=z,U=M;f.length=0,g.length=0,m.length=0,U.length=0;const F=V;F.length=0;const P={},D=e.vertices;let W=e.indices;W=W.subarray(0,e.indexCountWithoutSkirts);const X=s.TerrainEncoding.clone(e.encoding),K=X.hasVertexNormals;let L=0;const Y=e.vertexCountWithoutSkirts,_=e.minimumHeight,j=e.maximumHeight,G=new Array(Y),J=new Array(Y),Z=new Array(Y),q=K?new Array(2*Y):void 0;let Q,$,ee,te,ne;for($=0,ee=0;$<Y;++$,ee+=2){const e=X.decodeTextureCoordinates(D,$,R);if(Q=X.decodeHeight(D,$),te=o.CesiumMath.clamp(e.x*w|0,0,w),ne=o.CesiumMath.clamp(e.y*w|0,0,w),Z[$]=o.CesiumMath.clamp((Q-_)/(j-_)*w|0,0,w),te<20&&(te=0),ne<20&&(ne=0),w-te<20&&(te=w),w-ne<20&&(ne=w),G[$]=te,J[$]=ne,K){const e=X.getOctEncodedNormal(D,$,O);q[ee]=e.x,q[ee+1]=e.y}(h&&te>=C||!h&&te<=C)&&(d&&ne>=C||!d&&ne<=C)&&(P[$]=L,f.push(te),g.push(ne),m.push(Z[$]),K&&(U.push(q[ee]),U.push(q[ee+1])),++L)}const ie=[];ie.push(new S),ie.push(new S),ie.push(new S);const se=[];let re,he;for(se.push(new S),se.push(new S),se.push(new S),$=0;$<W.length;$+=3){const e=W[$],t=W[$+1],n=W[$+2],i=G[e],s=G[t],r=G[n];ie[0].initializeIndexed(G,J,Z,q,e),ie[1].initializeIndexed(G,J,Z,q,t),ie[2].initializeIndexed(G,J,Z,q,n);const o=x.clipTriangleAtAxisAlignedThreshold(C,h,i,s,r,B);re=0,re>=o.length||(re=se[0].initializeFromClipResult(o,re,ie),re>=o.length||(re=se[1].initializeFromClipResult(o,re,ie),re>=o.length||(re=se[2].initializeFromClipResult(o,re,ie),he=x.clipTriangleAtAxisAlignedThreshold(C,d,se[0].getV(),se[1].getV(),se[2].getV(),y),k(f,g,m,U,F,P,he,se,K),re<o.length&&(se[2].clone(se[1]),se[2].initializeFromClipResult(o,re,ie),he=x.clipTriangleAtAxisAlignedThreshold(C,d,se[0].getV(),se[1].getV(),se[2].getV(),y),k(f,g,m,U,F,P,he,se,K)))))}const oe=h?-32767:0,ue=d?-32767:0,de=[],pe=[],ae=[],le=[];let ce=Number.MAX_VALUE,fe=-ce;const ge=b;ge.length=0;const me=n.Ellipsoid.clone(e.ellipsoid),xe=n.Rectangle.clone(e.childRectangle),we=xe.north,Ce=xe.south;let Be=xe.east;const ye=xe.west;for(Be<ye&&(Be+=o.CesiumMath.TWO_PI),$=0;$<f.length;++$)te=Math.round(f[$]),te<=p?(de.push($),te=0):te>=a?(ae.push($),te=w):te=2*te+oe,f[$]=te,ne=Math.round(g[$]),ne<=l?(pe.push($),ne=0):ne>=c?(le.push($),ne=w):ne=2*ne+ue,g[$]=ne,Q=o.CesiumMath.lerp(_,j,m[$]/w),Q<ce&&(ce=Q),Q>fe&&(fe=Q),m[$]=Q,I.longitude=o.CesiumMath.lerp(ye,Be,te/w),I.latitude=o.CesiumMath.lerp(Ce,we,ne/w),I.height=Q,me.cartographicToCartesian(I,A),ge.push(A.x),ge.push(A.y),ge.push(A.z);const be=t.BoundingSphere.fromVertices(ge,n.Cartesian3.ZERO,3,E),Ie=u.OrientedBoundingBox.fromRectangle(xe,ce,fe,me,H),Ae=new s.EllipsoidalOccluder(me).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(be.center,ge,3,be.center,ce,N),ve=fe-ce,Te=new Uint16Array(f.length+g.length+m.length);for($=0;$<f.length;++$)Te[$]=f[$];let ze=f.length;for($=0;$<g.length;++$)Te[ze+$]=g[$];for(ze+=g.length,$=0;$<m.length;++$)Te[ze+$]=w*(m[$]-ce)/ve;const Ve=r.IndexDatatype.createTypedArray(f.length,F);let Me;if(K){const e=new Uint8Array(U);i.push(Te.buffer,Ve.buffer,e.buffer),Me=e.buffer}else i.push(Te.buffer,Ve.buffer);return{vertices:Te.buffer,encodedNormals:Me,indices:Ve.buffer,minimumHeight:ce,maximumHeight:fe,westIndices:de,southIndices:pe,eastIndices:ae,northIndices:le,boundingSphere:be,orientedBoundingBox:Ie,horizonOcclusionPoint:Ae}}))})); | ||
define(["./AttributeCompression-f967afc2","./Transforms-b683baff","./Matrix2-735f0ea9","./defaultValue-6ed27e8d","./TerrainEncoding-d51253d2","./IndexDatatype-d42fd89c","./RuntimeError-17a7ed3d","./ComponentDatatype-6ff7d2c3","./OrientedBoundingBox-771a41b6","./createTaskProcessorWorker","./_commonjsHelpers-c27c962c","./combine-c04aaa26","./WebGLConstants-d878ea52","./EllipsoidTangentPlane-12fe3e10","./AxisAlignedBoundingBox-b14143c9","./IntersectionTests-1cdbb657","./Plane-6c77dfaf"],(function(e,t,n,i,s,r,h,o,u,d,p,l,a,f,c,g,m){"use strict";const x={clipTriangleAtAxisAlignedThreshold:function(e,t,n,s,r,h){let o,u,d;i.defined(h)?h.length=0:h=[],t?(o=n<e,u=s<e,d=r<e):(o=n>e,u=s>e,d=r>e);const p=o+u+d;let l,a,f,c,g,m;return 1===p?o?(l=(e-n)/(s-n),a=(e-n)/(r-n),h.push(1),h.push(2),1!==a&&(h.push(-1),h.push(0),h.push(2),h.push(a)),1!==l&&(h.push(-1),h.push(0),h.push(1),h.push(l))):u?(f=(e-s)/(r-s),c=(e-s)/(n-s),h.push(2),h.push(0),1!==c&&(h.push(-1),h.push(1),h.push(0),h.push(c)),1!==f&&(h.push(-1),h.push(1),h.push(2),h.push(f))):d&&(g=(e-r)/(n-r),m=(e-r)/(s-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===p?o||n===e?u||s===e?d||r===e||(a=(e-n)/(r-n),f=(e-s)/(r-s),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(a),h.push(-1),h.push(1),h.push(2),h.push(f)):(m=(e-r)/(s-r),l=(e-n)/(s-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(l)):(c=(e-s)/(n-s),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(c),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==p&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,s,r,h,o,u,d,p){const l=s-u,a=u-h,f=o-d,c=r-d,g=1/(f*l+a*c),m=t-d,x=e-u,w=(f*x+a*m)*g,C=(-c*x+l*m)*g,B=1-w-C;return i.defined(p)?(p.x=w,p.y=C,p.z=B,p):new n.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,s,r,h,o,u,d,p){const l=(d-o)*(s-e)-(u-h)*(r-t);if(0===l)return;const a=((u-h)*(t-o)-(d-o)*(e-h))/l,f=((s-e)*(t-o)-(r-t)*(e-h))/l;return a>=0&&a<=1&&f>=0&&f<=1?(i.defined(p)||(p=new n.Cartesian2),p.x=e+a*(s-e),p.y=t+a*(r-t),p):void 0}},w=32767,C=16383,B=[],y=[],I=[],A=new n.Cartographic;let b=new n.Cartesian3;const v=[],T=[],z=[],V=[],M=[],N=new n.Cartesian3,E=new t.BoundingSphere,H=new u.OrientedBoundingBox,R=new n.Cartesian2,O=new n.Cartesian3;function S(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}S.prototype.clone=function(e){return i.defined(e)||(e=new S),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},S.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},S.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},S.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},S.prototype.isIndexed=function(){return i.defined(this.index)},S.prototype.getH=function(){return i.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},S.prototype.getU=function(){return i.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},S.prototype.getV=function(){return i.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let U=new n.Cartesian2,F=-1;const P=[new n.Cartesian3,new n.Cartesian3],D=[new n.Cartesian3,new n.Cartesian3];function W(t,i){++F;let s=P[F],r=D[F];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),b=n.Cartesian3.lerp(s,r,t.ratio,b),n.Cartesian3.normalize(b,b),e.AttributeCompression.octEncode(b,i),--F,i}S.prototype.getNormalX=function(){return i.defined(this.index)?this.normalBuffer[2*this.index]:(U=W(this,U),U.x)},S.prototype.getNormalY=function(){return i.defined(this.index)?this.normalBuffer[2*this.index+1]:(U=W(this,U),U.y)};const X=[];function k(e,t,n,s,r,h,o,u,d){if(0===o.length)return;let p=0,l=0;for(;l<o.length;)l=X[p++].initializeFromClipResult(o,l,u);for(let r=0;r<p;++r){const o=X[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,d&&(o.normalBuffer=s);else{const r=o.getKey();if(i.defined(h[r]))o.newIndex=h[r];else{const i=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),d&&(s.push(o.getNormalX()),s.push(o.getNormalY())),o.newIndex=i,h[r]=i}}}3===p?(r.push(X[0].newIndex),r.push(X[1].newIndex),r.push(X[2].newIndex)):4===p&&(r.push(X[0].newIndex),r.push(X[1].newIndex),r.push(X[2].newIndex),r.push(X[0].newIndex),r.push(X[2].newIndex),r.push(X[3].newIndex))}return X.push(new S),X.push(new S),X.push(new S),X.push(new S),d((function(e,i){const h=e.isEastChild,d=e.isNorthChild,p=h?C:0,l=h?w:C,a=d?C:0,f=d?w:C,c=v,g=T,m=z,U=M;c.length=0,g.length=0,m.length=0,U.length=0;const F=V;F.length=0;const P={},D=e.vertices;let W=e.indices;W=W.subarray(0,e.indexCountWithoutSkirts);const X=s.TerrainEncoding.clone(e.encoding),K=X.hasVertexNormals;let L=0;const Y=e.vertexCountWithoutSkirts,_=e.minimumHeight,j=e.maximumHeight,G=new Array(Y),J=new Array(Y),Z=new Array(Y),q=K?new Array(2*Y):void 0;let Q,$,ee,te,ne;for($=0,ee=0;$<Y;++$,ee+=2){const e=X.decodeTextureCoordinates(D,$,R);if(Q=X.decodeHeight(D,$),te=o.CesiumMath.clamp(e.x*w|0,0,w),ne=o.CesiumMath.clamp(e.y*w|0,0,w),Z[$]=o.CesiumMath.clamp((Q-_)/(j-_)*w|0,0,w),te<20&&(te=0),ne<20&&(ne=0),w-te<20&&(te=w),w-ne<20&&(ne=w),G[$]=te,J[$]=ne,K){const e=X.getOctEncodedNormal(D,$,O);q[ee]=e.x,q[ee+1]=e.y}(h&&te>=C||!h&&te<=C)&&(d&&ne>=C||!d&&ne<=C)&&(P[$]=L,c.push(te),g.push(ne),m.push(Z[$]),K&&(U.push(q[ee]),U.push(q[ee+1])),++L)}const ie=[];ie.push(new S),ie.push(new S),ie.push(new S);const se=[];let re,he;for(se.push(new S),se.push(new S),se.push(new S),$=0;$<W.length;$+=3){const e=W[$],t=W[$+1],n=W[$+2],i=G[e],s=G[t],r=G[n];ie[0].initializeIndexed(G,J,Z,q,e),ie[1].initializeIndexed(G,J,Z,q,t),ie[2].initializeIndexed(G,J,Z,q,n);const o=x.clipTriangleAtAxisAlignedThreshold(C,h,i,s,r,B);re=0,re>=o.length||(re=se[0].initializeFromClipResult(o,re,ie),re>=o.length||(re=se[1].initializeFromClipResult(o,re,ie),re>=o.length||(re=se[2].initializeFromClipResult(o,re,ie),he=x.clipTriangleAtAxisAlignedThreshold(C,d,se[0].getV(),se[1].getV(),se[2].getV(),y),k(c,g,m,U,F,P,he,se,K),re<o.length&&(se[2].clone(se[1]),se[2].initializeFromClipResult(o,re,ie),he=x.clipTriangleAtAxisAlignedThreshold(C,d,se[0].getV(),se[1].getV(),se[2].getV(),y),k(c,g,m,U,F,P,he,se,K)))))}const oe=h?-32767:0,ue=d?-32767:0,de=[],pe=[],le=[],ae=[];let fe=Number.MAX_VALUE,ce=-fe;const ge=I;ge.length=0;const me=n.Ellipsoid.clone(e.ellipsoid),xe=n.Rectangle.clone(e.childRectangle),we=xe.north,Ce=xe.south;let Be=xe.east;const ye=xe.west;for(Be<ye&&(Be+=o.CesiumMath.TWO_PI),$=0;$<c.length;++$)te=Math.round(c[$]),te<=p?(de.push($),te=0):te>=l?(le.push($),te=w):te=2*te+oe,c[$]=te,ne=Math.round(g[$]),ne<=a?(pe.push($),ne=0):ne>=f?(ae.push($),ne=w):ne=2*ne+ue,g[$]=ne,Q=o.CesiumMath.lerp(_,j,m[$]/w),Q<fe&&(fe=Q),Q>ce&&(ce=Q),m[$]=Q,A.longitude=o.CesiumMath.lerp(ye,Be,te/w),A.latitude=o.CesiumMath.lerp(Ce,we,ne/w),A.height=Q,me.cartographicToCartesian(A,b),ge.push(b.x),ge.push(b.y),ge.push(b.z);const Ie=t.BoundingSphere.fromVertices(ge,n.Cartesian3.ZERO,3,E),Ae=u.OrientedBoundingBox.fromRectangle(xe,fe,ce,me,H),be=new s.EllipsoidalOccluder(me).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Ie.center,ge,3,Ie.center,fe,N),ve=ce-fe,Te=new Uint16Array(c.length+g.length+m.length);for($=0;$<c.length;++$)Te[$]=c[$];let ze=c.length;for($=0;$<g.length;++$)Te[ze+$]=g[$];for(ze+=g.length,$=0;$<m.length;++$)Te[ze+$]=w*(m[$]-fe)/ve;const Ve=r.IndexDatatype.createTypedArray(c.length,F);let Me;if(K){const e=new Uint8Array(U);i.push(Te.buffer,Ve.buffer,e.buffer),Me=e.buffer}else i.push(Te.buffer,Ve.buffer);return{vertices:Te.buffer,encodedNormals:Me,indices:Ve.buffer,minimumHeight:fe,maximumHeight:ce,westIndices:de,southIndices:pe,eastIndices:le,northIndices:ae,boundingSphere:Ie,orientedBoundingBox:Ae,horizonOcclusionPoint:be}}))})); |
{ | ||
"name": "mars3d-cesium", | ||
"version": "1.95.1", | ||
"version": "1.96.0", | ||
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.", | ||
@@ -39,23 +39,43 @@ "homepage": "http://mars3d.cn/", | ||
"type": "module", | ||
"dependencies": { | ||
"@zip.js/zip.js": "^2.3.12", | ||
"autolinker": "^3.14.3", | ||
"bitmap-sdf": "^1.0.3", | ||
"dompurify": "^2.2.2", | ||
"earcut": "^2.2.4", | ||
"grapheme-splitter": "^1.0.4", | ||
"jsep": "^0.3.1", | ||
"kdbush": "^3.0.0", | ||
"ktx-parse": "^0.2.1", | ||
"lerc": "^2.0.0", | ||
"mersenne-twister": "^1.1.0", | ||
"meshoptimizer": "^0.16.1", | ||
"nosleep.js": "^0.9.0", | ||
"pako": "^1.0.4", | ||
"protobufjs": "7.0.0", | ||
"rbush": "^3.0.1", | ||
"topojson-client": "^3.1.0", | ||
"tween.js": "^16.6.0", | ||
"urijs": "^1.19.7" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"@zip.js/zip.js": "^2.3.12", | ||
"autolinker": "^3.14.3", | ||
"aws-sdk": "^2.932.0", | ||
"bitmap-sdf": "^1.0.3", | ||
"bluebird": "^3.7.2", | ||
"chokidar": "^3.5.3", | ||
"cloc": "^2.8.0", | ||
"compression": "^1.7.4", | ||
"dompurify": "^2.2.2", | ||
"draco3d": "^1.5.1", | ||
"earcut": "^2.2.2", | ||
"eslint": "^7.29.0", | ||
"esbuild": "^0.14.38", | ||
"eslint": "^8.19.0", | ||
"eslint-config-cesium": "^9.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-es": "^4.1.0", | ||
"eslint-plugin-html": "^6.1.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"express": "^4.17.1", | ||
"fs-extra": "^10.1.0", | ||
"globby": "^11.0.4", | ||
"glsl-strip-comments": "^1.0.0", | ||
"grapheme-splitter": "^1.0.4", | ||
"gulp": "^4.0.2", | ||
@@ -67,11 +87,10 @@ "gulp-clean-css": "^4.3.0", | ||
"gulp-tap": "^2.0.0", | ||
"gulp-terser": "^2.0.1", | ||
"gulp-zip": "^5.1.0", | ||
"husky": "^7.0.2", | ||
"istanbul-lib-instrument": "^5.2.0", | ||
"jasmine-core": "^4.0.1", | ||
"jsdoc": "^3.6.7", | ||
"jsep": "^0.3.1", | ||
"karma": "^6.3.20", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.3", | ||
"karma-coverage-istanbul-instrumenter": "^1.0.3", | ||
"karma-detect-browsers": "^2.3.3", | ||
@@ -84,37 +103,25 @@ "karma-edge-launcher": "^0.4.2", | ||
"karma-safari-launcher": "^1.0.0", | ||
"karma-sourcemap-loader": "^0.3.8", | ||
"karma-spec-reporter": "^0.0.32", | ||
"kdbush": "^3.0.0", | ||
"ktx-parse": "^0.2.1", | ||
"lerc": "^2.0.0", | ||
"markdownlint-cli": "^0.31.1", | ||
"merge-stream": "^2.0.0", | ||
"mersenne-twister": "^1.1.0", | ||
"meshoptimizer": "^0.16.1", | ||
"mime": "^2.5.2", | ||
"mkdirp": "^1.0.4", | ||
"nosleep.js": "^0.9.0", | ||
"open": "^8.2.1", | ||
"pako": "^1.0.4", | ||
"prettier": "2.1.2", | ||
"prismjs": "^1.28.0", | ||
"protobufjs": "6.7.0", | ||
"rbush": "^3.0.1", | ||
"request": "^2.79.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.52.2", | ||
"rollup-plugin-external-globals": "^0.6.1", | ||
"rollup-plugin-strip-pragma": "^1.0.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"stream-to-promise": "^3.0.0", | ||
"topojson-client": "^3.1.0", | ||
"tsd-jsdoc": "^2.5.0", | ||
"tween.js": "^16.6.0", | ||
"typescript": "^4.3.4", | ||
"urijs": "^1.19.7", | ||
"yargs": "^17.0.1" | ||
}, | ||
"scripts": { | ||
"convertToModules": "gulp convertToModules", | ||
"prepare": "gulp prepare && husky install", | ||
"start": "node server.cjs", | ||
"startPublic": "node server.cjs --public", | ||
"start-public": "node server.cjs --public", | ||
"build": "gulp build", | ||
@@ -124,17 +131,12 @@ "build-watch": "gulp build-watch", | ||
"build-third-party": "gulp build-third-party", | ||
"buildApps": "gulp buildApps", | ||
"build-apps": "gulp build-apps", | ||
"clean": "gulp clean", | ||
"cloc": "gulp cloc", | ||
"combine": "gulp combine", | ||
"combineRelease": "gulp combineRelease", | ||
"coverage": "gulp coverage", | ||
"generateDocumentation": "gulp generateDocumentation", | ||
"generateDocumentation-watch": "gulp generateDocumentation-watch", | ||
"build-docs": "gulp build-docs", | ||
"build-docs-watch": "gulp build-docs-watch", | ||
"eslint": "eslint \"./**/*.js\" \"./**/*.cjs\" \"./**/*.html\" --cache --quiet", | ||
"makeZipFile": "gulp makeZipFile", | ||
"make-zip": "gulp make-zip", | ||
"markdownlint": "markdownlint \"*.md\" \"Documentation/**/*.md\" --ignore CHANGES.md --ignore README.md --ignore LICENSE.md", | ||
"minify": "gulp minify", | ||
"minifyRelease": "gulp minifyRelease", | ||
"release": "gulp release", | ||
"build-specs": "gulp build-specs", | ||
"test": "gulp test", | ||
@@ -153,8 +155,20 @@ "test-all": "gulp test --all", | ||
"build-all": "npm run release && gulp build && npm run copy", | ||
"build-src": "gulp combineRelease && npm run copy", | ||
"build-min": "gulp minifyRelease && npm run copy", | ||
"build-all": "npm run clean-cache &&npm run release && npm run copy", | ||
"clean-cache": "rimraf Build/Cesium && rimraf Build/CesiumUnminified", | ||
"copy": "node 说明/copy-sdk.cjs --trace-warnings", | ||
"push": "npm publish --registry=https://registry.npmjs.org" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
"lint-staged": { | ||
"*.{js,cjs,html}": [ | ||
"eslint --cache --quiet", | ||
"prettier --write" | ||
], | ||
"*.md": [ | ||
"markdownlint --ignore CHANGES.md --ignore README.md --ignore LICENSE.md", | ||
"prettier --write" | ||
] | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
19793149
58
119129
9
14
14
19
391
+ Added@zip.js/zip.js@^2.3.12
+ Addedautolinker@^3.14.3
+ Addedbitmap-sdf@^1.0.3
+ Addeddompurify@^2.2.2
+ Addedearcut@^2.2.4
+ Addedgrapheme-splitter@^1.0.4
+ Addedjsep@^0.3.1
+ Addedkdbush@^3.0.0
+ Addedktx-parse@^0.2.1
+ Addedlerc@^2.0.0
+ Addedmersenne-twister@^1.1.0
+ Addedmeshoptimizer@^0.16.1
+ Addednosleep.js@^0.9.0
+ Addedpako@^1.0.4
+ Addedprotobufjs@7.0.0
+ Addedrbush@^3.0.1
+ Addedtopojson-client@^3.1.0
+ Addedtween.js@^16.6.0
+ Addedurijs@^1.19.7
+ Added@protobufjs/aspromise@1.1.2(transitive)
+ Added@protobufjs/base64@1.1.2(transitive)
+ Added@protobufjs/codegen@2.0.4(transitive)
+ Added@protobufjs/eventemitter@1.1.0(transitive)
+ Added@protobufjs/fetch@1.1.0(transitive)
+ Added@protobufjs/float@1.0.2(transitive)
+ Added@protobufjs/inquire@1.1.0(transitive)
+ Added@protobufjs/path@1.1.2(transitive)
+ Added@protobufjs/pool@1.1.0(transitive)
+ Added@protobufjs/utf8@1.1.0(transitive)
+ Added@types/long@4.0.2(transitive)
+ Added@types/node@22.10.1(transitive)
+ Added@zip.js/zip.js@2.7.53(transitive)
+ Addedautolinker@3.16.2(transitive)
+ Addedbitmap-sdf@1.0.4(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addeddompurify@2.5.7(transitive)
+ Addedearcut@2.2.4(transitive)
+ Addedgrapheme-splitter@1.0.4(transitive)
+ Addedjsep@0.3.5(transitive)
+ Addedkdbush@3.0.0(transitive)
+ Addedktx-parse@0.2.2(transitive)
+ Addedlerc@2.0.0(transitive)
+ Addedlong@5.2.3(transitive)
+ Addedmersenne-twister@1.1.0(transitive)
+ Addedmeshoptimizer@0.16.1(transitive)
+ Addednosleep.js@0.9.0(transitive)
+ Addedpako@1.0.11(transitive)
+ Addedprotobufjs@7.0.0(transitive)
+ Addedquickselect@2.0.0(transitive)
+ Addedrbush@3.0.1(transitive)
+ Addedtopojson-client@3.1.0(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtween.js@16.6.0(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedurijs@1.19.11(transitive)