FeiXianKuangChanJianGuan/packages/mars3d/plugins/tdt/mars3d-tdt.js

13 lines
191 KiB
JavaScript
Raw Normal View History

2026-03-04 08:50:42 +08:00
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mars3d")):"function"==typeof define&&define.amd?define(["exports","mars3d"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["mars3d-tdt"]={},e.mars3d)}(this,(function(e,t){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,t}var i=r(t);const n=i.Cesium;n.when||(n.when=n.when||{},n.when.defer=n.defer),n.defaultValue||(n.defaultValue=function(e,t){return e??t}),function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=242)}([function(e,t,r){var i=r(175),n=r(6);function o(t){return e.exports=o="function"==typeof n&&"symbol"==typeof i?function(e){return typeof e}:function(e){return e&&"function"==typeof n&&e.constructor===n&&e!==n.prototype?"symbol":typeof e},o(t)}e.exports=o},function(e,t,r){e.exports=r(172)},function(e,t,r){e.exports=r(169)},function(e,t,r){e.exports=r(160)},function(e,t,r){var i=r(50)("wks"),n=r(28),o=r(10).Symbol,s="function"==typeof o;(e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:n)("Symbol."+e))}).store=i},function(e,t){},function(e,t,r){},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){e.exports=r(167)},function(e,t,r){e.exports=r(154)},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){},function(e,t,r){var i=r(7),n=r(5),o=r(59),s=r(32),a=r(31),f=function(e,t,r){var u,h,l,c=e&f.F,d=e&f.G,p=e&f.S,x=e&f.P,g=e&f.B,v=e&f.W,y=d?n:n[t]||(n[t]={}),b=y.prototype,m=d?i:p?i[t]:(i[t]||{}).prototype;for(u in d&&(r=t),r)(h=!c&&m&&void 0!==m[u])&&a(y,u)||(l=h?m[u]:r[u],y[u]=d&&"function"!=typeof m[u]?r[u]:g&&h?o(l,i):v&&m[u]===l?function(e){var t=function(t,r,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):x&&"function"==typeof l?o(Function.call,l):l,x&&((y.virtual||(y.virtual={}))[u]=l,e&f.R&&b&&!b[u]&&s(b,u,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,e.exports=f},function(e,t,r){var i=r(17),n=r(98),o=r(44),s=Object.defineProperty;t.f=r(11)?Object.defineProperty:function(e,t,r){if(i(e),t=o(t,!0),i(r),n)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var i=r(75)("wks"),n=r(58),o=r(7).Symbol,s="function"==typeof o;(e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:n)("Symbol."+e))}).store=i},function(e,t,r){e.exports=r(147)},function(e,t,r){e.exports=r(164)},function(e,t,r){var i=r(21);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var i=r(29),n
/**
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/bytebuffer.js for details
*/;n=[r(191)],void 0===(o="function"==typeof(i=function(e){var t=function(e,r,n){if(void 0===e&&(e=t.DEFAULT_CAPACITY),void 0===r&&(r=t.DEFAULT_ENDIAN),void 0===n&&(n=t.DEFAULT_NOASSERT),!n){if((e|=0)<0)throw RangeError("Illegal capacity");r=!!r,n=!!n}this.buffer=0===e?i:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=r,this.noAssert=n};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=e||null;var r=t.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var i=new ArrayBuffer(0),n=String.fromCharCode;function o(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function s(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+n.apply(String,e);e.length+arguments.length>1024&&(t.push(n.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function a(e,t,r,i,n){var o,s,a=8*n-i-1,f=(1<<a)-1,u=f>>1,h=-7,l=r?n-1:0,c=r?-1:1,d=e[t+l];for(l+=c,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=c,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+e[t+l],l+=c,h-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=u}return(d?-1:1)*s*Math.pow(2,o-i)}function f(e,t,r,i,n,o){var s,a,f,u=8*o-n-1,h=(1<<u)-1,l=h>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,x=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),(t+=s+l>=1?c/f:c*Math.pow(2,1-l))*f>=2&&(s++,f/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*f-1)*Math.pow(2,n),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;e[r+d]=255&a,d+=p,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+d]=255&s,d+=p,s/=256,u-=8);e[r+d-p]|=128*x}t.accessor=function(){return Uint8Array},t.allocate=function(e,r,i){return new t(e,r,i)},t.concat=function(e,r,i,n){"boolean"!=typeof r&&"string"==typeof r||(n=i,i=r,r=void 0);for(var o,s=0,a=0,f=e.length;a<f;++a)t.isByteBuffer(e[a])||(e[a]=t.wrap(e[a],r)),(o=e[a].limit-e[a].offset)>0&&(s+=o);if(0===s)return new t(0,i,n);var u,h=new t(s,i,n);for(a=0;a<f;)(o=(u=e[a++]).limit-u.offset)<=0||(h.view.set(u.view.subarray(u.offset,u.limit),h.offset),h.offset+=o);return h.limit=h.offset,h.offset=0,h},t.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},t.type=function(){return ArrayBuffer},t.wrap=function(e,i,n,o){if("string"!=typeof i&&(o=n,n=i,i=void 0),"string"==typeof e)switch(void 0===i&&(i="utf8"),i){case"base64":return t.fromBase64(e,n);case"hex":return t.fromHex(e,n);case"binary":return t.fromBinary(e,n);case"utf8":return t.fromUTF8(e,n);case"debug":return t.fromDebug(e,n);default:throw Error("Unsupported encoding: "+i)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var s;if(t.isByteBuffer(e))return(s=r.clone.call(e)).markedOffset=-1,s;if(e instanceof Uint8Array)s=new t(0,n,o),e.length>0&&(s.buffer=e.buffer,s.offset=e.byteOffset,s.limit=e.byteOffset+e.byteLength,s.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)s=new t(0,n,o),e.byteLength>0&&(s.buffer=e,s.offset=0,s.limit=e.byteLength,s.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(s=new t(e.length,n,o)).limit=e.length;for(var a=0;a<e.length;++a)s.view[a]=e[a]}return s},r.writeBitSet=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,n=t,o=e.length,s=o>>3,a=0;for(t+=this.writeVarint32(o,t);s--;)i=1&!!e[a++]|(1&!!e[a++])<<1|(1&!!e[a++])<<2|(1&!!e[a++])<<3|(1&!!e[a++])<<4|(1&!!e[a++])<<5|(1&!!e[a++])<<6|(1&!!e[a++])<<7,this.writeByte(i,t++);if(a<o){var f=0;for(i=0;a<o;)i|=(1&!
/**
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/long.js for details
*/;void 0===(n="function"==typeof(i=function(){function e(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var r={},i={};function n(e,t){var n,o,a;return t?(a=0<=(e>>>=0)&&e<256)&&(o=i[e])?o:(n=s(e,(0|e)<0?-1:0,!0),a&&(i[e]=n),n):(a=-128<=(e|=0)&&e<128)&&(o=r[e])?o:(n=s(e,e<0?-1:0,!1),a&&(r[e]=n),n)}function o(e,t){if(isNaN(e)||!isFinite(e))return t?x:p;if(t){if(e<0)return x;if(e>=l)return m}else{if(e<=-c)return w;if(e+1>=c)return b}return e<0?o(-e,t).neg():s(e%h|0,e/h|0,t)}function s(t,r,i){return new e(t,r,i)}e.fromInt=n,e.fromNumber=o,e.fromBits=s;var a=Math.pow;function f(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return p;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return f(e.substring(1),t,r).neg();for(var n=o(a(r,8)),s=p,u=0;u<e.length;u+=8){var h=Math.min(8,e.length-u),l=parseInt(e.substring(u,u+h),r);if(h<8){var c=o(a(r,h));s=s.mul(c).add(o(l))}else s=(s=s.mul(n)).add(o(l))}return s.unsigned=t,s}function u(t){return t instanceof e?t:"number"==typeof t?o(t):"string"==typeof t?f(t):s(t.low,t.high,t.unsigned)}e.fromString=f,e.fromValue=u;var h=4294967296,l=h*h,c=l/2,d=n(1<<24),p=n(0);e.ZERO=p;var x=n(0,!0);e.UZERO=x;var g=n(1);e.ONE=g;var v=n(1,!0);e.UONE=v;var y=n(-1);e.NEG_ONE=y;var b=s(-1,2147483647,!1);e.MAX_VALUE=b;var m=s(-1,-1,!0);e.MAX_UNSIGNED_VALUE=m;var w=s(0,-2147483648,!1);e.MIN_VALUE=w;var E=e.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var t=o(e),r=this.div(t),i=r.mul(t).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=o(a(e,6),this.unsigned),s=this,f="";;){var u=s.div(n),h=(s.sub(u.mul(n)).toInt()>>>0).toString(e);if((s=u).isZero())return h+f;for(;h.length<6;)h="0"+h;f=""+h+f}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!==this.high?t+33:t+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(e){return t(e)||(e=u(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(e){if(t(e)||(e=u(e)),this.eq(e))return 0;var r=this.isNegative(),i=e.isNegative();return r&&!i?-1:!r&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(g)},E.neg=E.negate,E.add=function(e){t(e)||(e=u(e));var r=this.high>>>16,i=65535&this.high,n=this.low>>>16,o=65535&this.low,a=e.high>>>16,f=65535&e.high,h=e.low>>>16,l=0,c=0,d=0,p=0;return d+=(p+=o+(65535&e.low))>>>16,c+=(d+=n+h)>>>16,l+=(c+=i+f)>>>16,l+=r+a,s((d&=65535)<<16|(p&=65535),(l&=65535)<<16|(