UNPKG

@minemap3d/minemap

Version:

基于webgl的三维渲染球体地图引擎,支持矢量mvt数据的渲染,支持三维渲染、交互、空间分析以及二三维的标绘

8 lines 5.73 MB
/** * minemap-3d-engine * version: v4.17.7 * submission time: * build time: 2025-08-20 17:05:25 * branch: feature/esm-build * SHA: dcab67d228860086cb574702a1e17a8afd068415 */ const workerUrl = "!function(){\"use strict\";function e(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function t(e){return t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},t(e)}function n(e){var n=function(e){if(\"object\"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,\"string\");if(\"object\"!=t(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==t(n)?n:n+\"\"}function i(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function a(e){if(Array.isArray(e))return e}function o(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function l(e,t){if(e){if(\"string\"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function u(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function c(e){return a(e)||o(e)||l(e)||u()}function h(e,t){return a(e)||function(e,t){var n=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=n){var i,r,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw r}}return s}}(e,t)||l(e,t)||u()}var d=f;function f(e,t,n,i){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=n,this.p2y=i}f.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},f.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},f.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},f.prototype.solveCurveX=function(e,t){var n,i,r,a,o;for(void 0===t&&(t=1e-6),r=e,o=0;o<8;o++){if(a=this.sampleCurveX(r)-e,Math.abs(a)<t)return r;var s=this.sampleCurveDerivativeX(r);if(Math.abs(s)<1e-6)break;r-=a/s}if((r=e)<(n=0))return n;if(r>(i=1))return i;for(;n<i;){if(a=this.sampleCurveX(r),Math.abs(a-e)<t)return r;e>a?n=r:i=r,r=.5*(i-n)+n}return r},f.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var p=function(){function t(n,i,r){e(this,t),this.column=n,this.row=i,this.zoom=r}return r(t,[{key:\"clone\",value:function(){return new t(this.column,this.row,this.zoom)}},{key:\"zoomTo\",value:function(e){return this.clone()._zoomTo(e)}},{key:\"sub\",value:function(e){return this.clone()._sub(e)}},{key:\"_zoomTo\",value:function(e){var t=Math.pow(2,e-this.zoom);return this.column*=t,this.row*=t,this.zoom=e,this}},{key:\"_sub\",value:function(e){return e=e.zoomTo(this.zoom),this.column-=e.column,this.row-=e.row,this}}])}(),_=m;function m(e,t,n){this.x=e,this.y=t,this.z=n||0}function v(e,t,n){void 0===n&&(n={});var i={type:\"Feature\"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=t||{},i.geometry=e,i}function g(e,t,n){if(void 0===n&&(n={}),!e)throw new Error(\"coordinates is required\");if(!Array.isArray(e))throw new Error(\"coordinates must be an Array\");if(e.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!w(e[0])||!w(e[1]))throw new Error(\"coordinates must contain numbers\");return v({type:\"Point\",coordinates:e},t,n)}function y(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error(\"coordinates must be an array of two or more positions\");return v({type:\"LineString\",coordinates:e},t,n)}function x(e,t){void 0===t&&(t={});var n={type:\"FeatureCollection\"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function w(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function S(e){if(Array.isArray(e))return e;if(\"Feature\"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\")}function T(e,t){if(\"Feature\"===e.type)t(e,0);else if(\"FeatureCollection\"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}m.prototype={clone:function(){return new m(this.x,this.y,this.z)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),i=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),i=Math.sin(e),r=t.y+i*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-i*(this.y-t.y),this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(e){return e instanceof m?e:Array.isArray(e)?new m(e[0],e[1],e[2]):e};var E=function(e,t){if(!e)throw new Error(\"No coordinates passed\");return{type:\"Feature\",geometry:{type:\"LineString\",coordinates:e},properties:t||{}}},b=function(e,t){if(null===e)throw new Error(\"No coordinates passed\");for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i[i.length-1].length;r++){if(i.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");if(i[i.length-1][r]!==i[0][r])throw new Error(\"First and last Position are not equivalent.\")}var a={type:\"Feature\",geometry:{type:\"Polygon\",coordinates:e},properties:t};return a.properties||(a.properties={}),a},I=\"undefined\"!=typeof self?self:{},A=Math.pow(2,53)-1;function C(e,t,n,i){var r=new d(e,t,n,i);return function(e){return r.solve(e)}}function M(e,t,n){return Math.min(n,Math.max(t,e))}function P(e,t,n){var i=n-t,r=((e-t)%i+i)%i+t;return r===t?n:r}function L(e){var t=[];for(var n in e)t.push(e[n]);return t}function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,a=n;r<a.length;r++){var o=a[r];for(var s in o)e[s]=o[s]}return e}function R(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function O(e,t){return-1!==e.indexOf(t,e.length-t.length)}function D(e,t,n){var i={};for(var r in e)i[r]=t.call(n||this,e[r],r,e);return i}function k(e){return Array.isArray(e)?e.map(k):\"object\"===t(e)&&e?D(e,k):e}C(.25,.1,.25,1),C(0,.7,1,.3),C(0,0,1,1),C(.42,0,1,1),C(0,0,.58,1),C(.42,0,.58,1);var F={};function z(e){F[e]||(\"undefined\"!=typeof console&&console.warn(e),F[e]=!0)}function V(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function U(e){for(var t,n,i=0,r=0,a=e.length,o=a-1;r<a;o=r++)i+=((n=e[o]).x-(t=e[r]).x)*(t.y+n.y);return i}function B(){return\"undefined\"!=typeof WorkerGlobalScope&&\"undefined\"!=typeof self&&self instanceof WorkerGlobalScope}function G(e){return\"number\"==typeof e}function H(e){return\"boolean\"==typeof e}var Y=X,q=3;function X(e,t,n){var i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var r=new Int32Array(this.arrayBuffer);e=r[0],this.d=(t=r[1])+2*(n=r[2]);for(var a=0;a<this.d*this.d;a++){var o=r[q+a],s=r[q+a+1];i.push(o===s?null:r.subarray(o,s))}var l=r[q+i.length+1];this.keys=r.subarray(r[q+i.length],l),this.bboxes=r.subarray(l),this.insert=this._insertReadonly}else{this.d=t+2*n;for(var u=0;u<this.d*this.d;u++)i.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=n,this.scale=t/e,this.uid=0;var c=n/t*e;this.min=-c,this.max=e+c}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function Z(e,t,n){if(W())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&j(r,n.prototype),r}function Q(e){return function(e){if(Array.isArray(e))return s(e)}(e)||o(e)||l(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}X.prototype.insert=function(e,t,n,i,r){this._forEachCell(t,n,i,r,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(r)},X.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},X.prototype._insertCell=function(e,t,n,i,r,a){this.cells[r].push(a)},X.prototype.query=function(e,t,n,i,r){var a=this.min,o=this.max;if(e<=a&&t<=a&&o<=n&&o<=i&&!r)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,n,i,this._queryCell,s,{},r),s},X.prototype._queryCell=function(e,t,n,i,r,a,o,s){var l=this.cells[r];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===o[d]){var f=4*d;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&t<=c[f+3]&&n>=c[f+0]&&i>=c[f+1])?(o[d]=!0,a.push(u[d])):o[d]=!1}}},X.prototype._forEachCell=function(e,t,n,i,r,a,o,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(n),h=this._convertToCellCoord(i),d=l;d<=c;d++)for(var f=u;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&r.call(this,e,t,n,i,p,a,o,s))return}},X.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},X.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},X.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=q+this.cells.length+1+1,n=0,i=0;i<this.cells.length;i++)n+=this.cells[i].length;var r=new Int32Array(t+n+this.keys.length+this.bboxes.length);r[0]=this.extent,r[1]=this.n,r[2]=this.padding;for(var a=t,o=0;o<e.length;o++){var s=e[o];r[q+o]=a,r.set(s,a),a+=s.length}return r[q+e.length]=a,r.set(this.keys,a),r[q+e.length+1]=a+=this.keys.length,r.set(this.bboxes,a),a+=this.bboxes.length,r.buffer};const K={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function J(e){return(e=Math.round(e))<0?0:e>255?255:e}function $(e){return e<0?0:e>1?1:e}function ee(e){return J(\"%\"===e[e.length-1]?Number(e.slice(0,-1))/100*255:Number(e))}function te(e){return\"%\"!==e[e.length-1]?null:$(Number(e.slice(0,-1))/100)}function ne(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function ie(e){return e<48?NaN:e<=57?e-48:e<97?NaN:e<=102?e-87:NaN}const re=new Set([\" \",\"\\t\",\"\\n\",\"\\r\",\",\",\"/\"]);function ae(e){const t=e.trim().toLowerCase();if(t in K)return K[t].slice();if(\"#\"===t[0]){const e=4===t.length||5===t.length;if(!e&&7!==t.length&&9!==t.length)return null;const n=e?1:2,i=[0,0,0,255],r=5===t.length||9===t.length?4:3;for(let a=0;a<r;a++){const r=ie(t.charCodeAt(a*n+1));if(i[a]=16*r+(e?r:ie(t.charCodeAt(a*n+2))),Number.isNaN(i[a]))return null}return i[3]/=255,i}const n=t.indexOf(\"(\");let i=t.indexOf(\")\");if(-1===i&&(i=t.length),-1!==n&&(i+1===t.length||i===t.length)){const e=t.substr(0,n),r=[];let a=\"\";for(let e=n+1;e<i;e++)re.has(t[e])?0!==a.length&&(r.push(a),a=\"\"):a+=t[e];0!==a.length&&r.push(a);const o=4===r.length?function(e){return te(e)??$(Number(e))}(r.pop()):1;if(3!==r.length)return null;let s,l,u,c,h,d;switch(e){case\"rgba\":case\"rgb\":return d=[...r.map(ee),o],d.some(Number.isNaN)?null:d;case\"hsla\":case\"hsl\":return s=(function(e){return e.endsWith(\"deg\")?Number(e.slice(0,-3)):e.endsWith(\"grad\")?360*Number(e.slice(0,-4))/400:e.endsWith(\"rad\")?360*Number(e.slice(0,-3))/(2*Math.PI):e.endsWith(\"turn\")?360*Number(e.slice(0,-4)):Number(e)}(r[0])%360+360)%360/360,Number.isNaN(s)?null:(l=te(r[1]),Number.isNaN(l)||null===l?null:(u=te(r[2]),Number.isNaN(u)||null===u?null:(h=u<=.5?u*(l+1):u+l-u*l,c=2*u-h,[J(255*ne(c,h,s+1/3)),J(255*ne(c,h,s)),J(255*ne(c,h,s-1/3)),o])));default:return null}}return null}function oe(e,t){return null!=e?e:t}function se(e){return null!=e}function le(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function ue(e,n){if(n&&(\"object\"==t(n)||\"function\"==typeof n))return n;if(void 0!==n)throw new TypeError(\"Derived constructors may only return object or undefined\");return le(e)}function ce(e){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ce(e)}function he(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&j(e,t)}function de(e){var t=\"function\"==typeof Map?new Map:void 0;return de=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf(\"[native code]\")}catch(t){return\"function\"==typeof e}}(e))return e;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Z(e,arguments,ce(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,e)},de(e)}oe.EMPTY_OBJECT=Object.freeze({});var fe=1/Math.PI*180,pe=1/180*Math.PI,_e=1e-12;function me(e,t,n){if(ge(e)){n=n||((r=e).clone?r.clone():Z(Array,Q(r)));for(var i=0;i<n.length&&i<e.length;++i)n[i]=t(e[i],i,n);return n}var r;return t(e)}function ve(e){return e=function(e){return Math.round(e/_e)*_e}(e),\"\".concat(parseFloat(e.toPrecision(4)))}function ge(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ye(e){return me(e,function(e){return e*pe})}function xe(e){return me(e,function(e){return e*fe})}function we(e,t,n){return me(e,function(e){return Math.max(t,Math.min(n,e))})}function Se(e,t){if(e===t)return!0;if(ge(e)&&ge(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!Se(e[n],t[n]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=_e*Math.max(1,Math.abs(e),Math.abs(t))}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}var Ee=function(t){function n(){return e(this,n),t=this,r=arguments,i=ce(i=n),ue(t,Te()?Reflect.construct(i,r||[],ce(t).constructor):i.apply(t,r));var t,i,r}return he(n,t),r(n,[{key:\"ELEMENTS\",get:function(){return this.length}},{key:\"elements\",get:function(){return this}},{key:\"clone\",value:function(){return(new this.constructor).copy(this)}},{key:\"from\",value:function(e){return ge(e)?this.copy(e):this.fromObject(e)}},{key:\"fromArray\",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:\"to\",value:function(e){return e===this?this:ge(e)?this.toArray(e):this.toObject(e)}},{key:\"toTarget\",value:function(e){return e?this.to(e):this}},{key:\"toArray\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===t&&0===e.length)for(var n=0;n<this.ELEMENTS;++n)e.push(this[n]);else for(var i=0;i<this.ELEMENTS;++i)if(0===t)e[i]=this[i];else for(var r=0;r<this.ELEMENTS;++r)e[t+r]=this[r];return e}},{key:\"toObject\",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=0;t<this.ELEMENTS;++t)e[t]=this[t];return e}},{key:\"toFloat32Array\",value:function(){return new Float32Array(this.toArray())}},{key:\"toString\",value:function(){return this._formatString()}},{key:\"_formatString\",value:function(){for(var e=\"\",t=0;t<this.ELEMENTS;++t)e+=(t>0?\", \":\"\")+ve(this[t]);return\"[\".concat(e,\"]\")}},{key:\"equals\",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Se(this[t],e[t]))return!1;return!0}},{key:\"negate\",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:\"add\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:\"subtract\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:\"sub\",value:function(e){return this.subtract(e)}},{key:\"setScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:\"addScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:\"subScalar\",value:function(e){return this.addScalar(-e)}},{key:\"multiplyScalar\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:\"divideScalar\",value:function(e){return this.multiplyScalar(1/e)}},{key:\"clampScalar\",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:\"multiplyByScalar\",value:function(e){return this.multiplyScalar(e)}},{key:\"divideByScalar\",value:function(e){return this.divideScalar(e)}},{key:\"check\",value:function(){return this}},{key:\"validate\",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}}])}(de(Array)),be={};function Ie(e){if(!Number.isFinite(e))throw new Error(\"Invalid number \".concat(e));return e}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"\";if(!function(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}(e,t))throw new Error(\"math.gl: \".concat(n,\" some fields set to invalid numbers'\"));return e}function Ce(e,t){be[e]||(be[e]=!0,console.warn(\"\".concat(e,\" has been removed in version \").concat(t,\", see upgrade guide for more information\")))}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}var Pe=function(t){function n(){return e(this,n),t=this,r=arguments,i=ce(i=n),ue(t,Me()?Reflect.construct(i,r||[],ce(t).constructor):i.apply(t,r));var t,i,r}return he(n,t),r(n,[{key:\"copy\",value:function(e){for(var t=0;t<this.ELEMENTS;t++)this[t]=e[t];return this}},{key:\"len\",value:function(){return Math.sqrt(this.lengthSquared())}},{key:\"magnitude\",value:function(){return this.len()}},{key:\"lengthSquared\",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:\"magnitudeSquared\",value:function(){return this.lengthSquared()}},{key:\"distance\",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:\"distanceSquared\",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var i=this[n]-e[n];t+=i*i}return Ie(t)}},{key:\"dot\",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Ie(t)}},{key:\"normalize\",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:\"multiply\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:\"divide\",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++)for(var a=r[i],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:\"lengthSq\",value:function(){return this.lengthSquared()}},{key:\"distanceTo\",value:function(e){return this.distance(e)}},{key:\"distanceToSquared\",value:function(e){return this.distanceSquared(e)}},{key:\"getComponent\",value:function(e){return Ie(this[e])}},{key:\"setComponent\",value:function(e,t){return this[e]=t,this.check()}},{key:\"addVectors\",value:function(e,t){return this.copy(e).add(t)}},{key:\"subVectors\",value:function(e,t){return this.copy(e).subtract(t)}},{key:\"multiplyVectors\",value:function(e,t){return this.copy(e).multiply(t)}},{key:\"addScaledVector\",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:\"scale\",value:function(e){if(ge(e))for(var t=0;t<this.ELEMENTS;++t)this[t]*=e[t];else this.multiplyScalar(e);return this}},{key:\"lerp\",value:function(e,t,n){void 0===n&&\"number\"==typeof t&&(n=t,t=e,e=this);for(var i=0;i<this.ELEMENTS;++i){var r=e[i];this[i]=r+n*(t[i]-r)}return this.check()}},{key:\"min\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:\"max\",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:\"clamp\",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}}])}(Ee),Le=1e-6,Ne=\"undefined\"!=typeof Float32Array?Float32Array:Array;function Re(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=i*s+a*l,e[1]=r*s+o*l,e[2]=i*u+a*c,e[3]=r*u+o*c,e}function Oe(e,t,n){var i=t[1],r=t[2],a=t[3],o=n[0],s=n[1];return e[0]=t[0]*o,e[1]=i*o,e[2]=r*s,e[3]=a*s,e}function De(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=n[0],f=n[1],p=n[2],_=n[3],m=n[4],v=n[5],g=n[6],y=n[7],x=n[8];return e[0]=d*i+f*o+p*u,e[1]=d*r+f*s+p*c,e[2]=d*a+f*l+p*h,e[3]=_*i+m*o+v*u,e[4]=_*r+m*s+v*c,e[5]=_*a+m*l+v*h,e[6]=g*i+y*o+x*u,e[7]=g*r+y*s+x*c,e[8]=g*a+y*l+x*h,e}function ke(e,t,n){var i=n[0],r=n[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Fe(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],d=t[9],f=t[10],p=t[11],_=t[12],m=t[13],v=t[14],g=t[15],y=n[0],x=n[1],w=n[2],S=n[3];return e[0]=y*i+x*s+w*h+S*_,e[1]=y*r+x*l+w*d+S*m,e[2]=y*a+x*u+w*f+S*v,e[3]=y*o+x*c+w*p+S*g,e[4]=(y=n[4])*i+(x=n[5])*s+(w=n[6])*h+(S=n[7])*_,e[5]=y*r+x*l+w*d+S*m,e[6]=y*a+x*u+w*f+S*v,e[7]=y*o+x*c+w*p+S*g,e[8]=(y=n[8])*i+(x=n[9])*s+(w=n[10])*h+(S=n[11])*_,e[9]=y*r+x*l+w*d+S*m,e[10]=y*a+x*u+w*f+S*v,e[11]=y*o+x*c+w*p+S*g,e[12]=(y=n[12])*i+(x=n[13])*s+(w=n[14])*h+(S=n[15])*_,e[13]=y*r+x*l+w*d+S*m,e[14]=y*a+x*u+w*f+S*v,e[15]=y*o+x*c+w*p+S*g,e}function ze(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=n+n,s=i+i,l=r+r,u=n*o,c=i*o,h=i*s,d=r*o,f=r*s,p=r*l,_=a*o,m=a*s,v=a*l;return e[0]=1-h-p,e[1]=c+v,e[2]=d-m,e[3]=0,e[4]=c-v,e[5]=1-u-p,e[6]=f+_,e[7]=0,e[8]=d+m,e[9]=f-_,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ve(){var e=new Ne(3);return Ne!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Ue(e){return Math.hypot(e[0],e[1],e[2])}function Be(e,t,n){var i=new Ne(3);return i[0]=e,i[1]=t,i[2]=n,i}function Ge(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function He(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function Ye(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function qe(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function Xe(e,t){var n=t[0],i=t[1],r=t[2],a=n*n+i*i+r*r;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function We(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function je(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=r*l-a*s,e[1]=a*o-i*l,e[2]=i*s-r*o,e}function Ze(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[3]*i+n[7]*r+n[11]*a+n[15];return e[0]=(n[0]*i+n[4]*r+n[8]*a+n[12])/(o=o||1),e[1]=(n[1]*i+n[5]*r+n[9]*a+n[13])/o,e[2]=(n[2]*i+n[6]*r+n[10]*a+n[14])/o,e}function Qe(e,t,n){var i=t[0],r=t[1],a=t[2];return e[0]=i*n[0]+r*n[3]+a*n[6],e[1]=i*n[1]+r*n[4]+a*n[7],e[2]=i*n[2]+r*n[5]+a*n[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Ke=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},Je=Ue;function $e(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n[0]*i+n[4]*r+n[8]*a+n[12]*o,e[1]=n[1]*i+n[5]*r+n[9]*a+n[13]*o,e[2]=n[2]*i+n[6]*r+n[10]*a+n[14]*o,e[3]=n[3]*i+n[7]*r+n[11]*a+n[15]*o,e}function et(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*a-l*r,h=u*r+l*i-o*a,d=u*a+o*r-s*i,f=-o*i-s*r-l*a;return e[0]=c*u+f*-o+h*-l-d*-s,e[1]=h*u+f*-s+d*-o-c*-l,e[2]=d*u+f*-l+c*-s-h*-o,e[3]=t[3],e}function tt(){var e=new Ne(4);return Ne!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function nt(e,t,n){n*=.5;var i=Math.sin(n);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(n),e}function it(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=i*c+o*s+r*u-a*l,e[1]=r*c+o*l+a*s-i*u,e[2]=a*c+o*u+i*l-r*s,e[3]=o*c-i*s-r*l-a*u,e}function rt(e,t){var n,i=t[0]+t[4]+t[8];if(i>0)n=Math.sqrt(i+1),e[3]=.5*n,e[0]=(t[5]-t[7])*(n=.5/n),e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);var a=(r+1)%3,o=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*a+a]-t[3*o+o]+1),e[r]=.5*n,e[3]=(t[3*a+o]-t[3*o+a])*(n=.5/n),e[a]=(t[3*a+r]+t[3*r+a])*n,e[o]=(t[3*o+r]+t[3*r+o])*n}return e}Ve(),function(){var e;e=new Ne(4),Ne!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var at,ot,st,lt,ut=(at=Ve(),ot=Be(1,0,0),st=Be(0,1,0),function(e,t,n){var i=We(t,n);return i<-.999999?(je(at,ot,t),Je(at)<1e-6&&je(at,st,t),Xe(at,at),nt(e,at,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(je(at,t,n),e[0]=at[0],e[1]=at[1],e[2]=at[2],e[3]=1+i,function(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=n*n+i*i+r*r+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=i*o,e[2]=r*o,e[3]=a*o,e}(e,e))});function ct(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e}function ht(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[3]*r+n[6],e[1]=n[1]*i+n[4]*r+n[7],e}function dt(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[4]*r+n[12],e[1]=n[1]*i+n[5]*r+n[13],e}function ft(e,t,n){var i=t[0],r=t[1],a=n[3]*i+n[7]*r||1;return e[0]=(n[0]*i+n[4]*r)/a,e[1]=(n[1]*i+n[5]*r)/a,e}function pt(e,t,n){var i=t[0],r=t[1],a=t[2],o=n[3]*i+n[7]*r+n[11]*a||1;return e[0]=(n[0]*i+n[4]*r+n[8]*a)/o,e[1]=(n[1]*i+n[5]*r+n[9]*a)/o,e[2]=(n[2]*i+n[6]*r+n[10]*a)/o,e}function _t(e,t,n){var i=t[0],r=t[1],a=t[2];return e[0]=n[0]*i+n[3]*r+n[6]*a,e[1]=n[1]*i+n[4]*r+n[7]*a,e[2]=n[2]*i+n[5]*r+n[8]*a,e[3]=t[3],e}tt(),tt(),lt=new Ne(9),Ne!=Float32Array&&(lt[1]=0,lt[2]=0,lt[3]=0,lt[5]=0,lt[6]=0,lt[7]=0),lt[0]=1,lt[4]=1,lt[8]=1,function(){var e=new Ne(2);Ne!=Float32Array&&(e[0]=0,e[1]=0)}();var mt=6378137,vt=3.141592653589793,gt={DEFAULT_SPHERE_TRIANGLES:[],SCROLL_ZOOM_SPHERE_CONTROL:4,CAMERA_MAX_HEIGHT:6378137*7.35,TILE_GRIDSAMPLES_SPLIT:{SMALL:4,MIDDLE:6,LARGE:9,LARGE_S:20,SMALL_Z_SAMPLES:16,MIDDLE_Z_SAMPLES:8,LARGE_Z_SAMPLES:2,LARGE_S_Z_SAMPLES:1,THE_MIN_SAMPLES:1},TRANSFORM:{PROJECTION_CHANGE_SMALL_ZOOM:5,PROJECTION_CHANGE_MIDDLE_ZOOM:10,PROJECTION_CHANGE_LARGE_ZOOM:15,MAX_LAT:90,MIN_LAT:-90,SPHERE_MAX_PITCH:90,PLAIN_MAX_PITCH:90,SPHERE_DRAG_PAN_MAX_PITCH:45,DEG_TO_RAD:vt/180,RAD_TO_DEG:180/vt,R:mt,R1:6356752.314245179,REAL_R:6378137,R2:40680631590769,R_SCALE:1,R_ZOOM:1,CIR:2*vt*mt,COVERING_TILE_ZOOM:6,EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,UNIT_Z:[0,0,1],UNIT_Z_REVERSE:[0,0,-1],VIEW_MAX_BOUNDING:{west:-180,south:-85.05113,east:180,north:85.05113},PI:vt,TWO_PI:2*vt,PI_OVER_TWO:vt/2,FP_ZOOM:17,TERRAIN_FIND_ZOOM_MIN:5,TERRAIN_SIMPLIFY_ZOOM_MAX:15,ERR_TERRAIN_ALT:-mt,OFFSCREEN_WIDTH:2048,OFFSCREEN_HEIGHT:2048,SHADOW_VIEWPORT_SIZE:[8192,8192],RAY_PICK_MIN_ZOOM:4,BOUND_KEYS:[\"topLeft\",\"topMidL\",\"topMiddle\",\"topMidR\",\"topRight\",\"bottomRight\",\"bottomMiddle\",\"bottomLeft\"],FOV_IN_RADIANS:.6435011087932844,FOV_IN_DEGREES:36.86989764584402},CesiumMath:{EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296,PI:Math.PI,ONE_OVER_PI:1/Math.PI,PI_OVER_TWO:Math.PI/2,PI_OVER_THREE:Math.PI/3,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,THREE_PI_OVER_TWO:3*Math.PI/2,TWO_PI:2*Math.PI,ONE_OVER_TWO_PI:1/(2*Math.PI),RADIANS_PER_DEGREE:Math.PI/180,DEGREES_PER_RADIAN:180/Math.PI,RADIANS_PER_ARCSECOND:Math.PI/180/3600,log2:oe(Math.log2,function(e){return Math.log(e)*Math.LOG2E}),clamp:function(e,t,n){return e<t?t:e>n?n:e},equalsEpsilon:function(e,t,n,i){n=n||0,i=i||n;var r=Math.abs(e-t);return r<=i||r<=n*Math.max(Math.abs(e),Math.abs(t))},toRadians:function(e){return e*gt.CesiumMath.RADIANS_PER_DEGREE},toDegrees:function(e){return e*gt.CesiumMath.DEGREES_PER_RADIAN},negativePiToPi:function(e){return e>=-gt.CesiumMath.PI&&e<=gt.CesiumMath.PI?e:gt.CesiumMath.zeroToTwoPi(e+gt.CesiumMath.PI)-gt.CesiumMath.PI},zeroToTwoPi:function(e){if(e>=0&&e<=gt.CesiumMath.TWO_PI)return e;var t=gt.CesiumMath.mod(e,gt.CesiumMath.TWO_PI);return Math.abs(t)<gt.CesiumMath.EPSILON14&&Math.abs(e)>gt.CesiumMath.EPSILON14?gt.CesiumMath.TWO_PI:t},mod:function(e,t){return Math.sign(e)===Math.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t},acosClamped:function(e){return Math.acos(M(e,-1,1))},asinClamped:function(e){return Math.asin(M(e,-1,1))},chordLength:function(e,t){if(void 0===e)throw new Error(\"angle is required.\");if(void 0===t)throw new Error(\"radius is required.\");return 2*t*Math.sin(.5*e)},fastApproximateAtan2:function(e,t){var n,i=Math.abs(e);n=Math.abs(t);var r=Math.max(i,n),a=(n=Math.min(i,n))/r;if(isNaN(a))throw new Error(\"either x or y must be nonzero\");return i=gt.CesiumMath.fastApproximateAtan(a),i=Math.abs(t)>Math.abs(e)?gt.CesiumMath.PI_OVER_TWO-i:i,i=e<0?gt.CesiumMath.PI-i:i,t<0?-i:i},fastApproximateAtan:function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)}},TEXTUREWRAP:{REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648},TEXTUREMAGNIFICATIONFILTER:{NEAREST:9728,LINEAR:9729},TEXTUREMINNIFICATIONFILTER:{NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987},SOURCE:{MAX_BOUNDS:[[-180,90],[180,90],[180,-90],[-180,-90]],ERROR_IMG_INDEX:-999,CLOCK_SKEW_RETRY_TIMEOUT:3e4,TRANSPARENT_PNG_URL:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\",MAX_PARALLEL_IMAGE_REQUESTS:16,GLOBAL_SOURCE_ID:\"sphere-image-globe\",SKYBOX_SOURCE_ID:\"sphere-image-skybox\",PANORAMA_SOURCE_ID:\"panorama-special-source\",ATMOSPHERE_SOURCE_ID:\"sphere-atmosphere\",COSMOS_SOURCE_ID:\"sphere-cosmos\",MAX_GLTF_TILE_COUNT:300,MAX_GLTF_TILE_TO_FIND_PARENT:64,MAX_IMAGE_CONCURRENCY:32,TEXTURE_CUBE_KEYS:[\"px\",\"nx\",\"py\",\"ny\",\"pz\",\"nz\"],ION_ACCESS_TOKEN:\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzMGY4ODczYy1mNTk4LTRiMDUtYmIxYy0xZWYwOWZmMGY4NjQiLCJpZCI6NDQsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJhc3NldHMiOlsxLDIsMyw0LDYxOTMsNjI3Myw3MTYyLDczNTMsNzE0Ml0sImlhdCI6MTU0MTYxODM0NX0.lWnGs9ySXO4QK3HagcMsDpZ8L01DpmUDQm38-2QAQuE\"},HIGHLIGHT_TYPE:{PRIMITIVE:\"PRIMITIVE\",NODE:\"NODE\",SCENE:\"SCENE\"},MODEL_TYPE:{OSGB:\"osgb\",E3DCM:\"e3dcm\",TDMODEL:\"3dmodel\"},LAYER:{PANORAMA_LAYER_ID:\"panorama-special-layer\",RADIATION_REGIONS:5},TILE:{EXTENT:8192,DEPTH_MAX_RANGE:1,OFFSCREEN_SIZE:1024},FRAMEBUFFER:{DEPTH_IMAGE_SCALE:1},EFFECTS:{FOG_START_DISTANCE:4e3,FOG_CALC_LENGTH:2e4,SHADOW_OFFSET:25e-8},CAMERA:{SUNLIGHT_CAMERA_ID:\"SUNLIGHT_CAMERA_ID\",SKYBOX_CAMERA_ID:\"SKYBOX_CAMERA_ID\",ATMOSPHERE_BLEND_CAMERA_ID:\"ATMOSPHERE_BLEND_CAMERA_ID\",DRAW_MODE:{NORMAL:\"NORMAL\",OFFSCREEN:\"OFFSCREEN\",OFFSCREEN_VIEWSHED:\"OFFSCREEN_VIEWSHED\",ONSCREEN_SHADOW:\"SHADOW\",ONSCREEN_VIEWSHED:\"VIEWSHED\",ONSCREEN_ALL:\"ONSCREEN_ALL\"},SUNLIGHT_FIXED_MODE:{FIXED:\"FIXED\",DYNAMIC:\"DYNAMIC\"}},GL_CONST:{SHADOW_TEXTURE_UNIT1:{VALUE:33984,INDEX:0},SHADOW_TEXTURE_UNIT2:{VALUE:33985,INDEX:1},SHADOW_BASE_TEXTURE_UNIT:{VALUE:33986,INDEX:2},FXAA_TEXTURE_UNIT1:{VALUE:33987,INDEX:3},BLUR_TEXTURE_UNIT1:{VALUE:33988,INDEX:4},BLUR_TEXTURE_UNIT2:{VALUE:33989,INDEX:5},MODEL_TEXTURE_UNIT1:{VALUE:33990,INDEX:6},MODEL_TEXTURE_UNIT2:{VALUE:33991,INDEX:7},MODEL_TEXTURE_UNIT3:{VALUE:33992,INDEX:8},MODEL_TEXTURE_UNIT4:{VALUE:33993,INDEX:9},MODEL_TEXTURE_UNIT5:{VALUE:33994,INDEX:10},VIDEO_TEXTURE_UNIT1:{VALUE:33995,INDEX:11},PATTERN_TEXTURE_UNIT1:{VALUE:33996,INDEX:12},BRDF_TEXTURE_UNIT:{VALUE:33997,INDEX:13},TEXTURE14:{VALUE:33998,INDEX:14},TEXTURE15:{VALUE:33999,INDEX:15},TEXTURE16:{VALUE:34e3,INDEX:16},TEXTURE17:{VALUE:34001,INDEX:17},TEXTURE18:{VALUE:34002,INDEX:18}},PERFORMANCE:{MODE:{FLIGHT:\"FLIGHT\",MANUAL:\"MANUAL\"},SMOOTH_CONSTS:{FRAME_RATE:30,FRAME_DURATION:33.33}},COMPRESSED_TEXTURE_TYPE:{COMPRESSED_RGB_S3TC:{COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779},COMPRESSED_RGB_PVRTC:{COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843},COMPRESSED_RGB_ETC1_WEBGL:36196},COLORTYPEANDLENGTH:{ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,FRAGMENT_SHADER:35632},PixelDatatype:{UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT_OES:36193,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635}},yt=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e(this,t),this.heading=n,this.pitch=i,this.roll=r}return r(t,[{key:\"fromQuaternion\",value:function(e){return t.fromQuaternion(e,this)}},{key:\"copy\",value:function(e){return this.heading=e.heading,this.roll=e.roll,this.pitch=e.pitch,this}},{key:\"clone\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new t;return t.clone(this,e)}},{key:\"equals\",value:function(e){return t.equals(this,e)}},{key:\"equalsEpsilon\",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.equalsEpsilon(this,e,n,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n)}},{key:\"toString\",value:function(){return\"(\".concat(this.heading,\", \").concat(this.pitch,\", \").concat(this.roll,\")\")}}],[{key:\"fromQuaternion\",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t,i=2*(e.w*e.y-e.z*e.x),r=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z);return n.heading=-Math.atan2(2*(e.w*e.z+e.x*e.y),1-2*(e.y*e.y+e.z*e.z)),n.roll=Math.atan2(a,r),n.pitch=-gt.CesiumMath.asinClamped(i),n}},{key:\"fromDegrees\",value:function(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new t;return r.heading=e*gt.CesiumMath.RADIANS_PER_DEGREE,r.pitch=n*gt.CesiumMath.RADIANS_PER_DEGREE,r.roll=i*gt.CesiumMath.RADIANS_PER_DEGREE,r}},{key:\"clone\",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t;return n.heading=e.heading,n.pitch=e.pitch,n.roll=e.roll,n}},{key:\"equals\",value:function(e,t){return e===t||se(e)&&se(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll}},{key:\"equalsEpsilon\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return e===t||se(e)&&se(t)&&gt.CesiumMath.equalsEpsilon(e.heading,t.heading,n,i)&&gt.CesiumMath.equalsEpsilon(e.pitch,t.pitch,n,i)&&gt.CesiumMath.equalsEpsilon(e.roll,t.roll,n,i)}}])}();function xt(e,t,n){return t=ce(t),ue(e,wt()?Reflect.construct(t,n||[],ce(e).constructor):t.apply(e,n))}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}var St=new Float32Array(1),Tt=new Uint8Array(St.buffer),Et=new Uint32Array([287454020]),bt=68===new Uint8Array(Et.buffer)[0],It=function(t){function n(t,i,r,a){return e(this,n),le(ge(t)?xt(this,n,[t[0],t[1],t[2],t[3]]):xt(this,n,[t||0,i||0,r||0,a||0]))}return he(n,t),r(n,[{key:\"ELEMENTS\",get:function(){return 4}},{key:\"x\",get:function(){return this[0]},set:function(e){this[0]=Ie(e)}},{key:\"y\",get:function(){return this[1]},set:function(e){this[1]=Ie(e)}},{key:\"z\",get:function(){return this[2]},set:function(e){this[2]=Ie(e)}},{key:\"w\",get:function(){return this[3]},set:function(e){this[3]=Ie(e)}},{key:\"set\",value:function(e,t,n,i){return this[0]=e,this[1]=t,this[2]=n,this[3]=i,this.check()}},{key:\"copy\",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:\"fromObject\",value:function(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}},{key:\"toObject\",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}},{key:\"transform\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return $e(t,this,e),t.check()}},{key:\"transformByMatrix3\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return _t(t,this,e),t.check()}},{key:\"transformByMatrix2\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;return function(e,t,n){var i=t[0],r=t[1];e[0]=n[0]*i+n[2]*r,e[1]=n[1]*i+n[3]*r,e[2]=t[2],e[3]=t[3]}(t,this,e),t.check()}},{key:\"transformByQuaternion\",value:function(e,t){return et(t,this,e),t.check()}},{key:\"applyMatrix4\",value:function(e){return e.transform(this,this),this}},{key:\"clone\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new n;return n.clone(this,e)}},{key:\"equals\",value:function(e){return n.equals(this,e)}},{key:\"equalsEpsilon\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n.equalsEpsilon(this,e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:t)}},{key:\"toString\",value:function(){return\"(\".concat(this.x,\", \").concat(this.y,\", \").concat(this.z,\", \").concat(this.w,\")\")}}],[{key:\"ZERO\",get:function(){return At.ZERO}},{key:\"ONE\",get:function(){return At.ONE}},{key:\"UNIT_X\",get:function(){return At.UNIT_X}},{key:\"UNIT_Y\",get:function(){return At.UNIT_Y}},{key:\"UNIT_Z\",get:function(){return At.UNIT_Z}},{key:\"UNIT_W\",get:function(){return At.UNIT_W}},{key:\"fromElements\",value:function(e,t,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new n;return a.x=e,a.y=t,a.z=i,a.w=r,a}},{key:\"clone\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n;return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}},{key:\"pack\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t}},{key:\"unpack\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=e[t++],i.y=e[t++],i.z=e[t++],i.w=e[t],i}},{key:\"packArray\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(4*e.length),i=e.length,r=4*i;if(!Array.isArray(t)&&t.length!==r)throw new Error(\"If result is a typed array, it must have exactly array.length * 4 elements\");t.length!==r&&(t.length=r);for(var a=0;a<i;++a)n.pack(e[a],t,4*a);return t}},{key:\"unpackArray\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(e.length/4),i=e.length;t.length=i/4;for(var r=0;r<i;r+=4){var a=r/4;t[a]=n.unpack(e,r,t[a])}return t}},{key:\"maximumComponent\",value:function(e){return Math.max(e.x,e.y,e.z,e.w)}},{key:\"minimumComponent\",value:function(e){return Math.min(e.x,e.y,e.z,e.w)}},{key:\"minimumByComponent\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i}},{key:\"maximumByComponent\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i}},{key:\"magnitudeSquared\",value:function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w}},{key:\"magnitude\",value:function(e){return Math.sqrt(n.magnitudeSquared(e))}},{key:\"distance\",value:function(e,t){var i=new n;return n.subtract(e,t,i),n.magnitude(i)}},{key:\"distanceSquared\",value:function(e,t){var i=new n;return n.subtract(e,t,i),n.magnitudeSquared(i)}},{key:\"normalize\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n,i=n.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,t}},{key:\"dot\",value:function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w}},{key:\"multiplyComponents\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i}},{key:\"divideComponents\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i}},{key:\"add\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i}},{key:\"subtract\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i}},{key:\"multiplyByScalar\",value:function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n}},{key:\"divideByScalar\",value:function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n}},{key:\"negate\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n;return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t}},{key:\"abs\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n;return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t}},{key:\"lerp\",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n,a=new n;return n.multiplyByScalar(t,i,a),r=n.multiplyByScalar(e,1-i,r),n.add(a,r,r)}},{key:\"mostOrthogonalAxis\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n,i=new n,r=n.normalize(e,i);return n.abs(r,r),n.clone(r.x<=r.y?r.x<=r.z?r.x<=r.w?n.UNIT_X:n.UNIT_W:r.z<=r.w?n.UNIT_Z:n.UNIT_W:r.y<=r.z?r.y<=r.w?n.UNIT_Y:n.UNIT_W:r.z<=r.w?n.UNIT_Z:n.UNIT_W,t)}},{key:\"equals\",value:function(e,t){return e===t||se(e)&&se(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w}},{key:\"equalsArray\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]}},{key:\"equalsEpsilon\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return e===t||se(e)&&se(t)&&gt.CesiumMath.equalsEpsilon(e.x,t.x,n,i)&&gt.CesiumMath.equalsEpsilon(e.y,t.y,n,i)&&gt.CesiumMath.equalsEpsilon(e.z,t.z,n,i)&&gt.CesiumMath.equalsEpsilon(e.w,t.w,n,i)}},{key:\"packFloat\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n;return St[0]=e,bt?(t.x=Tt[0],t.y=Tt[1],t.z=Tt[2],t.w=Tt[3]):(t.x=Tt[3],t.y=Tt[2],t.z=Tt[1],t.w=Tt[0]),t}},{key:\"unpackFloat\",value:function(e){return bt?(Tt[0]=e.x,Tt[1]=e.y,Tt[2]=e.z,Tt[3]=e.w):(Tt[0]=e.w,Tt[1]=e.z,Tt[2]=e.y,Tt[3]=e.x),St[0]}},{key:\"fromColor\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n;return void 0!==e.r&&void 0!==e.g&&void 0!==e.b&&void 0!==e.a&&(t?(i.x=e.r/255,i.y=e.g/255,i